From 771fb8455b17b32a66d565a74f3d7d7a1f1a9530 Mon Sep 17 00:00:00 2001
From: Hsieh Chin Fan <pham@topo.tw>
Date: Thu, 10 Oct 2024 14:56:20 +0800
Subject: [PATCH] gh-pages

---
 .gitignore                                   |    3 -
 assets/og-example1.png                       |  Bin 264120 -> 264119 bytes
 dist/bundle-stats.html                       |    2 +
 dist/css/dumbymap.css                        |  819 +++
 dist/css/easymde.min.css                     |    7 +
 dist/css/index.css                           |  176 +
 dist/css/style.css                           |  179 +
 dist/dumbymap.mjs                            |    4 +
 dist/dumbymap.mjs.map                        |    1 +
 dist/easymde.min.js                          |    7 +
 dist/editor.mjs                              |    4 +
 dist/editor.mjs.map                          |    1 +
 dist/renderers/leaflet.js                    |    6 +
 dist/renderers/leaflet.mjs                   |    6 +
 dist/renderers/maplibre.js                   |    7 +
 dist/renderers/maplibre.mjs                  |    7 +
 dist/renderers/openlayers.js                 |    2 +
 dist/renderers/openlayers.mjs                |    2 +
 doc-coverage/docCoverageReport.json          |  102 +
 docs/Folder.html                             |  232 +
 docs/Item.html                               |  237 +
 docs/Layout.html                             |  291 +
 docs/Layout.mjs.html                         |  317 +
 docs/MenuItem.mjs.html                       |  450 ++
 docs/Overlay.html                            |  568 ++
 docs/SideBySide.html                         |  444 ++
 docs/Suggestion.html                         |  232 +
 docs/dumbyUtils.mjs.html                     |  335 +
 docs/dumbymap.mjs.html                       |  563 ++
 docs/editor.mjs.html                         | 1242 ++++
 docs/fonts/OpenSans-Bold-webfont.eot         |  Bin 0 -> 19544 bytes
 docs/fonts/OpenSans-Bold-webfont.svg         | 1830 +++++
 docs/fonts/OpenSans-Bold-webfont.woff        |  Bin 0 -> 22432 bytes
 docs/fonts/OpenSans-BoldItalic-webfont.eot   |  Bin 0 -> 20133 bytes
 docs/fonts/OpenSans-BoldItalic-webfont.svg   | 1830 +++++
 docs/fonts/OpenSans-BoldItalic-webfont.woff  |  Bin 0 -> 23048 bytes
 docs/fonts/OpenSans-Italic-webfont.eot       |  Bin 0 -> 20265 bytes
 docs/fonts/OpenSans-Italic-webfont.svg       | 1830 +++++
 docs/fonts/OpenSans-Italic-webfont.woff      |  Bin 0 -> 23188 bytes
 docs/fonts/OpenSans-Light-webfont.eot        |  Bin 0 -> 19514 bytes
 docs/fonts/OpenSans-Light-webfont.svg        | 1831 +++++
 docs/fonts/OpenSans-Light-webfont.woff       |  Bin 0 -> 22248 bytes
 docs/fonts/OpenSans-LightItalic-webfont.eot  |  Bin 0 -> 20535 bytes
 docs/fonts/OpenSans-LightItalic-webfont.svg  | 1835 +++++
 docs/fonts/OpenSans-LightItalic-webfont.woff |  Bin 0 -> 23400 bytes
 docs/fonts/OpenSans-Regular-webfont.eot      |  Bin 0 -> 19836 bytes
 docs/fonts/OpenSans-Regular-webfont.svg      | 1831 +++++
 docs/fonts/OpenSans-Regular-webfont.woff     |  Bin 0 -> 22660 bytes
 docs/global.html                             | 6802 ++++++++++++++++++
 docs/index.html                              |   65 +
 docs/scripts/linenumber.js                   |   25 +
 docs/scripts/prettify/Apache-License-2.0.txt |  202 +
 docs/scripts/prettify/lang-css.js            |    2 +
 docs/scripts/prettify/prettify.js            |   28 +
 docs/styles/jsdoc-default.css                |  358 +
 docs/styles/prettify-jsdoc.css               |  111 +
 docs/styles/prettify-tomorrow.css            |  132 +
 docs/utils.mjs.html                          |  186 +
 index.html                                   |    2 +-
 59 files changed, 25142 insertions(+), 4 deletions(-)
 create mode 100644 dist/bundle-stats.html
 create mode 100644 dist/css/dumbymap.css
 create mode 100644 dist/css/easymde.min.css
 create mode 100644 dist/css/index.css
 create mode 100644 dist/css/style.css
 create mode 100644 dist/dumbymap.mjs
 create mode 100644 dist/dumbymap.mjs.map
 create mode 100644 dist/easymde.min.js
 create mode 100644 dist/editor.mjs
 create mode 100644 dist/editor.mjs.map
 create mode 100644 dist/renderers/leaflet.js
 create mode 100644 dist/renderers/leaflet.mjs
 create mode 100644 dist/renderers/maplibre.js
 create mode 100644 dist/renderers/maplibre.mjs
 create mode 100644 dist/renderers/openlayers.js
 create mode 100644 dist/renderers/openlayers.mjs
 create mode 100644 doc-coverage/docCoverageReport.json
 create mode 100644 docs/Folder.html
 create mode 100644 docs/Item.html
 create mode 100644 docs/Layout.html
 create mode 100644 docs/Layout.mjs.html
 create mode 100644 docs/MenuItem.mjs.html
 create mode 100644 docs/Overlay.html
 create mode 100644 docs/SideBySide.html
 create mode 100644 docs/Suggestion.html
 create mode 100644 docs/dumbyUtils.mjs.html
 create mode 100644 docs/dumbymap.mjs.html
 create mode 100644 docs/editor.mjs.html
 create mode 100644 docs/fonts/OpenSans-Bold-webfont.eot
 create mode 100644 docs/fonts/OpenSans-Bold-webfont.svg
 create mode 100644 docs/fonts/OpenSans-Bold-webfont.woff
 create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.eot
 create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.svg
 create mode 100644 docs/fonts/OpenSans-BoldItalic-webfont.woff
 create mode 100644 docs/fonts/OpenSans-Italic-webfont.eot
 create mode 100644 docs/fonts/OpenSans-Italic-webfont.svg
 create mode 100644 docs/fonts/OpenSans-Italic-webfont.woff
 create mode 100644 docs/fonts/OpenSans-Light-webfont.eot
 create mode 100644 docs/fonts/OpenSans-Light-webfont.svg
 create mode 100644 docs/fonts/OpenSans-Light-webfont.woff
 create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.eot
 create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.svg
 create mode 100644 docs/fonts/OpenSans-LightItalic-webfont.woff
 create mode 100644 docs/fonts/OpenSans-Regular-webfont.eot
 create mode 100644 docs/fonts/OpenSans-Regular-webfont.svg
 create mode 100644 docs/fonts/OpenSans-Regular-webfont.woff
 create mode 100644 docs/global.html
 create mode 100644 docs/index.html
 create mode 100644 docs/scripts/linenumber.js
 create mode 100644 docs/scripts/prettify/Apache-License-2.0.txt
 create mode 100644 docs/scripts/prettify/lang-css.js
 create mode 100644 docs/scripts/prettify/prettify.js
 create mode 100644 docs/styles/jsdoc-default.css
 create mode 100644 docs/styles/prettify-jsdoc.css
 create mode 100644 docs/styles/prettify-tomorrow.css
 create mode 100644 docs/utils.mjs.html

diff --git a/.gitignore b/.gitignore
index 3e80267..bc72e8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,3 @@
-dist/
-docs/
-doc-coverage/
 node_modules/
 package-lock.json
 pnpm-lock.yaml
diff --git a/assets/og-example1.png b/assets/og-example1.png
index 170d35430e5a3328a5419d51a73b95fd2d613efb..8788c0fe9b92e2f4fe31121d5197acc66aa3b665 100644
GIT binary patch
delta 17
YcmdndFR;B|prM7ag{g&k3(IzP06v8VHUIzs

delta 19
acmdnqFR-IuprM7ag{g&k3(IzPMlJwK`UXJ&

diff --git a/dist/bundle-stats.html b/dist/bundle-stats.html
new file mode 100644
index 0000000..598f4b6
--- /dev/null
+++ b/dist/bundle-stats.html
@@ -0,0 +1,2 @@
+<!doctype html><html lang="en"><head><meta charset="utf8"><meta name="viewport" content="initial-scale=1,maximum-scale=1,width=device-width"><title>Bundle Size — 347.49KiB (+100%). - BundleStats</title><meta name="description" content="relative-ci/bundle-stats: In-depth bundle analyzer for webpack(bundle size, assets, modules, packages)"><style>:root{--font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;--font-family-fixed:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--space-xxxsmall:4px;--space-xxsmall:8px;--space-xsmall:12px;--space-small:16px;--space-medium:24px;--space-large:32px;--space-xlarge:40px;--space-xxlarge:48px;--space-xxxlarge:64px;--size-xsmall:0.77rem;--size-small:0.92rem;--size:1rem;--size-medium:var(--size);--size-large:1.125rem;--size-xlarge:1.266rem;--size-xxlarge:1.424rem;--size-xxxlarge:1.602rem;--size-xxxxlarge:1.802rem;--line-height:1.66;--line-height-heading:1.33;--color-gray-25:#f9f9fa;--color-gray-50:#e5e5e7;--color-gray-100:#bfbfc2;--color-gray-200:#959499;--color-gray-300:#6a6970;--color-gray-400:#4a4952;--color-gray-500:#2a2933;--color-gray-600:#25242e;--color-gray-700:#1f1f27;--color-gray-800:#191920;--color-gray-900:#0f0f14;--color-gray-ultra-light:var(--color-gray-200);--color-gray-light:var(--color-gray-300);--color-gray:var(--color-gray-500);--color-gray-dark:var(--color-gray-700);--color-gray-ultra-dark:var(--color-gray-900);--color-red-25:#fdf5f6;--color-red-50:#fbe9ea;--color-red-100:#f4c7ca;--color-red-200:#eda2a7;--color-red-300:#e57c83;--color-red-400:#e06069;--color-red-500:#da444e;--color-red-600:#d63e47;--color-red-700:#d0353d;--color-red-800:#cb2d35;--color-red-900:#c21f25;--color-red-ultra-light:var(--color-red-100);--color-red-light:var(--color-red-300);--color-red:var(--color-red-500);--color-red-dark:var(--color-red-700);--color-red-ultra-dark:var(--color-red-900);--color-blue-25:#f3f8fd;--color-blue-50:#e5eff9;--color-blue-100:#bfd7f0;--color-blue-200:#94bde6;--color-blue-300:#69a2db;--color-blue-400:#488ed4;--color-blue-500:#287acc;--color-blue-600:#2472c7;--color-blue-700:#1e67c0;--color-blue-800:#185db9;--color-blue-900:#0f4aad;--color-blue-ultra-light:var(--color-blue-100);--color-blue-light:var(--color-blue-300);--color-blue:var(--color-blue-500);--color-blue-dark:var(--color-blue-700);--color-blue-ultra-dark:var(--color-blue-900);--color-green-25:#f6fbf6;--color-green-50:#ebf7ea;--color-green-100:#cceacb;--color-green-200:#aadca8;--color-green-300:#88ce85;--color-green-400:#6fc46a;--color-green-500:#55b950;--color-green-600:#4eb249;--color-green-700:#44aa40;--color-green-800:#3ba237;--color-green-900:#2a9327;--color-green-ultra-light:var(--color-green-100);--color-green-light:var(--color-green-300);--color-green:var(--color-green-500);--color-green-dark:var(--color-green-700);--color-green-ultra-dark:var(--color-green-900);--color-yellow-25:#fffdf2;--color-yellow-50:#fdf7e3;--color-yellow-100:#f9ecb8;--color-yellow-200:#f5e089;--color-yellow-300:#f1d35a;--color-yellow-400:#eec936;--color-yellow-500:#ebc013;--color-yellow-600:#e9ba11;--color-yellow-700:#e5b20e;--color-yellow-800:#e2aa0b;--color-yellow-900:#dd9c06;--color-yellow-light-background:var(--color-yellow-25);--color-yellow-ultra-light:var(--color-yellow-100);--color-yellow-light:var(--color-yellow-300);--color-yellow:var(--color-yellow-500);--color-yellow-ultra-dark:var(--color-yellow-700);--color-yellow-dark:var(--color-yellow-900);--color-dark:#111;--color-light:#fff;--color-branding-light:#2b76d4;--color-branding:#1a477f;--color-branding-dark:#09182a;--color-text-ultra-light:var(--color-gray-ultra-light);--color-text-light:var(--color-gray-light);--color-text:var(--color-gray);--color-text-dark:var(--color-gray-dark);--color-text-ultra-dark:var(--color-gray-ultra-dark);--color-heading:var(--color-gray-ultra-dark);--color-success-light:var(--color-green-light);--color-success:var(--color-green);--color-success-dark:var(--color-green-dark);--color-info-light:var(--color-blue-light);--color-info:var(--color-blue);--color-info-dark:var(--color-blue-dark);--color-warning-light:var(--color-yellow-light);--color-warning:var(--color-yellow);--color-warning-dark:var(--color-yellow-dark);--color-danger-light:var(--color-red-light);--color-danger:var(--color-red);--color-danger-dark:var(--color-red-dark);--color-primary-light:var(--color-blue-light);--color-primary:var(--color-blue);--color-primary-dark:var(--color-blue-dark);--color-secondary-light:var(--color-green-light);--color-secondary:var(--color-green);--color-secondary-dark:var(--color-green-dark);--color-background:#fff;--color-highlight:var(--color-gray-25);--color-highlight-primary:var(--color-blue-25);--color-highlight-secondary:var(--color-green-25);--color-highlight-success:var(--color-green-25);--color-highlight-info:var(--color-blue-25);--color-highlight-warning:var(--color-yellow-25);--color-highlight-danger:var(--color-red-25);--color-outline:var(--color-gray-50);--color-outline-dark:var(--color-gray-100);--color-outline-success:var(--color-green-100);--color-outline-info:var(--color-blue-100);--color-outline-warning:var(--color-yellow-200);--color-outline-danger:var(--color-red-100);--color-shadow:rgba(0,0,0,.2);--transition-duration-in:0.2s;--transition-duration-out:0.17s;--transition-in:all var(--transition-duration-in) ease-in;--transition-out:all var(--transition-duration-out) ease-out;--layer-xlow:1;--layer-low:10;--layer:100;--layer-high:1000;--layer-xhigh:10000;--layer-xxhigh:100000;--shadow-layer:0 0 var(--space-xxxsmall) var(--color-shadow);--shadow-layer-high:0 0 var(--space-xxsmall) var(--color-shadow);--radius-xsmall:3px;--radius-small:5px;--radius-medium:7px;--radius-large:9px;--outline-hover:0 0 0 var(--space-xxxsmall) var(--color-highlight);--max-width:88rem;--entry-info-width:64rem;--entry-info-top:var(--header-height)}*,:after,:before{box-sizing:border-box}blockquote,body,dd,dl,figure,h1,h2,h3,h4,p{margin:0}ol[role=list],ul[role=list]{list-style:none}html:focus-within{scroll-behavior:smooth}body{line-height:1.5;min-height:100vh;text-rendering:optimizeSpeed}a:not([class]){text-decoration-skip-ink:auto}img,picture{display:block;max-width:100%}button,input,select,textarea{font:inherit}@media (prefers-reduced-motion:reduce){html:focus-within{scroll-behavior:auto}*,:after,:before{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}button,ol,pre,ul{margin:0}html{font-family:var(--font-family);font-size:81.25%}body{background:var(--color-background);color:var(--color-text);line-height:var(--line-height)}h1,h2,h3,h4,h5,h6{color:var(--color-heading);font-weight:500;line-height:var(--line-height-heading)}h1{font-size:var(--size-xxxlarge)}h2{font-size:var(--size-xxlarge)}h3{font-size:var(--size-xlarge)}h4{font-size:var(--size-large)}h5{font-size:var(--size-medium)}h6{font-size:var(--size-small)}code{font-family:var(--font-family-fixed)}a{color:var(--color-primary)}a:active,a:focus,a:hover{color:var(--color-primary-dark);outline:none}.jFX2U{background:var(--color-background)}.x5Qne{border:1px solid var(--color-outline);border-radius:var(--radius-medium)}.x5Qne>:first-child{border-top-left-radius:var(--radius-medium);border-top-right-radius:var(--radius-medium)}.x5Qne>:last-child{border-bottom-left-radius:var(--radius-medium);border-bottom-right-radius:var(--radius-medium)}.bjS72{transition:var(--transition-out)}.bjS72:active,.bjS72:focus,.bjS72:hover{box-shadow:var(--outline-hover);transition:var(--transition-in)}.CRtiy{padding:var(--space-xxxsmall)}.V8D2V{padding:var(--space-xxsmall)}.lMRbm{padding:var(--space-xsmall)}.zjg3n{padding:var(--space-small)}.GcnI5{padding:var(--space-medium)}.tOvS2{padding:var(--space-large)}.NxVkB{padding:var(--space-xlarge)}.U_Mf5{padding:var(--space-xxlarge)}.DmgFn{padding:var(--space-xxxlarge)}.cONyd{padding-left:var(--space-xxxsmall);padding-right:var(--space-xxxsmall)}.xjUuY{padding-left:var(--space-xxsmall);padding-right:var(--space-xxsmall)}.cYz9P{padding-left:var(--space-xsmall);padding-right:var(--space-xsmall)}.D94M_{padding-left:var(--space-small);padding-right:var(--space-small)}._gcXv{padding-left:var(--space-medium);padding-right:var(--space-medium)}.sfSMH{padding-left:var(--space-large);padding-right:var(--space-large)}.hZSju{padding-left:var(--space-xlarge);padding-right:var(--space-xlarge)}.OwUsJ{padding-left:var(--space-xxlarge);padding-right:var(--space-xxlarge)}.YeVhJ{padding-left:var(--space-xxxlarge);padding-right:var(--space-xxxlarge)}.DN6QT{padding-bottom:var(--space-xxxsmall);padding-top:var(--space-xxxsmall)}.RV1CV{padding-bottom:var(--space-xxsmall);padding-top:var(--space-xxsmall)}.lmh6q{padding-bottom:var(--space-xsmall);padding-top:var(--space-xsmall)}.Lkz15{padding-bottom:var(--space-small);padding-top:var(--space-small)}.u2BRV{padding-bottom:var(--space-medium);padding-top:var(--space-medium)}.npjfL{padding-bottom:var(--space-large);padding-top:var(--space-large)}.Ugap2{padding-bottom:var(--space-xlarge);padding-top:var(--space-xlarge)}.keeo7{padding-bottom:var(--space-xxlarge);padding-top:var(--space-xxlarge)}.NEE_l{padding-bottom:var(--space-xxxlarge);padding-top:var(--space-xxxlarge)}.YuBej{border-color:var(--color-outline);color:var(--color-text)}.pLlfM{background:var(--color-highlight-success);border-color:var(--color-outline-success)}.GnHwy{background:var(--color-highlight-info);border-color:var(--color-outline-info)}.Tgwu0{background:var(--color-highlight-warning);border-color:var(--color-outline-warning)}.bKp1s{background:var(--color-highlight-danger);border-color:var(--color-outline-danger)}.rocGb{display:inline-block;vertical-align:middle}.GMh3K{display:block;height:100%;width:100%}.qNuBc{height:var(--space-xsmall);width:var(--space-xsmall)}.kbMQl{height:var(--space-small);width:var(--space-small)}.stObN{height:var(--space-medium);width:var(--space-medium)}.EFuml{--button-space:0px;--border-width:0px;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:var(--border-width) solid transparent;color:var(--color-text-ultra-light);display:inline-flex;font-family:var(--font-family);gap:calc(max(var(--button-space), var(--space-xxsmall))*.66);justify-content:center;padding:0;transition:var(--transition-out);white-space:nowrap}a.EFuml{text-decoration:none}.EFuml:active,.EFuml:focus,.EFuml:hover{color:var(--color-text-light);outline:none;transition:var(--transition-in)}.Nyvbd{flex:0 0 auto}.gWIKL{flex:1 1 auto;min-width:0}.W4XX3{color:var(--color-primary)}.W4XX3:active,.W4XX3:focus,.W4XX3:hover{color:var(--color-primary-dark)}.gGatE{color:var(--color-secondary)}.gGatE:active,.gGatE:focus,.gGatE:hover{color:var(--color-secondary-dark)}.Qjb2h{color:var(--color-danger)}.Qjb2h:active,.Qjb2h:focus,.Qjb2h:hover{color:var(--color-danger-dark)}.poKjD{color:var(--color-warning)}.poKjD:active,.poKjD:focus,.poKjD:hover{color:var(--color-warning-dark)}.MSqcm{color:var(--color-info)}.MSqcm:active,.MSqcm:focus,.MSqcm:hover{color:var(--color-info-dark)}._r0E8{color:var(--color-success)}._r0E8:active,._r0E8:focus,._r0E8:hover{color:var(--color-success-dark)}.eH5rY{background:var(--color-text-ultra-light);color:var(--color-background)}.eH5rY:active,.eH5rY:focus,.eH5rY:hover{background:var(--color-text-light);box-shadow:var(--outline-hover);color:var(--color-background)}.GOqz_{background:var(--color-primary)}.GOqz_:active,.GOqz_:focus,.GOqz_:hover{background:var(--color-primary-dark)}.MxkYI{background:var(--color-secondary)}.MxkYI:active,.MxkYI:focus,.MxkYI:hover{background:var(--color-secondary-dark)}.dWgaM{background:var(--color-danger)}.dWgaM:active,.dWgaM:focus,.dWgaM:hover{background:var(--color-danger-dark)}.dFoSg{background:var(--color-warning)}.dFoSg:active,.dFoSg:focus,.dFoSg:hover{background:var(--color-warning-dark)}.UXC0p{background:var(--color-info)}.UXC0p:active,.UXC0p:focus,.UXC0p:hover{background:var(--color-info-dark)}.g6Yqw{background:var(--color-success)}.g6Yqw:active,.g6Yqw:focus,.g6Yqw:hover{background:var(--color-success-dark)}.mX6mG{--button-space:var(--space-xxsmall);font-size:var(--size-small);line-height:var(--space-small)}.mX6mG .Nyvbd{height:var(--space-small);width:var(--space-small)}.yMswC{--button-space:var(--space-xsmall);font-size:var(--size-medium);line-height:calc(var(--space-small) + var(--space-xxxsmall))}.yMswC .Nyvbd{height:calc(var(--space-small) + var(--space-xxxsmall));width:calc(var(--space-small) + var(--space-xxxsmall))}.pFf_H{--button-space:var(--space-small);font-size:var(--size-large);line-height:var(--space-medium)}.pFf_H .Nyvbd{height:var(--space-medium);width:var(--space-medium)}.oBfzH{--border-width:1px;border-color:var(--color-outline)}.oBfzH:active,.oBfzH:focus,.oBfzH:hover{border-color:var(--color-outline-dark);box-shadow:var(--outline-hover)}.Soj_M{border-color:var(--color-outline-primary)}.Soj_M:active,.Soj_M:focus,.Soj_M:hover{border-color:var(--color-outline-primary-dark)}.I98KK{border-color:var(--color-outline-secondary)}.I98KK:active,.I98KK:focus,.I98KK:hover{border-color:var(--color-outline-secondary-dark)}.rDTX4{border-color:var(--color-outline-danger)}.rDTX4:active,.rDTX4:focus,.rDTX4:hover{border-color:var(--color-outline-danger-dark)}.cuFPt{border-color:var(--color-outline-warning)}.cuFPt:active,.cuFPt:focus,.cuFPt:hover{border-color:var(--color-outline-warning-dark)}.UX3hn{border-color:var(--color-outline-info)}.UX3hn:active,.UX3hn:focus,.UX3hn:hover{border-color:var(--color-outline-info-dark)}.p5QU7{border-color:var(--color-outline-success)}.p5QU7:active,.p5QU7:focus,.p5QU7:hover{border-color:var(--color-outline-success-dark)}.NOGdA{padding:calc(var(--button-space) - var(--border-width))}.tfXrI{border-radius:var(--radius-small)}.k7OaM{border-radius:var(--radius-medium)}.YPruu{border-radius:var(--radius-large)}.I0uC5{border-radius:50%}.rmwic{text-decoration:underline}.pqsjd{background:var(--color-highlight)}.QrdD_,.pqsjd{text-decoration:none}.QrdD_{background:var(--color-highlight-primary)}.jjPXS{background:var(--color-highlight-secondary)}.KSu4p,.jjPXS{text-decoration:none}.KSu4p{background:var(--color-highlight-info)}.Tj8ee{background:var(--color-highlight-success)}.Tj8ee,.UupXK{text-decoration:none}.UupXK{background:var(--color-highlight-warning)}.aK8wU{background:var(--color-highlight-danger);text-decoration:none}.EFuml[disabled]{filter:grayscale(1)}.PvGyj{margin:0 auto;max-width:var(--max-width);width:calc(100% - var(--space-small)*2)}.AEJd2{display:flex;gap:0;justify-content:flex-start}.h9gN4{gap:var(--space-xxxsmall)}.gBEci{gap:var(--space-xxsmall)}.vS3hA{gap:var(--space-xsmall)}.oKxD_{gap:var(--space-small)}.G2zRW{gap:var(--space-medium)}.UIjxW{gap:var(--space-large)}.MarJr{gap:var(--space-xlarge)}.QysNl{gap:var(--space-xxlarge)}.mc3LV{gap:var(--space-xxxlarge)}.AEJd2{align-items:stretch}.a_45D{align-items:flex-start}._Dx7c{align-items:flex-end}.GUAon{align-items:center}.SNkiI{align-items:baseline}.xiI0S{display:inline-flex}.m2y31>:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.m2y31>:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.m2y31>*{position:relative;z-index:0}.m2y31>:active,.m2y31>:focus,.m2y31>:hover{box-shadow:none;z-index:1}.ZSX6s{white-space:nowrap}.ZSX6s[disabled]{color:var(--color-text-ultra-light)}.jfvJI{background:var(--color-background);border-radius:var(--radius-medium);box-shadow:var(--shadow-layer-high);left:0;min-width:12em;padding:calc(var(--space-xxxsmall)/2);position:absolute;top:100%;z-index:var(--layer-high)}._JC5R,.jfvJI:focus{outline:none}._JC5R{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:var(--radius-small);color:var(--color-text-light);cursor:default;display:block;font-size:var(--size-small);line-height:inherit;padding:var(--space-xxxsmall) calc(var(--space-xxxsmall) + var(--space-xxxsmall)/2);text-align:left;text-decoration:none;width:100%}._JC5R:active,._JC5R:focus,._JC5R:hover,._JC5R[data-active-item]{background:var(--color-highlight);color:var(--color-text)}.Jaw0u{background:var(--color-highlight-info);color:var(--color-primary)}.Jaw0u:active,.Jaw0u:focus,.Jaw0u:hover{background:var(--color-highlight-info);color:var(--color-primary-dark)}.ScUMJ>.dMcgj{margin-top:0}.ScUMJ>.dMcgj,.ScUMJ>.dMcgj:last-child{margin-bottom:0}.jVPHf>.dMcgj{margin-bottom:var(--space-xxxsmall)}.mZt7V>.dMcgj{margin-bottom:var(--space-xxsmall)}.QiDWh>.dMcgj{margin-bottom:var(--space-xsmall)}.dAKU3>.dMcgj{margin-bottom:var(--space-small)}.MF3sp>.dMcgj{margin-bottom:var(--space-medium)}.dd5hq>.dMcgj{margin-bottom:var(--space-large)}.uMiL7>.dMcgj{margin-bottom:var(--space-xlarge)}.yeSk_>.dMcgj{margin-bottom:var(--space-xxlarge)}.FYCtQ>.dMcgj{margin-bottom:var(--space-xxxlarge)}.IQblr{color:var(--color-text-light)}.OnoY5{display:inline-block;overflow-wrap:break-word;word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;max-height:calc(2em*var(--line-height));overflow:hidden;white-space:normal;word-break:break-all;word-break:break-word}.Em6m6{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--color-outline);border-radius:var(--radius-small);color:var(--color-text-light);outline:none;transition:var(--transition-in);width:100%}.Em6m6::-webkit-input-placeholder{color:var(--color-text-light)}.Em6m6::-moz-placeholder{color:var(--color-text-light)}.Em6m6:-ms-input-placeholder{color:var(--color-text-light)}.Em6m6:-moz-placeholder{color:var(--color-text-light)}.Em6m6:focus{box-shadow:var(--outline-hover);color:inherit;transition:var(--transition-out)}.Em6m6{font-size:1rem;padding:var(--space-xsmall)}.Em6m6,.oMDYc{line-height:calc(var(--space-small) - 2px)}.oMDYc{font-size:var(--size-small);padding:var(--space-xxsmall)}.XkDYU{font-size:var(--size-large);line-height:calc(var(--space-large) - 2px);padding:var(--space-small)}.OmIx9{position:relative;width:100%;z-index:var(--layout-low)}.eWuzY{height:var(--space-large)}.k0DC4{background:radial-gradient(var(--color-background) 50%,transparent);padding:var(--space-xxxsmall);position:absolute;right:var(--space-xxxsmall);top:50%;transform:translateY(-50%)}.Jjk3c{border-bottom-right-radius:var(--radius-small)!important;border-top-right-radius:var(--radius-small)!important}.KenD5{color:var(--color-text);max-width:240px;position:relative;width:100%}.Gza4p{flex:0 0 auto;height:1em;margin:0}.BqueW{flex:1 1 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Gza4p[disabled]+.BqueW{color:var(--color-text-light)}.KenD5:hover{color:var(--color-dark)}.dpJTJ{border:1px solid var(--color-outline);border-radius:var(--radius-small);color:var(--color-text-ultra-light);font-size:var(--size-small);line-height:var(--space-small);padding:calc(var(--space-xxsmall) - 1px);transition:var(--transition-out)}.dpJTJ:active,.dpJTJ:focus,.dpJTJ:hover{border-color:var(--color-outline-dark);transition:var(--transition-in)}.JU_Tp{max-height:calc((var(--space-small) + 2*var(--space-xxxsmall))*10);overflow:auto}.jJITT{position:relative}.UoUtC{padding-right:24px}.eiMyW{display:none;font-size:var(--size-xsmall);line-height:1.1;padding:var(--space-xxxsmall);position:absolute;right:2px;top:50%;transform:translateY(-50%)}.eiMyW:before{background:linear-gradient(90deg,hsla(0,0%,100%,0),var(--color-highlight) 75%);bottom:0;content:" ";display:block;pointer-events:none;position:absolute;right:100%;top:0;width:var(--space-small)}.jJITT:hover .eiMyW{display:block}.oKvSG{color:var(--color-text);text-transform:lowercase}.dFw6E{border-bottom:1px solid var(--color-outline);margin-bottom:var(--space-xxxsmall);padding-bottom:var(--space-xxxsmall)}.l7IKd{color:var(--color-text-light);font-size:var(--size-small);padding:var(--space-xxsmall) 0;text-align:center}.dy5tU{border-top:1px solid var(--color-outline);margin-bottom:calc(0px - var(--space-xxxsmall));margin-top:var(--space-xxxsmall);padding-bottom:var(--space-xxxsmall);padding-top:var(--space-xxxsmall)}.Pw1gG,.THw4k{display:inline-block}.THw4k{color:inherit;text-decoration:none}.THw4k:hover{color:var(--color-primary)}.THw4k:focus{outline:0}._7sWJ_{background:var(--color-light);border-radius:var(--radius-medium);filter:drop-shadow(var(--shadow-layer-high));font-size:var(--size-small);max-width:340px;outline:none;padding:var(--space-xsmall) var(--space-small);width:calc(100vw - var(--space-small)*2);will-change:filter;z-index:var(--layer-xxhigh)}@keyframes LhYwL{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.BQbKn{color:var(--color-outline);display:inline-block;overflow:hidden;position:relative}.BQbKn:after,.BQbKn:before{border:var(--border-width) solid;border-radius:50%;box-sizing:border-box;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%}.BQbKn:before{opacity:.3}.BQbKn:after{animation:LhYwL .85s linear infinite;border:solid transparent;border-top:solid}.xat8j{--border-width:2px;height:var(--space-small);width:var(--space-small)}.evzGy{--border-width:3px;height:var(--space-medium);width:var(--space-medium)}.N74Cc{--border-width:4px;height:var(--space-large);width:var(--space-large)}.i7bfN{background:linear-gradient(transparent 10%,currentColor 10.1%,currentColor 89.9%,transparent 90%);border-radius:var(--radius-medium);min-width:6em;opacity:.05;pointer-events:none}.i7bfN:before{color:transparent;content:"\A0";display:inline-block}.fDOCe{background:currentColor}.qIkXx{background:var(--color-background);border-spacing:0;border-width:0;empty-cells:show;text-align:left;width:100%}.qIkXx td,.qIkXx th{border:solid var(--color-outline);border-width:1px 0 0;padding:var(--space-small)}.qIkXx thead th{background:var(--color-highlight);border-width:0 0 1px;text-transform:uppercase;vertical-align:top}.qIkXx thead th:empty{display:none}.qIkXx tbody th{font-weight:400}.qIkXx tbody tr:first-child td,.qIkXx tbody tr:first-child th{border-top:0}.qIkXx tbody td a{color:inherit;text-decoration:none}.qIkXx tbody td a:active,.qIkXx tbody td a:focus,.qIkXx tbody td a:hover{color:var(--color-primary);text-decoration:underline}.qIkXx tbody tr:hover td,.qIkXx tbody tr:hover th{background-color:var(--color-highlight-warning)}.P2js2{background:var(--color-background)!important;border-width:1px;border-bottom:1px solid var(--color-outline);border-left:0 solid var(--color-outline);border-right:0 solid var(--color-outline);border-top:1px solid var(--color-outline);padding:var(--space-xlarge) var(--space-medium);text-align:center}.HwHhN{--table-radius:var(--radius-medium);border:1px solid var(--color-outline);border-radius:var(--table-radius)}.HwHhN tbody:first-child tr:first-child td:first-child,.HwHhN thead:first-child tr:first-child th:first-child{border-top-left-radius:var(--table-radius)}.HwHhN tbody:first-child tr:first-child td:last-child,.HwHhN thead tr:first-child th:last-child{border-top-right-radius:var(--table-radius)}.HwHhN tbody:last-child tr:last-child td:first-child{border-bottom-left-radius:var(--table-radius)}.HwHhN tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:var(--table-radius)}.HwHhN.P2js2{border-width:1px}.qIkXx thead,.qIkXx thead tr:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.qIkXx thead tr:first-child th:first-child{border-top-left-radius:inherit}.qIkXx thead tr:first-child th:last-child{border-top-right-radius:inherit}.qIkXx tbody:last-child,.qIkXx tbody:last-child tr:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.qIkXx tbody:last-child tr:last-child td:first-child,.qIkXx tbody:last-child tr:last-child th:first-child{border-bottom-left-radius:inherit}.qIkXx tbody:last-child tr:last-child td:last-child{border-bottom-right-radius:inherit}.RPnzP td,.RPnzP th{padding-bottom:var(--space-xsmall);padding-top:var(--space-xsmall)}.gitdD{border-bottom:1px solid var(--color-outline)}.UeEq6,.gitdD{position:relative}.UeEq6{color:var(--color-text-ultra-light);display:inline-block;font-weight:700;padding:var(--space-xsmall) var(--space-small);text-decoration:none}.UeEq6:after{background:transparent;bottom:-1px;content:"";display:block;height:2px;left:0;position:absolute;right:0}.UeEq6:active,.UeEq6:focus,.UeEq6:hover{color:var(--color-primary-dark);outline:none}.UeEq6:active:after,.UeEq6:focus:after,.UeEq6:hover:after{background:currentColor}.LK4Pr{color:var(--color-primary)}.LK4Pr:after{background:currentColor}.UeEq6+.UeEq6{_margin-left:var(--space-medium)}.PtfQ3{background:var(--color-text-ultra-light);color:var(--color-light);display:inline-block;font-family:var(--font-family);font-weight:700;text-align:center;text-transform:uppercase}a.PtfQ3{text-decoration:none;transition:var(--transition-out)}a.PtfQ3:active,a.PtfQ3:focus,a.PtfQ3:hover{color:var(--color-light);opacity:.8;text-decoration:none;transition:var(--transition-in)}.ACX9j{background:var(--color-success)}.vKN4S{background:var(--color-info)}.CtrVB{background:var(--color-warning-dark)}.RiGuG{background:var(--color-danger)}.PtfQ3{border-radius:var(--radius-small);font-size:9px;height:var(--space-small);line-height:var(--space-xsmall);min-width:var(--space-small);padding:calc(var(--space-xxxsmall)/2) var(--space-xxxsmall)}.UN_m6{border-radius:var(--radius-xsmall);font-size:8px;height:var(--space-xsmall);line-height:1;min-width:var(--space-xsmall);padding:calc(var(--space-xxxsmall)/2)}.OB6Gi{border-radius:var(--radius-medium);font-size:12px;height:var(--space-medium);line-height:var(--space-small);min-width:var(--space-medium);padding:var(--space-xxxsmall) var(--space-xxsmall)}.TnyoH{color:inherit;line-height:inherit;position:relative}.TnyoH:active,.TnyoH:focus,.TnyoH:hover{outline:none}.FuQKs{background:var(--color-light);border-radius:var(--radius-small);color:var(--color-text);filter:drop-shadow(var(--shadow-layer));font-size:var(--size-xsmall);max-width:28em;padding:var(--space-xxxsmall) var(--space-xxsmall);text-align:center;will-change:filter;z-index:var(--layer-xxhigh)}.SysXY svg{display:block;fill:var(--color-light)}.vURAN{background:var(--color-text-dark);color:var(--color-light)}.vURAN .SysXY svg{fill:var(--color-text-dark)}.Foe8m{text-align:center}.KYXTp{border-top:1px solid var(--color-outline)}.hSnpD{display:inline-block;margin:0 var(--space-xxxsmall)}.hSnpD+.hSnpD:before{color:var(--color-text-ultra-light);content:"•";font-size:var(--size-large);margin-right:var(--space-xxsmall)}.HPvBP{background:var(--color-outline);height:1px;width:100%}.TsfHh{font-family:var(--font-family-fixed)}.fVClB,.qpgM_{font-size:var(--size-small)}.O4SrK .OumFQ,.O4SrK .fVClB{display:inline-block}.O4SrK .fVClB{margin:0 0 0 var(--space-xxxsmall)}.vXFHB{color:var(--color-gray-ultra-light);font-family:var(--font-family-fixed);white-space:nowrap}.msGud{color:var(--color-info)}.iDW3Y,.kZpfQ{color:var(--color-red-dark)}.Rtvza{color:var(--color-red-light)}.f0lhU{color:var(--color-green-light)}.MuRiX,._Hy7o{color:var(--color-green-dark)}.E9kgc{background-color:var(--color-gray-ultra-light);border-radius:var(--radius-xsmall);color:var(--color-light);padding:0 2px}.E9kgc.msGud{background:var(--color-info-light)}.E9kgc.iDW3Y,.E9kgc.kZpfQ{background:var(--color-red-dark)}.E9kgc.Rtvza{background:var(--color-red-light)}.E9kgc.f0lhU{background:var(--color-green-light)}.E9kgc.MuRiX,.E9kgc._Hy7o{background:var(--color-green-dark)}.Zo0gI{white-space:nowrap}.Xutcm{--icon-dimension:13px;border-radius:var(--radius-small);color:var(--color-text-ultra-light);display:inline-block;position:relative}.OBwTZ{padding:1px var(--space-xxxsmall);padding-right:calc(1px + var(--icon-dimension))}.KiaUQ{color:var(--color-text-ultra-light);display:block;overflow:hidden;padding:1px;position:absolute;right:-2px;transition:var(--transition-out)}.eBZo5{display:block;height:var(--icon-dimension);width:var(--icon-dimension)}.xC2vv{color:var(--color-text);transition:var(--transition-in)}.KiaUQ:active,.KiaUQ:focus,.KiaUQ:hover{color:var(--color-text-dark);transition:var(--transition-in)}.ZYsg6{bottom:50%;padding-bottom:0}.ZYsg6 .eBZo5{transform:translateY(3px)}.Lj6Aq{padding-top:0;top:50%}.Lj6Aq .eBZo5{transform:translateY(-5px)}.nvDbs{margin:calc(0px - var(--space-xxxsmall));margin-right:calc(-1px - var(--icon-dimension))}.nvDbs:active,.nvDbs:focus,.nvDbs:hover{background:var(--color-outline)}.KiaUQ{opacity:0;pointer-events:none}.Rm7R4 .KiaUQ,.nvDbs:hover .KiaUQ,.nvDbs:hover:active .KiaUQ,.nvDbs:hover:focus .KiaUQ{opacity:1;pointer-events:auto;transition:var(--transition-in)}.gGrWV .vG0XG{padding-bottom:var(--space-xxsmall);padding-top:var(--space-xxsmall)}.gGrWV .XZCNN{vertical-align:middle;width:55%}.gGrWV .S2ltF{padding-top:var(--space-xxsmall);text-align:right}.gGrWV .TtVyE{width:15%}.gGrWV .TtVyE,.gGrWV .XzAXP{text-align:right;vertical-align:baseline}.gGrWV .XzAXP{color:pink;font-size:var(--size-xsmall);width:10%}.gGrWV .HzXVt{width:5%}.VzpFZ{white-space:nowrap}.Wt1E0 .S2ltF{border-bottom:0;padding-bottom:0}.Wt1E0 .q5fmU{font-size:var(--size-small);padding-top:0;text-transform:none;vertical-align:middle}.H25xA a{color:inherit;text-decoration:none}.H25xA a:active,.H25xA a:focus,.H25xA a:hover{color:var(--color-primary);text-decoration:underline}.H25xA .ROSj6,.H25xA .nxJ3H{text-align:right}.T4PSM .vXCHn td,.T4PSM .vXCHn th{color:var(--color-text-light)}.H25xA .PGtnW{background:none!important;padding-bottom:calc(var(--space-xxxlarge)*2);padding-top:calc(var(--space-xxxlarge)*2);text-align:center}.YECEt{color:var(--color-outline-dark);height:var(--space-large);width:var(--space-large)}.H25xA .NOPc3{background:none!important;text-align:center}.H25xA tr{display:flex;flex-wrap:wrap}.H25xA tbody th{flex:1 1 auto;flex:1 1 100%}.H25xA tbody td{flex:1 1 auto}@media (min-width:600px){.H25xA tr{display:table-row}}.IMcef{align-items:center;display:flex;margin-top:var(--space-xsmall)}.tSprV{flex:0 0 auto}.tSprV+.tSprV{margin-left:var(--space-xsmall)}@media (min-width:768px){.EOTSL{display:flex;flex-wrap:no-wrap}.sv7vi{flex:1 1 auto}.IMcef{flex:0 0 auto;margin-left:var(--space-small);margin-top:0}}.ce2If{color:var(--color-text-ultra-light);font-size:var(--size-xsmall);font-weight:700;text-transform:uppercase}.gkAB0{flex:0 1 auto;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Hz3t6{flex:0 0 var(--space-small);margin-bottom:-3px!important;margin-top:-3px!important}.ce2If+.DgQqa{margin-top:var(--space-xxsmall)}.tFAJk{color:var(--color-heading);font-weight:700;line-height:var(--line-height-heading);white-space:nowrap}.TUPxv{font-weight:400}.Lefh0+.Lefh0:before{content:"/";margin-left:calc(var(--space-xxxsmall)/2);margin-right:calc(var(--space-xxxsmall)/2)}.Lefh0+.Lefh0:before,.VPbaS{color:var(--color-text-ultra-light)}.VPbaS{font-size:var(--size-small);line-height:var(--line-height-heading)}.kZGTY.VPbaS,.kZGTY.tFAJk{max-width:8em;min-width:0}.NUG4I span[aria-controls=""],.ZhmCs[aria-controls=""]{opacity:0;transition:opacity var(--transition-duration-out) ease-out,color var(--transition-duration-out) ease-out,visibility 0s;visibility:hidden}.hihZa:hover .NUG4I span,.hihZa:hover .ZhmCs{opacity:1;transition:opacity var(--transition-duration-in) ease-in,color var(--transition-duration-in) ease-in,visibility 0s;visibility:visible}.tFAJk{font-size:var(--size-xxlarge)}.CjOEt .tFAJk{font-size:var(--size-medium)}.st_U8 .tFAJk{font-size:var(--size-xxxlarge)}.st_U8 .VPbaS{font-size:var(--size-small)}.t5pmh .tFAJk{font-size:var(--size-xxxxlarge)}.MI8bB{background:#fff;bottom:0;box-shadow:var(--shadow-layer-high);display:flex;flex-flow:column;max-width:var(--entry-info-width);position:fixed;right:0;top:var(--entry-info-top);width:100vw;z-index:calc(var(--layer-high) - 1)}.DM1Gk{flex:0 0 auto}.fi4Ku{flex:1 1 auto;overflow:auto}.DM1Gk{border-bottom:1px solid var(--color-outline);padding-right:calc(var(--space-medium) + var(--space-xxxsmall) + var(--space-xsmall))}.ROBOx{color:var(--color-text-ultra-light);position:absolute;right:calc(var(--space-small) - var(--space-xxxsmall));top:calc(var(--space-small) - var(--space-xxxsmall))}.ROBOx:active,.ROBOx:focus,.ROBOx:hover{color:var(--color-text-light)}.LRF6d{background:var(--color-highlight-warning);line-height:var(--line-height);max-width:100%;padding:0 2px}.lGs6W{font-size:var(--size-medium)}.VY4pF{font-size:var(--size-small)}.VY4pF .jqar0{white-space:nowrap}.VY4pF .bYwGF{width:100%}.VY4pF .BmSfK{text-align:right;white-space:nowrap}.YLM7V{font-family:var(--font-family-fixed)}.DTVwf{color:var(--color-text-light);flex:0 1 6em;margin-right:var(--space-xxxsmall);min-width:8em}.NhpyE{color:var(--color-text-ultra-light);margin-left:var(--space-xxxsmall)}.oq5Vv{flex:0 1 auto;padding:1px 0}.BxWE1{background:var(--color-highlight);border-radius:var(--radius-small);display:inline-block;font-weight:400;line-height:var(--line-height-heading);margin-right:var(--space-xxxsmall);max-width:16em;overflow:hidden;padding:1px var(--space-xxxsmall);text-decoration:none;text-overflow:ellipsis;text-transform:none;transition:var(--transition-out);white-space:nowrap}.BxWE1:active,.BxWE1:focus,.BxWE1:hover{background:var(--color-outline);color:var(--color-primary-dark)}@media (min-width:640px){.eAjXj{align-items:flex-start;display:flex}}.UM4t1,.UM4t1:active,.UM4t1:focus,.UM4t1:hover{color:var(--color-background)}.smb7E{background:var(--color-info-dark)}.BwMme{background:var(--color-info)}.op34U{background:var(--color-info-light)}.Vil3F{display:inline-block;min-width:6em}.Vil3F:after{content:" "}.QcSBg{text-align:right}.tr3O1{color:var(--color-text-ultra-light)}.TP_2e{color:inherit;font-size:1em;font-weight:700;text-transform:uppercase}.Rc2zX,.tc9Qs{display:block}.Rc2zX{margin:-2px 0}.J7JMj{font-family:var(--font-family-fixed);font-size:var(--size-small);font-weight:400}.lQKLJ{background:var(--color-highlight)}.l5mzw{border-bottom-right-radius:var(--radius-small)!important;border-top-right-radius:var(--radius-small)!important}.FW2PY{opacity:0;transition:var(--transition-out)}.no2lh .FW2PY{opacity:1}.aZ2Wr{aspect-ratio:16/9;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;overflow:hidden;position:relative}.aZ2Wr,.hZc3J{background:var(--color-background)}.hZc3J{height:100%;left:0;top:0;width:100%}.LPLNJ,.hZc3J{position:absolute}.hI1Sz{cursor:default;width:100%}.tCvOp{align-items:center;color:var(--color-text);display:flex;font-family:var(--font-family-fixed);font-size:10px;line-height:var(--space-small);overflow:hidden;padding:var(--space-xxxsmall) 2px var(--space-xxxsmall) var(--space-xxsmall);text-overflow:ellipsis;white-space:nowrap;width:100%}.Dpb6B,.avLQl{flex:0 0 auto;min-width:0}.Dpb6B{color:var(--color-text-light);margin-left:var(--space-xxsmall)}.hI1Sz{transition:var(--transition-out)}.hI1Sz:hover .avLQl{text-decoration:underline;transition:var(--transition-in)}.LPLNJ{transition:var(--transition-out);transition-property:background-color,outline}.Hh8Zo .hI1Sz,.nuUU6 .hI1Sz{height:100%}.Hh8Zo .tCvOp,.nuUU6 .tCvOp{min-height:100%}.ExSrn .LPLNJ{background-color:rgba(27,26,33,.03);outline:1px solid hsla(0,0%,100%,.8)}.ExSrn .LPLNJ:has(>.fW7W4:hover),.ExSrn .LPLNJ:has(>.hI1Sz:hover){background-color:rgba(27,26,33,.06);outline:1px solid #fff;transition:var(--transition-in);transition-property:background-color,outline}.ExSrn .Q4lDk{background-color:rgba(194,31,37,.04)}.ExSrn .Q4lDk:has(>.fW7W4:hover),.ExSrn .Q4lDk:has(>.hI1Sz:hover){background-color:rgba(194,31,37,.1)}.ExSrn .MqCwi{background-color:rgba(42,147,39,.04)}.ExSrn .MqCwi:has(>.fW7W4:hover),.ExSrn .MqCwi:has(>.hI1Sz:hover){background-color:rgba(42,147,39,.1)}.ExSrn .MqCwi>.QHgms,.ExSrn .Q4lDk>.QHgms{background-color:var(--color-background);background-image:linear-gradient(rgba(27,26,33,.1),rgba(27,26,33,.1))}.ExSrn .MqCwi>.QHgms:has(>.fW7W4:hover),.ExSrn .MqCwi>.QHgms:has(>.hI1Sz:hover),.ExSrn .Q4lDk>.Q4lDk>.QHgms:has(>.fW7W4:hover),.ExSrn .Q4lDk>.QHgms:has(>.hI1Sz:hover){background-color:var(--color-background);background-image:linear-gradient(rgba(27,26,33,.1),rgba(27,26,33,.1))}.fW7W4{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--color-background);border:0;border-radius:0;display:flex;font-family:var(--font-family-fixed);font-size:var(--size-small);line-height:var(--line-height-heading);padding:0;position:absolute;text-align:left;transition:var(--transition-out);transition-property:opacity,background-color}.fW7W4:before{background-color:currentColor;content:"";display:block;left:0;position:absolute;top:0}.fW7W4:before,.pHtXw{height:100%;width:100%;z-index:1}.pHtXw{display:flex;flex-flow:column;gap:var(--space-xxxsmall);justify-content:center;line-height:var(--line-height-heading);padding:var(--space-xxsmall) var(--space-xxsmall);position:relative}.PiU2I .pHtXw{padding-left:var(--space-small)}.lO5rr{flex:0 1 auto;max-height:calc(2em*var(--line-height-heading));min-width:0;overflow-wrap:break-word;width:100%;word-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;white-space:normal;word-break:break-all;word-break:break-word}.lO5rr,.xQWef{overflow:hidden}.xQWef{flex:0 0 auto;max-width:calc(100% + var(--space-xxsmall));white-space:nowrap}.hWi3n{font-weight:700}.YriaX{margin-left:var(--space-xxxsmall)}.hZ5Xm .pHtXw{font-size:10px;padding:var(--space-xxxsmall)}.hZ5Xm .lO5rr{margin-top:0}.fW7W4{color:var(--color-text);outline:1px solid #fff}.fW7W4:before{color:var(--color-highlight);opacity:.6;transition:var(--transition-out);transition-property:opacity}.fW7W4:hover:before{opacity:.4;transition:var(--transition-in);transition-property:opacity}.fW7W4:hover .lO5rr{text-decoration:underline}._NeHR{color:var(--color-text-light)}._NeHR:before{color:var(--color-gray-50);opacity:.4}._NeHR:hover:before{opacity:.2}.nyFwl:before{color:var(--color-red-100)}.iHHzd:before,.p3LvF:before{color:var(--color-red-50)}.AfZr4:before,._p8zw:before{color:var(--color-green-50)}.JkiEo:before{color:var(--color-green-100)}.yBK3e{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.VANWr{max-width:100%;text-align:center}.WnzKp{height:100%;width:100%}.k3N9U{background:var(--color-light);border-radius:var(--radius-medium);filter:drop-shadow(var(--shadow-layer-high));font-size:var(--size-small);max-width:340px;outline:none;padding:var(--space-xsmall) var(--space-small);pointer-events:none;width:calc(100vw - var(--space-small)*2);will-change:filter;z-index:var(--layer-xxhigh)}.XxMyJ svg{display:block;fill:var(--color-background)!important}.eAsWm{font-size:var(--size-small)}div[role=presentation]:has(.k3N9U){pointer-events:none}.IxWWs{max-width:240px;width:100%}.UosND{display:inline-block;height:var(--space-small);margin-right:var(--space-xxsmall);width:var(--space-small)}.OTNQN{color:var(--color-warning-dark)}.aZY1a{display:inline;margin-right:var(--space-xxxsmall)}.aZY1a:empty{display:none}.ph4Mk{vertical-align:middle}.ph4Mk+.ph4Mk{margin-left:2px}.gVK69{background:var(--color-info-dark)}.gVK69:before{content:"e"}.fBp9Z{background:var(--color-info)}.fBp9Z:before{content:"i"}.sGe9q{background:var(--color-info-light)}.sGe9q:before{content:"c"}.dp2sk{display:inline-block;vertical-align:middle}.Ip0DU .QF9ol:active,.Ip0DU .QF9ol:focus,.Ip0DU .QF9ol:hover{text-decoration:none}.Ip0DU .QF9ol:active .dp2sk,.Ip0DU .QF9ol:focus .dp2sk,.Ip0DU .QF9ol:hover .dp2sk{text-decoration:underline}.hd2jn{margin:0;width:100%}.YOh2v{background:var(--color-highlight-warning);padding:0 2px}.fYEOi{list-style:disc inside;padding:0}.wGpSJ{color:var(--color-text-ultra-light)}.ZTf4u{color:var(--color-text-light)}.Xhog7{max-width:240px;width:100%}.v5smK{max-width:var(--entry-info-hovercard-width)}.jZSdy{color:var(--color-text-light);display:inline-block}.jZSdy:last-child{color:inherit}.jZSdy+.jZSdy:before{color:var(--color-text-ultra-light);content:"/";display:inline-block;margin:0 var(--space-xxxsmall)}.JtICE{margin-right:var(--space-xxxsmall)}.JtICE,.OwlsH{vertical-align:middle}.JtICE:before{content:"d"}.DOU0J .jZSdy:active,.DOU0J .jZSdy:focus,.DOU0J .jZSdy:hover{text-decoration:none}.DOU0J .jZSdy:active .OwlsH,.DOU0J .jZSdy:focus .OwlsH,.DOU0J .jZSdy:hover .OwlsH{text-decoration:underline}.d_H_d{flex-wrap:wrap}.lhWqt{display:inline}.QzZNJ{color:var(--color-info)}.QzZNJ:active,.QzZNJ:focus,.QzZNJ:hover{color:var(--color-info-dark)}.y_Ngv{color:var(--color-danger)}.y_Ngv:active,.y_Ngv:focus,.y_Ngv:hover{color:var(--color-danger-dark)}.q0Psp{color:var(--color-text-light)}.q0Psp:active,.q0Psp:focus,.q0Psp:hover{color:var(--color-text)}.danP5{padding:2px 0}.GzUGy{color:var(--color-text-light)}.pm294{max-width:240px;width:100%}.PnmcQ{border-bottom:1px solid var(--color-outline)}.zBBS5{margin-right:var(--space-xxxsmall);vertical-align:baseline}.zBBS5:before{content:"D"}.nXCaM{display:inline-block;vertical-align:middle}.jpdPe .k7tnL:active,.jpdPe .k7tnL:focus,.jpdPe .k7tnL:hover{text-decoration:none}.jpdPe .k7tnL:active .nXCaM,.jpdPe .k7tnL:focus .nXCaM,.jpdPe .k7tnL:hover .nXCaM{text-decoration:underline}.kkWBR{background:var(--color-highlight);border-radius:50%;height:calc(var(--space-small) + 6px);padding:3px;width:calc(var(--space-small) + 6px)}.luwLw{background:var(--color-red-50);color:var(--color-danger)}.CbcQM{background:var(--color-yellow-100);color:var(--color-yellow-900);padding-top:1px}.SoK4z{background:var(--color-highlight-info);color:var(--color-info)}.CLiFb{flex:0 0 auto}.qx2FT{color:inherit;text-decoration:none}.qx2FT:active,.qx2FT:focus,.qx2FT:hover{text-decoration:underline}.HXH8K{display:flex;padding:var(--space-small) 0;width:100%}.sSdhN{border-left:1px solid var(--color-outline);flex:1 0 10%;max-width:50%;overflow:hidden;padding:0 var(--space-small);position:relative}.sSdhN:after{background:linear-gradient(90deg,transparent,var(--color-background));bottom:0;content:"";display:block;position:absolute;right:0;top:0;width:var(--space-xxsmall)}.sSdhN:first-child{border-left:0;padding-left:0}.paNIN{font-size:var(--size-xlarge);font-weight:700;line-height:1}.RpnzT,.paNIN{vertical-align:top}.RpnzT{background:var(--color-highlight);margin-left:var(--space-xxsmall);outline:1px solid var(--color-outline)}.MvkHJ,.RpnzT{color:var(--color-text-light)}.MvkHJ{font-size:var(--size-small)}.M8O97{color:var(--color-text-ultra-light);flex:0 0 auto}.wdBx9{flex:0 0 auto;white-space:nowrap}.KH30f{font-size:1em;font-weight:700}.n89Uh{color:var(--color-primary);cursor:pointer;text-decoration:underline}.n89Uh:active,.n89Uh:focus,.n89Uh:hover{color:var(--color-primary-dark);text-decoration:none}.zR4Dt{--summary-gap:var(--space-small)}.wwDgv,.zR4Dt{width:100%}.wwDgv+.wwDgv{margin-top:var(--summary-gap)}.masfV{display:flex;flex-wrap:wrap;margin-left:calc(0px - var(--summary-gap));margin-top:calc(0px - var(--summary-gap));width:calc(100% + var(--summary-gap))}.IvCug{flex:1 0 10%;margin:var(--summary-gap) 0 0 var(--summary-gap);min-width:12em;text-decoration:none}.oGMN_{min-width:8em}.q2MgP{flex:1 1 auto}.RoAqv{flex:0 0 auto}.ww1rs{border-radius:50%;color:var(--color-text-ultra-dark);display:block;opacity:.8;transition:var(--transition-out)}.ww1rs:active,.ww1rs:focus,.ww1rs:hover{opacity:1;transition:var(--transition-in)}.WVS7W{display:block}@media (min-width:1140px){.RoAqv{align-items:center;display:flex;height:var(--header-height);padding:0 var(--space-small);position:absolute;right:0;top:0}}:root{--header-height:0px}.r_evb{padding-top:var(--header-height)}.SjuJA{min-height:80vh;padding-top:var(--space-large);text-align:center}.SZdPe{background-color:var(--color-background);border-bottom:1px solid var(--color-outline)}.wfDt_{padding-bottom:var(--space-xxsmall);padding-top:var(--space-small)}.mKDtx{background:var(--color-light);border-bottom:1px solid var(--color-outline)}.Lg28G{border-bottom:0}.XkP77{color:var(--color-primary)}.XkP77:after{background:currentColor}.CGK7_{min-height:480px;padding-bottom:var(--space-medium);padding-top:var(--space-medium)}@media (min-width:600px){:root{--header-height:52px}.SZdPe{height:var(--header-height);left:0;position:fixed;right:0;top:0;z-index:var(--layer-high)}.mKDtx{position:sticky;top:var(--header-height);z-index:calc(var(--layer-high) - 1)}}</style></head><body><script>window.__INITIAL_DATA__ = [{"meta":{"webpack":{"chunks":[{"id":"e692ce7","name":"dumbymap"}],"builtAt":"2024-10-10T05:22:39.018Z","hash":""}},"insights":{"webpack":{"assetsSizeTotal":{"type":"info","data":{"text":"Bundle Size — 347.49KiB (+100%).","md":"*Bundle Size* — *347.49KiB* (*+100%*).","info":{"value":355828,"displayValue":"347.49KiB","delta":355828,"deltaPercentage":100,"displayDelta":"+347.49KiB","displayDeltaPercentage":"+100%","deltaType":"HIGH_NEGATIVE","regression":true}}},"duplicatePackages":{"type":"warning","data":{"plain-draggable":["plain-draggable","plain-modal:plain-draggable"],"pointer-event":["plain-draggable:pointer-event","plain-modal:pointer-event"],"cssprefix":["plain-draggable:cssprefix","plain-modal:cssprefix"],"m-class-list":["plain-draggable:m-class-list","plain-modal:m-class-list"],"anim-event":["plain-draggable:anim-event","plain-modal:anim-event"]}},"duplicatePackagesV3":{"type":"warning","data":{"text":"Bundle contains 9 duplicate packages","packages":{"plain-draggable":["plain-draggable","plain-modal:plain-draggable"],"pointer-event":["plain-draggable:pointer-event","plain-modal:pointer-event"],"cssprefix":["plain-draggable:cssprefix","plain-modal:cssprefix"],"m-class-list":["plain-draggable:m-class-list","plain-modal:m-class-list"],"anim-event":["plain-draggable:anim-event","plain-modal:anim-event"]}}}}},"summary":{"webpack":{"totalSizeByTypeALL":{"baseline":0,"current":355828},"totalInitialSizeJS":{"baseline":0,"current":355828},"totalInitialSizeCSS":{"baseline":0,"current":0},"cacheInvalidation":{"baseline":0,"current":0},"moduleCount":{"baseline":0,"current":95},"duplicateModulesCount":{"baseline":0,"current":0},"duplicateCode":{"baseline":0,"current":0},"chunkCount":{"baseline":0,"current":1},"assetCount":{"baseline":0,"current":1},"packageCount":{"baseline":0,"current":24},"duplicatePackagesCount":{"baseline":0,"current":5}}},"metrics":{"webpack":{"assets":{"dumbymap.mjs":{"name":"dumbymap.mjs","value":355828,"isEntry":true,"isInitial":true,"isChunk":true,"chunkId":"e692ce7"}},"cacheInvalidation":{"value":0},"chunkCount":{"value":1},"assetCount":{"value":1},"totalSizeByTypeALL":{"value":355828},"totalInitialSizeCSS":{"value":0},"totalInitialSizeJS":{"value":355828},"sizes":{"totalSizeByTypeCSS":{"value":0},"totalSizeByTypeJS":{"value":355828},"totalSizeByTypeIMG":{"value":0},"totalSizeByTypeMEDIA":{"value":0},"totalSizeByTypeFONT":{"value":0},"totalSizeByTypeHTML":{"value":0},"totalSizeByTypeOTHER":{"value":0}},"modules":{"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs":{"name":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs","value":2861,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs":{"name":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs","value":2218,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs":{"name":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs","value":478,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs":{"name":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs","value":9792,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs":{"name":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/index.mjs","value":0,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs","value":141,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs","value":30,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs","value":264,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs","value":2036,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs","value":2549,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs","value":67,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs":{"name":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/index.mjs","value":0,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js":{"name":"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js","value":47685,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js":{"name":"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js","value":240,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js":{"name":"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js","value":1711,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js":{"name":"./node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js","value":18619,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs","value":7543,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.mjs","value":984,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs","value":1496,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs","value":1803,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/index.mjs","value":34,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs","value":8888,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.mjs","value":8512,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs","value":3807,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.mjs","value":271,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.mjs","value":343,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.mjs","value":324,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.mjs","value":276,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs","value":4235,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.mjs","value":2588,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.mjs","value":5679,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs","value":1141,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs","value":1039,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.mjs","value":5857,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs","value":7106,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.mjs","value":679,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.mjs","value":2419,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.mjs","value":6066,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs","value":1018,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.mjs","value":9132,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs","value":5743,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.mjs","value":802,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs","value":957,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs","value":2083,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs","value":1455,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.mjs","value":2497,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs","value":1458,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs","value":3339,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.mjs","value":3404,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs","value":2089,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs","value":1678,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.mjs","value":1150,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs","value":1381,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.mjs","value":1681,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs","value":2990,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.mjs","value":3553,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.mjs","value":3690,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.mjs","value":3600,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs","value":2025,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs","value":1105,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs","value":1382,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs","value":4098,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs","value":1262,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs","value":4573,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs":{"name":"./node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs","value":5539,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs":{"name":"./node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs","value":17669,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js":{"name":"./node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js","value":12667,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.mjs","value":1256,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.mjs","value":1624,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.mjs","value":1887,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.mjs":{"name":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.mjs","value":17345,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0/node_modules/markdown-it-anchor/dist/markdownItAnchor.mjs":{"name":"./node_modules/.pnpm/markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0/node_modules/markdown-it-anchor/dist/markdownItAnchor.mjs","value":6458,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs":{"name":"./node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs","value":11170,"chunkIds":["e692ce7"]},"./commonjsHelpers.js":{"name":"./commonjsHelpers.js","value":140,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it-front-matter@0.2.4/node_modules/markdown-it-front-matter/index.js":{"name":"./node_modules/.pnpm/markdown-it-front-matter@0.2.4/node_modules/markdown-it-front-matter/index.js","value":3668,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/markdown-it-inject-linenumbers@0.3.0/node_modules/markdown-it-inject-linenumbers/index.js":{"name":"./node_modules/.pnpm/markdown-it-inject-linenumbers@0.3.0/node_modules/markdown-it-inject-linenumbers/index.js","value":982,"chunkIds":["e692ce7"]},"./src/utils.mjs":{"name":"./src/utils.mjs","value":3888,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js":{"name":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","value":2544,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js":{"name":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","value":17375,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js":{"name":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","value":5044,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js":{"name":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","value":2833,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/plain-draggable.esm.js":{"name":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/plain-draggable.esm.js","value":79071,"chunkIds":["e692ce7"]},"./src/Layout.mjs":{"name":"./src/Layout.mjs","value":7918,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/leader-line@1.0.7/node_modules/leader-line/leader-line.min.js":{"name":"./node_modules/.pnpm/leader-line@1.0.7/node_modules/leader-line/leader-line.min.js","value":100439,"chunkIds":["e692ce7"]},"./src/dumbyUtils.mjs":{"name":"./src/dumbyUtils.mjs","value":7539,"chunkIds":["e692ce7"]},"./src/MenuItem.mjs":{"name":"./src/MenuItem.mjs","value":11116,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","value":4958,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","value":2779,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","value":2508,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/timed-transition@1.5.4/node_modules/timed-transition/timed-transition.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/timed-transition@1.5.4/node_modules/timed-transition/timed-transition.esm.js","value":14917,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-overlay@1.4.17/node_modules/plain-overlay/plain-overlay.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-overlay@1.4.17/node_modules/plain-overlay/plain-overlay.esm.js","value":47150,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","value":17285,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-draggable@2.5.14/node_modules/plain-draggable/plain-draggable.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-draggable@2.5.14/node_modules/plain-draggable/plain-draggable.esm.js","value":78224,"chunkIds":["e692ce7"]},"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/plain-modal.esm.js":{"name":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/plain-modal.esm.js","value":22564,"chunkIds":["e692ce7"]},"./src/dumbymap.mjs":{"name":"./src/dumbymap.mjs","value":16061,"chunkIds":["e692ce7"]}},"duplicateCode":{"value":0},"duplicateModulesCount":{"value":0},"moduleCount":{"value":95},"packages":{"mdurl":{"name":"mdurl","path":"./node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl","value":15349},"uc.micro":{"name":"uc.micro","path":"./node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro","value":5087},"entities":{"name":"entities","path":"./node_modules/.pnpm/entities@4.5.0/node_modules/entities","value":68255},"markdown-it":{"name":"markdown-it","path":"./node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it","value":161347},"linkify-it":{"name":"linkify-it","path":"./node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it","value":23208},"punycode.js":{"name":"punycode.js","path":"./node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js","value":12667},"markdown-it:markdown-it-anchor":{"name":"markdown-it-anchor","path":"./node_modules/.pnpm/markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0/node_modules/markdown-it-anchor","value":6458},"markdown-it-footnote":{"name":"markdown-it-footnote","path":"./node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote","value":11170},"markdown-it-front-matter":{"name":"markdown-it-front-matter","path":"./node_modules/.pnpm/markdown-it-front-matter@0.2.4/node_modules/markdown-it-front-matter","value":3668},"markdown-it-inject-linenumbers":{"name":"markdown-it-inject-linenumbers","path":"./node_modules/.pnpm/markdown-it-inject-linenumbers@0.3.0/node_modules/markdown-it-inject-linenumbers","value":982},"plain-draggable:anim-event":{"name":"anim-event","path":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event","value":2544},"plain-draggable:pointer-event":{"name":"pointer-event","path":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event","value":17375},"plain-draggable:cssprefix":{"name":"cssprefix","path":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix","value":5044},"plain-draggable:m-class-list":{"name":"m-class-list","path":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list","value":2833},"plain-draggable":{"name":"plain-draggable","path":"./node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable","value":79071},"leader-line":{"name":"leader-line","path":"./node_modules/.pnpm/leader-line@1.0.7/node_modules/leader-line","value":100439},"plain-modal:cssprefix":{"name":"cssprefix","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix","value":4958},"plain-modal:m-class-list":{"name":"m-class-list","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list","value":2779},"plain-modal:anim-event":{"name":"anim-event","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event","value":2508},"plain-modal:timed-transition":{"name":"timed-transition","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/timed-transition@1.5.4/node_modules/timed-transition","value":14917},"plain-modal:plain-overlay":{"name":"plain-overlay","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-overlay@1.4.17/node_modules/plain-overlay","value":47150},"plain-modal:pointer-event":{"name":"pointer-event","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event","value":17285},"plain-modal:plain-draggable":{"name":"plain-draggable","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-draggable@2.5.14/node_modules/plain-draggable","value":78224},"plain-modal":{"name":"plain-modal","path":"./node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal","value":22564}},"packageCount":{"value":24},"duplicatePackagesCount":{"value":5}}},"internalBuildNumber":1,"label":"Job #1"}];</script><div id="root"></div><script>/*! For license information please see vendors.ee535c34.js.LICENSE.txt */
+(self.webpackChunk=self.webpackChunk||[]).push([[96],{1880:(t,e,n)=>{"use strict";n.d(e,{Bi:()=>_,CH:()=>E,NO:()=>m,O4:()=>O,P$:()=>k,PW:()=>b,Sz:()=>h,TE:()=>S,UQ:()=>l,_q:()=>v,hX:()=>d,jw:()=>p,nf:()=>f,vO:()=>y,w7:()=>A});var r=n(2585),o=n(8798),i=n(5133),u=n(848),a=n(7754);const c=r.useId,s=(r.useDeferredValue,r.useInsertionEffect),l=o.Sw?r.useLayoutEffect:r.useEffect;function f(t){const[e]=(0,r.useState)(t);return e}function p(t){const e=(0,r.useRef)();return void 0===e.current&&(e.current=t()),e.current}function d(t){const e=(0,r.useRef)(t);return l((()=>{e.current=t})),e}function h(t){const[e,n]=(0,r.useState)(t);return t!==e&&n(t),e}function v(t){const e=(0,r.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return s?s((()=>{e.current=t})):e.current=t,(0,r.useCallback)((function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.current?.(...n)}),[])}function m(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,r.useMemo)((()=>{if(e.some(Boolean))return t=>{e.forEach((e=>{(0,a.c)(e,t)}))}}),e)}function _(t){if(c){const e=c();return t||e}const[e,n]=(0,r.useState)(t);return l((()=>{if(t||e)return;const r=Math.random().toString(36).substr(2,6);n(`id-${r}`)}),[t,e]),t||e}function y(t,e){const[n,o]=(0,r.useState)((()=>g(e)));return l((()=>{o(t?.current?.tagName.toLowerCase()||g(e))}),[t,e]),n}function g(t){if("string"==typeof t)return t}function b(t,e,n){const[o,i]=(0,r.useState)(t),a=void 0!==e?e:o,c=d(e),s=d(n),l=d(a),f=(0,r.useCallback)((t=>{const e=s.current;if(e)if(x(e))e(t);else{const n=(0,u.Qh)(t,l.current);l.current=n,e(n)}void 0===c.current&&i(t)}),[]);var p;return x(p=f)||Object.defineProperty(p,w,{value:!0}),[a,f]}const w=Symbol("setNextState");function x(t){return!0===t[w]}function E(){return(0,r.useReducer)((()=>[]),[])}function O(t){return v("function"==typeof t?t:()=>t)}function A(t,e,n){void 0===n&&(n=[]);const o=(0,r.useCallback)((n=>(t.wrapElement&&(n=t.wrapElement(n)),e(n))),[...n,t.wrapElement]);return{...t,wrapElement:o}}function S(t,e){void 0===t&&(t=!1);const[n,o]=(0,r.useState)(null);return{portalRef:m(o,e),portalNode:n,domReady:!t||n}}function k(){return(0,r.useEffect)((()=>{(0,i.dg)("mousemove",T,!0),(0,i.dg)("mousedown",M,!0),(0,i.dg)("mouseup",M,!0),(0,i.dg)("keydown",M,!0),(0,i.dg)("scroll",M,!0)}),[]),v((()=>C))}let C=!1,P=0,R=0;function T(t){(function(t){const e=t.movementX||t.screenX-P,n=t.movementY||t.screenY-R;return P=t.screenX,R=t.screenY,e||n||!1})(t)&&(C=!0)}function M(){C=!1}},7754:(t,e,n)=>{"use strict";function r(t,e){"function"==typeof t?t(e):t&&(t.current=e)}n.d(e,{c:()=>r})},5353:(t,e,n)=>{"use strict";n.d(e,{B0:()=>_,E5:()=>g,MA:()=>y,Pj:()=>w,rY:()=>b});var r=n(2585),o=n(1539),i=n(848),u=n(1880),a=n(9787),c=n(6260);const s=Symbol("getState"),l=Symbol("subscribe"),f=Symbol("timestamp"),p=Symbol("initialContext");function d(t){return!!t&&!!t[l]}function h(t,e){void 0===e&&(e=t),Object.defineProperty(t,s,{value:()=>e,writable:!0})}function v(t){return t&&p in t}function m(t){if(v(t))return t[p]}function _(){const t=(0,r.createContext)(void 0);return function(t){const e=(0,r.createContext)(void 0);Object.defineProperty(t,p,{value:e})}(t),t}function y(t,e){void 0===e&&(e=i.bN);const n=(0,a.a0)(t);return(0,r.memo)(n,((t,n)=>{const{state:r,...o}=t,{state:i,...u}=n;return i&&d(i)?e(o,u):e(t,n)}))}function g(t,e){let{state:n,...r}=t;const o=(0,u.nf)(n),i=n&&d(n)?o:n;h(i,n);const a=m(e);return(0,u.w7)(r,(t=>(i&&a&&(t=(0,c.Y)(a.Provider,{value:i,children:t})),n&&(t=(0,c.Y)(e.Provider,{value:n,children:t})),t)),[i,a,n,e])}function b(t){const e=(0,u.jw)((()=>new Set));(0,u.UQ)((()=>{!function(t){Object.defineProperty(t,f,{value:Date.now(),writable:!0})}(t);for(const n of e)n(t)}),[t]);const n=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[]);return function(t,e){l in t||Object.defineProperty(t,l,{value:e})}(t,n),h(t),function(t){f in t||Object.defineProperty(t,f,{value:Date.now(),writable:!0})}(t),t}function w(t,e){const n=(0,r.useContext)(function(t,e){return v(t)?e?m(t):t:x}(t,e)),i=v(t)?n:t,[a,c]=(0,r.useState)((()=>function(t){if(!t)return t;const e=t[s];return e?e():t}(i))),p=d(i)&&d(a)?(h=a,(_=i)?h?f in _?f in h&&h[f]>=_[f]?h:_:h:_:h):i;var h,_;const y=function(t){if(t)return t[l]}(i),g=(0,r.useRef)(null),b=(0,o.$r)(e),w=!e;return(0,u.UQ)((()=>{if(y&&c){if(w)return y(c);if(b.length)return y((t=>{const e=g.current;g.current=t,b.some((n=>{if("function"==typeof n){const r=n(t);return"boolean"==typeof r?r||e&&n(e):e?r!==n(e):r}const r=n;return e?.[r]!==t[r]}))&&c(t)}))}}),[y,c,w,...b]),p}const x=(0,r.createContext)(void 0)},9787:(t,e,n)=>{"use strict";n.d(e,{a0:()=>u,ab:()=>c,n:()=>a});var r=n(2585),o=n(848),i=n(6260);function u(t){const e=(e,n)=>t({ref:n,...e});return(0,r.forwardRef)(e)}function a(t,e){const{as:n,wrapElement:r,...o}=e;let u;if(n&&"string"!=typeof n)u=(0,i.Y)(n,{...o});else if("function"==typeof e.children){const{children:t,...n}=o;u=e.children(n)}else u=n?(0,i.Y)(n,{...o}):(0,i.Y)(t,{...o});return r?r(u):u}function c(t){return function(e){void 0===e&&(e={});const n=t(e),r={};for(const t in n)(0,o.mQ)(n,t)&&void 0!==n[t]&&(r[t]=n[t]);return r}}},1539:(t,e,n)=>{"use strict";function r(t){return Array.isArray(t)?t:void 0!==t?[t]:[]}function o(t,e,n){return void 0===n&&(n=-1),n in t?[...t.slice(0,n),e,...t.slice(n)]:[...t,e]}function i(t){const e=[];for(const n of t)e.push(...n);return e}function u(t){return t.slice().reverse()}n.d(e,{$r:()=>r,M9:()=>i,Xk:()=>o,q7:()=>u})},8798:(t,e,n)=>{"use strict";n.d(e,{Bm:()=>s,Sw:()=>r,Tc:()=>v,YE:()=>o,bq:()=>u,cK:()=>f,cn:()=>m,gR:()=>a,kp:()=>d,mB:()=>h,qj:()=>_,qt:()=>c,zN:()=>p,zk:()=>i});const r="undefined"!=typeof window&&!!window.document?.createElement;function o(t){return t?t.ownerDocument||t:document}function i(t){return o(t).defaultView||window}function u(t,e){void 0===e&&(e=!1);const{activeElement:n}=o(t);if(!n?.nodeName)return null;if(c(n)&&n.contentDocument)return u(n.contentDocument.body,e);if(e){const t=n.getAttribute("aria-activedescendant");if(t){const e=o(n).getElementById(t);if(e)return e}}return n}function a(t,e){return t===e||t.contains(e)}function c(t){return"IFRAME"===t.tagName}function s(t){const e=t.tagName.toLowerCase();return"button"===e||!("input"!==e||!t.type)&&-1!==l.indexOf(t.type)}const l=["button","color","file","image","reset","submit"];function f(t,e){return"matches"in t?t.matches(e):"msMatchesSelector"in t?t.msMatchesSelector(e):t.webkitMatchesSelector(e)}function p(t){const e=t;return e.offsetWidth>0||e.offsetHeight>0||t.getClientRects().length>0}function d(t,e){if("closest"in t)return t.closest(e);do{if(f(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}function h(t){try{const e=t instanceof HTMLInputElement&&null!==t.selectionStart,n="TEXTAREA"===t.tagName;return e||n||!1}catch(t){return!1}}function v(t,e){const n=t?.getAttribute("role");return n&&-1!==["dialog","menu","listbox","tree","grid"].indexOf(n)?n:e}function m(t,e){const n=v(t);return n?{menu:"menuitem",listbox:"option",tree:"treeitem",grid:"gridcell"}[n]??e:e}function _(t){if(!t)return null;if(t.clientHeight&&t.scrollHeight>t.clientHeight){const{overflowY:e}=getComputedStyle(t);if("visible"!==e&&"hidden"!==e)return t}return _(t.parentElement)||document.scrollingElement||document.body}},5133:(t,e,n)=>{"use strict";n.d(e,{$b:()=>a,RN:()=>c,aG:()=>d,c$:()=>s,dg:()=>v,hY:()=>p,ho:()=>i,hu:()=>l,nz:()=>h,sz:()=>f,uh:()=>u});var r=n(8798),o=n(6623);function i(t){return Boolean(t.currentTarget&&!(0,r.gR)(t.currentTarget,t.target))}function u(t){return t.target===t.currentTarget}function a(t){const e=t.currentTarget;if(!e)return!1;const n=(0,o.f8)();if(n&&!t.metaKey)return!1;if(!n&&!t.ctrlKey)return!1;const r=e.tagName.toLowerCase();return"a"===r||"button"===r&&"submit"===e.type||"input"===r&&"submit"===e.type}function c(t){const e=t.currentTarget;if(!e)return!1;const n=e.tagName.toLowerCase();return!!t.altKey&&("a"===n||"button"===n&&"submit"===e.type||"input"===n&&"submit"===e.type)}function s(t,e){const n=new FocusEvent("blur",e),r=t.dispatchEvent(n),o={...e,bubbles:!0};return t.dispatchEvent(new FocusEvent("focusout",o)),r}function l(t,e){const n=new FocusEvent("focus",e),r=t.dispatchEvent(n),o={...e,bubbles:!0};return t.dispatchEvent(new FocusEvent("focusin",o)),r}function f(t,e,n){const r=new KeyboardEvent(e,n);return t.dispatchEvent(r)}function p(t,e){const n=new MouseEvent("click",e);return t.dispatchEvent(n)}function d(t,e){const n=e||t.currentTarget,o=t.relatedTarget;return!o||!(0,r.gR)(n,o)}function h(t,e,n){const r=requestAnimationFrame((()=>{t.removeEventListener(e,o,!0),n()})),o=()=>{cancelAnimationFrame(r),n()};return t.addEventListener(e,o,{once:!0,capture:!0}),r}function v(t,e,n,r){void 0===r&&(r=window);try{r.document.addEventListener(t,e,n)}catch(t){}const o=[];for(let i=0;i<r.frames?.length;i+=1){const u=r.frames[i];u&&o.push(v(t,e,n,u))}return()=>{try{r.document.removeEventListener(t,e,n)}catch(t){}o.forEach((t=>t()))}}},1266:(t,e,n)=>{"use strict";n.d(e,{AJ:()=>p,LC:()=>s,QZ:()=>_,WA:()=>y,XJ:()=>f,a9:()=>c,do:()=>h,gw:()=>m,oW:()=>d,tp:()=>i,vF:()=>l});var r=n(8798);const o="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";function i(t){return(0,r.cK)(t,o)&&(0,r.zN)(t)}function u(t){return i(t)&&!function(t){return parseInt(t.getAttribute("tabindex")||"0",10)<0}(t)}function a(t,e){const n=Array.from(t.querySelectorAll(o));e&&n.unshift(t);const u=n.filter(i);return u.forEach(((t,e)=>{if((0,r.qt)(t)&&t.contentDocument){const n=t.contentDocument.body;u.splice(e,1,...a(n))}})),u}function c(t,e,n){const i=Array.from(t.querySelectorAll(o)),a=i.filter(u);return e&&u(t)&&a.unshift(t),a.forEach(((t,e)=>{if((0,r.qt)(t)&&t.contentDocument){const r=c(t.contentDocument.body,!1,n);a.splice(e,1,...r)}})),!a.length&&n?i:a}function s(t,e,n){const[r]=c(t,e,n);return r||null}function l(t,e){return function(t,e,n,o){const i=(0,r.bq)(t),c=a(t,!1),s=c.indexOf(i),l=c.slice(s+1);return l.find(u)||(n?c.find(u):null)||(o?l[0]:null)||null}(document.body,0,t,e)}function f(t,e){return function(t,e,n,o){const i=(0,r.bq)(t),c=a(t,!1).reverse(),s=c.indexOf(i),l=c.slice(s+1);return l.find(u)||(n?c.find(u):null)||(o?l[0]:null)||null}(document.body,0,t,e)}function p(t){const e=(0,r.bq)(t);if(!e)return!1;if(e===t)return!0;const n=e.getAttribute("aria-activedescendant");return!!n&&n===t.id}function d(t){const e=(0,r.bq)(t);if(!e)return!1;if((0,r.gR)(t,e))return!0;const n=e.getAttribute("aria-activedescendant");return!!n&&"id"in t&&(n===t.id||!!t.querySelector(`#${CSS.escape(n)}`))}function h(t){!d(t)&&i(t)&&t.focus()}function v(t){const e=t.getAttribute("tabindex")??"";t.setAttribute("data-tabindex",e),t.setAttribute("tabindex","-1")}function m(t,e){c(t,e).forEach(v)}function _(t){const e=t.querySelectorAll("[data-tabindex]"),n=t=>{const e=t.getAttribute("data-tabindex");t.removeAttribute("data-tabindex"),e?t.setAttribute("tabindex",e):t.removeAttribute("tabindex")};t.hasAttribute("data-tabindex")&&n(t),e.forEach(n)}function y(t,e){"scrollIntoView"in t?(t.focus({preventScroll:!0}),t.scrollIntoView({block:"nearest",inline:"nearest",...e})):t.focus()}},848:(t,e,n)=>{"use strict";function r(){}function o(t,e){if(t===e)return!0;if(!t)return!1;if(!e)return!1;if("object"!=typeof t)return!1;if("object"!=typeof e)return!1;const n=Object.keys(t),r=Object.keys(e),{length:o}=n;if(r.length!==o)return!1;for(const r of n)if(t[r]!==e[r])return!1;return!0}function i(t,e){return function(t){return"function"==typeof t}(t)?t("function"==typeof e?e():e):t}function u(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(){for(const t of e)"function"==typeof t&&t(...arguments)}}function c(t){return t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function s(t){if(window.queueMicrotask)return window.queueMicrotask(t);Promise.resolve().then(t)}n.d(e,{J2:()=>c,Qh:()=>i,bN:()=>o,bt:()=>s,cy:()=>a,lQ:()=>r,mQ:()=>u})},6623:(t,e,n)=>{"use strict";n.d(e,{cX:()=>a,f8:()=>o,gm:()=>u,nr:()=>i});var r=n(8798);function o(){return!!r.Sw&&/mac|iphone|ipad|ipod/i.test(navigator.platform)}function i(){return r.Sw&&o()&&/apple/i.test(navigator.vendor)}function u(){return r.Sw&&/firefox\//i.test(navigator.userAgent)}function a(){return r.Sw&&navigator.platform.startsWith("Mac")&&!(r.Sw&&navigator.maxTouchPoints)}},7552:(t,e,n)=>{"use strict";n.d(e,{P:()=>r});const r=(0,n(2585).createContext)(void 0)},7156:(t,e,n)=>{"use strict";n.d(e,{C:()=>x,a:()=>c,b:()=>f,c:()=>p,d:()=>a,e:()=>v,f:()=>l,g:()=>h,h:()=>d,i:()=>w,j:()=>E,k:()=>_,l:()=>g,m:()=>O,n:()=>s,s:()=>b,v:()=>m});var r=n(2585),o=n(5353);const i={id:null,ref:{current:null}};function u(t){let e=0;for(const{length:n}of t)n>e&&(e=n);return e}function a(t,e){return t.filter((t=>e?!t.disabled&&t.id!==e:!t.disabled))}function c(t,e){return t.find((t=>e?!t.disabled&&t.id!==e:!t.disabled))}function s(t,e,n){const r=u(t);for(const i of t)for(let t=0;t<r;t+=1){const r=i[t];if(!r||n&&r.disabled){const r=0===t&&n?c(i):i[t-1];i[t]=r&&e!==r.id&&n?r:(o=r?.rowId,{id:"__EMPTY_ITEM__",disabled:!0,ref:{current:null},rowId:o})}}var o;return t}function l(t,e){if(e)return t.find((t=>t.id===e&&!t.disabled))}function f(t,e,n){return void 0!==n?n:void 0!==e?e:c(t)?.id}function p(t,e){return t.filter((t=>t.rowId===e))}function d(t){return"vertical"===t?"horizontal":"horizontal"===t?"vertical":void 0}function h(t){const e=[];for(const n of t){const t=e.find((t=>t[0]?.rowId===n.rowId));t?t.push(n):e.push([n])}return e}function v(t,e,n){void 0===n&&(n=!1);const r=t.findIndex((t=>t.id===e));return[...t.slice(r+1),...n?[i]:[],...t.slice(0,r)]}function m(t){const e=h(t),n=u(e),r=[];for(let t=0;t<n;t+=1)for(const n of e){const e=n[t];e&&r.push({...e,rowId:e.rowId?`${t}`:void 0})}return r}function _(t,e){return e?.baseRef&&e.baseRef===t?.baseRef?e.id:void 0}const y=Symbol("FOCUS_SILENTLY");function g(t){t[y]=!0,t.focus()}function b(t){const e=t[y];return delete t[y],e}function w(t,e,n){return!!e&&t.some((t=>(!n||t.ref.current!==n)&&t.ref.current===e))}const x=(0,o.B0)(),E=(0,r.createContext)(void 0),O=(0,r.createContext)(void 0)},7138:(t,e,n)=>{"use strict";n.d(e,{M:()=>i,a:()=>o,h:()=>u}),n(2585);var r=n(5353);const o=(0,r.B0)(),i=(0,r.B0)();function u(t,e){return!!t?.filter((t=>t.ref.current!==e)).some((t=>"true"===t.ref.current?.getAttribute("aria-expanded")))}},7618:(t,e,n)=>{"use strict";function r(){return{activeRef:null,listeners:new Set,subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}},show(t){this.activeRef=t,this.listeners.forEach((e=>e(t)))},hide(t){this.activeRef===t&&(this.activeRef=null,this.listeners.forEach((t=>t(null))))}}}n.d(e,{T:()=>o,c:()=>r});const o=(0,n(2585).createContext)(void 0)},4399:(t,e,n)=>{"use strict";n.d(e,{$:()=>s,s:()=>c});var r=n(2585),o=n(1880),i=n(9787),u=n(8798),a=n(6421);const c=(0,i.ab)((t=>{const e=(0,r.useRef)(null),n=(0,o.vO)(e,t.as||"button"),[i,c]=(0,r.useState)((()=>!!n&&(0,u.Bm)({tagName:n,type:t.type})));return(0,r.useEffect)((()=>{e.current&&c((0,u.Bm)(e.current))}),[]),t={role:i||"a"===n?void 0:"button",...t,ref:(0,o.NO)(e,t.ref)},t=(0,a.D)(t)})),s=(0,i.a0)((t=>{const e=c(t);return(0,i.n)("button",e)}))},6421:(t,e,n)=>{"use strict";n.d(e,{D:()=>p});var r=n(2585),o=n(1880),i=n(9787),u=n(8798),a=n(5133),c=n(848),s=n(6623),l=n(4569);function f(t){if(!t.isTrusted)return!1;const e=t.currentTarget;return(0,u.Bm)(e)||"SUMMARY"===e.tagName||"INPUT"===e.tagName||"TEXTAREA"===e.tagName||"A"===e.tagName||"SELECT"===e.tagName}const p=(0,i.ab)((t=>{let{clickOnEnter:e=!0,clickOnSpace:n=!0,...i}=t;const p=(0,r.useRef)(null),d=(0,o.vO)(p,i.as),[h,v]=(0,r.useState)((()=>!!d&&(0,u.Bm)({tagName:d,type:i.type})));(0,r.useEffect)((()=>{p.current&&v((0,u.Bm)(p.current))}),[]);const[m,_]=(0,r.useState)(!1),y=(0,r.useRef)(!1),g="data-command"in i,b=i.onKeyDown,w=(0,o._q)((t=>{b?.(t);const r=t.currentTarget;if(t.defaultPrevented)return;if(g)return;if(i.disabled)return;if(!(0,a.uh)(t))return;if((0,u.mB)(r))return;if(r.isContentEditable)return;const o=e&&"Enter"===t.key,l=n&&" "===t.key,p="Enter"===t.key&&!e,d=" "===t.key&&!n;if(p||d)t.preventDefault();else if(o||l){const e=f(t);if(o){if(!e){t.preventDefault();const{view:e,...n}=t,o=()=>(0,a.hY)(r,n);(0,s.gm)()?(0,a.nz)(r,"keyup",o):(0,c.bt)(o)}}else l&&(y.current=!0,e||(t.preventDefault(),_(!0)))}})),x=i.onKeyUp,E=(0,o._q)((t=>{if(x?.(t),t.defaultPrevented)return;if(g)return;if(i.disabled)return;if(t.metaKey)return;const e=n&&" "===t.key;if(y.current&&e&&(y.current=!1,!f(t))){_(!1);const e=t.currentTarget,{view:n,...r}=t;(0,c.bt)((()=>(0,a.hY)(e,r)))}}));return i={"data-command":"","data-active":m?"":void 0,type:h?"button":void 0,...i,ref:(0,o.NO)(p,i.ref),onKeyDown:w,onKeyUp:E},i=(0,l.W)(i),i}));(0,i.a0)((t=>(t=p(t),(0,i.n)("button",t))))},5749:(t,e,n)=>{"use strict";n.d(e,{g:()=>h});var r=n(2585),o=n(1880),i=n(5353),u=n(9787),a=n(8798),c=n(5133),s=n(848),l=n(7156);let f="";function p(){f=""}function d(t,e){const n=t.ref.current?.textContent;return!!n&&(0,s.J2)(n).toLowerCase().startsWith(e.toLowerCase())}const h=(0,u.ab)((t=>{let{state:e,typeahead:n=!0,...u}=t;e=(0,i.Pj)(e||l.C,["items","activeId","move"]);const s=u.onKeyDownCapture,h=(0,r.useRef)(0),v=(0,o._q)((t=>{if(s?.(t),t.defaultPrevented)return;if(!n)return;if(!e?.items)return;if(!function(t){const e=t.target;return(!e||!(0,a.mB)(e))&&(!(" "!==t.key||!f.length)||1===t.key.length&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&/^[\p{Letter}\p{Number}]$/u.test(t.key))}(t))return p();let r=function(t){return t.filter((t=>!t.disabled))}(e.items);if(!function(t,e){if((0,c.uh)(t))return!0;const n=t.target;return!!n&&e.some((t=>t.ref.current===n))}(t,r))return p();t.preventDefault(),window.clearTimeout(h.current),h.current=window.setTimeout((()=>{f=""}),500);const o=t.key.toLowerCase();f+=o,r=function(t,e,n){if(!n)return t;const r=t.find((t=>t.id===n));return r&&d(r,e)?f!==e&&d(r,f)?t:(f=e,(0,l.e)(t.filter((t=>d(t,f))),n).filter((t=>t.id!==n))):t}(r,o,e?.activeId);const i=r.find((t=>d(t,f)));i?e.move(i.id):p()}));return u={...u,onKeyDownCapture:v},u}));(0,u.a0)((t=>{const e=h(t);return(0,u.n)("div",e)}))},3369:(t,e,n)=>{"use strict";n.d(e,{a:()=>c});var r=n(2585),o=n(1880),i=n(9787);function u(t,e){const n=setTimeout(e,t);return()=>clearTimeout(n)}function a(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.join(", ").split(", ").reduce(((t,e)=>{const n=1e3*parseFloat(e||"0s");return n>t?n:t}),0)}const c=(0,i.ab)((t=>{let{state:e,...n}=t;const i=(0,o.Bi)(n.id),[c,s]=(0,r.useState)(null);(0,o.UQ)((()=>{if(e.animated){if(e.contentElement?.isConnected)return function(t){let e=requestAnimationFrame((()=>{e=requestAnimationFrame(t)}));return()=>cancelAnimationFrame(e)}((()=>{s(e.open?"enter":"leave")}));s(null)}}),[e.animated,e.contentElement,e.open]),(0,o.UQ)((()=>{if(!e.animated)return;if(!e.contentElement)return;if(!c)return;if("enter"===c&&!e.open)return;if("leave"===c&&e.open)return;if("number"==typeof e.animated)return u(e.animated,(()=>(0,r.flushSync)(e.stopAnimation)));const{transitionDuration:t,animationDuration:n,transitionDelay:o,animationDelay:i}=getComputedStyle(e.contentElement),s=a(o,i)+a(t,n);return s?u(s,(()=>(0,r.flushSync)(e.stopAnimation))):void 0}),[e.animated,e.contentElement,c,e.open,e.stopAnimation]);const l=e.mounted||!1===n.hidden?n.style:{...n.style,display:"none"};return n={id:i,"data-enter":"enter"===c?"":void 0,"data-leave":"leave"===c?"":void 0,hidden:!e.mounted,...n,ref:(0,o.NO)(i?e.setContentElement:null,n.ref),style:l},n}));(0,i.a0)((t=>{const e=c(t);return(0,i.n)("div",e)}))},2122:(t,e,n)=>{"use strict";n.d(e,{s:()=>u});var r=n(9787);const o=(0,r.ab)((t=>({...t,style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px",...t.style}})));(0,r.a0)((t=>{const e=o(t);return(0,r.n)("span",e)}));const i=(0,r.ab)((t=>(t={"data-focus-trap":"",tabIndex:0,"aria-hidden":!0,...t,style:{position:"fixed",top:0,left:0,...t.style}},o(t)))),u=(0,r.a0)((t=>{const e=i(t);return(0,r.n)("span",e)}))},4569:(t,e,n)=>{"use strict";n.d(e,{W:()=>y,z:()=>g});var r=n(2585),o=n(1880),i=n(9787),u=n(8798),a=n(5133),c=n(1266),s=n(848);const l=(0,n(6623).nr)(),f=["text","search","url","tel","email","password","number","date","month","week","time","datetime","datetime-local"];function p(t){return!("input"!==t.tagName.toLowerCase()||!t.type||"radio"!==t.type&&"checkbox"!==t.type)}function d(t,e,n,r,o){return t?e?n&&!r?-1:void 0:n?o:o||0:o}function h(t,e){return(0,o._q)((n=>{t?.(n),n.defaultPrevented||e&&(n.stopPropagation(),n.preventDefault())}))}let v=!0;function m(t){const e=t.target;e&&"hasAttribute"in e&&(e.hasAttribute("data-focus-visible")||(v=!1))}function _(t){t.metaKey||t.ctrlKey||(v=!0)}const y=(0,i.ab)((t=>{let{focusable:e=!0,accessibleWhenDisabled:n,autoFocus:i,onFocusVisible:y,...g}=t;const b=(0,r.useRef)(null);(0,r.useEffect)((()=>{e&&((0,a.dg)("mousedown",m,!0),(0,a.dg)("keydown",_,!0))}),[e]),l&&(0,r.useEffect)((()=>{if(!e)return;const t=b.current;if(!t)return;if(!p(t))return;const n=function(t){return"labels"in t?t.labels:null}(t);if(!n)return;const r=()=>(0,s.bt)((()=>t.focus()));return n.forEach((t=>t.addEventListener("mouseup",r))),()=>{n.forEach((t=>t.removeEventListener("mouseup",r)))}}),[e]);const w=e&&g.disabled,x=!!w&&!n,[E,O]=(0,r.useState)(!1);(0,r.useEffect)((()=>{e&&x&&E&&O(!1)}),[e,x,E]),(0,r.useEffect)((()=>{if(!e)return;if(!E)return;const t=b.current;if(!t)return;if("undefined"==typeof IntersectionObserver)return;const n=new IntersectionObserver((()=>{(0,c.tp)(t)||O(!1)}));return n.observe(t),()=>n.disconnect()}),[e,E]);const A=h(g.onKeyPressCapture,w),S=h(g.onMouseDownCapture,w),k=h(g.onClickCapture,w),C=g.onMouseDown,P=(0,o._q)((t=>{if(C?.(t),t.defaultPrevented)return;if(!e)return;const n=t.currentTarget;if(!l)return;if((0,a.ho)(t))return;if(!(0,u.Bm)(n)&&!p(n))return;let r=!1;const o=()=>{r=!0};n.addEventListener("focusin",o,{capture:!0,once:!0}),(0,a.nz)(n,"mouseup",(()=>{n.removeEventListener("focusin",o,!0),r||(0,c.do)(n)}))})),R=(t,n)=>{if(n&&(t.currentTarget=n),y?.(t),t.defaultPrevented)return;if(!e)return;const r=t.currentTarget;r&&(0,c.AJ)(r)&&O(!0)},T=g.onKeyDownCapture,M=(0,o._q)((t=>{if(T?.(t),t.defaultPrevented)return;if(!e)return;if(E)return;if(t.metaKey)return;if(t.altKey)return;if(t.ctrlKey)return;if(!(0,a.uh)(t))return;const n=t.currentTarget;(0,s.bt)((()=>R(t,n)))})),j=g.onFocusCapture,N=(0,o._q)((t=>{if(j?.(t),t.defaultPrevented)return;if(!e)return;if(!(0,a.uh)(t))return void O(!1);const n=t.currentTarget,r=()=>R(t,n);v||function(t){const{tagName:e,readOnly:n,type:r}=t;return"TEXTAREA"===e&&!n||"SELECT"===e&&!n||("INPUT"!==e||n?!!t.isContentEditable:f.includes(r))}(t.target)?(0,s.bt)(r):function(t){return"combobox"===t.getAttribute("role")}(t.target)?(0,a.nz)(t.target,"focusout",r):O(!1)})),D=g.onBlur,F=(0,o._q)((t=>{D?.(t),e&&(0,a.aG)(t)&&O(!1)}));(0,o.UQ)((()=>{e&&i&&b.current?.focus()}),[e,i]);const I=(0,o.vO)(b,g.as),$=e&&function(t){return!t||"button"===t||"input"===t||"select"===t||"textarea"===t||"a"===t}(I),L=e&&function(t){return!t||"button"===t||"input"===t||"select"===t||"textarea"===t}(I),U=x?{pointerEvents:"none",...g.style}:g.style;return g={"data-focus-visible":e&&E?"":void 0,"aria-disabled":!!w||void 0,...g,ref:(0,o.NO)(b,g.ref),style:U,tabIndex:d(e,x,$,L,g.tabIndex),disabled:!(!L||!x)||void 0,contentEditable:w?void 0:g.contentEditable,onKeyPressCapture:A,onClickCapture:k,onMouseDownCapture:S,onMouseDown:P,onKeyDownCapture:M,onFocusCapture:N,onBlur:F},g})),g=(0,i.a0)((t=>(t=y(t),(0,i.n)("div",t))))},7359:(t,e,n)=>{"use strict";n.d(e,{_:()=>s,p:()=>c});var r=n(2585),o=n(1880),i=n(9787),u=n(5133),a=n(4569);const c=(0,i.ab)((t=>{let{state:e,showOnHover:n=!0,...i}=t;const c=i.disabled||!0===i["aria-disabled"]||"true"===i["aria-disabled"],s=(0,r.useRef)(0);(0,r.useEffect)((()=>()=>window.clearTimeout(s.current)),[]),(0,r.useEffect)((()=>(0,u.dg)("mouseleave",(t=>{const n=e.anchorRef.current;n&&t.target===n&&(window.clearTimeout(s.current),s.current=0)}),!0)),[e.anchorRef]);const l=i.onMouseMove,f=(0,o.O4)(n),p=(0,o.P$)(),d=(0,o._q)((t=>{e.anchorRef.current=t.currentTarget,l?.(t),c||t.defaultPrevented||s.current||p()&&f(t)&&(s.current=window.setTimeout((()=>{s.current=0,e.show()}),e.showTimeout))}));return i={...i,ref:(0,o.NO)(e.anchorRef,i.ref),onMouseMove:d},i=(0,a.W)(i),i})),s=(0,i.a0)((t=>{const e=c(t);return(0,i.n)("a",e)}))},3349:(t,e,n)=>{"use strict";n.d(e,{G:()=>u});var r=n(9787),o=n(6285);const i=(0,r.ab)((t=>(0,o.k)(t))),u=(0,r.a0)((t=>{const e=i(t);return(0,r.n)("div",e)}))},5669:(t,e,n)=>{"use strict";n.d(e,{l:()=>i});var r=n(2585),o=n(2192);function i(t){let{timeout:e=500,placement:n="bottom",showTimeout:i=e,hideTimeout:u=e,...a}=void 0===t?{}:t;const[c,s]=(0,r.useState)(!1),l=(0,o.W)({placement:n,...a});return(0,r.useMemo)((()=>({...l,timeout:e,showTimeout:i,hideTimeout:u,autoFocusOnShow:c,setAutoFocusOnShow:s})),[l,e,i,u,c,s])}},799:(t,e,n)=>{"use strict";n.d(e,{B:()=>W,a:()=>H});var r=n(2585),o=n(1880),i=n(9787),u=n(8798),a=n(5133),c=n(1266),s=n(848),l=n(6623),f=n(3369),p=n(2122),d=n(6260);const h=(0,i.ab)((t=>{let{enabled:e=!1,...n}=t;const i=(0,r.useRef)(null);return n=(0,o.w7)(n,(t=>{const n=()=>e?(0,d.Y)(p.s,{onFocus:t=>{const e=i.current;if(!e)return;const n=(0,c.a9)(e,!0),r=n[0],o=n[n.length-1];n.length?t.relatedTarget===r?o?.focus():r?.focus():e.focus()}}):null;return(0,d.FD)(d.FK,{children:[n(),t,n()]})}),[e]),n={...n,ref:(0,o.NO)(i,n.ref)},n}));(0,i.a0)((t=>{const e=h(t);return(0,i.n)("div",e)}));var v=n(4569);const m=(0,r.createContext)(0);function _(t){let{level:e,children:n}=t;const o=(0,r.useContext)(m),i=Math.max(Math.min(e||o+1,6),1);return(0,d.Y)(m.Provider,{value:i,children:n})}var y=n(7268);const g=(0,r.createContext)(void 0),b=(0,r.createContext)(void 0),w=(0,r.createContext)(void 0);function x(t){const e=(0,r.useRef)();return(0,r.useEffect)((()=>{if(t)return(0,a.dg)("mousedown",(t=>{e.current=t.target}),!0);e.current=null}),[t]),e}function E(t){let{state:e,backdrop:n,backdropProps:i,hideOnInteractOutside:u=!0,hideOnEscape:c=!0,hidden:l,children:p}=t;const h=(0,r.useRef)(null);e=(0,r.useMemo)((()=>({...e,setContentElement:s.lQ})),[e]),(0,o.UQ)((()=>{const t=h.current,n=e.contentElement;t&&n&&(t.style.zIndex=getComputedStyle(n).zIndex)}),[e.contentElement]);const v=i?.onClick,m=(0,o.O4)(u),_=x(e.mounted),y=(0,o._q)((t=>{v?.(t),t.defaultPrevented||(0,a.uh)(t)&&_.current===t.currentTarget&&m(t)&&(t.stopPropagation(),e.hide())})),g=i?.onKeyDown,b=(0,o.O4)(c),w=(0,o._q)((t=>{g?.(t),t.defaultPrevented||"Escape"===t.key&&(0,a.uh)(t)&&b(t)&&e.hide()})),E=(0,f.a)({state:e,id:void 0,role:"presentation",tabIndex:-1,hidden:l,...i,ref:(0,o.NO)(i?.ref,h),onClick:y,onKeyDown:w,style:{position:"fixed",top:0,right:0,bottom:0,left:0,...i?.style}}),O="boolean"!=typeof n&&n||"div";return(0,d.Y)(O,{...E,"data-backdrop":e.contentElement?.id,children:p})}const O=["SCRIPT","STYLE"];function A(t,e){return!O.includes(t.tagName)&&!e.some((e=>e&&(0,u.gR)(t,e)))}function S(t,e){for(let n of t){const r=(0,u.YE)(n);for(;n?.parentElement&&n!==r.body;){for(const r of n.parentElement.children)A(r,t)&&e(r);n=n.parentElement}}}function k(){const t=[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return S(n,(e=>{t.unshift(function(t){const e=t.getAttribute("aria-hidden")||"";return t.setAttribute("aria-hidden","true"),()=>{e?t.setAttribute("aria-hidden",e):t.removeAttribute("aria-hidden")}}(e))})),()=>{t.forEach((t=>t()))}}function C(t,e,n){const[i,a]=(0,o.CH)(),c=(0,r.useCallback)((()=>{if(!n)return!1;const r=t.current;if(!r)return!1;const{body:o}=(0,u.YE)(r),i=o.getAttribute(e);return!i||i===r.id}),[i,n,e]);return(0,o.UQ)((()=>{const o=t.current;if(!o)return;if(!n)return;const{body:i}=(0,u.YE)(o);if(!c()){const t=new MutationObserver((()=>(0,r.flushSync)(a)));return t.observe(i,{attributeFilter:[e]}),()=>t.disconnect()}return i.setAttribute(e,o.id),()=>{i.removeAttribute(e)}}),[i,t,n,c,e]),c}function P(t){let{type:e,listener:n,dialogRef:i,nestedDialogs:c,disclosureRef:s,enabled:l,capture:f}=t;const p=(0,o._q)(n),d=(0,o.hX)(c);(0,r.useEffect)((()=>{if(l)return(0,a.dg)(e,(t=>{const e=i.current,n=s?.current,r=t.target;e&&r&&function(t){return"HTML"===t.tagName||(0,u.gR)((0,u.YE)(t).body,t)}(r)&&((0,u.gR)(e,r)||n&&function(t,e){if((0,u.gR)(t,e))return!0;const n=e.getAttribute("aria-activedescendant");if(n){const e=(0,u.YE)(t).getElementById(n);if(e)return(0,u.gR)(t,e)}return!1}(n,r)||r.hasAttribute("data-focus-trap")||d.current.some(function(t){return e=>{const n=e.current;return!(!n||!(0,u.gR)(n,t)&&!function(t,e){return!!t&&!!e&&e.hasAttribute("data-backdrop")&&e.getAttribute("data-backdrop")===t.id}(n,t))}}(r))||p(t))}),f)}),[l,i,s,p,f])}function R(t,e){return"function"==typeof t?t(e):!!t}const T=(0,r.createContext)({});function M(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}const j=(0,l.nr)();function N(t){return e=>e.current&&(0,u.gR)(e.current,t)}const D=(0,i.ab)((t=>{let{state:e,focusable:n=!0,modal:i=!0,portal:p=!!i,backdrop:m=!!i,backdropProps:O,hideOnEscape:A=!0,hideOnInteractOutside:D=!0,preventBodyScroll:F=!!i,autoFocusOnShow:I=!0,autoFocusOnHide:$=!0,initialFocusRef:L,finalFocusRef:U,...q}=t;const B=(0,r.useRef)(null),H=(0,r.useRef)(e.open),{portalRef:W,portalNode:z,domReady:Y}=(0,o.TE)(p,q.portalRef),K=q.preserveTabOrder&&!i&&e.mounted,X=e.open&&!e.animating,V=i||p&&K&&(0,l.nr)(),Q=(0,o.Bi)(q.id);(0,o.UQ)((()=>{if(!X)return;const t=B.current,n=(0,u.bq)(t,!0);n&&"BODY"!==n.tagName&&(t&&(0,u.gR)(t,n)||(e.disclosureRef.current=n))}),[X]);const J=function(t,e){let{state:n,modal:i}=e;const u=(0,r.useContext)(T),[a,c]=(0,r.useState)([]),[s,l]=(0,r.useState)([]),f=(0,r.useCallback)((t=>{const e=u.addDialog?.(t);return l((e=>[...e,t])),()=>{e?.(),l((e=>e.filter((e=>e!==t))))}}),[u.addDialog]),p=(0,r.useCallback)((t=>{const e=u.showModal?.(t);return c((e=>[...e,t])),()=>{e?.(),c((e=>e.filter((e=>e!==t))))}}),[u.showModal]);(0,o.UQ)((()=>u.addDialog?.(t)),[u.addDialog,t]),(0,o.UQ)((()=>{if(i&&n.open)return u.showModal?.(t)}),[i,n.open,u.showModal,t]),(0,o.UQ)((()=>{!1===u.open&&n.open&&n.hide()}),[u.open,n.open,n.hide]);const h=(0,r.useMemo)((()=>({open:n.open,addDialog:f,showModal:p})),[n.open,f,p]);return{nestedDialogs:s,openModals:a,wrapElement:(0,r.useCallback)((t=>(0,d.Y)(T.Provider,{value:h,children:t})),[h])}}(B,{state:e,modal:i}),{nestedDialogs:G,openModals:Z,wrapElement:tt}=J,et=(0,o.hX)(G);(function(t,e){const n=C(t,"data-dialog-body-scroll",e);(0,o.UQ)((()=>{const e=t.current;if(!e)return;if(!n())return;const r=(0,u.YE)(e),o=(0,u.zk)(e),{documentElement:i,body:a}=r,c=o.innerWidth-i.clientWidth,f=function(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}(i),p=(0,l.f8)()&&!(0,l.cX)();return(0,s.cy)(function(t,e,n){if(!t)return()=>{};const r=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{r?t.style.setProperty(e,r):t.style.removeProperty(e)}}(i,"--scrollbar-width",`${c}px`),p?(()=>{const{scrollX:t,scrollY:e,visualViewport:n}=o,r=n?.offsetLeft??0,i=n?.offsetTop??0,u=M(a,{position:"fixed",overflow:"hidden",top:-(e-Math.floor(i))+"px",left:-(t-Math.floor(r))+"px",right:"0",[f]:`${c}px`});return()=>{u(),o.scrollTo(t,e)}})():M(a,{overflow:"hidden",[f]:`${c}px`}))}),[t,n])})(B,F&&e.mounted),function(t,e){(0,r.useEffect)((()=>{if(!e.open)return;const n=t.current;if(!n)return;const r=new MutationObserver((t=>{let[e]=t;if(!e)return;if(e.target!==n)return;const r=(0,u.YE)(n);(0,u.bq)(n)===r.body&&n.focus()}));return r.observe(n,{childList:!0,subtree:!0}),()=>r.disconnect()}),[e.open,t])}(B,e),function(t,e,n){let{state:r,modal:o,hideOnInteractOutside:i,enabled:a=r.open}=n;const c=x(a),s={disclosureRef:r.disclosureRef,enabled:a,dialogRef:t,nestedDialogs:e,capture:!0};P({...s,type:"mousedown",listener:e=>{const n=t.current;n&&o&&!R(i,e)&&(n.focus(),e.preventDefault(),e.stopPropagation())}}),P({...s,type:"click",listener:e=>{const n=c.current;if(!n)return;if(!R(i,e)){if(!o)return;return e.preventDefault(),void e.stopPropagation()}const a=t.current;a&&(0,u.gR)(a,n)||r.hide()}}),P({...s,type:"focusin",listener:e=>{const n=t.current;if(n){if(!R(i,e)){if(!o)return;return n.focus(),e.preventDefault(),void e.stopPropagation()}e.target!==(0,u.YE)(n)&&r.hide()}}}),P({...s,type:"contextmenu",listener:e=>{const n=t.current;if(n){if(!R(i,e)){if(!o)return;return n.focus(),e.preventDefault(),void e.stopPropagation()}r.hide()}}})}(B,G,{state:e,modal:i,hideOnInteractOutside:D,enabled:e.open}),j&&(0,r.useEffect)((()=>{if(!e.mounted)return;const t=e.disclosureRef.current;if(!t)return;if(!(0,u.Bm)(t))return;const n=()=>{let e=!1;const n=()=>{e=!0};t.addEventListener("focusin",n,{capture:!0,once:!0}),(0,a.nz)(t,"mouseup",(()=>{t.removeEventListener("focusin",n,!0),e||(0,c.do)(t)}))};return t.addEventListener("mousedown",n),()=>{t.removeEventListener("mousedown",n)}}),[e.mounted,e.disclosureRef]),(0,r.useEffect)((()=>{if(!e.mounted)return;if(!Y)return;const t=B.current;if(t&&V){if(t.querySelector("[data-dialog-dismiss]"))return;return function(t,e){const n=(0,u.YE)(t).createElement("button");return n.type="button",n.tabIndex=-1,n.textContent="Dismiss popup",n.style.border="0px",n.style.clip="rect(0 0 0 0)",n.style.height="1px",n.style.margin="-1px",n.style.overflow="hidden",n.style.padding="0px",n.style.position="absolute",n.style.whiteSpace="nowrap",n.style.width="1px",n.addEventListener("click",e),t.prepend(n),()=>{n.removeEventListener("click",e),n.remove()}}(t,e.hide)}}),[e.mounted,Y,V,e.hide]);const nt=C(B,"data-dialog-disable-outside",X&&!Z.length&&V);(0,o.UQ)((()=>{if(!nt())return;const t=p?z:B.current;return i?(0,s.cy)(k(t),m?null:function(){const t=[];for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return S(n,(e=>{t.unshift(function(t){if(!("style"in t))return s.lQ;const e=t.style.pointerEvents;return t.style.pointerEvents="none",()=>{t.style.pointerEvents=e??""}}(e))})),()=>{t.forEach((t=>t()))}}(t)):k(t)}),[nt,p,z,i,m]);const rt=(0,r.useRef)(),ot=!!I,it=(0,o.O4)(I);(0,r.useEffect)((()=>{if(!X)return;if(!ot)return;if(!Y)return;const t=et.current?.some((t=>t.current&&!t.current.hidden));if(t)return;const n=e.contentElement;if(!n?.isConnected)return;const r=L?.current,o=r||(0,c.LC)(n,!0,p&&K)||n,i=rt.current;if(rt.current=r,r===i){const t=(0,u.bq)(n,!0);if(t&&(0,u.gR)(n,t))return}it(o)&&o.focus()}),[X,ot,Y,e.contentElement,L,p,K,it]);const ut=!!$,at=(0,o.O4)($);(0,r.useEffect)((()=>{const t=B.current,n=H.current;if(H.current=e.open,!n)return;if(!ut)return;if(!t)return;const r=()=>{const n=et.current;if(function(t,e){const n=(0,u.bq)();return!(!n||(0,u.gR)(t,n)||function(t,e){const n=t.id;if(n)return e.getAttribute("data-backdrop")===n}(t,n)||e?.some(N(n))||!(0,c.tp)(n))}(t,n))return;let r=U?.current||e.disclosureRef.current;if(r){if(r.id){const t=(0,u.YE)(r),e=`[aria-activedescendant="${r.id}"]`,n=t.querySelector(e);n&&(r=n)}if(!(0,c.tp)(r)){const t=(0,u.kp)(r,"[data-dialog]");if(t&&t.id){const e=(0,u.YE)(t),n=`[aria-controls~="${t.id}"]`,o=e.querySelector(n);o&&(r=o)}}if(!at(r))return;r.focus()}};return e.open?r:r()}),[ut,e.open,U,e.disclosureRef,at]);const ct=(0,o.O4)(A);(0,r.useEffect)((()=>{if(Y&&e.mounted)return(0,a.dg)("keydown",(t=>{const n=B.current;if(!n)return;const r=t.target,o=e.disclosureRef.current;"Escape"===t.key&&(t.defaultPrevented||r&&((0,u.gR)(n,r)?!et.current.some(N(r)):o&&(0,u.gR)(o,r))&&ct(t)&&e.hide())}))}),[Y,e.mounted,e.disclosureRef,ct,e.hide]),q=(0,o.w7)(q,tt,[tt]),q=(0,o.w7)(q,(t=>(0,d.Y)(_,{level:i?1:void 0,children:t})),[i]),q=h({...q,enabled:e.open&&i&&!Z.length});const st=q.hidden;q=(0,o.w7)(q,(t=>m?(0,d.Y)(E,{state:e,backdrop:m,backdropProps:O,hideOnInteractOutside:D,hideOnEscape:A,hidden:st,children:t}):t),[e,m,O,D,A,st]);const[lt,ft]=(0,r.useState)(),[pt,dt]=(0,r.useState)();return q=(0,o.w7)(q,(t=>(0,d.Y)(g.Provider,{value:e,children:(0,d.Y)(b.Provider,{value:ft,children:(0,d.Y)(w.Provider,{value:dt,children:t})})})),[e]),q={id:Q,"data-dialog":"",role:"dialog",tabIndex:n?-1:void 0,"aria-labelledby":lt,"aria-describedby":pt,...q,ref:(0,o.NO)(B,q.ref)},q=(0,f.a)({state:e,...q}),q=(0,v.W)({...q,focusable:n}),q=(0,y.W)({portal:p,...q,portalRef:W,preserveTabOrder:K}),q}));(0,i.a0)((t=>{const e=D(t);return(0,i.n)("div",e)}));var F=n(7552);const I=(0,i.ab)((t=>{let{state:e,modal:n=!1,portal:i=!!n,preserveTabOrder:u=!0,autoFocusOnShow:a=!0,wrapperProps:c,...s}=t;const l=e.popoverRef;(0,o.UQ)((()=>{const t=l.current,n=e.contentElement;t&&n&&(t.style.zIndex=getComputedStyle(n).zIndex)}),[l,e.contentElement]);const[f,p]=(0,r.useState)(!1),{portalRef:h,domReady:v}=(0,o.TE)(i,s.portalRef);return(0,o.UQ)((()=>{if(!v)return;if(!e.mounted)return;if(!e.contentElement?.isConnected)return;const t=requestAnimationFrame((()=>{p(!0)}));return()=>{cancelAnimationFrame(t)}}),[v,e.mounted,e.contentElement]),s=(0,o.w7)(s,(t=>(0,d.Y)("div",{role:"presentation",...c,style:{position:e.fixed?"fixed":"absolute",top:0,left:0,...c?.style},ref:l,children:t})),[e.fixed,l,c]),s=(0,o.w7)(s,(t=>(0,d.Y)(F.P.Provider,{value:e,children:t})),[e]),s={...s,style:{position:"relative",...s.style}},s=D({state:e,modal:n,preserveTabOrder:u,portal:i,autoFocusOnShow:f&&a,...s,portalRef:h}),s}));function $(t){return[t.clientX,t.clientY]}function L(t,e){const[n,r]=t;let o=!1;for(let t=e.length,i=0,u=t-1;i<t;u=i++){const[a,c]=e[i],[s,l]=e[u],[,f]=e[0===u?t-1:u-1]||[0,0],p=(c-l)*(n-a)-(a-s)*(r-c);if(l<c){if(r>=l&&r<c){if(0===p)return!0;p>0&&(r===l?r>f&&(o=!o):o=!o)}}else if(c<l){if(r>c&&r<=l){if(0===p)return!0;p<0&&(r===l?r<f&&(o=!o):o=!o)}}else if(r==c&&(n>=s&&n<=a||n>=a&&n<=s))return!0}return o}function U(t,e){const n=t.getBoundingClientRect(),{top:r,right:o,bottom:i,left:u}=n,[a,c]=function(t,e){const{top:n,right:r,bottom:o,left:i}=e,[u,a]=t;return[u<i?"left":u>r?"right":null,a<n?"top":a>o?"bottom":null]}(e,n),s=[e];return a?("top"!==c&&s.push(["left"===a?u:o,r]),s.push(["left"===a?o:u,r]),s.push(["left"===a?o:u,i]),"bottom"!==c&&s.push(["left"===a?u:o,i])):"top"===c?(s.push([u,r]),s.push([u,i]),s.push([o,i]),s.push([o,r])):(s.push([u,i]),s.push([u,r]),s.push([o,r]),s.push([o,i])),s}function q(t,e,n,r){return!!((0,c.oW)(e)||t&&((0,u.gR)(e,t)||n&&(0,u.gR)(n,t)||r?.some((e=>q(t,e,n)))))}(0,i.a0)((t=>{const e=I(t);return(0,i.n)("div",e)}));const B=(0,r.createContext)(null),H=(0,i.ab)((t=>{let{state:e,modal:n=!1,portal:i=!!n,hideOnEscape:c=!0,hideOnControl:l=!1,hideOnHoverOutside:f=!0,disablePointerEventsOnApproach:p=!!f,...h}=t;const v=(0,r.useRef)(null),[m,_]=(0,r.useState)([]),y=(0,r.useRef)(0),g=(0,r.useRef)(null),{portalRef:b,domReady:w}=(0,o.TE)(i,h.portalRef),x=(0,o.O4)(c),E=(0,o.O4)(l);(0,r.useEffect)((()=>{if(e.open)return(0,a.dg)("keydown",(t=>{if(t.defaultPrevented)return;const n="Escape"===t.key&&x(t),r="Control"===t.key&&E(t);(n||r)&&e.hide()}))}),[e.open,x,E,e.hide]);const O=!!f,A=(0,o.O4)(f),S=!!p,k=(0,o.O4)(p);(0,r.useEffect)((()=>{if(!w)return;if(!e.mounted)return;if(!O&&!S)return;const t=v.current;return t?(0,a.dg)("mousemove",(n=>{const r=g.current,o=n.target,i=e.anchorRef.current;if(q(o,t,i,m))return g.current=o&&i&&(0,u.gR)(i,o)?$(n):null,window.clearTimeout(y.current),void(y.current=0);if(!y.current){if(r){const e=$(n);if(L(e,U(t,r))){if(g.current=e,!k(n))return;return n.preventDefault(),void n.stopPropagation()}}A(n)&&(y.current=window.setTimeout((()=>{y.current=0,e.hide()}),e.hideTimeout))}}),!0):void 0}),[w,e.mounted,O,S,e.anchorRef,m,k,A,e.hide,e.hideTimeout]),(0,r.useEffect)((()=>{if(!w)return;if(!e.mounted)return;if(!S)return;const t=t=>{const e=v.current;if(!e)return;const n=g.current;if(!n)return;const r=U(e,n);if(L($(t),r)){if(!k(t))return;t.preventDefault(),t.stopPropagation()}};return(0,s.cy)((0,a.dg)("mouseenter",t,!0),(0,a.dg)("mouseover",t,!0),(0,a.dg)("mouseout",t,!0),(0,a.dg)("mouseleave",t,!0))}),[w,e.mounted,S,k]);const C=(0,r.useContext)(B);(0,o.UQ)((()=>{if(n)return;if(!i)return;if(!e.mounted)return;if(!w)return;const t=v.current;return t?C?.(t):void 0}),[n,i,e.mounted,w]);const P=(0,r.useCallback)((t=>{_((e=>[...e,t]));const e=C?.(t);return()=>{_((e=>e.filter((e=>e!==t)))),e?.()}}),[C]);return h=(0,o.w7)(h,(t=>(0,d.Y)(B.Provider,{value:P,children:t})),[P]),h={...h,ref:(0,o.NO)(v,h.ref)},h=function(t){let{state:e,...n}=t;const[i,u]=(0,r.useState)(!1);(0,r.useEffect)((()=>{e.mounted||u(!1)}),[e.mounted]);const a=(0,o._q)(n.onFocus),c=(0,r.useCallback)((t=>{a(t),t.defaultPrevented||u(!0)}),[a]);return n={autoFocusOnHide:i,finalFocusRef:e.anchorRef,...n,onFocus:c},n}({state:e,...h}),h=function(t){let{state:e,...n}=t;const i=(0,o.hX)(e.mounted);return(0,r.useEffect)((()=>{e.mounted||e.setAutoFocusOnShow(!1)}),[e.mounted,e.setAutoFocusOnShow]),(0,r.useEffect)((()=>()=>{i.current||e.setAutoFocusOnShow(!1)}),[e.setAutoFocusOnShow]),{autoFocusOnShow:!!n.modal||e.autoFocusOnShow,...n}}({state:e,...h}),h=I({hideOnEscape:c,state:e,modal:n,portal:i,...h,portalRef:b}),h})),W=(0,i.a0)((t=>{const e=H(t);return(0,i.n)("div",e)}))},659:(t,e,n)=>{"use strict";n.d(e,{I:()=>g});var r=n(2585),o=n(1880),i=n(5353),u=n(9787),a=n(8798),c=n(5749),s=n(7359),l=n(4399);const f=(0,u.ab)((t=>{let{state:e,toggleOnClick:n=!0,...i}=t;const u=(0,r.useRef)(null),[a,c]=(0,r.useState)(!1);(0,o.UQ)((()=>{const t=e.disclosureRef.current;t&&t.isConnected||(e.disclosureRef.current=u.current);const n=e.disclosureRef.current===u.current;c(e.open&&n)}),[e.disclosureRef,e.open]);const s=i.onMouseDown,f=(0,o._q)((t=>{e.disclosureRef.current=t.currentTarget,s?.(t)})),p=i.onClick,d=(0,o.O4)(n),h="data-disclosure"in i,v=(0,o._q)((t=>{e.disclosureRef.current=t.currentTarget,p?.(t),t.defaultPrevented||h||d(t)&&e.toggle()}));return i={"data-disclosure":"","aria-expanded":a,"aria-controls":e.contentElement?.id,...i,ref:(0,o.NO)(u,i.ref),onMouseDown:f,onClick:v},i=(0,l.s)(i),i}));(0,u.a0)((t=>{const e=f(t);return(0,u.n)("button",e)}));const p=(0,u.ab)((t=>{let{state:e,...n}=t;return n=f({state:e,...n}),n}));(0,u.a0)((t=>{const e=p(t);return(0,u.n)("button",e)}));var d=n(7552),h=n(3591),v=n(6260);const m=(0,u.ab)((t=>{let{state:e,...n}=t;const r=n.onClick,i=(0,o._q)((t=>{e.anchorRef.current=t.currentTarget,r?.(t)}));return n=(0,o.w7)(n,(t=>(0,v.Y)(d.P.Provider,{value:e,children:t})),[e]),n={...n,onClick:i},n=(0,h.E)({state:e,...n}),n=p({state:e,...n}),n}));(0,u.a0)((t=>{const e=m(t);return(0,u.n)("button",e)}));var _=n(7138);const y=(0,u.ab)((t=>{let{state:e,focusable:n,accessibleWhenDisabled:u,showOnHover:l,...f}=t;const p=(0,r.useRef)(null),d=(0,i.Pj)(_.M,["items","move","contentElement"]),h=(0,i.Pj)(_.a,["items","move"]),v=!!d,y=!!h&&!v,g=f.disabled||!0===f["aria-disabled"]||"true"===f["aria-disabled"];(0,r.useEffect)((()=>{e.disclosureRef.current=p.current}));const b=f.onFocus,w=(0,o._q)((t=>{b?.(t),g||t.defaultPrevented||(e.setAutoFocusOnShow(!1),e.setActiveId(null),h&&y&&(0,_.h)(h.items,t.currentTarget)&&e.show())})),x=e.placement.split("-")[0],E=f.onKeyDown,O=(0,o._q)((t=>{if(E?.(t),g)return;if(t.defaultPrevented)return;const n=function(t,e){return{ArrowDown:("bottom"===e||"top"===e)&&"first",ArrowUp:("bottom"===e||"top"===e)&&"last",ArrowRight:"right"===e&&"first",ArrowLeft:"left"===e&&"first"}[t.key]}(t,x);n&&(t.preventDefault(),e.show(),e.setAutoFocusOnShow(!0),e.setInitialFocus(n))})),A=f.onClick,S=(0,o._q)((t=>{if(A?.(t),t.defaultPrevented)return;const n=!t.detail;e.open&&!n||(v&&!n||e.setAutoFocusOnShow(!0),e.setInitialFocus(n?"first":"container")),v&&e.show()}));return v&&(f={as:"div",...f}),f={id:(0,o.Bi)(f.id),role:v||y?(0,a.cn)(d?.contentElement,"menuitem"):void 0,"aria-haspopup":(0,a.Tc)(e.contentElement,"menu"),...f,ref:(0,o.NO)(p,f.ref),onFocus:w,onKeyDown:O,onClick:S},f=(0,s.p)({state:e,focusable:n,accessibleWhenDisabled:u,...f,showOnHover:t=>"function"==typeof l?l(t):null!=l?l:!!v||y&&(0,_.h)(h.items)}),f=m({state:e,toggleOnClick:!v,focusable:n,accessibleWhenDisabled:u,...f}),f=(0,c.g)({state:e,typeahead:y,...f}),f})),g=(0,u.a0)((t=>{const e=y(t);return(0,u.n)("button",e)}))},5470:(t,e,n)=>{"use strict";n.d(e,{D:()=>E});var r=n(1880),o=n(5353),i=n(9787),u=n(8798),a=n(5133),c=n(1266),s=n(7156);function l(t){const e=t.relatedTarget;return e?.nodeType===Node.ELEMENT_NODE?e:null}const f=(0,i.ab)((t=>{let{state:e,focusOnHover:n=!0,...i}=t;e=(0,o.Pj)(e||s.C,["setActiveId","baseRef"]);const a=(0,r.P$)(),f=i.onMouseMove,p=(0,r.O4)(n),d=(0,r._q)((t=>{f?.(t),t.defaultPrevented||a()&&p(t)&&((0,c.oW)(t.currentTarget)||e?.baseRef.current?.focus(),e?.setActiveId(t.currentTarget.id))})),h=i.onMouseLeave,v=(0,r._q)((t=>{h?.(t),t.defaultPrevented||a()&&(function(t){const e=l(t);return!!e&&(0,u.gR)(t.currentTarget,e)}(t)||function(t){const e=l(t);return!!e&&!!(0,u.kp)(e,"[data-composite-hover]")}(t)||p(t)&&(e?.setActiveId(null),e?.baseRef.current?.focus()))}));return i={"data-composite-hover":"",...i,onMouseMove:d,onMouseLeave:v},i}));(0,o.MA)((t=>{const e=f(t);return(0,i.n)("div",e)}));var p=n(2585);const d=(0,p.createContext)(void 0);function h(t){return t}const v=(0,i.ab)((t=>{let{state:e,shouldRegisterItem:n=!0,getItem:i=h,...u}=t;e=(0,o.Pj)(e,["registerItem"]);const a=(0,p.useContext)(d),c=e?.registerItem||a,s=(0,p.useRef)(null);return(0,r.UQ)((()=>{if(n)return c?.(i({ref:s}))}),[n,i,c]),u={...u,ref:(0,r.NO)(s,u.ref)},u}));(0,i.a0)((t=>{const e=v(t);return(0,i.n)("div",e)}));var m=n(6421),_=n(6260);function y(t,e){void 0===e&&(e=!1);const{top:n}=t.getBoundingClientRect();return e?n+t.clientHeight:n}function g(t,e,n,r){if(void 0===r&&(r=!1),!e)return;if(!n)return;const o=(0,u.qj)(t);if(!o)return;const i=function(t,e){void 0===e&&(e=!1);const n=t.clientHeight,{top:r}=t.getBoundingClientRect(),o=1.5*Math.max(.875*n,n-40),i=e?n-o+r:o+r;return"HTML"===t.tagName?i+t.scrollTop:i}(o,r);let a,c;for(let t=0;t<e.length;t+=1){const o=a;if(a=n(t),!a)break;if(a===o)continue;const u=(0,s.f)(e,a),l=u?.ref.current;if(!l)continue;const f=y(l,r)-i,p=Math.abs(f);if(r&&f<=0||!r&&f>=0){void 0!==c&&c<p&&(a=o);break}c=p}return a}const b=(0,i.ab)((t=>{let{state:e,rowId:n,preventScrollOnKeyDown:i=!1,moveOnKeyPress:c=!0,getItem:l,...f}=t;const d=(0,r.Bi)(f.id);e=(0,o.Pj)(e||s.C,[(0,p.useCallback)((t=>t.activeId===d),[d]),"baseRef","items","virtualFocus","registerItem","setActiveId","orientation","up","next","down","previous","first","last","move"]);const h=(0,p.useRef)(null),y=(0,p.useContext)(s.j),b=n??(0,s.k)(e,y),w=f.disabled&&!f.accessibleWhenDisabled,x=(0,p.useCallback)((t=>{const e={...t,id:d,rowId:b,disabled:!!w};return l?l(e):e}),[d,b,w,l]),E=f.onFocus,O=(0,p.useRef)(!1),A=(0,r._q)((t=>{if(E?.(t),t.defaultPrevented)return;if((0,a.ho)(t))return;if(!d)return;if(e?.items&&function(t,e){if((0,a.uh)(t))return!1;const n=t.target;return(0,s.i)(e,n,t.currentTarget)}(t,e.items))return;if(e?.activeId!==d&&e?.setActiveId(d),!e?.virtualFocus)return;if(!(0,a.uh)(t))return;if((n=t.currentTarget).isContentEditable||(0,u.mB)(n)||"INPUT"===n.tagName&&!(0,u.Bm)(n))return;var n;const r=e.baseRef.current;r&&(O.current=!0,t.relatedTarget===r||(0,s.i)(e.items,t.relatedTarget)?(0,s.l)(r):r.focus())})),S=f.onBlurCapture,k=(0,r._q)((t=>{S?.(t),t.defaultPrevented||e?.virtualFocus&&O.current&&(O.current=!1,t.preventDefault(),t.stopPropagation())})),C=f.onKeyDown,P=(0,r.O4)(i),R=(0,r.O4)(c),T=function(t,e){return(0,p.useMemo)((()=>{if(e)return t?.find((t=>t.id===e))}),[t,e])}(e?.items,d),M=!!T?.rowId,j=(0,r._q)((t=>{if(C?.(t),t.defaultPrevented)return;if(!(0,a.uh)(t))return;const n="horizontal"!==e?.orientation,r="vertical"!==e?.orientation,o={ArrowUp:(M||n)&&e?.up,ArrowRight:(M||r)&&e?.next,ArrowDown:(M||n)&&e?.down,ArrowLeft:(M||r)&&e?.previous,Home:()=>!M||t.ctrlKey?e?.first():e?.previous(-1),End:()=>!M||t.ctrlKey?e?.last():e?.next(-1),PageUp:()=>g(t.currentTarget,e?.items,e?.up,!0),PageDown:()=>g(t.currentTarget,e?.items,e?.down)}[t.key];if(o){const n=o();if(P(t)||void 0!==n){if(!R(t))return;t.preventDefault(),e?.move(n)}}})),N=(0,p.useMemo)((()=>({id:d,baseRef:e?.baseRef})),[d,e?.baseRef]);f=(0,r.w7)(f,(t=>(0,_.Y)(s.m.Provider,{value:N,children:t})),[N]);const D=e?.activeId===d,F=function(t,e){const[n,o]=(0,p.useState)(e.role);return(0,r.UQ)((()=>{const n=t.current;n&&o(n.getAttribute("role")||e.role)}),[e.role]),n}(h,f);let I;D&&(function(t){return"option"===t||"treeitem"===t}(F)||e?.virtualFocus&&function(t){return"option"===t||"tab"===t||"treeitem"===t||"gridcell"===t||"row"===t||"columnheader"===t||"rowheader"===t}(F))&&(I=!0);const $=!e?.virtualFocus&&D||!e?.items.length;return f={id:d,"aria-selected":I,"data-active-item":D?"":void 0,...f,ref:(0,r.NO)(h,f.ref),tabIndex:$?f.tabIndex:-1,onFocus:A,onBlurCapture:k,onKeyDown:j},f=(0,m.D)(f),f=v({state:e,...f,getItem:x,shouldRegisterItem:!!d&&f.shouldRegisterItem}),f}));(0,o.MA)((t=>{const e=b(t);return(0,i.n)("button",e)}));var w=n(7138);const x=(0,i.ab)((t=>{let{state:e,hideOnClick:n=!0,preventScrollOnKeyDown:i=!0,focusOnHover:c,...s}=t;const l=(0,o.Pj)(e||w.a,["items"]);e=(0,o.Pj)(e||w.M,["move","hideAll","contentElement"])||l;const p=s.onClick,d=(0,r.O4)(n),h=e&&"hideAll"in e?e.hideAll:void 0,v=!!h,m=(0,r._q)((t=>{p?.(t),t.defaultPrevented||(0,a.RN)(t)||(0,a.$b)(t)||h&&"menu"!==t.currentTarget.getAttribute("aria-haspopup")&&d(t)&&h()}));return s={role:(0,u.cn)(e&&"contentElement"in e?e.contentElement:null,"menuitem"),...s,onClick:m},s=b({state:e,preventScrollOnKeyDown:i,...s}),s=f({state:e,...s,focusOnHover:t=>"function"==typeof c?c(t):null!=c?c:"mouseleave"===t.type?v:v?(t.currentTarget.hasAttribute("aria-expanded")&&t.currentTarget.focus(),!0):!!(0,w.h)(e?.items,t.currentTarget)&&(t.currentTarget.focus(),!0)}),s})),E=(0,o.MA)((t=>{const e=x(t);return(0,i.n)("div",e)}))},7034:(t,e,n)=>{"use strict";n.d(e,{E:()=>v});var r=n(2585),o=n(1880),i=n(5353),u=n(848),a=n(1539),c=n(8798);function s(t,e){return Boolean(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}function l(t,e){const n=function(t){const e=t.map(((t,e)=>[e,t]));let n=!1;return e.sort(((t,e)=>{let[r,o]=t,[i,u]=e;const a=o.ref.current,c=u.ref.current;return a===c?0:a&&c?s(a,c)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1):0})),n?e.map((t=>{let[e,n]=t;return n})):t}(t);t!==n&&e(n)}function f(t){void 0===t&&(t={});const[e,n]=(0,o.PW)([],t.items,t.setItems);!function(t,e){if("function"!=typeof IntersectionObserver)return void function(t,e){(0,r.useEffect)((()=>{const n=setTimeout((()=>l(t,e)));return()=>clearTimeout(n)}))}(t,e);const n=(0,r.useRef)([]);(0,r.useEffect)((()=>{const r=function(t){const e=t[0],n=t[t.length-1];let r=e?.ref.current?.parentElement;for(;r;){if(n&&r.contains(n.ref.current))return r;r=r.parentElement}return(0,c.YE)(r).body}(t),o=new IntersectionObserver((()=>{const r=!!n.current.length;n.current=t,r&&l(t,e)}),{root:r});return t.forEach((t=>{t.ref.current&&o.observe(t.ref.current)})),()=>o.disconnect()}),[t,e])}(e,n);const i=(0,r.useCallback)((t=>(n((e=>{const n=function(t,e){const n=e.ref.current;if(!n)return-1;let r=t.length;if(!r)return-1;for(;r--;){const e=t[r];if(e?.ref.current&&s(e.ref.current,n))return r+1}return 0}(e,t);return(0,a.Xk)(e,t,n)})),()=>{n((e=>{const n=e.filter((e=>{let{ref:n}=e;return n!==t.ref}));return e.length===n.length?e:n}))})),[]);return(0,r.useMemo)((()=>({items:e,setItems:n,registerItem:i})),[e,n,i])}var p=n(7156),d=n(5669),h=n(7138);function v(t){let{orientation:e="vertical",timeout:n,hideTimeout:c=0,...s}=void 0===t?{}:t;const[l,v]=(0,r.useState)("container"),[m,_]=(0,o.PW)(s.defaultValues||{},s.values,s.setValues),y=(0,i.Pj)(h.M,["orientation","hideAll"]),g=(0,i.Pj)(h.a,["orientation"]),b=y?.orientation||g?.orientation,w=!!g&&!y,x=s.placement||("vertical"===b?"right-start":"bottom-start");n=n??w?0:150;const E=function(t){let{orientation:e="both",rtl:n=!1,virtualFocus:u=!1,focusLoop:c=!1,focusWrap:s=!1,focusShift:l=!1,...d}=void 0===t?{}:t;const h=f(d),v=(0,r.useRef)(null),[m,_]=(0,o.PW)(0,d.moves,d.setMoves),[y,g]=(0,o.PW)(d.defaultActiveId,d.activeId,d.setActiveId),b=(0,r.useMemo)((()=>(0,p.b)(h.items,y)),[h.items,y]),w=(0,o.nf)(b),x=d.includesBaseElement??null===w,E=(0,o.hX)(b),O=(0,r.useCallback)((t=>{void 0!==t&&(_((t=>t+1)),g(t))}),[]),A=(0,r.useCallback)((()=>{const t=(0,p.a)(h.items);return t?.id}),[h.items]),S=(0,r.useCallback)((()=>{const t=(0,p.a)((0,a.q7)(h.items));return t?.id}),[h.items]),k=(0,r.useCallback)(((t,e,r,o)=>{const i=n&&"vertical"!==e?(0,a.q7)(t):t;if(null==E.current)return(0,p.a)(i)?.id;const u=i.find((t=>t.id===E.current));if(!u)return(0,p.a)(i)?.id;const l=!!u.rowId,f=i.indexOf(u),d=i.slice(f+1),h=(0,p.c)(d,u.rowId);if(void 0!==o){const t=(0,p.d)(h,E.current),e=t.slice(o)[0]||t[t.length-1];return e?.id}const v=(0,p.h)(l?e||"horizontal":e),m=c&&c!==v,_=l&&s&&s!==v;if(r=r||!l&&m&&x,m){const t=_&&!r?i:(0,p.c)(i,u.rowId),e=(0,p.e)(t,E.current,r),n=(0,p.a)(e,E.current);return n?.id}if(_){const t=(0,p.a)(r?h:d,E.current);return r?t?.id||null:t?.id}const y=(0,p.a)(h,E.current);return!y&&r?null:y?.id}),[c,s,x]),C=(0,r.useCallback)((t=>k(h.items,e,!1,t)),[k,h.items,e]),P=(0,r.useCallback)((t=>{const n=!(0,p.a)(h.items)?.rowId&&x;return k((0,a.q7)(h.items),e,n,t)}),[h.items,k,e,x]),R=(0,r.useCallback)((t=>{const e=l&&!t,n=(0,p.v)((0,a.M9)((0,p.n)((0,p.g)(h.items),E.current,e)));return k(n,"vertical",c&&"horizontal"!==c&&x,t)}),[h.items,k,l,c]),T=(0,r.useCallback)((t=>{const e=l&&!t,n=(0,p.v)((0,a.q7)((0,a.M9)((0,p.n)((0,p.g)(h.items),E.current,e))));return k(n,"vertical",x,t)}),[h.items,k,l]),M=(0,r.useMemo)((()=>({...h,baseRef:v,orientation:e,rtl:n,virtualFocus:u,focusLoop:c,focusWrap:s,focusShift:l,moves:m,setMoves:_,includesBaseElement:x,activeId:b,setActiveId:g,move:O,next:C,previous:P,up:T,down:R,first:A,last:S})),[h,v,e,n,u,c,s,l,m,_,x,b,g,O,C,P,T,R,A,S]);return(0,i.rY)(M)}({orientation:e,...s}),O=(0,d.l)({timeout:n,hideTimeout:c,...s,placement:x});(0,r.useEffect)((()=>{O.mounted||E.setActiveId(null)}),[O.mounted,E.setActiveId]);const A=(0,r.useCallback)(((t,e)=>{"__proto__"!==t&&"constructor"!==t&&_((n=>{const r=n[t],o=(0,u.Qh)(e,r);return o===r?n:{...n,[t]:void 0===o?!!o:o}}))}),[_]),S=(0,r.useCallback)((()=>{O.hide(),y?.hideAll()}),[O.hide,y?.hideAll]),k=(0,r.useMemo)((()=>({...E,...O,initialFocus:l,setInitialFocus:v,values:m,setValues:_,setValue:A,hideAll:S})),[E,O,l,v,m,_,A,S]);return(0,i.rY)(k)}},4521:(t,e,n)=>{"use strict";n.d(e,{W:()=>E});var r=n(2585),o=n(1880),i=n(5353),u=n(9787),a=n(1266),c=n(799),s=n(7138),l=n(1539),f=n(8798),p=n(5133),d=n(848),h=n(4569),v=n(7156);function m(t){return t.some((t=>!!t.rowId))}function _(t,e,n,r){return(0,o._q)((o=>{if(n?.(o),o.defaultPrevented)return;const i=e?.ref.current;if(!i)return;if(!function(t,e){if(!(0,p.uh)(t))return!1;if(function(t){return"Shift"===t.key||"Control"===t.key||"Alt"===t.key||"Meta"===t.key}(t))return!1;const n=t.target;if(!n)return!0;if((0,f.mB)(n)){if(function(t){return 1===t.key.length&&!t.ctrlKey&&!t.metaKey}(t))return!1;const n=m(e.items),r=null===e.activeId,o=n&&!r,i="Home"===t.key||"End"===t.key;if(!o&&i)return!1}return!t.isPropagationStopped()}(o,t))return;const{view:u,...a}=o,c=r?.current;i!==c&&i.focus(),(0,p.sz)(i,o.type,a)||o.preventDefault(),o.currentTarget.contains(i)&&o.stopPropagation()}))}const y=(0,u.ab)((t=>{let{state:e,composite:n=!0,focusOnMove:u=n,moveOnKeyPress:c=!0,...s}=t;const y=(0,r.useRef)(null),g=n&&e.virtualFocus,b=(0,r.useMemo)((()=>(0,v.f)(e.items,e.activeId)),[e.items,e.activeId]),w=(0,o.hX)(b),x=(0,r.useRef)(null),E=null===e.activeId,O=(0,o.hX)(E),A=function(t){const[e,n]=(0,r.useState)(!1),o=(0,r.useCallback)((()=>n(!0)),[]);return(0,r.useEffect)((()=>{const r=t?.ref.current;e&&r&&(n(!1),(0,a.WA)(r))}),[t,e]),o}(b);(0,o.UQ)((()=>{if(!n)return;if(!u)return;if(!e.moves)return;const t=w.current?.ref.current;t&&A()}),[n,u,e.moves]),(0,o.UQ)((()=>{if(!n)return;if(!e.moves)return;if(!O.current)return;const t=y.current;if(!t)return;const r=x.current;x.current=null,r&&(0,p.c$)(r,{relatedTarget:t}),(0,a.AJ)(t)?(0,p.hu)(t,{relatedTarget:r}):t.focus()}),[n,e.moves]),(0,o.UQ)((()=>{if(!g)return;if(!n)return;const t=x.current;if(x.current=null,!t)return;const e=w.current?.ref.current,r=e||(0,f.bq)(t);(0,p.c$)(t,{relatedTarget:r})}),[g,n,e.activeId]);const S=_(e,b,s.onKeyDownCapture,x),k=_(e,b,s.onKeyUpCapture,x),C=s.onFocusCapture,P=(0,o._q)((t=>{if(C?.(t),t.defaultPrevented)return;if(!g)return;const e=t.relatedTarget,n=(0,v.s)(t.currentTarget);(0,p.uh)(t)&&n&&(t.stopPropagation(),x.current=e)})),R=s.onFocus,T=(0,o._q)((t=>{R?.(t),t.defaultPrevented||n&&(g?(0,p.uh)(t)&&!(0,v.i)(e.items,t.relatedTarget)&&(0,d.bt)(A):(0,p.uh)(t)&&e.setActiveId(null))})),M=s.onBlurCapture,j=(0,o._q)((t=>{if(M?.(t),t.defaultPrevented)return;if(!g)return;const n=b?.ref.current||null,r=t.relatedTarget,o=(0,v.i)(e.items,r),i=x.current;x.current=null,(0,p.uh)(t)&&o?(r===n?i&&i!==r&&(0,p.c$)(i,t):n&&(0,p.c$)(n,t),t.stopPropagation()):!(0,v.i)(e.items,t.target)&&n&&(0,p.c$)(n,t)})),N=s.onKeyDown,D=(0,o.O4)(c),F=(0,o._q)((t=>{if(N?.(t),t.defaultPrevented)return;if(!(0,p.uh)(t))return;if(w.current)return;const n="horizontal"!==e.orientation,r="vertical"!==e.orientation,o=m(e.items),i={ArrowUp:(o||n)&&(()=>{if(o){const n=e.items&&(t=e.items,(0,v.a)((0,l.M9)((0,l.q7)((0,v.g)(t)))));return n?.id}var t;return e.last()}),ArrowRight:(o||r)&&e.first,ArrowDown:(o||n)&&e.first,ArrowLeft:(o||r)&&e.last,Home:e.first,End:e.last,PageUp:e.first,PageDown:e.last}[t.key];if(i){const n=i();if(void 0!==n){if(!D(t))return;t.preventDefault(),e.move(n)}}}));s=(0,i.E5)({state:e,...s},v.C),s={"aria-activedescendant":g&&b?.id||void 0,...s,ref:(0,o.NO)(y,n?e.baseRef:void 0,s.ref),onKeyDownCapture:S,onKeyUpCapture:k,onFocusCapture:P,onFocus:T,onBlurCapture:j,onKeyDown:F};const I=n&&(g||null===e.activeId);return s=(0,h.W)({focusable:I,...s}),s}));(0,u.a0)((t=>{const e=y(t);return(0,u.n)("div",e)}));var g=n(5749);const b=(0,u.ab)((t=>{let{state:e,composite:n=!0,...u}=t;const a=(0,i.Pj)(s.M,[]),c=(0,i.Pj)(s.a,["items","move","next","previous","orientation"]),l=!!a,f=(0,o.Bi)(u.id),p=u.onKeyDown,d=e.placement.split("-")[0],h="both"===e.orientation?void 0:e.orientation,v="vertical"!==h,m=!!c&&"vertical"!==c?.orientation,_=(0,o._q)((t=>{if(p?.(t),!t.defaultPrevented){if(l||c&&!v){const n={ArrowRight:()=>"left"===d&&!v,ArrowLeft:()=>"right"===d&&!v,ArrowUp:()=>"bottom"===d&&v,ArrowDown:()=>"top"===d&&v}[t.key];if(n?.())return t.stopPropagation(),t.preventDefault(),e.hide()}if(c){const e={ArrowRight:()=>{if(m)return c.next()},ArrowLeft:()=>{if(m)return c.previous()},ArrowDown:()=>{if(!m)return c.next()},ArrowUp:()=>{if(!m)return c.previous()}}[t.key],n=e?.();void 0!==n&&(t.stopPropagation(),t.preventDefault(),c.move(n))}}}));u=(0,i.E5)({state:e,...u},s.M);const b=function(t){let{state:e,...n}=t;const[o,i]=(0,r.useState)(void 0),u=n["aria-label"];return(0,r.useEffect)((()=>{const t=e.disclosureRef.current;if(!t)return;const n=e.contentElement;n&&(u||n.hasAttribute("aria-label")?i(void 0):t.id&&i(t.id))}),[u,e.disclosureRef,e.contentElement]),o}({state:e,...u}),w=e.mounted?u.style:{...u.style,display:"none"};return u={id:f,"aria-labelledby":b,hidden:!e.mounted,...u,ref:(0,o.NO)(f?e.setContentElement:null,u.ref),style:w,onKeyDown:_},n&&(u={role:"menu","aria-orientation":h,...u}),u=y({state:e,composite:n,...u}),u=(0,g.g)({state:e,...u}),u}));function w(t,e){if(e)return t.find((t=>t.id===e))?.ref}(0,u.a0)((t=>{const e=b(t);return(0,u.n)("div",e)}));const x=(0,u.ab)((t=>{let{state:e,hideOnEscape:n=!0,autoFocusOnShow:u=!0,hideOnHoverOutside:l,...f}=t;const p=(0,i.Pj)(s.M,[]),d=(0,i.Pj)(s.a,[]),h=!!p,v=!!d&&!h,m=f.onKeyDown,_=(0,o.O4)(n),y=(0,o._q)((t=>{if(m?.(t),!t.defaultPrevented&&"Escape"===t.key){if(!_(t))return;return h||t.stopPropagation(),e.hide()}}));f={...f,onKeyDown:y};const{"aria-labelledby":g,...x}=b({state:e,...f});f=x;const[E,O]=(0,r.useState)();(0,r.useEffect)((()=>{let t=!1;return O((n=>{if(!t&&e.autoFocusOnShow){if(n)return n;switch(e.initialFocus){case"first":return w(e.items,e.first());case"last":return w(e.items,e.last());default:return e.baseRef}}})),()=>{t=!0}}),[e.autoFocusOnShow,e.initialFocus,e.items,e.first,e.last,e.baseRef]);const A=!!u,S=!!E||!!f.initialFocusRef||!!f.modal;return f=(0,c.a)({state:e,initialFocusRef:E,autoFocusOnShow:A?S&&u:e.autoFocusOnShow||!!f.modal,...f,hideOnHoverOutside:t=>{if("function"==typeof l)return l(t);if(null!=l)return l;if(h)return p.setActiveId(null),!0;if(!v)return!1;const n=e.disclosureRef.current;return!n||!(0,a.oW)(n)},modal:!h&&f.modal,backdrop:!h&&f.backdrop,hideOnEscape:!h&&n}),f={"aria-labelledby":g,...f},f})),E=(0,u.a0)((t=>{const e=x(t);return(0,u.n)("div",e)}))},3591:(t,e,n)=>{"use strict";n.d(e,{E:()=>i});var r=n(1880),o=n(9787);const i=(0,o.ab)((t=>{let{state:e,...n}=t;return n={...n,ref:(0,r.NO)(e.anchorRef,n.ref)},n}));(0,o.a0)((t=>{const e=i(t);return(0,o.n)("div",e)}))},6285:(t,e,n)=>{"use strict";n.d(e,{k:()=>d});var r=n(2585),o=n(1880),i=n(9787),u=n(8798),a=n(7552),c=n(6260);const s="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z",l=30,f=l/2,p={top:`rotate(180 ${f} ${f})`,right:`rotate(-90 ${f} ${f})`,bottom:`rotate(0 ${f} ${f})`,left:`rotate(90 ${f} ${f})`},d=(0,i.ab)((t=>{let{state:e,size:n=l,...i}=t;const f=(0,r.useContext)(a.P);e=e||f;const d=e?.currentPlacement.split("-")[0],h=function(t){const[e,n]=(0,r.useState)();return(0,o.UQ)((()=>{if(!t)return;const e=(0,u.zk)(t).getComputedStyle(t);n(e)}),[t]),e}(e?.contentElement),v=h?.getPropertyValue("background-color")||"none",m=h?.getPropertyValue(`border-${d}-color`)||"none",_=h?.getPropertyValue(`border-${d}-width`)||"0px",y=2*parseInt(_)*(l/n),g=p[d];return i={children:(0,r.useMemo)((()=>(0,c.Y)("svg",{display:"block",viewBox:"0 0 30 30",children:(0,c.FD)("g",{transform:g,children:[(0,c.Y)("path",{fill:"none",d:s}),(0,c.Y)("path",{stroke:"none",d:s})]})})),[g]),"aria-hidden":!0,...i,ref:(0,o.NO)(e?.arrowRef,i.ref),style:{position:"absolute",fontSize:n,width:"1em",height:"1em",pointerEvents:"none",fill:v,stroke:m,strokeWidth:y,...i.style}},i}));(0,i.a0)((t=>{const e=d(t);return(0,i.n)("div",e)}))},2192:(t,e,n)=>{"use strict";n.d(e,{W:()=>st});var r=n(2585);const o=Math.min,i=Math.max,u=Math.round,a=Math.floor,c=t=>({x:t,y:t}),s={left:"right",right:"left",bottom:"top",top:"bottom"},l={start:"end",end:"start"};function f(t,e,n){return i(t,o(e,n))}function p(t,e){return"function"==typeof t?t(e):t}function d(t){return t.split("-")[0]}function h(t){return t.split("-")[1]}function v(t){return"x"===t?"y":"x"}function m(t){return"y"===t?"height":"width"}function _(t){return["top","bottom"].includes(d(t))?"y":"x"}function y(t){return v(_(t))}function g(t){return t.replace(/start|end/g,(t=>l[t]))}function b(t){return t.replace(/left|right|bottom|top/g,(t=>s[t]))}function w(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function x(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function E(t,e,n){let{reference:r,floating:o}=t;const i=_(e),u=y(e),a=m(u),c=d(e),s="y"===i,l=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[a]/2-o[a]/2;let v;switch(c){case"top":v={x:l,y:r.y-o.height};break;case"bottom":v={x:l,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:f};break;case"left":v={x:r.x-o.width,y:f};break;default:v={x:r.x,y:r.y}}switch(h(e)){case"start":v[u]-=p*(n&&s?-1:1);break;case"end":v[u]+=p*(n&&s?-1:1)}return v}async function O(t,e){var n;void 0===e&&(e={});const{x:r,y:o,platform:i,rects:u,elements:a,strategy:c}=t,{boundary:s="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=p(e,t),v=w(h),m=a[d?"floating"===f?"reference":"floating":f],_=x(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:s,rootBoundary:l,strategy:c})),y="floating"===f?{...u.floating,x:r,y:o}:u.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},E=x(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:g,strategy:c}):y);return{top:(_.top-E.top+v.top)/b.y,bottom:(E.bottom-_.bottom+v.bottom)/b.y,left:(_.left-E.left+v.left)/b.x,right:(E.right-_.right+v.right)/b.x}}function A(t){return C(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function k(t){var e;return null==(e=(C(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function C(t){return t instanceof Node||t instanceof S(t).Node}function P(t){return t instanceof Element||t instanceof S(t).Element}function R(t){return t instanceof HTMLElement||t instanceof S(t).HTMLElement}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ShadowRoot||t instanceof S(t).ShadowRoot)}function M(t){const{overflow:e,overflowX:n,overflowY:r,display:o}=$(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(o)}function j(t){return["table","td","th"].includes(A(t))}function N(t){const e=F(),n=$(t);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function D(t){let e=U(t);for(;R(e)&&!I(e);){if(N(e))return e;e=U(e)}return null}function F(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function I(t){return["html","body","#document"].includes(A(t))}function $(t){return S(t).getComputedStyle(t)}function L(t){return P(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function U(t){if("html"===A(t))return t;const e=t.assignedSlot||t.parentNode||T(t)&&t.host||k(t);return T(e)?e.host:e}function q(t){const e=U(t);return I(e)?t.ownerDocument?t.ownerDocument.body:t.body:R(e)&&M(e)?e:q(e)}function B(t,e,n){var r;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=q(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),u=S(o);return i?e.concat(u,u.visualViewport||[],M(o)?o:[],u.frameElement&&n?B(u.frameElement):[]):e.concat(o,B(o,[],n))}function H(t){const e=$(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const o=R(t),i=o?t.offsetWidth:n,a=o?t.offsetHeight:r,c=u(n)!==i||u(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function W(t){return P(t)?t:t.contextElement}function z(t){const e=W(t);if(!R(e))return c(1);const n=e.getBoundingClientRect(),{width:r,height:o,$:i}=H(e);let a=(i?u(n.width):n.width)/r,s=(i?u(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Y=c(0);function K(t){const e=S(t);return F()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:Y}function X(t,e,n,r){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),i=W(t);let u=c(1);e&&(r?P(r)&&(u=z(r)):u=z(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==S(t))&&e}(i,n,r)?K(i):c(0);let s=(o.left+a.x)/u.x,l=(o.top+a.y)/u.y,f=o.width/u.x,p=o.height/u.y;if(i){const t=S(i),e=r&&P(r)?S(r):r;let n=t.frameElement;for(;n&&r&&e!==t;){const t=z(n),e=n.getBoundingClientRect(),r=$(n),o=e.left+(n.clientLeft+parseFloat(r.paddingLeft))*t.x,i=e.top+(n.clientTop+parseFloat(r.paddingTop))*t.y;s*=t.x,l*=t.y,f*=t.x,p*=t.y,s+=o,l+=i,n=S(n).frameElement}}return x({width:f,height:p,x:s,y:l})}const V=[":popover-open",":modal"];function Q(t){let e=!1,n=0,r=0;if(V.forEach((n=>{!function(n){try{e=e||t.matches(n)}catch(t){}}(n)})),e){const e=D(t);if(e){const t=e.getBoundingClientRect();n=t.x,r=t.y}}return[e,n,r]}function J(t){return X(k(t)).left+L(t).scrollLeft}function G(t,e,n){let r;if("viewport"===e)r=function(t,e){const n=S(t),r=k(t),o=n.visualViewport;let i=r.clientWidth,u=r.clientHeight,a=0,c=0;if(o){i=o.width,u=o.height;const t=F();(!t||t&&"fixed"===e)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:u,x:a,y:c}}(t,n);else if("document"===e)r=function(t){const e=k(t),n=L(t),r=t.ownerDocument.body,o=i(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),u=i(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+J(t);const c=-n.scrollTop;return"rtl"===$(r).direction&&(a+=i(e.clientWidth,r.clientWidth)-o),{width:o,height:u,x:a,y:c}}(k(t));else if(P(e))r=function(t,e){const n=X(t,!0,"fixed"===e),r=n.top+t.clientTop,o=n.left+t.clientLeft,i=R(t)?z(t):c(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:o*i.x,y:r*i.y}}(e,n);else{const n=K(t);r={...e,x:e.x-n.x,y:e.y-n.y}}return x(r)}function Z(t,e){const n=U(t);return!(n===e||!P(n)||I(n))&&("fixed"===$(n).position||Z(n,e))}function tt(t,e,n,r){const o=R(e),i=k(e),u="fixed"===n,a=X(t,!0,u,e);let s={scrollLeft:0,scrollTop:0};const l=c(0);if(o||!o&&!u)if(("body"!==A(e)||M(i))&&(s=L(e)),o){const t=X(e,!0,u,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=J(i));let f=a.left+s.scrollLeft-l.x,p=a.top+s.scrollTop-l.y;const[d,h,v]=Q(r);return d&&(f+=h,p+=v,o&&(f+=e.clientLeft,p+=e.clientTop)),{x:f,y:p,width:a.width,height:a.height}}function et(t,e){return R(t)&&"fixed"!==$(t).position?e?e(t):t.offsetParent:null}function nt(t,e){const n=S(t);if(!R(t))return n;let r=et(t,e);for(;r&&j(r)&&"static"===$(r).position;)r=et(r,e);return r&&("html"===A(r)||"body"===A(r)&&"static"===$(r).position&&!N(r))?n:r||D(t)||n}const rt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:r,strategy:o}=t;const i=k(r),[u]=e?Q(e.floating):[!1];if(r===i||u)return n;let a={scrollLeft:0,scrollTop:0},s=c(1);const l=c(0),f=R(r);if((f||!f&&"fixed"!==o)&&(("body"!==A(r)||M(i))&&(a=L(r)),R(r))){const t=X(r);s=z(r),l.x=t.x+r.clientLeft,l.y=t.y+r.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-a.scrollLeft*s.x+l.x,y:n.y*s.y-a.scrollTop*s.y+l.y}},getDocumentElement:k,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:r,strategy:u}=t;const a=[..."clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let r=B(t,[],!1).filter((t=>P(t)&&"body"!==A(t))),o=null;const i="fixed"===$(t).position;let u=i?U(t):t;for(;P(u)&&!I(u);){const e=$(u),n=N(u);n||"fixed"!==e.position||(o=null),(i?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||M(u)&&!n&&Z(t,u))?r=r.filter((t=>t!==u)):o=e,u=U(u)}return e.set(t,r),r}(e,this._c):[].concat(n),r],c=a[0],s=a.reduce(((t,n)=>{const r=G(e,n,u);return t.top=i(r.top,t.top),t.right=o(r.right,t.right),t.bottom=o(r.bottom,t.bottom),t.left=i(r.left,t.left),t}),G(e,c,u));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:nt,getElementRects:async function(t){const e=this.getOffsetParent||nt,n=this.getDimensions;return{reference:tt(t.reference,await e(t.floating),t.strategy,t.floating),floating:{x:0,y:0,...await n(t.floating)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=H(t);return{width:e,height:n}},getScale:z,isElement:P,isRTL:function(t){return"rtl"===$(t).direction}};const ot=(t,e,n)=>{const r=new Map,o={platform:rt,...n},i={...o.platform,_c:r};return(async(t,e,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:u}=n,a=i.filter(Boolean),c=await(null==u.isRTL?void 0:u.isRTL(e));let s=await u.getElementRects({reference:t,floating:e,strategy:o}),{x:l,y:f}=E(s,r,c),p=r,d={},h=0;for(let n=0;n<a.length;n++){const{name:i,fn:v}=a[n],{x:m,y:_,data:y,reset:g}=await v({x:l,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:s,platform:u,elements:{reference:t,floating:e}});l=null!=m?m:l,f=null!=_?_:f,d={...d,[i]:{...d[i],...y}},g&&h<=50&&(h++,"object"==typeof g&&(g.placement&&(p=g.placement),g.rects&&(s=!0===g.rects?await u.getElementRects({reference:t,floating:e,strategy:o}):g.rects),({x:l,y:f}=E(s,p,c))),n=-1)}return{x:l,y:f,placement:p,strategy:o,middlewareData:d}})(t,e,{...o,platform:i})};var it=n(1880);const ut={arrow:t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:u,platform:a,elements:c,middlewareData:s}=e,{element:l,padding:d=0}=p(t,e)||{};if(null==l)return{};const v=w(d),_={x:n,y:r},g=y(i),b=m(g),x=await a.getDimensions(l),E="y"===g,O=E?"top":"left",A=E?"bottom":"right",S=E?"clientHeight":"clientWidth",k=u.reference[b]+u.reference[g]-_[g]-u.floating[b],C=_[g]-u.reference[g],P=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let R=P?P[S]:0;R&&await(null==a.isElement?void 0:a.isElement(P))||(R=c.floating[S]||u.floating[b]);const T=k/2-C/2,M=R/2-x[b]/2-1,j=o(v[O],M),N=o(v[A],M),D=j,F=R-x[b]-N,I=R/2-x[b]/2+T,$=f(D,I,F),L=!s.arrow&&null!=h(i)&&I!==$&&u.reference[b]/2-(I<D?j:N)-x[b]/2<0,U=L?I<D?I-D:I-F:0;return{[g]:_[g]+U,data:{[g]:$,centerOffset:I-$-U,...L&&{alignmentOffset:U}},reset:L}}}),flip:function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:o,middlewareData:i,rects:u,initialPlacement:a,platform:c,elements:s}=e,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...E}=p(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const A=d(o),S=d(a)===a,k=await(null==c.isRTL?void 0:c.isRTL(s.floating)),C=v||(S||!x?[b(a)]:function(t){const e=b(t);return[g(t),e,g(e)]}(a));v||"none"===w||C.push(...function(t,e,n,r){const o=h(t);let i=function(t,e,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],u=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:r:e?r:o;case"left":case"right":return e?i:u;default:return[]}}(d(t),"start"===n,r);return o&&(i=i.map((t=>t+"-"+o)),e&&(i=i.concat(i.map(g)))),i}(a,x,w,k));const P=[a,...C],R=await O(e,E),T=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&T.push(R[A]),f){const t=function(t,e,n){void 0===n&&(n=!1);const r=h(t),o=y(t),i=m(o);let u="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[i]>e.floating[i]&&(u=b(u)),[u,b(u)]}(o,u,k);T.push(R[t[0]],R[t[1]])}if(M=[...M,{placement:o,overflows:T}],!T.every((t=>t<=0))){var j,N;const t=((null==(j=i.flip)?void 0:j.index)||0)+1,e=P[t];if(e)return{data:{index:t,overflows:M},reset:{placement:e}};let n=null==(N=M.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:N.placement;if(!n)switch(_){case"bestFit":{var D;const t=null==(D=M.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:D[0];t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},offset:function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:o,y:i,placement:u,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:r,elements:o}=t,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),u=d(n),a=h(n),c="y"===_(n),s=["left","top"].includes(u)?-1:1,l=i&&c?-1:1,f=p(e,t);let{mainAxis:v,crossAxis:m,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof y&&(m="end"===a?-1*y:y),c?{x:m*l,y:v*s}:{x:v*s,y:m*l}}(e,t);return u===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:u}}}}},shift:function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:o}=e,{mainAxis:i=!0,crossAxis:u=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=p(t,e),s={x:n,y:r},l=await O(e,c),h=_(d(o)),m=v(h);let y=s[m],g=s[h];if(i){const t="y"===m?"bottom":"right";y=f(y+l["y"===m?"top":"left"],y,y-l[t])}if(u){const t="y"===h?"bottom":"right";g=f(g+l["y"===h?"top":"left"],g,g-l[t])}const b=a.fn({...e,[m]:y,[h]:g});return{...b,data:{x:b.x-n,y:b.y-r}}}}},size:function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:u,elements:a}=e,{apply:c=(()=>{}),...s}=p(t,e),l=await O(e,s),f=d(n),v=h(n),m="y"===_(n),{width:y,height:g}=r.floating;let b,w;"top"===f||"bottom"===f?(b=f,w=v===(await(null==u.isRTL?void 0:u.isRTL(a.floating))?"start":"end")?"left":"right"):(w=f,b="end"===v?"top":"bottom");const x=g-l[b],E=y-l[w],A=!e.middlewareData.shift;let S=x,k=E;if(m){const t=y-l.left-l.right;k=v||A?o(E,t):t}else{const t=g-l.top-l.bottom;S=v||A?o(x,t):t}if(A&&!v){const t=i(l.left,0),e=i(l.right,0),n=i(l.top,0),r=i(l.bottom,0);m?k=y-2*(0!==t||0!==e?t+e:i(l.left,l.right)):S=g-2*(0!==n||0!==r?n+r:i(l.top,l.bottom))}await c({...e,availableWidth:k,availableHeight:S});const C=await u.getDimensions(a.floating);return y!==C.width||g!==C.height?{reset:{rects:!0}}:{}}}}};function at(t,e,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),"function"==typeof DOMRect)return new DOMRect(t,e,n,r);const o={x:t,y:e,width:n,height:r,top:e,right:t+n,bottom:e+r,left:t};return{...o,toJSON:()=>o}}function ct(t){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t)}function st(t){let{placement:e="bottom",fixed:n=!1,gutter:u,flip:c=!0,shift:s=0,slide:l=!0,overlap:f=!1,sameWidth:p=!1,fitViewport:d=!1,arrowPadding:h=4,overflowPadding:v=8,renderCallback:m,..._}=void 0===t?{}:t;const y=function(t){void 0===t&&(t={});const e=function(t){let{animated:e=!1,...n}=void 0===t?{}:t;const o=(0,r.useRef)(null),[i,u]=(0,it.PW)(n.defaultOpen??!1,n.open,n.setOpen),[a,c]=(0,r.useState)(null),[s,l]=(0,r.useState)(!!e&&i),f=(0,it.Sz)(i),p=i||s;e&&!s&&f!==i&&l(!0);const d=(0,r.useCallback)((()=>u(!0)),[u]),h=(0,r.useCallback)((()=>u(!1)),[u]),v=(0,r.useCallback)((()=>u((t=>!t))),[u]),m=(0,r.useCallback)((()=>l(!1)),[]);return(0,r.useMemo)((()=>({disclosureRef:o,open:i,mounted:p,animated:e,animating:s,contentElement:a,setContentElement:c,setOpen:u,show:d,hide:h,toggle:v,stopAnimation:m})),[i,p,e,s,a,c,u,d,h,v,m])}(t);return e}(_),g=(0,it._q)(_.getAnchorRect||(t=>t?.getBoundingClientRect()||null)),b=(0,r.useRef)(null),w=(0,r.useRef)(null),x=(0,r.useRef)(null),[E,O]=(0,r.useState)(e),[A,S]=(0,it.CH)();return(0,it.UQ)((()=>{if(!y.contentElement?.isConnected)return;const t=w.current;if(!t)return;const _=function(t,e){return{contextElement:t.current||void 0,getBoundingClientRect:()=>{const n=t.current,r=e(n);return r||!n?function(t){if(!t)return at();const{x:e,y:n,width:r,height:o}=t;return at(e,n,r,o)}(r):n.getBoundingClientRect()}}}(b,g),E=x.current,A=(E?.clientHeight||0)/2,S="number"==typeof u?u+A:u??A;t.style.setProperty("--popover-overflow-padding",`${v}px`);const C=()=>function(t,e,n,r){void 0===r&&(r={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,p=W(t),d=u||c?[...p?B(p):[],...B(e)]:[];d.forEach((t=>{u&&t.addEventListener("scroll",n,{passive:!0}),c&&t.addEventListener("resize",n)}));const h=p&&l?function(t,e){let n,r=null;const u=k(t);function c(){var t;clearTimeout(n),null==(t=r)||t.disconnect(),r=null}return function s(l,f){void 0===l&&(l=!1),void 0===f&&(f=1),c();const{left:p,top:d,width:h,height:v}=t.getBoundingClientRect();if(l||e(),!h||!v)return;const m={rootMargin:-a(d)+"px "+-a(u.clientWidth-(p+h))+"px "+-a(u.clientHeight-(d+v))+"px "+-a(p)+"px",threshold:i(0,o(1,f))||1};let _=!0;function y(t){const e=t[0].intersectionRatio;if(e!==f){if(!_)return s();e?s(!1,e):n=setTimeout((()=>{s(!1,1e-7)}),100)}_=!1}try{r=new IntersectionObserver(y,{...m,root:u.ownerDocument})}catch(t){r=new IntersectionObserver(y,m)}r.observe(t)}(!0),c}(p,n):null;let v,m=-1,_=null;s&&(_=new ResizeObserver((t=>{let[r]=t;r&&r.target===p&&_&&(_.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame((()=>{var t;null==(t=_)||t.observe(e)}))),n()})),p&&!f&&_.observe(p),_.observe(e));let y=f?X(t):null;return f&&function e(){const r=X(t);!y||r.x===y.x&&r.y===y.y&&r.width===y.width&&r.height===y.height||n(),y=r,v=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{u&&t.removeEventListener("scroll",n),c&&t.removeEventListener("resize",n)})),null==h||h(),null==(t=_)||t.disconnect(),_=null,f&&cancelAnimationFrame(v)}}(_,t,(async()=>{if(!y.mounted)return;const o=[ut.offset((t=>{let{placement:e}=t;return{crossAxis:e.split("-")[1]?void 0:s,mainAxis:S,alignmentAxis:s}}))];if(!1!==c){const t="string"==typeof c?c.split(" "):void 0;if(void 0!==t&&!t.every(ct))throw new Error("`flip` expects a spaced-delimited list of placements");o.push(ut.flip({padding:v,fallbackPlacements:t}))}(l||f)&&o.push(ut.shift({mainAxis:l,crossAxis:f,padding:v})),o.push(ut.size({padding:v,apply(e){let{availableWidth:n,availableHeight:r,rects:o}=e;const i=Math.round(o.reference.width);n=Math.floor(n),r=Math.floor(r),t.style.setProperty("--popover-anchor-width",`${i}px`),t.style.setProperty("--popover-available-width",`${n}px`),t.style.setProperty("--popover-available-height",`${r}px`),p&&(t.style.width=`${i}px`),d&&(t.style.maxWidth=`${n}px`,t.style.maxHeight=`${r}px`)}})),E&&o.push(ut.arrow({element:E,padding:h}));const i=await ot(_,t,{placement:e,strategy:n?"fixed":"absolute",middleware:o});(0,r.flushSync)((()=>{O(i.placement)}));const u=Math.round(i.x),a=Math.round(i.y);if(Object.assign(t.style,{top:"0",left:"0",transform:`translate3d(${u}px, ${a}px, 0)`}),E&&i.middlewareData.arrow){const{x:t,y:e}=i.middlewareData.arrow,n=i.placement.split("-")[0];Object.assign(E.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:"",[n]:"100%"})}}),{elementResize:"function"==typeof ResizeObserver});return m?m({mounted:y.mounted,placement:e,fixed:n,gutter:S,shift:s,overlap:f,flip:c,sameWidth:p,fitViewport:d,arrowPadding:h,overflowPadding:v,popover:t,anchor:_,arrow:E,setPlacement:O,defaultRenderCallback:C}):C()}),[A,y.contentElement,g,u,y.mounted,s,f,c,v,l,p,d,h,e,n,m]),(0,r.useMemo)((()=>({...y,getAnchorRect:g,anchorRef:b,popoverRef:w,arrowRef:x,currentPlacement:E,placement:e,fixed:n,gutter:u,shift:s,flip:c,slide:l,overlap:f,sameWidth:p,fitViewport:d,arrowPadding:h,overflowPadding:v,render:S,renderCallback:m})),[y,g,E,e,n,u,s,c,l,f,p,d,h,v,S,m])}},7268:(t,e,n)=>{"use strict";n.d(e,{Z:()=>m,W:()=>v});var r=n(2585),o=n(1880),i=n(7754),u=n(9787),a=n(8798),c=n(5133),s=n(1266),l=n(848);const f=(0,r.createContext)(null);var p=n(6260),d=n(2122);function h(t){(0,l.bt)((()=>{t?.focus()}))}const v=(0,u.ab)((t=>{let{preserveTabOrder:e,portalElement:n,portalRef:u,portal:l=!0,...v}=t;const m=(0,r.useRef)(null),_=(0,o.NO)(m,v.ref),y=(0,r.useContext)(f),[g,b]=(0,r.useState)(null),w=(0,r.useRef)(null),x=(0,r.useRef)(null),E=(0,r.useRef)(null),O=(0,r.useRef)(null);return(0,o.UQ)((()=>{const t=m.current;if(!t||!l)return void b(null);const e=function(t,e){return e?"function"==typeof e?e(t):e:(0,a.YE)(t).createElement("div")}(t,n);if(!e)return void b(null);const r=e.isConnected;if(!r){const n=y||function(t){return(0,a.YE)(t).body}(t);n.appendChild(e)}var o;return e.id||(e.id=t.id?`${t.id}-portal`:(void 0===o&&(o="id"),`${o?`${o}-`:""}${Math.random().toString(36).substr(2,6)}`)),b(e),(0,i.c)(u,e),r?void 0:()=>{e.remove(),(0,i.c)(u,null)}}),[l,n,y,u]),(0,r.useEffect)((()=>{if(!g)return;if(!e)return;let t=0;const n=e=>{if((0,c.aG)(e)){if("focusin"===e.type)return(0,s.QZ)(g);cancelAnimationFrame(t),t=requestAnimationFrame((()=>{(0,s.gw)(g,!0)}))}};return g.addEventListener("focusin",n,!0),g.addEventListener("focusout",n,!0),()=>{g.removeEventListener("focusin",n,!0),g.removeEventListener("focusout",n,!0)}}),[g,e]),v=(0,o.w7)(v,(t=>(t=(0,p.Y)(f.Provider,{value:g||y,children:t}),l?g?(t=(0,p.FD)(p.FK,{children:[e&&g&&(0,p.Y)(d.s,{ref:x,onFocus:t=>{if((0,c.aG)(t,g)){const t=(0,s.vF)();t!==E.current&&h(t)}else h(w.current)}}),t,e&&g&&(0,p.Y)(d.s,{ref:E,onFocus:t=>{if((0,c.aG)(t,g)){const t=(0,s.XJ)();t!==x.current&&h(t)}else h(O.current)}})]}),g&&(t=(0,r.createPortal)(t,g)),t=(0,p.FD)(p.FK,{children:[e&&g&&(0,p.Y)(d.s,{ref:w,onFocus:t=>{(0,c.aG)(t,g)?h(x.current):h((0,s.XJ)())}}),e&&(0,p.Y)("span",{"aria-owns":g?.id,style:{position:"fixed"}}),t,e&&g&&(0,p.Y)(d.s,{ref:O,onFocus:t=>{(0,c.aG)(t,g)?h(E.current):h((0,s.vF)())}})]})):(0,p.Y)("span",{ref:_,id:v.id,style:{position:"fixed"}}):t)),[g,y,l,v.id,e]),v={...v,ref:_},v})),m=(0,u.a0)((t=>{const e=v(t);return(0,u.n)("div",e)}))},9031:(t,e,n)=>{"use strict";n.d(e,{f:()=>a});var r=n(1880),o=n(9787),i=n(3591);const u=(0,o.ab)((t=>{let{state:e,described:n,...o}=t;const u=o.onFocus,a=(0,r._q)((t=>{u?.(t),t.defaultPrevented||(e.anchorRef.current!==t.currentTarget&&(e.anchorRef.current=t.currentTarget,e.render()),e.show())})),c=o.onBlur,s=(0,r._q)((t=>{c?.(t),t.defaultPrevented||e.hide()})),l=o.onMouseEnter,f=(0,r._q)((t=>{l?.(t),t.defaultPrevented||(e.anchorRef.current!==t.currentTarget&&(e.anchorRef.current=t.currentTarget,e.render()),e.show())})),p=o.onMouseLeave,d=(0,r._q)((t=>{p?.(t),t.defaultPrevented||e.hide()}));return o={tabIndex:0,"aria-labelledby":n?void 0:e.contentElement?.id,"aria-describedby":n?e.contentElement?.id:void 0,...o,onFocus:a,onBlur:s,onMouseEnter:f,onMouseLeave:d},o=(0,i.E)({state:e,...o}),o})),a=(0,o.a0)((t=>{const e=u(t);return(0,o.n)("div",e)}))},9597:(t,e,n)=>{"use strict";n.d(e,{P:()=>c});var r=n(2585),o=n(9787),i=n(6285),u=n(7618);const a=(0,o.ab)((t=>{let{state:e,size:n=16,...o}=t;const a=(0,r.useContext)(u.T);return e=e||a,o=(0,i.k)({state:e,size:n,...o}),o})),c=(0,o.a0)((t=>{const e=a(t);return(0,o.n)("div",e)}))},2317:(t,e,n)=>{"use strict";n.d(e,{i:()=>a});var r=n(2585),o=n(1880),i=n(2192);const u=(0,n(7618).c)();function a(t){let{placement:e="top",timeout:n=0,gutter:a=8,...c}=void 0===t?{}:t;const s=(0,r.useRef)(),l=(0,r.useRef)(),f=(0,r.useRef)(),p=(0,r.useCallback)((()=>{window.clearTimeout(l.current),window.clearTimeout(f.current)}),[]),[d,h]=(0,r.useState)(c.defaultOpen??!1),v=t=>{c.setOpen?.(t),void 0===c.open&&h(t)},[m,_]=(0,o.PW)(c.defaultOpen??!1,c.open??d,(t=>{if(p(),t){if(n&&!u.activeRef)return u.show(null),void(l.current=window.setTimeout((()=>{u.show(s),v(t)}),n));u.show(s)}else f.current=window.setTimeout((()=>{u.hide(s)}),n);v(t)})),y=(0,i.W)({placement:e,gutter:a,...c,open:m,setOpen:_});return(0,r.useEffect)((()=>u.subscribe((t=>{t!==s&&(p(),y.open&&y.hide())}))),[p,y.open,y.hide]),(0,r.useEffect)((()=>()=>{p(),u.hide(s)}),[p]),(0,r.useMemo)((()=>({...y,timeout:n})),[y,n])}},8185:(t,e,n)=>{"use strict";n.d(e,{m:()=>p});var r=n(2585),o=n(1880),i=n(9787),u=n(5133),a=n(3369),c=n(7618),s=n(6260),l=n(7268);const f=(0,i.ab)((t=>{let{state:e,portal:n=!0,hideOnEscape:i=!0,hideOnControl:f=!1,wrapperProps:p,...d}=t;const h=e.popoverRef;(0,o.UQ)((()=>{const t=h.current,n=e.contentElement;t&&n&&(t.style.zIndex=getComputedStyle(n).zIndex)}),[h,e.contentElement]);const v=(0,o.O4)(i),m=(0,o.O4)(f);return(0,r.useEffect)((()=>{if(e.open)return(0,u.dg)("keydown",(t=>{if(t.defaultPrevented)return;const n="Escape"===t.key&&v(t),r="Control"===t.key&&m(t);(n||r)&&e.hide()}))}),[e.open,v,m,e.hide]),d=(0,o.w7)(d,(t=>(0,s.Y)("div",{role:"presentation",...p,style:{position:e.fixed?"fixed":"absolute",top:0,left:0,...p?.style},ref:h,children:t})),[e.fixed,h,p]),d=(0,o.w7)(d,(t=>(0,s.Y)(c.T.Provider,{value:e,children:t})),[e]),d={role:"tooltip",...d},d=(0,a.a)({state:e,...d}),d=(0,l.W)({portal:n,...d,preserveTabOrder:!1}),d})),p=(0,i.a0)((t=>{const e=f(t);return(0,i.n)("div",e)}))},8873:(t,e,n)=>{"use strict";n.d(e,{zR:()=>b,TM:()=>S,yJ:()=>d,sC:()=>C,AO:()=>p});var r=n(7940);function o(t){return"/"===t.charAt(0)}function i(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}const u=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],u=e&&e.split("/")||[],a=t&&o(t),c=e&&o(e),s=a||c;if(t&&o(t)?u=r:r.length&&(u.pop(),u=u.concat(r)),!u.length)return"/";if(u.length){var l=u[u.length-1];n="."===l||".."===l||""===l}else n=!1;for(var f=0,p=u.length;p>=0;p--){var d=u[p];"."===d?i(u,p):".."===d?(i(u,p),f++):f&&(i(u,p),f--)}if(!s)for(;f--;f)u.unshift("..");!s||""===u[0]||u[0]&&o(u[0])||u.unshift("");var h=u.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var a=n(9685);function c(t){return"/"===t.charAt(0)?t:"/"+t}function s(t){return"/"===t.charAt(0)?t.substr(1):t}function l(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function f(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function p(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function d(t,e,n,o){var i;"string"==typeof t?(i=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t),i.state=e):(void 0===(i=(0,r.A)({},t)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e));try{i.pathname=decodeURI(i.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=u(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function h(){var t=null,e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var v=!("undefined"==typeof window||!window.document||!window.document.createElement);function m(t,e){e(window.confirm(t))}var _="popstate",y="hashchange";function g(){try{return window.history.state||{}}catch(t){return{}}}function b(t){void 0===t&&(t={}),v||(0,a.A)(!1);var e,n=window.history,o=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),u=t,s=u.forceRefresh,b=void 0!==s&&s,w=u.getUserConfirmation,x=void 0===w?m:w,E=u.keyLength,O=void 0===E?6:E,A=t.basename?f(c(t.basename)):"";function S(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname+o.search+o.hash;return A&&(i=l(i,A)),d(i,r,n)}function k(){return Math.random().toString(36).substr(2,O)}var C=h();function P(t){(0,r.A)(q,t),q.length=n.length,C.notifyListeners(q.location,q.action)}function R(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||j(S(t.state))}function T(){j(S(g()))}var M=!1;function j(t){M?(M=!1,P()):C.confirmTransitionTo(t,"POP",x,(function(e){e?P({action:"POP",location:t}):function(t){var e=q.location,n=D.indexOf(e.key);-1===n&&(n=0);var r=D.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(M=!0,I(o))}(t)}))}var N=S(g()),D=[N.key];function F(t){return A+p(t)}function I(t){n.go(t)}var $=0;function L(t){1===($+=t)&&1===t?(window.addEventListener(_,R),i&&window.addEventListener(y,T)):0===$&&(window.removeEventListener(_,R),i&&window.removeEventListener(y,T))}var U=!1,q={length:n.length,action:"POP",location:N,createHref:F,push:function(t,e){var r="PUSH",i=d(t,e,k(),q.location);C.confirmTransitionTo(i,r,x,(function(t){if(t){var e=F(i),u=i.key,a=i.state;if(o)if(n.pushState({key:u,state:a},null,e),b)window.location.href=e;else{var c=D.indexOf(q.location.key),s=D.slice(0,c+1);s.push(i.key),D=s,P({action:r,location:i})}else window.location.href=e}}))},replace:function(t,e){var r="REPLACE",i=d(t,e,k(),q.location);C.confirmTransitionTo(i,r,x,(function(t){if(t){var e=F(i),u=i.key,a=i.state;if(o)if(n.replaceState({key:u,state:a},null,e),b)window.location.replace(e);else{var c=D.indexOf(q.location.key);-1!==c&&(D[c]=i.key),P({action:r,location:i})}else window.location.replace(e)}}))},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(t){void 0===t&&(t=!1);var e=C.setPrompt(t);return U||(L(1),U=!0),function(){return U&&(U=!1,L(-1)),e()}},listen:function(t){var e=C.appendListener(t);return L(1),function(){L(-1),e()}}};return q}var w="hashchange",x={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+s(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:s,decodePath:c},slash:{encodePath:c,decodePath:c}};function E(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function O(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function A(t){window.location.replace(E(window.location.href)+"#"+t)}function S(t){void 0===t&&(t={}),v||(0,a.A)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),o=n.getUserConfirmation,i=void 0===o?m:o,u=n.hashType,s=void 0===u?"slash":u,_=t.basename?f(c(t.basename)):"",y=x[s],g=y.encodePath,b=y.decodePath;function S(){var t=b(O());return _&&(t=l(t,_)),d(t)}var k=h();function C(t){(0,r.A)(U,t),U.length=e.length,k.notifyListeners(U.location,U.action)}var P=!1,R=null;function T(){var t,e,n=O(),r=g(n);if(n!==r)A(r);else{var o=S(),u=U.location;if(!P&&(e=o,(t=u).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(R===p(o))return;R=null,function(t){if(P)P=!1,C();else{k.confirmTransitionTo(t,"POP",i,(function(e){e?C({action:"POP",location:t}):function(t){var e=U.location,n=D.lastIndexOf(p(e));-1===n&&(n=0);var r=D.lastIndexOf(p(t));-1===r&&(r=0);var o=n-r;o&&(P=!0,F(o))}(t)}))}}(o)}}var M=O(),j=g(M);M!==j&&A(j);var N=S(),D=[p(N)];function F(t){e.go(t)}var I=0;function $(t){1===(I+=t)&&1===t?window.addEventListener(w,T):0===I&&window.removeEventListener(w,T)}var L=!1,U={length:e.length,action:"POP",location:N,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=E(window.location.href)),n+"#"+g(_+p(t))},push:function(t,e){var n="PUSH",r=d(t,void 0,void 0,U.location);k.confirmTransitionTo(r,n,i,(function(t){if(t){var e=p(r),o=g(_+e);if(O()!==o){R=e,function(t){window.location.hash=t}(o);var i=D.lastIndexOf(p(U.location)),u=D.slice(0,i+1);u.push(e),D=u,C({action:n,location:r})}else C()}}))},replace:function(t,e){var n="REPLACE",r=d(t,void 0,void 0,U.location);k.confirmTransitionTo(r,n,i,(function(t){if(t){var e=p(r),o=g(_+e);O()!==o&&(R=e,A(o));var i=D.indexOf(p(U.location));-1!==i&&(D[i]=e),C({action:n,location:r})}}))},go:F,goBack:function(){F(-1)},goForward:function(){F(1)},block:function(t){void 0===t&&(t=!1);var e=k.setPrompt(t);return L||($(1),L=!0),function(){return L&&(L=!1,$(-1)),e()}},listen:function(t){var e=k.appendListener(t);return $(1),function(){$(-1),e()}}};return U}function k(t,e,n){return Math.min(Math.max(t,e),n)}function C(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,o=e.initialEntries,i=void 0===o?["/"]:o,u=e.initialIndex,a=void 0===u?0:u,c=e.keyLength,s=void 0===c?6:c,l=h();function f(t){(0,r.A)(b,t),b.length=b.entries.length,l.notifyListeners(b.location,b.action)}function v(){return Math.random().toString(36).substr(2,s)}var m=k(a,0,i.length-1),_=i.map((function(t){return d(t,void 0,"string"==typeof t?v():t.key||v())})),y=p;function g(t){var e=k(b.index+t,0,b.entries.length-1),r=b.entries[e];l.confirmTransitionTo(r,"POP",n,(function(t){t?f({action:"POP",location:r,index:e}):f()}))}var b={length:_.length,action:"POP",location:_[m],index:m,entries:_,createHref:y,push:function(t,e){var r="PUSH",o=d(t,e,v(),b.location);l.confirmTransitionTo(o,r,n,(function(t){if(t){var e=b.index+1,n=b.entries.slice(0);n.length>e?n.splice(e,n.length-e,o):n.push(o),f({action:r,location:o,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",o=d(t,e,v(),b.location);l.confirmTransitionTo(o,r,n,(function(t){t&&(b.entries[b.index]=o,f({action:r,location:o}))}))},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(t){var e=b.index+t;return e>=0&&e<b.entries.length},block:function(t){return void 0===t&&(t=!1),l.setPrompt(t)},listen:function(t){return l.appendListener(t)}};return b}},2396:(t,e,n)=>{"use strict";var r=n(4686),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(t){return r.isMemo(t)?u:a[t.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=u;var s=Object.defineProperty,l=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&t(e,o,r)}var u=l(n);f&&(u=u.concat(f(n)));for(var a=c(e),v=c(n),m=0;m<u.length;++m){var _=u[m];if(!(i[_]||r&&r[_]||v&&v[_]||a&&a[_])){var y=p(n,_);try{s(e,_,y)}catch(t){}}}}return e}},946:(t,e)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,s=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,f=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,v=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,_=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,b=n?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case r:switch(t=t.type){case l:case f:case i:case a:case u:case d:return t;default:switch(t=t&&t.$$typeof){case s:case p:case m:case v:case c:return t;default:return e}}case o:return e}}}function x(t){return w(t)===f}e.AsyncMode=l,e.ConcurrentMode=f,e.ContextConsumer=s,e.ContextProvider=c,e.Element=r,e.ForwardRef=p,e.Fragment=i,e.Lazy=m,e.Memo=v,e.Portal=o,e.Profiler=a,e.StrictMode=u,e.Suspense=d,e.isAsyncMode=function(t){return x(t)||w(t)===l},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===s},e.isContextProvider=function(t){return w(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===r},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===i},e.isLazy=function(t){return w(t)===m},e.isMemo=function(t){return w(t)===v},e.isPortal=function(t){return w(t)===o},e.isProfiler=function(t){return w(t)===a},e.isStrictMode=function(t){return w(t)===u},e.isSuspense=function(t){return w(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===a||t===u||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===m||t.$$typeof===v||t.$$typeof===c||t.$$typeof===s||t.$$typeof===p||t.$$typeof===y||t.$$typeof===g||t.$$typeof===b||t.$$typeof===_)},e.typeOf=w},4686:(t,e,n)=>{"use strict";t.exports=n(946)},5178:(t,e,n)=>{var r=n(3188)(n(9564),"DataView");t.exports=r},3615:(t,e,n)=>{var r=n(8342),o=n(9184),i=n(7747),u=n(4287),a=n(7);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},789:(t,e,n)=>{var r=n(7752),o=n(718),i=n(7849),u=n(3957),a=n(845);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},8561:(t,e,n)=>{var r=n(3188)(n(9564),"Map");t.exports=r},1451:(t,e,n)=>{var r=n(5674),o=n(1036),i=n(31),u=n(1907),a=n(971);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=u,c.prototype.set=a,t.exports=c},1490:(t,e,n)=>{var r=n(3188)(n(9564),"Promise");t.exports=r},6775:(t,e,n)=>{var r=n(3188)(n(9564),"Set");t.exports=r},8869:(t,e,n)=>{var r=n(1451),o=n(6810),i=n(5813);function u(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}u.prototype.add=u.prototype.push=o,u.prototype.has=i,t.exports=u},2823:(t,e,n)=>{var r=n(789),o=n(8926),i=n(2680),u=n(3851),a=n(8423),c=n(3967);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=u,s.prototype.has=a,s.prototype.set=c,t.exports=s},7187:(t,e,n)=>{var r=n(9564).Symbol;t.exports=r},6846:(t,e,n)=>{var r=n(9564).Uint8Array;t.exports=r},8985:(t,e,n)=>{var r=n(3188)(n(9564),"WeakMap");t.exports=r},4235:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},836:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}},5739:(t,e,n)=>{var r=n(8481);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},4003:t=>{t.exports=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}},661:(t,e,n)=>{var r=n(142),o=n(5962),i=n(4383),u=n(8098),a=n(4683),c=n(3905),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),f=!n&&!l&&u(t),p=!n&&!l&&!f&&c(t),d=n||l||f||p,h=d?r(t.length,String):[],v=h.length;for(var m in t)!e&&!s.call(t,m)||d&&("length"==m||f&&("offset"==m||"parent"==m)||p&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,v))||h.push(m);return h}},6138:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},5862:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},7938:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},6663:(t,e,n)=>{var r=n(9142),o=n(9830);t.exports=function(t,e,n){(void 0!==n&&!o(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},2177:(t,e,n)=>{var r=n(9142),o=n(9830),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var u=t[e];i.call(t,e)&&o(u,n)&&(void 0!==n||e in t)||r(t,e,n)}},435:(t,e,n)=>{var r=n(9830);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},9142:(t,e,n)=>{var r=n(3733);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},1534:(t,e,n)=>{var r=n(6015),o=Object.create,i=function(){function t(){}return function(e){if(!r(e))return{};if(o)return o(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=i},4183:(t,e,n)=>{var r=n(6895),o=n(9835)(r);t.exports=o},3705:t=>{t.exports=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}},3234:(t,e,n)=>{var r=n(5862),o=n(2285);t.exports=function t(e,n,i,u,a){var c=-1,s=e.length;for(i||(i=o),a||(a=[]);++c<s;){var l=e[c];n>0&&i(l)?n>1?t(l,n-1,i,u,a):r(a,l):u||(a[a.length]=l)}return a}},1311:(t,e,n)=>{var r=n(128)();t.exports=r},6895:(t,e,n)=>{var r=n(1311),o=n(8420);t.exports=function(t,e){return t&&r(t,e,o)}},2748:(t,e,n)=>{var r=n(4679),o=n(4671);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},9169:(t,e,n)=>{var r=n(5862),o=n(4383);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},6990:(t,e,n)=>{var r=n(7187),o=n(1029),i=n(8704),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},1607:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},8481:(t,e,n)=>{var r=n(3705),o=n(5789),i=n(9705);t.exports=function(t,e,n){return e==e?i(t,e,n):r(t,o,n)}},4263:(t,e,n)=>{var r=n(8869),o=n(5739),i=n(4003),u=n(6138),a=n(6143),c=n(7773),s=Math.min;t.exports=function(t,e,n){for(var l=n?i:o,f=t[0].length,p=t.length,d=p,h=Array(p),v=1/0,m=[];d--;){var _=t[d];d&&e&&(_=u(_,a(e))),v=s(_.length,v),h[d]=!n&&(e||f>=120&&_.length>=120)?new r(d&&_):void 0}_=t[0];var y=-1,g=h[0];t:for(;++y<f&&m.length<v;){var b=_[y],w=e?e(b):b;if(b=n||0!==b?b:0,!(g?c(g,w):l(m,w,n))){for(d=p;--d;){var x=h[d];if(!(x?c(x,w):l(t[d],w,n)))continue t}g&&g.push(w),m.push(b)}}return m}},6252:(t,e,n)=>{var r=n(6990),o=n(6184);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},5954:(t,e,n)=>{var r=n(6990),o=n(6184);t.exports=function(t){return o(t)&&"[object Date]"==r(t)}},3028:(t,e,n)=>{var r=n(7114),o=n(6184);t.exports=function t(e,n,i,u,a){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,u,t,a))}},7114:(t,e,n)=>{var r=n(2823),o=n(5237),i=n(3728),u=n(5355),a=n(8355),c=n(4383),s=n(8098),l=n(3905),f="[object Arguments]",p="[object Array]",d="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,v,m,_){var y=c(t),g=c(e),b=y?p:a(t),w=g?p:a(e),x=(b=b==f?d:b)==d,E=(w=w==f?d:w)==d,O=b==w;if(O&&s(t)){if(!s(e))return!1;y=!0,x=!1}if(O&&!x)return _||(_=new r),y||l(t)?o(t,e,n,v,m,_):i(t,e,b,n,v,m,_);if(!(1&n)){var A=x&&h.call(t,"__wrapped__"),S=E&&h.call(e,"__wrapped__");if(A||S){var k=A?t.value():t,C=S?e.value():e;return _||(_=new r),m(k,C,n,v,_)}}return!!O&&(_||(_=new r),u(t,e,n,v,m,_))}},9121:(t,e,n)=>{var r=n(2823),o=n(3028);t.exports=function(t,e,n,i){var u=n.length,a=u,c=!i;if(null==t)return!a;for(t=Object(t);u--;){var s=n[u];if(c&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++u<a;){var l=(s=n[u])[0],f=t[l],p=s[1];if(c&&s[2]){if(void 0===f&&!(l in t))return!1}else{var d=new r;if(i)var h=i(f,p,l,t,e,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},5789:t=>{t.exports=function(t){return t!=t}},3829:(t,e,n)=>{var r=n(4360),o=n(7234),i=n(6015),u=n(275),a=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,l=c.toString,f=s.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?p:a).test(u(t))}},4271:(t,e,n)=>{var r=n(6990),o=n(1784),i=n(6184),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!u[r(t)]}},4207:(t,e,n)=>{var r=n(2801),o=n(2208),i=n(9090),u=n(4383),a=n(3681);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?u(t)?o(t[0],t[1]):r(t):a(t)}},9966:(t,e,n)=>{var r=n(8089),o=n(6128),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},7641:(t,e,n)=>{var r=n(6015),o=n(8089),i=n(5567),u=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=o(t),n=[];for(var a in t)("constructor"!=a||!e&&u.call(t,a))&&n.push(a);return n}},5218:(t,e,n)=>{var r=n(4183),o=n(9592);t.exports=function(t,e){var n=-1,i=o(t)?Array(t.length):[];return r(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}},2801:(t,e,n)=>{var r=n(9121),o=n(9406),i=n(6459);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},2208:(t,e,n)=>{var r=n(3028),o=n(9650),i=n(2993),u=n(9668),a=n(8938),c=n(6459),s=n(4671);t.exports=function(t,e){return u(t)&&a(e)?c(s(t),e):function(n){var u=o(n,t);return void 0===u&&u===e?i(n,t):r(e,u,3)}}},436:(t,e,n)=>{var r=n(2823),o=n(6663),i=n(1311),u=n(6554),a=n(6015),c=n(3435),s=n(4892);t.exports=function t(e,n,l,f,p){e!==n&&i(n,(function(i,c){if(p||(p=new r),a(i))u(e,n,c,l,t,f,p);else{var d=f?f(s(e,c),i,c+"",e,n,p):void 0;void 0===d&&(d=i),o(e,c,d)}}),c)}},6554:(t,e,n)=>{var r=n(6663),o=n(6064),i=n(1671),u=n(8601),a=n(235),c=n(5962),s=n(4383),l=n(5919),f=n(8098),p=n(4360),d=n(6015),h=n(5229),v=n(3905),m=n(4892),_=n(7774);t.exports=function(t,e,n,y,g,b,w){var x=m(t,n),E=m(e,n),O=w.get(E);if(O)r(t,n,O);else{var A=b?b(x,E,n+"",t,e,w):void 0,S=void 0===A;if(S){var k=s(E),C=!k&&f(E),P=!k&&!C&&v(E);A=E,k||C||P?s(x)?A=x:l(x)?A=u(x):C?(S=!1,A=o(E,!0)):P?(S=!1,A=i(E,!0)):A=[]:h(E)||c(E)?(A=x,c(x)?A=_(x):d(x)&&!p(x)||(A=a(E))):S=!1}S&&(w.set(E,A),g(A,E,y,b,w),w.delete(E)),r(t,n,A)}}},2717:(t,e,n)=>{var r=n(6138),o=n(2748),i=n(4207),u=n(5218),a=n(3111),c=n(6143),s=n(6323),l=n(9090),f=n(4383);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return f(t)?function(e){return o(e,1===t.length?t[0]:t)}:t})):[l];var p=-1;e=r(e,c(i));var d=u(t,(function(t,n,o){return{criteria:r(e,(function(e){return e(t)})),index:++p,value:t}}));return a(d,(function(t,e){return s(t,e,n)}))}},9055:(t,e,n)=>{var r=n(4366),o=n(2993);t.exports=function(t,e){return r(t,e,(function(e,n){return o(t,n)}))}},4366:(t,e,n)=>{var r=n(2748),o=n(5928),i=n(4679);t.exports=function(t,e,n){for(var u=-1,a=e.length,c={};++u<a;){var s=e[u],l=r(t,s);n(l,s)&&o(c,i(s,t),l)}return c}},5351:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},4953:(t,e,n)=>{var r=n(2748);t.exports=function(t){return function(e){return r(e,t)}}},5580:(t,e,n)=>{var r=n(9090),o=n(3903),i=n(2139);t.exports=function(t,e){return i(o(t,e,r),t+"")}},5928:(t,e,n)=>{var r=n(2177),o=n(4679),i=n(4683),u=n(6015),a=n(4671);t.exports=function(t,e,n,c){if(!u(t))return t;for(var s=-1,l=(e=o(e,t)).length,f=l-1,p=t;null!=p&&++s<l;){var d=a(e[s]),h=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(s!=f){var v=p[d];void 0===(h=c?c(v,d,p):void 0)&&(h=u(v)?v:i(e[s+1])?[]:{})}r(p,d,h),p=p[d]}return t}},7316:(t,e,n)=>{var r=n(3368),o=n(3733),i=n(9090),u=o?function(t,e){return o(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:i;t.exports=u},1482:t=>{t.exports=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i}},3111:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},1559:t=>{t.exports=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);void 0!==i&&(n=void 0===n?i:n+i)}return n}},142:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},4742:(t,e,n)=>{var r=n(7187),o=n(6138),i=n(4383),u=n(3536),a=r?r.prototype:void 0,c=a?a.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(u(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7066:(t,e,n)=>{var r=n(1158),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},6143:t=>{t.exports=function(t){return function(e){return t(e)}}},3247:(t,e,n)=>{var r=n(8869),o=n(5739),i=n(4003),u=n(7773),a=n(5891),c=n(8629);t.exports=function(t,e,n){var s=-1,l=o,f=t.length,p=!0,d=[],h=d;if(n)p=!1,l=i;else if(f>=200){var v=e?null:a(t);if(v)return c(v);p=!1,l=u,h=new r}else h=e?[]:d;t:for(;++s<f;){var m=t[s],_=e?e(m):m;if(m=n||0!==m?m:0,p&&_==_){for(var y=h.length;y--;)if(h[y]===_)continue t;e&&h.push(_),d.push(m)}else l(h,_,n)||(h!==d&&h.push(_),d.push(m))}return d}},7773:t=>{t.exports=function(t,e){return t.has(e)}},2283:(t,e,n)=>{var r=n(5919);t.exports=function(t){return r(t)?t:[]}},4679:(t,e,n)=>{var r=n(4383),o=n(9668),i=n(412),u=n(2832);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(u(t))}},3911:(t,e,n)=>{var r=n(6846);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},6064:(t,e,n)=>{t=n.nmd(t);var r=n(9564),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?r.Buffer:void 0,a=u?u.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}},1671:(t,e,n)=>{var r=n(3911);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},1192:(t,e,n)=>{var r=n(3536);t.exports=function(t,e){if(t!==e){var n=void 0!==t,o=null===t,i=t==t,u=r(t),a=void 0!==e,c=null===e,s=e==e,l=r(e);if(!c&&!l&&!u&&t>e||u&&a&&s&&!c&&!l||o&&a&&s||!n&&s||!i)return 1;if(!o&&!u&&!l&&t<e||l&&n&&i&&!o&&!u||c&&n&&i||!a&&i||!s)return-1}return 0}},6323:(t,e,n)=>{var r=n(1192);t.exports=function(t,e,n){for(var o=-1,i=t.criteria,u=e.criteria,a=i.length,c=n.length;++o<a;){var s=r(i[o],u[o]);if(s)return o>=c?s:s*("desc"==n[o]?-1:1)}return t.index-e.index}},8601:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},6837:(t,e,n)=>{var r=n(2177),o=n(9142);t.exports=function(t,e,n,i){var u=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var s=e[a],l=i?i(n[s],t[s],s,n,t):void 0;void 0===l&&(l=t[s]),u?o(n,s,l):r(n,s,l)}return n}},5171:(t,e,n)=>{var r=n(9564)["__core-js_shared__"];t.exports=r},7921:(t,e,n)=>{var r=n(5580),o=n(6218);t.exports=function(t){return r((function(e,n){var r=-1,i=n.length,u=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(u=t.length>3&&"function"==typeof u?(i--,u):void 0,a&&o(n[0],n[1],a)&&(u=i<3?void 0:u,i=1),e=Object(e);++r<i;){var c=n[r];c&&t(e,c,r,u)}return e}))}},9835:(t,e,n)=>{var r=n(9592);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,u=e?i:-1,a=Object(n);(e?u--:++u<i)&&!1!==o(a[u],u,a););return n}}},128:t=>{t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}}},6283:(t,e,n)=>{var r=n(9564),o=n(9147),i=n(3572),u=n(2832),a=r.isFinite,c=Math.min;t.exports=function(t){var e=Math[t];return function(t,n){if(t=i(t),(n=null==n?0:c(o(n),292))&&a(t)){var r=(u(t)+"e").split("e"),s=e(r[0]+"e"+(+r[1]+n));return+((r=(u(s)+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}},5891:(t,e,n)=>{var r=n(6775),o=n(7600),i=n(8629),u=r&&1/i(new r([,-0]))[1]==1/0?function(t){return new r(t)}:o;t.exports=u},3733:(t,e,n)=>{var r=n(3188),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5237:(t,e,n)=>{var r=n(8869),o=n(7938),i=n(7773);t.exports=function(t,e,n,u,a,c){var s=1&n,l=t.length,f=e.length;if(l!=f&&!(s&&f>l))return!1;var p=c.get(t),d=c.get(e);if(p&&d)return p==e&&d==t;var h=-1,v=!0,m=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++h<l;){var _=t[h],y=e[h];if(u)var g=s?u(y,_,h,e,t,c):u(_,y,h,t,e,c);if(void 0!==g){if(g)continue;v=!1;break}if(m){if(!o(e,(function(t,e){if(!i(m,e)&&(_===t||a(_,t,n,u,c)))return m.push(e)}))){v=!1;break}}else if(_!==y&&!a(_,y,n,u,c)){v=!1;break}}return c.delete(t),c.delete(e),v}},3728:(t,e,n)=>{var r=n(7187),o=n(6846),i=n(9830),u=n(5237),a=n(8887),c=n(8629),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,f,p){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=a;case"[object Set]":var h=1&r;if(d||(d=c),t.size!=e.size&&!h)return!1;var v=p.get(t);if(v)return v==e;r|=2,p.set(t,e);var m=u(d(t),d(e),r,s,f,p);return p.delete(t),m;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},5355:(t,e,n)=>{var r=n(3300),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,u,a){var c=1&n,s=r(t),l=s.length;if(l!=r(e).length&&!c)return!1;for(var f=l;f--;){var p=s[f];if(!(c?p in e:o.call(e,p)))return!1}var d=a.get(t),h=a.get(e);if(d&&h)return d==e&&h==t;var v=!0;a.set(t,e),a.set(e,t);for(var m=c;++f<l;){var _=t[p=s[f]],y=e[p];if(i)var g=c?i(y,_,p,e,t,a):i(_,y,p,t,e,a);if(!(void 0===g?_===y||u(_,y,n,i,a):g)){v=!1;break}m||(m="constructor"==p)}if(v&&!m){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(v=!1)}return a.delete(t),a.delete(e),v}},1506:(t,e,n)=>{var r=n(1308),o=n(3903),i=n(2139);t.exports=function(t){return i(o(t,void 0,r),t+"")}},5194:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},3300:(t,e,n)=>{var r=n(9169),o=n(9946),i=n(8420);t.exports=function(t){return r(t,i,o)}},8037:(t,e,n)=>{var r=n(5912);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},9406:(t,e,n)=>{var r=n(8938),o=n(8420);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],u=t[i];e[n]=[i,u,r(u)]}return e}},3188:(t,e,n)=>{var r=n(3829),o=n(1870);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},9637:(t,e,n)=>{var r=n(1429)(Object.getPrototypeOf,Object);t.exports=r},1029:(t,e,n)=>{var r=n(7187),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[a]=n:delete t[a]),o}},9946:(t,e,n)=>{var r=n(836),o=n(6499),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(e){return i.call(t,e)})))}:o;t.exports=a},8355:(t,e,n)=>{var r=n(5178),o=n(8561),i=n(1490),u=n(6775),a=n(8985),c=n(6990),s=n(275),l="[object Map]",f="[object Promise]",p="[object Set]",d="[object WeakMap]",h="[object DataView]",v=s(r),m=s(o),_=s(i),y=s(u),g=s(a),b=c;(r&&b(new r(new ArrayBuffer(1)))!=h||o&&b(new o)!=l||i&&b(i.resolve())!=f||u&&b(new u)!=p||a&&b(new a)!=d)&&(b=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case v:return h;case m:return l;case _:return f;case y:return p;case g:return d}return e}),t.exports=b},1870:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},3852:(t,e,n)=>{var r=n(4679),o=n(5962),i=n(4383),u=n(4683),a=n(1784),c=n(4671);t.exports=function(t,e,n){for(var s=-1,l=(e=r(e,t)).length,f=!1;++s<l;){var p=c(e[s]);if(!(f=null!=t&&n(t,p)))break;t=t[p]}return f||++s!=l?f:!!(l=null==t?0:t.length)&&a(l)&&u(p,l)&&(i(t)||o(t))}},8342:(t,e,n)=>{var r=n(1960);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},9184:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7747:(t,e,n)=>{var r=n(1960),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},4287:(t,e,n)=>{var r=n(1960),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},7:(t,e,n)=>{var r=n(1960);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},235:(t,e,n)=>{var r=n(1534),o=n(9637),i=n(8089);t.exports=function(t){return"function"!=typeof t.constructor||i(t)?{}:r(o(t))}},2285:(t,e,n)=>{var r=n(7187),o=n(5962),i=n(4383),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return i(t)||o(t)||!!(u&&t&&t[u])}},4683:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6218:(t,e,n)=>{var r=n(9830),o=n(9592),i=n(4683),u=n(6015);t.exports=function(t,e,n){if(!u(n))return!1;var a=typeof e;return!!("number"==a?o(n)&&i(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},9668:(t,e,n)=>{var r=n(4383),o=n(3536),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||u.test(t)||!i.test(t)||null!=e&&t in Object(e)}},5912:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},7234:(t,e,n)=>{var r,o=n(5171),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},8089:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},8938:(t,e,n)=>{var r=n(6015);t.exports=function(t){return t==t&&!r(t)}},7752:t=>{t.exports=function(){this.__data__=[],this.size=0}},718:(t,e,n)=>{var r=n(435),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},7849:(t,e,n)=>{var r=n(435);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},3957:(t,e,n)=>{var r=n(435);t.exports=function(t){return r(this.__data__,t)>-1}},845:(t,e,n)=>{var r=n(435);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},5674:(t,e,n)=>{var r=n(3615),o=n(789),i=n(8561);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},1036:(t,e,n)=>{var r=n(8037);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},31:(t,e,n)=>{var r=n(8037);t.exports=function(t){return r(this,t).get(t)}},1907:(t,e,n)=>{var r=n(8037);t.exports=function(t){return r(this,t).has(t)}},971:(t,e,n)=>{var r=n(8037);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},8887:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},6459:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},2110:(t,e,n)=>{var r=n(9098);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},1960:(t,e,n)=>{var r=n(3188)(Object,"create");t.exports=r},6128:(t,e,n)=>{var r=n(1429)(Object.keys,Object);t.exports=r},5567:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},3271:(t,e,n)=>{t=n.nmd(t);var r=n(5194),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o&&r.process,a=function(){try{return i&&i.require&&i.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a},8704:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},1429:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},3903:(t,e,n)=>{var r=n(4235),o=Math.max;t.exports=function(t,e,n){return e=o(void 0===e?t.length-1:e,0),function(){for(var i=arguments,u=-1,a=o(i.length-e,0),c=Array(a);++u<a;)c[u]=i[e+u];u=-1;for(var s=Array(e+1);++u<e;)s[u]=i[u];return s[e]=n(c),r(t,this,s)}}},9564:(t,e,n)=>{var r=n(5194),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},4892:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},6810:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},5813:t=>{t.exports=function(t){return this.__data__.has(t)}},8629:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},2139:(t,e,n)=>{var r=n(7316),o=n(5369)(r);t.exports=o},5369:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},8926:(t,e,n)=>{var r=n(789);t.exports=function(){this.__data__=new r,this.size=0}},2680:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},3851:t=>{t.exports=function(t){return this.__data__.get(t)}},8423:t=>{t.exports=function(t){return this.__data__.has(t)}},3967:(t,e,n)=>{var r=n(789),o=n(8561),i=n(1451);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var u=n.__data__;if(!o||u.length<199)return u.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(u)}return n.set(t,e),this.size=n.size,this}},9705:t=>{t.exports=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}},412:(t,e,n)=>{var r=n(2110),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,u=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=u},4671:(t,e,n)=>{var r=n(3536);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},275:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},1158:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},755:(t,e,n)=>{var r=n(1482),o=n(6218),i=n(9147),u=Math.ceil,a=Math.max;t.exports=function(t,e,n){e=(n?o(t,e,n):void 0===e)?1:a(i(e),0);var c=null==t?0:t.length;if(!c||e<1)return[];for(var s=0,l=0,f=Array(u(c/e));s<c;)f[l++]=r(t,s,s+=e);return f}},3368:t=>{t.exports=function(t){return function(){return t}}},3803:(t,e,n)=>{var r=n(6015),o=n(6642),i=n(3572),u=Math.max,a=Math.min;t.exports=function(t,e,n){var c,s,l,f,p,d,h=0,v=!1,m=!1,_=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function y(e){var n=c,r=s;return c=s=void 0,h=e,f=t.apply(r,n)}function g(t){var n=t-d;return void 0===d||n>=e||n<0||m&&t-h>=l}function b(){var t=o();if(g(t))return w(t);p=setTimeout(b,function(t){var n=e-(t-d);return m?a(n,l-(t-h)):n}(t))}function w(t){return p=void 0,_&&c?y(t):(c=s=void 0,f)}function x(){var t=o(),n=g(t);if(c=arguments,s=this,d=t,n){if(void 0===p)return function(t){return h=t,p=setTimeout(b,e),v?y(t):f}(d);if(m)return clearTimeout(p),p=setTimeout(b,e),y(d)}return void 0===p&&(p=setTimeout(b,e)),f}return e=i(e)||0,r(n)&&(v=!!n.leading,l=(m="maxWait"in n)?u(i(n.maxWait)||0,e):l,_="trailing"in n?!!n.trailing:_),x.cancel=function(){void 0!==p&&clearTimeout(p),h=0,c=d=s=p=void 0},x.flush=function(){return void 0===p?f:w(o())},x}},9830:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},2918:(t,e,n)=>{var r=n(2832),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);t.exports=function(t){return(t=r(t))&&i.test(t)?t.replace(o,"\\$&"):t}},1308:(t,e,n)=>{var r=n(3234);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},9650:(t,e,n)=>{var r=n(2748);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},2993:(t,e,n)=>{var r=n(1607),o=n(3852);t.exports=function(t,e){return null!=t&&o(t,e,r)}},9090:t=>{t.exports=function(t){return t}},1885:(t,e,n)=>{var r=n(6138),o=n(4263),i=n(5580),u=n(2283),a=i((function(t){var e=r(t,u);return e.length&&e[0]===t[0]?o(e):[]}));t.exports=a},5962:(t,e,n)=>{var r=n(6252),o=n(6184),i=Object.prototype,u=i.hasOwnProperty,a=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return o(t)&&u.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},4383:t=>{var e=Array.isArray;t.exports=e},9592:(t,e,n)=>{var r=n(4360),o=n(1784);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},5919:(t,e,n)=>{var r=n(9592),o=n(6184);t.exports=function(t){return o(t)&&r(t)}},8098:(t,e,n)=>{t=n.nmd(t);var r=n(9564),o=n(1329),i=e&&!e.nodeType&&e,u=i&&t&&!t.nodeType&&t,a=u&&u.exports===i?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||o;t.exports=c},5292:(t,e,n)=>{var r=n(5954),o=n(6143),i=n(3271),u=i&&i.isDate,a=u?o(u):r;t.exports=a},5359:(t,e,n)=>{var r=n(9966),o=n(8355),i=n(5962),u=n(4383),a=n(9592),c=n(8098),s=n(8089),l=n(3905),f=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(a(t)&&(u(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||i(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(s(t))return!r(t).length;for(var n in t)if(f.call(t,n))return!1;return!0}},8434:(t,e,n)=>{var r=n(3028);t.exports=function(t,e){return r(t,e)}},4360:(t,e,n)=>{var r=n(6990),o=n(6015);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1784:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6015:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},6184:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},5229:(t,e,n)=>{var r=n(6990),o=n(9637),i=n(6184),u=Function.prototype,a=Object.prototype,c=u.toString,s=a.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},3536:(t,e,n)=>{var r=n(6990),o=n(6184);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},3905:(t,e,n)=>{var r=n(4271),o=n(6143),i=n(3271),u=i&&i.isTypedArray,a=u?o(u):r;t.exports=a},8420:(t,e,n)=>{var r=n(661),o=n(9966),i=n(9592);t.exports=function(t){return i(t)?r(t):o(t)}},3435:(t,e,n)=>{var r=n(661),o=n(7641),i=n(9592);t.exports=function(t){return i(t)?r(t,!0):o(t)}},764:(t,e,n)=>{var r=n(6138),o=n(4207),i=n(5218),u=n(4383);t.exports=function(t,e){return(u(t)?r:i)(t,o(e,3))}},9098:(t,e,n)=>{var r=n(1451);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(o.Cache||r),n}o.Cache=r,t.exports=o},1582:(t,e,n)=>{var r=n(436),o=n(7921)((function(t,e,n){r(t,e,n)}));t.exports=o},4634:(t,e,n)=>{var r=n(436),o=n(7921)((function(t,e,n,o){r(t,e,n,o)}));t.exports=o},7600:t=>{t.exports=function(){}},6642:(t,e,n)=>{var r=n(9564);t.exports=function(){return r.Date.now()}},2959:(t,e,n)=>{var r=n(2717),o=n(4383);t.exports=function(t,e,n,i){return null==t?[]:(o(e)||(e=null==e?[]:[e]),o(n=i?void 0:n)||(n=null==n?[]:[n]),r(t,e,n))}},8373:(t,e,n)=>{var r=n(9055),o=n(1506)((function(t,e){return null==t?{}:r(t,e)}));t.exports=o},3681:(t,e,n)=>{var r=n(5351),o=n(4953),i=n(9668),u=n(4671);t.exports=function(t){return i(t)?r(u(t)):o(t)}},8326:(t,e,n)=>{var r=n(6283)("round");t.exports=r},6499:t=>{t.exports=function(){return[]}},1329:t=>{t.exports=function(){return!1}},4933:(t,e,n)=>{var r=n(1559),o=n(9090);t.exports=function(t){return t&&t.length?r(t,o):0}},5410:(t,e,n)=>{var r=n(3572);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},9147:(t,e,n)=>{var r=n(5410);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},3572:(t,e,n)=>{var r=n(7066),o=n(6015),i=n(3536),u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=a.test(t);return n||c.test(t)?s(t.slice(2),n?2:8):u.test(t)?NaN:+t}},7774:(t,e,n)=>{var r=n(6837),o=n(3435);t.exports=function(t){return r(t,o(t))}},2832:(t,e,n)=>{var r=n(4742);t.exports=function(t){return null==t?"":r(t)}},4697:(t,e,n)=>{var r=n(3234),o=n(5580),i=n(3247),u=n(5919),a=o((function(t){return i(r(t,1,u,!0))}));t.exports=a},953:(t,e,n)=>{var r=n(3247);t.exports=function(t){return t&&t.length?r(t):[]}},2004:(t,e,n)=>{var r=n(4207),o=n(3247);t.exports=function(t,e){return t&&t.length?o(t,r(e,2)):[]}},2585:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Children:()=>z,Component:()=>a.uA,Fragment:()=>a.FK,PureComponent:()=>L,StrictMode:()=>Mt,Suspense:()=>Q,SuspenseList:()=>Z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>wt,cloneElement:()=>kt,createContext:()=>a.q6,createElement:()=>a.n,createFactory:()=>Et,createPortal:()=>rt,createRef:()=>a._3,default:()=>Ut,findDOMNode:()=>Pt,flushSync:()=>Tt,forwardRef:()=>H,hydrate:()=>ft,isElement:()=>It,isFragment:()=>At,isMemo:()=>St,isValidElement:()=>Ot,lazy:()=>G,memo:()=>U,render:()=>lt,startTransition:()=>jt,unmountComponentAtNode:()=>Ct,unstable_batchedUpdates:()=>Rt,useCallback:()=>A,useContext:()=>S,useDebugValue:()=>k,useDeferredValue:()=>Nt,useEffect:()=>b,useErrorBoundary:()=>C,useId:()=>P,useImperativeHandle:()=>E,useInsertionEffect:()=>Ft,useLayoutEffect:()=>w,useMemo:()=>O,useReducer:()=>g,useRef:()=>x,useState:()=>y,useSyncExternalStore:()=>$t,useTransition:()=>Dt,version:()=>xt});var r,o,i,u,a=n(754),c=0,s=[],l=a.fF,f=l.__b,p=l.__r,d=l.diffed,h=l.__c,v=l.unmount,m=l.__;function _(t,e){l.__h&&l.__h(o,t,c||e),c=0;var n=o.__H||(o.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function y(t){return c=1,g(F,t)}function g(t,e,n){var i=_(r++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):F(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=o,!o.u)){var u=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return!!t.__c}));if(r.every((function(t){return!t.__N})))return!a||a.call(this,t,e,n);var o=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(o=!0)}})),!(!o&&i.__c.props===t)&&(!a||a.call(this,t,e,n))};o.u=!0;var a=o.shouldComponentUpdate,c=o.componentWillUpdate;o.componentWillUpdate=function(t,e,n){if(this.__e){var r=a;a=void 0,u(t,e,n),a=r}c&&c.call(this,t,e,n)},o.shouldComponentUpdate=u}return i.__N||i.__}function b(t,e){var n=_(r++,3);!l.__s&&D(n.__H,e)&&(n.__=t,n.i=e,o.__H.__h.push(n))}function w(t,e){var n=_(r++,4);!l.__s&&D(n.__H,e)&&(n.__=t,n.i=e,o.__h.push(n))}function x(t){return c=5,O((function(){return{current:t}}),[])}function E(t,e,n){c=6,w((function(){return"function"==typeof t?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0}),null==n?n:n.concat(t))}function O(t,e){var n=_(r++,7);return D(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function A(t,e){return c=8,O((function(){return t}),e)}function S(t){var e=o.context[t.__c],n=_(r++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(o)),e.props.value):t.__}function k(t,e){l.useDebugValue&&l.useDebugValue(e?e(t):t)}function C(t){var e=_(r++,10),n=y();return e.__=t,o.componentDidCatch||(o.componentDidCatch=function(t,r){e.__&&e.__(t,r),n[1](t)}),[n[0],function(){n[1](void 0)}]}function P(){var t=_(r++,11);if(!t.__){for(var e=o.__v;null!==e&&!e.__m&&null!==e.__;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function R(){for(var t;t=s.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j),t.__H.__h.forEach(N),t.__H.__h=[]}catch(e){t.__H.__h=[],l.__e(e,t.__v)}}l.__b=function(t){o=null,f&&f(t)},l.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),m&&m(t,e)},l.__r=function(t){p&&p(t),r=0;var e=(o=t.__c).__H;e&&(i===o?(e.__h=[],o.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.i=t.__N=void 0}))):(e.__h.forEach(j),e.__h.forEach(N),e.__h=[],r=0)),i=o},l.diffed=function(t){d&&d(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==s.push(e)&&u===l.requestAnimationFrame||((u=l.requestAnimationFrame)||M)(R)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.i=void 0}))),i=o=null},l.__c=function(t,e){e.some((function(t){try{t.__h.forEach(j),t.__h=t.__h.filter((function(t){return!t.__||N(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],l.__e(n,t.__v)}})),h&&h(t,e)},l.unmount=function(t){v&&v(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{j(t)}catch(t){e=t}})),n.__H=void 0,e&&l.__e(e,n.__v))};var T="function"==typeof requestAnimationFrame;function M(t){var e,n=function(){clearTimeout(r),T&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);T&&(e=requestAnimationFrame(n))}function j(t){var e=o,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),o=e}function N(t){var e=o;t.__c=t.__(),o=e}function D(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function F(t,e){return"function"==typeof e?e(t):e}function I(t,e){for(var n in e)t[n]=e[n];return t}function $(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function L(t,e){this.props=t,this.context=e}function U(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:$(this.props,t)}function r(e){return this.shouldComponentUpdate=n,(0,a.n)(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(L.prototype=new a.uA).isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(t,e){return $(this.props,t)||$(this.state,e)};var q=a.fF.__b;a.fF.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),q&&q(t)};var B="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function H(t){function e(e){var n=I({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=B,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var W=function(t,e){return null==t?null:(0,a.v2)((0,a.v2)(t).map(e))},z={map:W,forEach:W,count:function(t){return t?(0,a.v2)(t).length:0},only:function(t){var e=(0,a.v2)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:a.v2},Y=a.fF.__e;a.fF.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Y(t,e,n,r)};var K=a.fF.unmount;function X(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=I({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return X(t,e,n)}))),t}function V(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return V(t,e,n)})),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Q(){this.__u=0,this.t=null,this.__b=null}function J(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function G(t){var e,n,r;function o(o){if(e||(e=t()).then((function(t){n=t.default||t}),(function(t){r=t})),r)throw r;if(!n)throw e;return(0,a.n)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function Z(){this.u=null,this.o=null}a.fF.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),K&&K(t)},(Q.prototype=new a.uA).__c=function(t,e){var n=e.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=J(r.__v),i=!1,u=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=u;var a=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=V(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(u,u)},Q.prototype.componentWillUnmount=function(){this.t=[]},Q.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=X(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&(0,a.n)(a.FK,null,t.fallback);return o&&(o.__u&=-33),[(0,a.n)(a.FK,null,e.__a?null:t.children),o]};var tt=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function et(t){return this.getChildContext=function(){return t.context},t.children}function nt(t){var e=this,n=t.i;e.componentWillUnmount=function(){(0,a.XX)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,n){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),(0,a.XX)((0,a.n)(et,{context:e.context},t.__v),e.l)}function rt(t,e){var n=(0,a.n)(nt,{__v:t,i:e});return n.containerInfo=e,n}(Z.prototype=new a.uA).__a=function(t){var e=this,n=J(e.__v),r=e.o.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),tt(e,t,r)):o()};n?n(i):i()}},Z.prototype.render=function(t){this.u=null,this.o=new Map;var e=(0,a.v2)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Z.prototype.componentDidUpdate=Z.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,n){tt(t,n,e)}))};var ot="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,it=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ut=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,at=/[A-Z0-9]/g,ct="undefined"!=typeof document,st=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};function lt(t,e,n){return null==e.__k&&(e.textContent=""),(0,a.XX)(t,e),"function"==typeof n&&n(),t?t.__c:null}function ft(t,e,n){return(0,a.Qv)(t,e),"function"==typeof n&&n(),t?t.__c:null}a.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(a.uA.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var pt=a.fF.event;function dt(){}function ht(){return this.cancelBubble}function vt(){return this.defaultPrevented}a.fF.event=function(t){return pt&&(t=pt(t)),t.persist=dt,t.isPropagationStopped=ht,t.isDefaultPrevented=vt,t.nativeEvent=t};var mt,_t={enumerable:!1,configurable:!0,get:function(){return this.class}},yt=a.fF.vnode;a.fF.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},o=-1===n.indexOf("-");for(var i in e){var u=e[i];if(!("value"===i&&"defaultValue"in e&&null==u||ct&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var c=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===u?u="":"translate"===c&&"no"===u?u=!1:"o"===c[0]&&"n"===c[1]?"ondoubleclick"===c?i="ondblclick":"onchange"!==c||"input"!==n&&"textarea"!==n||st(e.type)?"onfocus"===c?i="onfocusin":"onblur"===c?i="onfocusout":ut.test(i)&&(i=c):c=i="oninput":o&&it.test(i)?i=i.replace(at,"-$&").toLowerCase():null===u&&(u=void 0),"oninput"===c&&r[i=c]&&(i="oninputCapture"),r[i]=u}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,a.v2)(e.children).forEach((function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)}))),"select"==n&&null!=r.defaultValue&&(r.value=(0,a.v2)(e.children).forEach((function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",_t)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=ot,yt&&yt(t)};var gt=a.fF.__r;a.fF.__r=function(t){gt&&gt(t),mt=t.__c};var bt=a.fF.diffed;a.fF.diffed=function(t){bt&&bt(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value),mt=null};var wt={ReactCurrentDispatcher:{current:{readContext:function(t){return mt.__n[t.__c].props.value},useCallback:A,useContext:S,useDebugValue:k,useDeferredValue:Nt,useEffect:b,useId:P,useImperativeHandle:E,useInsertionEffect:Ft,useLayoutEffect:w,useMemo:O,useReducer:g,useRef:x,useState:y,useSyncExternalStore:$t,useTransition:Dt}}},xt="17.0.2";function Et(t){return a.n.bind(null,t)}function Ot(t){return!!t&&t.$$typeof===ot}function At(t){return Ot(t)&&t.type===a.FK}function St(t){return!!t&&!!t.displayName&&("string"==typeof t.displayName||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function kt(t){return Ot(t)?a.Ob.apply(null,arguments):t}function Ct(t){return!!t.__k&&((0,a.XX)(null,t),!0)}function Pt(t){return t&&(t.base||1===t.nodeType&&t)||null}var Rt=function(t,e){return t(e)},Tt=function(t,e){return t(e)},Mt=a.FK;function jt(t){t()}function Nt(t){return t}function Dt(){return[!1,jt]}var Ft=w,It=Ot;function $t(t,e){var n=e(),r=y({h:{__:n,v:e}}),o=r[0].h,i=r[1];return w((function(){o.__=n,o.v=e,Lt(o)&&i({h:o})}),[t,n,e]),b((function(){return Lt(o)&&i({h:o}),t((function(){Lt(o)&&i({h:o})}))}),[t]),n}function Lt(t){var e,n,r=t.v,o=t.__;try{var i=r();return!((e=o)===(n=i)&&(0!==e||1/e==1/n)||e!=e&&n!=n)}catch(t){return!0}}var Ut={useState:y,useId:P,useReducer:g,useEffect:b,useLayoutEffect:w,useInsertionEffect:Ft,useTransition:Dt,useDeferredValue:Nt,useSyncExternalStore:$t,startTransition:jt,useRef:x,useImperativeHandle:E,useMemo:O,useCallback:A,useContext:S,useDebugValue:k,version:"17.0.2",Children:z,render:lt,hydrate:ft,unmountComponentAtNode:Ct,createPortal:rt,createElement:a.n,createContext:a.q6,createFactory:Et,cloneElement:kt,createRef:a._3,Fragment:a.FK,isValidElement:Ot,isElement:It,isFragment:At,isMemo:St,findDOMNode:Pt,Component:a.uA,PureComponent:L,memo:U,forwardRef:H,flushSync:Tt,unstable_batchedUpdates:Rt,StrictMode:Mt,Suspense:Q,SuspenseList:Z,lazy:G,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:wt}},754:(t,e,n)=>{"use strict";n.d(e,{FK:()=>E,Ob:()=>z,Qv:()=>W,XX:()=>H,_3:()=>x,fF:()=>o,h:()=>b,n:()=>b,q6:()=>Y,uA:()=>O,v2:()=>M});var r,o,i,u,a,c,s,l,f,p,d,h={},v=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,_=Array.isArray;function y(t,e){for(var n in e)t[n]=e[n];return t}function g(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,n){var o,i,u,a={};for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];if(arguments.length>2&&(a.children=arguments.length>3?r.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===a[u]&&(a[u]=t.defaultProps[u]);return w(t,a,o,i,null)}function w(t,e,n,r,u){var a={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==u?++i:u,__i:-1,__u:0};return null==u&&null!=o.vnode&&o.vnode(a),a}function x(){return{current:null}}function E(t){return t.children}function O(t,e){this.props=t,this.context=e}function A(t,e){if(null==e)return t.__?A(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?A(t):null}function S(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return S(t)}}function k(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!C.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||c)(C)}function C(){var t,e,n,r,i,a,c,l;for(u.sort(s);t=u.shift();)t.__d&&(e=u.length,r=void 0,a=(i=(n=t).__v).__e,c=[],l=[],n.__P&&((r=y({},i)).__v=i.__v+1,o.vnode&&o.vnode(r),I(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,c,null==a?A(i):a,!!(32&i.__u),l),r.__v=i.__v,r.__.__k[r.__i]=r,$(c,r,l),r.__e!=a&&S(r)),u.length>e&&u.sort(s));C.__r=0}function P(t,e,n,r,o,i,u,a,c,s,l){var f,p,d,m,_,y=r&&r.__k||v,g=e.length;for(n.__d=c,R(n,e,y),c=n.__d,f=0;f<g;f++)null!=(d=n.__k[f])&&"boolean"!=typeof d&&"function"!=typeof d&&(p=-1===d.__i?h:y[d.__i]||h,d.__i=f,I(t,d,p,o,i,u,a,c,s,l),m=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&U(p.ref,null,d),l.push(d.ref,d.__c||m,d)),null==_&&null!=m&&(_=m),65536&d.__u||p.__k===d.__k?c=T(d,c,t):"function"==typeof d.type&&void 0!==d.__d?c=d.__d:m&&(c=m.nextSibling),d.__d=void 0,d.__u&=-196609);n.__d=c,n.__e=_}function R(t,e,n){var r,o,i,u,a,c=e.length,s=n.length,l=s,f=0;for(t.__k=[],r=0;r<c;r++)u=r+f,null!=(o=t.__k[r]=null==(o=e[r])||"boolean"==typeof o||"function"==typeof o?null:"string"==typeof o||"number"==typeof o||"bigint"==typeof o||o.constructor==String?w(null,o,null,null,null):_(o)?w(E,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?w(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)?(o.__=t,o.__b=t.__b+1,a=j(o,n,u,l),o.__i=a,i=null,-1!==a&&(l--,(i=n[a])&&(i.__u|=131072)),null==i||null===i.__v?(-1==a&&f--,"function"!=typeof o.type&&(o.__u|=65536)):a!==u&&(a==u-1?f--:a==u+1?f++:a>u?l>c-u?f+=a-u:f--:a<u&&(a==u-f?f-=a-u:f++),a!==r+f&&(o.__u|=65536))):(i=n[u])&&null==i.key&&i.__e&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=A(i)),q(i,i,!1),n[u]=null,l--);if(l)for(r=0;r<s;r++)null!=(i=n[r])&&0==(131072&i.__u)&&(i.__e==t.__d&&(t.__d=A(i)),q(i,i))}function T(t,e,n){var r,o;if("function"==typeof t.type){for(r=t.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=t,e=T(r[o],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=A(t)),n.insertBefore(t.__e,e||null),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8===e.nodeType);return e}function M(t,e){return e=e||[],null==t||"boolean"==typeof t||(_(t)?t.some((function(t){M(t,e)})):e.push(t)),e}function j(t,e,n,r){var o=t.key,i=t.type,u=n-1,a=n+1,c=e[n];if(null===c||c&&o==c.key&&i===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;u>=0||a<e.length;){if(u>=0){if((c=e[u])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return u;u--}if(a<e.length){if((c=e[a])&&0==(131072&c.__u)&&o==c.key&&i===c.type)return a;a++}}return-1}function N(t,e,n){"-"===e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||m.test(e)?n:n+"px"}function D(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||N(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||N(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||"onFocusOut"===e||"onFocusIn"===e?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=l,t.addEventListener(e,i?p:f,i)):t.removeEventListener(e,i?p:f,i);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!==e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function F(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=l++;else if(e.t<n.u)return;return n(o.event?o.event(e):e)}}}function I(t,e,n,r,i,u,a,c,s,l){var f,p,d,h,v,m,g,b,w,x,A,S,k,C,R,T,M=e.type;if(void 0!==e.constructor)return null;128&n.__u&&(s=!!(32&n.__u),u=[c=e.__e=n.__e]),(f=o.__b)&&f(e);t:if("function"==typeof M)try{if(b=e.props,w="prototype"in M&&M.prototype.render,x=(f=M.contextType)&&r[f.__c],A=f?x?x.props.value:f.__:r,n.__c?g=(p=e.__c=n.__c).__=p.__E:(w?e.__c=p=new M(b,A):(e.__c=p=new O(b,A),p.constructor=M,p.render=B),x&&x.sub(p),p.props=b,p.state||(p.state={}),p.context=A,p.__n=r,d=p.__d=!0,p.__h=[],p._sb=[]),w&&null==p.__s&&(p.__s=p.state),w&&null!=M.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=y({},p.__s)),y(p.__s,M.getDerivedStateFromProps(b,p.__s))),h=p.props,v=p.state,p.__v=e,d)w&&null==M.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),w&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(w&&null==M.getDerivedStateFromProps&&b!==h&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(b,A),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(b,p.__s,A)||e.__v===n.__v)){for(e.__v!==n.__v&&(p.props=b,p.state=p.__s,p.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&a.push(p);break t}null!=p.componentWillUpdate&&p.componentWillUpdate(b,p.__s,A),w&&null!=p.componentDidUpdate&&p.__h.push((function(){p.componentDidUpdate(h,v,m)}))}if(p.context=A,p.props=b,p.__P=t,p.__e=!1,k=o.__r,C=0,w){for(p.state=p.__s,p.__d=!1,k&&k(e),f=p.render(p.props,p.state,p.context),R=0;R<p._sb.length;R++)p.__h.push(p._sb[R]);p._sb=[]}else do{p.__d=!1,k&&k(e),f=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++C<25);p.state=p.__s,null!=p.getChildContext&&(r=y(y({},r),p.getChildContext())),w&&!d&&null!=p.getSnapshotBeforeUpdate&&(m=p.getSnapshotBeforeUpdate(h,v)),P(t,_(T=null!=f&&f.type===E&&null==f.key?f.props.children:f)?T:[T],e,n,r,i,u,a,c,s,l),p.base=e.__e,e.__u&=-161,p.__h.length&&a.push(p),g&&(p.__E=p.__=null)}catch(t){if(e.__v=null,s||null!=u){for(e.__u|=s?160:32;c&&8===c.nodeType&&c.nextSibling;)c=c.nextSibling;u[u.indexOf(c)]=null,e.__e=c}else e.__e=n.__e,e.__k=n.__k;o.__e(t,e,n)}else null==u&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=L(n.__e,e,n,r,i,u,a,s,l);(f=o.diffed)&&f(e)}function $(t,e,n){e.__d=void 0;for(var r=0;r<n.length;r++)U(n[r],n[++r],n[++r]);o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function L(t,e,n,o,i,u,a,c,s){var l,f,p,d,v,m,y,b=n.props,w=e.props,x=e.type;if("svg"===x?i="http://www.w3.org/2000/svg":"math"===x?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),null!=u)for(l=0;l<u.length;l++)if((v=u[l])&&"setAttribute"in v==!!x&&(x?v.localName===x:3===v.nodeType)){t=v,u[l]=null;break}if(null==t){if(null===x)return document.createTextNode(w);t=document.createElementNS(i,x,w.is&&w),u=null,c=!1}if(null===x)b===w||c&&t.data===w||(t.data=w);else{if(u=u&&r.call(t.childNodes),b=n.props||h,!c&&null!=u)for(b={},l=0;l<t.attributes.length;l++)b[(v=t.attributes[l]).name]=v.value;for(l in b)if(v=b[l],"children"==l);else if("dangerouslySetInnerHTML"==l)p=v;else if("key"!==l&&!(l in w)){if("value"==l&&"defaultValue"in w||"checked"==l&&"defaultChecked"in w)continue;D(t,l,null,v,i)}for(l in w)v=w[l],"children"==l?d=v:"dangerouslySetInnerHTML"==l?f=v:"value"==l?m=v:"checked"==l?y=v:"key"===l||c&&"function"!=typeof v||b[l]===v||D(t,l,v,b[l],i);if(f)c||p&&(f.__html===p.__html||f.__html===t.innerHTML)||(t.innerHTML=f.__html),e.__k=[];else if(p&&(t.innerHTML=""),P(t,_(d)?d:[d],e,n,o,"foreignObject"===x?"http://www.w3.org/1999/xhtml":i,u,a,u?u[0]:n.__k&&A(n,0),c,s),null!=u)for(l=u.length;l--;)null!=u[l]&&g(u[l]);c||(l="value",void 0!==m&&(m!==t[l]||"progress"===x&&!m||"option"===x&&m!==b[l])&&D(t,l,m,b[l],i),l="checked",void 0!==y&&y!==t[l]&&D(t,l,y,b[l],i))}return t}function U(t,e,n){try{if("function"==typeof t){var r="function"==typeof t.__u;r&&t.__u(),r&&null==e||(t.__u=t(e))}else t.current=e}catch(t){o.__e(t,n)}}function q(t,e,n){var r,i;if(o.unmount&&o.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||U(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){o.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&q(r[i],e,n||"function"!=typeof t.type);n||null==t.__e||g(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function B(t,e,n){return this.constructor(t,n)}function H(t,e,n){var i,u,a,c;o.__&&o.__(t,e),u=(i="function"==typeof n)?null:n&&n.__k||e.__k,a=[],c=[],I(e,t=(!i&&n||e).__k=b(E,null,[t]),u||h,h,e.namespaceURI,!i&&n?[n]:u?null:e.firstChild?r.call(e.childNodes):null,a,!i&&n?n:u?u.__e:e.firstChild,i,c),$(a,t,c)}function W(t,e){H(t,e,W)}function z(t,e,n){var o,i,u,a,c=y({},t.props);for(u in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)"key"==u?o=e[u]:"ref"==u?i=e[u]:c[u]=void 0===e[u]&&void 0!==a?a[u]:e[u];return arguments.length>2&&(c.children=arguments.length>3?r.call(arguments,2):n),w(t.type,c,o||t.key,i||t.ref,null)}function Y(t,e){var n={__c:e="__cC"+d++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some((function(t){t.__e=!0,k(t)}))},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}r=v.slice,o={__e:function(t,e,n,r){for(var o,i,u;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),u=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),u=o.__d),u)return o.__E=o}catch(e){t=e}throw t}},i=0,O.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=y({},this.state),"function"==typeof t&&(t=t(y({},n),this.props)),t&&y(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),k(this))},O.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k(this))},O.prototype.render=E,u=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(t,e){return t.__v.__b-e.__v.__b},C.__r=0,l=0,f=F(!1),p=F(!0),d=0},856:(t,e,n)=>{"use strict";var r=n(7183);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,u){if(u!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7598:(t,e,n)=>{t.exports=n(856)()},7183:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},8591:(t,e,n)=>{"use strict";n.d(e,{I9:()=>l,N_:()=>m,k2:()=>g});var r=n(841),o=n(9408),i=n(2585),u=n(8873),a=n(7940),c=n(1927),s=n(9685);i.default.Component;var l=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).history=(0,u.TM)(e.props),e}return(0,o.A)(e,t),e.prototype.render=function(){return i.default.createElement(r.Ix,{history:this.history,children:this.props.children})},e}(i.default.Component),f=function(t,e){return"function"==typeof t?t(e):t},p=function(t,e){return"string"==typeof t?(0,u.yJ)(t,null,null,e):t},d=function(t){return t},h=i.default.forwardRef;void 0===h&&(h=d);var v=h((function(t,e){var n=t.innerRef,r=t.navigate,o=t.onClick,u=(0,c.A)(t,["innerRef","navigate","onClick"]),s=u.target,l=(0,a.A)({},u,{onClick:function(t){try{o&&o(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||s&&"_self"!==s||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return l.ref=d!==h&&e||n,i.default.createElement("a",l)})),m=h((function(t,e){var n=t.component,o=void 0===n?v:n,l=t.replace,m=t.to,_=t.innerRef,y=(0,c.A)(t,["component","replace","to","innerRef"]);return i.default.createElement(r.XZ.Consumer,null,(function(t){t||(0,s.A)(!1);var n=t.history,r=p(f(m,t.location),t.location),c=r?n.createHref(r):"",v=(0,a.A)({},y,{href:c,navigate:function(){var e=f(m,t.location),r=(0,u.AO)(t.location)===(0,u.AO)(p(e));(l||r?n.replace:n.push)(e)}});return d!==h?v.ref=e||_:v.innerRef=_,i.default.createElement(o,v)}))})),_=function(t){return t},y=i.default.forwardRef;void 0===y&&(y=_);var g=y((function(t,e){var n=t["aria-current"],o=void 0===n?"page":n,u=t.activeClassName,l=void 0===u?"active":u,d=t.activeStyle,h=t.className,v=t.exact,g=t.isActive,b=t.location,w=t.sensitive,x=t.strict,E=t.style,O=t.to,A=t.innerRef,S=(0,c.A)(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i.default.createElement(r.XZ.Consumer,null,(function(t){t||(0,s.A)(!1);var n=b||t.location,u=p(f(O,n),n),c=u.pathname,k=c&&c.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=k?(0,r.B6)(n.pathname,{path:k,exact:v,sensitive:w,strict:x}):null,P=!!(g?g(C,n):C),R="function"==typeof h?h(P):h,T="function"==typeof E?E(P):E;P&&(R=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(R,l),T=(0,a.A)({},T,d));var M=(0,a.A)({"aria-current":P&&o||null,className:R,style:T,to:u},S);return _!==y?M.ref=e||A:M.innerRef=A,i.default.createElement(m,M)}))}))},841:(t,e,n)=>{"use strict";n.d(e,{B6:()=>w,Ix:()=>_,W6:()=>A,XZ:()=>m,dO:()=>E,qh:()=>x,zy:()=>S});var r=n(9408),o=n(2585),i=n(7598),u=n.n(i),a=(n(8873),n(9685)),c=n(7940),s=n(8339),l=n.n(s),f=(n(542),n(1927),n(2396),1073741823),p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},d=o.default.createContext||function(t,e){var n,i,a,c="__create-react-context-"+((p[a="__global_unique_id__"]=(p[a]||0)+1)+"__"),s=function(t){function n(){for(var e,n,r,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];return(e=t.call.apply(t,[this].concat(i))||this).emitter=(n=e.props.value,r=[],{on:function(t){r.push(t)},off:function(t){r=r.filter((function(e){return e!==t}))},get:function(){return n},set:function(t,e){n=t,r.forEach((function(t){return t(n,e)}))}}),e}(0,r.A)(n,t);var o=n.prototype;return o.getChildContext=function(){var t;return(t={})[c]=this.emitter,t},o.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,o=t.value;((i=r)===(u=o)?0!==i||1/i==1/u:i!=i&&u!=u)?n=0:(n="function"==typeof e?e(r,o):f,0!=(n|=0)&&this.emitter.set(t.value,n))}var i,u},o.render=function(){return this.props.children},n}(o.default.Component);s.childContextTypes=((n={})[c]=u().object.isRequired,n);var l=function(e){function n(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).observedBits=void 0,t.state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}(0,r.A)(n,e);var o=n.prototype;return o.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?f:e},o.componentDidMount=function(){this.context[c]&&this.context[c].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?f:t},o.componentWillUnmount=function(){this.context[c]&&this.context[c].off(this.onUpdate)},o.getValue=function(){return this.context[c]?this.context[c].get():t},o.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(o.default.Component);return l.contextTypes=((i={})[c]=u().object,i),{Provider:s,Consumer:l}},h=function(t){var e=d();return e.displayName=t,e},v=h("Router-History"),m=h("Router"),_=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._pendingLocation=t}))),n}(0,r.A)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){var t=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen((function(e){t._isMounted&&t.setState({location:e})}))),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return o.default.createElement(m.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.default.createElement(v.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.default.Component);o.default.Component,o.default.Component;var y={},g=1e4,b=0;function w(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,u=n.strict,a=void 0!==u&&u,c=n.sensitive,s=void 0!==c&&c;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=y[n]||(y[n]={});if(r[t])return r[t];var o=[],i={regexp:l()(t,o,e),keys:o};return b<g&&(r[t]=i,b++),i}(n,{end:i,strict:a,sensitive:s}),o=r.regexp,u=r.keys,c=o.exec(t);if(!c)return null;var f=c[0],p=c.slice(1),d=t===f;return i&&!d?null:{path:n,url:"/"===n&&""===f?"/":f,isExact:d,params:u.reduce((function(t,e,n){return t[e.name]=p[n],t}),{})}}),null)}var x=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.A)(e,t),e.prototype.render=function(){var t=this;return o.default.createElement(m.Consumer,null,(function(e){e||(0,a.A)(!1);var n=t.props.location||e.location,r=t.props.computedMatch?t.props.computedMatch:t.props.path?w(n.pathname,t.props):e.match,i=(0,c.A)({},e,{location:n,match:r}),u=t.props,s=u.children,l=u.component,f=u.render;return Array.isArray(s)&&function(t){return 0===o.default.Children.count(t)}(s)&&(s=null),o.default.createElement(m.Provider,{value:i},i.match?s?"function"==typeof s?s(i):s:l?o.default.createElement(l,i):f?f(i):null:"function"==typeof s?s(i):null)}))},e}(o.default.Component);o.default.Component;var E=function(t){function e(){return t.apply(this,arguments)||this}return(0,r.A)(e,t),e.prototype.render=function(){var t=this;return o.default.createElement(m.Consumer,null,(function(e){e||(0,a.A)(!1);var n,r,i=t.props.location||e.location;return o.default.Children.forEach(t.props.children,(function(t){if(null==r&&o.default.isValidElement(t)){n=t;var u=t.props.path||t.props.from;r=u?w(i.pathname,(0,c.A)({},t.props,{path:u})):e.match}})),r?o.default.cloneElement(n,{location:i,computedMatch:r}):null}))},e}(o.default.Component),O=o.default.useContext;function A(){return O(v)}function S(){return O(m).location}},765:t=>{t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},8339:(t,e,n)=>{var r=n(765);t.exports=function t(e,n,o){return r(n)||(o=n||o,n=[]),o=o||{},e instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return l(t,e)}(e,n):r(e)?function(e,n,r){for(var o=[],i=0;i<e.length;i++)o.push(t(e[i],n,r).source);return l(new RegExp("(?:"+o.join("|")+")",f(r)),n)}(e,n,o):function(t,e,n){return p(i(t,n),e,n)}(e,n,o)},t.exports.parse=i,t.exports.compile=function(t,e){return a(i(t,e),e)},t.exports.tokensToFunction=a,t.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,u=0,a="",l=e&&e.delimiter||"/";null!=(n=o.exec(t));){var f=n[0],p=n[1],d=n.index;if(a+=t.slice(u,d),u=d+f.length,p)a+=p[1];else{var h=t[u],v=n[2],m=n[3],_=n[4],y=n[5],g=n[6],b=n[7];a&&(r.push(a),a="");var w=null!=v&&null!=h&&h!==v,x="+"===g||"*"===g,E="?"===g||"*"===g,O=n[2]||l,A=_||y;r.push({name:m||i++,prefix:v||"",delimiter:O,optional:E,repeat:x,partial:w,asterisk:!!b,pattern:A?s(A):b?".*":"[^"+c(O)+"]+?"})}}return u<t.length&&(a+=t.substr(u)),a&&r.push(a),r}function u(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function a(t,e){for(var n=new Array(t.length),o=0;o<t.length;o++)"object"==typeof t[o]&&(n[o]=new RegExp("^(?:"+t[o].pattern+")$",f(e)));return function(e,o){for(var i="",a=e||{},c=(o||{}).pretty?u:encodeURIComponent,s=0;s<t.length;s++){var l=t[s];if("string"!=typeof l){var f,p=a[l.name];if(null==p){if(l.optional){l.partial&&(i+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(r(p)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=c(p[d]),!n[s].test(f))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?l.prefix:l.delimiter)+f}}else{if(f=l.asterisk?encodeURI(p).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):c(p),!n[s].test(f))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+f+'"');i+=l.prefix+f}}else i+=l}return i}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function l(t,e){return t.keys=e,t}function f(t){return t&&t.sensitive?"":"i"}function p(t,e,n){r(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,u="",a=0;a<t.length;a++){var s=t[a];if("string"==typeof s)u+=c(s);else{var p=c(s.prefix),d="(?:"+s.pattern+")";e.push(s),s.repeat&&(d+="(?:"+p+d+")*"),u+=d=s.optional?s.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var h=c(n.delimiter||"/"),v=u.slice(-h.length)===h;return o||(u=(v?u.slice(0,-h.length):u)+"(?:"+h+"(?=$))?"),u+=i?"$":o&&v?"":"(?="+h+"|$)",l(new RegExp("^"+u,f(n)),e)}},1730:(t,e)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for;n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n&&Symbol.for("react.fragment"),n&&Symbol.for("react.strict_mode"),n&&Symbol.for("react.profiler"),n&&Symbol.for("react.provider"),n&&Symbol.for("react.context"),n&&Symbol.for("react.async_mode"),n&&Symbol.for("react.concurrent_mode"),n&&Symbol.for("react.forward_ref"),n&&Symbol.for("react.suspense"),n&&Symbol.for("react.suspense_list"),n&&Symbol.for("react.memo"),n&&Symbol.for("react.lazy"),n&&Symbol.for("react.block"),n&&Symbol.for("react.fundamental"),n&&Symbol.for("react.responder"),n&&Symbol.for("react.scope")},542:(t,e,n)=>{"use strict";n(1730)},5657:(t,e,n)=>{"use strict";n.d(e,{AU:()=>i,Bd:()=>u,lQ:()=>r,on:()=>o});var r=function(){};function o(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t&&t.addEventListener&&t.addEventListener.apply(t,e)}function i(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];t&&t.removeEventListener&&t.removeEventListener.apply(t,e)}var u="undefined"!=typeof window},9302:(t,e,n)=>{"use strict";n.d(e,{A:()=>o});var r=n(2585);function o(t,e,n){void 0===e&&(e=0),void 0===n&&(n=[]);var o=function(t,e){void 0===e&&(e=0);var n=(0,r.useRef)(!1),o=(0,r.useRef)(),i=(0,r.useRef)(t),u=(0,r.useCallback)((function(){return n.current}),[]),a=(0,r.useCallback)((function(){n.current=!1,o.current&&clearTimeout(o.current),o.current=setTimeout((function(){n.current=!0,i.current()}),e)}),[e]),c=(0,r.useCallback)((function(){n.current=null,o.current&&clearTimeout(o.current)}),[]);return(0,r.useEffect)((function(){i.current=t}),[t]),(0,r.useEffect)((function(){return a(),c}),[e]),[u,c,a]}(t,e),i=o[0],u=o[1],a=o[2];return(0,r.useEffect)(a,n),[i,u]}},9:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(2585),o=n(5657);const i=function(t,e){void 0===e&&(e=!0);var n=(0,r.useState)(!1),i=n[0],u=n[1];return(0,r.useEffect)((function(){var n=function(){return u(!0)},r=function(){return u(!1)};e&&t&&t.current&&((0,o.on)(t.current,"mouseover",n),(0,o.on)(t.current,"mouseout",r));var i=t.current;return function(){e&&i&&((0,o.AU)(i,"mouseover",n),(0,o.AU)(i,"mouseout",r))}}),[e,t]),i}},2307:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=n(2585),o=n(5657);const i=function(t,e,n){if(!o.Bd)return[e,o.lQ,o.lQ];if(!t)throw new Error("useLocalStorage key may not be falsy");var i=n?n.raw?function(t){return t}:n.deserializer:JSON.parse,u=(0,r.useRef)((function(t){try{var r=n?n.raw?String:n.serializer:JSON.stringify,o=localStorage.getItem(t);return null!==o?i(o):(e&&localStorage.setItem(t,r(e)),e)}catch(t){return e}})),a=(0,r.useState)((function(){return u.current(t)})),c=a[0],s=a[1];(0,r.useLayoutEffect)((function(){return s(u.current(t))}),[t]);var l=(0,r.useCallback)((function(e){try{var r="function"==typeof e?e(c):e;if(void 0===r)return;var o;o=n?n.raw?"string"==typeof r?r:JSON.stringify(r):n.serializer?n.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(t,o),s(i(o))}catch(t){}}),[t,s]),f=(0,r.useCallback)((function(){try{localStorage.removeItem(t),s(void 0)}catch(t){}}),[t,s]);return[c,l,f]}},8383:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(2585),o=n(5657);const i=o.Bd?r.useLayoutEffect:r.useEffect;var u={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const a=o.Bd&&void 0!==window.ResizeObserver?function(){var t=(0,r.useState)(null),e=t[0],n=t[1],o=(0,r.useState)(u),a=o[0],c=o[1],s=(0,r.useMemo)((function(){return new window.ResizeObserver((function(t){if(t[0]){var e=t[0].contentRect,n=e.x,r=e.y,o=e.width,i=e.height,u=e.top,a=e.left,s=e.bottom,l=e.right;c({x:n,y:r,width:o,height:i,top:u,left:a,bottom:s,right:l})}}))}),[]);return i((function(){if(e)return s.observe(e),function(){s.disconnect()}}),[e]),[n,a]}:function(){return[o.lQ,u]}},6728:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(9),o=n(2585);const i=function(t){var e,n=(0,o.useRef)(t);n.current=t,e=function(){return function(){return n.current()}},(0,o.useEffect)(e,[])};var u=n(5657);const a=function(t){var e=function(t){var e=(0,o.useRef)(0),n=(0,o.useState)(t),r=n[0],u=n[1],a=(0,o.useCallback)((function(t){cancelAnimationFrame(e.current),e.current=requestAnimationFrame((function(){u(t)}))}),[]);return i((function(){cancelAnimationFrame(e.current)})),[r,a]}({docX:0,docY:0,posX:0,posY:0,elX:0,elY:0,elH:0,elW:0}),n=e[0],r=e[1];return(0,o.useEffect)((function(){var e=function(e){if(t&&t.current){var n=t.current.getBoundingClientRect(),o=n.left,i=n.top,u=n.width,a=n.height,c=o+window.pageXOffset,s=i+window.pageYOffset,l=e.pageX-c,f=e.pageY-s;r({docX:e.pageX,docY:e.pageY,posX:c,posY:s,elX:l,elY:f,elH:a,elW:u})}};return(0,u.on)(document,"mousemove",e),function(){(0,u.AU)(document,"mousemove",e)}}),[t]),n};var c={current:null};const s=function(t,e){void 0===e&&(e={});var n=!!e.whenHovered,o=!!e.bound,i=(0,r.A)(t,n),u=a(n&&!i?c:t);return o&&(u.elX=Math.max(0,Math.min(u.elX,u.elW)),u.elY=Math.max(0,Math.min(u.elY,u.elH))),u}},7676:(t,e,n)=>{"use strict";function r(t,e){if(null==t)return t;if(0===t.length&&(!e||e&&""!==t))return null;const n=t instanceof Array?t[0]:t;return null==n||e||""!==n?n:null}n.d(e,{sJ:()=>a,W:()=>u,X4:()=>i,fr:()=>o,Vl:()=>c,oO:()=>l,eR:()=>s});const o={encode:function(t){return null==t?t:String(t)},decode:function(t){const e=r(t,!0);return null==e?e:String(e)}},i={encode:function(t,e="-",n="_"){return null==t?t:Object.keys(t).length?Object.keys(t).map((n=>`${n}${e}${t[n]}`)).join(n):""},decode:function(t,e="-",n="_"){const o=r(t,!0);if(null==o)return o;if(""===o)return{};const i={},u=new RegExp(`${e}(.*)`);return o.split(n).forEach((t=>{const[e,n]=t.split(u);i[e]=n})),i}},u={encode:function(t){return null==t?t:JSON.stringify(t)},decode:function(t){const e=r(t);if(null==e)return e;let n=null;try{n=JSON.parse(e)}catch(t){}return n}},a={encode:function(t){return null==t?t:t?"1":"0"},decode:function(t){const e=r(t);return null==e?e:"1"===e||"0"!==e&&null}};function c(t,e){const n={},r=Object.keys(e);for(const o of r){const r=e[o];t[o]?n[o]=t[o].encode(e[o]):n[o]=null==r?r:String(r)}return n}function s(t){const e=new URLSearchParams(t),n={};for(let[t,r]of e)Object.prototype.hasOwnProperty.call(n,t)?Array.isArray(n[t])?n[t].push(r):n[t]=[n[t],r]:n[t]=r;return n}function l(t){const e=new URLSearchParams,n=Object.entries(t);for(const[t,r]of n)if(null!=r)if(Array.isArray(r))for(const n of r)e.append(t,null!=n?n:"");else e.append(t,r);return e.toString()}'{}[],":'.split("").map((t=>[t,encodeURIComponent(t)]))},4667:(t,e,n)=>{"use strict";n.d(e,{D:()=>o});var r=n(841);const o=({children:t})=>{(0,r.zy)();const e=(0,r.W6)();return t({replace(t){e.replace(t.search||"?",t.state)},push(t){e.push(t.search||"?",t.state)},get location(){return e.location}})}},2620:(t,e,n)=>{"use strict";n.d(e,{QueryParamProvider:()=>w,StringParam:()=>r.fr,useQueryParams:()=>S});var r=n(7676),o=n(2585);const i=new class{constructor(){this.paramsMap=new Map,this.registeredParams=new Map}set(t,e,n,r){this.paramsMap.set(t,{stringified:e,decoded:n,decode:r})}has(t,e,n){if(!this.paramsMap.has(t))return!1;const r=this.paramsMap.get(t);return!!r&&r.stringified===e&&(null==n||r.decode===n)}get(t){var e;if(this.paramsMap.has(t))return null==(e=this.paramsMap.get(t))?void 0:e.decoded}registerParams(t){for(const e of t){const t=this.registeredParams.get(e)||0;this.registeredParams.set(e,t+1)}}unregisterParams(t){for(const e of t){const t=(this.registeredParams.get(e)||0)-1;t<=0?(this.registeredParams.delete(e),this.paramsMap.has(e)&&this.paramsMap.delete(e)):this.registeredParams.set(e,t)}}clear(){this.paramsMap.clear(),this.registeredParams.clear()}};function u(t,e,n,r){var o;if(!n||!e.length)return t;let i={...t},u=!1;for(const t of e)Object.prototype.hasOwnProperty.call(i,t)||(i[t]=null!=(o=n[t])?o:r,u=!0);return u?i:t}const a=Object.prototype.hasOwnProperty;function c(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function s(t,e,n){var r,o;if(c(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const i=Object.keys(t),u=Object.keys(e);if(i.length!==u.length)return!1;for(let u=0;u<i.length;u++){const s=null!=(o=null==(r=null==n?void 0:n[i[u]])?void 0:r.equals)?o:c;if(!a.call(e,i[u])||!s(t[i[u]],e[i[u]]))return!1}return!0}function l(t,e,n){const r={},o=Object.keys(e);for(const i of o){const o=e[i],u=t[i];let a;if(n.has(i,u,o.decode))a=n.get(i);else{if(a=o.decode(u),o.equals&&n.has(i,u)){const t=n.get(i);o.equals(a,t)&&(a=t)}void 0!==a&&n.set(i,u,a,o.decode)}void 0===a&&void 0!==o.default&&(a=o.default),r[i]=a}return r}function f(){let t;return function(e,n,r){const o=l(e,n,r);return null!=t&&s(t,o)?t:(t=o,o)}}let p,d,h,v={};const m=(t,e,n)=>{if(p===e&&h===t&&d===n)return v;p=e,h=t;const r=t(null!=e?e:"");d=n;const o=function(t){if(t)return Object.fromEntries(t.split("\n").map((t=>t.split("\0"))))}(n);for(let[t,e]of Object.entries(r)){(null==o?void 0:o[t])&&(delete r[t],t=o[t],r[t]=e);const n=v[t];s(e,n)&&(r[t]=n)}return v=r,r};function _(t,e){null==e&&(e={});const n={...t,...e};return e.params&&t.params&&(n.params={...t.params,...e.params}),n}const y={adapter:{},options:{searchStringToObject:r.eR,objectToSearchString:r.oO,updateType:"pushIn",includeKnownParams:void 0,includeAllParams:!1,removeDefaultsFromUrl:!1,enableBatching:!1,skipUpdateWhenNoChange:!0}},g=o.createContext(y);function b({children:t,adapter:e,options:n}){const{adapter:r,options:i}=o.useContext(g),u=o.useMemo((()=>({adapter:null!=e?e:r,options:_(i,n)})),[e,n,r,i]);return o.createElement(g.Provider,{value:u},t)}function w({children:t,adapter:e,options:n}){const r=e;return r?o.createElement(r,null,(e=>o.createElement(b,{adapter:e,options:n},t))):o.createElement(b,{options:n},t)}function x({changes:t,updateType:e,currentSearchString:n,paramConfigMap:o,options:a}){const{searchStringToObject:c,objectToSearchString:s}=a;let f;null==e&&(e=a.updateType);const p=m(c,n),d=u(o,Object.keys(t),a.params);let h,v;return h="function"==typeof t?t(l(p,d,i)):t,f=(0,r.Vl)(d,h),a.removeDefaultsFromUrl&&function(t,e){var n;for(const r in t)void 0!==(null==(n=e[r])?void 0:n.default)&&void 0!==t[r]&&e[r].encode(e[r].default)===t[r]&&(t[r]=void 0)}(f,d),f=function(t,e){var n;let r={};for(const o in t)null!=(null==(n=e[o])?void 0:n.urlName)?r[e[o].urlName]=t[o]:r[o]=t[o];return r}(f,d),v=s("push"===e||"replace"===e?f:{...p,...f}),(null==v?void 0:v.length)&&"?"!==v[0]&&(v=`?${v}`),null!=v?v:""}const E=t=>t(),O=t=>setTimeout((()=>t()),0),A=[];function S(t,e){const{adapter:n,options:a}=function(){const t=o.useContext(g);if(void 0===t||t===y)throw new Error("useQueryParams must be used within a QueryParamProvider");return t}(),[c]=(0,o.useState)(f),{paramConfigMap:s,options:l}=function(t,e){let n,r;return void 0===t?(n={},r=e):Array.isArray(t)?(n=Object.fromEntries(t.map((t=>[t,"inherit"]))),r=e):(n=t,r=e),{paramConfigMap:n,options:r}}(t,e),p=(0,o.useMemo)((()=>_(a,l)),[a,l]);let d=function(t,e){var n,o,i;const u={};let a=!1;const c=Object.keys(t);let s=c;if(e.includeKnownParams||!1!==e.includeKnownParams&&0===c.length){const t=Object.keys(null!=(n=e.params)?n:{});s.push(...t)}for(const n of s){const c=t[n];null==c||"object"!=typeof c?(a=!0,u[n]=null!=(i=null==(o=e.params)?void 0:o[n])?i:r.fr):u[n]=c}return a?u:t}(s,p);const h=m(p.searchStringToObject,n.location.search,function(t){let e;for(const n in t)if(t[n].urlName){const r=`${t[n].urlName}\0${n}`;e?e.push(r):e=[r]}return e?e.join("\n"):void 0}(d));p.includeAllParams&&(d=u(d,Object.keys(h),p.params,r.fr));const v=c(h,d,i),b=Object.keys(d).join("\0");(0,o.useEffect)((()=>{const t=b.split("\0");return i.registerParams(t),()=>{i.unregisterParams(t)}}),[b]);const w={adapter:n,paramConfigMap:d,options:p},S=(0,o.useRef)(w);null==S.current&&(S.current=w),(0,o.useEffect)((()=>{S.current.adapter=n,S.current.paramConfigMap=d,S.current.options=p}),[n,d,p]);const[k]=(0,o.useState)((()=>(t,e)=>{const{adapter:n,paramConfigMap:r,options:o}=S.current;null==e&&(e=o.updateType),function(t,{immediate:e}={}){A.push(t);let n=e?E:O;1===A.length&&n((()=>{const e=A.slice();A.length=0;const n=e[0].currentSearchString;let r;for(let t=0;t<e.length;++t)r=x(0===t?e[t]:{...e[t],currentSearchString:r});t.options.skipUpdateWhenNoChange&&r===n||function({searchString:t,adapter:e,navigate:n,updateType:r}){const o={...e.location,search:t};n&&("string"==typeof r&&r.startsWith("replace")?e.replace(o):e.push(o))}({searchString:null!=r?r:"",adapter:e[e.length-1].adapter,navigate:!0,updateType:e[e.length-1].updateType})}))}({changes:t,updateType:e,currentSearchString:n.location.search,paramConfigMap:r,options:o,adapter:n},{immediate:!o.enableBatching})}));return[v,k]}},5530:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=u(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=u(e,n));return e}function u(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},7940:(t,e,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{A:()=>r})},9408:(t,e,n)=>{"use strict";function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,{A:()=>o})},1927:(t,e,n)=>{"use strict";function r(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}n.d(e,{A:()=>r})},9989:(t,e,n)=>{"use strict";function r(){}function o(t){return null==t?r:function(){return this.querySelector(t)}}function i(){return[]}function u(t){return null==t?i:function(){return this.querySelectorAll(t)}}function a(t){return function(){return this.matches(t)}}function c(t){return function(e){return e.matches(t)}}n.d(e,{Sk5:()=>bn,hkb:()=>Mn,bC4:()=>Pn});var s=Array.prototype.find;function l(){return this.firstElementChild}var f=Array.prototype.filter;function p(){return Array.from(this.children)}function d(t){return new Array(t.length)}function h(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function v(t,e,n,r,o,i){for(var u,a=0,c=e.length,s=i.length;a<s;++a)(u=e[a])?(u.__data__=i[a],r[a]=u):n[a]=new h(t,i[a]);for(;a<c;++a)(u=e[a])&&(o[a]=u)}function m(t,e,n,r,o,i,u){var a,c,s,l=new Map,f=e.length,p=i.length,d=new Array(f);for(a=0;a<f;++a)(c=e[a])&&(d[a]=s=u.call(c,c.__data__,a,e)+"",l.has(s)?o[a]=c:l.set(s,c));for(a=0;a<p;++a)s=u.call(t,i[a],a,i)+"",(c=l.get(s))?(r[a]=c,c.__data__=i[a],l.delete(s)):n[a]=new h(t,i[a]);for(a=0;a<f;++a)(c=e[a])&&l.get(d[a])===c&&(o[a]=c)}function _(t){return t.__data__}function y(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function g(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}h.prototype={constructor:h,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var b="http://www.w3.org/1999/xhtml";const w={svg:"http://www.w3.org/2000/svg",xhtml:b,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function x(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),w.hasOwnProperty(e)?{space:w[e],local:t}:t}function E(t){return function(){this.removeAttribute(t)}}function O(t){return function(){this.removeAttributeNS(t.space,t.local)}}function A(t,e){return function(){this.setAttribute(t,e)}}function S(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function k(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function C(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function P(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function T(t,e,n){return function(){this.style.setProperty(t,e,n)}}function M(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function j(t,e){return t.style.getPropertyValue(e)||P(t).getComputedStyle(t,null).getPropertyValue(e)}function N(t){return function(){delete this[t]}}function D(t,e){return function(){this[t]=e}}function F(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function I(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new L(t)}function L(t){this._node=t,this._names=I(t.getAttribute("class")||"")}function U(t,e){for(var n=$(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function q(t,e){for(var n=$(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function B(t){return function(){U(this,t)}}function H(t){return function(){q(this,t)}}function W(t,e){return function(){(e.apply(this,arguments)?U:q)(this,t)}}function z(){this.textContent=""}function Y(t){return function(){this.textContent=t}}function K(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function X(){this.innerHTML=""}function V(t){return function(){this.innerHTML=t}}function Q(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function J(){this.nextSibling&&this.parentNode.appendChild(this)}function G(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Z(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===b&&e.documentElement.namespaceURI===b?e.createElement(t):e.createElementNS(n,t)}}function tt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function et(t){var e=x(t);return(e.local?tt:Z)(e)}function nt(){return null}function rt(){var t=this.parentNode;t&&t.removeChild(this)}function ot(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function it(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ut(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function at(t,e,n){return function(){var r,o=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var u=0,a=o.length;u<a;++u)if((r=o[u]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function ct(t,e,n){var r=P(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function st(t,e){return function(){return ct(this,t,e)}}function lt(t,e){return function(){return ct(this,t,e.apply(this,arguments))}}L.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ft=[null];function pt(t,e){this._groups=t,this._parents=e}function dt(){return new pt([[document.documentElement]],ft)}pt.prototype=dt.prototype={constructor:pt,select:function(t){"function"!=typeof t&&(t=o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var u,a,c=e[i],s=c.length,l=r[i]=new Array(s),f=0;f<s;++f)(u=c[f])&&(a=t.call(u,u.__data__,f,c))&&("__data__"in u&&(a.__data__=u.__data__),l[f]=a);return new pt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}(t):u(t);for(var e=this._groups,n=e.length,r=[],o=[],i=0;i<n;++i)for(var a,c=e[i],s=c.length,l=0;l<s;++l)(a=c[l])&&(r.push(t.call(a,a.__data__,l,c)),o.push(a));return new pt(r,o)},selectChild:function(t){return this.select(null==t?l:function(t){return function(){return s.call(this.children,t)}}("function"==typeof t?t:c(t)))},selectChildren:function(t){return this.selectAll(null==t?p:function(t){return function(){return f.call(this.children,t)}}("function"==typeof t?t:c(t)))},filter:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,u=e[o],c=u.length,s=r[o]=[],l=0;l<c;++l)(i=u[l])&&t.call(i,i.__data__,l,u)&&s.push(i);return new pt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,_);var n,r=e?m:v,o=this._parents,i=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var u=i.length,a=new Array(u),c=new Array(u),s=new Array(u),l=0;l<u;++l){var f=o[l],p=i[l],d=p.length,h=y(t.call(f,f&&f.__data__,l,o)),g=h.length,b=c[l]=new Array(g),w=a[l]=new Array(g);r(f,p,b,w,s[l]=new Array(d),h,e);for(var x,E,O=0,A=0;O<g;++O)if(x=b[O]){for(O>=A&&(A=O+1);!(E=w[A])&&++A<g;);x._next=E||null}}return(a=new pt(a,o))._enter=c,a._exit=s,a},enter:function(){return new pt(this._enter||this._groups.map(d),this._parents)},exit:function(){return new pt(this._exit||this._groups.map(d),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,u=Math.min(o,i),a=new Array(o),c=0;c<u;++c)for(var s,l=n[c],f=r[c],p=l.length,d=a[c]=new Array(p),h=0;h<p;++h)(s=l[h]||f[h])&&(d[h]=s);for(;c<o;++c)a[c]=n[c];return new pt(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,u=o[i];--i>=0;)(r=o[i])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=g);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var u,a=n[i],c=a.length,s=o[i]=new Array(c),l=0;l<c;++l)(u=a[l])&&(s[l]=u);s.sort(e)}return new pt(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var u=r[o];if(u)return u}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],u=0,a=i.length;u<a;++u)(o=i[u])&&t.call(o,o.__data__,u,i);return this},attr:function(t,e){var n=x(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?O:E:"function"==typeof e?n.local?C:k:n.local?S:A)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?R:"function"==typeof e?M:T)(t,e,null==n?"":n)):j(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?N:"function"==typeof e?F:D)(t,e)):this.node()[t]},classed:function(t,e){var n=I(t+"");if(arguments.length<2){for(var r=$(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?W:e?B:H)(n,e))},text:function(t){return arguments.length?this.each(null==t?z:("function"==typeof t?K:Y)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?X:("function"==typeof t?Q:V)(t)):this.node().innerHTML},raise:function(){return this.each(J)},lower:function(){return this.each(G)},append:function(t){var e="function"==typeof t?t:et(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:et(t),r=null==e?nt:"function"==typeof e?e:o(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(rt)},clone:function(t){return this.select(t?it:ot)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),u=i.length;if(!(arguments.length<2)){for(a=e?at:ut,r=0;r<u;++r)this.each(a(i[r],e,n));return this}var a=this.node().__on;if(a)for(var c,s=0,l=a.length;s<l;++s)for(r=0,c=a[s];r<u;++r)if((o=i[r]).type===c.type&&o.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?lt:st)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,o=t[e],i=0,u=o.length;i<u;++i)(r=o[i])&&(yield r)}};const ht=dt;var vt={value:()=>{}};function mt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new _t(r)}function _t(t){this._=t}function yt(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function gt(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=vt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}_t.prototype=mt.prototype={constructor:_t,on:function(t,e){var n,r,o=this._,i=(r=o,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),u=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<a;)if(n=(t=i[u]).type)o[n]=gt(o[n],t.name,e);else if(null==e)for(n in o)o[n]=gt(o[n],t.name,null);return this}for(;++u<a;)if((n=(t=i[u]).type)&&(n=yt(o[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new _t(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};const bt=mt;var wt,xt,Et=0,Ot=0,At=0,St=1e3,kt=0,Ct=0,Pt=0,Rt="object"==typeof performance&&performance.now?performance:Date,Tt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Mt(){return Ct||(Tt(jt),Ct=Rt.now()+Pt)}function jt(){Ct=0}function Nt(){this._call=this._time=this._next=null}function Dt(t,e,n){var r=new Nt;return r.restart(t,e,n),r}function Ft(){Ct=(kt=Rt.now())+Pt,Et=Ot=0;try{!function(){Mt(),++Et;for(var t,e=wt;e;)(t=Ct-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Et}()}finally{Et=0,function(){for(var t,e,n=wt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:wt=e);xt=t,$t(r)}(),Ct=0}}function It(){var t=Rt.now(),e=t-kt;e>St&&(Pt-=e,kt=t)}function $t(t){Et||(Ot&&(Ot=clearTimeout(Ot)),t-Ct>24?(t<1/0&&(Ot=setTimeout(Ft,t-Rt.now()-Pt)),At&&(At=clearInterval(At))):(At||(kt=Rt.now(),At=setInterval(It,St)),Et=1,Tt(Ft)))}function Lt(t,e,n){var r=new Nt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Nt.prototype=Dt.prototype={constructor:Nt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Mt():+n)+(null==e?0:+e),this._next||xt===this||(xt?xt._next=this:wt=this,xt=this),this._call=t,this._time=n,$t()},stop:function(){this._call&&(this._call=null,this._time=1/0,$t())}};var Ut=bt("start","end","cancel","interrupt"),qt=[],Bt=0,Ht=3;function Wt(t,e,n,r,o,i){var u=t.__transition;if(u){if(n in u)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(c){var s,l,f,p;if(1!==n.state)return a();for(s in o)if((p=o[s]).name===n.name){if(p.state===Ht)return Lt(i);4===p.state?(p.state=6,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete o[s]):+s<e&&(p.state=6,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete o[s])}if(Lt((function(){n.state===Ht&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=Ht,r=new Array(f=n.tween.length),s=0,l=-1;s<f;++s)(p=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=p);r.length=l+1}}function u(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(a),n.state=5,1),i=-1,u=r.length;++i<u;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),a())}function a(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Dt((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:o,on:Ut,tween:qt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Bt})}function zt(t,e){var n=Kt(t,e);if(n.state>Bt)throw new Error("too late; already scheduled");return n}function Yt(t,e){var n=Kt(t,e);if(n.state>Ht)throw new Error("too late; already running");return n}function Kt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Xt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Vt,Qt=180/Math.PI,Jt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gt(t,e,n,r,o,i){var u,a,c;return(u=Math.sqrt(t*t+e*e))&&(t/=u,e/=u),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,c/=a),t*r<e*n&&(t=-t,e=-e,c=-c,u=-u),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*Qt,skewX:Math.atan(c)*Qt,scaleX:u,scaleY:a}}function Zt(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,u){var a=[],c=[];return i=t(i),u=t(u),function(t,r,o,i,u,a){if(t!==o||r!==i){var c=u.push("translate(",null,e,null,n);a.push({i:c-4,x:Xt(t,o)},{i:c-2,x:Xt(r,i)})}else(o||i)&&u.push("translate("+o+e+i+n)}(i.translateX,i.translateY,u.translateX,u.translateY,a,c),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Xt(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,u.rotate,a,c),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Xt(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,u.skewX,a,c),function(t,e,n,r,i,u){if(t!==n||e!==r){var a=i.push(o(i)+"scale(",null,",",null,")");u.push({i:a-4,x:Xt(t,n)},{i:a-2,x:Xt(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,u.scaleX,u.scaleY,a,c),i=u=null,function(t){for(var e,n=-1,r=c.length;++n<r;)a[(e=c[n]).i]=e.x(t);return a.join("")}}}var te=Zt((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Jt:Gt(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ee=Zt((function(t){return null==t?Jt:(Vt||(Vt=document.createElementNS("http://www.w3.org/2000/svg","g")),Vt.setAttribute("transform",t),(t=Vt.transform.baseVal.consolidate())?Gt((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Jt)}),", ",")",")");function ne(t,e){var n,r;return function(){var o=Yt(this,t),i=o.tween;if(i!==n)for(var u=0,a=(r=n=i).length;u<a;++u)if(r[u].name===e){(r=r.slice()).splice(u,1);break}o.tween=r}}function re(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Yt(this,t),u=i.tween;if(u!==r){o=(r=u).slice();for(var a={name:e,value:n},c=0,s=o.length;c<s;++c)if(o[c].name===e){o[c]=a;break}c===s&&o.push(a)}i.tween=o}}function oe(t,e,n){var r=t._id;return t.each((function(){var t=Yt(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Kt(t,r).value[e]}}function ie(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ue(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ae(){}var ce=.7,se=1/ce,le="\\s*([+-]?\\d+)\\s*",fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",de=/^#([0-9a-f]{3,8})$/,he=new RegExp(`^rgb\\(${le},${le},${le}\\)$`),ve=new RegExp(`^rgb\\(${pe},${pe},${pe}\\)$`),me=new RegExp(`^rgba\\(${le},${le},${le},${fe}\\)$`),_e=new RegExp(`^rgba\\(${pe},${pe},${pe},${fe}\\)$`),ye=new RegExp(`^hsl\\(${fe},${pe},${pe}\\)$`),ge=new RegExp(`^hsla\\(${fe},${pe},${pe},${fe}\\)$`),be={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function we(){return this.rgb().formatHex()}function xe(){return this.rgb().formatRgb()}function Ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=de.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Oe(e):3===n?new ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Ae(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Ae(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=he.exec(t))?new ke(e[1],e[2],e[3],1):(e=ve.exec(t))?new ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=me.exec(t))?Ae(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ye.exec(t))?je(e[1],e[2]/100,e[3]/100,1):(e=ge.exec(t))?je(e[1],e[2]/100,e[3]/100,e[4]):be.hasOwnProperty(t)?Oe(be[t]):"transparent"===t?new ke(NaN,NaN,NaN,0):null}function Oe(t){return new ke(t>>16&255,t>>8&255,255&t,1)}function Ae(t,e,n,r){return r<=0&&(t=e=n=NaN),new ke(t,e,n,r)}function Se(t,e,n,r){return 1===arguments.length?((o=t)instanceof ae||(o=Ee(o)),o?new ke((o=o.rgb()).r,o.g,o.b,o.opacity):new ke):new ke(t,e,n,null==r?1:r);var o}function ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ce(){return`#${Me(this.r)}${Me(this.g)}${Me(this.b)}`}function Pe(){const t=Re(this.opacity);return`${1===t?"rgb(":"rgba("}${Te(this.r)}, ${Te(this.g)}, ${Te(this.b)}${1===t?")":`, ${t})`}`}function Re(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Te(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Me(t){return((t=Te(t))<16?"0":"")+t.toString(16)}function je(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new De(t,e,n,r)}function Ne(t){if(t instanceof De)return new De(t.h,t.s,t.l,t.opacity);if(t instanceof ae||(t=Ee(t)),!t)return new De;if(t instanceof De)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),u=NaN,a=i-o,c=(i+o)/2;return a?(u=e===i?(n-r)/a+6*(n<r):n===i?(r-e)/a+2:(e-n)/a+4,a/=c<.5?i+o:2-i-o,u*=60):a=c>0&&c<1?0:u,new De(u,a,c,t.opacity)}function De(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Fe(t){return(t=(t||0)%360)<0?t+360:t}function Ie(t){return Math.max(0,Math.min(1,t||0))}function $e(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Le(t,e,n,r,o){var i=t*t,u=i*t;return((1-3*t+3*i-u)*e+(4-6*i+3*u)*n+(1+3*t+3*i-3*u)*r+u*o)/6}ie(ae,Ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:we,formatHex:we,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ne(this).formatHsl()},formatRgb:xe,toString:xe}),ie(ke,Se,ue(ae,{brighter(t){return t=null==t?se:Math.pow(se,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ce:Math.pow(ce,t),new ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ke(Te(this.r),Te(this.g),Te(this.b),Re(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ce,formatHex:Ce,formatHex8:function(){return`#${Me(this.r)}${Me(this.g)}${Me(this.b)}${Me(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pe,toString:Pe})),ie(De,(function(t,e,n,r){return 1===arguments.length?Ne(t):new De(t,e,n,null==r?1:r)}),ue(ae,{brighter(t){return t=null==t?se:Math.pow(se,t),new De(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ce:Math.pow(ce,t),new De(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new ke($e(t>=240?t-240:t+120,o,r),$e(t,o,r),$e(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new De(Fe(this.h),Ie(this.s),Ie(this.l),Re(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Re(this.opacity);return`${1===t?"hsl(":"hsla("}${Fe(this.h)}, ${100*Ie(this.s)}%, ${100*Ie(this.l)}%${1===t?")":`, ${t})`}`}}));const Ue=t=>()=>t;function qe(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ue(isNaN(t)?e:t)}const Be=function t(e){var n=function(t){return 1==(t=+t)?qe:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ue(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Se(t)).r,(e=Se(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),u=qe(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=u(e),t+""}}return r.gamma=t,r}(1);function He(t){return function(e){var n,r,o=e.length,i=new Array(o),u=new Array(o),a=new Array(o);for(n=0;n<o;++n)r=Se(e[n]),i[n]=r.r||0,u[n]=r.g||0,a[n]=r.b||0;return i=t(i),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=i(t),r.g=u(t),r.b=a(t),r+""}}}He((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],i=t[r+1],u=r>0?t[r-1]:2*o-i,a=r<e-1?t[r+2]:2*i-o;return Le((n-r/e)*e,u,o,i,a)}})),He((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],u=t[(r+1)%e],a=t[(r+2)%e];return Le((n-r/e)*e,o,i,u,a)}}));var We=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ze=new RegExp(We.source,"g");function Ye(t,e){var n,r,o,i=We.lastIndex=ze.lastIndex=0,u=-1,a=[],c=[];for(t+="",e+="";(n=We.exec(t))&&(r=ze.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),a[u]?a[u]+=o:a[++u]=o),(n=n[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:Xt(n,r)})),i=ze.lastIndex;return i<e.length&&(o=e.slice(i),a[u]?a[u]+=o:a[++u]=o),a.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)a[(n=c[r]).i]=n.x(t);return a.join("")})}function Ke(t,e){var n;return("number"==typeof e?Xt:e instanceof Ee?Be:(n=Ee(e))?(e=n,Be):Ye)(t,e)}function Xe(t){return function(){this.removeAttribute(t)}}function Ve(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qe(t,e,n){var r,o,i=n+"";return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=e(r=u,n)}}function Je(t,e,n){var r,o,i=n+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=e(r=u,n)}}function Ge(t,e,n){var r,o,i;return function(){var u,a,c=n(this);if(null!=c)return(u=this.getAttribute(t))===(a=c+"")?null:u===r&&a===o?i:(o=a,i=e(r=u,c));this.removeAttribute(t)}}function Ze(t,e,n){var r,o,i;return function(){var u,a,c=n(this);if(null!=c)return(u=this.getAttributeNS(t.space,t.local))===(a=c+"")?null:u===r&&a===o?i:(o=a,i=e(r=u,c));this.removeAttributeNS(t.space,t.local)}}function tn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,o)),n}return o._value=e,o}function en(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,o)),n}return o._value=e,o}function nn(t,e){return function(){zt(this,t).delay=+e.apply(this,arguments)}}function rn(t,e){return e=+e,function(){zt(this,t).delay=e}}function on(t,e){return function(){Yt(this,t).duration=+e.apply(this,arguments)}}function un(t,e){return e=+e,function(){Yt(this,t).duration=e}}var an=ht.prototype.constructor;function cn(t){return function(){this.style.removeProperty(t)}}var sn=0;function ln(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function fn(){return++sn}var pn=ht.prototype;ln.prototype=function(t){return ht().transition(t)}.prototype={constructor:ln,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=o(t));for(var r=this._groups,i=r.length,u=new Array(i),a=0;a<i;++a)for(var c,s,l=r[a],f=l.length,p=u[a]=new Array(f),d=0;d<f;++d)(c=l[d])&&(s=t.call(c,c.__data__,d,l))&&("__data__"in c&&(s.__data__=c.__data__),p[d]=s,Wt(p[d],e,n,d,p,Kt(c,n)));return new ln(u,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,o=r.length,i=[],a=[],c=0;c<o;++c)for(var s,l=r[c],f=l.length,p=0;p<f;++p)if(s=l[p]){for(var d,h=t.call(s,s.__data__,p,l),v=Kt(s,n),m=0,_=h.length;m<_;++m)(d=h[m])&&Wt(d,e,n,m,h,v);i.push(h),a.push(s)}return new ln(i,a,e,n)},selectChild:pn.selectChild,selectChildren:pn.selectChildren,filter:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,u=e[o],c=u.length,s=r[o]=[],l=0;l<c;++l)(i=u[l])&&t.call(i,i.__data__,l,u)&&s.push(i);return new ln(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,o=n.length,i=Math.min(r,o),u=new Array(r),a=0;a<i;++a)for(var c,s=e[a],l=n[a],f=s.length,p=u[a]=new Array(f),d=0;d<f;++d)(c=s[d]||l[d])&&(p[d]=c);for(;a<r;++a)u[a]=e[a];return new ln(u,this._parents,this._name,this._id)},selection:function(){return new an(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=fn(),r=this._groups,o=r.length,i=0;i<o;++i)for(var u,a=r[i],c=a.length,s=0;s<c;++s)if(u=a[s]){var l=Kt(u,e);Wt(u,t,n,s,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new ln(r,this._parents,t,n)},call:pn.call,nodes:pn.nodes,node:pn.node,size:pn.size,empty:pn.empty,each:pn.each,on:function(t,e){var n=this._id;return arguments.length<2?Kt(this.node(),n).on.on(t):this.each(function(t,e,n){var r,o,i=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?zt:Yt;return function(){var u=i(this,t),a=u.on;a!==r&&(o=(r=a).copy()).on(e,n),u.on=o}}(n,t,e))},attr:function(t,e){var n=x(t),r="transform"===n?ee:Ke;return this.attrTween(t,"function"==typeof e?(n.local?Ze:Ge)(n,r,oe(this,"attr."+t,e)):null==e?(n.local?Ve:Xe)(n):(n.local?Je:Qe)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=x(t);return this.tween(n,(r.local?tn:en)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?te:Ke;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=j(this,t),u=(this.style.removeProperty(t),j(this,t));return i===u?null:i===n&&u===r?o:o=e(n=i,r=u)}}(t,r)).on("end.style."+t,cn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var u=j(this,t),a=n(this),c=a+"";return null==a&&(this.style.removeProperty(t),c=a=j(this,t)),u===c?null:u===r&&c===o?i:(o=c,i=e(r=u,a))}}(t,r,oe(this,"style."+t,e))).each(function(t,e){var n,r,o,i,u="style."+e,a="end."+u;return function(){var c=Yt(this,t),s=c.on,l=null==c.value[u]?i||(i=cn(e)):void 0;s===n&&o===l||(r=(n=s).copy()).on(a,o=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var u=j(this,t);return u===i?null:u===r?o:o=e(r=u,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,i,n)),r}return i._value=e,i}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(oe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=Kt(this.node(),n).tween,i=0,u=o.length;i<u;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?ne:re)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?nn:rn)(e,t)):Kt(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?on:un)(e,t)):Kt(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){Yt(this,t).ease=e}}(e,t)):Kt(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Yt(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,u){var a={value:u},c={value:function(){0==--o&&i()}};n.each((function(){var n=Yt(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),n.on=e})),0===o&&i()}))},[Symbol.iterator]:pn[Symbol.iterator]};var dn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function hn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}ht.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,o,i=t.__transition,u=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete i[o]):u=!1;u&&delete t.__transition}}(this,t)}))},ht.prototype.transition=function(t){var e,n;t instanceof ln?(e=t._id,t=t._name):(e=fn(),(n=dn).time=Mt(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var u,a=r[i],c=a.length,s=0;s<c;++s)(u=a[s])&&Wt(u,t,e,s,a,n||hn(u,e));return new ln(r,this._parents,t,e)};const{abs:vn,max:mn,min:_n}=Math;function yn(t){return{type:t}}function gn(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function bn(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=xn)):void 0===e&&(e=wn);for(var n,r,o,i,u,a=new An(t),c=[a];n=c.pop();)if((o=e(n.data))&&(u=(o=Array.from(o)).length))for(n.children=o,i=u-1;i>=0;--i)c.push(r=o[i]=new An(o[i])),r.parent=n,r.depth=n.depth+1;return a.eachBefore(On)}function wn(t){return t.children}function xn(t){return Array.isArray(t)?t[1]:null}function En(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function On(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function An(t){this.data=t,this.depth=this.height=0,this.parent=null}function Sn(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function kn(t,e,n,r,o){for(var i,u=t.children,a=-1,c=u.length,s=t.value&&(r-e)/t.value;++a<c;)(i=u[a]).y0=n,i.y1=o,i.x0=e,i.x1=e+=i.value*s}function Cn(t,e,n,r,o){for(var i,u=t.children,a=-1,c=u.length,s=t.value&&(o-n)/t.value;++a<c;)(i=u[a]).x0=e,i.x1=r,i.y0=n,i.y1=n+=i.value*s}["w","e"].map(yn),["n","s"].map(yn),["n","w","e","s","nw","ne","sw","se"].map(yn),An.prototype=bn.prototype={constructor:An,count:function(){return this.eachAfter(gn)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,o,i=this,u=[i],a=[],c=-1;i=u.pop();)if(a.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)u.push(n[r]);for(;i=a.pop();)t.call(e,i,++c,this);return this},eachBefore:function(t,e){for(var n,r,o=this,i=[o],u=-1;o=i.pop();)if(t.call(e,o,++u,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,o=r&&r.length;--o>=0;)n+=r[o].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),o=null;for(t=n.pop(),e=r.pop();t===e;)o=t,t=n.pop(),e=r.pop();return o}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var o=r.length;t!==n;)r.splice(o,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return bn(this).eachBefore(En)},[Symbol.iterator]:function*(){var t,e,n,r,o=this,i=[o];do{for(t=i.reverse(),i=[];o=t.pop();)if(yield o,e=o.children)for(n=0,r=e.length;n<r;++n)i.push(e[n])}while(i.length)}};const Pn=function t(e){function n(t,n,r,o,i){!function(t,e,n,r,o,i){for(var u,a,c,s,l,f,p,d,h,v,m,_=[],y=e.children,g=0,b=0,w=y.length,x=e.value;g<w;){c=o-n,s=i-r;do{l=y[b++].value}while(!l&&b<w);for(f=p=l,m=l*l*(v=Math.max(s/c,c/s)/(x*t)),h=Math.max(p/m,m/f);b<w;++b){if(l+=a=y[b].value,a<f&&(f=a),a>p&&(p=a),m=l*l*v,(d=Math.max(p/m,m/f))>h){l-=a;break}h=d}_.push(u={value:l,dice:c<s,children:y.slice(g,b)}),u.dice?kn(u,n,r,o,x?r+=s*l/x:i):Cn(u,n,r,x?n+=c*l/x:o,i),x-=l,g=b}}(e,t,n,r,o,i)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Rn(){return 0}function Tn(t){return function(){return t}}function Mn(){var t=Pn,e=!1,n=1,r=1,o=[0],i=Rn,u=Rn,a=Rn,c=Rn,s=Rn;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),o=[0],e&&t.eachBefore(Sn),t}function f(e){var n=o[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,p=e.y1-n;f<r&&(r=f=(r+f)/2),p<l&&(l=p=(l+p)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=p,e.children&&(n=o[e.depth+1]=i(e)/2,r+=s(e)-n,l+=u(e)-n,(f-=a(e)-n)<r&&(r=f=(r+f)/2),(p-=c(e)-n)<l&&(l=p=(l+p)/2),t(e,r,l,f,p))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=function(t){if("function"!=typeof t)throw new Error;return t}(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(i="function"==typeof t?t:Tn(+t),l):i},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Tn(+t),l):u},l.paddingRight=function(t){return arguments.length?(a="function"==typeof t?t:Tn(+t),l):a},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Tn(+t),l):c},l.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:Tn(+t),l):s},l}function jn(t,e,n){this.k=t,this.x=e,this.y=n}jn.prototype={constructor:jn,scale:function(t){return 1===t?this:new jn(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new jn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new jn(1,0,0),jn.prototype},6260:(t,e,n)=>{"use strict";n.d(e,{FK:()=>r.FK,Y:()=>i,FD:()=>i}),n(2585);var r=n(754),o=0;function i(t,e,n,i,u,a){e||(e={});var c,s,l=e;if("ref"in l)for(s in l={},e)"ref"==s?c=e[s]:l[s]=e[s];var f={type:t,props:l,key:n,ref:c,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--o,__i:-1,__u:0,__source:u,__self:a};if("function"==typeof t&&(c=t.defaultProps))for(s in c)void 0===l[s]&&(l[s]=c[s]);return r.fF.vnode&&r.fF.vnode(f),f}Array.isArray},9685:(t,e,n)=>{"use strict";n.d(e,{A:()=>i});var r=!0,o="Invariant failed";function i(t,e){if(!t){if(r)throw new Error(o);var n="function"==typeof e?e():e,i=n?"".concat(o,": ").concat(n):o;throw new Error(i)}}}}]);</script><script>(()=>{"use strict";var e,t={3556:(e,t,a)=>{var l=a(754),n=a(7598),s=a.n(n),r=a(2585),i=a(5530),o=a.n(i);const c="no-space",u={DEFAULT:"default",SUCCESS:"success",INFO:"info",WARNING:"warning",DANGER:"danger"},d={SMALL:"small",MEDIUM:"medium",LARGE:"large"},m={root:"jFX2U",outline:"x5Qne",outlineHover:"bjS72","padding-xxxsmall":"CRtiy","padding-xxsmall":"V8D2V","padding-xsmall":"lMRbm","padding-small":"zjg3n","padding-medium":"GcnI5","padding-large":"tOvS2","padding-xlarge":"NxVkB","padding-xxlarge":"U_Mf5","padding-xxxlarge":"DmgFn","horizontal-padding-xxxsmall":"cONyd","horizontal-padding-xxsmall":"xjUuY","horizontal-padding-xsmall":"cYz9P","horizontal-padding-small":"D94M_","horizontal-padding-medium":"_gcXv","horizontal-padding-large":"sfSMH","horizontal-padding-xlarge":"hZSju","horizontal-padding-xxlarge":"OwUsJ","horizontal-padding-xxxlarge":"YeVhJ","vertical-padding-xxxsmall":"DN6QT","vertical-padding-xxsmall":"RV1CV","vertical-padding-xsmall":"lmh6q","vertical-padding-small":"Lkz15","vertical-padding-medium":"u2BRV","vertical-padding-large":"npjfL","vertical-padding-xlarge":"Ugap2","vertical-padding-xxlarge":"keeo7","vertical-padding-xxxlarge":"NEE_l"},p=e=>{const{className:t="",as:a="div",padding:l=c,horizontalPadding:n="",verticalPadding:s="",outline:i=!1,outlineHover:u=!1,...d}=e,[p,f,E]=Array.isArray(l)?[null,...l]:[l,s,n],h=o()(m.root,t,p&&m[`padding-${p}`],f&&m[`vertical-padding-${f}`],E&&m[`horizontal-padding-${E}`],i&&m.outline,u&&m.outlineHover);return r.default.createElement(a,{...d,className:h})};var f=a(4399);const E={root:"rocGb",icon:"GMh3K",small:"qNuBc",medium:"kbMQl",large:"stObN"},h={SMALL:"small",MEDIUM:"medium",LARGE:"large"},g=e=>{const{className:t="",glyph:a,as:l="span",size:n=h.MEDIUM,...s}=e;return r.default.createElement(l,{className:o()(E.root,t,E[n]),...s},r.default.createElement("svg",{className:E.icon},r.default.createElement("use",{xlinkHref:`#${a}`})))};g.ICONS={ARROW:"arrow",ARROW_RIGHT_CIRCLE:"arrow-right-circle",CANCEL:"close",CHEVRON_DOWN:"chevron-down",CHEVRON_UP:"chevron-up",CHECK:"check",CLOSE:"close",CLOCK:"clock",COMMIT:"commit",ERROR:"error",EXTERNAL_LINK:"external-link",FILTER:"filter",GITHUB:"github",INFO:"info",HELP:"help",TABLE:"table",TREEMAP:"treemap",MENU:"menu",MORE_VERTICAL:"more-vertical",SORT:"sort",WARNING:"warning"},g.SIZE_SMALL=h.SMALL,g.SIZE_MEDIUM=h.MEDIUM,g.SIZE_LARGE=h.LARGE,g.SIZES=Object.values(h);const N={root:"EFuml",glyph:"Nyvbd",text:"gWIKL",primary:"W4XX3",secondary:"gGatE",danger:"Qjb2h",warning:"poKjD",info:"MSqcm",success:"_r0E8",solid:"eH5rY","solid--primary":"GOqz_","solid--secondary":"MxkYI","solid--danger":"dWgaM","solid--warning":"dFoSg","solid--info":"UXC0p","solid--success":"g6Yqw",small:"mX6mG",medium:"yMswC",large:"pFf_H",outline:"oBfzH","outline--primary":"Soj_M","outline--secondary":"I98KK","outline--danger":"rDTX4","outline--warning":"cuFPt","outline--info":"UX3hn","outline--success":"p5QU7",padding:"NOGdA","radius--small":"tfXrI","radius--medium":"k7OaM","radius--large":"YPruu","radius--circle":"I0uC5",active:"rmwic","active-outline-default":"pqsjd","active-outline-primary":"QrdD_","active-outline-secondary":"jjPXS","active-outline-info":"KSu4p","active-outline-success":"Tj8ee","active-outline-warning":"UupXK","active-outline-danger":"aK8wU"},b={SMALL:"small",MEDIUM:"medium",LARGE:"large"},y=r.default.forwardRef((e=>{const{className:t="",outline:a=!1,solid:l=!1,active:n=!1,kind:s="default",size:i="medium",radius:c="",padding:u="",as:d=f.$,children:m=null,Icon:p=g,glyph:E,rightGlyph:h,...y}=e,v=u||(a||l)&&i,I=c||(a||l)&&i,T=Object.values(b).includes(i)?i:b.MEDIUM,C=o()(N.root,s&&N[s],N[T],a&&N.outline,a&&N[`outline--${s}`],l&&N.solid,l&&N[`solid--${s}`],v&&N.padding,I&&N[`radius--${I}`],n&&N.active,n&&a&&N[`active-outline-${s}`],t);return r.default.createElement(d,{...y,className:C},E&&r.default.createElement(p,{glyph:E,className:N.glyph}),m&&r.default.createElement("span",{className:N.content},m),h&&r.default.createElement(p,{glyph:h,className:N.glyph}))})),v={inner:"PvGyj"},I=({as:e="div",className:t="",...a})=>r.default.createElement(e,{className:o()(v.root,t)},r.default.createElement("div",{className:v.inner,...a})),T={root:"AEJd2","space--xxxsmall":"h9gN4","space--xxsmall":"gBEci","space--xsmall":"vS3hA","space--small":"oKxD_","space--medium":"G2zRW","space--large":"UIjxW","space--xlarge":"MarJr","space--xxlarge":"QysNl","space--xxxlarge":"mc3LV","align-items--flex-start":"a_45D","align-items--flex-end":"_Dx7c","align-items--center":"GUAon","align-items--baseline":"SNkiI",inline:"xiI0S"},C=e=>{const{as:t="div",className:a="",space:l=c,inline:n=!1,alignItems:s="",...i}=e,u=o()(T.root,T[`space--${l}`],T[`align-items--${s}`],n&&T.inline,a);return r.default.createElement(t,{...i,className:u})},S=e=>{const{className:t="",...a}=e;return r.default.createElement(C,{className:o()("m2y31",t),space:"no-space",alignItems:"center",...a})};var k=a(5470),w=a(7034),A=a(659),O=a(4521);const L=e=>{const{className:t="",isActive:a=!1,...l}=e;return r.default.createElement(k.D,{className:o()("_JC5R",t,a&&"Jaw0u"),...l})},R=e=>{const{className:t="",dropdownClassName:a="",label:l=null,ariaLabel:n="",glyph:s="",disabled:i=!1,children:c}=e,u=n||("string"==typeof l?l:""),d=(0,w.E)();return r.default.createElement(r.default.Fragment,null,r.default.createElement(A.I,{as:y,outline:!0,size:b.SMALL,glyph:s,disabled:i,state:d,tabIndex:null,className:o()("ZSX6s",t)},l),r.default.createElement(O.W,{portal:!0,state:d,"aria-label":u,className:o()("jfvJI",a)},c))},M="Assets",P="Modules",x="Packages",D="Reset filters",_="View all entries",F="View BundleStats project on GitHub";a(755);var V=a(2004),$=a.n(V);function z(e){const t=e.map((e=>{var t,a;return(null===(a=null===(t=null==e?void 0:e.meta)||void 0===t?void 0:t.webpack)||void 0===a?void 0:a.chunks)||[]})),a=$()(t.flat(),(({id:e})=>e)),l=null==a?void 0:a.map((({id:e})=>e));return{chunks:a,chunkIds:l}}const j={root:"ScUMJ",item:"dMcgj","space--xxxsmall":"jVPHf","space--xxsmall":"mZt7V","space--xsmall":"QiDWh","space--small":"dAKU3","space--medium":"MF3sp","space--large":"dd5hq","space--xlarge":"uMiL7","space--xxlarge":"yeSk_","space--xxxlarge":"FYCtQ"},G=e=>{const{className:t="",as:a="div",space:l=c,children:n,...s}=e,i=o()(j.root,t,j[`space--${l}`]);return r.default.createElement(a,{...s,className:i},r.default.Children.map(n,(e=>t=>{if(null===t||""===t)return null;const{props:a}=t;return a?r.default.cloneElement(t,{...a,className:o()(e,a.className)}):r.default.createElement("div",{className:e},t)})(j.item)))},H={root:"IQblr"},B=e=>{const{resources:t,filtered:a,handleResetFilters:l,handleViewAll:n}=e,s=a?`No ${t} found.`:`No ${t} available.`,i=[...l?[r.default.createElement(y,{kind:"primary",type:"button",onClick:l,className:H.action},D)]:[],...n?[r.default.createElement(y,{kind:"primary",type:"button",onClick:n,className:H.action},_)]:[]];return r.default.createElement(G,{space:"xxxsmall",className:H.root},r.default.createElement("p",null,s),a&&i.map(((e,t)=>r.default.createElement(r.default.Fragment,null,t>0&&" or ",e))))};B.propTypes={resources:s().string.isRequired,filtered:s().bool.isRequired,handleResetFilters:s().func,handleViewAll:s().func},B.defaultProps={handleResetFilters:null,handleViewAll:null};const U=({className:e,as:t,name:a})=>r.default.createElement(t,{className:o()("OnoY5",e)},a);U.defaultProps={className:"",as:"span",name:""},U.propTypes={className:s().string,as:s().elementType,name:s().string|s().node};var Z=a(8434),q=a.n(Z),W=a(1582),K=a.n(W);const J={NONE:"none",ALL:"all"},X=(e,t)=>{if("object"!=typeof t)return{};if("defaultValue"in t)return{[e]:t.defaultValue};if("children"in t){const a={};return t.children.forEach((({key:t,defaultValue:l})=>{const n=[...e?[e]:[],t].join(".");a[n]=l})),a}let a={};return Object.entries(t).forEach((([t,l])=>{if("object"==typeof l){const n=[...e?[e]:[],t].join("."),s=X(n,l);a={...a,...s}}})),a};var Y=a(3803),Q=a.n(Y),ee=a(7600),te=a.n(ee);const ae={root:"Em6m6",small:"oMDYc",large:"XkDYU"},le=e=>{const{className:t="",size:a="medium",...l}=e,n=o()(ae.root,t,ae[a]);return r.default.createElement("input",{className:n,...l})},ne=e=>{const{className:t="",placeholder:a="Search",defaultValue:l="",onChange:n=te(),debounceWait:s=500}=e,i=o()("OmIx9",t),[c,u]=(0,r.useState)(l);(0,r.useEffect)((()=>{u(l)}),[l]);const d=(0,r.useCallback)(Q()(n,s),[n]),m=(0,r.useCallback)((e=>{e!==c&&(d(e),u(e))}),[u,c]),p=(0,r.useCallback)((e=>{m(e.target.value)}),[m]),f=(0,r.useCallback)((()=>{m("")}),[m]);return r.default.createElement("div",{className:i},r.default.createElement(le,{className:"eWuzY",placeholder:a,onChange:p,value:c,size:"small",autoComplete:"off"}),c&&r.default.createElement(y,{size:"small",radius:"circle",glyph:g.ICONS.CANCEL,type:"button",onClick:f,"aria-label":"Clear search",className:"k0DC4"}))},se={itemLast:"Jjk3c",filter:"KenD5",filterControl:"Gza4p",filterLabel:"BqueW",filterSingle:"dpJTJ",filterGroupItems:"JU_Tp",filterGroupItem:"jJITT",filterGroupItemFilter:"UoUtC",filterGroupOnlyButton:"eiMyW",filterGroupLabelSuffixCustom:"oKvSG",filterGroupSearchWrapper:"dFw6E",filterGroupSearchNotFound:"l7IKd",filterGroupActions:"dy5tU"},re=e=>{const{className:t="",label:a,name:l,...n}=e;return r.default.createElement(C,{space:"xxxsmall",alignItems:"center",as:"label",className:o()(se.filter,t)},r.default.createElement("input",{type:"checkbox",id:`filter-${l}`,name:l,...n,className:se.filterControl}),r.default.createElement("span",{title:a,className:se.filterLabel},a))},ie=e=>{const{className:t="",groupKey:a,data:l,values:n,onCheckboxChange:s,toggleFilters:i}=e,{label:c,children:u}=l,[d,m]=(0,r.useState)(""),p=u.map((({key:e})=>null==n?void 0:n[`${a}.${e}`])).reduce(((e,t)=>e&&t),!0),f=(e=>{const t=e.length,a=e.filter((({defaultValue:e})=>e)),l=a.length;if(0===l)return J.NONE;if(l===t)return J.ALL;const n=a.map((({label:e})=>e));let s="",r=0,i=!1;for(let e=0;!i&&e<n.length&&18-s.length>=0;e++){const t=18-s.length,a=n[e];let l="";t-a.length>=0?l=a:t>=6&&(l=`${a.substr(0,t-3)}...`),l?(s=`${s}${s?", ":""}${l}`,r=e+1):i=!0}const o=l-r;return`${s}${o>0?` +${o}`:""}`})(u),E=!Object.values(J).includes(f),h=r.default.createElement(r.default.Fragment,null,`${c}:`," ",r.default.createElement("span",{className:o()(E&&se.filterGroupLabelSuffixCustom)},f)),g=(e,t={})=>()=>{const l=u.reduce(((t,{key:l})=>({...t,[`${a}.${l}`]:e})),{});i({...l,...t})},N=(0,r.useMemo)((()=>d?u.filter((e=>e.label.match(new RegExp(`${d}`,"i")))):u),[d,u]);return r.default.createElement(R,{className:t,label:h,ariaLabel:`${c}: ${f}`},u.length>10&&r.default.createElement("div",{className:se.filterGroupSearchWrapper},r.default.createElement(ne,{defaultValue:d,onChange:m,placeholder:"Search by filter name",debounceWait:0})),r.default.createElement("div",{className:se.filterGroupItems},0===N.length&&r.default.createElement(G,{className:se.filterGroupSearchNotFound},r.default.createElement("p",null,"No filters found"),r.default.createElement("div",null,r.default.createElement(y,{size:"small",kind:"primary",type:"button",onClick:()=>m(""),className:se.filterGroupSearchNotFoundClear},"Clear search"))),N.map((({key:e,...t})=>{const l=[a,e].join(".");return r.default.createElement(L,{key:l,className:se.filterGroupItem},r.default.createElement(re,{label:t.label,name:l,onChange:s,checked:n[l],disabled:t.disabled,className:se.filterGroupItemFilter}),r.default.createElement(y,{kind:"info",solid:!0,size:"small",type:"button",onClick:g(!1,{[l]:!0}),disabled:t.disabled,className:se.filterGroupOnlyButton},"only"))}))),0!==N.length&&r.default.createElement("div",{className:se.filterGroupActions},p?r.default.createElement(L,{id:"clear-all",onClick:g(!1),role:"button"},"Clear all"):r.default.createElement(L,{id:"clear-all",onClick:g(!0),role:"button"},"Check all")))},oe=e=>{const{className:t="",values:a,filters:l,toggleFilter:n,toggleFilters:s}=e,i=(0,r.useCallback)((e=>{const{name:t}=e.target;n(t,!a[t])}),[n,a]),c=Object.entries(l),u=c.length;return r.default.createElement(S,{className:o()(se.root,t)},c.map((([e,t],l)=>{const n=l===u-1;return"defaultValue"in t?r.default.createElement(re,{name:e,label:t.label,onChange:i,checked:a[e],disabled:t.disabled,key:e,className:o()(se.filterSingle,n&&se.itemLast)}):r.default.createElement(ie,{groupKey:e,data:t,values:a,onCheckboxChange:i,toggleFilters:s,className:o()(n&&se.itemLast),key:e})})))},ce=e=>{const{onChange:t,filters:a,...l}=e,[n,s]=(0,r.useState)(X("",a));(0,r.useEffect)((()=>{const e=X("",a);q()(e,n)||s(e)}),[a,s]);const i=(0,r.useCallback)(((e,a)=>{const l=K()({},n,{[e]:a});s(l),t&&t(l)}),[t,s,n]),o=(0,r.useCallback)((e=>{const a=K()({},n,e);s(a),t&&t(a)}),[t,s,n]);return r.default.createElement(oe,{...l,filters:a,values:n,toggleFilter:i,toggleFilters:o})};var ue=a(5669),de=a(799),me=a(7359),pe=a(3349);const fe=e=>{const{className:t="",anchorClassName:a="",hoverCardClassName:l="",href:n="",as:s=null,label:i,children:c}=e,u=(0,ue.l)({gutter:8,timeout:300,placement:"top"}),d=(0,de.a)({state:u,portal:!0}),m=(0,r.useMemo)((()=>s||(n?"a":"span")),[s,n]);return r.default.createElement("div",{className:o()("Pw1gG",t)},r.default.createElement(me._,{state:u,href:n,className:o()("THw4k",a),as:m,"aria-controls":u.open?d.id:""},i),r.default.createElement(de.B,{...d,state:u,className:o()("_7sWJ_",l)},r.default.createElement(pe.G,{size:24}),"function"==typeof c?c({close:u.hide}):c))},Ee={root:"BQbKn",spin:"LhYwL",small:"xat8j",medium:"evzGy",large:"N74Cc"},he=({className:e="",size:t="medium",...a})=>r.default.createElement("span",{className:o()(Ee.root,e,Ee[t]),...a});he.SIZES=[he.SIZE_SMALL="small",he.SIZE_MEDIUM="medium",he.SIZE_LARGE="large"],he.defaultProps={className:"",size:he.SIZE_MEDIUM},he.propTypes={className:s().string,size:s().oneOf(he.SIZES)};const ge=e=>{const{className:t,as:a,block:l,...n}=e,s=o()("i7bfN",t,l&&"fDOCe");return r.default.createElement(a,{className:s,...n})};ge.propTypes={className:s().string,as:s().elementType,block:s().bool},ge.defaultProps={className:"",as:"p",block:!1};const Ne=e=>{const{className:t="",emptyMessage:a=null,compact:l=!1,outline:n=!1,children:s,...i}=e,c=o()("qIkXx",t,l&&"RPnzP",n&&"HwHhN");return s?r.default.createElement("table",{className:c,...i},s):r.default.createElement("div",{className:o()(c,"P2js2")},a)};Ne.THead="thead",Ne.TBody="tbody",Ne.Tr="tr",Ne.Th="th",Ne.Td="td";const be=({isTabActive:e,as:t,className:a,...l})=>r.default.createElement(t,{className:o()("UeEq6",a,e&&"LK4Pr"),...l});be.defaultProps={isTabActive:!1,className:"",as:"span"},be.propTypes={isTabActive:s().bool,className:s().string,as:s().elementType};const ye=({className:e,...t})=>r.default.createElement("nav",{className:o()("gitdD",e),...t});ye.defaultProps={className:""},ye.propTypes={className:s().string,children:s().node.isRequired},ye.Item=be;const ve={root:"PtfQ3",success:"ACX9j",info:"vKN4S",warning:"CtrVB",danger:"RiGuG",small:"UN_m6",large:"OB6Gi"},Ie=e=>{const{className:t="",as:a="span",kind:l=u.DEFAULT,size:n=d.MEDIUM,...s}=e,i=o()(ve.root,t,ve[l],ve[n]);return r.default.createElement(a,{className:i,...s})};Ie.KINDS=u,Ie.SIZES=d;var Te=a(2317),Ce=a(9031),Se=a(8185),ke=a(9597);const we=e=>{var t;const{className:a="",tooltipClassName:l="",title:n="",as:s="span",containerRef:i,darkMode:c=!0,...u}=e,d=(0,Te.i)({placement:"top",timeout:300});return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ce.f,{as:s,className:o()("TnyoH",a),state:d,"aria-controls":d.open?null===(t=d.contentElement)||void 0===t?void 0:t.id:"",...i?{ref:i}:{},...u}),n&&r.default.createElement(Se.m,{state:d,className:o()("FuQKs",l,c&&"vURAN")},r.default.createElement(ke.P,{state:d,className:"SysXY",size:12}),n))},Ae=JSON.parse('{"JB":"RelativeCI","hX":"https://relative-ci.com","Jv":"https://github.com/relative-ci/bundle-stats","TH":{"mY":"https://relative-ci.com/documentation/metrics-and-data#assets","av":"https://relative-ci.com/documentation/metrics-and-data#modules","U$":"https://relative-ci.com/documentation/metrics-and-data#packages"}}'),Oe={root:"Foe8m",inner:"KYXTp",navItem:"hSnpD"},Le=e=>r.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",...e});Le.propTypes={to:s().string.isRequired};const Re=({className:e,version:t})=>r.default.createElement(I,{as:"footer",className:o()(Oe.root,e)},r.default.createElement(p,{padding:["medium","none"],className:Oe.inner},r.default.createElement(G,{space:"xsmall"},r.default.createElement("div",null,r.default.createElement("nav",{className:Oe.nav},r.default.createElement(Le,{href:Ae.Jv,className:o()(Oe.navItem,Oe.navLink),title:F},`BundleStats ${t}`),r.default.createElement("span",{className:Oe.navItem},r.default.createElement(Le,{href:`${Ae.Jv}/issues`,className:Oe.navLink,title:"Open issue on GitHub"},"Report issue")),r.default.createElement("span",{className:Oe.navItem},r.default.createElement("span",null,"Made by "),r.default.createElement(Le,{className:Oe.navLink,href:Ae.hX,title:"Visit RelativeCI - In-depth bundle stats analysis and monitoring"},Ae.JB)))))));Re.defaultProps={className:"",version:null},Re.propTypes={className:s().string,version:s().string};const Me={className:s().string},Pe=e=>{const{className:t,...a}=e;return r.default.createElement("div",{className:o()("HPvBP",t),...a})};Pe.propTypes=Me,Pe.defaultProps={className:""};var xe,De,_e,Fe,Ve,$e,ze=a(764),je=a.n(ze),Ge=a(9650),He=a.n(Ge);!function(e){e.webpack="webpack",e.lighthouse="lighthouse",e.browsertime="browsertime"}(xe||(xe={})),($e=De||(De={})).ERROR="error",$e.INFO="info",$e.WARNING="warning",function(e){e.Numeric="METRIC_TYPE_NUMERIC",e.Score="METRIC_TYPE_SCORE",e.FileSize="METRIC_TYPE_FILE_SIZE",e.Duration="METRIC_TYPE_DURATION",e.Percentage="METRIC_TYPE_PERCENTAGE"}(_e||(_e={})),function(e){e.HIGH_NEGATIVE="HIGH_NEGATIVE",e.NEGATIVE="NEGATIVE",e.LOW_NEGATIVE="LOW_NEGATIVE",e.NO_CHANGE="NO_CHANGE",e.CHANGE="CHANGE",e.LOW_POSITIVE="LOW_POSITIVE",e.POSITIVE="POSITIVE",e.HIGH_POSITIVE="HIGH_POSITIVE"}(Fe||(Fe={})),function(e){e.meta="meta",e.insights="insights",e.summary="summary",e.metrics="metrics",e.rawData="rawData"}(Ve||(Ve={}));var Be=a(8326),Ue=a.n(Be);const Ze={symbol:"B",multiplier:1},qe={symbol:"KiB",multiplier:1024},We={symbol:"MiB",multiplier:1048576},Ke={symbol:"ms",multiplier:1},Je={symbol:"s",multiplier:1e3},Xe={symbol:"min",multiplier:6e4};function Ye(e){let t=Ze;return"number"!=typeof e?`0${t.symbol}`:(t=e<qe.multiplier?Ze:e<We.multiplier?qe:We,`${Ue()(e/t.multiplier,2)}${t.symbol}`)}function Qe(e){return"number"!=typeof e?"0":e.toString()}function et(e){return"number"!=typeof e?"0%":`${e}%`}const tt={[_e.Numeric]:{biggerIsBetter:!1,formatter:Qe},[_e.Score]:{biggerIsBetter:!0,formatter:Qe},[_e.Duration]:{biggerIsBetter:!1,formatter:function(e){let t=Ke;return"number"!=typeof e?`0${t.symbol}`:(t=e<Je.multiplier?Ke:e<Xe.multiplier?Je:Xe,`${Ue()(e/t.multiplier,1)}${t.symbol}`)}},[_e.FileSize]:{biggerIsBetter:!1,formatter:Ye},[_e.Percentage]:{biggerIsBetter:!0,formatter:et}},at="CSS",lt="JS",nt="MEDIA",st="FONT",rt="HTML",it="OTHER",ot={[at]:/\.css$/,[lt]:/\.(js|cjs|mjs)$/,IMG:/\.(a?png|jpe?g|webp|gif|svg|ico|avif)$/,[nt]:/\.(mp4|mp3|m4a|aac|mov|webm|wav|ogg)$/,[st]:/\.(woff|woff2|ttf|otf|eot)$/,[rt]:/\.(html?)$/},ct={[at]:"CSS",[lt]:"JS",IMG:"IMG",[nt]:"Media",[st]:"Fonts",[rt]:"HTML",[it]:"Other"},ut=[...Object.keys(ot),it],dt={[at]:/\.(css|styl|sass|scss|less)$/,[lt]:/\.(jsx?|tsx?|cjs|mjs)$/},mt=[...Object.keys(dt),it],pt={[at]:/\.css$/,[lt]:/\.(js|cjs|mjs)$/};var ft;Object.keys(pt),function(e){e.BUNDLE_SIZE="totalSizeByTypeALL",e.INITIAL_SIZE_JS="totalInitialSizeJS",e.INITIAL_SIZE_CSS="totalInitialSizeCSS",e.CACHE_INVALIDATION="cacheInvalidation",e.ASSET_COUNT="assetCount",e.CHUNK_COUNT="chunkCount",e.MODULE_COUNT="moduleCount",e.DUPLICATE_MODULES_COUNT="duplicateModulesCount",e.DUPLICATE_CODE="duplicateCode",e.PACKAGE_COUNT="packageCount",e.DUPLICATE_PACKAGES_COUNT="duplicatePackagesCount",e.TOTAL_SIZE_JS="totalSizeByTypeJS",e.TOTAL_SIZE_CSS="totalSizeByTypeCSS",e.TOTAL_SIZE_IMG="totalSizeByTypeIMG",e.TOTAL_SIZE_MEDIA="totalSizeByTypeMEDIA",e.TOTAL_SIZE_FONT="totalSizeByTypeFONT",e.TOTAL_SIZE_HTML="totalSizeByTypeHTML",e.TOTAL_SIZE_OTHER="totalSizeByTypeOTHER"}(ft||(ft={}));const Et={[ft.BUNDLE_SIZE]:{label:"Bundle Size",description:"Total file size of the assets generated or processed by the bundler",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.FileSize},[ft.INITIAL_SIZE_JS]:{label:"Initial JS",description:"Total file size of the JavaScript initial chunks",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.FileSize},[ft.INITIAL_SIZE_CSS]:{label:"Initial CSS",description:"Total file size of the CSS initial chunks",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.FileSize},[ft.CACHE_INVALIDATION]:{label:"Cache Invalidation",description:"Ratio between the total file size of the changed assets and the total file size(Bundle Size)",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.Percentage,biggerIsBetter:null,skipDelta:!0},[ft.CHUNK_COUNT]:{label:"Chunks",description:"Total number of chunks generated by the bundler",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.Numeric,biggerIsBetter:null},[ft.ASSET_COUNT]:{label:"Assets",description:"Total number of assets generated or produced by the bundler",url:"https://relative-ci.com/documentation/metrics-and-data#assets",type:_e.Numeric,biggerIsBetter:null},[ft.MODULE_COUNT]:{label:"Modules",description:"Total number of bundled modules",url:"https://relative-ci.com/documentation/metrics-and-data#modules-1",type:_e.Numeric,biggerIsBetter:null},[ft.DUPLICATE_MODULES_COUNT]:{label:"Duplicate Modules",description:"Total number of modules included into more than one chunk",url:"https://relative-ci.com/documentation/metrics-and-data#modules-1",type:_e.Numeric,biggerIsBetter:!1},[ft.DUPLICATE_CODE]:{label:"Duplicate Code",description:"The percentage of total duplicate module size from the total module size",url:"https://relative-ci.com/documentation/metrics-and-data#modules-1",type:_e.Percentage,biggerIsBetter:null},[ft.PACKAGE_COUNT]:{label:"Packages",description:"The total number of bundled packages",url:"https://relative-ci.com/documentation/metrics-and-data#packages",type:_e.Numeric,biggerIsBetter:!1},[ft.DUPLICATE_PACKAGES_COUNT]:{label:"Duplicate Packages",description:"The total number of duplicate bundled packages",url:"https://relative-ci.com/documentation/metrics-and-data#packages",type:_e.Numeric,biggerIsBetter:!1},sizes:{[ft.TOTAL_SIZE_JS]:{label:ct.JS,type:_e.FileSize},[ft.TOTAL_SIZE_CSS]:{label:ct.CSS,type:_e.FileSize},[ft.TOTAL_SIZE_IMG]:{label:ct.IMG,type:_e.FileSize},[ft.TOTAL_SIZE_MEDIA]:{label:ct.MEDIA,type:_e.FileSize},[ft.TOTAL_SIZE_FONT]:{label:ct.FONT,type:_e.FileSize},[ft.TOTAL_SIZE_HTML]:{label:ct.HTML,type:_e.FileSize},[ft.TOTAL_SIZE_OTHER]:{label:ct.OTHER,type:_e.FileSize}}},ht={score:{label:"Score",type:_e.Score},performanceScore:{label:"Performance",type:_e.Score},accessibilityScore:{label:"Accessibility",type:_e.Score},bestPracticesScore:{label:"Best Practices",type:_e.Score},seoScore:{label:"SEO",type:_e.Score},pwaScore:{label:"PWA",type:_e.Score},speedIndex:{label:"Perceptual Speed Index",type:_e.Duration},firstMeaningfulPaint:{label:"First Meaningful Paint",type:_e.Duration},timeToFirstByte:{label:"Time To First Byte",type:_e.Duration},firstInteractive:{label:"First Interactive",type:_e.Duration},totalByteWeight:{label:"Total Weight",type:_e.FileSize},domSize:{label:"DOM Size",type:_e.Numeric}},gt={firstPaint:{label:"First Paint",type:_e.Duration},fullyLoaded:{label:"Fully Loaded",type:_e.Duration},backEndTime:{label:"BackEnd Time",type:_e.Duration},domContentLoadedTime:{label:"DOM Content Loaded Time",type:_e.Duration},domInteractiveTime:{label:"DOM Interactive Time",type:_e.Duration},domainLookupTime:{label:"Domain Lookup Time",type:_e.Duration},frontEndTime:{label:"FrontEnd Time",type:_e.Duration},pageDownloadTime:{label:"Page Download Time",type:_e.Duration},pageLoadTime:{label:"Page Load Time",type:_e.Duration},redirectionTime:{label:"Redirection Time",type:_e.Duration},serverConnectionTime:{label:"Server Connection Time",type:_e.Duration},serverResponseTime:{label:"Server Response Time",type:_e.Duration},firstContentfulPaint:{label:"First Contentful Paint",type:_e.Duration},rumSpeedIndex:{label:"RUM Speed Index",type:_e.Duration},firstVisualChange:{label:"First Visual Change",type:_e.Duration},lastVisualChange:{label:"Last Visual Change",type:_e.Duration},perceptualSpeedIndex:{label:"Perceptual SpeedIndex",type:_e.Duration},speedIndex:{label:"Speed Index",type:_e.Duration},visualComplete85:{label:"Visual Complete 85",type:_e.Duration},visualComplete95:{label:"Visual Complete 95",type:_e.Duration},visualComplete99:{label:"Visual Complete 99",type:_e.Duration}};function Nt(e,t){let a="";e>0?a="+":e<0&&(a="-");let l=Math.abs(e);return l>0&&l<.01&&(a=`~${a}`,l=.01),l>.01&&(l=Ue()(l,2)),`${a}${t(l)}`}function bt(e,t){return 0===e?"NO_CHANGE":null===t?"CHANGE":e<-50?t?"HIGH_NEGATIVE":"HIGH_POSITIVE":e<-5?t?"NEGATIVE":"POSITIVE":e<0?t?"LOW_NEGATIVE":"LOW_POSITIVE":e<=5?t?"LOW_POSITIVE":"LOW_NEGATIVE":e<=50?t?"POSITIVE":"NEGATIVE":t?"HIGH_POSITIVE":"HIGH_NEGATIVE"}function yt(e,t){const a=function(e){return function(t,a){const l=He()(e,t);if(null==l?void 0:l.type)return{...tt[l.type],...l};const n=a||_e.Numeric;return{...tt[n],type:n,label:t}}}({webpack:Et,lighthouse:ht,browsertime:gt});return a(e,t)}function vt(e,t,a){const{formatter:l,biggerIsBetter:n}=e,s={value:t,displayValue:l(t)};if(void 0===a)return s;const{delta:r,deltaPercentage:i}=function(e,t){const a=(null==e?void 0:e.value)||0,l=(null==t?void 0:t.value)||0;return a===l?{delta:0,deltaPercentage:0}:0===a?{delta:l,deltaPercentage:100}:{delta:l-a,deltaPercentage:Ue()(l/a*100-100,8)}}({value:a},{value:t});let o;return null===n?o=null:!0===n&&r>0||!1===n&&r<0?o=!1:(!1===n&&r>0||!0===n&&r<0)&&(o=!0),{...s,delta:r,deltaPercentage:i,displayDelta:Nt(r,l),displayDeltaPercentage:Nt(i,et),deltaType:bt(i,n),...void 0!==o&&{regression:o}}}var It=a(953),Tt=a.n(It);const Ct=e=>Tt()(je()(e,"value")).length>1||Tt()(je()(e,"name")).length>1,St=e=>t=>{const{key:a,runs:l}=t,n=yt(a,"string"==typeof e?e:void 0),{biggerIsBetter:s,label:r}=n,i=l.map(((e,t)=>{if(!e||void 0===e.value||null===e.value)return null;const a=vt(n,e.value,t+1<l.length?He()(l,[t+1,"value"],0):void 0);return{...e,...a}}));return{key:t.key,label:r,biggerIsBetter:s,changed:Ct(l),runs:i}};var kt=a(4634),wt=a.n(kt);const At=(e,t,a,l)=>((e,t)=>{const a=e.length,l=e.reduce(((e,t,l)=>wt()(e,t,((e,t)=>(a,l)=>{const n=a||Array(t).fill({value:0});return n[e]=l,n})(l,a))),{});return Object.entries(l).map((([e,a])=>{const l={key:e,runs:a};return t?t.reduce(((e,t)=>t(e)),l):l}))})(je()(e,t),[St(a),...l||[]]),Ot=e=>{const t=He()(e,"metrics.browsertime",{});return Object.entries(t).reduce(((e,[t,a])=>({...e,[`browsertime.${t}`]:a})),{})};var Lt=a(5359),Rt=a.n(Lt);const Mt={root:"TsfHh",displayUnit:"qpgM_",content:"fVClB",inline:"O4SrK",display:"OumFQ"},Pt=e=>{const{className:t="",value:a="0",unit:l="",inline:n=!1,children:s=null,...i}=e,c=o()(t,Mt.root,n&&Mt.inline);return r.default.createElement("div",{className:c,...i},r.default.createElement("div",{className:Mt.display},r.default.createElement("span",{className:Mt.displayValue},a),l&&r.default.createElement("span",{className:Mt.displayUnit},l)),s&&r.default.createElement("div",{className:Mt.content},s))},xt={root:"vXFHB",CHANGE:"msGud",HIGH_NEGATIVE:"kZpfQ",NEGATIVE:"iDW3Y",LOW_NEGATIVE:"Rtvza",LOW_POSITIVE:"f0lhU",POSITIVE:"_Hy7o",HIGH_POSITIVE:"MuRiX",inverted:"E9kgc"},Dt=({className:e="",displayValue:t,deltaType:a,inverted:l=!1})=>{const n=o()(xt.root,e,l&&xt.inverted,xt[a]);return r.default.createElement("span",{className:n},t)};Dt.defaultProps={className:"",inverted:!1},Dt.propTypes={className:s().string,displayValue:s().string.isRequired,deltaType:s().string.isRequired,inverted:s().bool};var _t=a(4933),Ft=a.n(_t);const Vt=({as:e="span",title:t,internalBuildNumber:a,children:l,...n})=>r.default.createElement(we,{className:"Zo0gI",as:e,title:t,...n},l||`Job #${a}`);Vt.defaultProps={as:"span",title:"",internalBuildNumber:null,children:null},Vt.propTypes={as:s().oneOfType([s().string,s().func]),title:s().string,internalBuildNumber:s().number,children:s().node};const $t="et",zt="ft",jt="c",Gt="mft",Ht="mst",Bt={OTHER:"asset",CHANGED:"changed",ENTRY:"entrypoint",INITIAL:"initial",CHUNK:"chunk"},Ut="changed",Zt="md",qt="fp",Wt="tp",Kt="metric",Jt="changed",Xt="duplicate",Yt="overview",Qt="assets",ea="modules",ta="packages",aa="ba",la="bm",na="bp",sa="/assets",ra="/modules",ia="/packages",oa={[Yt]:"/",[Qt]:sa,[ea]:ra,[ta]:ia},ca=ut.reduce(((e,t)=>({...e,[`webpack.sizes.totalSizeByType${t}`]:t})),{}),ua=["webpack.totalSizeByTypeALL","webpack.totalInitialSizeJS","webpack.totalInitialSizeCSS","webpack.cacheInvalidation"],da="asc",ma="desc";var pa,fa;!function(e){e.TABLE="table",e.TREEMAP="treemap"}(pa||(pa={})),function(e){e.SIZE="value",e.DUPLICATE_SIZE="duplicateSize",e.TOTAL_SIZE="totalSize"}(fa||(fa={}));const Ea={[fa.SIZE]:{label:"Size",tooltip:"Module size (excluding duplicate modules)"},[fa.TOTAL_SIZE]:{label:"Total size",tooltip:"Module total size (including duplicate modules)"},[fa.DUPLICATE_SIZE]:{label:"Duplicate size",tooltip:"Module duplicate size"}},ha="Xutcm",ga="KiaUQ",Na="eBZo5",ba="xC2vv",ya=e=>{const{className:t="",children:a,fieldPath:l,fieldName:n,label:s,sort:i,updateSort:c}=e,u=`${l}.${n}`,d=((e,t,a)=>(null==a?void 0:a.field)!==e?{direction:ma,title:`Order ${t} descending`}:(null==a?void 0:a.direction)===ma?{direction:da,title:`Order ${t} ascending`}:{direction:"",title:"Reset order"})(u,s,i),m=(e=>({direction:da,title:`Order ${e} ascending`}))(s),p=(e=>({direction:ma,title:`Order ${e} descending`}))(s),f=(null==i?void 0:i.field)===u,E=(0,r.useCallback)((e=>()=>{c&&(e.direction?c({field:u,direction:e.direction}):c({field:"",direction:""}))}),[u,c,d]);return c?r.default.createElement("div",{className:o()(ha,"nvDbs",t,f&&"Rm7R4")},r.default.createElement(y,{type:"button",onClick:E(d),className:"OBwTZ"},r.default.createElement(we,{title:d.title},a)),r.default.createElement(y,{type:"button",onClick:E(m),className:o()(ga,"ZYsg6",f&&i.direction===da&&ba)},r.default.createElement(we,{title:m.title},r.default.createElement(g,{glyph:g.ICONS.CHEVRON_UP,size:"small",className:Na}))),r.default.createElement(y,{type:"button",onClick:E(p),className:o()(ga,"Lj6Aq",f&&i.direction===ma&&ba)},r.default.createElement(we,{title:p.title},r.default.createElement(g,{glyph:g.ICONS.CHEVRON_DOWN,size:"small",className:Na})))):r.default.createElement("div",{className:o()(ha,t)},a)},va="vG0XG",Ia="XzAXP",Ta="q5fmU",Ca=tt[_e.FileSize],Sa=({job:e,isBaseline:t})=>{const a=t?1:3,{label:l,internalBuildNumber:n}=e;return e?r.default.createElement(Ne.Th,{className:o()(va,"S2ltF"),colSpan:a},r.default.createElement(Vt,{title:t?"Baseline":"Current",internalBuildNumber:n,className:"VzpFZ"},l)):r.default.createElement(Ne.Th,{colSpan:a},"-")},ka=(e,t)=>Ft()(e.map((e=>{var a,l;return(null===(l=null===(a=null==e?void 0:e.runs)||void 0===a?void 0:a[t])||void 0===l?void 0:l.value)||0}))),wa=({rows:e,isBaseline:t,runIndex:a,updateSort:l,sort:n})=>{const s=ka(e,a),i=t?0:ka(e,a+1),c=vt(Ca,s,i),u=`runs[${a}]`;return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne.Th,{className:o()(va,"TtVyE",Ta)},r.default.createElement(ya,{fieldPath:u,fieldName:"value",label:"value",updateSort:l,sort:n},r.default.createElement(Pt,{value:c.displayValue}))),!t&&r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne.Th,{className:o()(va,Ia,Ta)},r.default.createElement(ya,{fieldPath:u,fieldName:"delta",label:"change",updateSort:l,sort:n},"delta"in c&&r.default.createElement(Dt,{displayValue:c.displayDelta,deltaType:c.deltaType}))),r.default.createElement(Ne.Th,{className:o()(va,Ia,"HzXVt",Ta)},r.default.createElement(ya,{fieldPath:u,fieldName:"deltaPercentage",label:"percentual change",updateSort:l,sort:n},"delta"in c&&r.default.createElement(Dt,{displayValue:c.displayDeltaPercentage,deltaType:c.deltaType})))))},Aa=e=>{const{className:t="",metricTitle:a="",showSum:l=!1,jobs:n,rows:s,sort:i,updateSort:c}=e,u=o()("gGrWV",l&&"Wt1E0",t);return r.default.createElement(Ne.THead,{className:u},r.default.createElement(Ne.Tr,null,r.default.createElement(Ne.Th,{className:o()(va,"XZCNN"),rowSpan:l?2:1},a||" "),n.map(((e,t)=>r.default.createElement(Sa,{job:e,isBaseline:t===n.length-1})))),l&&r.default.createElement(Ne.Tr,null,n.map(((e,t)=>r.default.createElement(wa,{rows:s,isBaseline:t===n.length-1,runIndex:t,updateSort:c,sort:i})))))},Oa={root:"H25xA",value:"nxJ3H",delta:"ROSj6",multipleRuns:"T4PSM",unchanged:"vXCHn",empty:"PGtnW",emptyIcon:"YECEt",showAllItems:"NOPc3"},La=({className:e="",item:t,renderHeader:a,...l})=>r.default.createElement(Ne.Tr,{className:o()(!t.changed&&Oa.unchanged,e),...l},r.default.createElement(Ne.Th,{className:Oa.metricName},a(t)),t.runs.map(((e,a)=>{const l=a===t.runs.length-1,n=o()(Oa.value,!l&&Oa.current);return e&&void 0!==e.value?r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne.Td,{className:n},r.default.createElement(Pt,{value:e.displayValue})),!l&&r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne.Td,{className:Oa.delta},"delta"in e&&r.default.createElement(Dt,{displayValue:e.displayDelta,deltaType:e.deltaType})),r.default.createElement(Ne.Td,{className:o()(Oa.delta,Oa.deltaPercentage)},"delta"in e&&r.default.createElement(Dt,{displayValue:e.displayDeltaPercentage,deltaType:e.deltaType})))):r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne.Td,{className:n},"-"),!l&&r.default.createElement(Ne.Td,{className:Oa.delta}),!l&&r.default.createElement(Ne.Td,{className:o()(Oa.delta,Oa.deltaPercentage)}))}))),Ra=({className:e="",runs:t,items:a,showHeaderSum:l=!1,title:n,sort:s,updateSort:i,renderRowHeader:c=(e=>e.label),emptyMessage:u="No items found.",showAllItems:d,setShowAllItems:m,...p})=>{const f=3*(t.length-1)+1+1,E=o()(Oa.root,e,t.length>1&&Oa.multipleRuns),h=Rt()(a),N=!h,b=(null==a?void 0:a.length)>500,v=!b||d?a:null==a?void 0:a.slice(0,500);return r.default.createElement(Ne,{className:E,compact:!0,...p},r.default.createElement(Aa,{metricTitle:n,showSum:l,jobs:t,rows:a,sort:s,updateSort:i}),r.default.createElement(Ne.TBody,null,h&&r.default.createElement(Ne.Tr,null,r.default.createElement(Ne.Td,{className:Oa.empty,colSpan:f},r.default.createElement(G,{space:"xxsmall"},r.default.createElement("div",null,r.default.createElement(g,{glyph:g.ICONS.INFO,className:Oa.emptyIcon,size:"large"})),u))),N&&r.default.createElement(r.default.Fragment,null,v.map((e=>r.default.createElement(La,{key:e.key,item:e,renderHeader:c}))),b&&r.default.createElement(Ne.Tr,null,r.default.createElement(Ne.Td,{className:Oa.showAllItems,colSpan:f},d?r.default.createElement(y,{padding:"small",kind:"primary",onClick:()=>m(!1),type:"button"},"Show less"):r.default.createElement(y,{padding:"small",kind:"primary",onClick:()=>m(!0),type:"button"},"Show all"))))))},Ma=e=>{const[t,a]=(0,r.useState)(!1);return r.default.createElement(Ra,{...e,showAllItems:t,setShowAllItems:a})},Pa=e=>{const{className:t,jobs:a}=e,l=(e=>At(e,Ot))(a);return r.default.createElement(Ma,{className:t,items:l,runs:a})};Pa.defaultProps={className:"",jobs:[]},Pa.propTypes={className:s().string,jobs:s().array};const xa="stats",Da="sizes",_a="assets",Fa="modules",Va="packages",$a=[ft.BUNDLE_SIZE,ft.INITIAL_SIZE_JS,ft.INITIAL_SIZE_CSS,ft.CACHE_INVALIDATION,ft.MODULE_COUNT,ft.DUPLICATE_MODULES_COUNT,ft.DUPLICATE_CODE,ft.CHUNK_COUNT,ft.ASSET_COUNT,ft.PACKAGE_COUNT,ft.DUPLICATE_PACKAGES_COUNT],za=/(?:node_modules|~)(?:\/\.pnpm)?/,ja=/[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*/,Ga=/@[\w|\-|_|.]+/,Ha=new RegExp([`(?:${za.source}/)`,"(?:",`(?:@${ja.source}[/|+])?`,`(?:${ja.source}\\+)*`,`(?:${ja.source})`,`(?:${Ga.source})?`,")","(?:_",`(?:@${ja.source}[/|+])?`,`(?:${ja.source})`,`(?:@${ja.source})?`,")*","/"].join(""),"g");new RegExp([`(?:${za.source}/)`,"(?:","(",`(?:@${ja.source}[/|+])?`,`(?:(?:${ja.source}\\+)*)`,`(?:${ja.source})`,")",`(?:${Ga.source})?`,")","(?:_","(",`(?:@${ja.source}[/|+])?`,`(?:${ja.source})`,")",`(?:@${ja.source})`,")*","/"].join(""),"g");var Ba=a(8373),Ua=a.n(Ba);const Za=e=>{const t=He()(e,"metrics.webpack.modules",{}),a={};return Object.entries(t).forEach((([e,t])=>{a[e]={...t,value:t.value*(t.chunkIds.length-1),originalValue:t.value}})),a},qa=e=>{const t=He()(e,"metrics.webpack.modules",{}),a={};return Object.entries(t).forEach((([e,t])=>{a[e]={...t,value:t.value*t.chunkIds.length,originalValue:t.value}})),a},Wa={[xa]:e=>{const t=He()(e,"metrics.webpack"),a=Ua()(t,$a);return Object.entries(a).reduce(((e,[t,a])=>({...e,[`webpack.${t}`]:a})),{})},[Da]:e=>{const t=He()(e,"metrics.webpack.sizes",{});return Object.keys(Et.sizes).reduce(((e,a)=>({...e,[`webpack.sizes.${a}`]:t[a]})),{})},[_a]:e=>He()(e,"metrics.webpack.assets",{}),[Fa]:e=>{const t=He()(e,"metrics.webpack.modules",{}),a={};return Object.entries(t).forEach((([e,t])=>{a[e]={...t,originalValue:t.value}})),a},[Va]:e=>He()(e,"metrics.webpack.packages",{})},Ka={[xa]:(e,t)=>At(e,Wa.stats,void 0,t),[Da]:(e,t)=>At(e,Wa.sizes,void 0,t),[_a]:(e,t)=>At(e,Wa.assets,_e.FileSize,t),[Fa]:(e,t)=>At(e,Wa.modules,_e.FileSize,t),[Va]:(e,t)=>At(e,Wa.packages,_e.FileSize,t)};var Ja=a(7676);const Xa="View modules",Ya=e=>`View ${e} modules`,Qa=({label:e})=>`View ${e} assets`,el=e=>`View ${e} assets`,tl=(e=!0)=>{const t={};return ut.forEach((a=>{t[`${zt}.${a}`]=e})),t},al=(e=!0)=>{const t={};return[Bt.ENTRY,Bt.INITIAL,Bt.CHUNK,Bt.OTHER].forEach((a=>{t[`${$t}.${a}`]=e})),t},ll=(e=!0)=>({[`${Ht}.${qt}`]:e,[`${Ht}.${Wt}`]:e}),nl=(e,t)=>{const a={};return e.forEach((e=>{a[`${jt}.${e}`]=t})),a},sl=(e=!0)=>{const t={};return mt.forEach((a=>{t[`${Gt}.${a}`]=e})),t},rl={section:Yt,title:"View total size by type"},il={section:Qt,title:"View initial JS assets",params:{[aa]:{filters:{...al(!1),[`${$t}.${Bt.INITIAL}`]:!0,...tl(!1),[`${zt}.${lt}`]:!0}}}},ol={section:Qt,title:"View initial CSS assets",params:{[aa]:{filters:{...al(!1),[`${$t}.${Bt.INITIAL}`]:!0,...tl(!1),[`${zt}.${at}`]:!0}}}},cl={section:Qt,title:"View changed assets",params:{[aa]:{filters:{[Bt.CHANGED]:!0}}}},ul={section:Qt,title:"View assets",params:{[aa]:{filters:{[Bt.CHANGED]:!1}}}},dl={section:Qt,title:"View chunks",params:{[aa]:{filters:{...al(!1),[`${$t}.${Bt.CHUNK}`]:!0}}}},ml=e=>({section:Qt,title:el(e),params:{[aa]:{filters:{[Bt.CHANGED]:!1,...al(!1),[`${$t}.${Bt.ENTRY}`]:"entry"===e,[`${$t}.${Bt.INITIAL}`]:"initial"===e,[`${$t}.${Bt.CHUNK}`]:"chunk"===e}}}}),pl=(e,t=e)=>({section:Qt,title:Qa({label:t}),params:{[aa]:{filters:{...tl(!1),[`${zt}.${e}`]:!0}}}}),fl={section:ea,title:"View duplicate modules",params:{[la]:{filters:{[Ut]:!1,[Zt]:!0},[Kt]:"duplicateSize"}}},El=e=>({section:ea,title:Xa,params:{[la]:{search:e,filters:{[Ut]:!1}}}}),hl=(e,t,a="")=>({section:ea,title:"View chunk modules",params:{[la]:{filters:{[Ut]:!1,...nl(e,!1),[`${jt}.${t}`]:!0,...a&&{...sl(!1),[`${Gt}.${a}`]:!0}}}}}),gl=(e,t)=>({section:ea,title:Ya(t||e),params:{[la]:{filters:{...sl(!1),[`${Gt}.${e}`]:!0}}}}),Nl=(e,t="")=>{return{section:ea,title:(a=t,`View ${a} modules`),params:{[la]:{filters:{[`${Ht}.${Wt}`]:e,[`${Ht}.${qt}`]:!e}}}};var a},bl={section:ta,title:"View changed packages",params:{[na]:{filters:{[Jt]:!0}}}},yl={section:ta,title:"View duplicate packages",params:{[na]:{filters:{[Xt]:!0}}}},vl={section:ta,title:"View changed duplicate packages",params:{[na]:{filters:{[Jt]:!0,[Xt]:!0}}}},Il=/(_|-)/g,Tl=/(%(?:2D|5F))/g,Cl={encode:e=>{if(!e)return;const t=Ja.fr.encode(e.search),a=Ja.fr.encode(e.entryId),l=Ja.fr.encode(e.metric),n={};Object.entries(e.filters||{}).forEach((([e,t])=>{var a;n[(a=e,encodeURIComponent(a).replace(Il,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)))]=Ja.sJ.encode(!!t)}));const s=Ja.X4.encode(n),r={};return t&&(r.search=t),a&&(r.entryId=a),l&&(r.metric=l),Rt()(s)||(r.filters=s),Ja.W.encode(r)},decode:e=>{const t=Ja.W.decode(e);if(Rt()(t))return;const a=Ja.fr.decode(t.search),l=Ja.fr.decode(t.entryId),n=Ja.fr.decode(t.metric);let s={};if("string"==typeof t.filters){const e=Ja.X4.decode(t.filters);Object.entries(e||{}).forEach((([e,t])=>{const a=Ja.sJ.decode(t);null!=a&&(s[function(e){const t=e.replace(Tl,(e=>String.fromCharCode(parseInt(e.replace(/^%/,""),16))));return decodeURIComponent(t)}(e)]=a)}))}else"object"==typeof t.filters&&(s=t.filters);const r={};return a&&(r.search=a),l&&(r.entryId=l),n&&(r.metric=n),Rt()(s)||(r.filters=s),Rt()(r)?void 0:r}},Sl={[aa]:Cl,[la]:Cl,[na]:Cl},kl=(e={})=>{const t=(0,Ja.Vl)(Sl,e);return new URLSearchParams(t).toString()},wl=new Map([["webpack.totalSizeByTypeALL",{link:rl}],["webpack.totalInitialSizeJS",{link:il}],["webpack.totalInitialSizeCSS",{link:ol}],["webpack.cacheInvalidation",{link:cl}],["webpack.assetCount",{link:ul}],["webpack.chunkCount",{link:dl}],["webpack.moduleCount",{link:{section:ea,title:Xa,params:{[la]:{filters:{[Ut]:!1},[Kt]:"totalSize"}}}}],["webpack.duplicateModulesCount",{link:fl}],["webpack.duplicateCode",{link:fl}],["webpack.packageCount",{link:{section:ta,title:"View packages",params:{[na]:{filters:{[Jt]:!1}}}}}],["webpack.duplicatePackagesCount",{link:yl}]]),Al=({rows:e,searchPattern:t,filters:a,getRowFilter:l})=>(0,r.useMemo)((()=>{const n=l(a);return e.filter((e=>!(t&&!t.test(null==e?void 0:e.key))&&n(e)))}),[e,t,a,l]);var Ol=a(2959),Ll=a.n(Ol);const Rl=({rows:e,initialField:t="runs[0].delta",initialDirection:a="desc",getCustomSort:l})=>{const[n,s]=(0,r.useState)({field:t,direction:a}),i=(0,r.useMemo)((()=>Ll()(e,((e,t)=>a=>e?He()(a,e)||0:t(a))(n.field,l),""!==n.direction?n.direction:da)),[e,n]);return{sort:n,updateSort:s,items:i}},Ml="SET_FILTERS",Pl="SET_SEARCH",xl="RESET_DEFAULT",Dl="RESET_ALL",_l=/.*/,Fl=e=>{let t=_l;if(!e||!e.trim())return t;try{t=new RegExp(e,"i")}catch(e){console.error(e)}return t},Vl=(e,t)=>({filters:e,search:t,searchPattern:Fl(t)}),$l=({search:e="",filters:t,defaultFilters:a,allEntriesFilters:l,setState:n})=>{const s=t?K()({},l,t):a,[{search:i,searchPattern:o,filters:c},u]=(0,r.useReducer)((({defaultFilters:e,allEntriesFilters:t,setParentState:a})=>(l,n)=>{const{type:s,payload:r}=n;switch(s){case Ml:{const e={filters:r,search:l.search,searchPattern:Fl(l.search)};return a(e),e}case Pl:{const e={filters:l.filters,search:r};return a(e),{...e,searchPattern:Fl(r)}}case xl:{const t={filters:e,search:""};return a(t),{...t,searchPattern:Fl()}}case Dl:{const e={filters:t,search:""};return a(e),{...e,searchPattern:Fl()}}case"SET":return r;default:return l}})({defaultFilters:a,allEntriesFilters:l,setParentState:n}),Vl(s,e));(0,r.useLayoutEffect)((()=>{e===i&&q()(s,c)||u({type:"SET",payload:Vl(s,e)})}),[e,t]);const d=(0,r.useCallback)((e=>{u({type:Pl,payload:e})}),[u]),m=(0,r.useCallback)((e=>{u({type:Ml,payload:e})}),[u]),p=(0,r.useCallback)((()=>{u({type:xl})}),[u]),f=(0,r.useCallback)((()=>{u({type:Dl})}),[u]);return(0,r.useMemo)((()=>({search:i,searchPattern:o,filters:c,hasActiveFilters:!q()(l,c),updateSearch:d,updateFilters:m,resetFilters:p,resetAllFilters:f})),[i,o,c,l,d,m,p,f])};function zl(e){const{setState:t}=e;return[(0,r.useCallback)((()=>t({entryId:""})),[t]),(0,r.useCallback)((e=>t({entryId:e})),[t])]}var jl=a(2918),Gl=a.n(jl),Hl=a(2307),Bl=a(2620);const Ul=pa.TABLE,Zl="dt",ql="dtg",Wl=e=>{const[t,a]=(0,Bl.useQueryParams)({[Zl]:Bl.StringParam,[ql]:Bl.StringParam}),{[Zl]:l,[ql]:n}=t,[s,i]=(0,Hl.A)("storage",{value:Ul,groupBy:""}),o=(0,r.useMemo)((()=>{const e=null!=l?l:null==s?void 0:s.value;return e&&Object.values(pa).includes(e)?e:Ul}),[l,null==s?void 0:s.value]),c=(0,r.useMemo)((()=>{var t;const a=null!=n?n:null==s?void 0:s.groupBy;return a&&(null===(t=null==e?void 0:e[o])||void 0===t?void 0:t.includes(a))?a:""}),[n,null==s?void 0:s.groupBy]);(0,r.useEffect)((()=>{o===l&&c===n||a({[Zl]:o,[ql]:c})}),[o,l,c,n,a]),(0,r.useEffect)((()=>{o===(null==s?void 0:s.value)&&c===s.groupBy||i({value:o,groupBy:c})}),[o,c,i,s]);const u=(0,r.useCallback)(((e,t="")=>{a({[Zl]:e,[ql]:t})}),[a]);return(0,r.useMemo)((()=>[{value:o,groupBy:c},u]),[o,c,u])},Kl=e=>{const{className:t,children:a,renderActions:l}=e,n=o()("EOTSL",t);return r.default.createElement("div",{className:n},r.default.createElement("div",{className:"sv7vi"},a),l&&r.default.createElement("div",{className:"IMcef"},l({actionClassName:"tSprV"})))};Kl.propTypes={className:s().string,children:s().node.isRequired,renderActions:s().func},Kl.defaultProps={className:"",renderActions:null};const Jl=(e,t)=>{const a=Object.entries(t).find((([,t])=>t.test(e)));return a?a[0]:it};var Xl=a(8591);const Yl=({section:e,title:t,params:a,...l})=>{const n=kl(a),s={pathname:oa[e],search:n};return r.default.createElement(Xl.N_,{to:s,title:t,...l})};Yl.propTypes={section:s().string.isRequired,title:s().string,params:s().object},Yl.defaultProps={title:"",params:{}};var Ql=a(7268);const en={title:"ce2If",titleText:"gkAB0",titleIcon:"Hz3t6",info:"DgQqa",currentMetric:"tFAJk",delta:"TUPxv",deltaValue:"Lefh0",baselineMetric:"VPbaS",loading:"kZGTY",titleHoverCardIcon:"NUG4I",titleTooltipIcon:"ZhmCs",root:"hihZa",small:"CjOEt",large:"st_U8",xlarge:"t5pmh"},tn=/([\d|.|,| ]*)(\w*|%)$/,an=({className:e="",title:t=null,titleHoverCard:a=null,titleTooltip:l=null,current:n="",baseline:s="",delta:i="",deltaPercentage:c="",deltaType:u="",as:d="div",size:m="medium",showBaseline:p=!0,loading:f=!1,enhance:E=!1,...h})=>{const N=o()(en.root,e,en[m],(i||c)&&en.showDelta),b=(0,r.useMemo)((()=>E&&"string"==typeof n?(e=>{const t=e.match(tn);return t?[t[1],t[2]]:[e]})(n):[n]),[n,E]);return r.default.createElement(d,{className:N,...h},t&&r.default.createElement(C,{space:"xxxsmall",alignItems:"center",as:"h3",className:en.title},r.default.createElement("span",{className:en.titleText},t),a&&r.default.createElement(fe,{label:r.default.createElement(g,{glyph:g.ICONS.HELP}),className:o()(en.titleIcon,en.titleHoverCardIcon)},a),l&&r.default.createElement(we,{title:l,className:o()(en.titleIcon,en.titleTooltipIcon)},r.default.createElement(g,{glyph:g.ICONS.HELP}))),f?r.default.createElement(G,{className:en.info},r.default.createElement(ge,{as:"p",className:o()(en.currentMetric,en.loading)}),p&&r.default.createElement(ge,{as:"p",className:o()(en.baselineMetric,en.loading)})):r.default.createElement(G,{className:en.info},r.default.createElement(Pt,{value:b[0],unit:b[1],inline:!0,className:en.currentMetric},(i||c)&&r.default.createElement("span",{className:en.delta},c&&r.default.createElement(Dt,{displayValue:c,deltaType:u,className:en.deltaValue}),i&&r.default.createElement(Dt,{displayValue:i,deltaType:u,className:en.deltaValue}))),p&&r.default.createElement(Pt,{className:en.baselineMetric,value:s})))},ln="Path",nn="Size",sn={root:"MI8bB",header:"DM1Gk",contentWrapper:"fi4Ku",headerClose:"ROBOx",fileName:"LRF6d",label:"lGs6W",runs:"VY4pF",runsColJob:"jqar0",runsColName:"bYwGF",runsColSize:"BmSfK",size:"YLM7V",meta:"eAjXj",metaLabel:"DTVwf",metaLabelTooltip:"NhpyE",metaContent:"oq5Vv",metaLink:"BxWE1"},rn=e=>{const{as:t="a",className:a="",...l}=e;return r.default.createElement(t,{className:o()(sn.metaLink,a),...l})};function on(e){var t,a,l;const n=e.runs.length>1?null===(t=e.runs)||void 0===t?void 0:t[e.runs.length-1]:null,s=vt(tt.METRIC_TYPE_FILE_SIZE,(null===(l=null===(a=e.runs)||void 0===a?void 0:a[0])||void 0===l?void 0:l.value)||0,(null==n?void 0:n.value)||0);return r.default.createElement(an,{current:s.displayValue,delta:s.displayDeltaPercentage,deltaPercentage:s.displayDelta,deltaType:s.deltaType,baseline:(null==n?void 0:n.displayValue)||"0B",size:"large"})}const cn=e=>{const{className:t="",itemTitle:a=null,item:l,labels:n,runNameSelector:s="name",runNameLabel:i=ln,runSizeLabel:c=nn,children:u,tags:d=null,onClose:m,renderRunInfo:f=on}=e;return r.default.createElement(Ql.Z,{className:o()(sn.root,t)},r.default.createElement(p,{padding:"medium",as:"header",className:sn.header},r.default.createElement(G,{space:"small"},r.default.createElement("h3",{className:sn.label},r.default.createElement(U,{as:"code",name:a||l.label,className:sn.fileName})),r.default.createElement("div",null,f(l))),r.default.createElement(y,{radius:"circle",type:"button",onClick:m,"aria-label":"Close side panel",className:sn.headerClose},r.default.createElement(g,{glyph:g.ICONS.CLOSE,size:"large"}))),r.default.createElement(p,{padding:"medium",as:"main",className:sn.contentWrapper},r.default.createElement(G,{space:"small",className:sn.content},d&&r.default.createElement("div",null,d),u,r.default.createElement(Ne,{outline:!0,compact:!0,className:sn.runs},r.default.createElement(Ne.THead,null,r.default.createElement(Ne.Tr,null,r.default.createElement(Ne.Th,{className:o()(sn.runsCell,sn.runsColJob)}," "),r.default.createElement(Ne.Th,{className:o()(sn.runsCell,sn.runsColName)},i),r.default.createElement(Ne.Th,{className:o()(sn.runsCell,sn.runsColSize)},c))),r.default.createElement(Ne.TBody,null,l.runs.map(((e,t)=>{const a=`info-${(null==e?void 0:e.name)||t}-${t}`;return r.default.createElement(Ne.Tr,{key:a},r.default.createElement(Ne.Th,{className:o()(sn.runsCell,sn.runsColJob)},n[t]),r.default.createElement(Ne.Td,{className:o()(sn.runsCell,sn.runsColName)},r.default.createElement(U,{className:sn.fileName,as:"code",name:(null==e?void 0:e[s])||"-"})),r.default.createElement(Ne.Td,{className:o()(sn.runsCell,sn.runsColSize)},r.default.createElement("span",{className:sn.size},void 0!==(null==e?void 0:e.value)?e.value:"-")))})))))))};cn.Meta=({className:e="",label:t,tooltip:a,children:l})=>r.default.createElement("div",{className:o()(sn.meta,e)},r.default.createElement("span",{className:sn.metaLabel},t,a&&r.default.createElement(we,{title:a,className:sn.metaLabelTooltip},r.default.createElement(g,{glyph:"help"}))),r.default.createElement("div",{className:sn.metaContent},l));const un={assetNameTag:"UM4t1",assetNameTagEntry:"smb7E",assetNameTagInitial:"BwMme",assetNameTagChunk:"op34U",label:"Vil3F"},dn=({as:e,chunks:t,chunkId:a,name:l,onClick:n})=>{if(!(null==t?void 0:t.find((({id:e})=>e===a))))return null;const s=t.map((({id:e})=>e)),i=Jl(l,pt);return r.default.createElement(e,{className:un.viewModules,...hl(s,a,i),onClick:n},"View chunk modules")},mn=e=>{var t;const{className:a="",chunks:l=null,customComponentLink:n=Yl,item:s,labels:i,onClick:c=te(),onClose:u}=e,d=null===(t=s.runs)||void 0===t?void 0:t[0],m=(0,r.useMemo)((()=>s.isEntry||s.isInitial||s.isChunk?r.default.createElement(C,{space:"xxxsmall",alignItems:"center",className:un.tags},s.isEntry&&r.default.createElement(Ie,{as:n,...ml("entry"),onClick:c,className:o()(un.assetNameTag,un.assetNameTagEntry)},"Entrypoint"),s.isInitial&&r.default.createElement(Ie,{as:n,...ml("initial"),onClick:c,className:o()(un.assetNameTag,un.assetNameTagInitial)},"Initial"),s.isChunk&&r.default.createElement(Ie,{as:n,...ml("chunk"),onClick:c,className:o()(un.assetNameTag,un.assetNameTagChunk)},"Chunk")):null),[s]),p=ct[s.fileType];return r.default.createElement(cn,{item:s,labels:i,tags:m,onClose:u,className:o()(un.root,a)},s.fileType&&r.default.createElement(cn.Meta,{label:"File type",tooltip:"Asset file type: JS, CSS, image, media, fonts, HTML, or other"},r.default.createElement(rn,{as:n,...pl(s.fileType,p),onClick:c},p)),(null==d?void 0:d.chunkId)&&l&&r.default.createElement("div",null,r.default.createElement(dn,{as:n,chunks:l,chunkId:null==d?void 0:d.chunkId,name:null==d?void 0:d.name,onClick:c})))},pn={tableValue:"QcSBg"},fn=e=>{const{className:t="",runs:a=null,labels:l=null,...n}=e;return r.default.createElement(G,{space:"xsmall",...n,className:o()(pn.root,t)},r.default.createElement("p",{className:pn.text},"Asset file name is the same, but the size has changed."),a&&r.default.createElement(Ne,{outline:!0,compact:!0},r.default.createElement(Ne.THead,null,r.default.createElement(Ne.Tr,null,r.default.createElement(Ne.Th,null," "),r.default.createElement(Ne.Th,null,"File name"),r.default.createElement(Ne.Th,{className:pn.tableValue},"Size"))),r.default.createElement(Ne.TBody,null,a.map((({name:e,value:t},a)=>r.default.createElement(Ne.Tr,{key:e},r.default.createElement(Ne.Th,null,null==l?void 0:l[a]),r.default.createElement(Ne.Td,null,e),r.default.createElement(Ne.Td,{className:pn.tableValue},t)))))))},En=e=>{const{className:t,handleViewAll:a,handleResetFilters:l,...n}=e;return r.default.createElement(R,{className:t,glyph:"more-vertical",...n},l&&r.default.createElement(L,{onClick:l},D),a&&r.default.createElement(L,{onClick:a},_))};En.propTypes={className:s().string,handleViewAll:s().func,handleResetFilters:s().func},En.defaultProps={className:"",handleViewAll:null,handleResetFilters:null};const hn=e=>{const{className:t,title:a,info:l,popoverInfo:n,popoverHref:s}=e,i=o()("tr3O1",t);return r.default.createElement(G,{space:"none",className:i},r.default.createElement(C,{space:"xxxsmall",alignItems:"center",as:"h3",className:"TP_2e"},r.default.createElement("span",null,a),(n||s)&&r.default.createElement(fe,{label:r.default.createElement(g,{glyph:g.ICONS.HELP,className:"Rc2zX"}),anchorClassName:"tc9Qs"},r.default.createElement(G,{space:"xxxsmall"},n&&r.default.createElement("p",null,n),s&&r.default.createElement("p",null,r.default.createElement(y,{kind:"primary",type:"button",onClick:()=>window.open(s)},"Read more"))))),l&&r.default.createElement("p",{className:"J7JMj"},l))};hn.propTypes={className:s().string,title:s().string.isRequired,info:s().node,popoverHref:s().string,popoverInfo:s().string},hn.defaultProps={className:"",info:null,popoverHref:"",popoverInfo:""};const gn={buttonActive:"lQKLJ",itemLast:"l5mzw",dropdownItemIcon:"FW2PY",dropdownItemActive:"no2lh"},Nn="",bn={[pa.TABLE]:{glyph:g.ICONS.TABLE,label:"Table"},[pa.TREEMAP]:{glyph:g.ICONS.TREEMAP,label:"Treemap"}},yn=Object.values(pa),vn=e=>{const{value:t,groupBy:a=Nn,groups:l={},onSelect:n,...s}=e;return r.default.createElement(S,{...s},yn.map(((e,s)=>{const i=null==l?void 0:l[e],c=bn[e],u=yn.length-1===s,d=e===t;if(!i||0===i.length)return r.default.createElement(y,{outline:!0,active:d,size:"small",type:"button",glyph:c.glyph,onClick:()=>n(e),className:u&&gn.itemLast,key:e},c.label);const m=[{value:Nn,label:"No groups"},...i.map((e=>({value:e,label:`Group by ${e}`})))];return r.default.createElement(R,{glyph:c.glyph,label:c.label,className:o()(u&&gn.itemLast,d&&gn.buttonActive),key:e},m.map((t=>{const l=d&&t.value===a;return r.default.createElement(L,{onClick:()=>n(e,t.value),isActive:l,className:o()(gn.dropdownItem,l&&gn.dropdownItemActive),key:t.value},r.default.createElement(C,{space:"xxxsmall",alignItems:"center"},r.default.createElement(g,{glyph:g.ICONS.CHECK,size:"small",className:gn.dropdownItemIcon}),r.default.createElement("span",null,t.label)))})))})))};var In=a(9),Tn=a(8383),Cn=a(9989);const Sn="View children entries",kn={root:"aZ2Wr",canvas:"hZc3J",tileGroup:"LPLNJ",tileGroupTitle:"hI1Sz",tileGroupTitleContent:"tCvOp",tileGroupTitleText:"avLQl",tileGroupTitleTotal:"Dpb6B","tileGroup--minimal":"nuUU6","tileGroup--small":"Hh8Zo",nested:"ExSrn",tile:"fW7W4","tileGroup--NEGATIVE":"Q4lDk","tileGroup--POSITIVE":"MqCwi","tileGroup--NO_CHANGE":"QHgms",tileContent:"pHtXw",tileFirstCol:"PiU2I",tileContentLabel:"lO5rr",tileContentValue:"xQWef",tileContentMetric:"hWi3n",tileContentDelta:"YriaX",tileSizeSmall:"hZ5Xm","tile-NO_CHANGE":"_NeHR","tile-HIGH_NEGATIVE":"nyFwl","tile-NEGATIVE":"iHHzd","tile-LOW_NEGATIVE":"p3LvF","tile-LOW_POSITIVE":"_p8zw","tile-POSITIVE":"AfZr4","tile-HIGH_POSITIVE":"JkiEo",emptyMessage:"yBK3e",emptyMessageWrapper:"VANWr",tileContentTooltipAnchor:"WnzKp",tooltip:"k3N9U",tileTooltipArrow:"XxMyJ",tileTooltipContentTitle:"eAsWm"};var wn=a(6728),An=a(9302);const On="(root)";function Ln(e){const t=e.runs.map((e=>(null==e?void 0:e.value)||0));return Math.max(...t)}function Rn(e){const t=e.map((e=>({id:e.key,label:e.label,value:Ln(e),item:e})));return{id:"",label:On,value:0,children:t}}function Mn(e){var t,a;const l=null==e?void 0:e.length,n=(null===(t=e[0])||void 0===t?void 0:t.value)||0;return e.length<2?{current:n,baseline:void 0}:{current:n,baseline:null===(a=null==e?void 0:e[l-1])||void 0===a?void 0:a.value}}function Pn(e,t,a,l){var n,s,r;const i=t.slice(0,a),[o,...c]=t.slice(a);if(!o)return e.push(l),Mn(l.item.runs);const u=[...i,o].join("/");let d=e.find((e=>e.id===u));const m=Mn(null===(n=null==l?void 0:l.item)||void 0===n?void 0:n.runs),p=void 0!==m.baseline;return d||(d={id:u,label:o,value:0,children:[],total:{current:0,baseline:p?0:void 0}},e.push(d)),d.total={current:((null===(s=d.total)||void 0===s?void 0:s.current)||0)+m.current,baseline:p?((null===(r=d.total)||void 0===r?void 0:r.baseline)||0)+(m.baseline||0):void 0},0===c.length?(d.children.push(l),Mn(l.item.runs)):Pn(d.children,t,a+1,l)}function xn(e){const t=[],a={current:0,baseline:void 0};return e.forEach((e=>{const l=e.key.split("/"),n=l.slice(0,-1),s=l.slice(-1)[0],r={id:e.key,label:s,value:Ln(e),item:e},i=Pn(t,n,0,r);console.log(i),a.current+=i.current,a.baseline=void 0!==i.baseline?(a.baseline||0)+i.baseline:void 0})),{id:"",label:On,value:0,children:t,total:a}}function Dn(e){const{parentRef:t,gutter:a=16,timeout:l=240}=e,n=(0,wn.A)(t,{whenHovered:!0}),s=(0,r.useCallback)((()=>{var e,t,a,l;return 0===n.docX&&0===n.docY&&0===n.elW&&0===n.elH?null:{x:n.docX-(null!==(t=null===(e=null===document||void 0===document?void 0:document.defaultView)||void 0===e?void 0:e.scrollX)&&void 0!==t?t:0),y:n.docY-(null!==(l=null===(a=null===document||void 0===document?void 0:document.defaultView)||void 0===a?void 0:a.scrollY)&&void 0!==l?l:0),w:1,h:1}}),[n.docX,n.docY]),i=(0,Te.i)({gutter:a,getAnchorRect:s,timeout:l});return(0,An.A)(i.render,10,[n.docX,n.docY]),i}const _n=e=>{const{item:t}=e,a=t.runs[0],l=t.runs[t.runs.length-1];return r.default.createElement(G,{space:"small",className:kn.tileTooltipContent},r.default.createElement("h3",{className:kn.tileTooltipContentTitle},r.default.createElement(U,{as:"code",name:t.label})),r.default.createElement(an,{current:a.displayValue,delta:a.displayDeltaPercentage,deltaType:a.deltaType,baseline:(null==l?void 0:l.displayValue)||"0B"}))},Fn=(0,r.forwardRef)(((e,t)=>{const{label:a,sizeDisplay:l,item:n,runInfo:s}=e;if("minimal"===l)return r.default.createElement("div",{className:kn.tileContent,ref:t});const i=a||n.label;return"small"===l?r.default.createElement("div",{className:kn.tileContent,ref:t},r.default.createElement("p",{className:kn.tileContentLabel},i)):r.default.createElement("div",{className:kn.tileContent,ref:t},r.default.createElement("p",{className:kn.tileContentLabel},a||n.label),r.default.createElement("p",{className:kn.tileContentValue},r.default.createElement("span",{className:kn.tileContentMetric},s.displayValue),r.default.createElement(Dt,{className:kn.tileContentDelta,displayValue:s.displayDeltaPercentage,deltaType:s.deltaType})))})),Vn=e=>{const{label:t,sizeDisplay:a,item:l,runInfo:n,parentRef:s}=e,i=Dn({parentRef:s});return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ce.f,{state:i,className:kn.tileContentTooltipAnchor},r.default.createElement(Fn,{label:t,sizeDisplay:a,item:l,runInfo:n})),r.default.createElement(Se.m,{state:i,className:kn.tooltip},r.default.createElement(ke.P,{state:i,size:16,className:kn.tileTooltipArrow}),r.default.createElement(_n,{item:l})))},$n=e=>{var t;const{left:a,top:l,width:n,height:s,data:i,onClick:c}=e,{item:u,label:d}=i,m=null===(t=u.runs)||void 0===t?void 0:t[0],p=(0,r.useMemo)((()=>function(e,t){return t<29.3||e<58?"minimal":t<48||e<112?"small":"default"}(n,s)),[n,s]),f=(0,r.useCallback)((e=>{e.stopPropagation(),null==c||c(u.key)}),[u.key,c]),E=(0,r.useRef)(null),h=(0,In.A)(E),g=o()(kn.tile,kn[`tile-${m.deltaType}`],"small"===p&&kn.tileSizeSmall,"default"===p&&kn.tileSizeDefault,2===a&&kn.tileFirstCol);return r.default.createElement("div",{onClick:f,role:"button","aria-label":"View entry info",ref:E,style:{left:a,top:l,width:n,height:s},className:g},h?r.default.createElement(Vn,{label:d,sizeDisplay:p,item:u,runInfo:m,parentRef:E}):r.default.createElement(Fn,{label:d,sizeDisplay:p,item:u,runInfo:m}))},zn=e=>{const{title:t,runInfo:a,baselineDisplayValue:l}=e;return r.default.createElement(G,{space:"small",className:kn.tileTooltip},r.default.createElement("h3",{className:kn.tileTooltipContentTitle},r.default.createElement(U,{as:"code",name:t})),a&&r.default.createElement(an,{current:a.displayValue,baseline:l,delta:a.displayDeltaPercentage,deltaType:a.deltaType}))},jn=e=>{const{title:t,runInfo:a}=e;return r.default.createElement("div",{className:kn.tileGroupTitleContent},t&&r.default.createElement("span",{className:kn.tileGroupTitleText},t),a&&r.default.createElement("span",{className:kn.tileGroupTitleTotal},a.displayValue,"displayDelta"in a&&`(${a.displayDeltaPercentage})`))},Gn=e=>{const{parentRef:t,tooltipContent:a,...l}=e,n=Dn({parentRef:t});return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ce.f,{state:n,className:kn.tileContentTooltipAnchor},r.default.createElement(jn,{...l})),r.default.createElement(Se.m,{state:n,className:kn.tooltip},r.default.createElement(ke.P,{state:n,size:16,className:kn.tileTooltipArrow}),r.default.createElement(zn,{...a})))},Hn=e=>{const{tooltipContent:t,...a}=e,l=(0,r.useRef)(null),n=(0,In.A)(l);return r.default.createElement("div",{className:kn.tileGroupTitle,ref:l},n?r.default.createElement(Gn,{parentRef:l,tooltipContent:t,...a}):r.default.createElement(jn,{...a}))},Bn=e=>{const{title:t="",total:a,id:l,childNodes:n,onItemClick:s,onGroupClick:i,left:c,top:u,width:d,height:m,absoluteLeft:p,absoluteTop:f}=e,E=(0,r.useCallback)((e=>{null==i||i(l),e.stopPropagation()}),[i,l]),h=(0,r.useMemo)((()=>function(e,t){return t<24||e<24?"minimal":t<32?"small":"default"}(d||0,m||0)),[d,m]),[g,N,b]=(0,r.useMemo)((()=>{if(!a)return[];console.info({total:a});const e=vt(tt.METRIC_TYPE_FILE_SIZE,a.current,a.baseline),t=Ye(a.baseline),l=function(e){if(!e)return Fe.NO_CHANGE;const t="displayDelta"in e?e.deltaType:void 0;return(null==t?void 0:t.match(/NEGATIVE/))?Fe.NEGATIVE:(null==t?void 0:t.match(/POSITIVE/))?Fe.POSITIVE:Fe.NO_CHANGE}(e);return[e,t,l]}),[a]),y=o()(kn.tileGroup,kn[`tileGroup--${b}`],kn[`tileGroup--${h}`]),v={title:l||t,runInfo:g,baselineDisplayValue:N};return t&&"minimal"===h?r.default.createElement("div",{onClick:E,role:"button","aria-label":Sn,className:y,style:{left:c,top:u,width:d,height:m}},r.default.createElement(Hn,{tooltipContent:v})):t&&"small"===h?r.default.createElement("div",{onClick:E,role:"button","aria-label":Sn,style:{left:c,top:u,width:d,height:m},className:y},r.default.createElement(Hn,{title:t,tooltipContent:v})):r.default.createElement("div",{onClick:E,role:"button","aria-label":Sn,className:o()(y,kn.tileGroupSizeDefault),style:{left:c,top:u,width:d,height:m}},r.default.createElement(Hn,{title:t,runInfo:g,tooltipContent:v}),null==n?void 0:n.map((e=>{if("children"in e){const t=e.data;return r.default.createElement(Bn,{title:t.label,total:t.total,id:t.id,childNodes:e.children,left:e.x0-p,top:e.y0-f,absoluteLeft:e.x0,absoluteTop:e.y0,width:e.x1-e.x0,height:e.y1-e.y0,onItemClick:s,onGroupClick:i,key:t.id})}return r.default.createElement($n,{data:e.data,left:e.x0-p,top:e.y0-f,width:e.x1-e.x0,height:e.y1-e.y0,onClick:s,key:e.data.id})})))},Un=e=>{var t;const{className:a="",treeNodes:l,onItemClick:n,onGroupClick:s,emptyMessage:i="No data",nested:c=!1,...u}=e,[d,{width:m,height:p}]=(0,Tn.A)(),f=function(e){const{treeNodes:t,width:a,height:l,nested:n}=e,s=(0,r.useMemo)((()=>{const e=(0,Cn.Sk5)(t);return e.sum((e=>e.value)),e.sort(((e,t)=>t.value-e.value)),e}),[t]);return(0,r.useMemo)((()=>{let e=(0,Cn.hkb)().size([a,l]).tile(Cn.bC4.ratio(1.66)).paddingOuter(1);return e=n?e.padding(4).paddingLeft(8).paddingTop(24):e.paddingInner(2),e(s)}),[l,a,s])}({treeNodes:l,width:m,height:p,nested:c});return r.default.createElement("div",{className:o()(kn.root,c&&kn.nested,a),...u,ref:d},f.children&&(null===(t=f.children)||void 0===t?void 0:t.length)>0?r.default.createElement("div",{className:kn.canvas},r.default.createElement(Bn,{title:c?f.data.label:void 0,total:f.data.total,id:f.data.id,childNodes:f.children,onItemClick:n,onGroupClick:s,left:f.x0,top:f.y0,absoluteLeft:f.x0,absoluteTop:f.y0,width:f.x1-f.x0,height:f.y1-f.y0})):r.default.createElement("div",{className:kn.emptyMessage},r.default.createElement("div",{className:kn.emptyMessageWrapper},i)))},Zn={toolbarSearch:"IxWWs",assetNameWrapper:"ZKOrM",assetName:"QF9ol",notPredictive:"UosND",notPredictiveAnchor:"_EiUp",notPredictiveIcon:"OTNQN",assetNameTags:"aZY1a",assetNameTag:"ph4Mk",assetNameTagEntry:"gVK69",assetNameTagInitial:"fBp9Z",assetNameTagChunk:"sGe9q",assetNameText:"dp2sk",root:"Ip0DU",search:"hd2jn"},qn=["Current","Baseline"],Wn={[pa.TREEMAP]:["folder"]},Kn=e=>Object.entries(ct).map((([t,a])=>({key:t,label:a,defaultValue:He()(e,`${zt}.${t}`,!0)}))),Jn=({row:e,customComponentLink:t,filters:a,search:l})=>{const{label:n,isNotPredictive:s,runs:i,isChunk:c,isEntry:u,isInitial:d}=e;return r.default.createElement("span",{className:Zn.assetNameWrapper},s&&r.default.createElement(fe,{label:r.default.createElement(g,{className:Zn.notPredictiveIcon,glyph:g.ICONS.WARNING}),className:Zn.notPredictive,anchorClassName:Zn.notPredictiveAnchor},r.default.createElement(fn,{runs:i,labels:qn})),r.default.createElement(t,{section:Qt,params:{[aa]:{filters:a,search:l,entryId:e.key}},className:Zn.assetName},r.default.createElement("span",{className:Zn.assetNameTags},u&&r.default.createElement(Ie,{className:o()(Zn.assetNameTag,Zn.assetNameTagEntry),title:"Entrypoint",size:Ie.SIZES.SMALL,kind:Ie.KINDS.INFO}),d&&r.default.createElement(Ie,{className:o()(Zn.assetNameTag,Zn.assetNameTagInitial),title:"Initial",size:Ie.SIZES.SMALL,kind:Ie.KINDS.INFO}),c&&r.default.createElement(Ie,{className:o()(Zn.assetNameTag,Zn.assetNameTagChunk),title:"Chunk",size:Ie.SIZES.SMALL,kind:Ie.KINDS.INFO})),r.default.createElement(U,{className:Zn.assetNameText,name:n})))};Jn.propTypes={row:s().shape({key:s().string,label:s().string,isNotPredictive:s().bool,isChunk:s().bool,isInitial:s().bool,isEntry:s().bool,runs:s().arrayOf(s().object)}).isRequired,customComponentLink:s().elementType.isRequired,filters:s().object.isRequired,search:s().string},Jn.defaultProps={search:""};const Xn=e=>{const{metricsTableTitle:t,jobs:a,items:l,displayType:n,emptyMessage:s,showEntryInfo:i,updateSearch:o,search:c}=e,u=(0,r.useMemo)((()=>"folder"===n.groupBy?xn(l):Rn(l)),[l,n.groupBy]),d=(0,r.useCallback)((e=>{""!==e&&`^${Gl()(e)}/`!==c?o(`^${e}/`):o("")}),[o,c]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne,{compact:!0},r.default.createElement(Aa,{metricTitle:t,showSum:!0,jobs:a,rows:l})),r.default.createElement(Un,{treeNodes:u,nested:Boolean(n.groupBy),emptyMessage:s,onItemClick:i,onGroupClick:d}))};Xn.propTypes={jobs:s().arrayOf(s().object).isRequired,items:s().arrayOf(s().object).isRequired,metricsTableTitle:s().node.isRequired,displayType:s().shape({groupBy:s().string}).isRequired,emptyMessage:s().node.isRequired,showEntryInfo:s().func.isRequired,updateSearch:s().func.isRequired,search:s().string.isRequired};const Yn=e=>{const{className:t,jobs:a,chunks:l,items:n,allItems:s,updateFilters:i,resetFilters:c,resetAllFilters:u,totalRowCount:d,filters:m,entryId:f,hasActiveFilters:E,sort:h,updateSort:g,search:N,updateSearch:b,customComponentLink:y,hideEntryInfo:v,showEntryInfo:I}=e,T=null==a?void 0:a.map((e=>null==e?void 0:e.label)),[S,k]=Wl(Wn),w=(0,r.useMemo)((()=>(({compareMode:e,filters:t})=>({[Bt.CHANGED]:{label:"Changed",defaultValue:t[Bt.CHANGED],disabled:!e},[$t]:{label:"Entry type",children:[{key:Bt.ENTRY,label:"Entry",defaultValue:He()(t,`${$t}.${Bt.ENTRY}`,!0)},{key:Bt.INITIAL,label:"Initial",defaultValue:He()(t,`${$t}.${Bt.INITIAL}`,!0)},{key:Bt.CHUNK,label:"Chunk",defaultValue:He()(t,`${$t}.${Bt.CHUNK}`,!0)},{key:Bt.OTHER,label:"Other",defaultValue:He()(t,`${$t}.${Bt.OTHER}`,!0)}]},[zt]:{label:"File type",children:Kn(t)}}))({compareMode:(null==a?void 0:a.length)>1,filters:m})),[a,m]),A=(0,r.useMemo)((()=>r.default.createElement(hn,{title:M,info:`${n.length}/${d}`,popoverInfo:"Asset size - the size of the file produced by the bundler",popoverHref:Ae.TH.mY})),[n,d]),O=(0,r.useCallback)((e=>r.default.createElement(Jn,{row:e,customComponentLink:y,filters:m,search:N})),[y,m,N]),L=(0,r.useMemo)((()=>r.default.createElement(B,{resources:"assets",filtered:0!==d,handleResetFilters:c,handleViewAll:u})),[d,c,u]),R=(0,r.useMemo)((()=>f?s.find((({key:e})=>e===f)):null),[s,f]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(G,{space:"xsmall",as:"section",className:o()(Zn.root,t)},r.default.createElement(Kl,{renderActions:({actionClassName:e})=>r.default.createElement(C,{space:"xxsmall",className:o()(Zn.dropdown,e)},r.default.createElement(vn,{value:S.value,groupBy:S.groupBy,groups:Wn,onSelect:k}),r.default.createElement(En,{handleViewAll:u,handleResetFilters:c}))},r.default.createElement(C,{space:"xxsmall"},r.default.createElement(ne,{className:Zn.toolbarSearch,placeholder:"Search by asset path",defaultValue:N,onChange:b}),r.default.createElement(ce,{className:Zn.toolbarFilters,filters:w,hasActiveFilters:E,onChange:i}))),r.default.createElement(p,{outline:!0,as:"main"},S.value===pa.TABLE&&r.default.createElement(Ma,{runs:a,items:n,renderRowHeader:O,emptyMessage:L,showHeaderSum:!0,title:A,sort:h,updateSort:g}),S.value===pa.TREEMAP&&r.default.createElement(Xn,{jobs:a,items:n,metricsTableTitle:A,displayType:S,emptyMessage:L,showEntryInfo:I,updateSearch:b,search:N}))),R&&r.default.createElement(mn,{className:Zn.assetInfo,item:R,labels:T,chunks:l,customComponentLink:y,onClose:v}))};Yn.defaultProps={className:"",totalRowCount:0,hasActiveFilters:!1,customComponentLink:Yl,entryId:""},Yn.propTypes={className:s().string,jobs:s().arrayOf(s().shape({internalBuildNumber:s().number,label:s().string})).isRequired,chunks:s().arrayOf({id:s().string,name:s().string}).isRequired,items:s().arrayOf(s().shape({key:s().string,label:s().string,runs:s().arrayOf(s().shape({displayValue:s().oneOfType([s().number,s().string]),displayDelta:s().oneOfType([s().number,s().string])}))})).isRequired,updateFilters:s().func.isRequired,resetFilters:s().func.isRequired,resetAllFilters:s().func.isRequired,totalRowCount:s().number,filters:s().shape({changed:s().bool,id:s().string}).isRequired,entryId:s().string,hasActiveFilters:s().bool,search:s().string.isRequired,updateSearch:s().func.isRequired,sort:s().shape({sortBy:s().string,direction:s().string}).isRequired,updateSort:s().func.isRequired,allItems:s().arrayOf(s().shape({key:s().string})).isRequired,customComponentLink:s().elementType,hideEntryInfo:s().func.isRequired,showEntryInfo:s().func.isRequired};const Qn=e=>{const{runs:t}=e,a=t.map((e=>null==e?void 0:e.isEntry)).includes(!0),l=t.map((e=>null==e?void 0:e.isInitial)).includes(!0),n=t.map((e=>null==e?void 0:e.isChunk)).includes(!0),s=!(a||l||n),r=(e=>{const t=Object.entries(ot).find((([,t])=>t.test(e)));return t?t[0]:it})(e.key);return{...e,isEntry:a,isInitial:l,isChunk:n,isAsset:s,fileType:r}},es=e=>{return{...e,isNotPredictive:(t=e.key,a=e.runs,a.reduce(((e,l,n)=>e||(n+1===a.length?e:!(!l||!a[n+1]||0===l.delta||t===l.name||l.name!==a[n+1].name)||e)),!1))};var t,a},ts=e=>t=>!(e[Bt.CHANGED]&&!t.changed||!(e[`${$t}.${Bt.ENTRY}`]&&t.isEntry||e[`${$t}.${Bt.INITIAL}`]&&t.isInitial||e[`${$t}.${Bt.CHUNK}`]&&t.isChunk||e[`${$t}.${Bt.OTHER}`]&&t.isAsset)||!e[`${zt}.${t.fileType}`]),as=e=>[!e.isNotPredictive,!e.changed,!e.isInitial,!e.isEntry,!e.isChunk,e.key],ls=e=>{const{jobs:t,filters:a,search:l,setState:n,sortBy:s,direction:i,...o}=e,{chunks:c}=(0,r.useMemo)((()=>z(t)),[t]),{defaultFilters:u,allEntriesFilters:d}=(0,r.useMemo)((()=>({defaultFilters:{[Bt.CHANGED]:(null==t?void 0:t.length)>1,...al(!0),...tl(!0)},allEntriesFilters:{[Bt.CHANGED]:!1,...al(!0),...tl(!0)}})),[t]),m=$l({search:l,filters:a,defaultFilters:u,allEntriesFilters:d,setState:n}),{rows:p,totalRowCount:f}=(0,r.useMemo)((()=>{const e=Ka.assets(t,[Qn,es]);return{rows:e,totalRowCount:e.length}}),[t]),E=Al({rows:p,searchPattern:m.searchPattern,filters:m.filters,getRowFilter:ts}),h=Rl({rows:E,initialField:s,initialDirection:i,getCustomSort:as}),[g,N]=zl({setState:n});return r.default.createElement(Yn,{jobs:t,chunks:c,...o,...m,...h,allItems:p,totalRowCount:f,hideEntryInfo:g,showEntryInfo:N})};ls.propTypes={jobs:s().arrayOf(s().object).isRequired,filters:s().object,search:s().string,sortBy:s().string,direction:s().string,setState:s().func.isRequired},ls.defaultProps={filters:void 0,search:void 0,sortBy:void 0,direction:void 0};var ns=a(841);const ss=r.default.createElement(hn,{title:"Total size by type",popoverInfo:"The total size of the assets produce by the bundler, by file type",popoverHref:Ae.TH.mY}),rs=({className:e,jobs:t,customComponentLink:a,onTreemapItemClick:l,...n})=>{const[s,i]=Wl(),o=(0,ns.W6)(),c=(0,r.useMemo)((()=>Ka.sizes(t)),[t]),u=(0,r.useCallback)((e=>{const t=ca[e.key],{section:l,title:n,params:s}=pl(t,e.label);return r.default.createElement(a,{section:l,title:n,params:s},e.label)}),[a]),d=(0,r.useCallback)((e=>{const t=ca[e],{section:a,params:l}=pl(t,""),n=kl(l),s=`${oa[a]}?${n}`;o.push(s)}),[o]);return r.default.createElement(G,{space:"xsmall",as:"section",className:e},r.default.createElement(Kl,{renderActions:()=>r.default.createElement(vn,{onSelect:i,value:s.value})}),r.default.createElement(p,{outline:!0,as:"main"},s.value===pa.TABLE&&r.default.createElement(Ma,{title:ss,runs:t,items:c,renderRowHeader:u,showHeaderSum:!0,...n}),s.value===pa.TREEMAP&&r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne,{compact:!0},r.default.createElement(Aa,{metricTitle:ss,showSum:!0,jobs:t,rows:c})),r.default.createElement(Un,{treeNodes:Rn(c),onItemClick:l||d}))))};rs.defaultProps={className:"",jobs:[],customComponentLink:Yl,onTreemapItemClick:void 0},rs.propTypes={className:s().string,jobs:s().array,customComponentLink:s().elementType,onTreemapItemClick:s().func};const is={fileName:"YOh2v",external:"fYEOi",packageTitleId:"wGpSJ"},os=e=>{var t,a;const{className:l="",item:n,labels:s,customComponentLink:i=Yl,onClose:o}=e,c=n.label.split(":"),u=c[c.length-1],d=`node_modules/${n.label.split(":").join("/node_modules/")}`,m=`${(null===(a=null===(t=n.runs)||void 0===t?void 0:t[0])||void 0===a?void 0:a.path)||d}/`,[p,f]=u.split("~"),E=(0,r.useMemo)((()=>r.default.createElement("span",{className:is.packageTitle},r.default.createElement("span",{className:is.packageTitleText},p),f&&r.default.createElement("span",{className:is.packageTitleId},"~",f))),[p,f]),h=(0,r.useMemo)((()=>n.duplicate?r.default.createElement("div",null,r.default.createElement(Ie,{as:i,...yl,kind:"danger"},"Duplicate")):null),[n]);return r.default.createElement(cn,{itemTitle:E,item:n,labels:s,tags:h,runNameSelector:"path",onClose:o,className:l},r.default.createElement(cn.Meta,{label:"Path",tooltip:"Package path"},r.default.createElement(U,{name:m,className:is.fileName})),r.default.createElement(G,{space:"xxxsmall"},n.duplicate&&r.default.createElement("div",null,r.default.createElement(i,{...(N=p,{section:ta,title:"View package",params:{[na]:{search:N,filters:{[Xt]:!0}}}})},"View all duplicate instances")),r.default.createElement(i,{...El(m)},"Search modules by package path")),r.default.createElement(C,{space:"xsmall",alignItems:"center",className:is.external},r.default.createElement(C,{space:"xxxsmall",alignItems:"center",as:"a",href:`https://www.npmjs.com/package/${p}`,target:"_blank",rel:"noreferrer",className:is.externalLink},r.default.createElement("span",null,"npmjs.com"),r.default.createElement(g,{glyph:g.ICONS.EXTERNAL_LINK,size:"small"})),r.default.createElement(C,{space:"xxxsmall",alignItems:"center",as:"a",href:`https://bundlephobia.com/result?p=${p}`,target:"_blank",rel:"noreferrer",className:is.externalLink},r.default.createElement("span",null,"bundlephobia.com"),r.default.createElement(g,{glyph:g.ICONS.EXTERNAL_LINK,size:"small"}))));var N},cs={title:"ZTf4u",toolbarSearch:"Xhog7",hoverCard:"v5smK",packageName:"jZSdy",packageNameTagDuplicate:"JtICE",packageNameLabel:"OwlsH",root:"DOU0J"},us={[pa.TREEMAP]:["folder"]},ds=({packageName:e,showDetails:t,row:a,filters:l,search:n,CustomComponentLink:s})=>{const i=(0,r.useMemo)((()=>({[na]:{filters:l,search:n,entryId:t?a.key:e}})),[l,n,a,e]);return r.default.createElement(s,{section:ta,params:i,className:cs.packageName},t&&a.duplicate&&r.default.createElement(Ie,{className:cs.packageNameTagDuplicate,title:"Duplicate package",kind:Ie.KINDS.DANGER,size:Ie.SIZES.SMALL}),r.default.createElement("span",{className:cs.packageNameLabel},e))};ds.propTypes={packageName:s().string.isRequired,showDetails:s().bool.isRequired,row:s().shape({label:s().string,duplicate:s().bool,runs:s().arrayOf(s().shape({path:s().string})).isRequired}).isRequired,CustomComponentLink:s().elementType.isRequired,filters:s().object,search:s().string};const ms=({row:e,labels:t,CustomComponentLink:a,filters:l,search:n})=>{const s=e.label.split(":");return r.default.createElement("span",{className:cs.packageNames},s.map(((i,o)=>r.default.createElement(ds,{packageName:i,row:e,labels:t,showDetails:o===s.length-1,CustomComponentLink:a,filters:l,search:n}))))};ms.propTypes={row:s().shape({label:s().string,duplicate:s().bool,runs:s().arrayOf(s().shape({path:s().string})).isRequired}).isRequired,CustomComponentLink:s().elementType.isRequired,filters:s().object,search:s().string};const ps=e=>{const{metricsTableTitle:t,jobs:a,items:l,displayType:n,emptyMessage:s,showEntryInfo:i,updateSearch:o,search:c}=e,u=(0,r.useMemo)((()=>"folder"===n.groupBy?xn(l):Rn(l)),[l,n.groupBy]),d=(0,r.useCallback)((e=>{if(""===e)return void o("");const t=`^${Gl()(e)}/`;o(t!==c?t:"")}),[o,c]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne,{compact:!0},r.default.createElement(Aa,{metricTitle:t,showSum:!0,jobs:a,rows:l})),r.default.createElement(Un,{treeNodes:u,nested:Boolean(n.groupBy),emptyMessage:s,onItemClick:i,onGroupClick:d}))};ps.propTypes={jobs:s().arrayOf(s().object).isRequired,items:s().arrayOf(s().object).isRequired,metricsTableTitle:s().node.isRequired,displayType:s().shape({groupBy:s().string}).isRequired,emptyMessage:s().node.isRequired,showEntryInfo:s().func.isRequired,updateSearch:s().func.isRequired,search:s().string.isRequired};const fs=e=>{const{className:t,jobs:a,items:l,updateFilters:n,resetFilters:s,resetAllFilters:i,totalRowCount:c,filters:u,sort:d,updateSort:m,search:f,updateSearch:E,hasActiveFilters:h,customComponentLink:g,entryId:N,allItems:b,hideEntryInfo:y,showEntryInfo:v}=e,I=null==a?void 0:a.map((e=>null==e?void 0:e.label)),[T,S]=Wl(us),k=(0,r.useMemo)((()=>(({compareMode:e,filters:t})=>({[Jt]:{label:"Changed",defaultValue:t[Jt],disabled:!e},[Xt]:{label:"Duplicate",defaultValue:t[Xt]}}))({compareMode:(null==a?void 0:a.length)>1,filters:u})),[a,u]),w=(0,r.useMemo)((()=>r.default.createElement(hn,{title:x,info:`${l.length}/${c}`,popoverInfo:"Package size - the total package's module size before any production optimization(ex: minification)",popoverHref:Ae.TH.U$})),[l,c]),A=(0,r.useCallback)((e=>r.default.createElement(ms,{row:e,labels:I,CustomComponentLink:g,filters:u,search:f})),[g,I,u,f]),O=(0,r.useMemo)((()=>r.default.createElement(B,{resources:"packages",filtered:0!==c,handleResetFilters:s,handleViewAll:i})),[c,s,i]),L=(0,r.useMemo)((()=>N?b.find((({key:e})=>e===N)):null),[b,N]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(G,{space:"xsmall",as:"section",className:o()(cs.root,t)},r.default.createElement(Kl,{className:cs.toolbar,renderActions:({actionClassName:e})=>r.default.createElement(C,{space:"xxsmall",className:o()(cs.dropdown,e)},r.default.createElement(vn,{onSelect:S,value:T.value,groupBy:T.groupBy,groups:us}),r.default.createElement(En,{handleViewAll:i,handleResetFilters:s}))},r.default.createElement(C,{space:"xxsmall"},r.default.createElement(ne,{className:cs.toolbarSearch,placeholder:"Search by package name",defaultValue:f,onChange:E}),r.default.createElement(ce,{filters:k,label:`Filters (${l.length}/${c})`,onChange:n,hasActiveFilters:h}))),r.default.createElement(p,{outline:!0,as:"main"},T.value===pa.TABLE&&r.default.createElement(Ma,{runs:a,items:l,emptyMessage:O,renderRowHeader:A,showHeaderSum:!0,title:w,sort:d,updateSort:m}),T.value===pa.TREEMAP&&r.default.createElement(ps,{jobs:a,items:l,metricsTableTitle:w,displayType:T,emptyMessage:O,showEntryInfo:v,updateSearch:E,search:f}))),L&&r.default.createElement(os,{className:cs.packageInfo,item:L,labels:I,customComponentLink:g,onClose:y}))};fs.defaultProps={className:"",totalRowCount:0,hasActiveFilters:!1,customComponentLink:Yl,entryId:""},fs.propTypes={className:s().string,jobs:s().arrayOf(s().shape({internalBuildNumber:s().number})).isRequired,items:s().arrayOf(s().shape({key:s().string,label:s().string,runs:s().arrayOf(s().shape({displayValue:s().oneOfType([s().number,s().string]),displayDelta:s().oneOfType([s().number,s().string])}))})).isRequired,updateFilters:s().func.isRequired,resetFilters:s().func.isRequired,resetAllFilters:s().func.isRequired,totalRowCount:s().number,filters:s().shape({changed:s().bool}).isRequired,hasActiveFilters:s().bool,sort:s().shape({sortBy:s().string,direction:s().string}).isRequired,updateSort:s().func.isRequired,search:s().string.isRequired,updateSearch:s().func.isRequired,allItems:s().arrayOf(s().shape({key:s().string})).isRequired,customComponentLink:s().elementType,entryId:s().string,hideEntryInfo:s().func.isRequired,showEntryInfo:s().func.isRequired};const Es=e=>t=>!(e[Jt]&&!t.changed||e[Xt]&&!t.duplicate),hs=e=>[!e.changed,e.key],gs=e=>t=>({...t,duplicate:e.includes(t.key)}),Ns=e=>{const{jobs:t,search:a,filters:l,setState:n,sortBy:s,direction:i,...o}=e,{defaultFilters:c,allEntriesFilters:u}=(0,r.useMemo)((()=>({defaultFilters:{[Jt]:(null==t?void 0:t.length)>1,[Xt]:!1},allEntriesFilters:{[Jt]:!1,[Xt]:!1}})),[t]),d=$l({search:a,filters:l,defaultFilters:c,allEntriesFilters:u,setState:n}),{rows:m,totalRowCount:p}=(0,r.useMemo)((()=>{const e=(e=>{const t=e.map((e=>{var t,a,l;const n=(null===(l=null===(a=null===(t=null==e?void 0:e.insights)||void 0===t?void 0:t.webpack)||void 0===a?void 0:a.duplicatePackages)||void 0===l?void 0:l.data)||{};return Object.values(n).flat()}));return Tt()(null==t?void 0:t.flat())})(t),a=Ka.packages(t,[gs(e)]);return{rows:a,totalRowCount:a.length}}),[t]),f=Al({rows:m,searchPattern:d.searchPattern,filters:d.filters,getRowFilter:Es}),E=Rl({rows:f,initialField:s,initialDirection:i,getCustomSort:hs}),[h,g]=zl({setState:n});return r.default.createElement(fs,{jobs:t,...o,...d,...E,allItems:m,totalRowCount:p,hideEntryInfo:h,showEntryInfo:g})};Ns.propTypes={jobs:s().arrayOf(s().object).isRequired,filters:s().object,search:s().string,sortBy:s().string,direction:s().string,setState:s().func.isRequired},Ns.defaultProps={filters:void 0,search:void 0,sortBy:void 0,direction:void 0};const bs={moduleSizes:"d_H_d",chunksItems:"lhWqt","chunksItem-info":"QzZNJ","chunksItem-danger":"y_Ngv","chunksItem-default":"q0Psp",duplicateInstances:"danP5"},ys=({current:e,baseline:t})=>{const a=vt({biggerIsBetter:!1,formatter:Qe},e,t);return r.default.createElement(an,{current:a.displayValue,delta:a.displayDeltaPercentage,deltaPercentage:a.displayDelta,deltaType:a.deltaType,size:"small",className:bs.duplicateInstances})};var vs;!function(e){e[e.ADDED=2]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.NOT_CHANGED=0]="NOT_CHANGED"}(vs||(vs={}));const Is={[vs.ADDED]:"info",[vs.REMOVED]:"danger",[vs.NOT_CHANGED]:"default"},Ts=e=>{var t,a;const{customComponentLink:l,runs:n,chunks:s,chunkIds:i}=e,c=function(e,t){const a=[];return e.forEach((e=>{t.includes(e)?a.push({id:e,state:vs.NOT_CHANGED}):a.push({id:e,state:vs.ADDED})})),t.forEach((t=>{e.includes(t)||a.push({id:t,state:vs.REMOVED})})),Ll()(a,"state","desc")}((null===(t=n[0])||void 0===t?void 0:t.chunkIds)||[],(null===(a=n[n.length-1])||void 0===a?void 0:a.chunkIds)||[]);return r.default.createElement(G,{space:"xxxsmall"},r.default.createElement("div",null,c.map((e=>{const t=null==s?void 0:s.find((({id:t})=>t===e.id));return t?r.default.createElement(rn,{as:l,...hl(i,e.id),className:o()(bs.chunksItem,bs[`chunksItem-${Is[e.state]}`])},t.name):null}))))},Cs=e=>{const{metric:t,title:a,titleTooltip:l,current:n,baseline:s}=e,i=vt(t,n||0,s);return r.default.createElement(an,{title:a,titleTooltip:l,current:i.displayValue,delta:i.displayDeltaPercentage,deltaPercentage:i.displayDelta,deltaType:i.deltaType,baseline:s?t.formatter(s):void 0})},Ss=e=>{const t=e,a=t.runs[0],l=t.runs.length>1?t.runs[t.runs.length-1]:null,n=tt.METRIC_TYPE_FILE_SIZE;return r.default.createElement(C,{space:"small",className:bs.moduleSizes},t.duplicated&&r.default.createElement(r.default.Fragment,null,r.default.createElement(Cs,{metric:n,title:Ea[fa.TOTAL_SIZE].label,titleTooltip:Ea[fa.TOTAL_SIZE].tooltip,current:null==a?void 0:a.sizeTotal,baseline:null==l?void 0:l.sizeTotal}),r.default.createElement(Cs,{metric:n,title:Ea[fa.DUPLICATE_SIZE].label,titleTooltip:Ea[fa.DUPLICATE_SIZE].tooltip,current:null==a?void 0:a.sizeDuplicate,baseline:null==l?void 0:l.sizeDuplicate})),r.default.createElement(Cs,{metric:n,title:Ea[fa.SIZE].label,titleTooltip:Ea[fa.SIZE].tooltip,current:null==a?void 0:a.size,baseline:null==l?void 0:l.size}))},ks=e=>{var t,a;const{className:l="",item:n,labels:s,chunks:i=[],chunkIds:c=[],metricLabel:u="",customComponentLink:d=Yl,onClick:m=te(),onClose:p}=e,f=o()(bs.root,l),E=(0,r.useMemo)((()=>n.duplicated?r.default.createElement("div",null,r.default.createElement(Ie,{as:d,...fl,kind:"danger"},"Duplicate")):null),[n]),h=ct[n.fileType],g=n.thirdParty?"Third party":"First party",N=n.runs[0],b=n.runs.length>1?n.runs[n.runs.length-1]:void 0,y=(null===(t=null==N?void 0:N.chunkIds)||void 0===t?void 0:t.length)||0,v=(null===(a=null==b?void 0:b.chunkIds)||void 0===a?void 0:a.length)||0,I=y>0?y-1:0,T=v>0?v-1:0,C=0!==I||0!==T;return r.default.createElement(cn,{item:n,labels:s,tags:E,onClose:p,renderRunInfo:Ss,runSizeLabel:u,className:f},r.default.createElement(G,{space:"xxxsmall"},(null==n?void 0:n.fileType)&&r.default.createElement(cn.Meta,{label:"File type",tooltip:"Module file type: JS, CSS"},r.default.createElement(rn,{as:d,...gl(n.fileType,h)},h)),r.default.createElement(cn.Meta,{label:"Source",tooltip:"Module source type: first party, third party"},r.default.createElement(rn,{as:d,...Nl(n.thirdParty||!1,g),onClick:m},g)),C&&r.default.createElement(cn.Meta,{label:"Duplicates",tooltip:"Module duplicate instances"},r.default.createElement(ys,{current:I,baseline:b?T:void 0})),r.default.createElement(cn.Meta,{label:"Chunks",tooltip:"Chunks that contain the module"},r.default.createElement(Ts,{runs:n.runs,chunks:i,chunkIds:c,customComponentLink:d}))))};var ws=a(1885),As=a.n(ws),Os=a(4697),Ls=a.n(Os);const Rs=e=>{const{key:t,runs:a}=e,l=e;var n;return l.thirdParty=Boolean(t.match(Ha)),l.duplicated=Boolean(a.find((e=>!0===(null==e?void 0:e.duplicated)))),l.fileType=(n=e.key,Jl(n,dt)),l.runs=e.runs.map((e=>{var t;if(!e)return e;const a=e,l=(null===(t=a.chunkIds)||void 0===t?void 0:t.length)||0;return{...a,size:a.originalValue,sizeDuplicate:l>1?(l-1)*a.originalValue:0,sizeTotal:l*a.originalValue}})),l},Ms=e=>[!e.changed,e.key],Ps=({chunkIds:e})=>t=>{const a=[];e.forEach((e=>{t[`${jt}.${e}`]&&a.push(e)}));const l=a.length!==e.length;return e=>{var n;if(t[Ut]&&!e.changed)return!1;if(t[Zt]&&!e.duplicated)return!1;if(!(t[`${Ht}.${qt}`]&&!1===e.thirdParty||t[`${Ht}.${Wt}`]&&!0===e.thirdParty))return!1;if(!t[`${Gt}.${e.fileType}`])return!1;if(l){const t=(null===(n=null==e?void 0:e.runs)||void 0===n?void 0:n.map((e=>(null==e?void 0:e.chunkIds)||[])))||[],l=Ls()(...t);return As()(l,a).length>0}return!0}},xs={title:"GzUGy",toolbarSearch:"pm294",metricSelector:"PnmcQ",nameTagDuplicated:"zBBS5",nameText:"nXCaM",root:"jpdPe",name:"k7tnL"},Ds={[pa.TREEMAP]:["folder"]},_s=e=>{const{row:t,filters:a,search:l,moduleMetric:n,customComponentLink:s}=e,i=t;return r.default.createElement(s,{section:ea,params:{[la]:{filters:a,search:l,entryId:i.key,metric:n}},className:xs.name},i.duplicated&&r.default.createElement(Ie,{className:xs.nameTagDuplicated,size:"small",kind:Ie.KINDS.DANGER}),r.default.createElement(U,{className:xs.nameText,name:i.label}))},Fs=e=>{const{metricsTableTitle:t,jobs:a,items:l,displayType:n,emptyMessage:s,showEntryInfo:i,updateSearch:o,search:c}=e,u=(0,r.useMemo)((()=>"folder"===n.groupBy?xn(l):Rn(l)),[l,n]),d=(0,r.useCallback)((e=>{if(""===e)return void o("");const t=`^${Gl()(e)}/`;o(t!==c?t:"")}),[o,c]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(Ne,{compact:!0},r.default.createElement(Aa,{metricTitle:t,showSum:!0,jobs:a,rows:l})),r.default.createElement(Un,{treeNodes:u,nested:Boolean(n.groupBy),emptyMessage:s,onItemClick:i,onGroupClick:d}))},Vs=e=>{const{className:t="",jobs:a=[],items:l=[],allItems:n=[],chunks:s=[],totalRowCount:i=0,updateFilters:c,resetFilters:u,resetAllFilters:d,filters:m,sort:f,updateSort:E,search:h,updateSearch:g,entryId:N,hideEntryInfo:b,moduleMetric:v,setModuleMetric:I,showEntryInfo:T,customComponentLink:k=Yl}=e,w=o()(xs.root,t),A=null==a?void 0:a.map((e=>null==e?void 0:e.label)),[O,L]=Wl(Ds),R=(0,r.useMemo)((()=>(e=>{const{filters:t,chunks:a,compareMode:l}=e,n={[Ut]:{label:"Changed",defaultValue:t[Ut],disabled:!l},[Zt]:{label:"Duplicate",defaultValue:t[Zt]}};if(n[Ht]={label:"Source",children:[{key:qt,label:"First party",defaultValue:He()(t,`${Ht}.${qt}`,!0)},{key:Wt,label:"Third party",defaultValue:He()(t,`${Ht}.${Wt}`,!0)}]},!Rt()(a)){const e={label:"Chunk",children:[]};Ll()(a,"name").forEach((a=>{var l;e.children.push({key:a.id,label:a.name,defaultValue:null===(l=t[`${jt}.${a.id}`])||void 0===l||l})})),n[jt]=e}const s={label:"File type",children:[]};return mt.forEach((e=>{s.children.push({key:e,label:ct[e],defaultValue:He()(t,`${Gt}.${e}`,!0)})})),n[Gt]=s,n})({filters:m,chunks:s,compareMode:a.length>1})),[a,m,s]),M=(0,r.useMemo)((()=>r.default.createElement(hn,{title:P,info:`${l.length}/${i}`,popoverInfo:"Module size - module source size before any production optimization(ex: minification)",popoverHref:Ae.TH.av})),[l,i]),x=(0,r.useCallback)((e=>r.default.createElement(_s,{row:e,filters:m,search:h,moduleMetric:v,customComponentLink:k})),[a,s,k,m,h,v]),D=(0,r.useMemo)((()=>r.default.createElement(B,{resources:"modules",filtered:0!==i,handleResetFilters:u,handleViewAll:d})),[i,u,d]),_=(0,r.useMemo)((()=>N?n.find((({key:e})=>e===N)):null),[n,N]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(G,{space:"xsmall",as:"section",className:w},r.default.createElement(Kl,{className:xs.toolbar,renderActions:({actionClassName:e})=>r.default.createElement(C,{space:"xxsmall",className:o()(xs.dropdown,e)},r.default.createElement(vn,{onSelect:L,value:O.value,groupBy:O.groupBy,groups:Ds}),r.default.createElement(En,{handleViewAll:d,handleResetFilters:u}))},r.default.createElement(C,{space:"xxsmall"},r.default.createElement(ne,{className:xs.toolbarSearch,placeholder:"Search by module path",defaultValue:h,onChange:g}),r.default.createElement(ce,{className:xs.tableDropdown,filters:R,onChange:c}))),r.default.createElement(p,{outline:!0,as:"main"},r.default.createElement(p,{padding:["xsmall","small"],className:xs.metricSelector},r.default.createElement(S,{as:"nav"},r.default.createElement(y,{outline:!0,active:v===fa.TOTAL_SIZE,size:"small",type:"button",onClick:()=>I(fa.TOTAL_SIZE)},r.default.createElement(we,{title:Ea[fa.TOTAL_SIZE].tooltip},Ea[fa.TOTAL_SIZE].label)),r.default.createElement(y,{outline:!0,active:v===fa.DUPLICATE_SIZE,size:"small",type:"button",onClick:()=>I(fa.DUPLICATE_SIZE)},r.default.createElement(we,{title:Ea[fa.DUPLICATE_SIZE].tooltip},Ea[fa.DUPLICATE_SIZE].label)),r.default.createElement(y,{outline:!0,active:v===fa.SIZE,size:"small",type:"button",onClick:()=>I(fa.SIZE)},r.default.createElement(we,{title:Ea[fa.SIZE].tooltip},Ea[fa.SIZE].label)))),O.value===pa.TABLE&&r.default.createElement(Ma,{className:xs.table,items:l,runs:a,renderRowHeader:x,emptyMessage:D,showHeaderSum:!0,title:M,sort:f,updateSort:E}),O.value===pa.TREEMAP&&r.default.createElement(Fs,{metricsTableTitle:M,jobs:a,items:l,displayType:O,emptyMessage:D,showEntryInfo:T,updateSearch:g,search:h}))),_&&r.default.createElement(ks,{className:xs.moduleInfo,item:_,chunks:s,chunkIds:null==s?void 0:s.map((({id:e})=>e)),labels:A,metricLabel:Ea[v].label,customComponentLink:k,onClose:b}))},$s=e=>{const{jobs:t,filters:a,search:l,setState:n,sortBy:s,direction:i,metric:o="",...c}=e,[u,d]=function(e){const{metric:t,setState:a}=e,l=(0,r.useMemo)((()=>Object.values(fa).includes(t)?t:fa.TOTAL_SIZE),[t]),n=(0,r.useCallback)((e=>{e!==t&&a({metric:e})}),[t,a]);return(0,r.useMemo)((()=>[l,n]),[l,n])}({metric:o,setState:n}),{chunks:m,chunkIds:p}=(0,r.useMemo)((()=>z(t)),[t]),{defaultFilters:f,allEntriesFilters:E}=(0,r.useMemo)((()=>((e,t)=>{const a={[Ut]:!1,[Zt]:!1,...ll(!0),...nl(e,!0),...sl(!0)};return{defaultFilters:{...a,[Ut]:t},allEntriesFilters:a}})(p,t.length>1)),[p,t]),h=$l({search:l,filters:a,defaultFilters:f,allEntriesFilters:E,setState:n}),{rows:g,totalRowCount:N}=(0,r.useMemo)((()=>{let e=[];return e=u===fa.SIZE?Ka.modules(t,[Rs]):u===fa.DUPLICATE_SIZE?((e,t)=>At(e,Za,_e.FileSize,t))(t,[Rs]):((e,t)=>At(e,qa,_e.FileSize,t))(t,[Rs]),{rows:e,totalRowCount:e.length}}),[t,u]),b=Al({rows:g,searchPattern:h.searchPattern,filters:h.filters,getRowFilter:Ps({chunkIds:p})}),y=Rl({rows:b,initialField:s,initialDirection:i,getCustomSort:Ms}),[v,I]=zl({setState:n});return r.default.createElement(Vs,{jobs:t,chunks:m,...c,...h,...y,allItems:g,totalRowCount:N,hideEntryInfo:v,moduleMetric:u,setModuleMetric:d,showEntryInfo:I})},zs={root:"kkWBR",error:"luwLw",warning:"CbcQM",info:"SoK4z"},js=new Map([[De.ERROR,g.ICONS.ERROR],[De.WARNING,g.ICONS.WARNING],[De.INFO,g.ICONS.INFO]]),Gs=e=>{const{className:t,type:a}=e,l=Object.values(De).includes(a)?a:De.WARNING,n=o()(zs.root,zs[l],t),s=js.get(l);return r.default.createElement(g,{glyph:s,className:n})},Hs=e=>{const{insights:t,customComponentLink:a=Yl,...l}=e,n=(e=>{const{duplicatePackages:t,newPackages:a}=e,l={[De.ERROR]:[],[De.WARNING]:[],[De.INFO]:[]};return t&&l[t.type].push({name:"duplicatePackages",insight:t,link:t.type===De.WARNING?yl:vl}),a&&l[a.type].push({name:"newPackages",insight:a,link:bl}),[...l[De.ERROR]||[],...l[De.WARNING]||[],...l[De.INFO]||[]]})(t);return r.default.createElement(G,{space:"xxsmall",...l},n.map((({name:e,insight:t,link:l})=>{const{text:n}=t.data;return r.default.createElement(C,{key:e,space:"xxsmall",alignItems:"center",as:a,...l,className:"qx2FT"},r.default.createElement(Gs,{type:t.type,className:"CLiFb"}),r.default.createElement("span",null,n))})))};var Bs=a(5292),Us=a.n(Bs);const Zs=e=>Us()(e)||"number"==typeof e?e.toString():e||"",qs="MvkHJ",Ws="M8O97",Ks="wdBx9",Js=e=>{var t;const{className:a,tag:l,job:n}=e,{builtAt:s,hash:i}=(null===(t=n.meta)||void 0===t?void 0:t.webpack)||{},c=o()("sSdhN",a);return r.default.createElement(C,{space:"xsmall",alignItems:"center",className:c},r.default.createElement(C,{space:"xxsmall",as:"h1",className:"paNIN"},r.default.createElement("span",null,`#${n.internalBuildNumber}`),l&&r.default.createElement(Ie,{className:"RpnzT"},l)),s&&r.default.createElement(C,{space:"xxxsmall",alignItems:"center",inline:!0,as:"span",title:s,className:qs},r.default.createElement(g,{glyph:g.ICONS.CLOCK,className:Ws}),r.default.createElement("span",{className:Ks},((e,t)=>{let a,l="";if(!t)return l;if(Us()(t))a=t;else try{a=new Date(t)}catch(e){return Zs(t)}const n=new Intl.DateTimeFormat("undefined"!=typeof window&&void 0!==window.navigator&&window.navigator.languages||"en",e);try{l=n.format(a)}catch(e){return Zs(t)}return l})({dateStyle:"medium",timeStyle:"medium"},s))),i&&r.default.createElement(C,{space:"xxxsmall",alignItems:"center",inline:!0,as:"span",title:"Webpack bundle hash",className:qs},r.default.createElement(g,{glyph:g.ICONS.COMMIT,className:Ws}),r.default.createElement("span",{className:Ks},i.slice(0,7))))},Xs=e=>{const{className:t,jobs:a}=e,l=o()("HXH8K",t);return r.default.createElement("header",{className:l},null==a?void 0:a.map(((e,t)=>r.default.createElement(Js,{key:e.internalBuildNumber||t,job:e,tag:0===t?"current":"baseline"}))))},Ys=e=>{const t=He()(e,"metrics.lighthouse",{});return Object.entries(t).reduce(((e,[t,a])=>({...e,[`lighthouse.${t}`]:a})),{})},Qs=e=>{const{className:t,jobs:a}=e,l=(e=>At(e,Ys))(a);return r.default.createElement(Ma,{className:t,runs:a,items:l})};Qs.defaultProps={className:"",jobs:[]},Qs.propTypes={className:s().string,jobs:s().array};var er=a(4569);const tr={metricHoverCardTitle:"KH30f",readMoreLink:"n89Uh"},ar=({title:e,description:t,url:a})=>{const l=(0,r.useCallback)((e=>{a&&(e.preventDefault(),e.stopPropagation(),window.open(a))}),[a]);return r.default.createElement(G,{space:"xxsmall",className:tr.metricHoverCard},r.default.createElement("h3",{className:tr.metricHoverCardTitle},e),r.default.createElement(G,{space:"xxxsmall"},r.default.createElement("p",{className:tr.metricHoverCardDescription},t),a&&r.default.createElement("div",null,r.default.createElement(er.z,{as:"span",onClick:l,className:tr.readMoreLink},r.default.createElement(C,{alignItems:"center",space:"xxxsmall"},r.default.createElement("span",null,"Learn more"),r.default.createElement(g,{glyph:g.ICONS.EXTERNAL_LINK,size:"small"}))))))},lr=e=>{const{metricId:t,current:a,baseline:l=0,showDelta:n=!0,showMetricDescription:s=!0,showBaseline:i=!0,titleWrapper:o=r.default.Fragment,...c}=e,u=yt(t),d=vt(u,a,l||0),m=(0,r.useMemo)((()=>s&&(u.description||u.url)?r.default.createElement(ar,{title:u.label,description:u.description,url:u.url}):null),[s,u]),p=(0,r.useMemo)((()=>r.default.createElement(o,null,u.label)),[o,u.label]),f=(0,r.useMemo)((()=>n&&!u.skipDelta&&"delta"in d?{delta:d.displayDeltaPercentage,deltaType:d.deltaType}:{}),[d]);return r.default.createElement(an,{title:p,titleHoverCard:m,enhance:!0,current:d.displayValue,showBaseline:i,...i&&{baseline:u.formatter(l)},...f,...c})},nr="wwDgv",sr="masfV",rr="IvCug",ir=["webpack.assetCount","webpack.chunkCount","webpack.moduleCount","webpack.duplicateModulesCount","webpack.duplicateCode","webpack.packageCount","webpack.duplicatePackagesCount"],or=e=>{const{className:t="",metricId:a,data:l,customLink:n,size:s,loading:i,showDelta:o,showBaseline:c}=e,u=wl.get(a),d=He()(l,a,{current:0,baseline:0});return r.default.createElement(p,{key:a,outline:!0,outlineHover:!0,padding:"small",as:n,...null==u?void 0:u.link,className:t},r.default.createElement(lr,{metricId:a,current:d.current,baseline:d.baseline,showDelta:o,showBaseline:c,size:s,loading:i}))},cr=({className:e="",data:t=null,loading:a=!1,showSummaryItemDelta:l=!0,showSummaryItemBaseline:n=!0,summaryItemLink:s=Yl})=>r.default.createElement(p,{className:o()("zR4Dt",e)},r.default.createElement("div",{className:nr},r.default.createElement("div",{className:sr},ua.map((e=>r.default.createElement(or,{key:e,className:rr,metricId:e,data:t,size:"large",loading:a,customLink:s,showDelta:l,showBaseline:n}))))),r.default.createElement("div",{className:nr},r.default.createElement("div",{className:sr},ir.map((e=>r.default.createElement(or,{key:e,className:o()(rr,"oGMN_"),metricId:e,data:t,customLink:s,loading:a,showDelta:l,showBaseline:!1}))))));var ur=a(4667);const dr=e=>r.default.createElement(Bl.QueryParamProvider,{adapter:ur.D,...e}),mr=e=>{const[t,a]=(0,Bl.useQueryParams)({[e]:Sl[e]}),l=t[e],n=(0,r.useCallback)((t=>{const n={...l,...t};q()(l,n)||a({[e]:n})}),[l,a]);return[l,n]},pr={jobs:"q2MgP",tools:"RoAqv",toolsGitHub:"ww1rs",toolsGitHubIcon:"WVS7W"},fr=({className:e="",jobs:t})=>r.default.createElement(I,{as:"header",className:o()(pr.root,e)},r.default.createElement(C,{space:"small",alignItems:"center"},r.default.createElement(Xs,{className:pr.jobs,jobs:t}),r.default.createElement("div",{className:pr.tools},r.default.createElement("a",{href:Ae.Jv,target:"_blank",rel:"noopener noreferrer",title:F,"aria-label":F,className:pr.toolsGitHub},r.default.createElement(g,{glyph:g.ICONS.GITHUB,size:"large",className:pr.toolsGitHubIcon}))))),Er={root:"r_evb",empty:"SjuJA",header:"SZdPe",summaryContainer:"wfDt_",tabsContainer:"mKDtx",tabs:"Lg28G",tabActive:"XkP77",tabsContent:"CGK7_"},hr=()=>{const{pathname:e}=(0,ns.zy)();return(0,r.useEffect)((()=>{window.scrollTo(0,0)}),[e]),null},gr=({jobs:e,version:t,...a})=>r.default.createElement("div",{className:Er.root},r.default.createElement(fr,{className:Er.header,jobs:e}),r.default.createElement("main",{className:Er.main,...a}),r.default.createElement(Re,{version:t}));gr.propTypes={jobs:s().arrayOf(s().object),version:s().string},gr.defaultProps={jobs:null,version:null};const Nr=r.default.createContext({jobs:[]}),br=({jobs:e,...t})=>{const a=(0,r.useMemo)((()=>({jobs:e})),[e]);return r.default.createElement(Nr.Provider,{value:a,...t})};br.propTypes={jobs:s().arrayOf(s().object).isRequired};const yr=()=>{const{jobs:e}=(0,r.useContext)(Nr),t=(0,r.useMemo)((()=>{var t,a;const l=null===(a=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.insights)||void 0===a?void 0:a.webpack;if(!l)return null;const n={...l.duplicatePackagesV3&&{duplicatePackages:l.duplicatePackagesV3},...l.newPackages&&{newPackages:l.newPackages}};return Rt()(n)?null:n}),[e]);return r.default.createElement(G,{space:"medium"},t&&r.default.createElement(I,null,r.default.createElement(G,{space:"xsmall"},r.default.createElement(hn,{title:"Insights"}),r.default.createElement(p,{padding:"small",outline:!0},r.default.createElement(Hs,{insights:t})))),r.default.createElement(I,null,r.default.createElement(rs,{jobs:e})))},vr=()=>{const[e,t]=mr(aa),{jobs:a}=(0,r.useContext)(Nr);return r.default.createElement(I,null,r.default.createElement(ls,{jobs:a,setState:t,...e}))},Ir=()=>{const[e,t]=mr(la),{jobs:a}=(0,r.useContext)(Nr);return r.default.createElement(I,null,r.default.createElement($s,{jobs:a,setState:t,...e}))},Tr=()=>{const[e,t]=mr(na),{jobs:a}=(0,r.useContext)(Nr);return r.default.createElement(I,null,r.default.createElement(Ns,{jobs:a,...e,setState:t}))},Cr=({version:e,jobs:t})=>0===(null==t?void 0:t.length)?r.default.createElement(gr,{version:e},r.default.createElement(I,null,r.default.createElement("div",{className:Er.empty},"No data available."))):r.default.createElement(br,{jobs:t},r.default.createElement(gr,{jobs:t,version:e},r.default.createElement(I,{className:Er.summaryContainer},r.default.createElement(cr,{data:t[0].summary,showSummaryItemDelta:1!==t.length,showSummaryItemBaseline:1!==(null==t?void 0:t.length)})),r.default.createElement(I,{className:Er.tabsContainer},r.default.createElement(ye,{className:Er.tabs},r.default.createElement(ye.Item,{as:Xl.k2,exact:!0,to:"/",activeClassName:Er.tabActive},"Overview"),r.default.createElement(ye.Item,{as:Xl.k2,exact:!0,to:sa,activeClassName:Er.tabActive},M),r.default.createElement(ye.Item,{as:Xl.k2,exact:!0,to:ra,activeClassName:Er.tabActive},P),r.default.createElement(ye.Item,{as:Xl.k2,exact:!0,to:ia,activeClassName:Er.tabActive},x))),r.default.createElement("div",{className:Er.tabsContent},r.default.createElement(ns.dO,null,r.default.createElement(ns.qh,{exact:!0,path:sa,component:vr}),r.default.createElement(ns.qh,{exact:!0,path:ra,component:Ir}),r.default.createElement(ns.qh,{exact:!0,path:ia,component:Tr}),r.default.createElement(ns.qh,{exact:!0,path:"/",component:yr})))));Cr.defaultProps={jobs:[],version:null},Cr.propTypes={jobs:s().arrayOf(s().shape({internalBuildNumber:s().number,insights:s().object,summary:s().object})),version:s().string};const Sr=e=>r.default.createElement(Xl.I9,null,r.default.createElement(hr,null),r.default.createElement(dr,null,r.default.createElement(Cr,{...e}))),kr=({jobs:e})=>(0,l.h)(Sr,{jobs:e,version:"4.15.1"});kr.defaultProps={jobs:[]},kr.propTypes={jobs:s().arrayOf(s().shape({internalBuildNumber:s().number,insights:s().object,summary:s().object}))};const wr=window.__INITIAL_DATA__;(0,l.XX)((0,l.h)(kr,{jobs:wr}),document.getElementById("root"))}},a={};function l(e){var n=a[e];if(void 0!==n)return n.exports;var s=a[e]={id:e,loaded:!1,exports:{}};return t[e](s,s.exports,l),s.loaded=!0,s.exports}l.m=t,e=[],l.O=(t,a,n,s)=>{if(!a){var r=1/0;for(u=0;u<e.length;u++){for(var[a,n,s]=e[u],i=!0,o=0;o<a.length;o++)(!1&s||r>=s)&&Object.keys(l.O).every((e=>l.O[e](a[o])))?a.splice(o--,1):(i=!1,s<r&&(r=s));if(i){e.splice(u--,1);var c=n();void 0!==c&&(t=c)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[a,n,s]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},l.d=(e,t)=>{for(var a in t)l.o(t,a)&&!l.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={792:0};l.O.j=t=>0===e[t];var t=(t,a)=>{var n,s,[r,i,o]=a,c=0;if(r.some((t=>0!==e[t]))){for(n in i)l.o(i,n)&&(l.m[n]=i[n]);if(o)var u=o(l)}for(t&&t(a);c<r.length;c++)s=r[c],l.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return l.O(u)},a=self.webpackChunk=self.webpackChunk||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var n=l.O(void 0,[96],(()=>l(3556)));n=l.O(n)})();</script><div style="position: absolute; width: 0, height: 0"><svg width="0" height="0" style="position:absolute"><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="arrow" xmlns="http://www.w3.org/2000/svg"><path d="M12 5v14M19 12l-7 7-7-7"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="arrow-right-circle" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="m12 16 4-4-4-4M8 12h8"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="check" xmlns="http://www.w3.org/2000/svg"><path d="M20 6 9 17l-5-5"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="chevron-down" xmlns="http://www.w3.org/2000/svg"><path d="m6 9 6 6 6-6"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="chevron-up" xmlns="http://www.w3.org/2000/svg"><path d="m18 15-6-6-6 6"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="clock" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="close" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6M9 9l6 6"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="commit" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="4"/><path d="M1.05 12H7M17.01 12h5.95"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="error" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M12 8v4M12 16h.01"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="external-link" xmlns="http://www.w3.org/2000/svg"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="filter" xmlns="http://www.w3.org/2000/svg"><path d="M12 20V10M18 20V4M6 20v-4"/></symbol><symbol viewBox="0 0 98 96" id="github" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="currentColor"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="help" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="info" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4M12 8h.01"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="menu" xmlns="http://www.w3.org/2000/svg"><path d="M3 12h18M3 6h18M3 18h18"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="more-vertical" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></symbol><symbol viewBox="0 0 24 24" fill="currentColor" id="sort" xmlns="http://www.w3.org/2000/svg"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/><path d="M0 0h24v24H0z" fill="none"/></symbol><symbol fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" id="table" xmlns="http://www.w3.org/2000/svg"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/></symbol><symbol fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" id="treemap" xmlns="http://www.w3.org/2000/svg"><path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 21h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9M12.025 3.422 12 20.652ZM12.85 9l7.347.025zm-.153 6 7.576.025zm4.334.764L17 20.326Z"/></symbol><symbol viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" id="warning" xmlns="http://www.w3.org/2000/svg"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0zM12 9v4M12 17h.01"/></symbol></svg></div></body></html>
\ No newline at end of file
diff --git a/dist/css/dumbymap.css b/dist/css/dumbymap.css
new file mode 100644
index 0000000..4a7bf4f
--- /dev/null
+++ b/dist/css/dumbymap.css
@@ -0,0 +1,819 @@
+root {
+  --block-focus-color: lightyellow;
+  counter-reset: block;
+}
+
+[class^='leader-line'] {
+  z-index: 9999;
+}
+
+@keyframes fade-in {
+  from {
+    opacity: 0;
+  }
+
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes fade-out {
+  from {
+    opacity: 1;
+  }
+
+  to {
+    visibility: hidden;
+    opacity: 0;
+  }
+}
+
+@keyframes map-fade-in {
+  from {
+    opacity: 0.3;
+  }
+
+  to {
+    opacity: 1;
+  }
+}
+
+@keyframes map-fade-out {
+  from {
+    opacity: 1;
+  }
+
+  to {
+    opacity: 0.3;
+  }
+}
+
+a[href^='http']:not(:has(img))::after,
+.external::after {
+  content: '';
+  display: inline-block;
+  width: 8px;
+  height: 8px;
+  margin-right: 4px;
+  margin-left: 2px;
+
+  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z'/%3E%3Cpath fill-rule='evenodd' d='M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z'/%3E%3C/svg%3E");
+  background-position: center;
+  background-size: contain;
+}
+
+.mapclay {
+  position: relative;
+  transform-origin: top left;
+
+  transition: flex-basis 300ms ease-in-out;
+
+  &.focus::after {
+    content: 'Map-ID: ' attr(id);
+    padding: 0.3rem 0.5rem;
+
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    z-index: 9999;
+
+    border: solid transparent;
+    border-radius: 5px;
+
+    background: gray;
+
+    color: white;
+    font-size: 1.5rem;
+    font-weight: bold;
+    line-height: 1.2;
+
+    transform: translate(-50%, -50%);
+    opacity: 0;
+    animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+  }
+
+  &[data-report*='/'] {
+    &::after {
+      content: attr(data-report);
+      padding: 0.3rem 0.5rem;
+
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      z-index: 9999;
+
+      border: solid transparent;
+      border-radius: 5px;
+
+      background: gray;
+
+      color: white;
+      font-size: 1.2rem;
+      font-weight: bold;
+      line-height: 1.2;
+
+      transform: translate(-50%, -50%);
+    }
+
+    &[data-render='fulfilled'][data-report$='\20']::after {
+      content: '\2714  ' attr(data-report);
+      animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+    }
+
+    &[data-render='unfulfilled'][data-report$='\20']::after {
+      content: '\2716  ' attr(data-report);
+      animation: 2.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+    }
+  }
+
+  .marker {
+    background-color: transparent;
+    border-color: transparent;
+  }
+}
+
+.with-leader-line:not(:has(> *)) {
+  display: inline-block;
+  padding-right: 15px;
+  padding-left: 6px;
+
+  background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==');
+  background-repeat: no-repeat;
+  background-position: right 2px top 2px;
+
+  color: #555;
+  background-size: 12px 12px;
+
+  &.geolink {
+    background-color: rgb(248 248 129);
+  }
+
+  &.doclink {
+    background-color: #9ee7ea;
+  }
+
+  &:hover, &.drag {
+    background-image: none;
+
+    font-weight: bolder;
+    text-decoration: none;
+  }
+}
+
+*:has(> nav) {
+  /* FIXME Hide nav at proper time */
+  display: none;
+  min-width: 120px;
+  padding: 0.5rem;
+
+  position: absolute;
+  right: 10px;
+  bottom: 10px;
+  z-index: 500;
+
+  border: 2px solid gray;
+  border-radius: 0.5rem;
+
+  background-color: white;
+
+  &:has(> nav:empty) {
+    display: none;
+  }
+
+  ol {
+    margin-top: 0;
+    margin-bottom: 0.5rem;
+  }
+}
+
+.dumby-block {
+  padding: 1rem 1rem 1rem 2rem;
+
+  position: relative;
+
+  counter-increment: block;
+
+  &::before {
+    content: '';
+    height: calc(100% - 2rem);
+
+    position: absolute;
+    left: 0.8rem;
+
+    border-left: 0.5em solid #e0e0e0;
+
+    transition: border-color 0.5s linear;
+  }
+
+  &.focus {
+    /* Dress up when block is focus */
+
+    /* background: var(--block-focus-color); */
+    &::before {
+      border-color: chocolate;
+    }
+
+    &::after {
+      content: counter(block) '/' attr(data-total);
+      padding: 0.3rem 0.5rem;
+
+      position: absolute;
+      left: 50%;
+      top: 50%;
+      z-index: 9999;
+
+      border: solid transparent;
+      border-radius: 5px;
+
+      background: gray;
+
+      color: white;
+      font-size: 1.5em;
+      font-weight: bold;
+
+      transform: translate(-50%, -50%);
+      opacity: 0;
+      animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+    }
+  }
+
+}
+
+.menu {
+  display: block;
+  overflow: visible;
+  width: fit-content;
+  min-width: 10rem;
+
+  position: absolute;
+  z-index: 9999;
+
+  border: 2px solid gray;
+  border-radius: 6px;
+
+  background: white;
+
+  & > *:first-child {
+    border-top: 2px solid transparent;
+    border-top-left-radius: 5px;
+    border-top-right-radius: 5px;
+  }
+
+  & > *:last-child {
+    border-bottom: 2px solid transparent;
+    border-bottom-left-radius: 5px;
+    border-bottom-right-radius: 5px;
+  }
+
+  &.editor-menu {
+    max-height: 40vh;
+    overflow-y: scroll;
+  }
+}
+
+.menu-item {
+  justify-content: space-between;
+  padding: 0.5rem;
+
+  position: relative;
+
+  cursor: pointer;
+  text-wrap: nowrap;
+
+  &:hover {
+    background: rgb(226 232 240);
+  }
+
+  .info {
+    float: right;
+
+    padding-inline: .5em;
+
+    color: steelblue;
+    font-weight: bold;
+  }
+
+  &.folder::before {
+    content: '⏵';
+    display: inline-block;
+    float: right;
+  }
+
+  &.unchecked::before {
+    content: '\2610';
+    float: right;
+
+    margin-left: 0.5em;
+  }
+
+  &.checked::before {
+    content: '\2611';
+    float: right;
+
+    margin-left: 0.5em;
+  }
+}
+
+.sub-menu {
+  overflow: scroll;
+  width: fit-content;
+  min-width: 6rem;
+  max-height: 40vh;
+
+  position: absolute;
+  z-index: 10000;
+
+  border: 2px solid gray;
+  border-radius: 6px;
+
+  background: white;
+
+  .menu-item {
+    min-width: 5em;
+    margin: 0 auto;
+    padding-inline: 0.5em;
+  }
+}
+
+.plainoverlay-body {
+  position: absolute;
+}
+
+.plainmodal-content {
+  width: 700px;
+  height: 80%;
+  padding: 1em;
+
+  position: absolute;
+  left: 50vw;
+  top: 50vh;
+
+  background: white;
+
+  transform: translate(-50%, -50%);
+  overflow-y: scroll;
+  white-space: pre;
+
+  h3 {
+    margin-top: 1em;
+  }
+
+  details {
+    margin-bottom: 0.5em;
+
+    summary {
+      max-width: 60%;
+
+      cursor: pointer;
+    }
+  }
+
+
+  details > :not(summary) {
+    padding-left: 2em;
+  }
+
+  p {
+    margin: 0.3em;
+    white-space: nowrap;
+    overflow-x: scroll;
+  }
+
+  pre {
+    padding: 0.5em;
+
+    background: #f0f0f0;
+  }
+}
+
+.Dumby {
+  overflow: visible;
+  width: 100%;
+  height: 100%;
+  margin: 0 auto;
+  padding: 0;
+
+  position: relative;
+
+  &::after {
+    content: 'Layout: ' attr(data-layout);
+    padding: 0.3rem 0.5rem;
+
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    z-index: 9999;
+
+    border: solid transparent;
+    border-radius: 5px;
+
+    background: gray;
+
+    color: white;
+    font-size: 1.5rem;
+    font-weight: bold;
+    line-height: 1.2;
+
+    transform: translate(-50%, -50%);
+    opacity: 0;
+  }
+}
+
+.SemanticHtml {
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+  height: 100%;
+  gap: 1rem;
+  overflow-y: auto;
+
+  /* Trivial: gray out text not focused */
+  &:has(.dumby-block.focus) {
+    color: gray;
+
+    .dumby-block.focus {
+      color: initial;
+    }
+  }
+
+  :has(> .mapclay, > [data-placeholder]) {
+    display: flex;
+    gap: 0.5em;
+
+    background-color: white;
+  }
+
+  /* if Map not in showcase, add border when focused */
+  .mapclay {
+    border: 3px solid white;
+
+    &.focus {
+      border: 3px solid gray;
+    }
+
+    &[data-render='unfulfilled'] {
+      border: 3px solid crimson;
+
+      opacity: 0.6;
+    }
+  }
+
+  [data-placeholder] {
+    border: 3px solid gray;
+    flex-grow: 0;
+
+    & > * {
+      opacity: 0.3;
+    }
+
+    /* animation: map-fade-out 1s; */
+  }
+}
+
+.Showcase {
+  display: none;
+  overflow: visible;
+  width: 100%;
+  height: 100%;
+
+  position: relative;
+
+  .mapclay {
+    width: 100%;
+    height: 100%;
+
+    position: absolute;
+    left: 0;
+    top: 0;
+  }
+
+  .focus {
+    z-index: 1;
+  }
+}
+
+.Dumby[data-layout='normal'] {
+  max-width: 60em;
+
+  &::after {
+    animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+  }
+}
+
+.Dumby[data-layout='side-by-side'] {
+  &::after {
+    animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+  }
+
+  .SemanticHtml,
+  .Showcase {
+    width: 50%;
+    min-width: 20%;
+
+    position: absolute;
+    top: 0;
+  }
+
+  .SemanticHtml {
+    left: 0;
+  }
+
+  .Showcase {
+    display: block;
+
+    right: 0;
+  }
+
+  .bar {
+    display: flex;
+    overflow: visible;
+    width: 1px;
+    height: 100%;
+
+    position: absolute;
+    left: 50%;
+    top: 0;
+    z-index: 5;
+
+    border: 2px black solid;
+
+    .bar-handle {
+      display: inline-block;
+      width: 60px;
+      height: 60px;
+
+      position: absolute;
+      left: -30px;
+      top: calc(50% - 30px);
+
+      border-radius: 50%;
+
+      background-color: #3887be;
+      background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiICAgd2lkdGg9IjYwIiAgIGhlaWdodD0iNjAiICAgdmVyc2lvbj0iMS4xIiAgIHZpZXdCb3g9IjAgMCA2MCA2MCIgICBpZD0ic3ZnNTQzNCIgICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxK2RldmVsK29zeG1lbnUgcjEyOTExIiAgIHNvZGlwb2RpOmRvY25hbWU9Imwtci5zdmciPiAgPG1ldGFkYXRhICAgICBpZD0ibWV0YWRhdGE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dmc1NDM0IiAgICAgaW5rc2NhcGU6b2JqZWN0LW5vZGVzPSJ0cnVlIiAgICAgaW5rc2NhcGU6c25hcC1zbW9vdGgtbm9kZXM9InRydWUiPiAgICA8aW5rc2NhcGU6Z3JpZCAgICAgICB0eXBlPSJ4eWdyaWQiICAgICAgIGlkPSJncmlkNTk4OSIgLz4gIDwvc29kaXBvZGk6bmFtZWR2aWV3PiAgPHBhdGggICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjFweDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2Utb3BhY2l0eToxIiAgICAgZD0iTSAyNSAyNCBMIDE2IDMwIEwgMjUgMzYgTCAyNSAyNCB6IE0gMzUgMjQgTCAzNSAzNiBMIDQ0IDMwIEwgMzUgMjQgeiAiICAgICBpZD0icGF0aDU5OTUiIC8+PC9zdmc+');
+
+      transition: transform 0.3s ease-in-out;
+      transform: scale(0.5, 0.5);
+      cursor: grab;
+      box-shadow: inset 0 0 0 4px white;
+
+      &:hover {
+        transform: unset;
+      }
+    }
+  }
+}
+
+.Dumby[data-layout='overlay'] {
+  &::after {
+    animation: 1.5s forwards fade-out cubic-bezier(0.44, 0.18, 0.86, -0.21);
+  }
+
+  .SemanticHtml,
+  .Showcase {
+    display: block;
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    padding: 0;
+
+    position: fixed;
+    left: 0;
+    top: 0;
+  }
+
+  .Showcase {
+    z-index: 0;
+  }
+
+  .SemanticHtml {
+    pointer-events: none;
+
+    z-index: 1;
+  }
+}
+
+.utils {
+  display: flex;
+  padding-block: 1rem;
+  padding-inline: 1rem;
+
+  position: absolute;
+  left: 100%;
+  top: calc(-1rem - 3px);
+
+  font-size: 1.5rem;
+
+  visibility: hidden;
+
+  gap: 6px;
+
+  &:hover {
+    visibility: visible;
+    opacity: 1;
+  }
+
+  [id] {
+    padding: 0.2rem 0.4rem;
+
+    border: 3px gray solid;
+    border-radius: 5px;
+
+    background: white;
+
+    user-select: none;
+  }
+
+  #close {
+    cursor: pointer;
+  }
+
+  #plus-font-size {
+    cursor: zoom-in;
+  }
+
+  #minus-font-size {
+    cursor: zoom-out;
+  }
+}
+
+.draggable-block {
+  /* TODO transition for display */
+  display: none;
+  overflow: visible;
+  width: fit-content;
+
+  position: absolute;
+
+  border: solid gray 3px;
+  border-radius: 0.5rem;
+
+  background: white;
+
+  font-size: 0.8rem;
+  pointer-events: auto;
+
+  &:has(.dumby-block.focus) {
+    display: block;
+
+    outline: solid #505050 1px;
+    border-color: #505050;
+  }
+
+  &:has(pre:only-child [data-placeholder]:only-child) {
+    display: none;
+  }
+
+  /* Fade out top of contents scrolling */
+  &::before {
+    content: '';
+    display: block;
+    height: 1.5rem;
+
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    z-index: 1;
+
+    border-radius: 5px;
+
+    background: linear-gradient(0deg, rgb(255 255 255 / 0%), white 60%);
+  }
+
+  .dumby-block {
+    overflow: scroll;
+    min-width: 5rem;
+    max-width: 25vw;
+    min-height: 5rem;
+    max-height: 50vh;
+    margin: 0;
+    padding-block: 1rem 0;
+    padding-inline: 1rem;
+
+    position: relative;
+
+    /* Don't make corner overflow! */
+    border: solid transparent 2px;
+    border-radius: 0.5rem;
+
+    resize: both;
+
+    /* Remove indicator when inside draggable-block */
+    &::before {
+      display: none;
+    }
+
+    /* allow random width/height after resize */
+    &[style*='height'],
+    &[style*='width'] {
+      max-width: unset;
+      max-height: unset;
+    }
+
+    .mapclay {
+      min-width: 200px;
+    }
+  }
+
+  .draggable-part {
+    display: block;
+    overflow: clip;
+    width: 100%;
+    padding-bottom: 0.5em;
+
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 1;
+    border-top-left-radius: 0.3rem;
+    border-top-right-radius: 0.3rem;
+  }
+
+  .handle {
+    font-size: 1.1rem;
+    text-align: center;
+
+    transition: all 0.3s ease-in-out;
+
+    /* background: white; */
+
+    transform: translate(0, -0.6rem);
+  }
+
+  &.drag,
+  &:has(.draggable-part:hover) {
+    .handle {
+      background: #e1e1e1;
+
+      transform: unset;
+    }
+
+    .utils {
+      visibility: visible;
+      animation: fade-in 0.5s;
+    }
+
+    > *:not(.draggable-part, .utils) {
+      color: gray;
+
+      opacity: 0.7;
+    }
+  }
+}
+
+.dumby-block:has(pre:only-child [data-placeholder]:only-child) {
+  overflow: clip;
+
+  [data-placeholder] {
+    height: 50px !important;
+    scale: 0.9;
+    transition-duration: 0.4s;
+    transition-timing-function: ease-out;
+  }
+}
+
+.bold-options {
+  font-weight: bold;
+}
+
+.dragging-geolink {
+  user-select: none;
+
+  .dumby-block > :not(:has(.mapclay)) {
+    opacity: 0.3;
+  }
+}
+
+.Dumby[data-layout='sticky'] {
+  max-width: 80em;
+
+  .Showcase {
+    display: block;
+    width: 20vw;
+    height: 40vh;
+
+    position: absolute;
+    right: 20px;
+    bottom: 20px;
+
+    background: red;
+  }
+}
+
+.dumby-block details {
+  display: block;
+  width: fit-content;
+  padding: .3rem 1rem;
+
+  border-radius: 4px;
+
+  background: #F0F0F0;
+
+  summary {
+    cursor: pointer;
+  }
+
+  &:hover {
+    background: #E4E4E7;
+  }
+}
diff --git a/dist/css/easymde.min.css b/dist/css/easymde.min.css
new file mode 100644
index 0000000..3b88351
--- /dev/null
+++ b/dist/css/easymde.min.css
@@ -0,0 +1,7 @@
+/**
+ * easymde v2.18.0
+ * Copyright Jeroen Akkerman
+ * @link https://github.com/ionaru/easy-markdown-editor
+ * @license MIT
+ */
+.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:0 0}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:0 0}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:0;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none;outline:0}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.EasyMDEContainer{display:block}.CodeMirror-rtl pre{direction:rtl}.EasyMDEContainer.sided--no-fullscreen{display:flex;flex-direction:row;flex-wrap:wrap}.EasyMDEContainer .CodeMirror{box-sizing:border-box;height:auto;border:1px solid #ced4da;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:10px;font:inherit;z-index:0;word-wrap:break-word}.EasyMDEContainer .CodeMirror-scroll{cursor:text}.EasyMDEContainer .CodeMirror-fullscreen{background:#fff;position:fixed!important;top:50px;left:0;right:0;bottom:0;height:auto;z-index:8;border-right:none!important;border-bottom-right-radius:0!important}.EasyMDEContainer .CodeMirror-sided{width:50%!important}.EasyMDEContainer.sided--no-fullscreen .CodeMirror-sided{border-right:none!important;border-bottom-right-radius:0;position:relative;flex:1 1 auto}.EasyMDEContainer .CodeMirror-placeholder{opacity:.5}.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected{background:#d9d9d9}.editor-toolbar{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;padding:9px 10px;border-top:1px solid #ced4da;border-left:1px solid #ced4da;border-right:1px solid #ced4da;border-top-left-radius:4px;border-top-right-radius:4px}.editor-toolbar.fullscreen{width:100%;height:50px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;background:#fff;border:0;position:fixed;top:0;left:0;opacity:1;z-index:9}.editor-toolbar.fullscreen::before{width:20px;height:50px;background:-moz-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,#fff),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,#fff 0,rgba(255,255,255,0) 100%);background:linear-gradient(to right,#fff 0,rgba(255,255,255,0) 100%);position:fixed;top:0;left:0;margin:0;padding:0}.editor-toolbar.fullscreen::after{width:20px;height:50px;background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(100%,#fff));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,#fff 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,#fff 100%);position:fixed;top:0;right:0;margin:0;padding:0}.EasyMDEContainer.sided--no-fullscreen .editor-toolbar{width:100%}.editor-toolbar .easymde-dropdown,.editor-toolbar button{background:0 0;display:inline-block;text-align:center;text-decoration:none!important;height:30px;margin:0;padding:0;border:1px solid transparent;border-radius:3px;cursor:pointer}.editor-toolbar button{font-weight:700;min-width:30px;padding:0 6px;white-space:nowrap}.editor-toolbar button.active,.editor-toolbar button:hover{background:#fcfcfc;border-color:#95a5a6}.editor-toolbar i.separator{display:inline-block;width:0;border-left:1px solid #d9d9d9;border-right:1px solid #fff;color:transparent;text-indent:-10px;margin:0 6px}.editor-toolbar button:after{font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:65%;vertical-align:text-bottom;position:relative;top:2px}.editor-toolbar button.heading-1:after{content:"1"}.editor-toolbar button.heading-2:after{content:"2"}.editor-toolbar button.heading-3:after{content:"3"}.editor-toolbar button.heading-bigger:after{content:"▲"}.editor-toolbar button.heading-smaller:after{content:"▼"}.editor-toolbar.disabled-for-preview button:not(.no-disable){opacity:.6;pointer-events:none}@media only screen and (max-width:700px){.editor-toolbar i.no-mobile{display:none}}.editor-statusbar{padding:8px 10px;font-size:12px;color:#959694;text-align:right}.EasyMDEContainer.sided--no-fullscreen .editor-statusbar{width:100%}.editor-statusbar span{display:inline-block;min-width:4em;margin-left:1em}.editor-statusbar .lines:before{content:'lines: '}.editor-statusbar .words:before{content:'words: '}.editor-statusbar .characters:before{content:'characters: '}.editor-preview-full{position:absolute;width:100%;height:100%;top:0;left:0;z-index:7;overflow:auto;display:none;box-sizing:border-box}.editor-preview-side{position:fixed;bottom:0;width:50%;top:50px;right:0;z-index:9;overflow:auto;display:none;box-sizing:border-box;border:1px solid #ddd;word-wrap:break-word}.editor-preview-active-side{display:block}.EasyMDEContainer.sided--no-fullscreen .editor-preview-active-side{flex:1 1 auto;height:auto;position:static}.editor-preview-active{display:block}.editor-preview{padding:10px;background:#fafafa}.editor-preview>p{margin-top:0}.editor-preview pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th{border:1px solid #ddd;padding:5px}.cm-s-easymde .cm-tag{color:#63a35c}.cm-s-easymde .cm-attribute{color:#795da3}.cm-s-easymde .cm-string{color:#183691}.cm-s-easymde .cm-header-1{font-size:calc(1.375rem + 1.5vw)}.cm-s-easymde .cm-header-2{font-size:calc(1.325rem + .9vw)}.cm-s-easymde .cm-header-3{font-size:calc(1.3rem + .6vw)}.cm-s-easymde .cm-header-4{font-size:calc(1.275rem + .3vw)}.cm-s-easymde .cm-header-5{font-size:1.25rem}.cm-s-easymde .cm-header-6{font-size:1rem}.cm-s-easymde .cm-header-1,.cm-s-easymde .cm-header-2,.cm-s-easymde .cm-header-3,.cm-s-easymde .cm-header-4,.cm-s-easymde .cm-header-5,.cm-s-easymde .cm-header-6{margin-bottom:.5rem;line-height:1.2}.cm-s-easymde .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.cm-s-easymde .cm-link{color:#7f8c8d}.cm-s-easymde .cm-url{color:#aab2b3}.cm-s-easymde .cm-quote{color:#7f8c8d;font-style:italic}.editor-toolbar .easymde-dropdown{position:relative;background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%);border-radius:0;border:1px solid #fff}.editor-toolbar .easymde-dropdown:hover{background:linear-gradient(to bottom right,#fff 0,#fff 84%,#333 50%,#333 100%)}.easymde-dropdown-content{display:block;visibility:hidden;position:absolute;background-color:#f9f9f9;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);padding:8px;z-index:2;top:30px}.easymde-dropdown:active .easymde-dropdown-content,.easymde-dropdown:focus .easymde-dropdown-content,.easymde-dropdown:focus-within .easymde-dropdown-content{visibility:visible}.easymde-dropdown-content button{display:block}span[data-img-src]::after{content:'';background-image:var(--bg-image);display:block;max-height:100%;max-width:100%;background-size:contain;height:0;padding-top:var(--height);width:var(--width);background-repeat:no-repeat}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}
\ No newline at end of file
diff --git a/dist/css/index.css b/dist/css/index.css
new file mode 100644
index 0000000..53a5587
--- /dev/null
+++ b/dist/css/index.css
@@ -0,0 +1,176 @@
+:root {
+  --content-border: solid lightgray 2px;
+  --content-border-radius: 5px;
+  --content-focus-border: solid gray 2px;
+}
+
+.editor {
+  display: none;
+}
+
+body {
+  width: 100vw;
+  min-width: 700px;
+  height: 100vh;
+
+  &[data-mode='editing'] {
+    display: flex;
+    align-items: stretch;
+
+    /* gap: 0.5em; */
+
+    padding: 0.5em;
+
+    .Dumby {
+      flex: 0 0 50%;
+      min-width: 45%;
+      max-width: calc(50% - 0.5em);
+      height: 100%;
+
+      border: var(--content-border);
+      border-radius: var(--content-border-radius);
+      order: 1;
+
+      &.focus {
+        border: var(--content-focus-border);
+        outline: var(--content-focus-border);
+      }
+    }
+
+    .editor {
+      display: block;
+      flex: 0 0 50%;
+      min-width: 45%;
+      max-width: calc(50% - 0.5em);
+      height: 100%;
+
+      order: 2;
+    }
+  }
+}
+
+.EasyMDEContainer {
+  display: flex;
+  box-sizing: border-box;
+  flex-direction: column;
+  align-items: stretch;
+  height: 100%;
+  gap: 0.5em;
+
+  .CodeMirror {
+    flex: 1 0 0;
+    padding: 0;
+
+    border: var(--content-border);
+    border-radius: var(--content-border-radius);
+
+    font-family: monospace;
+    font-size: 1rem;
+    order: 1;
+
+    .CodeMirror-scroll {
+      margin-right: 0;
+    }
+
+    &.focus {
+      border: var(--content-focus-border);
+      outline: var(--content-focus-border);
+    }
+
+    /* padding of end of line */
+    span[role="presentation"]::after {
+      content: '';
+      display: inline-block;
+      margin-right: 30px;
+    }
+
+    span {
+      white-space: pre;
+    }
+
+    .invalid-input {
+      text-decoration: red wavy underline 1px;
+    }
+
+    .cm-heading-1 {
+      font-size: 2em;
+    }
+
+    .cm-heading-2 {
+      font-size: 1.5em;
+    }
+
+    .cm-heading-3 {
+      font-size: 1.25em;
+    }
+  }
+
+  .editor-toolbar {
+    order: 2;
+
+    flex: 0 0 0;
+
+    border: var(--content-border);
+    border-radius: var(--content-border-radius);
+
+    .mde-roll {
+      font-size: 1.5em;
+      vertical-align: bottom;
+    }
+  }
+
+  .editor-statusbar {
+    order: 3;
+  }
+}
+
+/* FIXME For those empty line (no child with cm-comment) */
+.inside-code-block,
+.CodeMirror-line:has(.cm-formatting-code-block) {
+  background: rgb(0 0 0 / 5%) !important;
+
+  .cm-comment {
+    background: none !important;
+  }
+}
+
+.suggestion {
+  display: flex;
+  overflow: hidden;
+  justify-content: space-between;
+  align-items: center;
+  max-width: 700px;
+
+  cursor: pointer;
+  white-space: nowrap;
+
+  &:not(:first-child) {
+    border-top: 1px solid rgb(203 213 225);
+  }
+
+  &.focus {
+    background: rgb(226 232 240);
+  }
+
+  * {
+    flex-shrink: 0;
+
+    display: inline-block;
+    overflow: hidden;
+    padding-inline: 1em;
+  }
+
+  .info {
+    color: steelblue;
+    font-weight: bold;
+  }
+
+  .truncate {
+    flex-shrink: 1;
+    text-overflow: ellipsis;
+
+    ::before {
+      width: 2rem;
+    }
+  }
+}
diff --git a/dist/css/style.css b/dist/css/style.css
new file mode 100644
index 0000000..6b0c16d
--- /dev/null
+++ b/dist/css/style.css
@@ -0,0 +1,179 @@
+/* CSS Reset */
+*,
+*::before,
+*::after {
+  box-sizing: border-box;
+}
+
+* {
+  margin: 0;
+
+  line-height: calc(1em + 0.5rem);
+}
+
+img,
+picture,
+video,
+canvas,
+svg {
+  display: block;
+}
+
+input,
+button,
+textarea,
+select {
+  font: inherit;
+}
+
+p,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  overflow-wrap: break-word;
+  hyphens: auto;
+}
+
+/* End of Reset */
+
+body {
+  font-family: sans-serif;
+  line-height: 1.6;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin-bottom: 0.5em;
+
+  font-weight: bold;
+}
+
+h1 {
+  font-size: 2em;
+}
+
+h2 {
+  font-size: 1.5em;
+}
+
+h3 {
+  font-size: 1.25em;
+}
+
+p {
+  margin-top: 1em;
+  margin-bottom: 1em;
+
+  &:first-child {
+    margin-top: 0;
+  }
+
+  &:last-child {
+    margin-bottom: 0;
+  }
+}
+
+a {
+  color: #007bff;
+  text-decoration: none;
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
+code {
+  display: inline-block;
+  padding: 0.3em;
+
+  background-color: whitesmoke;
+
+  color: #333;
+  font-size: 1.2em;
+}
+
+pre {
+  width: 100%;
+}
+
+pre:has(code) {
+  display: block;
+  min-width: 400px;
+  margin: 0 0 10px;
+  padding: 9.5px;
+
+  border: 1px solid #ccc;
+  border-radius: 4px;
+
+  background-color: whitesmoke;
+
+  color: #333;
+  font-size: 13px;
+  line-height: 1.4286;
+  word-break: break-all;
+  word-wrap: break-word;
+
+  code {
+    padding: 0;
+
+    border-radius: 0;
+
+    background-color: transparent;
+
+    color: inherit;
+    font-size: inherit;
+    white-space: pre-wrap;
+  }
+}
+
+ul,
+ol {
+  margin-top: 1em;
+  margin-bottom: 1em;
+  padding-left: 20px;
+}
+
+li {
+  margin-bottom: 0.5em;
+}
+
+table {
+  border-collapse: collapse;
+
+  width: 100%;
+}
+
+th,
+td {
+  padding: 8px;
+
+  border: 1px solid #ddd;
+
+  text-align: left;
+}
+
+th {
+  background-color: #f0f0f0;
+}
+
+img {
+  max-width: 100%;
+  height: auto;
+}
+
+/* TODO */
+blockquote {
+  color: gray;
+  font-size: 1.2rem;
+  font-style: italic;
+
+  text-align: center;
+}
+
diff --git a/dist/dumbymap.mjs b/dist/dumbymap.mjs
new file mode 100644
index 0000000..e8aefa8
--- /dev/null
+++ b/dist/dumbymap.mjs
@@ -0,0 +1,4 @@
+import{renderWith as e,parseConfigsFromYaml as s,defaultAliases as w}from"mapclay";const C={};function decode$1(e,s){"string"!=typeof s&&(s=decode$1.defaultChars);const w=function getDecodeCache(e){let s=C[e];if(s)return s;s=C[e]=[];for(let e=0;e<128;e++){const w=String.fromCharCode(e);s.push(w)}for(let w=0;w<e.length;w++){const C=e.charCodeAt(w);s[C]="%"+("0"+C.toString(16).toUpperCase()).slice(-2)}return s}(s);return e.replace(/(%[a-f0-9]{2})+/gi,(function(e){let s="";for(let C=0,O=e.length;C<O;C+=3){const D=parseInt(e.slice(C+1,C+3),16);if(D<128)s+=w[D];else{if(192==(224&D)&&C+3<O){const w=parseInt(e.slice(C+4,C+6),16);if(128==(192&w)){const e=D<<6&1984|63&w;s+=e<128?"��":String.fromCharCode(e),C+=3;continue}}if(224==(240&D)&&C+6<O){const w=parseInt(e.slice(C+4,C+6),16),O=parseInt(e.slice(C+7,C+9),16);if(128==(192&w)&&128==(192&O)){const e=D<<12&61440|w<<6&4032|63&O;s+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),C+=6;continue}}if(240==(248&D)&&C+9<O){const w=parseInt(e.slice(C+4,C+6),16),O=parseInt(e.slice(C+7,C+9),16),A=parseInt(e.slice(C+10,C+12),16);if(128==(192&w)&&128==(192&O)&&128==(192&A)){let e=D<<18&1835008|w<<12&258048|O<<6&4032|63&A;e<65536||e>1114111?s+="����":(e-=65536,s+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),C+=9;continue}}s+="�"}}return s}))}decode$1.defaultChars=";/?:@&=+$,#",decode$1.componentChars="";const O={};function encode$1(e,s,w){"string"!=typeof s&&(w=s,s=encode$1.defaultChars),void 0===w&&(w=!0);const C=function getEncodeCache(e){let s=O[e];if(s)return s;s=O[e]=[];for(let e=0;e<128;e++){const w=String.fromCharCode(e);/^[0-9a-z]$/i.test(w)?s.push(w):s.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let w=0;w<e.length;w++)s[e.charCodeAt(w)]=e[w];return s}(s);let D="";for(let s=0,O=e.length;s<O;s++){const A=e.charCodeAt(s);if(w&&37===A&&s+2<O&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3)))D+=e.slice(s,s+3),s+=2;else if(A<128)D+=C[A];else if(A>=55296&&A<=57343){if(A>=55296&&A<=56319&&s+1<O){const w=e.charCodeAt(s+1);if(w>=56320&&w<=57343){D+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}D+="%EF%BF%BD"}else D+=encodeURIComponent(e[s])}return D}function format(e){let s="";return s+=e.protocol||"",s+=e.slashes?"//":"",s+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?s+="["+e.hostname+"]":s+=e.hostname||"",s+=e.port?":"+e.port:"",s+=e.pathname||"",s+=e.search||"",s+=e.hash||"",s}function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}encode$1.defaultChars=";/?:@&=+$,-_.!~*'()#",encode$1.componentChars="-_.!~*'()";const D=/^([a-z0-9.+-]+:)/i,A=/:[0-9]*$/,T=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,B=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),L=["'"].concat(B),P=["%","/","?",";","#"].concat(L),I=["/","?","#"],M=/^[+a-z0-9A-Z_-]{0,63}$/,F=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$={javascript:!0,"javascript:":!0},N={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function urlParse(e,s){if(e&&e instanceof Url)return e;const w=new Url;return w.parse(e,s),w}Url.prototype.parse=function(e,s){let w,C,O,A=e;if(A=A.trim(),!s&&1===e.split("#").length){const e=T.exec(A);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let B=D.exec(A);if(B&&(B=B[0],w=B.toLowerCase(),this.protocol=B,A=A.substr(B.length)),(s||B||A.match(/^\/\/[^@\/]+@[^@\/]+/))&&(O="//"===A.substr(0,2),!O||B&&$[B]||(A=A.substr(2),this.slashes=!0)),!$[B]&&(O||B&&!N[B])){let e,s,w=-1;for(let e=0;e<I.length;e++)C=A.indexOf(I[e]),-1!==C&&(-1===w||C<w)&&(w=C);s=-1===w?A.lastIndexOf("@"):A.lastIndexOf("@",w),-1!==s&&(e=A.slice(0,s),A=A.slice(s+1),this.auth=e),w=-1;for(let e=0;e<P.length;e++)C=A.indexOf(P[e]),-1!==C&&(-1===w||C<w)&&(w=C);-1===w&&(w=A.length),":"===A[w-1]&&w--;const O=A.slice(0,w);A=A.slice(w),this.parseHost(O),this.hostname=this.hostname||"";const D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D){const e=this.hostname.split(/\./);for(let s=0,w=e.length;s<w;s++){const w=e[s];if(w&&!w.match(M)){let C="";for(let e=0,s=w.length;e<s;e++)w.charCodeAt(e)>127?C+="x":C+=w[e];if(!C.match(M)){const C=e.slice(0,s),O=e.slice(s+1),D=w.match(F);D&&(C.push(D[1]),O.unshift(D[2])),O.length&&(A=O.join(".")+A),this.hostname=C.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const L=A.indexOf("#");-1!==L&&(this.hash=A.substr(L),A=A.slice(0,L));const V=A.indexOf("?");return-1!==V&&(this.search=A.substr(V),A=A.slice(0,V)),A&&(this.pathname=A),N[w]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Url.prototype.parseHost=function(e){let s=A.exec(e);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),e=e.substr(0,e.length-s.length)),e&&(this.hostname=e)};var V,R=Object.freeze({__proto__:null,decode:decode$1,encode:encode$1,format:format,parse:urlParse}),H=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,z=/[\0-\x1F\x7F-\x9F]/,W=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,j=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,X=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,q=Object.freeze({__proto__:null,Any:H,Cc:z,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:W,S:j,Z:X}),Y=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),G=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));const U=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Z=null!==(V=String.fromCodePoint)&&void 0!==V?V:function(e){let s="";return e>65535&&(e-=65536,s+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),s+=String.fromCharCode(e),s};var K;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(K||(K={}));var J,Q,ee;function isNumber(e){return e>=K.ZERO&&e<=K.NINE}function isHexadecimalCharacter(e){return e>=K.UPPER_A&&e<=K.UPPER_F||e>=K.LOWER_A&&e<=K.LOWER_F}function isEntityInAttributeInvalidEnd(e){return e===K.EQUALS||function isAsciiAlphaNumeric(e){return e>=K.UPPER_A&&e<=K.UPPER_Z||e>=K.LOWER_A&&e<=K.LOWER_Z||isNumber(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(J||(J={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(Q||(Q={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(ee||(ee={}));class EntityDecoder{constructor(e,s,w){this.decodeTree=e,this.emitCodePoint=s,this.errors=w,this.state=Q.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ee.Strict}startEntity(e){this.decodeMode=e,this.state=Q.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,s){switch(this.state){case Q.EntityStart:return e.charCodeAt(s)===K.NUM?(this.state=Q.NumericStart,this.consumed+=1,this.stateNumericStart(e,s+1)):(this.state=Q.NamedEntity,this.stateNamedEntity(e,s));case Q.NumericStart:return this.stateNumericStart(e,s);case Q.NumericDecimal:return this.stateNumericDecimal(e,s);case Q.NumericHex:return this.stateNumericHex(e,s);case Q.NamedEntity:return this.stateNamedEntity(e,s)}}stateNumericStart(e,s){return s>=e.length?-1:(32|e.charCodeAt(s))===K.LOWER_X?(this.state=Q.NumericHex,this.consumed+=1,this.stateNumericHex(e,s+1)):(this.state=Q.NumericDecimal,this.stateNumericDecimal(e,s))}addToNumericResult(e,s,w,C){if(s!==w){const O=w-s;this.result=this.result*Math.pow(C,O)+parseInt(e.substr(s,O),C),this.consumed+=O}}stateNumericHex(e,s){const w=s;for(;s<e.length;){const C=e.charCodeAt(s);if(!isNumber(C)&&!isHexadecimalCharacter(C))return this.addToNumericResult(e,w,s,16),this.emitNumericEntity(C,3);s+=1}return this.addToNumericResult(e,w,s,16),-1}stateNumericDecimal(e,s){const w=s;for(;s<e.length;){const C=e.charCodeAt(s);if(!isNumber(C))return this.addToNumericResult(e,w,s,10),this.emitNumericEntity(C,2);s+=1}return this.addToNumericResult(e,w,s,10),-1}emitNumericEntity(e,s){var w;if(this.consumed<=s)return null===(w=this.errors)||void 0===w||w.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===K.SEMI)this.consumed+=1;else if(this.decodeMode===ee.Strict)return 0;return this.emitCodePoint(function replaceCodePoint(e){var s;return e>=55296&&e<=57343||e>1114111?65533:null!==(s=U.get(e))&&void 0!==s?s:e}(this.result),this.consumed),this.errors&&(e!==K.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,s){const{decodeTree:w}=this;let C=w[this.treeIndex],O=(C&J.VALUE_LENGTH)>>14;for(;s<e.length;s++,this.excess++){const D=e.charCodeAt(s);if(this.treeIndex=determineBranch(w,C,this.treeIndex+Math.max(1,O),D),this.treeIndex<0)return 0===this.result||this.decodeMode===ee.Attribute&&(0===O||isEntityInAttributeInvalidEnd(D))?0:this.emitNotTerminatedNamedEntity();if(C=w[this.treeIndex],O=(C&J.VALUE_LENGTH)>>14,0!==O){if(D===K.SEMI)return this.emitNamedEntityData(this.treeIndex,O,this.consumed+this.excess);this.decodeMode!==ee.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:s,decodeTree:w}=this,C=(w[s]&J.VALUE_LENGTH)>>14;return this.emitNamedEntityData(s,C,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,s,w){const{decodeTree:C}=this;return this.emitCodePoint(1===s?C[e]&~J.VALUE_LENGTH:C[e+1],w),3===s&&this.emitCodePoint(C[e+2],w),w}end(){var e;switch(this.state){case Q.NamedEntity:return 0===this.result||this.decodeMode===ee.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Q.NumericDecimal:return this.emitNumericEntity(0,2);case Q.NumericHex:return this.emitNumericEntity(0,3);case Q.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Q.EntityStart:return 0}}}function getDecoder(e){let s="";const w=new EntityDecoder(e,(e=>s+=Z(e)));return function decodeWithTrie(e,C){let O=0,D=0;for(;(D=e.indexOf("&",D))>=0;){s+=e.slice(O,D),w.startEntity(C);const A=w.write(e,D+1);if(A<0){O=D+w.end();break}O=D+A,D=0===A?O+1:O}const A=s+e.slice(O);return s="",A}}function determineBranch(e,s,w,C){const O=(s&J.BRANCH_LENGTH)>>7,D=s&J.JUMP_TABLE;if(0===O)return 0!==D&&C===D?w:-1;if(D){const s=C-D;return s<0||s>=O?-1:e[w+s]-1}let A=w,T=A+O-1;for(;A<=T;){const s=A+T>>>1,w=e[s];if(w<C)A=s+1;else{if(!(w>C))return e[s+O];T=s-1}}return-1}const te=getDecoder(Y);function decodeHTML(e,s=ee.Legacy){return te(e,s)}function isString$1(e){return"[object String]"===function _class$1(e){return Object.prototype.toString.call(e)}(e)}getDecoder(G);const ne=Object.prototype.hasOwnProperty;function assign$1(e){return Array.prototype.slice.call(arguments,1).forEach((function(s){if(s){if("object"!=typeof s)throw new TypeError(s+"must be object");Object.keys(s).forEach((function(w){e[w]=s[w]}))}})),e}function arrayReplaceAt(e,s,w){return[].concat(e.slice(0,s),w,e.slice(s+1))}function isValidEntityCode(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function fromCodePoint(e){if(e>65535){const s=55296+((e-=65536)>>10),w=56320+(1023&e);return String.fromCharCode(s,w)}return String.fromCharCode(e)}const oe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,re=new RegExp(oe.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),ie=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function unescapeAll(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(re,(function(e,s,w){return s||function replaceEntityPattern(e,s){if(35===s.charCodeAt(0)&&ie.test(s)){const w="x"===s[1].toLowerCase()?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return isValidEntityCode(w)?fromCodePoint(w):e}const w=decodeHTML(e);return w!==e?w:e}(e,w)}))}const ae=/[&<>"]/,se=/[&<>"]/g,le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function replaceUnsafeChar(e){return le[e]}function escapeHtml(e){return ae.test(e)?e.replace(se,replaceUnsafeChar):e}const ce=/[.?*+^$[\]\\(){}|-]/g;function isSpace(e){switch(e){case 9:case 32:return!0}return!1}function isWhiteSpace(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function isPunctChar(e){return W.test(e)||j.test(e)}function isMdAsciiPunct(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function normalizeReference(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const ue={mdurl:R,ucmicro:q};var de=Object.freeze({__proto__:null,arrayReplaceAt:arrayReplaceAt,assign:assign$1,escapeHtml:escapeHtml,escapeRE:function escapeRE$1(e){return e.replace(ce,"\\$&")},fromCodePoint:fromCodePoint,has:function has(e,s){return ne.call(e,s)},isMdAsciiPunct:isMdAsciiPunct,isPunctChar:isPunctChar,isSpace:isSpace,isString:isString$1,isValidEntityCode:isValidEntityCode,isWhiteSpace:isWhiteSpace,lib:ue,normalizeReference:normalizeReference,unescapeAll:unescapeAll,unescapeMd:function unescapeMd(e){return e.indexOf("\\")<0?e:e.replace(oe,"$1")}});var pe=Object.freeze({__proto__:null,parseLinkDestination:function parseLinkDestination(e,s,w){let C,O=s;const D={ok:!1,pos:0,str:""};if(60===e.charCodeAt(O)){for(O++;O<w;){if(C=e.charCodeAt(O),10===C)return D;if(60===C)return D;if(62===C)return D.pos=O+1,D.str=unescapeAll(e.slice(s+1,O)),D.ok=!0,D;92===C&&O+1<w?O+=2:O++}return D}let A=0;for(;O<w&&(C=e.charCodeAt(O),32!==C)&&!(C<32||127===C);)if(92===C&&O+1<w){if(32===e.charCodeAt(O+1))break;O+=2}else{if(40===C&&(A++,A>32))return D;if(41===C){if(0===A)break;A--}O++}return s===O||0!==A||(D.str=unescapeAll(e.slice(s,O)),D.pos=O,D.ok=!0),D},parseLinkLabel:function parseLinkLabel(e,s,w){let C,O,D,A;const T=e.posMax,B=e.pos;for(e.pos=s+1,C=1;e.pos<T;){if(D=e.src.charCodeAt(e.pos),93===D&&(C--,0===C)){O=!0;break}if(A=e.pos,e.md.inline.skipToken(e),91===D)if(A===e.pos-1)C++;else if(w)return e.pos=B,-1}let L=-1;return O&&(L=e.pos),e.pos=B,L},parseLinkTitle:function parseLinkTitle(e,s,w,C){let O,D=s;const A={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(C)A.str=C.str,A.marker=C.marker;else{if(D>=w)return A;let C=e.charCodeAt(D);if(34!==C&&39!==C&&40!==C)return A;s++,D++,40===C&&(C=41),A.marker=C}for(;D<w;){if(O=e.charCodeAt(D),O===A.marker)return A.pos=D+1,A.str+=unescapeAll(e.slice(s,D)),A.ok=!0,A;if(40===O&&41===A.marker)return A;92===O&&D+1<w&&D++,D++}return A.can_continue=!0,A.str+=unescapeAll(e.slice(s,D)),A}});const he={};function Renderer(){this.rules=assign$1({},he)}function Ruler(){this.__rules__=[],this.__cache__=null}function Token(e,s,w){this.type=e,this.tag=s,this.attrs=null,this.map=null,this.nesting=w,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function StateCore(e,s,w){this.src=e,this.env=w,this.tokens=[],this.inlineMode=!1,this.md=s}he.code_inline=function(e,s,w,C,O){const D=e[s];return"<code"+O.renderAttrs(D)+">"+escapeHtml(D.content)+"</code>"},he.code_block=function(e,s,w,C,O){const D=e[s];return"<pre"+O.renderAttrs(D)+"><code>"+escapeHtml(e[s].content)+"</code></pre>\n"},he.fence=function(e,s,w,C,O){const D=e[s],A=D.info?unescapeAll(D.info).trim():"";let T,B="",L="";if(A){const e=A.split(/(\s+)/g);B=e[0],L=e.slice(2).join("")}if(T=w.highlight&&w.highlight(D.content,B,L)||escapeHtml(D.content),0===T.indexOf("<pre"))return T+"\n";if(A){const e=D.attrIndex("class"),s=D.attrs?D.attrs.slice():[];e<0?s.push(["class",w.langPrefix+B]):(s[e]=s[e].slice(),s[e][1]+=" "+w.langPrefix+B);const C={attrs:s};return`<pre><code${O.renderAttrs(C)}>${T}</code></pre>\n`}return`<pre><code${O.renderAttrs(D)}>${T}</code></pre>\n`},he.image=function(e,s,w,C,O){const D=e[s];return D.attrs[D.attrIndex("alt")][1]=O.renderInlineAsText(D.children,w,C),O.renderToken(e,s,w)},he.hardbreak=function(e,s,w){return w.xhtmlOut?"<br />\n":"<br>\n"},he.softbreak=function(e,s,w){return w.breaks?w.xhtmlOut?"<br />\n":"<br>\n":"\n"},he.text=function(e,s){return escapeHtml(e[s].content)},he.html_block=function(e,s){return e[s].content},he.html_inline=function(e,s){return e[s].content},Renderer.prototype.renderAttrs=function renderAttrs(e){let s,w,C;if(!e.attrs)return"";for(C="",s=0,w=e.attrs.length;s<w;s++)C+=" "+escapeHtml(e.attrs[s][0])+'="'+escapeHtml(e.attrs[s][1])+'"';return C},Renderer.prototype.renderToken=function renderToken(e,s,w){const C=e[s];let O="";if(C.hidden)return"";C.block&&-1!==C.nesting&&s&&e[s-1].hidden&&(O+="\n"),O+=(-1===C.nesting?"</":"<")+C.tag,O+=this.renderAttrs(C),0===C.nesting&&w.xhtmlOut&&(O+=" /");let D=!1;if(C.block&&(D=!0,1===C.nesting&&s+1<e.length)){const w=e[s+1];("inline"===w.type||w.hidden||-1===w.nesting&&w.tag===C.tag)&&(D=!1)}return O+=D?">\n":">",O},Renderer.prototype.renderInline=function(e,s,w){let C="";const O=this.rules;for(let D=0,A=e.length;D<A;D++){const A=e[D].type;void 0!==O[A]?C+=O[A](e,D,s,w,this):C+=this.renderToken(e,D,s)}return C},Renderer.prototype.renderInlineAsText=function(e,s,w){let C="";for(let O=0,D=e.length;O<D;O++)switch(e[O].type){case"text":case"html_inline":case"html_block":C+=e[O].content;break;case"image":C+=this.renderInlineAsText(e[O].children,s,w);break;case"softbreak":case"hardbreak":C+="\n"}return C},Renderer.prototype.render=function(e,s,w){let C="";const O=this.rules;for(let D=0,A=e.length;D<A;D++){const A=e[D].type;"inline"===A?C+=this.renderInline(e[D].children,s,w):void 0!==O[A]?C+=O[A](e,D,s,w,this):C+=this.renderToken(e,D,s,w)}return C},Ruler.prototype.__find__=function(e){for(let s=0;s<this.__rules__.length;s++)if(this.__rules__[s].name===e)return s;return-1},Ruler.prototype.__compile__=function(){const e=this,s=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){s.indexOf(e)<0&&s.push(e)}))})),e.__cache__={},s.forEach((function(s){e.__cache__[s]=[],e.__rules__.forEach((function(w){w.enabled&&(s&&w.alt.indexOf(s)<0||e.__cache__[s].push(w.fn))}))}))},Ruler.prototype.at=function(e,s,w){const C=this.__find__(e),O=w||{};if(-1===C)throw new Error("Parser rule not found: "+e);this.__rules__[C].fn=s,this.__rules__[C].alt=O.alt||[],this.__cache__=null},Ruler.prototype.before=function(e,s,w,C){const O=this.__find__(e),D=C||{};if(-1===O)throw new Error("Parser rule not found: "+e);this.__rules__.splice(O,0,{name:s,enabled:!0,fn:w,alt:D.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(e,s,w,C){const O=this.__find__(e),D=C||{};if(-1===O)throw new Error("Parser rule not found: "+e);this.__rules__.splice(O+1,0,{name:s,enabled:!0,fn:w,alt:D.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(e,s,w){const C=w||{};this.__rules__.push({name:e,enabled:!0,fn:s,alt:C.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(e,s){Array.isArray(e)||(e=[e]);const w=[];return e.forEach((function(e){const C=this.__find__(e);if(C<0){if(s)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[C].enabled=!0,w.push(e)}),this),this.__cache__=null,w},Ruler.prototype.enableOnly=function(e,s){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,s)},Ruler.prototype.disable=function(e,s){Array.isArray(e)||(e=[e]);const w=[];return e.forEach((function(e){const C=this.__find__(e);if(C<0){if(s)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[C].enabled=!1,w.push(e)}),this),this.__cache__=null,w},Ruler.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},Token.prototype.attrIndex=function attrIndex(e){if(!this.attrs)return-1;const s=this.attrs;for(let w=0,C=s.length;w<C;w++)if(s[w][0]===e)return w;return-1},Token.prototype.attrPush=function attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Token.prototype.attrSet=function attrSet(e,s){const w=this.attrIndex(e),C=[e,s];w<0?this.attrPush(C):this.attrs[w]=C},Token.prototype.attrGet=function attrGet(e){const s=this.attrIndex(e);let w=null;return s>=0&&(w=this.attrs[s][1]),w},Token.prototype.attrJoin=function attrJoin(e,s){const w=this.attrIndex(e);w<0?this.attrPush([e,s]):this.attrs[w][1]=this.attrs[w][1]+" "+s},StateCore.prototype.Token=Token;const fe=/\r\n?|\n/g,me=/\0/g;function isLinkClose$1(e){return/^<\/a\s*>/i.test(e)}const ge=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ye=/\((c|tm|r)\)/i,ve=/\((c|tm|r)\)/gi,_e={c:"©",r:"®",tm:"™"};function replaceFn(e,s){return _e[s.toLowerCase()]}function replace_scoped(e){let s=0;for(let w=e.length-1;w>=0;w--){const C=e[w];"text"!==C.type||s||(C.content=C.content.replace(ve,replaceFn)),"link_open"===C.type&&"auto"===C.info&&s--,"link_close"===C.type&&"auto"===C.info&&s++}}function replace_rare(e){let s=0;for(let w=e.length-1;w>=0;w--){const C=e[w];"text"!==C.type||s||ge.test(C.content)&&(C.content=C.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===C.type&&"auto"===C.info&&s--,"link_close"===C.type&&"auto"===C.info&&s++}}const Se=/['"]/,st=/['"]/g;function replaceAt(e,s,w){return e.slice(0,s)+w+e.slice(s+1)}function process_inlines(e,s){let w;const C=[];for(let O=0;O<e.length;O++){const D=e[O],A=e[O].level;for(w=C.length-1;w>=0&&!(C[w].level<=A);w--);if(C.length=w+1,"text"!==D.type)continue;let T=D.content,B=0,L=T.length;e:for(;B<L;){st.lastIndex=B;const P=st.exec(T);if(!P)break;let I=!0,M=!0;B=P.index+1;const F="'"===P[0];let $=32;if(P.index-1>=0)$=T.charCodeAt(P.index-1);else for(w=O-1;w>=0&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w--)if(e[w].content){$=e[w].content.charCodeAt(e[w].content.length-1);break}let N=32;if(B<L)N=T.charCodeAt(B);else for(w=O+1;w<e.length&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w++)if(e[w].content){N=e[w].content.charCodeAt(0);break}const V=isMdAsciiPunct($)||isPunctChar(String.fromCharCode($)),R=isMdAsciiPunct(N)||isPunctChar(String.fromCharCode(N)),H=isWhiteSpace($),z=isWhiteSpace(N);if(z?I=!1:R&&(H||V||(I=!1)),H?M=!1:V&&(z||R||(M=!1)),34===N&&'"'===P[0]&&$>=48&&$<=57&&(M=I=!1),I&&M&&(I=V,M=R),I||M){if(M)for(w=C.length-1;w>=0;w--){let I=C[w];if(C[w].level<A)break;if(I.single===F&&C[w].level===A){let A,M;I=C[w],F?(A=s.md.options.quotes[2],M=s.md.options.quotes[3]):(A=s.md.options.quotes[0],M=s.md.options.quotes[1]),D.content=replaceAt(D.content,P.index,M),e[I.token].content=replaceAt(e[I.token].content,I.pos,A),B+=M.length-1,I.token===O&&(B+=A.length-1),T=D.content,L=T.length,C.length=w;continue e}}I?C.push({token:O,pos:P.index,single:F,level:A}):M&&F&&(D.content=replaceAt(D.content,P.index,"’"))}else F&&(D.content=replaceAt(D.content,P.index,"’"))}}}const ct=[["normalize",function normalize$2(e){let s;s=e.src.replace(fe,"\n"),s=s.replace(me,"�"),e.src=s}],["block",function block(e){let s;e.inlineMode?(s=new e.Token("inline","",0),s.content=e.src,s.map=[0,1],s.children=[],e.tokens.push(s)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function inline(e){const s=e.tokens;for(let w=0,C=s.length;w<C;w++){const C=s[w];"inline"===C.type&&e.md.inline.parse(C.content,e.md,e.env,C.children)}}],["linkify",function linkify$1(e){const s=e.tokens;var w;if(e.md.options.linkify)for(let C=0,O=s.length;C<O;C++){if("inline"!==s[C].type||!e.md.linkify.pretest(s[C].content))continue;let O=s[C].children,D=0;for(let A=O.length-1;A>=0;A--){const T=O[A];if("link_close"!==T.type){if("html_inline"===T.type&&(w=T.content,/^<a[>\s]/i.test(w)&&D>0&&D--,isLinkClose$1(T.content)&&D++),!(D>0)&&"text"===T.type&&e.md.linkify.test(T.content)){const w=T.content;let D=e.md.linkify.match(w);const B=[];let L=T.level,P=0;D.length>0&&0===D[0].index&&A>0&&"text_special"===O[A-1].type&&(D=D.slice(1));for(let s=0;s<D.length;s++){const C=D[s].url,O=e.md.normalizeLink(C);if(!e.md.validateLink(O))continue;let A=D[s].text;A=D[s].schema?"mailto:"!==D[s].schema||/^mailto:/i.test(A)?e.md.normalizeLinkText(A):e.md.normalizeLinkText("mailto:"+A).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+A).replace(/^http:\/\//,"");const T=D[s].index;if(T>P){const s=new e.Token("text","",0);s.content=w.slice(P,T),s.level=L,B.push(s)}const I=new e.Token("link_open","a",1);I.attrs=[["href",O]],I.level=L++,I.markup="linkify",I.info="auto",B.push(I);const M=new e.Token("text","",0);M.content=A,M.level=L,B.push(M);const F=new e.Token("link_close","a",-1);F.level=--L,F.markup="linkify",F.info="auto",B.push(F),P=D[s].lastIndex}if(P<w.length){const s=new e.Token("text","",0);s.content=w.slice(P),s.level=L,B.push(s)}s[C].children=O=arrayReplaceAt(O,A,B)}}else for(A--;O[A].level!==T.level&&"link_open"!==O[A].type;)A--}}}],["replacements",function replace(e){let s;if(e.md.options.typographer)for(s=e.tokens.length-1;s>=0;s--)"inline"===e.tokens[s].type&&(ye.test(e.tokens[s].content)&&replace_scoped(e.tokens[s].children),ge.test(e.tokens[s].content)&&replace_rare(e.tokens[s].children))}],["smartquotes",function smartquotes(e){if(e.md.options.typographer)for(let s=e.tokens.length-1;s>=0;s--)"inline"===e.tokens[s].type&&Se.test(e.tokens[s].content)&&process_inlines(e.tokens[s].children,e)}],["text_join",function text_join(e){let s,w;const C=e.tokens,O=C.length;for(let e=0;e<O;e++){if("inline"!==C[e].type)continue;const O=C[e].children,D=O.length;for(s=0;s<D;s++)"text_special"===O[s].type&&(O[s].type="text");for(s=w=0;s<D;s++)"text"===O[s].type&&s+1<D&&"text"===O[s+1].type?O[s+1].content=O[s].content+O[s+1].content:(s!==w&&(O[w]=O[s]),w++);s!==w&&(O.length=w)}}]];function Core(){this.ruler=new Ruler;for(let e=0;e<ct.length;e++)this.ruler.push(ct[e][0],ct[e][1])}function StateBlock(e,s,w,C){this.src=e,this.md=s,this.env=w,this.tokens=C,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const O=this.src;for(let e=0,s=0,w=0,C=0,D=O.length,A=!1;s<D;s++){const T=O.charCodeAt(s);if(!A){if(isSpace(T)){w++,9===T?C+=4-C%4:C++;continue}A=!0}10!==T&&s!==D-1||(10!==T&&s++,this.bMarks.push(e),this.eMarks.push(s),this.tShift.push(w),this.sCount.push(C),this.bsCount.push(0),A=!1,w=0,C=0,e=s+1)}this.bMarks.push(O.length),this.eMarks.push(O.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Core.prototype.process=function(e){const s=this.ruler.getRules("");for(let w=0,C=s.length;w<C;w++)s[w](e)},Core.prototype.State=StateCore,StateBlock.prototype.push=function(e,s,w){const C=new Token(e,s,w);return C.block=!0,w<0&&this.level--,C.level=this.level,w>0&&this.level++,this.tokens.push(C),C},StateBlock.prototype.isEmpty=function isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(e){for(let s=this.lineMax;e<s&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},StateBlock.prototype.skipSpaces=function skipSpaces(e){for(let s=this.src.length;e<s;e++){if(!isSpace(this.src.charCodeAt(e)))break}return e},StateBlock.prototype.skipSpacesBack=function skipSpacesBack(e,s){if(e<=s)return e;for(;e>s;)if(!isSpace(this.src.charCodeAt(--e)))return e+1;return e},StateBlock.prototype.skipChars=function skipChars(e,s){for(let w=this.src.length;e<w&&this.src.charCodeAt(e)===s;e++);return e},StateBlock.prototype.skipCharsBack=function skipCharsBack(e,s,w){if(e<=w)return e;for(;e>w;)if(s!==this.src.charCodeAt(--e))return e+1;return e},StateBlock.prototype.getLines=function getLines(e,s,w,C){if(e>=s)return"";const O=new Array(s-e);for(let D=0,A=e;A<s;A++,D++){let e=0;const T=this.bMarks[A];let B,L=T;for(B=A+1<s||C?this.eMarks[A]+1:this.eMarks[A];L<B&&e<w;){const s=this.src.charCodeAt(L);if(isSpace(s))9===s?e+=4-(e+this.bsCount[A])%4:e++;else{if(!(L-T<this.tShift[A]))break;e++}L++}O[D]=e>w?new Array(e-w+1).join(" ")+this.src.slice(L,B):this.src.slice(L,B)}return O.join("")},StateBlock.prototype.Token=Token;function getLine(e,s){const w=e.bMarks[s]+e.tShift[s],C=e.eMarks[s];return e.src.slice(w,C)}function escapedSplit(e){const s=[],w=e.length;let C=0,O=e.charCodeAt(C),D=!1,A=0,T="";for(;C<w;)124===O&&(D?(T+=e.substring(A,C-1),A=C):(s.push(T+e.substring(A,C)),T="",A=C+1)),D=92===O,C++,O=e.charCodeAt(C);return s.push(T+e.substring(A)),s}function skipBulletListMarker(e,s){const w=e.eMarks[s];let C=e.bMarks[s]+e.tShift[s];const O=e.src.charCodeAt(C++);if(42!==O&&45!==O&&43!==O)return-1;if(C<w){if(!isSpace(e.src.charCodeAt(C)))return-1}return C}function skipOrderedListMarker(e,s){const w=e.bMarks[s]+e.tShift[s],C=e.eMarks[s];let O=w;if(O+1>=C)return-1;let D=e.src.charCodeAt(O++);if(D<48||D>57)return-1;for(;;){if(O>=C)return-1;if(D=e.src.charCodeAt(O++),!(D>=48&&D<=57)){if(41===D||46===D)break;return-1}if(O-w>=10)return-1}return O<C&&(D=e.src.charCodeAt(O),!isSpace(D))?-1:O}const ut="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",dt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",pt=new RegExp("^(?:"+ut+"|"+dt+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),ht=new RegExp("^(?:"+ut+"|"+dt+")"),ft=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ht.source+"\\s*$"),/^$/,!1]];const mt=[["table",function table(e,s,w,C){if(s+2>w)return!1;let O=s+1;if(e.sCount[O]<e.blkIndent)return!1;if(e.sCount[O]-e.blkIndent>=4)return!1;let D=e.bMarks[O]+e.tShift[O];if(D>=e.eMarks[O])return!1;const A=e.src.charCodeAt(D++);if(124!==A&&45!==A&&58!==A)return!1;if(D>=e.eMarks[O])return!1;const T=e.src.charCodeAt(D++);if(124!==T&&45!==T&&58!==T&&!isSpace(T))return!1;if(45===A&&isSpace(T))return!1;for(;D<e.eMarks[O];){const s=e.src.charCodeAt(D);if(124!==s&&45!==s&&58!==s&&!isSpace(s))return!1;D++}let B=getLine(e,s+1),L=B.split("|");const P=[];for(let e=0;e<L.length;e++){const s=L[e].trim();if(!s){if(0===e||e===L.length-1)continue;return!1}if(!/^:?-+:?$/.test(s))return!1;58===s.charCodeAt(s.length-1)?P.push(58===s.charCodeAt(0)?"center":"right"):58===s.charCodeAt(0)?P.push("left"):P.push("")}if(B=getLine(e,s).trim(),-1===B.indexOf("|"))return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;L=escapedSplit(B),L.length&&""===L[0]&&L.shift(),L.length&&""===L[L.length-1]&&L.pop();const I=L.length;if(0===I||I!==P.length)return!1;if(C)return!0;const M=e.parentType;e.parentType="table";const F=e.md.block.ruler.getRules("blockquote"),$=[s,0];e.push("table_open","table",1).map=$,e.push("thead_open","thead",1).map=[s,s+1],e.push("tr_open","tr",1).map=[s,s+1];for(let s=0;s<L.length;s++){const w=e.push("th_open","th",1);P[s]&&(w.attrs=[["style","text-align:"+P[s]]]);const C=e.push("inline","",0);C.content=L[s].trim(),C.children=[],e.push("th_close","th",-1)}let N;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let V=0;for(O=s+2;O<w&&!(e.sCount[O]<e.blkIndent);O++){let C=!1;for(let s=0,D=F.length;s<D;s++)if(F[s](e,O,w,!0)){C=!0;break}if(C)break;if(B=getLine(e,O).trim(),!B)break;if(e.sCount[O]-e.blkIndent>=4)break;if(L=escapedSplit(B),L.length&&""===L[0]&&L.shift(),L.length&&""===L[L.length-1]&&L.pop(),V+=I-L.length,V>65536)break;if(O===s+2){e.push("tbody_open","tbody",1).map=N=[s+2,0]}e.push("tr_open","tr",1).map=[O,O+1];for(let s=0;s<I;s++){const w=e.push("td_open","td",1);P[s]&&(w.attrs=[["style","text-align:"+P[s]]]);const C=e.push("inline","",0);C.content=L[s]?L[s].trim():"",C.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return N&&(e.push("tbody_close","tbody",-1),N[1]=O),e.push("table_close","table",-1),$[1]=O,e.parentType=M,e.line=O,!0},["paragraph","reference"]],["code",function code(e,s,w){if(e.sCount[s]-e.blkIndent<4)return!1;let C=s+1,O=C;for(;C<w;)if(e.isEmpty(C))C++;else{if(!(e.sCount[C]-e.blkIndent>=4))break;C++,O=C}e.line=O;const D=e.push("code_block","code",0);return D.content=e.getLines(s,O,4+e.blkIndent,!1)+"\n",D.map=[s,e.line],!0}],["fence",function fence(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;if(O+3>D)return!1;const A=e.src.charCodeAt(O);if(126!==A&&96!==A)return!1;let T=O;O=e.skipChars(O,A);let B=O-T;if(B<3)return!1;const L=e.src.slice(T,O),P=e.src.slice(O,D);if(96===A&&P.indexOf(String.fromCharCode(A))>=0)return!1;if(C)return!0;let I=s,M=!1;for(;(I++,!(I>=w))&&(O=T=e.bMarks[I]+e.tShift[I],D=e.eMarks[I],!(O<D&&e.sCount[I]<e.blkIndent));)if(e.src.charCodeAt(O)===A&&!(e.sCount[I]-e.blkIndent>=4||(O=e.skipChars(O,A),O-T<B||(O=e.skipSpaces(O),O<D)))){M=!0;break}B=e.sCount[s],e.line=I+(M?1:0);const F=e.push("fence","code",0);return F.info=P,F.content=e.getLines(s+1,I,B,!0),F.markup=L,F.map=[s,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function blockquote(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];const A=e.lineMax;if(e.sCount[s]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(O))return!1;if(C)return!0;const T=[],B=[],L=[],P=[],I=e.md.block.ruler.getRules("blockquote"),M=e.parentType;e.parentType="blockquote";let F,$=!1;for(F=s;F<w;F++){const s=e.sCount[F]<e.blkIndent;if(O=e.bMarks[F]+e.tShift[F],D=e.eMarks[F],O>=D)break;if(62===e.src.charCodeAt(O++)&&!s){let s,w,C=e.sCount[F]+1;32===e.src.charCodeAt(O)?(O++,C++,w=!1,s=!0):9===e.src.charCodeAt(O)?(s=!0,(e.bsCount[F]+C)%4==3?(O++,C++,w=!1):w=!0):s=!1;let A=C;for(T.push(e.bMarks[F]),e.bMarks[F]=O;O<D;){const s=e.src.charCodeAt(O);if(!isSpace(s))break;9===s?A+=4-(A+e.bsCount[F]+(w?1:0))%4:A++,O++}$=O>=D,B.push(e.bsCount[F]),e.bsCount[F]=e.sCount[F]+1+(s?1:0),L.push(e.sCount[F]),e.sCount[F]=A-C,P.push(e.tShift[F]),e.tShift[F]=O-e.bMarks[F];continue}if($)break;let C=!1;for(let s=0,O=I.length;s<O;s++)if(I[s](e,F,w,!0)){C=!0;break}if(C){e.lineMax=F,0!==e.blkIndent&&(T.push(e.bMarks[F]),B.push(e.bsCount[F]),P.push(e.tShift[F]),L.push(e.sCount[F]),e.sCount[F]-=e.blkIndent);break}T.push(e.bMarks[F]),B.push(e.bsCount[F]),P.push(e.tShift[F]),L.push(e.sCount[F]),e.sCount[F]=-1}const N=e.blkIndent;e.blkIndent=0;const V=e.push("blockquote_open","blockquote",1);V.markup=">";const R=[s,0];V.map=R,e.md.block.tokenize(e,s,F),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=A,e.parentType=M,R[1]=e.line;for(let w=0;w<P.length;w++)e.bMarks[w+s]=T[w],e.tShift[w+s]=P[w],e.sCount[w+s]=L[w],e.bsCount[w+s]=B[w];return e.blkIndent=N,!0},["paragraph","reference","blockquote","list"]],["hr",function hr(e,s,w,C){const O=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;let D=e.bMarks[s]+e.tShift[s];const A=e.src.charCodeAt(D++);if(42!==A&&45!==A&&95!==A)return!1;let T=1;for(;D<O;){const s=e.src.charCodeAt(D++);if(s!==A&&!isSpace(s))return!1;s===A&&T++}if(T<3)return!1;if(C)return!0;e.line=s+1;const B=e.push("hr","hr",0);return B.map=[s,e.line],B.markup=Array(T+1).join(String.fromCharCode(A)),!0},["paragraph","reference","blockquote","list"]],["list",function list(e,s,w,C){let O,D,A,T,B=s,L=!0;if(e.sCount[B]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[B]-e.listIndent>=4&&e.sCount[B]<e.blkIndent)return!1;let P,I,M,F=!1;if(C&&"paragraph"===e.parentType&&e.sCount[B]>=e.blkIndent&&(F=!0),(M=skipOrderedListMarker(e,B))>=0){if(P=!0,A=e.bMarks[B]+e.tShift[B],I=Number(e.src.slice(A,M-1)),F&&1!==I)return!1}else{if(!((M=skipBulletListMarker(e,B))>=0))return!1;P=!1}if(F&&e.skipSpaces(M)>=e.eMarks[B])return!1;if(C)return!0;const $=e.src.charCodeAt(M-1),N=e.tokens.length;P?(T=e.push("ordered_list_open","ol",1),1!==I&&(T.attrs=[["start",I]])):T=e.push("bullet_list_open","ul",1);const V=[B,0];T.map=V,T.markup=String.fromCharCode($);let R=!1;const H=e.md.block.ruler.getRules("list"),z=e.parentType;for(e.parentType="list";B<w;){D=M,O=e.eMarks[B];const s=e.sCount[B]+M-(e.bMarks[B]+e.tShift[B]);let C=s;for(;D<O;){const s=e.src.charCodeAt(D);if(9===s)C+=4-(C+e.bsCount[B])%4;else{if(32!==s)break;C++}D++}const I=D;let F;F=I>=O?1:C-s,F>4&&(F=1);const N=s+F;T=e.push("list_item_open","li",1),T.markup=String.fromCharCode($);const V=[B,0];T.map=V,P&&(T.info=e.src.slice(A,M-1));const z=e.tight,W=e.tShift[B],j=e.sCount[B],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=N,e.tight=!0,e.tShift[B]=I-e.bMarks[B],e.sCount[B]=C,I>=O&&e.isEmpty(B+1)?e.line=Math.min(e.line+2,w):e.md.block.tokenize(e,B,w,!0),e.tight&&!R||(L=!1),R=e.line-B>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[B]=W,e.sCount[B]=j,e.tight=z,T=e.push("list_item_close","li",-1),T.markup=String.fromCharCode($),B=e.line,V[1]=B,B>=w)break;if(e.sCount[B]<e.blkIndent)break;if(e.sCount[B]-e.blkIndent>=4)break;let q=!1;for(let s=0,C=H.length;s<C;s++)if(H[s](e,B,w,!0)){q=!0;break}if(q)break;if(P){if(M=skipOrderedListMarker(e,B),M<0)break;A=e.bMarks[B]+e.tShift[B]}else if(M=skipBulletListMarker(e,B),M<0)break;if($!==e.src.charCodeAt(M-1))break}return T=P?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),T.markup=String.fromCharCode($),V[1]=B,e.line=B,e.parentType=z,L&&function markTightParagraphs(e,s){const w=e.level+2;for(let C=s+2,O=e.tokens.length-2;C<O;C++)e.tokens[C].level===w&&"paragraph_open"===e.tokens[C].type&&(e.tokens[C+2].hidden=!0,e.tokens[C].hidden=!0,C+=2)}(e,N),!0},["paragraph","reference","blockquote"]],["reference",function reference(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s],A=s+1;if(e.sCount[s]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(O))return!1;function getNextLine(s){const w=e.lineMax;if(s>=w||e.isEmpty(s))return null;let C=!1;if(e.sCount[s]-e.blkIndent>3&&(C=!0),e.sCount[s]<0&&(C=!0),!C){const C=e.md.block.ruler.getRules("reference"),O=e.parentType;e.parentType="reference";let D=!1;for(let O=0,A=C.length;O<A;O++)if(C[O](e,s,w,!0)){D=!0;break}if(e.parentType=O,D)return null}const O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];return e.src.slice(O,D+1)}let T=e.src.slice(O,D+1);D=T.length;let B=-1;for(O=1;O<D;O++){const e=T.charCodeAt(O);if(91===e)return!1;if(93===e){B=O;break}if(10===e){const e=getNextLine(A);null!==e&&(T+=e,D=T.length,A++)}else if(92===e&&(O++,O<D&&10===T.charCodeAt(O))){const e=getNextLine(A);null!==e&&(T+=e,D=T.length,A++)}}if(B<0||58!==T.charCodeAt(B+1))return!1;for(O=B+2;O<D;O++){const e=T.charCodeAt(O);if(10===e){const e=getNextLine(A);null!==e&&(T+=e,D=T.length,A++)}else if(!isSpace(e))break}const L=e.md.helpers.parseLinkDestination(T,O,D);if(!L.ok)return!1;const P=e.md.normalizeLink(L.str);if(!e.md.validateLink(P))return!1;O=L.pos;const I=O,M=A,F=O;for(;O<D;O++){const e=T.charCodeAt(O);if(10===e){const e=getNextLine(A);null!==e&&(T+=e,D=T.length,A++)}else if(!isSpace(e))break}let $,N=e.md.helpers.parseLinkTitle(T,O,D);for(;N.can_continue;){const s=getNextLine(A);if(null===s)break;T+=s,O=D,D=T.length,A++,N=e.md.helpers.parseLinkTitle(T,O,D,N)}for(O<D&&F!==O&&N.ok?($=N.str,O=N.pos):($="",O=I,A=M);O<D;){if(!isSpace(T.charCodeAt(O)))break;O++}if(O<D&&10!==T.charCodeAt(O)&&$)for($="",O=I,A=M;O<D;){if(!isSpace(T.charCodeAt(O)))break;O++}if(O<D&&10!==T.charCodeAt(O))return!1;const V=normalizeReference(T.slice(1,B));return!!V&&(C||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[V]&&(e.env.references[V]={title:$,href:P}),e.line=A),!0)}],["html_block",function html_block(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(O))return!1;let A=e.src.slice(O,D),T=0;for(;T<ft.length&&!ft[T][0].test(A);T++);if(T===ft.length)return!1;if(C)return ft[T][2];let B=s+1;if(!ft[T][1].test(A))for(;B<w&&!(e.sCount[B]<e.blkIndent);B++)if(O=e.bMarks[B]+e.tShift[B],D=e.eMarks[B],A=e.src.slice(O,D),ft[T][1].test(A)){0!==A.length&&B++;break}e.line=B;const L=e.push("html_block","",0);return L.map=[s,B],L.content=e.getLines(s,B,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function heading(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;let A=e.src.charCodeAt(O);if(35!==A||O>=D)return!1;let T=1;for(A=e.src.charCodeAt(++O);35===A&&O<D&&T<=6;)T++,A=e.src.charCodeAt(++O);if(T>6||O<D&&!isSpace(A))return!1;if(C)return!0;D=e.skipSpacesBack(D,O);const B=e.skipCharsBack(D,35,O);B>O&&isSpace(e.src.charCodeAt(B-1))&&(D=B),e.line=s+1;const L=e.push("heading_open","h"+String(T),1);L.markup="########".slice(0,T),L.map=[s,e.line];const P=e.push("inline","",0);return P.content=e.src.slice(O,D).trim(),P.map=[s,e.line],P.children=[],e.push("heading_close","h"+String(T),-1).markup="########".slice(0,T),!0},["paragraph","reference","blockquote"]],["lheading",function lheading(e,s,w){const C=e.md.block.ruler.getRules("paragraph");if(e.sCount[s]-e.blkIndent>=4)return!1;const O=e.parentType;e.parentType="paragraph";let D,A=0,T=s+1;for(;T<w&&!e.isEmpty(T);T++){if(e.sCount[T]-e.blkIndent>3)continue;if(e.sCount[T]>=e.blkIndent){let s=e.bMarks[T]+e.tShift[T];const w=e.eMarks[T];if(s<w&&(D=e.src.charCodeAt(s),(45===D||61===D)&&(s=e.skipChars(s,D),s=e.skipSpaces(s),s>=w))){A=61===D?1:2;break}}if(e.sCount[T]<0)continue;let s=!1;for(let O=0,D=C.length;O<D;O++)if(C[O](e,T,w,!0)){s=!0;break}if(s)break}if(!A)return!1;const B=e.getLines(s,T,e.blkIndent,!1).trim();e.line=T+1;const L=e.push("heading_open","h"+String(A),1);L.markup=String.fromCharCode(D),L.map=[s,e.line];const P=e.push("inline","",0);return P.content=B,P.map=[s,e.line-1],P.children=[],e.push("heading_close","h"+String(A),-1).markup=String.fromCharCode(D),e.parentType=O,!0}],["paragraph",function paragraph(e,s,w){const C=e.md.block.ruler.getRules("paragraph"),O=e.parentType;let D=s+1;for(e.parentType="paragraph";D<w&&!e.isEmpty(D);D++){if(e.sCount[D]-e.blkIndent>3)continue;if(e.sCount[D]<0)continue;let s=!1;for(let O=0,A=C.length;O<A;O++)if(C[O](e,D,w,!0)){s=!0;break}if(s)break}const A=e.getLines(s,D,e.blkIndent,!1).trim();e.line=D,e.push("paragraph_open","p",1).map=[s,e.line];const T=e.push("inline","",0);return T.content=A,T.map=[s,e.line],T.children=[],e.push("paragraph_close","p",-1),e.parentType=O,!0}]];function ParserBlock(){this.ruler=new Ruler;for(let e=0;e<mt.length;e++)this.ruler.push(mt[e][0],mt[e][1],{alt:(mt[e][2]||[]).slice()})}function StateInline(e,s,w,C){this.src=e,this.env=w,this.md=s,this.tokens=C,this.tokens_meta=Array(C.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}function isTerminatorChar(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}ParserBlock.prototype.tokenize=function(e,s,w){const C=this.ruler.getRules(""),O=C.length,D=e.md.options.maxNesting;let A=s,T=!1;for(;A<w&&(e.line=A=e.skipEmptyLines(A),!(A>=w))&&!(e.sCount[A]<e.blkIndent);){if(e.level>=D){e.line=w;break}const s=e.line;let B=!1;for(let D=0;D<O;D++)if(B=C[D](e,A,w,!1),B){if(s>=e.line)throw new Error("block rule didn't increment state.line");break}if(!B)throw new Error("none of the block rules matched");e.tight=!T,e.isEmpty(e.line-1)&&(T=!0),A=e.line,A<w&&e.isEmpty(A)&&(T=!0,A++,e.line=A)}},ParserBlock.prototype.parse=function(e,s,w,C){if(!e)return;const O=new this.State(e,s,w,C);this.tokenize(O,O.line,O.lineMax)},ParserBlock.prototype.State=StateBlock,StateInline.prototype.pushPending=function(){const e=new Token("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},StateInline.prototype.push=function(e,s,w){this.pending&&this.pushPending();const C=new Token(e,s,w);let O=null;return w<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),C.level=this.level,w>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],O={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(C),this.tokens_meta.push(O),C},StateInline.prototype.scanDelims=function(e,s){const w=this.posMax,C=this.src.charCodeAt(e),O=e>0?this.src.charCodeAt(e-1):32;let D=e;for(;D<w&&this.src.charCodeAt(D)===C;)D++;const A=D-e,T=D<w?this.src.charCodeAt(D):32,B=isMdAsciiPunct(O)||isPunctChar(String.fromCharCode(O)),L=isMdAsciiPunct(T)||isPunctChar(String.fromCharCode(T)),P=isWhiteSpace(O),I=isWhiteSpace(T),M=!I&&(!L||P||B),F=!P&&(!B||I||L);return{can_open:M&&(s||!F||B),can_close:F&&(s||!M||L),length:A}},StateInline.prototype.Token=Token;const gt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const yt=[];for(let fi=0;fi<256;fi++)yt.push(0);function postProcess$1(e,s){let w;const C=[],O=s.length;for(let D=0;D<O;D++){const O=s[D];if(126!==O.marker)continue;if(-1===O.end)continue;const A=s[O.end];w=e.tokens[O.token],w.type="s_open",w.tag="s",w.nesting=1,w.markup="~~",w.content="",w=e.tokens[A.token],w.type="s_close",w.tag="s",w.nesting=-1,w.markup="~~",w.content="","text"===e.tokens[A.token-1].type&&"~"===e.tokens[A.token-1].content&&C.push(A.token-1)}for(;C.length;){const s=C.pop();let O=s+1;for(;O<e.tokens.length&&"s_close"===e.tokens[O].type;)O++;O--,s!==O&&(w=e.tokens[O],e.tokens[O]=e.tokens[s],e.tokens[s]=w)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){yt[e.charCodeAt(0)]=1}));var vt={tokenize:function strikethrough_tokenize(e,s){const w=e.pos,C=e.src.charCodeAt(w);if(s)return!1;if(126!==C)return!1;const O=e.scanDelims(e.pos,!0);let D=O.length;const A=String.fromCharCode(C);if(D<2)return!1;let T;D%2&&(T=e.push("text","",0),T.content=A,D--);for(let s=0;s<D;s+=2)T=e.push("text","",0),T.content=A+A,e.delimiters.push({marker:C,length:0,token:e.tokens.length-1,end:-1,open:O.can_open,close:O.can_close});return e.pos+=O.length,!0},postProcess:function strikethrough_postProcess(e){const s=e.tokens_meta,w=e.tokens_meta.length;postProcess$1(e,e.delimiters);for(let C=0;C<w;C++)s[C]&&s[C].delimiters&&postProcess$1(e,s[C].delimiters)}};function postProcess(e,s){for(let w=s.length-1;w>=0;w--){const C=s[w];if(95!==C.marker&&42!==C.marker)continue;if(-1===C.end)continue;const O=s[C.end],D=w>0&&s[w-1].end===C.end+1&&s[w-1].marker===C.marker&&s[w-1].token===C.token-1&&s[C.end+1].token===O.token+1,A=String.fromCharCode(C.marker),T=e.tokens[C.token];T.type=D?"strong_open":"em_open",T.tag=D?"strong":"em",T.nesting=1,T.markup=D?A+A:A,T.content="";const B=e.tokens[O.token];B.type=D?"strong_close":"em_close",B.tag=D?"strong":"em",B.nesting=-1,B.markup=D?A+A:A,B.content="",D&&(e.tokens[s[w-1].token].content="",e.tokens[s[C.end+1].token].content="",w--)}}var _t={tokenize:function emphasis_tokenize(e,s){const w=e.pos,C=e.src.charCodeAt(w);if(s)return!1;if(95!==C&&42!==C)return!1;const O=e.scanDelims(e.pos,42===C);for(let s=0;s<O.length;s++){e.push("text","",0).content=String.fromCharCode(C),e.delimiters.push({marker:C,length:O.length,token:e.tokens.length-1,end:-1,open:O.can_open,close:O.can_close})}return e.pos+=O.length,!0},postProcess:function emphasis_post_process(e){const s=e.tokens_meta,w=e.tokens_meta.length;postProcess(e,e.delimiters);for(let C=0;C<w;C++)s[C]&&s[C].delimiters&&postProcess(e,s[C].delimiters)}};const bt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,kt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const Et=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,xt=/^&([a-z][a-z0-9]{1,31});/i;function processDelimiters(e){const s={},w=e.length;if(!w)return;let C=0,O=-2;const D=[];for(let A=0;A<w;A++){const w=e[A];if(D.push(0),e[C].marker===w.marker&&O===w.token-1||(C=A),O=w.token,w.length=w.length||0,!w.close)continue;s.hasOwnProperty(w.marker)||(s[w.marker]=[-1,-1,-1,-1,-1,-1]);const T=s[w.marker][(w.open?3:0)+w.length%3];let B=C-D[C]-1,L=B;for(;B>T;B-=D[B]+1){const s=e[B];if(s.marker===w.marker&&(s.open&&s.end<0)){let C=!1;if((s.close||w.open)&&(s.length+w.length)%3==0&&(s.length%3==0&&w.length%3==0||(C=!0)),!C){const C=B>0&&!e[B-1].open?D[B-1]+1:0;D[A]=A-B+C,D[B]=C,w.open=!1,s.end=A,s.close=!1,L=-1,O=-2;break}}}-1!==L&&(s[w.marker][(w.open?3:0)+(w.length||0)%3]=L)}}const St=[["text",function text(e,s){let w=e.pos;for(;w<e.posMax&&!isTerminatorChar(e.src.charCodeAt(w));)w++;return w!==e.pos&&(s||(e.pending+=e.src.slice(e.pos,w)),e.pos=w,!0)}],["linkify",function linkify(e,s){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const w=e.pos;if(w+3>e.posMax)return!1;if(58!==e.src.charCodeAt(w))return!1;if(47!==e.src.charCodeAt(w+1))return!1;if(47!==e.src.charCodeAt(w+2))return!1;const C=e.pending.match(gt);if(!C)return!1;const O=C[1],D=e.md.linkify.matchAtStart(e.src.slice(w-O.length));if(!D)return!1;let A=D.url;if(A.length<=O.length)return!1;A=A.replace(/\*+$/,"");const T=e.md.normalizeLink(A);if(!e.md.validateLink(T))return!1;if(!s){e.pending=e.pending.slice(0,-O.length);const s=e.push("link_open","a",1);s.attrs=[["href",T]],s.markup="linkify",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(A);const w=e.push("link_close","a",-1);w.markup="linkify",w.info="auto"}return e.pos+=A.length-O.length,!0}],["newline",function newline(e,s){let w=e.pos;if(10!==e.src.charCodeAt(w))return!1;const C=e.pending.length-1,O=e.posMax;if(!s)if(C>=0&&32===e.pending.charCodeAt(C))if(C>=1&&32===e.pending.charCodeAt(C-1)){let s=C-1;for(;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(w++;w<O&&isSpace(e.src.charCodeAt(w));)w++;return e.pos=w,!0}],["escape",function escape(e,s){let w=e.pos;const C=e.posMax;if(92!==e.src.charCodeAt(w))return!1;if(w++,w>=C)return!1;let O=e.src.charCodeAt(w);if(10===O){for(s||e.push("hardbreak","br",0),w++;w<C&&(O=e.src.charCodeAt(w),isSpace(O));)w++;return e.pos=w,!0}let D=e.src[w];if(O>=55296&&O<=56319&&w+1<C){const s=e.src.charCodeAt(w+1);s>=56320&&s<=57343&&(D+=e.src[w+1],w++)}const A="\\"+D;if(!s){const s=e.push("text_special","",0);O<256&&0!==yt[O]?s.content=D:s.content=A,s.markup=A,s.info="escape"}return e.pos=w+1,!0}],["backticks",function backtick(e,s){let w=e.pos;if(96!==e.src.charCodeAt(w))return!1;const C=w;w++;const O=e.posMax;for(;w<O&&96===e.src.charCodeAt(w);)w++;const D=e.src.slice(C,w),A=D.length;if(e.backticksScanned&&(e.backticks[A]||0)<=C)return s||(e.pending+=D),e.pos+=A,!0;let T,B=w;for(;-1!==(T=e.src.indexOf("`",B));){for(B=T+1;B<O&&96===e.src.charCodeAt(B);)B++;const C=B-T;if(C===A){if(!s){const s=e.push("code_inline","code",0);s.markup=D,s.content=e.src.slice(w,T).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=B,!0}e.backticks[C]=T}return e.backticksScanned=!0,s||(e.pending+=D),e.pos+=A,!0}],["strikethrough",vt.tokenize],["emphasis",_t.tokenize],["link",function link(e,s){let w,C,O,D,A="",T="",B=e.pos,L=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const P=e.pos,I=e.posMax,M=e.pos+1,F=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(F<0)return!1;let $=F+1;if($<I&&40===e.src.charCodeAt($)){for(L=!1,$++;$<I&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);if($>=I)return!1;if(B=$,O=e.md.helpers.parseLinkDestination(e.src,$,e.posMax),O.ok){for(A=e.md.normalizeLink(O.str),e.md.validateLink(A)?$=O.pos:A="",B=$;$<I&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);if(O=e.md.helpers.parseLinkTitle(e.src,$,e.posMax),$<I&&B!==$&&O.ok)for(T=O.str,$=O.pos;$<I&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);}($>=I||41!==e.src.charCodeAt($))&&(L=!0),$++}if(L){if(void 0===e.env.references)return!1;if($<I&&91===e.src.charCodeAt($)?(B=$+1,$=e.md.helpers.parseLinkLabel(e,$),$>=0?C=e.src.slice(B,$++):$=F+1):$=F+1,C||(C=e.src.slice(M,F)),D=e.env.references[normalizeReference(C)],!D)return e.pos=P,!1;A=D.href,T=D.title}if(!s){e.pos=M,e.posMax=F;const s=[["href",A]];e.push("link_open","a",1).attrs=s,T&&s.push(["title",T]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=$,e.posMax=I,!0}],["image",function image(e,s){let w,C,O,D,A,T,B,L,P="";const I=e.pos,M=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const F=e.pos+2,$=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if($<0)return!1;if(D=$+1,D<M&&40===e.src.charCodeAt(D)){for(D++;D<M&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);if(D>=M)return!1;for(L=D,T=e.md.helpers.parseLinkDestination(e.src,D,e.posMax),T.ok&&(P=e.md.normalizeLink(T.str),e.md.validateLink(P)?D=T.pos:P=""),L=D;D<M&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);if(T=e.md.helpers.parseLinkTitle(e.src,D,e.posMax),D<M&&L!==D&&T.ok)for(B=T.str,D=T.pos;D<M&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);else B="";if(D>=M||41!==e.src.charCodeAt(D))return e.pos=I,!1;D++}else{if(void 0===e.env.references)return!1;if(D<M&&91===e.src.charCodeAt(D)?(L=D+1,D=e.md.helpers.parseLinkLabel(e,D),D>=0?O=e.src.slice(L,D++):D=$+1):D=$+1,O||(O=e.src.slice(F,$)),A=e.env.references[normalizeReference(O)],!A)return e.pos=I,!1;P=A.href,B=A.title}if(!s){C=e.src.slice(F,$);const s=[];e.md.inline.parse(C,e.md,e.env,s);const w=e.push("image","img",0),O=[["src",P],["alt",""]];w.attrs=O,w.children=s,w.content=C,B&&O.push(["title",B])}return e.pos=D,e.posMax=M,!0}],["autolink",function autolink(e,s){let w=e.pos;if(60!==e.src.charCodeAt(w))return!1;const C=e.pos,O=e.posMax;for(;;){if(++w>=O)return!1;const s=e.src.charCodeAt(w);if(60===s)return!1;if(62===s)break}const D=e.src.slice(C+1,w);if(kt.test(D)){const w=e.md.normalizeLink(D);if(!e.md.validateLink(w))return!1;if(!s){const s=e.push("link_open","a",1);s.attrs=[["href",w]],s.markup="autolink",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(D);const C=e.push("link_close","a",-1);C.markup="autolink",C.info="auto"}return e.pos+=D.length+2,!0}if(bt.test(D)){const w=e.md.normalizeLink("mailto:"+D);if(!e.md.validateLink(w))return!1;if(!s){const s=e.push("link_open","a",1);s.attrs=[["href",w]],s.markup="autolink",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(D);const C=e.push("link_close","a",-1);C.markup="autolink",C.info="auto"}return e.pos+=D.length+2,!0}return!1}],["html_inline",function html_inline(e,s){if(!e.md.options.html)return!1;const w=e.posMax,C=e.pos;if(60!==e.src.charCodeAt(C)||C+2>=w)return!1;const O=e.src.charCodeAt(C+1);if(33!==O&&63!==O&&47!==O&&!function isLetter(e){const s=32|e;return s>=97&&s<=122}(O))return!1;const D=e.src.slice(C).match(pt);if(!D)return!1;if(!s){const s=e.push("html_inline","",0);s.content=D[0],function isLinkOpen(e){return/^<a[>\s]/i.test(e)}(s.content)&&e.linkLevel++,function isLinkClose(e){return/^<\/a\s*>/i.test(e)}(s.content)&&e.linkLevel--}return e.pos+=D[0].length,!0}],["entity",function entity(e,s){const w=e.pos,C=e.posMax;if(38!==e.src.charCodeAt(w))return!1;if(w+1>=C)return!1;if(35===e.src.charCodeAt(w+1)){const C=e.src.slice(w).match(Et);if(C){if(!s){const s="x"===C[1][0].toLowerCase()?parseInt(C[1].slice(1),16):parseInt(C[1],10),w=e.push("text_special","",0);w.content=isValidEntityCode(s)?fromCodePoint(s):fromCodePoint(65533),w.markup=C[0],w.info="entity"}return e.pos+=C[0].length,!0}}else{const C=e.src.slice(w).match(xt);if(C){const w=decodeHTML(C[0]);if(w!==C[0]){if(!s){const s=e.push("text_special","",0);s.content=w,s.markup=C[0],s.info="entity"}return e.pos+=C[0].length,!0}}}return!1}]],wt=[["balance_pairs",function link_pairs(e){const s=e.tokens_meta,w=e.tokens_meta.length;processDelimiters(e.delimiters);for(let e=0;e<w;e++)s[e]&&s[e].delimiters&&processDelimiters(s[e].delimiters)}],["strikethrough",vt.postProcess],["emphasis",_t.postProcess],["fragments_join",function fragments_join(e){let s,w,C=0;const O=e.tokens,D=e.tokens.length;for(s=w=0;s<D;s++)O[s].nesting<0&&C--,O[s].level=C,O[s].nesting>0&&C++,"text"===O[s].type&&s+1<D&&"text"===O[s+1].type?O[s+1].content=O[s].content+O[s+1].content:(s!==w&&(O[w]=O[s]),w++);s!==w&&(O.length=w)}]];function ParserInline(){this.ruler=new Ruler;for(let e=0;e<St.length;e++)this.ruler.push(St[e][0],St[e][1]);this.ruler2=new Ruler;for(let e=0;e<wt.length;e++)this.ruler2.push(wt[e][0],wt[e][1])}function assign(e){return Array.prototype.slice.call(arguments,1).forEach((function(s){s&&Object.keys(s).forEach((function(w){e[w]=s[w]}))})),e}function _class(e){return Object.prototype.toString.call(e)}function isFunction(e){return"[object Function]"===_class(e)}function escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}ParserInline.prototype.skipToken=function(e){const s=e.pos,w=this.ruler.getRules(""),C=w.length,O=e.md.options.maxNesting,D=e.cache;if(void 0!==D[s])return void(e.pos=D[s]);let A=!1;if(e.level<O){for(let O=0;O<C;O++)if(e.level++,A=w[O](e,!0),e.level--,A){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;A||e.pos++,D[s]=e.pos},ParserInline.prototype.tokenize=function(e){const s=this.ruler.getRules(""),w=s.length,C=e.posMax,O=e.md.options.maxNesting;for(;e.pos<C;){const D=e.pos;let A=!1;if(e.level<O)for(let C=0;C<w;C++)if(A=s[C](e,!1),A){if(D>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(A){if(e.pos>=C)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},ParserInline.prototype.parse=function(e,s,w,C){const O=new this.State(e,s,w,C);this.tokenize(O);const D=this.ruler2.getRules(""),A=D.length;for(let e=0;e<A;e++)D[e](O)},ParserInline.prototype.State=StateInline;const Ct={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const Ot={"http:":{validate:function(e,s,w){const C=e.slice(s);return w.re.http||(w.re.http=new RegExp("^\\/\\/"+w.re.src_auth+w.re.src_host_port_strict+w.re.src_path,"i")),w.re.http.test(C)?C.match(w.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,s,w){const C=e.slice(s);return w.re.no_http||(w.re.no_http=new RegExp("^"+w.re.src_auth+"(?:localhost|(?:(?:"+w.re.src_domain+")\\.)+"+w.re.src_domain_root+")"+w.re.src_port+w.re.src_host_terminator+w.re.src_path,"i")),w.re.no_http.test(C)?s>=3&&":"===e[s-3]||s>=3&&"/"===e[s-3]?0:C.match(w.re.no_http)[0].length:0}},"mailto:":{validate:function(e,s,w){const C=e.slice(s);return w.re.mailto||(w.re.mailto=new RegExp("^"+w.re.src_email_name+"@"+w.re.src_host_strict,"i")),w.re.mailto.test(C)?C.match(w.re.mailto)[0].length:0}}},Dt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function compile(e){const s=e.re=function reFactory(e){const s={};e=e||{},s.src_Any=H.source,s.src_Cc=z.source,s.src_Z=X.source,s.src_P=W.source,s.src_ZPCc=[s.src_Z,s.src_P,s.src_Cc].join("|"),s.src_ZCc=[s.src_Z,s.src_Cc].join("|");const w="[><|]";return s.src_pseudo_letter="(?:(?![><|]|"+s.src_ZPCc+")"+s.src_Any+")",s.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",s.src_auth="(?:(?:(?!"+s.src_ZCc+"|[@/\\[\\]()]).)+@)?",s.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",s.src_host_terminator="(?=$|[><|]|"+s.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+s.src_ZPCc+"))",s.src_path="(?:[/?#](?:(?!"+s.src_ZCc+"|"+w+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+s.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+s.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+s.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+s.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+s.src_ZCc+"|[']).)+\\'|\\'(?="+s.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+s.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+s.src_ZCc+"|$)|;(?!"+s.src_ZCc+"|$)|\\!+(?!"+s.src_ZCc+"|[!]|$)|\\?(?!"+s.src_ZCc+"|[?]|$))+|\\/)?",s.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',s.src_xn="xn--[a-z0-9\\-]{1,59}",s.src_domain_root="(?:"+s.src_xn+"|"+s.src_pseudo_letter+"{1,63})",s.src_domain="(?:"+s.src_xn+"|(?:"+s.src_pseudo_letter+")|(?:"+s.src_pseudo_letter+"(?:-|"+s.src_pseudo_letter+"){0,61}"+s.src_pseudo_letter+"))",s.src_host="(?:(?:(?:(?:"+s.src_domain+")\\.)*"+s.src_domain+"))",s.tpl_host_fuzzy="(?:"+s.src_ip4+"|(?:(?:(?:"+s.src_domain+")\\.)+(?:%TLDS%)))",s.tpl_host_no_ip_fuzzy="(?:(?:(?:"+s.src_domain+")\\.)+(?:%TLDS%))",s.src_host_strict=s.src_host+s.src_host_terminator,s.tpl_host_fuzzy_strict=s.tpl_host_fuzzy+s.src_host_terminator,s.src_host_port_strict=s.src_host+s.src_port+s.src_host_terminator,s.tpl_host_port_fuzzy_strict=s.tpl_host_fuzzy+s.src_port+s.src_host_terminator,s.tpl_host_port_no_ip_fuzzy_strict=s.tpl_host_no_ip_fuzzy+s.src_port+s.src_host_terminator,s.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+s.src_ZPCc+"|>|$))",s.tpl_email_fuzzy='(^|[><|]|"|\\(|'+s.src_ZCc+")("+s.src_email_name+"@"+s.tpl_host_fuzzy_strict+")",s.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+s.src_ZPCc+"))((?![$+<=>^`||])"+s.tpl_host_port_fuzzy_strict+s.src_path+")",s.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+s.src_ZPCc+"))((?![$+<=>^`||])"+s.tpl_host_port_no_ip_fuzzy_strict+s.src_path+")",s}(e.__opts__),w=e.__tlds__.slice();function untpl(e){return e.replace("%TLDS%",s.src_tlds)}e.onCompile(),e.__tlds_replaced__||w.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),w.push(s.src_xn),s.src_tlds=w.join("|"),s.email_fuzzy=RegExp(untpl(s.tpl_email_fuzzy),"i"),s.link_fuzzy=RegExp(untpl(s.tpl_link_fuzzy),"i"),s.link_no_ip_fuzzy=RegExp(untpl(s.tpl_link_no_ip_fuzzy),"i"),s.host_fuzzy_test=RegExp(untpl(s.tpl_host_fuzzy_test),"i");const C=[];function schemaError(e,s){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+s)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(s){const w=e.__schemas__[s];if(null===w)return;const O={validate:null,link:null};if(e.__compiled__[s]=O,function isObject$4(e){return"[object Object]"===_class(e)}(w))return!function isRegExp(e){return"[object RegExp]"===_class(e)}(w.validate)?isFunction(w.validate)?O.validate=w.validate:schemaError(s,w):O.validate=function createValidator(e){return function(s,w){const C=s.slice(w);return e.test(C)?C.match(e)[0].length:0}}(w.validate),void(isFunction(w.normalize)?O.normalize=w.normalize:w.normalize?schemaError(s,w):O.normalize=function(e,s){s.normalize(e)});!function isString(e){return"[object String]"===_class(e)}(w)?schemaError(s,w):C.push(s)})),C.forEach((function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,s){s.normalize(e)}};const O=Object.keys(e.__compiled__).filter((function(s){return s.length>0&&e.__compiled__[s]})).map(escapeRE).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+s.src_ZPCc+"))("+O+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+s.src_ZPCc+"))("+O+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function resetScanCache(e){e.__index__=-1,e.__text_cache__=""}(e)}function Match(e,s){const w=e.__index__,C=e.__last_index__,O=e.__text_cache__.slice(w,C);this.schema=e.__schema__.toLowerCase(),this.index=w+s,this.lastIndex=C+s,this.raw=O,this.text=O,this.url=O}function createMatch(e,s){const w=new Match(e,s);return e.__compiled__[w.schema].normalize(w,e),w}function LinkifyIt(e,s){if(!(this instanceof LinkifyIt))return new LinkifyIt(e,s);s||function isOptionsObj(e){return Object.keys(e||{}).reduce((function(e,s){return e||Ct.hasOwnProperty(s)}),!1)}(e)&&(s=e,e={}),this.__opts__=assign({},Ct,s),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=assign({},Ot,e),this.__compiled__={},this.__tlds__=Dt,this.__tlds_replaced__=!1,this.re={},compile(this)}LinkifyIt.prototype.add=function add(e,s){return this.__schemas__[e]=s,compile(this),this},LinkifyIt.prototype.set=function set(e){return this.__opts__=assign(this.__opts__,e),this},LinkifyIt.prototype.test=function test(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let s,w,C,O,D,A,T,B,L;if(this.re.schema_test.test(e))for(T=this.re.schema_search,T.lastIndex=0;null!==(s=T.exec(e));)if(O=this.testSchemaAt(e,s[2],T.lastIndex),O){this.__schema__=s[2],this.__index__=s.index+s[1].length,this.__last_index__=s.index+s[0].length+O;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(B=e.search(this.re.host_fuzzy_test),B>=0&&(this.__index__<0||B<this.__index__)&&null!==(w=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(D=w.index+w[1].length,(this.__index__<0||D<this.__index__)&&(this.__schema__="",this.__index__=D,this.__last_index__=w.index+w[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(L=e.indexOf("@"),L>=0&&null!==(C=e.match(this.re.email_fuzzy))&&(D=C.index+C[1].length,A=C.index+C[0].length,(this.__index__<0||D<this.__index__||D===this.__index__&&A>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=D,this.__last_index__=A))),this.__index__>=0},LinkifyIt.prototype.pretest=function pretest(e){return this.re.pretest.test(e)},LinkifyIt.prototype.testSchemaAt=function testSchemaAt(e,s,w){return this.__compiled__[s.toLowerCase()]?this.__compiled__[s.toLowerCase()].validate(e,w,this):0},LinkifyIt.prototype.match=function match(e){const s=[];let w=0;this.__index__>=0&&this.__text_cache__===e&&(s.push(createMatch(this,w)),w=this.__last_index__);let C=w?e.slice(w):e;for(;this.test(C);)s.push(createMatch(this,w)),C=C.slice(this.__last_index__),w+=this.__last_index__;return s.length?s:null},LinkifyIt.prototype.matchAtStart=function matchAtStart(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const s=this.re.schema_at_start.exec(e);if(!s)return null;const w=this.testSchemaAt(e,s[2],s[0].length);return w?(this.__schema__=s[2],this.__index__=s.index+s[1].length,this.__last_index__=s.index+s[0].length+w,createMatch(this,0)):null},LinkifyIt.prototype.tlds=function tlds(e,s){return e=Array.isArray(e)?e:[e],s?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,s,w){return e!==w[s-1]})).reverse(),compile(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,compile(this),this)},LinkifyIt.prototype.normalize=function normalize(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},LinkifyIt.prototype.onCompile=function onCompile(){};const At=2147483647,Tt=36,Bt=/^xn--/,Lt=/[^\0-\x7F]/,Pt=/[\x2E\u3002\uFF0E\uFF61]/g,It={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Mt=Math.floor,Ft=String.fromCharCode;function error(e){throw new RangeError(It[e])}function mapDomain(e,s){const w=e.split("@");let C="";w.length>1&&(C=w[0]+"@",e=w[1]);const O=function map(e,s){const w=[];let C=e.length;for(;C--;)w[C]=s(e[C]);return w}((e=e.replace(Pt,".")).split("."),s).join(".");return C+O}function ucs2decode(e){const s=[];let w=0;const C=e.length;for(;w<C;){const O=e.charCodeAt(w++);if(O>=55296&&O<=56319&&w<C){const C=e.charCodeAt(w++);56320==(64512&C)?s.push(((1023&O)<<10)+(1023&C)+65536):(s.push(O),w--)}else s.push(O)}return s}const digitToBasic=function(e,s){return e+22+75*(e<26)-((0!=s)<<5)},adapt=function(e,s,w){let C=0;for(e=w?Mt(e/700):e>>1,e+=Mt(e/s);e>455;C+=Tt)e=Mt(e/35);return Mt(C+36*e/(e+38))},decode=function(e){const s=[],w=e.length;let C=0,O=128,D=72,A=e.lastIndexOf("-");A<0&&(A=0);for(let w=0;w<A;++w)e.charCodeAt(w)>=128&&error("not-basic"),s.push(e.charCodeAt(w));for(let B=A>0?A+1:0;B<w;){const A=C;for(let s=1,O=Tt;;O+=Tt){B>=w&&error("invalid-input");const A=(T=e.charCodeAt(B++))>=48&&T<58?T-48+26:T>=65&&T<91?T-65:T>=97&&T<123?T-97:Tt;A>=Tt&&error("invalid-input"),A>Mt((At-C)/s)&&error("overflow"),C+=A*s;const L=O<=D?1:O>=D+26?26:O-D;if(A<L)break;const P=Tt-L;s>Mt(At/P)&&error("overflow"),s*=P}const L=s.length+1;D=adapt(C-A,L,0==A),Mt(C/L)>At-O&&error("overflow"),O+=Mt(C/L),C%=L,s.splice(C++,0,O)}var T;return String.fromCodePoint(...s)},encode=function(e){const s=[],w=(e=ucs2decode(e)).length;let C=128,O=0,D=72;for(const w of e)w<128&&s.push(Ft(w));const A=s.length;let T=A;for(A&&s.push("-");T<w;){let w=At;for(const s of e)s>=C&&s<w&&(w=s);const B=T+1;w-C>Mt((At-O)/B)&&error("overflow"),O+=(w-C)*B,C=w;for(const w of e)if(w<C&&++O>At&&error("overflow"),w===C){let e=O;for(let w=Tt;;w+=Tt){const C=w<=D?1:w>=D+26?26:w-D;if(e<C)break;const O=e-C,A=Tt-C;s.push(Ft(digitToBasic(C+O%A,0))),e=Mt(O/A)}s.push(Ft(digitToBasic(e,0))),D=adapt(O,B,T===A),O=0,++T}++O,++C}return s.join("")},punycode_toASCII=function(e){return mapDomain(e,(function(e){return Lt.test(e)?"xn--"+encode(e):e}))},punycode_toUnicode=function(e){return mapDomain(e,(function(e){return Bt.test(e)?decode(e.slice(4).toLowerCase()):e}))};const $t={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Nt=/^(vbscript|javascript|file|data):/,Vt=/^data:image\/(gif|png|jpeg|webp);/;function validateLink(e){const s=e.trim().toLowerCase();return!Nt.test(s)||Vt.test(s)}const Rt=["http:","https:","mailto:"];function normalizeLink(e){const s=urlParse(e,!0);if(s.hostname&&(!s.protocol||Rt.indexOf(s.protocol)>=0))try{s.hostname=punycode_toASCII(s.hostname)}catch(e){}return encode$1(format(s))}function normalizeLinkText(e){const s=urlParse(e,!0);if(s.hostname&&(!s.protocol||Rt.indexOf(s.protocol)>=0))try{s.hostname=punycode_toUnicode(s.hostname)}catch(e){}return decode$1(format(s),decode$1.defaultChars+"%")}function MarkdownIt(e,s){if(!(this instanceof MarkdownIt))return new MarkdownIt(e,s);s||isString$1(e)||(s=e||{},e="default"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.linkify=new LinkifyIt,this.validateLink=validateLink,this.normalizeLink=normalizeLink,this.normalizeLinkText=normalizeLinkText,this.utils=de,this.helpers=assign$1({},pe),this.options={},this.configure(e),s&&this.set(s)}MarkdownIt.prototype.set=function(e){return assign$1(this.options,e),this},MarkdownIt.prototype.configure=function(e){const s=this;if(isString$1(e)){const s=e;if(!(e=$t[s]))throw new Error('Wrong `markdown-it` preset "'+s+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&s.set(e.options),e.components&&Object.keys(e.components).forEach((function(w){e.components[w].rules&&s[w].ruler.enableOnly(e.components[w].rules),e.components[w].rules2&&s[w].ruler2.enableOnly(e.components[w].rules2)})),this},MarkdownIt.prototype.enable=function(e,s){let w=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(s){w=w.concat(this[s].ruler.enable(e,!0))}),this),w=w.concat(this.inline.ruler2.enable(e,!0));const C=e.filter((function(e){return w.indexOf(e)<0}));if(C.length&&!s)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+C);return this},MarkdownIt.prototype.disable=function(e,s){let w=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(s){w=w.concat(this[s].ruler.disable(e,!0))}),this),w=w.concat(this.inline.ruler2.disable(e,!0));const C=e.filter((function(e){return w.indexOf(e)<0}));if(C.length&&!s)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+C);return this},MarkdownIt.prototype.use=function(e){const s=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,s),this},MarkdownIt.prototype.parse=function(e,s){if("string"!=typeof e)throw new Error("Input data should be a String");const w=new this.core.State(e,this,s);return this.core.process(w),w.tokens},MarkdownIt.prototype.render=function(e,s){return s=s||{},this.renderer.render(this.parse(e,s),this.options,s)},MarkdownIt.prototype.parseInline=function(e,s){const w=new this.core.State(e,this,s);return w.inlineMode=!0,this.core.process(w),w.tokens},MarkdownIt.prototype.renderInline=function(e,s){return s=s||{},this.renderer.render(this.parseInline(e,s),this.options,s)};var Ht=!1,zt={false:"push",true:"unshift",after:"push",before:"unshift"},Wt={isPermalinkSymbol:!0};function r(e,s,w,C){var O;if(!Ht){var D="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";"object"==typeof process&&process&&process.emitWarning?process.emitWarning(D):console.warn(D),Ht=!0}var A=[Object.assign(new w.Token("link_open","a",1),{attrs:[].concat(s.permalinkClass?[["class",s.permalinkClass]]:[],[["href",s.permalinkHref(e,w)]],Object.entries(s.permalinkAttrs(e,w)))}),Object.assign(new w.Token("html_block","",0),{content:s.permalinkSymbol,meta:Wt}),new w.Token("link_close","a",-1)];s.permalinkSpace&&w.tokens[C+1].children[zt[s.permalinkBefore]](Object.assign(new w.Token("text","",0),{content:" "})),(O=w.tokens[C+1].children)[zt[s.permalinkBefore]].apply(O,A)}function a(e){return"#"+e}function i(e){return{}}var jt={class:"header-anchor",symbol:"#",renderHref:a,renderAttrs:i};function o(e){function n(s){return s=Object.assign({},n.defaults,s),function(w,C,O,D){return e(w,s,C,O,D)}}return n.defaults=Object.assign({},jt),n.renderPermalinkImpl=e,n}function c(e){var s=[],w=e.filter((function(e){if("class"!==e[0])return!0;s.push(e[1])}));return s.length>0&&w.unshift(["class",s.join(" ")]),w}var Xt=o((function(e,s,w,C,O){var D,A=[Object.assign(new C.Token("link_open","a",1),{attrs:c([].concat(s.class?[["class",s.class]]:[],[["href",s.renderHref(e,C)]],s.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(s.renderAttrs(e,C))))}),Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}),new C.Token("link_close","a",-1)];if(s.space){var T="string"==typeof s.space?s.space:" ";C.tokens[O+1].children[zt[s.placement]](Object.assign(new C.Token("string"==typeof s.space?"html_inline":"text","",0),{content:T}))}(D=C.tokens[O+1].children)[zt[s.placement]].apply(D,A)}));Object.assign(Xt.defaults,{space:!0,placement:"after",ariaHidden:!1});var qt=o(Xt.renderPermalinkImpl);qt.defaults=Object.assign({},Xt.defaults,{ariaHidden:!0});var Yt=o((function(e,s,w,C,O){var D=[Object.assign(new C.Token("link_open","a",1),{attrs:c([].concat(s.class?[["class",s.class]]:[],[["href",s.renderHref(e,C)]],Object.entries(s.renderAttrs(e,C))))})].concat(s.safariReaderFix?[new C.Token("span_open","span",1)]:[],C.tokens[O+1].children,s.safariReaderFix?[new C.Token("span_close","span",-1)]:[],[new C.Token("link_close","a",-1)]);C.tokens[O+1]=Object.assign(new C.Token("inline","",0),{children:D})}));Object.assign(Yt.defaults,{safariReaderFix:!1});var Gt=o((function(e,s,w,C,O){var D;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(s.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+s.style+"`");if(!["aria-describedby","aria-labelledby"].includes(s.style)&&!s.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+s.style+"` style");if("visually-hidden"===s.style&&!s.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var A=C.tokens[O+1].children.filter((function(e){return"text"===e.type||"code_inline"===e.type})).reduce((function(e,s){return e+s.content}),""),T=[],B=[];if(s.class&&B.push(["class",s.class]),B.push(["href",s.renderHref(e,C)]),B.push.apply(B,Object.entries(s.renderAttrs(e,C))),"visually-hidden"===s.style){if(T.push(Object.assign(new C.Token("span_open","span",1),{attrs:[["class",s.visuallyHiddenClass]]}),Object.assign(new C.Token("text","",0),{content:s.assistiveText(A)}),new C.Token("span_close","span",-1)),s.space){var L="string"==typeof s.space?s.space:" ";T[zt[s.placement]](Object.assign(new C.Token("string"==typeof s.space?"html_inline":"text","",0),{content:L}))}T[zt[s.placement]](Object.assign(new C.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}),new C.Token("span_close","span",-1))}else T.push(Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}));"aria-label"===s.style?B.push(["aria-label",s.assistiveText(A)]):["aria-describedby","aria-labelledby"].includes(s.style)&&B.push([s.style,e]);var P=[Object.assign(new C.Token("link_open","a",1),{attrs:c(B)})].concat(T,[new C.Token("link_close","a",-1)]);(D=C.tokens).splice.apply(D,[O+3,0].concat(P)),s.wrapper&&(C.tokens.splice(O,0,Object.assign(new C.Token("html_block","",0),{content:s.wrapper[0]+"\n"})),C.tokens.splice(O+3+P.length+1,0,Object.assign(new C.Token("html_block","",0),{content:s.wrapper[1]+"\n"})))}));function p(e,s,w,C){var O=e,D=C;if(w&&Object.prototype.hasOwnProperty.call(s,O))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(s,O);)O=e+"-"+D,D+=1;return s[O]=!0,O}function b(e,s){s=Object.assign({},b.defaults,s),e.core.ruler.push("anchor",(function(e){for(var w,C={},O=e.tokens,D=Array.isArray(s.level)?(w=s.level,function(e){return w.includes(e)}):function(e){return function(s){return s>=e}}(s.level),A=0;A<O.length;A++){var T=O[A];if("heading_open"===T.type&&D(Number(T.tag.substr(1)))){var B=s.getTokensText(O[A+1].children),L=T.attrGet("id");L=null==L?p(L=s.slugifyWithState?s.slugifyWithState(B,e):s.slugify(B),C,!1,s.uniqueSlugStartIndex):p(L,C,!0,s.uniqueSlugStartIndex),T.attrSet("id",L),!1!==s.tabIndex&&T.attrSet("tabindex",""+s.tabIndex),"function"==typeof s.permalink?s.permalink(L,s,e,A):(s.permalink||s.renderPermalink&&s.renderPermalink!==r)&&s.renderPermalink(L,s,e,A),A=O.indexOf(T),s.callback&&s.callback(T,{slug:L,title:B})}}}))}function render_footnote_anchor_name(e,s,w,C){const O=Number(e[s].meta.id+1).toString();let D="";return"string"==typeof C.docId&&(D=`-${C.docId}-`),D+O}function render_footnote_caption(e,s){let w=Number(e[s].meta.id+1).toString();return e[s].meta.subId>0&&(w+=`:${e[s].meta.subId}`),`[${w}]`}function render_footnote_ref(e,s,w,C,O){const D=O.rules.footnote_anchor_name(e,s,w,C,O),A=O.rules.footnote_caption(e,s,w,C,O);let T=D;return e[s].meta.subId>0&&(T+=`:${e[s].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${D}" id="fnref${T}">${A}</a></sup>`}function render_footnote_block_open(e,s,w){return(w.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function render_footnote_block_close(){return"</ol>\n</section>\n"}function render_footnote_open(e,s,w,C,O){let D=O.rules.footnote_anchor_name(e,s,w,C,O);return e[s].meta.subId>0&&(D+=`:${e[s].meta.subId}`),`<li id="fn${D}" class="footnote-item">`}function render_footnote_close(){return"</li>\n"}function render_footnote_anchor(e,s,w,C,O){let D=O.rules.footnote_anchor_name(e,s,w,C,O);return e[s].meta.subId>0&&(D+=`:${e[s].meta.subId}`),` <a href="#fnref${D}" class="footnote-backref">↩︎</a>`}function footnote_plugin(e){const s=e.helpers.parseLinkLabel,w=e.utils.isSpace;e.renderer.rules.footnote_ref=render_footnote_ref,e.renderer.rules.footnote_block_open=render_footnote_block_open,e.renderer.rules.footnote_block_close=render_footnote_block_close,e.renderer.rules.footnote_open=render_footnote_open,e.renderer.rules.footnote_close=render_footnote_close,e.renderer.rules.footnote_anchor=render_footnote_anchor,e.renderer.rules.footnote_caption=render_footnote_caption,e.renderer.rules.footnote_anchor_name=render_footnote_anchor_name,e.block.ruler.before("reference","footnote_def",(function footnote_def(e,s,C,O){const D=e.bMarks[s]+e.tShift[s],A=e.eMarks[s];if(D+4>A)return!1;if(91!==e.src.charCodeAt(D))return!1;if(94!==e.src.charCodeAt(D+1))return!1;let T;for(T=D+2;T<A;T++){if(32===e.src.charCodeAt(T))return!1;if(93===e.src.charCodeAt(T))break}if(T===D+2)return!1;if(T+1>=A||58!==e.src.charCodeAt(++T))return!1;if(O)return!0;T++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={});const B=e.src.slice(D+2,T-2);e.env.footnotes.refs[`:${B}`]=-1;const L=new e.Token("footnote_reference_open","",1);L.meta={label:B},L.level=e.level++,e.tokens.push(L);const P=e.bMarks[s],I=e.tShift[s],M=e.sCount[s],F=e.parentType,$=T,N=e.sCount[s]+T-(e.bMarks[s]+e.tShift[s]);let V=N;for(;T<A;){const s=e.src.charCodeAt(T);if(!w(s))break;9===s?V+=4-V%4:V++,T++}e.tShift[s]=T-$,e.sCount[s]=V-N,e.bMarks[s]=$,e.blkIndent+=4,e.parentType="footnote",e.sCount[s]<e.blkIndent&&(e.sCount[s]+=e.blkIndent),e.md.block.tokenize(e,s,C,!0),e.parentType=F,e.blkIndent-=4,e.tShift[s]=I,e.sCount[s]=M,e.bMarks[s]=P;const R=new e.Token("footnote_reference_close","",-1);return R.level=--e.level,e.tokens.push(R),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function footnote_inline(e,w){const C=e.posMax,O=e.pos;if(O+2>=C)return!1;if(94!==e.src.charCodeAt(O))return!1;if(91!==e.src.charCodeAt(O+1))return!1;const D=O+2,A=s(e,O+1);if(A<0)return!1;if(!w){e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]);const s=e.env.footnotes.list.length,w=[];e.md.inline.parse(e.src.slice(D,A),e.md,e.env,w);e.push("footnote_ref","",0).meta={id:s},e.env.footnotes.list[s]={content:e.src.slice(D,A),tokens:w}}return e.pos=A+1,e.posMax=C,!0})),e.inline.ruler.after("footnote_inline","footnote_ref",(function footnote_ref(e,s){const w=e.posMax,C=e.pos;if(C+3>w)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(C))return!1;if(94!==e.src.charCodeAt(C+1))return!1;let O;for(O=C+2;O<w;O++){if(32===e.src.charCodeAt(O))return!1;if(10===e.src.charCodeAt(O))return!1;if(93===e.src.charCodeAt(O))break}if(O===C+2)return!1;if(O>=w)return!1;O++;const D=e.src.slice(C+2,O-1);if(void 0===e.env.footnotes.refs[`:${D}`])return!1;if(!s){let s;e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[`:${D}`]<0?(s=e.env.footnotes.list.length,e.env.footnotes.list[s]={label:D,count:0},e.env.footnotes.refs[`:${D}`]=s):s=e.env.footnotes.refs[`:${D}`];const w=e.env.footnotes.list[s].count;e.env.footnotes.list[s].count++;e.push("footnote_ref","",0).meta={id:s,subId:w,label:D}}return e.pos=O,e.posMax=w,!0})),e.core.ruler.after("inline","footnote_tail",(function footnote_tail(e){let s,w,C,O=!1;const D={};if(!e.env.footnotes)return;if(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(O=!0,w=[],C=e.meta.label,!1):"footnote_reference_close"===e.type?(O=!1,D[":"+C]=w,!1):(O&&w.push(e),!O)})),!e.env.footnotes.list)return;const A=e.env.footnotes.list;e.tokens.push(new e.Token("footnote_block_open","",1));for(let w=0,C=A.length;w<C;w++){const C=new e.Token("footnote_open","",1);if(C.meta={id:w,label:A[w].label},e.tokens.push(C),A[w].tokens){s=[];const C=new e.Token("paragraph_open","p",1);C.block=!0,s.push(C);const O=new e.Token("inline","",0);O.children=A[w].tokens,O.content=A[w].content,s.push(O);const D=new e.Token("paragraph_close","p",-1);D.block=!0,s.push(D)}else A[w].label&&(s=D[`:${A[w].label}`]);let O;s&&(e.tokens=e.tokens.concat(s)),O="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null;const T=A[w].count>0?A[w].count:1;for(let s=0;s<T;s++){const C=new e.Token("footnote_anchor","",0);C.meta={id:w,subId:s,label:A[w].label},e.tokens.push(C)}O&&e.tokens.push(O),e.tokens.push(new e.Token("footnote_close","",-1))}e.tokens.push(new e.Token("footnote_block_close","",-1))}))}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.assign(Gt.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),b.permalink={__proto__:null,legacy:r,renderHref:a,renderAttrs:i,makePermalink:o,linkInsideHeader:Xt,ariaHidden:qt,headerLink:Yt,linkAfterHeader:Gt},b.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter((function(e){return["text","code_inline"].includes(e.type)})).map((function(e){return e.content})).join("")},permalink:!1,renderPermalink:r,permalinkClass:qt.defaults.class,permalinkSpace:qt.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===qt.defaults.placement,permalinkHref:qt.defaults.renderHref,permalinkAttrs:qt.defaults.renderAttrs},b.default=b;var Ut=getDefaultExportFromCjs((function front_matter_plugin(e,s){var w="-",C=w.charCodeAt(0);e.block.ruler.before("table","front_matter",(function frontMatter(e,O,D,A){var T,B,L,P,I,M,F,$=!1,N=e.bMarks[O]+e.tShift[O],V=e.eMarks[O];if(0!==O||C!==e.src.charCodeAt(0))return!1;for(T=N+1;T<=V;T++)if(w[(T-N)%1]!==e.src[T]){F=T+1;break}if((L=Math.floor((T-N)/1))<3)return!1;if(T-=(T-N)%1,A)return!0;for(B=O;!(++B>=D)&&"..."!==e.src.slice(N,V)&&!((N=e.bMarks[B]+e.tShift[B])<(V=e.eMarks[B])&&e.sCount[B]<e.blkIndent);)if(C===e.src.charCodeAt(N)&&!(e.sCount[B]-e.blkIndent>=4)){for(T=N+1;T<=V&&w[(T-N)%1]===e.src[T];T++);if(!(Math.floor((T-N)/1)<L||(T-=(T-N)%1,(T=e.skipSpaces(T))<V))){$=!0;break}}return I=e.parentType,M=e.lineMax,e.parentType="container",e.lineMax=B,(P=e.push("front_matter",null,0)).hidden=!0,P.markup=e.src.slice(O,T),P.block=!0,P.map=[O,B+($?1:0)],P.meta=e.src.slice(F,N-1),e.parentType=I,e.lineMax=M,e.line=B+($?1:0),s(P.meta),!0}),{alt:["paragraph","reference","blockquote","list"]})})),Zt=getDefaultExportFromCjs((function inject_linenumbers_plugin(e){function injectLineNumbers(e,s,w,C,O){var D;return e[s].map&&(D=e[s].map[0],e[s].attrJoin("class","source-line"),e[s].attrSet("data-source-line",String(D))),O.renderToken(e,s,w,C,O)}e.renderer.rules.paragraph_open=injectLineNumbers,e.renderer.rules.heading_open=injectLineNumbers,e.renderer.rules.list_item_open=injectLineNumbers,e.renderer.rules.table_open=injectLineNumbers}));const onRemove=(e,s)=>{const w=e.parentNode;if(!w)throw new Error("The node must already be attached");const C=new window.MutationObserver((w=>{for(const O of w)for(const w of O.removedNodes)w===e&&(C.disconnect(),s())}));C.observe(w,{childList:!0})},animateRectTransition=(e,s,w={})=>{if(!e.parentElement)throw new Error("The node must already be attached");const{width:C,height:O,left:D,top:A}=s,{width:T,height:B,left:L,top:P}=e.getBoundingClientRect(),I=(C??T)/T,M=(O??B)/B,F=D-L,$=A-P;if(0===F&&0===$||!isFinite(I)||!isFinite(M))return e.animate([],{duration:0});const N=[{transform:"translate(0, 0) scale(1, 1)",opacity:1},{transform:`translate(${F}px, ${$}px) scale(${I}, ${M})`,opacity:.3}];return!0===w.resume&&N.reverse(),e.animate(N,{duration:w.duration??500,easing:"ease-in-out"})};function throttle(e,s){let w=null;return function(...C){return null!==w?null:(w=setTimeout((()=>w=null),"function"==typeof s?s.call(this):s),e.call(this,...C))}}const shiftByWindow=e=>{const s=e.getBoundingClientRect(),w=window.innerWidth-s.left-s.width,C=window.innerHeight-s.top-s.height;e.style.transform=`translate(${w<0?w:0}px, ${C<0?C:0}px)`};var Kt,Jt=1e3/60,Qt=[],en=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,Jt)},tn=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},nn=Date.now();function step$1(){var e,s;Kt&&(tn.call(window,Kt),Kt=null),Qt.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(nn=Date.now(),s=!0):Date.now()-nn<500&&(s=!0),s&&(Kt=en.call(window,step$1))}function indexOfTasks$1(e){var s=-1;return Qt.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}var rn=function add(e){var s;return-1===indexOfTasks$1(e)?(Qt.push(s={listener:e}),function(e){s.event=e,Kt||step$1()}):null};function _defineProperties$6(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var an=[],sn=[],ln=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){ln=!0}}))}catch(error){}function addEventListenerWithOptions$1(e,s,w,C){e.addEventListener(s,w,ln?C:C.capture)}function getPointsLength$1(e,s){var w=e.x-s.x,C=e.y-s.y;return Math.sqrt(w*w+C*C)}function getTouchById$1(e,s){if(null!=e&&null!=s)for(var w=0;w<e.length;w++)if(e[w].identifier===s)return e[w];return null}function hasXY$1(e){return e&&"number"==typeof e.clientX&&"number"==typeof e.clientY}function dragstart$1(e){e.preventDefault()}var cn=function(){function PointerEvent(e){var s=this;!function _classCallCheck$6(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PointerEvent),this.startHandlers={},this.lastHandlerId=0,this.curPointerClass=null,this.curTouchId=null,this.lastPointerXY={clientX:0,clientY:0},this.lastTouchTime=0,this.options={preventDefault:!0,stopPropagation:!0},e&&["preventDefault","stopPropagation"].forEach((function(w){"boolean"==typeof e[w]&&(s.options[w]=e[w])}))}return function _createClass$6(e,s,w){return s&&_defineProperties$6(e.prototype,s),w&&_defineProperties$6(e,w),e}(PointerEvent,[{key:"regStartHandler",value:function regStartHandler(e){var s=this;return s.startHandlers[++s.lastHandlerId]=function(w){var C,O,D="mousedown"===w.type?"mouse":"touch",A=Date.now();if("touch"===D)s.lastTouchTime=A,C=w.changedTouches[0],O=w.changedTouches[0].identifier;else{if(A-s.lastTouchTime<400)return;C=w}if(!hasXY$1(C))throw new Error("No clientX/clientY");s.curPointerClass&&s.cancel(),e.call(s,C)&&(s.curPointerClass=D,s.curTouchId="touch"===D?O:null,s.lastPointerXY.clientX=C.clientX,s.lastPointerXY.clientY=C.clientY,s.options.preventDefault&&w.preventDefault(),s.options.stopPropagation&&w.stopPropagation())},s.lastHandlerId}},{key:"unregStartHandler",value:function unregStartHandler(e){delete this.startHandlers[e]}},{key:"addStartHandler",value:function addStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return addEventListenerWithOptions$1(e,"mousedown",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchstart",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"dragstart",dragstart$1,{capture:!1,passive:!1}),s}},{key:"removeStartHandler",value:function removeStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return e.removeEventListener("mousedown",this.startHandlers[s],!1),e.removeEventListener("touchstart",this.startHandlers[s],!1),e.removeEventListener("dragstart",dragstart$1,!1),s}},{key:"addMoveHandler",value:function addMoveHandler(e,s,w){var C=this;function handler(e){var s="mousemove"===e.type?"mouse":"touch";if("touch"===s&&(C.lastTouchTime=Date.now()),s===C.curPointerClass){var w="touch"===s?getTouchById$1(e.changedTouches,C.curTouchId):e;hasXY$1(w)&&(w.clientX===C.lastPointerXY.clientX&&w.clientY===C.lastPointerXY.clientY||C.move(w),C.options.preventDefault&&e.preventDefault(),C.options.stopPropagation&&e.stopPropagation())}}var O=w?handler:rn(handler);addEventListenerWithOptions$1(e,"mousemove",O,{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchmove",O,{capture:!1,passive:!1}),C.curMoveHandler=s}},{key:"move",value:function move(e){hasXY$1(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curMoveHandler&&this.curMoveHandler(this.lastPointerXY)}},{key:"addEndHandler",value:function addEndHandler(e,s){var w=this;function wrappedHandler(e){var s="mouseup"===e.type?"mouse":"touch";if("touch"===s&&(w.lastTouchTime=Date.now()),s===w.curPointerClass){var C="touch"===s?getTouchById$1(e.changedTouches,w.curTouchId)||(getTouchById$1(e.touches,w.curTouchId)?null:{}):e;C&&(w.end(C),w.options.preventDefault&&e.preventDefault(),w.options.stopPropagation&&e.stopPropagation())}}addEventListenerWithOptions$1(e,"mouseup",wrappedHandler,{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchend",wrappedHandler,{capture:!1,passive:!1}),w.curEndHandler=s}},{key:"end",value:function end(e){hasXY$1(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curEndHandler&&this.curEndHandler(this.lastPointerXY),this.curPointerClass=this.curTouchId=null}},{key:"addCancelHandler",value:function addCancelHandler(e,s){var w=this;addEventListenerWithOptions$1(e,"touchcancel",(function wrappedHandler(e){w.lastTouchTime=Date.now(),null!=w.curPointerClass&&(getTouchById$1(e.changedTouches,w.curTouchId)||(getTouchById$1(e.touches,w.curTouchId)?null:{}))&&w.cancel()}),{capture:!1,passive:!1}),w.curCancelHandler=s}},{key:"cancel",value:function cancel(){this.curCancelHandler&&this.curCancelHandler(),this.curPointerClass=this.curTouchId=null}}],[{key:"addEventListenerWithOptions",get:function get(){return addEventListenerWithOptions$1}},{key:"initClickEmulator",value:function initClickEmulator(e,s,w){if(an.includes(e))return e;an.push(e);var C,O,D,A;return null==s&&(s=16),null==w&&(w=400),addEventListenerWithOptions$1(e,"touchstart",(function(e){var s=e.changedTouches[0];C=s.clientX,O=s.clientY,D=s.identifier,A=performance.now()}),{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchend",(function(T){var B=getTouchById$1(T.changedTouches,D);"number"==typeof C&&"number"==typeof O&&"number"==typeof A&&B&&"number"==typeof B.clientX&&"number"==typeof B.clientY&&getPointsLength$1({x:C,y:O},{x:B.clientX,y:B.clientY})<=s&&performance.now()-A<=w&&setTimeout((function(){var s=new MouseEvent("click",{clientX:B.clientX,clientY:B.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=A=null}),{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchcancel",(function(){C=O=D=A=null}),{capture:!1,passive:!1}),e}},{key:"initDblClickEmulator",value:function initDblClickEmulator(e,s,w){if(sn.includes(e))return e;sn.push(e);var C,O,D;return null==s&&(s=16),null==w&&(w=400),PointerEvent.initClickEmulator(e,s,w),addEventListenerWithOptions$1(e,"click",(function(A){A.emulated&&"number"==typeof A.clientX&&"number"==typeof A.clientY&&("number"==typeof C&&getPointsLength$1({x:C,y:O},{x:A.clientX,y:A.clientY})<=s&&performance.now()-D<=2*w?(setTimeout((function(){var s=new MouseEvent("dblclick",{clientX:A.clientX,clientY:A.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=null):(C=A.clientX,O=A.clientY,D=performance.now()))}),{capture:!1,passive:!1}),e}}]),PointerEvent}();function ucf$1(e){return e.substr(0,1).toUpperCase()+e.substr(1)}var un,dn,pn,hn=["webkit","moz","ms","o"],fn=hn.reduce((function(e,s){return e.push(s),e.push(ucf$1(s)),e}),[]),mn=hn.map((function(e){return"-".concat(e,"-")})),gn=function(){var e;return function(){return e=e||document.createElement("div").style}}(),yn=(dn=new RegExp("^(?:"+hn.join("|")+")(.)","i"),pn=/[A-Z]/,function(e){return"float"===(e=(e+"").replace(/\s/g,"").replace(/-([\da-z])/gi,(function(e,s){return s.toUpperCase()})).replace(dn,(function(e,s){return pn.test(s)?s.toLowerCase():e}))).toLowerCase()?"cssFloat":e}),vn=(un=new RegExp("^(?:"+mn.join("|")+")","i"),function(e){return(null!=e?e+"":"").replace(/\s/g,"").replace(un,"")}),cssSupports$1=function(e,s){var w=gn();return e=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),w.setProperty(e,s),null!=w[e]&&w.getPropertyValue(e)===s},_n={},bn={};function getName$1(e){if((e=yn(e))&&null==_n[e]){var s=gn();if(null!=s[e])_n[e]=e;else{var w=ucf$1(e);fn.some((function(C){var O=C+w;return null!=s[O]&&(_n[e]=O,!0)}))||(_n[e]=!1)}}return _n[e]||void 0}var kn={getName:getName$1,getValue:function getValue$1(e,s){var w;return(e=getName$1(e))?(bn[e]=bn[e]||{},(Array.isArray(s)?s:[s]).some((function(s){return s=vn(s),null!=bn[e][s]?!1!==bn[e][s]&&(w=bn[e][s],!0):cssSupports$1(e,s)?(w=bn[e][s]=s,!0):!!mn.some((function(C){var O=C+s;return!!cssSupports$1(e,O)&&(w=bn[e][s]=O,!0)}))||(bn[e][s]=!1,!1)})),"string"==typeof w?w:void 0):w}};function normalize$1(e){return(e+"").trim()}function applyList$1(e,s){s.setAttribute("class",e.join(" "))}function mClassList$1(e){return!mClassList$1.ignoreNative&&e.classList||function(){var s=(e.getAttribute("class")||"").trim().split(/\s+/).filter((function(e){return!!e})),w={length:s.length,item:function item(e){return s[e]},contains:function contains(e){return-1!==s.indexOf(normalize$1(e))},add:function add(){return function _add$1(e,s,w){w.filter((function(s){return!(!(s=normalize$1(s))||-1!==e.indexOf(s)||(e.push(s),0))})).length&&applyList$1(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList$1.methodChain?w:void 0},remove:function remove(){return function _remove$1(e,s,w){w.filter((function(s){var w;return!(!(s=normalize$1(s))||-1===(w=e.indexOf(s))||(e.splice(w,1),0))})).length&&applyList$1(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList$1.methodChain?w:void 0},toggle:function toggle(w,C){return function _toggle$1(e,s,w,C){var O=e.indexOf(w=normalize$1(w));return-1!==O?!!C||(e.splice(O,1),applyList$1(e,s),!1):!1!==C&&(e.push(w),applyList$1(e,s),!0)}(s,e,w,C)},replace:function replace(C,O){return function _replace$1(e,s,w,C){var O;(w=normalize$1(w))&&(C=normalize$1(C))&&w!==C&&-1!==(O=e.indexOf(w))&&(e.splice(O,1),-1===e.indexOf(C)&&e.push(C),applyList$1(e,s))}(s,e,C,O),mClassList$1.methodChain?w:void 0}};return w}()}function _defineProperties$5(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}mClassList$1.methodChain=!0,mClassList$1.ignoreNative=!0;var En,xn,Sn,wn,Cn,On,Dn,An,Tn,Bn,Ln,Pn,In,Mn=["tl","tr","bl","br"],Fn=["start","end"],$n=["inside","outside"],Nn=[40,200,1e3],Vn=[100,40,0],Rn="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Hn=!Rn&&!!document.uniqueID,zn="MozAppearance"in document.documentElement.style,Wn=!(Rn||zn||!window.chrome||!window.CSS),jn=!(Rn||Hn||zn||Wn||window.chrome||!("WebkitAppearance"in document.documentElement.style)),Xn=(En={}.toString,xn={}.hasOwnProperty.toString,Sn=xn.call(Object),function(e){var s,w;return e&&"[object Object]"===En.call(e)&&(!(s=Object.getPrototypeOf(e))||(w=s.hasOwnProperty("constructor")&&s.constructor)&&"function"==typeof w&&xn.call(w)===Sn)}),qn=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},Yn={},Gn={},Un=new cn,Zn=0,Kn=jn?["all-scroll","move"]:["grab","all-scroll","move"],Jn=jn?"move":["grabbing","move"],Qn="plain-draggable",eo="plain-draggable-dragging",to="plain-draggable-moving",no={},oo=1e3/60,ro=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,oo)},io=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)};{var ao,so,lo,co={};function frameUpdate(){var e=Date.now();["x","y"].forEach((function(s){var w=co[s];if(w){var C=e-w.lastFrameTime,O=so(ao,s),D=null!=w.lastValue&&Math.abs(w.lastValue-O)<10?w.lastValue:O;if(-1===w.dir?D>w.min:D<w.max){var A=D+w.speed*C*w.dir;A<w.min?A=w.min:A>w.max&&(A=w.max),so(ao,s,A),w.lastValue=A}w.lastFrameTime=e}}))}function frame(){io.call(window,lo),frameUpdate(),lo=ro.call(window,frame)}no.move=function(e,s,w){io.call(window,lo),frameUpdate(),ao===e&&(s.x&&co.x&&(s.x.lastValue=co.x.lastValue),s.y&&co.y&&(s.y.lastValue=co.y.lastValue)),ao=e,co=s,so=w;var C=Date.now();["x","y"].forEach((function(e){var s=co[e];s&&(s.lastFrameTime=C)})),lo=ro.call(window,frame)},no.stop=function(){io.call(window,lo),frameUpdate(),co={},ao=null}}function scrollXYWindow$1(e,s,w){return null!=w&&("x"===s?e.scrollTo(w,e.pageYOffset):e.scrollTo(e.pageXOffset,w)),"x"===s?e.pageXOffset:e.pageYOffset}function scrollXYElement$1(e,s,w){var C="x"===s?"scrollLeft":"scrollTop";return null!=w&&(e[C]=w),e[C]}function copyTree$1(e){return e?Xn(e)?Object.keys(e).reduce((function(s,w){return s[w]=copyTree$1(e[w]),s}),{}):Array.isArray(e)?e.map(copyTree$1):e:e}function hasChanged$1(e,s){var w,C;return _typeof$1(e)!==_typeof$1(s)||(w=Xn(e)?"obj":Array.isArray(e)?"array":"")!=(Xn(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?hasChanged$1(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return hasChanged$1(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return hasChanged$1(e,s[w])})):e!==s)}function isElement$2(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function validBBox$1(e){if(!Xn(e))return null;var s;if(!qn(s=e.left)&&!qn(s=e.x))return null;if(e.left=e.x=s,!qn(s=e.top)&&!qn(s=e.y))return null;if(e.top=e.y=s,qn(e.width)&&e.width>=0)e.right=e.left+e.width;else{if(!(qn(e.right)&&e.right>=e.left))return null;e.width=e.right-e.left}if(qn(e.height)&&e.height>=0)e.bottom=e.top+e.height;else{if(!(qn(e.bottom)&&e.bottom>=e.top))return null;e.height=e.bottom-e.top}return e}function validPPValue$1(e){return qn(e)?{value:e,isRatio:!1}:"string"==typeof e?function string2PPValue(e){var s,w,C=/^(.+?)(%)?$/.exec(e);return C&&qn(s=parseFloat(C[1]))?{value:(w=!(!C[2]||!s))?s/100:s,isRatio:w}:null}(e.replace(/\s/g,"")):null}function ppValue2OptionValue$1(e){return e.isRatio?"".concat(100*e.value,"%"):e.value}function resolvePPValue$1(e,s,w){return"number"==typeof e?e:s+e.value*(e.isRatio?w:1)}function validPPBBox$1(e){if(!Xn(e))return null;var s;if(!(s=validPPValue$1(e.left))&&!(s=validPPValue$1(e.x)))return null;if(e.left=e.x=s,!(s=validPPValue$1(e.top))&&!(s=validPPValue$1(e.y)))return null;if(e.top=e.y=s,(s=validPPValue$1(e.width))&&s.value>=0)e.width=s,delete e.right;else{if(!(s=validPPValue$1(e.right)))return null;e.right=s,delete e.width}if((s=validPPValue$1(e.height))&&s.value>=0)e.height=s,delete e.bottom;else{if(!(s=validPPValue$1(e.bottom)))return null;e.bottom=s,delete e.height}return e}function ppBBox2OptionObject$1(e){return Object.keys(e).reduce((function(s,w){return s[w]=ppValue2OptionValue$1(e[w]),s}),{})}function resolvePPBBox$1(e,s){var w={left:"x",right:"x",x:"x",width:"x",top:"y",bottom:"y",y:"y",height:"y"},C={x:s.left,y:s.top},O={x:s.width,y:s.height};return validBBox$1(Object.keys(e).reduce((function(s,D){return s[D]=resolvePPValue$1(e[D],"width"===D||"height"===D?0:C[w[D]],O[w[D]]),s}),{}))}function getBBox$2(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,width:w.width,height:w.height};if(C.left+=window.pageXOffset,C.top+=window.pageYOffset,s){var O=window.getComputedStyle(e,""),D=parseFloat(O.borderTopWidth)||0,A=parseFloat(O.borderRightWidth)||0,T=parseFloat(O.borderBottomWidth)||0,B=parseFloat(O.borderLeftWidth)||0;C.left+=B,C.top+=D,C.width-=B+A,C.height-=D+T}return validBBox$1(C)}function setDraggableCursor$1(e,s){null==Dn&&(!1!==Kn&&(Dn=kn.getValue("cursor",Kn)),null==Dn&&(Dn=!1)),e.style.cursor=!1===Dn?s:Dn}function setDraggingCursor$1(e){null==An&&(!1!==Jn&&(An=kn.getValue("cursor",Jn)),null==An&&(An=!1)),!1!==An&&(e.style.cursor=An)}function viewPoint2SvgPoint$1(e,s,w){var C=e.svgPoint;return C.x=s,C.y=w,C.matrixTransform(e.svgCtmElement.getScreenCTM().inverse())}function moveTranslate$1(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.htmlOffset;return e.elementStyle[Ln]="translate(".concat(s.left+C.left,"px, ").concat(s.top+C.top,"px)"),!0}return!1}function moveLeftTop$1(e,s){var w=e.elementBBox,C=e.elementStyle,O=e.htmlOffset,D=!1;return s.left!==w.left&&(C.left=s.left+O.left+"px",D=!0),s.top!==w.top&&(C.top=s.top+O.top+"px",D=!0),D}function moveSvg$1(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.svgOffset,O=e.svgOriginBBox,D=viewPoint2SvgPoint$1(e,s.left-window.pageXOffset,s.top-window.pageYOffset);return e.svgTransform.setTranslate(D.x+C.x-O.x,D.y+C.y-O.y),!0}return!1}function move$1(e,s,w){var C=e.elementBBox;function fix(){e.minLeft>=e.maxLeft?s.left=C.left:s.left<e.minLeft?s.left=e.minLeft:s.left>e.maxLeft&&(s.left=e.maxLeft),e.minTop>=e.maxTop?s.top=C.top:s.top<e.minTop?s.top=e.minTop:s.top>e.maxTop&&(s.top=e.maxTop)}if(fix(),w){if(!1===w(s))return!1;fix()}var O=e.moveElm(e,s);return O&&(e.elementBBox=validBBox$1({left:s.left,top:s.top,width:C.width,height:C.height})),O}function initTranslate$1(e){var s=e.element,w=e.elementStyle,C=getBBox$2(s),O=["display","marginTop","marginBottom","width","height"];O.unshift(Ln);var D=w[Bn];w[Bn]="none";var A=getBBox$2(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var T=getBBox$2(s),B=window.getComputedStyle(s,"");"inline"===B.display&&(w.display="inline-block",["Top","Bottom"].forEach((function(e){var s=parseFloat(B["padding".concat(e)]);w["margin".concat(e)]=s?"-".concat(s,"px"):"0"}))),w[Ln]="translate(0, 0)";var L=getBBox$2(s),P=e.htmlOffset={left:L.left?-L.left:0,top:L.top?-L.top:0};return w[Ln]="translate(".concat(C.left+P.left,"px, ").concat(C.top+P.top,"px)"),["width","height"].forEach((function(C){L[C]!==T[C]&&(w[C]=T[C]+"px",(L=getBBox$2(s))[C]!==T[C]&&(w[C]=T[C]-(L[C]-T[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[Bn]=D,A.left===C.left&&A.top===C.top||(w[Ln]="translate(".concat(A.left+P.left,"px, ").concat(A.top+P.top,"px)")),A}function initLeftTop$1(e){var s=e.element,w=e.elementStyle,C=getBBox$2(s),O=["position","marginTop","marginRight","marginBottom","marginLeft","width","height"],D=w[Bn];w[Bn]="none";var A=getBBox$2(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var T=getBBox$2(s);w.position="absolute",w.left=w.top=w.margin="0";var B=getBBox$2(s),L=e.htmlOffset={left:B.left?-B.left:0,top:B.top?-B.top:0};return w.left=C.left+L.left+"px",w.top=C.top+L.top+"px",["width","height"].forEach((function(C){B[C]!==T[C]&&(w[C]=T[C]+"px",(B=getBBox$2(s))[C]!==T[C]&&(w[C]=T[C]-(B[C]-T[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[Bn]=D,A.left===C.left&&A.top===C.top||(w.left=A.left+L.left+"px",w.top=A.top+L.top+"px"),A}function initSvg$1(e){var s=e.element,w=e.svgTransform,C=s.getBoundingClientRect(),O=getBBox$2(s);w.setTranslate(0,0);var D=e.svgOriginBBox=s.getBBox(),A=s.getBoundingClientRect(),T=viewPoint2SvgPoint$1(e,A.left,A.top),B=e.svgOffset={x:D.x-T.x,y:D.y-T.y},L=viewPoint2SvgPoint$1(e,C.left,C.top);return w.setTranslate(L.x+B.x-D.x,L.y+B.y-D.y),O}function initBBox$1(e,s){var w=getBBox$2(document.documentElement),C=e.elementBBox=e.initElm(e),O=e.containmentBBox=e.containmentIsBBox?resolvePPBBox$1(e.options.containment,w)||w:getBBox$2(e.options.containment,!0);if(e.minLeft=O.left,e.maxLeft=O.right-C.width,e.minTop=O.top,e.maxTop=O.bottom-C.height,move$1(e,{left:C.left,top:C.top}),e.parsedSnapTargets){var D={x:C.width,y:C.height},A={x:e.minLeft,y:e.minTop},T={x:e.maxLeft,y:e.maxTop},B={left:"x",right:"x",x:"x",width:"x",xStart:"x",xEnd:"x",xStep:"x",top:"y",bottom:"y",y:"y",height:"y",yStart:"y",yEnd:"y",yStep:"y"},L=e.parsedSnapTargets.reduce((function(e,s){var L,P="containment"===s.base?O:w,I={x:P.left,y:P.top},M={x:P.width,y:P.height};function addSnapTarget(w){if(null==w.center&&(w.center=s.center),null==w.xGravity&&(w.xGravity=s.gravity),null==w.yGravity&&(w.yGravity=s.gravity),null!=w.x&&null!=w.y)w.x=resolvePPValue$1(w.x,I.x,M.x),w.y=resolvePPValue$1(w.y,I.y,M.y),w.center&&(w.x-=D.x/2,w.y-=D.y/2,w.corners=["tl"]),(w.corners||s.corners).forEach((function(s){var C=w.x-("tr"===s||"br"===s?D.x:0),O=w.y-("bl"===s||"br"===s?D.y:0);if(C>=A.x&&C<=T.x&&O>=A.y&&O<=T.y){var B={x:C,y:O},L=C-w.xGravity,P=C+w.xGravity,I=O-w.yGravity,M=O+w.yGravity;L>A.x&&(B.gravityXStart=L),P<T.x&&(B.gravityXEnd=P),I>A.y&&(B.gravityYStart=I),M<T.y&&(B.gravityYEnd=M),e.push(B)}}));else{var C=null!=w.x?"x":"y",O="x"===C?"y":"x",B="".concat(O,"Start"),L="".concat(O,"End"),P="".concat(C,"Gravity"),F=C.toUpperCase(),$=O.toUpperCase(),N="gravity".concat(F,"Start"),V="gravity".concat(F,"End"),R="gravity".concat($,"Start"),H="gravity".concat($,"End");if(w[C]=resolvePPValue$1(w[C],I[C],M[C]),w[B]=resolvePPValue$1(w[B],I[O],M[O]),w[L]=resolvePPValue$1(w[L],I[O],M[O])-D[O],w[B]>w[L]||w[B]>T[O]||w[L]<A[O])return;w.center&&(w[C]-=D[C]/2,w.sides=["start"]),(w.sides||s.sides).forEach((function(s){var I=w[C]-("end"===s?D[C]:0);if(I>=A[C]&&I<=T[C]){var M={},F=I-w[P],$=I+w[P];M[C]=I,F>A[C]&&(M[N]=F),$<T[C]&&(M[V]=$),w[B]>A[O]&&(M[R]=w[B]),w[L]<T[O]&&(M[H]=w[L]),e.push(M)}}))}}if((L=s.element?getBBox$2(s.element):null)||s.ppBBox)s.ppBBox&&(L=resolvePPBBox$1(s.ppBBox,P)),L&&s.edges.forEach((function(e){var w=s.gravity,O=s.gravity;"outside"===e&&(w+=C.width,O+=C.height);var D=L.left-w,A=L.right+w,T=L.top-O,B=L.bottom+O,P="inside"===e?"start":"end";addSnapTarget({xStart:D,xEnd:A,y:L.top,sides:[P],center:!1}),addSnapTarget({x:L.left,yStart:T,yEnd:B,sides:[P],center:!1}),P="inside"===e?"end":"start",addSnapTarget({xStart:D,xEnd:A,y:L.bottom,sides:[P],center:!1}),addSnapTarget({x:L.right,yStart:T,yEnd:B,sides:[P],center:!1})}));else{var F=[["x","y","xStart","xEnd","xStep","yStart","yEnd","yStep"].reduce((function(e,w){return s[w]&&(e[w]=resolvePPValue$1(s[w],"xStep"===w||"yStep"===w?0:I[B[w]],M[B[w]])),e}),{})];["x","y"].forEach((function(e){var w="".concat(e,"Start"),C="".concat(e,"End"),O="".concat(e,"Step"),D="".concat(e,"Gravity");F=F.reduce((function(A,T){var B=T[w],L=T[C],P=T[O];if(null!=B&&null!=L&&B>=L)return A;if(null!=P){if(P<2)return A;var I=P/2;I=s.gravity>I?I:null;for(var M=B;M<=L;M+=P){var F=Object.keys(T).reduce((function(e,s){return s!==w&&s!==C&&s!==O&&(e[s]=T[s]),e}),{});F[e]=M,F[D]=I,A.push(F)}}else A.push(T);return A}),[])})),F.forEach((function(e){addSnapTarget(e)}))}return e}),[]);e.snapTargets=L.length?L:null}var P={},I=e.options.autoScroll;if(I){P.isWindow=I.target===window,P.target=I.target;var M="scroll"===s,F=function getScrollable$1(e,s,w){var C,O,D,A,T={};A=s?document.documentElement:e,T.clientWidth=A.clientWidth,T.clientHeight=A.clientHeight;var B,L,P,I=0,M=0;return w||(s?(B=scrollXYWindow$1(e,"x"),L=scrollXYWindow$1(e,"y"),C=getComputedStyle(document.documentElement,""),O=getComputedStyle(document.body,""),I=scrollXYWindow$1(e,"x",document.documentElement.scrollWidth+T.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),M=scrollXYWindow$1(e,"y",document.documentElement.scrollHeight+T.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),scrollXYWindow$1(e,"x",B),scrollXYWindow$1(e,"y",L)):(B=scrollXYElement$1(e,"x"),L=scrollXYElement$1(e,"y"),D=getComputedStyle(e,""),I=scrollXYElement$1(e,"x",e.scrollWidth+T.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),M=scrollXYElement$1(e,"y",e.scrollHeight+T.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),scrollXYElement$1(e,"x",B),scrollXYElement$1(e,"y",L))),T.scrollWidth=T.clientWidth+I,T.scrollHeight=T.clientHeight+M,s?T.clientX=T.clientY=0:(P=e.getBoundingClientRect(),D||(D=getComputedStyle(e,"")),T.clientX=P.left+(parseFloat(D.borderLeftWidth)||0),T.clientY=P.top+(parseFloat(D.borderTopWidth)||0)),T}(I.target,P.isWindow,M),$=validBBox$1({left:F.clientX,top:F.clientY,width:F.clientWidth,height:F.clientHeight});M?e.autoScroll&&(P.scrollWidth=e.autoScroll.scrollWidth,P.scrollHeight=e.autoScroll.scrollHeight):(P.scrollWidth=F.scrollWidth,P.scrollHeight=F.scrollHeight),[["X","Width","left","right"],["Y","Height","top","bottom"]].forEach((function(e){var s=e[0],w=e[1],O=e[2],D=e[3],A=(P["scroll".concat(w)]||0)-F["client".concat(w)],T=I["min".concat(s)]||0,B=qn(I["max".concat(s)])?I["max".concat(s)]:A;if(T<B&&T<A){B>A&&(B=A);for(var L=[],M=C[w.toLowerCase()],N=I.sensitivity.length-1;N>=0;N--){var V=I.sensitivity[N],R=I.speed[N];L.push({dir:-1,speed:R,position:$[O]+V}),L.push({dir:1,speed:R,position:$[D]-V-M})}P[s.toLowerCase()]={min:T,max:B,lines:L}}}))}e.autoScroll=P.x||P.y?P:null}function dragEnd$1(e){no.stop(),setDraggableCursor$1(e.options.handle,e.orgCursor),On.style.cursor=Tn,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.orgZIndex),Pn&&(On.style[Pn]=In);var s=mClassList$1(e.element);to&&s.remove(to),eo&&s.remove(eo),wn=null,Un.cancel(),e.onDragEnd&&e.onDragEnd({left:e.elementBBox.left,top:e.elementBBox.top})}function _setOptions$4(e,s){var w,C,O=e.options;s.containment&&(isElement$2(s.containment)?s.containment!==O.containment&&(O.containment=s.containment,e.containmentIsBBox=!1,w=!0):(C=validPPBBox$1(copyTree$1(s.containment)))&&hasChanged$1(C,O.containment)&&(O.containment=C,e.containmentIsBBox=!0,w=!0));function commonSnapOptions(e,s){function cleanString(e){return"string"==typeof e?e.replace(/[, ]+/g," ").trim().toLowerCase():null}qn(s.gravity)&&s.gravity>0&&(e.gravity=s.gravity);var w=cleanString(s.corner);if(w){if("all"!==w){var C={},O=w.split(/\s/).reduce((function(e,s){return(s="tl"===(s=s.trim().replace(/^(.).*?-(.).*$/,"$1$2"))||"lt"===s?"tl":"tr"===s||"rt"===s?"tr":"bl"===s||"lb"===s?"bl":"br"===s||"rb"===s?"br":null)&&!C[s]&&(e.push(s),C[s]=!0),e}),[]),D=O.length;w=D?4===D?"all":O.join(" "):null}w&&(e.corner=w)}var A=cleanString(s.side);A&&("start"===A||"end"===A||"both"===A?e.side=A:"start end"!==A&&"end start"!==A||(e.side="both")),"boolean"==typeof s.center&&(e.center=s.center);var T=cleanString(s.edge);T&&("inside"===T||"outside"===T||"both"===T?e.edge=T:"inside outside"!==T&&"outside inside"!==T||(e.edge="both"));var B="string"==typeof s.base?s.base.trim().toLowerCase():null;return!B||"containment"!==B&&"document"!==B||(e.base=B),e}if(null!=s.snap){var D=Xn(s.snap)&&null!=s.snap.targets?s.snap:{targets:s.snap},A=[],T=commonSnapOptions({targets:A},D);T.gravity||(T.gravity=20),T.corner||(T.corner="tl"),T.side||(T.side="both"),"boolean"!=typeof T.center&&(T.center=!1),T.edge||(T.edge="both"),T.base||(T.base="containment");var B=(Array.isArray(D.targets)?D.targets:[D.targets]).reduce((function(e,s){if(null==s)return e;var w,C=isElement$2(s),O=validPPBBox$1(copyTree$1(s)),D=C||O?{boundingBox:s}:Xn(s)&&null==s.start&&null==s.end&&null==s.step?s:{x:s,y:s},B=[],L={},P=D.boundingBox;if(C||isElement$2(P))B.push({element:P}),L.boundingBox=P;else if(w=O||validPPBBox$1(copyTree$1(P)))B.push({ppBBox:w}),L.boundingBox=ppBBox2OptionObject$1(w);else{var I,M=["x","y"].reduce((function(e,s){var w,C,O,A,T=D[s];(w=validPPValue$1(T))?(e[s]=w,L[s]=ppValue2OptionValue$1(w)):(Xn(T)&&(C=validPPValue$1(T.start),O=validPPValue$1(T.end),A=validPPValue$1(T.step),C&&O&&C.isRatio===O.isRatio&&C.value>=O.value&&(I=!0)),C=e["".concat(s,"Start")]=C||{value:0,isRatio:!1},O=e["".concat(s,"End")]=O||{value:1,isRatio:!0},L[s]={start:ppValue2OptionValue$1(C),end:ppValue2OptionValue$1(O)},A&&((A.isRatio?A.value>0:A.value>=2)?(e["".concat(s,"Step")]=A,L[s].step=ppValue2OptionValue$1(A)):I=!0));return e}),{});if(I)return e;M.xStart&&!M.xStep&&M.yStart&&!M.yStep?B.push({xStart:M.xStart,xEnd:M.xEnd,y:M.yStart},{xStart:M.xStart,xEnd:M.xEnd,y:M.yEnd},{x:M.xStart,yStart:M.yStart,yEnd:M.yEnd},{x:M.xEnd,yStart:M.yStart,yEnd:M.yEnd}):B.push(M)}if(B.length){A.push(commonSnapOptions(L,D));var F=L.corner||T.corner,$=L.side||T.side,N=L.edge||T.edge,V={gravity:L.gravity||T.gravity,base:L.base||T.base,center:"boolean"==typeof L.center?L.center:T.center,corners:"all"===F?Mn:F.split(" "),sides:"both"===$?Fn:[$],edges:"both"===N?$n:[N]};B.forEach((function(s){["gravity","corners","sides","center","edges","base"].forEach((function(e){s[e]=V[e]})),e.push(s)}))}return e}),[]);B.length&&(O.snap=T,hasChanged$1(B,e.parsedSnapTargets)&&(e.parsedSnapTargets=B,w=!0))}else s.hasOwnProperty("snap")&&e.parsedSnapTargets&&(O.snap=e.parsedSnapTargets=e.snapTargets=void 0);if(s.autoScroll){var L=Xn(s.autoScroll)?s.autoScroll:{target:!0===s.autoScroll?window:s.autoScroll},P={};P.target=isElement$2(L.target)?L.target:window,P.speed=[],(Array.isArray(L.speed)?L.speed:[L.speed]).every((function(e,s){return!!(s<=2&&qn(e))&&(P.speed[s]=e,!0)})),P.speed.length||(P.speed=Nn);var I=Array.isArray(L.sensitivity)?L.sensitivity:[L.sensitivity];P.sensitivity=P.speed.map((function(e,s){return qn(I[s])?I[s]:Vn[s]})),["X","Y"].forEach((function(e){var s="min".concat(e),w="max".concat(e);qn(L[s])&&L[s]>=0&&(P[s]=L[s]),qn(L[w])&&L[w]>=0&&(!P[s]||L[w]>=P[s])&&(P[w]=L[w])})),hasChanged$1(P,O.autoScroll)&&(O.autoScroll=P,w=!0)}else s.hasOwnProperty("autoScroll")&&(O.autoScroll&&(w=!0),O.autoScroll=void 0);if(w&&initBBox$1(e),isElement$2(s.handle)&&s.handle!==O.handle){O.handle&&(O.handle.style.cursor=e.orgCursor,Pn&&(O.handle.style[Pn]=e.orgUserSelect),Un.removeStartHandler(O.handle,e.pointerEventHandlerId));var M=O.handle=s.handle;e.orgCursor=M.style.cursor,setDraggableCursor$1(M,e.orgCursor),Pn&&(e.orgUserSelect=M.style[Pn],M.style[Pn]="none"),Un.addStartHandler(M,e.pointerEventHandlerId)}(qn(s.zIndex)||!1===s.zIndex)&&(O.zIndex=s.zIndex,e===wn&&(e.elementStyle.zIndex=!1===O.zIndex?e.orgZIndex:O.zIndex));var F,$={left:e.elementBBox.left,top:e.elementBBox.top};qn(s.left)&&s.left!==$.left&&($.left=s.left,F=!0),qn(s.top)&&s.top!==$.top&&($.top=s.top,F=!0),F&&move$1(e,$),["onDrag","onMove","onDragStart","onMoveStart","onDragEnd"].forEach((function(w){"function"==typeof s[w]?(O[w]=s[w],e[w]=O[w].bind(e.ins)):s.hasOwnProperty(w)&&null==s[w]&&(O[w]=e[w]=void 0)}))}var uo=function(){function PlainDraggable(e,s){!function _classCallCheck$5(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainDraggable);var w={ins:this,options:{zIndex:9e3},disabled:!1};if(Object.defineProperty(this,"_id",{value:++Zn}),w._id=this._id,Yn[this._id]=w,!isElement$2(e)||e===On)throw new Error("This element is not accepted.");if(s){if(!Xn(s))throw new Error("Invalid options.")}else s={};var C,O,D=!0;if(e instanceof SVGElement&&(C=e.ownerSVGElement)){if(!e.getBBox)throw new Error("This element is not accepted. (SVGLocatable)");if(!e.transform)throw new Error("This element is not accepted. (SVGAnimatedTransformList)");w.svgTransform=e.transform.baseVal.appendItem(C.createSVGTransform()),w.svgPoint=C.createSVGPoint();var A=e.nearestViewportElement||e.viewportElement;w.svgCtmElement=zn?A.appendChild(document.createElementNS(C.namespaceURI,"rect")):A,D=!1,w.initElm=initSvg$1,w.moveElm=moveSvg$1}else{var T=kn.getName("willChange");T&&(D=!1),!s.leftTop&&Ln?(T&&(e.style[T]="transform"),w.initElm=initTranslate$1,w.moveElm=moveTranslate$1):(T&&(e.style[T]="left, top"),w.initElm=initLeftTop$1,w.moveElm=moveLeftTop$1)}(w.element=function initAnim$1(e,s){var w=e.style;w.webkitTapHighlightColor="transparent";var C=kn.getName("boxShadow"),O=window.getComputedStyle(e,"")[C];return O&&"none"!==O||(w[C]="0 0 1px transparent"),s&&Ln&&(w[Ln]="translateZ(0)"),e}(e,D),w.elementStyle=e.style,w.orgZIndex=w.elementStyle.zIndex,Qn&&mClassList$1(e).add(Qn),w.pointerEventHandlerId=Un.regStartHandler((function(e){return function dragStart$1(e,s){return!(e.disabled||e.onDragStart&&!1===e.onDragStart(s)||(wn&&dragEnd$1(wn),setDraggingCursor$1(e.options.handle),On.style.cursor=An||window.getComputedStyle(e.options.handle,"").cursor,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.options.zIndex),Pn&&(On.style[Pn]="none"),eo&&mClassList$1(e.element).add(eo),wn=e,Cn=!1,Gn.left=e.elementBBox.left-(s.clientX+window.pageXOffset),Gn.top=e.elementBBox.top-(s.clientY+window.pageYOffset),0))}(w,e)})),s.containment)||(s.containment=(O=e.parentNode)&&isElement$2(O)?O:On);s.handle||(s.handle=e),_setOptions$4(w,s)}return function _createClass$5(e,s,w){return s&&_defineProperties$5(e.prototype,s),w&&_defineProperties$5(e,w),e}(PlainDraggable,[{key:"remove",value:function remove(){var e=Yn[this._id];this.disabled=!0,Un.unregStartHandler(Un.removeStartHandler(e.options.handle,e.pointerEventHandlerId)),delete Yn[this._id]}},{key:"setOptions",value:function setOptions(e){return Xn(e)&&_setOptions$4(Yn[this._id],e),this}},{key:"position",value:function position(){return initBBox$1(Yn[this._id]),this}},{key:"disabled",get:function get(){return Yn[this._id].disabled},set:function set(e){var s=Yn[this._id];(e=!!e)!==s.disabled&&(s.disabled=e,s.disabled?(s===wn&&dragEnd$1(s),s.options.handle.style.cursor=s.orgCursor,Pn&&(s.options.handle.style[Pn]=s.orgUserSelect),Qn&&mClassList$1(s.element).remove(Qn)):(setDraggableCursor$1(s.options.handle,s.orgCursor),Pn&&(s.options.handle.style[Pn]="none"),Qn&&mClassList$1(s.element).add(Qn)))}},{key:"element",get:function get(){return Yn[this._id].element}},{key:"rect",get:function get(){return copyTree$1(Yn[this._id].elementBBox)}},{key:"left",get:function get(){return Yn[this._id].elementBBox.left},set:function set(e){_setOptions$4(Yn[this._id],{left:e})}},{key:"top",get:function get(){return Yn[this._id].elementBBox.top},set:function set(e){_setOptions$4(Yn[this._id],{top:e})}},{key:"containment",get:function get(){var e=Yn[this._id];return e.containmentIsBBox?ppBBox2OptionObject$1(e.options.containment):e.options.containment},set:function set(e){_setOptions$4(Yn[this._id],{containment:e})}},{key:"snap",get:function get(){return copyTree$1(Yn[this._id].options.snap)},set:function set(e){_setOptions$4(Yn[this._id],{snap:e})}},{key:"autoScroll",get:function get(){return copyTree$1(Yn[this._id].options.autoScroll)},set:function set(e){_setOptions$4(Yn[this._id],{autoScroll:e})}},{key:"handle",get:function get(){return Yn[this._id].options.handle},set:function set(e){_setOptions$4(Yn[this._id],{handle:e})}},{key:"zIndex",get:function get(){return Yn[this._id].options.zIndex},set:function set(e){_setOptions$4(Yn[this._id],{zIndex:e})}},{key:"onDrag",get:function get(){return Yn[this._id].options.onDrag},set:function set(e){_setOptions$4(Yn[this._id],{onDrag:e})}},{key:"onMove",get:function get(){return Yn[this._id].options.onMove},set:function set(e){_setOptions$4(Yn[this._id],{onMove:e})}},{key:"onDragStart",get:function get(){return Yn[this._id].options.onDragStart},set:function set(e){_setOptions$4(Yn[this._id],{onDragStart:e})}},{key:"onMoveStart",get:function get(){return Yn[this._id].options.onMoveStart},set:function set(e){_setOptions$4(Yn[this._id],{onMoveStart:e})}},{key:"onDragEnd",get:function get(){return Yn[this._id].options.onDragEnd},set:function set(e){_setOptions$4(Yn[this._id],{onDragEnd:e})}}],[{key:"draggableCursor",get:function get(){return Kn},set:function set(e){Kn!==e&&(Kn=e,Dn=null,Object.keys(Yn).forEach((function(e){var s=Yn[e];s.disabled||s===wn&&!1!==An||(setDraggableCursor$1(s.options.handle,s.orgCursor),s===wn&&(On.style.cursor=Tn,On.style.cursor=window.getComputedStyle(s.options.handle,"").cursor))})))}},{key:"draggingCursor",get:function get(){return Jn},set:function set(e){Jn!==e&&(Jn=e,An=null,wn&&(setDraggingCursor$1(wn.options.handle),!1===An&&(setDraggableCursor$1(wn.options.handle,wn.orgCursor),On.style.cursor=Tn),On.style.cursor=An||window.getComputedStyle(wn.options.handle,"").cursor))}},{key:"draggableClass",get:function get(){return Qn},set:function set(e){(e=e?e+"":void 0)!==Qn&&(Object.keys(Yn).forEach((function(s){var w=Yn[s];if(!w.disabled){var C=mClassList$1(w.element);Qn&&C.remove(Qn),e&&C.add(e)}})),Qn=e)}},{key:"draggingClass",get:function get(){return eo},set:function set(e){if((e=e?e+"":void 0)!==eo){if(wn){var s=mClassList$1(wn.element);eo&&s.remove(eo),e&&s.add(e)}eo=e}}},{key:"movingClass",get:function get(){return to},set:function set(e){if((e=e?e+"":void 0)!==to){if(wn&&Cn){var s=mClassList$1(wn.element);to&&s.remove(to),e&&s.add(e)}to=e}}}]),PlainDraggable}();Un.addMoveHandler(document,(function(e){if(wn){var s={left:e.clientX+window.pageXOffset+Gn.left,top:e.clientY+window.pageYOffset+Gn.top};if(move$1(wn,s,wn.snapTargets?function(e){var s,w=wn.snapTargets.length,C=!1,O=!1;for(s=0;s<w&&(!C||!O);s++){var D=wn.snapTargets[s];(null==D.gravityXStart||e.left>=D.gravityXStart)&&(null==D.gravityXEnd||e.left<=D.gravityXEnd)&&(null==D.gravityYStart||e.top>=D.gravityYStart)&&(null==D.gravityYEnd||e.top<=D.gravityYEnd)&&(C||null==D.x||(e.left=D.x,C=!0,s=-1),O||null==D.y||(e.top=D.y,O=!0,s=-1))}return e.snapped=C||O,!wn.onDrag||wn.onDrag(e)}:wn.onDrag)){var w={},C=wn.autoScroll;if(C){var O={x:wn.elementBBox.left-window.pageXOffset,y:wn.elementBBox.top-window.pageYOffset};["x","y"].forEach((function(e){if(C[e]){var s=C[e].min,D=C[e].max;C[e].lines.some((function(C){return(-1===C.dir?O[e]<=C.position:O[e]>=C.position)&&(w[e]={dir:C.dir,speed:C.speed/1e3,min:s,max:D},!0)}))}}))}w.x||w.y?(no.move(C.target,w,C.isWindow?scrollXYWindow$1:scrollXYElement$1),s.autoScroll=!0):no.stop(),Cn||(Cn=!0,to&&mClassList$1(wn.element).add(to),wn.onMoveStart&&wn.onMoveStart(s)),wn.onMove&&wn.onMove(s)}}}));{function endHandler(){wn&&dragEnd$1(wn)}Un.addEndHandler(document,endHandler),Un.addCancelHandler(document,endHandler)}{function initDoc(){Bn=kn.getName("transitionProperty"),Ln=kn.getName("transform"),Tn=On.style.cursor,(Pn=kn.getName("userSelect"))&&(In=On.style[Pn]);var e,s={};function checkInitBBox(e,s){e.initElm&&initBBox$1(e,s)}var w=!1,C=rn((function(C){w||(w=!0,wn&&(checkInitBBox(wn,C.type),Un.move(),s[wn._id]=!0),clearTimeout(e),e=setTimeout((function(){!function initAll(w){clearTimeout(e),Object.keys(Yn).forEach((function(e){s[e]||checkInitBBox(Yn[e],w)})),s={}}(C.type)}),200),w=!1)}));window.addEventListener("resize",C,!0),window.addEventListener("scroll",C,!0)}(On=document.body)?initDoc():document.addEventListener("DOMContentLoaded",(function(){On=document.body,initDoc()}),!0)}class Layout{constructor(e={}){if(!e.name)throw Error("Layout name is not given");this.name=e.name,this.enterHandler=e.enterHandler,this.leaveHandler=e.leaveHandler}valueOf=()=>this.name}
+/*! LeaderLine v1.0.7 (c) anseki https://anseki.github.io/leader-line/ */
+var po=function(){var e,s,w,C,O,D,A,T,B,L,P,I,M,F,$,N,V,R,H,z,W,j,X,q="leader-line",Y={top:1,right:2,bottom:3,left:4},G={straight:1,arc:2,fluid:3,magnet:4,grid:5},U="behind",Z=q+"-defs",K={disc:{elmId:"leader-line-disc",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},square:{elmId:"leader-line-square",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},arrow1:{elmId:"leader-line-arrow1",bBox:{left:-8,top:-8,width:16,height:16,right:8,bottom:8},widthR:4,heightR:4,bCircle:8,sideLen:8,backLen:8,overhead:8,outlineBase:2,outlineMax:1.5},arrow2:{elmId:"leader-line-arrow2",bBox:{left:-7,top:-8,width:11,height:16,right:4,bottom:8},widthR:2.75,heightR:4,bCircle:8,sideLen:8,backLen:7,overhead:4,outlineBase:1,outlineMax:1.75},arrow3:{elmId:"leader-line-arrow3",bBox:{left:-4,top:-5,width:12,height:10,right:8,bottom:5},widthR:3,heightR:2.5,bCircle:8,sideLen:5,backLen:4,overhead:8,outlineBase:1,outlineMax:2.5},hand:{elmId:"leader-line-hand",bBox:{left:-3,top:-12,width:40,height:24,right:37,bottom:12},widthR:10,heightR:6,bCircle:37,sideLen:12,backLen:3,overhead:37},crosshair:{elmId:"leader-line-crosshair",noRotate:!0,bBox:{left:-96,top:-96,width:192,height:192,right:96,bottom:96},widthR:48,heightR:48,bCircle:96,sideLen:96,backLen:96,overhead:0}},J={behind:U,disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},Q={disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},ee=[1,2,3,4],te="auto",ne={x:"left",y:"top",width:"width",height:"height"},oe=10,re=30,ie=.5522847,ae=.25*Math.PI,se=/^\s*(\-?[\d\.]+)\s*(\%)?\s*$/,le="http://www.w3.org/2000/svg",ce=!(ve="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled)&&!!document.uniqueID,ue="MozAppearance"in document.documentElement.style,de=!(ve||ue||!window.chrome||!window.CSS),pe=!(ve||ce||ue||de||window.chrome||!("WebkitAppearance"in document.documentElement.style)),he=ce||ve?.2:.1,fe={path:3,lineColor:"coral",lineSize:4,plugSE:[U,"arrow1"],plugSizeSE:[1,1],lineOutlineEnabled:!1,lineOutlineColor:"indianred",lineOutlineSize:.25,plugOutlineEnabledSE:[!1,!1],plugOutlineSizeSE:[1,1]},me=(W={}.toString,j={}.hasOwnProperty.toString,X=j.call(Object),function(e){return e&&"[object Object]"===W.call(e)&&(!(e=Object.getPrototypeOf(e))||(e=e.hasOwnProperty("constructor")&&e.constructor)&&"function"==typeof e&&j.call(e)===X)}),ge=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},ye=(F={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},$=1e3/60/2,N=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,$)},V=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){clearTimeout(e)},R=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},H=[],z=0,{add:function(e,s,w,C,O,D,A){var T,B,L,P,I,M,N,V,R,W,j=++z;function g(s,w){return{value:e(w),timeRatio:s,outputRatio:w}}if("string"==typeof O&&(O=F[O]),e=e||function(){},w<$)T=[g(0,0),g(1,1)];else{if(B=$/w,T=[g(0,0)],0===O[0]&&0===O[1]&&1===O[2]&&1===O[3])for(P=B;P<=1;P+=B)T.push(g(P,P));else for(I=L=(P=B)/10;I<=1;I+=L)I,W=void 0,V=(W=I*I)*I,W*=3*(R=1-I),P<=(M={x:(N=R*R*3*I)*O[0]+W*O[2]+V,y:N*O[1]+W*O[3]+V}).x&&(T.push(g(M.x,M.y)),P+=B);T.push(g(1,1))}return H.push(D={animId:j,frameCallback:s,duration:w,count:C,frames:T,reverse:!!D}),!1!==A&&be(D,A),j},remove:function(e){var s;H.some((function(w,C){return w.animId===e&&(s=C,!(w.framesStart=null))}))&&H.splice(s,1)},start:function(e,s,w){H.some((function(C){return C.animId===e&&(C.reverse=!!s,be(C,w),!0)}))},stop:function(e,s){var w;return H.some((function(C){return C.animId===e&&(s?null!=C.lastFrame&&(w=C.frames[C.lastFrame].timeRatio):(w=(Date.now()-C.framesStart)/C.duration,(w=C.reverse?1-w:w)<0?w=0:1<w&&(w=1)),!(C.framesStart=null))})),w},validTiming:function(e){return"string"==typeof e?F[e]:Array.isArray(e)&&[0,1,2,3].every((function(s){return R(e[s])&&0<=e[s]&&e[s]<=1}))?[e[0],e[1],e[2],e[3]]:null}}),ve=(I={},Ee.m=P=[function(e,s,w){w.r(s);var C=[],O=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)},D=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},A=Date.now(),T=void 0;function u(){var e=void 0,s=void 0;T&&(D.call(window,T),T=null),C.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(A=Date.now(),s=!0):Date.now()-A<500&&(s=!0),s&&(T=O.call(window,u))}function h(e){var s=-1;return C.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}s.default={add:function(e){var s=void 0;return-1===h(e)?(C.push(s={listener:e}),function(e){s.event=e,T||u()}):null},remove:function(e){-1<(e=h(e))&&(C.splice(e,1),!C.length&&T&&(D.call(window,T),T=null))}}}],Ee.c=I,Ee.d=function(e,s,w){Ee.o(e,s)||Object.defineProperty(e,s,{enumerable:!0,get:w})},Ee.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},Ee.t=function(e,s){if(1&s&&(e=Ee(e)),8&s)return e;if(4&s&&"object"==typeof e&&e&&e.__esModule)return e;var w=Object.create(null);if(Ee.r(w),Object.defineProperty(w,"default",{enumerable:!0,value:e}),2&s&&"string"!=typeof e)for(var C in e)Ee.d(w,C,function(s){return e[s]}.bind(null,C));return w},Ee.n=function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return Ee.d(s,"a",s),s},Ee.o=function(e,s){return Object.prototype.hasOwnProperty.call(e,s)},Ee.p="",Ee(Ee.s=0).default),_e={line_altColor:{iniValue:!1},line_color:{},line_colorTra:{iniValue:!1},line_strokeWidth:{},plug_enabled:{iniValue:!1},plug_enabledSE:{hasSE:!0,iniValue:!1},plug_plugSE:{hasSE:!0,iniValue:U},plug_colorSE:{hasSE:!0},plug_colorTraSE:{hasSE:!0,iniValue:!1},plug_markerWidthSE:{hasSE:!0},plug_markerHeightSE:{hasSE:!0},lineOutline_enabled:{iniValue:!1},lineOutline_color:{},lineOutline_colorTra:{iniValue:!1},lineOutline_strokeWidth:{},lineOutline_inStrokeWidth:{},plugOutline_enabledSE:{hasSE:!0,iniValue:!1},plugOutline_plugSE:{hasSE:!0,iniValue:U},plugOutline_colorSE:{hasSE:!0},plugOutline_colorTraSE:{hasSE:!0,iniValue:!1},plugOutline_strokeWidthSE:{hasSE:!0},plugOutline_inStrokeWidthSE:{hasSE:!0},position_socketXYSE:{hasSE:!0,hasProps:!0},position_plugOverheadSE:{hasSE:!0},position_path:{},position_lineStrokeWidth:{},position_socketGravitySE:{hasSE:!0},path_pathData:{},path_edge:{hasProps:!0},viewBox_bBox:{hasProps:!0},viewBox_plugBCircleSE:{hasSE:!0},lineMask_enabled:{iniValue:!1},lineMask_outlineMode:{iniValue:!1},lineMask_x:{},lineMask_y:{},lineOutlineMask_x:{},lineOutlineMask_y:{},maskBGRect_x:{},maskBGRect_y:{},capsMaskAnchor_enabledSE:{hasSE:!0,iniValue:!1},capsMaskAnchor_pathDataSE:{hasSE:!0},capsMaskAnchor_strokeWidthSE:{hasSE:!0},capsMaskMarker_enabled:{iniValue:!1},capsMaskMarker_enabledSE:{hasSE:!0,iniValue:!1},capsMaskMarker_plugSE:{hasSE:!0,iniValue:U},capsMaskMarker_markerWidthSE:{hasSE:!0},capsMaskMarker_markerHeightSE:{hasSE:!0},caps_enabled:{iniValue:!1},attach_plugSideLenSE:{hasSE:!0},attach_plugBackLenSE:{hasSE:!0}},Se={show_on:{},show_effect:{},show_animOptions:{},show_animId:{},show_inAnim:{}},st="fade",ct=[],ut={},dt=0,pt={},ht=0;function Ee(e){if(I[e])return I[e].exports;var s=I[e]={i:e,l:!1,exports:{}};return P[e].call(s.exports,s,s.exports,Ee),s.l=!0,s.exports}function xe(){var e=Date.now(),s=!1;M&&(V.call(window,M),M=null),H.forEach((function(w){var C,O,D;if(w.framesStart){if((C=e-w.framesStart)>=w.duration&&w.count&&w.loopsLeft<=1)return D=w.frames[w.lastFrame=w.reverse?0:w.frames.length-1],w.frameCallback(D.value,!0,D.timeRatio,D.outputRatio),void(w.framesStart=null);if(C>w.duration){if(O=Math.floor(C/w.duration),w.count){if(O>=w.loopsLeft)return D=w.frames[w.lastFrame=w.reverse?0:w.frames.length-1],w.frameCallback(D.value,!0,D.timeRatio,D.outputRatio),void(w.framesStart=null);w.loopsLeft-=O}w.framesStart+=w.duration*O,C=e-w.framesStart}w.reverse&&(C=w.duration-C),D=w.frames[w.lastFrame=Math.round(C/$)],!1!==w.frameCallback(D.value,!1,D.timeRatio,D.outputRatio)?s=!0:w.framesStart=null}})),s&&(M=N.call(window,xe))}function be(e,s){e.framesStart=Date.now(),null!=s&&(e.framesStart-=e.duration*(e.reverse?1-s:s)),e.loopsLeft=e.count,e.lastFrame=null,xe()}function ke(e,s){var w,C;return typeof e!=typeof s||(w=me(e)?"obj":Array.isArray(e)?"array":"")!=(me(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?ke(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return ke(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return ke(e,s[w])})):e!==s)}function we(e){return e&&(me(e)?Object.keys(e).reduce((function(s,w){return s[w]=we(e[w]),s}),{}):Array.isArray(e)?e.map(we):e)}function Oe(e){var s,w,C,O=1,D=e=(e+"").trim();function l(e){var s=1;return(e=se.exec(e))&&(s=parseFloat(e[1]),e[2]?s=0<=s&&s<=100?s/100:1:(s<0||1<s)&&(s=1)),s}return(s=/^(rgba|hsla|hwb|gray|device\-cmyk)\s*\(([\s\S]+)\)$/i.exec(e))?(w=s[1].toLowerCase(),C=s[2].trim().split(/\s*,\s*/),"rgba"===w&&4===C.length?(O=l(C[3]),D="rgb("+C.slice(0,3).join(", ")+")"):"hsla"===w&&4===C.length?(O=l(C[3]),D="hsl("+C.slice(0,3).join(", ")+")"):"hwb"===w&&4===C.length?(O=l(C[3]),D="hwb("+C.slice(0,3).join(", ")+")"):"gray"===w&&2===C.length?(O=l(C[1]),D="gray("+C[0]+")"):"device-cmyk"===w&&5<=C.length&&(O=l(C[4]),D="device-cmyk("+C.slice(0,4).join(", ")+")")):(s=/^\#(?:([\da-f]{6})([\da-f]{2})|([\da-f]{3})([\da-f]))$/i.exec(e))?D=s[1]?(O=parseInt(s[2],16)/255,"#"+s[1]):(O=parseInt(s[4]+s[4],16)/255,"#"+s[3]):"transparent"===e.toLocaleLowerCase()&&(O=0),[O,D]}function Me(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect)}function Ie(e,s){var w,C,O,D={};if(!(O=e.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(e.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_DISCONNECTED)return console.error("A disconnected element was passed."),null;for(C in w=e.getBoundingClientRect())D[C]=w[C];if(!s){if(!(O=O.defaultView))return console.error("Cannot get window that contains the element."),null;D.left+=O.pageXOffset,D.right+=O.pageXOffset,D.top+=O.pageYOffset,D.bottom+=O.pageYOffset}return D}function Ce(e,s){var w,C=[],O=e;for(s=s||window;;){if(!(w=O.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(!(w=w.defaultView))return console.error("Cannot get window that contains the element."),null;if(w===s)break;if(!(O=w.frameElement))return console.error("`baseWindow` was not found."),null;C.unshift(O)}return C}function Le(e,s){var w=0,C=0;return(s=Ce(e,s=s||window))?s.length?(s.forEach((function(e,s){var O=Ie(e,0<s);w+=O.left,C+=O.top,e=(s=e).ownerDocument.defaultView.getComputedStyle(s,""),O={left:s.clientLeft+parseFloat(e.paddingLeft),top:s.clientTop+parseFloat(e.paddingTop)},w+=O.left,C+=O.top})),(s=Ie(e,!0)).left+=w,s.right+=w,s.top+=C,s.bottom+=C,s):Ie(e):null}function Ae(e,s){var w=e.x-s.x;s=e.y-s.y;return Math.sqrt(w*w+s*s)}function Ve(e,s,w){var C=s.x-e.x;s=s.y-e.y;return{x:e.x+C*w,y:e.y+s*w,angle:Math.atan2(s,C)/(Math.PI/180)}}function Pe(e,s,w){return e=Math.atan2(e.y-s.y,s.x-e.x),{x:s.x+Math.cos(e)*w,y:s.y+Math.sin(e)*w*-1}}function Ne(e,s,w,C,O){var D=(M=O*O)*O,A=1-O,T=(P=(I=A*A)*A)*e.x+3*I*O*s.x+3*A*M*w.x+D*C.x,B=P*e.y+3*I*O*s.y+3*A*M*w.y+D*C.y,L=e.x+2*O*(s.x-e.x)+M*(w.x-2*s.x+e.x),P=e.y+2*O*(s.y-e.y)+M*(w.y-2*s.y+e.y),I=s.x+2*O*(w.x-s.x)+M*(C.x-2*w.x+s.x),M=(D=s.y+2*O*(w.y-s.y)+M*(C.y-2*w.y+s.y),A*e.x+O*s.x);e=A*e.y+O*s.y,s=A*w.x+O*C.x,O=A*w.y+O*C.y,C=90-180*Math.atan2(L-I,P-D)/Math.PI;return{x:T,y:B,fromP2:{x:L,y:P},toP1:{x:I,y:D},fromP1:{x:M,y:e},toP2:{x:s,y:O},angle:C+=180<C?-180:180}}function Te(e,s,w,C,O){function l(e,s,w,C,O){return e*(e*(-3*s+9*w-9*C+3*O)+6*s-12*w+6*C)-3*s+3*w}var D,A,T=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],B=0,L=(O=null==O||1<O?1:O<0?0:O)/2;return[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816].forEach((function(O,P){D=l(A=L*O+L,e.x,s.x,w.x,C.x),A=l(A,e.y,s.y,w.y,C.y),A=D*D+A*A,B+=T[P]*Math.sqrt(A)})),L*B}function We(e,s,w,C,O){for(var D,A=.5,T=1-A;D=Te(e,s,w,C,T),!(Math.abs(D-O)<=.01);)T+=(D<O?1:-1)*(A/=2);return T}function Be(e,s){var w;return e.forEach((function(e){e=s?e.map((function(e){return e={x:e.x,y:e.y},s(e),e})):e,(w=w||[{type:"M",values:[e[0].x,e[0].y]}]).push(e.length?2===e.length?{type:"L",values:[e[1].x,e[1].y]}:{type:"C",values:[e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y]}:{type:"Z",values:[]})})),w}function Re(e){var s=[],w=0;return e.forEach((function(e){e=(2===e.length?Ae:Te).apply(null,e),s.push(e),w+=e})),{segsLen:s,lenAll:w}}function Fe(e,s){return null==e||null==s||e.length!==s.length||e.some((function(e,w){var C=s[w];return e.type!==C.type||e.values.some((function(e,s){return e!==C.values[s]}))}))}function Ge(e,s,w){e.events[s]?e.events[s].indexOf(w)<0&&e.events[s].push(w):e.events[s]=[w]}function De(e,s,w){var C;e.events[s]&&-1<(C=e.events[s].indexOf(w))&&e.events[s].splice(C,1)}function ze(e){A&&clearTimeout(A),ct.push(e),A=setTimeout((function(){ct.forEach((function(e){e()})),ct=[]}),0)}function je(e,s){e.reflowTargets.indexOf(s)<0&&e.reflowTargets.push(s)}function He(e){e.reflowTargets.forEach((function(e){var s;s=e,setTimeout((function(){var e=s.parentNode,w=s.nextSibling;e.insertBefore(e.removeChild(s),w)}),0)})),e.reflowTargets=[]}function Ue(e,s,w,C,O,D,A){var B;"auto-start-reverse"===w?("boolean"!=typeof T&&(s.setAttribute("orient","auto-start-reverse"),T=s.orientType.baseVal===SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN),T?s.setAttribute("orient",w):((B=O.createSVGTransform()).setRotate(180,0,0),D.transform.baseVal.appendItem(B),s.setAttribute("orient","auto"),B=!0)):(s.setAttribute("orient",w),!1===T&&D.transform.baseVal.clear()),s=s.viewBox.baseVal,B?(s.x=-C.right,s.y=-C.bottom):(s.x=C.left,s.y=C.top),s.width=C.width,s.height=C.height,ce&&je(e,A)}function Ze(e,s){return{prop:e?"markerEnd":"markerStart",orient:s?s.noRotate?"0":e?"auto":"auto-start-reverse":null}}function Ye(e,s){Object.keys(s).forEach((function(w){var C=s[w];e[w]=null!=C.iniValue?C.hasSE?[C.iniValue,C.iniValue]:C.iniValue:C.hasSE?C.hasProps?[{},{}]:[]:C.hasProps?{}:null}))}function Xe(e,s,w,C,O){return C!==s[w]&&(s[w]=C,O&&O.forEach((function(s){s(e,C,w)})),!0)}function qe(e){function t(e,s){return e+parseFloat(s)}var s=e.document,w=e.getComputedStyle(s.documentElement,"");e=e.getComputedStyle(s.body,""),s={x:0,y:0};return"static"!==e.position?(s.x-=[w.marginLeft,w.borderLeftWidth,w.paddingLeft,e.marginLeft,e.borderLeftWidth].reduce(t,0),s.y-=[w.marginTop,w.borderTopWidth,w.paddingTop,e.marginTop,e.borderTopWidth].reduce(t,0)):"static"!==w.position&&(s.x-=[w.marginLeft,w.borderLeftWidth].reduce(t,0),s.y-=[w.marginTop,w.borderTopWidth].reduce(t,0)),s}function Qe(e){var s,w=e.document;w.getElementById(Z)||(s=(new e.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="leader-line-defs"><style><![CDATA[.leader-line{position:absolute;overflow:visible!important;pointer-events:none!important;font-size:16px}#leader-line-defs{width:0;height:0;position:absolute;left:0;top:0}.leader-line-line-path{fill:none}.leader-line-mask-bg-rect{fill:white}.leader-line-caps-mask-anchor,.leader-line-caps-mask-marker-shape{fill:black}.leader-line-caps-mask-anchor{stroke:black}.leader-line-caps-mask-line,.leader-line-plugs-face{stroke:rgba(0,0,0,0)}.leader-line-line-mask-shape{stroke:white}.leader-line-line-outline-mask-shape{stroke:black}.leader-line-plug-mask-shape{fill:white;stroke:black}.leader-line-plug-outline-mask-shape{fill:black;stroke:white}.leader-line-areaAnchor{position:absolute;overflow:visible!important}]]></style><defs><circle id="leader-line-disc" cx="0" cy="0" r="5"/><rect id="leader-line-square" x="-5" y="-5" width="10" height="10"/><polygon id="leader-line-arrow1" points="-8,-8 8,0 -8,8 -5,0"/><polygon id="leader-line-arrow2" points="-4,-8 4,0 -4,8 -7,5 -2,0 -7,-5"/><polygon id="leader-line-arrow3" points="-4,-5 8,0 -4,5"/><g id="leader-line-hand"><path style="fill: #fcfcfc" d="M9.19 11.14h4.75c1.38 0 2.49-1.11 2.49-2.49 0-.51-.15-.98-.41-1.37h1.3c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.53-2.49-2.53h1.02c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49h14.96c1.37 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49H16.58C16-9.86 14.28-11.14 9.7-11.14c-4.79 0-6.55 3.42-7.87 4.73H-2.14v13.23h3.68C3.29 9.97 5.47 11.14 9.19 11.14L9.19 11.14Z"/><path style="fill: black" d="M13.95 12c1.85 0 3.35-1.5 3.35-3.35 0-.17-.02-.34-.04-.51h.07c1.85 0 3.35-1.5 3.35-3.35 0-.79-.27-1.51-.72-2.08 1.03-.57 1.74-1.67 1.74-2.93 0-.59-.16-1.15-.43-1.63h12.04c1.85 0 3.35-1.5 3.35-3.35 0-1.85-1.5-3.35-3.35-3.35H17.2C16.26-10.93 13.91-12 9.7-12 5.36-12 3.22-9.4 1.94-7.84c0 0-.29.33-.5.57-.63 0-3.58 0-3.58 0C-2.61-7.27-3-6.88-3-6.41v13.23c0 .47.39.86.86.86 0 0 2.48 0 3.2 0C2.9 10.73 5.29 12 9.19 12L13.95 12ZM9.19 10.28c-3.46 0-5.33-1.05-6.9-3.87-.15-.27-.44-.44-.75-.44 0 0-1.81 0-2.82 0V-5.55c1.06 0 3.11 0 3.11 0 .25 0 .44-.06.61-.25l.83-.95c1.23-1.49 2.91-3.53 6.43-3.53 3.45 0 4.9.74 5.57 1.72h-4.3c-.48 0-.86.38-.86.86s.39.86.86.86h22.34c.9 0 1.63.73 1.63 1.63 0 .9-.73 1.63-1.63 1.63H15.83c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.52c.9 0 1.63.73 1.63 1.63s-.73 1.63-1.63 1.63h-3.12c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.11c.88 0 1.63.76 1.63 1.67 0 .9-.73 1.63-1.63 1.63h-3.2c-.48 0-.86.39-.86.86 0 .47.39.86.86.86h1.36c.05.16.09.34.09.51 0 .9-.73 1.63-1.63 1.63C13.95 10.28 9.19 10.28 9.19 10.28Z"/></g><g id="leader-line-crosshair"><path d="M0-78.97c-43.54 0-78.97 35.43-78.97 78.97 0 43.54 35.43 78.97 78.97 78.97s78.97-35.43 78.97-78.97C78.97-43.54 43.55-78.97 0-78.97ZM76.51-1.21h-9.91v-9.11h-2.43v9.11h-11.45c-.64-28.12-23.38-50.86-51.5-51.5V-64.17h9.11V-66.6h-9.11v-9.91C42.46-75.86 75.86-42.45 76.51-1.21ZM-1.21-30.76h-9.11v2.43h9.11V-4.2c-1.44.42-2.57 1.54-2.98 2.98H-28.33v-9.11h-2.43v9.11H-50.29C-49.65-28-27.99-49.65-1.21-50.29V-30.76ZM-30.76 1.21v9.11h2.43v-9.11H-4.2c.42 1.44 1.54 2.57 2.98 2.98v24.13h-9.11v2.43h9.11v19.53C-27.99 49.65-49.65 28-50.29 1.21H-30.76ZM1.22 30.75h9.11v-2.43h-9.11V4.2c1.44-.42 2.56-1.54 2.98-2.98h24.13v9.11h2.43v-9.11h19.53C49.65 28 28 49.65 1.22 50.29V30.75ZM30.76-1.21v-9.11h-2.43v9.11H4.2c-.42-1.44-1.54-2.56-2.98-2.98V-28.33h9.11v-2.43h-9.11V-50.29C28-49.65 49.65-28 50.29-1.21H30.76ZM-1.21-76.51v9.91h-9.11v2.43h9.11v11.45c-28.12.64-50.86 23.38-51.5 51.5H-64.17v-9.11H-66.6v9.11h-9.91C-75.86-42.45-42.45-75.86-1.21-76.51ZM-76.51 1.21h9.91v9.11h2.43v-9.11h11.45c.64 28.12 23.38 50.86 51.5 51.5v11.45h-9.11v2.43h9.11v9.91C-42.45 75.86-75.86 42.45-76.51 1.21ZM1.22 76.51v-9.91h9.11v-2.43h-9.11v-11.45c28.12-.64 50.86-23.38 51.5-51.5h11.45v9.11h2.43v-9.11h9.91C75.86 42.45 42.45 75.86 1.22 76.51Z"/><path d="M0 83.58-7.1 96 7.1 96Z"/><path d="M0-83.58 7.1-96-7.1-96"/><path d="M83.58 0 96 7.1 96-7.1Z"/><path d="M-83.58 0-96-7.1-96 7.1Z"/></g></defs></svg>',"image/svg+xml"),w.body.appendChild(s.documentElement),function(e){e.SVGPathElement.prototype.getPathData&&e.SVGPathElement.prototype.setPathData||function(){function i(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()}var s={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},w=-1!==e.navigator.userAgent.indexOf("MSIE ");function n(e){if(!e||0===e.length)return[];var s=new i(e),w=[];if(s.initialCommandIsMoveTo())for(;s.hasMoreData();){var C=s.parseSegment();if(null===C)break;w.push(C)}return w}function l(e){return e.map((function(e){return{type:e.type,values:Array.prototype.slice.call(e.values)}}))}function r(e){var s=[],w=null,C=null,O=null,D=null,A=null,T=null,B=null;return e.forEach((function(e){var L,P,I,M,F,$,N,V;"M"===e.type?(N=e.values[0],V=e.values[1],s.push({type:"M",values:[N,V]}),D=T=N,A=B=V):"C"===e.type?(F=e.values[0],$=e.values[1],L=e.values[2],P=e.values[3],N=e.values[4],V=e.values[5],s.push({type:"C",values:[F,$,L,P,N,V]}),C=L,O=P,D=N,A=V):"L"===e.type?(N=e.values[0],V=e.values[1],s.push({type:"L",values:[N,V]}),D=N,A=V):"H"===e.type?(N=e.values[0],s.push({type:"L",values:[N,A]}),D=N):"V"===e.type?(V=e.values[0],s.push({type:"L",values:[D,V]}),A=V):"S"===e.type?(L=e.values[0],P=e.values[1],N=e.values[2],V=e.values[3],M="C"===w||"S"===w?(I=D+(D-C),A+(A-O)):(I=D,A),s.push({type:"C",values:[I,M,L,P,N,V]}),C=L,O=P,D=N,A=V):"T"===e.type?(N=e.values[0],V=e.values[1],$="Q"===w||"T"===w?(F=D+(D-C),A+(A-O)):(F=D,A),s.push({type:"C",values:[I=D+2*(F-D)/3,M=A+2*($-A)/3,N+2*(F-N)/3,V+2*($-V)/3,N,V]}),C=F,O=$,D=N,A=V):"Q"===e.type?(F=e.values[0],$=e.values[1],N=e.values[2],V=e.values[3],s.push({type:"C",values:[I=D+2*(F-D)/3,M=A+2*($-A)/3,N+2*(F-N)/3,V+2*($-V)/3,N,V]}),C=F,O=$,D=N,A=V):"A"===e.type?(P=e.values[0],I=e.values[1],M=e.values[2],F=e.values[3],$=e.values[4],N=e.values[5],V=e.values[6],0===P||0===I?(s.push({type:"C",values:[D,A,N,V,N,V]}),D=N,A=V):D===N&&A===V||b(D,A,N,V,P,I,M,F,$).forEach((function(e){s.push({type:"C",values:e}),D=N,A=V}))):"Z"===e.type&&(s.push(e),D=T,A=B),w=e.type})),s}i.prototype={parseSegment:function(){var e=this._string[this._currentIndex],w=s[e]||null;if(null===w){if(null===this._prevCommand)return null;if(null===(w=("+"===e||"-"===e||"."===e||"0"<=e&&e<="9")&&"Z"!==this._prevCommand?"M"===this._prevCommand?"L":"m"===this._prevCommand?"l":this._prevCommand:null))return null}else this._currentIndex+=1;var C=null;return"H"===(e=(this._prevCommand=w).toUpperCase())||"V"===e?C=[this._parseNumber()]:"M"===e||"L"===e||"T"===e?C=[this._parseNumber(),this._parseNumber()]:"S"===e||"Q"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"C"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"A"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:"Z"===e&&(this._skipOptionalSpaces(),C=[]),null===C||0<=C.indexOf(null)?null:{type:w,values:C}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var e=this._string[this._currentIndex];return s[e]||null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var e=this.peekSegmentType();return"M"===e||"m"===e},_isCurrentSpace:function(){var e=this._string[this._currentIndex];return e<=" "&&(" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e)},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!==this._string[this._currentIndex])&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","===this._string[this._currentIndex]&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var e=0,s=0,w=1,C=0,O=1,D=1,A=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"===this._string[this._currentIndex]?this._currentIndex+=1:this._currentIndex<this._endIndex&&"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,O=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])&&"."!==this._string[this._currentIndex])return null;for(var T=this._currentIndex;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==T)for(var B=this._currentIndex-1,L=1;T<=B;)s+=L*(this._string[B]-"0"),--B,L*=10;if(this._currentIndex<this._endIndex&&"."===this._string[this._currentIndex]){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)w*=10,C+=(this._string.charAt(this._currentIndex)-"0")/w,this._currentIndex+=1}if(this._currentIndex!==A&&this._currentIndex+1<this._endIndex&&("e"===this._string[this._currentIndex]||"E"===this._string[this._currentIndex])&&"x"!==this._string[this._currentIndex+1]&&"m"!==this._string[this._currentIndex+1]){if(this._currentIndex+=1,"+"===this._string[this._currentIndex]?this._currentIndex+=1:"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,D=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)e*=10,e+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var P=s+C;return P*=O,e&&(P*=Math.pow(10,D*e)),A===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),P)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var e=null,s=this._string[this._currentIndex];if(this._currentIndex+=1,"0"===s)e=0;else{if("1"!==s)return null;e=1}return this._skipOptionalSpacesOrDelimiter(),e}};var C=e.SVGPathElement.prototype.setAttribute,O=e.SVGPathElement.prototype.removeAttribute,D=e.Symbol?e.Symbol():"__cachedPathData",A=e.Symbol?e.Symbol():"__cachedNormalizedPathData",b=function(e,s,w,C,O,D,A,T,B,L){function h(e,s,w){return{x:e*Math.cos(w)-s*Math.sin(w),y:e*Math.sin(w)+s*Math.cos(w)}}var P=Math.PI*A/180,I=[];L?(H=L[0],z=L[1],V=L[2],R=L[3]):(e=(N=h(e,s,-P)).x,s=N.y,1<(N=($=(e-(w=(F=h(w,C,-P)).x))/2)*$/(O*O)+(M=(s-(C=F.y))/2)*M/(D*D))&&(O*=N=Math.sqrt(N),D*=N),F=O*O,N=D*D,V=(F=(T===B?-1:1)*Math.sqrt(Math.abs((F*N-F*M*M-N*$*$)/(F*M*M+N*$*$))))*O*M/D+(e+w)/2,R=F*-D*$/O+(s+C)/2,H=Math.asin(parseFloat(((s-R)/D).toFixed(9))),z=Math.asin(parseFloat(((C-R)/D).toFixed(9))),e<V&&(H=Math.PI-H),w<V&&(z=Math.PI-z),H<0&&(H=2*Math.PI+H),z<0&&(z=2*Math.PI+z),B&&z<H&&(H-=2*Math.PI),!B&&H<z&&(z-=2*Math.PI));var M,F,$,N=z-H;Math.abs(N)>120*Math.PI/180&&(M=z,F=w,$=C,z=B&&H<z?H+120*Math.PI/180*1:H+120*Math.PI/180*-1,w=V+O*Math.cos(z),C=R+D*Math.sin(z),I=b(w,C,F,$,O,D,A,0,B,[z,M,V,R])),N=z-H;var V=Math.cos(H),R=Math.sin(H),H=Math.cos(z),z=Math.sin(z);if(H=[w+(O=4/3*O*(N=Math.tan(N/4)))*z,C-(D=4/3*D*N)*H],C=[w,C],(V=[e+O*R,s-D*V])[0]=2*(N=[e,s])[0]-V[0],V[1]=2*N[1]-V[1],L)return[V,H,C].concat(I);I=[V,H,C].concat(I).join().split(",");var W=[],j=[];return I.forEach((function(e,s){s%2?j.push(h(I[s-1],I[s],P).y):j.push(h(I[s],I[s+1],P).x),6===j.length&&(W.push(j),j=[])})),W};e.SVGPathElement.prototype.setAttribute=function(e,s){"d"===e&&(this[D]=null,this[A]=null),C.call(this,e,s)},e.SVGPathElement.prototype.removeAttribute=function(e,s){"d"===e&&(this[D]=null,this[A]=null),O.call(this,e)},e.SVGPathElement.prototype.getPathData=function(e){if(e&&e.normalize)return this[A]?l(this[A]):(this[D]?B=l(this[D]):(B=n(this.getAttribute("d")||""),this[D]=l(B)),e=r((s=[],T=O=C=w=null,B.forEach((function(e){var D,A,B,L,P,I,M=e.type;"M"===M?(P=e.values[0],I=e.values[1],s.push({type:"M",values:[P,I]}),w=O=P,C=T=I):"m"===M?(P=w+e.values[0],I=C+e.values[1],s.push({type:"M",values:[P,I]}),w=O=P,C=T=I):"L"===M?(P=e.values[0],I=e.values[1],s.push({type:"L",values:[P,I]}),w=P,C=I):"l"===M?(P=w+e.values[0],I=C+e.values[1],s.push({type:"L",values:[P,I]}),w=P,C=I):"C"===M?(D=e.values[0],A=e.values[1],B=e.values[2],L=e.values[3],P=e.values[4],I=e.values[5],s.push({type:"C",values:[D,A,B,L,P,I]}),w=P,C=I):"c"===M?(D=w+e.values[0],A=C+e.values[1],B=w+e.values[2],L=C+e.values[3],P=w+e.values[4],I=C+e.values[5],s.push({type:"C",values:[D,A,B,L,P,I]}),w=P,C=I):"Q"===M?(D=e.values[0],A=e.values[1],P=e.values[2],I=e.values[3],s.push({type:"Q",values:[D,A,P,I]}),w=P,C=I):"q"===M?(D=w+e.values[0],A=C+e.values[1],P=w+e.values[2],I=C+e.values[3],s.push({type:"Q",values:[D,A,P,I]}),w=P,C=I):"A"===M?(P=e.values[5],I=e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],P,I]}),w=P,C=I):"a"===M?(P=w+e.values[5],I=C+e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],P,I]}),w=P,C=I):"H"===M?(P=e.values[0],s.push({type:"H",values:[P]}),w=P):"h"===M?(P=w+e.values[0],s.push({type:"H",values:[P]}),w=P):"V"===M?(I=e.values[0],s.push({type:"V",values:[I]}),C=I):"v"===M?(I=C+e.values[0],s.push({type:"V",values:[I]}),C=I):"S"===M?(B=e.values[0],L=e.values[1],P=e.values[2],I=e.values[3],s.push({type:"S",values:[B,L,P,I]}),w=P,C=I):"s"===M?(B=w+e.values[0],L=C+e.values[1],P=w+e.values[2],I=C+e.values[3],s.push({type:"S",values:[B,L,P,I]}),w=P,C=I):"T"===M?(P=e.values[0],I=e.values[1],s.push({type:"T",values:[P,I]}),w=P,C=I):"t"===M?(P=w+e.values[0],I=C+e.values[1],s.push({type:"T",values:[P,I]}),w=P,C=I):"Z"!==M&&"z"!==M||(s.push({type:"Z",values:[]}),w=O,C=T)})),s)),this[A]=l(e),e);if(this[D])return l(this[D]);var s,w,C,O,T,B=n(this.getAttribute("d")||"");return this[D]=l(B),B},e.SVGPathElement.prototype.setPathData=function(e){if(0===e.length)w?this.setAttribute("d",""):this.removeAttribute("d");else{for(var s="",C=0,O=e.length;C<O;C+=1){var D=e[C];0<C&&(s+=" "),s+=D.type,D.values&&0<D.values.length&&(s+=" "+D.values.join(" "))}this.setAttribute("d",s)}},e.SVGRectElement.prototype.getPathData=function(e){var s=this.x.baseVal.value,w=this.y.baseVal.value,C=this.width.baseVal.value,O=this.height.baseVal.value,D=(this.hasAttribute("rx")?this.rx:this.ry).baseVal.value,A=(this.hasAttribute("ry")?this.ry:this.rx).baseVal.value;return w=(w=[{type:"M",values:[s+(D=C/2<D?C/2:D),w]},{type:"H",values:[s+C-D]},{type:"A",values:[D,A=O/2<A?O/2:A,0,0,1,s+C,w+A]},{type:"V",values:[w+O-A]},{type:"A",values:[D,A,0,0,1,s+C-D,w+O]},{type:"H",values:[s+D]},{type:"A",values:[D,A,0,0,1,s,w+O-A]},{type:"V",values:[w+A]},{type:"A",values:[D,A,0,0,1,s+D,w]},{type:"Z",values:[]}]).filter((function(e){return"A"!==e.type||0!==e.values[0]&&0!==e.values[1]})),e&&!0===e.normalize?r(w):w},e.SVGCircleElement.prototype.getPathData=function(e){var s=this.cx.baseVal.value,w=this.cy.baseVal.value,C=this.r.baseVal.value;return w=[{type:"M",values:[s+C,w]},{type:"A",values:[C,C,0,0,1,s,w+C]},{type:"A",values:[C,C,0,0,1,s-C,w]},{type:"A",values:[C,C,0,0,1,s,w-C]},{type:"A",values:[C,C,0,0,1,s+C,w]},{type:"Z",values:[]}],e&&!0===e.normalize?r(w):w},e.SVGEllipseElement.prototype.getPathData=function(e){var s=this.cx.baseVal.value,w=this.cy.baseVal.value,C=this.rx.baseVal.value,O=this.ry.baseVal.value;return w=[{type:"M",values:[s+C,w]},{type:"A",values:[C,O,0,0,1,s,w+O]},{type:"A",values:[C,O,0,0,1,s-C,w]},{type:"A",values:[C,O,0,0,1,s,w-O]},{type:"A",values:[C,O,0,0,1,s+C,w]},{type:"Z",values:[]}],e&&!0===e.normalize?r(w):w},e.SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},e.SVGPolylineElement.prototype.getPathData=function(){for(var e=[],s=0;s<this.points.numberOfItems;s+=1){var w=this.points.getItem(s);e.push({type:0===s?"M":"L",values:[w.x,w.y]})}return e},e.SVGPolygonElement.prototype.getPathData=function(){for(var e=[],s=0;s<this.points.numberOfItems;s+=1){var w=this.points.getItem(s);e.push({type:0===s?"M":"L",values:[w.x,w.y]})}return e.push({type:"Z",values:[]}),e}}()}(e))}function Ke(e){var s,w,C,O,D,A,T,B,L,P,I,M,F,$,N=e.options,V=e.curStats,R=e.aplStats,H=V.position_socketXYSE,z=!1;function S(e,s){return(e=1===s?{x:e.left+e.width/2,y:e.top}:2===s?{x:e.right,y:e.top+e.height/2}:3===s?{x:e.left+e.width/2,y:e.bottom}:{x:e.left,y:e.top+e.height/2}).socketId=s,e}function E(e){return{x:e.x,y:e.y}}if(V.position_path=N.path,V.position_lineStrokeWidth=V.line_strokeWidth,V.position_socketGravitySE=s=we(N.socketGravitySE),w=[0,1].map((function(s){var w=N.anchorSE[s],C=e.optionIsAttach.anchorSE[s],O=!1!==C?pt[w._id]:null,D=!1!==C&&O.conf.getStrokeWidth?O.conf.getStrokeWidth(O,e):0,A=!1!==C&&O.conf.getBBoxNest?O.conf.getBBoxNest(O,e,D):Le(w,e.baseWindow);return V.capsMaskAnchor_pathDataSE[s]=!1!==C&&O.conf.getPathData?O.conf.getPathData(O,e,D):(C=null!=(w=A).right?w.right:w.left+w.width,O=null!=w.bottom?w.bottom:w.top+w.height,[{type:"M",values:[w.left,w.top]},{type:"L",values:[C,w.top]},{type:"L",values:[C,O]},{type:"L",values:[w.left,O]},{type:"Z",values:[]}]),V.capsMaskAnchor_strokeWidthSE[s]=D,A})),T=-1,N.socketSE[0]&&N.socketSE[1]?(H[0]=S(w[0],N.socketSE[0]),H[1]=S(w[1],N.socketSE[1])):(N.socketSE[0]||N.socketSE[1]?(A=N.socketSE[0]?(D=0,1):(D=1,0),H[D]=S(w[D],N.socketSE[D]),(O=ee.map((function(e){return S(w[A],e)}))).forEach((function(e){var s=Ae(e,H[D]);(s<T||-1===T)&&(H[A]=e,T=s)}))):(O=ee.map((function(e){return S(w[1],e)})),ee.map((function(e){return S(w[0],e)})).forEach((function(e){O.forEach((function(s){var w=Ae(e,s);(w<T||-1===T)&&(H[0]=e,H[1]=s,T=w)}))}))),[0,1].forEach((function(e){var s,C;N.socketSE[e]||(w[e].width||w[e].height?w[e].width||4!==H[e].socketId&&2!==H[e].socketId?w[e].height||1!==H[e].socketId&&3!==H[e].socketId||(H[e].socketId=0<=H[e?0:1].y-w[e].top?3:1):H[e].socketId=0<=H[e?0:1].x-w[e].left?2:4:(s=H[e?0:1].x-w[e].left,C=H[e?0:1].y-w[e].top,H[e].socketId=Math.abs(s)>=Math.abs(C)?0<=s?2:4:0<=C?3:1))}))),V.position_path!==R.position_path||V.position_lineStrokeWidth!==R.position_lineStrokeWidth||[0,1].some((function(e){return V.position_plugOverheadSE[e]!==R.position_plugOverheadSE[e]||(w=H[e],C=R.position_socketXYSE[e],w.x!==C.x||w.y!==C.y||w.socketId!==C.socketId)||(w=s[e],C=R.position_socketGravitySE[e],(e=null==w?"auto":Array.isArray(w)?"array":"number")!=(null==C?"auto":Array.isArray(C)?"array":"number")||("array"==e?w[0]!==C[0]||w[1]!==C[1]:w!==C));var w,C}))){switch(e.pathList.baseVal=C=[],e.pathList.animVal=null,V.position_path){case 1:C.push([E(H[0]),E(H[1])]);break;case 2:M="number"==typeof s[0]&&0<s[0]||"number"==typeof s[1]&&0<s[1],M=(F=ae*(M?-1:1))-($=Math.atan2(H[1].y-H[0].y,H[1].x-H[0].x)),$=Math.PI-$-F,F=Ae(H[0],H[1])/Math.sqrt(2)*ie,M={x:H[0].x+Math.cos(M)*F,y:H[0].y+Math.sin(M)*F*-1},F={x:H[1].x+Math.cos($)*F,y:H[1].y+Math.sin($)*F*-1},C.push([E(H[0]),M,F,E(H[1])]);break;case 3:case 4:L=[s[0],4===V.position_path?0:s[1]],P=[],I=[],H.forEach((function(e,s){var w,C=L[s],O=Array.isArray(C)?{x:C[0],y:C[1]}:"number"==typeof C?1===e.socketId?{x:0,y:-C}:2===e.socketId?{x:C,y:0}:3===e.socketId?{x:0,y:C}:{x:-C,y:0}:(w=H[s?0:1],C=0<(C=V.position_plugOverheadSE[s])?120+(8<C?3.75*(C-8):0):80+(V.position_lineStrokeWidth>4?5*(V.position_lineStrokeWidth-4):0),1===e.socketId?{x:0,y:-(O=(O=(e.y-w.y)/2)<C?C:O)}:2===e.socketId?{x:O=(O=(w.x-e.x)/2)<C?C:O,y:0}:3===e.socketId?{x:0,y:O=(O=(w.y-e.y)/2)<C?C:O}:{x:-(O=(O=(e.x-w.x)/2)<C?C:O),y:0});P[s]=e.x+O.x,I[s]=e.y+O.y})),C.push([E(H[0]),{x:P[0],y:I[0]},{x:P[1],y:I[1]},E(H[1])]);break;case 5:!function(){var e,w=[[],[]],O=[];function h(e){return 1===e?3:2===e?4:3===e?1:2}function p(e){return 2===e||4===e?"x":"y"}function c(e,s,w){var C={x:e.x,y:e.y};if(w){if(w===h(e.dirId))throw new Error("Invalid dirId: "+w);C.dirId=w}else C.dirId=e.dirId;return 1===C.dirId?C.y-=s:2===C.dirId?C.x+=s:3===C.dirId?C.y+=s:C.x-=s,C}function d(e,s){return 1===s.dirId?e.y<=s.y:2===s.dirId?e.x>=s.x:3===s.dirId?e.y>=s.y:e.x<=s.x}function f(e,s){return 1===s.dirId||3===s.dirId?e.x===s.x:e.y===s.y}function y(e){return e[0]?{contain:0,notContain:1}:{contain:1,notContain:0}}function m(e,s,w){return Math.abs(s[w]-e[w])}function S(e,s,w){return"x"===w?e.x<s.x?2:4:e.y<s.y?3:1}for(H.forEach((function(e,C){var D=E(e),A=s[C];e=Array.isArray(A)?A[0]<0?[4,-A[0]]:0<A[0]?[2,A[0]]:A[1]<0?[1,-A[1]]:0<A[1]?[3,A[1]]:[e.socketId,0]:"number"!=typeof A?[e.socketId,re]:0<=A?[e.socketId,A]:[h(e.socketId),-A],D.dirId=e[0],A=e[1],w[C].push(D),O[C]=c(D,A)}));function(){var e,s,C,D,A=[d(O[1],O[0]),d(O[0],O[1])],T=[p(O[0].dirId),p(O[1].dirId)];if(T[0]===T[1]){if(A[0]&&A[1])return void(f(O[1],O[0])||(O[0][T[0]]===O[1][T[1]]?(w[0].push(O[0]),w[1].push(O[1])):(e=O[0][T[0]]+(O[1][T[1]]-O[0][T[0]])/2,w[0].push(c(O[0],Math.abs(e-O[0][T[0]]))),w[1].push(c(O[1],Math.abs(e-O[1][T[1]]))))));A[0]!==A[1]?(s=y(A),(C=m(O[s.notContain],O[s.contain],T[s.notContain]))<re&&(O[s.notContain]=c(O[s.notContain],re-C)),w[s.notContain].push(O[s.notContain]),O[s.notContain]=c(O[s.notContain],re,f(O[s.contain],O[s.notContain])?"x"===T[s.notContain]?3:2:S(O[s.notContain],O[s.contain],"x"===T[s.notContain]?"y":"x"))):(C=m(O[0],O[1],"x"===T[0]?"y":"x"),w.forEach((function(e,s){var w=0===s?1:0;e.push(O[s]),O[s]=c(O[s],re,60<=C?S(O[s],O[w],"x"===T[s]?"y":"x"):"x"===T[s]?3:2)})))}else{if(A[0]&&A[1])return void(f(O[1],O[0])?w[1].push(O[1]):f(O[0],O[1])?w[0].push(O[0]):w[0].push("x"===T[0]?{x:O[1].x,y:O[0].y}:{x:O[0].x,y:O[1].y}));A[0]!==A[1]?(s=y(A),w[s.notContain].push(O[s.notContain]),O[s.notContain]=c(O[s.notContain],re,m(O[s.notContain],O[s.contain],T[s.contain])>=re?S(O[s.notContain],O[s.contain],T[s.contain]):O[s.contain].dirId)):(D=[{x:O[0].x,y:O[0].y},{x:O[1].x,y:O[1].y}],w.forEach((function(e,s){var w=0===s?1:0,C=m(D[s],D[w],T[s]);C<re&&(O[s]=c(O[s],re-C)),e.push(O[s]),O[s]=c(O[s],re,S(O[s],O[w],T[w]))})))}return 1}(););w[1].reverse(),w[0].concat(w[1]).forEach((function(s,w){s={x:s.x,y:s.y},0<w&&C.push([e,s]),e=s}))}()}B=[],V.position_plugOverheadSE.forEach((function(e,s){var O,D,A,T,L,P,I,M,F,$=!s;0<e?2===(O=C[D=$?0:C.length-1]).length?(B[D]=B[D]||Ae.apply(null,O),B[D]>oe&&(B[D]-e<oe&&(e=B[D]-oe),I=Ve(O[0],O[1],($?e:B[D]-e)/B[D]),C[D]=$?[I,O[1]]:[O[0],I],B[D]-=e)):(B[D]=B[D]||Te.apply(null,O),B[D]>oe&&(B[D]-e<oe&&(e=B[D]-oe),I=Ne(O[0],O[1],O[2],O[3],We(O[0],O[1],O[2],O[3],$?e:B[D]-e)),T=$?(A=O[0],I.toP1):(A=O[3],I.fromP2),L=Math.atan2(A.y-I.y,I.x-A.x),P=Ae(I,T),I.x=A.x+Math.cos(L)*e,I.y=A.y+Math.sin(L)*e*-1,T.x=I.x+Math.cos(L)*P,T.y=I.y+Math.sin(L)*P*-1,C[D]=$?[I,I.toP1,I.toP2,O[3]]:[O[0],I.fromP1,I.fromP2,I],B[D]=null)):e<0&&(O=C[D=$?0:C.length-1],I=H[s].socketId,s=-w[s]["x"==(M=4===I||2===I?"x":"y")?"width":"height"],F=(e=e<s?s:e)*(4===I||1===I?-1:1),2===O.length?O[$?0:O.length-1][M]+=F:($?[0,1]:[O.length-2,O.length-1]).forEach((function(e){O[e][M]+=F})),B[D]=null)})),R.position_socketXYSE=we(H),R.position_plugOverheadSE=we(V.position_plugOverheadSE),R.position_path=V.position_path,R.position_lineStrokeWidth=V.position_lineStrokeWidth,R.position_socketGravitySE=we(s),z=!0,e.events.apl_position&&e.events.apl_position.forEach((function(s){s(e,C)}))}return z}function Je(e,s){s!==e.isShown&&(!!s!=!!e.isShown&&(e.svg.style.visibility=s?"":"hidden"),e.isShown=s,e.events&&e.events.svgShow&&e.events.svgShow.forEach((function(w){w(e,s)})))}function $e(s,w){var C,O,D,A,T,B,L,P,I,M,F,$,N,V,R,H,z,W,j,X,q,Y,G,Z,J,ee,te,oe,re,ie,ae,se,le,me,ge,ye,ve,_e,Se,st,ct,ut,dt,pt={};w.line&&(pt.line=(P=(C=s).options,O=C.curStats,I=C.events,M=!1,M=Xe(C,O,"line_color",P.lineColor,I.cur_line_color)||M,M=Xe(C,O,"line_colorTra",Oe(O.line_color)[0]<1)||M,M=Xe(C,O,"line_strokeWidth",P.lineSize,I.cur_line_strokeWidth)||M)),(w.plug||pt.line)&&(pt.plug=(A=(D=s).options,T=D.curStats,B=D.events,L=!1,[0,1].forEach((function(e){var s,w,C,O,P,I,M,F,$=A.plugSE[e];L=Xe(D,T.plug_enabledSE,e,$!==U)||L,L=Xe(D,T.plug_plugSE,e,$)||L,L=Xe(D,T.plug_colorSE,e,F=A.plugColorSE[e]||T.line_color,B.cur_plug_colorSE)||L,L=Xe(D,T.plug_colorTraSE,e,Oe(F)[0]<1)||L,$!==U&&(O=w=(s=K[Q[$]]).widthR*A.plugSizeSE[e],P=C=s.heightR*A.plugSizeSE[e],pe&&(O*=T.line_strokeWidth,P*=T.line_strokeWidth),L=Xe(D,T.plug_markerWidthSE,e,O)||L,L=Xe(D,T.plug_markerHeightSE,e,P)||L,T.capsMaskMarker_markerWidthSE[e]=w,T.capsMaskMarker_markerHeightSE[e]=C),T.plugOutline_plugSE[e]=T.capsMaskMarker_plugSE[e]=$,T.plug_enabledSE[e]?(F=T.line_strokeWidth/fe.lineSize*A.plugSizeSE[e],T.position_plugOverheadSE[e]=s.overhead*F,T.viewBox_plugBCircleSE[e]=s.bCircle*F,I=s.sideLen*F,M=s.backLen*F):(T.position_plugOverheadSE[e]=-T.line_strokeWidth/2,T.viewBox_plugBCircleSE[e]=I=M=0),Xe(D,T.attach_plugSideLenSE,e,I,B.cur_attach_plugSideLenSE),Xe(D,T.attach_plugBackLenSE,e,M,B.cur_attach_plugBackLenSE),T.capsMaskAnchor_enabledSE[e]=!T.plug_enabledSE[e]})),L=Xe(D,T,"plug_enabled",T.plug_enabledSE[0]||T.plug_enabledSE[1])||L)),(w.lineOutline||pt.line)&&(pt.lineOutline=(I=(P=s).options,G=!1,G=Xe(P,M=P.curStats,"lineOutline_enabled",I.lineOutlineEnabled)||G,G=Xe(P,M,"lineOutline_color",I.lineOutlineColor)||G,G=Xe(P,M,"lineOutline_colorTra",Oe(M.lineOutline_color)[0]<1)||G,I=M.line_strokeWidth*I.lineOutlineSize,G=Xe(P,M,"lineOutline_strokeWidth",M.line_strokeWidth-2*I)||G,G=Xe(P,M,"lineOutline_inStrokeWidth",M.lineOutline_colorTra?M.lineOutline_strokeWidth+2*he:M.line_strokeWidth-I)||G)),(w.plugOutline||pt.line||pt.plug||pt.lineOutline)&&(pt.plugOutline=($=(F=s).options,N=F.curStats,V=!1,[0,1].forEach((function(e){var s=N.plugOutline_plugSE[e],w=s!==U?K[Q[s]]:null;V=Xe(F,N.plugOutline_enabledSE,e,$.plugOutlineEnabledSE[e]&&N.plug_enabled&&N.plug_enabledSE[e]&&!!w&&!!w.outlineBase)||V,V=Xe(F,N.plugOutline_colorSE,e,s=$.plugOutlineColorSE[e]||N.lineOutline_color)||V,V=Xe(F,N.plugOutline_colorTraSE,e,Oe(s)[0]<1)||V,w&&w.outlineBase&&((s=$.plugOutlineSizeSE[e])>w.outlineMax&&(s=w.outlineMax),s*=2*w.outlineBase,V=Xe(F,N.plugOutline_strokeWidthSE,e,s)||V,V=Xe(F,N.plugOutline_inStrokeWidthSE,e,N.plugOutline_colorTraSE[e]?s-he/(N.line_strokeWidth/fe.lineSize)/$.plugSizeSE[e]*2:s/2)||V)})),V)),(w.faces||pt.line||pt.plug||pt.lineOutline||pt.plugOutline)&&(pt.faces=(z=(R=s).curStats,W=R.aplStats,j=R.events,X=!1,!z.line_altColor&&Xe(R,W,"line_color",H=z.line_color,j.apl_line_color)&&(R.lineFace.style.stroke=H,X=!0),Xe(R,W,"line_strokeWidth",H=z.line_strokeWidth,j.apl_line_strokeWidth)&&(R.lineShape.style.strokeWidth=H+"px",X=!0,(ue||ce)&&(je(R,R.lineShape),ce&&(je(R,R.lineFace),je(R,R.lineMaskCaps)))),Xe(R,W,"lineOutline_enabled",H=z.lineOutline_enabled,j.apl_lineOutline_enabled)&&(R.lineOutlineFace.style.display=H?"inline":"none",X=!0),z.lineOutline_enabled&&(Xe(R,W,"lineOutline_color",H=z.lineOutline_color,j.apl_lineOutline_color)&&(R.lineOutlineFace.style.stroke=H,X=!0),Xe(R,W,"lineOutline_strokeWidth",H=z.lineOutline_strokeWidth,j.apl_lineOutline_strokeWidth)&&(R.lineOutlineMaskShape.style.strokeWidth=H+"px",X=!0,ce&&(je(R,R.lineOutlineMaskCaps),je(R,R.lineOutlineFace))),Xe(R,W,"lineOutline_inStrokeWidth",H=z.lineOutline_inStrokeWidth,j.apl_lineOutline_inStrokeWidth)&&(R.lineMaskShape.style.strokeWidth=H+"px",X=!0,ce&&(je(R,R.lineOutlineMaskCaps),je(R,R.lineOutlineFace)))),Xe(R,W,"plug_enabled",H=z.plug_enabled,j.apl_plug_enabled)&&(R.plugsFace.style.display=H?"inline":"none",X=!0),z.plug_enabled&&[0,1].forEach((function(e){var s=z.plug_plugSE[e],w=s!==U?K[Q[s]]:null,C=Ze(e,w);Xe(R,W.plug_enabledSE,e,H=z.plug_enabledSE[e],j.apl_plug_enabledSE)&&(R.plugsFace.style[C.prop]=H?"url(#"+R.plugMarkerIdSE[e]+")":"none",X=!0),z.plug_enabledSE[e]&&(Xe(R,W.plug_plugSE,e,s,j.apl_plug_plugSE)&&(R.plugFaceSE[e].href.baseVal="#"+w.elmId,Ue(R,R.plugMarkerSE[e],C.orient,w.bBox,R.svg,R.plugMarkerShapeSE[e],R.plugsFace),X=!0,ue&&je(R,R.plugsFace)),Xe(R,W.plug_colorSE,e,H=z.plug_colorSE[e],j.apl_plug_colorSE)&&(R.plugFaceSE[e].style.fill=H,X=!0,(de||pe||ce)&&!z.line_colorTra&&je(R,ce?R.lineMaskCaps:R.capsMaskLine)),["markerWidth","markerHeight"].forEach((function(s){var w="plug_"+s+"SE";Xe(R,W[w],e,H=z[w][e],j["apl_"+w])&&(R.plugMarkerSE[e][s].baseVal.value=H,X=!0)})),Xe(R,W.plugOutline_enabledSE,e,H=z.plugOutline_enabledSE[e],j.apl_plugOutline_enabledSE)&&(H?(R.plugFaceSE[e].style.mask="url(#"+R.plugMaskIdSE[e]+")",R.plugOutlineFaceSE[e].style.display="inline"):(R.plugFaceSE[e].style.mask="none",R.plugOutlineFaceSE[e].style.display="none"),X=!0),z.plugOutline_enabledSE[e]&&(Xe(R,W.plugOutline_plugSE,e,s,j.apl_plugOutline_plugSE)&&(R.plugOutlineFaceSE[e].href.baseVal=R.plugMaskShapeSE[e].href.baseVal=R.plugOutlineMaskShapeSE[e].href.baseVal="#"+w.elmId,[R.plugMaskSE[e],R.plugOutlineMaskSE[e]].forEach((function(e){e.x.baseVal.value=w.bBox.left,e.y.baseVal.value=w.bBox.top,e.width.baseVal.value=w.bBox.width,e.height.baseVal.value=w.bBox.height})),X=!0),Xe(R,W.plugOutline_colorSE,e,H=z.plugOutline_colorSE[e],j.apl_plugOutline_colorSE)&&(R.plugOutlineFaceSE[e].style.fill=H,X=!0,ce&&(je(R,R.lineMaskCaps),je(R,R.lineOutlineMaskCaps))),Xe(R,W.plugOutline_strokeWidthSE,e,H=z.plugOutline_strokeWidthSE[e],j.apl_plugOutline_strokeWidthSE)&&(R.plugOutlineMaskShapeSE[e].style.strokeWidth=H+"px",X=!0),Xe(R,W.plugOutline_inStrokeWidthSE,e,H=z.plugOutline_inStrokeWidthSE[e],j.apl_plugOutline_inStrokeWidthSE)&&(R.plugMaskShapeSE[e].style.strokeWidth=H+"px",X=!0)))})),X)),(w.position||pt.line||pt.plug)&&(pt.position=Ke(s)),(w.path||pt.position)&&(pt.path=(G=(q=s).curStats,te=q.aplStats,ee=q.pathList.animVal||q.pathList.baseVal,Z=G.path_edge,oe=!1,ee&&(Z.x1=Z.x2=ee[0][0].x,Z.y1=Z.y2=ee[0][0].y,G.path_pathData=Y=Be(ee,(function(e){e.x<Z.x1&&(Z.x1=e.x),e.y<Z.y1&&(Z.y1=e.y),e.x>Z.x2&&(Z.x2=e.x),e.y>Z.y2&&(Z.y2=e.y)})),Fe(Y,te.path_pathData)&&(q.linePath.setPathData(Y),te.path_pathData=Y,oe=!0,ce?(je(q,q.plugsFace),je(q,q.lineMaskCaps)):ue&&je(q,q.linePath),q.events.apl_path&&q.events.apl_path.forEach((function(e){e(q,Y)})))),oe)),pt.viewBox=(ee=(J=s).curStats,te=J.aplStats,oe=ee.path_edge,re=ee.viewBox_bBox,ie=te.viewBox_bBox,ae=J.svg.viewBox.baseVal,se=J.svg.style,le=!1,te=Math.max(ee.line_strokeWidth/2,ee.viewBox_plugBCircleSE[0]||0,ee.viewBox_plugBCircleSE[1]||0),me={x1:oe.x1-te,y1:oe.y1-te,x2:oe.x2+te,y2:oe.y2+te},J.events.new_edge4viewBox&&J.events.new_edge4viewBox.forEach((function(e){e(J,me)})),re.x=ee.lineMask_x=ee.lineOutlineMask_x=ee.maskBGRect_x=me.x1,re.y=ee.lineMask_y=ee.lineOutlineMask_y=ee.maskBGRect_y=me.y1,re.width=me.x2-me.x1,re.height=me.y2-me.y1,["x","y","width","height"].forEach((function(e){var s;(s=re[e])!==ie[e]&&(ae[e]=ie[e]=s,se[ne[e]]=s+("x"===e||"y"===e?J.bodyOffset[e]:0)+"px",le=!0)})),le),pt.mask=(ve=(ge=s).curStats,_e=ge.aplStats,Se=!1,ve.plug_enabled?[0,1].forEach((function(e){ve.capsMaskMarker_enabledSE[e]=ve.plug_enabledSE[e]&&ve.plug_colorTraSE[e]||ve.plugOutline_enabledSE[e]&&ve.plugOutline_colorTraSE[e]})):ve.capsMaskMarker_enabledSE[0]=ve.capsMaskMarker_enabledSE[1]=!1,ve.capsMaskMarker_enabled=ve.capsMaskMarker_enabledSE[0]||ve.capsMaskMarker_enabledSE[1],ve.lineMask_outlineMode=ve.lineOutline_enabled,ve.caps_enabled=ve.capsMaskMarker_enabled||ve.capsMaskAnchor_enabledSE[0]||ve.capsMaskAnchor_enabledSE[1],ve.lineMask_enabled=ve.caps_enabled||ve.lineMask_outlineMode,(ve.lineMask_enabled&&!ve.lineMask_outlineMode||ve.lineOutline_enabled)&&["x","y"].forEach((function(e){var s="maskBGRect_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.maskBGRect[e].baseVal.value=ye,Se=!0)})),Xe(ge,_e,"lineMask_enabled",ye=ve.lineMask_enabled)&&(ge.lineFace.style.mask=ye?"url(#"+ge.lineMaskId+")":"none",Se=!0,pe&&je(ge,ge.lineMask)),ve.lineMask_enabled&&(Xe(ge,_e,"lineMask_outlineMode",ye=ve.lineMask_outlineMode)&&(ye?(ge.lineMaskBG.style.display="none",ge.lineMaskShape.style.display="inline"):(ge.lineMaskBG.style.display="inline",ge.lineMaskShape.style.display="none"),Se=!0),["x","y"].forEach((function(e){var s="lineMask_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.lineMask[e].baseVal.value=ye,Se=!0)})),Xe(ge,_e,"caps_enabled",ye=ve.caps_enabled)&&(ge.lineMaskCaps.style.display=ge.lineOutlineMaskCaps.style.display=ye?"inline":"none",Se=!0,pe&&je(ge,ge.capsMaskLine)),ve.caps_enabled&&([0,1].forEach((function(e){var s;Xe(ge,_e.capsMaskAnchor_enabledSE,e,ye=ve.capsMaskAnchor_enabledSE[e])&&(ge.capsMaskAnchorSE[e].style.display=ye?"inline":"none",Se=!0,pe&&je(ge,ge.lineMask)),ve.capsMaskAnchor_enabledSE[e]&&(Fe(s=ve.capsMaskAnchor_pathDataSE[e],_e.capsMaskAnchor_pathDataSE[e])&&(ge.capsMaskAnchorSE[e].setPathData(s),_e.capsMaskAnchor_pathDataSE[e]=s,Se=!0),Xe(ge,_e.capsMaskAnchor_strokeWidthSE,e,ye=ve.capsMaskAnchor_strokeWidthSE[e])&&(ge.capsMaskAnchorSE[e].style.strokeWidth=ye+"px",Se=!0))})),Xe(ge,_e,"capsMaskMarker_enabled",ye=ve.capsMaskMarker_enabled)&&(ge.capsMaskLine.style.display=ye?"inline":"none",Se=!0),ve.capsMaskMarker_enabled&&[0,1].forEach((function(e){var s=ve.capsMaskMarker_plugSE[e],w=s!==U?K[Q[s]]:null,C=Ze(e,w);Xe(ge,_e.capsMaskMarker_enabledSE,e,ye=ve.capsMaskMarker_enabledSE[e])&&(ge.capsMaskLine.style[C.prop]=ye?"url(#"+ge.lineMaskMarkerIdSE[e]+")":"none",Se=!0),ve.capsMaskMarker_enabledSE[e]&&(Xe(ge,_e.capsMaskMarker_plugSE,e,s)&&(ge.capsMaskMarkerShapeSE[e].href.baseVal="#"+w.elmId,Ue(ge,ge.capsMaskMarkerSE[e],C.orient,w.bBox,ge.svg,ge.capsMaskMarkerShapeSE[e],ge.capsMaskLine),Se=!0,ue&&(je(ge,ge.capsMaskLine),je(ge,ge.lineFace))),["markerWidth","markerHeight"].forEach((function(s){var w="capsMaskMarker_"+s+"SE";Xe(ge,_e[w],e,ye=ve[w][e])&&(ge.capsMaskMarkerSE[e][s].baseVal.value=ye,Se=!0)})))})))),ve.lineOutline_enabled&&["x","y"].forEach((function(e){var s="lineOutlineMask_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.lineOutlineMask[e].baseVal.value=ye,Se=!0)})),Se),w.effect&&(ut=(st=s).curStats,dt=st.aplStats,Object.keys(e).forEach((function(s){var w=e[s],C=s+"_enabled",O=s+"_options";s=ut[O];Xe(st,dt,C,ct=ut[C])?(ct&&(dt[O]=we(s)),w[ct?"init":"remove"](st)):ct&&ke(s,dt[O])&&(w.remove(st),dt[C]=!0,dt[O]=we(s),w.init(st))}))),(de||pe)&&pt.line&&!pt.path&&je(s,s.lineShape),de&&pt.plug&&!pt.line&&je(s,s.plugsFace),He(s)}function et(e,s){return{duration:(ge(e.duration)&&0<e.duration?e:s).duration,timing:ye.validTiming(e.timing)?e.timing:we(s.timing)}}function tt(e,w,C,O){var D=e.curStats,A=e.aplStats,T={};function r(){["show_on","show_effect","show_animOptions"].forEach((function(e){A[e]=D[e]}))}D.show_on=w,C&&s[C]&&(D.show_effect=C,D.show_animOptions=et(me(O)?O:{},s[C].defaultAnimOptions)),T.show_on=D.show_on!==A.show_on,T.show_effect=D.show_effect!==A.show_effect,T.show_animOptions=ke(D.show_animOptions,A.show_animOptions),T.show_effect||T.show_animOptions?D.show_inAnim?(C=T.show_effect?s[A.show_effect].stop(e,!0,!0):s[A.show_effect].stop(e),r(),s[A.show_effect].init(e,C)):T.show_on&&(A.show_effect&&T.show_effect&&s[A.show_effect].stop(e,!0,!0),r(),s[A.show_effect].init(e)):T.show_on&&(r(),s[A.show_effect].start(e))}function nt(e,s,w){return w={props:e,optionName:w},e.attachments.indexOf(s)<0&&(!s.conf.bind||s.conf.bind(s,w))&&(e.attachments.push(s),s.boundTargets.push(w),1)}function at(e,s,w){var C=e.attachments.indexOf(s);-1<C&&e.attachments.splice(C,1),s.boundTargets.some((function(w,O){return w.props===e&&(s.conf.unbind&&s.conf.unbind(s,w),C=O,!0)}))&&(s.boundTargets.splice(C,1),w||ze((function(){s.boundTargets.length||D(s)})))}function it(D,A){var T,B,L,P,I,M,F,$,N,V,R,H,z,W,j,X=D.options,U={};function _(e,s,w,C,O){var D={};return w?null!=C?(D.container=e[w],D.key=C):(D.container=e,D.key=w):(D.container=e,D.key=s),D.default=O,D.acceptsAuto=null==D.default,D}function v(e,s,w,C,O,D,A){var T,B,L;A=_(e,w,O,D,A);return null!=s[w]&&(B=(s[w]+"").toLowerCase())&&(A.acceptsAuto&&B===te||(L=C[B]))&&L!==A.container[A.key]&&(A.container[A.key]=L,T=!0),null!=A.container[A.key]||A.acceptsAuto||(A.container[A.key]=A.default,T=!0),T}function E(e,s,w,C,O,D,A,T,B){var L,P,I,M;A=_(e,w,O,D,A);if(!C){if(null==A.default)throw new Error("Invalid `type`: "+w);C=typeof A.default}return null!=s[w]&&(A.acceptsAuto&&(s[w]+"").toLowerCase()===te||(I=P=s[w],("number"===(M=C)?ge(I):typeof I===M)&&(P=B&&"string"===C&&P?P.trim():P,1)&&(!T||T(P))))&&P!==A.container[A.key]&&(A.container[A.key]=P,L=!0),null!=A.container[A.key]||A.acceptsAuto||(A.container[A.key]=A.default,L=!0),L}if(A=A||{},["start","end"].forEach((function(e,s){var w=A[e],C=!1;if(w&&(Me(w)||(C=O(w,"anchor")))&&w!==X.anchorSE[s]){if(!1!==D.optionIsAttach.anchorSE[s]&&at(D,pt[X.anchorSE[s]._id]),C&&!nt(D,pt[w._id],e))throw new Error("Can't bind attachment");X.anchorSE[s]=w,D.optionIsAttach.anchorSE[s]=C,T=U.position=!0}})),!X.anchorSE[0]||!X.anchorSE[1]||X.anchorSE[0]===X.anchorSE[1])throw new Error("`start` and `end` are required.");function x(e){var s=I.appendChild(W.createElementNS(le,"mask"));return s.id=e,s.maskUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[s.x,s.y,s.width,s.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),s}function b(e){var s=I.appendChild(W.createElementNS(le,"marker"));return s.id=e,s.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH,s.viewBox.baseVal||s.setAttribute("viewBox","0 0 0 0"),s}function k(e){return[e.width,e.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100)})),e}T&&(R=function(e,s){var w,C;if(!(e=Ce(e))||!(w=Ce(s)))throw new Error("Cannot get frames.");return e.length&&w.length&&(e.reverse(),w.reverse(),e.some((function(e){return w.some((function(s){return s===e&&(C=s.contentWindow,!0)}))}))),C||window}(!1!==D.optionIsAttach.anchorSE[0]?pt[X.anchorSE[0]._id].element:X.anchorSE[0],!1!==D.optionIsAttach.anchorSE[1]?pt[X.anchorSE[1]._id].element:X.anchorSE[1]))!==D.baseWindow&&(L=R,z=(B=D).aplStats,W=L.document,j=q+"-"+B._id,B.pathList={},Ye(z,_e),Object.keys(e).forEach((function(s){var w=s+"_enabled";z[w]&&(e[s].remove(B),z[w]=!1)})),B.baseWindow&&B.svg&&B.baseWindow.document.body.removeChild(B.svg),Qe(B.baseWindow=L),B.bodyOffset=qe(L),B.svg=P=W.createElementNS(le,"svg"),P.className.baseVal=q,P.viewBox.baseVal||P.setAttribute("viewBox","0 0 0 0"),B.defs=I=P.appendChild(W.createElementNS(le,"defs")),B.linePath=F=I.appendChild(W.createElementNS(le,"path")),F.id=$=j+"-line-path",F.className.baseVal=q+"-line-path",pe&&(F.style.fill="none"),B.lineShape=F=I.appendChild(W.createElementNS(le,"use")),F.id=N=j+"-line-shape",F.href.baseVal="#"+$,(M=I.appendChild(W.createElementNS(le,"g"))).id=V=j+"-caps",B.capsMaskAnchorSE=[0,1].map((function(){var e=M.appendChild(W.createElementNS(le,"path"));return e.className.baseVal=q+"-caps-mask-anchor",e})),B.lineMaskMarkerIdSE=[j+"-caps-mask-marker-0",j+"-caps-mask-marker-1"],B.capsMaskMarkerSE=[0,1].map((function(e){return b(B.lineMaskMarkerIdSE[e])})),B.capsMaskMarkerShapeSE=[0,1].map((function(e){return(e=B.capsMaskMarkerSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-caps-mask-marker-shape",e})),B.capsMaskLine=F=M.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-caps-mask-line",F.href.baseVal="#"+N,B.maskBGRect=F=k(I.appendChild(W.createElementNS(le,"rect"))),F.id=R=j+"-mask-bg-rect",F.className.baseVal=q+"-mask-bg-rect",pe&&(F.style.fill="white"),B.lineMask=k(x(B.lineMaskId=j+"-line-mask")),B.lineMaskBG=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+R,B.lineMaskShape=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-line-mask-shape",F.href.baseVal="#"+$,F.style.display="none",B.lineMaskCaps=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+V,B.lineOutlineMask=k(x(L=j+"-line-outline-mask")),(F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use"))).href.baseVal="#"+R,B.lineOutlineMaskShape=F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-line-outline-mask-shape",F.href.baseVal="#"+$,B.lineOutlineMaskCaps=F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+V,B.face=P.appendChild(W.createElementNS(le,"g")),B.lineFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+N,B.lineOutlineFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+N,F.style.mask="url(#"+L+")",F.style.display="none",B.plugMaskIdSE=[j+"-plug-mask-0",j+"-plug-mask-1"],B.plugMaskSE=[0,1].map((function(e){return x(B.plugMaskIdSE[e])})),B.plugMaskShapeSE=[0,1].map((function(e){return(e=B.plugMaskSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-plug-mask-shape",e})),H=[],B.plugOutlineMaskSE=[0,1].map((function(e){return x(H[e]=j+"-plug-outline-mask-"+e)})),B.plugOutlineMaskShapeSE=[0,1].map((function(e){return(e=B.plugOutlineMaskSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-plug-outline-mask-shape",e})),B.plugMarkerIdSE=[j+"-plug-marker-0",j+"-plug-marker-1"],B.plugMarkerSE=[0,1].map((function(e){return e=b(B.plugMarkerIdSE[e]),pe&&(e.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE),e})),B.plugMarkerShapeSE=[0,1].map((function(e){return B.plugMarkerSE[e].appendChild(W.createElementNS(le,"g"))})),B.plugFaceSE=[0,1].map((function(e){return B.plugMarkerShapeSE[e].appendChild(W.createElementNS(le,"use"))})),B.plugOutlineFaceSE=[0,1].map((function(e){var s=B.plugMarkerShapeSE[e].appendChild(W.createElementNS(le,"use"));return s.style.mask="url(#"+H[e]+")",s.style.display="none",s})),B.plugsFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-plugs-face",F.href.baseVal="#"+N,F.style.display="none",B.curStats.show_inAnim?(B.isShown=1,s[z.show_effect].stop(B,!0)):B.isShown||(P.style.visibility="hidden"),W.body.appendChild(P),[0,1,2].forEach((function(e){var s;(e=B.options.labelSEM[e])&&O(e,"label")&&(s=pt[e._id]).conf.initSvg&&s.conf.initSvg(s,B)})),U.line=U.plug=U.lineOutline=U.plugOutline=U.faces=U.effect=!0),U.position=v(X,A,"path",G,null,null,fe.path)||U.position,U.position=v(X,A,"startSocket",Y,"socketSE",0)||U.position,U.position=v(X,A,"endSocket",Y,"socketSE",1)||U.position,[A.startSocketGravity,A.endSocketGravity].forEach((function(e,s){var w,C,O=!1;null!=e&&(Array.isArray(e)?ge(e[0])&&ge(e[1])&&(O=[e[0],e[1]],Array.isArray(X.socketGravitySE[s])&&(w=O,C=X.socketGravitySE[s],w.length===C.length&&w.every((function(e,s){return e===C[s]})))&&(O=!1)):((e+"").toLowerCase()===te?O=null:ge(e)&&0<=e&&(O=e),O===X.socketGravitySE[s]&&(O=!1)),!1!==O&&(X.socketGravitySE[s]=O,U.position=!0))})),U.line=E(X,A,"color",null,"lineColor",null,fe.lineColor,null,!0)||U.line,U.line=E(X,A,"size",null,"lineSize",null,fe.lineSize,(function(e){return 0<e}))||U.line,["startPlug","endPlug"].forEach((function(e,s){U.plug=v(X,A,e,J,"plugSE",s,fe.plugSE[s])||U.plug,U.plug=E(X,A,e+"Color","string","plugColorSE",s,null,null,!0)||U.plug,U.plug=E(X,A,e+"Size",null,"plugSizeSE",s,fe.plugSizeSE[s],(function(e){return 0<e}))||U.plug})),U.lineOutline=E(X,A,"outline",null,"lineOutlineEnabled",null,fe.lineOutlineEnabled)||U.lineOutline,U.lineOutline=E(X,A,"outlineColor",null,"lineOutlineColor",null,fe.lineOutlineColor,null,!0)||U.lineOutline,U.lineOutline=E(X,A,"outlineSize",null,"lineOutlineSize",null,fe.lineOutlineSize,(function(e){return 0<e&&e<=.48}))||U.lineOutline,["startPlugOutline","endPlugOutline"].forEach((function(e,s){U.plugOutline=E(X,A,e,null,"plugOutlineEnabledSE",s,fe.plugOutlineEnabledSE[s])||U.plugOutline,U.plugOutline=E(X,A,e+"Color","string","plugOutlineColorSE",s,null,null,!0)||U.plugOutline,U.plugOutline=E(X,A,e+"Size",null,"plugOutlineSizeSE",s,fe.plugOutlineSizeSE[s],(function(e){return 1<=e}))||U.plugOutline})),["startLabel","endLabel","middleLabel"].forEach((function(e,s){var T,B,L,P=A[e],I=X.labelSEM[s]&&!D.optionIsAttach.labelSEM[s]?pt[X.labelSEM[s]._id].text:X.labelSEM[s],M=!1;if((T="string"==typeof P)&&(P=P.trim()),(T||P&&(M=O(P,"label")))&&P!==I){if(X.labelSEM[s]&&(at(D,pt[X.labelSEM[s]._id]),X.labelSEM[s]=""),P){if(M?(B=pt[(L=P)._id]).boundTargets.slice().forEach((function(e){B.conf.removeOption(B,e)})):L=new C(w.captionLabel,[P]),!nt(D,pt[L._id],e))throw new Error("Can't bind attachment");X.labelSEM[s]=L}D.optionIsAttach.labelSEM[s]=M}})),Object.keys(e).forEach((function(s){var w,C,O=e[s],T=s+"_enabled",B=s+"_options";function l(e){var s={};return O.optionsConf.forEach((function(w){var C=w[0],O=w[3];null==w[4]||s[O]||(s[O]=[]),("function"==typeof C?C:"id"===C?v:E).apply(null,[s,e].concat(w.slice(1)))})),s}function r(e){var w,C=s+"_animOptions";return e.hasOwnProperty("animation")?me(e.animation)?w=D.curStats[C]=et(e.animation,O.defaultAnimOptions):(w=!!e.animation,D.curStats[C]=w?et({},O.defaultAnimOptions):null):(w=!!O.defaultEnabled,D.curStats[C]=w?et({},O.defaultAnimOptions):null),w}A.hasOwnProperty(s)&&(w=A[s],me(w)?(D.curStats[T]=!0,C=D.curStats[B]=l(w),O.anim&&(D.curStats[B].animation=r(w))):(C=D.curStats[T]=!!w)&&(D.curStats[B]=l({}),O.anim&&(D.curStats[B].animation=r({}))),ke(C,X[s])&&(X[s]=C,U.effect=!0))})),$e(D,U)}function ot(w,C,O){var D={options:{anchorSE:[],socketSE:[],socketGravitySE:[],plugSE:[],plugColorSE:[],plugSizeSE:[],plugOutlineEnabledSE:[],plugOutlineColorSE:[],plugOutlineSizeSE:[],labelSEM:["","",""]},optionIsAttach:{anchorSE:[!1,!1],labelSEM:[!1,!1,!1]},curStats:{},aplStats:{},attachments:[],events:{},reflowTargets:[]};Ye(D.curStats,_e),Ye(D.aplStats,_e),Object.keys(e).forEach((function(s){var w=e[s].stats;Ye(D.curStats,w),Ye(D.aplStats,w),D.options[s]=!1})),Ye(D.curStats,Se),Ye(D.aplStats,Se),D.curStats.show_effect=st,D.curStats.show_animOptions=we(s[st].defaultAnimOptions),Object.defineProperty(this,"_id",{value:++dt}),D._id=this._id,ut[this._id]=D,1===arguments.length&&(O=w,w=null),O=O||{},(w||C)&&(O=we(O),w&&(O.start=w),C&&(O.end=C)),D.isShown=D.aplStats.show_on=!O.hide,this.setOptions(O)}function lt(e){return function(s){var w={};w[e]=s,this.setOptions(w)}}function rt(e,s){var w,C={conf:e,curStats:{},aplStats:{},boundTargets:[]},O={};e.argOptions.every((function(e){return!(!s.length||("string"==typeof e.type?typeof s[0]!==e.type:"function"!=typeof e.type||!e.type(s[0]))||(O[e.optionName]=s.shift(),0))})),w=s.length&&me(s[0])?we(s[0]):{},Object.keys(O).forEach((function(e){w[e]=O[e]})),e.stats&&(Ye(C.curStats,e.stats),Ye(C.aplStats,e.stats)),Object.defineProperty(this,"_id",{value:++ht}),Object.defineProperty(this,"isRemoved",{get:function(){return!pt[this._id]}}),C._id=this._id,e.init&&!e.init(C,w)||(pt[this._id]=C)}return e={dash:{stats:{dash_len:{},dash_gap:{},dash_maxOffset:{}},anim:!0,defaultAnimOptions:{duration:1e3,timing:"linear"},optionsConf:[["type","len","number",null,null,null,function(e){return 0<e}],["type","gap","number",null,null,null,function(e){return 0<e}]],init:function(s){Ge(s,"apl_line_strokeWidth",e.dash.update),s.lineFace.style.strokeDashoffset=0,e.dash.update(s)},remove:function(s){var w=s.curStats;De(s,"apl_line_strokeWidth",e.dash.update),w.dash_animId&&(ye.remove(w.dash_animId),w.dash_animId=null),s.lineFace.style.strokeDasharray="none",s.lineFace.style.strokeDashoffset=0,Ye(s.aplStats,e.dash.stats)},update:function(e){var s,w=e.curStats,C=e.aplStats,O=C.dash_options,D=!1;w.dash_len=O.len||2*C.line_strokeWidth,w.dash_gap=O.gap||C.line_strokeWidth,w.dash_maxOffset=w.dash_len+w.dash_gap,D=Xe(e,C,"dash_len",w.dash_len)||D,(D=Xe(e,C,"dash_gap",w.dash_gap)||D)&&(e.lineFace.style.strokeDasharray=C.dash_len+","+C.dash_gap),w.dash_animOptions?(D=Xe(e,C,"dash_maxOffset",w.dash_maxOffset),C.dash_animOptions&&(D||ke(w.dash_animOptions,C.dash_animOptions))&&(w.dash_animId&&(s=ye.stop(w.dash_animId),ye.remove(w.dash_animId)),C.dash_animOptions=null),C.dash_animOptions||(w.dash_animId=ye.add((function(e){return(1-e)*C.dash_maxOffset+"px"}),(function(s){e.lineFace.style.strokeDashoffset=s}),w.dash_animOptions.duration,0,w.dash_animOptions.timing,!1,s),C.dash_animOptions=we(w.dash_animOptions))):C.dash_animOptions&&(w.dash_animId&&(ye.remove(w.dash_animId),w.dash_animId=null),e.lineFace.style.strokeDashoffset=0,C.dash_animOptions=null)}},gradient:{stats:{gradient_colorSE:{hasSE:!0},gradient_pointSE:{hasSE:!0,hasProps:!0}},optionsConf:[["type","startColor","string","colorSE",0,null,null,!0],["type","endColor","string","colorSE",1,null,null,!0]],init:function(s){var w=s.baseWindow.document,C=s.defs,O=q+"-"+s._id+"-gradient";s.efc_gradient_gradient=C=C.appendChild(w.createElementNS(le,"linearGradient")),C.id=O,C.gradientUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[C.x1,C.y1,C.x2,C.y2].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),s.efc_gradient_stopSE=[0,1].map((function(e){var C=s.efc_gradient_gradient.appendChild(w.createElementNS(le,"stop"));try{C.offset.baseVal=e}catch(s){if(s.code!==DOMException.NO_MODIFICATION_ALLOWED_ERR)throw s;C.setAttribute("offset",e)}return C})),Ge(s,"cur_plug_colorSE",e.gradient.update),Ge(s,"apl_path",e.gradient.update),s.curStats.line_altColor=!0,s.lineFace.style.stroke="url(#"+O+")",e.gradient.update(s)},remove:function(s){s.efc_gradient_gradient&&(s.defs.removeChild(s.efc_gradient_gradient),s.efc_gradient_gradient=s.efc_gradient_stopSE=null),De(s,"cur_plug_colorSE",e.gradient.update),De(s,"apl_path",e.gradient.update),s.curStats.line_altColor=!1,s.lineFace.style.stroke=s.curStats.line_color,Ye(s.aplStats,e.gradient.stats)},update:function(e){var s,w=e.curStats,C=e.aplStats,O=C.gradient_options,D=e.pathList.animVal||e.pathList.baseVal;[0,1].forEach((function(e){w.gradient_colorSE[e]=O.colorSE[e]||w.plug_colorSE[e]})),s=D[0][0],w.gradient_pointSE[0]={x:s.x,y:s.y},s=(D=D[D.length-1])[D.length-1],w.gradient_pointSE[1]={x:s.x,y:s.y},[0,1].forEach((function(s){var O;Xe(e,C.gradient_colorSE,s,O=w.gradient_colorSE[s])&&(pe?(O=Oe(O),e.efc_gradient_stopSE[s].style.stopColor=O[1],e.efc_gradient_stopSE[s].style.stopOpacity=O[0]):e.efc_gradient_stopSE[s].style.stopColor=O),["x","y"].forEach((function(D){(O=w.gradient_pointSE[s][D])!==C.gradient_pointSE[s][D]&&(e.efc_gradient_gradient[D+(s+1)].baseVal.value=C.gradient_pointSE[s][D]=O)}))}))}},dropShadow:{stats:{dropShadow_dx:{},dropShadow_dy:{},dropShadow_blur:{},dropShadow_color:{},dropShadow_opacity:{},dropShadow_x:{},dropShadow_y:{}},optionsConf:[["type","dx",null,null,null,2],["type","dy",null,null,null,4],["type","blur",null,null,null,3,function(e){return 0<=e}],["type","color",null,null,null,"#000",null,!0],["type","opacity",null,null,null,.8,function(e){return 0<=e&&e<=1}]],init:function(s){var w,C,O,D,A=s.baseWindow.document,T=s.defs,B=q+"-"+s._id+"-dropShadow",P=(w=A,C=B,D={},"boolean"!=typeof L&&(L=!!window.SVGFEDropShadowElement&&!pe),D.elmsAppend=[D.elmFilter=A=w.createElementNS(le,"filter")],A.filterUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,A.x.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),A.y.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),A.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),A.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),A.id=C,L?(D.elmOffset=D.elmBlur=O=A.appendChild(w.createElementNS(le,"feDropShadow")),D.styleFlood=O.style):(D.elmBlur=A.appendChild(w.createElementNS(le,"feGaussianBlur")),D.elmOffset=O=A.appendChild(w.createElementNS(le,"feOffset")),O.result.baseVal="offsetblur",O=A.appendChild(w.createElementNS(le,"feFlood")),D.styleFlood=O.style,(O=A.appendChild(w.createElementNS(le,"feComposite"))).in2.baseVal="offsetblur",O.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN,(O=A.appendChild(w.createElementNS(le,"feMerge"))).appendChild(w.createElementNS(le,"feMergeNode")),O.appendChild(w.createElementNS(le,"feMergeNode")).in1.baseVal="SourceGraphic"),D);["elmFilter","elmOffset","elmBlur","styleFlood","elmsAppend"].forEach((function(e){s["efc_dropShadow_"+e]=P[e]})),P.elmsAppend.forEach((function(e){T.appendChild(e)})),s.face.setAttribute("filter","url(#"+B+")"),Ge(s,"new_edge4viewBox",e.dropShadow.adjustEdge),e.dropShadow.update(s)},remove:function(s){var w=s.defs;s.efc_dropShadow_elmsAppend&&(s.efc_dropShadow_elmsAppend.forEach((function(e){w.removeChild(e)})),s.efc_dropShadow_elmFilter=s.efc_dropShadow_elmOffset=s.efc_dropShadow_elmBlur=s.efc_dropShadow_styleFlood=s.efc_dropShadow_elmsAppend=null),De(s,"new_edge4viewBox",e.dropShadow.adjustEdge),$e(s,{}),s.face.removeAttribute("filter"),Ye(s.aplStats,e.dropShadow.stats)},update:function(e){var s,w,C=e.curStats,O=e.aplStats,D=O.dropShadow_options;C.dropShadow_dx=s=D.dx,Xe(e,O,"dropShadow_dx",s)&&(e.efc_dropShadow_elmOffset.dx.baseVal=s,w=!0),C.dropShadow_dy=s=D.dy,Xe(e,O,"dropShadow_dy",s)&&(e.efc_dropShadow_elmOffset.dy.baseVal=s,w=!0),C.dropShadow_blur=s=D.blur,Xe(e,O,"dropShadow_blur",s)&&(e.efc_dropShadow_elmBlur.setStdDeviation(s,s),w=!0),w&&$e(e,{}),C.dropShadow_color=s=D.color,Xe(e,O,"dropShadow_color",s)&&(e.efc_dropShadow_styleFlood.floodColor=s),C.dropShadow_opacity=s=D.opacity,Xe(e,O,"dropShadow_opacity",s)&&(e.efc_dropShadow_styleFlood.floodOpacity=s)},adjustEdge:function(e,s){var w,C=e.curStats,O=e.aplStats;null!=C.dropShadow_dx&&(w=3*C.dropShadow_blur,(w={x1:s.x1-w+C.dropShadow_dx,y1:s.y1-w+C.dropShadow_dy,x2:s.x2+w+C.dropShadow_dx,y2:s.y2+w+C.dropShadow_dy}).x1<s.x1&&(s.x1=w.x1),w.y1<s.y1&&(s.y1=w.y1),w.x2>s.x2&&(s.x2=w.x2),w.y2>s.y2&&(s.y2=w.y2),["x","y"].forEach((function(w){var D,A="dropShadow_"+w;C[A]=D=s[w+"1"],Xe(e,O,A,D)&&(e.efc_dropShadow_elmFilter[w].baseVal.value=D)})))}}},Object.keys(e).forEach((function(s){var w=e[s],C=w.stats;C[s+"_enabled"]={iniValue:!1},C[s+"_options"]={hasProps:!0},w.anim&&(C[s+"_animOptions"]={},C[s+"_animId"]={})})),s={none:{defaultAnimOptions:{},init:function(e,w){var C=e.curStats;C.show_animId&&(ye.remove(C.show_animId),C.show_animId=null),s.none.start(e,w)},start:function(e,w){s.none.stop(e,!0)},stop:function(e,s,w){var C=e.curStats;return w=null!=w?w:e.aplStats.show_on,C.show_inAnim=!1,s&&Je(e,w),w?1:0}},fade:{defaultAnimOptions:{duration:300,timing:"linear"},init:function(e,w){var C=e.curStats,O=e.aplStats;C.show_animId&&ye.remove(C.show_animId),C.show_animId=ye.add((function(e){return e}),(function(w,C){C?s.fade.stop(e,!0):(e.svg.style.opacity=w+"",ce&&(je(e,e.svg),He(e)))}),O.show_animOptions.duration,1,O.show_animOptions.timing,null,!1),s.fade.start(e,w)},start:function(e,s){var w,C=e.curStats;C.show_inAnim&&(w=ye.stop(C.show_animId)),Je(e,1),C.show_inAnim=!0,ye.start(C.show_animId,!e.aplStats.show_on,null!=s?s:w)},stop:function(e,s,w){var C,O=e.curStats;return w=null!=w?w:e.aplStats.show_on,C=O.show_inAnim?ye.stop(O.show_animId):w?1:0,O.show_inAnim=!1,s&&(e.svg.style.opacity=w?"":"0",Je(e,w)),C}},draw:{defaultAnimOptions:{duration:500,timing:[.58,0,.42,1]},init:function(e,w){var C=e.curStats,O=e.aplStats,D=e.pathList.baseVal,A=Re(D),T=A.segsLen,B=A.lenAll;C.show_animId&&ye.remove(C.show_animId),C.show_animId=ye.add((function(e){var s,w,C,O=-1;if(0===e)w=[[D[0][0],D[0][0]]];else if(1===e)w=D;else{for(s=B*e,w=[];s>=T[++O];)w.push(D[O]),s-=T[O];s&&(2===(C=D[O]).length?w.push([C[0],Ve(C[0],C[1],s/T[O])]):(e=Ne(C[0],C[1],C[2],C[3],We(C[0],C[1],C[2],C[3],s)),w.push([C[0],e.fromP1,e.fromP2,e])))}return w}),(function(w,C){C?s.draw.stop(e,!0):(e.pathList.animVal=w,$e(e,{path:!0}))}),O.show_animOptions.duration,1,O.show_animOptions.timing,null,!1),s.draw.start(e,w)},start:function(e,w){var C,O=e.curStats;O.show_inAnim&&(C=ye.stop(O.show_animId)),Je(e,1),O.show_inAnim=!0,Ge(e,"apl_position",s.draw.update),ye.start(O.show_animId,!e.aplStats.show_on,null!=w?w:C)},stop:function(e,s,w){var C,O=e.curStats;return w=null!=w?w:e.aplStats.show_on,C=O.show_inAnim?ye.stop(O.show_animId):w?1:0,O.show_inAnim=!1,s&&(e.pathList.animVal=w?null:[[e.pathList.baseVal[0][0],e.pathList.baseVal[0][0]]],$e(e,{path:!0}),Je(e,w)),C},update:function(e){De(e,"apl_position",s.draw.update),e.curStats.show_inAnim?s.draw.init(e,s.draw.stop(e)):e.aplStats.show_animOptions={}}}},[["start","anchorSE",0],["end","anchorSE",1],["color","lineColor"],["size","lineSize"],["startSocketGravity","socketGravitySE",0],["endSocketGravity","socketGravitySE",1],["startPlugColor","plugColorSE",0],["endPlugColor","plugColorSE",1],["startPlugSize","plugSizeSE",0],["endPlugSize","plugSizeSE",1],["outline","lineOutlineEnabled"],["outlineColor","lineOutlineColor"],["outlineSize","lineOutlineSize"],["startPlugOutline","plugOutlineEnabledSE",0],["endPlugOutline","plugOutlineEnabledSE",1],["startPlugOutlineColor","plugOutlineColorSE",0],["endPlugOutlineColor","plugOutlineColorSE",1],["startPlugOutlineSize","plugOutlineSizeSE",0],["endPlugOutlineSize","plugOutlineSizeSE",1]].forEach((function(e){var s=e[0],w=e[1],C=e[2];Object.defineProperty(ot.prototype,s,{get:function(){var e=null!=C?ut[this._id].options[w][C]:w?ut[this._id].options[w]:ut[this._id].options[s];return null==e?te:we(e)},set:lt(s),enumerable:!0})})),[["path",G],["startSocket",Y,"socketSE",0],["endSocket",Y,"socketSE",1],["startPlug",J,"plugSE",0],["endPlug",J,"plugSE",1]].forEach((function(e){var s=e[0],w=e[1],C=e[2],O=e[3];Object.defineProperty(ot.prototype,s,{get:function(){var e,D=null!=O?ut[this._id].options[C][O]:C?ut[this._id].options[C]:ut[this._id].options[s];return D?Object.keys(w).some((function(s){return w[s]===D&&(e=s,!0)}))?e:new Error("It's broken"):te},set:lt(s),enumerable:!0})})),Object.keys(e).forEach((function(s){var w=e[s];Object.defineProperty(ot.prototype,s,{get:function(){var e,C,O=ut[this._id].options[s];return me(O)?(e=O,C=w.optionsConf.reduce((function(s,w){var C,O=w[0],D=w[1],A=w[2],T=w[3],B=null!=(w=w[4])?e[T][w]:T?e[T]:e[D];return s[D]="id"===O?B?Object.keys(A).some((function(e){return A[e]===B&&(C=e,!0)}))?C:new Error("It's broken"):te:null==B?te:we(B),s}),{}),w.anim&&(C.animation=we(e.animation)),C):O},set:lt(s),enumerable:!0})})),["startLabel","endLabel","middleLabel"].forEach((function(e,s){Object.defineProperty(ot.prototype,e,{get:function(){var e=ut[this._id],w=e.options;return w.labelSEM[s]&&!e.optionIsAttach.labelSEM[s]?pt[w.labelSEM[s]._id].text:w.labelSEM[s]||""},set:lt(e),enumerable:!0})})),ot.prototype.setOptions=function(e){return it(ut[this._id],e),this},ot.prototype.position=function(){return $e(ut[this._id],{position:!0}),this},ot.prototype.remove=function(){var s=ut[this._id],w=s.curStats;Object.keys(e).forEach((function(e){w[e+="_animId"]&&ye.remove(w[e])})),w.show_animId&&ye.remove(w.show_animId),s.attachments.slice().forEach((function(e){at(s,e)})),s.baseWindow&&s.svg&&s.baseWindow.document.body.removeChild(s.svg),delete ut[this._id]},ot.prototype.show=function(e,s){return tt(ut[this._id],!0,e,s),this},ot.prototype.hide=function(e,s){return tt(ut[this._id],!1,e,s),this},D=function(e){e&&pt[e._id]&&(e.boundTargets.slice().forEach((function(s){at(s.props,e,!0)})),e.conf.remove&&e.conf.remove(e),delete pt[e._id])},rt.prototype.remove=function(){var e=this,s=pt[e._id];s&&(s.boundTargets.slice().forEach((function(e){s.conf.removeOption(s,e)})),ze((function(){var s=pt[e._id];s&&(console.error("LeaderLineAttachment was not removed by removeOption"),D(s))})))},C=rt,window.LeaderLineAttachment=C,O=function(e,s){return e instanceof C&&(!(e.isRemoved||s&&pt[e._id].conf.type!==s)||null)},w={pointAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me}],init:function(e,s){return e.element=w.pointAnchor.checkElement(s.element),e.x=w.pointAnchor.parsePercent(s.x,!0)||[.5,!0],e.y=w.pointAnchor.parsePercent(s.y,!0)||[.5,!0],!0},removeOption:function(e,s){var O=s.props,D={},A=e.element;A===(e=O.options.anchorSE["start"===s.optionName?1:0])&&(A=e===document.body?new C(w.pointAnchor,[A]):document.body),D[s.optionName]=A,it(O,D)},getBBoxNest:function(e,s){var w=Le(e.element,s.baseWindow),C=w.width;s=w.height;return w.width=w.height=0,w.left=w.right=w.left+e.x[0]*(e.x[1]?C:1),w.top=w.bottom=w.top+e.y[0]*(e.y[1]?s:1),w},parsePercent:function(e,s){var w,C,O=!1;return ge(e)?C=e:"string"==typeof e&&(w=se.exec(e))&&w[2]&&(O=0!=(C=parseFloat(w[1])/100)),null!=C&&(s||0<=C)?[C,O]:null},checkElement:function(e){if(null==e)e=document.body;else if(!Me(e))throw new Error("`element` must be Element");return e}},areaAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"shape",type:"string"}],stats:{color:{},strokeWidth:{},elementWidth:{},elementHeight:{},elementLeft:{},elementTop:{},pathListRel:{},bBoxRel:{},pathData:{},viewBoxBBox:{hasProps:!0},dashLen:{},dashGap:{}},init:function(e,s){var C,O=[];return e.element=w.pointAnchor.checkElement(s.element),"string"==typeof s.color&&(e.color=s.color.trim()),"string"==typeof s.fillColor&&(e.fill=s.fillColor.trim()),ge(s.size)&&0<=s.size&&(e.size=s.size),s.dash&&(e.dash=!0,ge(s.dash.len)&&0<s.dash.len&&(e.dashLen=s.dash.len),ge(s.dash.gap)&&0<s.dash.gap&&(e.dashGap=s.dash.gap)),"circle"===s.shape?e.shape=s.shape:"polygon"===s.shape&&Array.isArray(s.points)&&3<=s.points.length&&s.points.every((function(s){var C={};return!(!(C.x=w.pointAnchor.parsePercent(s[0],!0))||!(C.y=w.pointAnchor.parsePercent(s[1],!0))||(O.push(C),(C.x[1]||C.y[1])&&(e.hasRatio=!0),0))}))?(e.shape=s.shape,e.points=O):(e.shape="rect",e.radius=ge(s.radius)&&0<=s.radius?s.radius:0),"rect"!==e.shape&&"circle"!==e.shape||(e.x=w.pointAnchor.parsePercent(s.x,!0)||[-.05,!0],e.y=w.pointAnchor.parsePercent(s.y,!0)||[-.05,!0],e.width=w.pointAnchor.parsePercent(s.width)||[1.1,!0],e.height=w.pointAnchor.parsePercent(s.height)||[1.1,!0],(e.x[1]||e.y[1]||e.width[1]||e.height[1])&&(e.hasRatio=!0)),C=e.element.ownerDocument,e.svg=s=C.createElementNS(le,"svg"),s.className.baseVal=q+"-areaAnchor",s.viewBox.baseVal||s.setAttribute("viewBox","0 0 0 0"),e.path=s.appendChild(C.createElementNS(le,"path")),e.path.style.fill=e.fill||"none",e.isShown=!1,s.style.visibility="hidden",C.body.appendChild(s),Qe(C=C.defaultView),e.bodyOffset=qe(C),e.updateColor=function(){var s=e.curStats,w=e.aplStats,C=e.boundTargets.length?e.boundTargets[0].props.curStats:null;s.color=C=e.color||(C?C.line_color:fe.lineColor),Xe(e,w,"color",C)&&(e.path.style.stroke=C)},e.updateShow=function(){Je(e,e.boundTargets.some((function(e){return!0===e.props.isShown})))},!0},bind:function(e,s){return s=s.props,e.color||Ge(s,"cur_line_color",e.updateColor),Ge(s,"svgShow",e.updateShow),ze((function(){e.updateColor(),e.updateShow()})),!0},unbind:function(e,s){s=s.props,e.color||De(s,"cur_line_color",e.updateColor),De(s,"svgShow",e.updateShow),1<e.boundTargets.length&&ze((function(){e.updateColor(),e.updateShow(),w.areaAnchor.update(e)&&e.boundTargets.forEach((function(e){$e(e.props,{position:!0})}))}))},removeOption:function(e,s){w.pointAnchor.removeOption(e,s)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.areaAnchor.unbind(e,s)}))),e.svg.parentNode.removeChild(e.svg)},getStrokeWidth:function(e,s){return w.areaAnchor.update(e)&&1<e.boundTargets.length&&ze((function(){e.boundTargets.forEach((function(e){e.props!==s&&$e(e.props,{position:!0})}))})),e.curStats.strokeWidth},getPathData:function(e,s){var w=Le(e.element,s.baseWindow);return Be(e.curStats.pathListRel,(function(e){e.x+=w.left,e.y+=w.top}))},getBBoxNest:function(e,s){return s=Le(e.element,s.baseWindow),{left:(e=e.curStats.bBoxRel).left+s.left,top:e.top+s.top,right:e.right+s.left,bottom:e.bottom+s.top,width:e.width,height:e.height}},update:function(e){var s,w,C,O,D,A,T,B,L,P,I,M,F,$,N,V,R=e.curStats,H=e.aplStats,z=e.boundTargets.length?e.boundTargets[0].props.curStats:null,W={};if(W.strokeWidth=Xe(e,R,"strokeWidth",null!=e.size?e.size:z?z.line_strokeWidth:fe.lineSize),s=Ie(e.element),W.elementWidth=Xe(e,R,"elementWidth",s.width),W.elementHeight=Xe(e,R,"elementHeight",s.height),W.elementLeft=Xe(e,R,"elementLeft",s.left),W.elementTop=Xe(e,R,"elementTop",s.top),W.strokeWidth||e.hasRatio&&(W.elementWidth||W.elementHeight)){switch(e.shape){case"rect":(M={left:e.x[0]*(e.x[1]?s.width:1),top:e.y[0]*(e.y[1]?s.height:1),width:e.width[0]*(e.width[1]?s.width:1),height:e.height[0]*(e.height[1]?s.height:1)}).right=M.left+M.width,M.bottom=M.top+M.height,I=R.strokeWidth/2,B=(T=Math.min(M.width,M.height))?T/2*Math.SQRT2+I:0,P=(T=e.radius?e.radius<=B?e.radius:B:0)?(B=(T-I)/Math.SQRT2,P=[{x:M.left-(L=T-B),y:M.top+B},{x:M.left+B,y:M.top-L},{x:M.right-B,y:M.top-L},{x:M.right+L,y:M.top+B},{x:M.right+L,y:M.bottom-B},{x:M.right-B,y:M.bottom+L},{x:M.left+B,y:M.bottom+L},{x:M.left-L,y:M.bottom-B}],R.pathListRel=[[P[0],{x:P[0].x,y:P[0].y-(I=T*ie)},{x:P[1].x-I,y:P[1].y},P[1]]],P[1].x!==P[2].x&&R.pathListRel.push([P[1],P[2]]),R.pathListRel.push([P[2],{x:P[2].x+I,y:P[2].y},{x:P[3].x,y:P[3].y-I},P[3]]),P[3].y!==P[4].y&&R.pathListRel.push([P[3],P[4]]),R.pathListRel.push([P[4],{x:P[4].x,y:P[4].y+I},{x:P[5].x+I,y:P[5].y},P[5]]),P[5].x!==P[6].x&&R.pathListRel.push([P[5],P[6]]),R.pathListRel.push([P[6],{x:P[6].x-I,y:P[6].y},{x:P[7].x,y:P[7].y+I},P[7]]),P[7].y!==P[0].y&&R.pathListRel.push([P[7],P[0]]),R.pathListRel.push([]),L=T-B+R.strokeWidth/2,[{x:M.left-L,y:M.top-L},{x:M.right+L,y:M.bottom+L}]):(L=R.strokeWidth/2,P=[{x:M.left-L,y:M.top-L},{x:M.right+L,y:M.bottom+L}],R.pathListRel=[[P[0],{x:P[1].x,y:P[0].y}],[{x:P[1].x,y:P[0].y},P[1]],[P[1],{x:P[0].x,y:P[1].y}],[]],[{x:M.left-R.strokeWidth,y:M.top-R.strokeWidth},{x:M.right+R.strokeWidth,y:M.bottom+R.strokeWidth}]),R.bBoxRel={left:P[0].x,top:P[0].y,right:P[1].x,bottom:P[1].y,width:P[1].x-P[0].x,height:P[1].y-P[0].y};break;case"circle":(A={left:e.x[0]*(e.x[1]?s.width:1),top:e.y[0]*(e.y[1]?s.height:1),width:e.width[0]*(e.width[1]?s.width:1),height:e.height[0]*(e.height[1]?s.height:1)}).width||A.height||(A.width=A.height=10),A.width||(A.width=A.height),A.height||(A.height=A.width),A.right=A.left+A.width,A.bottom=A.top+A.height,I=A.left+A.width/2,T=A.top+A.height/2,D=R.strokeWidth/2,B=A.width/2,L=A.height/2,M=B*Math.SQRT2+D,P=L*Math.SQRT2+D,R.pathListRel=[[(D=[{x:I-M,y:T},{x:I,y:T-P},{x:I+M,y:T},{x:I,y:T+P}])[0],{x:D[0].x,y:D[0].y-(I=P*ie)},{x:D[1].x-(T=M*ie),y:D[1].y},D[1]],[D[1],{x:D[1].x+T,y:D[1].y},{x:D[2].x,y:D[2].y-I},D[2]],[D[2],{x:D[2].x,y:D[2].y+I},{x:D[3].x+T,y:D[3].y},D[3]],[D[3],{x:D[3].x-T,y:D[3].y},{x:D[0].x,y:D[0].y+I},D[0]],[]],B=M-B+R.strokeWidth/2,L=P-L+R.strokeWidth/2,D=[{x:A.left-B,y:A.top-L},{x:A.right+B,y:A.bottom+L}],R.bBoxRel={left:D[0].x,top:D[0].y,right:D[1].x,bottom:D[1].y,width:D[1].x-D[0].x,height:D[1].y-D[0].y};break;case"polygon":e.points.forEach((function(e){var w=e.x[0]*(e.x[1]?s.width:1);e=e.y[0]*(e.y[1]?s.height:1);C?(w<C.left&&(C.left=w),w>C.right&&(C.right=w),e<C.top&&(C.top=e),e>C.bottom&&(C.bottom=e)):C={left:w,right:w,top:e,bottom:e},O?R.pathListRel.push([O,{x:w,y:e}]):R.pathListRel=[],O={x:w,y:e}})),R.pathListRel.push([]),D=R.strokeWidth/2,D=[{x:C.left-D,y:C.top-D},{x:C.right+D,y:C.bottom+D}],R.bBoxRel={left:D[0].x,top:D[0].y,right:D[1].x,bottom:D[1].y,width:D[1].x-D[0].x,height:D[1].y-D[0].y}}W.pathListRel=W.bBoxRel=!0}return(W.pathListRel||W.elementLeft||W.elementTop)&&(R.pathData=Be(R.pathListRel,(function(e){e.x+=s.left,e.y+=s.top}))),Xe(e,H,"strokeWidth",w=R.strokeWidth)&&(e.path.style.strokeWidth=w+"px"),Fe(w=R.pathData,H.pathData)&&(e.path.setPathData(w),H.pathData=w,W.pathData=!0),e.dash&&(!W.pathData&&(!W.strokeWidth||e.dashLen&&e.dashGap)||(R.dashLen=e.dashLen||2*R.strokeWidth,R.dashGap=e.dashGap||R.strokeWidth),W.dash=Xe(e,H,"dashLen",R.dashLen)||W.dash,W.dash=Xe(e,H,"dashGap",R.dashGap)||W.dash,W.dash&&(e.path.style.strokeDasharray=H.dashLen+","+H.dashGap)),F=R.viewBoxBBox,$=H.viewBoxBBox,N=e.svg.viewBox.baseVal,V=e.svg.style,F.x=R.bBoxRel.left+s.left,F.y=R.bBoxRel.top+s.top,F.width=R.bBoxRel.width,F.height=R.bBoxRel.height,["x","y","width","height"].forEach((function(s){(w=F[s])!==$[s]&&(N[s]=$[s]=w,V[ne[s]]=w+("x"===s||"y"===s?e.bodyOffset[s]:0)+"px")})),W.strokeWidth||W.pathListRel||W.bBoxRel}},mouseHoverAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"showEffectName",type:"string"}],style:{backgroundImage:"url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==')",backgroundSize:"",backgroundRepeat:"no-repeat",backgroundColor:"#f8f881",cursor:"default"},hoverStyle:{backgroundImage:"none",backgroundColor:"#fadf8f"},padding:{top:1,right:15,bottom:1,left:2},minHeight:15,backgroundPosition:{right:2,top:2},backgroundSize:{width:12,height:12},dirKeys:[["top","Top"],["right","Right"],["bottom","Bottom"],["left","Left"]],init:function(e,C){var O,D,A,T,B,L,P,I,M,F=w.mouseHoverAnchor,$={};if(e.element=w.pointAnchor.checkElement(C.element),!((I=(P=e.element).ownerDocument)&&(M=I.defaultView)&&M.HTMLElement&&P instanceof M.HTMLElement))throw new Error("`element` must be HTML element");return F.style.backgroundSize=F.backgroundSize.width+"px "+F.backgroundSize.height+"px",["style","hoverStyle"].forEach((function(s){var w=F[s];e[s]=Object.keys(w).reduce((function(e,s){return e[s]=w[s],e}),{})})),"inline"===(O=e.element.ownerDocument.defaultView.getComputedStyle(e.element,"")).display?e.style.display="inline-block":"none"===O.display&&(e.style.display="block"),w.mouseHoverAnchor.dirKeys.forEach((function(s){var w=s[0];s="padding"+s[1];parseFloat(O[s])<F.padding[w]&&(e.style[s]=F.padding[w]+"px")})),e.style.display&&(A=e.element.style.display,e.element.style.display=e.style.display),w.mouseHoverAnchor.dirKeys.forEach((function(s){s="padding"+s[1],e.style[s]&&($[s]=e.element.style[s],e.element.style[s]=e.style[s])})),(P=e.element.getBoundingClientRect()).height<F.minHeight&&(ce?(M=F.minHeight,"content-box"===O.boxSizing?M-=parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth)+parseFloat(O.paddingTop)+parseFloat(O.paddingBottom):"padding-box"===O.boxSizing&&(M-=parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth)),e.style.height=M+"px"):e.style.height=parseFloat(O.height)+(F.minHeight-P.height)+"px"),e.style.backgroundPosition=pe?P.width-F.backgroundSize.width-F.backgroundPosition.right+"px "+F.backgroundPosition.top+"px":"right "+F.backgroundPosition.right+"px top "+F.backgroundPosition.top+"px",e.style.display&&(e.element.style.display=A),w.mouseHoverAnchor.dirKeys.forEach((function(s){s="padding"+s[1],e.style[s]&&(e.element.style[s]=$[s])})),["style","hoverStyle"].forEach((function(s){var w=e[s],O=C[s];me(O)&&Object.keys(O).forEach((function(e){"string"==typeof O[e]||ge(O[e])?w[e]=O[e]:null==O[e]&&delete w[e]}))})),"function"==typeof C.onSwitch&&(L=C.onSwitch),C.showEffectName&&s[C.showEffectName]&&(e.showEffectName=T=C.showEffectName),B=C.animOptions,e.elmStyle=D=e.element.style,e.mouseenter=function(s){e.hoverStyleSave=F.getStyles(D,Object.keys(e.hoverStyle)),F.setStyles(D,e.hoverStyle),e.boundTargets.forEach((function(e){tt(e.props,!0,T,B)})),L&&L(s)},e.mouseleave=function(s){F.setStyles(D,e.hoverStyleSave),e.boundTargets.forEach((function(e){tt(e.props,!1,T,B)})),L&&L(s)},!0},bind:function(e,s){var C,O,D,A,T;return s.props.svg?w.mouseHoverAnchor.llShow(s.props,!1,e.showEffectName):ze((function(){w.mouseHoverAnchor.llShow(s.props,!1,e.showEffectName)})),e.enabled||(e.styleSave=w.mouseHoverAnchor.getStyles(e.elmStyle,Object.keys(e.style)),w.mouseHoverAnchor.setStyles(e.elmStyle,e.style),e.removeEventListener=(C=e.element,O=e.mouseenter,D=e.mouseleave,"onmouseenter"in C&&"onmouseleave"in C?(C.addEventListener("mouseenter",O,!1),C.addEventListener("mouseleave",D,!1),function(){C.removeEventListener("mouseenter",O,!1),C.removeEventListener("mouseleave",D,!1)}):(console.warn("mouseenter and mouseleave events polyfill is enabled."),C.addEventListener("mouseover",A=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||O.apply(this,arguments)}),C.addEventListener("mouseout",T=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||D.apply(this,arguments)}),function(){C.removeEventListener("mouseover",A,!1),C.removeEventListener("mouseout",T,!1)})),e.enabled=!0),!0},unbind:function(e,s){e.enabled&&e.boundTargets.length<=1&&(e.removeEventListener(),w.mouseHoverAnchor.setStyles(e.elmStyle,e.styleSave),e.enabled=!1),w.mouseHoverAnchor.llShow(s.props,!0,e.showEffectName)},removeOption:function(e,s){w.pointAnchor.removeOption(e,s)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.mouseHoverAnchor.unbind(e,s)})))},getBBoxNest:function(e,s){return Le(e.element,s.baseWindow)},llShow:function(e,w,C){s[C||e.curStats.show_effect].stop(e,!0,w),e.aplStats.show_on=w},getStyles:function(e,s){return s.reduce((function(s,w){return s[w]=e[w],s}),{})},setStyles:function(e,s){Object.keys(s).forEach((function(w){e[w]=s[w]}))}},captionLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},x:{},y:{}},textStyleProps:["fontFamily","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","kerning","letterSpacing","wordSpacing","textDecoration"],init:function(e,s){return"string"==typeof s.text&&(e.text=s.text.trim()),!!e.text&&("string"==typeof s.color&&(e.color=s.color.trim()),e.outlineColor="string"==typeof s.outlineColor?s.outlineColor.trim():"#fff",Array.isArray(s.offset)&&ge(s.offset[0])&&ge(s.offset[1])&&(e.offset={x:s.offset[0],y:s.offset[1]}),ge(s.lineOffset)&&(e.lineOffset=s.lineOffset),w.captionLabel.textStyleProps.forEach((function(w){null!=s[w]&&(e[w]=s[w])})),e.updateColor=function(s){w.captionLabel.updateColor(e,s)},e.updateSocketXY=function(s){var w,C=e.curStats,O=e.aplStats,D=s.curStats,A=D.position_socketXYSE[e.socketIndex];null!=A.x&&(e.offset?(C.x=A.x+e.offset.x,C.y=A.y+e.offset.y):(w=e.height/2,s=Math.max(D.attach_plugSideLenSE[e.socketIndex]||0,D.line_strokeWidth/2),D=D.position_socketXYSE[e.socketIndex?0:1],4===A.socketId||2===A.socketId?(C.x=4===A.socketId?A.x-w-e.width:A.x+w,C.y=D.y<A.y?A.y+s+w:A.y-s-w-e.height):(C.x=D.x<A.x?A.x+s+w:A.x-s-w-e.width,C.y=1===A.socketId?A.y-w-e.height:A.y+w)),Xe(e,O,"x",w=C.x)&&(e.elmPosition.x.baseVal.getItem(0).value=w),Xe(e,O,"y",w=C.y)&&(e.elmPosition.y.baseVal.getItem(0).value=w+e.height))},e.updatePath=function(s){var C=e.curStats,O=e.aplStats;(s=s.pathList.animVal||s.pathList.baseVal)&&(s=w.captionLabel.getMidPoint(s,e.lineOffset),C.x=s.x-e.width/2,C.y=s.y-e.height/2,Xe(e,O,"x",s=C.x)&&(e.elmPosition.x.baseVal.getItem(0).value=s),Xe(e,O,"y",s=C.y)&&(e.elmPosition.y.baseVal.getItem(0).value=s+e.height))},e.updateShow=function(s){w.captionLabel.updateShow(e,s)},pe&&(e.adjustEdge=function(s,C){var O=e.curStats;null!=O.x&&w.captionLabel.adjustEdge(C,{x:O.x,y:O.y,width:e.width,height:e.height},e.strokeWidth/2)}),!0)},updateColor:function(e,s){var w=e.curStats,C=e.aplStats;s=s.curStats;w.color=s=e.color||s.line_color,Xe(e,C,"color",s)&&(e.styleFill.fill=s)},updateShow:function(e,s){(s=!0===s.isShown)!==e.isShown&&(e.styleShow.visibility=s?"":"hidden",e.isShown=s)},adjustEdge:function(e,s,w){(w={x1:s.x-w,y1:s.y-w,x2:s.x+s.width+w,y2:s.y+s.height+w}).x1<e.x1&&(e.x1=w.x1),w.y1<e.y1&&(e.y1=w.y1),w.x2>e.x2&&(e.x2=w.x2),w.y2>e.y2&&(e.y2=w.y2)},newText:function(e,s,w,C,O){var D,A,T=s.createElementNS(le,"text");return T.textContent=e,[T.x,T.y].forEach((function(e){var s=w.createSVGLength();s.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),e.baseVal.initialize(s)})),"boolean"!=typeof B&&(B="paintOrder"in T.style),O&&!B?(D=s.createElementNS(le,"defs"),T.id=C,D.appendChild(T),(A=(e=s.createElementNS(le,"g")).appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+C,(s=e.appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+C,(A=A.style).strokeLinejoin="round",{elmPosition:T,styleText:T.style,styleFill:s.style,styleStroke:A,styleShow:e.style,elmsAppend:[D,e]}):(A=T.style,O&&(A.strokeLinejoin="round",A.paintOrder="stroke"),{elmPosition:T,styleText:A,styleFill:A,styleStroke:O?A:null,styleShow:A,elmsAppend:[T]})},getMidPoint:function(e,s){var w,C,O,D=(O=Re(e)).segsLen,A=-1,T=(O=O.lenAll)/2+(s||0);if(T<=0)return 2===(w=e[0]).length?Ve(w[0],w[1],0):Ne(w[0],w[1],w[2],w[3],0);if(O<=T)return 2===(w=e[e.length-1]).length?Ve(w[0],w[1],1):Ne(w[0],w[1],w[2],w[3],1);for(C=[];T>D[++A];)C.push(e[A]),T-=D[A];return 2===(w=e[A]).length?Ve(w[0],w[1],T/D[A]):Ne(w[0],w[1],w[2],w[3],We(w[0],w[1],w[2],w[3],T))},initSvg:function(e,s){var C,O,D=w.captionLabel.newText(e.text,s.baseWindow.document,s.svg,q+"-captionLabel-"+e._id,e.outlineColor);["elmPosition","styleFill","styleShow","elmsAppend"].forEach((function(s){e[s]=D[s]})),e.isShown=!1,e.styleShow.visibility="hidden",w.captionLabel.textStyleProps.forEach((function(s){null!=e[s]&&(D.styleText[s]=e[s])})),D.elmsAppend.forEach((function(e){s.svg.appendChild(e)})),C=D.elmPosition.getBBox(),e.width=C.width,e.height=C.height,e.outlineColor&&(O=C.height/9,D.styleStroke.strokeWidth=(O=10<O?10:O<2?2:O)+"px",D.styleStroke.stroke=e.outlineColor),e.strokeWidth=O||0,Ye(e.aplStats,w.captionLabel.stats),e.updateColor(s),e.refSocketXY?e.updateSocketXY(s):e.updatePath(s),pe&&$e(s,{}),e.updateShow(s)},bind:function(e,s){var C=s.props;return e.color||Ge(C,"cur_line_color",e.updateColor),(e.refSocketXY="startLabel"===s.optionName||"endLabel"===s.optionName)?(e.socketIndex="startLabel"===s.optionName?0:1,Ge(C,"apl_position",e.updateSocketXY),e.offset||(Ge(C,"cur_attach_plugSideLenSE",e.updateSocketXY),Ge(C,"cur_line_strokeWidth",e.updateSocketXY))):Ge(C,"apl_path",e.updatePath),Ge(C,"svgShow",e.updateShow),pe&&Ge(C,"new_edge4viewBox",e.adjustEdge),w.captionLabel.initSvg(e,C),!0},unbind:function(e,s){var C=s.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){C.svg.removeChild(e)})),e.elmPosition=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,w.captionLabel.stats),Ye(e.aplStats,w.captionLabel.stats),e.color||De(C,"cur_line_color",e.updateColor),e.refSocketXY?(De(C,"apl_position",e.updateSocketXY),e.offset||(De(C,"cur_attach_plugSideLenSE",e.updateSocketXY),De(C,"cur_line_strokeWidth",e.updateSocketXY))):De(C,"apl_path",e.updatePath),De(C,"svgShow",e.updateShow),pe&&(De(C,"new_edge4viewBox",e.adjustEdge),$e(C,{}))},removeOption:function(e,s){var w=s.props,C={};C[s.optionName]="",it(w,C)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.captionLabel.unbind(e,s)})))}},pathLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},startOffset:{},pathData:{}},init:function(e,s){return"string"==typeof s.text&&(e.text=s.text.trim()),!!e.text&&("string"==typeof s.color&&(e.color=s.color.trim()),e.outlineColor="string"==typeof s.outlineColor?s.outlineColor.trim():"#fff",ge(s.lineOffset)&&(e.lineOffset=s.lineOffset),w.captionLabel.textStyleProps.forEach((function(w){null!=s[w]&&(e[w]=s[w])})),e.updateColor=function(s){w.captionLabel.updateColor(e,s)},e.updatePath=function(s){var C=e.curStats,O=e.aplStats,D=s.curStats,A=s.pathList.animVal||s.pathList.baseVal;A&&(C.pathData=D=w.pathLabel.getOffsetPathData(A,D.line_strokeWidth/2+e.strokeWidth/2+e.height/4,1.25*e.height),Fe(D,O.pathData)&&(e.elmPath.setPathData(D),O.pathData=D,e.bBox=e.elmPosition.getBBox(),e.updateStartOffset(s)))},e.updateStartOffset=function(s){var w,C,O=e.curStats,D=e.aplStats,A=s.curStats;O.pathData&&(2===e.semIndex&&!e.lineOffset||(C=O.pathData.reduce((function(e,s){var C,O=s.values;switch(s.type){case"M":w={x:O[0],y:O[1]};break;case"L":C={x:O[0],y:O[1]},w&&(e+=Ae(w,C)),w=C;break;case"C":C={x:O[4],y:O[5]},w&&(e+=Te(w,{x:O[0],y:O[1]},{x:O[2],y:O[3]},C)),w=C}return e}),0),s=0===e.semIndex?0:1===e.semIndex?C:C/2,2!==e.semIndex&&(A=Math.max(A.attach_plugBackLenSE[e.semIndex]||0,A.line_strokeWidth/2)+e.strokeWidth/2+e.height/4,s=(s+=0===e.semIndex?A:-A)<0?0:C<s?C:s),e.lineOffset&&(s=(s+=e.lineOffset)<0?0:C<s?C:s),O.startOffset=s,Xe(e,D,"startOffset",s)&&(e.elmOffset.startOffset.baseVal.value=s)))},e.updateShow=function(s){w.captionLabel.updateShow(e,s)},pe&&(e.adjustEdge=function(s,C){e.bBox&&w.captionLabel.adjustEdge(C,e.bBox,e.strokeWidth/2)}),!0)},getOffsetPathData:function(e,s,w){var C,O,D=[];function y(e,s){return Math.abs(e.x-s.x)<3&&Math.abs(e.y-s.y)<3}return e.forEach((function(e){var w,O,A,T,B,L,P,I,M,F,$;2===e.length?(I=e[0],M=e[1],F=s,$=Math.atan2(I.y-M.y,M.x-I.x)+.5*Math.PI,w=[{x:I.x+Math.cos($)*F,y:I.y+Math.sin($)*F*-1},{x:M.x+Math.cos($)*F,y:M.y+Math.sin($)*F*-1}],C?(A=C.points,0<=(P=Math.atan2(A[1].y-A[0].y,A[0].x-A[1].x)-Math.atan2(e[0].y-e[1].y,e[1].x-e[0].x))&&P<=Math.PI?O={type:"line",points:w,inside:!0}:(B=Pe(A[0],A[1],s),T=Pe(w[1],w[0],s),L=A[0],I=w[1],$=(M=B).x-L.x,F=M.y-L.y,P=I.x-T.x,M=I.y-T.y,I=(-F*(L.x-T.x)+$*(L.y-T.y))/(-P*F+$*M),M=(P*(L.y-T.y)-M*(L.x-T.x))/(-P*F+$*M),O=(F=0<=I&&I<=1&&0<=M&&M<=1?{x:L.x+M*$,y:L.y+M*F}:null)?{type:"line",points:[A[1]=F,w[1]]}:(A[1]=y(T,B)?T:B,{type:"line",points:[T,w[1]]}),C.len=Ae(A[0],A[1]))):O={type:"line",points:w},O.len=Ae(O.points[0],O.points[1]),D.push(C=O)):(D.push({type:"cubic",points:function(e,s,w,C,O){for(var D,A,T=Te(e,s,w,C)/16,B=1/(16<O?O/16*T:T),L=[],P=0;A=(90-(D=Ne(e,s,w,C,P)).angle)*(Math.PI/180),L.push({x:D.x+Math.cos(A)*O,y:D.y+Math.sin(A)*O*-1}),!(1<=P);)1<(P+=B)&&(P=1);return L}(e[0],e[1],e[2],e[3],s)}),C=null)})),C=null,D.forEach((function(e){var O;C="line"===e.type?(e.inside&&(C.len>s?((O=C.points)[1]=Pe(O[0],O[1],-s),C.len=Ae(O[0],O[1])):(C.points=null,C.len=0),e.len>s+w?((O=e.points)[0]=Pe(O[1],O[0],-(s+w)),e.len=Ae(O[0],O[1])):(e.points=null,e.len=0)),e):null})),D.reduce((function(e,s){var w=s.points;return w&&(O&&y(w[0],O)||e.push({type:"M",values:[w[0].x,w[0].y]}),"line"===s.type?e.push({type:"L",values:[w[1].x,w[1].y]}):(w.shift(),w.forEach((function(s){e.push({type:"L",values:[s.x,s.y]})}))),O=w[w.length-1]),e}),[])},newText:function(e,s,w,C){var O,D,A,T,L=s.createElementNS(le,"defs"),P=L.appendChild(s.createElementNS(le,"path"));return P.id=O=w+"-path",(A=(D=s.createElementNS(le,"text")).appendChild(s.createElementNS(le,"textPath"))).href.baseVal="#"+O,A.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),A.textContent=e,"boolean"!=typeof B&&(B="paintOrder"in D.style),C&&!B?(D.id=e=w+"-text",L.appendChild(D),(T=(w=s.createElementNS(le,"g")).appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+e,(s=w.appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+e,(T=T.style).strokeLinejoin="round",{elmPosition:D,elmPath:P,elmOffset:A,styleText:D.style,styleFill:s.style,styleStroke:T,styleShow:w.style,elmsAppend:[L,w]}):(T=D.style,C&&(T.strokeLinejoin="round",T.paintOrder="stroke"),{elmPosition:D,elmPath:P,elmOffset:A,styleText:T,styleFill:T,styleStroke:C?T:null,styleShow:T,elmsAppend:[L,D]})},initSvg:function(e,s){var C,O,D,A=w.pathLabel.newText(e.text,s.baseWindow.document,q+"-pathLabel-"+e._id,e.outlineColor);["elmPosition","elmPath","elmOffset","styleFill","styleShow","elmsAppend"].forEach((function(s){e[s]=A[s]})),e.isShown=!1,e.styleShow.visibility="hidden",w.captionLabel.textStyleProps.forEach((function(s){null!=e[s]&&(A.styleText[s]=e[s])})),A.elmsAppend.forEach((function(e){s.svg.appendChild(e)})),A.elmPath.setPathData([{type:"M",values:[0,100]},{type:"h",values:[100]}]),de&&(D=A.elmOffset.href.baseVal,A.elmOffset.href.baseVal=""),C=A.elmPosition.getBBox(),de&&(A.elmOffset.href.baseVal=D),A.styleText.textAnchor=["start","end","middle"][e.semIndex],2!==e.semIndex||e.lineOffset||A.elmOffset.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,50),e.height=C.height,e.outlineColor&&(O=C.height/9,A.styleStroke.strokeWidth=(O=10<O?10:O<2?2:O)+"px",A.styleStroke.stroke=e.outlineColor),e.strokeWidth=O||0,Ye(e.aplStats,w.pathLabel.stats),e.updateColor(s),e.updatePath(s),e.updateStartOffset(s),pe&&$e(s,{}),e.updateShow(s)},bind:function(e,s){var C=s.props;return e.color||Ge(C,"cur_line_color",e.updateColor),Ge(C,"cur_line_strokeWidth",e.updatePath),Ge(C,"apl_path",e.updatePath),e.semIndex="startLabel"===s.optionName?0:"endLabel"===s.optionName?1:2,2===e.semIndex&&!e.lineOffset||Ge(C,"cur_attach_plugBackLenSE",e.updateStartOffset),Ge(C,"svgShow",e.updateShow),pe&&Ge(C,"new_edge4viewBox",e.adjustEdge),w.pathLabel.initSvg(e,C),!0},unbind:function(e,s){var C=s.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){C.svg.removeChild(e)})),e.elmPosition=e.elmPath=e.elmOffset=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,w.pathLabel.stats),Ye(e.aplStats,w.pathLabel.stats),e.color||De(C,"cur_line_color",e.updateColor),De(C,"cur_line_strokeWidth",e.updatePath),De(C,"apl_path",e.updatePath),2===e.semIndex&&!e.lineOffset||De(C,"cur_attach_plugBackLenSE",e.updateStartOffset),De(C,"svgShow",e.updateShow),pe&&(De(C,"new_edge4viewBox",e.adjustEdge),$e(C,{}))},removeOption:function(e,s){var w=s.props,C={};C[s.optionName]="",it(w,C)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.pathLabel.unbind(e,s)})))}}},Object.keys(w).forEach((function(e){ot[e]=function(){return new C(w[e],Array.prototype.slice.call(arguments))}})),ot.positionByWindowResize=!0,window.addEventListener("resize",ve.add((function(){ot.positionByWindowResize&&Object.keys(ut).forEach((function(e){$e(ut[e],{position:!0})}))})),!1),ot}();function focusNextMap(e=!1){const s=this.utils.renderedMaps(),w=s.findIndex((e=>e.classList.contains("focus"))),C=(w+(e?-1:1))%s.length,O=s.at(C);O.classList.add("focus"),O.scrollIntoView({behavior:"smooth"})}const scrollToBlock=e=>{const s=e.parentElement.getBoundingClientRect(),w=e.getBoundingClientRect().height>.8*s.height?"nearest":"center";e.scrollIntoView({behavior:"smooth",block:w})};function focusDelay(){return"none"===window.window.getComputedStyle(this.showcase).display?50:300}function switchToNextLayout(e=!1){const s=this.layouts,w=this.container.dataset.layout,C=s.map((e=>e.name)).indexOf(w),O=s[-1===C?0:(C+(e?-1:1)+s.length)%s.length];this.container.dataset.layout=O.name}const getMarkersFromMaps=e=>Array.from(e.closest(".Dumby").querySelectorAll('.mapclay[data-render="fulfilled"]')).filter((s=>!e.targets||e.targets.includes(s.id))).map((s=>{const w=s.renderer,C=`${e.targets??"all"}@${e.xy}`;return s.querySelector(`.marker[title="${C}"]`)??w.addMarker({xy:e.xy,title:C,type:e.type})})),createGeoLink=e=>{const s=new URL(e.href),w=s.searchParams.get("xy")?.split(",")?.map(Number),C=w??s?.href?.match(/^geo:([-]?[0-9.]+),([-]?[0-9.]+)/)?.splice(1)?.reverse()?.map(Number);return!(!C||isNaN(C[0])||isNaN(C[1]))&&(e.url=s,e.xy=C,e.classList.add("with-leader-line","geolink"),e.targets=e.url.searchParams.get("id")?.split(",")??null,e.type=e.url.searchParams.get("type")??null,e.lines=[],e.onmouseover=()=>{getMarkersFromMaps(e).filter(isAnchorVisible).forEach((s=>{const w=((e,s)=>{const w=new po({start:e,end:s,hide:!0,middleLabel:e.title,path:"magnet"});return w.show("draw",{duration:300}),w})(e,s);e.lines.push(w)}))},e.onmouseout=()=>removeLeaderLines(e),e.onclick=s=>{s.preventDefault(),removeLeaderLines(e),getMarkersFromMaps(e).forEach(updateMapCameraByMarker(e.xy))},!0)},createDocLink=e=>{e.classList.add("with-leader-line","doclink"),e.lines=[],e.onmouseover=()=>{const s=decodeURIComponent(e.href.split("#")[1]),w=e.title.split("=>")[1]??"#"+s;document.querySelectorAll(w).forEach((w=>{if(!w?.checkVisibility())return;const C=new po({start:e,end:w,middleLabel:po.pathLabel({text:s,fontWeight:"bold"}),hide:!0,path:"magnet"});e.lines.push(C),C.show("draw",{duration:300})}))},e.onmouseout=()=>{e.lines.forEach((e=>e.remove())),e.lines.length=0}},removeLeaderLines=e=>{e.lines&&(e.lines.forEach((e=>e.remove())),e.lines=[])},updateMapCameraByMarker=e=>s=>{const w=s.closest(".mapclay")?.renderer;w.updateCamera({center:e},!0)},isAnchorVisible=e=>{const s=e.closest(".mapclay");return(e=>{const s=e.getBoundingClientRect();return s.left>0&&s.right<window.innerWidth+s.width&&s.top>0&&s.bottom<window.innerHeight+s.height})(e)&&((e,s)=>{const w=e.getBoundingClientRect(),C=s.getBoundingClientRect();return w.left<C.right-10&&w.right>C.left+10&&w.top<C.bottom-10&&w.bottom>C.top+10})(e,s)};var ho=Object.freeze({__proto__:null,addAnchorByPoint:({point:e,map:s,validateAnchorName:w=()=>!0})=>{const C=s.getBoundingClientRect(),[O,D]=s.renderer.unproject([e.x-C.left,e.y-C.top]).map((e=>Number(e.toFixed(7))));let A,T;do{A=A?"Anchor name exists":"Name this anchor",T=window.prompt(A,`${O},${D}`)}while(null!==T&&!w(T));if(null===T)return;const B=window.prompt("Description",T)??T,L=`geo:${D},${O}?xy=${O},${D}&id=${s.id}&type=circle`;return s.renderer.addMarker({xy:[O,D],title:`${s.id}@${O},${D}`,type:"circle"}),{ref:T,link:L,title:B}},createDocLink:createDocLink,createGeoLink:createGeoLink,focusDelay:focusDelay,focusNextBlock:function focusNextBlock(e=!1){const s=this.blocks.filter((e=>e.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0}))),w=s.findIndex((e=>e.classList.contains("focus"))),C=(w+(e?-1:1))%s.length;s.forEach((e=>e.classList.remove("focus")));const O=s.at(C);O?.classList?.add("focus"),scrollToBlock(O)},focusNextMap:focusNextMap,removeBlockFocus:function removeBlockFocus(){this.blocks.forEach((e=>e.classList.remove("focus")))},scrollToBlock:scrollToBlock,switchToNextLayout:switchToNextLayout});class Item extends window.HTMLDivElement{constructor({text:e,innerHTML:s,title:w,onclick:C,style:O,className:D}){super(),this.innerHTML=s??e,this.title=w,this.onclick=C,this.style.cssText=O,this.classList.add("menu-item"),D?.forEach((e=>this.classList.add(e))),this.onmouseover=()=>{this.parentElement.querySelectorAll(".sub-menu").forEach((e=>e.remove()))}}}window.customElements.define("menu-item",Item,{extends:"div"});class Folder extends window.HTMLDivElement{constructor({text:e,innerHTML:s,items:w}){super(),this.innerHTML=s??e,this.classList.add("folder","menu-item"),this.items=w,this.onmouseover=()=>{if(this.querySelector(".sub-menu"))return;const e=document.createElement("div");e.className="sub-menu";const s=this.items.length>1?"-20px":"0px";e.style.cssText=`position: absolute; left: 105%; top: ${s};`,this.items.forEach((s=>e.appendChild(s))),e.onmouseleave=()=>e.remove(),this.parentElement.querySelectorAll(".sub-menu").forEach((e=>e.remove())),this.appendChild(e),shiftByWindow(e)}}}window.customElements.define("menu-folder",Folder,{extends:"div"});window.customElements.define("menu-item-suggestion",class Suggestion extends Item{constructor({text:e,replace:s,cm:w}){super({text:e}),this.replace=s,this.classList.add("suggestion"),this.onmouseover=()=>{Array.from(this.parentElement?.children)?.forEach((e=>e.classList.remove("focus"))),this.classList.add("focus")},this.onmouseout=()=>{this.classList.remove("focus")},this.onclick=()=>{const e=w.getCursor();w.setSelection(e,{...e,ch:0}),w.replaceSelection(this.replace),w.focus();const s={...e,ch:this.replace.length};w.setCursor(s)}}},{extends:"div"});const renderResults=({modal:e,modalContent:s},w)=>new Item({text:"Render Results",onclick:()=>{e.open(),e.overlayBlur=3,e.closeByEscKey=!1,document.querySelector(".plainmodal-overlay-force").style.position="relative",s.innerHTML="";const C=document.createElement("div");C.innerHTML=`<a href="${w.renderer.url??w.renderer.use}">Source Code</a>`,s.appendChild(C);const printDetails=e=>{const w={success:"green",fail:"red",skip:"black",stop:"chocolate"}[e.state]??"black";printObject(e,s,`${e.func.name} <span style='float: right;'><span style='display: inline-block; width: 100px; color: ${w};'>${e.state}</span></span>`)},O=document.createElement("h3");O.textContent="Prepare Steps",s.appendChild(O);const D=w.renderer.results.filter((e=>"prepare"===e.type));D.forEach(printDetails);const A=document.createElement("h3");A.textContent="Render Steps",s.appendChild(A);const T=w.renderer.results.filter((e=>"render"===e.type));T.forEach(printDetails)}});function printObject(e,s,w=null){const C=document.createElement("details"),O=w??(e instanceof Error?e.name:Object.values(e)[0]);C.innerHTML=`<summary>${O}</summary>`,s.appendChild(C),C.onclick=()=>{if(!C.querySelector(":scope > :not(summary)"))if(e instanceof Error){["name","message","stack",...Object.keys(e)].forEach((s=>{const w=e[s],O="stack"===s?`<pre>${w}</pre>`:w,D=document.createElement("p");D.innerHTML=`<strong>${s}</strong>: ${O}`,C.appendChild(D)}))}else Object.entries(e).forEach((([e,s])=>{if("object"==typeof s&&null!==s)printObject(s,C,e);else{const w="function"==typeof s?`<pre>${s}</pre>`:s??typeof s,O=document.createElement("p");O.innerHTML=`<strong>${e}</strong>: ${w}`,C.appendChild(O)}}))}}function ucf(e){return e.substr(0,1).toUpperCase()+e.substr(1)}var fo=["webkit","moz","ms","o"],mo=fo.reduce((function(e,s){return e.push(s),e.push(ucf(s)),e}),[]),go=fo.map((function(e){return"-".concat(e,"-")})),yo=function(){var e;return function(){return e=e||document.createElement("div").style}}(),vo=function(){var e=new RegExp("^(?:"+fo.join("|")+")(.)","i"),s=/[A-Z]/;return function(w){return"float"===(w=(w+"").replace(/\s/g,"").replace(/-([\da-z])/gi,(function(e,s){return s.toUpperCase()})).replace(e,(function(e,w){return s.test(w)?w.toLowerCase():e}))).toLowerCase()?"cssFloat":w}}(),_o=function(){var e=new RegExp("^(?:"+go.join("|")+")","i");return function(s){return(null!=s?s+"":"").replace(/\s/g,"").replace(e,"")}}(),cssSupports=function(e,s){var w=yo();return e=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),w.setProperty(e,s),null!=w[e]&&w.getPropertyValue(e)===s},bo={},ko={};function getName(e){if((e=vo(e))&&null==bo[e]){var s=yo();if(null!=s[e])bo[e]=e;else{var w=ucf(e);mo.some((function(C){var O=C+w;return null!=s[O]&&(bo[e]=O,!0)}))||(bo[e]=!1)}}return bo[e]||void 0}var Eo={getName:getName,getValue:function getValue(e,s){var w;return(e=getName(e))?(ko[e]=ko[e]||{},(Array.isArray(s)?s:[s]).some((function(s){return s=_o(s),null!=ko[e][s]?!1!==ko[e][s]&&(w=ko[e][s],!0):cssSupports(e,s)?(w=ko[e][s]=s,!0):!!go.some((function(C){var O=C+s;return!!cssSupports(e,O)&&(w=ko[e][s]=O,!0)}))||(ko[e][s]=!1,!1)})),"string"==typeof w?w:void 0):w}};function normalize(e){return(e+"").trim()}function applyList(e,s){s.setAttribute("class",e.join(" "))}function mClassList(e){return!mClassList.ignoreNative&&e.classList||function(){var s=(e.getAttribute("class")||"").trim().split(/\s+/).filter((function(e){return!!e})),w={length:s.length,item:function item(e){return s[e]},contains:function contains(e){return-1!==s.indexOf(normalize(e))},add:function add(){return function _add(e,s,w){w.filter((function(s){return!(!(s=normalize(s))||-1!==e.indexOf(s)||(e.push(s),0))})).length&&applyList(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList.methodChain?w:void 0},remove:function remove(){return function _remove(e,s,w){w.filter((function(s){var w;return!(!(s=normalize(s))||-1===(w=e.indexOf(s))||(e.splice(w,1),0))})).length&&applyList(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList.methodChain?w:void 0},toggle:function toggle(w,C){return function _toggle(e,s,w,C){var O=e.indexOf(w=normalize(w));return-1!==O?!!C||(e.splice(O,1),applyList(e,s),!1):!1!==C&&(e.push(w),applyList(e,s),!0)}(s,e,w,C)},replace:function replace(C,O){return function _replace(e,s,w,C){var O;(w=normalize(w))&&(C=normalize(C))&&w!==C&&-1!==(O=e.indexOf(w))&&(e.splice(O,1),-1===e.indexOf(C)&&e.push(C),applyList(e,s))}(s,e,C,O),mClassList.methodChain?w:void 0}};return w}()}mClassList.methodChain=!0;var xo,So=1e3/60,wo=[],Co=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,So)},Oo=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},Do=Date.now();function step(){var e,s;xo&&(Oo.call(window,xo),xo=null),wo.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(Do=Date.now(),s=!0):Date.now()-Do<500&&(s=!0),s&&(xo=Co.call(window,step))}function indexOfTasks(e){var s=-1;return wo.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}var Ao=function add(e){var s;return-1===indexOfTasks(e)?(wo.push(s={listener:e}),function(e){s.event=e,xo||step()}):null};function _defineProperties$4(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var To="timed",Bo="".concat(To,"TransitionRun"),Lo="".concat(To,"TransitionStart"),Po="".concat(To,"TransitionEnd"),Io="".concat(To,"TransitionCancel"),Mo="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Fo=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},$o={},No=0;function fireEvent(e,s){var w,C=(Math.min(Math.max(-e.delay,0),e.duration)+(s!==Po&&s!==Io||!e.startTime?0:Date.now()-e.startTime))/1e3;try{w=new e.window.TransitionEvent(s,{propertyName:e.options.property,pseudoElement:e.options.pseudoElement,elapsedTime:C,bubbles:!0,cancelable:!1}),Mo&&(w.pseudoElement=e.options.pseudoElement)}catch(O){(w=e.window.document.createEvent("TransitionEvent")).initTransitionEvent(s,!0,!1,e.options.property,C),w.pseudoElement=e.options.pseudoElement}w.timedTransition=e.ins,e.element.dispatchEvent(w)}function fixCurrentPosition(e){if(2===e.state){var s=Date.now()-e.startTime;e.currentPosition=e.isOn?Math.min(e.currentPosition+s,e.duration):Math.max(e.currentPosition-s,0)}}function finishAll(e){e.state=0,e.runTime=0,e.startTime=0,e.currentPosition=e.isOn?e.duration:0}function finishPlaying(e){2===e.state&&(e.state=0,fireEvent(e,Po),finishAll(e))}function finishDelaying(e){if(1===e.state){e.state=2,e.startTime=Date.now(),e.isReversing=!e.isOn,fireEvent(e,Lo);var s=e.isOn?e.duration-e.currentPosition:e.currentPosition;s>0?e.timer=setTimeout((function(){finishPlaying(e)}),s):finishPlaying(e)}}function abort(e){clearTimeout(e.timer),0!==e.state&&(e.state=0,fireEvent(e,Io))}function _setOptions$3(e,s){var w=e.options;function parseAsCss(w){var C="number"==typeof s[w]?(e.window.getComputedStyle(e.element,"")[Eo.getName("transition-".concat(w))]||"").split(",")[s[w]]:s[w];return"string"==typeof C?C.trim():null}"string"==typeof s.pseudoElement&&(w.pseudoElement=s.pseudoElement);var C=parseAsCss("property");"string"==typeof C&&"all"!==C&&"none"!==C&&(w.property=C),["duration","delay"].forEach((function(s){var C,O,D=parseAsCss(s);"string"==typeof D&&(/^[0.]+$/.test(D)?(w[s]="0s",e[s]=0):(C=/^(.+?)(m)?s$/.exec(D))&&Fo(O=parseFloat(C[1]))&&("duration"!==s||O>=0)&&(w[s]="".concat(O).concat(C[2]||"","s"),e[s]=O*(C[2]?1:1e3)))})),["procToOn","procToOff"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}var Vo=function(){function TimedTransition(e,s,w){!function _classCallCheck$4(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,TimedTransition);var C={ins:this,options:{pseudoElement:"",property:""},duration:0,delay:0,isOn:!!w};if(Object.defineProperty(this,"_id",{value:++No}),C._id=this._id,$o[this._id]=C,!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)throw new Error("This `element` is not accepted.");C.element=e,s||(s={}),C.window=e.ownerDocument.defaultView||s.window||window,s.hasOwnProperty("property")||(s.property=0),s.hasOwnProperty("duration")||(s.duration=0),s.hasOwnProperty("delay")||(s.delay=0),_setOptions$3(C,s),finishAll(C)}return function _createClass$4(e,s,w){return s&&_defineProperties$4(e.prototype,s),w&&_defineProperties$4(e,w),e}(TimedTransition,[{key:"remove",value:function remove(){var e=$o[this._id];clearTimeout(e.timer),delete $o[this._id]}},{key:"setOptions",value:function setOptions(e){return e&&_setOptions$3($o[this._id],e),this}},{key:"on",value:function on(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _on(e,s,w){e.isOn&&0===e.state||e.isOn&&0!==e.state&&!s||(e.options.procToOn&&(w.unshift(!!s),e.options.procToOn.apply(e.ins,w)),s||!e.isOn&&1===e.state||-e.delay>e.duration?(abort(e),e.isOn=!0,finishAll(e)):(fixCurrentPosition(e),abort(e),e.state=1,e.isOn=!0,e.runTime=Date.now(),e.startTime=0,fireEvent(e,Bo),e.delay>0?e.timer=setTimeout((function(){finishDelaying(e)}),e.delay):(e.delay<0&&(e.currentPosition=Math.min(e.currentPosition-e.delay,e.duration)),finishDelaying(e))))}($o[this._id],e,Array.prototype.slice.call(arguments,2)),this}},{key:"off",value:function off(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _off(e,s,w){!e.isOn&&0===e.state||!e.isOn&&0!==e.state&&!s||(e.options.procToOff&&(w.unshift(!!s),e.options.procToOff.apply(e.ins,w)),s||e.isOn&&1===e.state||-e.delay>e.duration?(abort(e),e.isOn=!1,finishAll(e)):(fixCurrentPosition(e),abort(e),e.state=1,e.isOn=!1,e.runTime=Date.now(),e.startTime=0,fireEvent(e,Bo),e.delay>0?e.timer=setTimeout((function(){finishDelaying(e)}),e.delay):(e.delay<0&&(e.currentPosition=Math.max(e.currentPosition+e.delay,0)),finishDelaying(e))))}($o[this._id],e,Array.prototype.slice.call(arguments,2)),this}},{key:"state",get:function get(){return $o[this._id].state}},{key:"element",get:function get(){return $o[this._id].element}},{key:"isReversing",get:function get(){return $o[this._id].isReversing}},{key:"pseudoElement",get:function get(){return $o[this._id].options.pseudoElement},set:function set(e){_setOptions$3($o[this._id],{pseudoElement:e})}},{key:"property",get:function get(){return $o[this._id].options.property},set:function set(e){_setOptions$3($o[this._id],{property:e})}},{key:"duration",get:function get(){return $o[this._id].options.duration},set:function set(e){_setOptions$3($o[this._id],{duration:e})}},{key:"delay",get:function get(){return $o[this._id].options.delay},set:function set(e){_setOptions$3($o[this._id],{delay:e})}},{key:"procToOn",get:function get(){return $o[this._id].options.procToOn},set:function set(e){_setOptions$3($o[this._id],{procToOn:e})}},{key:"procToOff",get:function get(){return $o[this._id].options.procToOff},set:function set(e){_setOptions$3($o[this._id],{procToOff:e})}}],[{key:"STATE_STOPPED",get:function get(){return 0}},{key:"STATE_DELAYING",get:function get(){return 1}},{key:"STATE_PLAYING",get:function get(){return 2}}]),TimedTransition}();function _defineProperties$3(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}mClassList.ignoreNative=!0;var Ro="plainoverlay",Ho="".concat(Ro,"-style"),zo=Ro,Wo="".concat(Ro,"-doc"),jo="".concat(Ro,"-show"),Xo="".concat(Ro,"-hide"),qo="".concat(Ro,"-force"),Yo="".concat(Ro,"-body"),Go="".concat(Ro,"-builtin-face-defs"),Uo="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Zo=!Uo&&!!document.uniqueID,Ko="MozAppearance"in document.documentElement.style,Jo=!(Uo||Ko||!window.chrome||!window.CSS),Qo=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),er=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},tr={},nr=0;function setStyle(e,s,w,C){var O=e.style;return(C||Object.keys(s)).forEach((function(e){null!=s[e]&&(w&&null==w[e]&&(w[e]=O[e]),O[e]=s[e],s[e]=null)})),e}function restoreStyle(e,s,w){return setStyle(e,s,null,w)}function getBBox$1(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,right:w.right,bottom:w.bottom,width:w.width,height:w.height};return s&&(C.left+=s.pageXOffset,C.right+=s.pageXOffset,C.top+=s.pageYOffset,C.bottom+=s.pageYOffset),C}function scrollLeft(e,s,w,C){return s?(null!=C&&w.scrollTo(C,w.pageYOffset),w.pageXOffset):(null!=C&&(e.scrollLeft=C),e.scrollLeft)}function scrollTop(e,s,w,C){return s?(null!=C&&w.scrollTo(w.pageXOffset,C),w.pageYOffset):(null!=C&&(e.scrollTop=C),e.scrollTop)}function getDocClientWH(e){var s=e.elmTarget,w=s.clientWidth,C=s.clientHeight;if(Zo||Uo){var O=e.window.getComputedStyle(e.elmTargetBody,""),D=O.writingMode||O["writing-mode"],A=O.direction;return"tb-rl"===D||"bt-rl"===D||"tb-lr"===D||"bt-lr"===D||Uo&&("ltr"===A&&("vertical-rl"===D||"vertical-lr"===D)||"rtl"===A&&("vertical-rl"===D||"vertical-lr"===D))?{width:C,height:w}:{width:w,height:C}}return{width:w,height:C}}function restoreScroll(e,s){function scrollElement(s,w,C,O){try{scrollLeft(s,w,e.window,C),scrollTop(s,w,e.window,O)}catch(e){}}return s?e.savedElementsScroll.some((function(e){return e.element===s&&(scrollElement(e.element,e.isDoc,e.left,e.top),!0)})):(e.savedElementsScroll.forEach((function(e){scrollElement(e.element,e.isDoc,e.left,e.top)})),!0)}function avoidFocus(e,s){return!((!e.isDoc||s===s.ownerDocument.body||e.elmOverlay.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)&&(e.isDoc||!(s===e.elmTargetBody||e.elmTargetBody.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)))&&(s.blur?s.blur():s.ownerDocument.body.focus(),!0)}function avoidSelect(e){var s=("getSelection"in window?e.window:e.document).getSelection();if(s.rangeCount&&(e.isDoc?!function nodeContainsSel(e,s){var w=e.ownerDocument.createRange(),C=s.rangeCount;w.selectNode(e);for(var O=0;O<C;O++){var D=s.getRangeAt(O);if(D.compareBoundaryPoints(Range.START_TO_START,w)<0||D.compareBoundaryPoints(Range.END_TO_END,w)>0)return!1}return!0}(e.elmOverlayBody,s):!s.containsNode||Jo&&s.isCollapsed?function selContainsNode(e,s,w){var C=s.ownerDocument.createRange(),O=e.rangeCount;C.selectNodeContents(s);for(var D=0;D<O;D++){var A=e.getRangeAt(D);if(!A.toString().length&&e.toString().length&&1===O&&(A.setStart(e.anchorNode,e.anchorOffset),A.setEnd(e.focusNode,e.focusOffset),A.toString()!==e.toString()&&(A.setStart(e.focusNode,e.focusOffset),A.setEnd(e.anchorNode,e.anchorOffset),A.toString()!==e.toString())))throw new Error("Edge bug (Issue #7321753); Couldn't recover");if(A.compareBoundaryPoints(Range.START_TO_END,C)>=0&&A.compareBoundaryPoints(Range.END_TO_START,C)<=0)return!0}return!1}(s,e.elmTargetBody):s.containsNode(e.elmTargetBody,!0))){try{s.removeAllRanges()}catch(e){}if(e.document.body.focus(),s.rangeCount>0)try{s.removeAllRanges()}catch(e){}return!0}return!1}function disableDocBars(e){var s=e.elmTarget,w=e.elmTargetBody,C=w.getBoundingClientRect(),O=getDocClientWH(e),D=-O.width,A=-O.height;if(setStyle(s,{overflow:"hidden"},e.savedStyleTarget),D+=(O=getDocClientWH(e)).width,A+=O.height,D||A){var T,B,L=e.window.getComputedStyle(w,"");if(Zo||Uo){var P=L.writingMode||L["writing-mode"],I=L.direction;D&&(T=function barLeft(e,s){var w="rl-tb"===e||"tb-rl"===e||"bt-rl"===e||"rl-bt"===e;return Zo&&w||Uo&&(w||"rtl"===s&&("horizontal-tb"===e||"vertical-rl"===e)||"ltr"===s&&"vertical-rl"===e)}(P,I)?"marginLeft":"marginRight"),A&&(B=function barTop(e,s){var w="bt-rl"===e||"bt-lr"===e||"lr-bt"===e||"rl-bt"===e;return Zo&&w||Uo&&(w||"rtl"===s&&("vertical-lr"===e||"vertical-rl"===e))}(P,I)?"marginTop":"marginBottom")}else D&&(T="marginRight"),A&&(B="marginBottom");var M={};return D&&(M[T]="".concat(parseFloat(L[T])+D,"px")),A&&(M[B]="".concat(parseFloat(L[B])+A,"px")),setStyle(w,M,e.savedStyleTargetBody),function resizeTarget(e,s,w){var C=e.elmTargetBody,O=C.getBoundingClientRect();if(!(Math.abs(O.width-s)<.5&&Math.abs(O.height-w)<.5)){var D=e.window.getComputedStyle(C,""),A=D.boxSizing,T="border-box"===A?[]:"padding-box"===A?["border"]:["border","padding"],B={border:{width:["borderLeftWidth","borderRightWidth"],height:["borderTopWidth","borderBottomWidth"]},padding:{width:["paddingLeft","paddingRight"],height:["paddingTop","paddingBottom"]}},L=["width","height"].reduce((function(e,s){return T.forEach((function(w){B[w][s].forEach((function(w){e[s]-=parseFloat(D[w])}))})),e}),{width:s,height:w});setStyle(C,{width:L.width>0?"".concat(L.width,"px"):0,height:L.height>0?"".concat(L.height,"px"):0},e.savedStyleTargetBody);var P={};O=C.getBoundingClientRect(),Math.abs(O.width-s)>=.5&&(P.width="".concat(L.width-(O.width-s),"px")),O.height!==w&&(P.height="".concat(L.height-(O.height-w),"px")),setStyle(C,P,e.savedStyleTargetBody)}}(e,C.width,C.height),restoreScroll(e,s),!0}return restoreStyle(s,e.savedStyleTarget,["overflow"]),!1}function _position(e,s){var w=e.elmTargetBody,C=e.window.getComputedStyle(w,""),O=e.elmOverlay,D=e.window.getComputedStyle(O,""),A=getBBox$1(O,e.window),T=["Top","Right","Bottom","Left"].reduce((function(e,s){return e[s.toLowerCase()]=parseFloat(C["border".concat(s,"Width")]),e}),{}),B=A.left-parseFloat(D.left),L=A.top-parseFloat(D.top),P={left:"".concat(s.left-B+T.left,"px"),top:"".concat(s.top-L+T.top,"px"),width:"".concat(s.width-T.left-T.right,"px"),height:"".concat(s.height-T.top-T.bottom,"px")},I=/^([\d.]+)(px|%)$/;[{prop:"TopLeft",hBorder:"left",vBorder:"top"},{prop:"TopRight",hBorder:"right",vBorder:"top"},{prop:"BottomRight",hBorder:"right",vBorder:"bottom"},{prop:"BottomLeft",hBorder:"left",vBorder:"bottom"}].forEach((function(e){var w=Eo.getName("border".concat(e.prop,"Radius")),O=C[w].split(" "),D=O[0],A=O[1]||O[0],B=I.exec(D);D=B?"px"===B[2]?+B[1]:B[1]*s.width/100:0,A=(B=I.exec(A))?"px"===B[2]?+B[1]:B[1]*s.height/100:0,D-=T[e.hBorder],A-=T[e.vBorder],D>0&&A>0&&(P[w]="".concat(D,"px ").concat(A,"px"))})),setStyle(O,P),e.targetBodyBBox=s}function getTargetElements(e){var s=e.elmTargetBody,w=e.elmOverlay,C=[e.elmTarget];return e.isDoc?(C.push(s),Array.prototype.slice.call(s.childNodes).forEach((function(e){e.nodeType!==Node.ELEMENT_NODE||e===w||mClassList(e).contains(zo)||e.id===Go||(C.push(e),Array.prototype.push.apply(C,e.querySelectorAll("*")))}))):Array.prototype.push.apply(C,s.querySelectorAll("*")),C}function finishShowing(e){if(e.filterElements=null,!1!==e.options.blur){var s=Eo.getName("filter"),w=Eo.getValue("filter","blur(".concat(e.options.blur,"px)"));if(w){var C=e.isDoc?Array.prototype.slice.call(e.elmTargetBody.childNodes).filter((function(s){return s.nodeType===Node.ELEMENT_NODE&&s!==e.elmOverlay&&!mClassList(s).contains(zo)&&s.id!==Go})).map((function(e){return{element:e,savedStyle:{}}})):[{element:e.elmTargetBody,savedStyle:{}}];C.forEach((function(e){var C={};C[s]=w,setStyle(e.element,C,e.savedStyle)})),e.filterElements=C}}e.state=2,e.options.onShow&&e.options.onShow.call(e.ins)}function finishHiding(e){if(mClassList(e.elmOverlay).add(Xo),restoreStyle(e.elmTarget,e.savedStyleTarget),restoreStyle(e.elmTargetBody,e.savedStyleTargetBody),e.savedStyleTarget={},e.savedStyleTargetBody={},function restoreAccKeys(e){e.savedElementsAccKeys.forEach((function(e){try{!1===e.tabIndex?e.element.removeAttribute("tabindex"):null!=e.tabIndex&&(e.element.tabIndex=e.tabIndex)}catch(e){}try{e.accessKey&&(e.element.accessKey=e.accessKey)}catch(e){}}))}(e),e.savedElementsAccKeys=[],e.isDoc&&e.activeElement){var s=e.state;e.state=0,e.elmTargetBody.removeEventListener("focus",e.focusListener,!0),e.activeElement.focus(),e.state=s}e.activeElement=null,e.timerRestoreAndFinish&&(clearTimeout(e.timerRestoreAndFinish),e.timerRestoreAndFinish=null),e.timerRestoreAndFinish=setTimeout((function restoreAndFinish(){e.timerRestoreAndFinish=null,e.state=0,e.elmTargetBody.addEventListener("focus",e.focusListener,!0),restoreScroll(e),e.savedElementsScroll=null,e.options.onHide&&e.options.onHide.call(e.ins)}),0)}function _show(e,s){if(!(2===e.state||1===e.state&&!s||1!==e.state&&e.options.onBeforeShow&&!1===e.options.onBeforeShow.call(e.ins))){if(0===e.state){var w=e.elmOverlay,C=mClassList(w);e.document.body.appendChild(w);var O=getTargetElements(e);if(C.remove(Xo),!e.isDoc){var D=e.elmTargetBody;"inline"===e.window.getComputedStyle(D,"").display&&setStyle(D,{display:"inline-block"},e.savedStyleTargetBody),_position(e,getBBox$1(D,e.window))}e.savedElementsScroll=function getScroll(s,w){var C=[];return s.forEach((function(s,O){var D=w&&0===O;(function elementCanScroll(s,w){var C=e.window.getComputedStyle(s,""),O=s.nodeName.toLowerCase();return"scroll"===C.overflow||"auto"===C.overflow||"scroll"===C.overflowX||"auto"===C.overflowX||"scroll"===C.overflowY||"auto"===C.overflowY||w&&("visible"===C.overflow||"visible"===C.overflowX||"visible"===C.overflowY)||!w&&("textarea"===O||"select"===O)})(s,D)&&C.push({element:s,isDoc:D,left:scrollLeft(s,D,e.window),top:scrollTop(s,D,e.window)})})),C}(O,e.isDoc),e.disabledDocBars=!1,e.isDoc&&e.savedElementsScroll.length&&e.savedElementsScroll[0].isDoc&&(e.disabledDocBars=disableDocBars(e)),e.savedElementsAccKeys=function disableAccKeys(e,s){var w=[];return e.forEach((function(e,C){if(!s||0!==C){var O={},D=e.tabIndex;-1!==D&&(O.element=e,O.tabIndex=!!e.hasAttribute("tabindex")&&D,e.tabIndex=-1);var A=e.accessKey;A&&(O.element=e,O.accessKey=A,e.accessKey=""),O.element&&w.push(O)}})),w}(O,e.isDoc),e.activeElement=e.document.activeElement,e.activeElement&&avoidFocus(e,e.activeElement),avoidSelect(e),w.offsetWidth,e.options.onPosition&&e.options.onPosition.call(e.ins)}e.transition.on(s),e.state=1,s&&finishShowing(e)}}function _setOptions$2(e,s){var w=e.options;if(s.hasOwnProperty("face")&&(null==s.face?void 0:s.face)!==w.face){for(var C=e.elmOverlayBody;C.firstChild;)C.removeChild(C.firstChild);if(!1===s.face)w.face=!1;else if(s.face&&s.face.nodeType===Node.ELEMENT_NODE)w.face=s.face,C.appendChild(s.face);else if(null==s.face){var O=e.document;if(!O.getElementById(Go)){var D=(new e.window.DOMParser).parseFromString('<svg id="plainoverlay-builtin-face-defs" xmlns="http://www.w3.org/2000/svg" version="1.1"><defs><linearGradient id="plainoverlay-builtin-face_01-grad" gradientUnits="userSpaceOnUse" x1="160" y1="20" x2="300" y2="160"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset="0.2" stop-color="#fff" stop-opacity="0.1"/><stop offset="1" stop-color="#fff" stop-opacity="1"/></linearGradient><g id="plainoverlay-builtin-face_01"><circle cx="160" cy="160" r="140"/><path d="M160 20a140 140 0 0 1 140 140" stroke="url(\'#plainoverlay-builtin-face_01-grad\')"/></g></defs></svg>',"image/svg+xml");O.body.appendChild(D.documentElement)}w.face=void 0,C.innerHTML='<svg class="plainoverlay-builtin-face plainoverlay-builtin-face_01" version="1.1" viewBox="0 0 320 320"><use xlink:href="#plainoverlay-builtin-face_01"/></svg>'}}er(s.duration)&&s.duration!==w.duration&&(w.duration=s.duration,e.elmOverlay.style[Eo.getName("transitionDuration")]=200===s.duration?"":"".concat(s.duration,"ms"),e.transition.duration="".concat(s.duration,"ms")),(er(s.blur)||!1===s.blur)&&(w.blur=s.blur),Qo(s.style)&&setStyle(e.elmOverlay,s.style),["onShow","onHide","onBeforeShow","onBeforeHide","onPosition"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}function scroll(e,s,w,C){var O,D;if(s){if(-1===getTargetElements(e).indexOf(s))return D;O="html"===s.nodeName.toLowerCase()}else s=e.elmTarget,O=e.isDoc;var A,T=null!=C&&e.savedElementsScroll&&(e.savedElementsScroll.find?e.savedElementsScroll.find((function(e){return e.element===s})):(e.savedElementsScroll.some((function(e){return e.element===s&&(A=e,!0)})),A));return D=(w?scrollLeft:scrollTop)(s,O,e.window,C),T&&(T[w?"left":"top"]=D),D}var or=function(){function PlainOverlay(e,s){function getTarget(e){var s;if(e)if(e.nodeType){if(e.nodeType===Node.DOCUMENT_NODE)s=e.documentElement;else if(e.nodeType===Node.ELEMENT_NODE){var w=e.nodeName.toLowerCase();s="body"===w?e.ownerDocument.documentElement:"iframe"===w||"frame"===w?e.contentDocument.documentElement:e}if(!s)throw new Error("This element is not accepted.")}else e===e.window&&(s=e.document.documentElement);else s=document.documentElement;return s}!function _classCallCheck$3(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainOverlay);var w={ins:this,options:{face:!1,duration:200,blur:!1},state:0,savedStyleTarget:{},savedStyleTargetBody:{},blockingDisabled:!1};if(Object.defineProperty(this,"_id",{value:++nr}),w._id=this._id,tr[this._id]=w,1===arguments.length){if(!(w.elmTarget=getTarget(e))){if(!Qo(e))throw new Error("Invalid argument.");w.elmTarget=document.documentElement,s=e}}else if(!(w.elmTarget=getTarget(e)))throw new Error("This target is not accepted.");if(s){if(!Qo(s))throw new Error("Invalid options.")}else s={};w.isDoc="html"===w.elmTarget.nodeName.toLowerCase();var C=w.document=w.elmTarget.ownerDocument;w.window=C.defaultView;var O=w.elmTargetBody=w.isDoc?C.body:w.elmTarget;if(!C.getElementById(Ho)){var D=C.getElementsByTagName("head")[0]||C.documentElement,A=D.insertBefore(C.createElement("style"),D.firstChild);A.type="text/css",A.id=Ho,A.textContent=".plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01,.plainoverlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainoverlay{position:absolute;left:0;top:0;overflow:hidden;background-color:rgba(136,136,136,.6);cursor:wait;z-index:9000;transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:0}.plainoverlay.plainoverlay-show{opacity:1}.plainoverlay.plainoverlay-force{transition-property:none}.plainoverlay.plainoverlay-hide{display:none}.plainoverlay.plainoverlay-doc{position:fixed;left:-200px;top:-200px;overflow:visible;padding:200px;width:100vw;height:100vh}.plainoverlay-body{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plainoverlay.plainoverlay-doc .plainoverlay-body{width:100vw;height:100vh}.plainoverlay-builtin-face{width:90%;height:90%;max-width:320px;max-height:320px}#plainoverlay-builtin-face-defs{width:0;height:0;position:fixed;left:-100px;top:-100px}#plainoverlay-builtin-face_01 circle,#plainoverlay-builtin-face_01 path{fill:none;stroke-width:40px}#plainoverlay-builtin-face_01 circle{stroke:#fff;opacity:.25}#plainoverlay-builtin-face_01 path{stroke-linecap:round}.plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01{-webkit-animation-name:plainoverlay-builtin-face_01-spin;animation-name:plainoverlay-builtin-face_01-spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",(Zo||Uo)&&function forceReflow$1(e){setTimeout((function(){var s=e.parentNode,w=e.nextSibling;s.insertBefore(s.removeChild(e),w)}),0)}(A)}var T,B=w.elmOverlay=C.createElement("div"),L=mClassList(B);L.add(zo,Xo),w.isDoc&&L.add(Wo),w.transition=new Vo(B,{procToOn:function procToOn(e){var s=mClassList(B);s.toggle(qo,!!e),s.add(jo)},procToOff:function procToOff(e){var s=mClassList(B);s.toggle(qo,!!e),s.remove(jo)},property:"opacity",duration:"".concat(200,"ms")}),B.addEventListener("timedTransitionEnd",(function(e){e.target===B&&"opacity"===e.propertyName&&(1===w.state?finishShowing(w):3===w.state&&finishHiding(w))}),!0),(w.isDoc?w.window:O).addEventListener("scroll",(function(e){var s=e.target;0!==w.state&&!w.blockingDisabled&&restoreScroll(w,!w.isDoc||s!==w.window&&s!==w.document&&s!==w.elmTargetBody?s:w.elmTarget)&&(e.preventDefault(),e.stopImmediatePropagation())}),!0),w.focusListener=function(e){0!==w.state&&!w.blockingDisabled&&avoidFocus(w,e.target)&&(e.preventDefault(),e.stopImmediatePropagation())},O.addEventListener("focus",w.focusListener,!0),T=function(e){0!==w.state&&!w.blockingDisabled&&avoidSelect(w)&&(e.preventDefault(),e.stopImmediatePropagation())},["keyup","mouseup"].forEach((function(e){w.window.addEventListener(e,T,!0)})),w.resizing=!1,w.window.addEventListener("resize",Ao((function(){if(!w.resizing){if(w.resizing=!0,0!==w.state){if(w.isDoc)w.savedElementsScroll.length&&w.savedElementsScroll[0].isDoc&&(w.disabledDocBars&&(restoreStyle(w.elmTarget,w.savedStyleTarget,["overflow"]),restoreStyle(O,w.savedStyleTargetBody,["marginLeft","marginRight","marginTop","marginBottom","width","height"])),w.disabledDocBars=disableDocBars(w));else{var e=getBBox$1(O,w.window),s=w.targetBodyBBox;e.left===s.left&&e.top===s.top&&e.width===s.width&&e.height===s.height||_position(w,e)}w.options.onPosition&&w.options.onPosition.call(w.ins)}w.resizing=!1}})),!0),B.addEventListener("touchmove",(function(e){0!==w.state&&(e.preventDefault(),e.stopImmediatePropagation())}),!0),(w.elmOverlayBody=B.appendChild(C.createElement("div"))).className=Yo,C.body.appendChild(B),s.hasOwnProperty("face")||(s.face=null),_setOptions$2(w,s)}return function _createClass$3(e,s,w){return s&&_defineProperties$3(e.prototype,s),w&&_defineProperties$3(e,w),e}(PlainOverlay,[{key:"setOptions",value:function setOptions(e){return Qo(e)&&_setOptions$2(tr[this._id],e),this}},{key:"show",value:function show(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),_show(tr[this._id],e),this}},{key:"hide",value:function hide(e){return function _hide(e,s){if(!(0===e.state||3===e.state&&!s||3!==e.state&&e.options.onBeforeHide&&!1===e.options.onBeforeHide.call(e.ins))){e.filterElements&&(e.filterElements.forEach((function(e){restoreStyle(e.element,e.savedStyle)})),e.filterElements=null);var w=e.document.activeElement;w&&w!==w.ownerDocument.body&&e.elmOverlay.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY&&(w.blur?w.blur():w.ownerDocument.body.focus()),e.transition.off(s),e.state=3,s&&finishHiding(e)}}(tr[this._id],e),this}},{key:"scrollLeft",value:function scrollLeft(e,s){return scroll(tr[this._id],s,!0,e)}},{key:"scrollTop",value:function scrollTop(e,s){return scroll(tr[this._id],s,!1,e)}},{key:"position",value:function position(){var e=tr[this._id];return 0!==e.state&&(e.isDoc||_position(e,getBBox$1(e.elmTargetBody,e.window)),e.options.onPosition&&e.options.onPosition.call(e.ins)),this}},{key:"state",get:function get(){return tr[this._id].state}},{key:"style",get:function get(){return tr[this._id].elmOverlay.style}},{key:"blockingDisabled",get:function get(){return tr[this._id].blockingDisabled},set:function set(e){"boolean"==typeof e&&(tr[this._id].blockingDisabled=e)}},{key:"face",get:function get(){return tr[this._id].options.face},set:function set(e){_setOptions$2(tr[this._id],{face:e})}},{key:"duration",get:function get(){return tr[this._id].options.duration},set:function set(e){_setOptions$2(tr[this._id],{duration:e})}},{key:"blur",get:function get(){return tr[this._id].options.blur},set:function set(e){_setOptions$2(tr[this._id],{blur:e})}},{key:"onShow",get:function get(){return tr[this._id].options.onShow},set:function set(e){_setOptions$2(tr[this._id],{onShow:e})}},{key:"onHide",get:function get(){return tr[this._id].options.onHide},set:function set(e){_setOptions$2(tr[this._id],{onHide:e})}},{key:"onBeforeShow",get:function get(){return tr[this._id].options.onBeforeShow},set:function set(e){_setOptions$2(tr[this._id],{onBeforeShow:e})}},{key:"onBeforeHide",get:function get(){return tr[this._id].options.onBeforeHide},set:function set(e){_setOptions$2(tr[this._id],{onBeforeHide:e})}},{key:"onPosition",get:function get(){return tr[this._id].options.onPosition},set:function set(e){_setOptions$2(tr[this._id],{onPosition:e})}}],[{key:"show",value:function show(e,s){return new PlainOverlay(e,s).show()}},{key:"STATE_HIDDEN",get:function get(){return 0}},{key:"STATE_SHOWING",get:function get(){return 1}},{key:"STATE_SHOWN",get:function get(){return 2}},{key:"STATE_HIDING",get:function get(){return 3}}]),PlainOverlay}();function _defineProperties$2(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var rr=[],ir=[],ar=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){ar=!0}}))}catch(error){}function addEventListenerWithOptions(e,s,w,C){e.addEventListener(s,w,ar?C:C.capture)}function getPointsLength(e,s){var w=e.x-s.x,C=e.y-s.y;return Math.sqrt(w*w+C*C)}function getTouchById(e,s){if(null!=e&&null!=s)for(var w=0;w<e.length;w++)if(e[w].identifier===s)return e[w];return null}function hasXY(e){return e&&"number"==typeof e.clientX&&"number"==typeof e.clientY}function dragstart(e){e.preventDefault()}var sr=function(){function PointerEvent(e){var s=this;!function _classCallCheck$2(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PointerEvent),this.startHandlers={},this.lastHandlerId=0,this.curPointerClass=null,this.curTouchId=null,this.lastPointerXY={clientX:0,clientY:0},this.lastTouchTime=0,this.options={preventDefault:!0,stopPropagation:!0},e&&["preventDefault","stopPropagation"].forEach((function(w){"boolean"==typeof e[w]&&(s.options[w]=e[w])}))}return function _createClass$2(e,s,w){return s&&_defineProperties$2(e.prototype,s),w&&_defineProperties$2(e,w),e}(PointerEvent,[{key:"regStartHandler",value:function regStartHandler(e){var s=this;return s.startHandlers[++s.lastHandlerId]=function(w){var C,O,D="mousedown"===w.type?"mouse":"touch",A=Date.now();if("touch"===D)s.lastTouchTime=A,C=w.changedTouches[0],O=w.changedTouches[0].identifier;else{if(A-s.lastTouchTime<400)return;C=w}if(!hasXY(C))throw new Error("No clientX/clientY");s.curPointerClass&&s.cancel(),e.call(s,C)&&(s.curPointerClass=D,s.curTouchId="touch"===D?O:null,s.lastPointerXY.clientX=C.clientX,s.lastPointerXY.clientY=C.clientY,s.options.preventDefault&&w.preventDefault(),s.options.stopPropagation&&w.stopPropagation())},s.lastHandlerId}},{key:"unregStartHandler",value:function unregStartHandler(e){delete this.startHandlers[e]}},{key:"addStartHandler",value:function addStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return addEventListenerWithOptions(e,"mousedown",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchstart",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions(e,"dragstart",dragstart,{capture:!1,passive:!1}),s}},{key:"removeStartHandler",value:function removeStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return e.removeEventListener("mousedown",this.startHandlers[s],!1),e.removeEventListener("touchstart",this.startHandlers[s],!1),e.removeEventListener("dragstart",dragstart,!1),s}},{key:"addMoveHandler",value:function addMoveHandler(e,s,w){var C=this;function handler(e){var s="mousemove"===e.type?"mouse":"touch";if("touch"===s&&(C.lastTouchTime=Date.now()),s===C.curPointerClass){var w="touch"===s?getTouchById(e.changedTouches,C.curTouchId):e;hasXY(w)&&(w.clientX===C.lastPointerXY.clientX&&w.clientY===C.lastPointerXY.clientY||C.move(w),C.options.preventDefault&&e.preventDefault(),C.options.stopPropagation&&e.stopPropagation())}}var O=w?handler:Ao(handler);addEventListenerWithOptions(e,"mousemove",O,{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchmove",O,{capture:!1,passive:!1}),C.curMoveHandler=s}},{key:"move",value:function move(e){hasXY(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curMoveHandler&&this.curMoveHandler(this.lastPointerXY)}},{key:"addEndHandler",value:function addEndHandler(e,s){var w=this;function wrappedHandler(e){var s="mouseup"===e.type?"mouse":"touch";if("touch"===s&&(w.lastTouchTime=Date.now()),s===w.curPointerClass){var C="touch"===s?getTouchById(e.changedTouches,w.curTouchId)||(getTouchById(e.touches,w.curTouchId)?null:{}):e;C&&(w.end(C),w.options.preventDefault&&e.preventDefault(),w.options.stopPropagation&&e.stopPropagation())}}addEventListenerWithOptions(e,"mouseup",wrappedHandler,{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchend",wrappedHandler,{capture:!1,passive:!1}),w.curEndHandler=s}},{key:"end",value:function end(e){hasXY(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curEndHandler&&this.curEndHandler(this.lastPointerXY),this.curPointerClass=this.curTouchId=null}},{key:"addCancelHandler",value:function addCancelHandler(e,s){var w=this;addEventListenerWithOptions(e,"touchcancel",(function wrappedHandler(e){w.lastTouchTime=Date.now(),null!=w.curPointerClass&&(getTouchById(e.changedTouches,w.curTouchId)||(getTouchById(e.touches,w.curTouchId)?null:{}))&&w.cancel()}),{capture:!1,passive:!1}),w.curCancelHandler=s}},{key:"cancel",value:function cancel(){this.curCancelHandler&&this.curCancelHandler(),this.curPointerClass=this.curTouchId=null}}],[{key:"addEventListenerWithOptions",get:function get(){return addEventListenerWithOptions}},{key:"initClickEmulator",value:function initClickEmulator(e,s,w){if(rr.includes(e))return e;rr.push(e);var C,O,D,A;return null==s&&(s=16),null==w&&(w=400),addEventListenerWithOptions(e,"touchstart",(function(e){var s=e.changedTouches[0];C=s.clientX,O=s.clientY,D=s.identifier,A=performance.now()}),{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchend",(function(T){var B=getTouchById(T.changedTouches,D);"number"==typeof C&&"number"==typeof O&&"number"==typeof A&&B&&"number"==typeof B.clientX&&"number"==typeof B.clientY&&getPointsLength({x:C,y:O},{x:B.clientX,y:B.clientY})<=s&&performance.now()-A<=w&&setTimeout((function(){var s=new MouseEvent("click",{clientX:B.clientX,clientY:B.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=A=null}),{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchcancel",(function(){C=O=D=A=null}),{capture:!1,passive:!1}),e}},{key:"initDblClickEmulator",value:function initDblClickEmulator(e,s,w){if(ir.includes(e))return e;ir.push(e);var C,O,D;return null==s&&(s=16),null==w&&(w=400),PointerEvent.initClickEmulator(e,s,w),addEventListenerWithOptions(e,"click",(function(A){A.emulated&&"number"==typeof A.clientX&&"number"==typeof A.clientY&&("number"==typeof C&&getPointsLength({x:C,y:O},{x:A.clientX,y:A.clientY})<=s&&performance.now()-D<=2*w?(setTimeout((function(){var s=new MouseEvent("dblclick",{clientX:A.clientX,clientY:A.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=null):(C=A.clientX,O=A.clientY,D=performance.now()))}),{capture:!1,passive:!1}),e}}]),PointerEvent}();function _defineProperties$1(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}mClassList.ignoreNative=!0;var lr,cr,ur,dr,pr,fr,mr,gr,yr,vr,_r=["tl","tr","bl","br"],br=["start","end"],kr=["inside","outside"],Er=[40,200,1e3],xr=[100,40,0],Sr="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,wr=!Sr&&!!document.uniqueID,Cr="MozAppearance"in document.documentElement.style,Or=!(Sr||Cr||!window.chrome||!window.CSS),Dr=!(Sr||wr||Cr||Or||window.chrome||!("WebkitAppearance"in document.documentElement.style)),Ar=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),Tr=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},Br={},Lr={},Pr=new sr,Ir=0,Mr=Dr?["all-scroll","move"]:["grab","all-scroll","move"],Fr=Dr?"move":["grabbing","move"],$r="plain-draggable",Nr="plain-draggable-dragging",Vr="plain-draggable-moving",Rr={},Hr=1e3/60,zr=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,Hr)},Wr=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)};{var jr,Xr,qr,Yr={};function frameUpdate(){var e=Date.now();["x","y"].forEach((function(s){var w=Yr[s];if(w){var C=e-w.lastFrameTime,O=Xr(jr,s),D=null!=w.lastValue&&Math.abs(w.lastValue-O)<10?w.lastValue:O;if(-1===w.dir?D>w.min:D<w.max){var A=D+w.speed*C*w.dir;A<w.min?A=w.min:A>w.max&&(A=w.max),Xr(jr,s,A),w.lastValue=A}w.lastFrameTime=e}}))}function frame(){Wr.call(window,qr),frameUpdate(),qr=zr.call(window,frame)}Rr.move=function(e,s,w){Wr.call(window,qr),frameUpdate(),jr===e&&(s.x&&Yr.x&&(s.x.lastValue=Yr.x.lastValue),s.y&&Yr.y&&(s.y.lastValue=Yr.y.lastValue)),jr=e,Yr=s,Xr=w;var C=Date.now();["x","y"].forEach((function(e){var s=Yr[e];s&&(s.lastFrameTime=C)})),qr=zr.call(window,frame)},Rr.stop=function(){Wr.call(window,qr),frameUpdate(),Yr={},jr=null}}function scrollXYWindow(e,s,w){return null!=w&&("x"===s?e.scrollTo(w,e.pageYOffset):e.scrollTo(e.pageXOffset,w)),"x"===s?e.pageXOffset:e.pageYOffset}function scrollXYElement(e,s,w){var C="x"===s?"scrollLeft":"scrollTop";return null!=w&&(e[C]=w),e[C]}function copyTree(e){return e?Ar(e)?Object.keys(e).reduce((function(s,w){return s[w]=copyTree(e[w]),s}),{}):Array.isArray(e)?e.map(copyTree):e:e}function hasChanged(e,s){var w,C;return _typeof(e)!==_typeof(s)||(w=Ar(e)?"obj":Array.isArray(e)?"array":"")!=(Ar(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?hasChanged(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return hasChanged(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return hasChanged(e,s[w])})):e!==s)}function isElement$1(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function validBBox(e){if(!Ar(e))return null;var s;if(!Tr(s=e.left)&&!Tr(s=e.x))return null;if(e.left=e.x=s,!Tr(s=e.top)&&!Tr(s=e.y))return null;if(e.top=e.y=s,Tr(e.width)&&e.width>=0)e.right=e.left+e.width;else{if(!(Tr(e.right)&&e.right>=e.left))return null;e.width=e.right-e.left}if(Tr(e.height)&&e.height>=0)e.bottom=e.top+e.height;else{if(!(Tr(e.bottom)&&e.bottom>=e.top))return null;e.height=e.bottom-e.top}return e}function validPPValue(e){return Tr(e)?{value:e,isRatio:!1}:"string"==typeof e?function string2PPValue(e){var s,w,C=/^(.+?)(%)?$/.exec(e);return C&&Tr(s=parseFloat(C[1]))?{value:(w=!(!C[2]||!s))?s/100:s,isRatio:w}:null}(e.replace(/\s/g,"")):null}function ppValue2OptionValue(e){return e.isRatio?"".concat(100*e.value,"%"):e.value}function resolvePPValue(e,s,w){return"number"==typeof e?e:s+e.value*(e.isRatio?w:1)}function validPPBBox(e){if(!Ar(e))return null;var s;if(!(s=validPPValue(e.left))&&!(s=validPPValue(e.x)))return null;if(e.left=e.x=s,!(s=validPPValue(e.top))&&!(s=validPPValue(e.y)))return null;if(e.top=e.y=s,(s=validPPValue(e.width))&&s.value>=0)e.width=s,delete e.right;else{if(!(s=validPPValue(e.right)))return null;e.right=s,delete e.width}if((s=validPPValue(e.height))&&s.value>=0)e.height=s,delete e.bottom;else{if(!(s=validPPValue(e.bottom)))return null;e.bottom=s,delete e.height}return e}function ppBBox2OptionObject(e){return Object.keys(e).reduce((function(s,w){return s[w]=ppValue2OptionValue(e[w]),s}),{})}function resolvePPBBox(e,s){var w={left:"x",right:"x",x:"x",width:"x",top:"y",bottom:"y",y:"y",height:"y"},C={x:s.left,y:s.top},O={x:s.width,y:s.height};return validBBox(Object.keys(e).reduce((function(s,D){return s[D]=resolvePPValue(e[D],"width"===D||"height"===D?0:C[w[D]],O[w[D]]),s}),{}))}function getBBox(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,width:w.width,height:w.height};if(C.left+=window.pageXOffset,C.top+=window.pageYOffset,s){var O=window.getComputedStyle(e,""),D=parseFloat(O.borderTopWidth)||0,A=parseFloat(O.borderRightWidth)||0,T=parseFloat(O.borderBottomWidth)||0,B=parseFloat(O.borderLeftWidth)||0;C.left+=B,C.top+=D,C.width-=B+A,C.height-=D+T}return validBBox(C)}function setDraggableCursor(e,s){null==dr&&(!1!==Mr&&(dr=Eo.getValue("cursor",Mr)),null==dr&&(dr=!1)),e.style.cursor=!1===dr?s:dr}function setDraggingCursor(e){null==pr&&(!1!==Fr&&(pr=Eo.getValue("cursor",Fr)),null==pr&&(pr=!1)),!1!==pr&&(e.style.cursor=pr)}function viewPoint2SvgPoint(e,s,w){var C=e.svgPoint;return C.x=s,C.y=w,C.matrixTransform(e.svgCtmElement.getScreenCTM().inverse())}function moveTranslate(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.htmlOffset;return e.elementStyle[gr]="translate(".concat(s.left+C.left,"px, ").concat(s.top+C.top,"px)"),!0}return!1}function moveLeftTop(e,s){var w=e.elementBBox,C=e.elementStyle,O=e.htmlOffset,D=!1;return s.left!==w.left&&(C.left=s.left+O.left+"px",D=!0),s.top!==w.top&&(C.top=s.top+O.top+"px",D=!0),D}function moveSvg(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.svgOffset,O=e.svgOriginBBox,D=viewPoint2SvgPoint(e,s.left-window.pageXOffset,s.top-window.pageYOffset);return e.svgTransform.setTranslate(D.x+C.x-O.x,D.y+C.y-O.y),!0}return!1}function move(e,s,w){var C=e.elementBBox;function fix(){e.minLeft>=e.maxLeft?s.left=C.left:s.left<e.minLeft?s.left=e.minLeft:s.left>e.maxLeft&&(s.left=e.maxLeft),e.minTop>=e.maxTop?s.top=C.top:s.top<e.minTop?s.top=e.minTop:s.top>e.maxTop&&(s.top=e.maxTop)}if(fix(),w){if(!1===w(s))return!1;fix()}var O=e.moveElm(e,s);return O&&(e.elementBBox=validBBox({left:s.left,top:s.top,width:C.width,height:C.height})),O}function initTranslate(e){var s=e.element,w=e.elementStyle,C=getBBox(s),O=["display","marginTop","marginBottom","width","height"];O.unshift(gr);var D=w[mr];w[mr]="none";var A=getBBox(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var T=getBBox(s),B=window.getComputedStyle(s,"");"inline"===B.display&&(w.display="inline-block",["Top","Bottom"].forEach((function(e){var s=parseFloat(B["padding".concat(e)]);w["margin".concat(e)]=s?"-".concat(s,"px"):"0"}))),w[gr]="translate(0, 0)";var L=getBBox(s),P=e.htmlOffset={left:L.left?-L.left:0,top:L.top?-L.top:0};return w[gr]="translate(".concat(C.left+P.left,"px, ").concat(C.top+P.top,"px)"),["width","height"].forEach((function(C){L[C]!==T[C]&&(w[C]=T[C]+"px",(L=getBBox(s))[C]!==T[C]&&(w[C]=T[C]-(L[C]-T[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[mr]=D,A.left===C.left&&A.top===C.top||(w[gr]="translate(".concat(A.left+P.left,"px, ").concat(A.top+P.top,"px)")),A}function initLeftTop(e){var s=e.element,w=e.elementStyle,C=getBBox(s),O=["position","marginTop","marginRight","marginBottom","marginLeft","width","height"],D=w[mr];w[mr]="none";var A=getBBox(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var T=getBBox(s);w.position="absolute",w.left=w.top=w.margin="0";var B=getBBox(s),L=e.htmlOffset={left:B.left?-B.left:0,top:B.top?-B.top:0};return w.left=C.left+L.left+"px",w.top=C.top+L.top+"px",["width","height"].forEach((function(C){B[C]!==T[C]&&(w[C]=T[C]+"px",(B=getBBox(s))[C]!==T[C]&&(w[C]=T[C]-(B[C]-T[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[mr]=D,A.left===C.left&&A.top===C.top||(w.left=A.left+L.left+"px",w.top=A.top+L.top+"px"),A}function initSvg(e){var s=e.element,w=e.svgTransform,C=s.getBoundingClientRect(),O=getBBox(s);w.setTranslate(0,0);var D=e.svgOriginBBox=s.getBBox(),A=s.getBoundingClientRect(),T=viewPoint2SvgPoint(e,A.left,A.top),B=e.svgOffset={x:D.x-T.x,y:D.y-T.y},L=viewPoint2SvgPoint(e,C.left,C.top);return w.setTranslate(L.x+B.x-D.x,L.y+B.y-D.y),O}function initBBox(e,s){var w=getBBox(document.documentElement),C=e.elementBBox=e.initElm(e),O=e.containmentBBox=e.containmentIsBBox?resolvePPBBox(e.options.containment,w)||w:getBBox(e.options.containment,!0);if(e.minLeft=O.left,e.maxLeft=O.right-C.width,e.minTop=O.top,e.maxTop=O.bottom-C.height,move(e,{left:C.left,top:C.top}),e.parsedSnapTargets){var D={x:C.width,y:C.height},A={x:e.minLeft,y:e.minTop},T={x:e.maxLeft,y:e.maxTop},B={left:"x",right:"x",x:"x",width:"x",xStart:"x",xEnd:"x",xStep:"x",top:"y",bottom:"y",y:"y",height:"y",yStart:"y",yEnd:"y",yStep:"y"},L=e.parsedSnapTargets.reduce((function(e,s){var L,P="containment"===s.base?O:w,I={x:P.left,y:P.top},M={x:P.width,y:P.height};function addSnapTarget(w){if(null==w.center&&(w.center=s.center),null==w.xGravity&&(w.xGravity=s.gravity),null==w.yGravity&&(w.yGravity=s.gravity),null!=w.x&&null!=w.y)w.x=resolvePPValue(w.x,I.x,M.x),w.y=resolvePPValue(w.y,I.y,M.y),w.center&&(w.x-=D.x/2,w.y-=D.y/2,w.corners=["tl"]),(w.corners||s.corners).forEach((function(s){var C=w.x-("tr"===s||"br"===s?D.x:0),O=w.y-("bl"===s||"br"===s?D.y:0);if(C>=A.x&&C<=T.x&&O>=A.y&&O<=T.y){var B={x:C,y:O},L=C-w.xGravity,P=C+w.xGravity,I=O-w.yGravity,M=O+w.yGravity;L>A.x&&(B.gravityXStart=L),P<T.x&&(B.gravityXEnd=P),I>A.y&&(B.gravityYStart=I),M<T.y&&(B.gravityYEnd=M),e.push(B)}}));else{var C=null!=w.x?"x":"y",O="x"===C?"y":"x",B="".concat(O,"Start"),L="".concat(O,"End"),P="".concat(C,"Gravity"),F=C.toUpperCase(),$=O.toUpperCase(),N="gravity".concat(F,"Start"),V="gravity".concat(F,"End"),R="gravity".concat($,"Start"),H="gravity".concat($,"End");if(w[C]=resolvePPValue(w[C],I[C],M[C]),w[B]=resolvePPValue(w[B],I[O],M[O]),w[L]=resolvePPValue(w[L],I[O],M[O])-D[O],w[B]>w[L]||w[B]>T[O]||w[L]<A[O])return;w.center&&(w[C]-=D[C]/2,w.sides=["start"]),(w.sides||s.sides).forEach((function(s){var I=w[C]-("end"===s?D[C]:0);if(I>=A[C]&&I<=T[C]){var M={},F=I-w[P],$=I+w[P];M[C]=I,F>A[C]&&(M[N]=F),$<T[C]&&(M[V]=$),w[B]>A[O]&&(M[R]=w[B]),w[L]<T[O]&&(M[H]=w[L]),e.push(M)}}))}}if((L=s.element?getBBox(s.element):null)||s.ppBBox)s.ppBBox&&(L=resolvePPBBox(s.ppBBox,P)),L&&s.edges.forEach((function(e){var w=s.gravity,O=s.gravity;"outside"===e&&(w+=C.width,O+=C.height);var D=L.left-w,A=L.right+w,T=L.top-O,B=L.bottom+O,P="inside"===e?"start":"end";addSnapTarget({xStart:D,xEnd:A,y:L.top,sides:[P],center:!1}),addSnapTarget({x:L.left,yStart:T,yEnd:B,sides:[P],center:!1}),P="inside"===e?"end":"start",addSnapTarget({xStart:D,xEnd:A,y:L.bottom,sides:[P],center:!1}),addSnapTarget({x:L.right,yStart:T,yEnd:B,sides:[P],center:!1})}));else{var F=[["x","y","xStart","xEnd","xStep","yStart","yEnd","yStep"].reduce((function(e,w){return s[w]&&(e[w]=resolvePPValue(s[w],"xStep"===w||"yStep"===w?0:I[B[w]],M[B[w]])),e}),{})];["x","y"].forEach((function(e){var w="".concat(e,"Start"),C="".concat(e,"End"),O="".concat(e,"Step"),D="".concat(e,"Gravity");F=F.reduce((function(A,T){var B=T[w],L=T[C],P=T[O];if(null!=B&&null!=L&&B>=L)return A;if(null!=P){if(P<2)return A;var I=P/2;I=s.gravity>I?I:null;for(var M=B;M<=L;M+=P){var F=Object.keys(T).reduce((function(e,s){return s!==w&&s!==C&&s!==O&&(e[s]=T[s]),e}),{});F[e]=M,F[D]=I,A.push(F)}}else A.push(T);return A}),[])})),F.forEach((function(e){addSnapTarget(e)}))}return e}),[]);e.snapTargets=L.length?L:null}var P={},I=e.options.autoScroll;if(I){P.isWindow=I.target===window,P.target=I.target;var M="scroll"===s,F=function getScrollable(e,s,w){var C,O,D,A,T={};A=s?document.documentElement:e,T.clientWidth=A.clientWidth,T.clientHeight=A.clientHeight;var B,L,P,I=0,M=0;return w||(s?(B=scrollXYWindow(e,"x"),L=scrollXYWindow(e,"y"),C=getComputedStyle(document.documentElement,""),O=getComputedStyle(document.body,""),I=scrollXYWindow(e,"x",document.documentElement.scrollWidth+T.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),M=scrollXYWindow(e,"y",document.documentElement.scrollHeight+T.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),scrollXYWindow(e,"x",B),scrollXYWindow(e,"y",L)):(B=scrollXYElement(e,"x"),L=scrollXYElement(e,"y"),D=getComputedStyle(e,""),I=scrollXYElement(e,"x",e.scrollWidth+T.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),M=scrollXYElement(e,"y",e.scrollHeight+T.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),scrollXYElement(e,"x",B),scrollXYElement(e,"y",L))),T.scrollWidth=T.clientWidth+I,T.scrollHeight=T.clientHeight+M,s?T.clientX=T.clientY=0:(P=e.getBoundingClientRect(),D||(D=getComputedStyle(e,"")),T.clientX=P.left+(parseFloat(D.borderLeftWidth)||0),T.clientY=P.top+(parseFloat(D.borderTopWidth)||0)),T}(I.target,P.isWindow,M),$=validBBox({left:F.clientX,top:F.clientY,width:F.clientWidth,height:F.clientHeight});M?e.autoScroll&&(P.scrollWidth=e.autoScroll.scrollWidth,P.scrollHeight=e.autoScroll.scrollHeight):(P.scrollWidth=F.scrollWidth,P.scrollHeight=F.scrollHeight),[["X","Width","left","right"],["Y","Height","top","bottom"]].forEach((function(e){var s=e[0],w=e[1],O=e[2],D=e[3],A=(P["scroll".concat(w)]||0)-F["client".concat(w)],T=I["min".concat(s)]||0,B=Tr(I["max".concat(s)])?I["max".concat(s)]:A;if(T<B&&T<A){B>A&&(B=A);for(var L=[],M=C[w.toLowerCase()],N=I.sensitivity.length-1;N>=0;N--){var V=I.sensitivity[N],R=I.speed[N];L.push({dir:-1,speed:R,position:$[O]+V}),L.push({dir:1,speed:R,position:$[D]-V-M})}P[s.toLowerCase()]={min:T,max:B,lines:L}}}))}e.autoScroll=P.x||P.y?P:null}function dragEnd(e){Rr.stop(),setDraggableCursor(e.options.handle,e.orgCursor),ur.style.cursor=fr,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.orgZIndex),yr&&(ur.style[yr]=vr);var s=mClassList(e.element);Vr&&s.remove(Vr),Nr&&s.remove(Nr),lr=null,Pr.cancel(),e.onDragEnd&&e.onDragEnd({left:e.elementBBox.left,top:e.elementBBox.top})}function _setOptions$1(e,s){var w,C,O=e.options;s.containment&&(isElement$1(s.containment)?s.containment!==O.containment&&(O.containment=s.containment,e.containmentIsBBox=!1,w=!0):(C=validPPBBox(copyTree(s.containment)))&&hasChanged(C,O.containment)&&(O.containment=C,e.containmentIsBBox=!0,w=!0));function commonSnapOptions(e,s){function cleanString(e){return"string"==typeof e?e.replace(/[, ]+/g," ").trim().toLowerCase():null}Tr(s.gravity)&&s.gravity>0&&(e.gravity=s.gravity);var w=cleanString(s.corner);if(w){if("all"!==w){var C={},O=w.split(/\s/).reduce((function(e,s){return(s="tl"===(s=s.trim().replace(/^(.).*?-(.).*$/,"$1$2"))||"lt"===s?"tl":"tr"===s||"rt"===s?"tr":"bl"===s||"lb"===s?"bl":"br"===s||"rb"===s?"br":null)&&!C[s]&&(e.push(s),C[s]=!0),e}),[]),D=O.length;w=D?4===D?"all":O.join(" "):null}w&&(e.corner=w)}var A=cleanString(s.side);A&&("start"===A||"end"===A||"both"===A?e.side=A:"start end"!==A&&"end start"!==A||(e.side="both")),"boolean"==typeof s.center&&(e.center=s.center);var T=cleanString(s.edge);T&&("inside"===T||"outside"===T||"both"===T?e.edge=T:"inside outside"!==T&&"outside inside"!==T||(e.edge="both"));var B="string"==typeof s.base?s.base.trim().toLowerCase():null;return!B||"containment"!==B&&"document"!==B||(e.base=B),e}if(null!=s.snap){var D=Ar(s.snap)&&null!=s.snap.targets?s.snap:{targets:s.snap},A=[],T=commonSnapOptions({targets:A},D);T.gravity||(T.gravity=20),T.corner||(T.corner="tl"),T.side||(T.side="both"),"boolean"!=typeof T.center&&(T.center=!1),T.edge||(T.edge="both"),T.base||(T.base="containment");var B=(Array.isArray(D.targets)?D.targets:[D.targets]).reduce((function(e,s){if(null==s)return e;var w,C=isElement$1(s),O=validPPBBox(copyTree(s)),D=C||O?{boundingBox:s}:Ar(s)&&null==s.start&&null==s.end&&null==s.step?s:{x:s,y:s},B=[],L={},P=D.boundingBox;if(C||isElement$1(P))B.push({element:P}),L.boundingBox=P;else if(w=O||validPPBBox(copyTree(P)))B.push({ppBBox:w}),L.boundingBox=ppBBox2OptionObject(w);else{var I,M=["x","y"].reduce((function(e,s){var w,C,O,A,T=D[s];(w=validPPValue(T))?(e[s]=w,L[s]=ppValue2OptionValue(w)):(Ar(T)&&(C=validPPValue(T.start),O=validPPValue(T.end),A=validPPValue(T.step),C&&O&&C.isRatio===O.isRatio&&C.value>=O.value&&(I=!0)),C=e["".concat(s,"Start")]=C||{value:0,isRatio:!1},O=e["".concat(s,"End")]=O||{value:1,isRatio:!0},L[s]={start:ppValue2OptionValue(C),end:ppValue2OptionValue(O)},A&&((A.isRatio?A.value>0:A.value>=2)?(e["".concat(s,"Step")]=A,L[s].step=ppValue2OptionValue(A)):I=!0));return e}),{});if(I)return e;M.xStart&&!M.xStep&&M.yStart&&!M.yStep?B.push({xStart:M.xStart,xEnd:M.xEnd,y:M.yStart},{xStart:M.xStart,xEnd:M.xEnd,y:M.yEnd},{x:M.xStart,yStart:M.yStart,yEnd:M.yEnd},{x:M.xEnd,yStart:M.yStart,yEnd:M.yEnd}):B.push(M)}if(B.length){A.push(commonSnapOptions(L,D));var F=L.corner||T.corner,$=L.side||T.side,N=L.edge||T.edge,V={gravity:L.gravity||T.gravity,base:L.base||T.base,center:"boolean"==typeof L.center?L.center:T.center,corners:"all"===F?_r:F.split(" "),sides:"both"===$?br:[$],edges:"both"===N?kr:[N]};B.forEach((function(s){["gravity","corners","sides","center","edges","base"].forEach((function(e){s[e]=V[e]})),e.push(s)}))}return e}),[]);B.length&&(O.snap=T,hasChanged(B,e.parsedSnapTargets)&&(e.parsedSnapTargets=B,w=!0))}else s.hasOwnProperty("snap")&&e.parsedSnapTargets&&(O.snap=e.parsedSnapTargets=e.snapTargets=void 0);if(s.autoScroll){var L=Ar(s.autoScroll)?s.autoScroll:{target:!0===s.autoScroll?window:s.autoScroll},P={};P.target=isElement$1(L.target)?L.target:window,P.speed=[],(Array.isArray(L.speed)?L.speed:[L.speed]).every((function(e,s){return!!(s<=2&&Tr(e))&&(P.speed[s]=e,!0)})),P.speed.length||(P.speed=Er);var I=Array.isArray(L.sensitivity)?L.sensitivity:[L.sensitivity];P.sensitivity=P.speed.map((function(e,s){return Tr(I[s])?I[s]:xr[s]})),["X","Y"].forEach((function(e){var s="min".concat(e),w="max".concat(e);Tr(L[s])&&L[s]>=0&&(P[s]=L[s]),Tr(L[w])&&L[w]>=0&&(!P[s]||L[w]>=P[s])&&(P[w]=L[w])})),hasChanged(P,O.autoScroll)&&(O.autoScroll=P,w=!0)}else s.hasOwnProperty("autoScroll")&&(O.autoScroll&&(w=!0),O.autoScroll=void 0);if(w&&initBBox(e),isElement$1(s.handle)&&s.handle!==O.handle){O.handle&&(O.handle.style.cursor=e.orgCursor,yr&&(O.handle.style[yr]=e.orgUserSelect),Pr.removeStartHandler(O.handle,e.pointerEventHandlerId));var M=O.handle=s.handle;e.orgCursor=M.style.cursor,setDraggableCursor(M,e.orgCursor),yr&&(e.orgUserSelect=M.style[yr],M.style[yr]="none"),Pr.addStartHandler(M,e.pointerEventHandlerId)}(Tr(s.zIndex)||!1===s.zIndex)&&(O.zIndex=s.zIndex,e===lr&&(e.elementStyle.zIndex=!1===O.zIndex?e.orgZIndex:O.zIndex));var F,$={left:e.elementBBox.left,top:e.elementBBox.top};Tr(s.left)&&s.left!==$.left&&($.left=s.left,F=!0),Tr(s.top)&&s.top!==$.top&&($.top=s.top,F=!0),F&&move(e,$),["onDrag","onMove","onDragStart","onMoveStart","onDragEnd"].forEach((function(w){"function"==typeof s[w]?(O[w]=s[w],e[w]=O[w].bind(e.ins)):s.hasOwnProperty(w)&&null==s[w]&&(O[w]=e[w]=void 0)}))}var Gr=function(){function PlainDraggable(e,s){!function _classCallCheck$1(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainDraggable);var w={ins:this,options:{zIndex:9e3},disabled:!1};if(Object.defineProperty(this,"_id",{value:++Ir}),w._id=this._id,Br[this._id]=w,!isElement$1(e)||e===ur)throw new Error("This element is not accepted.");if(s){if(!Ar(s))throw new Error("Invalid options.")}else s={};var C,O,D=!0;if(e instanceof SVGElement&&(C=e.ownerSVGElement)){if(!e.getBBox)throw new Error("This element is not accepted. (SVGLocatable)");if(!e.transform)throw new Error("This element is not accepted. (SVGAnimatedTransformList)");w.svgTransform=e.transform.baseVal.appendItem(C.createSVGTransform()),w.svgPoint=C.createSVGPoint();var A=e.nearestViewportElement;w.svgCtmElement=Cr?A.appendChild(document.createElementNS(C.namespaceURI,"rect")):A,D=!1,w.initElm=initSvg,w.moveElm=moveSvg}else{var T=Eo.getName("willChange");T&&(D=!1),!s.leftTop&&gr?(T&&(e.style[T]="transform"),w.initElm=initTranslate,w.moveElm=moveTranslate):(T&&(e.style[T]="left, top"),w.initElm=initLeftTop,w.moveElm=moveLeftTop)}(w.element=function initAnim(e,s){var w=e.style;w.webkitTapHighlightColor="transparent";var C=Eo.getName("boxShadow"),O=window.getComputedStyle(e,"")[C];return O&&"none"!==O||(w[C]="0 0 1px transparent"),s&&gr&&(w[gr]="translateZ(0)"),e}(e,D),w.elementStyle=e.style,w.orgZIndex=w.elementStyle.zIndex,$r&&mClassList(e).add($r),w.pointerEventHandlerId=Pr.regStartHandler((function(e){return function dragStart(e,s){return!(e.disabled||e.onDragStart&&!1===e.onDragStart(s)||(lr&&dragEnd(lr),setDraggingCursor(e.options.handle),ur.style.cursor=pr||window.getComputedStyle(e.options.handle,"").cursor,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.options.zIndex),yr&&(ur.style[yr]="none"),Nr&&mClassList(e.element).add(Nr),lr=e,cr=!1,Lr.left=e.elementBBox.left-(s.clientX+window.pageXOffset),Lr.top=e.elementBBox.top-(s.clientY+window.pageYOffset),0))}(w,e)})),s.containment)||(s.containment=(O=e.parentNode)&&isElement$1(O)?O:ur);s.handle||(s.handle=e),_setOptions$1(w,s)}return function _createClass$1(e,s,w){return s&&_defineProperties$1(e.prototype,s),w&&_defineProperties$1(e,w),e}(PlainDraggable,[{key:"remove",value:function remove(){var e=Br[this._id];this.disabled=!0,Pr.unregStartHandler(Pr.removeStartHandler(e.options.handle,e.pointerEventHandlerId)),delete Br[this._id]}},{key:"setOptions",value:function setOptions(e){return Ar(e)&&_setOptions$1(Br[this._id],e),this}},{key:"position",value:function position(){return initBBox(Br[this._id]),this}},{key:"disabled",get:function get(){return Br[this._id].disabled},set:function set(e){var s=Br[this._id];(e=!!e)!==s.disabled&&(s.disabled=e,s.disabled?(s===lr&&dragEnd(s),s.options.handle.style.cursor=s.orgCursor,yr&&(s.options.handle.style[yr]=s.orgUserSelect),$r&&mClassList(s.element).remove($r)):(setDraggableCursor(s.options.handle,s.orgCursor),yr&&(s.options.handle.style[yr]="none"),$r&&mClassList(s.element).add($r)))}},{key:"element",get:function get(){return Br[this._id].element}},{key:"rect",get:function get(){return copyTree(Br[this._id].elementBBox)}},{key:"left",get:function get(){return Br[this._id].elementBBox.left},set:function set(e){_setOptions$1(Br[this._id],{left:e})}},{key:"top",get:function get(){return Br[this._id].elementBBox.top},set:function set(e){_setOptions$1(Br[this._id],{top:e})}},{key:"containment",get:function get(){var e=Br[this._id];return e.containmentIsBBox?ppBBox2OptionObject(e.options.containment):e.options.containment},set:function set(e){_setOptions$1(Br[this._id],{containment:e})}},{key:"snap",get:function get(){return copyTree(Br[this._id].options.snap)},set:function set(e){_setOptions$1(Br[this._id],{snap:e})}},{key:"autoScroll",get:function get(){return copyTree(Br[this._id].options.autoScroll)},set:function set(e){_setOptions$1(Br[this._id],{autoScroll:e})}},{key:"handle",get:function get(){return Br[this._id].options.handle},set:function set(e){_setOptions$1(Br[this._id],{handle:e})}},{key:"zIndex",get:function get(){return Br[this._id].options.zIndex},set:function set(e){_setOptions$1(Br[this._id],{zIndex:e})}},{key:"onDrag",get:function get(){return Br[this._id].options.onDrag},set:function set(e){_setOptions$1(Br[this._id],{onDrag:e})}},{key:"onMove",get:function get(){return Br[this._id].options.onMove},set:function set(e){_setOptions$1(Br[this._id],{onMove:e})}},{key:"onDragStart",get:function get(){return Br[this._id].options.onDragStart},set:function set(e){_setOptions$1(Br[this._id],{onDragStart:e})}},{key:"onMoveStart",get:function get(){return Br[this._id].options.onMoveStart},set:function set(e){_setOptions$1(Br[this._id],{onMoveStart:e})}},{key:"onDragEnd",get:function get(){return Br[this._id].options.onDragEnd},set:function set(e){_setOptions$1(Br[this._id],{onDragEnd:e})}}],[{key:"draggableCursor",get:function get(){return Mr},set:function set(e){Mr!==e&&(Mr=e,dr=null,Object.keys(Br).forEach((function(e){var s=Br[e];s.disabled||s===lr&&!1!==pr||(setDraggableCursor(s.options.handle,s.orgCursor),s===lr&&(ur.style.cursor=fr,ur.style.cursor=window.getComputedStyle(s.options.handle,"").cursor))})))}},{key:"draggingCursor",get:function get(){return Fr},set:function set(e){Fr!==e&&(Fr=e,pr=null,lr&&(setDraggingCursor(lr.options.handle),!1===pr&&(setDraggableCursor(lr.options.handle,lr.orgCursor),ur.style.cursor=fr),ur.style.cursor=pr||window.getComputedStyle(lr.options.handle,"").cursor))}},{key:"draggableClass",get:function get(){return $r},set:function set(e){(e=e?e+"":void 0)!==$r&&(Object.keys(Br).forEach((function(s){var w=Br[s];if(!w.disabled){var C=mClassList(w.element);$r&&C.remove($r),e&&C.add(e)}})),$r=e)}},{key:"draggingClass",get:function get(){return Nr},set:function set(e){if((e=e?e+"":void 0)!==Nr){if(lr){var s=mClassList(lr.element);Nr&&s.remove(Nr),e&&s.add(e)}Nr=e}}},{key:"movingClass",get:function get(){return Vr},set:function set(e){if((e=e?e+"":void 0)!==Vr){if(lr&&cr){var s=mClassList(lr.element);Vr&&s.remove(Vr),e&&s.add(e)}Vr=e}}}]),PlainDraggable}();Pr.addMoveHandler(document,(function(e){if(lr){var s={left:e.clientX+window.pageXOffset+Lr.left,top:e.clientY+window.pageYOffset+Lr.top};if(move(lr,s,lr.snapTargets?function(e){var s,w=lr.snapTargets.length,C=!1,O=!1;for(s=0;s<w&&(!C||!O);s++){var D=lr.snapTargets[s];(null==D.gravityXStart||e.left>=D.gravityXStart)&&(null==D.gravityXEnd||e.left<=D.gravityXEnd)&&(null==D.gravityYStart||e.top>=D.gravityYStart)&&(null==D.gravityYEnd||e.top<=D.gravityYEnd)&&(C||null==D.x||(e.left=D.x,C=!0,s=-1),O||null==D.y||(e.top=D.y,O=!0,s=-1))}return e.snapped=C||O,!lr.onDrag||lr.onDrag(e)}:lr.onDrag)){var w={},C=lr.autoScroll;if(C){var O={x:lr.elementBBox.left-window.pageXOffset,y:lr.elementBBox.top-window.pageYOffset};["x","y"].forEach((function(e){if(C[e]){var s=C[e].min,D=C[e].max;C[e].lines.some((function(C){return(-1===C.dir?O[e]<=C.position:O[e]>=C.position)&&(w[e]={dir:C.dir,speed:C.speed/1e3,min:s,max:D},!0)}))}}))}w.x||w.y?(Rr.move(C.target,w,C.isWindow?scrollXYWindow:scrollXYElement),s.autoScroll=!0):Rr.stop(),cr||(cr=!0,Vr&&mClassList(lr.element).add(Vr),lr.onMoveStart&&lr.onMoveStart(s)),lr.onMove&&lr.onMove(s)}}}));{function endHandler(){lr&&dragEnd(lr)}Pr.addEndHandler(document,endHandler),Pr.addCancelHandler(document,endHandler)}{function initDoc(){mr=Eo.getName("transitionProperty"),gr=Eo.getName("transform"),fr=ur.style.cursor,(yr=Eo.getName("userSelect"))&&(vr=ur.style[yr]);var e,s={};function checkInitBBox(e,s){e.initElm&&initBBox(e,s)}var w=!1,C=Ao((function(C){w||(w=!0,lr&&(checkInitBBox(lr,C.type),Pr.move(),s[lr._id]=!0),clearTimeout(e),e=setTimeout((function(){!function initAll(w){clearTimeout(e),Object.keys(Br).forEach((function(e){s[e]||checkInitBBox(Br[e],w)})),s={}}(C.type)}),200),w=!1)}));window.addEventListener("resize",C,!0),window.addEventListener("scroll",C,!0)}(ur=document.body)?initDoc():document.addEventListener("DOMContentLoaded",(function(){ur=document.body,initDoc()}),!0)}function _defineProperties(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}mClassList.ignoreNative=!0;var Ur,Zr="plainmodal",Kr="".concat(Zr,"-style"),Jr=Zr,Qr="".concat(Zr,"-content"),ei="".concat(Zr,"-overlay"),ti="".concat(ei,"-hide"),ni="".concat(ei,"-force"),oi="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,ri=!oi&&!!document.uniqueID,ii=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),ai={},si=[],li=!0,ci=!0,ui=0;function isElement(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function switchDraggable(e){if(e.plainDraggable){var s=!(e.options.dragHandle&&2===e.state);e.plainDraggable.disabled=s,s||e.plainDraggable.position()}}function finishOpenEffect(e,s){1===e.state&&(e.effectFinished[s]=!0,!e.effectFinished.plainOverlay||e.options.openEffect&&!e.effectFinished.option||function finishOpening(e){Ur=null,e.state=2,switchDraggable(e),e.parentProps&&(e.parentProps.state=5),e.options.onOpen&&e.options.onOpen.call(e.ins)}(e))}function finishCloseEffect(e,s){3===e.state&&(e.effectFinished[s]=!0,!e.effectFinished.plainOverlay||e.options.closeEffect&&!e.effectFinished.option||function finishClosing(e){si.pop(),Ur=null,e.state=0,e.parentProps&&(e.parentProps.state=2,switchDraggable(e.parentProps),e.parentProps=null),e.options.onClose&&e.options.onClose.call(e.ins)}(e))}function execOpening(e,s){if(e.parentProps){var w=e.parentProps,C=w.elmOverlay;2===w.state&&(C.style[Eo.getName("transitionDuration")]=200===e.options.duration?"":"".concat(e.options.duration,"ms"));var O=mClassList(C);O.toggle(ni,!!s),O.add(ti),w.state=4,w.plainOverlay.blockingDisabled=!0,switchDraggable(w)}e.state=1,e.plainOverlay.blockingDisabled=!1,e.effectFinished.plainOverlay=e.effectFinished.option=!1,e.plainOverlay.show(s),e.options.openEffect&&(s?(e.options.openEffect.call(e.ins),finishOpenEffect(e,"option")):e.options.openEffect.call(e.ins,e.openEffectDone))}function execClosing(e,s,w){if(e.parentProps){var C=e.parentProps,O=C.elmOverlay;5===C.state&&(O.style[Eo.getName("transitionDuration")]=200===e.options.duration?"":"".concat(e.options.duration,"ms"));var D=mClassList(O);D.toggle(ni,!!s),D.remove(ti),C.state=6,C.plainOverlay.blockingDisabled=!1}e.state=3,switchDraggable(e),e.effectFinished.plainOverlay=e.effectFinished.option=!1,e.plainOverlay.hide(s,w),e.options.closeEffect&&(s?(e.options.closeEffect.call(e.ins),finishCloseEffect(e,"option")):e.options.closeEffect.call(e.ins,e.closeEffectDone))}function fixOpenClose(e){1===e.state?execOpening(e,!0):3===e.state&&execClosing(e,!0,!0)}function _close(e,s){if(0===e.state||3===e.state&&!s||3!==e.state&&e.options.onBeforeClose&&!1===e.options.onBeforeClose.call(e.ins))return!1;if(Ur&&Ur!==e&&(fixOpenClose(Ur),Ur=null),5===e.state)for(var w;(w=si[si.length-1])!==e;)execClosing(w,!0,!0);return 2===e.state&&(Ur=e),execClosing(e,s),!0}function _setOptions(e,s){var w=e.options,C=e.plainOverlay;s.hasOwnProperty("closeButton")&&!1!==(s.closeButton=isElement(s.closeButton)?s.closeButton:null==s.closeButton&&void 0)&&s.closeButton!==w.closeButton&&(w.closeButton&&w.closeButton.removeEventListener("click",e.handleClose,!1),w.closeButton=s.closeButton,w.closeButton&&w.closeButton.addEventListener("click",e.handleClose,!1)),C.duration=s.duration,w.duration=C.duration,C.blur=s.overlayBlur,w.overlayBlur=C.blur,s.hasOwnProperty("dragHandle")&&!1!==(s.dragHandle=isElement(s.dragHandle)?s.dragHandle:null==s.dragHandle&&void 0)&&s.dragHandle!==w.dragHandle&&(w.dragHandle=s.dragHandle,w.dragHandle&&(e.plainDraggable||(e.plainDraggable=new Gr(e.elmContent)),e.plainDraggable.handle=w.dragHandle),switchDraggable(e)),["openEffect","closeEffect","onOpen","onClose","onBeforeOpen","onBeforeClose"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}var di=function(){function PlainModal(e,s){!function _classCallCheck(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainModal);var w={ins:this,options:{closeButton:void 0,duration:200,dragHandle:void 0,overlayBlur:!1},state:0,effectFinished:{plainOverlay:!1,option:!1}};if(Object.defineProperty(this,"_id",{value:++ui}),w._id=this._id,ai[this._id]=w,!e.nodeType||e.nodeType!==Node.ELEMENT_NODE||e.ownerDocument.defaultView!==window)throw new Error("This `content` is not accepted.");if(w.elmContent=e,s){if(!ii(s))throw new Error("Invalid options.")}else s={};if(!document.getElementById(Kr)){var C=document.getElementsByTagName("head")[0]||document.documentElement,O=C.insertBefore(document.createElement("style"),C.firstChild);O.type="text/css",O.id=Kr,O.textContent=".plainmodal .plainmodal-overlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainmodal.plainoverlay{background-color:transparent;cursor:auto}.plainmodal .plainmodal-content{z-index:9000}.plainmodal .plainmodal-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(136,136,136,.6);transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:1}.plainmodal .plainmodal-overlay.plainmodal-overlay-hide{opacity:0}.plainmodal .plainmodal-overlay.plainmodal-overlay-force{transition-property:none}",(ri||oi)&&function forceReflow(e){setTimeout((function(){var s=e.parentNode,w=e.nextSibling;s.insertBefore(s.removeChild(e),w)}),0)}(O),window.addEventListener("keydown",(function(e){var s,w;li&&("escape"===(s=e.key.toLowerCase())||"esc"===s)&&(w=si.length&&si[si.length-1])&&_close(w)&&(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation())}),!0)}mClassList(e).add(Qr),w.plainOverlay=new or({face:e,onShow:function onShow(){finishOpenEffect(w,"plainOverlay")},onHide:function onHide(){finishCloseEffect(w,"plainOverlay")}}),"none"===window.getComputedStyle(e,"").display&&(e.style.display="block");var D=e.parentNode;mClassList(D.parentNode).add(Jr);var A=w.elmOverlay=D.appendChild(document.createElement("div"));A.className=ei,A.addEventListener("click",(function(e){e.target===A&&ci&&_close(w)}),!0),w.handleClose=function(){_close(w)},w.openEffectDone=function(){finishOpenEffect(w,"option")},w.closeEffectDone=function(){finishCloseEffect(w,"option")},w.effectDone=function(){1===w.state?finishOpenEffect(w,"option"):3===w.state&&finishCloseEffect(w,"option")},_setOptions(w,s)}return function _createClass(e,s,w){return s&&_defineProperties(e.prototype,s),w&&_defineProperties(e,w),e}(PlainModal,[{key:"setOptions",value:function setOptions(e){return ii(e)&&_setOptions(ai[this._id],e),this}},{key:"open",value:function open(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _open(e,s){return!(0!==e.state&&3!==e.state&&1!==e.state||1===e.state&&!s||1!==e.state&&e.options.onBeforeOpen&&!1===e.options.onBeforeOpen.call(e.ins)||(0===e.state&&(Ur&&fixOpenClose(Ur),Ur=e,si.length&&(e.parentProps=si[si.length-1]),si.push(e),mClassList(e.elmOverlay).add(ni).remove(ti)),execOpening(e,s),0))}(ai[this._id],e),this}},{key:"close",value:function close(e){return _close(ai[this._id],e),this}},{key:"state",get:function get(){return ai[this._id].state}},{key:"closeButton",get:function get(){return ai[this._id].options.closeButton},set:function set(e){_setOptions(ai[this._id],{closeButton:e})}},{key:"duration",get:function get(){return ai[this._id].options.duration},set:function set(e){_setOptions(ai[this._id],{duration:e})}},{key:"overlayBlur",get:function get(){return ai[this._id].options.overlayBlur},set:function set(e){_setOptions(ai[this._id],{overlayBlur:e})}},{key:"dragHandle",get:function get(){return ai[this._id].options.dragHandle},set:function set(e){_setOptions(ai[this._id],{dragHandle:e})}},{key:"openEffect",get:function get(){return ai[this._id].options.openEffect},set:function set(e){_setOptions(ai[this._id],{openEffect:e})}},{key:"closeEffect",get:function get(){return ai[this._id].options.closeEffect},set:function set(e){_setOptions(ai[this._id],{closeEffect:e})}},{key:"effectDone",get:function get(){return ai[this._id].effectDone}},{key:"onOpen",get:function get(){return ai[this._id].options.onOpen},set:function set(e){_setOptions(ai[this._id],{onOpen:e})}},{key:"onClose",get:function get(){return ai[this._id].options.onClose},set:function set(e){_setOptions(ai[this._id],{onClose:e})}},{key:"onBeforeOpen",get:function get(){return ai[this._id].options.onBeforeOpen},set:function set(e){_setOptions(ai[this._id],{onBeforeOpen:e})}},{key:"onBeforeClose",get:function get(){return ai[this._id].options.onBeforeClose},set:function set(e){_setOptions(ai[this._id],{onBeforeClose:e})}}],[{key:"closeByEscKey",get:function get(){return li},set:function set(e){"boolean"==typeof e&&(li=e)}},{key:"closeByOverlay",get:function get(){return ci},set:function set(e){"boolean"==typeof e&&(ci=e)}},{key:"STATE_CLOSED",get:function get(){return 0}},{key:"STATE_OPENING",get:function get(){return 1}},{key:"STATE_OPENED",get:function get(){return 2}},{key:"STATE_CLOSING",get:function get(){return 3}},{key:"STATE_INACTIVATING",get:function get(){return 4}},{key:"STATE_INACTIVATED",get:function get(){return 5}},{key:"STATE_ACTIVATING",get:function get(){return 6}}]),PlainModal}();const pi=[new Layout({name:"normal"}),new class SideBySide extends Layout{name="side-by-side";enterHandler=({container:e,htmlHolder:s,showcase:w})=>{const C=document.createElement("div");C.className="bar",C.innerHTML='<div class="bar-handle"></div>';const O=C.querySelector(".bar-handle");e.appendChild(C);const D=new uo(C,{handle:O,containment:{left:"25%",top:0,right:"75%",height:0}});D.draggableCursor="grab",D.onDrag=C=>{var D;O.style.transform="unset",D=C.left,s.style.width=D+"px",w.style.width=parseFloat(window.getComputedStyle(e).width)-D+"px"},D.onDragEnd=e=>{O.style.cssText=""},onRemove(C,(()=>D.remove()))};leaveHandler=({container:e})=>{e.querySelector(".bar")?.remove()}}({name:"side-by-side"}),new class Overlay extends Layout{name="overlay";saveLeftTopAsData=e=>{const{left:s,top:w}=e.getBoundingClientRect();e.dataset.left=s,e.dataset.top=w};addDraggable=e=>{const s=Array.from(e.parentElement?.querySelectorAll(":scope > *")??[]);let w=null;e.onmouseover=()=>{w=setTimeout((()=>{s.forEach((e=>e.style.removeProperty("z-index"))),e.style.zIndex="9001"}),200)},e.onmouseout=()=>{clearTimeout(w)};const C=document.createElement("div");e.appendChild(C),C.className="draggable-part",C.innerHTML='<div class="handle">☰</div>';const{left:O,top:D}=e.getBoundingClientRect(),A=new uo(e,{top:D,left:O,handle:C,snap:{x:{step:20},y:{step:20}}}),T=e.querySelector(".utils");A.onDragStart=()=>{T.style.display="none",e.classList.add("drag")},A.onDragEnd=()=>{T.style="",e.classList.remove("drag"),e.style.zIndex="9000"},new window.ResizeObserver((()=>{try{A.position()}catch(e){console.warn(e)}})).observe(e),onRemove(e,(()=>{A.remove()}))};enterHandler=({htmlHolder:e,blocks:s})=>{s.forEach(this.saveLeftTopAsData);let[w,C]=[20,20];s.forEach((s=>{const O=Number(s.dataset.left),D=Number(s.dataset.top),A=document.createElement("div");A.classList.add("draggable-block"),A.innerHTML='\n        <div class="utils">\n          <div id="close">❌</div>\n          <div id="plus-font-size" ">➕</div>\n          <div id="minus-font-size">➖</div>\n        </div>\n      ',A.title="Middle-click to hide block",A.onmouseup=e=>{1===e.button&&s.classList.remove("focus")},A.appendChild(s),A.style.left=w+"px",A.style.top=C+"px",e.appendChild(A);const{width:T}=A.getBoundingClientRect();w+=T+30,w>window.innerWidth&&(C+=200,w%=window.innerWidth),animateRectTransition(A,{left:O,top:D},{resume:!0,duration:300}).finished.finally((()=>this.addDraggable(A)));const B=A.querySelector(".utils");B.onmouseover=()=>{const{left:e,top:s}=B.getBoundingClientRect();B.style.cssText=`visibility: visible; z-index: 9000; position: fixed; transition: unset; left: ${e}px; top: ${s}px;`,document.body.appendChild(B)},B.onmouseout=()=>{A.appendChild(B),B.style.cssText=""},A.querySelector("#close").onclick=()=>{s.classList.remove("focus"),B.style.cssText=""},A.querySelector("#plus-font-size").onclick=()=>{const e=parseFloat(window.getComputedStyle(s).fontSize)/16;s.style.fontSize=`${e+.2}rem`},A.querySelector("#minus-font-size").onclick=()=>{const e=parseFloat(window.getComputedStyle(s).fontSize)/16;s.style.fontSize=e-.2+"rem"}}))};leaveHandler=({htmlHolder:e,blocks:s})=>{s.forEach((s=>{const w=s.closest(".draggable-block");w&&(e.appendChild(s),w.remove())}))}}({name:"overlay"})],hi={},markdown2HTML=(e,s)=>{e.replaceChildren(),e.innerHTML='<div class="SemanticHtml"></div>';const w=e.querySelector(".SemanticHtml"),C=MarkdownIt({html:!0,breaks:!0,linkify:!0}).use(b,{permalink:b.permalink.linkInsideHeader({placement:"before"})}).use(footnote_plugin).use(Ut).use(Zt),O=/^(\D*)(-?\d+\.?\d*)\s*([,\x2F\uFF0C])\s*(-?\d+\.?\d*)/,D={validate:O,normalize:function(e){const[,,s,w,C]=e.text.match(O);return e.url=`geo:${C},${s}?xy=${s},${C}`,e.text=`${s}${w} ${C}`,e.index+=e.text.indexOf(s)+1,e}};["[","(","📍","(","@","geo:","twd"].forEach((e=>C.linkify.add(e,D))),C.renderer.rules.dumby_block_open=()=>"<div>",C.renderer.rules.dumby_block_close=()=>"</div>",C.core.ruler.before("block","dumby_block",(e=>{e.tokens.push(new e.Token("dumby_block_open","",1))})),C.block.ruler.before("table","dumby_block",((e,s)=>{"\n"===e.src[e.bMarks[s-1]]&&"\n"===e.src[e.bMarks[s-2]]&&"list_item_open"!==e.tokens.at(-1).type&&(e.push("dumby_block_close","",-1),e.push("dumby_block_open","",1))})),C.core.ruler.after("block","dumby_block",(e=>{e.tokens.push(new e.Token("dumby_block_close","",-1))})),w.innerHTML=C.render(s);const A=w.querySelectorAll(":scope > div:not(:has(nav))");return A.forEach((e=>{e.classList.add("dumby-block"),e.dataset.total=A.length})),e},generateMaps=(C,{layouts:O=[],delay:D,renderCallback:A}={})=>{C.classList.add("Dumby"),delete C.dataset.layout,C.dataset.layout=pi[0].name;const T=C.querySelector(".SemanticHtml")??C,B=Array.from(T.querySelectorAll(".dumby-block")),L=document.createElement("div");C.appendChild(L),L.classList.add("Showcase");const P=document.createElement("div");C.appendChild(P);const I=new di(P),M={layouts:[...pi,...O.map((e=>"object"==typeof e?e:{name:e}))],container:C,htmlHolder:T,showcase:L,blocks:B,modal:I,modalContent:P,utils:{...ho,renderedMaps:()=>Array.from(C.querySelectorAll(".mapclay[data-render=fulfilled]")).sort(((e,s)=>e.style.order>s.style.order)),setContextMenu:e=>{const s=C.oncontextmenu;C.oncontextmenu=w=>{const C=s(w);e(w,C),C.style.transform="",shiftByWindow(C)}},focusNextMap:throttle(focusNextMap,focusDelay),switchToNextLayout:throttle(switchToNextLayout,300)}};Object.entries(M.utils).forEach((([e,s])=>{M.utils[e]=s.bind(M)})),C.querySelectorAll('a[href^="#"][title^="=>"]').forEach(createDocLink),C.querySelectorAll('a[href^="geo:"]').forEach(createGeoLink);const F=new window.MutationObserver((e=>{const s=e.at(-1).oldValue,w=C.dataset.layout;s&&M.layouts.find((e=>e.name===s))?.leaveHandler?.call(window,M),Object.values(M).flat().filter((e=>e instanceof window.HTMLElement)).forEach((e=>{e.style.cssText=""})),w&&M.layouts.find((e=>e.name===w))?.enterHandler?.call(window,M);const O=C.querySelector(".mapclay.focus")??C.querySelector(".mapclay");O?.classList?.add("focus")}));F.observe(C,{attributes:!0,attributeFilter:["data-layout"],attributeOldValue:!0,characterDataOldValue:!0}),onRemove(T,(()=>F.disconnect()));const afterMapRendered=e=>{const s=e.target;if(s.renderer=e,s.tabindex=-1,"fulfilled"!==s.dataset.render)return;hi[s.id]??=e,A?.(e);const w=new window.MutationObserver((e=>{const s=e.at(-1).target,w=s.classList.contains("focus"),C=w&&L.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0});if(w&&M.utils.renderedMaps().filter((e=>e.id!==s.id)).forEach((e=>e.classList.remove("focus"))),C){if(L.contains(s))return;const e=s.cloneNode(!0);delete e.id,e.className="";const w=s.parentElement;w.replaceChild(e,s),onRemove(e,(()=>{w.appendChild(s)})),e.getBoundingClientRect(),e.dataset.placeholder=s.id,s.style.cssText="",s.style.order=e.style.order,L.appendChild(s),animateRectTransition(s,e.getBoundingClientRect(),{duration:300,resume:!0})}else if(L.contains(s)){const e=T.querySelector(`[data-placeholder="${s.id}"]`);if(!e)throw Error(`Cannot find placeholder for map "${s.id}"`);const afterAnimation=()=>{s.style=e.style.cssText,e.remove()};animateRectTransition(s,e.getBoundingClientRect(),{duration:300}).finished.finally(afterAnimation)}}));w.observe(s,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0}),onRemove(M.htmlHolder,(()=>{w.disconnect()}))},$=[],assignMapId=e=>{let s=e.id?.replaceAll(" ","_");if(!s){s=e.use?.split("/")?.at(-1);let w=1;for(;!s||$.includes(s);)s=`${e.use??"unnamed"}-${w}`,w++}return e.id=s,$.push(s),e},N=Array.from(C.querySelectorAll("pre:has(.language-map)")??[]),updateAttributeByStep=({results:e,target:s,steps:w})=>{let C=e.filter((e=>"render"===e.type&&e.state.match(/success|skip/))).length;const O=w.length;C+=`/${O}`;const D=e.filter((e=>"render"===e.type)).length===O;s.animations||(s.animations=Promise.resolve()),s.animations=s.animations.then((async()=>{await new Promise((e=>setTimeout(e,100))),D&&(C+=" "),s.dataset.report=C,D&&setTimeout((()=>delete s.dataset.report),100)}))},V=e((e=>({use:e.use??"Leaflet",width:"100%",...e,aliases:{...w,...e.aliases??{}},stepCallback:updateAttributeByStep})));let R=0;N.forEach((e=>{const w=e.querySelector(".language-map").textContent.replace(/\u00A0/g," ");let C=[];try{C=s(w).map(assignMapId)}catch(s){return void console.warn("Fail to parse yaml config for element",e)}C.forEach((s=>{const w=hi[s.id];w&&(e.appendChild(w.target),s.target=w.target)})),e.querySelector(".mapclay")&&e.querySelectorAll(":scope > :not([data-render=fulfilled])").forEach((e=>e.remove()));const O=setTimeout((()=>{V(e,C).forEach((e=>{e.then(afterMapRendered)})),Array.from(e.children).forEach((e=>{e.style.order=R,R++,"fulfilled"===e.dataset.render&&afterMapRendered(e.renderer)}))}),D??1e3);onRemove(T,(()=>{clearTimeout(O)}))}));const H=document.createElement("div");H.className="menu",H.style.display="none",H.onclick=e=>{e.target.closest(".keep-menu")||e.target.classList.contains(".keep-menu")||(H.style.display="none")},C.appendChild(H),C.oncontextmenu=e=>{H.replaceChildren(),H.style.display="block",H.style.cssText=`left: ${e.x-H.offsetParent.offsetLeft+10}px; top: ${e.y-H.offsetParent.offsetTop+5}px;`,e.preventDefault();const s=e.target.closest(".mapclay");if(s?.renderer?.results){const w=s.getBoundingClientRect(),[C,O]=[e.x-w.left,e.y-w.top];H.appendChild((e=>new Item({text:"Toggle Focus",onclick:()=>e.classList.toggle("focus")}))(s)),H.appendChild(renderResults(M,s)),H.appendChild(((e,s)=>new Item({text:"Get Coordinates",onclick:()=>{const[w,C]=e.renderer.unproject(s),O=`[${w.toFixed(7)}, ${C.toFixed(7)}]`;navigator.clipboard.writeText(O),window.alert(`${O} copied to clipboard`)}}))(s,[C,O])),H.appendChild((e=>new Item({text:"Restore Camera",onclick:()=>e.renderer.restoreCamera()}))(s))}else{const s=e.target.closest(".dumby-block");s&&H.appendChild((e=>new Item({text:"Toggle Focus",onclick:()=>e.classList.toggle("focus")}))(s))}return s&&!s.closest(".Showcase")||(M.utils.renderedMaps().length>0&&H.appendChild((({utils:e})=>new Folder({innerHTML:'<span>Maps<span><span class="info">(Tab)</span>',items:e.renderedMaps().map((e=>new Item({text:e.id,onclick:()=>{e.classList.add("focus"),e.scrollIntoView({behavior:"smooth"})}})))}))(M)),H.appendChild((({blocks:e,utils:s})=>new Folder({innerHTML:'<span>Blocks<span><span class="info">(n/p)</span>',items:e.map(((e,w)=>{const C=e.classList.contains("focus"),O=e.querySelector("p")?.textContent.substring(0,15)?.concat(" ","...  ")??"";return new Item({className:["keep-menu",C?"checked":"unchecked"],innerHTML:`<strong>(${w})</strong><span style='display: inline-block; margin-inline: 1.2em;'>${O}</span>`,onclick:w=>{e.classList.toggle("focus");const C=e.classList.contains("focus");C&&s.scrollToBlock(e);const O=w.target.closest(".menu-item.keep-menu");O.classList.add(C?"checked":"unchecked"),O.classList.remove(C?"unchecked":"checked");const D=w.target.closest(".sub-menu");D.onmouseleave=()=>{D.closest(".menu").style.display="none"}}})}))}))(M)),H.appendChild((({container:e,layouts:s})=>new Folder({innerHTML:'<span>Layouts<span><span class="info">(x)</span>',items:[...s.map((s=>new Item({text:s.name,onclick:()=>e.setAttribute("data-layout",s.name)}))),new Item({innerHTML:'<a href="https://github.com/outdoorsafetylab/dumbymap#layouts" class="external" style="display: block; padding: 0.5rem;">More...</a>',style:"padding: 0;"})]}))(M))),shiftByWindow(H),H};const actionOutsideMenu=e=>{if("none"===H.style.display)return;if(e.target.closest(".keep-menu")||e.target.classList.contains(".keep-menu"))return;const s=H.getBoundingClientRect();(e.clientX<s.left||e.clientX>s.left+s.width||e.clientY<s.top||e.clientY>s.top+s.height)&&(H.style.display="none")};return document.addEventListener("click",actionOutsideMenu),onRemove(T,(()=>document.removeEventListener("click",actionOutsideMenu))),Object.seal(M)};export{generateMaps,markdown2HTML};
+//# sourceMappingURL=dumbymap.mjs.map
diff --git a/dist/dumbymap.mjs.map b/dist/dumbymap.mjs.map
new file mode 100644
index 0000000..06e99f2
--- /dev/null
+++ b/dist/dumbymap.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"dumbymap.mjs","sources":["../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs","../node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs","../node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs","../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.mjs","../node_modules/.pnpm/markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0/node_modules/markdown-it-anchor/dist/markdownItAnchor.mjs","../node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs","../node_modules/.pnpm/markdown-it-front-matter@0.2.4/node_modules/markdown-it-front-matter/index.js","../node_modules/.pnpm/markdown-it-inject-linenumbers@0.3.0/node_modules/markdown-it-inject-linenumbers/index.js","../src/utils.mjs","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/plain-draggable.esm.js","../src/Layout.mjs","../src/dumbyUtils.mjs","../src/MenuItem.mjs","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/timed-transition@1.5.4/node_modules/timed-transition/timed-transition.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-overlay@1.4.17/node_modules/plain-overlay/plain-overlay.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-draggable@2.5.14/node_modules/plain-draggable/plain-draggable.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/plain-modal.esm.js","../src/dumbymap.mjs"],"sourcesContent":["/* eslint-disable no-bitwise */\n\nconst decodeCache = {}\n\nfunction getDecodeCache (exclude) {\n  let cache = decodeCache[exclude]\n  if (cache) { return cache }\n\n  cache = decodeCache[exclude] = []\n\n  for (let i = 0; i < 128; i++) {\n    const ch = String.fromCharCode(i)\n    cache.push(ch)\n  }\n\n  for (let i = 0; i < exclude.length; i++) {\n    const ch = exclude.charCodeAt(i)\n    cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2)\n  }\n\n  return cache\n}\n\n// Decode percent-encoded string.\n//\nfunction decode (string, exclude) {\n  if (typeof exclude !== 'string') {\n    exclude = decode.defaultChars\n  }\n\n  const cache = getDecodeCache(exclude)\n\n  return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {\n    let result = ''\n\n    for (let i = 0, l = seq.length; i < l; i += 3) {\n      const b1 = parseInt(seq.slice(i + 1, i + 3), 16)\n\n      if (b1 < 0x80) {\n        result += cache[b1]\n        continue\n      }\n\n      if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n        // 110xxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n\n        if ((b2 & 0xC0) === 0x80) {\n          const chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F)\n\n          if (chr < 0x80) {\n            result += '\\ufffd\\ufffd'\n          } else {\n            result += String.fromCharCode(chr)\n          }\n\n          i += 3\n          continue\n        }\n      }\n\n      if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n        // 1110xxxx 10xxxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n        const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n\n        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n          const chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F)\n\n          if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n            result += '\\ufffd\\ufffd\\ufffd'\n          } else {\n            result += String.fromCharCode(chr)\n          }\n\n          i += 6\n          continue\n        }\n      }\n\n      if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n        // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n        const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n        const b4 = parseInt(seq.slice(i + 10, i + 12), 16)\n\n        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n          let chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F)\n\n          if (chr < 0x10000 || chr > 0x10FFFF) {\n            result += '\\ufffd\\ufffd\\ufffd\\ufffd'\n          } else {\n            chr -= 0x10000\n            result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF))\n          }\n\n          i += 9\n          continue\n        }\n      }\n\n      result += '\\ufffd'\n    }\n\n    return result\n  })\n}\n\ndecode.defaultChars = ';/?:@&=+$,#'\ndecode.componentChars = ''\n\nexport default decode\n","const encodeCache = {}\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache (exclude) {\n  let cache = encodeCache[exclude]\n  if (cache) { return cache }\n\n  cache = encodeCache[exclude] = []\n\n  for (let i = 0; i < 128; i++) {\n    const ch = String.fromCharCode(i)\n\n    if (/^[0-9a-z]$/i.test(ch)) {\n      // always allow unencoded alphanumeric characters\n      cache.push(ch)\n    } else {\n      cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2))\n    }\n  }\n\n  for (let i = 0; i < exclude.length; i++) {\n    cache[exclude.charCodeAt(i)] = exclude[i]\n  }\n\n  return cache\n}\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n//  - string       - string to encode\n//  - exclude      - list of characters to ignore (in addition to a-zA-Z0-9)\n//  - keepEscaped  - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode (string, exclude, keepEscaped) {\n  if (typeof exclude !== 'string') {\n    // encode(string, keepEscaped)\n    keepEscaped = exclude\n    exclude = encode.defaultChars\n  }\n\n  if (typeof keepEscaped === 'undefined') {\n    keepEscaped = true\n  }\n\n  const cache = getEncodeCache(exclude)\n  let result = ''\n\n  for (let i = 0, l = string.length; i < l; i++) {\n    const code = string.charCodeAt(i)\n\n    if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n      if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n        result += string.slice(i, i + 3)\n        i += 2\n        continue\n      }\n    }\n\n    if (code < 128) {\n      result += cache[code]\n      continue\n    }\n\n    if (code >= 0xD800 && code <= 0xDFFF) {\n      if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n        const nextCode = string.charCodeAt(i + 1)\n        if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n          result += encodeURIComponent(string[i] + string[i + 1])\n          i++\n          continue\n        }\n      }\n      result += '%EF%BF%BD'\n      continue\n    }\n\n    result += encodeURIComponent(string[i])\n  }\n\n  return result\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\"\nencode.componentChars = \"-_.!~*'()\"\n\nexport default encode\n","export default function format (url) {\n  let result = ''\n\n  result += url.protocol || ''\n  result += url.slashes ? '//' : ''\n  result += url.auth ? url.auth + '@' : ''\n\n  if (url.hostname && url.hostname.indexOf(':') !== -1) {\n    // ipv6 address\n    result += '[' + url.hostname + ']'\n  } else {\n    result += url.hostname || ''\n  }\n\n  result += url.port ? ':' + url.port : ''\n  result += url.pathname || ''\n  result += url.search || ''\n  result += url.hash || ''\n\n  return result\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n//    e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n//    so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n//    i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n//    (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n//    which can be constructed using other parts of the url.\n//\n\nfunction Url () {\n  this.protocol = null\n  this.slashes = null\n  this.auth = null\n  this.port = null\n  this.hostname = null\n  this.hash = null\n  this.search = null\n  this.pathname = null\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nconst protocolPattern = /^([a-z0-9.+-]+:)/i\nconst portPattern = /:[0-9]*$/\n\n// Special case for a simple path URL\n/* eslint-disable-next-line no-useless-escape */\nconst simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/\n\n// RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\nconst delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t']\n\n// RFC 2396: characters not allowed for various reasons.\nconst unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims)\n\n// Allowed by RFCs, but cause of XSS attacks.  Always escape these.\nconst autoEscape = ['\\''].concat(unwise)\n// Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nconst nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape)\nconst hostEndingChars = ['/', '?', '#']\nconst hostnameMaxLen = 255\nconst hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/\nconst hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/\n// protocols that can allow \"unsafe\" and \"unwise\" chars.\n// protocols that never have a hostname.\nconst hostlessProtocol = {\n  javascript: true,\n  'javascript:': true\n}\n// protocols that always contain a // bit.\nconst slashedProtocol = {\n  http: true,\n  https: true,\n  ftp: true,\n  gopher: true,\n  file: true,\n  'http:': true,\n  'https:': true,\n  'ftp:': true,\n  'gopher:': true,\n  'file:': true\n}\n\nfunction urlParse (url, slashesDenoteHost) {\n  if (url && url instanceof Url) return url\n\n  const u = new Url()\n  u.parse(url, slashesDenoteHost)\n  return u\n}\n\nUrl.prototype.parse = function (url, slashesDenoteHost) {\n  let lowerProto, hec, slashes\n  let rest = url\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim()\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    const simplePath = simplePathPattern.exec(rest)\n    if (simplePath) {\n      this.pathname = simplePath[1]\n      if (simplePath[2]) {\n        this.search = simplePath[2]\n      }\n      return this\n    }\n  }\n\n  let proto = protocolPattern.exec(rest)\n  if (proto) {\n    proto = proto[0]\n    lowerProto = proto.toLowerCase()\n    this.protocol = proto\n    rest = rest.substr(proto.length)\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  /* eslint-disable-next-line no-useless-escape */\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    slashes = rest.substr(0, 2) === '//'\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2)\n      this.slashes = true\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    let hostEnd = -1\n    for (let i = 0; i < hostEndingChars.length; i++) {\n      hec = rest.indexOf(hostEndingChars[i])\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n        hostEnd = hec\n      }\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    let auth, atSign\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@')\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd)\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign)\n      rest = rest.slice(atSign + 1)\n      this.auth = auth\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1\n    for (let i = 0; i < nonHostChars.length; i++) {\n      hec = rest.indexOf(nonHostChars[i])\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n        hostEnd = hec\n      }\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1) {\n      hostEnd = rest.length\n    }\n\n    if (rest[hostEnd - 1] === ':') { hostEnd-- }\n    const host = rest.slice(0, hostEnd)\n    rest = rest.slice(hostEnd)\n\n    // pull out port.\n    this.parseHost(host)\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || ''\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    const ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']'\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      const hostparts = this.hostname.split(/\\./)\n      for (let i = 0, l = hostparts.length; i < l; i++) {\n        const part = hostparts[i]\n        if (!part) { continue }\n        if (!part.match(hostnamePartPattern)) {\n          let newpart = ''\n          for (let j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x'\n            } else {\n              newpart += part[j]\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            const validParts = hostparts.slice(0, i)\n            const notHost = hostparts.slice(i + 1)\n            const bit = part.match(hostnamePartStart)\n            if (bit) {\n              validParts.push(bit[1])\n              notHost.unshift(bit[2])\n            }\n            if (notHost.length) {\n              rest = notHost.join('.') + rest\n            }\n            this.hostname = validParts.join('.')\n            break\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = ''\n    }\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2)\n    }\n  }\n\n  // chop off from the tail first.\n  const hash = rest.indexOf('#')\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash)\n    rest = rest.slice(0, hash)\n  }\n  const qm = rest.indexOf('?')\n  if (qm !== -1) {\n    this.search = rest.substr(qm)\n    rest = rest.slice(0, qm)\n  }\n  if (rest) { this.pathname = rest }\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = ''\n  }\n\n  return this\n}\n\nUrl.prototype.parseHost = function (host) {\n  let port = portPattern.exec(host)\n  if (port) {\n    port = port[0]\n    if (port !== ':') {\n      this.port = port.substr(1)\n    }\n    host = host.substr(0, host.length - port.length)\n  }\n  if (host) { this.hostname = host }\n}\n\nexport default urlParse\n","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n    [0, 65533],\n    // C1 Unicode control character reference replacements\n    [128, 8364],\n    [130, 8218],\n    [131, 402],\n    [132, 8222],\n    [133, 8230],\n    [134, 8224],\n    [135, 8225],\n    [136, 710],\n    [137, 8240],\n    [138, 352],\n    [139, 8249],\n    [140, 338],\n    [142, 381],\n    [145, 8216],\n    [146, 8217],\n    [147, 8220],\n    [148, 8221],\n    [149, 8226],\n    [150, 8211],\n    [151, 8212],\n    [152, 732],\n    [153, 8482],\n    [154, 353],\n    [155, 8250],\n    [156, 339],\n    [158, 382],\n    [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n    let output = \"\";\n    if (codePoint > 0xffff) {\n        codePoint -= 0x10000;\n        output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n        codePoint = 0xdc00 | (codePoint & 0x3ff);\n    }\n    output += String.fromCharCode(codePoint);\n    return output;\n};\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n    var _a;\n    if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n        return 0xfffd;\n    }\n    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport default function decodeCodePoint(codePoint) {\n    return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode_codepoint.js.map","export default /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","export default /[\\0-\\x1F\\x7F-\\x9F]/","export default /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\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\uDE3F-\\uDE46\\uDE9A-\\uDE9C\\uDE9E-\\uDEA2\\uDF00-\\uDF09]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8\\uDF43-\\uDF4F\\uDFFF]|\\uD809[\\uDC70-\\uDC74]|\\uD80B[\\uDFF1\\uDFF2]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A\\uDFE2]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","export default /[\\$\\+<->\\^`\\|~\\xA2-\\xA6\\xA8\\xA9\\xAC\\xAE-\\xB1\\xB4\\xB8\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u07FE\\u07FF\\u0888\\u09F2\\u09F3\\u09FA\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20C0\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u309B\\u309C\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A\\uAB6B\\uFB29\\uFBB2-\\uFBC2\\uFD40-\\uFD4F\\uFDCF\\uFDFC-\\uFDFF\\uFE62\\uFE64-\\uFE66\\uFE69\\uFF04\\uFF0B\\uFF1C-\\uFF1E\\uFF3E\\uFF40\\uFF5C\\uFF5E\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFFC\\uFFFD]|\\uD800[\\uDD37-\\uDD3F\\uDD79-\\uDD89\\uDD8C-\\uDD8E\\uDD90-\\uDD9C\\uDDA0\\uDDD0-\\uDDFC]|\\uD802[\\uDC77\\uDC78\\uDEC8]|\\uD805\\uDF3F|\\uD807[\\uDFD5-\\uDFF1]|\\uD81A[\\uDF3C-\\uDF3F\\uDF45]|\\uD82F\\uDC9C|\\uD833[\\uDF50-\\uDFC3]|\\uD834[\\uDC00-\\uDCF5\\uDD00-\\uDD26\\uDD29-\\uDD64\\uDD6A-\\uDD6C\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDDEA\\uDE00-\\uDE41\\uDE45\\uDF00-\\uDF56]|\\uD835[\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85\\uDE86]|\\uD838[\\uDD4F\\uDEFF]|\\uD83B[\\uDCAC\\uDCB0\\uDD2E\\uDEF0\\uDEF1]|\\uD83C[\\uDC00-\\uDC2B\\uDC30-\\uDC93\\uDCA0-\\uDCAE\\uDCB1-\\uDCBF\\uDCC1-\\uDCCF\\uDCD1-\\uDCF5\\uDD0D-\\uDDAD\\uDDE6-\\uDE02\\uDE10-\\uDE3B\\uDE40-\\uDE48\\uDE50\\uDE51\\uDE60-\\uDE65\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDED7\\uDEDC-\\uDEEC\\uDEF0-\\uDEFC\\uDF00-\\uDF76\\uDF7B-\\uDFD9\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDC00-\\uDC0B\\uDC10-\\uDC47\\uDC50-\\uDC59\\uDC60-\\uDC87\\uDC90-\\uDCAD\\uDCB0\\uDCB1\\uDD00-\\uDE53\\uDE60-\\uDE6D\\uDE70-\\uDE7C\\uDE80-\\uDE88\\uDE90-\\uDEBD\\uDEBF-\\uDEC5\\uDECE-\\uDEDB\\uDEE0-\\uDEE8\\uDEF0-\\uDEF8\\uDF00-\\uDF92\\uDF94-\\uDFCA]/","export default /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","export default /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC3F]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u1d41<\\xd5\\u0131\\u028a\\u049d\\u057b\\u05d0\\u0675\\u06de\\u07a2\\u07d6\\u080f\\u0a4a\\u0a91\\u0da1\\u0e6d\\u0f09\\u0f26\\u10ca\\u1228\\u12e1\\u1415\\u149d\\u14c3\\u14df\\u1525\\0\\0\\0\\0\\0\\0\\u156b\\u16cd\\u198d\\u1c12\\u1ddd\\u1f7e\\u2060\\u21b0\\u228d\\u23c0\\u23fb\\u2442\\u2824\\u2912\\u2d08\\u2e48\\u2fce\\u3016\\u32ba\\u3639\\u37ac\\u38fe\\u3a28\\u3a71\\u3ae0\\u3b2e\\u0800EMabcfglmnoprstu\\\\bfms\\x7f\\x84\\x8b\\x90\\x95\\x98\\xa6\\xb3\\xb9\\xc8\\xcflig\\u803b\\xc6\\u40c6P\\u803b&\\u4026cute\\u803b\\xc1\\u40c1reve;\\u4102\\u0100iyx}rc\\u803b\\xc2\\u40c2;\\u4410r;\\uc000\\ud835\\udd04rave\\u803b\\xc0\\u40c0pha;\\u4391acr;\\u4100d;\\u6a53\\u0100gp\\x9d\\xa1on;\\u4104f;\\uc000\\ud835\\udd38plyFunction;\\u6061ing\\u803b\\xc5\\u40c5\\u0100cs\\xbe\\xc3r;\\uc000\\ud835\\udc9cign;\\u6254ilde\\u803b\\xc3\\u40c3ml\\u803b\\xc4\\u40c4\\u0400aceforsu\\xe5\\xfb\\xfe\\u0117\\u011c\\u0122\\u0127\\u012a\\u0100cr\\xea\\xf2kslash;\\u6216\\u0176\\xf6\\xf8;\\u6ae7ed;\\u6306y;\\u4411\\u0180crt\\u0105\\u010b\\u0114ause;\\u6235noullis;\\u612ca;\\u4392r;\\uc000\\ud835\\udd05pf;\\uc000\\ud835\\udd39eve;\\u42d8c\\xf2\\u0113mpeq;\\u624e\\u0700HOacdefhilorsu\\u014d\\u0151\\u0156\\u0180\\u019e\\u01a2\\u01b5\\u01b7\\u01ba\\u01dc\\u0215\\u0273\\u0278\\u027ecy;\\u4427PY\\u803b\\xa9\\u40a9\\u0180cpy\\u015d\\u0162\\u017aute;\\u4106\\u0100;i\\u0167\\u0168\\u62d2talDifferentialD;\\u6145leys;\\u612d\\u0200aeio\\u0189\\u018e\\u0194\\u0198ron;\\u410cdil\\u803b\\xc7\\u40c7rc;\\u4108nint;\\u6230ot;\\u410a\\u0100dn\\u01a7\\u01adilla;\\u40b8terDot;\\u40b7\\xf2\\u017fi;\\u43a7rcle\\u0200DMPT\\u01c7\\u01cb\\u01d1\\u01d6ot;\\u6299inus;\\u6296lus;\\u6295imes;\\u6297o\\u0100cs\\u01e2\\u01f8kwiseContourIntegral;\\u6232eCurly\\u0100DQ\\u0203\\u020foubleQuote;\\u601duote;\\u6019\\u0200lnpu\\u021e\\u0228\\u0247\\u0255on\\u0100;e\\u0225\\u0226\\u6237;\\u6a74\\u0180git\\u022f\\u0236\\u023aruent;\\u6261nt;\\u622fourIntegral;\\u622e\\u0100fr\\u024c\\u024e;\\u6102oduct;\\u6210nterClockwiseContourIntegral;\\u6233oss;\\u6a2fcr;\\uc000\\ud835\\udc9ep\\u0100;C\\u0284\\u0285\\u62d3ap;\\u624d\\u0580DJSZacefios\\u02a0\\u02ac\\u02b0\\u02b4\\u02b8\\u02cb\\u02d7\\u02e1\\u02e6\\u0333\\u048d\\u0100;o\\u0179\\u02a5trahd;\\u6911cy;\\u4402cy;\\u4405cy;\\u440f\\u0180grs\\u02bf\\u02c4\\u02c7ger;\\u6021r;\\u61a1hv;\\u6ae4\\u0100ay\\u02d0\\u02d5ron;\\u410e;\\u4414l\\u0100;t\\u02dd\\u02de\\u6207a;\\u4394r;\\uc000\\ud835\\udd07\\u0100af\\u02eb\\u0327\\u0100cm\\u02f0\\u0322ritical\\u0200ADGT\\u0300\\u0306\\u0316\\u031ccute;\\u40b4o\\u0174\\u030b\\u030d;\\u42d9bleAcute;\\u42ddrave;\\u4060ilde;\\u42dcond;\\u62c4ferentialD;\\u6146\\u0470\\u033d\\0\\0\\0\\u0342\\u0354\\0\\u0405f;\\uc000\\ud835\\udd3b\\u0180;DE\\u0348\\u0349\\u034d\\u40a8ot;\\u60dcqual;\\u6250ble\\u0300CDLRUV\\u0363\\u0372\\u0382\\u03cf\\u03e2\\u03f8ontourIntegra\\xec\\u0239o\\u0274\\u0379\\0\\0\\u037b\\xbb\\u0349nArrow;\\u61d3\\u0100eo\\u0387\\u03a4ft\\u0180ART\\u0390\\u0396\\u03a1rrow;\\u61d0ightArrow;\\u61d4e\\xe5\\u02cang\\u0100LR\\u03ab\\u03c4eft\\u0100AR\\u03b3\\u03b9rrow;\\u67f8ightArrow;\\u67faightArrow;\\u67f9ight\\u0100AT\\u03d8\\u03derrow;\\u61d2ee;\\u62a8p\\u0241\\u03e9\\0\\0\\u03efrrow;\\u61d1ownArrow;\\u61d5erticalBar;\\u6225n\\u0300ABLRTa\\u0412\\u042a\\u0430\\u045e\\u047f\\u037crrow\\u0180;BU\\u041d\\u041e\\u0422\\u6193ar;\\u6913pArrow;\\u61f5reve;\\u4311eft\\u02d2\\u043a\\0\\u0446\\0\\u0450ightVector;\\u6950eeVector;\\u695eector\\u0100;B\\u0459\\u045a\\u61bdar;\\u6956ight\\u01d4\\u0467\\0\\u0471eeVector;\\u695fector\\u0100;B\\u047a\\u047b\\u61c1ar;\\u6957ee\\u0100;A\\u0486\\u0487\\u62a4rrow;\\u61a7\\u0100ct\\u0492\\u0497r;\\uc000\\ud835\\udc9frok;\\u4110\\u0800NTacdfglmopqstux\\u04bd\\u04c0\\u04c4\\u04cb\\u04de\\u04e2\\u04e7\\u04ee\\u04f5\\u0521\\u052f\\u0536\\u0552\\u055d\\u0560\\u0565G;\\u414aH\\u803b\\xd0\\u40d0cute\\u803b\\xc9\\u40c9\\u0180aiy\\u04d2\\u04d7\\u04dcron;\\u411arc\\u803b\\xca\\u40ca;\\u442dot;\\u4116r;\\uc000\\ud835\\udd08rave\\u803b\\xc8\\u40c8ement;\\u6208\\u0100ap\\u04fa\\u04fecr;\\u4112ty\\u0253\\u0506\\0\\0\\u0512mallSquare;\\u65fberySmallSquare;\\u65ab\\u0100gp\\u0526\\u052aon;\\u4118f;\\uc000\\ud835\\udd3csilon;\\u4395u\\u0100ai\\u053c\\u0549l\\u0100;T\\u0542\\u0543\\u6a75ilde;\\u6242librium;\\u61cc\\u0100ci\\u0557\\u055ar;\\u6130m;\\u6a73a;\\u4397ml\\u803b\\xcb\\u40cb\\u0100ip\\u056a\\u056fsts;\\u6203onentialE;\\u6147\\u0280cfios\\u0585\\u0588\\u058d\\u05b2\\u05ccy;\\u4424r;\\uc000\\ud835\\udd09lled\\u0253\\u0597\\0\\0\\u05a3mallSquare;\\u65fcerySmallSquare;\\u65aa\\u0370\\u05ba\\0\\u05bf\\0\\0\\u05c4f;\\uc000\\ud835\\udd3dAll;\\u6200riertrf;\\u6131c\\xf2\\u05cb\\u0600JTabcdfgorst\\u05e8\\u05ec\\u05ef\\u05fa\\u0600\\u0612\\u0616\\u061b\\u061d\\u0623\\u066c\\u0672cy;\\u4403\\u803b>\\u403emma\\u0100;d\\u05f7\\u05f8\\u4393;\\u43dcreve;\\u411e\\u0180eiy\\u0607\\u060c\\u0610dil;\\u4122rc;\\u411c;\\u4413ot;\\u4120r;\\uc000\\ud835\\udd0a;\\u62d9pf;\\uc000\\ud835\\udd3eeater\\u0300EFGLST\\u0635\\u0644\\u064e\\u0656\\u065b\\u0666qual\\u0100;L\\u063e\\u063f\\u6265ess;\\u62dbullEqual;\\u6267reater;\\u6aa2ess;\\u6277lantEqual;\\u6a7eilde;\\u6273cr;\\uc000\\ud835\\udca2;\\u626b\\u0400Aacfiosu\\u0685\\u068b\\u0696\\u069b\\u069e\\u06aa\\u06be\\u06caRDcy;\\u442a\\u0100ct\\u0690\\u0694ek;\\u42c7;\\u405eirc;\\u4124r;\\u610clbertSpace;\\u610b\\u01f0\\u06af\\0\\u06b2f;\\u610dizontalLine;\\u6500\\u0100ct\\u06c3\\u06c5\\xf2\\u06a9rok;\\u4126mp\\u0144\\u06d0\\u06d8ownHum\\xf0\\u012fqual;\\u624f\\u0700EJOacdfgmnostu\\u06fa\\u06fe\\u0703\\u0707\\u070e\\u071a\\u071e\\u0721\\u0728\\u0744\\u0778\\u078b\\u078f\\u0795cy;\\u4415lig;\\u4132cy;\\u4401cute\\u803b\\xcd\\u40cd\\u0100iy\\u0713\\u0718rc\\u803b\\xce\\u40ce;\\u4418ot;\\u4130r;\\u6111rave\\u803b\\xcc\\u40cc\\u0180;ap\\u0720\\u072f\\u073f\\u0100cg\\u0734\\u0737r;\\u412ainaryI;\\u6148lie\\xf3\\u03dd\\u01f4\\u0749\\0\\u0762\\u0100;e\\u074d\\u074e\\u622c\\u0100gr\\u0753\\u0758ral;\\u622bsection;\\u62c2isible\\u0100CT\\u076c\\u0772omma;\\u6063imes;\\u6062\\u0180gpt\\u077f\\u0783\\u0788on;\\u412ef;\\uc000\\ud835\\udd40a;\\u4399cr;\\u6110ilde;\\u4128\\u01eb\\u079a\\0\\u079ecy;\\u4406l\\u803b\\xcf\\u40cf\\u0280cfosu\\u07ac\\u07b7\\u07bc\\u07c2\\u07d0\\u0100iy\\u07b1\\u07b5rc;\\u4134;\\u4419r;\\uc000\\ud835\\udd0dpf;\\uc000\\ud835\\udd41\\u01e3\\u07c7\\0\\u07ccr;\\uc000\\ud835\\udca5rcy;\\u4408kcy;\\u4404\\u0380HJacfos\\u07e4\\u07e8\\u07ec\\u07f1\\u07fd\\u0802\\u0808cy;\\u4425cy;\\u440cppa;\\u439a\\u0100ey\\u07f6\\u07fbdil;\\u4136;\\u441ar;\\uc000\\ud835\\udd0epf;\\uc000\\ud835\\udd42cr;\\uc000\\ud835\\udca6\\u0580JTaceflmost\\u0825\\u0829\\u082c\\u0850\\u0863\\u09b3\\u09b8\\u09c7\\u09cd\\u0a37\\u0a47cy;\\u4409\\u803b<\\u403c\\u0280cmnpr\\u0837\\u083c\\u0841\\u0844\\u084dute;\\u4139bda;\\u439bg;\\u67ealacetrf;\\u6112r;\\u619e\\u0180aey\\u0857\\u085c\\u0861ron;\\u413ddil;\\u413b;\\u441b\\u0100fs\\u0868\\u0970t\\u0500ACDFRTUVar\\u087e\\u08a9\\u08b1\\u08e0\\u08e6\\u08fc\\u092f\\u095b\\u0390\\u096a\\u0100nr\\u0883\\u088fgleBracket;\\u67e8row\\u0180;BR\\u0899\\u089a\\u089e\\u6190ar;\\u61e4ightArrow;\\u61c6eiling;\\u6308o\\u01f5\\u08b7\\0\\u08c3bleBracket;\\u67e6n\\u01d4\\u08c8\\0\\u08d2eeVector;\\u6961ector\\u0100;B\\u08db\\u08dc\\u61c3ar;\\u6959loor;\\u630aight\\u0100AV\\u08ef\\u08f5rrow;\\u6194ector;\\u694e\\u0100er\\u0901\\u0917e\\u0180;AV\\u0909\\u090a\\u0910\\u62a3rrow;\\u61a4ector;\\u695aiangle\\u0180;BE\\u0924\\u0925\\u0929\\u62b2ar;\\u69cfqual;\\u62b4p\\u0180DTV\\u0937\\u0942\\u094cownVector;\\u6951eeVector;\\u6960ector\\u0100;B\\u0956\\u0957\\u61bfar;\\u6958ector\\u0100;B\\u0965\\u0966\\u61bcar;\\u6952ight\\xe1\\u039cs\\u0300EFGLST\\u097e\\u098b\\u0995\\u099d\\u09a2\\u09adqualGreater;\\u62daullEqual;\\u6266reater;\\u6276ess;\\u6aa1lantEqual;\\u6a7dilde;\\u6272r;\\uc000\\ud835\\udd0f\\u0100;e\\u09bd\\u09be\\u62d8ftarrow;\\u61daidot;\\u413f\\u0180npw\\u09d4\\u0a16\\u0a1bg\\u0200LRlr\\u09de\\u09f7\\u0a02\\u0a10eft\\u0100AR\\u09e6\\u09ecrrow;\\u67f5ightArrow;\\u67f7ightArrow;\\u67f6eft\\u0100ar\\u03b3\\u0a0aight\\xe1\\u03bfight\\xe1\\u03caf;\\uc000\\ud835\\udd43er\\u0100LR\\u0a22\\u0a2ceftArrow;\\u6199ightArrow;\\u6198\\u0180cht\\u0a3e\\u0a40\\u0a42\\xf2\\u084c;\\u61b0rok;\\u4141;\\u626a\\u0400acefiosu\\u0a5a\\u0a5d\\u0a60\\u0a77\\u0a7c\\u0a85\\u0a8b\\u0a8ep;\\u6905y;\\u441c\\u0100dl\\u0a65\\u0a6fiumSpace;\\u605flintrf;\\u6133r;\\uc000\\ud835\\udd10nusPlus;\\u6213pf;\\uc000\\ud835\\udd44c\\xf2\\u0a76;\\u439c\\u0480Jacefostu\\u0aa3\\u0aa7\\u0aad\\u0ac0\\u0b14\\u0b19\\u0d91\\u0d97\\u0d9ecy;\\u440acute;\\u4143\\u0180aey\\u0ab4\\u0ab9\\u0aberon;\\u4147dil;\\u4145;\\u441d\\u0180gsw\\u0ac7\\u0af0\\u0b0eative\\u0180MTV\\u0ad3\\u0adf\\u0ae8ediumSpace;\\u600bhi\\u0100cn\\u0ae6\\u0ad8\\xeb\\u0ad9eryThi\\xee\\u0ad9ted\\u0100GL\\u0af8\\u0b06reaterGreate\\xf2\\u0673essLes\\xf3\\u0a48Line;\\u400ar;\\uc000\\ud835\\udd11\\u0200Bnpt\\u0b22\\u0b28\\u0b37\\u0b3areak;\\u6060BreakingSpace;\\u40a0f;\\u6115\\u0680;CDEGHLNPRSTV\\u0b55\\u0b56\\u0b6a\\u0b7c\\u0ba1\\u0beb\\u0c04\\u0c5e\\u0c84\\u0ca6\\u0cd8\\u0d61\\u0d85\\u6aec\\u0100ou\\u0b5b\\u0b64ngruent;\\u6262pCap;\\u626doubleVerticalBar;\\u6226\\u0180lqx\\u0b83\\u0b8a\\u0b9bement;\\u6209ual\\u0100;T\\u0b92\\u0b93\\u6260ilde;\\uc000\\u2242\\u0338ists;\\u6204reater\\u0380;EFGLST\\u0bb6\\u0bb7\\u0bbd\\u0bc9\\u0bd3\\u0bd8\\u0be5\\u626fqual;\\u6271ullEqual;\\uc000\\u2267\\u0338reater;\\uc000\\u226b\\u0338ess;\\u6279lantEqual;\\uc000\\u2a7e\\u0338ilde;\\u6275ump\\u0144\\u0bf2\\u0bfdownHump;\\uc000\\u224e\\u0338qual;\\uc000\\u224f\\u0338e\\u0100fs\\u0c0a\\u0c27tTriangle\\u0180;BE\\u0c1a\\u0c1b\\u0c21\\u62eaar;\\uc000\\u29cf\\u0338qual;\\u62ecs\\u0300;EGLST\\u0c35\\u0c36\\u0c3c\\u0c44\\u0c4b\\u0c58\\u626equal;\\u6270reater;\\u6278ess;\\uc000\\u226a\\u0338lantEqual;\\uc000\\u2a7d\\u0338ilde;\\u6274ested\\u0100GL\\u0c68\\u0c79reaterGreater;\\uc000\\u2aa2\\u0338essLess;\\uc000\\u2aa1\\u0338recedes\\u0180;ES\\u0c92\\u0c93\\u0c9b\\u6280qual;\\uc000\\u2aaf\\u0338lantEqual;\\u62e0\\u0100ei\\u0cab\\u0cb9verseElement;\\u620cghtTriangle\\u0180;BE\\u0ccb\\u0ccc\\u0cd2\\u62ebar;\\uc000\\u29d0\\u0338qual;\\u62ed\\u0100qu\\u0cdd\\u0d0cuareSu\\u0100bp\\u0ce8\\u0cf9set\\u0100;E\\u0cf0\\u0cf3\\uc000\\u228f\\u0338qual;\\u62e2erset\\u0100;E\\u0d03\\u0d06\\uc000\\u2290\\u0338qual;\\u62e3\\u0180bcp\\u0d13\\u0d24\\u0d4eset\\u0100;E\\u0d1b\\u0d1e\\uc000\\u2282\\u20d2qual;\\u6288ceeds\\u0200;EST\\u0d32\\u0d33\\u0d3b\\u0d46\\u6281qual;\\uc000\\u2ab0\\u0338lantEqual;\\u62e1ilde;\\uc000\\u227f\\u0338erset\\u0100;E\\u0d58\\u0d5b\\uc000\\u2283\\u20d2qual;\\u6289ilde\\u0200;EFT\\u0d6e\\u0d6f\\u0d75\\u0d7f\\u6241qual;\\u6244ullEqual;\\u6247ilde;\\u6249erticalBar;\\u6224cr;\\uc000\\ud835\\udca9ilde\\u803b\\xd1\\u40d1;\\u439d\\u0700Eacdfgmoprstuv\\u0dbd\\u0dc2\\u0dc9\\u0dd5\\u0ddb\\u0de0\\u0de7\\u0dfc\\u0e02\\u0e20\\u0e22\\u0e32\\u0e3f\\u0e44lig;\\u4152cute\\u803b\\xd3\\u40d3\\u0100iy\\u0dce\\u0dd3rc\\u803b\\xd4\\u40d4;\\u441eblac;\\u4150r;\\uc000\\ud835\\udd12rave\\u803b\\xd2\\u40d2\\u0180aei\\u0dee\\u0df2\\u0df6cr;\\u414cga;\\u43a9cron;\\u439fpf;\\uc000\\ud835\\udd46enCurly\\u0100DQ\\u0e0e\\u0e1aoubleQuote;\\u601cuote;\\u6018;\\u6a54\\u0100cl\\u0e27\\u0e2cr;\\uc000\\ud835\\udcaaash\\u803b\\xd8\\u40d8i\\u016c\\u0e37\\u0e3cde\\u803b\\xd5\\u40d5es;\\u6a37ml\\u803b\\xd6\\u40d6er\\u0100BP\\u0e4b\\u0e60\\u0100ar\\u0e50\\u0e53r;\\u603eac\\u0100ek\\u0e5a\\u0e5c;\\u63deet;\\u63b4arenthesis;\\u63dc\\u0480acfhilors\\u0e7f\\u0e87\\u0e8a\\u0e8f\\u0e92\\u0e94\\u0e9d\\u0eb0\\u0efcrtialD;\\u6202y;\\u441fr;\\uc000\\ud835\\udd13i;\\u43a6;\\u43a0usMinus;\\u40b1\\u0100ip\\u0ea2\\u0eadncareplan\\xe5\\u069df;\\u6119\\u0200;eio\\u0eb9\\u0eba\\u0ee0\\u0ee4\\u6abbcedes\\u0200;EST\\u0ec8\\u0ec9\\u0ecf\\u0eda\\u627aqual;\\u6aaflantEqual;\\u627cilde;\\u627eme;\\u6033\\u0100dp\\u0ee9\\u0eeeuct;\\u620fortion\\u0100;a\\u0225\\u0ef9l;\\u621d\\u0100ci\\u0f01\\u0f06r;\\uc000\\ud835\\udcab;\\u43a8\\u0200Ufos\\u0f11\\u0f16\\u0f1b\\u0f1fOT\\u803b\\\"\\u4022r;\\uc000\\ud835\\udd14pf;\\u611acr;\\uc000\\ud835\\udcac\\u0600BEacefhiorsu\\u0f3e\\u0f43\\u0f47\\u0f60\\u0f73\\u0fa7\\u0faa\\u0fad\\u1096\\u10a9\\u10b4\\u10bearr;\\u6910G\\u803b\\xae\\u40ae\\u0180cnr\\u0f4e\\u0f53\\u0f56ute;\\u4154g;\\u67ebr\\u0100;t\\u0f5c\\u0f5d\\u61a0l;\\u6916\\u0180aey\\u0f67\\u0f6c\\u0f71ron;\\u4158dil;\\u4156;\\u4420\\u0100;v\\u0f78\\u0f79\\u611cerse\\u0100EU\\u0f82\\u0f99\\u0100lq\\u0f87\\u0f8eement;\\u620builibrium;\\u61cbpEquilibrium;\\u696fr\\xbb\\u0f79o;\\u43a1ght\\u0400ACDFTUVa\\u0fc1\\u0feb\\u0ff3\\u1022\\u1028\\u105b\\u1087\\u03d8\\u0100nr\\u0fc6\\u0fd2gleBracket;\\u67e9row\\u0180;BL\\u0fdc\\u0fdd\\u0fe1\\u6192ar;\\u61e5eftArrow;\\u61c4eiling;\\u6309o\\u01f5\\u0ff9\\0\\u1005bleBracket;\\u67e7n\\u01d4\\u100a\\0\\u1014eeVector;\\u695dector\\u0100;B\\u101d\\u101e\\u61c2ar;\\u6955loor;\\u630b\\u0100er\\u102d\\u1043e\\u0180;AV\\u1035\\u1036\\u103c\\u62a2rrow;\\u61a6ector;\\u695biangle\\u0180;BE\\u1050\\u1051\\u1055\\u62b3ar;\\u69d0qual;\\u62b5p\\u0180DTV\\u1063\\u106e\\u1078ownVector;\\u694feeVector;\\u695cector\\u0100;B\\u1082\\u1083\\u61bear;\\u6954ector\\u0100;B\\u1091\\u1092\\u61c0ar;\\u6953\\u0100pu\\u109b\\u109ef;\\u611dndImplies;\\u6970ightarrow;\\u61db\\u0100ch\\u10b9\\u10bcr;\\u611b;\\u61b1leDelayed;\\u69f4\\u0680HOacfhimoqstu\\u10e4\\u10f1\\u10f7\\u10fd\\u1119\\u111e\\u1151\\u1156\\u1161\\u1167\\u11b5\\u11bb\\u11bf\\u0100Cc\\u10e9\\u10eeHcy;\\u4429y;\\u4428FTcy;\\u442ccute;\\u415a\\u0280;aeiy\\u1108\\u1109\\u110e\\u1113\\u1117\\u6abcron;\\u4160dil;\\u415erc;\\u415c;\\u4421r;\\uc000\\ud835\\udd16ort\\u0200DLRU\\u112a\\u1134\\u113e\\u1149ownArrow\\xbb\\u041eeftArrow\\xbb\\u089aightArrow\\xbb\\u0fddpArrow;\\u6191gma;\\u43a3allCircle;\\u6218pf;\\uc000\\ud835\\udd4a\\u0272\\u116d\\0\\0\\u1170t;\\u621aare\\u0200;ISU\\u117b\\u117c\\u1189\\u11af\\u65a1ntersection;\\u6293u\\u0100bp\\u118f\\u119eset\\u0100;E\\u1197\\u1198\\u628fqual;\\u6291erset\\u0100;E\\u11a8\\u11a9\\u6290qual;\\u6292nion;\\u6294cr;\\uc000\\ud835\\udcaear;\\u62c6\\u0200bcmp\\u11c8\\u11db\\u1209\\u120b\\u0100;s\\u11cd\\u11ce\\u62d0et\\u0100;E\\u11cd\\u11d5qual;\\u6286\\u0100ch\\u11e0\\u1205eeds\\u0200;EST\\u11ed\\u11ee\\u11f4\\u11ff\\u627bqual;\\u6ab0lantEqual;\\u627dilde;\\u627fTh\\xe1\\u0f8c;\\u6211\\u0180;es\\u1212\\u1213\\u1223\\u62d1rset\\u0100;E\\u121c\\u121d\\u6283qual;\\u6287et\\xbb\\u1213\\u0580HRSacfhiors\\u123e\\u1244\\u1249\\u1255\\u125e\\u1271\\u1276\\u129f\\u12c2\\u12c8\\u12d1ORN\\u803b\\xde\\u40deADE;\\u6122\\u0100Hc\\u124e\\u1252cy;\\u440by;\\u4426\\u0100bu\\u125a\\u125c;\\u4009;\\u43a4\\u0180aey\\u1265\\u126a\\u126fron;\\u4164dil;\\u4162;\\u4422r;\\uc000\\ud835\\udd17\\u0100ei\\u127b\\u1289\\u01f2\\u1280\\0\\u1287efore;\\u6234a;\\u4398\\u0100cn\\u128e\\u1298kSpace;\\uc000\\u205f\\u200aSpace;\\u6009lde\\u0200;EFT\\u12ab\\u12ac\\u12b2\\u12bc\\u623cqual;\\u6243ullEqual;\\u6245ilde;\\u6248pf;\\uc000\\ud835\\udd4bipleDot;\\u60db\\u0100ct\\u12d6\\u12dbr;\\uc000\\ud835\\udcafrok;\\u4166\\u0ae1\\u12f7\\u130e\\u131a\\u1326\\0\\u132c\\u1331\\0\\0\\0\\0\\0\\u1338\\u133d\\u1377\\u1385\\0\\u13ff\\u1404\\u140a\\u1410\\u0100cr\\u12fb\\u1301ute\\u803b\\xda\\u40dar\\u0100;o\\u1307\\u1308\\u619fcir;\\u6949r\\u01e3\\u1313\\0\\u1316y;\\u440eve;\\u416c\\u0100iy\\u131e\\u1323rc\\u803b\\xdb\\u40db;\\u4423blac;\\u4170r;\\uc000\\ud835\\udd18rave\\u803b\\xd9\\u40d9acr;\\u416a\\u0100di\\u1341\\u1369er\\u0100BP\\u1348\\u135d\\u0100ar\\u134d\\u1350r;\\u405fac\\u0100ek\\u1357\\u1359;\\u63dfet;\\u63b5arenthesis;\\u63ddon\\u0100;P\\u1370\\u1371\\u62c3lus;\\u628e\\u0100gp\\u137b\\u137fon;\\u4172f;\\uc000\\ud835\\udd4c\\u0400ADETadps\\u1395\\u13ae\\u13b8\\u13c4\\u03e8\\u13d2\\u13d7\\u13f3rrow\\u0180;BD\\u1150\\u13a0\\u13a4ar;\\u6912ownArrow;\\u61c5ownArrow;\\u6195quilibrium;\\u696eee\\u0100;A\\u13cb\\u13cc\\u62a5rrow;\\u61a5own\\xe1\\u03f3er\\u0100LR\\u13de\\u13e8eftArrow;\\u6196ightArrow;\\u6197i\\u0100;l\\u13f9\\u13fa\\u43d2on;\\u43a5ing;\\u416ecr;\\uc000\\ud835\\udcb0ilde;\\u4168ml\\u803b\\xdc\\u40dc\\u0480Dbcdefosv\\u1427\\u142c\\u1430\\u1433\\u143e\\u1485\\u148a\\u1490\\u1496ash;\\u62abar;\\u6aeby;\\u4412ash\\u0100;l\\u143b\\u143c\\u62a9;\\u6ae6\\u0100er\\u1443\\u1445;\\u62c1\\u0180bty\\u144c\\u1450\\u147aar;\\u6016\\u0100;i\\u144f\\u1455cal\\u0200BLST\\u1461\\u1465\\u146a\\u1474ar;\\u6223ine;\\u407ceparator;\\u6758ilde;\\u6240ThinSpace;\\u600ar;\\uc000\\ud835\\udd19pf;\\uc000\\ud835\\udd4dcr;\\uc000\\ud835\\udcb1dash;\\u62aa\\u0280cefos\\u14a7\\u14ac\\u14b1\\u14b6\\u14bcirc;\\u4174dge;\\u62c0r;\\uc000\\ud835\\udd1apf;\\uc000\\ud835\\udd4ecr;\\uc000\\ud835\\udcb2\\u0200fios\\u14cb\\u14d0\\u14d2\\u14d8r;\\uc000\\ud835\\udd1b;\\u439epf;\\uc000\\ud835\\udd4fcr;\\uc000\\ud835\\udcb3\\u0480AIUacfosu\\u14f1\\u14f5\\u14f9\\u14fd\\u1504\\u150f\\u1514\\u151a\\u1520cy;\\u442fcy;\\u4407cy;\\u442ecute\\u803b\\xdd\\u40dd\\u0100iy\\u1509\\u150drc;\\u4176;\\u442br;\\uc000\\ud835\\udd1cpf;\\uc000\\ud835\\udd50cr;\\uc000\\ud835\\udcb4ml;\\u4178\\u0400Hacdefos\\u1535\\u1539\\u153f\\u154b\\u154f\\u155d\\u1560\\u1564cy;\\u4416cute;\\u4179\\u0100ay\\u1544\\u1549ron;\\u417d;\\u4417ot;\\u417b\\u01f2\\u1554\\0\\u155boWidt\\xe8\\u0ad9a;\\u4396r;\\u6128pf;\\u6124cr;\\uc000\\ud835\\udcb5\\u0be1\\u1583\\u158a\\u1590\\0\\u15b0\\u15b6\\u15bf\\0\\0\\0\\0\\u15c6\\u15db\\u15eb\\u165f\\u166d\\0\\u1695\\u169b\\u16b2\\u16b9\\0\\u16becute\\u803b\\xe1\\u40e1reve;\\u4103\\u0300;Ediuy\\u159c\\u159d\\u15a1\\u15a3\\u15a8\\u15ad\\u623e;\\uc000\\u223e\\u0333;\\u623frc\\u803b\\xe2\\u40e2te\\u80bb\\xb4\\u0306;\\u4430lig\\u803b\\xe6\\u40e6\\u0100;r\\xb2\\u15ba;\\uc000\\ud835\\udd1erave\\u803b\\xe0\\u40e0\\u0100ep\\u15ca\\u15d6\\u0100fp\\u15cf\\u15d4sym;\\u6135\\xe8\\u15d3ha;\\u43b1\\u0100ap\\u15dfc\\u0100cl\\u15e4\\u15e7r;\\u4101g;\\u6a3f\\u0264\\u15f0\\0\\0\\u160a\\u0280;adsv\\u15fa\\u15fb\\u15ff\\u1601\\u1607\\u6227nd;\\u6a55;\\u6a5clope;\\u6a58;\\u6a5a\\u0380;elmrsz\\u1618\\u1619\\u161b\\u161e\\u163f\\u164f\\u1659\\u6220;\\u69a4e\\xbb\\u1619sd\\u0100;a\\u1625\\u1626\\u6221\\u0461\\u1630\\u1632\\u1634\\u1636\\u1638\\u163a\\u163c\\u163e;\\u69a8;\\u69a9;\\u69aa;\\u69ab;\\u69ac;\\u69ad;\\u69ae;\\u69aft\\u0100;v\\u1645\\u1646\\u621fb\\u0100;d\\u164c\\u164d\\u62be;\\u699d\\u0100pt\\u1654\\u1657h;\\u6222\\xbb\\xb9arr;\\u637c\\u0100gp\\u1663\\u1667on;\\u4105f;\\uc000\\ud835\\udd52\\u0380;Eaeiop\\u12c1\\u167b\\u167d\\u1682\\u1684\\u1687\\u168a;\\u6a70cir;\\u6a6f;\\u624ad;\\u624bs;\\u4027rox\\u0100;e\\u12c1\\u1692\\xf1\\u1683ing\\u803b\\xe5\\u40e5\\u0180cty\\u16a1\\u16a6\\u16a8r;\\uc000\\ud835\\udcb6;\\u402amp\\u0100;e\\u12c1\\u16af\\xf1\\u0288ilde\\u803b\\xe3\\u40e3ml\\u803b\\xe4\\u40e4\\u0100ci\\u16c2\\u16c8onin\\xf4\\u0272nt;\\u6a11\\u0800Nabcdefiklnoprsu\\u16ed\\u16f1\\u1730\\u173c\\u1743\\u1748\\u1778\\u177d\\u17e0\\u17e6\\u1839\\u1850\\u170d\\u193d\\u1948\\u1970ot;\\u6aed\\u0100cr\\u16f6\\u171ek\\u0200ceps\\u1700\\u1705\\u170d\\u1713ong;\\u624cpsilon;\\u43f6rime;\\u6035im\\u0100;e\\u171a\\u171b\\u623dq;\\u62cd\\u0176\\u1722\\u1726ee;\\u62bded\\u0100;g\\u172c\\u172d\\u6305e\\xbb\\u172drk\\u0100;t\\u135c\\u1737brk;\\u63b6\\u0100oy\\u1701\\u1741;\\u4431quo;\\u601e\\u0280cmprt\\u1753\\u175b\\u1761\\u1764\\u1768aus\\u0100;e\\u010a\\u0109ptyv;\\u69b0s\\xe9\\u170cno\\xf5\\u0113\\u0180ahw\\u176f\\u1771\\u1773;\\u43b2;\\u6136een;\\u626cr;\\uc000\\ud835\\udd1fg\\u0380costuvw\\u178d\\u179d\\u17b3\\u17c1\\u17d5\\u17db\\u17de\\u0180aiu\\u1794\\u1796\\u179a\\xf0\\u0760rc;\\u65efp\\xbb\\u1371\\u0180dpt\\u17a4\\u17a8\\u17adot;\\u6a00lus;\\u6a01imes;\\u6a02\\u0271\\u17b9\\0\\0\\u17becup;\\u6a06ar;\\u6605riangle\\u0100du\\u17cd\\u17d2own;\\u65bdp;\\u65b3plus;\\u6a04e\\xe5\\u1444\\xe5\\u14adarow;\\u690d\\u0180ako\\u17ed\\u1826\\u1835\\u0100cn\\u17f2\\u1823k\\u0180lst\\u17fa\\u05ab\\u1802ozenge;\\u69ebriangle\\u0200;dlr\\u1812\\u1813\\u1818\\u181d\\u65b4own;\\u65beeft;\\u65c2ight;\\u65b8k;\\u6423\\u01b1\\u182b\\0\\u1833\\u01b2\\u182f\\0\\u1831;\\u6592;\\u65914;\\u6593ck;\\u6588\\u0100eo\\u183e\\u184d\\u0100;q\\u1843\\u1846\\uc000=\\u20e5uiv;\\uc000\\u2261\\u20e5t;\\u6310\\u0200ptwx\\u1859\\u185e\\u1867\\u186cf;\\uc000\\ud835\\udd53\\u0100;t\\u13cb\\u1863om\\xbb\\u13cctie;\\u62c8\\u0600DHUVbdhmptuv\\u1885\\u1896\\u18aa\\u18bb\\u18d7\\u18db\\u18ec\\u18ff\\u1905\\u190a\\u1910\\u1921\\u0200LRlr\\u188e\\u1890\\u1892\\u1894;\\u6557;\\u6554;\\u6556;\\u6553\\u0280;DUdu\\u18a1\\u18a2\\u18a4\\u18a6\\u18a8\\u6550;\\u6566;\\u6569;\\u6564;\\u6567\\u0200LRlr\\u18b3\\u18b5\\u18b7\\u18b9;\\u655d;\\u655a;\\u655c;\\u6559\\u0380;HLRhlr\\u18ca\\u18cb\\u18cd\\u18cf\\u18d1\\u18d3\\u18d5\\u6551;\\u656c;\\u6563;\\u6560;\\u656b;\\u6562;\\u655fox;\\u69c9\\u0200LRlr\\u18e4\\u18e6\\u18e8\\u18ea;\\u6555;\\u6552;\\u6510;\\u650c\\u0280;DUdu\\u06bd\\u18f7\\u18f9\\u18fb\\u18fd;\\u6565;\\u6568;\\u652c;\\u6534inus;\\u629flus;\\u629eimes;\\u62a0\\u0200LRlr\\u1919\\u191b\\u191d\\u191f;\\u655b;\\u6558;\\u6518;\\u6514\\u0380;HLRhlr\\u1930\\u1931\\u1933\\u1935\\u1937\\u1939\\u193b\\u6502;\\u656a;\\u6561;\\u655e;\\u653c;\\u6524;\\u651c\\u0100ev\\u0123\\u1942bar\\u803b\\xa6\\u40a6\\u0200ceio\\u1951\\u1956\\u195a\\u1960r;\\uc000\\ud835\\udcb7mi;\\u604fm\\u0100;e\\u171a\\u171cl\\u0180;bh\\u1968\\u1969\\u196b\\u405c;\\u69c5sub;\\u67c8\\u016c\\u1974\\u197el\\u0100;e\\u1979\\u197a\\u6022t\\xbb\\u197ap\\u0180;Ee\\u012f\\u1985\\u1987;\\u6aae\\u0100;q\\u06dc\\u06db\\u0ce1\\u19a7\\0\\u19e8\\u1a11\\u1a15\\u1a32\\0\\u1a37\\u1a50\\0\\0\\u1ab4\\0\\0\\u1ac1\\0\\0\\u1b21\\u1b2e\\u1b4d\\u1b52\\0\\u1bfd\\0\\u1c0c\\u0180cpr\\u19ad\\u19b2\\u19ddute;\\u4107\\u0300;abcds\\u19bf\\u19c0\\u19c4\\u19ca\\u19d5\\u19d9\\u6229nd;\\u6a44rcup;\\u6a49\\u0100au\\u19cf\\u19d2p;\\u6a4bp;\\u6a47ot;\\u6a40;\\uc000\\u2229\\ufe00\\u0100eo\\u19e2\\u19e5t;\\u6041\\xee\\u0693\\u0200aeiu\\u19f0\\u19fb\\u1a01\\u1a05\\u01f0\\u19f5\\0\\u19f8s;\\u6a4don;\\u410ddil\\u803b\\xe7\\u40e7rc;\\u4109ps\\u0100;s\\u1a0c\\u1a0d\\u6a4cm;\\u6a50ot;\\u410b\\u0180dmn\\u1a1b\\u1a20\\u1a26il\\u80bb\\xb8\\u01adptyv;\\u69b2t\\u8100\\xa2;e\\u1a2d\\u1a2e\\u40a2r\\xe4\\u01b2r;\\uc000\\ud835\\udd20\\u0180cei\\u1a3d\\u1a40\\u1a4dy;\\u4447ck\\u0100;m\\u1a47\\u1a48\\u6713ark\\xbb\\u1a48;\\u43c7r\\u0380;Ecefms\\u1a5f\\u1a60\\u1a62\\u1a6b\\u1aa4\\u1aaa\\u1aae\\u65cb;\\u69c3\\u0180;el\\u1a69\\u1a6a\\u1a6d\\u42c6q;\\u6257e\\u0261\\u1a74\\0\\0\\u1a88rrow\\u0100lr\\u1a7c\\u1a81eft;\\u61baight;\\u61bb\\u0280RSacd\\u1a92\\u1a94\\u1a96\\u1a9a\\u1a9f\\xbb\\u0f47;\\u64c8st;\\u629birc;\\u629aash;\\u629dnint;\\u6a10id;\\u6aefcir;\\u69c2ubs\\u0100;u\\u1abb\\u1abc\\u6663it\\xbb\\u1abc\\u02ec\\u1ac7\\u1ad4\\u1afa\\0\\u1b0aon\\u0100;e\\u1acd\\u1ace\\u403a\\u0100;q\\xc7\\xc6\\u026d\\u1ad9\\0\\0\\u1ae2a\\u0100;t\\u1ade\\u1adf\\u402c;\\u4040\\u0180;fl\\u1ae8\\u1ae9\\u1aeb\\u6201\\xee\\u1160e\\u0100mx\\u1af1\\u1af6ent\\xbb\\u1ae9e\\xf3\\u024d\\u01e7\\u1afe\\0\\u1b07\\u0100;d\\u12bb\\u1b02ot;\\u6a6dn\\xf4\\u0246\\u0180fry\\u1b10\\u1b14\\u1b17;\\uc000\\ud835\\udd54o\\xe4\\u0254\\u8100\\xa9;s\\u0155\\u1b1dr;\\u6117\\u0100ao\\u1b25\\u1b29rr;\\u61b5ss;\\u6717\\u0100cu\\u1b32\\u1b37r;\\uc000\\ud835\\udcb8\\u0100bp\\u1b3c\\u1b44\\u0100;e\\u1b41\\u1b42\\u6acf;\\u6ad1\\u0100;e\\u1b49\\u1b4a\\u6ad0;\\u6ad2dot;\\u62ef\\u0380delprvw\\u1b60\\u1b6c\\u1b77\\u1b82\\u1bac\\u1bd4\\u1bf9arr\\u0100lr\\u1b68\\u1b6a;\\u6938;\\u6935\\u0270\\u1b72\\0\\0\\u1b75r;\\u62dec;\\u62dfarr\\u0100;p\\u1b7f\\u1b80\\u61b6;\\u693d\\u0300;bcdos\\u1b8f\\u1b90\\u1b96\\u1ba1\\u1ba5\\u1ba8\\u622arcap;\\u6a48\\u0100au\\u1b9b\\u1b9ep;\\u6a46p;\\u6a4aot;\\u628dr;\\u6a45;\\uc000\\u222a\\ufe00\\u0200alrv\\u1bb5\\u1bbf\\u1bde\\u1be3rr\\u0100;m\\u1bbc\\u1bbd\\u61b7;\\u693cy\\u0180evw\\u1bc7\\u1bd4\\u1bd8q\\u0270\\u1bce\\0\\0\\u1bd2re\\xe3\\u1b73u\\xe3\\u1b75ee;\\u62ceedge;\\u62cfen\\u803b\\xa4\\u40a4earrow\\u0100lr\\u1bee\\u1bf3eft\\xbb\\u1b80ight\\xbb\\u1bbde\\xe4\\u1bdd\\u0100ci\\u1c01\\u1c07onin\\xf4\\u01f7nt;\\u6231lcty;\\u632d\\u0980AHabcdefhijlorstuwz\\u1c38\\u1c3b\\u1c3f\\u1c5d\\u1c69\\u1c75\\u1c8a\\u1c9e\\u1cac\\u1cb7\\u1cfb\\u1cff\\u1d0d\\u1d7b\\u1d91\\u1dab\\u1dbb\\u1dc6\\u1dcdr\\xf2\\u0381ar;\\u6965\\u0200glrs\\u1c48\\u1c4d\\u1c52\\u1c54ger;\\u6020eth;\\u6138\\xf2\\u1133h\\u0100;v\\u1c5a\\u1c5b\\u6010\\xbb\\u090a\\u016b\\u1c61\\u1c67arow;\\u690fa\\xe3\\u0315\\u0100ay\\u1c6e\\u1c73ron;\\u410f;\\u4434\\u0180;ao\\u0332\\u1c7c\\u1c84\\u0100gr\\u02bf\\u1c81r;\\u61catseq;\\u6a77\\u0180glm\\u1c91\\u1c94\\u1c98\\u803b\\xb0\\u40b0ta;\\u43b4ptyv;\\u69b1\\u0100ir\\u1ca3\\u1ca8sht;\\u697f;\\uc000\\ud835\\udd21ar\\u0100lr\\u1cb3\\u1cb5\\xbb\\u08dc\\xbb\\u101e\\u0280aegsv\\u1cc2\\u0378\\u1cd6\\u1cdc\\u1ce0m\\u0180;os\\u0326\\u1cca\\u1cd4nd\\u0100;s\\u0326\\u1cd1uit;\\u6666amma;\\u43ddin;\\u62f2\\u0180;io\\u1ce7\\u1ce8\\u1cf8\\u40f7de\\u8100\\xf7;o\\u1ce7\\u1cf0ntimes;\\u62c7n\\xf8\\u1cf7cy;\\u4452c\\u026f\\u1d06\\0\\0\\u1d0arn;\\u631eop;\\u630d\\u0280lptuw\\u1d18\\u1d1d\\u1d22\\u1d49\\u1d55lar;\\u4024f;\\uc000\\ud835\\udd55\\u0280;emps\\u030b\\u1d2d\\u1d37\\u1d3d\\u1d42q\\u0100;d\\u0352\\u1d33ot;\\u6251inus;\\u6238lus;\\u6214quare;\\u62a1blebarwedg\\xe5\\xfan\\u0180adh\\u112e\\u1d5d\\u1d67ownarrow\\xf3\\u1c83arpoon\\u0100lr\\u1d72\\u1d76ef\\xf4\\u1cb4igh\\xf4\\u1cb6\\u0162\\u1d7f\\u1d85karo\\xf7\\u0f42\\u026f\\u1d8a\\0\\0\\u1d8ern;\\u631fop;\\u630c\\u0180cot\\u1d98\\u1da3\\u1da6\\u0100ry\\u1d9d\\u1da1;\\uc000\\ud835\\udcb9;\\u4455l;\\u69f6rok;\\u4111\\u0100dr\\u1db0\\u1db4ot;\\u62f1i\\u0100;f\\u1dba\\u1816\\u65bf\\u0100ah\\u1dc0\\u1dc3r\\xf2\\u0429a\\xf2\\u0fa6angle;\\u69a6\\u0100ci\\u1dd2\\u1dd5y;\\u445fgrarr;\\u67ff\\u0900Dacdefglmnopqrstux\\u1e01\\u1e09\\u1e19\\u1e38\\u0578\\u1e3c\\u1e49\\u1e61\\u1e7e\\u1ea5\\u1eaf\\u1ebd\\u1ee1\\u1f2a\\u1f37\\u1f44\\u1f4e\\u1f5a\\u0100Do\\u1e06\\u1d34o\\xf4\\u1c89\\u0100cs\\u1e0e\\u1e14ute\\u803b\\xe9\\u40e9ter;\\u6a6e\\u0200aioy\\u1e22\\u1e27\\u1e31\\u1e36ron;\\u411br\\u0100;c\\u1e2d\\u1e2e\\u6256\\u803b\\xea\\u40ealon;\\u6255;\\u444dot;\\u4117\\u0100Dr\\u1e41\\u1e45ot;\\u6252;\\uc000\\ud835\\udd22\\u0180;rs\\u1e50\\u1e51\\u1e57\\u6a9aave\\u803b\\xe8\\u40e8\\u0100;d\\u1e5c\\u1e5d\\u6a96ot;\\u6a98\\u0200;ils\\u1e6a\\u1e6b\\u1e72\\u1e74\\u6a99nters;\\u63e7;\\u6113\\u0100;d\\u1e79\\u1e7a\\u6a95ot;\\u6a97\\u0180aps\\u1e85\\u1e89\\u1e97cr;\\u4113ty\\u0180;sv\\u1e92\\u1e93\\u1e95\\u6205et\\xbb\\u1e93p\\u01001;\\u1e9d\\u1ea4\\u0133\\u1ea1\\u1ea3;\\u6004;\\u6005\\u6003\\u0100gs\\u1eaa\\u1eac;\\u414bp;\\u6002\\u0100gp\\u1eb4\\u1eb8on;\\u4119f;\\uc000\\ud835\\udd56\\u0180als\\u1ec4\\u1ece\\u1ed2r\\u0100;s\\u1eca\\u1ecb\\u62d5l;\\u69e3us;\\u6a71i\\u0180;lv\\u1eda\\u1edb\\u1edf\\u43b5on\\xbb\\u1edb;\\u43f5\\u0200csuv\\u1eea\\u1ef3\\u1f0b\\u1f23\\u0100io\\u1eef\\u1e31rc\\xbb\\u1e2e\\u0269\\u1ef9\\0\\0\\u1efb\\xed\\u0548ant\\u0100gl\\u1f02\\u1f06tr\\xbb\\u1e5dess\\xbb\\u1e7a\\u0180aei\\u1f12\\u1f16\\u1f1als;\\u403dst;\\u625fv\\u0100;D\\u0235\\u1f20D;\\u6a78parsl;\\u69e5\\u0100Da\\u1f2f\\u1f33ot;\\u6253rr;\\u6971\\u0180cdi\\u1f3e\\u1f41\\u1ef8r;\\u612fo\\xf4\\u0352\\u0100ah\\u1f49\\u1f4b;\\u43b7\\u803b\\xf0\\u40f0\\u0100mr\\u1f53\\u1f57l\\u803b\\xeb\\u40ebo;\\u60ac\\u0180cip\\u1f61\\u1f64\\u1f67l;\\u4021s\\xf4\\u056e\\u0100eo\\u1f6c\\u1f74ctatio\\xee\\u0559nential\\xe5\\u0579\\u09e1\\u1f92\\0\\u1f9e\\0\\u1fa1\\u1fa7\\0\\0\\u1fc6\\u1fcc\\0\\u1fd3\\0\\u1fe6\\u1fea\\u2000\\0\\u2008\\u205allingdotse\\xf1\\u1e44y;\\u4444male;\\u6640\\u0180ilr\\u1fad\\u1fb3\\u1fc1lig;\\u8000\\ufb03\\u0269\\u1fb9\\0\\0\\u1fbdg;\\u8000\\ufb00ig;\\u8000\\ufb04;\\uc000\\ud835\\udd23lig;\\u8000\\ufb01lig;\\uc000fj\\u0180alt\\u1fd9\\u1fdc\\u1fe1t;\\u666dig;\\u8000\\ufb02ns;\\u65b1of;\\u4192\\u01f0\\u1fee\\0\\u1ff3f;\\uc000\\ud835\\udd57\\u0100ak\\u05bf\\u1ff7\\u0100;v\\u1ffc\\u1ffd\\u62d4;\\u6ad9artint;\\u6a0d\\u0100ao\\u200c\\u2055\\u0100cs\\u2011\\u2052\\u03b1\\u201a\\u2030\\u2038\\u2045\\u2048\\0\\u2050\\u03b2\\u2022\\u2025\\u2027\\u202a\\u202c\\0\\u202e\\u803b\\xbd\\u40bd;\\u6153\\u803b\\xbc\\u40bc;\\u6155;\\u6159;\\u615b\\u01b3\\u2034\\0\\u2036;\\u6154;\\u6156\\u02b4\\u203e\\u2041\\0\\0\\u2043\\u803b\\xbe\\u40be;\\u6157;\\u615c5;\\u6158\\u01b6\\u204c\\0\\u204e;\\u615a;\\u615d8;\\u615el;\\u6044wn;\\u6322cr;\\uc000\\ud835\\udcbb\\u0880Eabcdefgijlnorstv\\u2082\\u2089\\u209f\\u20a5\\u20b0\\u20b4\\u20f0\\u20f5\\u20fa\\u20ff\\u2103\\u2112\\u2138\\u0317\\u213e\\u2152\\u219e\\u0100;l\\u064d\\u2087;\\u6a8c\\u0180cmp\\u2090\\u2095\\u209dute;\\u41f5ma\\u0100;d\\u209c\\u1cda\\u43b3;\\u6a86reve;\\u411f\\u0100iy\\u20aa\\u20aerc;\\u411d;\\u4433ot;\\u4121\\u0200;lqs\\u063e\\u0642\\u20bd\\u20c9\\u0180;qs\\u063e\\u064c\\u20c4lan\\xf4\\u0665\\u0200;cdl\\u0665\\u20d2\\u20d5\\u20e5c;\\u6aa9ot\\u0100;o\\u20dc\\u20dd\\u6a80\\u0100;l\\u20e2\\u20e3\\u6a82;\\u6a84\\u0100;e\\u20ea\\u20ed\\uc000\\u22db\\ufe00s;\\u6a94r;\\uc000\\ud835\\udd24\\u0100;g\\u0673\\u061bmel;\\u6137cy;\\u4453\\u0200;Eaj\\u065a\\u210c\\u210e\\u2110;\\u6a92;\\u6aa5;\\u6aa4\\u0200Eaes\\u211b\\u211d\\u2129\\u2134;\\u6269p\\u0100;p\\u2123\\u2124\\u6a8arox\\xbb\\u2124\\u0100;q\\u212e\\u212f\\u6a88\\u0100;q\\u212e\\u211bim;\\u62e7pf;\\uc000\\ud835\\udd58\\u0100ci\\u2143\\u2146r;\\u610am\\u0180;el\\u066b\\u214e\\u2150;\\u6a8e;\\u6a90\\u8300>;cdlqr\\u05ee\\u2160\\u216a\\u216e\\u2173\\u2179\\u0100ci\\u2165\\u2167;\\u6aa7r;\\u6a7aot;\\u62d7Par;\\u6995uest;\\u6a7c\\u0280adels\\u2184\\u216a\\u2190\\u0656\\u219b\\u01f0\\u2189\\0\\u218epro\\xf8\\u209er;\\u6978q\\u0100lq\\u063f\\u2196les\\xf3\\u2088i\\xed\\u066b\\u0100en\\u21a3\\u21adrtneqq;\\uc000\\u2269\\ufe00\\xc5\\u21aa\\u0500Aabcefkosy\\u21c4\\u21c7\\u21f1\\u21f5\\u21fa\\u2218\\u221d\\u222f\\u2268\\u227dr\\xf2\\u03a0\\u0200ilmr\\u21d0\\u21d4\\u21d7\\u21dbrs\\xf0\\u1484f\\xbb\\u2024il\\xf4\\u06a9\\u0100dr\\u21e0\\u21e4cy;\\u444a\\u0180;cw\\u08f4\\u21eb\\u21efir;\\u6948;\\u61adar;\\u610firc;\\u4125\\u0180alr\\u2201\\u220e\\u2213rts\\u0100;u\\u2209\\u220a\\u6665it\\xbb\\u220alip;\\u6026con;\\u62b9r;\\uc000\\ud835\\udd25s\\u0100ew\\u2223\\u2229arow;\\u6925arow;\\u6926\\u0280amopr\\u223a\\u223e\\u2243\\u225e\\u2263rr;\\u61fftht;\\u623bk\\u0100lr\\u2249\\u2253eftarrow;\\u61a9ightarrow;\\u61aaf;\\uc000\\ud835\\udd59bar;\\u6015\\u0180clt\\u226f\\u2274\\u2278r;\\uc000\\ud835\\udcbdas\\xe8\\u21f4rok;\\u4127\\u0100bp\\u2282\\u2287ull;\\u6043hen\\xbb\\u1c5b\\u0ae1\\u22a3\\0\\u22aa\\0\\u22b8\\u22c5\\u22ce\\0\\u22d5\\u22f3\\0\\0\\u22f8\\u2322\\u2367\\u2362\\u237f\\0\\u2386\\u23aa\\u23b4cute\\u803b\\xed\\u40ed\\u0180;iy\\u0771\\u22b0\\u22b5rc\\u803b\\xee\\u40ee;\\u4438\\u0100cx\\u22bc\\u22bfy;\\u4435cl\\u803b\\xa1\\u40a1\\u0100fr\\u039f\\u22c9;\\uc000\\ud835\\udd26rave\\u803b\\xec\\u40ec\\u0200;ino\\u073e\\u22dd\\u22e9\\u22ee\\u0100in\\u22e2\\u22e6nt;\\u6a0ct;\\u622dfin;\\u69dcta;\\u6129lig;\\u4133\\u0180aop\\u22fe\\u231a\\u231d\\u0180cgt\\u2305\\u2308\\u2317r;\\u412b\\u0180elp\\u071f\\u230f\\u2313in\\xe5\\u078ear\\xf4\\u0720h;\\u4131f;\\u62b7ed;\\u41b5\\u0280;cfot\\u04f4\\u232c\\u2331\\u233d\\u2341are;\\u6105in\\u0100;t\\u2338\\u2339\\u621eie;\\u69dddo\\xf4\\u2319\\u0280;celp\\u0757\\u234c\\u2350\\u235b\\u2361al;\\u62ba\\u0100gr\\u2355\\u2359er\\xf3\\u1563\\xe3\\u234darhk;\\u6a17rod;\\u6a3c\\u0200cgpt\\u236f\\u2372\\u2376\\u237by;\\u4451on;\\u412ff;\\uc000\\ud835\\udd5aa;\\u43b9uest\\u803b\\xbf\\u40bf\\u0100ci\\u238a\\u238fr;\\uc000\\ud835\\udcben\\u0280;Edsv\\u04f4\\u239b\\u239d\\u23a1\\u04f3;\\u62f9ot;\\u62f5\\u0100;v\\u23a6\\u23a7\\u62f4;\\u62f3\\u0100;i\\u0777\\u23aelde;\\u4129\\u01eb\\u23b8\\0\\u23bccy;\\u4456l\\u803b\\xef\\u40ef\\u0300cfmosu\\u23cc\\u23d7\\u23dc\\u23e1\\u23e7\\u23f5\\u0100iy\\u23d1\\u23d5rc;\\u4135;\\u4439r;\\uc000\\ud835\\udd27ath;\\u4237pf;\\uc000\\ud835\\udd5b\\u01e3\\u23ec\\0\\u23f1r;\\uc000\\ud835\\udcbfrcy;\\u4458kcy;\\u4454\\u0400acfghjos\\u240b\\u2416\\u2422\\u2427\\u242d\\u2431\\u2435\\u243bppa\\u0100;v\\u2413\\u2414\\u43ba;\\u43f0\\u0100ey\\u241b\\u2420dil;\\u4137;\\u443ar;\\uc000\\ud835\\udd28reen;\\u4138cy;\\u4445cy;\\u445cpf;\\uc000\\ud835\\udd5ccr;\\uc000\\ud835\\udcc0\\u0b80ABEHabcdefghjlmnoprstuv\\u2470\\u2481\\u2486\\u248d\\u2491\\u250e\\u253d\\u255a\\u2580\\u264e\\u265e\\u2665\\u2679\\u267d\\u269a\\u26b2\\u26d8\\u275d\\u2768\\u278b\\u27c0\\u2801\\u2812\\u0180art\\u2477\\u247a\\u247cr\\xf2\\u09c6\\xf2\\u0395ail;\\u691barr;\\u690e\\u0100;g\\u0994\\u248b;\\u6a8bar;\\u6962\\u0963\\u24a5\\0\\u24aa\\0\\u24b1\\0\\0\\0\\0\\0\\u24b5\\u24ba\\0\\u24c6\\u24c8\\u24cd\\0\\u24f9ute;\\u413amptyv;\\u69b4ra\\xee\\u084cbda;\\u43bbg\\u0180;dl\\u088e\\u24c1\\u24c3;\\u6991\\xe5\\u088e;\\u6a85uo\\u803b\\xab\\u40abr\\u0400;bfhlpst\\u0899\\u24de\\u24e6\\u24e9\\u24eb\\u24ee\\u24f1\\u24f5\\u0100;f\\u089d\\u24e3s;\\u691fs;\\u691d\\xeb\\u2252p;\\u61abl;\\u6939im;\\u6973l;\\u61a2\\u0180;ae\\u24ff\\u2500\\u2504\\u6aabil;\\u6919\\u0100;s\\u2509\\u250a\\u6aad;\\uc000\\u2aad\\ufe00\\u0180abr\\u2515\\u2519\\u251drr;\\u690crk;\\u6772\\u0100ak\\u2522\\u252cc\\u0100ek\\u2528\\u252a;\\u407b;\\u405b\\u0100es\\u2531\\u2533;\\u698bl\\u0100du\\u2539\\u253b;\\u698f;\\u698d\\u0200aeuy\\u2546\\u254b\\u2556\\u2558ron;\\u413e\\u0100di\\u2550\\u2554il;\\u413c\\xec\\u08b0\\xe2\\u2529;\\u443b\\u0200cqrs\\u2563\\u2566\\u256d\\u257da;\\u6936uo\\u0100;r\\u0e19\\u1746\\u0100du\\u2572\\u2577har;\\u6967shar;\\u694bh;\\u61b2\\u0280;fgqs\\u258b\\u258c\\u0989\\u25f3\\u25ff\\u6264t\\u0280ahlrt\\u2598\\u25a4\\u25b7\\u25c2\\u25e8rrow\\u0100;t\\u0899\\u25a1a\\xe9\\u24f6arpoon\\u0100du\\u25af\\u25b4own\\xbb\\u045ap\\xbb\\u0966eftarrows;\\u61c7ight\\u0180ahs\\u25cd\\u25d6\\u25derrow\\u0100;s\\u08f4\\u08a7arpoon\\xf3\\u0f98quigarro\\xf7\\u21f0hreetimes;\\u62cb\\u0180;qs\\u258b\\u0993\\u25falan\\xf4\\u09ac\\u0280;cdgs\\u09ac\\u260a\\u260d\\u261d\\u2628c;\\u6aa8ot\\u0100;o\\u2614\\u2615\\u6a7f\\u0100;r\\u261a\\u261b\\u6a81;\\u6a83\\u0100;e\\u2622\\u2625\\uc000\\u22da\\ufe00s;\\u6a93\\u0280adegs\\u2633\\u2639\\u263d\\u2649\\u264bppro\\xf8\\u24c6ot;\\u62d6q\\u0100gq\\u2643\\u2645\\xf4\\u0989gt\\xf2\\u248c\\xf4\\u099bi\\xed\\u09b2\\u0180ilr\\u2655\\u08e1\\u265asht;\\u697c;\\uc000\\ud835\\udd29\\u0100;E\\u099c\\u2663;\\u6a91\\u0161\\u2669\\u2676r\\u0100du\\u25b2\\u266e\\u0100;l\\u0965\\u2673;\\u696alk;\\u6584cy;\\u4459\\u0280;acht\\u0a48\\u2688\\u268b\\u2691\\u2696r\\xf2\\u25c1orne\\xf2\\u1d08ard;\\u696bri;\\u65fa\\u0100io\\u269f\\u26a4dot;\\u4140ust\\u0100;a\\u26ac\\u26ad\\u63b0che\\xbb\\u26ad\\u0200Eaes\\u26bb\\u26bd\\u26c9\\u26d4;\\u6268p\\u0100;p\\u26c3\\u26c4\\u6a89rox\\xbb\\u26c4\\u0100;q\\u26ce\\u26cf\\u6a87\\u0100;q\\u26ce\\u26bbim;\\u62e6\\u0400abnoptwz\\u26e9\\u26f4\\u26f7\\u271a\\u272f\\u2741\\u2747\\u2750\\u0100nr\\u26ee\\u26f1g;\\u67ecr;\\u61fdr\\xeb\\u08c1g\\u0180lmr\\u26ff\\u270d\\u2714eft\\u0100ar\\u09e6\\u2707ight\\xe1\\u09f2apsto;\\u67fcight\\xe1\\u09fdparrow\\u0100lr\\u2725\\u2729ef\\xf4\\u24edight;\\u61ac\\u0180afl\\u2736\\u2739\\u273dr;\\u6985;\\uc000\\ud835\\udd5dus;\\u6a2dimes;\\u6a34\\u0161\\u274b\\u274fst;\\u6217\\xe1\\u134e\\u0180;ef\\u2757\\u2758\\u1800\\u65cange\\xbb\\u2758ar\\u0100;l\\u2764\\u2765\\u4028t;\\u6993\\u0280achmt\\u2773\\u2776\\u277c\\u2785\\u2787r\\xf2\\u08a8orne\\xf2\\u1d8car\\u0100;d\\u0f98\\u2783;\\u696d;\\u600eri;\\u62bf\\u0300achiqt\\u2798\\u279d\\u0a40\\u27a2\\u27ae\\u27bbquo;\\u6039r;\\uc000\\ud835\\udcc1m\\u0180;eg\\u09b2\\u27aa\\u27ac;\\u6a8d;\\u6a8f\\u0100bu\\u252a\\u27b3o\\u0100;r\\u0e1f\\u27b9;\\u601arok;\\u4142\\u8400<;cdhilqr\\u082b\\u27d2\\u2639\\u27dc\\u27e0\\u27e5\\u27ea\\u27f0\\u0100ci\\u27d7\\u27d9;\\u6aa6r;\\u6a79re\\xe5\\u25f2mes;\\u62c9arr;\\u6976uest;\\u6a7b\\u0100Pi\\u27f5\\u27f9ar;\\u6996\\u0180;ef\\u2800\\u092d\\u181b\\u65c3r\\u0100du\\u2807\\u280dshar;\\u694ahar;\\u6966\\u0100en\\u2817\\u2821rtneqq;\\uc000\\u2268\\ufe00\\xc5\\u281e\\u0700Dacdefhilnopsu\\u2840\\u2845\\u2882\\u288e\\u2893\\u28a0\\u28a5\\u28a8\\u28da\\u28e2\\u28e4\\u0a83\\u28f3\\u2902Dot;\\u623a\\u0200clpr\\u284e\\u2852\\u2863\\u287dr\\u803b\\xaf\\u40af\\u0100et\\u2857\\u2859;\\u6642\\u0100;e\\u285e\\u285f\\u6720se\\xbb\\u285f\\u0100;s\\u103b\\u2868to\\u0200;dlu\\u103b\\u2873\\u2877\\u287bow\\xee\\u048cef\\xf4\\u090f\\xf0\\u13d1ker;\\u65ae\\u0100oy\\u2887\\u288cmma;\\u6a29;\\u443cash;\\u6014asuredangle\\xbb\\u1626r;\\uc000\\ud835\\udd2ao;\\u6127\\u0180cdn\\u28af\\u28b4\\u28c9ro\\u803b\\xb5\\u40b5\\u0200;acd\\u1464\\u28bd\\u28c0\\u28c4s\\xf4\\u16a7ir;\\u6af0ot\\u80bb\\xb7\\u01b5us\\u0180;bd\\u28d2\\u1903\\u28d3\\u6212\\u0100;u\\u1d3c\\u28d8;\\u6a2a\\u0163\\u28de\\u28e1p;\\u6adb\\xf2\\u2212\\xf0\\u0a81\\u0100dp\\u28e9\\u28eeels;\\u62a7f;\\uc000\\ud835\\udd5e\\u0100ct\\u28f8\\u28fdr;\\uc000\\ud835\\udcc2pos\\xbb\\u159d\\u0180;lm\\u2909\\u290a\\u290d\\u43bctimap;\\u62b8\\u0c00GLRVabcdefghijlmoprstuvw\\u2942\\u2953\\u297e\\u2989\\u2998\\u29da\\u29e9\\u2a15\\u2a1a\\u2a58\\u2a5d\\u2a83\\u2a95\\u2aa4\\u2aa8\\u2b04\\u2b07\\u2b44\\u2b7f\\u2bae\\u2c34\\u2c67\\u2c7c\\u2ce9\\u0100gt\\u2947\\u294b;\\uc000\\u22d9\\u0338\\u0100;v\\u2950\\u0bcf\\uc000\\u226b\\u20d2\\u0180elt\\u295a\\u2972\\u2976ft\\u0100ar\\u2961\\u2967rrow;\\u61cdightarrow;\\u61ce;\\uc000\\u22d8\\u0338\\u0100;v\\u297b\\u0c47\\uc000\\u226a\\u20d2ightarrow;\\u61cf\\u0100Dd\\u298e\\u2993ash;\\u62afash;\\u62ae\\u0280bcnpt\\u29a3\\u29a7\\u29ac\\u29b1\\u29ccla\\xbb\\u02deute;\\u4144g;\\uc000\\u2220\\u20d2\\u0280;Eiop\\u0d84\\u29bc\\u29c0\\u29c5\\u29c8;\\uc000\\u2a70\\u0338d;\\uc000\\u224b\\u0338s;\\u4149ro\\xf8\\u0d84ur\\u0100;a\\u29d3\\u29d4\\u666el\\u0100;s\\u29d3\\u0b38\\u01f3\\u29df\\0\\u29e3p\\u80bb\\xa0\\u0b37mp\\u0100;e\\u0bf9\\u0c00\\u0280aeouy\\u29f4\\u29fe\\u2a03\\u2a10\\u2a13\\u01f0\\u29f9\\0\\u29fb;\\u6a43on;\\u4148dil;\\u4146ng\\u0100;d\\u0d7e\\u2a0aot;\\uc000\\u2a6d\\u0338p;\\u6a42;\\u443dash;\\u6013\\u0380;Aadqsx\\u0b92\\u2a29\\u2a2d\\u2a3b\\u2a41\\u2a45\\u2a50rr;\\u61d7r\\u0100hr\\u2a33\\u2a36k;\\u6924\\u0100;o\\u13f2\\u13f0ot;\\uc000\\u2250\\u0338ui\\xf6\\u0b63\\u0100ei\\u2a4a\\u2a4ear;\\u6928\\xed\\u0b98ist\\u0100;s\\u0ba0\\u0b9fr;\\uc000\\ud835\\udd2b\\u0200Eest\\u0bc5\\u2a66\\u2a79\\u2a7c\\u0180;qs\\u0bbc\\u2a6d\\u0be1\\u0180;qs\\u0bbc\\u0bc5\\u2a74lan\\xf4\\u0be2i\\xed\\u0bea\\u0100;r\\u0bb6\\u2a81\\xbb\\u0bb7\\u0180Aap\\u2a8a\\u2a8d\\u2a91r\\xf2\\u2971rr;\\u61aear;\\u6af2\\u0180;sv\\u0f8d\\u2a9c\\u0f8c\\u0100;d\\u2aa1\\u2aa2\\u62fc;\\u62facy;\\u445a\\u0380AEadest\\u2ab7\\u2aba\\u2abe\\u2ac2\\u2ac5\\u2af6\\u2af9r\\xf2\\u2966;\\uc000\\u2266\\u0338rr;\\u619ar;\\u6025\\u0200;fqs\\u0c3b\\u2ace\\u2ae3\\u2aeft\\u0100ar\\u2ad4\\u2ad9rro\\xf7\\u2ac1ightarro\\xf7\\u2a90\\u0180;qs\\u0c3b\\u2aba\\u2aealan\\xf4\\u0c55\\u0100;s\\u0c55\\u2af4\\xbb\\u0c36i\\xed\\u0c5d\\u0100;r\\u0c35\\u2afei\\u0100;e\\u0c1a\\u0c25i\\xe4\\u0d90\\u0100pt\\u2b0c\\u2b11f;\\uc000\\ud835\\udd5f\\u8180\\xac;in\\u2b19\\u2b1a\\u2b36\\u40acn\\u0200;Edv\\u0b89\\u2b24\\u2b28\\u2b2e;\\uc000\\u22f9\\u0338ot;\\uc000\\u22f5\\u0338\\u01e1\\u0b89\\u2b33\\u2b35;\\u62f7;\\u62f6i\\u0100;v\\u0cb8\\u2b3c\\u01e1\\u0cb8\\u2b41\\u2b43;\\u62fe;\\u62fd\\u0180aor\\u2b4b\\u2b63\\u2b69r\\u0200;ast\\u0b7b\\u2b55\\u2b5a\\u2b5flle\\xec\\u0b7bl;\\uc000\\u2afd\\u20e5;\\uc000\\u2202\\u0338lint;\\u6a14\\u0180;ce\\u0c92\\u2b70\\u2b73u\\xe5\\u0ca5\\u0100;c\\u0c98\\u2b78\\u0100;e\\u0c92\\u2b7d\\xf1\\u0c98\\u0200Aait\\u2b88\\u2b8b\\u2b9d\\u2ba7r\\xf2\\u2988rr\\u0180;cw\\u2b94\\u2b95\\u2b99\\u619b;\\uc000\\u2933\\u0338;\\uc000\\u219d\\u0338ghtarrow\\xbb\\u2b95ri\\u0100;e\\u0ccb\\u0cd6\\u0380chimpqu\\u2bbd\\u2bcd\\u2bd9\\u2b04\\u0b78\\u2be4\\u2bef\\u0200;cer\\u0d32\\u2bc6\\u0d37\\u2bc9u\\xe5\\u0d45;\\uc000\\ud835\\udcc3ort\\u026d\\u2b05\\0\\0\\u2bd6ar\\xe1\\u2b56m\\u0100;e\\u0d6e\\u2bdf\\u0100;q\\u0d74\\u0d73su\\u0100bp\\u2beb\\u2bed\\xe5\\u0cf8\\xe5\\u0d0b\\u0180bcp\\u2bf6\\u2c11\\u2c19\\u0200;Ees\\u2bff\\u2c00\\u0d22\\u2c04\\u6284;\\uc000\\u2ac5\\u0338et\\u0100;e\\u0d1b\\u2c0bq\\u0100;q\\u0d23\\u2c00c\\u0100;e\\u0d32\\u2c17\\xf1\\u0d38\\u0200;Ees\\u2c22\\u2c23\\u0d5f\\u2c27\\u6285;\\uc000\\u2ac6\\u0338et\\u0100;e\\u0d58\\u2c2eq\\u0100;q\\u0d60\\u2c23\\u0200gilr\\u2c3d\\u2c3f\\u2c45\\u2c47\\xec\\u0bd7lde\\u803b\\xf1\\u40f1\\xe7\\u0c43iangle\\u0100lr\\u2c52\\u2c5ceft\\u0100;e\\u0c1a\\u2c5a\\xf1\\u0c26ight\\u0100;e\\u0ccb\\u2c65\\xf1\\u0cd7\\u0100;m\\u2c6c\\u2c6d\\u43bd\\u0180;es\\u2c74\\u2c75\\u2c79\\u4023ro;\\u6116p;\\u6007\\u0480DHadgilrs\\u2c8f\\u2c94\\u2c99\\u2c9e\\u2ca3\\u2cb0\\u2cb6\\u2cd3\\u2ce3ash;\\u62adarr;\\u6904p;\\uc000\\u224d\\u20d2ash;\\u62ac\\u0100et\\u2ca8\\u2cac;\\uc000\\u2265\\u20d2;\\uc000>\\u20d2nfin;\\u69de\\u0180Aet\\u2cbd\\u2cc1\\u2cc5rr;\\u6902;\\uc000\\u2264\\u20d2\\u0100;r\\u2cca\\u2ccd\\uc000<\\u20d2ie;\\uc000\\u22b4\\u20d2\\u0100At\\u2cd8\\u2cdcrr;\\u6903rie;\\uc000\\u22b5\\u20d2im;\\uc000\\u223c\\u20d2\\u0180Aan\\u2cf0\\u2cf4\\u2d02rr;\\u61d6r\\u0100hr\\u2cfa\\u2cfdk;\\u6923\\u0100;o\\u13e7\\u13e5ear;\\u6927\\u1253\\u1a95\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\u2d2d\\0\\u2d38\\u2d48\\u2d60\\u2d65\\u2d72\\u2d84\\u1b07\\0\\0\\u2d8d\\u2dab\\0\\u2dc8\\u2dce\\0\\u2ddc\\u2e19\\u2e2b\\u2e3e\\u2e43\\u0100cs\\u2d31\\u1a97ute\\u803b\\xf3\\u40f3\\u0100iy\\u2d3c\\u2d45r\\u0100;c\\u1a9e\\u2d42\\u803b\\xf4\\u40f4;\\u443e\\u0280abios\\u1aa0\\u2d52\\u2d57\\u01c8\\u2d5alac;\\u4151v;\\u6a38old;\\u69bclig;\\u4153\\u0100cr\\u2d69\\u2d6dir;\\u69bf;\\uc000\\ud835\\udd2c\\u036f\\u2d79\\0\\0\\u2d7c\\0\\u2d82n;\\u42dbave\\u803b\\xf2\\u40f2;\\u69c1\\u0100bm\\u2d88\\u0df4ar;\\u69b5\\u0200acit\\u2d95\\u2d98\\u2da5\\u2da8r\\xf2\\u1a80\\u0100ir\\u2d9d\\u2da0r;\\u69beoss;\\u69bbn\\xe5\\u0e52;\\u69c0\\u0180aei\\u2db1\\u2db5\\u2db9cr;\\u414dga;\\u43c9\\u0180cdn\\u2dc0\\u2dc5\\u01cdron;\\u43bf;\\u69b6pf;\\uc000\\ud835\\udd60\\u0180ael\\u2dd4\\u2dd7\\u01d2r;\\u69b7rp;\\u69b9\\u0380;adiosv\\u2dea\\u2deb\\u2dee\\u2e08\\u2e0d\\u2e10\\u2e16\\u6228r\\xf2\\u1a86\\u0200;efm\\u2df7\\u2df8\\u2e02\\u2e05\\u6a5dr\\u0100;o\\u2dfe\\u2dff\\u6134f\\xbb\\u2dff\\u803b\\xaa\\u40aa\\u803b\\xba\\u40bagof;\\u62b6r;\\u6a56lope;\\u6a57;\\u6a5b\\u0180clo\\u2e1f\\u2e21\\u2e27\\xf2\\u2e01ash\\u803b\\xf8\\u40f8l;\\u6298i\\u016c\\u2e2f\\u2e34de\\u803b\\xf5\\u40f5es\\u0100;a\\u01db\\u2e3as;\\u6a36ml\\u803b\\xf6\\u40f6bar;\\u633d\\u0ae1\\u2e5e\\0\\u2e7d\\0\\u2e80\\u2e9d\\0\\u2ea2\\u2eb9\\0\\0\\u2ecb\\u0e9c\\0\\u2f13\\0\\0\\u2f2b\\u2fbc\\0\\u2fc8r\\u0200;ast\\u0403\\u2e67\\u2e72\\u0e85\\u8100\\xb6;l\\u2e6d\\u2e6e\\u40b6le\\xec\\u0403\\u0269\\u2e78\\0\\0\\u2e7bm;\\u6af3;\\u6afdy;\\u443fr\\u0280cimpt\\u2e8b\\u2e8f\\u2e93\\u1865\\u2e97nt;\\u4025od;\\u402eil;\\u6030enk;\\u6031r;\\uc000\\ud835\\udd2d\\u0180imo\\u2ea8\\u2eb0\\u2eb4\\u0100;v\\u2ead\\u2eae\\u43c6;\\u43d5ma\\xf4\\u0a76ne;\\u660e\\u0180;tv\\u2ebf\\u2ec0\\u2ec8\\u43c0chfork\\xbb\\u1ffd;\\u43d6\\u0100au\\u2ecf\\u2edfn\\u0100ck\\u2ed5\\u2eddk\\u0100;h\\u21f4\\u2edb;\\u610e\\xf6\\u21f4s\\u0480;abcdemst\\u2ef3\\u2ef4\\u1908\\u2ef9\\u2efd\\u2f04\\u2f06\\u2f0a\\u2f0e\\u402bcir;\\u6a23ir;\\u6a22\\u0100ou\\u1d40\\u2f02;\\u6a25;\\u6a72n\\u80bb\\xb1\\u0e9dim;\\u6a26wo;\\u6a27\\u0180ipu\\u2f19\\u2f20\\u2f25ntint;\\u6a15f;\\uc000\\ud835\\udd61nd\\u803b\\xa3\\u40a3\\u0500;Eaceinosu\\u0ec8\\u2f3f\\u2f41\\u2f44\\u2f47\\u2f81\\u2f89\\u2f92\\u2f7e\\u2fb6;\\u6ab3p;\\u6ab7u\\xe5\\u0ed9\\u0100;c\\u0ece\\u2f4c\\u0300;acens\\u0ec8\\u2f59\\u2f5f\\u2f66\\u2f68\\u2f7eppro\\xf8\\u2f43urlye\\xf1\\u0ed9\\xf1\\u0ece\\u0180aes\\u2f6f\\u2f76\\u2f7approx;\\u6ab9qq;\\u6ab5im;\\u62e8i\\xed\\u0edfme\\u0100;s\\u2f88\\u0eae\\u6032\\u0180Eas\\u2f78\\u2f90\\u2f7a\\xf0\\u2f75\\u0180dfp\\u0eec\\u2f99\\u2faf\\u0180als\\u2fa0\\u2fa5\\u2faalar;\\u632eine;\\u6312urf;\\u6313\\u0100;t\\u0efb\\u2fb4\\xef\\u0efbrel;\\u62b0\\u0100ci\\u2fc0\\u2fc5r;\\uc000\\ud835\\udcc5;\\u43c8ncsp;\\u6008\\u0300fiopsu\\u2fda\\u22e2\\u2fdf\\u2fe5\\u2feb\\u2ff1r;\\uc000\\ud835\\udd2epf;\\uc000\\ud835\\udd62rime;\\u6057cr;\\uc000\\ud835\\udcc6\\u0180aeo\\u2ff8\\u3009\\u3013t\\u0100ei\\u2ffe\\u3005rnion\\xf3\\u06b0nt;\\u6a16st\\u0100;e\\u3010\\u3011\\u403f\\xf1\\u1f19\\xf4\\u0f14\\u0a80ABHabcdefhilmnoprstux\\u3040\\u3051\\u3055\\u3059\\u30e0\\u310e\\u312b\\u3147\\u3162\\u3172\\u318e\\u3206\\u3215\\u3224\\u3229\\u3258\\u326e\\u3272\\u3290\\u32b0\\u32b7\\u0180art\\u3047\\u304a\\u304cr\\xf2\\u10b3\\xf2\\u03ddail;\\u691car\\xf2\\u1c65ar;\\u6964\\u0380cdenqrt\\u3068\\u3075\\u3078\\u307f\\u308f\\u3094\\u30cc\\u0100eu\\u306d\\u3071;\\uc000\\u223d\\u0331te;\\u4155i\\xe3\\u116emptyv;\\u69b3g\\u0200;del\\u0fd1\\u3089\\u308b\\u308d;\\u6992;\\u69a5\\xe5\\u0fd1uo\\u803b\\xbb\\u40bbr\\u0580;abcfhlpstw\\u0fdc\\u30ac\\u30af\\u30b7\\u30b9\\u30bc\\u30be\\u30c0\\u30c3\\u30c7\\u30cap;\\u6975\\u0100;f\\u0fe0\\u30b4s;\\u6920;\\u6933s;\\u691e\\xeb\\u225d\\xf0\\u272el;\\u6945im;\\u6974l;\\u61a3;\\u619d\\u0100ai\\u30d1\\u30d5il;\\u691ao\\u0100;n\\u30db\\u30dc\\u6236al\\xf3\\u0f1e\\u0180abr\\u30e7\\u30ea\\u30eer\\xf2\\u17e5rk;\\u6773\\u0100ak\\u30f3\\u30fdc\\u0100ek\\u30f9\\u30fb;\\u407d;\\u405d\\u0100es\\u3102\\u3104;\\u698cl\\u0100du\\u310a\\u310c;\\u698e;\\u6990\\u0200aeuy\\u3117\\u311c\\u3127\\u3129ron;\\u4159\\u0100di\\u3121\\u3125il;\\u4157\\xec\\u0ff2\\xe2\\u30fa;\\u4440\\u0200clqs\\u3134\\u3137\\u313d\\u3144a;\\u6937dhar;\\u6969uo\\u0100;r\\u020e\\u020dh;\\u61b3\\u0180acg\\u314e\\u315f\\u0f44l\\u0200;ips\\u0f78\\u3158\\u315b\\u109cn\\xe5\\u10bbar\\xf4\\u0fa9t;\\u65ad\\u0180ilr\\u3169\\u1023\\u316esht;\\u697d;\\uc000\\ud835\\udd2f\\u0100ao\\u3177\\u3186r\\u0100du\\u317d\\u317f\\xbb\\u047b\\u0100;l\\u1091\\u3184;\\u696c\\u0100;v\\u318b\\u318c\\u43c1;\\u43f1\\u0180gns\\u3195\\u31f9\\u31fcht\\u0300ahlrst\\u31a4\\u31b0\\u31c2\\u31d8\\u31e4\\u31eerrow\\u0100;t\\u0fdc\\u31ada\\xe9\\u30c8arpoon\\u0100du\\u31bb\\u31bfow\\xee\\u317ep\\xbb\\u1092eft\\u0100ah\\u31ca\\u31d0rrow\\xf3\\u0feaarpoon\\xf3\\u0551ightarrows;\\u61c9quigarro\\xf7\\u30cbhreetimes;\\u62ccg;\\u42daingdotse\\xf1\\u1f32\\u0180ahm\\u320d\\u3210\\u3213r\\xf2\\u0feaa\\xf2\\u0551;\\u600foust\\u0100;a\\u321e\\u321f\\u63b1che\\xbb\\u321fmid;\\u6aee\\u0200abpt\\u3232\\u323d\\u3240\\u3252\\u0100nr\\u3237\\u323ag;\\u67edr;\\u61fer\\xeb\\u1003\\u0180afl\\u3247\\u324a\\u324er;\\u6986;\\uc000\\ud835\\udd63us;\\u6a2eimes;\\u6a35\\u0100ap\\u325d\\u3267r\\u0100;g\\u3263\\u3264\\u4029t;\\u6994olint;\\u6a12ar\\xf2\\u31e3\\u0200achq\\u327b\\u3280\\u10bc\\u3285quo;\\u603ar;\\uc000\\ud835\\udcc7\\u0100bu\\u30fb\\u328ao\\u0100;r\\u0214\\u0213\\u0180hir\\u3297\\u329b\\u32a0re\\xe5\\u31f8mes;\\u62cai\\u0200;efl\\u32aa\\u1059\\u1821\\u32ab\\u65b9tri;\\u69celuhar;\\u6968;\\u611e\\u0d61\\u32d5\\u32db\\u32df\\u332c\\u3338\\u3371\\0\\u337a\\u33a4\\0\\0\\u33ec\\u33f0\\0\\u3428\\u3448\\u345a\\u34ad\\u34b1\\u34ca\\u34f1\\0\\u3616\\0\\0\\u3633cute;\\u415bqu\\xef\\u27ba\\u0500;Eaceinpsy\\u11ed\\u32f3\\u32f5\\u32ff\\u3302\\u330b\\u330f\\u331f\\u3326\\u3329;\\u6ab4\\u01f0\\u32fa\\0\\u32fc;\\u6ab8on;\\u4161u\\xe5\\u11fe\\u0100;d\\u11f3\\u3307il;\\u415frc;\\u415d\\u0180Eas\\u3316\\u3318\\u331b;\\u6ab6p;\\u6abaim;\\u62e9olint;\\u6a13i\\xed\\u1204;\\u4441ot\\u0180;be\\u3334\\u1d47\\u3335\\u62c5;\\u6a66\\u0380Aacmstx\\u3346\\u334a\\u3357\\u335b\\u335e\\u3363\\u336drr;\\u61d8r\\u0100hr\\u3350\\u3352\\xeb\\u2228\\u0100;o\\u0a36\\u0a34t\\u803b\\xa7\\u40a7i;\\u403bwar;\\u6929m\\u0100in\\u3369\\xf0nu\\xf3\\xf1t;\\u6736r\\u0100;o\\u3376\\u2055\\uc000\\ud835\\udd30\\u0200acoy\\u3382\\u3386\\u3391\\u33a0rp;\\u666f\\u0100hy\\u338b\\u338fcy;\\u4449;\\u4448rt\\u026d\\u3399\\0\\0\\u339ci\\xe4\\u1464ara\\xec\\u2e6f\\u803b\\xad\\u40ad\\u0100gm\\u33a8\\u33b4ma\\u0180;fv\\u33b1\\u33b2\\u33b2\\u43c3;\\u43c2\\u0400;deglnpr\\u12ab\\u33c5\\u33c9\\u33ce\\u33d6\\u33de\\u33e1\\u33e6ot;\\u6a6a\\u0100;q\\u12b1\\u12b0\\u0100;E\\u33d3\\u33d4\\u6a9e;\\u6aa0\\u0100;E\\u33db\\u33dc\\u6a9d;\\u6a9fe;\\u6246lus;\\u6a24arr;\\u6972ar\\xf2\\u113d\\u0200aeit\\u33f8\\u3408\\u340f\\u3417\\u0100ls\\u33fd\\u3404lsetm\\xe9\\u336ahp;\\u6a33parsl;\\u69e4\\u0100dl\\u1463\\u3414e;\\u6323\\u0100;e\\u341c\\u341d\\u6aaa\\u0100;s\\u3422\\u3423\\u6aac;\\uc000\\u2aac\\ufe00\\u0180flp\\u342e\\u3433\\u3442tcy;\\u444c\\u0100;b\\u3438\\u3439\\u402f\\u0100;a\\u343e\\u343f\\u69c4r;\\u633ff;\\uc000\\ud835\\udd64a\\u0100dr\\u344d\\u0402es\\u0100;u\\u3454\\u3455\\u6660it\\xbb\\u3455\\u0180csu\\u3460\\u3479\\u349f\\u0100au\\u3465\\u346fp\\u0100;s\\u1188\\u346b;\\uc000\\u2293\\ufe00p\\u0100;s\\u11b4\\u3475;\\uc000\\u2294\\ufe00u\\u0100bp\\u347f\\u348f\\u0180;es\\u1197\\u119c\\u3486et\\u0100;e\\u1197\\u348d\\xf1\\u119d\\u0180;es\\u11a8\\u11ad\\u3496et\\u0100;e\\u11a8\\u349d\\xf1\\u11ae\\u0180;af\\u117b\\u34a6\\u05b0r\\u0165\\u34ab\\u05b1\\xbb\\u117car\\xf2\\u1148\\u0200cemt\\u34b9\\u34be\\u34c2\\u34c5r;\\uc000\\ud835\\udcc8tm\\xee\\xf1i\\xec\\u3415ar\\xe6\\u11be\\u0100ar\\u34ce\\u34d5r\\u0100;f\\u34d4\\u17bf\\u6606\\u0100an\\u34da\\u34edight\\u0100ep\\u34e3\\u34eapsilo\\xee\\u1ee0h\\xe9\\u2eafs\\xbb\\u2852\\u0280bcmnp\\u34fb\\u355e\\u1209\\u358b\\u358e\\u0480;Edemnprs\\u350e\\u350f\\u3511\\u3515\\u351e\\u3523\\u352c\\u3531\\u3536\\u6282;\\u6ac5ot;\\u6abd\\u0100;d\\u11da\\u351aot;\\u6ac3ult;\\u6ac1\\u0100Ee\\u3528\\u352a;\\u6acb;\\u628alus;\\u6abfarr;\\u6979\\u0180eiu\\u353d\\u3552\\u3555t\\u0180;en\\u350e\\u3545\\u354bq\\u0100;q\\u11da\\u350feq\\u0100;q\\u352b\\u3528m;\\u6ac7\\u0100bp\\u355a\\u355c;\\u6ad5;\\u6ad3c\\u0300;acens\\u11ed\\u356c\\u3572\\u3579\\u357b\\u3326ppro\\xf8\\u32faurlye\\xf1\\u11fe\\xf1\\u11f3\\u0180aes\\u3582\\u3588\\u331bppro\\xf8\\u331aq\\xf1\\u3317g;\\u666a\\u0680123;Edehlmnps\\u35a9\\u35ac\\u35af\\u121c\\u35b2\\u35b4\\u35c0\\u35c9\\u35d5\\u35da\\u35df\\u35e8\\u35ed\\u803b\\xb9\\u40b9\\u803b\\xb2\\u40b2\\u803b\\xb3\\u40b3;\\u6ac6\\u0100os\\u35b9\\u35bct;\\u6abeub;\\u6ad8\\u0100;d\\u1222\\u35c5ot;\\u6ac4s\\u0100ou\\u35cf\\u35d2l;\\u67c9b;\\u6ad7arr;\\u697bult;\\u6ac2\\u0100Ee\\u35e4\\u35e6;\\u6acc;\\u628blus;\\u6ac0\\u0180eiu\\u35f4\\u3609\\u360ct\\u0180;en\\u121c\\u35fc\\u3602q\\u0100;q\\u1222\\u35b2eq\\u0100;q\\u35e7\\u35e4m;\\u6ac8\\u0100bp\\u3611\\u3613;\\u6ad4;\\u6ad6\\u0180Aan\\u361c\\u3620\\u362drr;\\u61d9r\\u0100hr\\u3626\\u3628\\xeb\\u222e\\u0100;o\\u0a2b\\u0a29war;\\u692alig\\u803b\\xdf\\u40df\\u0be1\\u3651\\u365d\\u3660\\u12ce\\u3673\\u3679\\0\\u367e\\u36c2\\0\\0\\0\\0\\0\\u36db\\u3703\\0\\u3709\\u376c\\0\\0\\0\\u3787\\u0272\\u3656\\0\\0\\u365bget;\\u6316;\\u43c4r\\xeb\\u0e5f\\u0180aey\\u3666\\u366b\\u3670ron;\\u4165dil;\\u4163;\\u4442lrec;\\u6315r;\\uc000\\ud835\\udd31\\u0200eiko\\u3686\\u369d\\u36b5\\u36bc\\u01f2\\u368b\\0\\u3691e\\u01004f\\u1284\\u1281a\\u0180;sv\\u3698\\u3699\\u369b\\u43b8ym;\\u43d1\\u0100cn\\u36a2\\u36b2k\\u0100as\\u36a8\\u36aeppro\\xf8\\u12c1im\\xbb\\u12acs\\xf0\\u129e\\u0100as\\u36ba\\u36ae\\xf0\\u12c1rn\\u803b\\xfe\\u40fe\\u01ec\\u031f\\u36c6\\u22e7es\\u8180\\xd7;bd\\u36cf\\u36d0\\u36d8\\u40d7\\u0100;a\\u190f\\u36d5r;\\u6a31;\\u6a30\\u0180eps\\u36e1\\u36e3\\u3700\\xe1\\u2a4d\\u0200;bcf\\u0486\\u36ec\\u36f0\\u36f4ot;\\u6336ir;\\u6af1\\u0100;o\\u36f9\\u36fc\\uc000\\ud835\\udd65rk;\\u6ada\\xe1\\u3362rime;\\u6034\\u0180aip\\u370f\\u3712\\u3764d\\xe5\\u1248\\u0380adempst\\u3721\\u374d\\u3740\\u3751\\u3757\\u375c\\u375fngle\\u0280;dlqr\\u3730\\u3731\\u3736\\u3740\\u3742\\u65b5own\\xbb\\u1dbbeft\\u0100;e\\u2800\\u373e\\xf1\\u092e;\\u625cight\\u0100;e\\u32aa\\u374b\\xf1\\u105aot;\\u65ecinus;\\u6a3alus;\\u6a39b;\\u69cdime;\\u6a3bezium;\\u63e2\\u0180cht\\u3772\\u377d\\u3781\\u0100ry\\u3777\\u377b;\\uc000\\ud835\\udcc9;\\u4446cy;\\u445brok;\\u4167\\u0100io\\u378b\\u378ex\\xf4\\u1777head\\u0100lr\\u3797\\u37a0eftarro\\xf7\\u084fightarrow\\xbb\\u0f5d\\u0900AHabcdfghlmoprstuw\\u37d0\\u37d3\\u37d7\\u37e4\\u37f0\\u37fc\\u380e\\u381c\\u3823\\u3834\\u3851\\u385d\\u386b\\u38a9\\u38cc\\u38d2\\u38ea\\u38f6r\\xf2\\u03edar;\\u6963\\u0100cr\\u37dc\\u37e2ute\\u803b\\xfa\\u40fa\\xf2\\u1150r\\u01e3\\u37ea\\0\\u37edy;\\u445eve;\\u416d\\u0100iy\\u37f5\\u37farc\\u803b\\xfb\\u40fb;\\u4443\\u0180abh\\u3803\\u3806\\u380br\\xf2\\u13adlac;\\u4171a\\xf2\\u13c3\\u0100ir\\u3813\\u3818sht;\\u697e;\\uc000\\ud835\\udd32rave\\u803b\\xf9\\u40f9\\u0161\\u3827\\u3831r\\u0100lr\\u382c\\u382e\\xbb\\u0957\\xbb\\u1083lk;\\u6580\\u0100ct\\u3839\\u384d\\u026f\\u383f\\0\\0\\u384arn\\u0100;e\\u3845\\u3846\\u631cr\\xbb\\u3846op;\\u630fri;\\u65f8\\u0100al\\u3856\\u385acr;\\u416b\\u80bb\\xa8\\u0349\\u0100gp\\u3862\\u3866on;\\u4173f;\\uc000\\ud835\\udd66\\u0300adhlsu\\u114b\\u3878\\u387d\\u1372\\u3891\\u38a0own\\xe1\\u13b3arpoon\\u0100lr\\u3888\\u388cef\\xf4\\u382digh\\xf4\\u382fi\\u0180;hl\\u3899\\u389a\\u389c\\u43c5\\xbb\\u13faon\\xbb\\u389aparrows;\\u61c8\\u0180cit\\u38b0\\u38c4\\u38c8\\u026f\\u38b6\\0\\0\\u38c1rn\\u0100;e\\u38bc\\u38bd\\u631dr\\xbb\\u38bdop;\\u630eng;\\u416fri;\\u65f9cr;\\uc000\\ud835\\udcca\\u0180dir\\u38d9\\u38dd\\u38e2ot;\\u62f0lde;\\u4169i\\u0100;f\\u3730\\u38e8\\xbb\\u1813\\u0100am\\u38ef\\u38f2r\\xf2\\u38a8l\\u803b\\xfc\\u40fcangle;\\u69a7\\u0780ABDacdeflnoprsz\\u391c\\u391f\\u3929\\u392d\\u39b5\\u39b8\\u39bd\\u39df\\u39e4\\u39e8\\u39f3\\u39f9\\u39fd\\u3a01\\u3a20r\\xf2\\u03f7ar\\u0100;v\\u3926\\u3927\\u6ae8;\\u6ae9as\\xe8\\u03e1\\u0100nr\\u3932\\u3937grt;\\u699c\\u0380eknprst\\u34e3\\u3946\\u394b\\u3952\\u395d\\u3964\\u3996app\\xe1\\u2415othin\\xe7\\u1e96\\u0180hir\\u34eb\\u2ec8\\u3959op\\xf4\\u2fb5\\u0100;h\\u13b7\\u3962\\xef\\u318d\\u0100iu\\u3969\\u396dgm\\xe1\\u33b3\\u0100bp\\u3972\\u3984setneq\\u0100;q\\u397d\\u3980\\uc000\\u228a\\ufe00;\\uc000\\u2acb\\ufe00setneq\\u0100;q\\u398f\\u3992\\uc000\\u228b\\ufe00;\\uc000\\u2acc\\ufe00\\u0100hr\\u399b\\u399fet\\xe1\\u369ciangle\\u0100lr\\u39aa\\u39afeft\\xbb\\u0925ight\\xbb\\u1051y;\\u4432ash\\xbb\\u1036\\u0180elr\\u39c4\\u39d2\\u39d7\\u0180;be\\u2dea\\u39cb\\u39cfar;\\u62bbq;\\u625alip;\\u62ee\\u0100bt\\u39dc\\u1468a\\xf2\\u1469r;\\uc000\\ud835\\udd33tr\\xe9\\u39aesu\\u0100bp\\u39ef\\u39f1\\xbb\\u0d1c\\xbb\\u0d59pf;\\uc000\\ud835\\udd67ro\\xf0\\u0efbtr\\xe9\\u39b4\\u0100cu\\u3a06\\u3a0br;\\uc000\\ud835\\udccb\\u0100bp\\u3a10\\u3a18n\\u0100Ee\\u3980\\u3a16\\xbb\\u397en\\u0100Ee\\u3992\\u3a1e\\xbb\\u3990igzag;\\u699a\\u0380cefoprs\\u3a36\\u3a3b\\u3a56\\u3a5b\\u3a54\\u3a61\\u3a6airc;\\u4175\\u0100di\\u3a40\\u3a51\\u0100bg\\u3a45\\u3a49ar;\\u6a5fe\\u0100;q\\u15fa\\u3a4f;\\u6259erp;\\u6118r;\\uc000\\ud835\\udd34pf;\\uc000\\ud835\\udd68\\u0100;e\\u1479\\u3a66at\\xe8\\u1479cr;\\uc000\\ud835\\udccc\\u0ae3\\u178e\\u3a87\\0\\u3a8b\\0\\u3a90\\u3a9b\\0\\0\\u3a9d\\u3aa8\\u3aab\\u3aaf\\0\\0\\u3ac3\\u3ace\\0\\u3ad8\\u17dc\\u17dftr\\xe9\\u17d1r;\\uc000\\ud835\\udd35\\u0100Aa\\u3a94\\u3a97r\\xf2\\u03c3r\\xf2\\u09f6;\\u43be\\u0100Aa\\u3aa1\\u3aa4r\\xf2\\u03b8r\\xf2\\u09eba\\xf0\\u2713is;\\u62fb\\u0180dpt\\u17a4\\u3ab5\\u3abe\\u0100fl\\u3aba\\u17a9;\\uc000\\ud835\\udd69im\\xe5\\u17b2\\u0100Aa\\u3ac7\\u3acar\\xf2\\u03cer\\xf2\\u0a01\\u0100cq\\u3ad2\\u17b8r;\\uc000\\ud835\\udccd\\u0100pt\\u17d6\\u3adcr\\xe9\\u17d4\\u0400acefiosu\\u3af0\\u3afd\\u3b08\\u3b0c\\u3b11\\u3b15\\u3b1b\\u3b21c\\u0100uy\\u3af6\\u3afbte\\u803b\\xfd\\u40fd;\\u444f\\u0100iy\\u3b02\\u3b06rc;\\u4177;\\u444bn\\u803b\\xa5\\u40a5r;\\uc000\\ud835\\udd36cy;\\u4457pf;\\uc000\\ud835\\udd6acr;\\uc000\\ud835\\udcce\\u0100cm\\u3b26\\u3b29y;\\u444el\\u803b\\xff\\u40ff\\u0500acdefhiosw\\u3b42\\u3b48\\u3b54\\u3b58\\u3b64\\u3b69\\u3b6d\\u3b74\\u3b7a\\u3b80cute;\\u417a\\u0100ay\\u3b4d\\u3b52ron;\\u417e;\\u4437ot;\\u417c\\u0100et\\u3b5d\\u3b61tr\\xe6\\u155fa;\\u43b6r;\\uc000\\ud835\\udd37cy;\\u4436grarr;\\u61ddpf;\\uc000\\ud835\\udd6bcr;\\uc000\\ud835\\udccf\\u0100jn\\u3b85\\u3b87;\\u600dj;\\u600c\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-html.js.map","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u0200aglq\\t\\x15\\x18\\x1b\\u026d\\x0f\\0\\0\\x12p;\\u4026os;\\u4027t;\\u403et;\\u403cuot;\\u4022\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-xml.js.map","import htmlDecodeTree from \"./generated/decode-data-html.js\";\nimport xmlDecodeTree from \"./generated/decode-data-xml.js\";\nimport decodeCodePoint, { replaceCodePoint, fromCodePoint, } from \"./decode_codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };\nexport { replaceCodePoint, fromCodePoint } from \"./decode_codepoint.js\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n    CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n    CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n    CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n    CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n    CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n    CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n    CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n    CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n    CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n    CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n    CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b100000;\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n    BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\nfunction isNumber(code) {\n    return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n        isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n    EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n    EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n    EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n    /** Entities in text nodes that can end with any character. */\n    DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n    /** Only allow entities terminated with a semicolon. */\n    DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n    /** Entities in attributes have limitations on ending characters. */\n    DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n    constructor(\n    /** The tree used to decode entities. */\n    decodeTree, \n    /**\n     * The function that is called when a codepoint is decoded.\n     *\n     * For multi-byte named entities, this will be called multiple times,\n     * with the second codepoint, and the same `consumed` value.\n     *\n     * @param codepoint The decoded codepoint.\n     * @param consumed The number of bytes consumed by the decoder.\n     */\n    emitCodePoint, \n    /** An object that is used to produce errors. */\n    errors) {\n        this.decodeTree = decodeTree;\n        this.emitCodePoint = emitCodePoint;\n        this.errors = errors;\n        /** The current state of the decoder. */\n        this.state = EntityDecoderState.EntityStart;\n        /** Characters that were consumed while parsing an entity. */\n        this.consumed = 1;\n        /**\n         * The result of the entity.\n         *\n         * Either the result index of a numeric entity, or the codepoint of a\n         * numeric entity.\n         */\n        this.result = 0;\n        /** The current index in the decode tree. */\n        this.treeIndex = 0;\n        /** The number of characters that were consumed in excess. */\n        this.excess = 1;\n        /** The mode in which the decoder is operating. */\n        this.decodeMode = DecodingMode.Strict;\n    }\n    /** Resets the instance to make it reusable. */\n    startEntity(decodeMode) {\n        this.decodeMode = decodeMode;\n        this.state = EntityDecoderState.EntityStart;\n        this.result = 0;\n        this.treeIndex = 0;\n        this.excess = 1;\n        this.consumed = 1;\n    }\n    /**\n     * Write an entity to the decoder. This can be called multiple times with partial entities.\n     * If the entity is incomplete, the decoder will return -1.\n     *\n     * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n     * entity is incomplete, and resume when the next string is written.\n     *\n     * @param string The string containing the entity (or a continuation of the entity).\n     * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    write(str, offset) {\n        switch (this.state) {\n            case EntityDecoderState.EntityStart: {\n                if (str.charCodeAt(offset) === CharCodes.NUM) {\n                    this.state = EntityDecoderState.NumericStart;\n                    this.consumed += 1;\n                    return this.stateNumericStart(str, offset + 1);\n                }\n                this.state = EntityDecoderState.NamedEntity;\n                return this.stateNamedEntity(str, offset);\n            }\n            case EntityDecoderState.NumericStart: {\n                return this.stateNumericStart(str, offset);\n            }\n            case EntityDecoderState.NumericDecimal: {\n                return this.stateNumericDecimal(str, offset);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.stateNumericHex(str, offset);\n            }\n            case EntityDecoderState.NamedEntity: {\n                return this.stateNamedEntity(str, offset);\n            }\n        }\n    }\n    /**\n     * Switches between the numeric decimal and hexadecimal states.\n     *\n     * Equivalent to the `Numeric character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericStart(str, offset) {\n        if (offset >= str.length) {\n            return -1;\n        }\n        if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n            this.state = EntityDecoderState.NumericHex;\n            this.consumed += 1;\n            return this.stateNumericHex(str, offset + 1);\n        }\n        this.state = EntityDecoderState.NumericDecimal;\n        return this.stateNumericDecimal(str, offset);\n    }\n    addToNumericResult(str, start, end, base) {\n        if (start !== end) {\n            const digitCount = end - start;\n            this.result =\n                this.result * Math.pow(base, digitCount) +\n                    parseInt(str.substr(start, digitCount), base);\n            this.consumed += digitCount;\n        }\n    }\n    /**\n     * Parses a hexadecimal numeric entity.\n     *\n     * Equivalent to the `Hexademical character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericHex(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char) || isHexadecimalCharacter(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 16);\n                return this.emitNumericEntity(char, 3);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 16);\n        return -1;\n    }\n    /**\n     * Parses a decimal numeric entity.\n     *\n     * Equivalent to the `Decimal character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericDecimal(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 10);\n                return this.emitNumericEntity(char, 2);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 10);\n        return -1;\n    }\n    /**\n     * Validate and emit a numeric entity.\n     *\n     * Implements the logic from the `Hexademical character reference start\n     * state` and `Numeric character reference end state` in the HTML spec.\n     *\n     * @param lastCp The last code point of the entity. Used to see if the\n     *               entity was terminated with a semicolon.\n     * @param expectedLength The minimum number of characters that should be\n     *                       consumed. Used to validate that at least one digit\n     *                       was consumed.\n     * @returns The number of characters that were consumed.\n     */\n    emitNumericEntity(lastCp, expectedLength) {\n        var _a;\n        // Ensure we consumed at least one digit.\n        if (this.consumed <= expectedLength) {\n            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n            return 0;\n        }\n        // Figure out if this is a legit end of the entity\n        if (lastCp === CharCodes.SEMI) {\n            this.consumed += 1;\n        }\n        else if (this.decodeMode === DecodingMode.Strict) {\n            return 0;\n        }\n        this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n        if (this.errors) {\n            if (lastCp !== CharCodes.SEMI) {\n                this.errors.missingSemicolonAfterCharacterReference();\n            }\n            this.errors.validateNumericCharacterReference(this.result);\n        }\n        return this.consumed;\n    }\n    /**\n     * Parses a named entity.\n     *\n     * Equivalent to the `Named character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNamedEntity(str, offset) {\n        const { decodeTree } = this;\n        let current = decodeTree[this.treeIndex];\n        // The mask is the number of bytes of the value, including the current byte.\n        let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n        for (; offset < str.length; offset++, this.excess++) {\n            const char = str.charCodeAt(offset);\n            this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n            if (this.treeIndex < 0) {\n                return this.result === 0 ||\n                    // If we are parsing an attribute\n                    (this.decodeMode === DecodingMode.Attribute &&\n                        // We shouldn't have consumed any characters after the entity,\n                        (valueLength === 0 ||\n                            // And there should be no invalid characters.\n                            isEntityInAttributeInvalidEnd(char)))\n                    ? 0\n                    : this.emitNotTerminatedNamedEntity();\n            }\n            current = decodeTree[this.treeIndex];\n            valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n            // If the branch is a value, store it and continue\n            if (valueLength !== 0) {\n                // If the entity is terminated by a semicolon, we are done.\n                if (char === CharCodes.SEMI) {\n                    return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n                }\n                // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n                if (this.decodeMode !== DecodingMode.Strict) {\n                    this.result = this.treeIndex;\n                    this.consumed += this.excess;\n                    this.excess = 0;\n                }\n            }\n        }\n        return -1;\n    }\n    /**\n     * Emit a named entity that was not terminated with a semicolon.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNotTerminatedNamedEntity() {\n        var _a;\n        const { result, decodeTree } = this;\n        const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n        this.emitNamedEntityData(result, valueLength, this.consumed);\n        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n        return this.consumed;\n    }\n    /**\n     * Emit a named entity.\n     *\n     * @param result The index of the entity in the decode tree.\n     * @param valueLength The number of bytes in the entity.\n     * @param consumed The number of characters consumed.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNamedEntityData(result, valueLength, consumed) {\n        const { decodeTree } = this;\n        this.emitCodePoint(valueLength === 1\n            ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH\n            : decodeTree[result + 1], consumed);\n        if (valueLength === 3) {\n            // For multi-byte values, we need to emit the second byte.\n            this.emitCodePoint(decodeTree[result + 2], consumed);\n        }\n        return consumed;\n    }\n    /**\n     * Signal to the parser that the end of the input was reached.\n     *\n     * Remaining data will be emitted and relevant errors will be produced.\n     *\n     * @returns The number of characters consumed.\n     */\n    end() {\n        var _a;\n        switch (this.state) {\n            case EntityDecoderState.NamedEntity: {\n                // Emit a named entity if we have one.\n                return this.result !== 0 &&\n                    (this.decodeMode !== DecodingMode.Attribute ||\n                        this.result === this.treeIndex)\n                    ? this.emitNotTerminatedNamedEntity()\n                    : 0;\n            }\n            // Otherwise, emit a numeric entity if we have one.\n            case EntityDecoderState.NumericDecimal: {\n                return this.emitNumericEntity(0, 2);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.emitNumericEntity(0, 3);\n            }\n            case EntityDecoderState.NumericStart: {\n                (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n                return 0;\n            }\n            case EntityDecoderState.EntityStart: {\n                // Return 0 if we have no entity.\n                return 0;\n            }\n        }\n    }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n    let ret = \"\";\n    const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str)));\n    return function decodeWithTrie(str, decodeMode) {\n        let lastIndex = 0;\n        let offset = 0;\n        while ((offset = str.indexOf(\"&\", offset)) >= 0) {\n            ret += str.slice(lastIndex, offset);\n            decoder.startEntity(decodeMode);\n            const len = decoder.write(str, \n            // Skip the \"&\"\n            offset + 1);\n            if (len < 0) {\n                lastIndex = offset + decoder.end();\n                break;\n            }\n            lastIndex = offset + len;\n            // If `len` is 0, skip the current `&` and continue.\n            offset = len === 0 ? lastIndex + 1 : lastIndex;\n        }\n        const result = ret + str.slice(lastIndex);\n        // Make sure we don't keep a reference to the final string.\n        ret = \"\";\n        return result;\n    };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIdx, char) {\n    const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n    const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n    // Case 1: Single branch encoded in jump offset\n    if (branchCount === 0) {\n        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;\n    }\n    // Case 2: Multiple branches encoded in jump table\n    if (jumpOffset) {\n        const value = char - jumpOffset;\n        return value < 0 || value >= branchCount\n            ? -1\n            : decodeTree[nodeIdx + value] - 1;\n    }\n    // Case 3: Multiple branches encoded in dictionary\n    // Binary search for the character.\n    let lo = nodeIdx;\n    let hi = lo + branchCount - 1;\n    while (lo <= hi) {\n        const mid = (lo + hi) >>> 1;\n        const midVal = decodeTree[mid];\n        if (midVal < char) {\n            lo = mid + 1;\n        }\n        else if (midVal > char) {\n            hi = mid - 1;\n        }\n        else {\n            return decodeTree[mid + branchCount];\n        }\n    }\n    return -1;\n}\nconst htmlDecoder = getDecoder(htmlDecodeTree);\nconst xmlDecoder = getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param str The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(str, mode = DecodingMode.Legacy) {\n    return htmlDecoder(str, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(str) {\n    return htmlDecoder(str, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(str) {\n    return htmlDecoder(str, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(str) {\n    return xmlDecoder(str, DecodingMode.Strict);\n}\n//# sourceMappingURL=decode.js.map","// Utilities\n//\n\nimport * as mdurl from 'mdurl'\nimport * as ucmicro from 'uc.micro'\nimport { decodeHTML } from 'entities'\n\nfunction _class (obj) { return Object.prototype.toString.call(obj) }\n\nfunction isString (obj) { return _class(obj) === '[object String]' }\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction has (object, key) {\n  return _hasOwnProperty.call(object, key)\n}\n\n// Merge objects\n//\nfunction assign (obj /* from1, from2, from3, ... */) {\n  const sources = Array.prototype.slice.call(arguments, 1)\n\n  sources.forEach(function (source) {\n    if (!source) { return }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be object')\n    }\n\n    Object.keys(source).forEach(function (key) {\n      obj[key] = source[key]\n    })\n  })\n\n  return obj\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt (src, pos, newElements) {\n  return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1))\n}\n\nfunction isValidEntityCode (c) {\n  /* eslint no-bitwise:0 */\n  // broken sequence\n  if (c >= 0xD800 && c <= 0xDFFF) { return false }\n  // never used\n  if (c >= 0xFDD0 && c <= 0xFDEF) { return false }\n  if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false }\n  // control codes\n  if (c >= 0x00 && c <= 0x08) { return false }\n  if (c === 0x0B) { return false }\n  if (c >= 0x0E && c <= 0x1F) { return false }\n  if (c >= 0x7F && c <= 0x9F) { return false }\n  // out of range\n  if (c > 0x10FFFF) { return false }\n  return true\n}\n\nfunction fromCodePoint (c) {\n  /* eslint no-bitwise:0 */\n  if (c > 0xffff) {\n    c -= 0x10000\n    const surrogate1 = 0xd800 + (c >> 10)\n    const surrogate2 = 0xdc00 + (c & 0x3ff)\n\n    return String.fromCharCode(surrogate1, surrogate2)\n  }\n  return String.fromCharCode(c)\n}\n\nconst UNESCAPE_MD_RE  = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~])/g\nconst ENTITY_RE       = /&([a-z#][a-z0-9]{1,31});/gi\nconst UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi')\n\nconst DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i\n\nfunction replaceEntityPattern (match, name) {\n  if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n    const code = name[1].toLowerCase() === 'x'\n      ? parseInt(name.slice(2), 16)\n      : parseInt(name.slice(1), 10)\n\n    if (isValidEntityCode(code)) {\n      return fromCodePoint(code)\n    }\n\n    return match\n  }\n\n  const decoded = decodeHTML(match)\n  if (decoded !== match) {\n    return decoded\n  }\n\n  return match\n}\n\n/* function replaceEntities(str) {\n  if (str.indexOf('&') < 0) { return str; }\n\n  return str.replace(ENTITY_RE, replaceEntityPattern);\n} */\n\nfunction unescapeMd (str) {\n  if (str.indexOf('\\\\') < 0) { return str }\n  return str.replace(UNESCAPE_MD_RE, '$1')\n}\n\nfunction unescapeAll (str) {\n  if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str }\n\n  return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n    if (escaped) { return escaped }\n    return replaceEntityPattern(match, entity)\n  })\n}\n\nconst HTML_ESCAPE_TEST_RE = /[&<>\"]/\nconst HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g\nconst HTML_REPLACEMENTS = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;'\n}\n\nfunction replaceUnsafeChar (ch) {\n  return HTML_REPLACEMENTS[ch]\n}\n\nfunction escapeHtml (str) {\n  if (HTML_ESCAPE_TEST_RE.test(str)) {\n    return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar)\n  }\n  return str\n}\n\nconst REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g\n\nfunction escapeRE (str) {\n  return str.replace(REGEXP_ESCAPE_RE, '\\\\$&')\n}\n\nfunction isSpace (code) {\n  switch (code) {\n    case 0x09:\n    case 0x20:\n      return true\n  }\n  return false\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace (code) {\n  if (code >= 0x2000 && code <= 0x200A) { return true }\n  switch (code) {\n    case 0x09: // \\t\n    case 0x0A: // \\n\n    case 0x0B: // \\v\n    case 0x0C: // \\f\n    case 0x0D: // \\r\n    case 0x20:\n    case 0xA0:\n    case 0x1680:\n    case 0x202F:\n    case 0x205F:\n    case 0x3000:\n      return true\n  }\n  return false\n}\n\n/* eslint-disable max-len */\n\n// Currently without astral characters support.\nfunction isPunctChar (ch) {\n  return ucmicro.P.test(ch) || ucmicro.S.test(ch)\n}\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct (ch) {\n  switch (ch) {\n    case 0x21/* ! */:\n    case 0x22/* \" */:\n    case 0x23/* # */:\n    case 0x24/* $ */:\n    case 0x25/* % */:\n    case 0x26/* & */:\n    case 0x27/* ' */:\n    case 0x28/* ( */:\n    case 0x29/* ) */:\n    case 0x2A/* * */:\n    case 0x2B/* + */:\n    case 0x2C/* , */:\n    case 0x2D/* - */:\n    case 0x2E/* . */:\n    case 0x2F/* / */:\n    case 0x3A/* : */:\n    case 0x3B/* ; */:\n    case 0x3C/* < */:\n    case 0x3D/* = */:\n    case 0x3E/* > */:\n    case 0x3F/* ? */:\n    case 0x40/* @ */:\n    case 0x5B/* [ */:\n    case 0x5C/* \\ */:\n    case 0x5D/* ] */:\n    case 0x5E/* ^ */:\n    case 0x5F/* _ */:\n    case 0x60/* ` */:\n    case 0x7B/* { */:\n    case 0x7C/* | */:\n    case 0x7D/* } */:\n    case 0x7E/* ~ */:\n      return true\n    default:\n      return false\n  }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference (str) {\n  // Trim and collapse whitespace\n  //\n  str = str.trim().replace(/\\s+/g, ' ')\n\n  // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n  // fixed in v12 (couldn't find any details).\n  //\n  // So treat this one as a special case\n  // (remove this when node v10 is no longer supported).\n  //\n  if ('ẞ'.toLowerCase() === 'Ṿ') {\n    str = str.replace(/ẞ/g, 'ß')\n  }\n\n  // .toLowerCase().toUpperCase() should get rid of all differences\n  // between letter variants.\n  //\n  // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n  // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n  // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n  // uppercased versions).\n  //\n  // Here's an example showing how it happens. Lets take greek letter omega:\n  // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n  //\n  // Unicode entries:\n  // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n  // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n  // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n  // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;\n  //\n  // Case-insensitive comparison should treat all of them as equivalent.\n  //\n  // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n  // and .toUpperCase() doesn't change ϴ (already uppercase).\n  //\n  // Applying first lower then upper case normalizes any character:\n  // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n  //\n  // Note: this is equivalent to unicode case folding; unicode normalization\n  // is a different step that is not required here.\n  //\n  // Final result should be uppercased, because it's later stored in an object\n  // (this avoid a conflict with Object.prototype members,\n  // most notably, `__proto__`)\n  //\n  return str.toLowerCase().toUpperCase()\n}\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nconst lib = { mdurl, ucmicro }\n\nexport {\n  lib,\n  assign,\n  isString,\n  has,\n  unescapeMd,\n  unescapeAll,\n  isValidEntityCode,\n  fromCodePoint,\n  escapeHtml,\n  arrayReplaceAt,\n  isSpace,\n  isWhiteSpace,\n  isMdAsciiPunct,\n  isPunctChar,\n  escapeRE,\n  normalizeReference\n}\n","// Parse link destination\n//\n\nimport { unescapeAll } from '../common/utils.mjs'\n\nexport default function parseLinkDestination (str, start, max) {\n  let code\n  let pos = start\n\n  const result = {\n    ok: false,\n    pos: 0,\n    str: ''\n  }\n\n  if (str.charCodeAt(pos) === 0x3C /* < */) {\n    pos++\n    while (pos < max) {\n      code = str.charCodeAt(pos)\n      if (code === 0x0A /* \\n */) { return result }\n      if (code === 0x3C /* < */) { return result }\n      if (code === 0x3E /* > */) {\n        result.pos = pos + 1\n        result.str = unescapeAll(str.slice(start + 1, pos))\n        result.ok = true\n        return result\n      }\n      if (code === 0x5C /* \\ */ && pos + 1 < max) {\n        pos += 2\n        continue\n      }\n\n      pos++\n    }\n\n    // no closing '>'\n    return result\n  }\n\n  // this should be ... } else { ... branch\n\n  let level = 0\n  while (pos < max) {\n    code = str.charCodeAt(pos)\n\n    if (code === 0x20) { break }\n\n    // ascii control characters\n    if (code < 0x20 || code === 0x7F) { break }\n\n    if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      if (str.charCodeAt(pos + 1) === 0x20) { break }\n      pos += 2\n      continue\n    }\n\n    if (code === 0x28 /* ( */) {\n      level++\n      if (level > 32) { return result }\n    }\n\n    if (code === 0x29 /* ) */) {\n      if (level === 0) { break }\n      level--\n    }\n\n    pos++\n  }\n\n  if (start === pos) { return result }\n  if (level !== 0) { return result }\n\n  result.str = unescapeAll(str.slice(start, pos))\n  result.pos = pos\n  result.ok = true\n  return result\n}\n","// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n\nexport default function parseLinkLabel (state, start, disableNested) {\n  let level, found, marker, prevPos\n\n  const max = state.posMax\n  const oldPos = state.pos\n\n  state.pos = start + 1\n  level = 1\n\n  while (state.pos < max) {\n    marker = state.src.charCodeAt(state.pos)\n    if (marker === 0x5D /* ] */) {\n      level--\n      if (level === 0) {\n        found = true\n        break\n      }\n    }\n\n    prevPos = state.pos\n    state.md.inline.skipToken(state)\n    if (marker === 0x5B /* [ */) {\n      if (prevPos === state.pos - 1) {\n        // increase level if we find text `[`, which is not a part of any token\n        level++\n      } else if (disableNested) {\n        state.pos = oldPos\n        return -1\n      }\n    }\n  }\n\n  let labelEnd = -1\n\n  if (found) {\n    labelEnd = state.pos\n  }\n\n  // restore old state\n  state.pos = oldPos\n\n  return labelEnd\n}\n","// Parse link title\n//\n\nimport { unescapeAll } from '../common/utils.mjs'\n\n// Parse link title within `str` in [start, max] range,\n// or continue previous parsing if `prev_state` is defined (equal to result of last execution).\n//\nexport default function parseLinkTitle (str, start, max, prev_state) {\n  let code\n  let pos = start\n\n  const state = {\n    // if `true`, this is a valid link title\n    ok: false,\n    // if `true`, this link can be continued on the next line\n    can_continue: false,\n    // if `ok`, it's the position of the first character after the closing marker\n    pos: 0,\n    // if `ok`, it's the unescaped title\n    str: '',\n    // expected closing marker character code\n    marker: 0\n  }\n\n  if (prev_state) {\n    // this is a continuation of a previous parseLinkTitle call on the next line,\n    // used in reference links only\n    state.str = prev_state.str\n    state.marker = prev_state.marker\n  } else {\n    if (pos >= max) { return state }\n\n    let marker = str.charCodeAt(pos)\n    if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return state }\n\n    start++\n    pos++\n\n    // if opening marker is \"(\", switch it to closing marker \")\"\n    if (marker === 0x28) { marker = 0x29 }\n\n    state.marker = marker\n  }\n\n  while (pos < max) {\n    code = str.charCodeAt(pos)\n    if (code === state.marker) {\n      state.pos = pos + 1\n      state.str += unescapeAll(str.slice(start, pos))\n      state.ok = true\n      return state\n    } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */) {\n      return state\n    } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      pos++\n    }\n\n    pos++\n  }\n\n  // no closing marker found, but this link title may continue on the next line (for references)\n  state.can_continue = true\n  state.str += unescapeAll(str.slice(start, pos))\n  return state\n}\n","/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n\nimport { assign, unescapeAll, escapeHtml } from './common/utils.mjs'\n\nconst default_rules = {}\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  return  '<code' + slf.renderAttrs(token) + '>' +\n          escapeHtml(token.content) +\n          '</code>'\n}\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  return  '<pre' + slf.renderAttrs(token) + '><code>' +\n          escapeHtml(tokens[idx].content) +\n          '</code></pre>\\n'\n}\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n  const info = token.info ? unescapeAll(token.info).trim() : ''\n  let langName = ''\n  let langAttrs = ''\n\n  if (info) {\n    const arr = info.split(/(\\s+)/g)\n    langName = arr[0]\n    langAttrs = arr.slice(2).join('')\n  }\n\n  let highlighted\n  if (options.highlight) {\n    highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content)\n  } else {\n    highlighted = escapeHtml(token.content)\n  }\n\n  if (highlighted.indexOf('<pre') === 0) {\n    return highlighted + '\\n'\n  }\n\n  // If language exists, inject class gently, without modifying original token.\n  // May be, one day we will add .deepClone() for token and simplify this part, but\n  // now we prefer to keep things local.\n  if (info) {\n    const i = token.attrIndex('class')\n    const tmpAttrs = token.attrs ? token.attrs.slice() : []\n\n    if (i < 0) {\n      tmpAttrs.push(['class', options.langPrefix + langName])\n    } else {\n      tmpAttrs[i] = tmpAttrs[i].slice()\n      tmpAttrs[i][1] += ' ' + options.langPrefix + langName\n    }\n\n    // Fake token just to render attributes\n    const tmpToken = {\n      attrs: tmpAttrs\n    }\n\n    return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\\n`\n  }\n\n  return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\\n`\n}\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n  // should be placed on proper position for tests.\n  //\n  // Replace content with actual value\n\n  token.attrs[token.attrIndex('alt')][1] =\n    slf.renderInlineAsText(token.children, options, env)\n\n  return slf.renderToken(tokens, idx, options)\n}\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n  return options.xhtmlOut ? '<br />\\n' : '<br>\\n'\n}\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n  return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n'\n}\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n  return escapeHtml(tokens[idx].content)\n}\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n  return tokens[idx].content\n}\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n  return tokens[idx].content\n}\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer () {\n  /**\n   * Renderer#rules -> Object\n   *\n   * Contains render rules for tokens. Can be updated and extended.\n   *\n   * ##### Example\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   *\n   * md.renderer.rules.strong_open  = function () { return '<b>'; };\n   * md.renderer.rules.strong_close = function () { return '</b>'; };\n   *\n   * var result = md.renderInline(...);\n   * ```\n   *\n   * Each rule is called as independent static function with fixed signature:\n   *\n   * ```javascript\n   * function my_token_render(tokens, idx, options, env, renderer) {\n   *   // ...\n   *   return renderedHTML;\n   * }\n   * ```\n   *\n   * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)\n   * for more details and examples.\n   **/\n  this.rules = assign({}, default_rules)\n}\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs (token) {\n  let i, l, result\n\n  if (!token.attrs) { return '' }\n\n  result = ''\n\n  for (i = 0, l = token.attrs.length; i < l; i++) {\n    result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"'\n  }\n\n  return result\n}\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken (tokens, idx, options) {\n  const token = tokens[idx]\n  let result = ''\n\n  // Tight list paragraphs\n  if (token.hidden) {\n    return ''\n  }\n\n  // Insert a newline between hidden paragraph and subsequent opening\n  // block-level tag.\n  //\n  // For example, here we should insert a newline before blockquote:\n  //  - a\n  //    >\n  //\n  if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n    result += '\\n'\n  }\n\n  // Add token name, e.g. `<img`\n  result += (token.nesting === -1 ? '</' : '<') + token.tag\n\n  // Encode attributes, e.g. `<img src=\"foo\"`\n  result += this.renderAttrs(token)\n\n  // Add a slash for self-closing tags, e.g. `<img src=\"foo\" /`\n  if (token.nesting === 0 && options.xhtmlOut) {\n    result += ' /'\n  }\n\n  // Check if we need to add a newline after this tag\n  let needLf = false\n  if (token.block) {\n    needLf = true\n\n    if (token.nesting === 1) {\n      if (idx + 1 < tokens.length) {\n        const nextToken = tokens[idx + 1]\n\n        if (nextToken.type === 'inline' || nextToken.hidden) {\n          // Block-level tag containing an inline tag.\n          //\n          needLf = false\n        } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n          // Opening tag + closing tag of the same type. E.g. `<li></li>`.\n          //\n          needLf = false\n        }\n      }\n    }\n  }\n\n  result += needLf ? '>\\n' : '>'\n\n  return result\n}\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n  let result = ''\n  const rules = this.rules\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    const type = tokens[i].type\n\n    if (typeof rules[type] !== 'undefined') {\n      result += rules[type](tokens, i, options, env, this)\n    } else {\n      result += this.renderToken(tokens, i, options)\n    }\n  }\n\n  return result\n}\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n  let result = ''\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    switch (tokens[i].type) {\n      case 'text':\n        result += tokens[i].content\n        break\n      case 'image':\n        result += this.renderInlineAsText(tokens[i].children, options, env)\n        break\n      case 'html_inline':\n      case 'html_block':\n        result += tokens[i].content\n        break\n      case 'softbreak':\n      case 'hardbreak':\n        result += '\\n'\n        break\n      default:\n        // all other tokens are skipped\n    }\n  }\n\n  return result\n}\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n  let result = ''\n  const rules = this.rules\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    const type = tokens[i].type\n\n    if (type === 'inline') {\n      result += this.renderInline(tokens[i].children, options, env)\n    } else if (typeof rules[type] !== 'undefined') {\n      result += rules[type](tokens, i, options, env, this)\n    } else {\n      result += this.renderToken(tokens, i, options, env)\n    }\n  }\n\n  return result\n}\n\nexport default Renderer\n","/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n\n/**\n * new Ruler()\n **/\nfunction Ruler () {\n  // List of added rules. Each element is:\n  //\n  // {\n  //   name: XXX,\n  //   enabled: Boolean,\n  //   fn: Function(),\n  //   alt: [ name2, name3 ]\n  // }\n  //\n  this.__rules__ = []\n\n  // Cached rule chains.\n  //\n  // First level - chain name, '' for default.\n  // Second level - diginal anchor for fast filtering by charcodes.\n  //\n  this.__cache__ = null\n}\n\n// Helper methods, should not be used directly\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n  for (let i = 0; i < this.__rules__.length; i++) {\n    if (this.__rules__[i].name === name) {\n      return i\n    }\n  }\n  return -1\n}\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n  const self = this\n  const chains = ['']\n\n  // collect unique names\n  self.__rules__.forEach(function (rule) {\n    if (!rule.enabled) { return }\n\n    rule.alt.forEach(function (altName) {\n      if (chains.indexOf(altName) < 0) {\n        chains.push(altName)\n      }\n    })\n  })\n\n  self.__cache__ = {}\n\n  chains.forEach(function (chain) {\n    self.__cache__[chain] = []\n    self.__rules__.forEach(function (rule) {\n      if (!rule.enabled) { return }\n\n      if (chain && rule.alt.indexOf(chain) < 0) { return }\n\n      self.__cache__[chain].push(rule.fn)\n    })\n  })\n}\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n  const index = this.__find__(name)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + name) }\n\n  this.__rules__[index].fn = fn\n  this.__rules__[index].alt = opt.alt || []\n  this.__cache__ = null\n}\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n  const index = this.__find__(beforeName)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + beforeName) }\n\n  this.__rules__.splice(index, 0, {\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n  const index = this.__find__(afterName)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + afterName) }\n\n  this.__rules__.splice(index + 1, 0, {\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n  const opt = options || {}\n\n  this.__rules__.push({\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  const result = []\n\n  // Search by name and enable\n  list.forEach(function (name) {\n    const idx = this.__find__(name)\n\n    if (idx < 0) {\n      if (ignoreInvalid) { return }\n      throw new Error('Rules manager: invalid rule name ' + name)\n    }\n    this.__rules__[idx].enabled = true\n    result.push(name)\n  }, this)\n\n  this.__cache__ = null\n  return result\n}\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  this.__rules__.forEach(function (rule) { rule.enabled = false })\n\n  this.enable(list, ignoreInvalid)\n}\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  const result = []\n\n  // Search by name and disable\n  list.forEach(function (name) {\n    const idx = this.__find__(name)\n\n    if (idx < 0) {\n      if (ignoreInvalid) { return }\n      throw new Error('Rules manager: invalid rule name ' + name)\n    }\n    this.__rules__[idx].enabled = false\n    result.push(name)\n  }, this)\n\n  this.__cache__ = null\n  return result\n}\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n  if (this.__cache__ === null) {\n    this.__compile__()\n  }\n\n  // Chain can be empty, if rules disabled. But we still have to return Array.\n  return this.__cache__[chainName] || []\n}\n\nexport default Ruler\n","// Token class\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token (type, tag, nesting) {\n  /**\n   * Token#type -> String\n   *\n   * Type of the token (string, e.g. \"paragraph_open\")\n   **/\n  this.type     = type\n\n  /**\n   * Token#tag -> String\n   *\n   * html tag name, e.g. \"p\"\n   **/\n  this.tag      = tag\n\n  /**\n   * Token#attrs -> Array\n   *\n   * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n   **/\n  this.attrs    = null\n\n  /**\n   * Token#map -> Array\n   *\n   * Source map info. Format: `[ line_begin, line_end ]`\n   **/\n  this.map      = null\n\n  /**\n   * Token#nesting -> Number\n   *\n   * Level change (number in {-1, 0, 1} set), where:\n   *\n   * -  `1` means the tag is opening\n   * -  `0` means the tag is self-closing\n   * - `-1` means the tag is closing\n   **/\n  this.nesting  = nesting\n\n  /**\n   * Token#level -> Number\n   *\n   * nesting level, the same as `state.level`\n   **/\n  this.level    = 0\n\n  /**\n   * Token#children -> Array\n   *\n   * An array of child nodes (inline and img tokens)\n   **/\n  this.children = null\n\n  /**\n   * Token#content -> String\n   *\n   * In a case of self-closing tag (code, html, fence, etc.),\n   * it has contents of this tag.\n   **/\n  this.content  = ''\n\n  /**\n   * Token#markup -> String\n   *\n   * '*' or '_' for emphasis, fence string for fence, etc.\n   **/\n  this.markup   = ''\n\n  /**\n   * Token#info -> String\n   *\n   * Additional information:\n   *\n   * - Info string for \"fence\" tokens\n   * - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n   * - The string value of the item marker for ordered-list \"list_item_open\" tokens\n   **/\n  this.info     = ''\n\n  /**\n   * Token#meta -> Object\n   *\n   * A place for plugins to store an arbitrary data\n   **/\n  this.meta     = null\n\n  /**\n   * Token#block -> Boolean\n   *\n   * True for block-level tokens, false for inline tokens.\n   * Used in renderer to calculate line breaks\n   **/\n  this.block    = false\n\n  /**\n   * Token#hidden -> Boolean\n   *\n   * If it's true, ignore this element when rendering. Used for tight lists\n   * to hide paragraphs.\n   **/\n  this.hidden   = false\n}\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex (name) {\n  if (!this.attrs) { return -1 }\n\n  const attrs = this.attrs\n\n  for (let i = 0, len = attrs.length; i < len; i++) {\n    if (attrs[i][0] === name) { return i }\n  }\n  return -1\n}\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush (attrData) {\n  if (this.attrs) {\n    this.attrs.push(attrData)\n  } else {\n    this.attrs = [attrData]\n  }\n}\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet (name, value) {\n  const idx = this.attrIndex(name)\n  const attrData = [name, value]\n\n  if (idx < 0) {\n    this.attrPush(attrData)\n  } else {\n    this.attrs[idx] = attrData\n  }\n}\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet (name) {\n  const idx = this.attrIndex(name)\n  let value = null\n  if (idx >= 0) {\n    value = this.attrs[idx][1]\n  }\n  return value\n}\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin (name, value) {\n  const idx = this.attrIndex(name)\n\n  if (idx < 0) {\n    this.attrPush([name, value])\n  } else {\n    this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value\n  }\n}\n\nexport default Token\n","// Core state object\n//\n\nimport Token from '../token.mjs'\n\nfunction StateCore (src, md, env) {\n  this.src = src\n  this.env = env\n  this.tokens = []\n  this.inlineMode = false\n  this.md = md // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token\n\nexport default StateCore\n","// Normalize input string\n\n// https://spec.commonmark.org/0.29/#line-ending\nconst NEWLINES_RE  = /\\r\\n?|\\n/g\nconst NULL_RE      = /\\0/g\n\nexport default function normalize (state) {\n  let str\n\n  // Normalize newlines\n  str = state.src.replace(NEWLINES_RE, '\\n')\n\n  // Replace NULL characters\n  str = str.replace(NULL_RE, '\\uFFFD')\n\n  state.src = str\n}\n","// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n\nimport { arrayReplaceAt } from '../common/utils.mjs'\n\nfunction isLinkOpen (str) {\n  return /^<a[>\\s]/i.test(str)\n}\nfunction isLinkClose (str) {\n  return /^<\\/a\\s*>/i.test(str)\n}\n\nexport default function linkify (state) {\n  const blockTokens = state.tokens\n\n  if (!state.md.options.linkify) { return }\n\n  for (let j = 0, l = blockTokens.length; j < l; j++) {\n    if (blockTokens[j].type !== 'inline' ||\n        !state.md.linkify.pretest(blockTokens[j].content)) {\n      continue\n    }\n\n    let tokens = blockTokens[j].children\n\n    let htmlLinkLevel = 0\n\n    // We scan from the end, to keep position when new tags added.\n    // Use reversed logic in links start/end match\n    for (let i = tokens.length - 1; i >= 0; i--) {\n      const currentToken = tokens[i]\n\n      // Skip content of markdown links\n      if (currentToken.type === 'link_close') {\n        i--\n        while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n          i--\n        }\n        continue\n      }\n\n      // Skip content of html tag links\n      if (currentToken.type === 'html_inline') {\n        if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n          htmlLinkLevel--\n        }\n        if (isLinkClose(currentToken.content)) {\n          htmlLinkLevel++\n        }\n      }\n      if (htmlLinkLevel > 0) { continue }\n\n      if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n        const text = currentToken.content\n        let links = state.md.linkify.match(text)\n\n        // Now split string to nodes\n        const nodes = []\n        let level = currentToken.level\n        let lastPos = 0\n\n        // forbid escape sequence at the start of the string,\n        // this avoids http\\://example.com/ from being linkified as\n        // http:<a href=\"//example.com/\">//example.com/</a>\n        if (links.length > 0 &&\n            links[0].index === 0 &&\n            i > 0 &&\n            tokens[i - 1].type === 'text_special') {\n          links = links.slice(1)\n        }\n\n        for (let ln = 0; ln < links.length; ln++) {\n          const url = links[ln].url\n          const fullUrl = state.md.normalizeLink(url)\n          if (!state.md.validateLink(fullUrl)) { continue }\n\n          let urlText = links[ln].text\n\n          // Linkifier might send raw hostnames like \"example.com\", where url\n          // starts with domain name. So we prepend http:// in those cases,\n          // and remove it afterwards.\n          //\n          if (!links[ln].schema) {\n            urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '')\n          } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n            urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '')\n          } else {\n            urlText = state.md.normalizeLinkText(urlText)\n          }\n\n          const pos = links[ln].index\n\n          if (pos > lastPos) {\n            const token   = new state.Token('text', '', 0)\n            token.content = text.slice(lastPos, pos)\n            token.level   = level\n            nodes.push(token)\n          }\n\n          const token_o   = new state.Token('link_open', 'a', 1)\n          token_o.attrs   = [['href', fullUrl]]\n          token_o.level   = level++\n          token_o.markup  = 'linkify'\n          token_o.info    = 'auto'\n          nodes.push(token_o)\n\n          const token_t   = new state.Token('text', '', 0)\n          token_t.content = urlText\n          token_t.level   = level\n          nodes.push(token_t)\n\n          const token_c   = new state.Token('link_close', 'a', -1)\n          token_c.level   = --level\n          token_c.markup  = 'linkify'\n          token_c.info    = 'auto'\n          nodes.push(token_c)\n\n          lastPos = links[ln].lastIndex\n        }\n        if (lastPos < text.length) {\n          const token   = new state.Token('text', '', 0)\n          token.content = text.slice(lastPos)\n          token.level   = level\n          nodes.push(token)\n        }\n\n        // replace current node\n        blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes)\n      }\n    }\n  }\n}\n","// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → &ndash;, --- → &mdash;\n//\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - multiplications 2 x 4 -> 2 × 4\n\nconst RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nconst SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i\n\nconst SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig\nconst SCOPED_ABBR = {\n  c: '©',\n  r: '®',\n  tm: '™'\n}\n\nfunction replaceFn (match, name) {\n  return SCOPED_ABBR[name.toLowerCase()]\n}\n\nfunction replace_scoped (inlineTokens) {\n  let inside_autolink = 0\n\n  for (let i = inlineTokens.length - 1; i >= 0; i--) {\n    const token = inlineTokens[i]\n\n    if (token.type === 'text' && !inside_autolink) {\n      token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn)\n    }\n\n    if (token.type === 'link_open' && token.info === 'auto') {\n      inside_autolink--\n    }\n\n    if (token.type === 'link_close' && token.info === 'auto') {\n      inside_autolink++\n    }\n  }\n}\n\nfunction replace_rare (inlineTokens) {\n  let inside_autolink = 0\n\n  for (let i = inlineTokens.length - 1; i >= 0; i--) {\n    const token = inlineTokens[i]\n\n    if (token.type === 'text' && !inside_autolink) {\n      if (RARE_RE.test(token.content)) {\n        token.content = token.content\n          .replace(/\\+-/g, '±')\n          // .., ..., ....... -> …\n          // but ?..... & !..... -> ?.. & !..\n          .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n          .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n          // em-dash\n          .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\\u2014')\n          // en-dash\n          .replace(/(^|\\s)--(?=\\s|$)/mg, '$1\\u2013')\n          .replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, '$1\\u2013')\n      }\n    }\n\n    if (token.type === 'link_open' && token.info === 'auto') {\n      inside_autolink--\n    }\n\n    if (token.type === 'link_close' && token.info === 'auto') {\n      inside_autolink++\n    }\n  }\n}\n\nexport default function replace (state) {\n  let blkIdx\n\n  if (!state.md.options.typographer) { return }\n\n  for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n    if (state.tokens[blkIdx].type !== 'inline') { continue }\n\n    if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n      replace_scoped(state.tokens[blkIdx].children)\n    }\n\n    if (RARE_RE.test(state.tokens[blkIdx].content)) {\n      replace_rare(state.tokens[blkIdx].children)\n    }\n  }\n}\n","// Convert straight quotation marks to typographic ones\n//\n\nimport { isWhiteSpace, isPunctChar, isMdAsciiPunct } from '../common/utils.mjs'\n\nconst QUOTE_TEST_RE = /['\"]/\nconst QUOTE_RE = /['\"]/g\nconst APOSTROPHE = '\\u2019' /* ’ */\n\nfunction replaceAt (str, index, ch) {\n  return str.slice(0, index) + ch + str.slice(index + 1)\n}\n\nfunction process_inlines (tokens, state) {\n  let j\n\n  const stack = []\n\n  for (let i = 0; i < tokens.length; i++) {\n    const token = tokens[i]\n\n    const thisLevel = tokens[i].level\n\n    for (j = stack.length - 1; j >= 0; j--) {\n      if (stack[j].level <= thisLevel) { break }\n    }\n    stack.length = j + 1\n\n    if (token.type !== 'text') { continue }\n\n    let text = token.content\n    let pos = 0\n    let max = text.length\n\n    /* eslint no-labels:0,block-scoped-var:0 */\n    OUTER:\n    while (pos < max) {\n      QUOTE_RE.lastIndex = pos\n      const t = QUOTE_RE.exec(text)\n      if (!t) { break }\n\n      let canOpen = true\n      let canClose = true\n      pos = t.index + 1\n      const isSingle = (t[0] === \"'\")\n\n      // Find previous character,\n      // default to space if it's the beginning of the line\n      //\n      let lastChar = 0x20\n\n      if (t.index - 1 >= 0) {\n        lastChar = text.charCodeAt(t.index - 1)\n      } else {\n        for (j = i - 1; j >= 0; j--) {\n          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // lastChar defaults to 0x20\n          if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n          lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1)\n          break\n        }\n      }\n\n      // Find next character,\n      // default to space if it's the end of the line\n      //\n      let nextChar = 0x20\n\n      if (pos < max) {\n        nextChar = text.charCodeAt(pos)\n      } else {\n        for (j = i + 1; j < tokens.length; j++) {\n          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // nextChar defaults to 0x20\n          if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n          nextChar = tokens[j].content.charCodeAt(0)\n          break\n        }\n      }\n\n      const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar))\n      const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar))\n\n      const isLastWhiteSpace = isWhiteSpace(lastChar)\n      const isNextWhiteSpace = isWhiteSpace(nextChar)\n\n      if (isNextWhiteSpace) {\n        canOpen = false\n      } else if (isNextPunctChar) {\n        if (!(isLastWhiteSpace || isLastPunctChar)) {\n          canOpen = false\n        }\n      }\n\n      if (isLastWhiteSpace) {\n        canClose = false\n      } else if (isLastPunctChar) {\n        if (!(isNextWhiteSpace || isNextPunctChar)) {\n          canClose = false\n        }\n      }\n\n      if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n        if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n          // special case: 1\"\" - count first quote as an inch\n          canClose = canOpen = false\n        }\n      }\n\n      if (canOpen && canClose) {\n        // Replace quotes in the middle of punctuation sequence, but not\n        // in the middle of the words, i.e.:\n        //\n        // 1. foo \" bar \" baz - not replaced\n        // 2. foo-\"-bar-\"-baz - replaced\n        // 3. foo\"bar\"baz     - not replaced\n        //\n        canOpen = isLastPunctChar\n        canClose = isNextPunctChar\n      }\n\n      if (!canOpen && !canClose) {\n        // middle of word\n        if (isSingle) {\n          token.content = replaceAt(token.content, t.index, APOSTROPHE)\n        }\n        continue\n      }\n\n      if (canClose) {\n        // this could be a closing quote, rewind the stack to get a match\n        for (j = stack.length - 1; j >= 0; j--) {\n          let item = stack[j]\n          if (stack[j].level < thisLevel) { break }\n          if (item.single === isSingle && stack[j].level === thisLevel) {\n            item = stack[j]\n\n            let openQuote\n            let closeQuote\n            if (isSingle) {\n              openQuote = state.md.options.quotes[2]\n              closeQuote = state.md.options.quotes[3]\n            } else {\n              openQuote = state.md.options.quotes[0]\n              closeQuote = state.md.options.quotes[1]\n            }\n\n            // replace token.content *before* tokens[item.token].content,\n            // because, if they are pointing at the same token, replaceAt\n            // could mess up indices when quote length != 1\n            token.content = replaceAt(token.content, t.index, closeQuote)\n            tokens[item.token].content = replaceAt(\n              tokens[item.token].content, item.pos, openQuote)\n\n            pos += closeQuote.length - 1\n            if (item.token === i) { pos += openQuote.length - 1 }\n\n            text = token.content\n            max = text.length\n\n            stack.length = j\n            continue OUTER\n          }\n        }\n      }\n\n      if (canOpen) {\n        stack.push({\n          token: i,\n          pos: t.index,\n          single: isSingle,\n          level: thisLevel\n        })\n      } else if (canClose && isSingle) {\n        token.content = replaceAt(token.content, t.index, APOSTROPHE)\n      }\n    }\n  }\n}\n\nexport default function smartquotes (state) {\n  /* eslint max-depth:0 */\n  if (!state.md.options.typographer) { return }\n\n  for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n    if (state.tokens[blkIdx].type !== 'inline' ||\n        !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n      continue\n    }\n\n    process_inlines(state.tokens[blkIdx].children, state)\n  }\n}\n","/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateCore from './rules_core/state_core.mjs'\n\nimport r_normalize from './rules_core/normalize.mjs'\nimport r_block from './rules_core/block.mjs'\nimport r_inline from './rules_core/inline.mjs'\nimport r_linkify from './rules_core/linkify.mjs'\nimport r_replacements from './rules_core/replacements.mjs'\nimport r_smartquotes from './rules_core/smartquotes.mjs'\nimport r_text_join from './rules_core/text_join.mjs'\n\nconst _rules = [\n  ['normalize',      r_normalize],\n  ['block',          r_block],\n  ['inline',         r_inline],\n  ['linkify',        r_linkify],\n  ['replacements',   r_replacements],\n  ['smartquotes',    r_smartquotes],\n  // `text_join` finds `text_special` tokens (for escape sequences)\n  // and joins them with the rest of the text\n  ['text_join',      r_text_join]\n]\n\n/**\n * new Core()\n **/\nfunction Core () {\n  /**\n   * Core#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of core rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1])\n  }\n}\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n  const rules = this.ruler.getRules('')\n\n  for (let i = 0, l = rules.length; i < l; i++) {\n    rules[i](state)\n  }\n}\n\nCore.prototype.State = StateCore\n\nexport default Core\n","export default function block (state) {\n  let token\n\n  if (state.inlineMode) {\n    token          = new state.Token('inline', '', 0)\n    token.content  = state.src\n    token.map      = [0, 1]\n    token.children = []\n    state.tokens.push(token)\n  } else {\n    state.md.block.parse(state.src, state.md, state.env, state.tokens)\n  }\n}\n","export default function inline (state) {\n  const tokens = state.tokens\n\n  // Parse inlines\n  for (let i = 0, l = tokens.length; i < l; i++) {\n    const tok = tokens[i]\n    if (tok.type === 'inline') {\n      state.md.inline.parse(tok.content, state.md, state.env, tok.children)\n    }\n  }\n}\n","// Join raw text tokens with the rest of the text\n//\n// This is set as a separate rule to provide an opportunity for plugins\n// to run text replacements after text join, but before escape join.\n//\n// For example, `\\:)` shouldn't be replaced with an emoji.\n//\n\nexport default function text_join (state) {\n  let curr, last\n  const blockTokens = state.tokens\n  const l = blockTokens.length\n\n  for (let j = 0; j < l; j++) {\n    if (blockTokens[j].type !== 'inline') continue\n\n    const tokens = blockTokens[j].children\n    const max = tokens.length\n\n    for (curr = 0; curr < max; curr++) {\n      if (tokens[curr].type === 'text_special') {\n        tokens[curr].type = 'text'\n      }\n    }\n\n    for (curr = last = 0; curr < max; curr++) {\n      if (tokens[curr].type === 'text' &&\n          curr + 1 < max &&\n          tokens[curr + 1].type === 'text') {\n        // collapse two adjacent text nodes\n        tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content\n      } else {\n        if (curr !== last) { tokens[last] = tokens[curr] }\n\n        last++\n      }\n    }\n\n    if (curr !== last) {\n      tokens.length = last\n    }\n  }\n}\n","// Parser state class\n\nimport Token from '../token.mjs'\nimport { isSpace } from '../common/utils.mjs'\n\nfunction StateBlock (src, md, env, tokens) {\n  this.src = src\n\n  // link to parser instance\n  this.md     = md\n\n  this.env = env\n\n  //\n  // Internal state vartiables\n  //\n\n  this.tokens = tokens\n\n  this.bMarks = []  // line begin offsets for fast jumps\n  this.eMarks = []  // line end offsets for fast jumps\n  this.tShift = []  // offsets of the first non-space characters (tabs not expanded)\n  this.sCount = []  // indents for each line (tabs expanded)\n\n  // An amount of virtual spaces (tabs expanded) between beginning\n  // of each line (bMarks) and real beginning of that line.\n  //\n  // It exists only as a hack because blockquotes override bMarks\n  // losing information in the process.\n  //\n  // It's used only when expanding tabs, you can think about it as\n  // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n  // means first tab should be expanded to 4-21%4 === 3 spaces.\n  //\n  this.bsCount = []\n\n  // block parser variables\n\n  // required block content indent (for example, if we are\n  // inside a list, it would be positioned after list marker)\n  this.blkIndent  = 0\n  this.line       = 0 // line index in src\n  this.lineMax    = 0 // lines count\n  this.tight      = false  // loose/tight mode for lists\n  this.ddIndent   = -1 // indent of the current dd block (-1 if there isn't any)\n  this.listIndent = -1 // indent of the current list block (-1 if there isn't any)\n\n  // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n  // used in lists to determine if they interrupt a paragraph\n  this.parentType = 'root'\n\n  this.level = 0\n\n  // Create caches\n  // Generate markers.\n  const s = this.src\n\n  for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {\n    const ch = s.charCodeAt(pos)\n\n    if (!indent_found) {\n      if (isSpace(ch)) {\n        indent++\n\n        if (ch === 0x09) {\n          offset += 4 - offset % 4\n        } else {\n          offset++\n        }\n        continue\n      } else {\n        indent_found = true\n      }\n    }\n\n    if (ch === 0x0A || pos === len - 1) {\n      if (ch !== 0x0A) { pos++ }\n      this.bMarks.push(start)\n      this.eMarks.push(pos)\n      this.tShift.push(indent)\n      this.sCount.push(offset)\n      this.bsCount.push(0)\n\n      indent_found = false\n      indent = 0\n      offset = 0\n      start = pos + 1\n    }\n  }\n\n  // Push fake entry to simplify cache bounds checks\n  this.bMarks.push(s.length)\n  this.eMarks.push(s.length)\n  this.tShift.push(0)\n  this.sCount.push(0)\n  this.bsCount.push(0)\n\n  this.lineMax = this.bMarks.length - 1 // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n  const token = new Token(type, tag, nesting)\n  token.block = true\n\n  if (nesting < 0) this.level-- // closing tag\n  token.level = this.level\n  if (nesting > 0) this.level++ // opening tag\n\n  this.tokens.push(token)\n  return token\n}\n\nStateBlock.prototype.isEmpty = function isEmpty (line) {\n  return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]\n}\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines (from) {\n  for (let max = this.lineMax; from < max; from++) {\n    if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n      break\n    }\n  }\n  return from\n}\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces (pos) {\n  for (let max = this.src.length; pos < max; pos++) {\n    const ch = this.src.charCodeAt(pos)\n    if (!isSpace(ch)) { break }\n  }\n  return pos\n}\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack (pos, min) {\n  if (pos <= min) { return pos }\n\n  while (pos > min) {\n    if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1 }\n  }\n  return pos\n}\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars (pos, code) {\n  for (let max = this.src.length; pos < max; pos++) {\n    if (this.src.charCodeAt(pos) !== code) { break }\n  }\n  return pos\n}\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack (pos, code, min) {\n  if (pos <= min) { return pos }\n\n  while (pos > min) {\n    if (code !== this.src.charCodeAt(--pos)) { return pos + 1 }\n  }\n  return pos\n}\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines (begin, end, indent, keepLastLF) {\n  if (begin >= end) {\n    return ''\n  }\n\n  const queue = new Array(end - begin)\n\n  for (let i = 0, line = begin; line < end; line++, i++) {\n    let lineIndent = 0\n    const lineStart = this.bMarks[line]\n    let first = lineStart\n    let last\n\n    if (line + 1 < end || keepLastLF) {\n      // No need for bounds check because we have fake entry on tail.\n      last = this.eMarks[line] + 1\n    } else {\n      last = this.eMarks[line]\n    }\n\n    while (first < last && lineIndent < indent) {\n      const ch = this.src.charCodeAt(first)\n\n      if (isSpace(ch)) {\n        if (ch === 0x09) {\n          lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4\n        } else {\n          lineIndent++\n        }\n      } else if (first - lineStart < this.tShift[line]) {\n        // patched tShift masked characters to look like spaces (blockquotes, list markers)\n        lineIndent++\n      } else {\n        break\n      }\n\n      first++\n    }\n\n    if (lineIndent > indent) {\n      // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n      // with indent=2 becomes '  \\tfoobar'\n      queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last)\n    } else {\n      queue[i] = this.src.slice(first, last)\n    }\n  }\n\n  return queue.join('')\n}\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token\n\nexport default StateBlock\n","// GFM table, https://github.github.com/gfm/#tables-extension-\n\nimport { isSpace } from '../common/utils.mjs'\n\n// Limit the amount of empty autocompleted cells in a table,\n// see https://github.com/markdown-it/markdown-it/issues/1000,\n//\n// Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k.\n// We set it to 65k, which can expand user input by a factor of x370\n// (256x256 square is 1.8kB expanded into 650kB).\nconst MAX_AUTOCOMPLETED_CELLS = 0x10000\n\nfunction getLine (state, line) {\n  const pos = state.bMarks[line] + state.tShift[line]\n  const max = state.eMarks[line]\n\n  return state.src.slice(pos, max)\n}\n\nfunction escapedSplit (str) {\n  const result = []\n  const max = str.length\n\n  let pos = 0\n  let ch = str.charCodeAt(pos)\n  let isEscaped = false\n  let lastPos = 0\n  let current = ''\n\n  while (pos < max) {\n    if (ch === 0x7c/* | */) {\n      if (!isEscaped) {\n        // pipe separating cells, '|'\n        result.push(current + str.substring(lastPos, pos))\n        current = ''\n        lastPos = pos + 1\n      } else {\n        // escaped pipe, '\\|'\n        current += str.substring(lastPos, pos - 1)\n        lastPos = pos\n      }\n    }\n\n    isEscaped = (ch === 0x5c/* \\ */)\n    pos++\n\n    ch = str.charCodeAt(pos)\n  }\n\n  result.push(current + str.substring(lastPos))\n\n  return result\n}\n\nexport default function table (state, startLine, endLine, silent) {\n  // should have at least two lines\n  if (startLine + 2 > endLine) { return false }\n\n  let nextLine = startLine + 1\n\n  if (state.sCount[nextLine] < state.blkIndent) { return false }\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[nextLine] - state.blkIndent >= 4) { return false }\n\n  // first character of the second line should be '|', '-', ':',\n  // and no other characters are allowed but spaces;\n  // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n  let pos = state.bMarks[nextLine] + state.tShift[nextLine]\n  if (pos >= state.eMarks[nextLine]) { return false }\n\n  const firstCh = state.src.charCodeAt(pos++)\n  if (firstCh !== 0x7C/* | */ && firstCh !== 0x2D/* - */ && firstCh !== 0x3A/* : */) { return false }\n\n  if (pos >= state.eMarks[nextLine]) { return false }\n\n  const secondCh = state.src.charCodeAt(pos++)\n  if (secondCh !== 0x7C/* | */ && secondCh !== 0x2D/* - */ && secondCh !== 0x3A/* : */ && !isSpace(secondCh)) {\n    return false\n  }\n\n  // if first character is '-', then second character must not be a space\n  // (due to parsing ambiguity with list)\n  if (firstCh === 0x2D/* - */ && isSpace(secondCh)) { return false }\n\n  while (pos < state.eMarks[nextLine]) {\n    const ch = state.src.charCodeAt(pos)\n\n    if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false }\n\n    pos++\n  }\n\n  let lineText = getLine(state, startLine + 1)\n  let columns = lineText.split('|')\n  const aligns = []\n  for (let i = 0; i < columns.length; i++) {\n    const t = columns[i].trim()\n    if (!t) {\n      // allow empty columns before and after table, but not in between columns;\n      // e.g. allow ` |---| `, disallow ` ---||--- `\n      if (i === 0 || i === columns.length - 1) {\n        continue\n      } else {\n        return false\n      }\n    }\n\n    if (!/^:?-+:?$/.test(t)) { return false }\n    if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n      aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right')\n    } else if (t.charCodeAt(0) === 0x3A/* : */) {\n      aligns.push('left')\n    } else {\n      aligns.push('')\n    }\n  }\n\n  lineText = getLine(state, startLine).trim()\n  if (lineText.indexOf('|') === -1) { return false }\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n  columns = escapedSplit(lineText)\n  if (columns.length && columns[0] === '') columns.shift()\n  if (columns.length && columns[columns.length - 1] === '') columns.pop()\n\n  // header row will define an amount of columns in the entire table,\n  // and align row should be exactly the same (the rest of the rows can differ)\n  const columnCount = columns.length\n  if (columnCount === 0 || columnCount !== aligns.length) { return false }\n\n  if (silent) { return true }\n\n  const oldParentType = state.parentType\n  state.parentType = 'table'\n\n  // use 'blockquote' lists for termination because it's\n  // the most similar to tables\n  const terminatorRules = state.md.block.ruler.getRules('blockquote')\n\n  const token_to = state.push('table_open', 'table', 1)\n  const tableLines = [startLine, 0]\n  token_to.map = tableLines\n\n  const token_tho = state.push('thead_open', 'thead', 1)\n  token_tho.map = [startLine, startLine + 1]\n\n  const token_htro = state.push('tr_open', 'tr', 1)\n  token_htro.map = [startLine, startLine + 1]\n\n  for (let i = 0; i < columns.length; i++) {\n    const token_ho = state.push('th_open', 'th', 1)\n    if (aligns[i]) {\n      token_ho.attrs  = [['style', 'text-align:' + aligns[i]]]\n    }\n\n    const token_il = state.push('inline', '', 0)\n    token_il.content  = columns[i].trim()\n    token_il.children = []\n\n    state.push('th_close', 'th', -1)\n  }\n\n  state.push('tr_close', 'tr', -1)\n  state.push('thead_close', 'thead', -1)\n\n  let tbodyLines\n  let autocompletedCells = 0\n\n  for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n    if (state.sCount[nextLine] < state.blkIndent) { break }\n\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n\n    if (terminate) { break }\n    lineText = getLine(state, nextLine).trim()\n    if (!lineText) { break }\n    if (state.sCount[nextLine] - state.blkIndent >= 4) { break }\n    columns = escapedSplit(lineText)\n    if (columns.length && columns[0] === '') columns.shift()\n    if (columns.length && columns[columns.length - 1] === '') columns.pop()\n\n    // note: autocomplete count can be negative if user specifies more columns than header,\n    // but that does not affect intended use (which is limiting expansion)\n    autocompletedCells += columnCount - columns.length\n    if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) { break }\n\n    if (nextLine === startLine + 2) {\n      const token_tbo = state.push('tbody_open', 'tbody', 1)\n      token_tbo.map = tbodyLines = [startLine + 2, 0]\n    }\n\n    const token_tro = state.push('tr_open', 'tr', 1)\n    token_tro.map = [nextLine, nextLine + 1]\n\n    for (let i = 0; i < columnCount; i++) {\n      const token_tdo = state.push('td_open', 'td', 1)\n      if (aligns[i]) {\n        token_tdo.attrs  = [['style', 'text-align:' + aligns[i]]]\n      }\n\n      const token_il = state.push('inline', '', 0)\n      token_il.content  = columns[i] ? columns[i].trim() : ''\n      token_il.children = []\n\n      state.push('td_close', 'td', -1)\n    }\n    state.push('tr_close', 'tr', -1)\n  }\n\n  if (tbodyLines) {\n    state.push('tbody_close', 'tbody', -1)\n    tbodyLines[1] = nextLine\n  }\n\n  state.push('table_close', 'table', -1)\n  tableLines[1] = nextLine\n\n  state.parentType = oldParentType\n  state.line = nextLine\n  return true\n}\n","// Lists\n\nimport { isSpace } from '../common/utils.mjs'\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker (state, startLine) {\n  const max = state.eMarks[startLine]\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n\n  const marker = state.src.charCodeAt(pos++)\n  // Check bullet\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x2B/* + */) {\n    return -1\n  }\n\n  if (pos < max) {\n    const ch = state.src.charCodeAt(pos)\n\n    if (!isSpace(ch)) {\n      // \" -test \" - is not a list item\n      return -1\n    }\n  }\n\n  return pos\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker (state, startLine) {\n  const start = state.bMarks[startLine] + state.tShift[startLine]\n  const max = state.eMarks[startLine]\n  let pos = start\n\n  // List marker should have at least 2 chars (digit + dot)\n  if (pos + 1 >= max) { return -1 }\n\n  let ch = state.src.charCodeAt(pos++)\n\n  if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1 }\n\n  for (;;) {\n    // EOL -> fail\n    if (pos >= max) { return -1 }\n\n    ch = state.src.charCodeAt(pos++)\n\n    if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n      // List marker should have no more than 9 digits\n      // (prevents integer overflow in browsers)\n      if (pos - start >= 10) { return -1 }\n\n      continue\n    }\n\n    // found valid marker\n    if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n      break\n    }\n\n    return -1\n  }\n\n  if (pos < max) {\n    ch = state.src.charCodeAt(pos)\n\n    if (!isSpace(ch)) {\n      // \" 1.test \" - is not a list item\n      return -1\n    }\n  }\n  return pos\n}\n\nfunction markTightParagraphs (state, idx) {\n  const level = state.level + 2\n\n  for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n    if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n      state.tokens[i + 2].hidden = true\n      state.tokens[i].hidden = true\n      i += 2\n    }\n  }\n}\n\nexport default function list (state, startLine, endLine, silent) {\n  let max, pos, start, token\n  let nextLine = startLine\n  let tight = true\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[nextLine] - state.blkIndent >= 4) { return false }\n\n  // Special case:\n  //  - item 1\n  //   - item 2\n  //    - item 3\n  //     - item 4\n  //      - this one is a paragraph continuation\n  if (state.listIndent >= 0 &&\n      state.sCount[nextLine] - state.listIndent >= 4 &&\n      state.sCount[nextLine] < state.blkIndent) {\n    return false\n  }\n\n  let isTerminatingParagraph = false\n\n  // limit conditions when list can interrupt\n  // a paragraph (validation mode only)\n  if (silent && state.parentType === 'paragraph') {\n    // Next list item should still terminate previous list item;\n    //\n    // This code can fail if plugins use blkIndent as well as lists,\n    // but I hope the spec gets fixed long before that happens.\n    //\n    if (state.sCount[nextLine] >= state.blkIndent) {\n      isTerminatingParagraph = true\n    }\n  }\n\n  // Detect list type and position after marker\n  let isOrdered\n  let markerValue\n  let posAfterMarker\n  if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {\n    isOrdered = true\n    start = state.bMarks[nextLine] + state.tShift[nextLine]\n    markerValue = Number(state.src.slice(start, posAfterMarker - 1))\n\n    // If we're starting a new ordered list right after\n    // a paragraph, it should start with 1.\n    if (isTerminatingParagraph && markerValue !== 1) return false\n  } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {\n    isOrdered = false\n  } else {\n    return false\n  }\n\n  // If we're starting a new unordered list right after\n  // a paragraph, first line should not be empty.\n  if (isTerminatingParagraph) {\n    if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false\n  }\n\n  // For validation mode we can terminate immediately\n  if (silent) { return true }\n\n  // We should terminate list on style change. Remember first one to compare.\n  const markerCharCode = state.src.charCodeAt(posAfterMarker - 1)\n\n  // Start list\n  const listTokIdx = state.tokens.length\n\n  if (isOrdered) {\n    token       = state.push('ordered_list_open', 'ol', 1)\n    if (markerValue !== 1) {\n      token.attrs = [['start', markerValue]]\n    }\n  } else {\n    token       = state.push('bullet_list_open', 'ul', 1)\n  }\n\n  const listLines = [nextLine, 0]\n  token.map    = listLines\n  token.markup = String.fromCharCode(markerCharCode)\n\n  //\n  // Iterate list items\n  //\n\n  let prevEmptyEnd = false\n  const terminatorRules = state.md.block.ruler.getRules('list')\n\n  const oldParentType = state.parentType\n  state.parentType = 'list'\n\n  while (nextLine < endLine) {\n    pos = posAfterMarker\n    max = state.eMarks[nextLine]\n\n    const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine])\n    let offset = initial\n\n    while (pos < max) {\n      const ch = state.src.charCodeAt(pos)\n\n      if (ch === 0x09) {\n        offset += 4 - (offset + state.bsCount[nextLine]) % 4\n      } else if (ch === 0x20) {\n        offset++\n      } else {\n        break\n      }\n\n      pos++\n    }\n\n    const contentStart = pos\n    let indentAfterMarker\n\n    if (contentStart >= max) {\n      // trimming space in \"-    \\n  3\" case, indent is 1 here\n      indentAfterMarker = 1\n    } else {\n      indentAfterMarker = offset - initial\n    }\n\n    // If we have more than 4 spaces, the indent is 1\n    // (the rest is just indented code block)\n    if (indentAfterMarker > 4) { indentAfterMarker = 1 }\n\n    // \"  -  test\"\n    //  ^^^^^ - calculating total length of this thing\n    const indent = initial + indentAfterMarker\n\n    // Run subparser & write tokens\n    token        = state.push('list_item_open', 'li', 1)\n    token.markup = String.fromCharCode(markerCharCode)\n    const itemLines = [nextLine, 0]\n    token.map    = itemLines\n    if (isOrdered) {\n      token.info = state.src.slice(start, posAfterMarker - 1)\n    }\n\n    // change current state, then restore it after parser subcall\n    const oldTight = state.tight\n    const oldTShift = state.tShift[nextLine]\n    const oldSCount = state.sCount[nextLine]\n\n    //  - example list\n    // ^ listIndent position will be here\n    //   ^ blkIndent position will be here\n    //\n    const oldListIndent = state.listIndent\n    state.listIndent = state.blkIndent\n    state.blkIndent = indent\n\n    state.tight = true\n    state.tShift[nextLine] = contentStart - state.bMarks[nextLine]\n    state.sCount[nextLine] = offset\n\n    if (contentStart >= max && state.isEmpty(nextLine + 1)) {\n      // workaround for this case\n      // (list item is empty, list terminates before \"foo\"):\n      // ~~~~~~~~\n      //   -\n      //\n      //     foo\n      // ~~~~~~~~\n      state.line = Math.min(state.line + 2, endLine)\n    } else {\n      state.md.block.tokenize(state, nextLine, endLine, true)\n    }\n\n    // If any of list item is tight, mark list as tight\n    if (!state.tight || prevEmptyEnd) {\n      tight = false\n    }\n    // Item become loose if finish with empty line,\n    // but we should filter last element, because it means list finish\n    prevEmptyEnd = (state.line - nextLine) > 1 && state.isEmpty(state.line - 1)\n\n    state.blkIndent = state.listIndent\n    state.listIndent = oldListIndent\n    state.tShift[nextLine] = oldTShift\n    state.sCount[nextLine] = oldSCount\n    state.tight = oldTight\n\n    token        = state.push('list_item_close', 'li', -1)\n    token.markup = String.fromCharCode(markerCharCode)\n\n    nextLine = state.line\n    itemLines[1] = nextLine\n\n    if (nextLine >= endLine) { break }\n\n    //\n    // Try to check if list is terminated or continued.\n    //\n    if (state.sCount[nextLine] < state.blkIndent) { break }\n\n    // if it's indented more than 3 spaces, it should be a code block\n    if (state.sCount[nextLine] - state.blkIndent >= 4) { break }\n\n    // fail if terminating block found\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n\n    // fail if list has another type\n    if (isOrdered) {\n      posAfterMarker = skipOrderedListMarker(state, nextLine)\n      if (posAfterMarker < 0) { break }\n      start = state.bMarks[nextLine] + state.tShift[nextLine]\n    } else {\n      posAfterMarker = skipBulletListMarker(state, nextLine)\n      if (posAfterMarker < 0) { break }\n    }\n\n    if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break }\n  }\n\n  // Finalize list\n  if (isOrdered) {\n    token = state.push('ordered_list_close', 'ol', -1)\n  } else {\n    token = state.push('bullet_list_close', 'ul', -1)\n  }\n  token.markup = String.fromCharCode(markerCharCode)\n\n  listLines[1] = nextLine\n  state.line = nextLine\n\n  state.parentType = oldParentType\n\n  // mark paragraphs tight if needed\n  if (tight) {\n    markTightParagraphs(state, listTokIdx)\n  }\n\n  return true\n}\n","// Regexps to match html elements\n\nconst attr_name     = '[a-zA-Z_:][a-zA-Z0-9:._-]*'\n\nconst unquoted      = '[^\"\\'=<>`\\\\x00-\\\\x20]+'\nconst single_quoted = \"'[^']*'\"\nconst double_quoted = '\"[^\"]*\"'\n\nconst attr_value  = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')'\n\nconst attribute   = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)'\n\nconst open_tag    = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>'\n\nconst close_tag   = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>'\nconst comment     = '<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->'\nconst processing  = '<[?][\\\\s\\\\S]*?[?]>'\nconst declaration = '<![A-Za-z][^>]*>'\nconst cdata       = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>'\n\nconst HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n                        '|' + processing + '|' + declaration + '|' + cdata + ')')\nconst HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')')\n\nexport { HTML_TAG_RE, HTML_OPEN_CLOSE_TAG_RE }\n","// HTML block\n\nimport block_names from '../common/html_blocks.mjs'\nimport { HTML_OPEN_CLOSE_TAG_RE } from '../common/html_re.mjs'\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nconst HTML_SEQUENCES = [\n  [/^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i, true],\n  [/^<!--/,        /-->/,   true],\n  [/^<\\?/,         /\\?>/,   true],\n  [/^<![A-Z]/,     />/,     true],\n  [/^<!\\[CDATA\\[/, /\\]\\]>/, true],\n  [new RegExp('^</?(' + block_names.join('|') + ')(?=(\\\\s|/?>|$))', 'i'), /^$/, true],\n  [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'),  /^$/, false]\n]\n\nexport default function html_block (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (!state.md.options.html) { return false }\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false }\n\n  let lineText = state.src.slice(pos, max)\n\n  let i = 0\n  for (; i < HTML_SEQUENCES.length; i++) {\n    if (HTML_SEQUENCES[i][0].test(lineText)) { break }\n  }\n  if (i === HTML_SEQUENCES.length) { return false }\n\n  if (silent) {\n    // true if this sequence can be a terminator, false otherwise\n    return HTML_SEQUENCES[i][2]\n  }\n\n  let nextLine = startLine + 1\n\n  // If we are here - we detected HTML block.\n  // Let's roll down till block end.\n  if (!HTML_SEQUENCES[i][1].test(lineText)) {\n    for (; nextLine < endLine; nextLine++) {\n      if (state.sCount[nextLine] < state.blkIndent) { break }\n\n      pos = state.bMarks[nextLine] + state.tShift[nextLine]\n      max = state.eMarks[nextLine]\n      lineText = state.src.slice(pos, max)\n\n      if (HTML_SEQUENCES[i][1].test(lineText)) {\n        if (lineText.length !== 0) { nextLine++ }\n        break\n      }\n    }\n  }\n\n  state.line = nextLine\n\n  const token   = state.push('html_block', '', 0)\n  token.map     = [startLine, nextLine]\n  token.content = state.getLines(startLine, nextLine, state.blkIndent, true)\n\n  return true\n}\n","// List of valid html blocks names, according to commonmark spec\n// https://spec.commonmark.org/0.30/#html-blocks\n\nexport default [\n  'address',\n  'article',\n  'aside',\n  'base',\n  'basefont',\n  'blockquote',\n  'body',\n  'caption',\n  'center',\n  'col',\n  'colgroup',\n  'dd',\n  'details',\n  'dialog',\n  'dir',\n  'div',\n  'dl',\n  'dt',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'footer',\n  'form',\n  'frame',\n  'frameset',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'head',\n  'header',\n  'hr',\n  'html',\n  'iframe',\n  'legend',\n  'li',\n  'link',\n  'main',\n  'menu',\n  'menuitem',\n  'nav',\n  'noframes',\n  'ol',\n  'optgroup',\n  'option',\n  'p',\n  'param',\n  'search',\n  'section',\n  'summary',\n  'table',\n  'tbody',\n  'td',\n  'tfoot',\n  'th',\n  'thead',\n  'title',\n  'tr',\n  'track',\n  'ul'\n]\n","/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateBlock from './rules_block/state_block.mjs'\n\nimport r_table from './rules_block/table.mjs'\nimport r_code from './rules_block/code.mjs'\nimport r_fence from './rules_block/fence.mjs'\nimport r_blockquote from './rules_block/blockquote.mjs'\nimport r_hr from './rules_block/hr.mjs'\nimport r_list from './rules_block/list.mjs'\nimport r_reference from './rules_block/reference.mjs'\nimport r_html_block from './rules_block/html_block.mjs'\nimport r_heading from './rules_block/heading.mjs'\nimport r_lheading from './rules_block/lheading.mjs'\nimport r_paragraph from './rules_block/paragraph.mjs'\n\nconst _rules = [\n  // First 2 params - rule name & source. Secondary array - list of rules,\n  // which can be terminated by this one.\n  ['table',      r_table,      ['paragraph', 'reference']],\n  ['code',       r_code],\n  ['fence',      r_fence,      ['paragraph', 'reference', 'blockquote', 'list']],\n  ['blockquote', r_blockquote, ['paragraph', 'reference', 'blockquote', 'list']],\n  ['hr',         r_hr,         ['paragraph', 'reference', 'blockquote', 'list']],\n  ['list',       r_list,       ['paragraph', 'reference', 'blockquote']],\n  ['reference',  r_reference],\n  ['html_block', r_html_block, ['paragraph', 'reference', 'blockquote']],\n  ['heading',    r_heading,    ['paragraph', 'reference', 'blockquote']],\n  ['lheading',   r_lheading],\n  ['paragraph',  r_paragraph]\n]\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock () {\n  /**\n   * ParserBlock#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of block rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() })\n  }\n}\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const maxNesting = state.md.options.maxNesting\n  let line = startLine\n  let hasEmptyLines = false\n\n  while (line < endLine) {\n    state.line = line = state.skipEmptyLines(line)\n    if (line >= endLine) { break }\n\n    // Termination condition for nested calls.\n    // Nested calls currently used for blockquotes & lists\n    if (state.sCount[line] < state.blkIndent) { break }\n\n    // If nesting level exceeded - skip tail to the end. That's not ordinary\n    // situation and we should not care about content.\n    if (state.level >= maxNesting) {\n      state.line = endLine\n      break\n    }\n\n    // Try all possible rules.\n    // On success, rule should:\n    //\n    // - update `state.line`\n    // - update `state.tokens`\n    // - return true\n    const prevLine = state.line\n    let ok = false\n\n    for (let i = 0; i < len; i++) {\n      ok = rules[i](state, line, endLine, false)\n      if (ok) {\n        if (prevLine >= state.line) {\n          throw new Error(\"block rule didn't increment state.line\")\n        }\n        break\n      }\n    }\n\n    // this can only happen if user disables paragraph rule\n    if (!ok) throw new Error('none of the block rules matched')\n\n    // set state.tight if we had an empty line before current tag\n    // i.e. latest empty line should not count\n    state.tight = !hasEmptyLines\n\n    // paragraph might \"eat\" one newline after it in nested lists\n    if (state.isEmpty(state.line - 1)) {\n      hasEmptyLines = true\n    }\n\n    line = state.line\n\n    if (line < endLine && state.isEmpty(line)) {\n      hasEmptyLines = true\n      line++\n      state.line = line\n    }\n  }\n}\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n  if (!src) { return }\n\n  const state = new this.State(src, md, env, outTokens)\n\n  this.tokenize(state, state.line, state.lineMax)\n}\n\nParserBlock.prototype.State = StateBlock\n\nexport default ParserBlock\n","// Code block (4 spaces padded)\n\nexport default function code (state, startLine, endLine/*, silent */) {\n  if (state.sCount[startLine] - state.blkIndent < 4) { return false }\n\n  let nextLine = startLine + 1\n  let last = nextLine\n\n  while (nextLine < endLine) {\n    if (state.isEmpty(nextLine)) {\n      nextLine++\n      continue\n    }\n\n    if (state.sCount[nextLine] - state.blkIndent >= 4) {\n      nextLine++\n      last = nextLine\n      continue\n    }\n    break\n  }\n\n  state.line = last\n\n  const token   = state.push('code_block', 'code', 0)\n  token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\\n'\n  token.map     = [startLine, state.line]\n\n  return true\n}\n","// fences (``` lang, ~~~ lang)\n\nexport default function fence (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (pos + 3 > max) { return false }\n\n  const marker = state.src.charCodeAt(pos)\n\n  if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n    return false\n  }\n\n  // scan marker length\n  let mem = pos\n  pos = state.skipChars(pos, marker)\n\n  let len = pos - mem\n\n  if (len < 3) { return false }\n\n  const markup = state.src.slice(mem, pos)\n  const params = state.src.slice(pos, max)\n\n  if (marker === 0x60 /* ` */) {\n    if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n      return false\n    }\n  }\n\n  // Since start is found, we can report success here in validation mode\n  if (silent) { return true }\n\n  // search end of block\n  let nextLine = startLine\n  let haveEndMarker = false\n\n  for (;;) {\n    nextLine++\n    if (nextLine >= endLine) {\n      // unclosed block should be autoclosed by end of document.\n      // also block seems to be autoclosed by end of parent\n      break\n    }\n\n    pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]\n    max = state.eMarks[nextLine]\n\n    if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n      // non-empty line with negative indent should stop the list:\n      // - ```\n      //  test\n      break\n    }\n\n    if (state.src.charCodeAt(pos) !== marker) { continue }\n\n    if (state.sCount[nextLine] - state.blkIndent >= 4) {\n      // closing fence should be indented less than 4 spaces\n      continue\n    }\n\n    pos = state.skipChars(pos, marker)\n\n    // closing code fence must be at least as long as the opening one\n    if (pos - mem < len) { continue }\n\n    // make sure tail has spaces only\n    pos = state.skipSpaces(pos)\n\n    if (pos < max) { continue }\n\n    haveEndMarker = true\n    // found!\n    break\n  }\n\n  // If a fence has heading spaces, they should be removed from its inner block\n  len = state.sCount[startLine]\n\n  state.line = nextLine + (haveEndMarker ? 1 : 0)\n\n  const token   = state.push('fence', 'code', 0)\n  token.info    = params\n  token.content = state.getLines(startLine + 1, nextLine, len, true)\n  token.markup  = markup\n  token.map     = [startLine, state.line]\n\n  return true\n}\n","// Block quotes\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function blockquote (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  const oldLineMax = state.lineMax\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  // check the block quote marker\n  if (state.src.charCodeAt(pos) !== 0x3E/* > */) { return false }\n\n  // we know that it's going to be a valid blockquote,\n  // so no point trying to find the end of it in silent mode\n  if (silent) { return true }\n\n  const oldBMarks  = []\n  const oldBSCount = []\n  const oldSCount  = []\n  const oldTShift  = []\n\n  const terminatorRules = state.md.block.ruler.getRules('blockquote')\n\n  const oldParentType = state.parentType\n  state.parentType = 'blockquote'\n  let lastLineEmpty = false\n  let nextLine\n\n  // Search the end of the block\n  //\n  // Block ends with either:\n  //  1. an empty line outside:\n  //     ```\n  //     > test\n  //\n  //     ```\n  //  2. an empty line inside:\n  //     ```\n  //     >\n  //     test\n  //     ```\n  //  3. another tag:\n  //     ```\n  //     > test\n  //      - - -\n  //     ```\n  for (nextLine = startLine; nextLine < endLine; nextLine++) {\n    // check if it's outdented, i.e. it's inside list item and indented\n    // less than said list item:\n    //\n    // ```\n    // 1. anything\n    //    > current blockquote\n    // 2. checking this line\n    // ```\n    const isOutdented = state.sCount[nextLine] < state.blkIndent\n\n    pos = state.bMarks[nextLine] + state.tShift[nextLine]\n    max = state.eMarks[nextLine]\n\n    if (pos >= max) {\n      // Case 1: line is not inside the blockquote, and this line is empty.\n      break\n    }\n\n    if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {\n      // This line is inside the blockquote.\n\n      // set offset past spaces and \">\"\n      let initial = state.sCount[nextLine] + 1\n      let spaceAfterMarker\n      let adjustTab\n\n      // skip one optional space after '>'\n      if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n        // ' >   test '\n        //     ^ -- position start of line here:\n        pos++\n        initial++\n        adjustTab = false\n        spaceAfterMarker = true\n      } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n        spaceAfterMarker = true\n\n        if ((state.bsCount[nextLine] + initial) % 4 === 3) {\n          // '  >\\t  test '\n          //       ^ -- position start of line here (tab has width===1)\n          pos++\n          initial++\n          adjustTab = false\n        } else {\n          // ' >\\t  test '\n          //    ^ -- position start of line here + shift bsCount slightly\n          //         to make extra space appear\n          adjustTab = true\n        }\n      } else {\n        spaceAfterMarker = false\n      }\n\n      let offset = initial\n      oldBMarks.push(state.bMarks[nextLine])\n      state.bMarks[nextLine] = pos\n\n      while (pos < max) {\n        const ch = state.src.charCodeAt(pos)\n\n        if (isSpace(ch)) {\n          if (ch === 0x09) {\n            offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4\n          } else {\n            offset++\n          }\n        } else {\n          break\n        }\n\n        pos++\n      }\n\n      lastLineEmpty = pos >= max\n\n      oldBSCount.push(state.bsCount[nextLine])\n      state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0)\n\n      oldSCount.push(state.sCount[nextLine])\n      state.sCount[nextLine] = offset - initial\n\n      oldTShift.push(state.tShift[nextLine])\n      state.tShift[nextLine] = pos - state.bMarks[nextLine]\n      continue\n    }\n\n    // Case 2: line is not inside the blockquote, and the last line was empty.\n    if (lastLineEmpty) { break }\n\n    // Case 3: another tag found.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n\n    if (terminate) {\n      // Quirk to enforce \"hard termination mode\" for paragraphs;\n      // normally if you call `tokenize(state, startLine, nextLine)`,\n      // paragraphs will look below nextLine for paragraph continuation,\n      // but if blockquote is terminated by another tag, they shouldn't\n      state.lineMax = nextLine\n\n      if (state.blkIndent !== 0) {\n        // state.blkIndent was non-zero, we now set it to zero,\n        // so we need to re-calculate all offsets to appear as\n        // if indent wasn't changed\n        oldBMarks.push(state.bMarks[nextLine])\n        oldBSCount.push(state.bsCount[nextLine])\n        oldTShift.push(state.tShift[nextLine])\n        oldSCount.push(state.sCount[nextLine])\n        state.sCount[nextLine] -= state.blkIndent\n      }\n\n      break\n    }\n\n    oldBMarks.push(state.bMarks[nextLine])\n    oldBSCount.push(state.bsCount[nextLine])\n    oldTShift.push(state.tShift[nextLine])\n    oldSCount.push(state.sCount[nextLine])\n\n    // A negative indentation means that this is a paragraph continuation\n    //\n    state.sCount[nextLine] = -1\n  }\n\n  const oldIndent = state.blkIndent\n  state.blkIndent = 0\n\n  const token_o  = state.push('blockquote_open', 'blockquote', 1)\n  token_o.markup = '>'\n  const lines = [startLine, 0]\n  token_o.map    = lines\n\n  state.md.block.tokenize(state, startLine, nextLine)\n\n  const token_c  = state.push('blockquote_close', 'blockquote', -1)\n  token_c.markup = '>'\n\n  state.lineMax = oldLineMax\n  state.parentType = oldParentType\n  lines[1] = state.line\n\n  // Restore original tShift; this might not be necessary since the parser\n  // has already been here, but just to make sure we can do that.\n  for (let i = 0; i < oldTShift.length; i++) {\n    state.bMarks[i + startLine] = oldBMarks[i]\n    state.tShift[i + startLine] = oldTShift[i]\n    state.sCount[i + startLine] = oldSCount[i]\n    state.bsCount[i + startLine] = oldBSCount[i]\n  }\n  state.blkIndent = oldIndent\n\n  return true\n}\n","// Horizontal rule\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function hr (state, startLine, endLine, silent) {\n  const max = state.eMarks[startLine]\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  const marker = state.src.charCodeAt(pos++)\n\n  // Check hr marker\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x5F/* _ */) {\n    return false\n  }\n\n  // markers can be mixed with spaces, but there should be at least 3 of them\n\n  let cnt = 1\n  while (pos < max) {\n    const ch = state.src.charCodeAt(pos++)\n    if (ch !== marker && !isSpace(ch)) { return false }\n    if (ch === marker) { cnt++ }\n  }\n\n  if (cnt < 3) { return false }\n\n  if (silent) { return true }\n\n  state.line = startLine + 1\n\n  const token  = state.push('hr', 'hr', 0)\n  token.map    = [startLine, state.line]\n  token.markup = Array(cnt + 1).join(String.fromCharCode(marker))\n\n  return true\n}\n","import { isSpace, normalizeReference } from '../common/utils.mjs'\n\nexport default function reference (state, startLine, _endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n  let nextLine = startLine + 1\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false }\n\n  function getNextLine (nextLine) {\n    const endLine = state.lineMax\n\n    if (nextLine >= endLine || state.isEmpty(nextLine)) {\n      // empty line or end of input\n      return null\n    }\n\n    let isContinuation = false\n\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { isContinuation = true }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { isContinuation = true }\n\n    if (!isContinuation) {\n      const terminatorRules = state.md.block.ruler.getRules('reference')\n      const oldParentType = state.parentType\n      state.parentType = 'reference'\n\n      // Some tags can terminate paragraph without empty line.\n      let terminate = false\n      for (let i = 0, l = terminatorRules.length; i < l; i++) {\n        if (terminatorRules[i](state, nextLine, endLine, true)) {\n          terminate = true\n          break\n        }\n      }\n\n      state.parentType = oldParentType\n      if (terminate) {\n        // terminated by another block\n        return null\n      }\n    }\n\n    const pos = state.bMarks[nextLine] + state.tShift[nextLine]\n    const max = state.eMarks[nextLine]\n\n    // max + 1 explicitly includes the newline\n    return state.src.slice(pos, max + 1)\n  }\n\n  let str = state.src.slice(pos, max + 1)\n\n  max = str.length\n  let labelEnd = -1\n\n  for (pos = 1; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x5B /* [ */) {\n      return false\n    } else if (ch === 0x5D /* ] */) {\n      labelEnd = pos\n      break\n    } else if (ch === 0x0A /* \\n */) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (ch === 0x5C /* \\ */) {\n      pos++\n      if (pos < max && str.charCodeAt(pos) === 0x0A) {\n        const lineContent = getNextLine(nextLine)\n        if (lineContent !== null) {\n          str += lineContent\n          max = str.length\n          nextLine++\n        }\n      }\n    }\n  }\n\n  if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false }\n\n  // [label]:   destination   'title'\n  //         ^^^ skip optional whitespace here\n  for (pos = labelEnd + 2; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x0A) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (isSpace(ch)) {\n      /* eslint no-empty:0 */\n    } else {\n      break\n    }\n  }\n\n  // [label]:   destination   'title'\n  //            ^^^^^^^^^^^ parse this\n  const destRes = state.md.helpers.parseLinkDestination(str, pos, max)\n  if (!destRes.ok) { return false }\n\n  const href = state.md.normalizeLink(destRes.str)\n  if (!state.md.validateLink(href)) { return false }\n\n  pos = destRes.pos\n\n  // save cursor state, we could require to rollback later\n  const destEndPos = pos\n  const destEndLineNo = nextLine\n\n  // [label]:   destination   'title'\n  //                       ^^^ skipping those spaces\n  const start = pos\n  for (; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x0A) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (isSpace(ch)) {\n      /* eslint no-empty:0 */\n    } else {\n      break\n    }\n  }\n\n  // [label]:   destination   'title'\n  //                          ^^^^^^^ parse this\n  let titleRes = state.md.helpers.parseLinkTitle(str, pos, max)\n  while (titleRes.can_continue) {\n    const lineContent = getNextLine(nextLine)\n    if (lineContent === null) break\n    str += lineContent\n    pos = max\n    max = str.length\n    nextLine++\n    titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes)\n  }\n  let title\n\n  if (pos < max && start !== pos && titleRes.ok) {\n    title = titleRes.str\n    pos = titleRes.pos\n  } else {\n    title = ''\n    pos = destEndPos\n    nextLine = destEndLineNo\n  }\n\n  // skip trailing spaces until the rest of the line\n  while (pos < max) {\n    const ch = str.charCodeAt(pos)\n    if (!isSpace(ch)) { break }\n    pos++\n  }\n\n  if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n    if (title) {\n      // garbage at the end of the line after title,\n      // but it could still be a valid reference if we roll back\n      title = ''\n      pos = destEndPos\n      nextLine = destEndLineNo\n      while (pos < max) {\n        const ch = str.charCodeAt(pos)\n        if (!isSpace(ch)) { break }\n        pos++\n      }\n    }\n  }\n\n  if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n    // garbage at the end of the line\n    return false\n  }\n\n  const label = normalizeReference(str.slice(1, labelEnd))\n  if (!label) {\n    // CommonMark 0.20 disallows empty labels\n    return false\n  }\n\n  // Reference can not terminate anything. This check is for safety only.\n  /* istanbul ignore if */\n  if (silent) { return true }\n\n  if (typeof state.env.references === 'undefined') {\n    state.env.references = {}\n  }\n  if (typeof state.env.references[label] === 'undefined') {\n    state.env.references[label] = { title, href }\n  }\n\n  state.line = nextLine\n  return true\n}\n","// heading (#, ##, ...)\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function heading (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  let ch  = state.src.charCodeAt(pos)\n\n  if (ch !== 0x23/* # */ || pos >= max) { return false }\n\n  // count heading level\n  let level = 1\n  ch = state.src.charCodeAt(++pos)\n  while (ch === 0x23/* # */ && pos < max && level <= 6) {\n    level++\n    ch = state.src.charCodeAt(++pos)\n  }\n\n  if (level > 6 || (pos < max && !isSpace(ch))) { return false }\n\n  if (silent) { return true }\n\n  // Let's cut tails like '    ###  ' from the end of string\n\n  max = state.skipSpacesBack(max, pos)\n  const tmp = state.skipCharsBack(max, 0x23, pos) // #\n  if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n    max = tmp\n  }\n\n  state.line = startLine + 1\n\n  const token_o  = state.push('heading_open', 'h' + String(level), 1)\n  token_o.markup = '########'.slice(0, level)\n  token_o.map    = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = state.src.slice(pos, max).trim()\n  token_i.map      = [startLine, state.line]\n  token_i.children = []\n\n  const token_c  = state.push('heading_close', 'h' + String(level), -1)\n  token_c.markup = '########'.slice(0, level)\n\n  return true\n}\n","// lheading (---, ===)\n\nexport default function lheading (state, startLine, endLine/*, silent */) {\n  const terminatorRules = state.md.block.ruler.getRules('paragraph')\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  const oldParentType = state.parentType\n  state.parentType = 'paragraph' // use paragraph to match terminatorRules\n\n  // jump line-by-line until empty one or EOF\n  let level = 0\n  let marker\n  let nextLine = startLine + 1\n\n  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { continue }\n\n    //\n    // Check for underline in setext header\n    //\n    if (state.sCount[nextLine] >= state.blkIndent) {\n      let pos = state.bMarks[nextLine] + state.tShift[nextLine]\n      const max = state.eMarks[nextLine]\n\n      if (pos < max) {\n        marker = state.src.charCodeAt(pos)\n\n        if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n          pos = state.skipChars(pos, marker)\n          pos = state.skipSpaces(pos)\n\n          if (pos >= max) {\n            level = (marker === 0x3D/* = */ ? 1 : 2)\n            break\n          }\n        }\n      }\n    }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { continue }\n\n    // Some tags can terminate paragraph without empty line.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n  }\n\n  if (!level) {\n    // Didn't find valid underline\n    return false\n  }\n\n  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim()\n\n  state.line = nextLine + 1\n\n  const token_o    = state.push('heading_open', 'h' + String(level), 1)\n  token_o.markup   = String.fromCharCode(marker)\n  token_o.map      = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = content\n  token_i.map      = [startLine, state.line - 1]\n  token_i.children = []\n\n  const token_c    = state.push('heading_close', 'h' + String(level), -1)\n  token_c.markup   = String.fromCharCode(marker)\n\n  state.parentType = oldParentType\n\n  return true\n}\n","// Paragraph\n\nexport default function paragraph (state, startLine, endLine) {\n  const terminatorRules = state.md.block.ruler.getRules('paragraph')\n  const oldParentType = state.parentType\n  let nextLine = startLine + 1\n  state.parentType = 'paragraph'\n\n  // jump line-by-line until empty one or EOF\n  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { continue }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { continue }\n\n    // Some tags can terminate paragraph without empty line.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n  }\n\n  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim()\n\n  state.line = nextLine\n\n  const token_o    = state.push('paragraph_open', 'p', 1)\n  token_o.map      = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = content\n  token_i.map      = [startLine, state.line]\n  token_i.children = []\n\n  state.push('paragraph_close', 'p', -1)\n\n  state.parentType = oldParentType\n\n  return true\n}\n","// Inline parser state\n\nimport Token from '../token.mjs'\nimport { isWhiteSpace, isPunctChar, isMdAsciiPunct } from '../common/utils.mjs'\n\nfunction StateInline (src, md, env, outTokens) {\n  this.src = src\n  this.env = env\n  this.md = md\n  this.tokens = outTokens\n  this.tokens_meta = Array(outTokens.length)\n\n  this.pos = 0\n  this.posMax = this.src.length\n  this.level = 0\n  this.pending = ''\n  this.pendingLevel = 0\n\n  // Stores { start: end } pairs. Useful for backtrack\n  // optimization of pairs parse (emphasis, strikes).\n  this.cache = {}\n\n  // List of emphasis-like delimiters for current tag\n  this.delimiters = []\n\n  // Stack of delimiter lists for upper level tags\n  this._prev_delimiters = []\n\n  // backtick length => last seen position\n  this.backticks = {}\n  this.backticksScanned = false\n\n  // Counter used to disable inline linkify-it execution\n  // inside <a> and markdown links\n  this.linkLevel = 0\n}\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n  const token = new Token('text', '', 0)\n  token.content = this.pending\n  token.level = this.pendingLevel\n  this.tokens.push(token)\n  this.pending = ''\n  return token\n}\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n  if (this.pending) {\n    this.pushPending()\n  }\n\n  const token = new Token(type, tag, nesting)\n  let token_meta = null\n\n  if (nesting < 0) {\n    // closing tag\n    this.level--\n    this.delimiters = this._prev_delimiters.pop()\n  }\n\n  token.level = this.level\n\n  if (nesting > 0) {\n    // opening tag\n    this.level++\n    this._prev_delimiters.push(this.delimiters)\n    this.delimiters = []\n    token_meta = { delimiters: this.delimiters }\n  }\n\n  this.pendingLevel = this.level\n  this.tokens.push(token)\n  this.tokens_meta.push(token_meta)\n  return token\n}\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n//  - start - position to scan from (it should point at a valid marker);\n//  - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n  const max = this.posMax\n  const marker = this.src.charCodeAt(start)\n\n  // treat beginning of the line as a whitespace\n  const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20\n\n  let pos = start\n  while (pos < max && this.src.charCodeAt(pos) === marker) { pos++ }\n\n  const count = pos - start\n\n  // treat end of the line as a whitespace\n  const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20\n\n  const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar))\n  const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar))\n\n  const isLastWhiteSpace = isWhiteSpace(lastChar)\n  const isNextWhiteSpace = isWhiteSpace(nextChar)\n\n  const left_flanking =\n    !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar)\n  const right_flanking =\n    !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar)\n\n  const can_open  = left_flanking  && (canSplitWord || !right_flanking || isLastPunctChar)\n  const can_close = right_flanking && (canSplitWord || !left_flanking  || isNextPunctChar)\n\n  return { can_open, can_close, length: count }\n}\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token\n\nexport default StateInline\n","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar (ch) {\n  switch (ch) {\n    case 0x0A/* \\n */:\n    case 0x21/* ! */:\n    case 0x23/* # */:\n    case 0x24/* $ */:\n    case 0x25/* % */:\n    case 0x26/* & */:\n    case 0x2A/* * */:\n    case 0x2B/* + */:\n    case 0x2D/* - */:\n    case 0x3A/* : */:\n    case 0x3C/* < */:\n    case 0x3D/* = */:\n    case 0x3E/* > */:\n    case 0x40/* @ */:\n    case 0x5B/* [ */:\n    case 0x5C/* \\ */:\n    case 0x5D/* ] */:\n    case 0x5E/* ^ */:\n    case 0x5F/* _ */:\n    case 0x60/* ` */:\n    case 0x7B/* { */:\n    case 0x7D/* } */:\n    case 0x7E/* ~ */:\n      return true\n    default:\n      return false\n  }\n}\n\nexport default function text (state, silent) {\n  let pos = state.pos\n\n  while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n    pos++\n  }\n\n  if (pos === state.pos) { return false }\n\n  if (!silent) { state.pending += state.src.slice(state.pos, pos) }\n\n  state.pos = pos\n\n  return true\n}\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParserInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n  var pos = state.pos,\n      idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n  // first char is terminator -> empty text\n  if (idx === 0) { return false; }\n\n  // no terminator -> text till end of string\n  if (idx < 0) {\n    if (!silent) { state.pending += state.src.slice(pos); }\n    state.pos = state.src.length;\n    return true;\n  }\n\n  if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n  state.pos += idx;\n\n  return true;\n}; */\n","// Process links like https://example.org/\n\n// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\nconst SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i\n\nexport default function linkify (state, silent) {\n  if (!state.md.options.linkify) return false\n  if (state.linkLevel > 0) return false\n\n  const pos = state.pos\n  const max = state.posMax\n\n  if (pos + 3 > max) return false\n  if (state.src.charCodeAt(pos) !== 0x3A/* : */) return false\n  if (state.src.charCodeAt(pos + 1) !== 0x2F/* / */) return false\n  if (state.src.charCodeAt(pos + 2) !== 0x2F/* / */) return false\n\n  const match = state.pending.match(SCHEME_RE)\n  if (!match) return false\n\n  const proto = match[1]\n\n  const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length))\n  if (!link) return false\n\n  let url = link.url\n\n  // invalid link, but still detected by linkify somehow;\n  // need to check to prevent infinite loop below\n  if (url.length <= proto.length) return false\n\n  // disallow '*' at the end of the link (conflicts with emphasis)\n  url = url.replace(/\\*+$/, '')\n\n  const fullUrl = state.md.normalizeLink(url)\n  if (!state.md.validateLink(fullUrl)) return false\n\n  if (!silent) {\n    state.pending = state.pending.slice(0, -proto.length)\n\n    const token_o = state.push('link_open', 'a', 1)\n    token_o.attrs = [['href', fullUrl]]\n    token_o.markup = 'linkify'\n    token_o.info = 'auto'\n\n    const token_t = state.push('text', '', 0)\n    token_t.content = state.md.normalizeLinkText(url)\n\n    const token_c = state.push('link_close', 'a', -1)\n    token_c.markup = 'linkify'\n    token_c.info = 'auto'\n  }\n\n  state.pos += url.length - proto.length\n  return true\n}\n","// Process escaped chars and hardbreaks\n\nimport { isSpace } from '../common/utils.mjs'\n\nconst ESCAPED = []\n\nfor (let i = 0; i < 256; i++) { ESCAPED.push(0) }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n  .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1 })\n\nexport default function escape (state, silent) {\n  let pos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) return false\n  pos++\n\n  // '\\' at the end of the inline block\n  if (pos >= max) return false\n\n  let ch1 = state.src.charCodeAt(pos)\n\n  if (ch1 === 0x0A) {\n    if (!silent) {\n      state.push('hardbreak', 'br', 0)\n    }\n\n    pos++\n    // skip leading whitespaces from next line\n    while (pos < max) {\n      ch1 = state.src.charCodeAt(pos)\n      if (!isSpace(ch1)) break\n      pos++\n    }\n\n    state.pos = pos\n    return true\n  }\n\n  let escapedStr = state.src[pos]\n\n  if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {\n    const ch2 = state.src.charCodeAt(pos + 1)\n\n    if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {\n      escapedStr += state.src[pos + 1]\n      pos++\n    }\n  }\n\n  const origStr = '\\\\' + escapedStr\n\n  if (!silent) {\n    const token = state.push('text_special', '', 0)\n\n    if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n      token.content = escapedStr\n    } else {\n      token.content = origStr\n    }\n\n    token.markup = origStr\n    token.info   = 'escape'\n  }\n\n  state.pos = pos + 1\n  return true\n}\n","// ~~strike through~~\n//\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nfunction strikethrough_tokenize (state, silent) {\n  const start = state.pos\n  const marker = state.src.charCodeAt(start)\n\n  if (silent) { return false }\n\n  if (marker !== 0x7E/* ~ */) { return false }\n\n  const scanned = state.scanDelims(state.pos, true)\n  let len = scanned.length\n  const ch = String.fromCharCode(marker)\n\n  if (len < 2) { return false }\n\n  let token\n\n  if (len % 2) {\n    token         = state.push('text', '', 0)\n    token.content = ch\n    len--\n  }\n\n  for (let i = 0; i < len; i += 2) {\n    token         = state.push('text', '', 0)\n    token.content = ch + ch\n\n    state.delimiters.push({\n      marker,\n      length: 0,     // disable \"rule of 3\" length checks meant for emphasis\n      token: state.tokens.length - 1,\n      end: -1,\n      open: scanned.can_open,\n      close: scanned.can_close\n    })\n  }\n\n  state.pos += scanned.length\n\n  return true\n}\n\nfunction postProcess (state, delimiters) {\n  let token\n  const loneMarkers = []\n  const max = delimiters.length\n\n  for (let i = 0; i < max; i++) {\n    const startDelim = delimiters[i]\n\n    if (startDelim.marker !== 0x7E/* ~ */) {\n      continue\n    }\n\n    if (startDelim.end === -1) {\n      continue\n    }\n\n    const endDelim = delimiters[startDelim.end]\n\n    token         = state.tokens[startDelim.token]\n    token.type    = 's_open'\n    token.tag     = 's'\n    token.nesting = 1\n    token.markup  = '~~'\n    token.content = ''\n\n    token         = state.tokens[endDelim.token]\n    token.type    = 's_close'\n    token.tag     = 's'\n    token.nesting = -1\n    token.markup  = '~~'\n    token.content = ''\n\n    if (state.tokens[endDelim.token - 1].type === 'text' &&\n        state.tokens[endDelim.token - 1].content === '~') {\n      loneMarkers.push(endDelim.token - 1)\n    }\n  }\n\n  // If a marker sequence has an odd number of characters, it's splitted\n  // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n  // start of the sequence.\n  //\n  // So, we have to move all those markers after subsequent s_close tags.\n  //\n  while (loneMarkers.length) {\n    const i = loneMarkers.pop()\n    let j = i + 1\n\n    while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n      j++\n    }\n\n    j--\n\n    if (i !== j) {\n      token = state.tokens[j]\n      state.tokens[j] = state.tokens[i]\n      state.tokens[i] = token\n    }\n  }\n}\n\n// Walk through delimiter list and replace text tokens with tags\n//\nfunction strikethrough_postProcess (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  postProcess(state, state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      postProcess(state, tokens_meta[curr].delimiters)\n    }\n  }\n}\n\nexport default {\n  tokenize: strikethrough_tokenize,\n  postProcess: strikethrough_postProcess\n}\n","// Process *this* and _that_\n//\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nfunction emphasis_tokenize (state, silent) {\n  const start = state.pos\n  const marker = state.src.charCodeAt(start)\n\n  if (silent) { return false }\n\n  if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false }\n\n  const scanned = state.scanDelims(state.pos, marker === 0x2A)\n\n  for (let i = 0; i < scanned.length; i++) {\n    const token = state.push('text', '', 0)\n    token.content = String.fromCharCode(marker)\n\n    state.delimiters.push({\n      // Char code of the starting marker (number).\n      //\n      marker,\n\n      // Total length of these series of delimiters.\n      //\n      length: scanned.length,\n\n      // A position of the token this delimiter corresponds to.\n      //\n      token: state.tokens.length - 1,\n\n      // If this delimiter is matched as a valid opener, `end` will be\n      // equal to its position, otherwise it's `-1`.\n      //\n      end: -1,\n\n      // Boolean flags that determine if this delimiter could open or close\n      // an emphasis.\n      //\n      open: scanned.can_open,\n      close: scanned.can_close\n    })\n  }\n\n  state.pos += scanned.length\n\n  return true\n}\n\nfunction postProcess (state, delimiters) {\n  const max = delimiters.length\n\n  for (let i = max - 1; i >= 0; i--) {\n    const startDelim = delimiters[i]\n\n    if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n      continue\n    }\n\n    // Process only opening markers\n    if (startDelim.end === -1) {\n      continue\n    }\n\n    const endDelim = delimiters[startDelim.end]\n\n    // If the previous delimiter has the same marker and is adjacent to this one,\n    // merge those into one strong delimiter.\n    //\n    // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`\n    //\n    const isStrong = i > 0 &&\n               delimiters[i - 1].end === startDelim.end + 1 &&\n               // check that first two markers match and adjacent\n               delimiters[i - 1].marker === startDelim.marker &&\n               delimiters[i - 1].token === startDelim.token - 1 &&\n               // check that last two markers are adjacent (we can safely assume they match)\n               delimiters[startDelim.end + 1].token === endDelim.token + 1\n\n    const ch = String.fromCharCode(startDelim.marker)\n\n    const token_o   = state.tokens[startDelim.token]\n    token_o.type    = isStrong ? 'strong_open' : 'em_open'\n    token_o.tag     = isStrong ? 'strong' : 'em'\n    token_o.nesting = 1\n    token_o.markup  = isStrong ? ch + ch : ch\n    token_o.content = ''\n\n    const token_c   = state.tokens[endDelim.token]\n    token_c.type    = isStrong ? 'strong_close' : 'em_close'\n    token_c.tag     = isStrong ? 'strong' : 'em'\n    token_c.nesting = -1\n    token_c.markup  = isStrong ? ch + ch : ch\n    token_c.content = ''\n\n    if (isStrong) {\n      state.tokens[delimiters[i - 1].token].content = ''\n      state.tokens[delimiters[startDelim.end + 1].token].content = ''\n      i--\n    }\n  }\n}\n\n// Walk through delimiter list and replace text tokens with tags\n//\nfunction emphasis_post_process (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  postProcess(state, state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      postProcess(state, tokens_meta[curr].delimiters)\n    }\n  }\n}\n\nexport default {\n  tokenize: emphasis_tokenize,\n  postProcess: emphasis_post_process\n}\n","// Process autolinks '<protocol:...>'\n\n/* eslint max-len:0 */\nconst EMAIL_RE    = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/\n/* eslint-disable-next-line no-control-regex */\nconst AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\\x00-\\x20]*)$/\n\nexport default function autolink (state, silent) {\n  let pos = state.pos\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false }\n\n  const start = state.pos\n  const max = state.posMax\n\n  for (;;) {\n    if (++pos >= max) return false\n\n    const ch = state.src.charCodeAt(pos)\n\n    if (ch === 0x3C /* < */) return false\n    if (ch === 0x3E /* > */) break\n  }\n\n  const url = state.src.slice(start + 1, pos)\n\n  if (AUTOLINK_RE.test(url)) {\n    const fullUrl = state.md.normalizeLink(url)\n    if (!state.md.validateLink(fullUrl)) { return false }\n\n    if (!silent) {\n      const token_o   = state.push('link_open', 'a', 1)\n      token_o.attrs   = [['href', fullUrl]]\n      token_o.markup  = 'autolink'\n      token_o.info    = 'auto'\n\n      const token_t   = state.push('text', '', 0)\n      token_t.content = state.md.normalizeLinkText(url)\n\n      const token_c   = state.push('link_close', 'a', -1)\n      token_c.markup  = 'autolink'\n      token_c.info    = 'auto'\n    }\n\n    state.pos += url.length + 2\n    return true\n  }\n\n  if (EMAIL_RE.test(url)) {\n    const fullUrl = state.md.normalizeLink('mailto:' + url)\n    if (!state.md.validateLink(fullUrl)) { return false }\n\n    if (!silent) {\n      const token_o   = state.push('link_open', 'a', 1)\n      token_o.attrs   = [['href', fullUrl]]\n      token_o.markup  = 'autolink'\n      token_o.info    = 'auto'\n\n      const token_t   = state.push('text', '', 0)\n      token_t.content = state.md.normalizeLinkText(url)\n\n      const token_c   = state.push('link_close', 'a', -1)\n      token_c.markup  = 'autolink'\n      token_c.info    = 'auto'\n    }\n\n    state.pos += url.length + 2\n    return true\n  }\n\n  return false\n}\n","// Process html entity - &#123;, &#xAF;, &quot;, ...\n\nimport { decodeHTML } from 'entities'\nimport { isValidEntityCode, fromCodePoint } from '../common/utils.mjs'\n\nconst DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i\nconst NAMED_RE   = /^&([a-z][a-z0-9]{1,31});/i\n\nexport default function entity (state, silent) {\n  const pos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(pos) !== 0x26/* & */) return false\n\n  if (pos + 1 >= max) return false\n\n  const ch = state.src.charCodeAt(pos + 1)\n\n  if (ch === 0x23 /* # */) {\n    const match = state.src.slice(pos).match(DIGITAL_RE)\n    if (match) {\n      if (!silent) {\n        const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10)\n\n        const token   = state.push('text_special', '', 0)\n        token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD)\n        token.markup  = match[0]\n        token.info    = 'entity'\n      }\n      state.pos += match[0].length\n      return true\n    }\n  } else {\n    const match = state.src.slice(pos).match(NAMED_RE)\n    if (match) {\n      const decoded = decodeHTML(match[0])\n      if (decoded !== match[0]) {\n        if (!silent) {\n          const token   = state.push('text_special', '', 0)\n          token.content = decoded\n          token.markup  = match[0]\n          token.info    = 'entity'\n        }\n        state.pos += match[0].length\n        return true\n      }\n    }\n  }\n\n  return false\n}\n","// For each opening emphasis-like marker find a matching closing one\n//\n\nfunction processDelimiters (delimiters) {\n  const openersBottom = {}\n  const max = delimiters.length\n\n  if (!max) return\n\n  // headerIdx is the first delimiter of the current (where closer is) delimiter run\n  let headerIdx = 0\n  let lastTokenIdx = -2 // needs any value lower than -1\n  const jumps = []\n\n  for (let closerIdx = 0; closerIdx < max; closerIdx++) {\n    const closer = delimiters[closerIdx]\n\n    jumps.push(0)\n\n    // markers belong to same delimiter run if:\n    //  - they have adjacent tokens\n    //  - AND markers are the same\n    //\n    if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {\n      headerIdx = closerIdx\n    }\n\n    lastTokenIdx = closer.token\n\n    // Length is only used for emphasis-specific \"rule of 3\",\n    // if it's not defined (in strikethrough or 3rd party plugins),\n    // we can default it to 0 to disable those checks.\n    //\n    closer.length = closer.length || 0\n\n    if (!closer.close) continue\n\n    // Previously calculated lower bounds (previous fails)\n    // for each marker, each delimiter length modulo 3,\n    // and for whether this closer can be an opener;\n    // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460\n    /* eslint-disable-next-line no-prototype-builtins */\n    if (!openersBottom.hasOwnProperty(closer.marker)) {\n      openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]\n    }\n\n    const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)]\n\n    let openerIdx = headerIdx - jumps[headerIdx] - 1\n\n    let newMinOpenerIdx = openerIdx\n\n    for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n      const opener = delimiters[openerIdx]\n\n      if (opener.marker !== closer.marker) continue\n\n      if (opener.open && opener.end < 0) {\n        let isOddMatch = false\n\n        // from spec:\n        //\n        // If one of the delimiters can both open and close emphasis, then the\n        // sum of the lengths of the delimiter runs containing the opening and\n        // closing delimiters must not be a multiple of 3 unless both lengths\n        // are multiples of 3.\n        //\n        if (opener.close || closer.open) {\n          if ((opener.length + closer.length) % 3 === 0) {\n            if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n              isOddMatch = true\n            }\n          }\n        }\n\n        if (!isOddMatch) {\n          // If previous delimiter cannot be an opener, we can safely skip\n          // the entire sequence in future checks. This is required to make\n          // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n          //\n          const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open\n            ? jumps[openerIdx - 1] + 1\n            : 0\n\n          jumps[closerIdx] = closerIdx - openerIdx + lastJump\n          jumps[openerIdx] = lastJump\n\n          closer.open  = false\n          opener.end   = closerIdx\n          opener.close = false\n          newMinOpenerIdx = -1\n          // treat next token as start of run,\n          // it optimizes skips in **<...>**a**<...>** pathological case\n          lastTokenIdx = -2\n          break\n        }\n      }\n    }\n\n    if (newMinOpenerIdx !== -1) {\n      // If match for this delimiter run failed, we want to set lower bound for\n      // future lookups. This is required to make sure algorithm has linear\n      // complexity.\n      //\n      // See details here:\n      // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n      //\n      openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx\n    }\n  }\n}\n\nexport default function link_pairs (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  processDelimiters(state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      processDelimiters(tokens_meta[curr].delimiters)\n    }\n  }\n}\n","/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateInline from './rules_inline/state_inline.mjs'\n\nimport r_text from './rules_inline/text.mjs'\nimport r_linkify from './rules_inline/linkify.mjs'\nimport r_newline from './rules_inline/newline.mjs'\nimport r_escape from './rules_inline/escape.mjs'\nimport r_backticks from './rules_inline/backticks.mjs'\nimport r_strikethrough from './rules_inline/strikethrough.mjs'\nimport r_emphasis from './rules_inline/emphasis.mjs'\nimport r_link from './rules_inline/link.mjs'\nimport r_image from './rules_inline/image.mjs'\nimport r_autolink from './rules_inline/autolink.mjs'\nimport r_html_inline from './rules_inline/html_inline.mjs'\nimport r_entity from './rules_inline/entity.mjs'\n\nimport r_balance_pairs from './rules_inline/balance_pairs.mjs'\nimport r_fragments_join from './rules_inline/fragments_join.mjs'\n\n// Parser rules\n\nconst _rules = [\n  ['text',            r_text],\n  ['linkify',         r_linkify],\n  ['newline',         r_newline],\n  ['escape',          r_escape],\n  ['backticks',       r_backticks],\n  ['strikethrough',   r_strikethrough.tokenize],\n  ['emphasis',        r_emphasis.tokenize],\n  ['link',            r_link],\n  ['image',           r_image],\n  ['autolink',        r_autolink],\n  ['html_inline',     r_html_inline],\n  ['entity',          r_entity]\n]\n\n// `rule2` ruleset was created specifically for emphasis/strikethrough\n// post-processing and may be changed in the future.\n//\n// Don't use this for anything except pairs (plugins working with `balance_pairs`).\n//\nconst _rules2 = [\n  ['balance_pairs',   r_balance_pairs],\n  ['strikethrough',   r_strikethrough.postProcess],\n  ['emphasis',        r_emphasis.postProcess],\n  // rules for pairs separate '**' into its own text tokens, which may be left unused,\n  // rule below merges unused segments back with the rest of the text\n  ['fragments_join',  r_fragments_join]\n]\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline () {\n  /**\n   * ParserInline#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of inline rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1])\n  }\n\n  /**\n   * ParserInline#ruler2 -> Ruler\n   *\n   * [[Ruler]] instance. Second ruler used for post-processing\n   * (e.g. in emphasis-like rules).\n   **/\n  this.ruler2 = new Ruler()\n\n  for (let i = 0; i < _rules2.length; i++) {\n    this.ruler2.push(_rules2[i][0], _rules2[i][1])\n  }\n}\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n  const pos = state.pos\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const maxNesting = state.md.options.maxNesting\n  const cache = state.cache\n\n  if (typeof cache[pos] !== 'undefined') {\n    state.pos = cache[pos]\n    return\n  }\n\n  let ok = false\n\n  if (state.level < maxNesting) {\n    for (let i = 0; i < len; i++) {\n      // Increment state.level and decrement it later to limit recursion.\n      // It's harmless to do here, because no tokens are created. But ideally,\n      // we'd need a separate private state variable for this purpose.\n      //\n      state.level++\n      ok = rules[i](state, true)\n      state.level--\n\n      if (ok) {\n        if (pos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\") }\n        break\n      }\n    }\n  } else {\n    // Too much nesting, just skip until the end of the paragraph.\n    //\n    // NOTE: this will cause links to behave incorrectly in the following case,\n    //       when an amount of `[` is exactly equal to `maxNesting + 1`:\n    //\n    //       [[[[[[[[[[[[[[[[[[[[[foo]()\n    //\n    // TODO: remove this workaround when CM standard will allow nested links\n    //       (we can replace it by preventing links from being parsed in\n    //       validation mode)\n    //\n    state.pos = state.posMax\n  }\n\n  if (!ok) { state.pos++ }\n  cache[pos] = state.pos\n}\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const end = state.posMax\n  const maxNesting = state.md.options.maxNesting\n\n  while (state.pos < end) {\n    // Try all possible rules.\n    // On success, rule should:\n    //\n    // - update `state.pos`\n    // - update `state.tokens`\n    // - return true\n    const prevPos = state.pos\n    let ok = false\n\n    if (state.level < maxNesting) {\n      for (let i = 0; i < len; i++) {\n        ok = rules[i](state, false)\n        if (ok) {\n          if (prevPos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\") }\n          break\n        }\n      }\n    }\n\n    if (ok) {\n      if (state.pos >= end) { break }\n      continue\n    }\n\n    state.pending += state.src[state.pos++]\n  }\n\n  if (state.pending) {\n    state.pushPending()\n  }\n}\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n  const state = new this.State(str, md, env, outTokens)\n\n  this.tokenize(state)\n\n  const rules = this.ruler2.getRules('')\n  const len = rules.length\n\n  for (let i = 0; i < len; i++) {\n    rules[i](state)\n  }\n}\n\nParserInline.prototype.State = StateInline\n\nexport default ParserInline\n","// Proceess '\\n'\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function newline (state, silent) {\n  let pos = state.pos\n\n  if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false }\n\n  const pmax = state.pending.length - 1\n  const max = state.posMax\n\n  // '  \\n' -> hardbreak\n  // Lookup in pending chars is bad practice! Don't copy to other rules!\n  // Pending string is stored in concat mode, indexed lookups will cause\n  // convertion to flat mode.\n  if (!silent) {\n    if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n      if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n        // Find whitespaces tail of pending chars.\n        let ws = pmax - 1\n        while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--\n\n        state.pending = state.pending.slice(0, ws)\n        state.push('hardbreak', 'br', 0)\n      } else {\n        state.pending = state.pending.slice(0, -1)\n        state.push('softbreak', 'br', 0)\n      }\n    } else {\n      state.push('softbreak', 'br', 0)\n    }\n  }\n\n  pos++\n\n  // skip heading spaces for next line\n  while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++ }\n\n  state.pos = pos\n  return true\n}\n","// Parse backticks\n\nexport default function backtick (state, silent) {\n  let pos = state.pos\n  const ch = state.src.charCodeAt(pos)\n\n  if (ch !== 0x60/* ` */) { return false }\n\n  const start = pos\n  pos++\n  const max = state.posMax\n\n  // scan marker length\n  while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++ }\n\n  const marker = state.src.slice(start, pos)\n  const openerLength = marker.length\n\n  if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n    if (!silent) state.pending += marker\n    state.pos += openerLength\n    return true\n  }\n\n  let matchEnd = pos\n  let matchStart\n\n  // Nothing found in the cache, scan until the end of the line (or until marker is found)\n  while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n    matchEnd = matchStart + 1\n\n    // scan marker length\n    while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++ }\n\n    const closerLength = matchEnd - matchStart\n\n    if (closerLength === openerLength) {\n      // Found matching closer length.\n      if (!silent) {\n        const token = state.push('code_inline', 'code', 0)\n        token.markup = marker\n        token.content = state.src.slice(pos, matchStart)\n          .replace(/\\n/g, ' ')\n          .replace(/^ (.+) $/, '$1')\n      }\n      state.pos = matchEnd\n      return true\n    }\n\n    // Some different length found, put it in cache as upper limit of where closer can be found\n    state.backticks[closerLength] = matchStart\n  }\n\n  // Scanned through the end, didn't find anything\n  state.backticksScanned = true\n\n  if (!silent) state.pending += marker\n  state.pos += openerLength\n  return true\n}\n","// Process [link](<to> \"stuff\")\n\nimport { normalizeReference, isSpace } from '../common/utils.mjs'\n\nexport default function link (state, silent) {\n  let code, label, res, ref\n  let href = ''\n  let title = ''\n  let start = state.pos\n  let parseReference = true\n\n  if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false }\n\n  const oldPos = state.pos\n  const max = state.posMax\n  const labelStart = state.pos + 1\n  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true)\n\n  // parser failed to find ']', so it's not a valid link\n  if (labelEnd < 0) { return false }\n\n  let pos = labelEnd + 1\n  if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n    //\n    // Inline link\n    //\n\n    // might have found a valid shortcut link, disable reference parsing\n    parseReference = false\n\n    // [link](  <href>  \"title\"  )\n    //        ^^ skipping these spaces\n    pos++\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n    if (pos >= max) { return false }\n\n    // [link](  <href>  \"title\"  )\n    //          ^^^^^^ parsing link destination\n    start = pos\n    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)\n    if (res.ok) {\n      href = state.md.normalizeLink(res.str)\n      if (state.md.validateLink(href)) {\n        pos = res.pos\n      } else {\n        href = ''\n      }\n\n      // [link](  <href>  \"title\"  )\n      //                ^^ skipping these spaces\n      start = pos\n      for (; pos < max; pos++) {\n        code = state.src.charCodeAt(pos)\n        if (!isSpace(code) && code !== 0x0A) { break }\n      }\n\n      // [link](  <href>  \"title\"  )\n      //                  ^^^^^^^ parsing link title\n      res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax)\n      if (pos < max && start !== pos && res.ok) {\n        title = res.str\n        pos = res.pos\n\n        // [link](  <href>  \"title\"  )\n        //                         ^^ skipping these spaces\n        for (; pos < max; pos++) {\n          code = state.src.charCodeAt(pos)\n          if (!isSpace(code) && code !== 0x0A) { break }\n        }\n      }\n    }\n\n    if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n      // parsing a valid shortcut link failed, fallback to reference\n      parseReference = true\n    }\n    pos++\n  }\n\n  if (parseReference) {\n    //\n    // Link reference\n    //\n    if (typeof state.env.references === 'undefined') { return false }\n\n    if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n      start = pos + 1\n      pos = state.md.helpers.parseLinkLabel(state, pos)\n      if (pos >= 0) {\n        label = state.src.slice(start, pos++)\n      } else {\n        pos = labelEnd + 1\n      }\n    } else {\n      pos = labelEnd + 1\n    }\n\n    // covers label === '' and label === undefined\n    // (collapsed reference link and shortcut reference link respectively)\n    if (!label) { label = state.src.slice(labelStart, labelEnd) }\n\n    ref = state.env.references[normalizeReference(label)]\n    if (!ref) {\n      state.pos = oldPos\n      return false\n    }\n    href = ref.href\n    title = ref.title\n  }\n\n  //\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    state.pos = labelStart\n    state.posMax = labelEnd\n\n    const token_o = state.push('link_open', 'a', 1)\n    const attrs = [['href', href]]\n    token_o.attrs  = attrs\n    if (title) {\n      attrs.push(['title', title])\n    }\n\n    state.linkLevel++\n    state.md.inline.tokenize(state)\n    state.linkLevel--\n\n    state.push('link_close', 'a', -1)\n  }\n\n  state.pos = pos\n  state.posMax = max\n  return true\n}\n","// Process ![image](<src> \"title\")\n\nimport { normalizeReference, isSpace } from '../common/utils.mjs'\n\nexport default function image (state, silent) {\n  let code, content, label, pos, ref, res, title, start\n  let href = ''\n  const oldPos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false }\n  if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false }\n\n  const labelStart = state.pos + 2\n  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false)\n\n  // parser failed to find ']', so it's not a valid link\n  if (labelEnd < 0) { return false }\n\n  pos = labelEnd + 1\n  if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n    //\n    // Inline link\n    //\n\n    // [link](  <href>  \"title\"  )\n    //        ^^ skipping these spaces\n    pos++\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n    if (pos >= max) { return false }\n\n    // [link](  <href>  \"title\"  )\n    //          ^^^^^^ parsing link destination\n    start = pos\n    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)\n    if (res.ok) {\n      href = state.md.normalizeLink(res.str)\n      if (state.md.validateLink(href)) {\n        pos = res.pos\n      } else {\n        href = ''\n      }\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                ^^ skipping these spaces\n    start = pos\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                  ^^^^^^^ parsing link title\n    res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax)\n    if (pos < max && start !== pos && res.ok) {\n      title = res.str\n      pos = res.pos\n\n      // [link](  <href>  \"title\"  )\n      //                         ^^ skipping these spaces\n      for (; pos < max; pos++) {\n        code = state.src.charCodeAt(pos)\n        if (!isSpace(code) && code !== 0x0A) { break }\n      }\n    } else {\n      title = ''\n    }\n\n    if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n      state.pos = oldPos\n      return false\n    }\n    pos++\n  } else {\n    //\n    // Link reference\n    //\n    if (typeof state.env.references === 'undefined') { return false }\n\n    if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n      start = pos + 1\n      pos = state.md.helpers.parseLinkLabel(state, pos)\n      if (pos >= 0) {\n        label = state.src.slice(start, pos++)\n      } else {\n        pos = labelEnd + 1\n      }\n    } else {\n      pos = labelEnd + 1\n    }\n\n    // covers label === '' and label === undefined\n    // (collapsed reference link and shortcut reference link respectively)\n    if (!label) { label = state.src.slice(labelStart, labelEnd) }\n\n    ref = state.env.references[normalizeReference(label)]\n    if (!ref) {\n      state.pos = oldPos\n      return false\n    }\n    href = ref.href\n    title = ref.title\n  }\n\n  //\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    content = state.src.slice(labelStart, labelEnd)\n\n    const tokens = []\n    state.md.inline.parse(\n      content,\n      state.md,\n      state.env,\n      tokens\n    )\n\n    const token = state.push('image', 'img', 0)\n    const attrs = [['src', href], ['alt', '']]\n    token.attrs = attrs\n    token.children = tokens\n    token.content = content\n\n    if (title) {\n      attrs.push(['title', title])\n    }\n  }\n\n  state.pos = pos\n  state.posMax = max\n  return true\n}\n","// Process html tags\n\nimport { HTML_TAG_RE } from '../common/html_re.mjs'\n\nfunction isLinkOpen (str) {\n  return /^<a[>\\s]/i.test(str)\n}\nfunction isLinkClose (str) {\n  return /^<\\/a\\s*>/i.test(str)\n}\n\nfunction isLetter (ch) {\n  /* eslint no-bitwise:0 */\n  const lc = ch | 0x20 // to lower case\n  return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */)\n}\n\nexport default function html_inline (state, silent) {\n  if (!state.md.options.html) { return false }\n\n  // Check start\n  const max = state.posMax\n  const pos = state.pos\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n      pos + 2 >= max) {\n    return false\n  }\n\n  // Quick fail on second char\n  const ch = state.src.charCodeAt(pos + 1)\n  if (ch !== 0x21/* ! */ &&\n      ch !== 0x3F/* ? */ &&\n      ch !== 0x2F/* / */ &&\n      !isLetter(ch)) {\n    return false\n  }\n\n  const match = state.src.slice(pos).match(HTML_TAG_RE)\n  if (!match) { return false }\n\n  if (!silent) {\n    const token = state.push('html_inline', '', 0)\n    token.content = match[0]\n\n    if (isLinkOpen(token.content))  state.linkLevel++\n    if (isLinkClose(token.content)) state.linkLevel--\n  }\n  state.pos += match[0].length\n  return true\n}\n","// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n\nexport default function fragments_join (state) {\n  let curr, last\n  let level = 0\n  const tokens = state.tokens\n  const max = state.tokens.length\n\n  for (curr = last = 0; curr < max; curr++) {\n    // re-calculate levels after emphasis/strikethrough turns some text nodes\n    // into opening/closing tags\n    if (tokens[curr].nesting < 0) level-- // closing tag\n    tokens[curr].level = level\n    if (tokens[curr].nesting > 0) level++ // opening tag\n\n    if (tokens[curr].type === 'text' &&\n        curr + 1 < max &&\n        tokens[curr + 1].type === 'text') {\n      // collapse two adjacent text nodes\n      tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content\n    } else {\n      if (curr !== last) { tokens[last] = tokens[curr] }\n\n      last++\n    }\n  }\n\n  if (curr !== last) {\n    tokens.length = last\n  }\n}\n","import reFactory from './lib/re.mjs'\n\n//\n// Helpers\n//\n\n// Merge objects\n//\nfunction assign (obj /* from1, from2, from3, ... */) {\n  const sources = Array.prototype.slice.call(arguments, 1)\n\n  sources.forEach(function (source) {\n    if (!source) { return }\n\n    Object.keys(source).forEach(function (key) {\n      obj[key] = source[key]\n    })\n  })\n\n  return obj\n}\n\nfunction _class (obj) { return Object.prototype.toString.call(obj) }\nfunction isString (obj) { return _class(obj) === '[object String]' }\nfunction isObject (obj) { return _class(obj) === '[object Object]' }\nfunction isRegExp (obj) { return _class(obj) === '[object RegExp]' }\nfunction isFunction (obj) { return _class(obj) === '[object Function]' }\n\nfunction escapeRE (str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&') }\n\n//\n\nconst defaultOptions = {\n  fuzzyLink: true,\n  fuzzyEmail: true,\n  fuzzyIP: false\n}\n\nfunction isOptionsObj (obj) {\n  return Object.keys(obj || {}).reduce(function (acc, k) {\n    /* eslint-disable-next-line no-prototype-builtins */\n    return acc || defaultOptions.hasOwnProperty(k)\n  }, false)\n}\n\nconst defaultSchemas = {\n  'http:': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.http) {\n        // compile lazily, because \"host\"-containing variables can change on tlds update.\n        self.re.http = new RegExp(\n          '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n        )\n      }\n      if (self.re.http.test(tail)) {\n        return tail.match(self.re.http)[0].length\n      }\n      return 0\n    }\n  },\n  'https:': 'http:',\n  'ftp:': 'http:',\n  '//': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.no_http) {\n      // compile lazily, because \"host\"-containing variables can change on tlds update.\n        self.re.no_http = new RegExp(\n          '^' +\n          self.re.src_auth +\n          // Don't allow single-level domains, because of false positives like '//test'\n          // with code comments\n          '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n          self.re.src_port +\n          self.re.src_host_terminator +\n          self.re.src_path,\n\n          'i'\n        )\n      }\n\n      if (self.re.no_http.test(tail)) {\n        // should not be `://` & `///`, that protects from errors in protocol name\n        if (pos >= 3 && text[pos - 3] === ':') { return 0 }\n        if (pos >= 3 && text[pos - 3] === '/') { return 0 }\n        return tail.match(self.re.no_http)[0].length\n      }\n      return 0\n    }\n  },\n  'mailto:': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.mailto) {\n        self.re.mailto = new RegExp(\n          '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n        )\n      }\n      if (self.re.mailto.test(tail)) {\n        return tail.match(self.re.mailto)[0].length\n      }\n      return 0\n    }\n  }\n}\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\n/* eslint-disable-next-line max-len */\nconst tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nconst tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|')\n\nfunction resetScanCache (self) {\n  self.__index__ = -1\n  self.__text_cache__ = ''\n}\n\nfunction createValidator (re) {\n  return function (text, pos) {\n    const tail = text.slice(pos)\n\n    if (re.test(tail)) {\n      return tail.match(re)[0].length\n    }\n    return 0\n  }\n}\n\nfunction createNormalizer () {\n  return function (match, self) {\n    self.normalize(match)\n  }\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile (self) {\n  // Load & clone RE patterns.\n  const re = self.re = reFactory(self.__opts__)\n\n  // Define dynamic patterns\n  const tlds = self.__tlds__.slice()\n\n  self.onCompile()\n\n  if (!self.__tlds_replaced__) {\n    tlds.push(tlds_2ch_src_re)\n  }\n  tlds.push(re.src_xn)\n\n  re.src_tlds = tlds.join('|')\n\n  function untpl (tpl) { return tpl.replace('%TLDS%', re.src_tlds) }\n\n  re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i')\n  re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i')\n  re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i')\n  re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i')\n\n  //\n  // Compile each schema\n  //\n\n  const aliases = []\n\n  self.__compiled__ = {} // Reset compiled data\n\n  function schemaError (name, val) {\n    throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val)\n  }\n\n  Object.keys(self.__schemas__).forEach(function (name) {\n    const val = self.__schemas__[name]\n\n    // skip disabled methods\n    if (val === null) { return }\n\n    const compiled = { validate: null, link: null }\n\n    self.__compiled__[name] = compiled\n\n    if (isObject(val)) {\n      if (isRegExp(val.validate)) {\n        compiled.validate = createValidator(val.validate)\n      } else if (isFunction(val.validate)) {\n        compiled.validate = val.validate\n      } else {\n        schemaError(name, val)\n      }\n\n      if (isFunction(val.normalize)) {\n        compiled.normalize = val.normalize\n      } else if (!val.normalize) {\n        compiled.normalize = createNormalizer()\n      } else {\n        schemaError(name, val)\n      }\n\n      return\n    }\n\n    if (isString(val)) {\n      aliases.push(name)\n      return\n    }\n\n    schemaError(name, val)\n  })\n\n  //\n  // Compile postponed aliases\n  //\n\n  aliases.forEach(function (alias) {\n    if (!self.__compiled__[self.__schemas__[alias]]) {\n      // Silently fail on missed schemas to avoid errons on disable.\n      // schemaError(alias, self.__schemas__[alias]);\n      return\n    }\n\n    self.__compiled__[alias].validate =\n      self.__compiled__[self.__schemas__[alias]].validate\n    self.__compiled__[alias].normalize =\n      self.__compiled__[self.__schemas__[alias]].normalize\n  })\n\n  //\n  // Fake record for guessed links\n  //\n  self.__compiled__[''] = { validate: null, normalize: createNormalizer() }\n\n  //\n  // Build schema condition\n  //\n  const slist = Object.keys(self.__compiled__)\n    .filter(function (name) {\n      // Filter disabled & fake schemas\n      return name.length > 0 && self.__compiled__[name]\n    })\n    .map(escapeRE)\n    .join('|')\n  // (?!_) cause 1.5x slowdown\n  self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i')\n  self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig')\n  self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i')\n\n  self.re.pretest = RegExp(\n    '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n    'i'\n  )\n\n  //\n  // Cleanup\n  //\n\n  resetScanCache(self)\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match (self, shift) {\n  const start = self.__index__\n  const end = self.__last_index__\n  const text = self.__text_cache__.slice(start, end)\n\n  /**\n   * Match#schema -> String\n   *\n   * Prefix (protocol) for matched string.\n   **/\n  this.schema = self.__schema__.toLowerCase()\n  /**\n   * Match#index -> Number\n   *\n   * First position of matched string.\n   **/\n  this.index = start + shift\n  /**\n   * Match#lastIndex -> Number\n   *\n   * Next position after matched string.\n   **/\n  this.lastIndex = end + shift\n  /**\n   * Match#raw -> String\n   *\n   * Matched string.\n   **/\n  this.raw = text\n  /**\n   * Match#text -> String\n   *\n   * Notmalized text of matched string.\n   **/\n  this.text = text\n  /**\n   * Match#url -> String\n   *\n   * Normalized url of matched string.\n   **/\n  this.url = text\n}\n\nfunction createMatch (self, shift) {\n  const match = new Match(self, shift)\n\n  self.__compiled__[match.schema].normalize(match, self)\n\n  return match\n}\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n *   for example). `linkify-it` makes shure that prefix is not preceeded with\n *   alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n *   - _String_ - just alias to existing rule\n *   - _Object_\n *     - _validate_ - validator function (should return matched length on success),\n *       or `RegExp`.\n *     - _normalize_ - optional function to normalize text & url of matched result\n *       (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n *   like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt (schemas, options) {\n  if (!(this instanceof LinkifyIt)) {\n    return new LinkifyIt(schemas, options)\n  }\n\n  if (!options) {\n    if (isOptionsObj(schemas)) {\n      options = schemas\n      schemas = {}\n    }\n  }\n\n  this.__opts__ = assign({}, defaultOptions, options)\n\n  // Cache last tested result. Used to skip repeating steps on next `match` call.\n  this.__index__ = -1\n  this.__last_index__ = -1 // Next scan position\n  this.__schema__ = ''\n  this.__text_cache__ = ''\n\n  this.__schemas__ = assign({}, defaultSchemas, schemas)\n  this.__compiled__ = {}\n\n  this.__tlds__ = tlds_default\n  this.__tlds_replaced__ = false\n\n  this.re = {}\n\n  compile(this)\n}\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add (schema, definition) {\n  this.__schemas__[schema] = definition\n  compile(this)\n  return this\n}\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set (options) {\n  this.__opts__ = assign(this.__opts__, options)\n  return this\n}\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test (text) {\n  // Reset scan cache\n  this.__text_cache__ = text\n  this.__index__ = -1\n\n  if (!text.length) { return false }\n\n  let m, ml, me, len, shift, next, re, tld_pos, at_pos\n\n  // try to scan for link with schema - that's the most simple rule\n  if (this.re.schema_test.test(text)) {\n    re = this.re.schema_search\n    re.lastIndex = 0\n    while ((m = re.exec(text)) !== null) {\n      len = this.testSchemaAt(text, m[2], re.lastIndex)\n      if (len) {\n        this.__schema__ = m[2]\n        this.__index__ = m.index + m[1].length\n        this.__last_index__ = m.index + m[0].length + len\n        break\n      }\n    }\n  }\n\n  if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n    // guess schemaless links\n    tld_pos = text.search(this.re.host_fuzzy_test)\n    if (tld_pos >= 0) {\n      // if tld is located after found link - no need to check fuzzy pattern\n      if (this.__index__ < 0 || tld_pos < this.__index__) {\n        if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n          shift = ml.index + ml[1].length\n\n          if (this.__index__ < 0 || shift < this.__index__) {\n            this.__schema__ = ''\n            this.__index__ = shift\n            this.__last_index__ = ml.index + ml[0].length\n          }\n        }\n      }\n    }\n  }\n\n  if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n    // guess schemaless emails\n    at_pos = text.indexOf('@')\n    if (at_pos >= 0) {\n      // We can't skip this check, because this cases are possible:\n      // 192.168.1.1@gmail.com, my.in@example.com\n      if ((me = text.match(this.re.email_fuzzy)) !== null) {\n        shift = me.index + me[1].length\n        next = me.index + me[0].length\n\n        if (this.__index__ < 0 || shift < this.__index__ ||\n            (shift === this.__index__ && next > this.__last_index__)) {\n          this.__schema__ = 'mailto:'\n          this.__index__ = shift\n          this.__last_index__ = next\n        }\n      }\n    }\n  }\n\n  return this.__index__ >= 0\n}\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest (text) {\n  return this.re.pretest.test(text)\n}\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt (text, schema, pos) {\n  // If not supported schema check requested - terminate\n  if (!this.__compiled__[schema.toLowerCase()]) {\n    return 0\n  }\n  return this.__compiled__[schema.toLowerCase()].validate(text, pos, this)\n}\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n *   protocol-neutral  links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match (text) {\n  const result = []\n  let shift = 0\n\n  // Try to take previous element from cache, if .test() called before\n  if (this.__index__ >= 0 && this.__text_cache__ === text) {\n    result.push(createMatch(this, shift))\n    shift = this.__last_index__\n  }\n\n  // Cut head if cache was used\n  let tail = shift ? text.slice(shift) : text\n\n  // Scan string until end reached\n  while (this.test(tail)) {\n    result.push(createMatch(this, shift))\n\n    tail = tail.slice(this.__last_index__)\n    shift += this.__last_index__\n  }\n\n  if (result.length) {\n    return result\n  }\n\n  return null\n}\n\n/**\n * LinkifyIt#matchAtStart(text) -> Match|null\n *\n * Returns fully-formed (not fuzzy) link if it starts at the beginning\n * of the string, and null otherwise.\n **/\nLinkifyIt.prototype.matchAtStart = function matchAtStart (text) {\n  // Reset scan cache\n  this.__text_cache__ = text\n  this.__index__ = -1\n\n  if (!text.length) return null\n\n  const m = this.re.schema_at_start.exec(text)\n  if (!m) return null\n\n  const len = this.testSchemaAt(text, m[2], m[0].length)\n  if (!len) return null\n\n  this.__schema__ = m[2]\n  this.__index__ = m.index + m[1].length\n  this.__last_index__ = m.index + m[0].length + len\n\n  return createMatch(this, 0)\n}\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n *   are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds (list, keepOld) {\n  list = Array.isArray(list) ? list : [list]\n\n  if (!keepOld) {\n    this.__tlds__ = list.slice()\n    this.__tlds_replaced__ = true\n    compile(this)\n    return this\n  }\n\n  this.__tlds__ = this.__tlds__.concat(list)\n    .sort()\n    .filter(function (el, idx, arr) {\n      return el !== arr[idx - 1]\n    })\n    .reverse()\n\n  compile(this)\n  return this\n}\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize (match) {\n  // Do minimal possible changes by default. Need to collect feedback prior\n  // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n  if (!match.schema) { match.url = 'http://' + match.url }\n\n  if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n    match.url = 'mailto:' + match.url\n  }\n}\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile () {\n}\n\nexport default LinkifyIt\n","import { Any, Cc, Z, P } from 'uc.micro'\n\nexport default function (opts) {\n  const re = {}\n  opts = opts || {}\n\n  re.src_Any = Any.source\n  re.src_Cc = Cc.source\n  re.src_Z = Z.source\n  re.src_P = P.source\n\n  // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n  re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|')\n\n  // \\p{\\Z\\Cc} (white spaces + control)\n  re.src_ZCc = [re.src_Z, re.src_Cc].join('|')\n\n  // Experimental. List of chars, completely prohibited in links\n  // because can separate it from other part of text\n  const text_separators = '[><\\uff5c]'\n\n  // All possible word characters (everything without punctuation, spaces & controls)\n  // Defined via punctuation & spaces to save space\n  // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n  re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'\n  // The same as abothe but without [0-9]\n  // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n  re.src_ip4 =\n\n    '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'\n\n  // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n  re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?'\n\n  re.src_port =\n\n    '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?'\n\n  re.src_host_terminator =\n\n    '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +\n    '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))'\n\n  re.src_path =\n\n    '(?:' +\n      '[/?#]' +\n        '(?:' +\n          '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-;]).|' +\n          '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n          '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n          '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n          '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n          \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n\n          // allow `I'm_king` if no pair found\n          \"\\\\'(?=\" + re.src_pseudo_letter + '|[-])|' +\n\n          // google has many dots in \"google search\" links (#66, #81).\n          // github has ... in commit range links,\n          // Restrict to\n          // - english\n          // - percent-encoded\n          // - parts of file path\n          // - params separator\n          // until more examples found.\n          '\\\\.{2,}[a-zA-Z0-9%/&]|' +\n\n          '\\\\.(?!' + re.src_ZCc + '|[.]|$)|' +\n          (opts['---']\n            ? '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n            : '\\\\-+|'\n          ) +\n          // allow `,,,` in paths\n          ',(?!' + re.src_ZCc + '|$)|' +\n\n          // allow `;` if not followed by space-like char\n          ';(?!' + re.src_ZCc + '|$)|' +\n\n          // allow `!!!` in paths, but not at the end\n          '\\\\!+(?!' + re.src_ZCc + '|[!]|$)|' +\n\n          '\\\\?(?!' + re.src_ZCc + '|[?]|$)' +\n        ')+' +\n      '|\\\\/' +\n    ')?'\n\n  // Allow anything in markdown spec, forbid quote (\") at the first position\n  // because emails enclosed in quotes are far more common\n  re.src_email_name =\n\n    '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*'\n\n  re.src_xn =\n\n    'xn--[a-z0-9\\\\-]{1,59}'\n\n  // More to read about domain names\n  // http://serverfault.com/questions/638260/\n\n  re.src_domain_root =\n\n    // Allow letters & digits (http://test1)\n    '(?:' +\n      re.src_xn +\n      '|' +\n      re.src_pseudo_letter + '{1,63}' +\n    ')'\n\n  re.src_domain =\n\n    '(?:' +\n      re.src_xn +\n      '|' +\n      '(?:' + re.src_pseudo_letter + ')' +\n      '|' +\n      '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n    ')'\n\n  re.src_host =\n\n    '(?:' +\n    // Don't need IP check, because digits are already allowed in normal domain names\n    //   src_ip4 +\n    // '|' +\n      '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/* _root */ + ')' +\n    ')'\n\n  re.tpl_host_fuzzy =\n\n    '(?:' +\n      re.src_ip4 +\n    '|' +\n      '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n    ')'\n\n  re.tpl_host_no_ip_fuzzy =\n\n    '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))'\n\n  re.src_host_strict =\n\n    re.src_host + re.src_host_terminator\n\n  re.tpl_host_fuzzy_strict =\n\n    re.tpl_host_fuzzy + re.src_host_terminator\n\n  re.src_host_port_strict =\n\n    re.src_host + re.src_port + re.src_host_terminator\n\n  re.tpl_host_port_fuzzy_strict =\n\n    re.tpl_host_fuzzy + re.src_port + re.src_host_terminator\n\n  re.tpl_host_port_no_ip_fuzzy_strict =\n\n    re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator\n\n  //\n  // Main rules\n  //\n\n  // Rude test fuzzy links by host, for quick deny\n  re.tpl_host_fuzzy_test =\n\n    'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))'\n\n  re.tpl_email_fuzzy =\n\n      '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n      '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')'\n\n  re.tpl_link_fuzzy =\n      // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n      // but can start with > (markdown blockquote)\n      '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n      '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'\n\n  re.tpl_link_no_ip_fuzzy =\n      // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n      // but can start with > (markdown blockquote)\n      '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n      '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')'\n\n  return re\n}\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","// Main parser class\n\nimport * as utils from './common/utils.mjs'\nimport * as helpers from './helpers/index.mjs'\nimport Renderer from './renderer.mjs'\nimport ParserCore from './parser_core.mjs'\nimport ParserBlock from './parser_block.mjs'\nimport ParserInline from './parser_inline.mjs'\nimport LinkifyIt from 'linkify-it'\nimport * as mdurl from 'mdurl'\nimport punycode from 'punycode.js'\n\nimport cfg_default from './presets/default.mjs'\nimport cfg_zero from './presets/zero.mjs'\nimport cfg_commonmark from './presets/commonmark.mjs'\n\nconst config = {\n  default: cfg_default,\n  zero: cfg_zero,\n  commonmark: cfg_commonmark\n}\n\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nconst BAD_PROTO_RE = /^(vbscript|javascript|file|data):/\nconst GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/\n\nfunction validateLink (url) {\n  // url should be normalized at this point, and existing entities are decoded\n  const str = url.trim().toLowerCase()\n\n  return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true\n}\n\nconst RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:']\n\nfunction normalizeLink (url) {\n  const parsed = mdurl.parse(url, true)\n\n  if (parsed.hostname) {\n    // Encode hostnames in urls like:\n    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n    //\n    // We don't encode unknown schemas, because it's likely that we encode\n    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n    //\n    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n      try {\n        parsed.hostname = punycode.toASCII(parsed.hostname)\n      } catch (er) { /**/ }\n    }\n  }\n\n  return mdurl.encode(mdurl.format(parsed))\n}\n\nfunction normalizeLinkText (url) {\n  const parsed = mdurl.parse(url, true)\n\n  if (parsed.hostname) {\n    // Encode hostnames in urls like:\n    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n    //\n    // We don't encode unknown schemas, because it's likely that we encode\n    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n    //\n    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n      try {\n        parsed.hostname = punycode.toUnicode(parsed.hostname)\n      } catch (er) { /**/ }\n    }\n  }\n\n  // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n  return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%')\n}\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n *     md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) -\n *   configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) -\n *   similar to GFM, used when no preset name given. Enables all available rules,\n *   but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) -\n *   all rules disabled. Useful to quickly setup your config via `.enable()`.\n *   For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n *   That's not safe! You may need external sanitizer to protect output from XSS.\n *   It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n *   (`<br />`). This is needed only for full CommonMark compatibility. In real\n *   world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `<br>`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n *   Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__  - `false`. Set `true` to enable [some language-neutral\n *   replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) +\n *   quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n *   pairs, when typographer enabled and smartquotes on. For example, you can\n *   use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n *   `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n *   Highlighter `function (str, lang)` should return escaped HTML. It can also\n *   return empty string if the source was not changed and should be escaped\n *   externaly. If result starts with <pre... internal wrapper is skipped.\n *\n * ##### Example\n *\n * ```javascript\n * // commonmark mode\n * var md = require('markdown-it')('commonmark');\n *\n * // default mode\n * var md = require('markdown-it')();\n *\n * // enable everything\n * var md = require('markdown-it')({\n *   html: true,\n *   linkify: true,\n *   typographer: true\n * });\n * ```\n *\n * ##### Syntax highlighting\n *\n * ```js\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * var md = require('markdown-it')({\n *   highlight: function (str, lang) {\n *     if (lang && hljs.getLanguage(lang)) {\n *       try {\n *         return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;\n *       } catch (__) {}\n *     }\n *\n *     return ''; // use external default escaping\n *   }\n * });\n * ```\n *\n * Or with full wrapper override (if you need assign class to `<pre>` or `<code>`):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n *   highlight: function (str, lang) {\n *     if (lang && hljs.getLanguage(lang)) {\n *       try {\n *         return '<pre><code class=\"hljs\">' +\n *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +\n *                '</code></pre>';\n *       } catch (__) {}\n *     }\n *\n *     return '<pre><code class=\"hljs\">' + md.utils.escapeHtml(str) + '</code></pre>';\n *   }\n * });\n * ```\n *\n **/\nfunction MarkdownIt (presetName, options) {\n  if (!(this instanceof MarkdownIt)) {\n    return new MarkdownIt(presetName, options)\n  }\n\n  if (!options) {\n    if (!utils.isString(presetName)) {\n      options = presetName || {}\n      presetName = 'default'\n    }\n  }\n\n  /**\n   * MarkdownIt#inline -> ParserInline\n   *\n   * Instance of [[ParserInline]]. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.inline = new ParserInline()\n\n  /**\n   * MarkdownIt#block -> ParserBlock\n   *\n   * Instance of [[ParserBlock]]. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.block = new ParserBlock()\n\n  /**\n   * MarkdownIt#core -> Core\n   *\n   * Instance of [[Core]] chain executor. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.core = new ParserCore()\n\n  /**\n   * MarkdownIt#renderer -> Renderer\n   *\n   * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n   * rules for new token types, generated by plugins.\n   *\n   * ##### Example\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   *\n   * function myToken(tokens, idx, options, env, self) {\n   *   //...\n   *   return result;\n   * };\n   *\n   * md.renderer.rules['my_token'] = myToken\n   * ```\n   *\n   * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs).\n   **/\n  this.renderer = new Renderer()\n\n  /**\n   * MarkdownIt#linkify -> LinkifyIt\n   *\n   * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n   * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs)\n   * rule.\n   **/\n  this.linkify = new LinkifyIt()\n\n  /**\n   * MarkdownIt#validateLink(url) -> Boolean\n   *\n   * Link validation function. CommonMark allows too much in links. By default\n   * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n   * except some embedded image types.\n   *\n   * You can change this behaviour:\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   * // enable everything\n   * md.validateLink = function () { return true; }\n   * ```\n   **/\n  this.validateLink = validateLink\n\n  /**\n   * MarkdownIt#normalizeLink(url) -> String\n   *\n   * Function used to encode link url to a machine-readable format,\n   * which includes url-encoding, punycode, etc.\n   **/\n  this.normalizeLink = normalizeLink\n\n  /**\n   * MarkdownIt#normalizeLinkText(url) -> String\n   *\n   * Function used to decode link url to a human-readable format`\n   **/\n  this.normalizeLinkText = normalizeLinkText\n\n  // Expose utils & helpers for easy acces from plugins\n\n  /**\n   * MarkdownIt#utils -> utils\n   *\n   * Assorted utility functions, useful to write plugins. See details\n   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs).\n   **/\n  this.utils = utils\n\n  /**\n   * MarkdownIt#helpers -> helpers\n   *\n   * Link components parser functions, useful to write plugins. See details\n   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n   **/\n  this.helpers = utils.assign({}, helpers)\n\n  this.options = {}\n  this.configure(presetName)\n\n  if (options) { this.set(options) }\n}\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n *             .set({ html: true, breaks: true })\n *             .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n  utils.assign(this.options, options)\n  return this\n}\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n  const self = this\n\n  if (utils.isString(presets)) {\n    const presetName = presets\n    presets = config[presetName]\n    if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name') }\n  }\n\n  if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty') }\n\n  if (presets.options) { self.set(presets.options) }\n\n  if (presets.components) {\n    Object.keys(presets.components).forEach(function (name) {\n      if (presets.components[name].rules) {\n        self[name].ruler.enableOnly(presets.components[name].rules)\n      }\n      if (presets.components[name].rules2) {\n        self[name].ruler2.enableOnly(presets.components[name].rules2)\n      }\n    })\n  }\n  return this\n}\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n *             .enable(['sub', 'sup'])\n *             .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n  let result = []\n\n  if (!Array.isArray(list)) { list = [list] }\n\n  ['core', 'block', 'inline'].forEach(function (chain) {\n    result = result.concat(this[chain].ruler.enable(list, true))\n  }, this)\n\n  result = result.concat(this.inline.ruler2.enable(list, true))\n\n  const missed = list.filter(function (name) { return result.indexOf(name) < 0 })\n\n  if (missed.length && !ignoreInvalid) {\n    throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed)\n  }\n\n  return this\n}\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n  let result = []\n\n  if (!Array.isArray(list)) { list = [list] }\n\n  ['core', 'block', 'inline'].forEach(function (chain) {\n    result = result.concat(this[chain].ruler.disable(list, true))\n  }, this)\n\n  result = result.concat(this.inline.ruler2.disable(list, true))\n\n  const missed = list.filter(function (name) { return result.indexOf(name) < 0 })\n\n  if (missed.length && !ignoreInvalid) {\n    throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed)\n  }\n  return this\n}\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n *             .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n *               tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n *             });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n  const args = [this].concat(Array.prototype.slice.call(arguments, 1))\n  plugin.apply(plugin, args)\n  return this\n}\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n  if (typeof src !== 'string') {\n    throw new Error('Input data should be a String')\n  }\n\n  const state = new this.core.State(src, this, env)\n\n  this.core.process(state)\n\n  return state.tokens\n}\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n  env = env || {}\n\n  return this.renderer.render(this.parse(src, env), this.options, env)\n}\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n  const state = new this.core.State(src, this, env)\n\n  state.inlineMode = true\n  this.core.process(state)\n\n  return state.tokens\n}\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `<p>` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n  env = env || {}\n\n  return this.renderer.render(this.parseInline(src, env), this.options, env)\n}\n\nexport default MarkdownIt\n","// markdown-it default options\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: false,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: false,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 100\n  },\n\n  components: {\n    core: {},\n    block: {},\n    inline: {}\n  }\n}\n","// \"Zero\" preset, with nothing enabled. Useful for manual configuring of simple\n// modes. For example, to parse bold/italic only.\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: false,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: false,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 20\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'normalize',\n        'block',\n        'inline',\n        'text_join'\n      ]\n    },\n\n    block: {\n      rules: [\n        'paragraph'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'text'\n      ],\n      rules2: [\n        'balance_pairs',\n        'fragments_join'\n      ]\n    }\n  }\n}\n","// Commonmark default options\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: true,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: true,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 20\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'normalize',\n        'block',\n        'inline',\n        'text_join'\n      ]\n    },\n\n    block: {\n      rules: [\n        'blockquote',\n        'code',\n        'fence',\n        'heading',\n        'hr',\n        'html_block',\n        'lheading',\n        'list',\n        'reference',\n        'paragraph'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'autolink',\n        'backticks',\n        'emphasis',\n        'entity',\n        'escape',\n        'html_inline',\n        'image',\n        'link',\n        'newline',\n        'text'\n      ],\n      rules2: [\n        'balance_pairs',\n        'emphasis',\n        'fragments_join'\n      ]\n    }\n  }\n}\n","var e=!1,n={false:\"push\",true:\"unshift\",after:\"push\",before:\"unshift\"},t={isPermalinkSymbol:!0};function r(r,a,i,l){var o;if(!e){var c=\"Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks\";\"object\"==typeof process&&process&&process.emitWarning?process.emitWarning(c):console.warn(c),e=!0}var s=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:[].concat(a.permalinkClass?[[\"class\",a.permalinkClass]]:[],[[\"href\",a.permalinkHref(r,i)]],Object.entries(a.permalinkAttrs(r,i)))}),Object.assign(new i.Token(\"html_block\",\"\",0),{content:a.permalinkSymbol,meta:t}),new i.Token(\"link_close\",\"a\",-1)];a.permalinkSpace&&i.tokens[l+1].children[n[a.permalinkBefore]](Object.assign(new i.Token(\"text\",\"\",0),{content:\" \"})),(o=i.tokens[l+1].children)[n[a.permalinkBefore]].apply(o,s)}function a(e){return\"#\"+e}function i(e){return{}}var l={class:\"header-anchor\",symbol:\"#\",renderHref:a,renderAttrs:i};function o(e){function n(t){return t=Object.assign({},n.defaults,t),function(n,r,a,i){return e(n,t,r,a,i)}}return n.defaults=Object.assign({},l),n.renderPermalinkImpl=e,n}function c(e){var n=[],t=e.filter(function(e){if(\"class\"!==e[0])return!0;n.push(e[1])});return n.length>0&&t.unshift([\"class\",n.join(\" \")]),t}var s=o(function(e,r,a,i,l){var o,s=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:c([].concat(r.class?[[\"class\",r.class]]:[],[[\"href\",r.renderHref(e,i)]],r.ariaHidden?[[\"aria-hidden\",\"true\"]]:[],Object.entries(r.renderAttrs(e,i))))}),Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}),new i.Token(\"link_close\",\"a\",-1)];if(r.space){var u=\"string\"==typeof r.space?r.space:\" \";i.tokens[l+1].children[n[r.placement]](Object.assign(new i.Token(\"string\"==typeof r.space?\"html_inline\":\"text\",\"\",0),{content:u}))}(o=i.tokens[l+1].children)[n[r.placement]].apply(o,s)});Object.assign(s.defaults,{space:!0,placement:\"after\",ariaHidden:!1});var u=o(s.renderPermalinkImpl);u.defaults=Object.assign({},s.defaults,{ariaHidden:!0});var d=o(function(e,n,t,r,a){var i=[Object.assign(new r.Token(\"link_open\",\"a\",1),{attrs:c([].concat(n.class?[[\"class\",n.class]]:[],[[\"href\",n.renderHref(e,r)]],Object.entries(n.renderAttrs(e,r))))})].concat(n.safariReaderFix?[new r.Token(\"span_open\",\"span\",1)]:[],r.tokens[a+1].children,n.safariReaderFix?[new r.Token(\"span_close\",\"span\",-1)]:[],[new r.Token(\"link_close\",\"a\",-1)]);r.tokens[a+1]=Object.assign(new r.Token(\"inline\",\"\",0),{children:i})});Object.assign(d.defaults,{safariReaderFix:!1});var f=o(function(e,r,a,i,l){var o;if(![\"visually-hidden\",\"aria-label\",\"aria-describedby\",\"aria-labelledby\"].includes(r.style))throw new Error(\"`permalink.linkAfterHeader` called with unknown style option `\"+r.style+\"`\");if(![\"aria-describedby\",\"aria-labelledby\"].includes(r.style)&&!r.assistiveText)throw new Error(\"`permalink.linkAfterHeader` called without the `assistiveText` option in `\"+r.style+\"` style\");if(\"visually-hidden\"===r.style&&!r.visuallyHiddenClass)throw new Error(\"`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style\");var s=i.tokens[l+1].children.filter(function(e){return\"text\"===e.type||\"code_inline\"===e.type}).reduce(function(e,n){return e+n.content},\"\"),u=[],d=[];if(r.class&&d.push([\"class\",r.class]),d.push([\"href\",r.renderHref(e,i)]),d.push.apply(d,Object.entries(r.renderAttrs(e,i))),\"visually-hidden\"===r.style){if(u.push(Object.assign(new i.Token(\"span_open\",\"span\",1),{attrs:[[\"class\",r.visuallyHiddenClass]]}),Object.assign(new i.Token(\"text\",\"\",0),{content:r.assistiveText(s)}),new i.Token(\"span_close\",\"span\",-1)),r.space){var f=\"string\"==typeof r.space?r.space:\" \";u[n[r.placement]](Object.assign(new i.Token(\"string\"==typeof r.space?\"html_inline\":\"text\",\"\",0),{content:f}))}u[n[r.placement]](Object.assign(new i.Token(\"span_open\",\"span\",1),{attrs:[[\"aria-hidden\",\"true\"]]}),Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}),new i.Token(\"span_close\",\"span\",-1))}else u.push(Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}));\"aria-label\"===r.style?d.push([\"aria-label\",r.assistiveText(s)]):[\"aria-describedby\",\"aria-labelledby\"].includes(r.style)&&d.push([r.style,e]);var p=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:c(d)})].concat(u,[new i.Token(\"link_close\",\"a\",-1)]);(o=i.tokens).splice.apply(o,[l+3,0].concat(p)),r.wrapper&&(i.tokens.splice(l,0,Object.assign(new i.Token(\"html_block\",\"\",0),{content:r.wrapper[0]+\"\\n\"})),i.tokens.splice(l+3+p.length+1,0,Object.assign(new i.Token(\"html_block\",\"\",0),{content:r.wrapper[1]+\"\\n\"})))});function p(e,n,t,r){var a=e,i=r;if(t&&Object.prototype.hasOwnProperty.call(n,a))throw new Error(\"User defined `id` attribute `\"+e+\"` is not unique. Please fix it in your Markdown to continue.\");for(;Object.prototype.hasOwnProperty.call(n,a);)a=e+\"-\"+i,i+=1;return n[a]=!0,a}function b(e,n){n=Object.assign({},b.defaults,n),e.core.ruler.push(\"anchor\",function(e){for(var t,a={},i=e.tokens,l=Array.isArray(n.level)?(t=n.level,function(e){return t.includes(e)}):function(e){return function(n){return n>=e}}(n.level),o=0;o<i.length;o++){var c=i[o];if(\"heading_open\"===c.type&&l(Number(c.tag.substr(1)))){var s=n.getTokensText(i[o+1].children),u=c.attrGet(\"id\");u=null==u?p(u=n.slugifyWithState?n.slugifyWithState(s,e):n.slugify(s),a,!1,n.uniqueSlugStartIndex):p(u,a,!0,n.uniqueSlugStartIndex),c.attrSet(\"id\",u),!1!==n.tabIndex&&c.attrSet(\"tabindex\",\"\"+n.tabIndex),\"function\"==typeof n.permalink?n.permalink(u,n,e,o):(n.permalink||n.renderPermalink&&n.renderPermalink!==r)&&n.renderPermalink(u,n,e,o),o=i.indexOf(c),n.callback&&n.callback(c,{slug:u,title:s})}}})}Object.assign(f.defaults,{style:\"visually-hidden\",space:!0,placement:\"after\",wrapper:null}),b.permalink={__proto__:null,legacy:r,renderHref:a,renderAttrs:i,makePermalink:o,linkInsideHeader:s,ariaHidden:u,headerLink:d,linkAfterHeader:f},b.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\\s+/g,\"-\"))},uniqueSlugStartIndex:1,tabIndex:\"-1\",getTokensText:function(e){return e.filter(function(e){return[\"text\",\"code_inline\"].includes(e.type)}).map(function(e){return e.content}).join(\"\")},permalink:!1,renderPermalink:r,permalinkClass:u.defaults.class,permalinkSpace:u.defaults.space,permalinkSymbol:\"¶\",permalinkBefore:\"before\"===u.defaults.placement,permalinkHref:u.defaults.renderHref,permalinkAttrs:u.defaults.renderAttrs},b.default=b;export{b as default};\n//# sourceMappingURL=markdownItAnchor.mjs.map\n","// Process footnotes\n//\n'use strict'\n\n/// /////////////////////////////////////////////////////////////////////////////\n// Renderer partials\n\nfunction render_footnote_anchor_name (tokens, idx, options, env/*, slf */) {\n  const n = Number(tokens[idx].meta.id + 1).toString()\n  let prefix = ''\n\n  if (typeof env.docId === 'string') prefix = `-${env.docId}-`\n\n  return prefix + n\n}\n\nfunction render_footnote_caption (tokens, idx/*, options, env, slf */) {\n  let n = Number(tokens[idx].meta.id + 1).toString()\n\n  if (tokens[idx].meta.subId > 0) n += `:${tokens[idx].meta.subId}`\n\n  return `[${n}]`\n}\n\nfunction render_footnote_ref (tokens, idx, options, env, slf) {\n  const id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n  const caption = slf.rules.footnote_caption(tokens, idx, options, env, slf)\n  let refid = id\n\n  if (tokens[idx].meta.subId > 0) refid += `:${tokens[idx].meta.subId}`\n\n  return `<sup class=\"footnote-ref\"><a href=\"#fn${id}\" id=\"fnref${refid}\">${caption}</a></sup>`\n}\n\nfunction render_footnote_block_open (tokens, idx, options) {\n  return (options.xhtmlOut ? '<hr class=\"footnotes-sep\" />\\n' : '<hr class=\"footnotes-sep\">\\n') +\n         '<section class=\"footnotes\">\\n' +\n         '<ol class=\"footnotes-list\">\\n'\n}\n\nfunction render_footnote_block_close () {\n  return '</ol>\\n</section>\\n'\n}\n\nfunction render_footnote_open (tokens, idx, options, env, slf) {\n  let id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n\n  if (tokens[idx].meta.subId > 0) id += `:${tokens[idx].meta.subId}`\n\n  return `<li id=\"fn${id}\" class=\"footnote-item\">`\n}\n\nfunction render_footnote_close () {\n  return '</li>\\n'\n}\n\nfunction render_footnote_anchor (tokens, idx, options, env, slf) {\n  let id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n\n  if (tokens[idx].meta.subId > 0) id += `:${tokens[idx].meta.subId}`\n\n  /* ↩ with escape code to prevent display as Apple Emoji on iOS */\n  return ` <a href=\"#fnref${id}\" class=\"footnote-backref\">\\u21a9\\uFE0E</a>`\n}\n\nexport default function footnote_plugin (md) {\n  const parseLinkLabel = md.helpers.parseLinkLabel\n  const isSpace = md.utils.isSpace\n\n  md.renderer.rules.footnote_ref          = render_footnote_ref\n  md.renderer.rules.footnote_block_open   = render_footnote_block_open\n  md.renderer.rules.footnote_block_close  = render_footnote_block_close\n  md.renderer.rules.footnote_open         = render_footnote_open\n  md.renderer.rules.footnote_close        = render_footnote_close\n  md.renderer.rules.footnote_anchor       = render_footnote_anchor\n\n  // helpers (only used in other rules, no tokens are attached to those)\n  md.renderer.rules.footnote_caption      = render_footnote_caption\n  md.renderer.rules.footnote_anchor_name  = render_footnote_anchor_name\n\n  // Process footnote block definition\n  function footnote_def (state, startLine, endLine, silent) {\n    const start = state.bMarks[startLine] + state.tShift[startLine]\n    const max = state.eMarks[startLine]\n\n    // line should be at least 5 chars - \"[^x]:\"\n    if (start + 4 > max) return false\n\n    if (state.src.charCodeAt(start) !== 0x5B/* [ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) return false\n\n    let pos\n\n    for (pos = start + 2; pos < max; pos++) {\n      if (state.src.charCodeAt(pos) === 0x20) return false\n      if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n        break\n      }\n    }\n\n    if (pos === start + 2) return false // no empty footnote labels\n    if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) return false\n    if (silent) return true\n    pos++\n\n    if (!state.env.footnotes) state.env.footnotes = {}\n    if (!state.env.footnotes.refs) state.env.footnotes.refs = {}\n    const label = state.src.slice(start + 2, pos - 2)\n    state.env.footnotes.refs[`:${label}`] = -1\n\n    const token_fref_o = new state.Token('footnote_reference_open', '', 1)\n    token_fref_o.meta  = { label }\n    token_fref_o.level = state.level++\n    state.tokens.push(token_fref_o)\n\n    const oldBMark = state.bMarks[startLine]\n    const oldTShift = state.tShift[startLine]\n    const oldSCount = state.sCount[startLine]\n    const oldParentType = state.parentType\n\n    const posAfterColon = pos\n    const initial = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine])\n    let offset = initial\n\n    while (pos < max) {\n      const ch = state.src.charCodeAt(pos)\n\n      if (isSpace(ch)) {\n        if (ch === 0x09) {\n          offset += 4 - offset % 4\n        } else {\n          offset++\n        }\n      } else {\n        break\n      }\n\n      pos++\n    }\n\n    state.tShift[startLine] = pos - posAfterColon\n    state.sCount[startLine] = offset - initial\n\n    state.bMarks[startLine] = posAfterColon\n    state.blkIndent += 4\n    state.parentType = 'footnote'\n\n    if (state.sCount[startLine] < state.blkIndent) {\n      state.sCount[startLine] += state.blkIndent\n    }\n\n    state.md.block.tokenize(state, startLine, endLine, true)\n\n    state.parentType = oldParentType\n    state.blkIndent -= 4\n    state.tShift[startLine] = oldTShift\n    state.sCount[startLine] = oldSCount\n    state.bMarks[startLine] = oldBMark\n\n    const token_fref_c = new state.Token('footnote_reference_close', '', -1)\n    token_fref_c.level = --state.level\n    state.tokens.push(token_fref_c)\n\n    return true\n  }\n\n  // Process inline footnotes (^[...])\n  function footnote_inline (state, silent) {\n    const max = state.posMax\n    const start = state.pos\n\n    if (start + 2 >= max) return false\n    if (state.src.charCodeAt(start) !== 0x5E/* ^ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) return false\n\n    const labelStart = start + 2\n    const labelEnd = parseLinkLabel(state, start + 1)\n\n    // parser failed to find ']', so it's not a valid note\n    if (labelEnd < 0) return false\n\n    // We found the end of the link, and know for a fact it's a valid link;\n    // so all that's left to do is to call tokenizer.\n    //\n    if (!silent) {\n      if (!state.env.footnotes) state.env.footnotes = {}\n      if (!state.env.footnotes.list) state.env.footnotes.list = []\n      const footnoteId = state.env.footnotes.list.length\n      const tokens = []\n\n      state.md.inline.parse(\n        state.src.slice(labelStart, labelEnd),\n        state.md,\n        state.env,\n        tokens\n      )\n\n      const token = state.push('footnote_ref', '', 0)\n      token.meta = { id: footnoteId }\n\n      state.env.footnotes.list[footnoteId] = {\n        content: state.src.slice(labelStart, labelEnd),\n        tokens\n      }\n    }\n\n    state.pos = labelEnd + 1\n    state.posMax = max\n    return true\n  }\n\n  // Process footnote references ([^...])\n  function footnote_ref (state, silent) {\n    const max = state.posMax\n    const start = state.pos\n\n    // should be at least 4 chars - \"[^x]\"\n    if (start + 3 > max) return false\n\n    if (!state.env.footnotes || !state.env.footnotes.refs) return false\n    if (state.src.charCodeAt(start) !== 0x5B/* [ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) return false\n\n    let pos\n\n    for (pos = start + 2; pos < max; pos++) {\n      if (state.src.charCodeAt(pos) === 0x20) return false\n      if (state.src.charCodeAt(pos) === 0x0A) return false\n      if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n        break\n      }\n    }\n\n    if (pos === start + 2) return false // no empty footnote labels\n    if (pos >= max) return false\n    pos++\n\n    const label = state.src.slice(start + 2, pos - 1)\n    if (typeof state.env.footnotes.refs[`:${label}`] === 'undefined') return false\n\n    if (!silent) {\n      if (!state.env.footnotes.list) state.env.footnotes.list = []\n\n      let footnoteId\n\n      if (state.env.footnotes.refs[`:${label}`] < 0) {\n        footnoteId = state.env.footnotes.list.length\n        state.env.footnotes.list[footnoteId] = { label, count: 0 }\n        state.env.footnotes.refs[`:${label}`] = footnoteId\n      } else {\n        footnoteId = state.env.footnotes.refs[`:${label}`]\n      }\n\n      const footnoteSubId = state.env.footnotes.list[footnoteId].count\n      state.env.footnotes.list[footnoteId].count++\n\n      const token = state.push('footnote_ref', '', 0)\n      token.meta = { id: footnoteId, subId: footnoteSubId, label }\n    }\n\n    state.pos = pos\n    state.posMax = max\n    return true\n  }\n\n  // Glue footnote tokens to end of token stream\n  function footnote_tail (state) {\n    let tokens\n    let current\n    let currentLabel\n    let insideRef = false\n    const refTokens = {}\n\n    if (!state.env.footnotes) { return }\n\n    state.tokens = state.tokens.filter(function (tok) {\n      if (tok.type === 'footnote_reference_open') {\n        insideRef = true\n        current = []\n        currentLabel = tok.meta.label\n        return false\n      }\n      if (tok.type === 'footnote_reference_close') {\n        insideRef = false\n        // prepend ':' to avoid conflict with Object.prototype members\n        refTokens[':' + currentLabel] = current\n        return false\n      }\n      if (insideRef) { current.push(tok) }\n      return !insideRef\n    })\n\n    if (!state.env.footnotes.list) { return }\n    const list = state.env.footnotes.list\n\n    state.tokens.push(new state.Token('footnote_block_open', '', 1))\n\n    for (let i = 0, l = list.length; i < l; i++) {\n      const token_fo = new state.Token('footnote_open', '', 1)\n      token_fo.meta = { id: i, label: list[i].label }\n      state.tokens.push(token_fo)\n\n      if (list[i].tokens) {\n        tokens = []\n\n        const token_po = new state.Token('paragraph_open', 'p', 1)\n        token_po.block = true\n        tokens.push(token_po)\n\n        const token_i = new state.Token('inline', '', 0)\n        token_i.children = list[i].tokens\n        token_i.content = list[i].content\n        tokens.push(token_i)\n\n        const token_pc = new state.Token('paragraph_close', 'p', -1)\n        token_pc.block    = true\n        tokens.push(token_pc)\n      } else if (list[i].label) {\n        tokens = refTokens[`:${list[i].label}`]\n      }\n\n      if (tokens) state.tokens = state.tokens.concat(tokens)\n\n      let lastParagraph\n\n      if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n        lastParagraph = state.tokens.pop()\n      } else {\n        lastParagraph = null\n      }\n\n      const t = list[i].count > 0 ? list[i].count : 1\n      for (let j = 0; j < t; j++) {\n        const token_a = new state.Token('footnote_anchor', '', 0)\n        token_a.meta = { id: i, subId: j, label: list[i].label }\n        state.tokens.push(token_a)\n      }\n\n      if (lastParagraph) {\n        state.tokens.push(lastParagraph)\n      }\n\n      state.tokens.push(new state.Token('footnote_close', '', -1))\n    }\n\n    state.tokens.push(new state.Token('footnote_block_close', '', -1))\n  }\n\n  md.block.ruler.before('reference', 'footnote_def', footnote_def, { alt: ['paragraph', 'reference'] })\n  md.inline.ruler.after('image', 'footnote_inline', footnote_inline)\n  md.inline.ruler.after('footnote_inline', 'footnote_ref', footnote_ref)\n  md.core.ruler.after('inline', 'footnote_tail', footnote_tail)\n};\n","// Process front matter and pass to cb\n'use strict';\n\nmodule.exports = function front_matter_plugin(md, cb) {\n  var min_markers = 3,\n      marker_str  = '-',\n      marker_char = marker_str.charCodeAt(0),\n      marker_len  = marker_str.length;\n\n  function frontMatter(state, startLine, endLine, silent) {\n    var pos,\n        nextLine,\n        marker_count,\n        token,\n        old_parent,\n        old_line_max,\n        start_content,\n        auto_closed = false,\n        start = state.bMarks[startLine] + state.tShift[startLine],\n        max = state.eMarks[startLine];\n\n    // Check out the first character of the first line quickly,\n    // this should filter out non-front matter\n    if (startLine !== 0 || marker_char !== state.src.charCodeAt(0)) {\n      return false;\n    }\n\n    // Check out the rest of the marker string\n    // while pos <= 3\n    for (pos = start + 1; pos <= max; pos++) {\n      if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {\n        start_content = pos + 1;\n        break;\n      }\n    }\n\n    marker_count = Math.floor((pos - start) / marker_len);\n\n    if (marker_count < min_markers) {\n      return false;\n    }\n    pos -= (pos - start) % marker_len;\n\n    // Since start is found, we can report success here in validation mode\n    if (silent) {\n      return true;\n    }\n\n    // Search for the end of the block\n    nextLine = startLine;\n\n    for (;;) {\n      nextLine++;\n      if (nextLine >= endLine) {\n        // unclosed block should be autoclosed by end of document.\n        // also block seems to be autoclosed by end of parent\n        break;\n      }\n\n      if (state.src.slice(start, max) === '...') {\n        break;\n      }\n\n      start = state.bMarks[nextLine] + state.tShift[nextLine];\n      max = state.eMarks[nextLine];\n\n      if (start < max && state.sCount[nextLine] < state.blkIndent) {\n        // non-empty line with negative indent should stop the list:\n        // - ```\n        //  test\n        break;\n      }\n\n      if (marker_char !== state.src.charCodeAt(start)) {\n        continue;\n      }\n\n      if (state.sCount[nextLine] - state.blkIndent >= 4) {\n        // closing fence should be indented less than 4 spaces\n        continue;\n      }\n\n      for (pos = start + 1; pos <= max; pos++) {\n        if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {\n          break;\n        }\n      }\n\n      // closing code fence must be at least as long as the opening one\n      if (Math.floor((pos - start) / marker_len) < marker_count) {\n        continue;\n      }\n\n      // make sure tail has spaces only\n      pos -= (pos - start) % marker_len;\n      pos = state.skipSpaces(pos);\n\n      if (pos < max) {\n        continue;\n      }\n\n      // found!\n      auto_closed = true;\n      break;\n    }\n\n    old_parent = state.parentType;\n    old_line_max = state.lineMax;\n    state.parentType = 'container';\n\n    // this will prevent lazy continuations from ever going past our end marker\n    state.lineMax = nextLine;\n\n    token        = state.push('front_matter', null, 0);\n    token.hidden = true;\n    token.markup = state.src.slice(startLine, pos);\n    token.block  = true;\n    token.map    = [ startLine, nextLine + (auto_closed ? 1 : 0) ];\n    token.meta   = state.src.slice(start_content, start - 1);\n\n    state.parentType = old_parent;\n    state.lineMax = old_line_max;\n    state.line = nextLine + (auto_closed ? 1 : 0);\n\n    cb(token.meta);\n\n    return true;\n  }\n\n  md.block.ruler.before(\n    'table',\n    'front_matter',\n    frontMatter,\n    {\n      alt: [\n        'paragraph',\n        'reference',\n        'blockquote',\n        'list' \n      ]\n    }\n  );\n};\n","'use strict';\n\n\nmodule.exports = function inject_linenumbers_plugin(md) {\n  //\n  // Inject line numbers for sync scroll. Notes:\n  //\n  // - We track only headings and paragraphs, at any level.\n  // - TODO Footnotes content causes jumps. Level limit filters it automatically.\n  function injectLineNumbers(tokens, idx, options, env, slf) {\n    var line;\n    // if (tokens[idx].map && tokens[idx].level === 0) {\n    if (tokens[idx].map) {\n      line = tokens[idx].map[0];\n      tokens[idx].attrJoin('class', 'source-line');\n      tokens[idx].attrSet('data-source-line', String(line));\n    }\n    return slf.renderToken(tokens, idx, options, env, slf);\n  }\n\n  md.renderer.rules.paragraph_open = injectLineNumbers;\n  md.renderer.rules.heading_open   = injectLineNumbers;\n  md.renderer.rules.list_item_open = injectLineNumbers;\n  md.renderer.rules.table_open     = injectLineNumbers;\n};\n","/**\n * Do callback when HTMLElement in removed\n *\n * @param {HTMLElement} element observing\n * @param {Function} callback\n */\nexport const onRemove = (element, callback) => {\n  const parent = element.parentNode\n  if (!parent) throw new Error('The node must already be attached')\n\n  const obs = new window.MutationObserver(mutations => {\n    for (const mutation of mutations) {\n      for (const el of mutation.removedNodes) {\n        if (el === element) {\n          obs.disconnect()\n          callback()\n        }\n      }\n    }\n  })\n  obs.observe(parent, { childList: true })\n}\n\n/**\n * Animate transition of DOMRect, with Web Animation API\n *\n * @param {HTMLElement} element                 Element which animation applies\n * @param {DOMRect}     rect                    DOMRect for transition\n * @param {Object}      options\n * @param {Boolean}     options.resume          If true, transition starts from rect to DOMRect of element\n * @param {Number}      options.duration        Duration of animation in milliseconds\n * @returns {Animation} https://developer.mozilla.org/en-US/docs/Web/API/Animation\n */\nexport const animateRectTransition = (element, rect, options = {}) => {\n  if (!element.parentElement) { throw new Error('The node must already be attached') }\n\n  const { width: w1, height: h1, left: x1, top: y1 } = rect\n  const {\n    width: w2,\n    height: h2,\n    left: x2,\n    top: y2,\n  } = element.getBoundingClientRect()\n\n  const rw = (w1 ?? w2) / w2\n  const rh = (h1 ?? h2) / h2\n  const dx = x1 - x2\n  const dy = y1 - y2\n\n  if ((dx === 0 && dy === 0) || !isFinite(rw) || !isFinite(rh)) {\n    return element.animate([], { duration: 0 })\n  }\n\n  const transform1 = 'translate(0, 0) scale(1, 1)'\n  const transform2 = `translate(${dx}px, ${dy}px) scale(${rw}, ${rh})`\n  const keyframes = [\n    { transform: transform1, opacity: 1 },\n    { transform: transform2, opacity: 0.3 },\n  ]\n  if (options.resume === true) keyframes.reverse()\n\n  return element.animate(keyframes, {\n    duration: options.duration ?? 500,\n    easing: 'ease-in-out',\n  })\n}\n\n/**\n * Throttle for function call\n *\n * @param {Function} func\n * @param {Number} delay milliseconds\n * @returns {Any} return value of function call, or null if throttled\n */\nexport function throttle (func, delay) {\n  let timerFlag = null\n\n  return function (...args) {\n    const context = this\n    if (timerFlag !== null) return null\n\n    timerFlag = setTimeout(\n      () => (timerFlag = null),\n      typeof delay === 'function' ? delay.call(context) : delay,\n    )\n\n    return func.call(context, ...args)\n  }\n}\n\n/**\n * shiftByWindow. make sure HTMLElement inside viewport\n *\n * @param {HTMLElement} element\n */\nexport const shiftByWindow = element => {\n  const rect = element.getBoundingClientRect()\n  const offsetX = window.innerWidth - rect.left - rect.width\n  const offsetY = window.innerHeight - rect.top - rect.height\n  element.style.transform = `translate(${offsetX < 0 ? offsetX : 0}px, ${offsetY < 0 ? offsetY : 0}px)`\n}\n\n/**\n * insideWindow. check DOMRect is inside window\n *\n * @param {HTMLElement} element\n */\nexport const insideWindow = element => {\n  const rect = element.getBoundingClientRect()\n  return (\n    rect.left > 0 &&\n    rect.right < window.innerWidth + rect.width &&\n    rect.top > 0 &&\n    rect.bottom < window.innerHeight + rect.height\n  )\n}\n\n/**\n * insideParent. check children element is inside DOMRect of parent element\n *\n * @param {HTMLElement} childElement\n * @param {HTMLElement} parentElement\n */\nexport const insideParent = (childElement, parentElement) => {\n  const childRect = childElement.getBoundingClientRect()\n  const parentRect = parentElement.getBoundingClientRect()\n  const offset = 10\n\n  return (\n    childRect.left < parentRect.right - offset &&\n    childRect.right > parentRect.left + offset &&\n    childRect.top < parentRect.bottom - offset &&\n    childRect.bottom > parentRect.top + offset\n  )\n}\n","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * AnimEvent\n * https://github.com/anseki/anim-event\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nvar MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nKEEP_LOOP = 500,\n\n/**\n * @typedef {Object} task\n * @property {Event} event\n * @property {function} listener\n */\n\n/** @type {task[]} */\ntasks = [];\n\nvar requestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\nvar lastFrameTime = Date.now(),\n    requestID;\n\nfunction step() {\n  var called, next;\n\n  if (requestID) {\n    cancelAnim.call(window, requestID);\n    requestID = null;\n  }\n\n  tasks.forEach(function (task) {\n    var event;\n\n    if (event = task.event) {\n      task.event = null; // Clear it before `task.listener()` because that might fire another event.\n\n      task.listener(event);\n      called = true;\n    }\n  });\n\n  if (called) {\n    lastFrameTime = Date.now();\n    next = true;\n  } else if (Date.now() - lastFrameTime < KEEP_LOOP) {\n    // Go on for a while\n    next = true;\n  }\n\n  if (next) {\n    requestID = requestAnim.call(window, step);\n  }\n}\n\nfunction indexOfTasks(listener) {\n  var index = -1;\n  tasks.some(function (task, i) {\n    if (task.listener === listener) {\n      index = i;\n      return true;\n    }\n\n    return false;\n  });\n  return index;\n}\n\nvar AnimEvent = {\n  /**\n   * @param {function} listener - An event listener.\n   * @returns {(function|null)} A wrapped event listener.\n   */\n  add: function add(listener) {\n    var task;\n\n    if (indexOfTasks(listener) === -1) {\n      tasks.push(task = {\n        listener: listener\n      });\n      return function (event) {\n        task.event = event;\n\n        if (!requestID) {\n          step();\n        }\n      };\n    }\n\n    return null;\n  },\n  remove: function remove(listener) {\n    var iRemove;\n\n    if ((iRemove = indexOfTasks(listener)) > -1) {\n      tasks.splice(iRemove, 1);\n\n      if (!tasks.length && requestID) {\n        cancelAnim.call(window, requestID);\n        requestID = null;\n      }\n    }\n  }\n};\nexport default AnimEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PointerEvent\n * https://github.com/anseki/pointer-event\n *\n * Copyright (c) 2022 anseki\n * Licensed under the MIT license.\n */\nimport AnimEvent from 'anim-event';\nvar MOUSE_EMU_INTERVAL = 400,\n    // Avoid mouse events emulation\nCLICK_EMULATOR_ELEMENTS = [],\n    DBLCLICK_EMULATOR_ELEMENTS = []; // Support options for addEventListener\n\nvar passiveSupported = false;\n\ntry {\n  window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n    get: function get() {\n      passiveSupported = true;\n    }\n  }));\n} catch (error) {\n  /* ignore */\n}\n/**\n * addEventListener with specific option.\n * @param {Element} target - An event-target element.\n * @param {string} type - The event type to listen for.\n * @param {function} listener - The EventListener.\n * @param {Object} options - An options object.\n * @returns {void}\n */\n\n\nfunction addEventListenerWithOptions(target, type, listener, options) {\n  // When `passive` is not supported, consider that the `useCapture` is supported instead of\n  // `options` (i.e. options other than the `passive` also are not supported).\n  target.addEventListener(type, listener, passiveSupported ? options : options.capture);\n}\n\nfunction getPointsLength(p0, p1) {\n  var lx = p0.x - p1.x,\n      ly = p0.y - p1.y;\n  return Math.sqrt(lx * lx + ly * ly);\n}\n/**\n * Get Touch instance in list.\n * @param {Touch[]} touches - An Array or TouchList instance.\n * @param {number} id - Touch#identifier\n * @returns {(Touch|null)} - A found Touch instance.\n */\n\n\nfunction getTouchById(touches, id) {\n  if (touches != null && id != null) {\n    for (var i = 0; i < touches.length; i++) {\n      if (touches[i].identifier === id) {\n        return touches[i];\n      }\n    }\n  }\n\n  return null;\n}\n/**\n * @param {Object} xy - Something that might have clientX and clientY.\n * @returns {boolean} - `true` if it has valid clientX and clientY.\n */\n\n\nfunction hasXY(xy) {\n  return xy && typeof xy.clientX === 'number' && typeof xy.clientY === 'number';\n} // Gecko, Trident pick drag-event of some elements such as img, a, etc.\n\n\nfunction dragstart(event) {\n  event.preventDefault();\n}\n\nvar PointerEvent = /*#__PURE__*/function () {\n  /**\n   * Create a `PointerEvent` instance.\n   * @param {Object} [options] - Options\n   */\n  function PointerEvent(options) {\n    var _this = this;\n\n    _classCallCheck(this, PointerEvent);\n\n    this.startHandlers = {};\n    this.lastHandlerId = 0;\n    this.curPointerClass = null;\n    this.curTouchId = null;\n    this.lastPointerXY = {\n      clientX: 0,\n      clientY: 0\n    };\n    this.lastTouchTime = 0; // Options\n\n    this.options = {\n      // Default\n      preventDefault: true,\n      stopPropagation: true\n    };\n\n    if (options) {\n      ['preventDefault', 'stopPropagation'].forEach(function (option) {\n        if (typeof options[option] === 'boolean') {\n          _this.options[option] = options[option];\n        }\n      });\n    }\n  }\n  /**\n   * @param {function} startHandler - This is called with pointerXY when it starts. This returns boolean.\n   * @returns {number} handlerId which is used for adding/removing to element.\n   */\n\n\n  _createClass(PointerEvent, [{\n    key: \"regStartHandler\",\n    value: function regStartHandler(startHandler) {\n      var that = this;\n\n      that.startHandlers[++that.lastHandlerId] = function (event) {\n        var pointerClass = event.type === 'mousedown' ? 'mouse' : 'touch',\n            now = Date.now();\n        var pointerXY, touchId;\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = now; // Avoid mouse events emulation\n\n          pointerXY = event.changedTouches[0];\n          touchId = event.changedTouches[0].identifier;\n        } else {\n          // Avoid mouse events emulation\n          if (now - that.lastTouchTime < MOUSE_EMU_INTERVAL) {\n            return;\n          }\n\n          pointerXY = event;\n        }\n\n        if (!hasXY(pointerXY)) {\n          throw new Error('No clientX/clientY');\n        } // It is new one even if those are 'mouse' or ID is same, then cancel current one.\n\n\n        if (that.curPointerClass) {\n          that.cancel();\n        }\n\n        if (startHandler.call(that, pointerXY)) {\n          that.curPointerClass = pointerClass;\n          that.curTouchId = pointerClass === 'touch' ? touchId : null;\n          that.lastPointerXY.clientX = pointerXY.clientX;\n          that.lastPointerXY.clientY = pointerXY.clientY;\n\n          if (that.options.preventDefault) {\n            event.preventDefault();\n          }\n\n          if (that.options.stopPropagation) {\n            event.stopPropagation();\n          }\n        }\n      };\n\n      return that.lastHandlerId;\n    }\n    /**\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"unregStartHandler\",\n    value: function unregStartHandler(handlerId) {\n      delete this.startHandlers[handlerId];\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"addStartHandler\",\n    value: function addStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      addEventListenerWithOptions(element, 'mousedown', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchstart', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'dragstart', dragstart, {\n        capture: false,\n        passive: false\n      });\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"removeStartHandler\",\n    value: function removeStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      element.removeEventListener('mousedown', this.startHandlers[handlerId], false);\n      element.removeEventListener('touchstart', this.startHandlers[handlerId], false);\n      element.removeEventListener('dragstart', dragstart, false);\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} moveHandler - This is called with pointerXY when it moves.\n     * @param {?boolean} rawEvent - Capture events without `requestAnimationFrame`.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addMoveHandler\",\n    value: function addMoveHandler(element, moveHandler, rawEvent) {\n      var that = this;\n\n      function handler(event) {\n        var pointerClass = event.type === 'mousemove' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) : event;\n\n          if (hasXY(pointerXY)) {\n            if (pointerXY.clientX !== that.lastPointerXY.clientX || pointerXY.clientY !== that.lastPointerXY.clientY) {\n              that.move(pointerXY);\n            }\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      var wrappedHandler = rawEvent ? handler : AnimEvent.add(handler);\n      addEventListenerWithOptions(element, 'mousemove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchmove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curMoveHandler = moveHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"move\",\n    value: function move(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curMoveHandler) {\n        this.curMoveHandler(this.lastPointerXY);\n      }\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} endHandler - This is called with pointerXY when it ends.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addEndHandler\",\n    value: function addEndHandler(element, endHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        var pointerClass = event.type === 'mouseup' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}) : // `{}` means matching\n          event;\n\n          if (pointerXY) {\n            that.end(pointerXY);\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'mouseup', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curEndHandler = endHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"end\",\n    value: function end(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curEndHandler) {\n        this.curEndHandler(this.lastPointerXY);\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} cancelHandler - This is called when it cancels.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addCancelHandler\",\n    value: function addCancelHandler(element, cancelHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        /*\n          Now, this is fired by touchcancel only, but it might be fired even if curPointerClass is mouse.\n        */\n        // const pointerClass = 'touch';\n        that.lastTouchTime = Date.now(); // Avoid mouse events emulation\n\n        if (that.curPointerClass != null) {\n          var pointerXY = getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}); // `{}` means matching\n\n          if (pointerXY) {\n            that.cancel();\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'touchcancel', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curCancelHandler = cancelHandler;\n    }\n    /**\n     * @returns {void}\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      if (this.curCancelHandler) {\n        this.curCancelHandler();\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n  }], [{\n    key: \"addEventListenerWithOptions\",\n    get: function get() {\n      return addEventListenerWithOptions;\n    }\n    /**\n     * Emulate `click` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initClickEmulator\",\n    value: function initClickEmulator(element, moveTolerance, timeTolerance) {\n      if (CLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      CLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, touchId, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      addEventListenerWithOptions(element, 'touchstart', function (event) {\n        var touch = event.changedTouches[0];\n        startX = touch.clientX;\n        startY = touch.clientY;\n        touchId = touch.identifier;\n        startMs = performance.now();\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', function (event) {\n        var touch = getTouchById(event.changedTouches, touchId);\n\n        if (typeof startX === 'number' && typeof startY === 'number' && typeof startMs === 'number' && touch && typeof touch.clientX === 'number' && typeof touch.clientY === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: touch.clientX,\n          y: touch.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance) {\n          // FIRE\n          setTimeout(function () {\n            var newEvent = new MouseEvent('click', {\n              clientX: touch.clientX,\n              clientY: touch.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n        }\n\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchcancel', function () {\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n    /**\n     * Emulate `dblclick` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initDblClickEmulator\",\n    value: function initDblClickEmulator(element, moveTolerance, timeTolerance) {\n      if (DBLCLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      DBLCLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      PointerEvent.initClickEmulator(element, moveTolerance, timeTolerance);\n      addEventListenerWithOptions(element, 'click', function (event) {\n        if (!event.emulated || // Ignore events that are not from `touchend`.\n        typeof event.clientX !== 'number' || typeof event.clientY !== 'number') {\n          return;\n        }\n\n        if (typeof startX === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: event.clientX,\n          y: event.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance * 2) {\n          // up (tolerance) down (tolerance) up\n          setTimeout(function () {\n            // FIRE\n            var newEvent = new MouseEvent('dblclick', {\n              clientX: event.clientX,\n              clientY: event.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n          startX = startY = startMs = null;\n        } else {\n          // 1st\n          startX = event.clientX;\n          startY = event.clientY;\n          startMs = performance.now();\n        }\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n  }]);\n\n  return PointerEvent;\n}();\n\nexport default PointerEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * CSSPrefix\n * https://github.com/anseki/cssprefix\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction ucf(text) {\n  return text.substr(0, 1).toUpperCase() + text.substr(1);\n}\n\nvar PREFIXES = ['webkit', 'moz', 'ms', 'o'],\n    NAME_PREFIXES = PREFIXES.reduce(function (prefixes, prefix) {\n  prefixes.push(prefix);\n  prefixes.push(ucf(prefix));\n  return prefixes;\n}, []),\n    VALUE_PREFIXES = PREFIXES.map(function (prefix) {\n  return \"-\".concat(prefix, \"-\");\n}),\n\n/**\n * Get sample CSSStyleDeclaration.\n * @returns {CSSStyleDeclaration}\n */\ngetDeclaration = function () {\n  var declaration;\n  return function () {\n    return declaration = declaration || document.createElement('div').style;\n  };\n}(),\n\n/**\n * Normalize name.\n * @param {} propName - A name that is normalized.\n * @returns {string} A normalized name.\n */\nnormalizeName = function () {\n  var rePrefixedName = new RegExp('^(?:' + PREFIXES.join('|') + ')(.)', 'i'),\n      reUc = /[A-Z]/;\n  return function (propName) {\n    return (propName = (propName + '').replace(/\\s/g, '').replace(/-([\\da-z])/gi, function (str, p1) {\n      return p1.toUpperCase();\n    }) // camelCase\n    // 'ms' and 'Ms' are found by rePrefixedName 'i' option\n    .replace(rePrefixedName, function (str, p1) {\n      return reUc.test(p1) ? p1.toLowerCase() : str;\n    }) // Remove prefix\n    ).toLowerCase() === 'float' ? 'cssFloat' : propName;\n  }; // For old CSSOM\n}(),\n\n/**\n * Normalize value.\n * @param {} propValue - A value that is normalized.\n * @returns {string} A normalized value.\n */\nnormalizeValue = function () {\n  var rePrefixedValue = new RegExp('^(?:' + VALUE_PREFIXES.join('|') + ')', 'i');\n  return function (propValue) {\n    return (propValue != null ? propValue + '' : '').replace(/\\s/g, '').replace(rePrefixedValue, '');\n  };\n}(),\n\n/**\n * Polyfill for `CSS.supports`.\n * @param {string} propName - A name.\n * @param {string} propValue - A value.\n *     Since `CSSStyleDeclaration.setProperty` might return unexpected result,\n *     the `propValue` should be checked before the `cssSupports` is called.\n * @returns {boolean} `true` if given pair is accepted.\n */\ncssSupports = function () {\n  return (// return window.CSS && window.CSS.supports || ((propName, propValue) => {\n    // `CSS.supports` doesn't find prefixed property.\n    function (propName, propValue) {\n      var declaration = getDeclaration(); // In some browsers, `declaration[prop] = value` updates any property.\n\n      propName = propName.replace(/[A-Z]/g, function (str) {\n        return \"-\".concat(str.toLowerCase());\n      }); // kebab-case\n\n      declaration.setProperty(propName, propValue);\n      return declaration[propName] != null && // Because getPropertyValue returns '' if it is unsupported\n      declaration.getPropertyValue(propName) === propValue;\n    }\n  );\n}(),\n    // Cache\npropNames = {},\n    propValues = {};\n\nfunction getName(propName) {\n  propName = normalizeName(propName);\n\n  if (propName && propNames[propName] == null) {\n    var declaration = getDeclaration();\n\n    if (declaration[propName] != null) {\n      // Original\n      propNames[propName] = propName;\n    } else {\n      // Try with prefixes\n      var ucfName = ucf(propName);\n\n      if (!NAME_PREFIXES.some(function (prefix) {\n        var prefixed = prefix + ucfName;\n\n        if (declaration[prefixed] != null) {\n          propNames[propName] = prefixed;\n          return true;\n        }\n\n        return false;\n      })) {\n        propNames[propName] = false;\n      }\n    }\n  }\n\n  return propNames[propName] || void 0;\n}\n\nfunction getValue(propName, propValue) {\n  var res;\n\n  if (!(propName = getName(propName))) {\n    return res;\n  } // Invalid property\n\n\n  propValues[propName] = propValues[propName] || {};\n  (Array.isArray(propValue) ? propValue : [propValue]).some(function (propValue) {\n    propValue = normalizeValue(propValue);\n\n    if (propValues[propName][propValue] != null) {\n      // Cache\n      if (propValues[propName][propValue] !== false) {\n        res = propValues[propName][propValue];\n        return true;\n      }\n\n      return false; // Continue to next value\n    }\n\n    if (cssSupports(propName, propValue)) {\n      // Original\n      res = propValues[propName][propValue] = propValue;\n      return true;\n    }\n\n    if (VALUE_PREFIXES.some(function (prefix) {\n      // Try with prefixes\n      var prefixed = prefix + propValue;\n\n      if (cssSupports(propName, prefixed)) {\n        res = propValues[propName][propValue] = prefixed;\n        return true;\n      }\n\n      return false;\n    })) {\n      return true;\n    }\n\n    propValues[propName][propValue] = false;\n    return false; // Continue to next value\n  });\n  return typeof res === 'string' ? res : void 0; // It might be empty string.\n}\n\nvar CSSPrefix = {\n  getName: getName,\n  getValue: getValue\n};\nexport default CSSPrefix;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * mClassList\n * https://github.com/anseki/m-class-list\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction normalize(token) {\n  return (token + '').trim();\n} // Not `||`\n\n\nfunction applyList(list, element) {\n  element.setAttribute('class', list.join(' '));\n}\n\nfunction _add(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    if (!(token = normalize(token)) || list.indexOf(token) !== -1) {\n      return false;\n    }\n\n    list.push(token);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _remove(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    var i;\n\n    if (!(token = normalize(token)) || (i = list.indexOf(token)) === -1) {\n      return false;\n    }\n\n    list.splice(i, 1);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _toggle(list, element, token, force) {\n  var i = list.indexOf(token = normalize(token));\n\n  if (i !== -1) {\n    if (force) {\n      return true;\n    }\n\n    list.splice(i, 1);\n    applyList(list, element);\n    return false;\n  }\n\n  if (force === false) {\n    return false;\n  }\n\n  list.push(token);\n  applyList(list, element);\n  return true;\n}\n\nfunction _replace(list, element, token, newToken) {\n  var i;\n\n  if (!(token = normalize(token)) || !(newToken = normalize(newToken)) || token === newToken || (i = list.indexOf(token)) === -1) {\n    return;\n  }\n\n  list.splice(i, 1);\n\n  if (list.indexOf(newToken) === -1) {\n    list.push(newToken);\n  }\n\n  applyList(list, element);\n}\n\nfunction mClassList(element) {\n  return !mClassList.ignoreNative && element.classList || function () {\n    var list = (element.getAttribute('class') || '').trim().split(/\\s+/).filter(function (token) {\n      return !!token;\n    }),\n        ins = {\n      length: list.length,\n      item: function item(i) {\n        return list[i];\n      },\n      contains: function contains(token) {\n        return list.indexOf(normalize(token)) !== -1;\n      },\n      add: function add() {\n        _add(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      remove: function remove() {\n        _remove(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      toggle: function toggle(token, force) {\n        return _toggle(list, element, token, force);\n      },\n      replace: function replace(token, newToken) {\n        _replace(list, element, token, newToken);\n\n        return mClassList.methodChain ? ins : void 0;\n      }\n    };\n    return ins;\n  }();\n}\n\nmClassList.methodChain = true;\nexport default mClassList;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\n * PlainDraggable\n * https://anseki.github.io/plain-draggable/\n *\n * Copyright (c) 2024 anseki\n * Licensed under the MIT license.\n */\nimport PointerEvent from 'pointer-event';\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nmClassList.ignoreNative = true;\n\nvar ZINDEX = 9000,\n    // [SNAP]\nSNAP_GRAVITY = 20,\n    SNAP_CORNER = 'tl',\n    SNAP_SIDE = 'both',\n    SNAP_EDGE = 'both',\n    SNAP_BASE = 'containment',\n    SNAP_ALL_CORNERS = ['tl', 'tr', 'bl', 'br'],\n    SNAP_ALL_SIDES = ['start', 'end'],\n    SNAP_ALL_EDGES = ['inside', 'outside'],\n    // [/SNAP]\n// [AUTO-SCROLL]\nAUTOSCROLL_SPEED = [40, 200, 1000],\n    AUTOSCROLL_SENSITIVITY = [100, 40, 0],\n    // [/AUTO-SCROLL]\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    IS_WEBKIT = !IS_EDGE && !IS_TRIDENT && !IS_GECKO && !IS_BLINK && // Some engines support `webkit-*` properties.\n!window.chrome && 'WebkitAppearance' in document.documentElement.style,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n    pointerOffset = {},\n    pointerEvent = new PointerEvent();\n\nvar insId = 0,\n    activeProps,\n    hasMoved,\n    body,\n    // CSS property/value\ncssValueDraggableCursor,\n    cssValueDraggingCursor,\n    cssOrgValueBodyCursor,\n    cssPropTransitionProperty,\n    cssPropTransform,\n    cssPropUserSelect,\n    cssOrgValueBodyUserSelect,\n    // Try to set `cursor` property.\ncssWantedValueDraggableCursor = IS_WEBKIT ? ['all-scroll', 'move'] : ['grab', 'all-scroll', 'move'],\n    cssWantedValueDraggingCursor = IS_WEBKIT ? 'move' : ['grabbing', 'move'],\n    // class\ndraggableClass = 'plain-draggable',\n    draggingClass = 'plain-draggable-dragging',\n    movingClass = 'plain-draggable-moving'; // [AUTO-SCROLL]\n// Scroll Animation Controller\n\nvar scrollFrame = {},\n    MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nrequestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\n{\n  /**\n   * @typedef {Object} MoveArgs\n   * @property {number} dir - [-1 | 1] minus or plus to position value.\n   * @property {number} speed - px/ms\n   * @property {number} min - Minimum position value.\n   * @property {number} max - Maximum position value.\n   * @property {number} [lastFrameTime] - Time of last frame.\n   * @property {number} [lastValue] - Strict value of last frame.\n   */\n  var curXyMoveArgs = {},\n      curElement,\n      curScrollXY,\n      requestID;\n\n  function frameUpdate() {\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        var timeLen = now - moveArgs.lastFrameTime,\n            absValue = curScrollXY(curElement, xy),\n            curValue = moveArgs.lastValue != null && Math.abs(moveArgs.lastValue - absValue) < 10 // It was not moved manually\n        ? moveArgs.lastValue : absValue;\n\n        if (moveArgs.dir === -1 ? curValue > moveArgs.min : curValue < moveArgs.max) {\n          var newValue = curValue + moveArgs.speed * timeLen * moveArgs.dir;\n\n          if (newValue < moveArgs.min) {\n            newValue = moveArgs.min;\n          } else if (newValue > moveArgs.max) {\n            newValue = moveArgs.max;\n          }\n\n          curScrollXY(curElement, xy, newValue);\n          moveArgs.lastValue = newValue;\n        }\n\n        moveArgs.lastFrameTime = now;\n      }\n    });\n  }\n\n  function frame() {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    requestID = requestAnim.call(window, frame);\n  }\n  /**\n   * @param {Element} element - A target element.\n   * @param {{x: ?MoveArgs, y: ?MoveArgs}} xyMoveArgs - MoveArgs for x and y\n   * @param {function} scrollXY - (element: Element, xy: string, value: number) => number\n   * @returns {void}\n   */\n\n\n  scrollFrame.move = function (element, xyMoveArgs, scrollXY) {\n    cancelAnim.call(window, requestID);\n    frameUpdate(); // Update current data now because it might be not continuation.\n    // Re-use lastValue\n\n    if (curElement === element) {\n      if (xyMoveArgs.x && curXyMoveArgs.x) {\n        xyMoveArgs.x.lastValue = curXyMoveArgs.x.lastValue;\n      }\n\n      if (xyMoveArgs.y && curXyMoveArgs.y) {\n        xyMoveArgs.y.lastValue = curXyMoveArgs.y.lastValue;\n      }\n    }\n\n    curElement = element;\n    curXyMoveArgs = xyMoveArgs;\n    curScrollXY = scrollXY;\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        moveArgs.lastFrameTime = now;\n      }\n    });\n    requestID = requestAnim.call(window, frame);\n  };\n\n  scrollFrame.stop = function () {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    curXyMoveArgs = {};\n    curElement = null; // Remove reference\n  };\n}\n\nfunction scrollXYWindow(element, xy, value) {\n  if (value != null) {\n    if (xy === 'x') {\n      element.scrollTo(value, element.pageYOffset);\n    } else {\n      element.scrollTo(element.pageXOffset, value);\n    }\n  }\n\n  return xy === 'x' ? element.pageXOffset : element.pageYOffset;\n}\n\nfunction scrollXYElement(element, xy, value) {\n  var prop = xy === 'x' ? 'scrollLeft' : 'scrollTop';\n\n  if (value != null) {\n    element[prop] = value;\n  }\n\n  return element[prop];\n}\n/**\n * @typedef {Object} Scrollable\n * @property {number} clientWidth - width of scrollable area.\n * @property {number} clientHeight - height of scrollable area.\n * @property {number} scrollWidth - width of inner content.\n * @property {number} scrollHeight - height of inner content.\n * @property {number} clientX - X of scrollable area, document coordinate.\n * @property {number} clientY - T of scrollable area, document coordinate.\n */\n\n/**\n * @param {Element} element - A target element.\n * @param {boolean} [isWindow] - `true` if element is window.\n * @param {boolean} [dontScroll] - `true` makes it skip scroll that gets scrollWidth/Height.\n * @returns {Scrollable} Information for scroll.\n */\n\n\nfunction getScrollable(element, isWindow, dontScroll) {\n  var scrollable = {};\n  var cmpStyleHtml, cmpStyleBody, cmpStyleElement; // clientWidth/Height\n\n  (function (target) {\n    scrollable.clientWidth = target.clientWidth;\n    scrollable.clientHeight = target.clientHeight;\n  })(isWindow ? document.documentElement : element); // scrollWidth/Height\n\n  /*\n    Gecko bug, bottom-padding of element is reduced.\n    Blink for Android bug, borders of <html> is rendered but those are not added to scrollW/H.\n    Then, move it to max scroll position (sufficiently larger values) forcibly, and get scroll position.\n  */\n\n\n  var maxScrollLeft = 0,\n      maxScrollTop = 0;\n\n  if (!dontScroll) {\n    var curScrollLeft, curScrollTop;\n\n    if (isWindow) {\n      curScrollLeft = scrollXYWindow(element, 'x');\n      curScrollTop = scrollXYWindow(element, 'y');\n      cmpStyleHtml = getComputedStyle(document.documentElement, '');\n      cmpStyleBody = getComputedStyle(document.body, '');\n      maxScrollLeft = scrollXYWindow(element, 'x', document.documentElement.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYWindow(element, 'y', document.documentElement.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      scrollXYWindow(element, 'x', curScrollLeft);\n      scrollXYWindow(element, 'y', curScrollTop);\n    } else {\n      curScrollLeft = scrollXYElement(element, 'x');\n      curScrollTop = scrollXYElement(element, 'y');\n      cmpStyleElement = getComputedStyle(element, '');\n      maxScrollLeft = scrollXYElement(element, 'x', element.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYElement(element, 'y', element.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      scrollXYElement(element, 'x', curScrollLeft);\n      scrollXYElement(element, 'y', curScrollTop);\n    }\n  }\n\n  scrollable.scrollWidth = scrollable.clientWidth + maxScrollLeft;\n  scrollable.scrollHeight = scrollable.clientHeight + maxScrollTop; // clientX/Y\n\n  var rect;\n\n  if (isWindow) {\n    scrollable.clientX = scrollable.clientY = 0;\n  } else {\n    // padding-box\n    rect = element.getBoundingClientRect();\n\n    if (!cmpStyleElement) {\n      cmpStyleElement = getComputedStyle(element, '');\n    }\n\n    scrollable.clientX = rect.left + (parseFloat(cmpStyleElement.borderLeftWidth) || 0);\n    scrollable.clientY = rect.top + (parseFloat(cmpStyleElement.borderTopWidth) || 0);\n  }\n\n  return scrollable;\n} // [/AUTO-SCROLL]\n\n\nfunction copyTree(obj) {\n  return !obj ? obj : isObject(obj) ? Object.keys(obj).reduce(function (copyObj, key) {\n    copyObj[key] = copyTree(obj[key]);\n    return copyObj;\n  }, {}) : Array.isArray(obj) ? obj.map(copyTree) : obj;\n}\n\nfunction hasChanged(a, b) {\n  var typeA, keysA;\n  return _typeof(a) !== _typeof(b) || (typeA = isObject(a) ? 'obj' : Array.isArray(a) ? 'array' : '') !== (isObject(b) ? 'obj' : Array.isArray(b) ? 'array' : '') || (typeA === 'obj' ? hasChanged(keysA = Object.keys(a).sort(), Object.keys(b).sort()) || keysA.some(function (prop) {\n    return hasChanged(a[prop], b[prop]);\n  }) : typeA === 'array' ? a.length !== b.length || a.some(function (aVal, i) {\n    return hasChanged(aVal, b[i]);\n  }) : a !== b);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} x - Substitutes for left\n * @property {(number|null)} y - Substitutes for top\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(BBox|null)} A normalized `BBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var value;\n\n  if (isFinite(value = bBox.left) || isFinite(value = bBox.x)) {\n    bBox.left = bBox.x = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(value = bBox.top) || isFinite(value = bBox.y)) {\n    bBox.top = bBox.y = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.width) && bBox.width >= 0) {\n    bBox.right = bBox.left + bBox.width;\n  } else if (isFinite(bBox.right) && bBox.right >= bBox.left) {\n    bBox.width = bBox.right - bBox.left;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.height) && bBox.height >= 0) {\n    bBox.bottom = bBox.top + bBox.height;\n  } else if (isFinite(bBox.bottom) && bBox.bottom >= bBox.top) {\n    bBox.height = bBox.bottom - bBox.top;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n/**\n * A value that is Pixels or Ratio\n * @typedef {{value: number, isRatio: boolean}} PPValue\n */\n\n\nfunction validPPValue(value) {\n  // Get PPValue from string (all `/s` were already removed)\n  function string2PPValue(inString) {\n    var matches = /^(.+?)(%)?$/.exec(inString);\n    var value, isRatio;\n    return matches && isFinite(value = parseFloat(matches[1])) ? {\n      value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n      isRatio: isRatio\n    } : null; // 0% -> 0\n  }\n\n  return isFinite(value) ? {\n    value: value,\n    isRatio: false\n  } : typeof value === 'string' ? string2PPValue(value.replace(/\\s/g, '')) : null;\n}\n\nfunction ppValue2OptionValue(ppValue) {\n  return ppValue.isRatio ? \"\".concat(ppValue.value * 100, \"%\") : ppValue.value;\n}\n\nfunction resolvePPValue(ppValue, baseOrigin, baseSize) {\n  return typeof ppValue === 'number' ? ppValue : baseOrigin + ppValue.value * (ppValue.isRatio ? baseSize : 1);\n}\n/**\n * An object that simulates BBox but properties are PPValue.\n * @typedef {Object} PPBBox\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(PPBBox|null)} A normalized `PPBBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validPPBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var ppValue;\n\n  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {\n    bBox.left = bBox.x = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {\n    bBox.top = bBox.y = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {\n    bBox.width = ppValue;\n    delete bBox.right;\n  } else if (ppValue = validPPValue(bBox.right)) {\n    bBox.right = ppValue;\n    delete bBox.width;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {\n    bBox.height = ppValue;\n    delete bBox.bottom;\n  } else if (ppValue = validPPValue(bBox.bottom)) {\n    bBox.bottom = ppValue;\n    delete bBox.height;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n\nfunction ppBBox2OptionObject(ppBBox) {\n  return Object.keys(ppBBox).reduce(function (obj, prop) {\n    obj[prop] = ppValue2OptionValue(ppBBox[prop]);\n    return obj;\n  }, {});\n} // PPBBox -> BBox\n\n\nfunction resolvePPBBox(ppBBox, baseBBox) {\n  var prop2Axis = {\n    left: 'x',\n    right: 'x',\n    x: 'x',\n    width: 'x',\n    top: 'y',\n    bottom: 'y',\n    y: 'y',\n    height: 'y'\n  },\n      baseOriginXY = {\n    x: baseBBox.left,\n    y: baseBBox.top\n  },\n      baseSizeXY = {\n    x: baseBBox.width,\n    y: baseBBox.height\n  };\n  return validBBox(Object.keys(ppBBox).reduce(function (bBox, prop) {\n    bBox[prop] = resolvePPValue(ppBBox[prop], prop === 'width' || prop === 'height' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n    return bBox;\n  }, {}));\n}\n/**\n * @param {Element} element - A target element.\n * @param {?boolean} getPaddingBox - Get padding-box instead of border-box as bounding-box.\n * @returns {BBox} A bounding-box of `element`.\n */\n\n\nfunction getBBox(element, getPaddingBox) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.width,\n    height: rect.height\n  };\n  bBox.left += window.pageXOffset;\n  bBox.top += window.pageYOffset;\n\n  if (getPaddingBox) {\n    var style = window.getComputedStyle(element, ''),\n        borderTop = parseFloat(style.borderTopWidth) || 0,\n        borderRight = parseFloat(style.borderRightWidth) || 0,\n        borderBottom = parseFloat(style.borderBottomWidth) || 0,\n        borderLeft = parseFloat(style.borderLeftWidth) || 0;\n    bBox.left += borderLeft;\n    bBox.top += borderTop;\n    bBox.width -= borderLeft + borderRight;\n    bBox.height -= borderTop + borderBottom;\n  }\n\n  return validBBox(bBox);\n}\n/**\n * Optimize an element for animation.\n * @param {Element} element - A target element.\n * @param {?boolean} gpuTrigger - Initialize for SVGElement if `true`.\n * @returns {Element} A target element.\n */\n\n\nfunction initAnim(element, gpuTrigger) {\n  var style = element.style;\n  style.webkitTapHighlightColor = 'transparent'; // Only when it has no shadow\n\n  var cssPropBoxShadow = CSSPrefix.getName('boxShadow'),\n      boxShadow = window.getComputedStyle(element, '')[cssPropBoxShadow];\n\n  if (!boxShadow || boxShadow === 'none') {\n    style[cssPropBoxShadow] = '0 0 1px transparent';\n  }\n\n  if (gpuTrigger && cssPropTransform) {\n    style[cssPropTransform] = 'translateZ(0)';\n  }\n\n  return element;\n}\n\nfunction setDraggableCursor(element, orgCursor) {\n  if (cssValueDraggableCursor == null) {\n    if (cssWantedValueDraggableCursor !== false) {\n      cssValueDraggableCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggableCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggableCursor == null) {\n      cssValueDraggableCursor = false;\n    }\n  } // Update it to change a state even if cssValueDraggableCursor is false.\n\n\n  element.style.cursor = cssValueDraggableCursor === false ? orgCursor : cssValueDraggableCursor;\n}\n\nfunction setDraggingCursor(element) {\n  if (cssValueDraggingCursor == null) {\n    if (cssWantedValueDraggingCursor !== false) {\n      cssValueDraggingCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggingCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggingCursor == null) {\n      cssValueDraggingCursor = false;\n    }\n  }\n\n  if (cssValueDraggingCursor !== false) {\n    element.style.cursor = cssValueDraggingCursor;\n  }\n} // [SVG]\n\n/**\n * Get SVG coordinates from viewport coordinates.\n * @param {props} props - `props` of instance.\n * @param {number} clientX - viewport X.\n * @param {number} clientY - viewport Y.\n * @returns {SVGPoint} SVG coordinates.\n */\n\n\nfunction viewPoint2SvgPoint(props, clientX, clientY) {\n  var svgPoint = props.svgPoint;\n  svgPoint.x = clientX;\n  svgPoint.y = clientY;\n  return svgPoint.matrixTransform(props.svgCtmElement.getScreenCTM().inverse());\n} // [/SVG]\n\n/**\n * Move by `translate`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveTranslate(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.htmlOffset;\n    props.elementStyle[cssPropTransform] = \"translate(\".concat(position.left + offset.left, \"px, \").concat(position.top + offset.top, \"px)\");\n    return true;\n  }\n\n  return false;\n} // [LEFTTOP]\n\n/**\n * Move by `left` and `top`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveLeftTop(props, position) {\n  var elementBBox = props.elementBBox,\n      elementStyle = props.elementStyle,\n      offset = props.htmlOffset;\n  var moved = false;\n\n  if (position.left !== elementBBox.left) {\n    elementStyle.left = position.left + offset.left + 'px';\n    moved = true;\n  }\n\n  if (position.top !== elementBBox.top) {\n    elementStyle.top = position.top + offset.top + 'px';\n    moved = true;\n  }\n\n  return moved;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Move SVGElement.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveSvg(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.svgOffset,\n        originBBox = props.svgOriginBBox,\n        point = viewPoint2SvgPoint(props, position.left - window.pageXOffset, position.top - window.pageYOffset);\n    props.svgTransform.setTranslate(point.x + offset.x - originBBox.x, point.y + offset.y - originBBox.y);\n    return true;\n  }\n\n  return false;\n} // [/SVG]\n\n/**\n * Set `props.element` position.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @param {function} [cbCheck] - Callback that is called with valid position, cancel moving if it returns `false`.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction move(props, position, cbCheck) {\n  var elementBBox = props.elementBBox;\n\n  function fix() {\n    if (props.minLeft >= props.maxLeft) {\n      // Disabled\n      position.left = elementBBox.left;\n    } else if (position.left < props.minLeft) {\n      position.left = props.minLeft;\n    } else if (position.left > props.maxLeft) {\n      position.left = props.maxLeft;\n    }\n\n    if (props.minTop >= props.maxTop) {\n      // Disabled\n      position.top = elementBBox.top;\n    } else if (position.top < props.minTop) {\n      position.top = props.minTop;\n    } else if (position.top > props.maxTop) {\n      position.top = props.maxTop;\n    }\n  }\n\n  fix();\n\n  if (cbCheck) {\n    if (cbCheck(position) === false) {\n      return false;\n    }\n\n    fix(); // Again\n  }\n\n  var moved = props.moveElm(props, position);\n\n  if (moved) {\n    // Update elementBBox\n    props.elementBBox = validBBox({\n      left: position.left,\n      top: position.top,\n      width: elementBBox.width,\n      height: elementBBox.height\n    });\n  }\n\n  return moved;\n}\n/**\n * Initialize HTMLElement for `translate`, and get `offset` that is used by `moveTranslate`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initTranslate(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['display', 'marginTop', 'marginBottom', 'width', 'height'];\n  RESTORE_PROPS.unshift(cssPropTransform); // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element),\n      cmpStyle = window.getComputedStyle(element, ''); // https://www.w3.org/TR/css-transforms-1/#transformable-element\n\n  if (cmpStyle.display === 'inline') {\n    elementStyle.display = 'inline-block';\n    ['Top', 'Bottom'].forEach(function (dirProp) {\n      var padding = parseFloat(cmpStyle[\"padding\".concat(dirProp)]); // paddingTop/Bottom make padding but don't make space -> negative margin in inline-block\n      // marginTop/Bottom don't work in inline element -> `0` in inline-block\n\n      elementStyle[\"margin\".concat(dirProp)] = padding ? \"-\".concat(padding, \"px\") : '0';\n    });\n  }\n\n  elementStyle[cssPropTransform] = 'translate(0, 0)'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle[cssPropTransform] = \"translate(\".concat(curPosition.left + offset.left, \"px, \").concat(curPosition.top + offset.top, \"px)\"); // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle[cssPropTransform] = \"translate(\".concat(fixPosition.left + offset.left, \"px, \").concat(fixPosition.top + offset.top, \"px)\");\n  }\n\n  return fixPosition;\n} // [LEFTTOP]\n\n/**\n * Initialize HTMLElement for `left` and `top`, and get `offset` that is used by `moveLeftTop`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initLeftTop(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['position', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'width', 'height']; // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element);\n  elementStyle.position = 'absolute';\n  elementStyle.left = elementStyle.top = elementStyle.margin = '0'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle.left = curPosition.left + offset.left + 'px';\n  elementStyle.top = curPosition.top + offset.top + 'px'; // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle.left = fixPosition.left + offset.left + 'px';\n    elementStyle.top = fixPosition.top + offset.top + 'px';\n  }\n\n  return fixPosition;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Initialize SVGElement, and get `offset` that is used by `moveSvg`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initSvg(props) {\n  var element = props.element,\n      svgTransform = props.svgTransform,\n      curRect = element.getBoundingClientRect(),\n      // Get Rect before change position.\n  fixPosition = getBBox(element);\n  svgTransform.setTranslate(0, 0);\n  var originBBox = props.svgOriginBBox = element.getBBox(),\n      // Try to get SVG coordinates of current position.\n  newRect = element.getBoundingClientRect(),\n      originPoint = viewPoint2SvgPoint(props, newRect.left, newRect.top),\n      // Gecko bug, getScreenCTM returns incorrect CTM, and originPoint might not be current position.\n  offset = props.svgOffset = {\n    x: originBBox.x - originPoint.x,\n    y: originBBox.y - originPoint.y\n  },\n      // Restore position\n  curPoint = viewPoint2SvgPoint(props, curRect.left, curRect.top);\n  svgTransform.setTranslate(curPoint.x + offset.x - originBBox.x, curPoint.y + offset.y - originBBox.y);\n  return fixPosition;\n} // [/SVG]\n\n/**\n * Set `elementBBox`, `containmentBBox`, `min/max``Left/Top` and `snapTargets`.\n * @param {props} props - `props` of instance.\n * @param {string} [eventType] - A type of event that kicked this method.\n * @returns {void}\n */\n\n\nfunction initBBox(props, eventType) {\n  // eslint-disable-line no-unused-vars\n  var docBBox = getBBox(document.documentElement),\n      elementBBox = props.elementBBox = props.initElm(props),\n      // reset offset etc.\n  containmentBBox = props.containmentBBox = props.containmentIsBBox ? resolvePPBBox(props.options.containment, docBBox) || docBBox : getBBox(props.options.containment, true);\n  props.minLeft = containmentBBox.left;\n  props.maxLeft = containmentBBox.right - elementBBox.width;\n  props.minTop = containmentBBox.top;\n  props.maxTop = containmentBBox.bottom - elementBBox.height; // Adjust position\n\n  move(props, {\n    left: elementBBox.left,\n    top: elementBBox.top\n  }); // [SNAP]\n  // Snap-targets\n\n  /**\n   * @typedef {Object} SnapTarget\n   * @property {number} [x] - A coordinate it moves to. It has x or y or both.\n   * @property {number} [y]\n   * @property {number} [gravityXStart] - Gravity zone. It has *Start or *End or both, and *X* or *Y* or both.\n   * @property {number} [gravityXEnd]\n   * @property {number} [gravityYStart]\n   * @property {number} [gravityYEnd]\n   */\n\n  if (props.parsedSnapTargets) {\n    var elementSizeXY = {\n      x: elementBBox.width,\n      y: elementBBox.height\n    },\n        minXY = {\n      x: props.minLeft,\n      y: props.minTop\n    },\n        maxXY = {\n      x: props.maxLeft,\n      y: props.maxTop\n    },\n        prop2Axis = {\n      left: 'x',\n      right: 'x',\n      x: 'x',\n      width: 'x',\n      xStart: 'x',\n      xEnd: 'x',\n      xStep: 'x',\n      top: 'y',\n      bottom: 'y',\n      y: 'y',\n      height: 'y',\n      yStart: 'y',\n      yEnd: 'y',\n      yStep: 'y'\n    },\n        snapTargets = props.parsedSnapTargets.reduce(function (snapTargets, parsedSnapTarget) {\n      var baseRect = parsedSnapTarget.base === 'containment' ? containmentBBox : docBBox,\n          baseOriginXY = {\n        x: baseRect.left,\n        y: baseRect.top\n      },\n          baseSizeXY = {\n        x: baseRect.width,\n        y: baseRect.height\n      };\n      /**\n       * Basically, shallow copy from parsedSnapTarget, and it can have resolved values.\n       * @typedef {{x: (number|PPValue), y, xStart, xEnd, xStep, yStart, yEnd, yStep}} TargetXY\n       * @property {string[]} [corners] - Applied value.\n       * @property {string[]} [sides]\n       * @property {boolean} center\n       * @property {number} [xGravity] - Override parsedSnapTarget.gravity.\n       * @property {number} [yGravity]\n       */\n      // Add single Point or Line (i.e. targetXY has no *Step)\n\n      function addSnapTarget(targetXY) {\n        if (targetXY.center == null) {\n          targetXY.center = parsedSnapTarget.center;\n        }\n\n        if (targetXY.xGravity == null) {\n          targetXY.xGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.yGravity == null) {\n          targetXY.yGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.x != null && targetXY.y != null) {\n          // Point\n          targetXY.x = resolvePPValue(targetXY.x, baseOriginXY.x, baseSizeXY.x);\n          targetXY.y = resolvePPValue(targetXY.y, baseOriginXY.y, baseSizeXY.y);\n\n          if (targetXY.center) {\n            targetXY.x -= elementSizeXY.x / 2;\n            targetXY.y -= elementSizeXY.y / 2;\n            targetXY.corners = ['tl'];\n          }\n\n          (targetXY.corners || parsedSnapTarget.corners).forEach(function (corner) {\n            var x = targetXY.x - (corner === 'tr' || corner === 'br' ? elementSizeXY.x : 0),\n                y = targetXY.y - (corner === 'bl' || corner === 'br' ? elementSizeXY.y : 0);\n\n            if (x >= minXY.x && x <= maxXY.x && y >= minXY.y && y <= maxXY.y) {\n              var snapTarget = {\n                x: x,\n                y: y\n              },\n                  gravityXStart = x - targetXY.xGravity,\n                  gravityXEnd = x + targetXY.xGravity,\n                  gravityYStart = y - targetXY.yGravity,\n                  gravityYEnd = y + targetXY.yGravity;\n\n              if (gravityXStart > minXY.x) {\n                snapTarget.gravityXStart = gravityXStart;\n              }\n\n              if (gravityXEnd < maxXY.x) {\n                snapTarget.gravityXEnd = gravityXEnd;\n              }\n\n              if (gravityYStart > minXY.y) {\n                snapTarget.gravityYStart = gravityYStart;\n              }\n\n              if (gravityYEnd < maxXY.y) {\n                snapTarget.gravityYEnd = gravityYEnd;\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        } else {\n          // Line\n          var specAxis = targetXY.x != null ? 'x' : 'y',\n              rangeAxis = specAxis === 'x' ? 'y' : 'x',\n              startProp = \"\".concat(rangeAxis, \"Start\"),\n              endProp = \"\".concat(rangeAxis, \"End\"),\n              gravityProp = \"\".concat(specAxis, \"Gravity\"),\n              specAxisL = specAxis.toUpperCase(),\n              rangeAxisL = rangeAxis.toUpperCase(),\n              gravitySpecStartProp = \"gravity\".concat(specAxisL, \"Start\"),\n              gravitySpecEndProp = \"gravity\".concat(specAxisL, \"End\"),\n              gravityRangeStartProp = \"gravity\".concat(rangeAxisL, \"Start\"),\n              gravityRangeEndProp = \"gravity\".concat(rangeAxisL, \"End\");\n          targetXY[specAxis] = resolvePPValue(targetXY[specAxis], baseOriginXY[specAxis], baseSizeXY[specAxis]);\n          targetXY[startProp] = resolvePPValue(targetXY[startProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]);\n          targetXY[endProp] = resolvePPValue(targetXY[endProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]) - elementSizeXY[rangeAxis]; // Reduce the end of the line.\n\n          if (targetXY[startProp] > targetXY[endProp] || // Smaller than element size.\n          targetXY[startProp] > maxXY[rangeAxis] || targetXY[endProp] < minXY[rangeAxis]) {\n            return;\n          }\n\n          if (targetXY.center) {\n            targetXY[specAxis] -= elementSizeXY[specAxis] / 2;\n            targetXY.sides = ['start'];\n          }\n\n          (targetXY.sides || parsedSnapTarget.sides).forEach(function (side) {\n            var xy = targetXY[specAxis] - (side === 'end' ? elementSizeXY[specAxis] : 0);\n\n            if (xy >= minXY[specAxis] && xy <= maxXY[specAxis]) {\n              var snapTarget = {},\n                  gravitySpecStart = xy - targetXY[gravityProp],\n                  gravitySpecEnd = xy + targetXY[gravityProp];\n              snapTarget[specAxis] = xy;\n\n              if (gravitySpecStart > minXY[specAxis]) {\n                snapTarget[gravitySpecStartProp] = gravitySpecStart;\n              }\n\n              if (gravitySpecEnd < maxXY[specAxis]) {\n                snapTarget[gravitySpecEndProp] = gravitySpecEnd;\n              }\n\n              if (targetXY[startProp] > minXY[rangeAxis]) {\n                snapTarget[gravityRangeStartProp] = targetXY[startProp];\n              }\n\n              if (targetXY[endProp] < maxXY[rangeAxis]) {\n                snapTarget[gravityRangeEndProp] = targetXY[endProp];\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        }\n      }\n\n      var bBox;\n\n      if ((bBox = parsedSnapTarget.element ? getBBox(parsedSnapTarget.element) : null) || // Element\n      parsedSnapTarget.ppBBox) {\n        if (parsedSnapTarget.ppBBox) {\n          bBox = resolvePPBBox(parsedSnapTarget.ppBBox, baseRect);\n        } // BBox\n\n\n        if (bBox) {\n          // Drop invalid BBox.\n          // Expand into 4 lines.\n          parsedSnapTarget.edges.forEach(function (edge) {\n            var lengthenX = parsedSnapTarget.gravity,\n                lengthenY = parsedSnapTarget.gravity;\n\n            if (edge === 'outside') {\n              // Snap it when a part of the element is part of the range.\n              lengthenX += elementBBox.width;\n              lengthenY += elementBBox.height;\n            }\n\n            var xStart = bBox.left - lengthenX,\n                xEnd = bBox.right + lengthenX,\n                yStart = bBox.top - lengthenY,\n                yEnd = bBox.bottom + lengthenY;\n            var side = edge === 'inside' ? 'start' : 'end';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.top,\n              sides: [side],\n              center: false\n            }); // Top\n\n            addSnapTarget({\n              x: bBox.left,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Left\n\n            side = edge === 'inside' ? 'end' : 'start';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.bottom,\n              sides: [side],\n              center: false\n            }); // Bottom\n\n            addSnapTarget({\n              x: bBox.right,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Right\n          });\n        }\n      } else {\n        var expanded = [['x', 'y', 'xStart', 'xEnd', 'xStep', 'yStart', 'yEnd', 'yStep'].reduce(function (targetXY, prop) {\n          if (parsedSnapTarget[prop]) {\n            targetXY[prop] = resolvePPValue(parsedSnapTarget[prop], prop === 'xStep' || prop === 'yStep' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n          }\n\n          return targetXY;\n        }, {})];\n        ['x', 'y'].forEach(function (axis) {\n          var startProp = \"\".concat(axis, \"Start\"),\n              endProp = \"\".concat(axis, \"End\"),\n              stepProp = \"\".concat(axis, \"Step\"),\n              gravityProp = \"\".concat(axis, \"Gravity\");\n          expanded = expanded.reduce(function (expanded, targetXY) {\n            var start = targetXY[startProp],\n                end = targetXY[endProp],\n                step = targetXY[stepProp];\n\n            if (start != null && end != null && start >= end) {\n              return expanded;\n            } // start >= end\n\n\n            if (step != null) {\n              if (step < 2) {\n                return expanded;\n              } // step >= 2px -> Expand by step\n\n\n              var gravity = step / 2; // max\n\n              gravity = parsedSnapTarget.gravity > gravity ? gravity : null;\n\n              for (var curValue = start; curValue <= end; curValue += step) {\n                var expandedXY = Object.keys(targetXY).reduce(function (expandedXY, prop) {\n                  if (prop !== startProp && prop !== endProp && prop !== stepProp) {\n                    expandedXY[prop] = targetXY[prop];\n                  }\n\n                  return expandedXY;\n                }, {});\n                expandedXY[axis] = curValue;\n                expandedXY[gravityProp] = gravity;\n                expanded.push(expandedXY);\n              }\n            } else {\n              expanded.push(targetXY);\n            }\n\n            return expanded;\n          }, []);\n        });\n        expanded.forEach(function (targetXY) {\n          addSnapTarget(targetXY);\n        });\n      }\n\n      return snapTargets;\n    }, []);\n    props.snapTargets = snapTargets.length ? snapTargets : null;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n\n  var autoScroll = {},\n      autoScrollOptions = props.options.autoScroll;\n\n  if (autoScrollOptions) {\n    autoScroll.isWindow = autoScrollOptions.target === window;\n    autoScroll.target = autoScrollOptions.target;\n    var dontScroll = eventType === 'scroll',\n        // Avoid duplicated calling\n    scrollable = getScrollable(autoScrollOptions.target, autoScroll.isWindow, dontScroll),\n        scrollableBBox = validBBox({\n      left: scrollable.clientX,\n      top: scrollable.clientY,\n      width: scrollable.clientWidth,\n      height: scrollable.clientHeight\n    });\n\n    if (!dontScroll) {\n      autoScroll.scrollWidth = scrollable.scrollWidth;\n      autoScroll.scrollHeight = scrollable.scrollHeight;\n    } else if (props.autoScroll) {\n      autoScroll.scrollWidth = props.autoScroll.scrollWidth;\n      autoScroll.scrollHeight = props.autoScroll.scrollHeight;\n    }\n\n    [['X', 'Width', 'left', 'right'], ['Y', 'Height', 'top', 'bottom']].forEach(function (axis) {\n      var xy = axis[0],\n          wh = axis[1],\n          back = axis[2],\n          forward = axis[3],\n          maxAbs = (autoScroll[\"scroll\".concat(wh)] || 0) - scrollable[\"client\".concat(wh)],\n          min = autoScrollOptions[\"min\".concat(xy)] || 0;\n      var max = isFinite(autoScrollOptions[\"max\".concat(xy)]) ? autoScrollOptions[\"max\".concat(xy)] : maxAbs;\n\n      if (min < max && min < maxAbs) {\n        if (max > maxAbs) {\n          max = maxAbs;\n        }\n\n        var lines = [],\n            elementSize = elementBBox[wh.toLowerCase()];\n\n        for (var i = autoScrollOptions.sensitivity.length - 1; i >= 0; i--) {\n          // near -> far\n          var sensitivity = autoScrollOptions.sensitivity[i],\n              speed = autoScrollOptions.speed[i]; // back\n\n          lines.push({\n            dir: -1,\n            speed: speed,\n            position: scrollableBBox[back] + sensitivity\n          }); // forward\n\n          lines.push({\n            dir: 1,\n            speed: speed,\n            position: scrollableBBox[forward] - sensitivity - elementSize\n          });\n        }\n\n        autoScroll[xy.toLowerCase()] = {\n          min: min,\n          max: max,\n          lines: lines\n        };\n      }\n    });\n  }\n\n  props.autoScroll = autoScroll.x || autoScroll.y ? autoScroll : null; // [/AUTO-SCROLL]\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction dragEnd(props) {\n  scrollFrame.stop(); // [AUTO-SCROLL/]\n\n  setDraggableCursor(props.options.handle, props.orgCursor);\n  body.style.cursor = cssOrgValueBodyCursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.orgZIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = cssOrgValueBodyUserSelect;\n  }\n\n  var classList = mClassList(props.element);\n\n  if (movingClass) {\n    classList.remove(movingClass);\n  }\n\n  if (draggingClass) {\n    classList.remove(draggingClass);\n  }\n\n  activeProps = null;\n  pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)\n\n  if (props.onDragEnd) {\n    props.onDragEnd({\n      left: props.elementBBox.left,\n      top: props.elementBBox.top\n    });\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {{clientX, clientY}} pointerXY - This might be MouseEvent, Touch of TouchEvent or Object.\n * @returns {boolean} `true` if it started.\n */\n\n\nfunction dragStart(props, pointerXY) {\n  if (props.disabled) {\n    return false;\n  }\n\n  if (props.onDragStart && props.onDragStart(pointerXY) === false) {\n    return false;\n  }\n\n  if (activeProps) {\n    dragEnd(activeProps);\n  } // activeItem is normally null by pointerEvent.end.\n\n\n  setDraggingCursor(props.options.handle);\n  body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n  window.getComputedStyle(props.options.handle, '').cursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.options.zIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = 'none';\n  }\n\n  if (draggingClass) {\n    mClassList(props.element).add(draggingClass);\n  }\n\n  activeProps = props;\n  hasMoved = false;\n  pointerOffset.left = props.elementBBox.left - (pointerXY.clientX + window.pageXOffset);\n  pointerOffset.top = props.elementBBox.top - (pointerXY.clientY + window.pageYOffset);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n  var needsInitBBox; // containment\n\n  if (newOptions.containment) {\n    var bBox;\n\n    if (isElement(newOptions.containment)) {\n      // Specific element\n      if (newOptions.containment !== options.containment) {\n        options.containment = newOptions.containment;\n        props.containmentIsBBox = false;\n        needsInitBBox = true;\n      }\n    } else if ((bBox = validPPBBox(copyTree(newOptions.containment))) && // bBox\n    hasChanged(bBox, options.containment)) {\n      options.containment = bBox;\n      props.containmentIsBBox = true;\n      needsInitBBox = true;\n    }\n  } // [SNAP]\n\n  /**\n   * @typedef {Object} SnapOptions\n   * @property {SnapTargetOptions[]} targets\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} SnapTargetOptions\n   * @property {(number|string)} [x] - pixels | '<n>%' | {start, end} | {step, start, end}\n   * @property {(number|string)} [y]\n   * @property {(Element|Object)} [boundingBox] - Object has properties that are string or number from PPBBox.\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} ParsedSnapTarget\n   * @property {PPValue} [x] - (input: pixels | '<n>%')\n   * @property {PPValue} [y]\n   * @property {PPValue} [xStart] - (input: {start, end} | {step, start, end})\n   * @property {PPValue} [xEnd]\n   * @property {PPValue} [xStep] - (input: {step, start, end})\n   * @property {PPValue} [yStart]\n   * @property {PPValue} [yEnd]\n   * @property {PPValue} [yStep]\n   * @property {Element} [element]\n   * @property {PPBBox} [ppBBox]\n   * @property {number} gravity\n   * @property {string[]} corners\n   * @property {string[]} sides\n   * @property {boolean} center\n   * @property {string[]} edges\n   * @property {string} base\n   */\n  // Normalize `gravity`, `corner`, `side`, `center`, `edge`, `base`\n\n\n  function commonSnapOptions(options, newOptions) {\n    function cleanString(inString) {\n      return typeof inString === 'string' ? inString.replace(/[, ]+/g, ' ').trim().toLowerCase() : null;\n    } // gravity\n\n\n    if (isFinite(newOptions.gravity) && newOptions.gravity > 0) {\n      options.gravity = newOptions.gravity;\n    } // corner\n\n\n    var corner = cleanString(newOptions.corner);\n\n    if (corner) {\n      if (corner !== 'all') {\n        var added = {},\n            corners = corner.split(/\\s/).reduce(function (corners, corner) {\n          corner = corner.trim().replace(/^(.).*?-(.).*$/, '$1$2');\n\n          if ((corner = corner === 'tl' || corner === 'lt' ? 'tl' : corner === 'tr' || corner === 'rt' ? 'tr' : corner === 'bl' || corner === 'lb' ? 'bl' : corner === 'br' || corner === 'rb' ? 'br' : null) && !added[corner]) {\n            corners.push(corner);\n            added[corner] = true;\n          }\n\n          return corners;\n        }, []),\n            cornersLen = corners.length;\n        corner = !cornersLen ? null : cornersLen === 4 ? 'all' : corners.join(' ');\n      }\n\n      if (corner) {\n        options.corner = corner;\n      }\n    } // side\n\n\n    var side = cleanString(newOptions.side);\n\n    if (side) {\n      if (side === 'start' || side === 'end' || side === 'both') {\n        options.side = side;\n      } else if (side === 'start end' || side === 'end start') {\n        options.side = 'both';\n      }\n    } // center\n\n\n    if (typeof newOptions.center === 'boolean') {\n      options.center = newOptions.center;\n    } // edge\n\n\n    var edge = cleanString(newOptions.edge);\n\n    if (edge) {\n      if (edge === 'inside' || edge === 'outside' || edge === 'both') {\n        options.edge = edge;\n      } else if (edge === 'inside outside' || edge === 'outside inside') {\n        options.edge = 'both';\n      }\n    } // base\n\n\n    var base = typeof newOptions.base === 'string' ? newOptions.base.trim().toLowerCase() : null;\n\n    if (base && (base === 'containment' || base === 'document')) {\n      options.base = base;\n    }\n\n    return options;\n  } // snap\n\n\n  if (newOptions.snap != null) {\n    var newSnapOptions = isObject(newOptions.snap) && newOptions.snap.targets != null ? newOptions.snap : {\n      targets: newOptions.snap\n    },\n        snapTargetsOptions = [],\n        snapOptions = commonSnapOptions({\n      targets: snapTargetsOptions\n    }, newSnapOptions); // Set default options into top level.\n\n    if (!snapOptions.gravity) {\n      snapOptions.gravity = SNAP_GRAVITY;\n    }\n\n    if (!snapOptions.corner) {\n      snapOptions.corner = SNAP_CORNER;\n    }\n\n    if (!snapOptions.side) {\n      snapOptions.side = SNAP_SIDE;\n    }\n\n    if (typeof snapOptions.center !== 'boolean') {\n      snapOptions.center = false;\n    }\n\n    if (!snapOptions.edge) {\n      snapOptions.edge = SNAP_EDGE;\n    }\n\n    if (!snapOptions.base) {\n      snapOptions.base = SNAP_BASE;\n    }\n\n    var parsedSnapTargets = (Array.isArray(newSnapOptions.targets) ? newSnapOptions.targets : [newSnapOptions.targets]).reduce(function (parsedSnapTargets, target) {\n      if (target == null) {\n        return parsedSnapTargets;\n      }\n\n      var isElementPre = isElement(target),\n          // Pre-check direct value\n      ppBBoxPre = validPPBBox(copyTree(target)),\n          // Pre-check direct value\n      newSnapTargetOptions = isElementPre || ppBBoxPre ? {\n        boundingBox: target\n      } : // Direct Element | PPBBox\n      isObject(target) && target.start == null && target.end == null && target.step == null ? target : // SnapTargetOptions\n      {\n        x: target,\n        y: target\n      },\n          // Others, it might be {step, start, end}\n      expandedParsedSnapTargets = [],\n          snapTargetOptions = {},\n          newOptionsBBox = newSnapTargetOptions.boundingBox;\n      var ppBBox;\n\n      if (isElementPre || isElement(newOptionsBBox)) {\n        // Element\n        expandedParsedSnapTargets.push({\n          element: newOptionsBBox\n        });\n        snapTargetOptions.boundingBox = newOptionsBBox;\n      } else if (ppBBox = ppBBoxPre || validPPBBox(copyTree(newOptionsBBox))) {\n        // Object -> PPBBox\n        expandedParsedSnapTargets.push({\n          ppBBox: ppBBox\n        });\n        snapTargetOptions.boundingBox = ppBBox2OptionObject(ppBBox);\n      } else {\n        var invalid; // `true` if valid PPValue was given but the contained value is invalid.\n\n        var parsedXY = ['x', 'y'].reduce(function (parsedXY, axis) {\n          var newOptionsXY = newSnapTargetOptions[axis];\n          var ppValue;\n\n          if (ppValue = validPPValue(newOptionsXY)) {\n            // pixels | '<n>%'\n            parsedXY[axis] = ppValue;\n            snapTargetOptions[axis] = ppValue2OptionValue(ppValue);\n          } else {\n            // {start, end} | {step, start, end}\n            var start, end, step;\n\n            if (isObject(newOptionsXY)) {\n              start = validPPValue(newOptionsXY.start);\n              end = validPPValue(newOptionsXY.end);\n              step = validPPValue(newOptionsXY.step);\n\n              if (start && end && start.isRatio === end.isRatio && start.value >= end.value) {\n                // start >= end\n                invalid = true;\n              }\n            }\n\n            start = parsedXY[\"\".concat(axis, \"Start\")] = start || {\n              value: 0,\n              isRatio: false\n            };\n            end = parsedXY[\"\".concat(axis, \"End\")] = end || {\n              value: 1,\n              isRatio: true\n            };\n            snapTargetOptions[axis] = {\n              start: ppValue2OptionValue(start),\n              end: ppValue2OptionValue(end)\n            };\n\n            if (step) {\n              if (step.isRatio ? step.value > 0 : step.value >= 2) {\n                // step > 0% || step >= 2px\n                parsedXY[\"\".concat(axis, \"Step\")] = step;\n                snapTargetOptions[axis].step = ppValue2OptionValue(step);\n              } else {\n                invalid = true;\n              }\n            }\n          }\n\n          return parsedXY;\n        }, {});\n\n        if (invalid) {\n          return parsedSnapTargets;\n        }\n\n        if (parsedXY.xStart && !parsedXY.xStep && parsedXY.yStart && !parsedXY.yStep) {\n          // Expand into 4 lines. This is not BBox, and `edge` is ignored.\n          expandedParsedSnapTargets.push({\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yStart\n          }, // Top\n          {\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yEnd\n          }, // Bottom\n          {\n            x: parsedXY.xStart,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          }, // Left\n          {\n            x: parsedXY.xEnd,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          } // Right\n          );\n        } else {\n          expandedParsedSnapTargets.push(parsedXY);\n        }\n      }\n\n      if (expandedParsedSnapTargets.length) {\n        snapTargetsOptions.push(commonSnapOptions(snapTargetOptions, newSnapTargetOptions)); // Copy common SnapOptions\n\n        var corner = snapTargetOptions.corner || snapOptions.corner,\n            side = snapTargetOptions.side || snapOptions.side,\n            edge = snapTargetOptions.edge || snapOptions.edge,\n            commonOptions = {\n          gravity: snapTargetOptions.gravity || snapOptions.gravity,\n          base: snapTargetOptions.base || snapOptions.base,\n          center: typeof snapTargetOptions.center === 'boolean' ? snapTargetOptions.center : snapOptions.center,\n          corners: corner === 'all' ? SNAP_ALL_CORNERS : corner.split(' '),\n          // Split\n          sides: side === 'both' ? SNAP_ALL_SIDES : [side],\n          // Split\n          edges: edge === 'both' ? SNAP_ALL_EDGES : [edge] // Split\n\n        };\n        expandedParsedSnapTargets.forEach(function (parsedSnapTarget) {\n          // Set common SnapOptions\n          ['gravity', 'corners', 'sides', 'center', 'edges', 'base'].forEach(function (option) {\n            parsedSnapTarget[option] = commonOptions[option];\n          });\n          parsedSnapTargets.push(parsedSnapTarget);\n        });\n      }\n\n      return parsedSnapTargets;\n    }, []);\n\n    if (parsedSnapTargets.length) {\n      options.snap = snapOptions; // Update always\n\n      if (hasChanged(parsedSnapTargets, props.parsedSnapTargets)) {\n        props.parsedSnapTargets = parsedSnapTargets;\n        needsInitBBox = true;\n      }\n    }\n  } else if (newOptions.hasOwnProperty('snap') && props.parsedSnapTargets) {\n    options.snap = props.parsedSnapTargets = props.snapTargets = void 0;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n  /**\n   * @typedef {Object} AutoScrollOptions\n   * @property {(Element|Window)} target\n   * @property {Array} speed\n   * @property {Array} sensitivity\n   * @property {number} [minX]\n   * @property {number} [maxX]\n   * @property {number} [minY]\n   * @property {number} [maxY]\n   */\n  // autoScroll\n\n\n  if (newOptions.autoScroll) {\n    var newAutoScrollOptions = isObject(newOptions.autoScroll) ? newOptions.autoScroll : {\n      target: newOptions.autoScroll === true ? window : newOptions.autoScroll\n    },\n        autoScrollOptions = {}; // target\n\n    autoScrollOptions.target = isElement(newAutoScrollOptions.target) ? newAutoScrollOptions.target : window; // speed\n\n    autoScrollOptions.speed = [];\n    (Array.isArray(newAutoScrollOptions.speed) ? newAutoScrollOptions.speed : [newAutoScrollOptions.speed]).every(function (speed, i) {\n      if (i <= 2 && isFinite(speed)) {\n        autoScrollOptions.speed[i] = speed;\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!autoScrollOptions.speed.length) {\n      autoScrollOptions.speed = AUTOSCROLL_SPEED;\n    } // sensitivity\n\n\n    var newSensitivity = Array.isArray(newAutoScrollOptions.sensitivity) ? newAutoScrollOptions.sensitivity : [newAutoScrollOptions.sensitivity];\n    autoScrollOptions.sensitivity = autoScrollOptions.speed.map(function (v, i) {\n      return isFinite(newSensitivity[i]) ? newSensitivity[i] : AUTOSCROLL_SENSITIVITY[i];\n    }); // min*, max*\n\n    ['X', 'Y'].forEach(function (option) {\n      var optionMin = \"min\".concat(option),\n          optionMax = \"max\".concat(option);\n\n      if (isFinite(newAutoScrollOptions[optionMin]) && newAutoScrollOptions[optionMin] >= 0) {\n        autoScrollOptions[optionMin] = newAutoScrollOptions[optionMin];\n      }\n\n      if (isFinite(newAutoScrollOptions[optionMax]) && newAutoScrollOptions[optionMax] >= 0 && (!autoScrollOptions[optionMin] || newAutoScrollOptions[optionMax] >= autoScrollOptions[optionMin])) {\n        autoScrollOptions[optionMax] = newAutoScrollOptions[optionMax];\n      }\n    });\n\n    if (hasChanged(autoScrollOptions, options.autoScroll)) {\n      options.autoScroll = autoScrollOptions;\n      needsInitBBox = true;\n    }\n  } else if (newOptions.hasOwnProperty('autoScroll')) {\n    if (options.autoScroll) {\n      needsInitBBox = true;\n    }\n\n    options.autoScroll = void 0;\n  } // [/AUTO-SCROLL]\n\n\n  if (needsInitBBox) {\n    initBBox(props);\n  } // handle\n\n\n  if (isElement(newOptions.handle) && newOptions.handle !== options.handle) {\n    if (options.handle) {\n      // Restore\n      options.handle.style.cursor = props.orgCursor;\n\n      if (cssPropUserSelect) {\n        options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n      }\n\n      pointerEvent.removeStartHandler(options.handle, props.pointerEventHandlerId);\n    }\n\n    var handle = options.handle = newOptions.handle;\n    props.orgCursor = handle.style.cursor;\n    setDraggableCursor(handle, props.orgCursor);\n\n    if (cssPropUserSelect) {\n      props.orgUserSelect = handle.style[cssPropUserSelect];\n      handle.style[cssPropUserSelect] = 'none';\n    }\n\n    pointerEvent.addStartHandler(handle, props.pointerEventHandlerId);\n  } // zIndex\n\n\n  if (isFinite(newOptions.zIndex) || newOptions.zIndex === false) {\n    options.zIndex = newOptions.zIndex;\n\n    if (props === activeProps) {\n      props.elementStyle.zIndex = options.zIndex === false ? props.orgZIndex : options.zIndex;\n    }\n  } // left/top\n\n\n  var position = {\n    left: props.elementBBox.left,\n    top: props.elementBBox.top\n  };\n  var needsMove;\n\n  if (isFinite(newOptions.left) && newOptions.left !== position.left) {\n    position.left = newOptions.left;\n    needsMove = true;\n  }\n\n  if (isFinite(newOptions.top) && newOptions.top !== position.top) {\n    position.top = newOptions.top;\n    needsMove = true;\n  }\n\n  if (needsMove) {\n    move(props, position);\n  } // Event listeners\n\n\n  ['onDrag', 'onMove', 'onDragStart', 'onMoveStart', 'onDragEnd'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n      props[option] = options[option].bind(props.ins);\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = props[option] = void 0;\n    }\n  });\n}\n\nvar PlainDraggable = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainDraggable` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainDraggable(element, options) {\n    _classCallCheck(this, PlainDraggable);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        zIndex: ZINDEX // Initial state.\n\n      },\n      disabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!isElement(element) || element === body) {\n      throw new Error('This element is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    var gpuTrigger = true; // [SVG]\n\n    var ownerSvg; // SVGElement which is not root view\n\n    if (element instanceof SVGElement && (ownerSvg = element.ownerSVGElement)) {\n      // It means `instanceof SVGLocatable` (many browsers don't have SVGLocatable)\n      if (!element.getBBox) {\n        throw new Error('This element is not accepted. (SVGLocatable)');\n      } // Trident and Edge bug, SVGSVGElement doesn't have SVGAnimatedTransformList?\n\n\n      if (!element.transform) {\n        throw new Error('This element is not accepted. (SVGAnimatedTransformList)');\n      } // Trident bug, returned value must be used (That is not given value).\n\n\n      props.svgTransform = element.transform.baseVal.appendItem(ownerSvg.createSVGTransform());\n      props.svgPoint = ownerSvg.createSVGPoint(); // Gecko bug, view.getScreenCTM returns CTM with root view.\n\n      var svgView = element.nearestViewportElement || element.viewportElement;\n      props.svgCtmElement = !IS_GECKO ? svgView : svgView.appendChild(document.createElementNS(ownerSvg.namespaceURI, 'rect'));\n      gpuTrigger = false;\n      props.initElm = initSvg;\n      props.moveElm = moveSvg;\n    } else {\n      // [/SVG]\n\n      /* eslint-disable indent */\n\n      /* [SVG/] */\n      var cssPropWillChange = CSSPrefix.getName('willChange');\n\n      if (cssPropWillChange) {\n        gpuTrigger = false;\n      }\n\n      if (!options.leftTop && cssPropTransform) {\n        // translate\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'transform';\n        }\n\n        props.initElm = initTranslate;\n        props.moveElm = moveTranslate;\n      } else {\n        // left and top\n        // [LEFTTOP]\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'left, top';\n        }\n\n        props.initElm = initLeftTop;\n        props.moveElm = moveLeftTop; // [/LEFTTOP]\n\n        /* [LEFTTOP/]\n        throw new Error('`transform` is not supported.');\n        [LEFTTOP/] */\n      }\n      /* eslint-enable indent */\n\n      /* [SVG/] */\n\n    } // [SVG/]\n\n\n    props.element = initAnim(element, gpuTrigger);\n    props.elementStyle = element.style;\n    props.orgZIndex = props.elementStyle.zIndex;\n\n    if (draggableClass) {\n      mClassList(element).add(draggableClass);\n    }\n\n    props.pointerEventHandlerId = pointerEvent.regStartHandler(function (pointerXY) {\n      return dragStart(props, pointerXY);\n    }); // Default options\n\n    if (!options.containment) {\n      var parent;\n      options.containment = (parent = element.parentNode) && isElement(parent) ? parent : body;\n    }\n\n    if (!options.handle) {\n      options.handle = element;\n    }\n\n    _setOptions(props, options);\n  }\n\n  _createClass(PlainDraggable, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      this.disabled = true; // To restore element and reset pointer\n\n      pointerEvent.unregStartHandler(pointerEvent.removeStartHandler(props.options.handle, props.pointerEventHandlerId));\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {PlainDraggable} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      initBBox(insProps[this._id]);\n      return this;\n    }\n  }, {\n    key: \"disabled\",\n    get: function get() {\n      return insProps[this._id].disabled;\n    },\n    set: function set(value) {\n      var props = insProps[this._id];\n\n      if ((value = !!value) !== props.disabled) {\n        props.disabled = value;\n\n        if (props.disabled) {\n          if (props === activeProps) {\n            dragEnd(props);\n          }\n\n          props.options.handle.style.cursor = props.orgCursor;\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).remove(draggableClass);\n          }\n        } else {\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = 'none';\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).add(draggableClass);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"rect\",\n    get: function get() {\n      return copyTree(insProps[this._id].elementBBox);\n    }\n  }, {\n    key: \"left\",\n    get: function get() {\n      return insProps[this._id].elementBBox.left;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        left: value\n      });\n    }\n  }, {\n    key: \"top\",\n    get: function get() {\n      return insProps[this._id].elementBBox.top;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        top: value\n      });\n    }\n  }, {\n    key: \"containment\",\n    get: function get() {\n      var props = insProps[this._id];\n      return props.containmentIsBBox ? ppBBox2OptionObject(props.options.containment) : props.options.containment;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        containment: value\n      });\n    } // [SNAP]\n\n  }, {\n    key: \"snap\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.snap);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        snap: value\n      });\n    } // [/SNAP]\n    // [AUTO-SCROLL]\n\n  }, {\n    key: \"autoScroll\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.autoScroll);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        autoScroll: value\n      });\n    } // [/AUTO-SCROLL]\n\n  }, {\n    key: \"handle\",\n    get: function get() {\n      return insProps[this._id].options.handle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        handle: value\n      });\n    }\n  }, {\n    key: \"zIndex\",\n    get: function get() {\n      return insProps[this._id].options.zIndex;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        zIndex: value\n      });\n    }\n  }, {\n    key: \"onDrag\",\n    get: function get() {\n      return insProps[this._id].options.onDrag;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDrag: value\n      });\n    }\n  }, {\n    key: \"onMove\",\n    get: function get() {\n      return insProps[this._id].options.onMove;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMove: value\n      });\n    }\n  }, {\n    key: \"onDragStart\",\n    get: function get() {\n      return insProps[this._id].options.onDragStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragStart: value\n      });\n    }\n  }, {\n    key: \"onMoveStart\",\n    get: function get() {\n      return insProps[this._id].options.onMoveStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMoveStart: value\n      });\n    }\n  }, {\n    key: \"onDragEnd\",\n    get: function get() {\n      return insProps[this._id].options.onDragEnd;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragEnd: value\n      });\n    }\n  }], [{\n    key: \"draggableCursor\",\n    get: function get() {\n      return cssWantedValueDraggableCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggableCursor !== value) {\n        cssWantedValueDraggableCursor = value;\n        cssValueDraggableCursor = null; // Reset\n\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (props.disabled || props === activeProps && cssValueDraggingCursor !== false) {\n            return;\n          }\n\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (props === activeProps) {\n            // Since cssValueDraggingCursor is `false`, copy cursor again.\n            body.style.cursor = cssOrgValueBodyCursor;\n            body.style.cursor = window.getComputedStyle(props.options.handle, '').cursor;\n          }\n        });\n      }\n    }\n  }, {\n    key: \"draggingCursor\",\n    get: function get() {\n      return cssWantedValueDraggingCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggingCursor !== value) {\n        cssWantedValueDraggingCursor = value;\n        cssValueDraggingCursor = null; // Reset\n\n        if (activeProps) {\n          setDraggingCursor(activeProps.options.handle);\n\n          if (cssValueDraggingCursor === false) {\n            setDraggableCursor(activeProps.options.handle, activeProps.orgCursor); // draggableCursor\n\n            body.style.cursor = cssOrgValueBodyCursor;\n          }\n\n          body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n          window.getComputedStyle(activeProps.options.handle, '').cursor;\n        }\n      }\n    }\n  }, {\n    key: \"draggableClass\",\n    get: function get() {\n      return draggableClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggableClass) {\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (!props.disabled) {\n            var classList = mClassList(props.element);\n\n            if (draggableClass) {\n              classList.remove(draggableClass);\n            }\n\n            if (value) {\n              classList.add(value);\n            }\n          }\n        });\n        draggableClass = value;\n      }\n    }\n  }, {\n    key: \"draggingClass\",\n    get: function get() {\n      return draggingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggingClass) {\n        if (activeProps) {\n          var classList = mClassList(activeProps.element);\n\n          if (draggingClass) {\n            classList.remove(draggingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        draggingClass = value;\n      }\n    }\n  }, {\n    key: \"movingClass\",\n    get: function get() {\n      return movingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== movingClass) {\n        if (activeProps && hasMoved) {\n          var classList = mClassList(activeProps.element);\n\n          if (movingClass) {\n            classList.remove(movingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        movingClass = value;\n      }\n    }\n  }]);\n\n  return PlainDraggable;\n}();\n\npointerEvent.addMoveHandler(document, function (pointerXY) {\n  if (!activeProps) {\n    return;\n  }\n\n  var position = {\n    left: pointerXY.clientX + window.pageXOffset + pointerOffset.left,\n    top: pointerXY.clientY + window.pageYOffset + pointerOffset.top\n  };\n\n  if (move(activeProps, position, // [SNAP]\n  activeProps.snapTargets ? function (position) {\n    // Snap\n    var iLen = activeProps.snapTargets.length;\n    var snappedX = false,\n        snappedY = false,\n        i;\n\n    for (i = 0; i < iLen && (!snappedX || !snappedY); i++) {\n      var snapTarget = activeProps.snapTargets[i];\n\n      if ((snapTarget.gravityXStart == null || position.left >= snapTarget.gravityXStart) && (snapTarget.gravityXEnd == null || position.left <= snapTarget.gravityXEnd) && (snapTarget.gravityYStart == null || position.top >= snapTarget.gravityYStart) && (snapTarget.gravityYEnd == null || position.top <= snapTarget.gravityYEnd)) {\n        if (!snappedX && snapTarget.x != null) {\n          position.left = snapTarget.x;\n          snappedX = true;\n          i = -1; // Restart loop\n        }\n\n        if (!snappedY && snapTarget.y != null) {\n          position.top = snapTarget.y;\n          snappedY = true;\n          i = -1; // Restart loop\n        }\n      }\n    }\n\n    position.snapped = snappedX || snappedY;\n    return activeProps.onDrag ? activeProps.onDrag(position) : true;\n  } : // [/SNAP]\n  activeProps.onDrag)) {\n    // [AUTO-SCROLL]\n    var xyMoveArgs = {},\n        autoScroll = activeProps.autoScroll;\n\n    if (autoScroll) {\n      var clientXY = {\n        x: activeProps.elementBBox.left - window.pageXOffset,\n        y: activeProps.elementBBox.top - window.pageYOffset\n      };\n      ['x', 'y'].forEach(function (axis) {\n        if (autoScroll[axis]) {\n          var min = autoScroll[axis].min,\n              max = autoScroll[axis].max;\n          autoScroll[axis].lines.some(function (line) {\n            if (line.dir === -1 ? clientXY[axis] <= line.position : clientXY[axis] >= line.position) {\n              xyMoveArgs[axis] = {\n                dir: line.dir,\n                speed: line.speed / 1000,\n                min: min,\n                max: max\n              };\n              return true;\n            }\n\n            return false;\n          });\n        }\n      });\n    }\n\n    if (xyMoveArgs.x || xyMoveArgs.y) {\n      scrollFrame.move(autoScroll.target, xyMoveArgs, autoScroll.isWindow ? scrollXYWindow : scrollXYElement);\n      position.autoScroll = true;\n    } else {\n      scrollFrame.stop();\n    } // [/AUTO-SCROLL]\n\n\n    if (!hasMoved) {\n      hasMoved = true;\n\n      if (movingClass) {\n        mClassList(activeProps.element).add(movingClass);\n      }\n\n      if (activeProps.onMoveStart) {\n        activeProps.onMoveStart(position);\n      }\n    }\n\n    if (activeProps.onMove) {\n      activeProps.onMove(position);\n    }\n  }\n});\n{\n  function endHandler() {\n    if (activeProps) {\n      dragEnd(activeProps);\n    }\n  }\n\n  pointerEvent.addEndHandler(document, endHandler);\n  pointerEvent.addCancelHandler(document, endHandler);\n}\n{\n  function initDoc() {\n    cssPropTransitionProperty = CSSPrefix.getName('transitionProperty');\n    cssPropTransform = CSSPrefix.getName('transform');\n    cssOrgValueBodyCursor = body.style.cursor;\n\n    if (cssPropUserSelect = CSSPrefix.getName('userSelect')) {\n      cssOrgValueBodyUserSelect = body.style[cssPropUserSelect];\n    } // Init active item when layout is changed, and init others later.\n\n\n    var LAZY_INIT_DELAY = 200;\n    var initDoneItems = {},\n        lazyInitTimer;\n\n    function checkInitBBox(props, eventType) {\n      if (props.initElm) {\n        // Easy checking for instance without errors.\n        initBBox(props, eventType);\n      } // eslint-disable-line brace-style\n\n    }\n\n    function initAll(eventType) {\n      clearTimeout(lazyInitTimer);\n      Object.keys(insProps).forEach(function (id) {\n        if (!initDoneItems[id]) {\n          checkInitBBox(insProps[id], eventType);\n        }\n      });\n      initDoneItems = {};\n    }\n\n    var layoutChanging = false; // Gecko bug, multiple calling by `resize`.\n\n    var layoutChange = AnimEvent.add(function (event) {\n      if (layoutChanging) {\n        return;\n      }\n\n      layoutChanging = true;\n\n      if (activeProps) {\n        checkInitBBox(activeProps, event.type);\n        pointerEvent.move();\n        initDoneItems[activeProps._id] = true;\n      }\n\n      clearTimeout(lazyInitTimer);\n      lazyInitTimer = setTimeout(function () {\n        initAll(event.type);\n      }, LAZY_INIT_DELAY);\n      layoutChanging = false;\n    });\n    window.addEventListener('resize', layoutChange, true);\n    window.addEventListener('scroll', layoutChange, true);\n  }\n\n  if (body = document.body) {\n    initDoc();\n  } else {\n    document.addEventListener('DOMContentLoaded', function () {\n      body = document.body;\n      initDoc();\n    }, true);\n  }\n}\n/* [SNAP/]\nPlainDraggable.limit = true;\n[SNAP/] */\n\nexport default PlainDraggable;","import PlainDraggable from 'plain-draggable'\nimport { onRemove, animateRectTransition } from './utils'\n\n/**\n * Basic class for layout\n */\nexport class Layout {\n  /**\n   * Creates a new Layout instance\n   *\n   * @param {Object} options - The options for the layout\n   * @param {string} options.name - The name of the layout\n   * @param {Function} [options.enterHandler] - Handler called when entering the layout\n   * @param {Function} [options.leaveHandler] - Handler called when leaving the layout\n   * @throws {Error} If the layout name is not provided\n   */\n  constructor (options = {}) {\n    if (!options.name) throw Error('Layout name is not given')\n    this.name = options.name\n    this.enterHandler = options.enterHandler\n    this.leaveHandler = options.leaveHandler\n  }\n\n  /**\n   * Returns the name of the layout\n   *\n   * @returns {string} The name of the layout\n   */\n  valueOf = () => this.name\n}\n\n/**\n * Side-By-Side Layout, HTML content and Showcase show on left/right side\n *\n * @extends {Layout}\n */\nexport class SideBySide extends Layout {\n  /**\n   * @type {}\n   */\n  name = 'side-by-side'\n\n  /**\n   * Handler called when entering the Side-By-Side layout\n   *\n   * @param {Object} options - The options object\n   * @param {HTMLElement} options.container - The main container element\n   * @param {HTMLElement} options.htmlHolder - The HTML content holder\n   * @param {HTMLElement} options.showcase - The showcase element\n   */\n  enterHandler = ({ container, htmlHolder, showcase }) => {\n    const bar = document.createElement('div')\n    bar.className = 'bar'\n    bar.innerHTML = '<div class=\"bar-handle\"></div>'\n    const handle = bar.querySelector('.bar-handle')\n    container.appendChild(bar)\n\n    // Resize views by value\n    const resizeByLeft = left => {\n      htmlHolder.style.width = left + 'px'\n      showcase.style.width =\n        parseFloat(window.getComputedStyle(container).width) - left + 'px'\n    }\n\n    const draggable = new PlainDraggable(bar, {\n      handle,\n      containment: { left: '25%', top: 0, right: '75%', height: 0 },\n    })\n    draggable.draggableCursor = 'grab'\n\n    draggable.onDrag = pos => {\n      handle.style.transform = 'unset'\n      resizeByLeft(pos.left)\n    }\n    draggable.onDragEnd = _ => {\n      handle.style.cssText = ''\n    }\n\n    onRemove(bar, () => draggable.remove())\n  }\n\n  /**\n   * Handler called when leaving the Side-By-Side layout\n   *\n   * @param {Object} options - The options object\n   * @param {HTMLElement} options.container - The main container element\n   */\n  leaveHandler = ({ container }) => {\n    container.querySelector('.bar')?.remove()\n  }\n}\n\n/**\n * Overlay Layout, Showcase occupies viewport, and HTML content becomes draggable blocks\n *\n * @extends {Layout}\n */\nexport class Overlay extends Layout {\n  /**\n   * @type {}\n   */\n  name = 'overlay'\n\n  /**\n   * saveLeftTopAsData.\n   *\n   * @param {} element\n   */\n  saveLeftTopAsData = element => {\n    const { left, top } = element.getBoundingClientRect()\n    element.dataset.left = left\n    element.dataset.top = top\n  }\n\n  /**\n   * addDraggable.\n   *\n   * @param {} element\n   */\n  addDraggable = element => {\n    // Make sure current element always on top\n    const siblings = Array.from(\n      element.parentElement?.querySelectorAll(':scope > *') ?? [],\n    )\n    let popTimer = null\n    element.onmouseover = () => {\n      popTimer = setTimeout(() => {\n        siblings.forEach(e => e.style.removeProperty('z-index'))\n        element.style.zIndex = '9001'\n      }, 200)\n    }\n    element.onmouseout = () => {\n      clearTimeout(popTimer)\n    }\n\n    // Add draggable part\n    const draggablePart = document.createElement('div')\n    element.appendChild(draggablePart)\n    draggablePart.className = 'draggable-part'\n    draggablePart.innerHTML = '<div class=\"handle\">\\u2630</div>'\n\n    // Add draggable instance\n    const { left, top } = element.getBoundingClientRect()\n    const draggable = new PlainDraggable(element, {\n      top,\n      left,\n      handle: draggablePart,\n      snap: { x: { step: 20 }, y: { step: 20 } },\n    })\n\n    // FIXME use pure CSS to hide utils\n    const utils = element.querySelector('.utils')\n    draggable.onDragStart = () => {\n      utils.style.display = 'none'\n      element.classList.add('drag')\n    }\n\n    draggable.onDragEnd = () => {\n      utils.style = ''\n      element.classList.remove('drag')\n      element.style.zIndex = '9000'\n    }\n\n    // Reposition draggable instance when resized\n    new window.ResizeObserver(() => {\n      try {\n        draggable.position()\n      } catch (err) {\n        console.warn(err)\n      }\n    }).observe(element)\n\n    // Callback for remove\n    onRemove(element, () => {\n      draggable.remove()\n    })\n  }\n\n  /**\n   * enterHandler.\n   *\n   * @param {}\n   */\n  enterHandler = ({ htmlHolder, blocks }) => {\n    // FIXME It is weird rect from this method and this scope are different...\n    blocks.forEach(this.saveLeftTopAsData)\n\n    // Create draggable blocks and set each position by previous one\n    let [left, top] = [20, 20]\n    blocks.forEach(block => {\n      const originLeft = Number(block.dataset.left)\n      const originTop = Number(block.dataset.top)\n\n      // Create draggable block\n      const wrapper = document.createElement('div')\n      wrapper.classList.add('draggable-block')\n      wrapper.innerHTML = `\n        <div class=\"utils\">\n          <div id=\"close\">\\u274C</div>\n          <div id=\"plus-font-size\" \">\\u2795</div>\n          <div id=\"minus-font-size\">\\u2796</div>\n        </div>\n      `\n      wrapper.title = 'Middle-click to hide block'\n      wrapper.onmouseup = e => {\n        // Hide block with middle click\n        if (e.button === 1) {\n          block.classList.remove('focus')\n        }\n      }\n\n      // Set DOMRect for wrapper\n      wrapper.appendChild(block)\n      wrapper.style.left = left + 'px'\n      wrapper.style.top = top + 'px'\n      htmlHolder.appendChild(wrapper)\n      const { width } = wrapper.getBoundingClientRect()\n      left += width + 30\n      if (left > window.innerWidth) {\n        top += 200\n        left = left % window.innerWidth\n      }\n\n      // Animation for DOMRect\n      animateRectTransition(\n        wrapper,\n        { left: originLeft, top: originTop },\n        { resume: true, duration: 300 },\n      ).finished.finally(() => this.addDraggable(wrapper))\n\n      // Trivial case:\n      // This hack make sure utils remains at the same place even when wrapper resized\n      // Prevent DOMRect changes when user clicking plus/minus button many times\n      const utils = wrapper.querySelector('.utils')\n      utils.onmouseover = () => {\n        const { left, top } = utils.getBoundingClientRect()\n        utils.style.cssText = `visibility: visible; z-index: 9000; position: fixed; transition: unset; left: ${left}px; top: ${top}px;`\n        document.body.appendChild(utils)\n      }\n      utils.onmouseout = () => {\n        wrapper.appendChild(utils)\n        utils.style.cssText = ''\n      }\n\n      // Close button\n      wrapper.querySelector('#close').onclick = () => {\n        block.classList.remove('focus')\n        utils.style.cssText = ''\n      }\n      // Plus/Minus font-size of content\n      wrapper.querySelector('#plus-font-size').onclick = () => {\n        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16\n        block.style.fontSize = `${fontSize + 0.2}rem`\n      }\n      wrapper.querySelector('#minus-font-size').onclick = () => {\n        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16\n        block.style.fontSize = `${fontSize - 0.2}rem`\n      }\n    })\n  }\n\n  /**\n   * leaveHandler.\n   *\n   * @param {}\n   */\n  leaveHandler = ({ htmlHolder, blocks }) => {\n    const resumeFromDraggable = block => {\n      const draggableContainer = block.closest('.draggable-block')\n      if (!draggableContainer) return\n      htmlHolder.appendChild(block)\n      draggableContainer.remove()\n    }\n    blocks.forEach(resumeFromDraggable)\n  }\n}\n","import LeaderLine from 'leader-line'\nimport { insideWindow, insideParent } from './utils'\n\n/**\n * focusNextMap.\n *\n * @param {Boolean} reverse -- focus previous map\n */\nexport function focusNextMap (reverse = false) {\n  const renderedList = this.utils.renderedMaps()\n  const index = renderedList.findIndex(e => e.classList.contains('focus'))\n  const nextIndex = (index + (reverse ? -1 : 1)) % renderedList.length\n\n  const nextMap = renderedList.at(nextIndex)\n  nextMap.classList.add('focus')\n  nextMap.scrollIntoView({ behavior: 'smooth' })\n}\n\n/**\n * focusNextBlock.\n *\n * @param {Boolean} reverse -- focus previous block\n */\nexport function focusNextBlock (reverse = false) {\n  const blocks = this.blocks.filter(b =>\n    b.checkVisibility({\n      contentVisibilityAuto: true,\n      opacityProperty: true,\n      visibilityProperty: true,\n    }),\n  )\n  const index = blocks.findIndex(e => e.classList.contains('focus'))\n  const nextIndex = (index + (reverse ? -1 : 1)) % blocks.length\n\n  blocks.forEach(b => b.classList.remove('focus'))\n  const nextBlock = blocks.at(nextIndex)\n  nextBlock?.classList?.add('focus')\n  scrollToBlock(nextBlock)\n}\n\n/**\n * scrollToBlock. Smoothly scroll to target block.\n * If block is bigger than viewport, then pick strategy wisely.\n *\n * @param {HTMLElement} block -- Scroll to this element\n */\nexport const scrollToBlock = block => {\n  const parentRect = block.parentElement.getBoundingClientRect()\n  const scrollBlock =\n    block.getBoundingClientRect().height > parentRect.height * 0.8\n      ? 'nearest'\n      : 'center'\n  block.scrollIntoView({ behavior: 'smooth', block: scrollBlock })\n}\n\n/**\n * focusDelay. Delay of throttle, value changes by cases\n */\nexport function focusDelay () {\n  return window.window.getComputedStyle(this.showcase).display === 'none' ? 50 : 300\n}\n\n/**\n * switchToNextLayout.\n *\n * @param {Boolean} reverse -- Switch to previous one\n */\nexport function switchToNextLayout (reverse = false) {\n  const layouts = this.layouts\n  const currentLayoutName = this.container.dataset.layout\n  const currentIndex = layouts.map(l => l.name).indexOf(currentLayoutName)\n  const padding = reverse ? -1 : 1\n  const nextIndex =\n    currentIndex === -1\n      ? 0\n      : (currentIndex + padding + layouts.length) % layouts.length\n  const nextLayout = layouts[nextIndex]\n  this.container.dataset.layout = nextLayout.name\n}\n\n/**\n * removeBlockFocus.\n */\nexport function removeBlockFocus () {\n  this.blocks.forEach(b => b.classList.remove('focus'))\n}\n\n/**\n * getMarkersFromMaps. Get marker elements by GeoLink\n *\n * @param {HTMLAnchorElement} link\n * @return {HTMLElement[]} markers\n */\nconst getMarkersFromMaps = link => {\n  const maps = Array.from(\n    link.closest('.Dumby')\n      .querySelectorAll('.mapclay[data-render=\"fulfilled\"]'),\n  )\n  return maps\n    .filter(map => link.targets ? link.targets.includes(map.id) : true)\n    .map(map => {\n      const renderer = map.renderer\n      const markerTitle = `${link.targets ?? 'all'}@${link.xy}`\n\n      return map.querySelector(`.marker[title=\"${markerTitle}\"]`) ??\n        renderer.addMarker({\n          xy: link.xy,\n          title: markerTitle,\n          type: link.type,\n        })\n    })\n}\n\n/**\n * addLeaderLine, from link element to target element\n *\n * @param {HTMLAnchorElement} link\n * @param {Element} target\n */\nconst addLeaderLine = (link, target) => {\n  const line = new LeaderLine({\n    start: link,\n    end: target,\n    hide: true,\n    middleLabel: link.title,\n    path: 'magnet',\n  })\n  line.show('draw', { duration: 300 })\n\n  return line\n}\n\n/**\n * Create geolinks, which points to map by geo schema and id\n *\n * @param {HTMLElement} Elements contains anchor elements for doclinks\n * @returns {Boolean} ture is link is created, false if coordinates are invalid\n */\nexport const createGeoLink = (link) => {\n  const url = new URL(link.href)\n  const xyInParams = url.searchParams.get('xy')?.split(',')?.map(Number)\n  const xy = xyInParams ?? url?.href\n    ?.match(/^geo:([-]?[0-9.]+),([-]?[0-9.]+)/)\n    ?.splice(1)\n    ?.reverse()\n    ?.map(Number)\n\n  if (!xy || isNaN(xy[0]) || isNaN(xy[1])) return false\n\n  // Geo information in link\n  link.url = url\n  link.xy = xy\n  link.classList.add('with-leader-line', 'geolink')\n  link.targets = link.url.searchParams.get('id')?.split(',') ?? null\n  link.type = link.url.searchParams.get('type') ?? null\n\n  link.lines = []\n\n  // LeaderLine\n  link.onmouseover = () => {\n    const anchors = getMarkersFromMaps(link)\n    anchors\n      .filter(isAnchorVisible)\n      .forEach(anchor => {\n        const line = addLeaderLine(link, anchor)\n        link.lines.push(line)\n      })\n  }\n  link.onmouseout = () => removeLeaderLines(link)\n  link.onclick = (event) => {\n    event.preventDefault()\n    removeLeaderLines(link)\n    getMarkersFromMaps(link).forEach(updateMapCameraByMarker(link.xy))\n  }\n  return true\n}\n\n/**\n * CreateDocLink.\n *\n * @param {HTMLElement} Elements contains anchor elements for doclinks\n */\nexport const createDocLink = link => {\n  link.classList.add('with-leader-line', 'doclink')\n  link.lines = []\n\n  link.onmouseover = () => {\n    const label = decodeURIComponent(link.href.split('#')[1])\n    const selector = link.title.split('=>')[1] ?? '#' + label\n    const targets = document.querySelectorAll(selector)\n\n    targets.forEach(target => {\n      if (!target?.checkVisibility()) return\n\n      const line = new LeaderLine({\n        start: link,\n        end: target,\n        middleLabel: LeaderLine.pathLabel({\n          text: label,\n          fontWeight: 'bold',\n        }),\n        hide: true,\n        path: 'magnet',\n      })\n      link.lines.push(line)\n      line.show('draw', { duration: 300 })\n    })\n  }\n  link.onmouseout = () => {\n    link.lines.forEach(line => line.remove())\n    link.lines.length = 0\n  }\n}\n\n/**\n * removeLeaderLines. clean lines start from link\n *\n * @param {HTMLAnchorElement} link\n */\nconst removeLeaderLines = link => {\n  if (!link.lines) return\n  link.lines.forEach(line => line.remove())\n  link.lines = []\n}\n\n/**\n * updateMapByMarker. get function for updating map camera by marker\n *\n * @param {Number[]} xy\n * @return {Function} function\n */\nconst updateMapCameraByMarker = xy => marker => {\n  const renderer = marker.closest('.mapclay')?.renderer\n  renderer.updateCamera({ center: xy }, true)\n}\n\n/**\n * isAnchorVisible. check anchor(marker) is visible for current map camera\n *\n * @param {Element} anchor\n */\nconst isAnchorVisible = anchor => {\n  const mapContainer = anchor.closest('.mapclay')\n  return insideWindow(anchor) && insideParent(anchor, mapContainer)\n}\n\n/**\n * addAnchorByPoint.\n *\n * @param {point} options.point -- object has {x, y} for window coordinates\n * @param {HTMLElement} options.map\n * @param {Function} options.validateAnchorName -- validate anchor name is OK to use\n */\nexport const addAnchorByPoint = ({\n  point,\n  map,\n  validateAnchorName = () => true,\n}) => {\n  const rect = map.getBoundingClientRect()\n  const [x, y] = map.renderer\n    .unproject([point.x - rect.left, point.y - rect.top])\n    .map(coord => Number(coord.toFixed(7)))\n\n  let prompt\n  let anchorName\n\n  do {\n    prompt = prompt ? 'Anchor name exists' : 'Name this anchor'\n    anchorName = window.prompt(prompt, `${x},${y}`)\n  }\n  while (anchorName !== null && !validateAnchorName(anchorName))\n  if (anchorName === null) return\n\n  const desc = window.prompt('Description', anchorName) ?? anchorName\n\n  const link = `geo:${y},${x}?xy=${x},${y}&id=${map.id}&type=circle`\n  map.renderer.addMarker({\n    xy: [x, y],\n    title: `${map.id}@${x},${y}`,\n    type: 'circle',\n  })\n\n  return { ref: anchorName, link, title: desc }\n}\n","import { shiftByWindow } from './utils.mjs'\n\n/**\n * @typedef {Object} RefLink\n * @property {string} ref -- name of link\n * @property {string} link -- content of link\n * @property {string|null} title -- title of link\n */\n\n/**\n * Basic Element for menu item\n *\n * @extends {window.HTMLDivElement}\n */\nexport class Item extends window.HTMLDivElement {\n  /**\n   * Creates a new Item instance\n   *\n   * @param {Object} options - The options for the item\n   * @param {string} [options.text] - The text content of the item\n   * @param {string} [options.innerHTML] - The HTML content of the item\n   * @param {string} [options.title] - The title attribute for the item\n   * @param {Function} [options.onclick] - The click event handler\n   * @param {string} [options.style] - The CSS style string\n   * @param {string[]} [options.className] - Additional CSS classes\n   */\n  constructor ({ text, innerHTML, title, onclick, style, className }) {\n    super()\n    this.innerHTML = innerHTML ?? text\n    this.title = title\n    this.onclick = onclick\n    this.style.cssText = style\n    this.classList.add('menu-item')\n    className?.forEach(c => this.classList.add(c))\n\n    this.onmouseover = () => {\n      this.parentElement\n        .querySelectorAll('.sub-menu')\n        .forEach(sub => sub.remove())\n    }\n  }\n}\nwindow.customElements.define('menu-item', Item, { extends: 'div' })\n\n/**\n * Basic Element for menu item that generates a submenu on hover\n *\n * @extends {window.HTMLDivElement}\n */\nexport class Folder extends window.HTMLDivElement {\n  /**\n   * Creates a new Folder instance\n   *\n   * @param {Object} options - The options for the folder\n   * @param {string} [options.text] - The text content of the folder\n   * @param {string} [options.innerHTML] - The HTML content of the folder\n   * @param {Item[]} options.items - The submenu items\n   */\n  constructor ({ text, innerHTML, items }) {\n    super()\n    this.innerHTML = innerHTML ?? text\n    this.classList.add('folder', 'menu-item')\n    this.items = items\n    this.onmouseover = () => {\n      if (this.querySelector('.sub-menu')) return\n      // Prepare submenu\n      const submenu = document.createElement('div')\n      submenu.className = 'sub-menu'\n      const offset = this.items.length > 1 ? '-20px' : '0px'\n      submenu.style.cssText = `position: absolute; left: 105%; top: ${offset};`\n      this.items.forEach(item => submenu.appendChild(item))\n      submenu.onmouseleave = () => submenu.remove()\n\n      // hover effect\n      this.parentElement\n        .querySelectorAll('.sub-menu')\n        .forEach(sub => sub.remove())\n      this.appendChild(submenu)\n      shiftByWindow(submenu)\n    }\n  }\n}\nwindow.customElements.define('menu-folder', Folder, { extends: 'div' })\n\n/**\n * Creates a menu item for picking a map\n *\n * @param {Object} options - The options object\n * @param {Object} options.utils - Utility functions\n * @returns {Folder} A Folder instance for picking a map\n */\nexport const pickMapItem = ({ utils }) =>\n  new Folder({\n    innerHTML: '<span>Maps<span><span class=\"info\">(Tab)</span>',\n    items: utils.renderedMaps().map(\n      map =>\n        new Item({\n          text: map.id,\n          onclick: () => {\n            map.classList.add('focus')\n            map.scrollIntoView({ behavior: 'smooth' })\n          },\n        }),\n    ),\n  })\n\n/**\n * pickBlockItem.\n *\n * @param {HTMLElement[]} options.blocks\n * @param {Function[]} options.utils\n */\nexport const pickBlockItem = ({ blocks, utils }) =>\n  new Folder({\n    innerHTML: '<span>Blocks<span><span class=\"info\">(n/p)</span>',\n    items: blocks.map(\n      (block, index) => {\n        const focus = block.classList.contains('focus')\n        const preview = block.querySelector('p')\n          ?.textContent.substring(0, 15)\n          ?.concat(' ', '...  ') ?? ''\n\n        return new Item({\n          className: ['keep-menu', focus ? 'checked' : 'unchecked'],\n          innerHTML:\n            `<strong>(${index})</strong><span style='display: inline-block; margin-inline: 1.2em;'>${preview}</span>`,\n          onclick: (e) => {\n            block.classList.toggle('focus')\n\n            const focus = block.classList.contains('focus')\n            if (focus) utils.scrollToBlock(block)\n            const item = e.target.closest('.menu-item.keep-menu')\n            item.classList.add(focus ? 'checked' : 'unchecked')\n            item.classList.remove(focus ? 'unchecked' : 'checked')\n\n            // UX: remove menu after user select/deselect blocks\n            const submenu = e.target.closest('.sub-menu')\n            submenu.onmouseleave = () => { submenu.closest('.menu').style.display = 'none' }\n          },\n        })\n      },\n    ),\n  })\n\n/**\n * pickLayoutItem.\n *\n * @param {HTEMElement} options.container\n * @param {String[]} options.layouts\n */\nexport const pickLayoutItem = ({ container, layouts }) =>\n  new Folder({\n    innerHTML: '<span>Layouts<span><span class=\"info\">(x)</span>',\n    items: [\n      ...layouts.map(\n        layout =>\n          new Item({\n            text: layout.name,\n            onclick: () => container.setAttribute('data-layout', layout.name),\n          }),\n      ),\n      new Item({\n        innerHTML: '<a href=\"https://github.com/outdoorsafetylab/dumbymap#layouts\" class=\"external\" style=\"display: block; padding: 0.5rem;\">More...</a>',\n        style: 'padding: 0;',\n      }),\n    ],\n  })\n\n/**\n * addGeoLink.\n *\n * @param {Function[]} options.utils\n * @param {Range} range\n */\nexport const addGeoLink = ({ utils }, range) =>\n  new Item({\n    text: 'Add GeoLink',\n    onclick: () => {\n      const content = range.toString()\n      // FIXME Apply geolink only on matching sub-range\n      const match = content.match(/(^\\D*[\\d.]+)\\D+([\\d.]+)\\D*$/)\n      if (!match) return false\n\n      const [x, y] = match.slice(1)\n      const anchor = document.createElement('a')\n      anchor.textContent = content\n      // FIXME apply WGS84\n      anchor.href = `geo:${y},${x}?xy=${x},${y}`\n\n      // FIXME\n      if (utils.createGeoLink(anchor)) {\n        range.deleteContents()\n        range.insertNode(anchor)\n      }\n    },\n  })\n\n/**\n * Suggestion. Menu Item for editor suggestion\n *\n * @extends {Item}\n */\nexport class Suggestion extends Item {\n  /**\n   * constructor.\n   *\n   * @param {}\n   */\n  constructor ({ text, replace, cm }) {\n    super({ text })\n    this.replace = replace\n    this.classList.add('suggestion')\n\n    this.onmouseover = () => {\n      Array.from(this.parentElement?.children)?.forEach(s =>\n        s.classList.remove('focus'),\n      )\n      this.classList.add('focus')\n    }\n    this.onmouseout = () => {\n      this.classList.remove('focus')\n    }\n    this.onclick = () => {\n      const anchor = cm.getCursor()\n      cm.setSelection(anchor, { ...anchor, ch: 0 })\n      cm.replaceSelection(this.replace)\n      cm.focus()\n      const newAnchor = { ...anchor, ch: this.replace.length }\n      cm.setCursor(newAnchor)\n    }\n  }\n}\nwindow.customElements.define('menu-item-suggestion', Suggestion, { extends: 'div' })\n\n/**\n * renderResults. return a menu item for reporting render results\n *\n * @param {Object} options.modal -- Ojbect of plain-modal\n * @param {HTMLElement} options.modalContent\n * @param {HTMLElement} map -- Rendered map element\n */\nexport const renderResults = ({ modal, modalContent }, map) =>\n  new Item({\n    text: 'Render Results',\n    onclick: () => {\n      modal.open()\n      modal.overlayBlur = 3\n      modal.closeByEscKey = false\n      // HACK find another way to override inline style\n      document.querySelector('.plainmodal-overlay-force').style.position =\n        'relative'\n\n      modalContent.innerHTML = ''\n      const sourceCode = document.createElement('div')\n      sourceCode.innerHTML = `<a href=\"${map.renderer.url ?? map.renderer.use}\">Source Code</a>`\n      modalContent.appendChild(sourceCode)\n      const printDetails = result => {\n        // const funcBody = result.func.toString()\n        // const loc = funcBody.split('\\n').length\n        const color =\n          {\n            success: 'green',\n            fail: 'red',\n            skip: 'black',\n            stop: 'chocolate',\n          }[result.state] ?? 'black'\n        printObject(\n          result,\n          modalContent,\n          `${result.func.name} <span style='float: right;'><span style='display: inline-block; width: 100px; color: ${color};'>${result.state}</span></span>`,\n        )\n      }\n\n      // Add contents about prepare steps\n      const prepareHeading = document.createElement('h3')\n      prepareHeading.textContent = 'Prepare Steps'\n      modalContent.appendChild(prepareHeading)\n      const prepareSteps = map.renderer.results.filter(\n        r => r.type === 'prepare',\n      )\n      prepareSteps.forEach(printDetails)\n\n      // Add contents about render steps\n      const renderHeading = document.createElement('h3')\n      renderHeading.textContent = 'Render Steps'\n      modalContent.appendChild(renderHeading)\n      const renderSteps = map.renderer.results.filter(r => r.type === 'render')\n      renderSteps.forEach(printDetails)\n    },\n  })\n\n/**\n * printObject. Generate <details> in parent element based on Ojbect properties\n *\n * @param {Object} obj\n * @param {HTMLElement} parentElement\n * @param {String} name\n */\nfunction printObject (obj, parentElement, name = null) {\n  // Create <details> and <summary> inside\n  const detailsEle = document.createElement('details')\n  const details = name ?? (obj instanceof Error ? obj.name : Object.values(obj)[0])\n  detailsEle.innerHTML = `<summary>${details}</summary>`\n  parentElement.appendChild(detailsEle)\n\n  detailsEle.onclick = () => {\n    // Don't add items if it has contents\n    if (detailsEle.querySelector(':scope > :not(summary)')) return\n\n    if (obj instanceof Error) {\n      // Handle Error objects specially\n      const errorProps = ['name', 'message', 'stack', ...Object.keys(obj)]\n      errorProps.forEach(key => {\n        const value = obj[key]\n        const valueString = key === 'stack' ? `<pre>${value}</pre>` : value\n        const propertyElement = document.createElement('p')\n        propertyElement.innerHTML = `<strong>${key}</strong>: ${valueString}`\n        detailsEle.appendChild(propertyElement)\n      })\n    } else {\n      // Handle regular objects\n      Object.entries(obj).forEach(([key, value]) => {\n        if (typeof value === 'object' && value !== null) {\n          printObject(value, detailsEle, key)\n        } else {\n          const valueString =\n            typeof value === 'function'\n              ? `<pre>${value}</pre>`\n              : value ?? typeof value\n          const propertyElement = document.createElement('p')\n          propertyElement.innerHTML = `<strong>${key}</strong>: ${valueString}`\n          detailsEle.appendChild(propertyElement)\n        }\n      })\n    }\n  }\n}\n\n/**\n * toggleBlockFocus. Menu Item for toggling focus on a block\n *\n * @param {HTMLElement} block\n */\nexport const toggleBlockFocus = block =>\n  new Item({\n    text: 'Toggle Focus',\n    onclick: () => block.classList.toggle('focus'),\n  })\n\n/**\n * toggleMapFocus. Menu Item for toggling focus on a map\n *\n * @param {HTMLElement} map\n */\nexport const toggleMapFocus = map =>\n  new Item({\n    text: 'Toggle Focus',\n    onclick: () => map.classList.toggle('focus'),\n  })\n\n/**\n * getCoordinatesByPixels.\n *\n * @param {HTMLElement} map instance\n * @param {Number[]} xy -- pixel of window\n */\nexport const getCoordinatesByPixels = (map, xy) =>\n  new Item({\n    text: 'Get Coordinates',\n    onclick: () => {\n      const [x, y] = map.renderer.unproject(xy)\n      const xyString = `[${x.toFixed(7)}, ${y.toFixed(7)}]`\n      navigator.clipboard.writeText(xyString)\n      window.alert(`${xyString} copied to clipboard`)\n    },\n  })\n\n/**\n * restoreCamera.\n *\n * @param {HTMLElement} map\n */\nexport const restoreCamera = map =>\n  new Item({\n    text: 'Restore Camera',\n    onclick: () => map.renderer.restoreCamera(),\n  })\n\n/**\n * addRefLink. replace selected text into markdown link by reference style links\n *\n * @param {CodeMirror} cm\n * @param {RefLink[]} refLinks\n */\nexport const addRefLink = (cm, refLinks) =>\n  new Folder({\n    text: 'Add Link',\n    items: refLinks.map(refLink => new Item({\n      text: refLink.link.startsWith('geo:') ? `@ ${refLink.ref}` : refLink.ref,\n      title: refLink.link,\n      onclick: () => {\n        const selection = cm.getSelection()\n        if (selection === refLink.ref) {\n          cm.replaceSelection(`[${selection}]`)\n        } else {\n          cm.replaceSelection(`[${selection}][${refLink.ref}]`)\n        }\n      },\n    })),\n  })\n","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * CSSPrefix\n * https://github.com/anseki/cssprefix\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction ucf(text) {\n  return text.substr(0, 1).toUpperCase() + text.substr(1);\n}\n\nvar PREFIXES = ['webkit', 'moz', 'ms', 'o'],\n    NAME_PREFIXES = PREFIXES.reduce(function (prefixes, prefix) {\n  prefixes.push(prefix);\n  prefixes.push(ucf(prefix));\n  return prefixes;\n}, []),\n    VALUE_PREFIXES = PREFIXES.map(function (prefix) {\n  return \"-\".concat(prefix, \"-\");\n}),\n\n/**\n * Get sample CSSStyleDeclaration.\n * @returns {CSSStyleDeclaration}\n */\ngetDeclaration = function () {\n  var declaration;\n  return function () {\n    return declaration = declaration || document.createElement('div').style;\n  };\n}(),\n\n/**\n * Normalize name.\n * @param {} propName - A name that is normalized.\n * @returns {string} A normalized name.\n */\nnormalizeName = function () {\n  var rePrefixedName = new RegExp('^(?:' + PREFIXES.join('|') + ')(.)', 'i'),\n      reUc = /[A-Z]/;\n  return function (propName) {\n    return (propName = (propName + '').replace(/\\s/g, '').replace(/-([\\da-z])/gi, function (str, p1) {\n      return p1.toUpperCase();\n    }) // camelCase\n    // 'ms' and 'Ms' are found by rePrefixedName 'i' option\n    .replace(rePrefixedName, function (str, p1) {\n      return reUc.test(p1) ? p1.toLowerCase() : str;\n    }) // Remove prefix\n    ).toLowerCase() === 'float' ? 'cssFloat' : propName;\n  }; // For old CSSOM\n}(),\n\n/**\n * Normalize value.\n * @param {} propValue - A value that is normalized.\n * @returns {string} A normalized value.\n */\nnormalizeValue = function () {\n  var rePrefixedValue = new RegExp('^(?:' + VALUE_PREFIXES.join('|') + ')', 'i');\n  return function (propValue) {\n    return (propValue != null ? propValue + '' : '').replace(/\\s/g, '').replace(rePrefixedValue, '');\n  };\n}(),\n\n/**\n * Polyfill for `CSS.supports`.\n * @param {string} propName - A name.\n * @param {string} propValue - A value.\n *     Since `CSSStyleDeclaration.setProperty` might return unexpected result,\n *     the `propValue` should be checked before the `cssSupports` is called.\n * @returns {boolean} `true` if given pair is accepted.\n */\ncssSupports = function () {\n  return (// return window.CSS && window.CSS.supports || ((propName, propValue) => {\n    // `CSS.supports` doesn't find prefixed property.\n    function (propName, propValue) {\n      var declaration = getDeclaration(); // In some browsers, `declaration[prop] = value` updates any property.\n\n      propName = propName.replace(/[A-Z]/g, function (str) {\n        return \"-\".concat(str.toLowerCase());\n      }); // kebab-case\n\n      declaration.setProperty(propName, propValue);\n      return declaration[propName] != null && // Because getPropertyValue returns '' if it is unsupported\n      declaration.getPropertyValue(propName) === propValue;\n    }\n  );\n}(),\n    // Cache\npropNames = {},\n    propValues = {};\n\nfunction getName(propName) {\n  propName = normalizeName(propName);\n\n  if (propName && propNames[propName] == null) {\n    var declaration = getDeclaration();\n\n    if (declaration[propName] != null) {\n      // Original\n      propNames[propName] = propName;\n    } else {\n      // Try with prefixes\n      var ucfName = ucf(propName);\n\n      if (!NAME_PREFIXES.some(function (prefix) {\n        var prefixed = prefix + ucfName;\n\n        if (declaration[prefixed] != null) {\n          propNames[propName] = prefixed;\n          return true;\n        }\n\n        return false;\n      })) {\n        propNames[propName] = false;\n      }\n    }\n  }\n\n  return propNames[propName] || void 0;\n}\n\nfunction getValue(propName, propValue) {\n  var res;\n\n  if (!(propName = getName(propName))) {\n    return res;\n  } // Invalid property\n\n\n  propValues[propName] = propValues[propName] || {};\n  (Array.isArray(propValue) ? propValue : [propValue]).some(function (propValue) {\n    propValue = normalizeValue(propValue);\n\n    if (propValues[propName][propValue] != null) {\n      // Cache\n      if (propValues[propName][propValue] !== false) {\n        res = propValues[propName][propValue];\n        return true;\n      }\n\n      return false; // Continue to next value\n    }\n\n    if (cssSupports(propName, propValue)) {\n      // Original\n      res = propValues[propName][propValue] = propValue;\n      return true;\n    }\n\n    if (VALUE_PREFIXES.some(function (prefix) {\n      // Try with prefixes\n      var prefixed = prefix + propValue;\n\n      if (cssSupports(propName, prefixed)) {\n        res = propValues[propName][propValue] = prefixed;\n        return true;\n      }\n\n      return false;\n    })) {\n      return true;\n    }\n\n    propValues[propName][propValue] = false;\n    return false; // Continue to next value\n  });\n  return typeof res === 'string' ? res : void 0; // It might be empty string.\n}\n\nvar CSSPrefix = {\n  getName: getName,\n  getValue: getValue\n};\nexport default CSSPrefix;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * mClassList\n * https://github.com/anseki/m-class-list\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction normalize(token) {\n  return (token + '').trim();\n} // Not `||`\n\n\nfunction applyList(list, element) {\n  element.setAttribute('class', list.join(' '));\n}\n\nfunction _add(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    if (!(token = normalize(token)) || list.indexOf(token) !== -1) {\n      return false;\n    }\n\n    list.push(token);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _remove(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    var i;\n\n    if (!(token = normalize(token)) || (i = list.indexOf(token)) === -1) {\n      return false;\n    }\n\n    list.splice(i, 1);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _toggle(list, element, token, force) {\n  var i = list.indexOf(token = normalize(token));\n\n  if (i !== -1) {\n    if (force) {\n      return true;\n    }\n\n    list.splice(i, 1);\n    applyList(list, element);\n    return false;\n  }\n\n  if (force === false) {\n    return false;\n  }\n\n  list.push(token);\n  applyList(list, element);\n  return true;\n}\n\nfunction _replace(list, element, token, newToken) {\n  var i;\n\n  if (!(token = normalize(token)) || !(newToken = normalize(newToken)) || token === newToken || (i = list.indexOf(token)) === -1) {\n    return;\n  }\n\n  list.splice(i, 1);\n\n  if (list.indexOf(newToken) === -1) {\n    list.push(newToken);\n  }\n\n  applyList(list, element);\n}\n\nfunction mClassList(element) {\n  return !mClassList.ignoreNative && element.classList || function () {\n    var list = (element.getAttribute('class') || '').trim().split(/\\s+/).filter(function (token) {\n      return !!token;\n    }),\n        ins = {\n      length: list.length,\n      item: function item(i) {\n        return list[i];\n      },\n      contains: function contains(token) {\n        return list.indexOf(normalize(token)) !== -1;\n      },\n      add: function add() {\n        _add(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      remove: function remove() {\n        _remove(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      toggle: function toggle(token, force) {\n        return _toggle(list, element, token, force);\n      },\n      replace: function replace(token, newToken) {\n        _replace(list, element, token, newToken);\n\n        return mClassList.methodChain ? ins : void 0;\n      }\n    };\n    return ins;\n  }();\n}\n\nmClassList.methodChain = true;\nexport default mClassList;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * AnimEvent\n * https://github.com/anseki/anim-event\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nvar MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nKEEP_LOOP = 500,\n\n/**\n * @typedef {Object} task\n * @property {Event} event\n * @property {function} listener\n */\n\n/** @type {task[]} */\ntasks = [];\n\nvar requestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\nvar lastFrameTime = Date.now(),\n    requestID;\n\nfunction step() {\n  var called, next;\n\n  if (requestID) {\n    cancelAnim.call(window, requestID);\n    requestID = null;\n  }\n\n  tasks.forEach(function (task) {\n    var event;\n\n    if (event = task.event) {\n      task.event = null; // Clear it before `task.listener()` because that might fire another event.\n\n      task.listener(event);\n      called = true;\n    }\n  });\n\n  if (called) {\n    lastFrameTime = Date.now();\n    next = true;\n  } else if (Date.now() - lastFrameTime < KEEP_LOOP) {\n    // Go on for a while\n    next = true;\n  }\n\n  if (next) {\n    requestID = requestAnim.call(window, step);\n  }\n}\n\nfunction indexOfTasks(listener) {\n  var index = -1;\n  tasks.some(function (task, i) {\n    if (task.listener === listener) {\n      index = i;\n      return true;\n    }\n\n    return false;\n  });\n  return index;\n}\n\nvar AnimEvent = {\n  /**\n   * @param {function} listener - An event listener.\n   * @returns {(function|null)} A wrapped event listener.\n   */\n  add: function add(listener) {\n    var task;\n\n    if (indexOfTasks(listener) === -1) {\n      tasks.push(task = {\n        listener: listener\n      });\n      return function (event) {\n        task.event = event;\n\n        if (!requestID) {\n          step();\n        }\n      };\n    }\n\n    return null;\n  },\n  remove: function remove(listener) {\n    var iRemove;\n\n    if ((iRemove = indexOfTasks(listener)) > -1) {\n      tasks.splice(iRemove, 1);\n\n      if (!tasks.length && requestID) {\n        cancelAnim.call(window, requestID);\n        requestID = null;\n      }\n    }\n  }\n};\nexport default AnimEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * TimedTransition\n * https://github.com/anseki/timed-transition\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\n\nvar STATE_STOPPED = 0,\n    STATE_DELAYING = 1,\n    STATE_PLAYING = 2,\n    PREFIX = 'timed',\n    EVENT_TYPE_RUN = \"\".concat(PREFIX, \"TransitionRun\"),\n    EVENT_TYPE_START = \"\".concat(PREFIX, \"TransitionStart\"),\n    EVENT_TYPE_END = \"\".concat(PREFIX, \"TransitionEnd\"),\n    EVENT_TYPE_CANCEL = \"\".concat(PREFIX, \"TransitionCancel\"),\n    IS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Object} options - Options.\n * @property {Element} element - Target element.\n * @property {Window} window - Window that contains target element.\n * @property {number} duration - Milliseconds from `transition-duration`.\n * @property {number} delay - Milliseconds from `transition-delay`.\n * @property {number} state - Current state.\n * @property {boolean} isOn - `on` was called and `off` is not called yet. It is changed by only on/off.\n * @property {number} runTime - 0, or Date.now() when EVENT_TYPE_RUN.\n * @property {number} startTime - 0, or Date.now() when EVENT_TYPE_START. It might not be runTime + delay.\n * @property {number} currentPosition - A time elapsed from initial state, in milliseconds.\n * @property {boolean} isReversing - The current playing is reversing when STATE_PLAYING.\n * @property {number} timer - Timer ID.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {};\n\nvar insId = 0;\n/**\n * @param {props} props - `props` of instance.\n * @param {string} type - One of EVENT_TYPE_*.\n * @returns {void}\n */\n\nfunction fireEvent(props, type) {\n  var initTime = Math.min(Math.max(-props.delay, 0), props.duration),\n      elapsedTime = (initTime + ( // The value for transitionend might NOT be transition-duration. (csswg.org may be wrong)\n  (type === EVENT_TYPE_END || type === EVENT_TYPE_CANCEL) && props.startTime ? Date.now() - props.startTime : 0)) / 1000;\n  var event;\n\n  try {\n    event = new props.window.TransitionEvent(type, {\n      propertyName: props.options.property,\n      pseudoElement: props.options.pseudoElement,\n      elapsedTime: elapsedTime,\n      bubbles: true,\n      cancelable: false\n    }); // Edge bug, can't set pseudoElement\n\n    if (IS_EDGE) {\n      event.pseudoElement = props.options.pseudoElement;\n    }\n  } catch (error) {\n    event = props.window.document.createEvent('TransitionEvent');\n    event.initTransitionEvent(type, true, false, props.options.property, elapsedTime);\n    event.pseudoElement = props.options.pseudoElement;\n  }\n\n  event.timedTransition = props.ins;\n  props.element.dispatchEvent(event);\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction fixCurrentPosition(props) {\n  if (props.state !== STATE_PLAYING) {\n    return;\n  }\n\n  var playingTime = Date.now() - props.startTime;\n  props.currentPosition = props.isOn ? Math.min(props.currentPosition + playingTime, props.duration) : Math.max(props.currentPosition - playingTime, 0);\n}\n/**\n * Finish the \"on/off\" immediately by isOn.\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishAll(props) {\n  props.state = STATE_STOPPED;\n  props.runTime = 0;\n  props.startTime = 0;\n  props.currentPosition = props.isOn ? props.duration : 0;\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishPlaying(props) {\n  if (props.state !== STATE_PLAYING) {\n    return;\n  }\n\n  props.state = STATE_STOPPED;\n  fireEvent(props, EVENT_TYPE_END);\n  finishAll(props);\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishDelaying(props) {\n  if (props.state !== STATE_DELAYING) {\n    return;\n  }\n\n  props.state = STATE_PLAYING;\n  props.startTime = Date.now();\n  props.isReversing = !props.isOn;\n  fireEvent(props, EVENT_TYPE_START);\n  var durationLeft = props.isOn ? props.duration - props.currentPosition : props.currentPosition;\n\n  if (durationLeft > 0) {\n    props.timer = setTimeout(function () {\n      finishPlaying(props);\n    }, durationLeft);\n  } else {\n    finishPlaying(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction abort(props) {\n  clearTimeout(props.timer);\n\n  if (props.state === STATE_STOPPED) {\n    return;\n  }\n\n  props.state = STATE_STOPPED;\n  fireEvent(props, EVENT_TYPE_CANCEL);\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} force - Skip transition.\n * @param {Array} args - Arguments that are passed to procToOn.\n * @returns {void}\n */\n\n\nfunction _on(props, force, args) {\n  if (props.isOn && props.state === STATE_STOPPED || props.isOn && props.state !== STATE_STOPPED && !force) {\n    return;\n  }\n  /*\n    Cases:\n      - Done `off` or playing to `off`, regardless of `force`\n      - Playing to `on` and `force`\n  */\n\n\n  if (props.options.procToOn) {\n    args.unshift(!!force);\n    props.options.procToOn.apply(props.ins, args);\n  }\n\n  if (force || !props.isOn && props.state === STATE_DELAYING || -props.delay > props.duration) {\n    // The delay must have not changed before turning over.\n    abort(props);\n    props.isOn = true;\n    finishAll(props);\n  } else {\n    fixCurrentPosition(props);\n    abort(props);\n    props.state = STATE_DELAYING;\n    props.isOn = true;\n    props.runTime = Date.now();\n    props.startTime = 0;\n    fireEvent(props, EVENT_TYPE_RUN);\n\n    if (props.delay > 0) {\n      props.timer = setTimeout(function () {\n        finishDelaying(props);\n      }, props.delay);\n    } else {\n      if (props.delay < 0) {\n        // Move the position to the right.\n        props.currentPosition = Math.min(props.currentPosition - props.delay, props.duration);\n      }\n\n      finishDelaying(props);\n    }\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} force - Skip transition.\n * @param {Array} args - Arguments that are passed to procToOff.\n * @returns {void}\n */\n\n\nfunction _off(props, force, args) {\n  if (!props.isOn && props.state === STATE_STOPPED || !props.isOn && props.state !== STATE_STOPPED && !force) {\n    return;\n  }\n  /*\n    Cases:\n      - Done `on` or playing to `on`, regardless of `force`\n      - Playing to `off` and `force`\n  */\n\n\n  if (props.options.procToOff) {\n    args.unshift(!!force);\n    props.options.procToOff.apply(props.ins, args);\n  }\n\n  if (force || props.isOn && props.state === STATE_DELAYING || -props.delay > props.duration) {\n    // The delay must have not changed before turning over.\n    abort(props);\n    props.isOn = false;\n    finishAll(props);\n  } else {\n    fixCurrentPosition(props);\n    abort(props);\n    props.state = STATE_DELAYING;\n    props.isOn = false;\n    props.runTime = Date.now();\n    props.startTime = 0;\n    fireEvent(props, EVENT_TYPE_RUN);\n\n    if (props.delay > 0) {\n      props.timer = setTimeout(function () {\n        finishDelaying(props);\n      }, props.delay);\n    } else {\n      if (props.delay < 0) {\n        // Move the position to the left.\n        props.currentPosition = Math.max(props.currentPosition + props.delay, 0);\n      }\n\n      finishDelaying(props);\n    }\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n\n  function parseAsCss(option) {\n    var optionValue = typeof newOptions[option] === 'number' // From CSS\n    ? (props.window.getComputedStyle(props.element, '')[CSSPrefix.getName(\"transition-\".concat(option))] || '').split(',')[newOptions[option]] : newOptions[option];\n    return typeof optionValue === 'string' ? optionValue.trim() : null;\n  } // pseudoElement\n\n\n  if (typeof newOptions.pseudoElement === 'string') {\n    options.pseudoElement = newOptions.pseudoElement;\n  } // property\n\n\n  {\n    var value = parseAsCss('property');\n\n    if (typeof value === 'string' && value !== 'all' && value !== 'none') {\n      options.property = value;\n    }\n  } // duration, delay\n\n  ['duration', 'delay'].forEach(function (option) {\n    var value = parseAsCss(option);\n\n    if (typeof value === 'string') {\n      var matches, timeValue;\n\n      if (/^[0.]+$/.test(value)) {\n        // This is invalid for CSS.\n        options[option] = '0s';\n        props[option] = 0;\n      } else if ((matches = /^(.+?)(m)?s$/.exec(value)) && isFinite(timeValue = parseFloat(matches[1])) && (option !== 'duration' || timeValue >= 0)) {\n        options[option] = \"\".concat(timeValue).concat(matches[2] || '', \"s\");\n        props[option] = timeValue * (matches[2] ? 1 : 1000);\n      }\n    }\n  }); // procToOn, procToOff\n\n  ['procToOn', 'procToOff'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nvar TimedTransition = /*#__PURE__*/function () {\n  /**\n   * Create a `TimedTransition` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   * @param {boolean} [initOn] - Initial `on`.\n   */\n  function TimedTransition(element, options, initOn) {\n    _classCallCheck(this, TimedTransition);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        pseudoElement: '',\n        property: ''\n      },\n      duration: 0,\n      delay: 0,\n      isOn: !!initOn\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!element.nodeType || element.nodeType !== Node.ELEMENT_NODE) {\n      throw new Error('This `element` is not accepted.');\n    }\n\n    props.element = element;\n\n    if (!options) {\n      options = {};\n    }\n\n    props.window = element.ownerDocument.defaultView || options.window || window; // Default options\n\n    if (!options.hasOwnProperty('property')) {\n      options.property = 0;\n    }\n\n    if (!options.hasOwnProperty('duration')) {\n      options.duration = 0;\n    }\n\n    if (!options.hasOwnProperty('delay')) {\n      options.delay = 0;\n    }\n\n    _setOptions(props, options);\n\n    finishAll(props);\n  }\n\n  _createClass(TimedTransition, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      clearTimeout(props.timer);\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (options) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Set `on`.\n     * @param {boolean} [force] - Set `on` it immediately without transition.\n     * @param {Object} [options] - New options.\n     * @param {...{}} [args] - Arguments that are passed to procToOn.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _on(insProps[this._id], force, Array.prototype.slice.call(arguments, 2));\n\n      return this;\n    }\n    /**\n     * Set 'off'.\n     * @param {boolean} [force] - Set `off` it immediately without transition.\n     * @param {Object} [options] - New options.\n     * @param {...{}} [args] - Arguments that are passed to procToOff.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"off\",\n    value: function off(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _off(insProps[this._id], force, Array.prototype.slice.call(arguments, 2));\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"isReversing\",\n    get: function get() {\n      return insProps[this._id].isReversing;\n    }\n  }, {\n    key: \"pseudoElement\",\n    get: function get() {\n      return insProps[this._id].options.pseudoElement;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        pseudoElement: value\n      });\n    }\n  }, {\n    key: \"property\",\n    get: function get() {\n      return insProps[this._id].options.property;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        property: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"delay\",\n    get: function get() {\n      return insProps[this._id].options.delay;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        delay: value\n      });\n    }\n  }, {\n    key: \"procToOn\",\n    get: function get() {\n      return insProps[this._id].options.procToOn;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        procToOn: value\n      });\n    }\n  }, {\n    key: \"procToOff\",\n    get: function get() {\n      return insProps[this._id].options.procToOff;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        procToOff: value\n      });\n    }\n  }], [{\n    key: \"STATE_STOPPED\",\n    get: function get() {\n      return STATE_STOPPED;\n    }\n  }, {\n    key: \"STATE_DELAYING\",\n    get: function get() {\n      return STATE_DELAYING;\n    }\n  }, {\n    key: \"STATE_PLAYING\",\n    get: function get() {\n      return STATE_PLAYING;\n    }\n  }]);\n\n  return TimedTransition;\n}();\n\nexport default TimedTransition;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PlainOverlay\n * https://anseki.github.io/plain-overlay/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nimport TimedTransition from 'timed-transition';\n/* Static ESM */ /* import CSS_TEXT from './default.scss' */ var CSS_TEXT = \".plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01,.plainoverlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainoverlay{position:absolute;left:0;top:0;overflow:hidden;background-color:rgba(136,136,136,.6);cursor:wait;z-index:9000;transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:0}.plainoverlay.plainoverlay-show{opacity:1}.plainoverlay.plainoverlay-force{transition-property:none}.plainoverlay.plainoverlay-hide{display:none}.plainoverlay.plainoverlay-doc{position:fixed;left:-200px;top:-200px;overflow:visible;padding:200px;width:100vw;height:100vh}.plainoverlay-body{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plainoverlay.plainoverlay-doc .plainoverlay-body{width:100vw;height:100vh}.plainoverlay-builtin-face{width:90%;height:90%;max-width:320px;max-height:320px}#plainoverlay-builtin-face-defs{width:0;height:0;position:fixed;left:-100px;top:-100px}#plainoverlay-builtin-face_01 circle,#plainoverlay-builtin-face_01 path{fill:none;stroke-width:40px}#plainoverlay-builtin-face_01 circle{stroke:#fff;opacity:.25}#plainoverlay-builtin-face_01 path{stroke-linecap:round}.plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01{-webkit-animation-name:plainoverlay-builtin-face_01-spin;animation-name:plainoverlay-builtin-face_01-spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}\"; // [FACE]\n\n/* Static ESM */ /* import FACE_DEFS from './face.html?tag=defs' */ var FACE_DEFS = \"<svg id=\\\"plainoverlay-builtin-face-defs\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\"><defs><linearGradient id=\\\"plainoverlay-builtin-face_01-grad\\\" gradientUnits=\\\"userSpaceOnUse\\\" x1=\\\"160\\\" y1=\\\"20\\\" x2=\\\"300\\\" y2=\\\"160\\\"><stop offset=\\\"0\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"0\\\"/><stop offset=\\\"0.2\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"0.1\\\"/><stop offset=\\\"1\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"1\\\"/></linearGradient><g id=\\\"plainoverlay-builtin-face_01\\\"><circle cx=\\\"160\\\" cy=\\\"160\\\" r=\\\"140\\\"/><path d=\\\"M160 20a140 140 0 0 1 140 140\\\" stroke=\\\"url('#plainoverlay-builtin-face_01-grad')\\\"/></g></defs></svg>\";\n/* Static ESM */ /* import FACE_01 from './face.html?tag=face_01' */ var FACE_01 = \"<svg class=\\\"plainoverlay-builtin-face plainoverlay-builtin-face_01\\\" version=\\\"1.1\\\" viewBox=\\\"0 0 320 320\\\"><use xlink:href=\\\"#plainoverlay-builtin-face_01\\\"/></svg>\"; // [/FACE]\n\nmClassList.ignoreNative = true;\n\nvar APP_ID = 'plainoverlay',\n    STYLE_ELEMENT_ID = \"\".concat(APP_ID, \"-style\"),\n    STYLE_CLASS = APP_ID,\n    STYLE_CLASS_DOC = \"\".concat(APP_ID, \"-doc\"),\n    STYLE_CLASS_SHOW = \"\".concat(APP_ID, \"-show\"),\n    STYLE_CLASS_HIDE = \"\".concat(APP_ID, \"-hide\"),\n    STYLE_CLASS_FORCE = \"\".concat(APP_ID, \"-force\"),\n    STYLE_CLASS_BODY = \"\".concat(APP_ID, \"-body\"),\n    FACE_DEFS_ELEMENT_ID = \"\".concat(APP_ID, \"-builtin-face-defs\"),\n    STATE_HIDDEN = 0,\n    STATE_SHOWING = 1,\n    STATE_SHOWN = 2,\n    STATE_HIDING = 3,\n    // DURATION = 2500, // COPY: default.scss\nDURATION = 200,\n    // COPY: default.scss\nTOLERANCE = 0.5,\n    IS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Element} elmTarget - Target element.\n * @property {Element} elmTargetBody - Target body element.\n * @property {Element} elmOverlay - Overlay element.\n * @property {Element} elmOverlayBody - Overlay body element.\n * @property {boolean} isDoc - `true` if target is document.\n * @property {Window} window - Window that conatins target element.\n * @property {HTMLDocument} document - Document that conatins target element.\n * @property {TimedTransition} transition - TimedTransition instance.\n * @property {number} state - Current state.\n * @property {Object} options - Options.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {};\n\nvar insId = 0;\n\nfunction forceReflow(target) {\n  // Trident and Blink bug (reflow like `offsetWidth` can't update)\n  setTimeout(function () {\n    var parent = target.parentNode,\n        next = target.nextSibling; // It has to be removed first for Blink.\n\n    parent.insertBefore(parent.removeChild(target), next);\n  }, 0);\n}\n/**\n * Set style properties while saving current properties.\n * @param {Element} element - Target element.\n * @param {Object} styleProps - New style properties.\n * @param {(Object|null)} savedStyleProps - Current style properties holder.\n * @param {Array} [propNames] - Names of target properties.\n * @returns {Element} Target element itself.\n */\n\n\nfunction setStyle(element, styleProps, savedStyleProps, propNames) {\n  var style = element.style;\n  (propNames || Object.keys(styleProps)).forEach(function (prop) {\n    if (styleProps[prop] != null) {\n      if (savedStyleProps && savedStyleProps[prop] == null) {\n        savedStyleProps[prop] = style[prop];\n      }\n\n      style[prop] = styleProps[prop];\n      styleProps[prop] = null;\n    }\n  });\n  return element;\n}\n/**\n * Restore saved style properties.\n * @param {Element} element - Target element.\n * @param {Object} savedStyleProps - Saved style properties.\n * @param {Array} [propNames] - Names of properties that is restored.\n * @returns {Element} Target element itself.\n */\n\n\nfunction restoreStyle(element, savedStyleProps, propNames) {\n  return setStyle(element, savedStyleProps, null, propNames);\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * Get an element's bounding-box that contains coordinates relative to the element's document or window.\n * @param {Element} element - Target element.\n * @param {Window} [window] - Whether it's relative to the element's window, or document.\n * @returns {(BBox|null)} A bounding-box or null when failed.\n */\n\n\nfunction getBBox(element, window) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    right: rect.right,\n    bottom: rect.bottom,\n    width: rect.width,\n    height: rect.height\n  };\n\n  if (window) {\n    bBox.left += window.pageXOffset;\n    bBox.right += window.pageXOffset;\n    bBox.top += window.pageYOffset;\n    bBox.bottom += window.pageYOffset;\n  }\n\n  return bBox;\n}\n\nfunction scrollLeft(element, isDoc, window, value) {\n  if (isDoc) {\n    if (value != null) {\n      window.scrollTo(value, window.pageYOffset);\n    }\n\n    return window.pageXOffset;\n  }\n\n  if (value != null) {\n    element.scrollLeft = value;\n  }\n\n  return element.scrollLeft;\n}\n\nfunction scrollTop(element, isDoc, window, value) {\n  if (isDoc) {\n    if (value != null) {\n      window.scrollTo(window.pageXOffset, value);\n    }\n\n    return window.pageYOffset;\n  }\n\n  if (value != null) {\n    element.scrollTop = value;\n  }\n\n  return element.scrollTop;\n}\n\nfunction resizeTarget(props, width, height) {\n  var elmTargetBody = props.elmTargetBody;\n  var rect = elmTargetBody.getBoundingClientRect();\n\n  if (Math.abs(rect.width - width) < TOLERANCE && Math.abs(rect.height - height) < TOLERANCE) {\n    return;\n  }\n\n  var targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, ''),\n      boxSizing = targetBodyCmpStyle.boxSizing,\n      includeProps = boxSizing === 'border-box' ? [] : boxSizing === 'padding-box' ? ['border'] : ['border', 'padding'],\n      // content-box\n  PROP_NAMES = {\n    border: {\n      width: ['borderLeftWidth', 'borderRightWidth'],\n      height: ['borderTopWidth', 'borderBottomWidth']\n    },\n    padding: {\n      width: ['paddingLeft', 'paddingRight'],\n      height: ['paddingTop', 'paddingBottom']\n    }\n  },\n      values = ['width', 'height'].reduce(function (values, dir) {\n    includeProps.forEach(function (part) {\n      PROP_NAMES[part][dir].forEach(function (propName) {\n        values[dir] -= parseFloat(targetBodyCmpStyle[propName]);\n      });\n    });\n    return values;\n  }, {\n    width: width,\n    height: height\n  }); // Since the `width` and `height` might change each other, fix both.\n\n  setStyle(elmTargetBody, {\n    // The value might be negative number when size is too small.\n    width: values.width > 0 ? \"\".concat(values.width, \"px\") : 0,\n    height: values.height > 0 ? \"\".concat(values.height, \"px\") : 0\n  }, props.savedStyleTargetBody); // In some browsers, getComputedStyle might return computed values that is not px instead of used values.\n\n  var fixStyle = {};\n  rect = elmTargetBody.getBoundingClientRect();\n\n  if (Math.abs(rect.width - width) >= TOLERANCE) {\n    fixStyle.width = \"\".concat(values.width - (rect.width - width), \"px\");\n  }\n\n  if (rect.height !== height) {\n    fixStyle.height = \"\".concat(values.height - (rect.height - height), \"px\");\n  }\n\n  setStyle(elmTargetBody, fixStyle, props.savedStyleTargetBody);\n} // Trident and Edge bug, width and height are interchanged.\n\n\nfunction getDocClientWH(props) {\n  var elmTarget = props.elmTarget,\n      width = elmTarget.clientWidth,\n      height = elmTarget.clientHeight;\n\n  if (IS_TRIDENT || IS_EDGE) {\n    var targetBodyCmpStyle = props.window.getComputedStyle(props.elmTargetBody, ''),\n        wMode = targetBodyCmpStyle.writingMode || targetBodyCmpStyle['writing-mode'],\n        // Trident bug\n    direction = targetBodyCmpStyle.direction;\n    return wMode === 'tb-rl' || wMode === 'bt-rl' || wMode === 'tb-lr' || wMode === 'bt-lr' || IS_EDGE && (direction === 'ltr' && (wMode === 'vertical-rl' || wMode === 'vertical-lr') || direction === 'rtl' && (wMode === 'vertical-rl' || wMode === 'vertical-lr')) ? {\n      width: height,\n      height: width\n    } : // interchange\n    {\n      width: width,\n      height: height\n    };\n  }\n\n  return {\n    width: width,\n    height: height\n  };\n}\n\nfunction restoreScroll(props, element) {\n  function scrollElement(element, isDoc, left, top) {\n    try {\n      scrollLeft(element, isDoc, props.window, left);\n      scrollTop(element, isDoc, props.window, top);\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n  }\n\n  if (element) {\n    return props.savedElementsScroll.some(function (elementScroll) {\n      if (elementScroll.element === element) {\n        scrollElement(elementScroll.element, elementScroll.isDoc, elementScroll.left, elementScroll.top);\n        return true;\n      }\n\n      return false;\n    }); // eslint-disable-line semi-style\n  }\n\n  props.savedElementsScroll.forEach(function (elementScroll) {\n    scrollElement(elementScroll.element, elementScroll.isDoc, elementScroll.left, elementScroll.top);\n  });\n  return true;\n}\n\nfunction restoreAccKeys(props) {\n  props.savedElementsAccKeys.forEach(function (elementAccKeys) {\n    try {\n      if (elementAccKeys.tabIndex === false) {\n        elementAccKeys.element.removeAttribute('tabindex');\n      } else if (elementAccKeys.tabIndex != null) {\n        elementAccKeys.element.tabIndex = elementAccKeys.tabIndex;\n      }\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n\n    try {\n      if (elementAccKeys.accessKey) {\n        elementAccKeys.element.accessKey = elementAccKeys.accessKey;\n      }\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n  });\n}\n\nfunction avoidFocus(props, element) {\n  if (props.isDoc && element !== element.ownerDocument.body && !(props.elmOverlay.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY) || !props.isDoc && (element === props.elmTargetBody || props.elmTargetBody.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n    if (element.blur) {\n      // Trident and Edge don't support SVG#blur\n      element.blur();\n    } else {\n      element.ownerDocument.body.focus();\n    }\n\n    return true;\n  }\n\n  return false;\n} // Selection.containsNode polyfill for Trident\n\n\nfunction selContainsNode(selection, node, partialContainment) {\n  var nodeRange = node.ownerDocument.createRange(),\n      iLen = selection.rangeCount;\n  nodeRange.selectNodeContents(node);\n\n  for (var i = 0; i < iLen; i++) {\n    var selRange = selection.getRangeAt(i); // Edge bug (Issue #7321753); getRangeAt returns empty (collapsed) range\n    // NOTE: It can not recover when the selection has multiple ranges.\n\n    if (!selRange.toString().length && selection.toString().length && iLen === 1) {\n      selRange.setStart(selection.anchorNode, selection.anchorOffset);\n      selRange.setEnd(selection.focusNode, selection.focusOffset); // Edge doesn't throw when end is upper than start.\n\n      if (selRange.toString() !== selection.toString()) {\n        selRange.setStart(selection.focusNode, selection.focusOffset);\n        selRange.setEnd(selection.anchorNode, selection.anchorOffset);\n\n        if (selRange.toString() !== selection.toString()) {\n          throw new Error('Edge bug (Issue #7321753); Couldn\\'t recover');\n        }\n      }\n    }\n\n    if (partialContainment ? selRange.compareBoundaryPoints(Range.START_TO_END, nodeRange) >= 0 && selRange.compareBoundaryPoints(Range.END_TO_START, nodeRange) <= 0 : selRange.compareBoundaryPoints(Range.START_TO_START, nodeRange) < 0 && selRange.compareBoundaryPoints(Range.END_TO_END, nodeRange) > 0) {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * Indicates whether the selection is part of the node or not.\n * @param {Node} node - Target node.\n * @param {Selection} selection - The parsed selection.\n * @returns {boolean} `true` if all ranges of `selection` are part of `node`.\n */\n\n\nfunction nodeContainsSel(node, selection) {\n  var nodeRange = node.ownerDocument.createRange(),\n      iLen = selection.rangeCount;\n  nodeRange.selectNode(node);\n\n  for (var i = 0; i < iLen; i++) {\n    var selRange = selection.getRangeAt(i);\n\n    if (selRange.compareBoundaryPoints(Range.START_TO_START, nodeRange) < 0 || selRange.compareBoundaryPoints(Range.END_TO_END, nodeRange) > 0) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction avoidSelect(props) {\n  var selection = ('getSelection' in window ? props.window : props.document).getSelection();\n\n  if (selection.rangeCount && (props.isDoc ? !nodeContainsSel(props.elmOverlayBody, selection) : selection.containsNode && (!IS_BLINK || !selection.isCollapsed) // Blink bug, fails with empty string.\n  ? selection.containsNode(props.elmTargetBody, true) : selContainsNode(selection, props.elmTargetBody, true))) {\n    try {\n      selection.removeAllRanges(); // Trident bug?, `Error:800a025e` comes sometime\n    } catch (error) {\n      /* ignore */\n    }\n\n    props.document.body.focus(); // Trident bug? It seems that `focus()` makes selection again.\n\n    if (selection.rangeCount > 0) {\n      try {\n        selection.removeAllRanges(); // Trident bug?, `Error:800a025e` comes sometime\n      } catch (error) {\n        /* ignore */\n      }\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction barLeft(wMode, direction) {\n  var svgSpec = wMode === 'rl-tb' || wMode === 'tb-rl' || wMode === 'bt-rl' || wMode === 'rl-bt';\n  return IS_TRIDENT && svgSpec || IS_EDGE && (svgSpec || direction === 'rtl' && (wMode === 'horizontal-tb' || wMode === 'vertical-rl') || direction === 'ltr' && wMode === 'vertical-rl');\n}\n\nfunction barTop(wMode, direction) {\n  var svgSpec = wMode === 'bt-rl' || wMode === 'bt-lr' || wMode === 'lr-bt' || wMode === 'rl-bt';\n  return IS_TRIDENT && svgSpec || IS_EDGE && (svgSpec || direction === 'rtl' && (wMode === 'vertical-lr' || wMode === 'vertical-rl'));\n}\n\nfunction disableDocBars(props) {\n  var elmTarget = props.elmTarget,\n      elmTargetBody = props.elmTargetBody,\n      targetBodyRect = elmTargetBody.getBoundingClientRect(); // Get size of each scrollbar.\n\n  var clientWH = getDocClientWH(props),\n      barV = -clientWH.width,\n      barH = -clientWH.height; // elmTarget.clientWidth/clientHeight\n\n  setStyle(elmTarget, {\n    overflow: 'hidden'\n  }, props.savedStyleTarget);\n  clientWH = getDocClientWH(props);\n  barV += clientWH.width;\n  barH += clientWH.height;\n\n  if (barV || barH) {\n    var targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, '');\n    var propV, propH; // There is no way to get absolute position of document.\n    // We need distance between the document and its window, or a method like `element.screenX`\n    // that gets absolute position of an element.\n    // For the moment, Trident and Edge make a scrollbar at the left/top side when RTL document\n    // or CJK vertical document is rendered.\n\n    if (IS_TRIDENT || IS_EDGE) {\n      var wMode = targetBodyCmpStyle.writingMode || targetBodyCmpStyle['writing-mode'],\n          // Trident bug\n      direction = targetBodyCmpStyle.direction;\n\n      if (barV) {\n        propV = barLeft(wMode, direction) ? 'marginLeft' : 'marginRight';\n      }\n\n      if (barH) {\n        propH = barTop(wMode, direction) ? 'marginTop' : 'marginBottom';\n      }\n    } else {\n      if (barV) {\n        propV = 'marginRight';\n      }\n\n      if (barH) {\n        propH = 'marginBottom';\n      }\n    }\n\n    var addStyle = {};\n\n    if (barV) {\n      addStyle[propV] = \"\".concat(parseFloat(targetBodyCmpStyle[propV]) + barV, \"px\");\n    }\n\n    if (barH) {\n      addStyle[propH] = \"\".concat(parseFloat(targetBodyCmpStyle[propH]) + barH, \"px\");\n    }\n\n    setStyle(elmTargetBody, addStyle, props.savedStyleTargetBody);\n    resizeTarget(props, targetBodyRect.width, targetBodyRect.height); // `overflow: 'hidden'` might change scroll.\n\n    restoreScroll(props, elmTarget);\n    return true;\n  }\n\n  restoreStyle(elmTarget, props.savedStyleTarget, ['overflow']);\n  return false;\n}\n\nfunction _position(props, targetBodyBBox) {\n  var elmTargetBody = props.elmTargetBody,\n      targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, ''),\n      elmOverlay = props.elmOverlay,\n      overlayCmpStyle = props.window.getComputedStyle(elmOverlay, ''),\n      overlayBBox = getBBox(elmOverlay, props.window),\n      borders = ['Top', 'Right', 'Bottom', 'Left'].reduce(function (borders, prop) {\n    borders[prop.toLowerCase()] = parseFloat(targetBodyCmpStyle[\"border\".concat(prop, \"Width\")]);\n    return borders;\n  }, {}),\n      // Get distance between document and origin of `elmOverlay`.\n  offset = {\n    left: overlayBBox.left - parseFloat(overlayCmpStyle.left),\n    top: overlayBBox.top - parseFloat(overlayCmpStyle.top)\n  },\n      style = {\n    left: \"\".concat(targetBodyBBox.left - offset.left + borders.left, \"px\"),\n    top: \"\".concat(targetBodyBBox.top - offset.top + borders.top, \"px\"),\n    width: \"\".concat(targetBodyBBox.width - borders.left - borders.right, \"px\"),\n    height: \"\".concat(targetBodyBBox.height - borders.top - borders.bottom, \"px\")\n  },\n      reValue = /^([\\d.]+)(px|%)$/; // border-radius\n\n  [{\n    prop: 'TopLeft',\n    hBorder: 'left',\n    vBorder: 'top'\n  }, {\n    prop: 'TopRight',\n    hBorder: 'right',\n    vBorder: 'top'\n  }, {\n    prop: 'BottomRight',\n    hBorder: 'right',\n    vBorder: 'bottom'\n  }, {\n    prop: 'BottomLeft',\n    hBorder: 'left',\n    vBorder: 'bottom'\n  }].forEach(function (corner) {\n    var prop = CSSPrefix.getName(\"border\".concat(corner.prop, \"Radius\")),\n        values = targetBodyCmpStyle[prop].split(' ');\n    var h = values[0],\n        v = values[1] || values[0],\n        matches = reValue.exec(h);\n    h = !matches ? 0 : matches[2] === 'px' ? +matches[1] : matches[1] * targetBodyBBox.width / 100;\n    matches = reValue.exec(v);\n    v = !matches ? 0 : matches[2] === 'px' ? +matches[1] : matches[1] * targetBodyBBox.height / 100;\n    h -= borders[corner.hBorder];\n    v -= borders[corner.vBorder];\n\n    if (h > 0 && v > 0) {\n      style[prop] = \"\".concat(h, \"px \").concat(v, \"px\");\n    }\n  });\n  setStyle(elmOverlay, style);\n  props.targetBodyBBox = targetBodyBBox;\n}\n\nfunction getTargetElements(props) {\n  var elmTargetBody = props.elmTargetBody,\n      elmOverlay = props.elmOverlay,\n      targetElements = [props.elmTarget];\n\n  if (props.isDoc) {\n    targetElements.push(elmTargetBody);\n    Array.prototype.slice.call(elmTargetBody.childNodes).forEach(function (childNode) {\n      if (childNode.nodeType === Node.ELEMENT_NODE && childNode !== elmOverlay && !mClassList(childNode).contains(STYLE_CLASS) && childNode.id !== FACE_DEFS_ELEMENT_ID) {\n        targetElements.push(childNode);\n        Array.prototype.push.apply(targetElements, childNode.querySelectorAll('*'));\n      }\n    });\n  } else {\n    Array.prototype.push.apply(targetElements, elmTargetBody.querySelectorAll('*'));\n  }\n\n  return targetElements;\n}\n\nfunction finishShowing(props) {\n  // blur\n  props.filterElements = null;\n\n  if (props.options.blur !== false) {\n    var propName = CSSPrefix.getName('filter'),\n        propValue = CSSPrefix.getValue('filter', \"blur(\".concat(props.options.blur, \"px)\"));\n\n    if (propValue) {\n      // undefined if no propName\n      // Array of {element: element, savedStyle: {}}\n      var filterElements = props.isDoc ? Array.prototype.slice.call(props.elmTargetBody.childNodes).filter(function (childNode) {\n        return childNode.nodeType === Node.ELEMENT_NODE && childNode !== props.elmOverlay && !mClassList(childNode).contains(STYLE_CLASS) && childNode.id !== FACE_DEFS_ELEMENT_ID;\n      }).map(function (element) {\n        return {\n          element: element,\n          savedStyle: {}\n        };\n      }) : [{\n        element: props.elmTargetBody,\n        savedStyle: {}\n      }];\n      filterElements.forEach(function (filterElement) {\n        var style = {}; // new object for each element.\n\n        style[propName] = propValue;\n        setStyle(filterElement.element, style, filterElement.savedStyle);\n      });\n      props.filterElements = filterElements;\n    }\n  }\n\n  props.state = STATE_SHOWN;\n\n  if (props.options.onShow) {\n    props.options.onShow.call(props.ins);\n  }\n}\n\nfunction finishHiding(props\n/* [DISABLE-SYNC/]\n, sync\n[DISABLE-SYNC/] */\n) {\n  // sync-mode (`sync` is `true`): Skip restoring active element and finish all immediately.\n\n  /* [DISABLE-SYNC/]\n  [DISABLE-SYNC/] */\n  mClassList(props.elmOverlay).add(STYLE_CLASS_HIDE);\n  restoreStyle(props.elmTarget, props.savedStyleTarget);\n  restoreStyle(props.elmTargetBody, props.savedStyleTargetBody);\n  props.savedStyleTarget = {};\n  props.savedStyleTargetBody = {};\n  restoreAccKeys(props);\n  props.savedElementsAccKeys = [];\n\n  if (\n  /* [DISABLE-SYNC/]\n  !sync &&\n  [DISABLE-SYNC/] */\n  props.isDoc && props.activeElement) {\n    // props.state must be STATE_HIDDEN for avoiding focus.\n    var stateSave = props.state;\n    props.state = STATE_HIDDEN; // the event is fired after function exited in some browsers (e.g. Trident).\n\n    props.elmTargetBody.removeEventListener('focus', props.focusListener, true);\n    props.activeElement.focus(); // Don't change props.state for calling `hide(force)` before `restoreAndFinish` (async-mode)\n\n    props.state = stateSave;\n  }\n\n  props.activeElement = null; // Since `focus()` might scroll, do this after `focus()` and reflow.\n\n  function restoreAndFinish() {\n    props.timerRestoreAndFinish = null;\n    props.state = STATE_HIDDEN;\n    props.elmTargetBody.addEventListener('focus', props.focusListener, true);\n    restoreScroll(props);\n    props.savedElementsScroll = null;\n\n    if (props.options.onHide) {\n      props.options.onHide.call(props.ins);\n    }\n  }\n\n  if (props.timerRestoreAndFinish) {\n    clearTimeout(props.timerRestoreAndFinish);\n    props.timerRestoreAndFinish = null;\n  }\n  /* [DISABLE-SYNC/]\n  if (sync) {\n    restoreAndFinish();\n  } else {\n  [DISABLE-SYNC/] */\n  // eslint-disable-next-line indent\n\n\n  props.timerRestoreAndFinish = setTimeout(restoreAndFinish, 0);\n  /* [DISABLE-SYNC/]\n  }\n  [DISABLE-SYNC/] */\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _show(props, force) {\n  function getScroll(elements, fromDoc) {\n    function elementCanScroll(element, isDoc) {\n      var cmpStyle = props.window.getComputedStyle(element, ''),\n          tagName = element.nodeName.toLowerCase();\n      return cmpStyle.overflow === 'scroll' || cmpStyle.overflow === 'auto' || cmpStyle.overflowX === 'scroll' || cmpStyle.overflowX === 'auto' || cmpStyle.overflowY === 'scroll' || cmpStyle.overflowY === 'auto' || // document with `visible` might make scrollbars.\n      isDoc && (cmpStyle.overflow === 'visible' || cmpStyle.overflowX === 'visible' || cmpStyle.overflowY === 'visible') || // `overflow` of these differs depending on browser.\n      !isDoc && (tagName === 'textarea' || tagName === 'select');\n    }\n\n    var elementsScroll = [];\n    elements.forEach(function (element, i) {\n      var isDoc = fromDoc && i === 0;\n\n      if (elementCanScroll(element, isDoc)) {\n        elementsScroll.push({\n          element: element,\n          isDoc: isDoc,\n          left: scrollLeft(element, isDoc, props.window),\n          top: scrollTop(element, isDoc, props.window)\n        });\n      }\n    });\n    return elementsScroll;\n  }\n\n  function disableAccKeys(elements, fromDoc) {\n    var savedElementsAccKeys = [];\n    elements.forEach(function (element, i) {\n      if (fromDoc && i === 0) {\n        return;\n      }\n\n      var elementAccKeys = {},\n          tabIndex = element.tabIndex; // In Trident and Edge, `tabIndex` of all elements are `0` or something even if the element is not focusable.\n\n      if (tabIndex !== -1) {\n        elementAccKeys.element = element;\n        elementAccKeys.tabIndex = element.hasAttribute('tabindex') ? tabIndex : false;\n        element.tabIndex = -1;\n      }\n\n      var accessKey = element.accessKey;\n\n      if (accessKey) {\n        elementAccKeys.element = element;\n        elementAccKeys.accessKey = accessKey;\n        element.accessKey = '';\n      }\n\n      if (elementAccKeys.element) {\n        savedElementsAccKeys.push(elementAccKeys);\n      }\n    });\n    return savedElementsAccKeys;\n  }\n\n  if (props.state === STATE_SHOWN || props.state === STATE_SHOWING && !force || props.state !== STATE_SHOWING && props.options.onBeforeShow && props.options.onBeforeShow.call(props.ins) === false) {\n    return;\n  }\n\n  if (props.state === STATE_HIDDEN) {\n    var elmOverlay = props.elmOverlay,\n        elmOverlayClassList = mClassList(elmOverlay);\n    props.document.body.appendChild(elmOverlay); // Move to last (for same z-index)\n\n    var targetElements = getTargetElements(props);\n    elmOverlayClassList.remove(STYLE_CLASS_HIDE); // Before `getBoundingClientRect` (`position`).\n\n    if (!props.isDoc) {\n      var elmTargetBody = props.elmTargetBody;\n\n      if (props.window.getComputedStyle(elmTargetBody, '').display === 'inline') {\n        setStyle(elmTargetBody, {\n          display: 'inline-block'\n        }, props.savedStyleTargetBody);\n      }\n\n      _position(props, getBBox(elmTargetBody, props.window));\n    }\n\n    props.savedElementsScroll = getScroll(targetElements, props.isDoc);\n    props.disabledDocBars = false; // savedElementsScroll is empty when document is disconnected.\n\n    if (props.isDoc && props.savedElementsScroll.length && props.savedElementsScroll[0].isDoc) {\n      props.disabledDocBars = disableDocBars(props);\n    }\n\n    props.savedElementsAccKeys = disableAccKeys(targetElements, props.isDoc);\n    props.activeElement = props.document.activeElement;\n\n    if (props.activeElement) {\n      avoidFocus(props, props.activeElement);\n    }\n\n    avoidSelect(props);\n    elmOverlay.offsetWidth;\n    /* force reflow */\n    // eslint-disable-line no-unused-expressions\n\n    if (props.options.onPosition) {\n      props.options.onPosition.call(props.ins);\n    }\n  }\n\n  props.transition.on(force);\n  props.state = STATE_SHOWING;\n\n  if (force) {\n    finishShowing(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @param {boolean} [sync] - sync-mode\n * @returns {void}\n */\n\n\nfunction _hide(props, force\n/* [DISABLE-SYNC/]\n, sync\n[DISABLE-SYNC/] */\n) {\n  // sync-mode (both `force` and `sync` are `true`)\n\n  /* [DISABLE-SYNC/]\n  [DISABLE-SYNC/] */\n  if (props.state === STATE_HIDDEN || props.state === STATE_HIDING && !force || props.state !== STATE_HIDING && props.options.onBeforeHide && props.options.onBeforeHide.call(props.ins) === false) {\n    return;\n  } // blur\n\n\n  if (props.filterElements) {\n    props.filterElements.forEach(function (filterElement) {\n      restoreStyle(filterElement.element, filterElement.savedStyle);\n    });\n    props.filterElements = null;\n  } // In Gecko, hidden element can be activeElement.\n\n\n  var element = props.document.activeElement;\n\n  if (element && element !== element.ownerDocument.body && props.elmOverlay.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n    if (element.blur) {\n      // Trident and Edge don't support SVG#blur\n      element.blur();\n    } else {\n      element.ownerDocument.body.focus();\n    }\n  }\n\n  props.transition.off(force);\n  props.state = STATE_HIDING;\n\n  if (force) {\n    finishHiding(props\n    /* [DISABLE-SYNC/]\n    , sync\n    [DISABLE-SYNC/] */\n    );\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options; // face\n\n  if (newOptions.hasOwnProperty('face') && (newOptions.face == null ? void 0 : newOptions.face) !== options.face) {\n    var elmOverlayBody = props.elmOverlayBody; // Clear\n\n    while (elmOverlayBody.firstChild) {\n      elmOverlayBody.removeChild(elmOverlayBody.firstChild);\n    }\n\n    if (newOptions.face === false) {\n      // No face\n      options.face = false;\n    } else if (newOptions.face && newOptions.face.nodeType === Node.ELEMENT_NODE) {\n      // Specific face\n      options.face = newOptions.face;\n      elmOverlayBody.appendChild(newOptions.face);\n    } else if (newOptions.face == null) {\n      // Builtin face\n      // [FACE]\n      var elmDocument = props.document;\n\n      if (!elmDocument.getElementById(FACE_DEFS_ELEMENT_ID)) {\n        // Add svg defs\n        var defsSvg = new props.window.DOMParser().parseFromString(FACE_DEFS, 'image/svg+xml');\n        elmDocument.body.appendChild(defsSvg.documentElement);\n      } // [/FACE]\n\n\n      options.face = void 0;\n      elmOverlayBody.innerHTML = FACE_01; // [FACE/]\n    }\n  } // duration\n\n\n  if (isFinite(newOptions.duration) && newOptions.duration !== options.duration) {\n    options.duration = newOptions.duration;\n    props.elmOverlay.style[CSSPrefix.getName('transitionDuration')] = newOptions.duration === DURATION ? '' : \"\".concat(newOptions.duration, \"ms\");\n    props.transition.duration = \"\".concat(newOptions.duration, \"ms\");\n  } // blur\n\n\n  if (isFinite(newOptions.blur) || newOptions.blur === false) {\n    options.blur = newOptions.blur;\n  } // style\n\n\n  if (isObject(newOptions.style)) {\n    setStyle(props.elmOverlay, newOptions.style);\n  } // Event listeners\n\n\n  ['onShow', 'onHide', 'onBeforeShow', 'onBeforeHide', 'onPosition'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nfunction scroll(props, target, dirLeft, value) {\n  var isDoc, // To return undefined\n  curValue; // eslint-disable-line prefer-const\n\n  if (target) {\n    var targetElements = getTargetElements(props);\n\n    if (targetElements.indexOf(target) === -1) {\n      return curValue;\n    } // return undefined\n\n\n    isDoc = target.nodeName.toLowerCase() === 'html';\n  } else {\n    target = props.elmTarget;\n    isDoc = props.isDoc;\n  }\n\n  var elementScroll = value != null && props.savedElementsScroll && (props.savedElementsScroll.find ? props.savedElementsScroll.find(function (elementScroll) {\n    return elementScroll.element === target;\n  }) : function (elementsScroll) {\n    var found;\n    elementsScroll.some(function (elementScroll) {\n      if (elementScroll.element === target) {\n        found = elementScroll;\n        return true;\n      }\n\n      return false;\n    });\n    return found;\n  }(props.savedElementsScroll));\n  curValue = (dirLeft ? scrollLeft : scrollTop)(target, isDoc, props.window, value);\n\n  if (elementScroll) {\n    elementScroll[dirLeft ? 'left' : 'top'] = curValue;\n  }\n\n  return curValue;\n}\n\nvar PlainOverlay = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainOverlay` instance.\n   * @param {Element} [target] - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainOverlay(target, options) {\n    _classCallCheck(this, PlainOverlay);\n\n    /**\n     * @param {Object} [target] - Element or something that is checked.\n     * @returns {(Element|null)} Valid element or null.\n     */\n    function getTarget(target) {\n      var validElement;\n\n      if (!target) {\n        validElement = document.documentElement; // documentElement of current document\n      } else if (target.nodeType) {\n        if (target.nodeType === Node.DOCUMENT_NODE) {\n          validElement = target.documentElement; // documentElement of target document\n        } else if (target.nodeType === Node.ELEMENT_NODE) {\n          var nodeName = target.nodeName.toLowerCase();\n          validElement = nodeName === 'body' ? target.ownerDocument.documentElement : // documentElement of target body\n          nodeName === 'iframe' || nodeName === 'frame' ? target.contentDocument.documentElement : // documentElement of target frame\n          target;\n        }\n\n        if (!validElement) {\n          throw new Error('This element is not accepted.');\n        }\n      } else if (target === target.window) {\n        validElement = target.document.documentElement; // documentElement of target window\n      }\n\n      return validElement;\n    }\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        face: false,\n        // Initial state.\n        duration: DURATION,\n        // Initial state.\n        blur: false // Initial state.\n\n      },\n      state: STATE_HIDDEN,\n      savedStyleTarget: {},\n      savedStyleTargetBody: {},\n      blockingDisabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (arguments.length === 1) {\n      if (!(props.elmTarget = getTarget(target))) {\n        if (!isObject(target)) {\n          throw new Error('Invalid argument.');\n        }\n\n        props.elmTarget = document.documentElement; // documentElement of current document\n\n        options = target;\n      }\n    } else if (!(props.elmTarget = getTarget(target))) {\n      throw new Error('This target is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    props.isDoc = props.elmTarget.nodeName.toLowerCase() === 'html';\n    var elmDocument = props.document = props.elmTarget.ownerDocument;\n    props.window = elmDocument.defaultView;\n    var elmTargetBody = props.elmTargetBody = props.isDoc ? elmDocument.body : props.elmTarget; // Setup window\n\n    if (!elmDocument.getElementById(STYLE_ELEMENT_ID)) {\n      var head = elmDocument.getElementsByTagName('head')[0] || elmDocument.documentElement,\n          sheet = head.insertBefore(elmDocument.createElement('style'), head.firstChild);\n      sheet.type = 'text/css';\n      sheet.id = STYLE_ELEMENT_ID;\n      sheet.textContent = CSS_TEXT;\n\n      if (IS_TRIDENT || IS_EDGE) {\n        forceReflow(sheet);\n      } // Trident bug\n\n    } // elmOverlay\n\n\n    var elmOverlay = props.elmOverlay = elmDocument.createElement('div'),\n        elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.add(STYLE_CLASS, STYLE_CLASS_HIDE);\n\n    if (props.isDoc) {\n      elmOverlayClassList.add(STYLE_CLASS_DOC);\n    } // TimedTransition\n\n\n    props.transition = new TimedTransition(elmOverlay, {\n      procToOn: function procToOn(force) {\n        var elmOverlayClassList = mClassList(elmOverlay);\n        elmOverlayClassList.toggle(STYLE_CLASS_FORCE, !!force);\n        elmOverlayClassList.add(STYLE_CLASS_SHOW);\n      },\n      procToOff: function procToOff(force) {\n        var elmOverlayClassList = mClassList(elmOverlay);\n        elmOverlayClassList.toggle(STYLE_CLASS_FORCE, !!force);\n        elmOverlayClassList.remove(STYLE_CLASS_SHOW);\n      },\n      // for setting before element online\n      property: 'opacity',\n      duration: \"\".concat(DURATION, \"ms\")\n    });\n    elmOverlay.addEventListener('timedTransitionEnd', function (event) {\n      if (event.target === elmOverlay && event.propertyName === 'opacity') {\n        if (props.state === STATE_SHOWING) {\n          finishShowing(props);\n        } else if (props.state === STATE_HIDING) {\n          finishHiding(props);\n        }\n      }\n    }, true);\n    (props.isDoc ? props.window : elmTargetBody).addEventListener('scroll', function (event) {\n      var target = event.target;\n\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && restoreScroll(props, props.isDoc && (target === props.window || target === props.document || target === props.elmTargetBody) ? props.elmTarget : target)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }, true); // props.state can't control the listener\n    // because the event is fired after flow function exited in some browsers (e.g. Trident).\n\n    props.focusListener = function (event) {\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && avoidFocus(props, event.target)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    };\n\n    elmTargetBody.addEventListener('focus', props.focusListener, true);\n\n    (function (listener) {\n      // simulation \"text-select\" event\n      ['keyup', 'mouseup'].forEach(function (type) {\n        // To listen to keydown in the target and keyup in outside, it is window, not `elmTargetBody`.\n        props.window.addEventListener(type, listener, true);\n      });\n    })(function (event) {\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && avoidSelect(props)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }); // Gecko bug, multiple calling (parallel) by `requestAnimationFrame`.\n\n\n    props.resizing = false;\n    props.window.addEventListener('resize', AnimEvent.add(function () {\n      if (props.resizing) {\n        return;\n      }\n\n      props.resizing = true;\n\n      if (props.state !== STATE_HIDDEN) {\n        if (props.isDoc) {\n          if (props.savedElementsScroll.length && props.savedElementsScroll[0].isDoc) {\n            if (props.disabledDocBars) {\n              // Restore DocBars\n              restoreStyle(props.elmTarget, props.savedStyleTarget, ['overflow']);\n              restoreStyle(elmTargetBody, props.savedStyleTargetBody, ['marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'width', 'height']);\n            }\n\n            props.disabledDocBars = disableDocBars(props);\n          }\n        } else {\n          var bBox = getBBox(elmTargetBody, props.window),\n              lastBBox = props.targetBodyBBox;\n\n          if (bBox.left !== lastBBox.left || bBox.top !== lastBBox.top || bBox.width !== lastBBox.width || bBox.height !== lastBBox.height) {\n            _position(props, bBox);\n          }\n        }\n\n        if (props.options.onPosition) {\n          props.options.onPosition.call(props.ins);\n        }\n      }\n\n      props.resizing = false;\n    }), true); // Avoid scroll on touch device\n\n    elmOverlay.addEventListener('touchmove', function (event) {\n      if (props.state !== STATE_HIDDEN) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }, true); // elmOverlayBody\n\n    (props.elmOverlayBody = elmOverlay.appendChild(elmDocument.createElement('div'))).className = STYLE_CLASS_BODY;\n    elmDocument.body.appendChild(elmOverlay); // Default options\n\n    if (!options.hasOwnProperty('face')) {\n      options.face = null;\n    }\n\n    _setOptions(props, options);\n  }\n  /**\n   * @param {Object} options - New options.\n   * @returns {PlainOverlay} Current instance itself.\n   */\n\n\n  _createClass(PlainOverlay, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Show the overlay.\n     * @param {boolean} [force] - Show it immediately without effect.\n     * @param {Object} [options] - New options.\n     * @returns {PlainOverlay} Current instance itself.\n     */\n\n  }, {\n    key: \"show\",\n    value: function show(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _show(insProps[this._id], force);\n\n      return this;\n    }\n    /**\n     * Hide the overlay.\n     * @param {boolean} [force] - Hide it immediately without effect.\n     * @param {boolean} [sync] - sync-mode\n     * @returns {PlainOverlay} Current instance itself.\n     */\n\n  }, {\n    key: \"hide\",\n    value: function hide(force\n    /* [DISABLE-SYNC/]\n    , sync\n    [DISABLE-SYNC/] */\n    ) {\n      // sync-mode (both `force` and `sync` are `true`)\n      _hide(insProps[this._id], force\n      /* [DISABLE-SYNC/]\n      , sync\n      [DISABLE-SYNC/] */\n      );\n\n      return this;\n    }\n  }, {\n    key: \"scrollLeft\",\n    value: function scrollLeft(value, target) {\n      return scroll(insProps[this._id], target, true, value);\n    }\n  }, {\n    key: \"scrollTop\",\n    value: function scrollTop(value, target) {\n      return scroll(insProps[this._id], target, false, value);\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      var props = insProps[this._id];\n\n      if (props.state !== STATE_HIDDEN) {\n        if (!props.isDoc) {\n          _position(props, getBBox(props.elmTargetBody, props.window));\n        }\n\n        if (props.options.onPosition) {\n          props.options.onPosition.call(props.ins);\n        }\n      }\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"style\",\n    get: function get() {\n      return insProps[this._id].elmOverlay.style;\n    }\n  }, {\n    key: \"blockingDisabled\",\n    get: function get() {\n      return insProps[this._id].blockingDisabled;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        insProps[this._id].blockingDisabled = value;\n      }\n    }\n  }, {\n    key: \"face\",\n    get: function get() {\n      return insProps[this._id].options.face;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        face: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"blur\",\n    get: function get() {\n      return insProps[this._id].options.blur;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        blur: value\n      });\n    }\n  }, {\n    key: \"onShow\",\n    get: function get() {\n      return insProps[this._id].options.onShow;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onShow: value\n      });\n    }\n  }, {\n    key: \"onHide\",\n    get: function get() {\n      return insProps[this._id].options.onHide;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onHide: value\n      });\n    }\n  }, {\n    key: \"onBeforeShow\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeShow;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeShow: value\n      });\n    }\n  }, {\n    key: \"onBeforeHide\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeHide;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeHide: value\n      });\n    }\n  }, {\n    key: \"onPosition\",\n    get: function get() {\n      return insProps[this._id].options.onPosition;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onPosition: value\n      });\n    }\n  }], [{\n    key: \"show\",\n    value: function show(target, options) {\n      return new PlainOverlay(target, options).show();\n    }\n  }, {\n    key: \"STATE_HIDDEN\",\n    get: function get() {\n      return STATE_HIDDEN;\n    }\n  }, {\n    key: \"STATE_SHOWING\",\n    get: function get() {\n      return STATE_SHOWING;\n    }\n  }, {\n    key: \"STATE_SHOWN\",\n    get: function get() {\n      return STATE_SHOWN;\n    }\n  }, {\n    key: \"STATE_HIDING\",\n    get: function get() {\n      return STATE_HIDING;\n    }\n  }]);\n\n  return PlainOverlay;\n}();\n/* [FACE/]\nPlainOverlay.limit = true;\n[FACE/] */\n\n\nexport default PlainOverlay;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PointerEvent\n * https://github.com/anseki/pointer-event\n *\n * Copyright (c) 2022 anseki\n * Licensed under the MIT license.\n */\nimport AnimEvent from 'anim-event';\nvar MOUSE_EMU_INTERVAL = 400,\n    // Avoid mouse events emulation\nCLICK_EMULATOR_ELEMENTS = [],\n    DBLCLICK_EMULATOR_ELEMENTS = []; // Support options for addEventListener\n\nvar passiveSupported = false;\n\ntry {\n  window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n    get: function get() {\n      passiveSupported = true;\n    }\n  }));\n} catch (error) {\n  /* ignore */\n}\n/**\n * addEventListener with specific option.\n * @param {Element} target - An event-target element.\n * @param {string} type - The event type to listen for.\n * @param {function} listener - The EventListener.\n * @param {Object} options - An options object.\n * @returns {void}\n */\n\n\nfunction addEventListenerWithOptions(target, type, listener, options) {\n  // When `passive` is not supported, consider that the `useCapture` is supported instead of\n  // `options` (i.e. options other than the `passive` also are not supported).\n  target.addEventListener(type, listener, passiveSupported ? options : options.capture);\n}\n\nfunction getPointsLength(p0, p1) {\n  var lx = p0.x - p1.x,\n      ly = p0.y - p1.y;\n  return Math.sqrt(lx * lx + ly * ly);\n}\n/**\n * Get Touch instance in list.\n * @param {Touch[]} touches - An Array or TouchList instance.\n * @param {number} id - Touch#identifier\n * @returns {(Touch|null)} - A found Touch instance.\n */\n\n\nfunction getTouchById(touches, id) {\n  if (touches != null && id != null) {\n    for (var i = 0; i < touches.length; i++) {\n      if (touches[i].identifier === id) {\n        return touches[i];\n      }\n    }\n  }\n\n  return null;\n}\n/**\n * @param {Object} xy - Something that might have clientX and clientY.\n * @returns {boolean} - `true` if it has valid clientX and clientY.\n */\n\n\nfunction hasXY(xy) {\n  return xy && typeof xy.clientX === 'number' && typeof xy.clientY === 'number';\n} // Gecko, Trident pick drag-event of some elements such as img, a, etc.\n\n\nfunction dragstart(event) {\n  event.preventDefault();\n}\n\nvar PointerEvent = /*#__PURE__*/function () {\n  /**\n   * Create a `PointerEvent` instance.\n   * @param {Object} [options] - Options\n   */\n  function PointerEvent(options) {\n    var _this = this;\n\n    _classCallCheck(this, PointerEvent);\n\n    this.startHandlers = {};\n    this.lastHandlerId = 0;\n    this.curPointerClass = null;\n    this.curTouchId = null;\n    this.lastPointerXY = {\n      clientX: 0,\n      clientY: 0\n    };\n    this.lastTouchTime = 0; // Options\n\n    this.options = {\n      // Default\n      preventDefault: true,\n      stopPropagation: true\n    };\n\n    if (options) {\n      ['preventDefault', 'stopPropagation'].forEach(function (option) {\n        if (typeof options[option] === 'boolean') {\n          _this.options[option] = options[option];\n        }\n      });\n    }\n  }\n  /**\n   * @param {function} startHandler - This is called with pointerXY when it starts. This returns boolean.\n   * @returns {number} handlerId which is used for adding/removing to element.\n   */\n\n\n  _createClass(PointerEvent, [{\n    key: \"regStartHandler\",\n    value: function regStartHandler(startHandler) {\n      var that = this;\n\n      that.startHandlers[++that.lastHandlerId] = function (event) {\n        var pointerClass = event.type === 'mousedown' ? 'mouse' : 'touch',\n            now = Date.now();\n        var pointerXY, touchId;\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = now; // Avoid mouse events emulation\n\n          pointerXY = event.changedTouches[0];\n          touchId = event.changedTouches[0].identifier;\n        } else {\n          // Avoid mouse events emulation\n          if (now - that.lastTouchTime < MOUSE_EMU_INTERVAL) {\n            return;\n          }\n\n          pointerXY = event;\n        }\n\n        if (!hasXY(pointerXY)) {\n          throw new Error('No clientX/clientY');\n        } // It is new one even if those are 'mouse' or ID is same, then cancel current one.\n\n\n        if (that.curPointerClass) {\n          that.cancel();\n        }\n\n        if (startHandler.call(that, pointerXY)) {\n          that.curPointerClass = pointerClass;\n          that.curTouchId = pointerClass === 'touch' ? touchId : null;\n          that.lastPointerXY.clientX = pointerXY.clientX;\n          that.lastPointerXY.clientY = pointerXY.clientY;\n\n          if (that.options.preventDefault) {\n            event.preventDefault();\n          }\n\n          if (that.options.stopPropagation) {\n            event.stopPropagation();\n          }\n        }\n      };\n\n      return that.lastHandlerId;\n    }\n    /**\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"unregStartHandler\",\n    value: function unregStartHandler(handlerId) {\n      delete this.startHandlers[handlerId];\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"addStartHandler\",\n    value: function addStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      addEventListenerWithOptions(element, 'mousedown', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchstart', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'dragstart', dragstart, {\n        capture: false,\n        passive: false\n      });\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"removeStartHandler\",\n    value: function removeStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      element.removeEventListener('mousedown', this.startHandlers[handlerId], false);\n      element.removeEventListener('touchstart', this.startHandlers[handlerId], false);\n      element.removeEventListener('dragstart', dragstart, false);\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} moveHandler - This is called with pointerXY when it moves.\n     * @param {?boolean} rawEvent - Capture events without `requestAnimationFrame`.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addMoveHandler\",\n    value: function addMoveHandler(element, moveHandler, rawEvent) {\n      var that = this;\n\n      function handler(event) {\n        var pointerClass = event.type === 'mousemove' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) : event;\n\n          if (hasXY(pointerXY)) {\n            if (pointerXY.clientX !== that.lastPointerXY.clientX || pointerXY.clientY !== that.lastPointerXY.clientY) {\n              that.move(pointerXY);\n            }\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      var wrappedHandler = rawEvent ? handler : AnimEvent.add(handler);\n      addEventListenerWithOptions(element, 'mousemove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchmove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curMoveHandler = moveHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"move\",\n    value: function move(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curMoveHandler) {\n        this.curMoveHandler(this.lastPointerXY);\n      }\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} endHandler - This is called with pointerXY when it ends.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addEndHandler\",\n    value: function addEndHandler(element, endHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        var pointerClass = event.type === 'mouseup' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}) : // `{}` means matching\n          event;\n\n          if (pointerXY) {\n            that.end(pointerXY);\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'mouseup', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curEndHandler = endHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"end\",\n    value: function end(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curEndHandler) {\n        this.curEndHandler(this.lastPointerXY);\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} cancelHandler - This is called when it cancels.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addCancelHandler\",\n    value: function addCancelHandler(element, cancelHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        /*\n          Now, this is fired by touchcancel only, but it might be fired even if curPointerClass is mouse.\n        */\n        // const pointerClass = 'touch';\n        that.lastTouchTime = Date.now(); // Avoid mouse events emulation\n\n        if (that.curPointerClass != null) {\n          var pointerXY = getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}); // `{}` means matching\n\n          if (pointerXY) {\n            that.cancel();\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'touchcancel', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curCancelHandler = cancelHandler;\n    }\n    /**\n     * @returns {void}\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      if (this.curCancelHandler) {\n        this.curCancelHandler();\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n  }], [{\n    key: \"addEventListenerWithOptions\",\n    get: function get() {\n      return addEventListenerWithOptions;\n    }\n    /**\n     * Emulate `click` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initClickEmulator\",\n    value: function initClickEmulator(element, moveTolerance, timeTolerance) {\n      if (CLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      CLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, touchId, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      addEventListenerWithOptions(element, 'touchstart', function (event) {\n        var touch = event.changedTouches[0];\n        startX = touch.clientX;\n        startY = touch.clientY;\n        touchId = touch.identifier;\n        startMs = performance.now();\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', function (event) {\n        var touch = getTouchById(event.changedTouches, touchId);\n\n        if (typeof startX === 'number' && typeof startY === 'number' && typeof startMs === 'number' && touch && typeof touch.clientX === 'number' && typeof touch.clientY === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: touch.clientX,\n          y: touch.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance) {\n          // FIRE\n          setTimeout(function () {\n            var newEvent = new MouseEvent('click', {\n              clientX: touch.clientX,\n              clientY: touch.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n        }\n\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchcancel', function () {\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n    /**\n     * Emulate `dblclick` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initDblClickEmulator\",\n    value: function initDblClickEmulator(element, moveTolerance, timeTolerance) {\n      if (DBLCLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      DBLCLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      PointerEvent.initClickEmulator(element, moveTolerance, timeTolerance);\n      addEventListenerWithOptions(element, 'click', function (event) {\n        if (!event.emulated || // Ignore events that are not from `touchend`.\n        typeof event.clientX !== 'number' || typeof event.clientY !== 'number') {\n          return;\n        }\n\n        if (typeof startX === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: event.clientX,\n          y: event.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance * 2) {\n          // up (tolerance) down (tolerance) up\n          setTimeout(function () {\n            // FIRE\n            var newEvent = new MouseEvent('dblclick', {\n              clientX: event.clientX,\n              clientY: event.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n          startX = startY = startMs = null;\n        } else {\n          // 1st\n          startX = event.clientX;\n          startY = event.clientY;\n          startMs = performance.now();\n        }\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n  }]);\n\n  return PointerEvent;\n}();\n\nexport default PointerEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\n * PlainDraggable\n * https://anseki.github.io/plain-draggable/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport PointerEvent from 'pointer-event';\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nmClassList.ignoreNative = true;\n\nvar ZINDEX = 9000,\n    // [SNAP]\nSNAP_GRAVITY = 20,\n    SNAP_CORNER = 'tl',\n    SNAP_SIDE = 'both',\n    SNAP_EDGE = 'both',\n    SNAP_BASE = 'containment',\n    SNAP_ALL_CORNERS = ['tl', 'tr', 'bl', 'br'],\n    SNAP_ALL_SIDES = ['start', 'end'],\n    SNAP_ALL_EDGES = ['inside', 'outside'],\n    // [/SNAP]\n// [AUTO-SCROLL]\nAUTOSCROLL_SPEED = [40, 200, 1000],\n    AUTOSCROLL_SENSITIVITY = [100, 40, 0],\n    // [/AUTO-SCROLL]\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    IS_WEBKIT = !IS_EDGE && !IS_TRIDENT && !IS_GECKO && !IS_BLINK && // Some engines support `webkit-*` properties.\n!window.chrome && 'WebkitAppearance' in document.documentElement.style,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n    pointerOffset = {},\n    pointerEvent = new PointerEvent();\n\nvar insId = 0,\n    activeProps,\n    hasMoved,\n    body,\n    // CSS property/value\ncssValueDraggableCursor,\n    cssValueDraggingCursor,\n    cssOrgValueBodyCursor,\n    cssPropTransitionProperty,\n    cssPropTransform,\n    cssPropUserSelect,\n    cssOrgValueBodyUserSelect,\n    // Try to set `cursor` property.\ncssWantedValueDraggableCursor = IS_WEBKIT ? ['all-scroll', 'move'] : ['grab', 'all-scroll', 'move'],\n    cssWantedValueDraggingCursor = IS_WEBKIT ? 'move' : ['grabbing', 'move'],\n    // class\ndraggableClass = 'plain-draggable',\n    draggingClass = 'plain-draggable-dragging',\n    movingClass = 'plain-draggable-moving'; // [AUTO-SCROLL]\n// Scroll Animation Controller\n\nvar scrollFrame = {},\n    MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nrequestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\n{\n  /**\n   * @typedef {Object} MoveArgs\n   * @property {number} dir - [-1 | 1] minus or plus to position value.\n   * @property {number} speed - px/ms\n   * @property {number} min - Minimum position value.\n   * @property {number} max - Maximum position value.\n   * @property {number} [lastFrameTime] - Time of last frame.\n   * @property {number} [lastValue] - Strict value of last frame.\n   */\n  var curXyMoveArgs = {},\n      curElement,\n      curScrollXY,\n      requestID;\n\n  function frameUpdate() {\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        var timeLen = now - moveArgs.lastFrameTime,\n            absValue = curScrollXY(curElement, xy),\n            curValue = moveArgs.lastValue != null && Math.abs(moveArgs.lastValue - absValue) < 10 // It was not moved manually\n        ? moveArgs.lastValue : absValue;\n\n        if (moveArgs.dir === -1 ? curValue > moveArgs.min : curValue < moveArgs.max) {\n          var newValue = curValue + moveArgs.speed * timeLen * moveArgs.dir;\n\n          if (newValue < moveArgs.min) {\n            newValue = moveArgs.min;\n          } else if (newValue > moveArgs.max) {\n            newValue = moveArgs.max;\n          }\n\n          curScrollXY(curElement, xy, newValue);\n          moveArgs.lastValue = newValue;\n        }\n\n        moveArgs.lastFrameTime = now;\n      }\n    });\n  }\n\n  function frame() {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    requestID = requestAnim.call(window, frame);\n  }\n  /**\n   * @param {Element} element - A target element.\n   * @param {{x: ?MoveArgs, y: ?MoveArgs}} xyMoveArgs - MoveArgs for x and y\n   * @param {function} scrollXY - (element: Element, xy: string, value: number) => number\n   * @returns {void}\n   */\n\n\n  scrollFrame.move = function (element, xyMoveArgs, scrollXY) {\n    cancelAnim.call(window, requestID);\n    frameUpdate(); // Update current data now because it might be not continuation.\n    // Re-use lastValue\n\n    if (curElement === element) {\n      if (xyMoveArgs.x && curXyMoveArgs.x) {\n        xyMoveArgs.x.lastValue = curXyMoveArgs.x.lastValue;\n      }\n\n      if (xyMoveArgs.y && curXyMoveArgs.y) {\n        xyMoveArgs.y.lastValue = curXyMoveArgs.y.lastValue;\n      }\n    }\n\n    curElement = element;\n    curXyMoveArgs = xyMoveArgs;\n    curScrollXY = scrollXY;\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        moveArgs.lastFrameTime = now;\n      }\n    });\n    requestID = requestAnim.call(window, frame);\n  };\n\n  scrollFrame.stop = function () {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    curXyMoveArgs = {};\n    curElement = null; // Remove reference\n  };\n}\n\nfunction scrollXYWindow(element, xy, value) {\n  if (value != null) {\n    if (xy === 'x') {\n      element.scrollTo(value, element.pageYOffset);\n    } else {\n      element.scrollTo(element.pageXOffset, value);\n    }\n  }\n\n  return xy === 'x' ? element.pageXOffset : element.pageYOffset;\n}\n\nfunction scrollXYElement(element, xy, value) {\n  var prop = xy === 'x' ? 'scrollLeft' : 'scrollTop';\n\n  if (value != null) {\n    element[prop] = value;\n  }\n\n  return element[prop];\n}\n/**\n * @typedef {Object} Scrollable\n * @property {number} clientWidth - width of scrollable area.\n * @property {number} clientHeight - height of scrollable area.\n * @property {number} scrollWidth - width of inner content.\n * @property {number} scrollHeight - height of inner content.\n * @property {number} clientX - X of scrollable area, document coordinate.\n * @property {number} clientY - T of scrollable area, document coordinate.\n */\n\n/**\n * @param {Element} element - A target element.\n * @param {boolean} [isWindow] - `true` if element is window.\n * @param {boolean} [dontScroll] - `true` makes it skip scroll that gets scrollWidth/Height.\n * @returns {Scrollable} Information for scroll.\n */\n\n\nfunction getScrollable(element, isWindow, dontScroll) {\n  var scrollable = {};\n  var cmpStyleHtml, cmpStyleBody, cmpStyleElement; // clientWidth/Height\n\n  (function (target) {\n    scrollable.clientWidth = target.clientWidth;\n    scrollable.clientHeight = target.clientHeight;\n  })(isWindow ? document.documentElement : element); // scrollWidth/Height\n\n  /*\n    Gecko bug, bottom-padding of element is reduced.\n    Blink for Android bug, borders of <html> is rendered but those are not added to scrollW/H.\n    Then, move it to max scroll position (sufficiently larger values) forcibly, and get scroll position.\n  */\n\n\n  var maxScrollLeft = 0,\n      maxScrollTop = 0;\n\n  if (!dontScroll) {\n    var curScrollLeft, curScrollTop;\n\n    if (isWindow) {\n      curScrollLeft = scrollXYWindow(element, 'x');\n      curScrollTop = scrollXYWindow(element, 'y');\n      cmpStyleHtml = getComputedStyle(document.documentElement, '');\n      cmpStyleBody = getComputedStyle(document.body, '');\n      maxScrollLeft = scrollXYWindow(element, 'x', document.documentElement.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYWindow(element, 'y', document.documentElement.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      scrollXYWindow(element, 'x', curScrollLeft);\n      scrollXYWindow(element, 'y', curScrollTop);\n    } else {\n      curScrollLeft = scrollXYElement(element, 'x');\n      curScrollTop = scrollXYElement(element, 'y');\n      cmpStyleElement = getComputedStyle(element, '');\n      maxScrollLeft = scrollXYElement(element, 'x', element.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYElement(element, 'y', element.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      scrollXYElement(element, 'x', curScrollLeft);\n      scrollXYElement(element, 'y', curScrollTop);\n    }\n  }\n\n  scrollable.scrollWidth = scrollable.clientWidth + maxScrollLeft;\n  scrollable.scrollHeight = scrollable.clientHeight + maxScrollTop; // clientX/Y\n\n  var rect;\n\n  if (isWindow) {\n    scrollable.clientX = scrollable.clientY = 0;\n  } else {\n    // padding-box\n    rect = element.getBoundingClientRect();\n\n    if (!cmpStyleElement) {\n      cmpStyleElement = getComputedStyle(element, '');\n    }\n\n    scrollable.clientX = rect.left + (parseFloat(cmpStyleElement.borderLeftWidth) || 0);\n    scrollable.clientY = rect.top + (parseFloat(cmpStyleElement.borderTopWidth) || 0);\n  }\n\n  return scrollable;\n} // [/AUTO-SCROLL]\n\n\nfunction copyTree(obj) {\n  return !obj ? obj : isObject(obj) ? Object.keys(obj).reduce(function (copyObj, key) {\n    copyObj[key] = copyTree(obj[key]);\n    return copyObj;\n  }, {}) : Array.isArray(obj) ? obj.map(copyTree) : obj;\n}\n\nfunction hasChanged(a, b) {\n  var typeA, keysA;\n  return _typeof(a) !== _typeof(b) || (typeA = isObject(a) ? 'obj' : Array.isArray(a) ? 'array' : '') !== (isObject(b) ? 'obj' : Array.isArray(b) ? 'array' : '') || (typeA === 'obj' ? hasChanged(keysA = Object.keys(a).sort(), Object.keys(b).sort()) || keysA.some(function (prop) {\n    return hasChanged(a[prop], b[prop]);\n  }) : typeA === 'array' ? a.length !== b.length || a.some(function (aVal, i) {\n    return hasChanged(aVal, b[i]);\n  }) : a !== b);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} x - Substitutes for left\n * @property {(number|null)} y - Substitutes for top\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(BBox|null)} A normalized `BBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var value;\n\n  if (isFinite(value = bBox.left) || isFinite(value = bBox.x)) {\n    bBox.left = bBox.x = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(value = bBox.top) || isFinite(value = bBox.y)) {\n    bBox.top = bBox.y = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.width) && bBox.width >= 0) {\n    bBox.right = bBox.left + bBox.width;\n  } else if (isFinite(bBox.right) && bBox.right >= bBox.left) {\n    bBox.width = bBox.right - bBox.left;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.height) && bBox.height >= 0) {\n    bBox.bottom = bBox.top + bBox.height;\n  } else if (isFinite(bBox.bottom) && bBox.bottom >= bBox.top) {\n    bBox.height = bBox.bottom - bBox.top;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n/**\n * A value that is Pixels or Ratio\n * @typedef {{value: number, isRatio: boolean}} PPValue\n */\n\n\nfunction validPPValue(value) {\n  // Get PPValue from string (all `/s` were already removed)\n  function string2PPValue(inString) {\n    var matches = /^(.+?)(%)?$/.exec(inString);\n    var value, isRatio;\n    return matches && isFinite(value = parseFloat(matches[1])) ? {\n      value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n      isRatio: isRatio\n    } : null; // 0% -> 0\n  }\n\n  return isFinite(value) ? {\n    value: value,\n    isRatio: false\n  } : typeof value === 'string' ? string2PPValue(value.replace(/\\s/g, '')) : null;\n}\n\nfunction ppValue2OptionValue(ppValue) {\n  return ppValue.isRatio ? \"\".concat(ppValue.value * 100, \"%\") : ppValue.value;\n}\n\nfunction resolvePPValue(ppValue, baseOrigin, baseSize) {\n  return typeof ppValue === 'number' ? ppValue : baseOrigin + ppValue.value * (ppValue.isRatio ? baseSize : 1);\n}\n/**\n * An object that simulates BBox but properties are PPValue.\n * @typedef {Object} PPBBox\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(PPBBox|null)} A normalized `PPBBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validPPBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var ppValue;\n\n  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {\n    bBox.left = bBox.x = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {\n    bBox.top = bBox.y = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {\n    bBox.width = ppValue;\n    delete bBox.right;\n  } else if (ppValue = validPPValue(bBox.right)) {\n    bBox.right = ppValue;\n    delete bBox.width;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {\n    bBox.height = ppValue;\n    delete bBox.bottom;\n  } else if (ppValue = validPPValue(bBox.bottom)) {\n    bBox.bottom = ppValue;\n    delete bBox.height;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n\nfunction ppBBox2OptionObject(ppBBox) {\n  return Object.keys(ppBBox).reduce(function (obj, prop) {\n    obj[prop] = ppValue2OptionValue(ppBBox[prop]);\n    return obj;\n  }, {});\n} // PPBBox -> BBox\n\n\nfunction resolvePPBBox(ppBBox, baseBBox) {\n  var prop2Axis = {\n    left: 'x',\n    right: 'x',\n    x: 'x',\n    width: 'x',\n    top: 'y',\n    bottom: 'y',\n    y: 'y',\n    height: 'y'\n  },\n      baseOriginXY = {\n    x: baseBBox.left,\n    y: baseBBox.top\n  },\n      baseSizeXY = {\n    x: baseBBox.width,\n    y: baseBBox.height\n  };\n  return validBBox(Object.keys(ppBBox).reduce(function (bBox, prop) {\n    bBox[prop] = resolvePPValue(ppBBox[prop], prop === 'width' || prop === 'height' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n    return bBox;\n  }, {}));\n}\n/**\n * @param {Element} element - A target element.\n * @param {?boolean} getPaddingBox - Get padding-box instead of border-box as bounding-box.\n * @returns {BBox} A bounding-box of `element`.\n */\n\n\nfunction getBBox(element, getPaddingBox) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.width,\n    height: rect.height\n  };\n  bBox.left += window.pageXOffset;\n  bBox.top += window.pageYOffset;\n\n  if (getPaddingBox) {\n    var style = window.getComputedStyle(element, ''),\n        borderTop = parseFloat(style.borderTopWidth) || 0,\n        borderRight = parseFloat(style.borderRightWidth) || 0,\n        borderBottom = parseFloat(style.borderBottomWidth) || 0,\n        borderLeft = parseFloat(style.borderLeftWidth) || 0;\n    bBox.left += borderLeft;\n    bBox.top += borderTop;\n    bBox.width -= borderLeft + borderRight;\n    bBox.height -= borderTop + borderBottom;\n  }\n\n  return validBBox(bBox);\n}\n/**\n * Optimize an element for animation.\n * @param {Element} element - A target element.\n * @param {?boolean} gpuTrigger - Initialize for SVGElement if `true`.\n * @returns {Element} A target element.\n */\n\n\nfunction initAnim(element, gpuTrigger) {\n  var style = element.style;\n  style.webkitTapHighlightColor = 'transparent'; // Only when it has no shadow\n\n  var cssPropBoxShadow = CSSPrefix.getName('boxShadow'),\n      boxShadow = window.getComputedStyle(element, '')[cssPropBoxShadow];\n\n  if (!boxShadow || boxShadow === 'none') {\n    style[cssPropBoxShadow] = '0 0 1px transparent';\n  }\n\n  if (gpuTrigger && cssPropTransform) {\n    style[cssPropTransform] = 'translateZ(0)';\n  }\n\n  return element;\n}\n\nfunction setDraggableCursor(element, orgCursor) {\n  if (cssValueDraggableCursor == null) {\n    if (cssWantedValueDraggableCursor !== false) {\n      cssValueDraggableCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggableCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggableCursor == null) {\n      cssValueDraggableCursor = false;\n    }\n  } // Update it to change a state even if cssValueDraggableCursor is false.\n\n\n  element.style.cursor = cssValueDraggableCursor === false ? orgCursor : cssValueDraggableCursor;\n}\n\nfunction setDraggingCursor(element) {\n  if (cssValueDraggingCursor == null) {\n    if (cssWantedValueDraggingCursor !== false) {\n      cssValueDraggingCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggingCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggingCursor == null) {\n      cssValueDraggingCursor = false;\n    }\n  }\n\n  if (cssValueDraggingCursor !== false) {\n    element.style.cursor = cssValueDraggingCursor;\n  }\n} // [SVG]\n\n/**\n * Get SVG coordinates from viewport coordinates.\n * @param {props} props - `props` of instance.\n * @param {number} clientX - viewport X.\n * @param {number} clientY - viewport Y.\n * @returns {SVGPoint} SVG coordinates.\n */\n\n\nfunction viewPoint2SvgPoint(props, clientX, clientY) {\n  var svgPoint = props.svgPoint;\n  svgPoint.x = clientX;\n  svgPoint.y = clientY;\n  return svgPoint.matrixTransform(props.svgCtmElement.getScreenCTM().inverse());\n} // [/SVG]\n\n/**\n * Move by `translate`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveTranslate(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.htmlOffset;\n    props.elementStyle[cssPropTransform] = \"translate(\".concat(position.left + offset.left, \"px, \").concat(position.top + offset.top, \"px)\");\n    return true;\n  }\n\n  return false;\n} // [LEFTTOP]\n\n/**\n * Move by `left` and `top`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveLeftTop(props, position) {\n  var elementBBox = props.elementBBox,\n      elementStyle = props.elementStyle,\n      offset = props.htmlOffset;\n  var moved = false;\n\n  if (position.left !== elementBBox.left) {\n    elementStyle.left = position.left + offset.left + 'px';\n    moved = true;\n  }\n\n  if (position.top !== elementBBox.top) {\n    elementStyle.top = position.top + offset.top + 'px';\n    moved = true;\n  }\n\n  return moved;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Move SVGElement.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveSvg(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.svgOffset,\n        originBBox = props.svgOriginBBox,\n        point = viewPoint2SvgPoint(props, position.left - window.pageXOffset, position.top - window.pageYOffset);\n    props.svgTransform.setTranslate(point.x + offset.x - originBBox.x, point.y + offset.y - originBBox.y);\n    return true;\n  }\n\n  return false;\n} // [/SVG]\n\n/**\n * Set `props.element` position.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @param {function} [cbCheck] - Callback that is called with valid position, cancel moving if it returns `false`.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction move(props, position, cbCheck) {\n  var elementBBox = props.elementBBox;\n\n  function fix() {\n    if (props.minLeft >= props.maxLeft) {\n      // Disabled\n      position.left = elementBBox.left;\n    } else if (position.left < props.minLeft) {\n      position.left = props.minLeft;\n    } else if (position.left > props.maxLeft) {\n      position.left = props.maxLeft;\n    }\n\n    if (props.minTop >= props.maxTop) {\n      // Disabled\n      position.top = elementBBox.top;\n    } else if (position.top < props.minTop) {\n      position.top = props.minTop;\n    } else if (position.top > props.maxTop) {\n      position.top = props.maxTop;\n    }\n  }\n\n  fix();\n\n  if (cbCheck) {\n    if (cbCheck(position) === false) {\n      return false;\n    }\n\n    fix(); // Again\n  }\n\n  var moved = props.moveElm(props, position);\n\n  if (moved) {\n    // Update elementBBox\n    props.elementBBox = validBBox({\n      left: position.left,\n      top: position.top,\n      width: elementBBox.width,\n      height: elementBBox.height\n    });\n  }\n\n  return moved;\n}\n/**\n * Initialize HTMLElement for `translate`, and get `offset` that is used by `moveTranslate`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initTranslate(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['display', 'marginTop', 'marginBottom', 'width', 'height'];\n  RESTORE_PROPS.unshift(cssPropTransform); // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element),\n      cmpStyle = window.getComputedStyle(element, ''); // https://www.w3.org/TR/css-transforms-1/#transformable-element\n\n  if (cmpStyle.display === 'inline') {\n    elementStyle.display = 'inline-block';\n    ['Top', 'Bottom'].forEach(function (dirProp) {\n      var padding = parseFloat(cmpStyle[\"padding\".concat(dirProp)]); // paddingTop/Bottom make padding but don't make space -> negative margin in inline-block\n      // marginTop/Bottom don't work in inline element -> `0` in inline-block\n\n      elementStyle[\"margin\".concat(dirProp)] = padding ? \"-\".concat(padding, \"px\") : '0';\n    });\n  }\n\n  elementStyle[cssPropTransform] = 'translate(0, 0)'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle[cssPropTransform] = \"translate(\".concat(curPosition.left + offset.left, \"px, \").concat(curPosition.top + offset.top, \"px)\"); // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle[cssPropTransform] = \"translate(\".concat(fixPosition.left + offset.left, \"px, \").concat(fixPosition.top + offset.top, \"px)\");\n  }\n\n  return fixPosition;\n} // [LEFTTOP]\n\n/**\n * Initialize HTMLElement for `left` and `top`, and get `offset` that is used by `moveLeftTop`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initLeftTop(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['position', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'width', 'height']; // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element);\n  elementStyle.position = 'absolute';\n  elementStyle.left = elementStyle.top = elementStyle.margin = '0'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle.left = curPosition.left + offset.left + 'px';\n  elementStyle.top = curPosition.top + offset.top + 'px'; // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle.left = fixPosition.left + offset.left + 'px';\n    elementStyle.top = fixPosition.top + offset.top + 'px';\n  }\n\n  return fixPosition;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Initialize SVGElement, and get `offset` that is used by `moveSvg`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initSvg(props) {\n  var element = props.element,\n      svgTransform = props.svgTransform,\n      curRect = element.getBoundingClientRect(),\n      // Get Rect before change position.\n  fixPosition = getBBox(element);\n  svgTransform.setTranslate(0, 0);\n  var originBBox = props.svgOriginBBox = element.getBBox(),\n      // Try to get SVG coordinates of current position.\n  newRect = element.getBoundingClientRect(),\n      originPoint = viewPoint2SvgPoint(props, newRect.left, newRect.top),\n      // Gecko bug, getScreenCTM returns incorrect CTM, and originPoint might not be current position.\n  offset = props.svgOffset = {\n    x: originBBox.x - originPoint.x,\n    y: originBBox.y - originPoint.y\n  },\n      // Restore position\n  curPoint = viewPoint2SvgPoint(props, curRect.left, curRect.top);\n  svgTransform.setTranslate(curPoint.x + offset.x - originBBox.x, curPoint.y + offset.y - originBBox.y);\n  return fixPosition;\n} // [/SVG]\n\n/**\n * Set `elementBBox`, `containmentBBox`, `min/max``Left/Top` and `snapTargets`.\n * @param {props} props - `props` of instance.\n * @param {string} [eventType] - A type of event that kicked this method.\n * @returns {void}\n */\n\n\nfunction initBBox(props, eventType) {\n  // eslint-disable-line no-unused-vars\n  var docBBox = getBBox(document.documentElement),\n      elementBBox = props.elementBBox = props.initElm(props),\n      // reset offset etc.\n  containmentBBox = props.containmentBBox = props.containmentIsBBox ? resolvePPBBox(props.options.containment, docBBox) || docBBox : getBBox(props.options.containment, true);\n  props.minLeft = containmentBBox.left;\n  props.maxLeft = containmentBBox.right - elementBBox.width;\n  props.minTop = containmentBBox.top;\n  props.maxTop = containmentBBox.bottom - elementBBox.height; // Adjust position\n\n  move(props, {\n    left: elementBBox.left,\n    top: elementBBox.top\n  }); // [SNAP]\n  // Snap-targets\n\n  /**\n   * @typedef {Object} SnapTarget\n   * @property {number} [x] - A coordinate it moves to. It has x or y or both.\n   * @property {number} [y]\n   * @property {number} [gravityXStart] - Gravity zone. It has *Start or *End or both, and *X* or *Y* or both.\n   * @property {number} [gravityXEnd]\n   * @property {number} [gravityYStart]\n   * @property {number} [gravityYEnd]\n   */\n\n  if (props.parsedSnapTargets) {\n    var elementSizeXY = {\n      x: elementBBox.width,\n      y: elementBBox.height\n    },\n        minXY = {\n      x: props.minLeft,\n      y: props.minTop\n    },\n        maxXY = {\n      x: props.maxLeft,\n      y: props.maxTop\n    },\n        prop2Axis = {\n      left: 'x',\n      right: 'x',\n      x: 'x',\n      width: 'x',\n      xStart: 'x',\n      xEnd: 'x',\n      xStep: 'x',\n      top: 'y',\n      bottom: 'y',\n      y: 'y',\n      height: 'y',\n      yStart: 'y',\n      yEnd: 'y',\n      yStep: 'y'\n    },\n        snapTargets = props.parsedSnapTargets.reduce(function (snapTargets, parsedSnapTarget) {\n      var baseRect = parsedSnapTarget.base === 'containment' ? containmentBBox : docBBox,\n          baseOriginXY = {\n        x: baseRect.left,\n        y: baseRect.top\n      },\n          baseSizeXY = {\n        x: baseRect.width,\n        y: baseRect.height\n      };\n      /**\n       * Basically, shallow copy from parsedSnapTarget, and it can have resolved values.\n       * @typedef {{x: (number|PPValue), y, xStart, xEnd, xStep, yStart, yEnd, yStep}} TargetXY\n       * @property {string[]} [corners] - Applied value.\n       * @property {string[]} [sides]\n       * @property {boolean} center\n       * @property {number} [xGravity] - Override parsedSnapTarget.gravity.\n       * @property {number} [yGravity]\n       */\n      // Add single Point or Line (i.e. targetXY has no *Step)\n\n      function addSnapTarget(targetXY) {\n        if (targetXY.center == null) {\n          targetXY.center = parsedSnapTarget.center;\n        }\n\n        if (targetXY.xGravity == null) {\n          targetXY.xGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.yGravity == null) {\n          targetXY.yGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.x != null && targetXY.y != null) {\n          // Point\n          targetXY.x = resolvePPValue(targetXY.x, baseOriginXY.x, baseSizeXY.x);\n          targetXY.y = resolvePPValue(targetXY.y, baseOriginXY.y, baseSizeXY.y);\n\n          if (targetXY.center) {\n            targetXY.x -= elementSizeXY.x / 2;\n            targetXY.y -= elementSizeXY.y / 2;\n            targetXY.corners = ['tl'];\n          }\n\n          (targetXY.corners || parsedSnapTarget.corners).forEach(function (corner) {\n            var x = targetXY.x - (corner === 'tr' || corner === 'br' ? elementSizeXY.x : 0),\n                y = targetXY.y - (corner === 'bl' || corner === 'br' ? elementSizeXY.y : 0);\n\n            if (x >= minXY.x && x <= maxXY.x && y >= minXY.y && y <= maxXY.y) {\n              var snapTarget = {\n                x: x,\n                y: y\n              },\n                  gravityXStart = x - targetXY.xGravity,\n                  gravityXEnd = x + targetXY.xGravity,\n                  gravityYStart = y - targetXY.yGravity,\n                  gravityYEnd = y + targetXY.yGravity;\n\n              if (gravityXStart > minXY.x) {\n                snapTarget.gravityXStart = gravityXStart;\n              }\n\n              if (gravityXEnd < maxXY.x) {\n                snapTarget.gravityXEnd = gravityXEnd;\n              }\n\n              if (gravityYStart > minXY.y) {\n                snapTarget.gravityYStart = gravityYStart;\n              }\n\n              if (gravityYEnd < maxXY.y) {\n                snapTarget.gravityYEnd = gravityYEnd;\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        } else {\n          // Line\n          var specAxis = targetXY.x != null ? 'x' : 'y',\n              rangeAxis = specAxis === 'x' ? 'y' : 'x',\n              startProp = \"\".concat(rangeAxis, \"Start\"),\n              endProp = \"\".concat(rangeAxis, \"End\"),\n              gravityProp = \"\".concat(specAxis, \"Gravity\"),\n              specAxisL = specAxis.toUpperCase(),\n              rangeAxisL = rangeAxis.toUpperCase(),\n              gravitySpecStartProp = \"gravity\".concat(specAxisL, \"Start\"),\n              gravitySpecEndProp = \"gravity\".concat(specAxisL, \"End\"),\n              gravityRangeStartProp = \"gravity\".concat(rangeAxisL, \"Start\"),\n              gravityRangeEndProp = \"gravity\".concat(rangeAxisL, \"End\");\n          targetXY[specAxis] = resolvePPValue(targetXY[specAxis], baseOriginXY[specAxis], baseSizeXY[specAxis]);\n          targetXY[startProp] = resolvePPValue(targetXY[startProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]);\n          targetXY[endProp] = resolvePPValue(targetXY[endProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]) - elementSizeXY[rangeAxis]; // Reduce the end of the line.\n\n          if (targetXY[startProp] > targetXY[endProp] || // Smaller than element size.\n          targetXY[startProp] > maxXY[rangeAxis] || targetXY[endProp] < minXY[rangeAxis]) {\n            return;\n          }\n\n          if (targetXY.center) {\n            targetXY[specAxis] -= elementSizeXY[specAxis] / 2;\n            targetXY.sides = ['start'];\n          }\n\n          (targetXY.sides || parsedSnapTarget.sides).forEach(function (side) {\n            var xy = targetXY[specAxis] - (side === 'end' ? elementSizeXY[specAxis] : 0);\n\n            if (xy >= minXY[specAxis] && xy <= maxXY[specAxis]) {\n              var snapTarget = {},\n                  gravitySpecStart = xy - targetXY[gravityProp],\n                  gravitySpecEnd = xy + targetXY[gravityProp];\n              snapTarget[specAxis] = xy;\n\n              if (gravitySpecStart > minXY[specAxis]) {\n                snapTarget[gravitySpecStartProp] = gravitySpecStart;\n              }\n\n              if (gravitySpecEnd < maxXY[specAxis]) {\n                snapTarget[gravitySpecEndProp] = gravitySpecEnd;\n              }\n\n              if (targetXY[startProp] > minXY[rangeAxis]) {\n                snapTarget[gravityRangeStartProp] = targetXY[startProp];\n              }\n\n              if (targetXY[endProp] < maxXY[rangeAxis]) {\n                snapTarget[gravityRangeEndProp] = targetXY[endProp];\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        }\n      }\n\n      var bBox;\n\n      if ((bBox = parsedSnapTarget.element ? getBBox(parsedSnapTarget.element) : null) || // Element\n      parsedSnapTarget.ppBBox) {\n        if (parsedSnapTarget.ppBBox) {\n          bBox = resolvePPBBox(parsedSnapTarget.ppBBox, baseRect);\n        } // BBox\n\n\n        if (bBox) {\n          // Drop invalid BBox.\n          // Expand into 4 lines.\n          parsedSnapTarget.edges.forEach(function (edge) {\n            var lengthenX = parsedSnapTarget.gravity,\n                lengthenY = parsedSnapTarget.gravity;\n\n            if (edge === 'outside') {\n              // Snap it when a part of the element is part of the range.\n              lengthenX += elementBBox.width;\n              lengthenY += elementBBox.height;\n            }\n\n            var xStart = bBox.left - lengthenX,\n                xEnd = bBox.right + lengthenX,\n                yStart = bBox.top - lengthenY,\n                yEnd = bBox.bottom + lengthenY;\n            var side = edge === 'inside' ? 'start' : 'end';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.top,\n              sides: [side],\n              center: false\n            }); // Top\n\n            addSnapTarget({\n              x: bBox.left,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Left\n\n            side = edge === 'inside' ? 'end' : 'start';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.bottom,\n              sides: [side],\n              center: false\n            }); // Bottom\n\n            addSnapTarget({\n              x: bBox.right,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Right\n          });\n        }\n      } else {\n        var expanded = [['x', 'y', 'xStart', 'xEnd', 'xStep', 'yStart', 'yEnd', 'yStep'].reduce(function (targetXY, prop) {\n          if (parsedSnapTarget[prop]) {\n            targetXY[prop] = resolvePPValue(parsedSnapTarget[prop], prop === 'xStep' || prop === 'yStep' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n          }\n\n          return targetXY;\n        }, {})];\n        ['x', 'y'].forEach(function (axis) {\n          var startProp = \"\".concat(axis, \"Start\"),\n              endProp = \"\".concat(axis, \"End\"),\n              stepProp = \"\".concat(axis, \"Step\"),\n              gravityProp = \"\".concat(axis, \"Gravity\");\n          expanded = expanded.reduce(function (expanded, targetXY) {\n            var start = targetXY[startProp],\n                end = targetXY[endProp],\n                step = targetXY[stepProp];\n\n            if (start != null && end != null && start >= end) {\n              return expanded;\n            } // start >= end\n\n\n            if (step != null) {\n              if (step < 2) {\n                return expanded;\n              } // step >= 2px -> Expand by step\n\n\n              var gravity = step / 2; // max\n\n              gravity = parsedSnapTarget.gravity > gravity ? gravity : null;\n\n              for (var curValue = start; curValue <= end; curValue += step) {\n                var expandedXY = Object.keys(targetXY).reduce(function (expandedXY, prop) {\n                  if (prop !== startProp && prop !== endProp && prop !== stepProp) {\n                    expandedXY[prop] = targetXY[prop];\n                  }\n\n                  return expandedXY;\n                }, {});\n                expandedXY[axis] = curValue;\n                expandedXY[gravityProp] = gravity;\n                expanded.push(expandedXY);\n              }\n            } else {\n              expanded.push(targetXY);\n            }\n\n            return expanded;\n          }, []);\n        });\n        expanded.forEach(function (targetXY) {\n          addSnapTarget(targetXY);\n        });\n      }\n\n      return snapTargets;\n    }, []);\n    props.snapTargets = snapTargets.length ? snapTargets : null;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n\n  var autoScroll = {},\n      autoScrollOptions = props.options.autoScroll;\n\n  if (autoScrollOptions) {\n    autoScroll.isWindow = autoScrollOptions.target === window;\n    autoScroll.target = autoScrollOptions.target;\n    var dontScroll = eventType === 'scroll',\n        // Avoid duplicated calling\n    scrollable = getScrollable(autoScrollOptions.target, autoScroll.isWindow, dontScroll),\n        scrollableBBox = validBBox({\n      left: scrollable.clientX,\n      top: scrollable.clientY,\n      width: scrollable.clientWidth,\n      height: scrollable.clientHeight\n    });\n\n    if (!dontScroll) {\n      autoScroll.scrollWidth = scrollable.scrollWidth;\n      autoScroll.scrollHeight = scrollable.scrollHeight;\n    } else if (props.autoScroll) {\n      autoScroll.scrollWidth = props.autoScroll.scrollWidth;\n      autoScroll.scrollHeight = props.autoScroll.scrollHeight;\n    }\n\n    [['X', 'Width', 'left', 'right'], ['Y', 'Height', 'top', 'bottom']].forEach(function (axis) {\n      var xy = axis[0],\n          wh = axis[1],\n          back = axis[2],\n          forward = axis[3],\n          maxAbs = (autoScroll[\"scroll\".concat(wh)] || 0) - scrollable[\"client\".concat(wh)],\n          min = autoScrollOptions[\"min\".concat(xy)] || 0;\n      var max = isFinite(autoScrollOptions[\"max\".concat(xy)]) ? autoScrollOptions[\"max\".concat(xy)] : maxAbs;\n\n      if (min < max && min < maxAbs) {\n        if (max > maxAbs) {\n          max = maxAbs;\n        }\n\n        var lines = [],\n            elementSize = elementBBox[wh.toLowerCase()];\n\n        for (var i = autoScrollOptions.sensitivity.length - 1; i >= 0; i--) {\n          // near -> far\n          var sensitivity = autoScrollOptions.sensitivity[i],\n              speed = autoScrollOptions.speed[i]; // back\n\n          lines.push({\n            dir: -1,\n            speed: speed,\n            position: scrollableBBox[back] + sensitivity\n          }); // forward\n\n          lines.push({\n            dir: 1,\n            speed: speed,\n            position: scrollableBBox[forward] - sensitivity - elementSize\n          });\n        }\n\n        autoScroll[xy.toLowerCase()] = {\n          min: min,\n          max: max,\n          lines: lines\n        };\n      }\n    });\n  }\n\n  props.autoScroll = autoScroll.x || autoScroll.y ? autoScroll : null; // [/AUTO-SCROLL]\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction dragEnd(props) {\n  scrollFrame.stop(); // [AUTO-SCROLL/]\n\n  setDraggableCursor(props.options.handle, props.orgCursor);\n  body.style.cursor = cssOrgValueBodyCursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.orgZIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = cssOrgValueBodyUserSelect;\n  }\n\n  var classList = mClassList(props.element);\n\n  if (movingClass) {\n    classList.remove(movingClass);\n  }\n\n  if (draggingClass) {\n    classList.remove(draggingClass);\n  }\n\n  activeProps = null;\n  pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)\n\n  if (props.onDragEnd) {\n    props.onDragEnd({\n      left: props.elementBBox.left,\n      top: props.elementBBox.top\n    });\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {{clientX, clientY}} pointerXY - This might be MouseEvent, Touch of TouchEvent or Object.\n * @returns {boolean} `true` if it started.\n */\n\n\nfunction dragStart(props, pointerXY) {\n  if (props.disabled) {\n    return false;\n  }\n\n  if (props.onDragStart && props.onDragStart(pointerXY) === false) {\n    return false;\n  }\n\n  if (activeProps) {\n    dragEnd(activeProps);\n  } // activeItem is normally null by pointerEvent.end.\n\n\n  setDraggingCursor(props.options.handle);\n  body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n  window.getComputedStyle(props.options.handle, '').cursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.options.zIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = 'none';\n  }\n\n  if (draggingClass) {\n    mClassList(props.element).add(draggingClass);\n  }\n\n  activeProps = props;\n  hasMoved = false;\n  pointerOffset.left = props.elementBBox.left - (pointerXY.clientX + window.pageXOffset);\n  pointerOffset.top = props.elementBBox.top - (pointerXY.clientY + window.pageYOffset);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n  var needsInitBBox; // containment\n\n  if (newOptions.containment) {\n    var bBox;\n\n    if (isElement(newOptions.containment)) {\n      // Specific element\n      if (newOptions.containment !== options.containment) {\n        options.containment = newOptions.containment;\n        props.containmentIsBBox = false;\n        needsInitBBox = true;\n      }\n    } else if ((bBox = validPPBBox(copyTree(newOptions.containment))) && // bBox\n    hasChanged(bBox, options.containment)) {\n      options.containment = bBox;\n      props.containmentIsBBox = true;\n      needsInitBBox = true;\n    }\n  } // [SNAP]\n\n  /**\n   * @typedef {Object} SnapOptions\n   * @property {SnapTargetOptions[]} targets\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} SnapTargetOptions\n   * @property {(number|string)} [x] - pixels | '<n>%' | {start, end} | {step, start, end}\n   * @property {(number|string)} [y]\n   * @property {(Element|Object)} [boundingBox] - Object has properties that are string or number from PPBBox.\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} ParsedSnapTarget\n   * @property {PPValue} [x] - (input: pixels | '<n>%')\n   * @property {PPValue} [y]\n   * @property {PPValue} [xStart] - (input: {start, end} | {step, start, end})\n   * @property {PPValue} [xEnd]\n   * @property {PPValue} [xStep] - (input: {step, start, end})\n   * @property {PPValue} [yStart]\n   * @property {PPValue} [yEnd]\n   * @property {PPValue} [yStep]\n   * @property {Element} [element]\n   * @property {PPBBox} [ppBBox]\n   * @property {number} gravity\n   * @property {string[]} corners\n   * @property {string[]} sides\n   * @property {boolean} center\n   * @property {string[]} edges\n   * @property {string} base\n   */\n  // Normalize `gravity`, `corner`, `side`, `center`, `edge`, `base`\n\n\n  function commonSnapOptions(options, newOptions) {\n    function cleanString(inString) {\n      return typeof inString === 'string' ? inString.replace(/[, ]+/g, ' ').trim().toLowerCase() : null;\n    } // gravity\n\n\n    if (isFinite(newOptions.gravity) && newOptions.gravity > 0) {\n      options.gravity = newOptions.gravity;\n    } // corner\n\n\n    var corner = cleanString(newOptions.corner);\n\n    if (corner) {\n      if (corner !== 'all') {\n        var added = {},\n            corners = corner.split(/\\s/).reduce(function (corners, corner) {\n          corner = corner.trim().replace(/^(.).*?-(.).*$/, '$1$2');\n\n          if ((corner = corner === 'tl' || corner === 'lt' ? 'tl' : corner === 'tr' || corner === 'rt' ? 'tr' : corner === 'bl' || corner === 'lb' ? 'bl' : corner === 'br' || corner === 'rb' ? 'br' : null) && !added[corner]) {\n            corners.push(corner);\n            added[corner] = true;\n          }\n\n          return corners;\n        }, []),\n            cornersLen = corners.length;\n        corner = !cornersLen ? null : cornersLen === 4 ? 'all' : corners.join(' ');\n      }\n\n      if (corner) {\n        options.corner = corner;\n      }\n    } // side\n\n\n    var side = cleanString(newOptions.side);\n\n    if (side) {\n      if (side === 'start' || side === 'end' || side === 'both') {\n        options.side = side;\n      } else if (side === 'start end' || side === 'end start') {\n        options.side = 'both';\n      }\n    } // center\n\n\n    if (typeof newOptions.center === 'boolean') {\n      options.center = newOptions.center;\n    } // edge\n\n\n    var edge = cleanString(newOptions.edge);\n\n    if (edge) {\n      if (edge === 'inside' || edge === 'outside' || edge === 'both') {\n        options.edge = edge;\n      } else if (edge === 'inside outside' || edge === 'outside inside') {\n        options.edge = 'both';\n      }\n    } // base\n\n\n    var base = typeof newOptions.base === 'string' ? newOptions.base.trim().toLowerCase() : null;\n\n    if (base && (base === 'containment' || base === 'document')) {\n      options.base = base;\n    }\n\n    return options;\n  } // snap\n\n\n  if (newOptions.snap != null) {\n    var newSnapOptions = isObject(newOptions.snap) && newOptions.snap.targets != null ? newOptions.snap : {\n      targets: newOptions.snap\n    },\n        snapTargetsOptions = [],\n        snapOptions = commonSnapOptions({\n      targets: snapTargetsOptions\n    }, newSnapOptions); // Set default options into top level.\n\n    if (!snapOptions.gravity) {\n      snapOptions.gravity = SNAP_GRAVITY;\n    }\n\n    if (!snapOptions.corner) {\n      snapOptions.corner = SNAP_CORNER;\n    }\n\n    if (!snapOptions.side) {\n      snapOptions.side = SNAP_SIDE;\n    }\n\n    if (typeof snapOptions.center !== 'boolean') {\n      snapOptions.center = false;\n    }\n\n    if (!snapOptions.edge) {\n      snapOptions.edge = SNAP_EDGE;\n    }\n\n    if (!snapOptions.base) {\n      snapOptions.base = SNAP_BASE;\n    }\n\n    var parsedSnapTargets = (Array.isArray(newSnapOptions.targets) ? newSnapOptions.targets : [newSnapOptions.targets]).reduce(function (parsedSnapTargets, target) {\n      if (target == null) {\n        return parsedSnapTargets;\n      }\n\n      var isElementPre = isElement(target),\n          // Pre-check direct value\n      ppBBoxPre = validPPBBox(copyTree(target)),\n          // Pre-check direct value\n      newSnapTargetOptions = isElementPre || ppBBoxPre ? {\n        boundingBox: target\n      } : // Direct Element | PPBBox\n      isObject(target) && target.start == null && target.end == null && target.step == null ? target : // SnapTargetOptions\n      {\n        x: target,\n        y: target\n      },\n          // Others, it might be {step, start, end}\n      expandedParsedSnapTargets = [],\n          snapTargetOptions = {},\n          newOptionsBBox = newSnapTargetOptions.boundingBox;\n      var ppBBox;\n\n      if (isElementPre || isElement(newOptionsBBox)) {\n        // Element\n        expandedParsedSnapTargets.push({\n          element: newOptionsBBox\n        });\n        snapTargetOptions.boundingBox = newOptionsBBox;\n      } else if (ppBBox = ppBBoxPre || validPPBBox(copyTree(newOptionsBBox))) {\n        // Object -> PPBBox\n        expandedParsedSnapTargets.push({\n          ppBBox: ppBBox\n        });\n        snapTargetOptions.boundingBox = ppBBox2OptionObject(ppBBox);\n      } else {\n        var invalid; // `true` if valid PPValue was given but the contained value is invalid.\n\n        var parsedXY = ['x', 'y'].reduce(function (parsedXY, axis) {\n          var newOptionsXY = newSnapTargetOptions[axis];\n          var ppValue;\n\n          if (ppValue = validPPValue(newOptionsXY)) {\n            // pixels | '<n>%'\n            parsedXY[axis] = ppValue;\n            snapTargetOptions[axis] = ppValue2OptionValue(ppValue);\n          } else {\n            // {start, end} | {step, start, end}\n            var start, end, step;\n\n            if (isObject(newOptionsXY)) {\n              start = validPPValue(newOptionsXY.start);\n              end = validPPValue(newOptionsXY.end);\n              step = validPPValue(newOptionsXY.step);\n\n              if (start && end && start.isRatio === end.isRatio && start.value >= end.value) {\n                // start >= end\n                invalid = true;\n              }\n            }\n\n            start = parsedXY[\"\".concat(axis, \"Start\")] = start || {\n              value: 0,\n              isRatio: false\n            };\n            end = parsedXY[\"\".concat(axis, \"End\")] = end || {\n              value: 1,\n              isRatio: true\n            };\n            snapTargetOptions[axis] = {\n              start: ppValue2OptionValue(start),\n              end: ppValue2OptionValue(end)\n            };\n\n            if (step) {\n              if (step.isRatio ? step.value > 0 : step.value >= 2) {\n                // step > 0% || step >= 2px\n                parsedXY[\"\".concat(axis, \"Step\")] = step;\n                snapTargetOptions[axis].step = ppValue2OptionValue(step);\n              } else {\n                invalid = true;\n              }\n            }\n          }\n\n          return parsedXY;\n        }, {});\n\n        if (invalid) {\n          return parsedSnapTargets;\n        }\n\n        if (parsedXY.xStart && !parsedXY.xStep && parsedXY.yStart && !parsedXY.yStep) {\n          // Expand into 4 lines. This is not BBox, and `edge` is ignored.\n          expandedParsedSnapTargets.push({\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yStart\n          }, // Top\n          {\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yEnd\n          }, // Bottom\n          {\n            x: parsedXY.xStart,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          }, // Left\n          {\n            x: parsedXY.xEnd,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          } // Right\n          );\n        } else {\n          expandedParsedSnapTargets.push(parsedXY);\n        }\n      }\n\n      if (expandedParsedSnapTargets.length) {\n        snapTargetsOptions.push(commonSnapOptions(snapTargetOptions, newSnapTargetOptions)); // Copy common SnapOptions\n\n        var corner = snapTargetOptions.corner || snapOptions.corner,\n            side = snapTargetOptions.side || snapOptions.side,\n            edge = snapTargetOptions.edge || snapOptions.edge,\n            commonOptions = {\n          gravity: snapTargetOptions.gravity || snapOptions.gravity,\n          base: snapTargetOptions.base || snapOptions.base,\n          center: typeof snapTargetOptions.center === 'boolean' ? snapTargetOptions.center : snapOptions.center,\n          corners: corner === 'all' ? SNAP_ALL_CORNERS : corner.split(' '),\n          // Split\n          sides: side === 'both' ? SNAP_ALL_SIDES : [side],\n          // Split\n          edges: edge === 'both' ? SNAP_ALL_EDGES : [edge] // Split\n\n        };\n        expandedParsedSnapTargets.forEach(function (parsedSnapTarget) {\n          // Set common SnapOptions\n          ['gravity', 'corners', 'sides', 'center', 'edges', 'base'].forEach(function (option) {\n            parsedSnapTarget[option] = commonOptions[option];\n          });\n          parsedSnapTargets.push(parsedSnapTarget);\n        });\n      }\n\n      return parsedSnapTargets;\n    }, []);\n\n    if (parsedSnapTargets.length) {\n      options.snap = snapOptions; // Update always\n\n      if (hasChanged(parsedSnapTargets, props.parsedSnapTargets)) {\n        props.parsedSnapTargets = parsedSnapTargets;\n        needsInitBBox = true;\n      }\n    }\n  } else if (newOptions.hasOwnProperty('snap') && props.parsedSnapTargets) {\n    options.snap = props.parsedSnapTargets = props.snapTargets = void 0;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n  /**\n   * @typedef {Object} AutoScrollOptions\n   * @property {(Element|Window)} target\n   * @property {Array} speed\n   * @property {Array} sensitivity\n   * @property {number} [minX]\n   * @property {number} [maxX]\n   * @property {number} [minY]\n   * @property {number} [maxY]\n   */\n  // autoScroll\n\n\n  if (newOptions.autoScroll) {\n    var newAutoScrollOptions = isObject(newOptions.autoScroll) ? newOptions.autoScroll : {\n      target: newOptions.autoScroll === true ? window : newOptions.autoScroll\n    },\n        autoScrollOptions = {}; // target\n\n    autoScrollOptions.target = isElement(newAutoScrollOptions.target) ? newAutoScrollOptions.target : window; // speed\n\n    autoScrollOptions.speed = [];\n    (Array.isArray(newAutoScrollOptions.speed) ? newAutoScrollOptions.speed : [newAutoScrollOptions.speed]).every(function (speed, i) {\n      if (i <= 2 && isFinite(speed)) {\n        autoScrollOptions.speed[i] = speed;\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!autoScrollOptions.speed.length) {\n      autoScrollOptions.speed = AUTOSCROLL_SPEED;\n    } // sensitivity\n\n\n    var newSensitivity = Array.isArray(newAutoScrollOptions.sensitivity) ? newAutoScrollOptions.sensitivity : [newAutoScrollOptions.sensitivity];\n    autoScrollOptions.sensitivity = autoScrollOptions.speed.map(function (v, i) {\n      return isFinite(newSensitivity[i]) ? newSensitivity[i] : AUTOSCROLL_SENSITIVITY[i];\n    }); // min*, max*\n\n    ['X', 'Y'].forEach(function (option) {\n      var optionMin = \"min\".concat(option),\n          optionMax = \"max\".concat(option);\n\n      if (isFinite(newAutoScrollOptions[optionMin]) && newAutoScrollOptions[optionMin] >= 0) {\n        autoScrollOptions[optionMin] = newAutoScrollOptions[optionMin];\n      }\n\n      if (isFinite(newAutoScrollOptions[optionMax]) && newAutoScrollOptions[optionMax] >= 0 && (!autoScrollOptions[optionMin] || newAutoScrollOptions[optionMax] >= autoScrollOptions[optionMin])) {\n        autoScrollOptions[optionMax] = newAutoScrollOptions[optionMax];\n      }\n    });\n\n    if (hasChanged(autoScrollOptions, options.autoScroll)) {\n      options.autoScroll = autoScrollOptions;\n      needsInitBBox = true;\n    }\n  } else if (newOptions.hasOwnProperty('autoScroll')) {\n    if (options.autoScroll) {\n      needsInitBBox = true;\n    }\n\n    options.autoScroll = void 0;\n  } // [/AUTO-SCROLL]\n\n\n  if (needsInitBBox) {\n    initBBox(props);\n  } // handle\n\n\n  if (isElement(newOptions.handle) && newOptions.handle !== options.handle) {\n    if (options.handle) {\n      // Restore\n      options.handle.style.cursor = props.orgCursor;\n\n      if (cssPropUserSelect) {\n        options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n      }\n\n      pointerEvent.removeStartHandler(options.handle, props.pointerEventHandlerId);\n    }\n\n    var handle = options.handle = newOptions.handle;\n    props.orgCursor = handle.style.cursor;\n    setDraggableCursor(handle, props.orgCursor);\n\n    if (cssPropUserSelect) {\n      props.orgUserSelect = handle.style[cssPropUserSelect];\n      handle.style[cssPropUserSelect] = 'none';\n    }\n\n    pointerEvent.addStartHandler(handle, props.pointerEventHandlerId);\n  } // zIndex\n\n\n  if (isFinite(newOptions.zIndex) || newOptions.zIndex === false) {\n    options.zIndex = newOptions.zIndex;\n\n    if (props === activeProps) {\n      props.elementStyle.zIndex = options.zIndex === false ? props.orgZIndex : options.zIndex;\n    }\n  } // left/top\n\n\n  var position = {\n    left: props.elementBBox.left,\n    top: props.elementBBox.top\n  };\n  var needsMove;\n\n  if (isFinite(newOptions.left) && newOptions.left !== position.left) {\n    position.left = newOptions.left;\n    needsMove = true;\n  }\n\n  if (isFinite(newOptions.top) && newOptions.top !== position.top) {\n    position.top = newOptions.top;\n    needsMove = true;\n  }\n\n  if (needsMove) {\n    move(props, position);\n  } // Event listeners\n\n\n  ['onDrag', 'onMove', 'onDragStart', 'onMoveStart', 'onDragEnd'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n      props[option] = options[option].bind(props.ins);\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = props[option] = void 0;\n    }\n  });\n}\n\nvar PlainDraggable = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainDraggable` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainDraggable(element, options) {\n    _classCallCheck(this, PlainDraggable);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        zIndex: ZINDEX // Initial state.\n\n      },\n      disabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!isElement(element) || element === body) {\n      throw new Error('This element is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    var gpuTrigger = true; // [SVG]\n\n    var ownerSvg; // SVGElement which is not root view\n\n    if (element instanceof SVGElement && (ownerSvg = element.ownerSVGElement)) {\n      // It means `instanceof SVGLocatable` (many browsers don't have SVGLocatable)\n      if (!element.getBBox) {\n        throw new Error('This element is not accepted. (SVGLocatable)');\n      } // Trident and Edge bug, SVGSVGElement doesn't have SVGAnimatedTransformList?\n\n\n      if (!element.transform) {\n        throw new Error('This element is not accepted. (SVGAnimatedTransformList)');\n      } // Trident bug, returned value must be used (That is not given value).\n\n\n      props.svgTransform = element.transform.baseVal.appendItem(ownerSvg.createSVGTransform());\n      props.svgPoint = ownerSvg.createSVGPoint(); // Gecko bug, view.getScreenCTM returns CTM with root view.\n\n      var svgView = element.nearestViewportElement;\n      props.svgCtmElement = !IS_GECKO ? svgView : svgView.appendChild(document.createElementNS(ownerSvg.namespaceURI, 'rect'));\n      gpuTrigger = false;\n      props.initElm = initSvg;\n      props.moveElm = moveSvg;\n    } else {\n      // [/SVG]\n\n      /* eslint-disable indent */\n\n      /* [SVG/] */\n      var cssPropWillChange = CSSPrefix.getName('willChange');\n\n      if (cssPropWillChange) {\n        gpuTrigger = false;\n      }\n\n      if (!options.leftTop && cssPropTransform) {\n        // translate\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'transform';\n        }\n\n        props.initElm = initTranslate;\n        props.moveElm = moveTranslate;\n      } else {\n        // left and top\n        // [LEFTTOP]\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'left, top';\n        }\n\n        props.initElm = initLeftTop;\n        props.moveElm = moveLeftTop; // [/LEFTTOP]\n\n        /* [LEFTTOP/]\n        throw new Error('`transform` is not supported.');\n        [LEFTTOP/] */\n      }\n      /* eslint-enable indent */\n\n      /* [SVG/] */\n\n    } // [SVG/]\n\n\n    props.element = initAnim(element, gpuTrigger);\n    props.elementStyle = element.style;\n    props.orgZIndex = props.elementStyle.zIndex;\n\n    if (draggableClass) {\n      mClassList(element).add(draggableClass);\n    }\n\n    props.pointerEventHandlerId = pointerEvent.regStartHandler(function (pointerXY) {\n      return dragStart(props, pointerXY);\n    }); // Default options\n\n    if (!options.containment) {\n      var parent;\n      options.containment = (parent = element.parentNode) && isElement(parent) ? parent : body;\n    }\n\n    if (!options.handle) {\n      options.handle = element;\n    }\n\n    _setOptions(props, options);\n  }\n\n  _createClass(PlainDraggable, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      this.disabled = true; // To restore element and reset pointer\n\n      pointerEvent.unregStartHandler(pointerEvent.removeStartHandler(props.options.handle, props.pointerEventHandlerId));\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {PlainDraggable} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      initBBox(insProps[this._id]);\n      return this;\n    }\n  }, {\n    key: \"disabled\",\n    get: function get() {\n      return insProps[this._id].disabled;\n    },\n    set: function set(value) {\n      var props = insProps[this._id];\n\n      if ((value = !!value) !== props.disabled) {\n        props.disabled = value;\n\n        if (props.disabled) {\n          if (props === activeProps) {\n            dragEnd(props);\n          }\n\n          props.options.handle.style.cursor = props.orgCursor;\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).remove(draggableClass);\n          }\n        } else {\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = 'none';\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).add(draggableClass);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"rect\",\n    get: function get() {\n      return copyTree(insProps[this._id].elementBBox);\n    }\n  }, {\n    key: \"left\",\n    get: function get() {\n      return insProps[this._id].elementBBox.left;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        left: value\n      });\n    }\n  }, {\n    key: \"top\",\n    get: function get() {\n      return insProps[this._id].elementBBox.top;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        top: value\n      });\n    }\n  }, {\n    key: \"containment\",\n    get: function get() {\n      var props = insProps[this._id];\n      return props.containmentIsBBox ? ppBBox2OptionObject(props.options.containment) : props.options.containment;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        containment: value\n      });\n    } // [SNAP]\n\n  }, {\n    key: \"snap\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.snap);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        snap: value\n      });\n    } // [/SNAP]\n    // [AUTO-SCROLL]\n\n  }, {\n    key: \"autoScroll\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.autoScroll);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        autoScroll: value\n      });\n    } // [/AUTO-SCROLL]\n\n  }, {\n    key: \"handle\",\n    get: function get() {\n      return insProps[this._id].options.handle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        handle: value\n      });\n    }\n  }, {\n    key: \"zIndex\",\n    get: function get() {\n      return insProps[this._id].options.zIndex;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        zIndex: value\n      });\n    }\n  }, {\n    key: \"onDrag\",\n    get: function get() {\n      return insProps[this._id].options.onDrag;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDrag: value\n      });\n    }\n  }, {\n    key: \"onMove\",\n    get: function get() {\n      return insProps[this._id].options.onMove;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMove: value\n      });\n    }\n  }, {\n    key: \"onDragStart\",\n    get: function get() {\n      return insProps[this._id].options.onDragStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragStart: value\n      });\n    }\n  }, {\n    key: \"onMoveStart\",\n    get: function get() {\n      return insProps[this._id].options.onMoveStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMoveStart: value\n      });\n    }\n  }, {\n    key: \"onDragEnd\",\n    get: function get() {\n      return insProps[this._id].options.onDragEnd;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragEnd: value\n      });\n    }\n  }], [{\n    key: \"draggableCursor\",\n    get: function get() {\n      return cssWantedValueDraggableCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggableCursor !== value) {\n        cssWantedValueDraggableCursor = value;\n        cssValueDraggableCursor = null; // Reset\n\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (props.disabled || props === activeProps && cssValueDraggingCursor !== false) {\n            return;\n          }\n\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (props === activeProps) {\n            // Since cssValueDraggingCursor is `false`, copy cursor again.\n            body.style.cursor = cssOrgValueBodyCursor;\n            body.style.cursor = window.getComputedStyle(props.options.handle, '').cursor;\n          }\n        });\n      }\n    }\n  }, {\n    key: \"draggingCursor\",\n    get: function get() {\n      return cssWantedValueDraggingCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggingCursor !== value) {\n        cssWantedValueDraggingCursor = value;\n        cssValueDraggingCursor = null; // Reset\n\n        if (activeProps) {\n          setDraggingCursor(activeProps.options.handle);\n\n          if (cssValueDraggingCursor === false) {\n            setDraggableCursor(activeProps.options.handle, activeProps.orgCursor); // draggableCursor\n\n            body.style.cursor = cssOrgValueBodyCursor;\n          }\n\n          body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n          window.getComputedStyle(activeProps.options.handle, '').cursor;\n        }\n      }\n    }\n  }, {\n    key: \"draggableClass\",\n    get: function get() {\n      return draggableClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggableClass) {\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (!props.disabled) {\n            var classList = mClassList(props.element);\n\n            if (draggableClass) {\n              classList.remove(draggableClass);\n            }\n\n            if (value) {\n              classList.add(value);\n            }\n          }\n        });\n        draggableClass = value;\n      }\n    }\n  }, {\n    key: \"draggingClass\",\n    get: function get() {\n      return draggingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggingClass) {\n        if (activeProps) {\n          var classList = mClassList(activeProps.element);\n\n          if (draggingClass) {\n            classList.remove(draggingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        draggingClass = value;\n      }\n    }\n  }, {\n    key: \"movingClass\",\n    get: function get() {\n      return movingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== movingClass) {\n        if (activeProps && hasMoved) {\n          var classList = mClassList(activeProps.element);\n\n          if (movingClass) {\n            classList.remove(movingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        movingClass = value;\n      }\n    }\n  }]);\n\n  return PlainDraggable;\n}();\n\npointerEvent.addMoveHandler(document, function (pointerXY) {\n  if (!activeProps) {\n    return;\n  }\n\n  var position = {\n    left: pointerXY.clientX + window.pageXOffset + pointerOffset.left,\n    top: pointerXY.clientY + window.pageYOffset + pointerOffset.top\n  };\n\n  if (move(activeProps, position, // [SNAP]\n  activeProps.snapTargets ? function (position) {\n    // Snap\n    var iLen = activeProps.snapTargets.length;\n    var snappedX = false,\n        snappedY = false,\n        i;\n\n    for (i = 0; i < iLen && (!snappedX || !snappedY); i++) {\n      var snapTarget = activeProps.snapTargets[i];\n\n      if ((snapTarget.gravityXStart == null || position.left >= snapTarget.gravityXStart) && (snapTarget.gravityXEnd == null || position.left <= snapTarget.gravityXEnd) && (snapTarget.gravityYStart == null || position.top >= snapTarget.gravityYStart) && (snapTarget.gravityYEnd == null || position.top <= snapTarget.gravityYEnd)) {\n        if (!snappedX && snapTarget.x != null) {\n          position.left = snapTarget.x;\n          snappedX = true;\n          i = -1; // Restart loop\n        }\n\n        if (!snappedY && snapTarget.y != null) {\n          position.top = snapTarget.y;\n          snappedY = true;\n          i = -1; // Restart loop\n        }\n      }\n    }\n\n    position.snapped = snappedX || snappedY;\n    return activeProps.onDrag ? activeProps.onDrag(position) : true;\n  } : // [/SNAP]\n  activeProps.onDrag)) {\n    // [AUTO-SCROLL]\n    var xyMoveArgs = {},\n        autoScroll = activeProps.autoScroll;\n\n    if (autoScroll) {\n      var clientXY = {\n        x: activeProps.elementBBox.left - window.pageXOffset,\n        y: activeProps.elementBBox.top - window.pageYOffset\n      };\n      ['x', 'y'].forEach(function (axis) {\n        if (autoScroll[axis]) {\n          var min = autoScroll[axis].min,\n              max = autoScroll[axis].max;\n          autoScroll[axis].lines.some(function (line) {\n            if (line.dir === -1 ? clientXY[axis] <= line.position : clientXY[axis] >= line.position) {\n              xyMoveArgs[axis] = {\n                dir: line.dir,\n                speed: line.speed / 1000,\n                min: min,\n                max: max\n              };\n              return true;\n            }\n\n            return false;\n          });\n        }\n      });\n    }\n\n    if (xyMoveArgs.x || xyMoveArgs.y) {\n      scrollFrame.move(autoScroll.target, xyMoveArgs, autoScroll.isWindow ? scrollXYWindow : scrollXYElement);\n      position.autoScroll = true;\n    } else {\n      scrollFrame.stop();\n    } // [/AUTO-SCROLL]\n\n\n    if (!hasMoved) {\n      hasMoved = true;\n\n      if (movingClass) {\n        mClassList(activeProps.element).add(movingClass);\n      }\n\n      if (activeProps.onMoveStart) {\n        activeProps.onMoveStart(position);\n      }\n    }\n\n    if (activeProps.onMove) {\n      activeProps.onMove(position);\n    }\n  }\n});\n{\n  function endHandler() {\n    if (activeProps) {\n      dragEnd(activeProps);\n    }\n  }\n\n  pointerEvent.addEndHandler(document, endHandler);\n  pointerEvent.addCancelHandler(document, endHandler);\n}\n{\n  function initDoc() {\n    cssPropTransitionProperty = CSSPrefix.getName('transitionProperty');\n    cssPropTransform = CSSPrefix.getName('transform');\n    cssOrgValueBodyCursor = body.style.cursor;\n\n    if (cssPropUserSelect = CSSPrefix.getName('userSelect')) {\n      cssOrgValueBodyUserSelect = body.style[cssPropUserSelect];\n    } // Init active item when layout is changed, and init others later.\n\n\n    var LAZY_INIT_DELAY = 200;\n    var initDoneItems = {},\n        lazyInitTimer;\n\n    function checkInitBBox(props, eventType) {\n      if (props.initElm) {\n        // Easy checking for instance without errors.\n        initBBox(props, eventType);\n      } // eslint-disable-line brace-style\n\n    }\n\n    function initAll(eventType) {\n      clearTimeout(lazyInitTimer);\n      Object.keys(insProps).forEach(function (id) {\n        if (!initDoneItems[id]) {\n          checkInitBBox(insProps[id], eventType);\n        }\n      });\n      initDoneItems = {};\n    }\n\n    var layoutChanging = false; // Gecko bug, multiple calling by `resize`.\n\n    var layoutChange = AnimEvent.add(function (event) {\n      if (layoutChanging) {\n        return;\n      }\n\n      layoutChanging = true;\n\n      if (activeProps) {\n        checkInitBBox(activeProps, event.type);\n        pointerEvent.move();\n        initDoneItems[activeProps._id] = true;\n      }\n\n      clearTimeout(lazyInitTimer);\n      lazyInitTimer = setTimeout(function () {\n        initAll(event.type);\n      }, LAZY_INIT_DELAY);\n      layoutChanging = false;\n    });\n    window.addEventListener('resize', layoutChange, true);\n    window.addEventListener('scroll', layoutChange, true);\n  }\n\n  if (body = document.body) {\n    initDoc();\n  } else {\n    document.addEventListener('DOMContentLoaded', function () {\n      body = document.body;\n      initDoc();\n    }, true);\n  }\n}\n/* [SNAP/]\nPlainDraggable.limit = true;\n[SNAP/] */\n\nexport default PlainDraggable;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PlainModal\n * https://anseki.github.io/plain-modal/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\nimport mClassList from 'm-class-list';\nimport PlainOverlay from 'plain-overlay';\n/* Static ESM */ /* import CSS_TEXT from './default.scss' */ var CSS_TEXT = \".plainmodal .plainmodal-overlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainmodal.plainoverlay{background-color:transparent;cursor:auto}.plainmodal .plainmodal-content{z-index:9000}.plainmodal .plainmodal-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(136,136,136,.6);transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:1}.plainmodal .plainmodal-overlay.plainmodal-overlay-hide{opacity:0}.plainmodal .plainmodal-overlay.plainmodal-overlay-force{transition-property:none}\"; // [DRAG]\n\nimport PlainDraggable from 'plain-draggable'; // [/DRAG]\n\nmClassList.ignoreNative = true;\n\nvar APP_ID = 'plainmodal',\n    STYLE_ELEMENT_ID = \"\".concat(APP_ID, \"-style\"),\n    STYLE_CLASS = APP_ID,\n    STYLE_CLASS_CONTENT = \"\".concat(APP_ID, \"-content\"),\n    STYLE_CLASS_OVERLAY = \"\".concat(APP_ID, \"-overlay\"),\n    STYLE_CLASS_OVERLAY_HIDE = \"\".concat(STYLE_CLASS_OVERLAY, \"-hide\"),\n    STYLE_CLASS_OVERLAY_FORCE = \"\".concat(STYLE_CLASS_OVERLAY, \"-force\"),\n    STATE_CLOSED = 0,\n    STATE_OPENING = 1,\n    STATE_OPENED = 2,\n    STATE_CLOSING = 3,\n    STATE_INACTIVATING = 4,\n    STATE_INACTIVATED = 5,\n    STATE_ACTIVATING = 6,\n    DURATION = 200,\n    // COPY from PlainOverlay\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nisObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Element} elmContent - Content element.\n * @property {Element} elmOverlay - Overlay element. (Not PlainOverlay)\n * @property {PlainOverlay} plainOverlay - PlainOverlay instance.\n * @property {PlainDraggable} plainDraggable - PlainDraggable instance.\n * @property {number} state - Current state.\n * @property {Object} options - Options.\n * @property {props} parentProps - props that is effected with current props.\n * @property {{plainOverlay: boolean, option: boolean}} effectFinished - The effect finished.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n\n/**\n * A `props` list, it have a `state` other than `STATE_CLOSED`.\n * A `props` is pushed to the end of this array, `shownProps[shownProps.length - 1]` can be active.\n * @type {Array.<props>}\n */\nshownProps = [];\n\nvar closeByEscKey = true,\n    closeByOverlay = true,\n    insId = 0,\n    openCloseEffectProps; // A `props` that is running the \"open/close\" effect now.\n\nfunction forceReflow(target) {\n  // Trident and Blink bug (reflow like `offsetWidth` can't update)\n  setTimeout(function () {\n    var parent = target.parentNode,\n        next = target.nextSibling; // It has to be removed first for Blink.\n\n    parent.insertBefore(parent.removeChild(target), next);\n  }, 0);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n} // [DRAG]\n\n\nfunction switchDraggable(props) {\n  if (props.plainDraggable) {\n    var disabled = !(props.options.dragHandle && props.state === STATE_OPENED);\n    props.plainDraggable.disabled = disabled;\n\n    if (!disabled) {\n      props.plainDraggable.position();\n    }\n  }\n} // [/DRAG]\n\n\nfunction finishOpening(props) {\n  openCloseEffectProps = null;\n  props.state = STATE_OPENED;\n  switchDraggable(props); // [DRAG/]\n\n  if (props.parentProps) {\n    props.parentProps.state = STATE_INACTIVATED;\n  }\n\n  if (props.options.onOpen) {\n    props.options.onOpen.call(props.ins);\n  }\n}\n\nfunction finishClosing(props) {\n  shownProps.pop();\n  openCloseEffectProps = null;\n  props.state = STATE_CLOSED;\n\n  if (props.parentProps) {\n    props.parentProps.state = STATE_OPENED;\n    switchDraggable(props.parentProps); // [DRAG/]\n\n    props.parentProps = null;\n  }\n\n  if (props.options.onClose) {\n    props.options.onClose.call(props.ins);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {string} effectKey - `plainOverlay' or 'option`\n * @returns {void}\n */\n\n\nfunction finishOpenEffect(props, effectKey) {\n  if (props.state !== STATE_OPENING) {\n    return;\n  }\n\n  props.effectFinished[effectKey] = true;\n\n  if (props.effectFinished.plainOverlay && (!props.options.openEffect || props.effectFinished.option)) {\n    finishOpening(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {string} effectKey - `plainOverlay' or 'option`\n * @returns {void}\n */\n\n\nfunction finishCloseEffect(props, effectKey) {\n  if (props.state !== STATE_CLOSING) {\n    return;\n  }\n\n  props.effectFinished[effectKey] = true;\n\n  if (props.effectFinished.plainOverlay && (!props.options.closeEffect || props.effectFinished.option)) {\n    finishClosing(props);\n  }\n}\n/**\n * Process after preparing data and adjusting style.\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction execOpening(props, force) {\n  if (props.parentProps) {\n    // inactivate parentProps\n\n    /*\n      Cases:\n        - STATE_OPENED or STATE_ACTIVATING, regardless of force\n        - STATE_INACTIVATING and force\n    */\n    var parentProps = props.parentProps,\n        elmOverlay = parentProps.elmOverlay;\n\n    if (parentProps.state === STATE_OPENED) {\n      elmOverlay.style[CSSPrefix.getName('transitionDuration')] = props.options.duration === DURATION ? '' : \"\".concat(props.options.duration, \"ms\");\n    }\n\n    var elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.toggle(STYLE_CLASS_OVERLAY_FORCE, !!force);\n    elmOverlayClassList.add(STYLE_CLASS_OVERLAY_HIDE); // Update `state` regardless of force, for switchDraggable.\n\n    parentProps.state = STATE_INACTIVATING;\n    parentProps.plainOverlay.blockingDisabled = true;\n    switchDraggable(parentProps); // [DRAG/]\n  }\n\n  props.state = STATE_OPENING;\n  props.plainOverlay.blockingDisabled = false;\n  props.effectFinished.plainOverlay = props.effectFinished.option = false;\n  props.plainOverlay.show(force);\n\n  if (props.options.openEffect) {\n    if (force) {\n      props.options.openEffect.call(props.ins);\n      finishOpenEffect(props, 'option');\n    } else {\n      props.options.openEffect.call(props.ins, props.openEffectDone);\n    }\n  }\n}\n/**\n * Process after preparing data and adjusting style.\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @param {boolean} [sync] - `force` with sync-mode. (Skip restoring active element)\n * @returns {void}\n */\n\n\nfunction execClosing(props, force, sync) {\n  if (props.parentProps) {\n    // activate parentProps\n\n    /*\n      Cases:\n        - STATE_INACTIVATED or STATE_INACTIVATING, regardless of `force`\n        - STATE_ACTIVATING and `force`\n    */\n    var parentProps = props.parentProps,\n        elmOverlay = parentProps.elmOverlay;\n\n    if (parentProps.state === STATE_INACTIVATED) {\n      elmOverlay.style[CSSPrefix.getName('transitionDuration')] = props.options.duration === DURATION ? '' : \"\".concat(props.options.duration, \"ms\");\n    }\n\n    var elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.toggle(STYLE_CLASS_OVERLAY_FORCE, !!force);\n    elmOverlayClassList.remove(STYLE_CLASS_OVERLAY_HIDE); // same condition as props\n\n    parentProps.state = STATE_ACTIVATING;\n    parentProps.plainOverlay.blockingDisabled = false;\n  }\n\n  props.state = STATE_CLOSING;\n  switchDraggable(props); // [DRAG/]\n\n  props.effectFinished.plainOverlay = props.effectFinished.option = false;\n  props.plainOverlay.hide(force, sync);\n\n  if (props.options.closeEffect) {\n    if (force) {\n      props.options.closeEffect.call(props.ins);\n      finishCloseEffect(props, 'option');\n    } else {\n      props.options.closeEffect.call(props.ins, props.closeEffectDone);\n    }\n  }\n}\n/**\n * Finish the \"open/close\" effect immediately with sync-mode.\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction fixOpenClose(props) {\n  if (props.state === STATE_OPENING) {\n    execOpening(props, true);\n  } else if (props.state === STATE_CLOSING) {\n    execClosing(props, true, true);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _open(props, force) {\n  if (props.state !== STATE_CLOSED && props.state !== STATE_CLOSING && props.state !== STATE_OPENING || props.state === STATE_OPENING && !force || props.state !== STATE_OPENING && props.options.onBeforeOpen && props.options.onBeforeOpen.call(props.ins) === false) {\n    return false;\n  }\n  /*\n    Cases:\n      - STATE_CLOSED or STATE_CLOSING, regardless of `force`\n      - STATE_OPENING and `force`\n  */\n\n\n  if (props.state === STATE_CLOSED) {\n    if (openCloseEffectProps) {\n      fixOpenClose(openCloseEffectProps);\n    }\n\n    openCloseEffectProps = props;\n\n    if (shownProps.length) {\n      props.parentProps = shownProps[shownProps.length - 1];\n    }\n\n    shownProps.push(props);\n    mClassList(props.elmOverlay).add(STYLE_CLASS_OVERLAY_FORCE).remove(STYLE_CLASS_OVERLAY_HIDE);\n  }\n\n  execOpening(props, force);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _close(props, force) {\n  if (props.state === STATE_CLOSED || props.state === STATE_CLOSING && !force || props.state !== STATE_CLOSING && props.options.onBeforeClose && props.options.onBeforeClose.call(props.ins) === false) {\n    return false;\n  }\n  /*\n    Cases:\n      - Other than STATE_CLOSED and STATE_CLOSING, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (openCloseEffectProps && openCloseEffectProps !== props) {\n    fixOpenClose(openCloseEffectProps);\n    openCloseEffectProps = null;\n  }\n  /*\n    Cases:\n      - STATE_OPENED, STATE_OPENING or STATE_INACTIVATED, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (props.state === STATE_INACTIVATED) {\n    // -> STATE_OPENED\n    var topProps;\n\n    while ((topProps = shownProps[shownProps.length - 1]) !== props) {\n      execClosing(topProps, true, true);\n    }\n  }\n  /*\n    Cases:\n      - STATE_OPENED or STATE_OPENING, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (props.state === STATE_OPENED) {\n    openCloseEffectProps = props;\n  }\n\n  execClosing(props, force);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options,\n      plainOverlay = props.plainOverlay; // closeButton\n\n  if (newOptions.hasOwnProperty('closeButton') && (newOptions.closeButton = isElement(newOptions.closeButton) ? newOptions.closeButton : newOptions.closeButton == null ? void 0 : false) !== false && newOptions.closeButton !== options.closeButton) {\n    if (options.closeButton) {\n      // Remove\n      options.closeButton.removeEventListener('click', props.handleClose, false);\n    }\n\n    options.closeButton = newOptions.closeButton;\n\n    if (options.closeButton) {\n      // Add\n      options.closeButton.addEventListener('click', props.handleClose, false);\n    }\n  } // duration\n  // Check by PlainOverlay\n\n\n  plainOverlay.duration = newOptions.duration;\n  options.duration = plainOverlay.duration; // overlayBlur\n  // Check by PlainOverlay\n\n  plainOverlay.blur = newOptions.overlayBlur;\n  options.overlayBlur = plainOverlay.blur; // [DRAG]\n  // dragHandle\n\n  if (newOptions.hasOwnProperty('dragHandle') && (newOptions.dragHandle = isElement(newOptions.dragHandle) ? newOptions.dragHandle : newOptions.dragHandle == null ? void 0 : false) !== false && newOptions.dragHandle !== options.dragHandle) {\n    options.dragHandle = newOptions.dragHandle;\n\n    if (options.dragHandle) {\n      if (!props.plainDraggable) {\n        props.plainDraggable = new PlainDraggable(props.elmContent);\n      }\n\n      props.plainDraggable.handle = options.dragHandle;\n    }\n\n    switchDraggable(props);\n  } // [/DRAG]\n  // effect functions and event listeners\n\n\n  ['openEffect', 'closeEffect', 'onOpen', 'onClose', 'onBeforeOpen', 'onBeforeClose'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nvar PlainModal = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainModal` instance.\n   * @param {Element} content - An element that is shown as the content of the modal window.\n   * @param {Object} [options] - Options.\n   */\n  function PlainModal(content, options) {\n    _classCallCheck(this, PlainModal);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        closeButton: void 0,\n        duration: DURATION,\n        dragHandle: void 0,\n        // [DRAG/]\n        overlayBlur: false\n      },\n      state: STATE_CLOSED,\n      effectFinished: {\n        plainOverlay: false,\n        option: false\n      }\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!content.nodeType || content.nodeType !== Node.ELEMENT_NODE || content.ownerDocument.defaultView !== window) {\n      throw new Error('This `content` is not accepted.');\n    }\n\n    props.elmContent = content;\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    } // Setup window\n\n\n    if (!document.getElementById(STYLE_ELEMENT_ID)) {\n      var head = document.getElementsByTagName('head')[0] || document.documentElement,\n          sheet = head.insertBefore(document.createElement('style'), head.firstChild);\n      sheet.type = 'text/css';\n      sheet.id = STYLE_ELEMENT_ID;\n      sheet.textContent = CSS_TEXT;\n\n      if (IS_TRIDENT || IS_EDGE) {\n        forceReflow(sheet);\n      } // Trident bug\n      // for closeByEscKey\n\n\n      window.addEventListener('keydown', function (event) {\n        var key, topProps;\n\n        if (closeByEscKey && ((key = event.key.toLowerCase()) === 'escape' || key === 'esc') && (topProps = shownProps.length && shownProps[shownProps.length - 1]) && _close(topProps)) {\n          event.preventDefault();\n          event.stopImmediatePropagation(); // preventDefault stops other listeners, maybe.\n\n          event.stopPropagation();\n        }\n      }, true);\n    }\n\n    mClassList(content).add(STYLE_CLASS_CONTENT); // Overlay\n\n    props.plainOverlay = new PlainOverlay({\n      face: content,\n      onShow: function onShow() {\n        finishOpenEffect(props, 'plainOverlay');\n      },\n      onHide: function onHide() {\n        finishCloseEffect(props, 'plainOverlay');\n      }\n    }); // The `content` is now contained into PlainOverlay, and update `display`.\n\n    if (window.getComputedStyle(content, '').display === 'none') {\n      content.style.display = 'block';\n    } // Trident can not get parent of SVG by parentElement.\n\n\n    var elmPlainOverlayBody = content.parentNode; // elmOverlayBody of PlainOverlay\n\n    mClassList(elmPlainOverlayBody.parentNode).add(STYLE_CLASS); // elmOverlay of PlainOverlay\n    // elmOverlay (own overlay)\n\n    var elmOverlay = props.elmOverlay = elmPlainOverlayBody.appendChild(document.createElement('div'));\n    elmOverlay.className = STYLE_CLASS_OVERLAY; // for closeByOverlay\n\n    elmOverlay.addEventListener('click', function (event) {\n      if (event.target === elmOverlay && closeByOverlay) {\n        _close(props);\n      }\n    }, true); // Prepare removable event listeners for each instance.\n\n    props.handleClose = function () {\n      _close(props);\n    }; // Callback functions for additional effects, prepare these to allow to be used as listener.\n\n\n    props.openEffectDone = function () {\n      finishOpenEffect(props, 'option');\n    };\n\n    props.closeEffectDone = function () {\n      finishCloseEffect(props, 'option');\n    };\n\n    props.effectDone = function () {\n      if (props.state === STATE_OPENING) {\n        finishOpenEffect(props, 'option');\n      } else if (props.state === STATE_CLOSING) {\n        finishCloseEffect(props, 'option');\n      }\n    };\n\n    _setOptions(props, options);\n  }\n  /**\n   * @param {Object} options - New options.\n   * @returns {PlainModal} Current instance itself.\n   */\n\n\n  _createClass(PlainModal, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Open the modal window.\n     * @param {boolean} [force] - Show it immediately without effect.\n     * @param {Object} [options] - New options.\n     * @returns {PlainModal} Current instance itself.\n     */\n\n  }, {\n    key: \"open\",\n    value: function open(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _open(insProps[this._id], force);\n\n      return this;\n    }\n    /**\n     * Close the modal window.\n     * @param {boolean} [force] - Close it immediately without effect.\n     * @returns {PlainModal} Current instance itself.\n     */\n\n  }, {\n    key: \"close\",\n    value: function close(force) {\n      _close(insProps[this._id], force);\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"closeButton\",\n    get: function get() {\n      return insProps[this._id].options.closeButton;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        closeButton: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"overlayBlur\",\n    get: function get() {\n      return insProps[this._id].options.overlayBlur;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        overlayBlur: value\n      });\n    } // [DRAG]\n\n  }, {\n    key: \"dragHandle\",\n    get: function get() {\n      return insProps[this._id].options.dragHandle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        dragHandle: value\n      });\n    } // [/DRAG]\n\n  }, {\n    key: \"openEffect\",\n    get: function get() {\n      return insProps[this._id].options.openEffect;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        openEffect: value\n      });\n    }\n  }, {\n    key: \"closeEffect\",\n    get: function get() {\n      return insProps[this._id].options.closeEffect;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        closeEffect: value\n      });\n    }\n  }, {\n    key: \"effectDone\",\n    get: function get() {\n      return insProps[this._id].effectDone;\n    }\n  }, {\n    key: \"onOpen\",\n    get: function get() {\n      return insProps[this._id].options.onOpen;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onOpen: value\n      });\n    }\n  }, {\n    key: \"onClose\",\n    get: function get() {\n      return insProps[this._id].options.onClose;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onClose: value\n      });\n    }\n  }, {\n    key: \"onBeforeOpen\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeOpen;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeOpen: value\n      });\n    }\n  }, {\n    key: \"onBeforeClose\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeClose;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeClose: value\n      });\n    }\n  }], [{\n    key: \"closeByEscKey\",\n    get: function get() {\n      return closeByEscKey;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        closeByEscKey = value;\n      }\n    }\n  }, {\n    key: \"closeByOverlay\",\n    get: function get() {\n      return closeByOverlay;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        closeByOverlay = value;\n      }\n    }\n  }, {\n    key: \"STATE_CLOSED\",\n    get: function get() {\n      return STATE_CLOSED;\n    }\n  }, {\n    key: \"STATE_OPENING\",\n    get: function get() {\n      return STATE_OPENING;\n    }\n  }, {\n    key: \"STATE_OPENED\",\n    get: function get() {\n      return STATE_OPENED;\n    }\n  }, {\n    key: \"STATE_CLOSING\",\n    get: function get() {\n      return STATE_CLOSING;\n    }\n  }, {\n    key: \"STATE_INACTIVATING\",\n    get: function get() {\n      return STATE_INACTIVATING;\n    }\n  }, {\n    key: \"STATE_INACTIVATED\",\n    get: function get() {\n      return STATE_INACTIVATED;\n    }\n  }, {\n    key: \"STATE_ACTIVATING\",\n    get: function get() {\n      return STATE_ACTIVATING;\n    }\n  }]);\n\n  return PlainModal;\n}();\n/* [DRAG/]\nPlainModal.limit = true;\n[DRAG/] */\n\n\nexport default PlainModal;","import MarkdownIt from 'markdown-it'\nimport MarkdownItAnchor from 'markdown-it-anchor'\nimport MarkdownItFootnote from 'markdown-it-footnote'\nimport MarkdownItFrontMatter from 'markdown-it-front-matter'\nimport MarkdownItInjectLinenumbers from 'markdown-it-inject-linenumbers'\nimport { renderWith, defaultAliases, parseConfigsFromYaml } from 'mapclay'\nimport { onRemove, animateRectTransition, throttle, shiftByWindow } from './utils'\nimport { Layout, SideBySide, Overlay } from './Layout'\nimport * as utils from './dumbyUtils'\nimport * as menuItem from './MenuItem'\nimport PlainModal from 'plain-modal'\n\n/** Selector of special HTML Elements */\nconst mapBlockSelector = 'pre:has(.language-map)'\nconst docLinkSelector = 'a[href^=\"#\"][title^=\"=>\"]'\nconst geoLinkSelector = 'a[href^=\"geo:\"]'\n\n/** Default Layouts */\nconst defaultLayouts = [\n  new Layout({ name: 'normal' }),\n  new SideBySide({ name: 'side-by-side' }),\n  new Overlay({ name: 'overlay' }),\n]\n\n/** Cache across every dumbymap generation */\nconst mapCache = {}\n\n/**\n * Converts Markdown content to HTML and prepares it for DumbyMap rendering\n *\n * @param {HTMLElement} container - Target Element to include generated HTML contents\n * @param {string} mdContent - Texts in Markdown format\n * @returns {Object} An object representing the DumbyMap instance\n */\nexport const markdown2HTML = (container, mdContent) => {\n  /** Prepare Elements for Container */\n  container.replaceChildren()\n  container.innerHTML = '<div class=\"SemanticHtml\"></div>'\n  const htmlHolder = container.querySelector('.SemanticHtml')\n\n  /** Prepare MarkdownIt Instance */\n  const md = MarkdownIt({\n    html: true,\n    breaks: true,\n    linkify: true,\n  })\n    .use(MarkdownItAnchor, {\n      permalink: MarkdownItAnchor.permalink.linkInsideHeader({\n        placement: 'before',\n      }),\n    })\n    .use(MarkdownItFootnote)\n    .use(MarkdownItFrontMatter)\n    .use(MarkdownItInjectLinenumbers)\n\n  /** Set up linkify for GeoLinks */\n  const coordinateRegex = /^(\\D*)(-?\\d+\\.?\\d*)\\s*([,\\x2F\\uFF0C])\\s*(-?\\d+\\.?\\d*)/\n  const coordinateValue = {\n    validate: coordinateRegex,\n    normalize: function (match) {\n      const [, , x, sep, y] = match.text.match(coordinateRegex)\n      match.url = `geo:${y},${x}?xy=${x},${y}`\n      match.text = `${x}${sep} ${y}`\n      match.index += match.text.indexOf(x) + 1\n      return match\n    },\n  }\n  const patterns = ['[', '(', '📍', '\\uFF08', '@', 'geo:', 'twd']\n  patterns.forEach(prefix =>\n    md.linkify.add(prefix, coordinateValue),\n  )\n\n  /** Custom rule for Blocks in DumbyMap */\n  // FIXME A better way to generate blocks\n  md.renderer.rules.dumby_block_open = () => '<div>'\n  md.renderer.rules.dumby_block_close = () => '</div>'\n  md.core.ruler.before('block', 'dumby_block', state => {\n    state.tokens.push(new state.Token('dumby_block_open', '', 1))\n  })\n  // Add close tag for block with more than 2 empty lines\n  md.block.ruler.before('table', 'dumby_block', (state, startLine) => {\n    if (\n      state.src[state.bMarks[startLine - 1]] === '\\n' &&\n      state.src[state.bMarks[startLine - 2]] === '\\n' &&\n      state.tokens.at(-1).type !== 'list_item_open' // Quick hack for not adding tag after \"::marker\" for <li>\n    ) {\n      state.push('dumby_block_close', '', -1)\n      state.push('dumby_block_open', '', 1)\n    }\n  })\n\n  md.core.ruler.after('block', 'dumby_block', state => {\n    state.tokens.push(new state.Token('dumby_block_close', '', -1))\n  })\n\n  /** Render HTML */\n  htmlHolder.innerHTML = md.render(mdContent)\n  /** Post HTML rendered */\n  // TODO Do this in markdown-it\n  const blocks = htmlHolder.querySelectorAll(':scope > div:not(:has(nav))')\n  blocks.forEach(b => {\n    b.classList.add('dumby-block')\n    b.dataset.total = blocks.length\n  })\n\n  return container\n}\n\n/**\n * Generates maps based on the provided configuration\n *\n * @param {HTMLElement} container - The container element for the maps\n * @param {Object} options - Configuration options\n * @param {number} [options.delay=1000] - Delay before rendering maps (in milliseconds)\n * @param {Function} options.mapCallback - Callback function to be called after map rendering\n */\nexport const generateMaps = (container, { layouts = [], delay, renderCallback } = {}) => {\n  /** Prepare Contaner/HTML Holder/Showcase */\n  container.classList.add('Dumby')\n  delete container.dataset.layout\n  container.dataset.layout = defaultLayouts[0].name\n  const htmlHolder = container.querySelector('.SemanticHtml') ?? container\n  const blocks = Array.from(htmlHolder.querySelectorAll('.dumby-block'))\n  const showcase = document.createElement('div')\n  container.appendChild(showcase)\n  showcase.classList.add('Showcase')\n  const renderPromises = []\n\n  /** Prepare Modal */\n  const modalContent = document.createElement('div')\n  container.appendChild(modalContent)\n  const modal = new PlainModal(modalContent)\n\n  /** Define dumbymap Object */\n  const dumbymap = {\n    layouts: [...defaultLayouts, ...layouts.map(l => typeof l === 'object' ? l : { name: l })],\n    container,\n    htmlHolder,\n    showcase,\n    blocks,\n    modal,\n    modalContent,\n    utils: {\n      ...utils,\n      renderedMaps: () =>\n        Array.from(\n          container.querySelectorAll('.mapclay[data-render=fulfilled]'),\n        ).sort((a, b) => a.style.order > b.style.order),\n      setContextMenu: (menuCallback) => {\n        const originalCallback = container.oncontextmenu\n        container.oncontextmenu = (e) => {\n          const menu = originalCallback(e)\n          menuCallback(e, menu)\n          menu.style.transform = ''\n          shiftByWindow(menu)\n        }\n      },\n      focusNextMap: throttle(utils.focusNextMap, utils.focusDelay),\n      switchToNextLayout: throttle(utils.switchToNextLayout, 300),\n    },\n  }\n  Object.entries(dumbymap.utils).forEach(([util, func]) => {\n    dumbymap.utils[util] = func.bind(dumbymap)\n  })\n\n  /** Create GeoLinks and DocLinks */\n  container.querySelectorAll(docLinkSelector)\n    .forEach(utils.createDocLink)\n  container.querySelectorAll(geoLinkSelector)\n    .forEach(utils.createGeoLink)\n\n  /**\n   * mapFocusObserver. observe for map focus\n   * @return {MutationObserver} observer\n   */\n  const mapFocusObserver = () =>\n    new window.MutationObserver(mutations => {\n      const mutation = mutations.at(-1)\n      const target = mutation.target\n      const focus = target.classList.contains('focus')\n      const shouldBeInShowcase =\n        focus &&\n        showcase.checkVisibility({\n          contentVisibilityAuto: true,\n          opacityProperty: true,\n          visibilityProperty: true,\n        })\n\n      if (focus) {\n        dumbymap.utils\n          .renderedMaps()\n          .filter(map => map.id !== target.id)\n          .forEach(map => map.classList.remove('focus'))\n      }\n\n      if (shouldBeInShowcase) {\n        if (showcase.contains(target)) return\n\n        // Placeholder for map in Showcase, it should has the same DOMRect\n        const placeholder = target.cloneNode(true)\n        delete placeholder.id\n        placeholder.className = ''\n\n        const parent = target.parentElement\n        parent.replaceChild(placeholder, target)\n        onRemove(placeholder, () => {\n          parent.appendChild(target)\n        })\n\n        // FIXME Maybe use @start-style for CSS\n        // Trigger CSS transition, if placeholde is the olny child element in block,\n        // reduce its height to zero.\n        // To make sure the original height of placeholder is applied, DOM changes seems needed\n        // then set data-attribute for CSS selector to change height to 0\n        placeholder.getBoundingClientRect()\n        placeholder.dataset.placeholder = target.id\n\n        // To fit showcase, remove all inline style\n        target.style.cssText = ''\n        target.style.order = placeholder.style.order\n        showcase.appendChild(target)\n\n        // Resume rect from Semantic HTML to Showcase, with animation\n        animateRectTransition(target, placeholder.getBoundingClientRect(), {\n          duration: 300,\n          resume: true,\n        })\n      } else if (showcase.contains(target)) {\n        // Check placeholder is inside Semantic HTML\n        const placeholder = htmlHolder.querySelector(\n          `[data-placeholder=\"${target.id}\"]`,\n        )\n        if (!placeholder) { throw Error(`Cannot find placeholder for map \"${target.id}\"`) }\n\n        // Consider animation may fail, write callback\n        const afterAnimation = () => {\n          target.style = placeholder.style.cssText\n          placeholder.remove()\n        }\n\n        // animation from Showcase to placeholder\n        animateRectTransition(target, placeholder.getBoundingClientRect(), {\n          duration: 300,\n        }).finished.finally(afterAnimation)\n      }\n    })\n\n  /** Observer for layout changes */\n  const layoutObserver = new window.MutationObserver(mutations => {\n    const mutation = mutations.at(-1)\n    const oldLayout = mutation.oldValue\n    const newLayout = container.dataset.layout\n\n    // Apply handler for leaving/entering layouts\n    if (oldLayout) {\n      dumbymap.layouts\n        .find(l => l.name === oldLayout)\n        ?.leaveHandler?.call(this, dumbymap)\n    }\n\n    Object.values(dumbymap)\n      .flat()\n      .filter(ele => ele instanceof window.HTMLElement)\n      .forEach(ele => { ele.style.cssText = '' })\n\n    if (newLayout) {\n      dumbymap.layouts\n        .find(l => l.name === newLayout)\n        ?.enterHandler?.call(this, dumbymap)\n    }\n\n    // Since layout change may show/hide showcase, the current focused map may need to go into/outside showcase\n    // Reset attribute triggers MutationObserver which is observing it\n    const focusMap =\n      container.querySelector('.mapclay.focus') ??\n      container.querySelector('.mapclay')\n    focusMap?.classList?.add('focus')\n  })\n  layoutObserver.observe(container, {\n    attributes: true,\n    attributeFilter: ['data-layout'],\n    attributeOldValue: true,\n    characterDataOldValue: true,\n  })\n\n  onRemove(htmlHolder, () => layoutObserver.disconnect())\n\n  /**\n   * afterMapRendered. callback of each map rendered\n   *\n   * @param {Object} renderer\n   */\n  const afterMapRendered = renderer => {\n    const mapElement = renderer.target\n    // FIXME\n    mapElement.renderer = renderer\n    mapElement.tabindex = -1\n    if (mapElement.dataset.render === 'fulfilled') {\n      mapCache[mapElement.id] ??= renderer\n    } else {\n      return\n    }\n\n    renderCallback?.(renderer)\n\n    // Work with Mutation Observer\n    const observer = mapFocusObserver()\n    observer.observe(mapElement, {\n      attributes: true,\n      attributeFilter: ['class'],\n      attributeOldValue: true,\n    })\n    onRemove(dumbymap.htmlHolder, () => {\n      observer.disconnect()\n    })\n  }\n\n  // Set unique ID for map container\n  const mapIdList = []\n  const assignMapId = config => {\n    let mapId = config.id?.replaceAll('\\x20', '_')\n    if (!mapId) {\n      mapId = config.use?.split('/')?.at(-1)\n      let counter = 1\n      while (!mapId || mapIdList.includes(mapId)) {\n        mapId = `${config.use ?? 'unnamed'}-${counter}`\n        counter++\n      }\n    }\n\n    config.id = mapId\n    mapIdList.push(mapId)\n    return config\n  }\n\n  // Render each code block with \"language-map\" class\n  const elementsWithMapConfig = Array.from(\n    container.querySelectorAll(mapBlockSelector) ?? [],\n  )\n  /**\n   * updateAttributeByStep.\n   *\n   * @param {Object} -- renderer which is running steps\n   */\n  const updateAttributeByStep = ({ results, target, steps }) => {\n    let passNum = results.filter(\n      r => r.type === 'render' && r.state.match(/success|skip/),\n    ).length\n    const total = steps.length\n    passNum += `/${total}`\n\n    const final = results.filter(r => r.type === 'render').length === total\n\n    // FIXME HACK use MutationObserver for animation\n    if (!target.animations) target.animations = Promise.resolve()\n    target.animations = target.animations.then(async () => {\n      await new Promise(resolve => setTimeout(resolve, 100))\n      if (final) passNum += '\\x20'\n      target.dataset.report = passNum\n\n      if (final) setTimeout(() => delete target.dataset.report, 100)\n    })\n  }\n  /**\n   * config converter for mapclay.renderWith()\n   *\n   * @param {Object} config\n   * @return {Object} -- converted config\n   */\n  const configConverter = config => ({\n    use: config.use ?? 'Leaflet',\n    width: '100%',\n    ...config,\n    aliases: {\n      ...defaultAliases,\n      ...(config.aliases ?? {}),\n    },\n    stepCallback: updateAttributeByStep,\n  })\n\n  /** Get render method by converter */\n  const render = renderWith(configConverter)\n\n  /** Render each taget element for maps */\n  let order = 0\n  elementsWithMapConfig.forEach(target => {\n    // Get text in code block starts with markdown text '```map'\n    const configText = target\n      .querySelector('.language-map')\n      .textContent // BE CAREFUL!!! 0xa0 char is \"non-breaking spaces\" in HTML text content\n      // replace it by normal space\n      .replace(/\\u00A0/g, '\\u0020')\n\n    let configList = []\n    try {\n      configList = parseConfigsFromYaml(configText).map(assignMapId)\n    } catch (_) {\n      console.warn('Fail to parse yaml config for element', target)\n      return\n    }\n\n    // If map in cache has the same ID, just put it into target\n    // So user won't feel anything changes when editing markdown\n    configList.forEach(config => {\n      const cachedRenderer = mapCache[config.id]\n      if (!cachedRenderer) return\n\n      target.appendChild(cachedRenderer.target)\n      config.target = cachedRenderer.target\n    })\n\n    // trivial: if map cache is applied, do not show yaml text\n    if (target.querySelector('.mapclay')) {\n      target\n        .querySelectorAll(':scope > :not([data-render=fulfilled])')\n        .forEach(e => e.remove())\n    }\n\n    // TODO Use debounce of user input to decide rendering timing\n    // Render maps with delay\n    const timer = setTimeout(\n      () => {\n        render(target, configList).forEach(renderPromise => {\n          renderPromises.push(renderPromise)\n          renderPromise.then(afterMapRendered)\n        })\n        Array.from(target.children).forEach(e => {\n          e.style.order = order\n          order++\n          if (e.dataset.render === 'fulfilled') {\n            afterMapRendered(e.renderer)\n          }\n        })\n      },\n      delay ?? 1000,\n    )\n    onRemove(htmlHolder, () => {\n      clearTimeout(timer)\n    })\n  })\n\n  /** Prepare Context Menu */\n  const menu = document.createElement('div')\n  menu.className = 'menu'\n  menu.style.display = 'none'\n  menu.onclick = (e) => {\n    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')\n    if (keepMenu) return\n\n    menu.style.display = 'none'\n  }\n  container.appendChild(menu)\n\n  /** Menu Items for Context Menu */\n  container.oncontextmenu = e => {\n    menu.replaceChildren()\n    menu.style.display = 'block'\n    menu.style.cssText = `left: ${e.x - menu.offsetParent.offsetLeft + 10}px; top: ${e.y - menu.offsetParent.offsetTop + 5}px;`\n    e.preventDefault()\n\n    // Menu Items for map\n    const map = e.target.closest('.mapclay')\n    if (map?.renderer?.results) {\n      const rect = map.getBoundingClientRect()\n      const [x, y] = [e.x - rect.left, e.y - rect.top]\n      menu.appendChild(menuItem.toggleMapFocus(map))\n      menu.appendChild(menuItem.renderResults(dumbymap, map))\n      menu.appendChild(menuItem.getCoordinatesByPixels(map, [x, y]))\n      menu.appendChild(menuItem.restoreCamera(map))\n    } else {\n      // Toggle block focus\n      const block = e.target.closest('.dumby-block')\n      if (block) {\n        menu.appendChild(menuItem.toggleBlockFocus(block))\n      }\n    }\n\n    // Menu Items for map/block/layout\n    if (!map || map.closest('.Showcase')) {\n      if (dumbymap.utils.renderedMaps().length > 0) {\n        menu.appendChild(menuItem.pickMapItem(dumbymap))\n      }\n      menu.appendChild(menuItem.pickBlockItem(dumbymap))\n      menu.appendChild(menuItem.pickLayoutItem(dumbymap))\n    }\n\n    shiftByWindow(menu)\n\n    return menu\n  }\n\n  /** Event Handler when clicking outside of Context Manu */\n  const actionOutsideMenu = e => {\n    if (menu.style.display === 'none') return\n    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')\n    if (keepMenu) return\n\n    const rect = menu.getBoundingClientRect()\n    if (\n      e.clientX < rect.left ||\n      e.clientX > rect.left + rect.width ||\n      e.clientY < rect.top ||\n      e.clientY > rect.top + rect.height\n    ) {\n      menu.style.display = 'none'\n    }\n  }\n  document.addEventListener('click', actionOutsideMenu)\n  onRemove(htmlHolder, () =>\n    document.removeEventListener('click', actionOutsideMenu),\n  )\n\n  return Object.seal(dumbymap)\n}"],"names":["decodeCache","decode","string","exclude","defaultChars","cache","getDecodeCache","i","ch","String","fromCharCode","push","length","charCodeAt","toString","toUpperCase","slice","replace","seq","result","l","b1","parseInt","b2","chr","b3","b4","componentChars","encodeCache","encode","keepEscaped","getEncodeCache","test","code","nextCode","encodeURIComponent","format","url","protocol","slashes","auth","hostname","indexOf","port","pathname","search","hash","Url","this","protocolPattern","portPattern","simplePathPattern","unwise","concat","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","hostlessProtocol","javascript","slashedProtocol","http","https","ftp","gopher","file","urlParse","slashesDenoteHost","u","parse","prototype","lowerProto","hec","rest","trim","split","simplePath","exec","proto","toLowerCase","substr","match","atSign","hostEnd","lastIndexOf","host","parseHost","ipv6Hostname","hostparts","part","newpart","j","k","validParts","notHost","bit","unshift","join","qm","_a","Any","Cc","P","regex","Z","htmlDecodeTree","Uint16Array","map","c","xmlDecodeTree","decodeMap","Map","fromCodePoint","codePoint","output","CharCodes","BinTrieFlags","EntityDecoderState","DecodingMode","isNumber","ZERO","NINE","isHexadecimalCharacter","UPPER_A","UPPER_F","LOWER_A","LOWER_F","isEntityInAttributeInvalidEnd","EQUALS","isAsciiAlphaNumeric","UPPER_Z","LOWER_Z","EntityDecoder","constructor","decodeTree","emitCodePoint","errors","state","EntityStart","consumed","treeIndex","excess","decodeMode","Strict","startEntity","write","str","offset","NUM","NumericStart","stateNumericStart","NamedEntity","stateNamedEntity","NumericDecimal","stateNumericDecimal","NumericHex","stateNumericHex","LOWER_X","addToNumericResult","start","end","base","digitCount","Math","pow","startIdx","char","emitNumericEntity","lastCp","expectedLength","absenceOfDigitsInNumericCharacterReference","SEMI","replaceCodePoint","get","missingSemicolonAfterCharacterReference","validateNumericCharacterReference","current","valueLength","VALUE_LENGTH","determineBranch","max","Attribute","emitNotTerminatedNamedEntity","emitNamedEntityData","getDecoder","ret","decoder","decodeWithTrie","lastIndex","len","nodeIdx","branchCount","BRANCH_LENGTH","jumpOffset","JUMP_TABLE","value","lo","hi","mid","midVal","htmlDecoder","decodeHTML","mode","Legacy","isString","obj","_class","Object","call","_hasOwnProperty","hasOwnProperty","assign","Array","arguments","forEach","source","TypeError","keys","key","arrayReplaceAt","src","pos","newElements","isValidEntityCode","surrogate1","surrogate2","UNESCAPE_MD_RE","UNESCAPE_ALL_RE","RegExp","DIGITAL_ENTITY_TEST_RE","unescapeAll","escaped","entity","replaceEntityPattern","name","decoded","HTML_ESCAPE_TEST_RE","HTML_ESCAPE_REPLACE_RE","HTML_REPLACEMENTS","replaceUnsafeChar","escapeHtml","REGEXP_ESCAPE_RE","isSpace","isWhiteSpace","isPunctChar","ucmicro.P","ucmicro.S","isMdAsciiPunct","normalizeReference","lib","mdurl","ucmicro","escapeRE","has","object","unescapeMd","parseLinkDestination","ok","level","parseLinkLabel","disableNested","found","marker","prevPos","posMax","oldPos","md","inline","skipToken","labelEnd","parseLinkTitle","prev_state","can_continue","default_rules","Renderer","rules","Ruler","__rules__","__cache__","Token","type","tag","nesting","attrs","children","content","markup","info","meta","block","hidden","StateCore","env","tokens","inlineMode","code_inline","idx","options","slf","token","renderAttrs","code_block","fence","highlighted","langName","langAttrs","arr","highlight","attrIndex","tmpAttrs","langPrefix","tmpToken","image","renderInlineAsText","renderToken","hardbreak","xhtmlOut","softbreak","breaks","text","html_block","html_inline","needLf","nextToken","renderInline","render","__find__","__compile__","self","chains","rule","enabled","alt","altName","chain","fn","at","index","opt","Error","before","beforeName","ruleName","splice","after","afterName","enable","list","ignoreInvalid","isArray","enableOnly","disable","getRules","chainName","attrPush","attrData","attrSet","attrGet","attrJoin","NEWLINES_RE","NULL_RE","isLinkClose","RARE_RE","SCOPED_ABBR_TEST_RE","SCOPED_ABBR_RE","SCOPED_ABBR","r","tm","replaceFn","replace_scoped","inlineTokens","inside_autolink","replace_rare","QUOTE_TEST_RE","QUOTE_RE","replaceAt","process_inlines","stack","thisLevel","OUTER","t","canOpen","canClose","isSingle","lastChar","nextChar","isLastPunctChar","isNextPunctChar","isLastWhiteSpace","isNextWhiteSpace","item","single","openQuote","closeQuote","quotes","_rules","normalize","tok","linkify","blockTokens","pretest","htmlLinkLevel","currentToken","links","nodes","lastPos","ln","fullUrl","normalizeLink","validateLink","urlText","schema","normalizeLinkText","token_o","token_t","token_c","blkIdx","typographer","smartquotes","text_join","curr","last","Core","ruler","StateBlock","bMarks","eMarks","tShift","sCount","bsCount","blkIndent","line","lineMax","tight","ddIndent","listIndent","parentType","s","indent","indent_found","process","State","isEmpty","skipEmptyLines","from","skipSpaces","skipSpacesBack","min","skipChars","skipCharsBack","getLines","begin","keepLastLF","queue","lineIndent","lineStart","first","getLine","escapedSplit","isEscaped","substring","skipBulletListMarker","startLine","skipOrderedListMarker","open_tag","close_tag","HTML_TAG_RE","HTML_OPEN_CLOSE_TAG_RE","HTML_SEQUENCES","table","endLine","silent","nextLine","firstCh","secondCh","lineText","columns","aligns","shift","pop","columnCount","oldParentType","terminatorRules","tableLines","token_ho","token_il","tbodyLines","autocompletedCells","terminate","token_tdo","mem","params","haveEndMarker","blockquote","oldLineMax","oldBMarks","oldBSCount","oldSCount","oldTShift","lastLineEmpty","isOutdented","spaceAfterMarker","adjustTab","initial","oldIndent","lines","tokenize","hr","cnt","isOrdered","markerValue","posAfterMarker","isTerminatingParagraph","Number","markerCharCode","listTokIdx","listLines","prevEmptyEnd","contentStart","indentAfterMarker","itemLines","oldTight","oldListIndent","markTightParagraphs","reference","_endLine","getNextLine","isContinuation","lineContent","destRes","helpers","href","destEndPos","destEndLineNo","title","titleRes","label","references","html","heading","tmp","token_i","lheading","paragraph","ParserBlock","StateInline","outTokens","tokens_meta","pending","pendingLevel","delimiters","_prev_delimiters","backticks","backticksScanned","linkLevel","isTerminatorChar","maxNesting","hasEmptyLines","prevLine","pushPending","token_meta","scanDelims","canSplitWord","count","left_flanking","right_flanking","can_open","can_close","SCHEME_RE","ESCAPED","postProcess","loneMarkers","startDelim","endDelim","r_strikethrough","strikethrough_tokenize","scanned","open","close","strikethrough_postProcess","isStrong","r_emphasis","emphasis_tokenize","emphasis_post_process","EMAIL_RE","AUTOLINK_RE","DIGITAL_RE","NAMED_RE","processDelimiters","openersBottom","headerIdx","lastTokenIdx","jumps","closerIdx","closer","minOpenerIdx","openerIdx","newMinOpenerIdx","opener","isOddMatch","lastJump","link","matchAtStart","newline","pmax","ws","escape","ch1","escapedStr","ch2","origStr","backtick","openerLength","matchStart","matchEnd","closerLength","res","ref","parseReference","labelStart","autolink","isLetter","lc","isLinkOpen","_rules2","link_pairs","fragments_join","ParserInline","ruler2","isFunction","defaultOptions","fuzzyLink","fuzzyEmail","fuzzyIP","defaultSchemas","validate","tail","re","src_auth","src_host_port_strict","src_path","no_http","src_domain","src_domain_root","src_port","src_host_terminator","mailto","src_email_name","src_host_strict","tlds_default","compile","reFactory","opts","src_Any","src_Cc","src_Z","src_P","src_ZPCc","src_ZCc","text_separators","src_pseudo_letter","src_ip4","src_xn","src_host","tpl_host_fuzzy","tpl_host_no_ip_fuzzy","tpl_host_fuzzy_strict","tpl_host_port_fuzzy_strict","tpl_host_port_no_ip_fuzzy_strict","tpl_host_fuzzy_test","tpl_email_fuzzy","tpl_link_fuzzy","tpl_link_no_ip_fuzzy","__opts__","tlds","__tlds__","untpl","tpl","src_tlds","onCompile","__tlds_replaced__","email_fuzzy","link_fuzzy","link_no_ip_fuzzy","host_fuzzy_test","aliases","schemaError","val","__compiled__","__schemas__","compiled","isObject","isRegExp","createValidator","alias","slist","filter","schema_test","schema_search","schema_at_start","resetScanCache","__index__","__text_cache__","Match","__last_index__","__schema__","raw","createMatch","LinkifyIt","schemas","isOptionsObj","reduce","acc","add","definition","set","m","ml","me","next","tld_pos","at_pos","testSchemaAt","keepOld","sort","el","reverse","maxInt","regexPunycode","regexNonASCII","regexSeparators","overflow","floor","stringFromCharCode","error","RangeError","mapDomain","domain","callback","parts","encoded","array","ucs2decode","counter","extra","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","baseMinusTMin","input","inputLength","n","bias","basic","oldi","w","baseMinusT","out","currentValue","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","punycode","config","default","components","core","zero","rules2","commonmark","BAD_PROTO_RE","GOOD_DATA_RE","RECODE_HOSTNAME_FOR","parsed","mdurl.parse","er","mdurl.encode","mdurl.format","mdurl.decode","MarkdownIt","presetName","utils.isString","ParserCore","renderer","utils","utils.assign","configure","presets","missed","use","plugin","args","apply","parseInline","e","false","true","isPermalinkSymbol","a","o","emitWarning","console","warn","permalinkClass","permalinkHref","entries","permalinkAttrs","permalinkSymbol","permalinkSpace","permalinkBefore","class","symbol","renderHref","defaults","renderPermalinkImpl","ariaHidden","space","placement","d","safariReaderFix","f","includes","style","assistiveText","visuallyHiddenClass","p","wrapper","b","getTokensText","slugifyWithState","slugify","uniqueSlugStartIndex","tabIndex","permalink","renderPermalink","slug","render_footnote_anchor_name","id","prefix","docId","render_footnote_caption","subId","render_footnote_ref","footnote_anchor_name","caption","footnote_caption","refid","render_footnote_block_open","render_footnote_block_close","render_footnote_open","render_footnote_close","render_footnote_anchor","footnote_plugin","footnote_ref","footnote_block_open","footnote_block_close","footnote_open","footnote_close","footnote_anchor","footnote_def","footnotes","refs","token_fref_o","oldBMark","posAfterColon","token_fref_c","footnote_inline","footnoteId","footnoteSubId","footnote_tail","currentLabel","insideRef","refTokens","token_fo","token_po","token_pc","lastParagraph","token_a","__proto__","legacy","makePermalink","linkInsideHeader","headerLink","linkAfterHeader","front_matter_plugin","cb","marker_str","marker_char","frontMatter","marker_count","old_parent","old_line_max","start_content","auto_closed","inject_linenumbers_plugin","injectLineNumbers","paragraph_open","heading_open","list_item_open","table_open","onRemove","element","parent","parentNode","obs","window","MutationObserver","mutations","mutation","removedNodes","disconnect","observe","childList","animateRectTransition","rect","parentElement","width","w1","height","h1","left","x1","top","y1","w2","h2","x2","y2","getBoundingClientRect","rw","rh","dx","dy","isFinite","animate","duration","keyframes","transform","opacity","resume","easing","throttle","func","delay","timerFlag","setTimeout","shiftByWindow","offsetX","innerWidth","offsetY","innerHeight","requestID","MSPF","tasks","requestAnim","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","cancelAnim","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","msCancelAnimationFrame","clearTimeout","lastFrameTime","Date","now","step","called","task","event","listener","indexOfTasks","some","AnimEvent","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","CLICK_EMULATOR_ELEMENTS","DBLCLICK_EMULATOR_ELEMENTS","passiveSupported","addEventListener","addEventListenerWithOptions","capture","getPointsLength","p0","p1","lx","x","ly","y","sqrt","getTouchById","touches","identifier","hasXY","xy","clientX","clientY","dragstart","preventDefault","PointerEvent","_this","_classCallCheck","instance","Constructor","startHandlers","lastHandlerId","curPointerClass","curTouchId","lastPointerXY","lastTouchTime","stopPropagation","option","_createClass","protoProps","staticProps","regStartHandler","startHandler","that","pointerXY","touchId","pointerClass","changedTouches","cancel","unregStartHandler","handlerId","addStartHandler","passive","removeStartHandler","removeEventListener","addMoveHandler","moveHandler","rawEvent","handler","move","wrappedHandler","curMoveHandler","addEndHandler","endHandler","curEndHandler","addCancelHandler","cancelHandler","curCancelHandler","initClickEmulator","moveTolerance","timeTolerance","startX","startY","startMs","touch","performance","newEvent","MouseEvent","emulated","dispatchEvent","initDblClickEmulator","ucf","rePrefixedValue","rePrefixedName","reUc","PREFIXES","NAME_PREFIXES","prefixes","VALUE_PREFIXES","getDeclaration","declaration","document","createElement","normalizeName","propName","normalizeValue","propValue","cssSupports","setProperty","getPropertyValue","propNames","propValues","getName","ucfName","prefixed","CSSPrefix","getValue","applyList","setAttribute","mClassList","ignoreNative","classList","getAttribute","ins","contains","_add","methodChain","remove","_remove","toggle","force","_toggle","newToken","_replace","_typeof","Symbol","iterator","fnToString","objFnString","activeProps","hasMoved","body","cssValueDraggableCursor","cssValueDraggingCursor","cssOrgValueBodyCursor","cssPropTransitionProperty","cssPropTransform","cssPropUserSelect","cssOrgValueBodyUserSelect","SNAP_ALL_CORNERS","SNAP_ALL_SIDES","SNAP_ALL_EDGES","AUTOSCROLL_SPEED","AUTOSCROLL_SENSITIVITY","IS_EDGE","documentElement","navigator","msPointerEnabled","IS_TRIDENT","uniqueID","IS_GECKO","IS_BLINK","chrome","CSS","IS_WEBKIT","constr","getPrototypeOf","insProps","pointerOffset","pointerEvent","insId","cssWantedValueDraggableCursor","cssWantedValueDraggingCursor","draggableClass","draggingClass","movingClass","scrollFrame","curElement","curScrollXY","curXyMoveArgs","frameUpdate","moveArgs","timeLen","absValue","curValue","lastValue","abs","dir","newValue","speed","frame","xyMoveArgs","scrollXY","stop","scrollXYWindow","scrollTo","pageYOffset","pageXOffset","scrollXYElement","prop","copyTree","copyObj","hasChanged","typeA","keysA","aVal","isElement","nodeType","Node","ELEMENT_NODE","compareDocumentPosition","DOCUMENT_POSITION_DISCONNECTED","validBBox","bBox","right","bottom","validPPValue","isRatio","string2PPValue","inString","matches","parseFloat","ppValue2OptionValue","ppValue","resolvePPValue","baseOrigin","baseSize","validPPBBox","ppBBox2OptionObject","ppBBox","resolvePPBBox","baseBBox","prop2Axis","baseOriginXY","baseSizeXY","getBBox","getPaddingBox","getComputedStyle","borderTop","borderTopWidth","borderRight","borderRightWidth","borderBottom","borderBottomWidth","borderLeft","borderLeftWidth","setDraggableCursor","orgCursor","cursor","setDraggingCursor","viewPoint2SvgPoint","svgPoint","matrixTransform","svgCtmElement","getScreenCTM","inverse","moveTranslate","position","elementBBox","htmlOffset","elementStyle","moveLeftTop","moved","moveSvg","svgOffset","originBBox","svgOriginBBox","point","svgTransform","setTranslate","cbCheck","fix","minLeft","maxLeft","minTop","maxTop","moveElm","initTranslate","curPosition","RESTORE_PROPS","orgTransitionProperty","fixPosition","orgStyle","lastStyle","orgSize","cmpStyle","display","dirProp","padding","newBBox","offsetWidth","initLeftTop","margin","initSvg","curRect","newRect","originPoint","curPoint","initBBox","eventType","docBBox","initElm","containmentBBox","containmentIsBBox","containment","parsedSnapTargets","elementSizeXY","minXY","maxXY","xStart","xEnd","xStep","yStart","yEnd","yStep","snapTargets","parsedSnapTarget","baseRect","addSnapTarget","targetXY","center","xGravity","gravity","yGravity","corners","corner","snapTarget","gravityXStart","gravityXEnd","gravityYStart","gravityYEnd","specAxis","rangeAxis","startProp","endProp","gravityProp","specAxisL","rangeAxisL","gravitySpecStartProp","gravitySpecEndProp","gravityRangeStartProp","gravityRangeEndProp","sides","side","gravitySpecStart","gravitySpecEnd","edges","edge","lengthenX","lengthenY","expanded","axis","stepProp","expandedXY","autoScroll","autoScrollOptions","isWindow","dontScroll","scrollable","getScrollable","cmpStyleHtml","cmpStyleBody","cmpStyleElement","clientWidth","clientHeight","curScrollLeft","curScrollTop","maxScrollLeft","maxScrollTop","scrollWidth","scrollHeight","scrollableBBox","wh","back","forward","maxAbs","elementSize","sensitivity","dragEnd","handle","zIndex","orgZIndex","onDragEnd","_setOptions","newOptions","needsInitBBox","commonSnapOptions","cleanString","added","cornersLen","snap","newSnapOptions","targets","snapTargetsOptions","snapOptions","isElementPre","ppBBoxPre","newSnapTargetOptions","boundingBox","expandedParsedSnapTargets","snapTargetOptions","newOptionsBBox","invalid","parsedXY","newOptionsXY","commonOptions","newAutoScrollOptions","every","newSensitivity","v","optionMin","optionMax","orgUserSelect","pointerEventHandlerId","needsMove","bind","PlainDraggable","disabled","_id","ownerSvg","gpuTrigger","SVGElement","ownerSVGElement","baseVal","appendItem","createSVGTransform","createSVGPoint","svgView","nearestViewportElement","viewportElement","appendChild","createElementNS","namespaceURI","cssPropWillChange","leftTop","initAnim","webkitTapHighlightColor","cssPropBoxShadow","boxShadow","dragStart","onDragStart","setOptions","onDrag","onMove","onMoveStart","iLen","snappedX","snappedY","snapped","clientXY","initDoc","lazyInitTimer","initDoneItems","checkInitBBox","layoutChanging","layoutChange","initAll","Layout","enterHandler","leaveHandler","valueOf","focusNextMap","renderedList","renderedMaps","findIndex","nextIndex","nextMap","scrollIntoView","behavior","scrollToBlock","parentRect","scrollBlock","focusDelay","showcase","switchToNextLayout","layouts","currentLayoutName","container","dataset","layout","currentIndex","nextLayout","getMarkersFromMaps","closest","querySelectorAll","markerTitle","querySelector","addMarker","createGeoLink","URL","xyInParams","searchParams","isNaN","onmouseover","isAnchorVisible","anchor","LeaderLine","hide","middleLabel","path","show","addLeaderLine","onmouseout","removeLeaderLines","onclick","updateMapCameraByMarker","createDocLink","decodeURIComponent","selector","checkVisibility","pathLabel","fontWeight","updateCamera","mapContainer","insideWindow","childElement","childRect","insideParent","validateAnchorName","unproject","coord","toFixed","prompt","anchorName","desc","focusNextBlock","blocks","contentVisibilityAuto","opacityProperty","visibilityProperty","nextBlock","removeBlockFocus","Item","HTMLDivElement","innerHTML","className","super","cssText","sub","customElements","define","extends","Folder","items","submenu","onmouseleave","Suggestion","cm","getCursor","setSelection","replaceSelection","focus","newAnchor","setCursor","renderResults","modal","modalContent","overlayBlur","closeByEscKey","sourceCode","printDetails","color","success","fail","skip","printObject","prepareHeading","textContent","prepareSteps","results","renderHeading","renderSteps","detailsEle","details","values","valueString","propertyElement","PREFIX","EVENT_TYPE_RUN","EVENT_TYPE_START","EVENT_TYPE_END","EVENT_TYPE_CANCEL","fireEvent","elapsedTime","startTime","TransitionEvent","propertyName","property","pseudoElement","bubbles","cancelable","createEvent","initTransitionEvent","timedTransition","fixCurrentPosition","playingTime","currentPosition","isOn","finishAll","runTime","finishPlaying","finishDelaying","isReversing","durationLeft","timer","abort","parseAsCss","optionValue","timeValue","TimedTransition","initOn","ownerDocument","defaultView","on","_on","procToOn","off","_off","procToOff","APP_ID","STYLE_ELEMENT_ID","STYLE_CLASS","STYLE_CLASS_DOC","STYLE_CLASS_SHOW","STYLE_CLASS_HIDE","STYLE_CLASS_FORCE","STYLE_CLASS_BODY","FACE_DEFS_ELEMENT_ID","setStyle","styleProps","savedStyleProps","restoreStyle","scrollLeft","isDoc","scrollTop","getDocClientWH","elmTarget","targetBodyCmpStyle","elmTargetBody","wMode","writingMode","direction","restoreScroll","scrollElement","savedElementsScroll","elementScroll","avoidFocus","elmOverlay","DOCUMENT_POSITION_CONTAINED_BY","blur","avoidSelect","selection","getSelection","rangeCount","nodeContainsSel","node","nodeRange","createRange","selectNode","selRange","getRangeAt","compareBoundaryPoints","Range","START_TO_START","END_TO_END","elmOverlayBody","containsNode","isCollapsed","selContainsNode","partialContainment","selectNodeContents","setStart","anchorNode","anchorOffset","setEnd","focusNode","focusOffset","START_TO_END","END_TO_START","removeAllRanges","disableDocBars","targetBodyRect","clientWH","barV","barH","savedStyleTarget","propV","propH","barLeft","svgSpec","barTop","addStyle","savedStyleTargetBody","resizeTarget","boxSizing","includeProps","PROP_NAMES","border","fixStyle","_position","targetBodyBBox","overlayCmpStyle","overlayBBox","borders","reValue","hBorder","vBorder","h","getTargetElements","targetElements","childNodes","childNode","finishShowing","filterElements","savedStyle","filterElement","onShow","finishHiding","restoreAccKeys","savedElementsAccKeys","elementAccKeys","removeAttribute","accessKey","activeElement","stateSave","focusListener","timerRestoreAndFinish","restoreAndFinish","onHide","_show","onBeforeShow","elmOverlayClassList","getScroll","elements","fromDoc","elementsScroll","elementCanScroll","tagName","nodeName","overflowX","overflowY","disabledDocBars","disableAccKeys","hasAttribute","onPosition","transition","face","firstChild","removeChild","elmDocument","getElementById","defsSvg","DOMParser","parseFromString","scroll","dirLeft","find","PlainOverlay","getTarget","validElement","DOCUMENT_NODE","contentDocument","blockingDisabled","head","getElementsByTagName","sheet","insertBefore","forceReflow","nextSibling","stopImmediatePropagation","resizing","lastBBox","_hide","onBeforeHide","openCloseEffectProps","STYLE_CLASS_CONTENT","STYLE_CLASS_OVERLAY","STYLE_CLASS_OVERLAY_HIDE","STYLE_CLASS_OVERLAY_FORCE","shownProps","closeByOverlay","switchDraggable","plainDraggable","dragHandle","finishOpenEffect","effectKey","effectFinished","plainOverlay","openEffect","finishOpening","parentProps","onOpen","finishCloseEffect","closeEffect","finishClosing","onClose","execOpening","openEffectDone","execClosing","sync","closeEffectDone","fixOpenClose","_close","onBeforeClose","topProps","closeButton","handleClose","elmContent","PlainModal","elmPlainOverlayBody","effectDone","_open","onBeforeOpen","defaultLayouts","SideBySide","htmlHolder","bar","draggable","draggableCursor","_","Overlay","saveLeftTopAsData","addDraggable","siblings","popTimer","removeProperty","draggablePart","ResizeObserver","err","originLeft","originTop","onmouseup","button","finished","finally","fontSize","draggableContainer","mapCache","markdown2HTML","mdContent","replaceChildren","MarkdownItAnchor","MarkdownItFootnote","MarkdownItFrontMatter","MarkdownItInjectLinenumbers","coordinateRegex","coordinateValue","sep","dumby_block_open","dumby_block_close","total","generateMaps","renderCallback","dumbymap","order","setContextMenu","menuCallback","originalCallback","oncontextmenu","menu","utils.focusNextMap","utils.focusDelay","utils.switchToNextLayout","util","utils.createDocLink","utils.createGeoLink","layoutObserver","oldLayout","oldValue","newLayout","flat","ele","HTMLElement","focusMap","attributes","attributeFilter","attributeOldValue","characterDataOldValue","afterMapRendered","mapElement","tabindex","observer","shouldBeInShowcase","placeholder","cloneNode","replaceChild","afterAnimation","mapIdList","assignMapId","mapId","replaceAll","elementsWithMapConfig","updateAttributeByStep","steps","passNum","final","animations","Promise","resolve","then","async","report","renderWith","defaultAliases","stepCallback","configText","configList","parseConfigsFromYaml","cachedRenderer","renderPromise","offsetParent","offsetLeft","offsetTop","menuItem.toggleMapFocus","menuItem.renderResults","xyString","clipboard","writeText","alert","menuItem.getCoordinatesByPixels","restoreCamera","menuItem.restoreCamera","menuItem.toggleBlockFocus","menuItem.pickMapItem","preview","menuItem.pickBlockItem","menuItem.pickLayoutItem","actionOutsideMenu","seal"],"mappings":"mFAEA,MAAMA,EAAc,CAAE,EAuBtB,SAASC,SAAQC,EAAQC,GACA,iBAAZA,IACTA,EAAUF,SAAOG,cAGnB,MAAMC,EA1BR,SAASC,eAA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kBAAoBjlC,IACxB,GAA2B,SAAvB6gC,EAAKj/B,MAAMob,QAAoB,OAEnC,GADiBhd,EAAEuL,OAAO8d,QAAQ,eAAiBrpB,EAAEuL,OAAOoH,UAAUG,SAAS,cACjE,OAEd,MAAMtL,EAAOq5B,EAAKv4B,yBAEhBtI,EAAEiN,QAAUzF,EAAKM,MACjB9H,EAAEiN,QAAUzF,EAAKM,KAAON,EAAKE,OAC7B1H,EAAEkN,QAAU1F,EAAKQ,KACjBhI,EAAEkN,QAAU1F,EAAKQ,IAAMR,EAAKI,UAE5Bi5B,EAAKj/B,MAAMob,QAAU,OACtB,EAOH,OALAzL,SAAStF,iBAAiB,QAASg5B,mBACnCv+B,SAASu3B,GAAY,IACnB1sB,SAASrC,oBAAoB,QAAS+1B,qBAGjClqD,OAAOmqD,KAAK3E,EAAQ","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,81,82,83,84,85,86,87,88]}
\ No newline at end of file
diff --git a/dist/easymde.min.js b/dist/easymde.min.js
new file mode 100644
index 0000000..17f6da9
--- /dev/null
+++ b/dist/easymde.min.js
@@ -0,0 +1,7 @@
+/**
+ * easymde v2.18.0
+ * Copyright Jeroen Akkerman
+ * @link https://github.com/ionaru/easy-markdown-editor
+ * @license MIT
+ */
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).EasyMDE=e()}}((function(){return function e(t,n,i){function r(a,l){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return r(t[a][1][e]||e)}),c,c.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(e,t,n){},{}],2:[function(e,t,n){"use strict";var i=e("typo-js");function r(e){"function"==typeof(e=e||{}).codeMirrorInstance&&"function"==typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!r.aff_loading){r.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(r.aff_data=n.responseText,r.num_loaded++,2==r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},n.send(null)}if(!r.dic_loading){r.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(r.dic_data=o.responseText,r.num_loaded++,2==r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',l={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)n+=t,e.next();return r.typo&&!r.typo.check(n)?"spell-error":null}},s=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(s,l,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}r.num_loaded=0,r.aff_loading=!1,r.dic_loading=!1,r.aff_data="",r.dic_data="",r.typo,t.exports=r},{"typo-js":16}],3:[function(e,t,n){(function(e){"use strict";function t(t,n){clearTimeout(n.timeout),e.off(window,"mouseup",n.hurry),e.off(window,"keyup",n.hurry)}e.defineOption("autoRefresh",!1,(function(n,i){n.state.autoRefresh&&(t(0,n.state.autoRefresh),n.state.autoRefresh=null),i&&0==n.display.wrapper.offsetHeight&&function(n,i){function r(){n.display.wrapper.offsetHeight?(t(0,i),n.display.lastWrapHeight!=n.display.wrapper.clientHeight&&n.refresh()):i.timeout=setTimeout(r,i.delay)}i.timeout=setTimeout(r,i.delay),i.hurry=function(){clearTimeout(i.timeout),i.timeout=setTimeout(r,50)},e.on(window,"mouseup",i.hurry),e.on(window,"keyup",i.hurry)}(n,n.state.autoRefresh={delay:i.delay||250})}))})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],4:[function(e,t,n){(function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,n,i){i==e.Init&&(i=!1),!i!=!n&&(n?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}(t))}))})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],5:[function(e,t,n){(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var i=e.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function i(e){o(e)&&n(e)}function r(e){var i=e.getWrapperElement(),r=o(e);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(o,a,l){var s=l&&l!=e.Init;if(a&&!s)o.on("blur",i),o.on("change",r),o.on("swapDoc",r),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var i=!1;if(1==e.lineCount()){var r=e.getInputField();i="TEXTAREA"==r.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(r.querySelector(".CodeMirror-line").textContent)}i?n(e):t(e)}),20)}(o)}),r(o);else if(!a&&s){o.off("blur",i),o.off("change",r),o.off("swapDoc",r),e.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),t(o);var u=o.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&i(o)}))})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],6:[function(e,t,n){(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,n){var i=n.line,r=0,o=0,a=t.exec(e.getLine(i)),l=a[1];do{var s=i+(r+=1),u=e.getLine(s),c=t.exec(u);if(c){var d=c[1],h=parseInt(a[3],10)+r-o,f=parseInt(c[3],10),p=f;if(l!==d||isNaN(f)){if(l.length>d.length)return;if(l.length<d.length&&1===r)return;o+=1}else h===f&&(p=f+1),h>f&&(p=h+1),e.replaceRange(u.replace(t,d+p+c[4]+c[5]),{line:s,ch:0},{line:s,ch:u.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=0;s<a.length;s++){var u=a[s].head,c=o.getStateAfter(u.line),d=e.innerMode(o.getMode(),c);if("markdown"!==d.mode.name&&"markdown"!==d.mode.helperType)return void o.execCommand("newlineAndIndent");var h=!1!==(c=d.state).list,f=0!==c.quote,p=o.getLine(u.line),m=t.exec(p),g=/^\s*$/.test(p.slice(0,u.ch));if(!a[s].empty()||!h&&!f||!m||g)return void o.execCommand("newlineAndIndent");if(n.test(p)){var v=f&&/>\s*$/.test(p),x=!/>\s*$/.test(p);(v||x)&&o.replaceRange("",{line:u.line,ch:0},{line:u.line,ch:u.ch+1}),l[s]="\n"}else{var y=m[1],b=m[5],D=!(i.test(m[2])||m[2].indexOf(">")>=0),C=D?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");l[s]="\n"+y+C+b,D&&r(o,u)}}o.replaceSelections(l)}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],7:[function(e,t,n){(function(e){"use strict";e.overlayMode=function(t,n,i){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(i){return{base:e.copyState(t,i.base),overlay:e.copyState(n,i.overlay),basePos:i.basePos,baseCur:null,overlayPos:i.overlayPos,overlayCur:null}},token:function(e,r){return(e!=r.streamSeen||Math.min(r.basePos,r.overlayPos)<e.start)&&(r.streamSeen=e,r.basePos=r.overlayPos=e.start),e.start==r.basePos&&(r.baseCur=t.token(e,r.base),r.basePos=e.pos),e.start==r.overlayPos&&(e.pos=e.start,r.overlayCur=n.token(e,r.overlay),r.overlayPos=e.pos),e.pos=Math.min(r.basePos,r.overlayPos),null==r.overlayCur?r.baseCur:null!=r.baseCur&&r.overlay.combineTokens||i&&null==r.overlay.combineTokens?r.baseCur+" "+r.overlayCur:r.overlayCur},indent:t.indent&&function(e,n,i){return t.indent(e.base,n,i)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var r,o;return t.blankLine&&(r=t.blankLine(e.base)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?r:i&&null!=r?r+" "+o:o}}}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],8:[function(e,t,n){(function(e){"use strict";var t,n,i=e.Pos;function r(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),i=n,r=0;r<t.length;r++)-1==i.indexOf(t.charAt(r))&&(i+=t.charAt(r));return n==i?e:new RegExp(e.source,i)}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,t,n){t=r(t,"g");for(var o=n.line,a=n.ch,l=e.lastLine();o<=l;o++,a=0){t.lastIndex=a;var s=e.getLine(o),u=t.exec(s);if(u)return{from:i(o,u.index),to:i(o,u.index+u[0].length),match:u}}}function l(e,t,n){if(!o(t))return a(e,t,n);t=r(t,"gm");for(var l,s=1,u=n.line,c=e.lastLine();u<=c;){for(var d=0;d<s&&!(u>c);d++){var h=e.getLine(u++);l=null==l?h:l+"\n"+h}s*=2,t.lastIndex=n.ch;var f=t.exec(l);if(f){var p=l.slice(0,f.index).split("\n"),m=f[0].split("\n"),g=n.line+p.length-1,v=p[p.length-1].length;return{from:i(g,v),to:i(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:f}}}}function s(e,t,n){for(var i,r=0;r<=e.length;){t.lastIndex=r;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-n)break;(!i||a>i.index+i[0].length)&&(i=o),r=o.index+1}return i}function u(e,t,n){t=r(t,"g");for(var o=n.line,a=n.ch,l=e.firstLine();o>=l;o--,a=-1){var u=e.getLine(o),c=s(u,t,a<0?0:u.length-a);if(c)return{from:i(o,c.index),to:i(o,c.index+c[0].length),match:c}}}function c(e,t,n){if(!o(t))return u(e,t,n);t=r(t,"gm");for(var a,l=1,c=e.getLine(n.line).length-n.ch,d=n.line,h=e.firstLine();d>=h;){for(var f=0;f<l&&d>=h;f++){var p=e.getLine(d--);a=null==a?p:p+"\n"+a}l*=2;var m=s(a,t,c);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),x=d+g.length,y=g[g.length-1].length;return{from:i(x,y),to:i(x+v.length-1,1==v.length?y+v[0].length:v[v.length-1].length),match:m}}}}function d(e,t,n,i){if(e.length==t.length)return n;for(var r=0,o=n+Math.max(0,e.length-t.length);;){if(r==o)return r;var a=r+o>>1,l=i(e.slice(0,a)).length;if(l==n)return a;l>n?o=a:r=a+1}}function h(e,r,o,a){if(!r.length)return null;var l=a?t:n,s=l(r).split(/\r|\n\r?/);e:for(var u=o.line,c=o.ch,h=e.lastLine()+1-s.length;u<=h;u++,c=0){var f=e.getLine(u).slice(c),p=l(f);if(1==s.length){var m=p.indexOf(s[0]);if(-1==m)continue e;return o=d(f,p,m,l)+c,{from:i(u,d(f,p,m,l)+c),to:i(u,d(f,p,m+s[0].length,l)+c)}}var g=p.length-s[0].length;if(p.slice(g)==s[0]){for(var v=1;v<s.length-1;v++)if(l(e.getLine(u+v))!=s[v])continue e;var x=e.getLine(u+s.length-1),y=l(x),b=s[s.length-1];if(y.slice(0,b.length)==b)return{from:i(u,d(f,p,g,l)+c),to:i(u+s.length-1,d(x,y,b.length,l))}}}}function f(e,r,o,a){if(!r.length)return null;var l=a?t:n,s=l(r).split(/\r|\n\r?/);e:for(var u=o.line,c=o.ch,h=e.firstLine()-1+s.length;u>=h;u--,c=-1){var f=e.getLine(u);c>-1&&(f=f.slice(0,c));var p=l(f);if(1==s.length){var m=p.lastIndexOf(s[0]);if(-1==m)continue e;return{from:i(u,d(f,p,m,l)),to:i(u,d(f,p,m+s[0].length,l))}}var g=s[s.length-1];if(p.slice(0,g.length)==g){var v=1;for(o=u-s.length+1;v<s.length-1;v++)if(l(e.getLine(o+v))!=s[v])continue e;var x=e.getLine(u+1-s.length),y=l(x);if(y.slice(y.length-s[0].length)==s[0])return{from:i(u+1-s.length,d(x,y,x.length-s[0].length,l)),to:i(u,d(f,p,g.length,l))}}}}function p(e,t,n,o){var s;this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=e,n=n?e.clipPos(n):i(0,0),this.pos={from:n,to:n},"object"==typeof o?s=o.caseFold:(s=o,o=null),"string"==typeof t?(null==s&&(s=!1),this.matches=function(n,i){return(n?f:h)(e,t,i,s)}):(t=r(t,"gm"),o&&!1===o.multiline?this.matches=function(n,i){return(n?u:a)(e,t,i)}:this.matches=function(n,i){return(n?c:l)(e,t,i)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),p.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){var n=this.doc.clipPos(t?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(n=i(n.line,n.ch),t?(n.ch--,n.ch<0&&(n.line--,n.ch=(this.doc.getLine(n.line)||"").length)):(n.ch++,n.ch>(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=e.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var r=this.matches(t,n);if(this.afterEmptyMatch=r&&0==e.cmpPos(r.from,r.to),r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var o=i(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var r=e.splitLines(t);this.doc.replaceRange(r,this.pos.from,this.pos.to,n),this.pos.to=i(this.pos.from.line+r.length-1,r[r.length-1].length+(1==r.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new p(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new p(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var i=[],r=this.getSearchCursor(t,this.getCursor("from"),n);r.findNext()&&!(e.cmpPos(r.to(),this.getCursor("to"))>0);)i.push({anchor:r.from(),head:r.to()});i.length&&this.setSelections(i,0)}))})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],9:[function(e,t,n){(function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){!function(e){if(!e.somethingSelected())return a(e);if(e.listSelections().length>1)return l(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return o(e,t,n);var s=i[0].find(),u=i[i.length-1].find();if(!s||!u||n.line-t.line<=8||r(t,u.to)>=0||r(n,s.from)<=0)return l(e);for(;r(t,s.from)>0;)i.shift().clear(),s=i[0].find();for(r(t,s.from)<0&&(s.to.line-t.line<8?(i.shift().clear(),o(e,t,s.to,0)):o(e,t,s.from,0));r(n,u.to)<0;)i.pop().clear(),u=i[i.length-1].find();r(n,u.to)>0&&(n.line-u.from.line<8?(i.pop().clear(),o(e,u.from,n)):o(e,u.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){a(e)}))}e.defineOption("styleSelectedText",!1,(function(i,r,o){var s=o&&o!=e.Init;r&&!s?(i.state.markedSelection=[],i.state.markedSelectionStyle="string"==typeof r?r:"CodeMirror-selectedtext",l(i),i.on("cursorActivity",t),i.on("change",n)):!r&&s&&(i.off("cursorActivity",t),i.off("change",n),a(i),i.state.markedSelection=i.state.markedSelectionStyle=null)}));var i=e.Pos,r=e.cmpPos;function o(e,t,n,o){if(0!=r(t,n))for(var a=e.state.markedSelection,l=e.state.markedSelectionStyle,s=t.line;;){var u=s==t.line?t:i(s,0),c=s+8,d=c>=n.line,h=d?n:i(c,0),f=e.markText(u,h,{className:l});if(null==o?a.push(f):a.splice(o++,0,f),d)break;s=c}}function a(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function l(e){a(e);for(var t=e.listSelections(),n=0;n<t.length;n++)o(e,t[n].from(),t[n].to())}})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],10:[function(e,t,n){!function(e,i){"object"==typeof n&&void 0!==t?t.exports=i():(e=e||self).CodeMirror=i()}(this,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=i||r||o,l=a&&(i?document.documentMode||6:+(o||r)[1]),s=!o&&/WebKit\//.test(e),u=s&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),d=c&&+c[1],h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),m=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),x=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),D=/win/i.test(t),C=h&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(h=!1,s=!0);var w=y&&(u||h&&(null==C||C<12.11)),k=n||a&&l>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var F,A=function(e,t){var n=e.className,i=S(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function L(e,t){return E(e).appendChild(t)}function T(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)r.appendChild(t[o]);return r}function M(e,t,n,i){var r=T(e,t,n,i);return r.setAttribute("role","presentation"),r}function B(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function N(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function O(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function I(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!S(n[i]).test(t)&&(t+=" "+n[i]);return t}F=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var z=function(e){e.select()};function H(e){return e.display.wrapper.ownerDocument}function R(e){return H(e).defaultView}function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function _(e,t,n){for(var i in t||(t={}),e)!e.hasOwnProperty(i)||!1===n&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function W(e,t,n,i,r){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=i||0,a=r||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}g?z=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(z=function(e){try{e.select()}catch(e){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function q(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}j.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},j.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var U={toString:function(){return"CodeMirror.Pass"}},$={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function X(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);-1==o&&(o=e.length);var a=o-i;if(o==e.length||r+a>=t)return i+Math.min(a,t-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=t)return i}}var K=[""];function Z(e){for(;K.length<=e;)K.push(Y(K)+" ");return K[e]}function Y(e){return e[e.length-1]}function Q(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function J(){}function ee(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&_(t,n),n}var te=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ne(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||te.test(e))}function ie(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ne(e))||t.test(e):ne(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ae(e){return e.charCodeAt(0)>=768&&oe.test(e)}function le(e,t,n){for(;(n<0?t>0:t<e.length)&&ae(e.charAt(t));)t+=n;return t}function se(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var r=(t+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+i}}var ue=null;function ce(e,t,n){var i;ue=null;for(var r=0;r<e.length;++r){var o=e[r];if(o.from<t&&o.to>t)return r;o.to==t&&(o.from!=o.to&&"before"==n?i=r:ue=r),o.from==t&&(o.from!=o.to&&"before"!=n?i=r:ue=r)}return null!=i?i:ue}var de=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,r=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,l){var s="ltr"==l?"L":"R";if(0==a.length||"ltr"==l&&!e.test(a))return!1;for(var u,c=a.length,d=[],h=0;h<c;++h)d.push((u=a.charCodeAt(h))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":8204==u?"b":"L");for(var f=0,p=s;f<c;++f){var m=d[f];"m"==m?d[f]=p:p=m}for(var g=0,v=s;g<c;++g){var x=d[g];"1"==x&&"r"==v?d[g]="n":n.test(x)&&(v=x,"r"==x&&(d[g]="R"))}for(var y=1,b=d[0];y<c-1;++y){var D=d[y];"+"==D&&"1"==b&&"1"==d[y+1]?d[y]="1":","!=D||b!=d[y+1]||"1"!=b&&"n"!=b||(d[y]=b),b=D}for(var C=0;C<c;++C){var w=d[C];if(","==w)d[C]="N";else if("%"==w){var k=void 0;for(k=C+1;k<c&&"%"==d[k];++k);for(var S=C&&"!"==d[C-1]||k<c&&"1"==d[k]?"1":"N",F=C;F<k;++F)d[F]=S;C=k-1}}for(var A=0,E=s;A<c;++A){var L=d[A];"L"==E&&"1"==L?d[A]="L":n.test(L)&&(E=L)}for(var T=0;T<c;++T)if(t.test(d[T])){var M=void 0;for(M=T+1;M<c&&t.test(d[M]);++M);for(var B="L"==(T?d[T-1]:s),N=B==("L"==(M<c?d[M]:s))?B?"L":"R":s,O=T;O<M;++O)d[O]=N;T=M-1}for(var I,z=[],H=0;H<c;)if(i.test(d[H])){var R=H;for(++H;H<c&&i.test(d[H]);++H);z.push(new o(0,R,H))}else{var P=H,_=z.length,W="rtl"==l?1:0;for(++H;H<c&&"L"!=d[H];++H);for(var j=P;j<H;)if(r.test(d[j])){P<j&&(z.splice(_,0,new o(1,P,j)),_+=W);var q=j;for(++j;j<H&&r.test(d[j]);++j);z.splice(_,0,new o(2,q,j)),_+=W,P=j}else++j;P<H&&z.splice(_,0,new o(1,P,H))}return"ltr"==l&&(1==z[0].level&&(I=a.match(/^\s+/))&&(z[0].from=I[0].length,z.unshift(new o(0,0,I[0].length))),1==Y(z).level&&(I=a.match(/\s+$/))&&(Y(z).to-=I[0].length,z.push(new o(0,c-I[0].length,c)))),"rtl"==l?z.reverse():z}}();function he(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var fe=[],pe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||fe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||fe}function ge(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,r=i&&i[t];if(r){var o=q(r,n);o>-1&&(i[t]=r.slice(0,o).concat(r.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function xe(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),ke(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==q(n,t[i])&&n.push(t[i])}function be(e,t){return me(e,t).length>0}function De(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){Ce(e),we(e)}function Fe(e){return e.target||e.srcElement}function Ae(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ee,Le,Te=function(){if(a&&l<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Ee){var t=T("span","​");L(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ee=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Ee?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Be(e){if(null!=Le)return Le;var t=L(e,document.createTextNode("AخA")),n=F(t,0,1).getBoundingClientRect(),i=F(t,1,2).getBoundingClientRect();return E(e),!(!n||n.left==n.right)&&(Le=i.right-n.right<3)}var Ne,Oe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ze="oncopy"in(Ne=T("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),He=null;var Re={},Pe={};function _e(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function We(e){if("string"==typeof e&&Pe.hasOwnProperty(e))e=Pe[e];else if(e&&"string"==typeof e.name&&Pe.hasOwnProperty(e.name)){var t=Pe[e.name];"string"==typeof t&&(t={name:t}),(e=ee(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return We("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return We("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function je(e,t){t=We(t);var n=Re[t.name];if(!n)return je(e,"text/plain");var i=n(e,t);if(qe.hasOwnProperty(t.name)){var r=qe[t.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var qe={};function Ue(e,t){_(t,qe.hasOwnProperty(e)?qe[e]:qe[e]={})}function $e(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ve(e,t,n){return!e.startState||e.startState(t,n)}var Xe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(t<o){n=r;break}t-=o}return n.lines[t]}function Ze(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r})),i}function Ye(e,t,n){var i=[];return e.iter(t,n,(function(e){i.push(e.text)})),i}function Qe(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function Je(e){if(null==e.parent)return null;for(var t=e.parent,n=q(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function et(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var r=e.children[i],o=r.height;if(t<o){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function tt(e,t){return t>=e.first&&t<e.first+e.size}function nt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function rt(e,t){return e.line-t.line||e.ch-t.ch}function ot(e,t){return e.sticky==t.sticky&&0==rt(e,t)}function at(e){return it(e.line,e.ch)}function lt(e,t){return rt(e,t)<0?t:e}function st(e,t){return rt(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ct(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}(t,Ke(e,t.line).text.length)}function dt(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=ct(e,t[i]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Xe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=W(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return W(this.string,null,this.tabSize)-(this.lineStart?W(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ht=function(e,t){this.state=e,this.lookAhead=t},ft=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function pt(e,t,n,i){var r=[e.state.modeGen],o={};wt(e,t.text,e.doc.mode,n,(function(e,t){return r.push(e,t)}),o,i);for(var a=n.state,l=function(i){n.baseTokens=r;var l=e.state.overlays[i],s=1,u=0;n.state=!0,wt(e,t.text,l.mode,n,(function(e,t){for(var n=s;u<e;){var i=r[s];i>e&&r.splice(s,1,e,r[s+1],i),s+=2,u=Math.min(e,i)}if(t)if(l.opaque)r.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function mt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=gt(e,Je(t)),r=t.text.length>e.options.maxHighlightLength&&$e(e.doc.mode,i.state),o=pt(e,t,i);r&&(i.state=r),t.stateAfter=i.save(!r),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function gt(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return new ft(i,!0,t);var o=function(e,t,n){for(var i,r,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Ke(o,l-1),u=s.stateAfter;if(u&&(!n||l+(u instanceof ht?u.lookAhead:0)<=o.modeFrontier))return l;var c=W(s.text,null,e.options.tabSize);(null==r||i>c)&&(r=l-1,i=c)}return r}(e,t,n),a=o>i.first&&Ke(i,o-1).stateAfter,l=a?ft.fromSaved(i,a,o):new ft(i,Ve(i.mode),o);return i.iter(o,t,(function(n){vt(e,n.text,l);var i=l.line;n.stateAfter=i==t-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?l.save():null,l.nextLine()})),n&&(i.modeFrontier=l.line),l}function vt(e,t,n,i){var r=e.doc.mode,o=new Xe(t,e.options.tabSize,n);for(o.start=o.pos=i||0,""==t&&xt(r,n.state);!o.eol();)yt(r,o,n.state),o.start=o.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ge(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function yt(e,t,n,i){for(var r=0;r<10;r++){i&&(i[0]=Ge(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ft.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ft.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ft.fromSaved=function(e,t,n){return t instanceof ht?new ft(e,$e(e.mode,t.state),n,t.lookAhead):new ft(e,$e(e.mode,t),n)},ft.prototype.save=function(e){var t=!1!==e?$e(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ht(t,this.maxLookAhead):t};var bt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Dt(e,t,n,i){var r,o,a=e.doc,l=a.mode,s=Ke(a,(t=ct(a,t)).line),u=gt(e,t.line,n),c=new Xe(s.text,e.options.tabSize,u);for(i&&(o=[]);(i||c.pos<t.ch)&&!c.eol();)c.start=c.pos,r=yt(l,c,u.state),i&&o.push(new bt(c,r,$e(a.mode,u.state)));return i?o:new bt(c,r,u.state)}function Ct(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function wt(e,t,n,i,r,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,u=0,c=null,d=new Xe(t,e.options.tabSize,i),h=e.options.addModeClass&&[null];for(""==t&&Ct(xt(n,i.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&vt(e,t,i,d.pos),d.pos=t.length,s=null):s=Ct(yt(n,d,i.state,h),o),h){var f=h[0].name;f&&(s="m-"+(s?f+" "+s:f))}if(!l||c!=s){for(;u<d.start;)r(u=Math.min(d.start,u+5e3),c);c=s}d.start=d.pos}for(;u<d.pos;){var p=Math.min(d.pos,u+5e3);r(p,c),u=p}}var kt=!1,St=!1;function Ft(e,t,n){this.marker=e,this.from=t,this.to=n}function At(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function Et(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Lt(e,t){if(t.full)return null;var n=tt(e,t.from.line)&&Ke(e,t.from.line).markedSpans,i=tt(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!i)return null;var r=t.from.ch,o=t.to.ch,a=0==rt(t.from,t.to),l=function(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new Ft(a,o.from,l?null:o.to))}}return i}(n,r,a),s=function(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new Ft(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return i}(i,o,a),u=1==t.text.length,c=Y(t.text).length+(u?r:0);if(l)for(var d=0;d<l.length;++d){var h=l[d];if(null==h.to){var f=At(s,h.marker);f?u&&(h.to=null==f.to?null:f.to+c):h.to=r}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=c),null==m.from)At(l,m.marker)||(m.from=c,u&&(l||(l=[])).push(m));else m.from+=c,u&&(l||(l=[])).push(m)}l&&(l=Tt(l)),s&&s!=l&&(s=Tt(s));var g=[l];if(!u){var v,x=t.text.length-2;if(x>0&&l)for(var y=0;y<l.length;++y)null==l[y].to&&(v||(v=[])).push(new Ft(l[y].marker,null,null));for(var b=0;b<x;++b)g.push(v);g.push(s)}return g}function Tt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Mt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Bt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Nt(e){return e.inclusiveLeft?-1:0}function Ot(e){return e.inclusiveRight?1:0}function It(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),r=t.find(),o=rt(i.from,r.from)||Nt(e)-Nt(t);if(o)return-o;var a=rt(i.to,r.to)||Ot(e)-Ot(t);return a||t.id-e.id}function zt(e,t){var n,i=St&&e.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(t?r.from:r.to)&&(!n||It(n,r.marker)<0)&&(n=r.marker);return n}function Ht(e){return zt(e,!0)}function Rt(e){return zt(e,!1)}function Pt(e,t){var n,i=St&&e.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||It(n,o.marker)<0)&&(n=o.marker)}return n}function _t(e,t,n,i,r){var o=Ke(e,t),a=St&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=rt(u.from,n)||Nt(s.marker)-Nt(r),d=rt(u.to,i)||Ot(s.marker)-Ot(r);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?rt(u.to,n)>=0:rt(u.to,n)>0)||c>=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?rt(u.from,i)<=0:rt(u.from,i)<0)))return!0}}}function Wt(e){for(var t;t=Ht(e);)e=t.find(-1,!0).line;return e}function jt(e,t){var n=Ke(e,t),i=Wt(n);return n==i?t:Je(i)}function qt(e,t){if(t>e.lastLine())return t;var n,i=Ke(e,t);if(!Ut(e,i))return t;for(;n=Rt(i);)i=n.find(1,!0).line;return Je(i)+1}function Ut(e,t){var n=St&&t.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&$t(e,t,i))return!0}}function $t(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return $t(e,i.line,At(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var r=void 0,o=0;o<t.markedSpans.length;++o)if((r=t.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&$t(e,t,r))return!0}function Gt(e){for(var t=0,n=(e=Wt(e)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==e)break;t+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function Vt(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=Ht(i);){var r=t.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=e;t=Rt(i);){var o=t.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function Xt(e){var t=e.display,n=e.doc;t.maxLine=Ke(n,n.first),t.maxLineLength=Vt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Vt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Bt(this,t),this.height=n?n(this):1};function Zt(e){e.parent=null,Mt(e)}Kt.prototype.lineNo=function(){return Je(this)},De(Kt);var Yt={},Qt={};function Jt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Qt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function en(e,t){var n=M("span",null,null,s?"padding-right: .1px":null),i={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o=r?t.rest[r-1]:t.line,a=void 0;i.pos=0,i.addToken=nn,Be(e.display.measure)&&(a=he(o,e.doc.direction))&&(i.addToken=rn(i.addToken,a)),i.map=[],an(o,i,mt(e,o,t!=e.display.externalMeasured&&Je(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=I(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=I(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Me(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=I(i.pre.className,i.textClass||"")),i}function tn(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function nn(e,t,n,i,r,o,s){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,i="",r=0;r<e.length;r++){var o=e.charAt(r);" "!=o||!n||r!=e.length-1&&32!=e.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){u=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),m=p?p.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));a&&l<9?u.appendChild(T("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var v=void 0;if("\t"==p[0]){var x=e.cm.options.tabSize,y=x-e.col%x;(v=u.appendChild(T("span",Z(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==p[0]||"\n"==p[0]?((v=u.appendChild(T("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&l<9?u.appendChild(T("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&l<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||i||r||h||o||s){var b=n||"";i&&(b+=i),r&&(b+=r);var D=T("span",[u],b,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&D.setAttribute(C,s[C]);return e.content.appendChild(D)}e.content.appendChild(u)}}function rn(e,t){return function(n,i,r,o,a,l,s){r=r?r+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+i.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>u&&d.from<=u);h++);if(d.to>=c)return e(n,i,r,o,a,l,s);e(n,i.slice(0,d.to-u),r,o,null,l,s),o=null,i=i.slice(d.to-u),u=d.to}}}function on(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function an(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var a,l,s,u,c,d,h,f=r.length,p=0,m=1,g="",v=0;;){if(v==p){s=u=c=l="",h=null,d=null,v=1/0;for(var x=[],y=void 0,b=0;b<i.length;++b){var D=i[b],C=D.marker;if("bookmark"==C.type&&D.from==p&&C.widgetNode)x.push(C);else if(D.from<=p&&(null==D.to||D.to>p||C.collapsed&&D.to==p&&D.from==p)){if(null!=D.to&&D.to!=p&&v>D.to&&(v=D.to,u=""),C.className&&(s+=" "+C.className),C.css&&(l=(l?l+";":"")+C.css),C.startStyle&&D.from==p&&(c+=" "+C.startStyle),C.endStyle&&D.to==v&&(y||(y=[])).push(C.endStyle,D.to),C.title&&((h||(h={})).title=C.title),C.attributes)for(var w in C.attributes)(h||(h={}))[w]=C.attributes[w];C.collapsed&&(!d||It(d.marker,C)<0)&&(d=D)}else D.from>p&&v>D.from&&(v=D.from)}if(y)for(var k=0;k<y.length;k+=2)y[k+1]==v&&(u+=" "+y[k]);if(!d||d.from==p)for(var S=0;S<x.length;++S)on(t,0,x[S]);if(d&&(d.from||0)==p){if(on(t,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=f)break;for(var F=Math.min(f,v);;){if(g){var A=p+g.length;if(!d){var E=A>F?g.slice(0,F-p):g;t.addToken(t,E,a?a+s:s,c,p+E.length==v?u:"",l,h)}if(A>=F){g=g.slice(F-p),p=F;break}p=A,c=""}g=r.slice(o,o=n[m++]),a=Jt(n[m++],t.cm.options)}}else for(var L=1;L<n.length;L+=2)t.addToken(t,r.slice(o,o=n[L]),Jt(n[L+1],t.cm.options))}function ln(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Rt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Je(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ut(e,t)}function sn(e,t,n){for(var i,r=[],o=t;o<n;o=i){var a=new ln(e.doc,Ke(e.doc,o),o);i=o+a.size,r.push(a)}return r}var un=null;var cn=null;function dn(e,t){var n=me(e,t);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);un?i=un.delayedCallbacks:cn?i=cn:(i=cn=[],setTimeout(hn,0));for(var o=function(e){i.push((function(){return n[e].apply(null,r)}))},a=0;a<n.length;++a)o(a)}}function hn(){var e=cn;cn=null;for(var t=0;t<e.length;++t)e[t]()}function fn(e,t,n,i){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];"text"==o?gn(e,t):"gutter"==o?xn(e,t,n,i):"class"==o?vn(e,t):"widget"==o&&yn(e,t,i)}t.changes=null}function pn(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function mn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):en(e,t)}function gn(e,t){var n=t.text.className,i=mn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,vn(e,t)):n&&(t.text.className=n)}function vn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=pn(t);t.background=i.insertBefore(T("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?pn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function xn(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=pn(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=pn(t),l=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(T("div",nt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var u=e.display.gutterSpecs[s].className,c=o.hasOwnProperty(u)&&o[u];c&&l.appendChild(T("div",[c],"CodeMirror-gutter-elt","left: "+i.gutterLeft[u]+"px; width: "+i.gutterWidth[u]+"px"))}}}function yn(e,t,n){t.alignable&&(t.alignable=null);for(var i=S("CodeMirror-linewidget"),r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,i.test(r.className)&&t.node.removeChild(r);Dn(e,t,n)}function bn(e,t,n,i){var r=mn(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),vn(e,t),xn(e,t,n,i),Dn(e,t,i),t.node}function Dn(e,t,n){if(Cn(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)Cn(e,t.rest[i],t,n,!1)}function Cn(e,t,n,i,r){if(t.widgets)for(var o=pn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],u=T("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),wn(s,u,n,i),e.display.input.setUneditable(u),r&&s.above?o.insertBefore(u,n.gutter||n.text):o.appendChild(u),dn(s,"redraw")}}function wn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var r=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(r-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function kn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!B(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),L(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Sn(e,t){for(var n=Fe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Fn(e){return e.lineSpace.offsetTop}function An(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function En(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=L(e.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Ln(e){return 50-e.display.nativeBarWidth}function Tn(e){return e.display.scroller.clientWidth-Ln(e)-e.display.barWidth}function Mn(e){return e.display.scroller.clientHeight-Ln(e)-e.display.barHeight}function Bn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var r=0;r<e.rest.length;r++)if(Je(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}}function Nn(e,t,n,i){return zn(e,In(e,t),n,i)}function On(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[fi(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function In(e,t){var n=Je(t),i=On(e,n);i&&!i.text?i=null:i&&i.changes&&(fn(e,i,n,si(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=Je(t=Wt(t)),i=e.display.externalMeasured=new ln(e.doc,t,n);i.lineN=n;var r=i.built=en(e,i);return i.text=r.pre,L(e.display.lineMeasure,r.pre),i}(e,t));var r=Bn(i,t,n);return{line:t,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function zn(e,t,n,i,r){t.before&&(n=-1);var o,s=n+(i||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,n){var i=e.options.lineWrapping,r=i&&Tn(e);if(!t.measure.heights||i&&t.measure.width!=r){var o=t.measure.heights=[];if(i){t.measure.width=r;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),o=function(e,t,n,i){var r,o=Pn(t.map,n,i),s=o.node,u=o.start,c=o.end,d=o.collapse;if(3==s.nodeType){for(var h=0;h<4;h++){for(;u&&ae(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ae(t.line.text.charAt(o.coverStart+c));)++c;if((r=a&&l<9&&0==u&&c==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():_n(F(s,u,c).getClientRects(),i)).left||r.right||0==u)break;c=u,u-=1,d="right"}a&&l<11&&(r=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=He)return He;var t=L(e,T("span","x")),n=t.getBoundingClientRect(),i=F(t,0,1).getBoundingClientRect();return He=Math.abs(n.left-i.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}(e.display.measure,r))}else{var f;u>0&&(d=i="right"),r=e.options.lineWrapping&&(f=s.getClientRects()).length>1?f["right"==i?f.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!u&&(!r||!r.left&&!r.right)){var p=s.parentNode.getClientRects()[0];r=p?{left:p.left,right:p.left+li(e.display),top:p.top,bottom:p.bottom}:Rn}for(var m=r.top-t.rect.top,g=r.bottom-t.rect.top,v=(m+g)/2,x=t.view.measure.heights,y=0;y<x.length-1&&!(v<x[y]);y++);var b=y?x[y-1]:0,D=x[y],C={left:("right"==d?r.right:r.left)-t.rect.left,right:("left"==d?r.left:r.right)-t.rect.left,top:b,bottom:D};r.left||r.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=g);return C}(e,t,n,i),o.bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var Hn,Rn={left:0,right:0,top:0,bottom:0};function Pn(e,t,n){for(var i,r,o,a,l,s,u=0;u<e.length;u+=3)if(l=e[u],s=e[u+1],t<l?(r=0,o=1,a="left"):t<s?o=(r=t-l)+1:(u==e.length-3||t==s&&e[u+3]>t)&&(r=(o=s-l)-1,t>=s&&(a="right")),null!=r){if(i=e[u+2],l==s&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)i=e[2+(u-=3)],a="left";if("right"==n&&r==s-l)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)i=e[(u+=3)+2],a="right";break}return{node:i,start:r,end:o,collapse:a,coverStart:l,coverEnd:s}}function _n(e,t){var n=Rn;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function Wn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function jn(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Wn(e.display.view[t])}function qn(e){jn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Un(e){return c&&v?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function $n(e){return c&&v?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Gn(e){var t=Wt(e).widgets,n=0;if(t)for(var i=0;i<t.length;++i)t[i].above&&(n+=kn(t[i]));return n}function Vn(e,t,n,i,r){if(!r){var o=Gn(t);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=Gt(t);if("local"==i?a+=Fn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==i?0:$n(H(e)));var s=l.left+("window"==i?0:Un(H(e)));n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function Xn(e,t,n){if("div"==n)return t;var i=t.left,r=t.top;if("page"==n)i-=Un(H(e)),r-=$n(H(e));else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function Kn(e,t,n,i,r){return i||(i=Ke(e.doc,t.line)),Vn(e,i,Nn(e,i,t.ch,r),n)}function Zn(e,t,n,i,r,o){function a(t,a){var l=zn(e,r,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,Vn(e,i,l,n)}i=i||Ke(e.doc,t.line),r||(r=In(e,i));var l=he(i,e.doc.direction),s=t.ch,u=t.sticky;if(s>=i.text.length?(s=i.text.length,u="before"):s<=0&&(s=0,u="after"),!l)return a("before"==u?s-1:s,"before"==u);function c(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var d=ce(l,s,u),h=ue,f=c(s,d,"before"==u);return null!=h&&(f.other=c(s,h,"before"!=u)),f}function Yn(e,t){var n=0;t=ct(e.doc,t),e.options.lineWrapping||(n=li(e.display)*t.ch);var i=Ke(e.doc,t.line),r=Gt(i)+Fn(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function Qn(e,t,n,i,r){var o=it(e,t,n);return o.xRel=r,i&&(o.outside=i),o}function Jn(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return Qn(i.first,0,null,-1,-1);var r=et(i,n),o=i.first+i.size-1;if(r>o)return Qn(i.first+i.size-1,Ke(i,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(i,r);;){var l=ii(e,a,r,t,n),s=Pt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var u=s.find(1);if(u.line==r)return u;a=Ke(i,r=u.line)}}function ei(e,t,n,i){i-=Gn(t);var r=t.text.length,o=se((function(t){return zn(e,n,t-1).bottom<=i}),r,0);return{begin:o,end:r=se((function(t){return zn(e,n,t).top>i}),o,r)}}function ti(e,t,n,i){return n||(n=In(e,t)),ei(e,t,n,Vn(e,t,zn(e,n,i),"line").top)}function ni(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function ii(e,t,n,i,r){r-=Gt(t);var o=In(e,t),a=Gn(t),l=0,s=t.text.length,u=!0,c=he(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?oi:ri)(e,t,n,o,c,i,r);l=(u=1!=d.level)?d.from:d.to-1,s=u?d.to:d.from-1}var h,f,p=null,m=null,g=se((function(t){var n=zn(e,o,t);return n.top+=a,n.bottom+=a,!!ni(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=t,m=n),!0)}),l,s),v=!1;if(m){var x=i-m.left<m.right-i,y=x==u;g=p+(y?0:1),f=y?"after":"before",h=x?m.left:m.right}else{u||g!=s&&g!=l||g++,f=0==g?"after":g==t.text.length?"before":zn(e,o,g-(u?1:0)).bottom+a<=r==u?"after":"before";var b=Zn(e,it(n,g,f),"line",t,o);h=b.left,v=r<b.top?-1:r>=b.bottom?1:0}return Qn(n,g=le(t.text,g,1),f,v,i-h)}function ri(e,t,n,i,r,o,a){var l=se((function(l){var s=r[l],u=1!=s.level;return ni(Zn(e,it(n,u?s.to:s.from,u?"before":"after"),"line",t,i),o,a,!0)}),0,r.length-1),s=r[l];if(l>0){var u=1!=s.level,c=Zn(e,it(n,u?s.from:s.to,u?"after":"before"),"line",t,i);ni(c,o,a,!0)&&c.top>a&&(s=r[l-1])}return s}function oi(e,t,n,i,r,o,a){var l=ei(e,t,i,a),s=l.begin,u=l.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,h=0;h<r.length;h++){var f=r[h];if(!(f.from>=u||f.to<=s)){var p=zn(e,i,1!=f.level?Math.min(u,f.to)-1:Math.max(s,f.from)).right,m=p<o?o-p+1e9:p-o;(!c||d>m)&&(c=f,d=m)}}return c||(c=r[r.length-1]),c.from<s&&(c={from:s,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function ai(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(T("br"));Hn.appendChild(document.createTextNode("x"))}L(e.measure,Hn);var n=Hn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),E(e.measure),n||1}function li(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");L(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function si(e){for(var t=e.display,n={},i={},r=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+r,i[l]=o.clientWidth}return{fixedPos:ui(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function ui(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function ci(e){var t=ai(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/li(e.display)-3);return function(r){if(Ut(e.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*t:o+t}}function di(e){var t=e.doc,n=ci(e);t.iter((function(e){var t=n(e);t!=e.height&&Qe(e,t)}))}function hi(e,t,n,i){var r=e.display;if(!n&&"true"==Fe(t).getAttribute("cm-not-content"))return null;var o,a,l=r.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,u=Jn(e,o,a);if(i&&u.xRel>0&&(s=Ke(e.doc,u.line).text).length==u.ch){var c=W(s,s.length,e.options.tabSize)-s.length;u=it(u.line,Math.max(0,Math.round((o-En(e.display).left)/li(e.display))-c))}return u}function fi(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function pi(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)St&&jt(e.doc,t)<r.viewTo&&gi(e);else if(n<=r.viewFrom)St&&qt(e.doc,n+i)>r.viewFrom?gi(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)gi(e);else if(t<=r.viewFrom){var o=vi(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):gi(e)}else if(n>=r.viewTo){var a=vi(e,t,t,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):gi(e)}else{var l=vi(e,t,t,-1),s=vi(e,n,n+i,1);l&&s?(r.view=r.view.slice(0,l.index).concat(sn(e,l.lineN,s.lineN)).concat(r.view.slice(s.index)),r.viewTo+=i):gi(e)}var u=r.externalMeasured;u&&(n<u.lineN?u.lineN+=i:t<u.lineN+u.size&&(r.externalMeasured=null))}function mi(e,t,n){e.curOp.viewChanged=!0;var i=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var o=i.view[fi(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==q(a,n)&&a.push(n)}}}function gi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function vi(e,t,n,i){var r,o=fi(e,t),a=e.display.view;if(!St||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(i>0){if(o==a.length-1)return null;r=l+a[o].size-t,o++}else r=l-t;t+=r,n+=r}for(;jt(e.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function xi(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var r=t[i];r.hidden||r.node&&!r.changes||++n}return n}function yi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function bi(e,t){void 0===t&&(t=!0);var n=e.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var l=0;l<n.sel.ranges.length;l++)if(t||l!=n.sel.primIndex){var s=n.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var u=s.empty();if(a){var c=a(e,s);c&&Di(e,c,r)}else(u||e.options.showCursorWhenSelecting)&&Di(e,s.head,r);u||wi(e,s,o)}}return i}function Di(e,t,n){var i=Zn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=n.appendChild(T("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Kn(e,t,"div",null,null),a=o.right-o.left;r.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(i.other){var l=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=i.other.left+"px",l.style.top=i.other.top+"px",l.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Ci(e,t){return e.top-t.top||e.left-t.left}function wi(e,t,n){var i=e.display,r=e.doc,o=document.createDocumentFragment(),a=En(e.display),l=a.left,s=Math.max(i.sizerWidth,Tn(e)-i.sizer.offsetLeft)-a.right,u="ltr"==r.direction;function c(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n                             height: "+(i-t)+"px"))}function d(t,n,i){var o,a,d=Ke(r,t),h=d.text.length;function f(n,i){return Kn(e,it(t,n),"div",d,i)}function p(t,n,i){var r=ti(e,d,null,t),o="ltr"==n==("after"==i)?"left":"right";return f("after"==i?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1),o)[o]}var m=he(d,r.direction);return function(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var r=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(t,n,"ltr")}(m,n||0,null==i?h:i,(function(e,t,r,d){var g="ltr"==r,v=f(e,g?"left":"right"),x=f(t-1,g?"right":"left"),y=null==n&&0==e,b=null==i&&t==h,D=0==d,C=!m||d==m.length-1;if(x.top-v.top<=3){var w=(u?b:y)&&C,k=(u?y:b)&&D?l:(g?v:x).left,S=w?s:(g?x:v).right;c(k,v.top,S-k,v.bottom)}else{var F,A,E,L;g?(F=u&&y&&D?l:v.left,A=u?s:p(e,r,"before"),E=u?l:p(t,r,"after"),L=u&&b&&C?s:x.right):(F=u?p(e,r,"before"):l,A=!u&&y&&D?s:v.right,E=!u&&b&&C?l:x.left,L=u?p(t,r,"after"):s),c(F,v.top,A-F,v.bottom),v.bottom<x.top&&c(l,v.bottom,null,x.top),c(E,x.top,L-E,x.bottom)}(!o||Ci(v,o)<0)&&(o=v),Ci(x,o)<0&&(o=x),(!a||Ci(v,a)<0)&&(a=v),Ci(x,a)<0&&(a=x)})),{start:o,end:a}}var h=t.from(),f=t.to();if(h.line==f.line)d(h.line,h.ch,f.ch);else{var p=Ke(r,h.line),m=Ke(r,f.line),g=Wt(p)==Wt(m),v=d(h.line,h.ch,g?p.text.length+1:null).end,x=d(f.line,g?0:null,f.ch).start;g&&(v.top<x.top-2?(c(v.right,v.top,null,v.bottom),c(l,x.top,x.left,x.bottom)):c(v.right,v.top,x.left-v.right,v.bottom)),v.bottom<x.top&&c(l,v.bottom,null,x.top)}n.appendChild(o)}function ki(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Ei(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Si(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ai(e))}function Fi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ei(e))}),100)}function Ai(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,O(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),ki(e))}function Ei(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Li(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=Math.max(0,t.scroller.getBoundingClientRect().top),r=t.lineDiv.getBoundingClientRect().top,o=0,s=0;s<t.view.length;s++){var u=t.view[s],c=e.options.lineWrapping,d=void 0,h=0;if(!u.hidden){if(r+=u.line.height,a&&l<8){var f=u.node.offsetTop+u.node.offsetHeight;d=f-n,n=f}else{var p=u.node.getBoundingClientRect();d=p.bottom-p.top,!c&&u.text.firstChild&&(h=u.text.firstChild.getBoundingClientRect().right-p.left-1)}var m=u.line.height-d;if((m>.005||m<-.005)&&(r<i&&(o-=m),Qe(u.line,d),Ti(u.line),u.rest))for(var g=0;g<u.rest.length;g++)Ti(u.rest[g]);if(h>e.display.sizerWidth){var v=Math.ceil(h/li(e.display));v>e.display.maxLineLength&&(e.display.maxLineLength=v,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Ti(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function Mi(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Fn(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=et(t,i),a=et(t,r);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=et(t,Gt(Ke(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=et(t,Gt(Ke(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function Bi(e,t){var n=e.display,i=ai(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Mn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+An(n),s=t.top<i,u=t.bottom>l-i;if(t.top<r)a.scrollTop=s?0:t.top;else if(t.bottom>r+o){var c=Math.min(t.top,(u?l:t.bottom)-o);c!=r&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Tn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<h?a.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>f+h-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function Ni(e,t){null!=t&&(zi(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Oi(e){zi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ii(e,t,n){null==t&&null==n||zi(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function zi(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Hi(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Hi(e,t,n,i){var r=Bi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});Ii(e,r.scrollLeft,r.scrollTop)}function Ri(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||hr(e,{top:t}),Pi(e,t,!0),n&&hr(e),ar(e,100))}function Pi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function _i(e,t,n,i){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i||(e.doc.scrollLeft=t,mr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Wi(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+An(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ln(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var ji=function(e,t,n){this.cm=n;var i=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,e(i),e(r),pe(i,"scroll",(function(){i.clientHeight&&t(i.scrollTop,"vertical")})),pe(r,"scroll",(function(){r.clientWidth&&t(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ji.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},ji.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ji.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ji.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new j,this.disableVert=new j},ji.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function i(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,i)}))},ji.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var qi=function(){};function Ui(e,t){t||(t=Wi(e));var n=e.display.barWidth,i=e.display.barHeight;$i(e,t);for(var r=0;r<4&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&Li(e),$i(e,Wi(e)),n=e.display.barWidth,i=e.display.barHeight}function $i(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}qi.prototype.update=function(){return{bottom:0,right:0}},qi.prototype.setScrollLeft=function(){},qi.prototype.setScrollTop=function(){},qi.prototype.clear=function(){};var Gi={native:ji,null:qi};function Vi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?_i(e,t):Ri(e,t)}),e),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)}var Xi=0;function Ki(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xi,markArrays:null},t=e.curOp,un?un.ops.push(t):t.ownsGroup=un={ops:[t],delayedCallbacks:[]}}function Zi(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var r=e.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<t.length)}(n)}finally{un=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Yi(t[n]);for(var i=0;i<t.length;i++)Qi(t[i]);for(var r=0;r<t.length;r++)Ji(t[r]);for(var o=0;o<t.length;o++)er(t[o]);for(var a=0;a<t.length;a++)tr(t[a])}(e)}))}function Yi(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ln(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ln(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Xt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new sr(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Qi(e){e.updatedDisplay=e.mustUpdate&&cr(e.cm,e.update)}function Ji(e){var t=e.cm,n=t.display;e.updatedDisplay&&Li(t),e.barMeasure=Wi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Nn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ln(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Tn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function er(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&_i(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==N(H(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ui(t,e.barMeasure),e.updatedDisplay&&pr(t,e.barMeasure),e.selectionChanged&&ki(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Si(e.cm)}function tr(e){var t=e.cm,n=t.display,i=t.doc;if(e.updatedDisplay&&dr(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Pi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&_i(t,e.scrollLeft,!0,!0),e.scrollToPos){var r=function(e,t,n,i){var r;null==i&&(i=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,l=Zn(e,t),s=n&&n!=t?Zn(e,n):l,u=Bi(e,r={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-i,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+i}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Ri(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(_i(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return r}(t,ct(i,e.scrollToPos.from),ct(i,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!xe(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null,o=n.wrapper.ownerDocument;if(t.top+i.top<0?r=!0:t.bottom+i.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(r=!1),null!=r&&!m){var a=T("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Fn(e.display))+"px;\n                         height: "+(t.bottom-t.top+Ln(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(r),e.display.lineSpace.removeChild(a)}}}(t,r)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||ve(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ve(a[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function nr(e,t){if(e.curOp)return t();Ki(e);try{return t()}finally{Zi(e)}}function ir(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ki(e);try{return t.apply(e,arguments)}finally{Zi(e)}}}function rr(e){return function(){if(this.curOp)return e.apply(this,arguments);Ki(this);try{return e.apply(this,arguments)}finally{Zi(this)}}}function or(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ki(t);try{return e.apply(this,arguments)}finally{Zi(t)}}}function ar(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,P(lr,e))}function lr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=gt(e,t.highlightFrontier),r=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(i.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?$e(t.mode,i.state):null,s=pt(e,o,i,!0);l&&(i.state=l),o.styles=s.styles;var u=o.styleClasses,c=s.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=e.options.maxHighlightLength&&vt(e,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return ar(e,e.options.workDelay),!0})),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),r.length&&nr(e,(function(){for(var t=0;t<r.length;t++)mi(e,r[t],"text")}))}}var sr=function(e,t,n){var i=e.display;this.viewport=t,this.visible=Mi(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Tn(e),this.force=n,this.dims=si(e),this.events=[]};function ur(e){if(e.hasFocus())return null;var t=N(H(e));if(!t||!B(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=R(e).getSelection();i.anchorNode&&i.extend&&B(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function cr(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return gi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==xi(e))return!1;gr(e)&&(gi(e),t.dims=si(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),St&&(o=jt(e.doc,o),a=qt(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=sn(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=sn(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(fi(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(sn(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,fi(e,n)))),i.viewTo=n}(e,o,a),n.viewOffset=Gt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=xi(e);if(!l&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=ur(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var i=e.display,r=e.options.lineNumbers,o=i.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=i.view,c=i.viewFrom,d=0;d<u.length;d++){var h=u[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;a!=h.node;)a=l(a);var f=r&&null!=t&&t<=c&&h.lineNumber;h.changes&&(q(h.changes,"gutter")>-1&&(f=!1),fn(e,h,c,n)),f&&(E(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(nt(e.options,c)))),a=h.node.nextSibling}else{var p=bn(e,h,c,n);o.insertBefore(p,a)}c+=h.size}for(;a;)a=l(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=N(e.activeElt.ownerDocument)&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&B(document.body,e.anchorNode)&&B(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),i=t.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),n.removeAllRanges(),n.addRange(i),n.extend(e.focusNode,e.focusOffset)}}(c),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ar(e,400)),n.updateLineNumbers=null,!0}function dr(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Tn(e))i&&(t.visible=Mi(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+An(e.display)-Mn(e),n.top)}),t.visible=Mi(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!cr(e,t))break;Li(e);var r=Wi(e);yi(e),Ui(e,r),pr(e,r),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function hr(e,t){var n=new sr(e,t);if(cr(e,n)){Li(e),dr(e,n);var i=Wi(e);yi(e),Ui(e,i),pr(e,i),n.finish()}}function fr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",dn(e,"gutterChanged",e)}function pr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ln(e)+"px"}function mr(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=ui(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=i+r+"px")}}function gr(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=nt(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",fr(e.display),!0}return!1}function vr(e,t){for(var n=[],i=!1,r=0;r<e.length;r++){var o=e[r],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;i=!0}n.push({className:o,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function xr(e){var t=e.gutters,n=e.gutterSpecs;E(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,a=r.style,l=t.appendChild(T("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",fr(e)}function yr(e){xr(e.display),pi(e),mr(e)}function br(e,t,i,r){var o=this;this.input=i,o.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=M("div",null,"CodeMirror-code"),o.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=T("div",null,"CodeMirror-cursors"),o.measure=T("div",null,"CodeMirror-measure"),o.lineMeasure=T("div",null,"CodeMirror-measure"),o.lineSpace=M("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var u=M("div",[o.lineSpace],"CodeMirror-lines");o.mover=T("div",[u],null,"position: relative"),o.sizer=T("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=T("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=T("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=T("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),c&&d>=105&&(o.wrapper.style.clipPath="inset(0px)"),o.wrapper.setAttribute("translate","no"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||n&&x||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=vr(r.gutters,r.lineNumbers),xr(o),i.init(o)}sr.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},sr.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Dr=0,Cr=null;function wr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function kr(e){var t=wr(e);return t.x*=Cr,t.y*=Cr,t}function Sr(e,t){c&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var i=wr(t),r=i.x,o=i.y,a=Cr;0===t.deltaMode&&(r=t.deltaX,o=t.deltaY,a=1);var l=e.display,u=l.scroller,f=u.scrollWidth>u.clientWidth,p=u.scrollHeight>u.clientHeight;if(r&&f||o&&p){if(o&&y&&s)e:for(var m=t.target,g=l.view;m!=u;m=m.parentNode)for(var v=0;v<g.length;v++)if(g[v].node==m){e.display.currentWheelTarget=m;break e}if(r&&!n&&!h&&null!=a)return o&&p&&Ri(e,Math.max(0,u.scrollTop+o*a)),_i(e,Math.max(0,u.scrollLeft+r*a)),(!o||o&&p)&&Ce(t),void(l.wheelStartX=null);if(o&&null!=a){var x=o*a,b=e.doc.scrollTop,D=b+l.wrapper.clientHeight;x<0?b=Math.max(0,b+x-50):D=Math.min(e.doc.height,D+x+50),hr(e,{top:b,bottom:D})}Dr<20&&0!==t.deltaMode&&(null==l.wheelStartX?(l.wheelStartX=u.scrollLeft,l.wheelStartY=u.scrollTop,l.wheelDX=r,l.wheelDY=o,setTimeout((function(){if(null!=l.wheelStartX){var e=u.scrollLeft-l.wheelStartX,t=u.scrollTop-l.wheelStartY,n=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,n&&(Cr=(Cr*Dr+n)/(Dr+1),++Dr)}}),200)):(l.wheelDX+=r,l.wheelDY+=o))}}a?Cr=-.53:n?Cr=15:c?Cr=-.7:f&&(Cr=-1/3);var Fr=function(e,t){this.ranges=e,this.primIndex=t};Fr.prototype.primary=function(){return this.ranges[this.primIndex]},Fr.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!ot(n.anchor,i.anchor)||!ot(n.head,i.head))return!1}return!0},Fr.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ar(at(this.ranges[t].anchor),at(this.ranges[t].head));return new Fr(e,this.primIndex)},Fr.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Fr.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(rt(t,i.from())>=0&&rt(e,i.to())<=0)return n}return-1};var Ar=function(e,t){this.anchor=e,this.head=t};function Er(e,t,n){var i=e&&e.options.selectionsMayTouch,r=t[n];t.sort((function(e,t){return rt(e.from(),t.from())})),n=q(t,r);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=rt(l.to(),a.from());if(i&&!a.empty()?s>0:s>=0){var u=st(l.from(),a.from()),c=lt(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new Ar(d?c:u,d?u:c))}}return new Fr(t,n)}function Lr(e,t){return new Fr([new Ar(e,t||e)],0)}function Tr(e){return e.text?it(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Mr(e,t){if(rt(e,t.from)<0)return e;if(rt(e,t.to)<=0)return Tr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Tr(t).ch-t.to.ch),it(n,i)}function Br(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var r=e.sel.ranges[i];n.push(new Ar(Mr(r.anchor,t),Mr(r.head,t)))}return Er(e.cm,n,e.sel.primIndex)}function Nr(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function Or(e){e.doc.mode=je(e.options,e.doc.modeOption),Ir(e)}function Ir(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ar(e,100),e.state.modeGen++,e.curOp&&pi(e)}function zr(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Hr(e,t,n,i){function r(e){return n?n[e]:null}function o(e,n,r){!function(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Mt(e),Bt(e,n);var r=i?i(e):1;r!=e.height&&Qe(e,r)}(e,n,r,i),dn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new Kt(u[o],r(o),i));return n}var l=t.from,s=t.to,u=t.text,c=Ke(e,l.line),d=Ke(e,s.line),h=Y(u),f=r(u.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(zr(e,t)){var m=a(0,u.length-1);o(d,d.text,f),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(c==d)if(1==u.length)o(c,c.text.slice(0,l.ch)+h+c.text.slice(s.ch),f);else{var g=a(1,u.length-1);g.push(new Kt(h+c.text.slice(s.ch),f,i)),o(c,c.text.slice(0,l.ch)+u[0],r(0)),e.insert(l.line+1,g)}else if(1==u.length)o(c,c.text.slice(0,l.ch)+u[0]+d.text.slice(s.ch),r(0)),e.remove(l.line+1,p);else{o(c,c.text.slice(0,l.ch)+u[0],r(0)),o(d,h+d.text.slice(s.ch),f);var v=a(1,u.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}dn(e,"change",e,t)}function Rr(e,t,n){!function e(i,r,o){if(i.linked)for(var a=0;a<i.linked.length;++a){var l=i.linked[a];if(l.doc!=r){var s=o&&l.sharedHist;n&&!s||(t(l.doc,s),e(l.doc,i,s))}}}(e,null,!0)}function Pr(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,di(e),Or(e),_r(e),e.options.direction=t.direction,e.options.lineWrapping||Xt(e),e.options.mode=t.modeOption,pi(e)}function _r(e){("rtl"==e.doc.direction?O:A)(e.display.lineDiv,"CodeMirror-rtl")}function Wr(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function jr(e,t){var n={from:at(t.from),to:Tr(t),text:Ze(e,t.from,t.to)};return Vr(e,n,t.from.line,t.to.line+1),Rr(e,(function(e){return Vr(e,n,t.from.line,t.to.line+1)}),!0),n}function qr(e){for(;e.length;){if(!Y(e).ranges)break;e.pop()}}function Ur(e,t,n,i){var r=e.history;r.undone.length=0;var o,a,l=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&r.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(qr(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(r,r.lastOp==i)))a=Y(o.changes),0==rt(t.from,t.to)&&0==rt(t.from,a.to)?a.to=Tr(t):o.changes.push(jr(e,t));else{var s=Y(r.done);for(s&&s.ranges||Gr(e.sel,r.done),o={changes:[jr(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=l,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function $r(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||function(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(r.done),t))?r.done[r.done.length-1]=t:Gr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&qr(r.undone)}function Gr(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Vr(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),(function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Xr(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Kr(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],r=0;r<t.text.length;++r)i.push(Xr(n[r]));return i}(e,t),i=Lt(e,t);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(n[r]=a)}return n}function Zr(e,t,n){for(var i=[],r=0;r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?Fr.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c=void 0;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&q(t,Number(c[1]))>-1&&(Y(l)[d]=u[d],delete u[d])}}}return i}function Yr(e,t,n,i){if(i){var r=e.anchor;if(n){var o=rt(t,r)<0;o!=rt(n,r)<0?(r=t,t=n):o!=rt(t,n)<0&&(t=n)}return new Ar(r,t)}return new Ar(n||t,t)}function Qr(e,t,n,i,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),io(e,new Fr([Yr(e.sel.primary(),t,n,r)],0),i)}function Jr(e,t,n){for(var i=[],r=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)i[o]=Yr(e.sel.ranges[o],t[o],null,r);io(e,Er(e.cm,i,e.sel.primIndex),n)}function eo(e,t,n,i){var r=e.sel.ranges.slice(0);r[t]=n,io(e,Er(e.cm,r,e.sel.primIndex),i)}function to(e,t,n,i){io(e,Lr(t,n),i)}function no(e,t,n){var i=e.history.done,r=Y(i);r&&r.ranges?(i[i.length-1]=t,ro(e,t,n)):io(e,t,n)}function io(e,t,n){ro(e,t,n),$r(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ro(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ar(ct(e,t[n].anchor),ct(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,i),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?Er(e.cm,i.ranges,i.ranges.length-1):t}(e,t,n));var i=n&&n.bias||(rt(t.primary().head,e.sel.primary().head)<0?-1:1);oo(e,lo(e,t,i,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Oi(e.cm)}function oo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),dn(e,"cursorActivity",e))}function ao(e){oo(e,lo(e,e.sel,null,!1))}function lo(e,t,n,i){for(var r,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=uo(e,a.anchor,l&&l.anchor,n,i),u=a.head==a.anchor?s:uo(e,a.head,l&&l.head,n,i);(r||s!=a.anchor||u!=a.head)&&(r||(r=t.ranges.slice(0,o)),r[o]=new Ar(s,u))}return r?Er(e.cm,r,t.primIndex):t}function so(e,t,n,i,r){var o=Ke(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,u="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,c="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(u?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(c?l.to>=t.ch:l.to>t.ch))){if(r&&(ve(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(i<0?1:-1),h=void 0;if((i<0?c:u)&&(d=co(e,d,-i,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=rt(d,n))&&(i<0?h<0:h>0))return so(e,d,t,i,r)}var f=s.find(i<0?-1:1);return(i<0?u:c)&&(f=co(e,f,i,f.line==t.line?o:null)),f?so(e,f,t,i,r):null}}return t}function uo(e,t,n,i,r){var o=i||1,a=so(e,t,n,o,r)||!r&&so(e,t,n,o,!0)||so(e,t,n,-o,r)||!r&&so(e,t,n,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function co(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ct(e,it(t.line-1)):null:n>0&&t.ch==(i||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function ho(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),$)}function fo(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,r,o){t&&(i.from=ct(e,t)),n&&(i.to=ct(e,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),ve(e,"beforeChange",e,i),e.cm&&ve(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function po(e,t,n){if(e.cm){if(!e.cm.curOp)return ir(e.cm,po)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=fo(e,t,!0))){var i=kt&&!n&&function(e,t,n){var i=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=q(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:t,to:n}],o=0;o<i.length;++o)for(var a=i[o],l=a.find(0),s=0;s<r.length;++s){var u=r[s];if(!(rt(u.to,l.from)<0||rt(u.from,l.to)>0)){var c=[s,1],d=rt(u.from,l.from),h=rt(u.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:l.to,to:u.to}),r.splice.apply(r,c),s+=c.length-3}}return r}(e,t.from,t.to);if(i)for(var r=i.length-1;r>=0;--r)mo(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text,origin:t.origin});else mo(e,t)}}function mo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=rt(t.from,t.to)){var n=Br(e,t);Ur(e,t,n,e.cm?e.cm.curOp.id:NaN),xo(e,t,n,Lt(e,t));var i=[];Rr(e,(function(e,n){n||-1!=q(i,e.history)||(Co(e.history,t),i.push(e.history)),xo(e,t,null,Lt(e,t))}))}}function go(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var r,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,u=0;u<l.length&&(r=l[u],n?!r.ranges||r.equals(e.sel):r.ranges);u++);if(u!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=l.pop()).ranges){if(i)return void l.push(r);break}if(Gr(r,s),n&&!r.equals(e.sel))return void io(e,r,{clearRedo:!1});a=r}var c=[];Gr(a,s),s.push({changes:c,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),h=function(n){var i=r.changes[n];if(i.origin=t,d&&!fo(e,i,!1))return l.length=0,{};c.push(jr(e,i));var o=n?Br(e,i):Y(l);xo(e,i,o,Kr(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Tr(i)});var a=[];Rr(e,(function(e,t){t||-1!=q(a,e.history)||(Co(e.history,i),a.push(e.history)),xo(e,i,null,Kr(e,i))}))},f=r.changes.length-1;f>=0;--f){var p=h(f);if(p)return p.v}}}}function vo(e,t){if(0!=t&&(e.first+=t,e.sel=new Fr(Q(e.sel.ranges,(function(e){return new Ar(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){pi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)mi(e.cm,i,"gutter")}}function xo(e,t,n,i){if(e.cm&&!e.cm.curOp)return ir(e.cm,xo)(e,t,n,i);if(t.to.line<e.first)vo(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);vo(e,r),t={from:it(e.first,0),to:it(t.to.line+r,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ze(e,t.from,t.to),n||(n=Br(e,t)),e.cm?function(e,t,n){var i=e.doc,r=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=Je(Wt(Ke(i,o.line))),i.iter(s,a.line+1,(function(e){if(e==r.maxLine)return l=!0,!0})));i.sel.contains(t.from,t.to)>-1&&ye(e);Hr(i,t,n,ci(e)),e.options.lineWrapping||(i.iter(s,o.line+t.text.length,(function(e){var t=Vt(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var r=Ke(e,i).stateAfter;if(r&&(!(r instanceof ht)||i+r.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}})(i,o.line),ar(e,400);var u=t.text.length-(a.line-o.line)-1;t.full?pi(e):o.line!=a.line||1!=t.text.length||zr(e.doc,t)?pi(e,o.line,a.line+1,u):mi(e,o.line,"text");var c=be(e,"changes"),d=be(e,"change");if(d||c){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&dn(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,i):Hr(e,t,i),ro(e,n,$),e.cantEdit&&uo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function yo(e,t,n,i,r){var o;i||(i=n),rt(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof t&&(t=e.splitLines(t)),po(e,{from:n,to:i,text:t,origin:r})}function bo(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function Do(e,t,n,i){for(var r=0;r<e.length;++r){var o=e[r],a=!0;if(o.ranges){o.copied||((o=e[r]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)bo(o.ranges[l].anchor,t,n,i),bo(o.ranges[l].head,t,n,i)}else{for(var s=0;s<o.changes.length;++s){var u=o.changes[s];if(n<u.from.line)u.from=it(u.from.line+i,u.from.ch),u.to=it(u.to.line+i,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,r+1),r=0)}}}function Co(e,t){var n=t.from.line,i=t.to.line,r=t.text.length-(i-n)-1;Do(e.done,n,i,r),Do(e.undone,n,i,r)}function wo(e,t,n,i){var r=t,o=t;return"number"==typeof t?o=Ke(e,ut(e,t)):r=Je(t),null==r?null:(i(o,r)&&e.cm&&mi(e.cm,r,n),o)}function ko(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function So(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var r=e[i];t+=r.chunkSize(),n+=r.height,r.parent=this}this.size=t,this.height=n,this.parent=null}Ar.prototype.from=function(){return st(this.anchor,this.head)},Ar.prototype.to=function(){return lt(this.anchor,this.head)},Ar.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ko.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var r=this.lines[n];this.height-=r.height,Zt(r),dn(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},So.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(e<r){var o=Math.min(t,r-e),a=i.height;if(i.removeInner(e,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ko))){var l=[];this.collapse(l),this.children=[new ko(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<=o){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,l=a;l<r.lines.length;){var s=new ko(r.lines.slice(l,l+=25));r.height-=s.height,this.children.splice(++i,0,s),s.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new So(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=q(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new So(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<o){var a=Math.min(t,o-e);if(r.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Fo=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function Ao(e,t,n){Gt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ni(e,n)}Fo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=Je(n);if(null!=i&&t){for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(n.widgets=null);var o=kn(this);Qe(n,Math.max(0,n.height-o)),e&&(nr(e,(function(){Ao(e,n,-o),mi(e,i,"widget")})),dn(e,"lineWidgetCleared",e,this,i))}},Fo.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=kn(this)-t;r&&(Ut(this.doc,i)||Qe(i,i.height+r),n&&nr(n,(function(){n.curOp.forceUpdate=!0,Ao(n,i,r),dn(n,"lineWidgetChanged",n,e,Je(i))})))},De(Fo);var Eo=0,Lo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Eo};function To(e,t,n,i,r){if(i&&i.shared)return function(e,t,n,i,r){(i=_(i)).shared=!1;var o=[To(e,t,n,i,r)],a=o[0],l=i.widgetNode;return Rr(e,(function(e){l&&(i.widgetNode=l.cloneNode(!0)),o.push(To(e,ct(e,t),ct(e,n),i,r));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=Y(o)})),new Mo(o,a)}(e,t,n,i,r);if(e.cm&&!e.cm.curOp)return ir(e.cm,To)(e,t,n,i,r);var o=new Lo(e,r),a=rt(t,n);if(i&&_(i,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(_t(e,t.line,t,n,o)||t.line!=n.line&&_t(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}o.addToHistory&&Ur(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,u=e.cm;if(e.iter(s,n.line+1,(function(i){u&&o.collapsed&&!u.options.lineWrapping&&Wt(i)==u.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&Qe(i,0),function(e,t,n){var i=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));i&&e.markedSpans&&i.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],i&&i.add(e.markedSpans)),t.marker.attachLine(e)}(i,new Ft(o,s==t.line?t.ch:null,s==n.line?n.ch:null),e.cm&&e.cm.curOp),++s})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Qe(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(kt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Eo,o.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),o.collapsed)pi(u,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=n.line;c++)mi(u,c,"text");o.atomic&&ao(u.doc),dn(u,"markerAdded",u,o)}return o}Lo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ki(e),be(this,"clear")){var n=this.find();n&&dn(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=At(a.markedSpans,this);e&&!this.collapsed?mi(e,Je(a),"text"):e&&(null!=l.to&&(r=Je(a)),null!=l.from&&(i=Je(a))),a.markedSpans=Et(a.markedSpans,l),null==l.from&&this.collapsed&&!Ut(this.doc,a)&&e&&Qe(a,ai(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var u=Wt(this.lines[s]),c=Vt(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&pi(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ao(e.doc)),e&&dn(e,"markerCleared",e,this,i,r),t&&Zi(e),this.parent&&this.parent.clear()}},Lo.prototype.find=function(e,t){var n,i;null==e&&"bookmark"==this.type&&(e=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],a=At(o.markedSpans,this);if(null!=a.from&&(n=it(t?o:Je(o),a.from),-1==e))return n;if(null!=a.to&&(i=it(t?o:Je(o),a.to),1==e))return i}return n&&{from:n,to:i}},Lo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;t&&i&&nr(i,(function(){var r=t.line,o=Je(t.line),a=On(i,o);if(a&&(Wn(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Ut(n.doc,r)&&null!=n.height){var l=n.height;n.height=null;var s=kn(n)-l;s&&Qe(r,r.height+s)}dn(i,"markerChanged",i,e)}))},Lo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=q(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Lo.prototype.detachLine=function(e){if(this.lines.splice(q(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},De(Lo);var Mo=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Bo(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function No(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];Rr(n.primary.doc,(function(e){return i.push(e)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==q(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<e.length;n++)t(n)}Mo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();dn(this,"clear")}},Mo.prototype.find=function(e,t){return this.primary.find(e,t)},De(Mo);var Oo=0,Io=function(e,t,n,i,r){if(!(this instanceof Io))return new Io(e,t,n,i,r);null==n&&(n=0),So.call(this,[new ko([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=it(n,0);this.sel=Lr(o),this.history=new Wr(null),this.id=++Oo,this.modeOption=t,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Hr(this,{from:o,to:o,text:e}),io(this,Lr(o),$)};Io.prototype=ee(So.prototype,{constructor:Io,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ye(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:or((function(e){var t=it(this.first,0),n=this.first+this.size-1;po(this,{from:t,to:it(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ii(this.cm,0,0),io(this,Lr(t),$)})),replaceRange:function(e,t,n,i){yo(this,e,t=ct(this,t),n=n?ct(this,n):t,i)},getRange:function(e,t,n){var i=Ze(this,ct(this,e),ct(this,t));return!1===n?i:""===n?i.join(""):i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(tt(this,e))return Ke(this,e)},getLineNumber:function(e){return Je(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),Wt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ct(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:or((function(e,t,n){to(this,ct(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:or((function(e,t,n){to(this,ct(this,e),ct(this,t||e),n)})),extendSelection:or((function(e,t,n){Qr(this,ct(this,e),t&&ct(this,t),n)})),extendSelections:or((function(e,t){Jr(this,dt(this,e),t)})),extendSelectionsBy:or((function(e,t){Jr(this,dt(this,Q(this.sel.ranges,e)),t)})),setSelections:or((function(e,t,n){if(e.length){for(var i=[],r=0;r<e.length;r++)i[r]=new Ar(ct(this,e[r].anchor),ct(this,e[r].head||e[r].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),io(this,Er(this.cm,i,t),n)}})),addSelection:or((function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new Ar(ct(this,e),ct(this,t||e))),io(this,Er(this.cm,i,i.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var r=Ze(this,n[i].from(),n[i].to());t=t?t.concat(r):r}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=Ze(this,n[i].from(),n[i].to());!1!==e&&(r=r.join(e||this.lineSeparator())),t[i]=r}return t},replaceSelection:function(e,t,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:or((function(e,t,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&function(e,t,n){for(var i=[],r=it(e.first,0),o=r,a=0;a<t.length;a++){var l=t[a],s=Nr(l.from,r,o),u=Nr(Tr(l),r,o);if(r=l.to,o=u,"around"==n){var c=e.sel.ranges[a],d=rt(c.head,c.anchor)<0;i[a]=new Ar(d?u:s,d?s:u)}else i[a]=new Ar(s,s)}return new Fr(i,e.sel.primIndex)}(this,i,t),s=i.length-1;s>=0;s--)po(this,i[s]);l?no(this,l):this.cm&&Oi(this.cm)})),undo:or((function(){go(this,"undo")})),redo:or((function(){go(this,"redo")})),undoSelection:or((function(){go(this,"undo",!0)})),redoSelection:or((function(){go(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Wr(this.history),Rr(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Zr(this.history.done),undone:Zr(this.history.undone)}},setHistory:function(e){var t=this.history=new Wr(this.history);t.done=Zr(e.done.slice(0),null,!0),t.undone=Zr(e.undone.slice(0),null,!0)},setGutterMarker:or((function(e,t,n){return wo(this,e,"gutter",(function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&re(i)&&(e.gutterMarkers=null),!0}))})),clearGutter:or((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&wo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!tt(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=Je(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:or((function(e,t,n){return wo(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(S(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0}))})),removeLineClass:or((function(e,t,n){return wo(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",r=e[i];if(!r)return!1;if(null==n)e[i]=null;else{var o=r.match(S(n));if(!o)return!1;var a=o.index+o[0].length;e[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0}))})),addLineWidget:or((function(e,t,n){return function(e,t,n,i){var r=new Fo(e,n,i),o=e.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),wo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length,Math.max(0,r.insertAt)),0,r),r.line=t,o&&!Ut(e,t)){var i=Gt(t)<e.scrollTop;Qe(t,t.height+kn(r)),i&&Ni(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&dn(o,"lineWidgetAdded",o,r,"number"==typeof t?t:Je(t)),r}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return To(this,ct(this,e),ct(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return To(this,e=ct(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=ct(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ct(this,e),t=ct(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&r==e.line&&e.ch>=s.to||null==s.from&&r!=e.line||null!=s.from&&r==t.line&&s.from>=t.ch||n&&!n(s.marker)||i.push(s.marker.parent||s.marker)}++r})),i},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)})),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;if(o>e)return t=e,!0;e-=o,++n})),ct(this,it(n,t))},indexFromPos:function(e){var t=(e=ct(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Io(Ye(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new Io(Ye(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=i.find(),o=e.clipPos(r.from),a=e.clipPos(r.to);if(rt(o,a)){var l=To(e,o,a,i.primary,i.primary.type);i.markers.push(l),l.parent=i}}}(i,Bo(this)),i},unlinkDoc:function(e){if(e instanceof Ma&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),No(Bo(this));break}}if(e.history==this.history){var n=[e.id];Rr(e,(function(e){return n.push(e.id)}),!0),e.history=new Wr(null),e.history.done=Zr(this.history.done,n),e.history.undone=Zr(this.history.undone,n)}},iterLinkedDocs:function(e){Rr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Oe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:or((function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&nr(t=this.cm,(function(){_r(t),pi(t)})))}))}),Io.prototype.eachLine=Io.prototype.iter;var zo=0;function Ho(e){var t=this;if(Ro(t),!xe(t,e)&&!Sn(t.display,e)){Ce(e),a&&(zo=+new Date);var n=hi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),l=0,s=function(){++l==r&&ir(t,(function(){var e={from:n=ct(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};po(t.doc,e),no(t.doc,Lr(ct(t.doc,n),ct(t.doc,Tr(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==q(t.options.allowDropFileTypes,e.type))s();else{var i=new FileReader;i.onerror=function(){return s()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),s()},i.readAsText(e)}},c=0;c<i.length;c++)u(i[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),ro(t.doc,Lr(n,n)),h)for(var f=0;f<h.length;++f)yo(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ro(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var r=t[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var _o=!1;function Wo(){var e;_o||(pe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Po(jo)}),100))})),pe(window,"blur",(function(){return Po(Ei)})),_o=!0)}function jo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var qo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Uo=0;Uo<10;Uo++)qo[Uo+48]=qo[Uo+96]=String(Uo);for(var $o=65;$o<=90;$o++)qo[$o]=String.fromCharCode($o);for(var Go=1;Go<=12;Go++)qo[Go+111]=qo[Go+63235]="F"+Go;var Vo={};function Xo(e){var t,n,i,r,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ko(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=Q(n.split(" "),Xo),o=0;o<r.length;o++){var a=void 0,l=void 0;o==r.length-1?(l=r.join(" "),a=i):(l=r.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var u in t)e[u]=t[u];return e}function Zo(e,t,n,i){var r=(t=ea(t)).call?t.call(e,i):t[e];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Zo(e,t.fallthrough,n,i);for(var o=0;o<t.fallthrough.length;o++){var a=Zo(e,t.fallthrough[o],n,i);if(a)return a}}}function Yo(e){var t="string"==typeof e?e:qo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Qo(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function Jo(e,t){if(h&&34==e.keyCode&&e.char)return!1;var n=qo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Qo(n,e,t))}function ea(e){return"string"==typeof e?Vo[e]:e}function ta(e,t){for(var n=e.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=t(n[r]);i.length&&rt(o.from,Y(i).to)<=0;){var a=i.pop();if(rt(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}nr(e,(function(){for(var t=i.length-1;t>=0;t--)yo(e.doc,"",i[t].from,i[t].to,"+delete");Oi(e)}))}function na(e,t,n){var i=le(e.text,t+n,n);return i<0||i>e.text.length?null:i}function ia(e,t,n){var i=na(e,t.ch,n);return null==i?null:new it(t.line,i,n<0?"after":"before")}function ra(e,t,n,i,r){if(e){"rtl"==t.doc.direction&&(r=-r);var o=he(n,t.doc.direction);if(o){var a,l=r<0?Y(o):o[0],s=r<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=In(t,n);a=r<0?n.text.length-1:0;var c=zn(t,u,a).top;a=se((function(e){return zn(t,u,e).top==c}),r<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=na(n,a,1))}else a=r<0?l.to:l.from;return new it(i,a,s)}}return new it(i,r<0?n.text.length:0,r<0?"before":"after")}Vo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Vo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Vo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Vo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Vo.default=y?Vo.macDefault:Vo.pcDefault;var oa={selectAll:ho,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),$)},killLine:function(e){return ta(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return ta(e,(function(t){return{from:it(t.from().line,0),to:ct(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return ta(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return ta(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return ta(e,(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return aa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return la(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),i=function(e){for(var t;t=Rt(e);)e=t.find(1,!0).line;return e}(n);i!=n&&(t=Je(i));return ra(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?la(e,t.head):i}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=W(e.getLine(o.line),o.ch,i);t.push(Z(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return nr(e,(function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var r=t[i].head,o=Ke(e.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new it(r.line,r.ch-1)),r.ch>0)r=new it(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),it(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var a=Ke(e.doc,r.line-1).text;a&&(r=new it(r.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(r.line-1,a.length-1),r,"+transpose"))}n.push(new Ar(r,r))}e.setSelections(n)}))},newlineAndIndent:function(e){return nr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);Oi(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function aa(e,t){var n=Ke(e.doc,t),i=Wt(n);return i!=n&&(t=Je(i)),ra(!0,e,i,t,1)}function la(e,t){var n=aa(e,t.line),i=Ke(e.doc,n.line),r=he(i,e.doc.direction);if(!r||0==r[0].level){var o=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,a?0:o,n.sticky)}return n}function sa(e,t,n){if("string"==typeof t&&!(t=oa[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=U}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}var ua=new j;function ca(e,t,n,i){var r=e.state.keySeq;if(r){if(Yo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ua.set(50,(function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())})),da(e,r+" "+t,n,i))return!0}return da(e,t,n,i)}function da(e,t,n,i){var r=function(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var r=Zo(t,e.state.keyMaps[i],n,e);if(r)return r}return e.options.extraKeys&&Zo(t,e.options.extraKeys,n,e)||Zo(t,e.options.keyMap,n,e)}(e,t,i);return"multi"==r&&(e.state.keySeq=t),"handled"==r&&dn(e,"keyHandled",e,t,n),"handled"!=r&&"multi"!=r||(Ce(n),ki(e)),!!r}function ha(e,t){var n=Jo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ca(e,"Shift-"+n,t,(function(t){return sa(e,t,!0)}))||ca(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return sa(e,t)})):ca(e,n,t,(function(t){return sa(e,t)})))}var fa=null;function pa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=N(H(t)),xe(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var r=ha(t,e);h&&(fa=r?i:null,r||88!=i||ze||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!r&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(A(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n))}O(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n)}(t)}}function ma(e){16==e.keyCode&&(this.doc.sel.shift=!1),xe(this,e)}function ga(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Sn(t.display,e)||xe(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(h&&n==fa)return fa=null,void Ce(e);if(!h||e.which&&!(e.which<10)||!ha(t,e)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(function(e,t,n){return ca(e,"'"+n+"'",t,(function(t){return sa(e,t,!0)}))}(t,e,r)||t.display.input.onKeyPress(e))}}}var va,xa,ya=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ba(e){var t=this,n=t.display;if(!(xe(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Sn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!wa(t,e)){var i=hi(t,e),r=Ae(e),o=i?function(e,t){var n=+new Date;return xa&&xa.compare(n,e,t)?(va=xa=null,"triple"):va&&va.compare(n,e,t)?(xa=new ya(n,e,t),va=null,"double"):(va=new ya(n,e,t),xa=null,"single")}(i,r):"single";R(t).focus(),1==r&&t.state.selectingText&&t.state.selectingText(e),i&&function(e,t,n,i,r){var o="Click";"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o);return ca(e,Qo(o=(1==t?"Left":2==t?"Middle":"Right")+o,r),r,(function(t){if("string"==typeof t&&(t=oa[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=U}finally{e.state.suppressEdits=!1}return i}))}(t,r,i,o,e)||(1==r?i?function(e,t,n,i){a?setTimeout(P(Si,e),0):e.curOp.focus=N(H(e));var r,o=function(e,t,n){var i=e.getOption("configureMouse"),r=i?i(e,t,n):{};if(null==r.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||n.shiftKey);null==r.addNew&&(r.addNew=y?n.metaKey:n.ctrlKey);null==r.moveOnDrag&&(r.moveOnDrag=!(y?n.altKey:n.ctrlKey));return r}(e,n,i),u=e.doc.sel;e.options.dragDrop&&Te&&!e.isReadOnly()&&"single"==n&&(r=u.contains(t))>-1&&(rt((r=u.ranges[r]).from(),t)<0||t.xRel>0)&&(rt(r.to(),t)>0||t.xRel<0)?function(e,t,n,i){var r=e.display,o=!1,u=ir(e,(function(t){s&&(r.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Fi(e)),ge(r.wrapper.ownerDocument,"mouseup",u),ge(r.wrapper.ownerDocument,"mousemove",c),ge(r.scroller,"dragstart",d),ge(r.scroller,"drop",u),o||(Ce(t),i.addNew||Qr(e.doc,n,null,null,i.extend),s&&!f||a&&9==l?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};s&&(r.scroller.draggable=!0);e.state.draggingText=u,u.copy=!i.moveOnDrag,pe(r.wrapper.ownerDocument,"mouseup",u),pe(r.wrapper.ownerDocument,"mousemove",c),pe(r.scroller,"dragstart",d),pe(r.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}(e,i,t,o):function(e,t,n,i){a&&Fi(e);var r=e.display,o=e.doc;Ce(t);var l,s,u=o.sel,c=u.ranges;i.addNew&&!i.extend?(s=o.sel.contains(n),l=s>-1?c[s]:new Ar(n,n)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==i.unit)i.addNew||(l=new Ar(n,n)),n=hi(e,t,!0,!0),s=-1;else{var d=Da(e,n,i.unit);l=i.extend?Yr(l,d.anchor,d.head,i.extend):d}i.addNew?-1==s?(s=c.length,io(o,Er(e,c.concat([l]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==i.unit&&!i.extend?(io(o,Er(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):eo(o,s,l,G):(s=0,io(o,new Fr([l],0),G),u=o.sel);var h=n;function f(t){if(0!=rt(h,t))if(h=t,"rectangle"==i.unit){for(var r=[],a=e.options.tabSize,c=W(Ke(o,n.line).text,n.ch,a),d=W(Ke(o,t.line).text,t.ch,a),f=Math.min(c,d),p=Math.max(c,d),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ke(o,m).text,x=X(v,f,a);f==p?r.push(new Ar(it(m,x),it(m,x))):v.length>x&&r.push(new Ar(it(m,x),it(m,X(v,p,a))))}r.length||r.push(new Ar(n,n)),io(o,Er(e,u.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,b=l,D=Da(e,t,i.unit),C=b.anchor;rt(D.anchor,C)>0?(y=D.head,C=st(b.from(),D.anchor)):(y=D.anchor,C=lt(b.to(),D.head));var w=u.ranges.slice(0);w[s]=function(e,t){var n=t.anchor,i=t.head,r=Ke(e.doc,n.line);if(0==rt(n,i)&&n.sticky==i.sticky)return t;var o=he(r);if(!o)return t;var a=ce(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,u=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==u||u==o.length)return t;if(i.line!=n.line)s=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ce(o,i.ch,i.sticky),d=c-a||(i.ch-n.ch)*(1==l.level?-1:1);s=c==u-1||c==u?d<0:d>0}var h=o[u+(s?-1:0)],f=s==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new Ar(new it(n.line,p,m),i)}(e,new Ar(ct(o,C),y)),io(o,Er(e,w,s),G)}}var p=r.wrapper.getBoundingClientRect(),m=0;function g(t){var n=++m,a=hi(e,t,!0,"rectangle"==i.unit);if(a)if(0!=rt(a,h)){e.curOp.focus=N(H(e)),f(a);var l=Mi(r,o);(a.line>=l.to||a.line<l.from)&&setTimeout(ir(e,(function(){m==n&&g(t)})),150)}else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;s&&setTimeout(ir(e,(function(){m==n&&(r.scroller.scrollTop+=s,g(t))})),50)}}function v(t){e.state.selectingText=!1,m=1/0,t&&(Ce(t),r.input.focus()),ge(r.wrapper.ownerDocument,"mousemove",x),ge(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var x=ir(e,(function(e){0!==e.buttons&&Ae(e)?g(e):v(e)})),y=ir(e,v);e.state.selectingText=y,pe(r.wrapper.ownerDocument,"mousemove",x),pe(r.wrapper.ownerDocument,"mouseup",y)}(e,i,t,o)}(t,i,o,e):Fe(e)==n.scroller&&Ce(e):2==r?(i&&Qr(t.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(k?t.display.input.onContextMenu(e):Fi(t)))}}function Da(e,t,n){if("char"==n)return new Ar(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ar(it(t.line,0),ct(e.doc,it(t.line+1,0)));var i=n(e,t);return new Ar(i.from,i.to)}function Ca(e,t,n,i){var r,o;if(t.touches)r=t.touches[0].clientX,o=t.touches[0].clientY;else try{r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ce(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!be(e,n))return ke(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var u=a.gutters.childNodes[s];if(u&&u.getBoundingClientRect().right>=r)return ve(e,n,e,et(e.doc,o),e.display.gutterSpecs[s].className,t),ke(t)}}function wa(e,t){return Ca(e,t,"gutterClick",!0)}function ka(e,t){Sn(e.display,t)||function(e,t){if(!be(e,"gutterContextMenu"))return!1;return Ca(e,t,"gutterContextMenu",!1)}(e,t)||xe(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qn(e)}ya.prototype.compare=function(e,t,n){return this.time+400>e&&0==rt(t,this.pos)&&n==this.button};var Fa={toString:function(){return"CodeMirror.Init"}},Aa={},Ea={};function La(e,t,n){if(!t!=!(n&&n!=Fa)){var i=e.display.dragFunctions,r=t?pe:ge;r(e.display.scroller,"dragstart",i.start),r(e.display.scroller,"dragenter",i.enter),r(e.display.scroller,"dragover",i.over),r(e.display.scroller,"dragleave",i.leave),r(e.display.scroller,"drop",i.drop)}}function Ta(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),Xt(e)),di(e),pi(e),qn(e),setTimeout((function(){return Ui(e)}),100)}function Ma(e,t){var n=this;if(!(this instanceof Ma))return new Ma(e,t);this.options=t=t?_(t):{},_(Aa,t,!1);var i=t.value;"string"==typeof i?i=new Io(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var r=new Ma.inputStyles[t.inputStyle](this),o=this.display=new br(e,i,r,t);for(var u in o.wrapper.CodeMirror=this,Sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Vi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},t.autofocus&&!x&&o.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;pe(t.scroller,"mousedown",ir(e,ba)),pe(t.scroller,"dblclick",a&&l<11?ir(e,(function(t){if(!xe(e,t)){var n=hi(e,t);if(n&&!wa(e,t)&&!Sn(e.display,t)){Ce(t);var i=e.findWordAt(n);Qr(e.doc,i.anchor,i.head)}}})):function(t){return xe(e,t)||Ce(t)});pe(t.scroller,"contextmenu",(function(t){return ka(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||ka(e,n)}));var n,i={end:0};function r(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(i=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}pe(t.scroller,"touchstart",(function(r){if(!xe(e,r)&&!o(r)&&!wa(e,r)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-i.end<=300?i:null},1==r.touches.length&&(t.activeTouch.left=r.touches[0].pageX,t.activeTouch.top=r.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var i=t.activeTouch;if(i&&!Sn(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!i.prev||s(i,i.prev)?new Ar(a,a):!i.prev.prev||s(i,i.prev.prev)?e.findWordAt(a):new Ar(it(a.line,0),ct(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(n)}r()})),pe(t.scroller,"touchcancel",r),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Ri(e,t.scroller.scrollTop),_i(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return Sr(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return Sr(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){xe(e,t)||Se(t)},over:function(t){xe(e,t)||(!function(e,t){var n=hi(e,t);if(n){var i=document.createDocumentFragment();Di(e,n,i),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),L(e.display.dragCursor,i)}}(e,t),Se(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-zo<100))Se(t);else if(!xe(e,t)&&!Sn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),h&&n.parentNode.removeChild(n)}}(e,t)},drop:ir(e,Ho),leave:function(t){xe(e,t)||Ro(e)}};var u=t.input.getField();pe(u,"keyup",(function(t){return ma.call(e,t)})),pe(u,"keydown",ir(e,pa)),pe(u,"keypress",ir(e,ga)),pe(u,"focus",(function(t){return Ai(e,t)})),pe(u,"blur",(function(t){return Ei(e,t)}))}(this),Wo(),Ki(this),this.curOp.forceUpdate=!0,Pr(this,i),t.autofocus&&!x||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ai(n)}),20):Ei(this),Ea)Ea.hasOwnProperty(u)&&Ea[u](this,t[u],Fa);gr(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ba.length;++c)Ba[c](this);Zi(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Ma.defaults=Aa,Ma.optionHandlers=Ea;var Ba=[];function Na(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=gt(e,t).state:n="prev");var a=e.options.tabSize,l=Ke(o,t),s=W(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u,c=l.text.match(/^\s*/)[0];if(i||/\S/.test(l.text)){if("smart"==n&&((u=o.mode.indent(r,l.text.slice(c.length),l.text))==U||u>150)){if(!i)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>o.first?W(Ke(o,t-1).text,null,a):0:"add"==n?u=s+e.options.indentUnit:"subtract"==n?u=s-e.options.indentUnit:"number"==typeof n&&(u=s+n),u=Math.max(0,u);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(u/a);f;--f)h+=a,d+="\t";if(h<u&&(d+=Z(u-h)),d!=c)return yo(o,d,it(t,0),it(t,c.length),"+input"),l.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<c.length){var g=it(t,c.length);eo(o,p,new Ar(g,g));break}}}Ma.defineInitHook=function(e){return Ba.push(e)};var Oa=null;function Ia(e){Oa=e}function za(e,t,n,i,r){var o=e.doc;e.display.shift=!1,i||(i=o.sel);var a=+new Date-200,l="paste"==r||e.state.pasteIncoming>a,s=Oe(t),u=null;if(l&&i.ranges.length>1)if(Oa&&Oa.text.join("\n")==t){if(i.ranges.length%Oa.text.length==0){u=[];for(var c=0;c<Oa.text.length;c++)u.push(o.splitLines(Oa.text[c]))}}else s.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(u=Q(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=i.ranges.length-1;h>=0;h--){var f=i.ranges[h],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=it(p.line,p.ch-n):e.state.overwrite&&!l?m=it(m.line,Math.min(Ke(o,m.line).text.length,m.ch+Y(s).length)):l&&Oa&&Oa.lineWise&&Oa.text.join("\n")==s.join("\n")&&(p=m=it(p.line,0)));var g={from:p,to:m,text:u?u[h%u.length]:s,origin:r||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};po(e.doc,g),dn(e,"inputRead",e,g)}t&&!l&&Ra(e,t),Oi(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ha(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||nr(t,(function(){return za(t,n,0,null,"paste")})),!0}function Ra(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Na(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Na(e,r.head.line,"smart"));a&&dn(e,"electricInput",e,r.head.line)}}}function Pa(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var r=e.doc.sel.ranges[i].head.line,o={anchor:it(r,0),head:it(r+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function _a(e,t,n,i){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function Wa(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),_a(e),t}function ja(e,t,n,i,r){var o=t,a=n,l=Ke(e,t.line),s=r&&"rtl"==e.direction?-n:n;function u(o){var a,u;if("codepoint"==i){var c=l.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(c))a=null;else{var d=n>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new it(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(d?2:1))),-n)}}else a=r?function(e,t,n,i){var r=he(t,e.doc.direction);if(!r)return ia(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ce(r,n.ch,n.sticky),a=r[o];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return ia(t,n,i);var l,s=function(e,n){return na(t,e instanceof it?e.ch:e,n)},u=function(n){return e.options.lineWrapping?(l=l||In(e,t),ti(e,t,l,n)):{begin:0,end:t.text.length}},c=u("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,h=s(n,d?1:-1);if(null!=h&&(d?h<=a.to&&h<=c.end:h>=a.from&&h>=c.begin)){var f=d?"before":"after";return new it(n.line,h,f)}}var p=function(e,t,i){for(var o=function(e,t){return t?new it(n.line,s(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<r.length;e+=t){var a=r[e],l=t>0==(1!=a.level),u=l?i.begin:s(i.end,-1);if(a.from<=u&&u<a.to)return o(u,l);if(u=l?a.from:s(a.to,-1),i.begin<=u&&u<i.end)return o(u,l)}},m=p(o+i,i,c);if(m)return m;var g=i>0?c.end:s(c.begin,-1);return null==g||i>0&&g==t.text.length||!(m=p(i>0?0:r.length-1,i,u(g)))?null:m}(e.cm,l,t,n):ia(l,t,n);if(null==a){if(o||(u=t.line+s)<e.first||u>=e.first+e.size||(t=new it(u,t.ch,t.sticky),!(l=Ke(e,u))))return!1;t=ra(r,e.cm,l,t.line,s)}else t=a;return!0}if("char"==i||"codepoint"==i)u();else if("column"==i)u(!0);else if("word"==i||"group"==i)for(var c=null,d="group"==i,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var p=l.text.charAt(t.ch)||"\n",m=ie(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||m||(m="s"),c&&c!=m){n<0&&(n=1,u(),t.sticky="after");break}if(m&&(c=m),n>0&&!u(!f))break}var g=uo(e,t,o,a,!0);return ot(o,g)&&(g.hitSide=!0),g}function qa(e,t,n,i){var r,o,a=e.doc,l=t.left;if("page"==i){var s=Math.min(e.display.wrapper.clientHeight,R(e).innerHeight||a(e).documentElement.clientHeight),u=Math.max(s-.5*ai(e.display),3);r=(n>0?t.bottom:t.top)+n*u}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;(o=Jn(e,l,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $a(e,t){var n=On(e,t.line);if(!n||n.hidden)return null;var i=Ke(e.doc,t.line),r=Bn(n,i,t.line),o=he(i,e.doc.direction),a="left";o&&(a=ce(o,t.ch)%2?"right":"left");var l=Pn(r.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Ga(e,t){return t&&(e.bad=!0),e}function Va(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return Ga(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var o=e.display.view[r];if(o.node==i)return Xa(o,t,n)}}function Xa(e,t,n){var i=e.text.firstChild,r=!1;if(!t||!B(i,t))return Ga(it(Je(e.line),0),!0);if(t==i&&(r=!0,t=i.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return Ga(it(Je(o),o.text.length),r)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var s=e.measure,u=s.maps;function c(t,n,i){for(var r=-1;r<(u?u.length:0);r++)for(var o=r<0?s.map:u[r],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var c=Je(r<0?e.line:e.rest[r]),d=o[a]+i;return(i<0||l!=t)&&(d=o[a+(i?1:0)]),it(c,d)}}}var d=c(a,l,n);if(d)return Ga(d,r);for(var h=l.nextSibling,f=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=c(h,h.firstChild,0))return Ga(it(d.line,d.ch-f),r);f+=h.textContent.length}for(var p=l.previousSibling,m=n;p;p=p.previousSibling){if(d=c(p,p.firstChild,-1))return Ga(it(d.line,d.ch+m),r);m+=p.textContent.length}}Ua.prototype.init=function(e){var t=this,n=this,i=n.cm,r=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!xe(i,e)){if(i.somethingSelected())Ia({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Pa(i);Ia({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation((function(){i.setSelections(t.ranges,0,$),i.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Oa.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=Wa(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Oa.text.join("\n");var u=N(r.ownerDocument);z(s),setTimeout((function(){i.display.lineSpace.removeChild(l),u.focus(),u==r&&n.showPrimarySelection()}),50)}}r.contentEditable=!0,_a(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),pe(r,"paste",(function(e){!o(e)||xe(i,e)||Ha(e,i)||l<=11&&setTimeout(ir(i,(function(){return t.updateFromDOM()})),20)})),pe(r,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),pe(r,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),pe(r,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),pe(r,"touchstart",(function(){return n.forceCompositionEnd()})),pe(r,"input",(function(){t.composing||t.readFromDOMSoon()})),pe(r,"copy",a),pe(r,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=bi(this.cm,!1);return e.focus=N(this.div.ownerDocument)==this.div,e},Ua.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=Va(t,e.anchorNode,e.anchorOffset),l=Va(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=rt(st(a,l),r)||0!=rt(lt(a,l),o)){var s=t.display.view,u=r.line>=t.display.viewFrom&&$a(t,r)||{node:s[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&$a(t,o);if(!c){var d=s[s.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;c={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(u&&c){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=F(u.node,u.offset,c.offset,c.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(u.node,u.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(e){L(this.cm.display.cursorDiv,e.cursors),L(this.cm.display.selectionDiv,e.selection)},Ua.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ua.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return B(this.div,t)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&N(this.div.ownerDocument)==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):nr(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ua.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&c&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=Va(t,e.anchorNode,e.anchorOffset),i=Va(t,e.focusNode,e.focusOffset);n&&i&&nr(t,(function(){io(t.doc,Lr(n,i),$),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>i.firstLine()&&(a=it(a.line-1,Ke(i.doc,a.line-1).length)),l.ch==Ke(i.doc,l.line).text.length&&l.line<i.lastLine()&&(l=it(l.line+1,0)),a.line<r.viewFrom||l.line>r.viewTo-1)return!1;a.line==r.viewFrom||0==(e=fi(i,a.line))?(t=Je(r.view[0].line),n=r.view[0].node):(t=Je(r.view[e].line),n=r.view[e-1].node.nextSibling);var s,u,c=fi(i,l.line);if(c==r.view.length-1?(s=r.viewTo-1,u=r.lineDiv.lastChild):(s=Je(r.view[c+1].line)-1,u=r.view[c+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(function(e,t,n,i,r){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function u(e){return function(t){return t.id==e}}function c(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(c(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(it(i,0),it(r+1,0),u(+f));return void(p.length&&(o=p[0].find(0))&&d(Ze(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var g=0;g<t.childNodes.length;g++)h(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;h(t),t!=n;)t=t.nextSibling,s=!1;return o}(i,n,u,t,s)),h=Ze(i.doc,it(t,0),it(s,Ke(i.doc,s).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),s--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);f<v&&m.charCodeAt(f)==g.charCodeAt(f);)++f;for(var x=Y(d),y=Y(h),b=Math.min(x.length-(1==d.length?f:0),y.length-(1==h.length?f:0));p<b&&x.charCodeAt(x.length-p-1)==y.charCodeAt(y.length-p-1);)++p;if(1==d.length&&1==h.length&&t==a.line)for(;f&&f>a.ch&&x.charCodeAt(x.length-p-1)==y.charCodeAt(y.length-p-1);)f--,p++;d[d.length-1]=x.slice(0,x.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var D=it(t,f),C=it(s,h.length?Y(h).length-p:0);return d.length>1||d[0]||rt(D,C)?(yo(i.doc,d,D,C,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||nr(this.cm,(function(){return pi(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ir(this.cm,za)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Ka=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ka.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var r=this.textarea;function o(e){if(!xe(i,e)){if(i.somethingSelected())Ia({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Pa(i);Ia({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,$):(n.prevInput="",r.value=t.text.join("\n"),z(r))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(r.style.width="0px"),pe(r,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(r,"paste",(function(e){xe(i,e)||Ha(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),pe(r,"cut",o),pe(r,"copy",o),pe(e.scroller,"paste",(function(t){if(!Sn(e,t)&&!xe(i,t)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,r.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Sn(e,t)||Ce(t)})),pe(r,"compositionstart",(function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ka.prototype.createField=function(e){this.wrapper=Wa(),this.textarea=this.wrapper.firstChild},Ka.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ka.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=bi(e);if(e.options.moveInputWithCursor){var r=Zn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},Ka.prototype.showSelection=function(e){var t=this.cm.display;L(t.cursorDiv,e.cursors),L(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ka.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&z(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null));this.resetting=!1}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!x||N(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ka.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ka.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ie(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=n.value;if(r==i&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,u=Math.min(i.length,r.length);s<u&&i.charCodeAt(s)==r.charCodeAt(s);)++s;return nr(t,(function(){za(t,r.slice(s),i.length-s,null,e.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=hi(n,e),u=i.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ir(n,io)(n.doc,Lr(o),$);var c,d=r.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(c=r.ownerDocument.defaultView.scrollY),i.input.focus(),s&&r.ownerDocument.defaultView.scrollTo(null,c),i.input.reset(),n.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&l>=9&&g(),k){Se(e);var m=function(){ge(window,"mouseup",m),setTimeout(v,20)};pe(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=r.selectionStart){var e=n.somethingSelected(),o="​"+(e?r.value:"");r.value="⇚",r.value=o,t.prevInput=e?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,r.style.cssText=d,a&&l<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=u),null!=r.selectionStart)){(!a||a&&l<9)&&g();var e=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==t.prevInput?ir(n,ho)(n):e++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},Ka.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,i,r,o){e.defaults[n]=i,r&&(t[n]=o?function(e,t,n){n!=Fa&&r(e,t,n)}:r)}e.defineOption=n,e.Init=Fa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Or(e)}),!0),n("indentUnit",2,Or,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ir(e),qn(e),pi(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter((function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(it(i,o))}i++}));for(var r=n.length-1;r>=0;r--)yo(e.doc,t,n[r],it(n[r].line,n[r].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Fa&&e.refresh()})),n("specialCharPlaceholder",tn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",x?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!D),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Sa(e),yr(e)}),!0),n("keyMap","default",(function(e,t,n){var i=ea(t),r=n!=Fa&&ea(n);r&&r.detach&&r.detach(e,i),i.attach&&i.attach(e,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ta,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=vr(t,e.options.lineNumbers),yr(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ui(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ui(e)}),!0),n("scrollbarStyle","native",(function(e){Vi(e),Ui(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=vr(e.options.gutters,t),yr(e)}),!0),n("firstLineNumber",1,yr,!0),n("lineNumberFormatter",(function(e){return e}),yr,!0),n("showCursorWhenSelecting",!1,yi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Ei(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,La),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,yi,!0),n("singleCursorHeightPerLine",!0,yi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ir,!0),n("addModeClass",!1,Ir,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ir,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ma),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){R(this).focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,r=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&ir(this,t[e])(this,n,r),ve(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ea(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:rr((function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var i=0,r=n(t);i<e.length&&n(e[i])<=r;)i++;e.splice(i,0,t)}(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,pi(this)})),removeOverlay:rr((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void pi(this)}})),indentLine:rr((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),tt(this.doc,e)&&Na(this,e,t,n)})),indentSelection:rr((function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var r=t[i];if(r.empty())r.head.line>n&&(Na(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&Oi(this));else{var o=r.from(),a=r.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Na(this,s,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[i].from().ch>0&&eo(this.doc,i,new Ar(o,u[i].to()),$)}}})),getTokenAt:function(e,t){return Dt(this,e,t)},getLineTokens:function(e,t){return Dt(this,it(e),t,!0)},getTokenTypeAt:function(e){e=ct(this.doc,e);var t,n=mt(this,Ke(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}i=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var r=n[t],o=this.getModeAt(e);if("string"==typeof o[t])r[o[t]]&&i.push(r[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=r[o[t][a]];l&&i.push(l)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var s=0;s<r._global.length;s++){var u=r._global[s];u.pred(o,this)&&-1==q(i,u.val)&&i.push(u.val)}return i},getStateAfter:function(e,t){var n=this.doc;return gt(this,(e=ut(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Zn(this,null==e?n.head:"object"==typeof e?ct(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,ct(this.doc,e),t||"page")},coordsChar:function(e,t){return Jn(this,(e=Xn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Xn(this,{top:e,left:0},t||"page").top,et(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,r=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,r=!0),i=Ke(this.doc,e)}else i=e;return Vn(this,i,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-Gt(i):0)},defaultTextHeight:function(){return ai(this.display)},defaultCharWidth:function(){return li(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o,a,l,s=this.display,u=(e=Zn(this,ct(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==i)u=e.top;else if("above"==i||"near"==i){var d=Math.max(s.wrapper.clientHeight,this.doc.height),h=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(u=e.bottom),c+t.offsetWidth>h&&(c=h-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==r?(c=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?c=0:"middle"==r&&(c=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),n&&(o=this,a={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(l=Bi(o,a)).scrollTop&&Ri(o,l.scrollTop),null!=l.scrollLeft&&_i(o,l.scrollLeft))},triggerOnKeyDown:rr(pa),triggerOnKeyPress:rr(ga),triggerOnKeyUp:ma,triggerOnMouseDown:rr(ba),execCommand:function(e){if(oa.hasOwnProperty(e))return oa[e].call(null,this)},triggerElectric:rr((function(e){Ra(this,e)})),findPosH:function(e,t,n,i){var r=1;t<0&&(r=-1,t=-t);for(var o=ct(this.doc,e),a=0;a<t&&!(o=ja(this.doc,o,r,n,i)).hitSide;++a);return o},moveH:rr((function(e,t){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?ja(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()}),V)})),deleteH:rr((function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):ta(this,(function(n){var r=ja(i,n.head,e,t,!1);return e<0?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(e,t,n,i){var r=1,o=i;t<0&&(r=-1,t=-t);for(var a=ct(this.doc,e),l=0;l<t;++l){var s=Zn(this,a,"div");if(null==o?o=s.left:s.left=o,(a=qa(this,s,r,n)).hitSide)break}return a},moveV:rr((function(e,t){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var l=Zn(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),r.push(l.left);var s=qa(n,l,e,t);return"page"==t&&a==i.sel.primary()&&Ni(n,Kn(n,s,"div").top-l.top),s}),V),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var r=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var o=t.charAt(n),a=ie(o,r)?function(e){return ie(e,r)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ie(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new Ar(it(e.line,n),it(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?O(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==N(H(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:rr((function(e,t){Ii(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ln(this)-this.display.barHeight,width:e.scrollWidth-Ln(this)-this.display.barWidth,clientHeight:Mn(this),clientWidth:Tn(this)}},scrollIntoView:rr((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:it(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){zi(e),e.curOp.scrollToPos=t}(this,e):Hi(this,e.from,e.to,e.margin)})),setSize:rr((function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&jn(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){mi(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return nr(this,e)},startOperation:function(){return Ki(this)},endOperation:function(){return Zi(this)},refresh:rr((function(){var e=this.display.cachedTextHeight;pi(this),this.curOp.forceUpdate=!0,qn(this),Ii(this,this.doc.scrollLeft,this.doc.scrollTop),fr(this.display),(null==e||Math.abs(e-ai(this.display))>.5||this.options.lineWrapping)&&di(this),ve(this,"refresh",this)})),swapDoc:rr((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Pr(this,e),qn(this),this.display.input.reset(),Ii(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,dn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},De(e),e.registerHelper=function(t,i,r){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=r},e.registerGlobalHelper=function(t,i,r,o){e.registerHelper(t,i,o),n[t]._global.push({pred:r,val:o})}}(Ma);var Za="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Io.prototype)Io.prototype.hasOwnProperty(Ya)&&q(Za,Ya)<0&&(Ma.prototype[Ya]=function(e){return function(){return e.apply(this.doc,arguments)}}(Io.prototype[Ya]));return De(Io),Ma.inputStyles={textarea:Ka,contenteditable:Ua},Ma.defineMode=function(e){Ma.defaults.mode||"null"==e||(Ma.defaults.mode=e),_e.apply(this,arguments)},Ma.defineMIME=function(e,t){Pe[e]=t},Ma.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ma.defineMIME("text/plain","null"),Ma.defineExtension=function(e,t){Ma.prototype[e]=t},Ma.defineDocExtension=function(e,t){Io.prototype[e]=t},Ma.fromTextArea=function(e,t){if((t=t?_(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=N(e.ownerDocument);t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=l.getValue()}var r;if(e.form&&(pe(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=r))}},e.style.display="none";var l=Ma((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l},function(e){e.off=ge,e.on=pe,e.wheelEventPixels=kr,e.Doc=Io,e.splitLines=Oe,e.countColumn=W,e.findColumn=X,e.isWordChar=ne,e.Pass=U,e.signal=ve,e.Line=Kt,e.changeEnd=Tr,e.scrollbarModel=Gi,e.Pos=it,e.cmpPos=rt,e.modes=Re,e.mimeModes=Pe,e.resolveMode=We,e.getMode=je,e.modeExtensions=qe,e.extendMode=Ue,e.copyState=$e,e.startState=Ve,e.innerMode=Ge,e.commands=oa,e.keyMap=Vo,e.keyName=Jo,e.isModifierKey=Yo,e.lookupKey=Zo,e.normalizeKeyMap=Ko,e.StringStream=Xe,e.SharedTextMarker=Mo,e.TextMarker=Lo,e.LineWidget=Fo,e.e_preventDefault=Ce,e.e_stopPropagation=we,e.e_stop=Se,e.addClass=O,e.contains=B,e.rmClass=A,e.keyNames=qo}(Ma),Ma.version="5.65.9",Ma}))},{}],11:[function(e,t,n){var i;i=function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",(function(n,i){var r=0,o={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===r&&(n.code=!1):(r=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==i.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},a={taskLists:!0,strikethrough:!0,emoji:!0};for(var l in i)a[l]=i[l];return a.name="markdown",e.overlayMode(e.getMode(n,a),o)}),"markdown"),e.defineMIME("text/x-gfm","gfm")},"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror"),e("../markdown/markdown"),e("../../addon/mode/overlay")):i(CodeMirror)},{"../../addon/mode/overlay":7,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(e,t,n){var i;i=function(e){"use strict";e.defineMode("markdown",(function(t,n){var i=e.getMode(t,"text/html"),r="null"==i.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(o[a]=n.tokenTypeOverrides[a]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,s=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,c=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(e,t,n){return t.f=t.inline=n,n(e,t)}function v(e,t,n){return t.f=t.block=n,n(e,t)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==b){var n=r;if(!n){var o=e.innerMode(i,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=k,t.block=y,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function y(i,r){var a,h=i.column()===r.indentation,m=!(a=r.prevLine.stream)||!/\S/.test(a.string),v=r.indentedCode,x=r.prevLine.hr,y=!1!==r.list,b=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var w=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,y)){for(r.list=null;w<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=w-r.listStack[r.listStack.length-1])}var k=!(m||x||r.prevLine.header||y&&v||r.prevLine.fencedCodeEnd),S=(!1===r.list||x||m)&&r.indentation<=b&&i.match(l),F=null;if(r.indentationDiff>=4&&(v||r.prevLine.fencedCodeEnd||r.prevLine.header||m))return i.skipToEnd(),r.indentedCode=!0,o.code;if(i.eatSpace())return null;if(h&&r.indentation<=b&&(F=i.match(c))&&F[1].length<=6)return r.quote=0,r.header=F[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,C(r);if(r.indentation<=b&&i.eat(">"))return r.quote=h?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),i.eatSpace(),C(r);if(!S&&!r.setext&&h&&r.indentation<=b&&(F=i.match(s))){var A=F[1]?"ol":"ul";return r.indentation=w+i.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&i.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+A]),C(r)}return h&&r.indentation<=b&&(F=i.match(f,!0))?(r.quote=0,r.fencedEndRE=new RegExp(F[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&function(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}(F[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=D,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,C(r)):r.setext||!(k&&y||r.quote||!1!==r.list||r.code||S||p.test(i.string))&&(F=i.lookAhead(1))&&(F=F.match(d))?(r.setext?(r.header=r.setext,r.setext=0,i.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==F[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,C(r)):S?(i.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,o.hr):"["===i.peek()?g(i,r,E):g(i,r,r.inline)}function b(t,n){var o=i.token(t,n.htmlState);if(!r){var a=e.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=k,n.block=y,n.htmlState=null)}return o}function D(e,t){var i,r=t.listStack[t.listStack.length-1]||0,a=t.indentation<r,l=r+3;return t.fencedEndRE&&t.indentation<=l&&(a||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),a||(i=C(t)),t.localMode=t.localState=null,t.block=y,t.f=k,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,a?v(e,t,t.block):i):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),o.code)}function C(e){var t=[];if(e.formatting){t.push(o.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i<e.formatting.length;i++)t.push(o.formatting+"-"+e.formatting[i]),"header"===e.formatting[i]&&t.push(o.formatting+"-"+e.formatting[i]+"-"+e.header),"quote"===e.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.formatting+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var r=(e.listStack.length-1)%3;r?1===r?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function w(e,t){if(e.match(h,!0))return C(t)}function k(t,r){var a=r.text(t,r);if(void 0!==a)return a;if(r.list)return r.list=null,C(r);if(r.taskList)return" "===t.match(u,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,C(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),C(r);var l=t.next();if(r.linkTitle){r.linkTitle=!1;var s=l;"("===l&&(s=")");var c="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(c),!0))return o.linkHref}if("`"===l){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=r.code||r.quote&&1!=h){if(h==r.code){var f=C(r);return r.code=0,f}return r.formatting=d,C(r)}return r.code=h,C(r)}if(r.code)return C(r);if("\\"===l&&(t.next(),n.highlightFormatting)){var p=C(r),g=o.formatting+"-escape";return p?p+" "+g:g}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),C(r);if("["===l&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),C(r);if("]"===l&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var p=C(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=F,p}if("["===l&&!r.image)return r.linkText&&t.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),C(r);if("]"===l&&r.linkText){n.highlightFormatting&&(r.formatting="link");var p=C(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?F:k,p}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=S,n.highlightFormatting&&(r.formatting="link"),(p=C(r))?p+=" ":p="",p+o.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=S,n.highlightFormatting&&(r.formatting="link"),(p=C(r))?p+=" ":p="",p+o.linkEmail;if(n.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var x=t.string.indexOf(">",t.pos);if(-1!=x){var y=t.string.substring(t.start,x);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(i),v(t,r,b)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===l||"_"===l){for(var D=1,w=1==t.pos?" ":t.string.charAt(t.pos-2);D<3&&t.eat(l);)D++;var A=t.peek()||" ",E=!/\s/.test(A)&&(!m.test(A)||/\s/.test(w)||m.test(w)),L=!/\s/.test(w)&&(!m.test(w)||/\s/.test(A)||m.test(A)),T=null,M=null;if(D%2&&(r.em||!E||"*"!==l&&L&&!m.test(w)?r.em!=l||!L||"*"!==l&&E&&!m.test(A)||(T=!1):T=!0),D>1&&(r.strong||!E||"*"!==l&&L&&!m.test(w)?r.strong!=l||!L||"*"!==l&&E&&!m.test(A)||(M=!1):M=!0),null!=M||null!=T)return n.highlightFormatting&&(r.formatting=null==T?"strong":null==M?"em":"strong em"),!0===T&&(r.em=l),!0===M&&(r.strong=l),f=C(r),!1===T&&(r.em=!1),!1===M&&(r.strong=!1),f}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return C(r);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),f=C(r),r.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),C(r)}else if(" "===l&&t.match("~~",!0)){if(" "===t.peek())return C(r);t.backUp(2)}if(n.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var B=C(r);return r.emoji=!1,B}return" "===l&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),C(r)}function S(e,t){if(">"===e.next()){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link");var i=C(t);return i?i+=" ":i="",i+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function F(e,t){if(e.eatSpace())return null;var i,r=e.next();return"("===r||"["===r?(t.f=t.inline=(i="("===r?")":"]",function(e,t){if(e.next()===i){t.f=t.inline=k,n.highlightFormatting&&(t.formatting="link-string");var r=C(t);return t.linkHref=!1,r}return e.match(A[i]),t.linkHref=!0,C(t)}),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,C(t)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function E(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=L,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,C(t)):g(e,t,k)}function L(e,t){if(e.match("]:",!0)){t.f=t.inline=T,n.highlightFormatting&&(t.formatting="link");var i=C(t);return t.linkText=!1,i}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function T(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),t.f=t.inline=k,o.linkHref+" url")}var M={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:k,text:w,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(i,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=b)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==b?{state:e.htmlState,mode:i}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:M}},indent:function(t,n,r){return t.block==b&&i.indent?i.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},blankLine:x,getType:C,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")},"object"==typeof n&&"object"==typeof t?i(e("../../lib/codemirror"),e("../xml/xml"),e("../meta")):i(CodeMirror)},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(e,t,n){(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.mime==t)return i;if(i.mimes)for(var r=0;r<i.mimes.length;r++)if(i.mimes[r]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.ext)for(var r=0;r<i.ext.length;r++)if(i.ext[r]==t)return i}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.file&&i.file.test(t))return i}var r=t.lastIndexOf("."),o=r>-1&&t.substring(r+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var r=0;r<i.alias.length;r++)if(i.alias[r].toLowerCase()==t)return i}}})("object"==typeof n&&"object"==typeof t?e("../lib/codemirror"):CodeMirror)},{"../lib/codemirror":10}],14:[function(e,t,n){(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(i,r){var o,a,l=i.indentUnit,s={},u=r.htmlMode?t:n;for(var c in u)s[c]=u[c];for(var c in r)s[c]=r[c];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(p(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==i?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n,i,r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=d,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){t.tokenize=d,t.state=y,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(r)?(t.tokenize=(n=r,i=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=h;break}return"string"},i.isInAttribute=!0,i),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=d;break}n.next()}return e}}function p(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=p(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=d;break}return n.tokenize=p(e-1),n.tokenize(t,n)}}return"meta"}}function m(e){return e&&e.toLowerCase()}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function x(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(m(n))||!s.contextGrabbers[m(n)].hasOwnProperty(m(t)))return;v(e)}}function y(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?D:y}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",k):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,0,n)):(a="error",b)}function D(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&s.implicitlyClosed.hasOwnProperty(m(n.context.tagName))&&v(n),n.context&&n.context.tagName==i||!1===s.matchClosing?(a="tag",C):(a="tag error",w)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,0,n)):(a="error",w)}function C(e,t,n){return"endTag"!=e?(a="error",C):(v(n),y)}function w(e,t,n){return a="error",C(e,0,n)}function k(e,t,n){if("word"==e)return a="attribute",S;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(m(i))?x(n,i):(x(n,i),n.context=new g(n,i,r==n.indented)),y}return a="error",k}function S(e,t,n){return"equals"==e?F:(s.allowMissing||(a="error"),k(e,0,n))}function F(e,t,n){return"string"==e?A:"word"==e&&s.allowUnquoted?(a="string",k):(a="error",k(e,0,n))}function A(e,t,n){return"string"==e?A:k(e,0,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!s.implicitlyClosed.hasOwnProperty(m(r.tagName)))break;r=r.prev}else if(o)for(;r;){var a=s.contextGrabbers[m(r.tagName)];if(!a||!a.hasOwnProperty(m(o[2])))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==F&&(e.state=k)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})("object"==typeof n&&"object"==typeof t?e("../../lib/codemirror"):CodeMirror)},{"../../lib/codemirror":10}],15:[function(e,t,n){!function(e,i){"object"==typeof n&&void 0!==t?i(n):i((e="undefined"!=typeof globalThis?globalThis:e||self).marked={})}(this,(function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function i(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function r(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.defaults={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};var o=/[&<>"']/,a=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},c=function(e){return u[e]};function d(e,t){if(t){if(o.test(e))return e.replace(a,c)}else if(l.test(e))return e.replace(s,c);return e}var h=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(e){return e.replace(h,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g;function m(e,t){e="string"==typeof e?e:e.source,t=t||"";var n={replace:function(t,i){return i=(i=i.source||i).replace(p,"$1"),e=e.replace(t,i),n},getRegex:function(){return new RegExp(e,t)}};return n}var g=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(e,t,n){if(e){var i;try{i=decodeURIComponent(f(n)).replace(g,"").toLowerCase()}catch(e){return null}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return null}t&&!v.test(n)&&(n=function(e,t){y[" "+e]||(b.test(e)?y[" "+e]=e+"/":y[" "+e]=F(e,"/",!0));var n=-1===(e=y[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(D,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(C,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}var y={},b=/^[^:]+:\/*[^/]*$/,D=/^([^:]+:)[\s\S]*$/,C=/^([^:]+:\/*[^/]*)[\s\S]*$/;var w={exec:function(){}};function k(e){for(var t,n,i=1;i<arguments.length;i++)for(n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function S(e,t){var n=e.replace(/\|/g,(function(e,t,n){for(var i=!1,r=t;--r>=0&&"\\"===n[r];)i=!i;return i?"|":" |"})).split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(/\\\|/g,"|");return n}function F(e,t,n){var i=e.length;if(0===i)return"";for(var r=0;r<i;){var o=e.charAt(i-r-1);if(o!==t||n){if(o===t||!n)break;r++}else r++}return e.slice(0,i-r)}function A(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function E(e,t){if(t<1)return"";for(var n="";t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function L(e,t,n,i){var r=t.href,o=t.title?d(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){i.state.inLink=!0;var l={type:"link",raw:n,href:r,title:o,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}return{type:"image",raw:n,href:r,title:o,text:d(a)}}var T=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.space=function(e){var t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}},n.code=function(e){var t=this.rules.block.code.exec(e);if(t){var n=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:F(n,"\n")}}},n.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:i}}},n.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var n=t[2].trim();if(/#$/.test(n)){var i=F(n,"#");this.options.pedantic?n=i.trim():i&&!/ $/.test(i)||(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}},n.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},n.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var n=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(n,[]),text:n}}},n.list=function(e){var t=this.rules.block.list.exec(e);if(t){var n,r,o,a,l,s,u,c,d,h,f,p,m=t[1].trim(),g=m.length>1,v={type:"list",raw:"",ordered:g,start:g?+m.slice(0,-1):"",loose:!1,items:[]};m=g?"\\d{1,9}\\"+m.slice(-1):"\\"+m,this.options.pedantic&&(m=g?m:"[*+-]");for(var x=new RegExp("^( {0,3}"+m+")((?:[\t ][^\\n]*)?(?:\\n|$))");e&&(p=!1,t=x.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],d=e.split("\n",1)[0],this.options.pedantic?(a=2,f=c.trimLeft()):(a=(a=t[2].search(/[^ ]/))>4?1:a,f=c.slice(a),a+=t[1].length),s=!1,!c&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),p=!0),!p)for(var y=new RegExp("^ {0,"+Math.min(3,a-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),b=new RegExp("^ {0,"+Math.min(3,a-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),D=new RegExp("^ {0,"+Math.min(3,a-1)+"}(?:```|~~~)"),C=new RegExp("^ {0,"+Math.min(3,a-1)+"}#");e&&(c=h=e.split("\n",1)[0],this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g,"  ")),!D.test(c))&&!C.test(c)&&!y.test(c)&&!b.test(e);){if(c.search(/[^ ]/)>=a||!c.trim())f+="\n"+c.slice(a);else{if(s)break;f+="\n"+c}s||c.trim()||(s=!0),n+=h+"\n",e=e.substring(h.length+1)}v.loose||(u?v.loose=!0:/\n *\n *$/.test(n)&&(u=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f))&&(o="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,"")),v.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:f}),v.raw+=n}v.items[v.items.length-1].raw=n.trimRight(),v.items[v.items.length-1].text=f.trimRight(),v.raw=v.raw.trimRight();var w=v.items.length;for(l=0;l<w;l++){this.lexer.state.top=!1,v.items[l].tokens=this.lexer.blockTokens(v.items[l].text,[]);var k=v.items[l].tokens.filter((function(e){return"space"===e.type})),S=k.every((function(e){for(var t,n=0,r=i(e.raw.split(""));!(t=r()).done;){if("\n"===t.value&&(n+=1),n>1)return!0}return!1}));!v.loose&&k.length&&S&&(v.loose=!0,v.items[l].loose=!0)}return v}},n.html=function(e){var t=this.rules.block.html.exec(e);if(t){var n={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){var i=this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]);n.type="paragraph",n.text=i,n.tokens=this.lexer.inline(i)}return n}},n.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{type:"def",tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},n.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:S(t[1]).map((function(e){return{text:e}})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var i,r,o,a,l=n.align.length;for(i=0;i<l;i++)/^ *-+: *$/.test(n.align[i])?n.align[i]="right":/^ *:-+: *$/.test(n.align[i])?n.align[i]="center":/^ *:-+ *$/.test(n.align[i])?n.align[i]="left":n.align[i]=null;for(l=n.rows.length,i=0;i<l;i++)n.rows[i]=S(n.rows[i],n.header.length).map((function(e){return{text:e}}));for(l=n.header.length,r=0;r<l;r++)n.header[r].tokens=this.lexer.inline(n.header[r].text);for(l=n.rows.length,r=0;r<l;r++)for(a=n.rows[r],o=0;o<a.length;o++)a[o].tokens=this.lexer.inline(a[o].text);return n}}},n.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}},n.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t){var n="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}},n.text=function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}},n.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}},n.tag=function(e){var t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):d(t[0]):t[0]}},n.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=t[2].trim();if(!this.options.pedantic&&/^</.test(n)){if(!/>$/.test(n))return;var i=F(n.slice(0,-1),"\\");if((n.length-i.length)%2==0)return}else{var r=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var n=e.length,i=0,r=0;r<n;r++)if("\\"===e[r])r++;else if(e[r]===t[0])i++;else if(e[r]===t[1]&&--i<0)return r;return-1}(t[2],"()");if(r>-1){var o=(0===t[0].indexOf("!")?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,o).trim(),t[3]=""}}var a=t[2],l="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);s&&(a=s[1],l=s[3])}else l=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(n)?a.slice(1):a.slice(1,-1)),L(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0],this.lexer)}},n.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var i=(n[2]||n[1]).replace(/\s+/g," ");if(!(i=t[i.toLowerCase()])||!i.href){var r=n[0].charAt(0);return{type:"text",raw:r,text:r}}return L(n,i,n[0],this.lexer)}},n.emStrong=function(e,t,n){void 0===n&&(n="");var i=this.rules.inline.emStrong.lDelim.exec(e);if(i&&(!i[3]||!n.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\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90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var r=i[1]||i[2]||"";if(!r||r&&(""===n||this.rules.inline.punctuation.exec(n))){var o,a,l=i[0].length-1,s=l,u=0,c="*"===i[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+l);null!=(i=c.exec(t));)if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6])if(a=o.length,i[3]||i[4])s+=a;else if(!((i[5]||i[6])&&l%3)||(l+a)%3){if(!((s-=a)>0)){if(a=Math.min(a,a+s+u),Math.min(l,a)%2){var d=e.slice(1,l+i.index+a);return{type:"em",raw:e.slice(0,l+i.index+a+1),text:d,tokens:this.lexer.inlineTokens(d)}}var h=e.slice(2,l+i.index+a-1);return{type:"strong",raw:e.slice(0,l+i.index+a+1),text:h,tokens:this.lexer.inlineTokens(h)}}}else u+=a}}},n.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),i=/[^ ]/.test(n),r=/^ /.test(n)&&/ $/.test(n);return i&&r&&(n=n.substring(1,n.length-1)),n=d(n,!0),{type:"codespan",raw:t[0],text:n}}},n.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},n.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}},n.autolink=function(e,t){var n,i,r=this.rules.inline.autolink.exec(e);if(r)return i="@"===r[2]?"mailto:"+(n=d(this.options.mangle?t(r[1]):r[1])):n=d(r[1]),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}},n.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var i,r;if("@"===n[2])r="mailto:"+(i=d(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);i=d(n[0]),r="www."===n[1]?"http://"+i:i}return{type:"link",raw:n[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}},n.inlineText=function(e,t){var n,i=this.rules.inline.text.exec(e);if(i)return n=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):d(i[0]):i[0]:d(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:n}},t}(),M={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:w,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};M.def=m(M.def).replace("label",M._label).replace("title",M._title).getRegex(),M.bullet=/(?:[*+-]|\d{1,9}[.)])/,M.listItemStart=m(/^( *)(bull) */).replace("bull",M.bullet).getRegex(),M.list=m(M.list).replace(/bull/g,M.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+M.def.source+")").getRegex(),M._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",M._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,M.html=m(M.html,"i").replace("comment",M._comment).replace("tag",M._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),M.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.blockquote=m(M.blockquote).replace("paragraph",M.paragraph).getRegex(),M.normal=k({},M),M.gfm=k({},M.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),M.gfm.table=m(M.gfm.table).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.gfm.paragraph=m(M._paragraph).replace("hr",M.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",M.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M._tag).getRegex(),M.pedantic=k({},M.normal,{html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",M._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:w,paragraph:m(M.normal._paragraph).replace("hr",M.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",M.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var B={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:w,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:w,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function N(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function O(e){var t,n,i="",r=e.length;for(t=0;t<r;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),i+="&#"+n+";";return i}B._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",B.punctuation=m(B.punctuation).replace(/punctuation/g,B._punctuation).getRegex(),B.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,B.escapedEmSt=/\\\*|\\_/g,B._comment=m(M._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),B.emStrong.lDelim=m(B.emStrong.lDelim).replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimAst=m(B.emStrong.rDelimAst,"g").replace(/punct/g,B._punctuation).getRegex(),B.emStrong.rDelimUnd=m(B.emStrong.rDelimUnd,"g").replace(/punct/g,B._punctuation).getRegex(),B._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,B._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,B._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,B.autolink=m(B.autolink).replace("scheme",B._scheme).replace("email",B._email).getRegex(),B._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,B.tag=m(B.tag).replace("comment",B._comment).replace("attribute",B._attribute).getRegex(),B._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,B._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,B._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,B.link=m(B.link).replace("label",B._label).replace("href",B._href).replace("title",B._title).getRegex(),B.reflink=m(B.reflink).replace("label",B._label).replace("ref",M._label).getRegex(),B.nolink=m(B.nolink).replace("ref",M._label).getRegex(),B.reflinkSearch=m(B.reflinkSearch,"g").replace("reflink",B.reflink).replace("nolink",B.nolink).getRegex(),B.normal=k({},B),B.pedantic=k({},B.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:m(/^!?\[(label)\]\((.*?)\)/).replace("label",B._label).getRegex(),reflink:m(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",B._label).getRegex()}),B.gfm=k({},B.normal,{escape:m(B.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),B.gfm.url=m(B.gfm.url,"i").replace("email",B.gfm._extended_email).getRegex(),B.breaks=k({},B.gfm,{br:m(B.br).replace("{2,}","*").getRegex(),text:m(B.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var I=function(){function n(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new T,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var n={block:M.normal,inline:B.normal};this.options.pedantic?(n.block=M.pedantic,n.inline=B.pedantic):this.options.gfm&&(n.block=M.gfm,this.options.breaks?n.inline=B.breaks:n.inline=B.gfm),this.tokenizer.rules=n}n.lex=function(e,t){return new n(t).lex(e)},n.lexInline=function(e,t){return new n(t).inlineTokens(e)};var i,r,o,a=n.prototype;return a.lex=function(e){var t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens},a.blockTokens=function(e,t){var n,i,r,o,a=this;for(void 0===t&&(t=[]),e=this.options.pedantic?e.replace(/\t/g,"    ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(function(e,t,n){return t+"    ".repeat(n.length)}));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((function(i){return!!(n=i.call({lexer:a},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),!(i=t[t.length-1])||"paragraph"!==i.type&&"text"!==i.type?t.push(n):(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),!(i=t[t.length-1])||"paragraph"!==i.type&&"text"!==i.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(i.raw+="\n"+n.raw,i.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(r=e,this.options.extensions&&this.options.extensions.startBlock&&function(){var t=1/0,n=e.slice(1),i=void 0;a.options.extensions.startBlock.forEach((function(e){"number"==typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),this.state.top&&(n=this.tokenizer.paragraph(r)))i=t[t.length-1],o&&"paragraph"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n),o=r.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),(i=t[t.length-1])&&"text"===i.type?(i.raw+="\n"+n.raw,i.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):t.push(n);else if(e){var l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}return this.state.top=!0,t},a.inline=function(e,t){return void 0===t&&(t=[]),this.inlineQueue.push({src:e,tokens:t}),t},a.inlineTokens=function(e,t){var n,i,r,o=this;void 0===t&&(t=[]);var a,l,s,u=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(u));)c.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,a.index)+"["+E("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,a.index)+"["+E("a",a[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(u));)u=u.slice(0,a.index)+"++"+u.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(l||(s=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((function(i){return!!(n=i.call({lexer:o},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)}))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),(i=t[t.length-1])&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),(i=t[t.length-1])&&"text"===n.type&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,u,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,O))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,O))){if(r=e,this.options.extensions&&this.options.extensions.startInline&&function(){var t=1/0,n=e.slice(1),i=void 0;o.options.extensions.startInline.forEach((function(e){"number"==typeof(i=e.call({lexer:this},n))&&i>=0&&(t=Math.min(t,i))})),t<1/0&&t>=0&&(r=e.substring(0,t+1))}(),n=this.tokenizer.inlineText(r,N))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),l=!0,(i=t[t.length-1])&&"text"===i.type?(i.raw+=n.raw,i.text+=n.text):t.push(n);else if(e){var d="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(d);break}throw new Error(d)}}else e=e.substring(n.raw.length),t.push(n);return t},i=n,o=[{key:"rules",get:function(){return{block:M,inline:B}}}],(r=null)&&t(i.prototype,r),o&&t(i,o),Object.defineProperty(i,"prototype",{writable:!1}),n}(),z=function(){function t(t){this.options=t||e.defaults}var n=t.prototype;return n.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];if(this.options.highlight){var r=this.options.highlight(e,i);null!=r&&r!==e&&(n=!0,e=r)}return e=e.replace(/\n$/,"")+"\n",i?'<pre><code class="'+this.options.langPrefix+d(i,!0)+'">'+(n?e:d(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:d(e,!0))+"</code></pre>\n"},n.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.html=function(e){return e},n.heading=function(e,t,n,i){return this.options.headerIds?"<h"+t+' id="'+(this.options.headerPrefix+i.slug(n))+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},n.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.list=function(e,t,n){var i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+i+">\n"},n.listitem=function(e){return"<li>"+e+"</li>\n"},n.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},n.paragraph=function(e){return"<p>"+e+"</p>\n"},n.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},n.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"</"+n+">\n"},n.strong=function(e){return"<strong>"+e+"</strong>"},n.em=function(e){return"<em>"+e+"</em>"},n.codespan=function(e){return"<code>"+e+"</code>"},n.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.del=function(e){return"<del>"+e+"</del>"},n.link=function(e,t,n){if(null===(e=x(this.options.sanitize,this.options.baseUrl,e)))return n;var i='<a href="'+d(e)+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},n.image=function(e,t,n){if(null===(e=x(this.options.sanitize,this.options.baseUrl,e)))return n;var i='<img src="'+e+'" alt="'+n+'"';return t&&(i+=' title="'+t+'"'),i+=this.options.xhtml?"/>":">"},n.text=function(e){return e},t}(),H=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),R=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var n=e,i=0;if(this.seen.hasOwnProperty(n)){i=this.seen[e];do{n=e+"-"+ ++i}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=i,this.seen[n]=0),n},t.slug=function(e,t){void 0===t&&(t={});var n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)},e}(),P=function(){function t(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new H,this.slugger=new R}t.parse=function(e,n){return new t(n).parse(e)},t.parseInline=function(e,n){return new t(n).parseInline(e)};var n=t.prototype;return n.parse=function(e,t){void 0===t&&(t=!0);var n,i,r,o,a,l,s,u,c,d,h,p,m,g,v,x,y,b,D,C="",w=e.length;for(n=0;n<w;n++)if(d=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type])||!1===(D=this.options.extensions.renderers[d.type].call({parser:this},d))&&["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type))switch(d.type){case"space":continue;case"hr":C+=this.renderer.hr();continue;case"heading":C+=this.renderer.heading(this.parseInline(d.tokens),d.depth,f(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":C+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(u="",s="",o=d.header.length,i=0;i<o;i++)s+=this.renderer.tablecell(this.parseInline(d.header[i].tokens),{header:!0,align:d.align[i]});for(u+=this.renderer.tablerow(s),c="",o=d.rows.length,i=0;i<o;i++){for(s="",a=(l=d.rows[i]).length,r=0;r<a;r++)s+=this.renderer.tablecell(this.parseInline(l[r].tokens),{header:!1,align:d.align[r]});c+=this.renderer.tablerow(s)}C+=this.renderer.table(u,c);continue;case"blockquote":c=this.parse(d.tokens),C+=this.renderer.blockquote(c);continue;case"list":for(h=d.ordered,p=d.start,m=d.loose,o=d.items.length,c="",i=0;i<o;i++)x=(v=d.items[i]).checked,y=v.task,g="",v.task&&(b=this.renderer.checkbox(x),m?v.tokens.length>0&&"paragraph"===v.tokens[0].type?(v.tokens[0].text=b+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=b+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(v.tokens,m),c+=this.renderer.listitem(g,y,x);C+=this.renderer.list(c,h,p);continue;case"html":C+=this.renderer.html(d.text);continue;case"paragraph":C+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(c=d.tokens?this.parseInline(d.tokens):d.text;n+1<w&&"text"===e[n+1].type;)c+="\n"+((d=e[++n]).tokens?this.parseInline(d.tokens):d.text);C+=t?this.renderer.paragraph(c):c;continue;default:var k='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(k);throw new Error(k)}else C+=D||"";return C},n.parseInline=function(e,t){t=t||this.renderer;var n,i,r,o="",a=e.length;for(n=0;n<a;n++)if(i=e[n],!(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type])||!1===(r=this.options.extensions.renderers[i.type].call({parser:this},i))&&["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type))switch(i.type){case"escape":case"text":o+=t.text(i.text);break;case"html":o+=t.html(i.text);break;case"link":o+=t.link(i.href,i.title,this.parseInline(i.tokens,t));break;case"image":o+=t.image(i.href,i.title,i.text);break;case"strong":o+=t.strong(this.parseInline(i.tokens,t));break;case"em":o+=t.em(this.parseInline(i.tokens,t));break;case"codespan":o+=t.codespan(i.text);break;case"br":o+=t.br();break;case"del":o+=t.del(this.parseInline(i.tokens,t));break;default:var l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return void console.error(l);throw new Error(l)}else o+=r||"";return o},t}();function _(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),A(t=k({},_.defaults,t||{})),n){var i,r=t.highlight;try{i=I.lex(e,t)}catch(e){return n(e)}var o=function(e){var o;if(!e)try{t.walkTokens&&_.walkTokens(i,t.walkTokens),o=P.parse(i,t)}catch(t){e=t}return t.highlight=r,e?n(e):n(null,o)};if(!r||r.length<3)return o();if(delete t.highlight,!i.length)return o();var a=0;return _.walkTokens(i,(function(e){"code"===e.type&&(a++,setTimeout((function(){r(e.text,e.lang,(function(t,n){if(t)return o(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),0===--a&&o()}))}),0))})),void(0===a&&o())}function l(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}try{var s=I.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_.walkTokens(s,t.walkTokens)).then((function(){return P.parse(s,t)})).catch(l);_.walkTokens(s,t.walkTokens)}return P.parse(s,t)}catch(e){l(e)}}_.options=_.setOptions=function(t){var n;return k(_.defaults,t),n=_.defaults,e.defaults=n,_},_.getDefaults=r,_.defaults=e.defaults,_.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i,r=k.apply(void 0,[{}].concat(t)),o=_.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((function(e){if(e.extensions&&(i=!0,e.extensions.forEach((function(e){if(!e.name)throw new Error("extension name required");if(e.renderer){var t=o.renderers?o.renderers[e.name]:null;o.renderers[e.name]=t?function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];var o=e.renderer.apply(this,i);return!1===o&&(o=t.apply(this,i)),o}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");o[e.level]?o[e.level].unshift(e.tokenizer):o[e.level]=[e.tokenizer],e.start&&("block"===e.level?o.startBlock?o.startBlock.push(e.start):o.startBlock=[e.start]:"inline"===e.level&&(o.startInline?o.startInline.push(e.start):o.startInline=[e.start]))}e.childTokens&&(o.childTokens[e.name]=e.childTokens)}))),e.renderer&&function(){var t=_.defaults.renderer||new z,n=function(n){var i=t[n];t[n]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var l=e.renderer[n].apply(t,o);return!1===l&&(l=i.apply(t,o)),l}};for(var i in e.renderer)n(i);r.renderer=t}(),e.tokenizer&&function(){var t=_.defaults.tokenizer||new T,n=function(n){var i=t[n];t[n]=function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var l=e.tokenizer[n].apply(t,o);return!1===l&&(l=i.apply(t,o)),l}};for(var i in e.tokenizer)n(i);r.tokenizer=t}(),e.walkTokens){var t=_.defaults.walkTokens;r.walkTokens=function(n){var i=[];return i.push(e.walkTokens.call(this,n)),t&&(i=i.concat(t.call(this,n))),i}}i&&(r.extensions=o),_.setOptions(r)}))},_.walkTokens=function(e,t){for(var n,r=[],o=function(){var e=n.value;switch(r=r.concat(t.call(_,e)),e.type){case"table":for(var o,a=i(e.header);!(o=a()).done;){var l=o.value;r=r.concat(_.walkTokens(l.tokens,t))}for(var s,u=i(e.rows);!(s=u()).done;)for(var c,d=i(s.value);!(c=d()).done;){var h=c.value;r=r.concat(_.walkTokens(h.tokens,t))}break;case"list":r=r.concat(_.walkTokens(e.items,t));break;default:_.defaults.extensions&&_.defaults.extensions.childTokens&&_.defaults.extensions.childTokens[e.type]?_.defaults.extensions.childTokens[e.type].forEach((function(n){r=r.concat(_.walkTokens(e[n],t))})):e.tokens&&(r=r.concat(_.walkTokens(e.tokens,t)))}},a=i(e);!(n=a()).done;)o();return r},_.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");A(t=k({},_.defaults,t||{}));try{var n=I.lexInline(e,t);return t.walkTokens&&_.walkTokens(n,t.walkTokens),P.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+d(e.message+"",!0)+"</pre>";throw e}},_.Parser=P,_.parser=P.parse,_.Renderer=z,_.TextRenderer=H,_.Lexer=I,_.lexer=I.lex,_.Tokenizer=T,_.Slugger=R,_.parse=_;var W=_.options,j=_.setOptions,q=_.use,U=_.walkTokens,$=_.parseInline,G=_,V=P.parse,X=I.lex;e.Lexer=I,e.Parser=P,e.Renderer=z,e.Slugger=R,e.TextRenderer=H,e.Tokenizer=T,e.getDefaults=r,e.lexer=X,e.marked=_,e.options=W,e.parse=G,e.parseInline=$,e.parser=V,e.setOptions=j,e.use=q,e.walkTokens=U,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],16:[function(e,t,n){(function(n){(function(){var i;!function(){"use strict";(i=function(e,t,i,r){r=r||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=r.flags||{},this.memoized={},this.loaded=!1;var o,a,l,s,u,c=this;function d(e,t){var n=c._readFile(e,null,r.asyncLoad);r.asyncLoad?n.then((function(e){t(e)})):t(n)}function h(e){t=e,i&&p()}function f(e){i=e,t&&p()}function p(){for(c.rules=c._parseAFF(t),c.compoundRuleCodes={},a=0,s=c.compoundRules.length;a<s;a++){var e=c.compoundRules[a];for(l=0,u=e.length;l<u;l++)c.compoundRuleCodes[e[l]]=[]}for(a in"ONLYINCOMPOUND"in c.flags&&(c.compoundRuleCodes[c.flags.ONLYINCOMPOUND]=[]),c.dictionaryTable=c._parseDIC(i),c.compoundRuleCodes)0===c.compoundRuleCodes[a].length&&delete c.compoundRuleCodes[a];for(a=0,s=c.compoundRules.length;a<s;a++){var n=c.compoundRules[a],o="";for(l=0,u=n.length;l<u;l++){var d=n[l];d in c.compoundRuleCodes?o+="("+c.compoundRuleCodes[d].join("|")+")":o+=d}c.compoundRules[a]=new RegExp(o,"i")}c.loaded=!0,r.asyncLoad&&r.loadedCallback&&r.loadedCallback(c)}return e&&(c.dictionary=e,t&&i?p():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(o=r.dictionaryPath?r.dictionaryPath:"typo/dictionaries",t||d(chrome.extension.getURL(o+"/"+e+"/"+e+".aff"),h),i||d(chrome.extension.getURL(o+"/"+e+"/"+e+".dic"),f)):(o=r.dictionaryPath?r.dictionaryPath:void 0!==n?n+"/dictionaries":"./dictionaries",t||d(o+"/"+e+"/"+e+".aff",h),i||d(o+"/"+e+"/"+e+".dic",f))),this}).prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(t,n,i){if(n=n||"utf8","undefined"!=typeof XMLHttpRequest){var r,o=new XMLHttpRequest;return o.open("GET",t,i),i&&(r=new Promise((function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}}))),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+n),o.send(null),i?r:o.responseText}if(void 0!==e){var a=e("fs");try{if(a.existsSync(t))return a.readFileSync(t,n);console.log("Path "+t+" does not exist.")}catch(e){return console.log(e),""}}},_parseAFF:function(e){var t,n,i,r,o,a,l,s={},u=e.split(/\r?\n/);for(r=0,a=u.length;r<a;r++)if(t=(t=this._removeAffixComments(u[r])).trim()){var c=t.split(/\s+/),d=c[0];if("PFX"==d||"SFX"==d){var h=c[1],f=c[2],p=[];for(o=r+1,l=r+1+(n=parseInt(c[3],10));o<l;o++){var m=(i=u[o].split(/\s+/))[2],g=i[3].split("/"),v=g[0];"0"===v&&(v="");var x=this.parseRuleCodes(g[1]),y=i[4],b={};b.add=v,x.length>0&&(b.continuationClasses=x),"."!==y&&(b.match="SFX"===d?new RegExp(y+"$"):new RegExp("^"+y)),"0"!=m&&(b.remove="SFX"===d?new RegExp(m+"$"):m),p.push(b)}s[h]={type:d,combineable:"Y"==f,entries:p},r+=n}else if("COMPOUNDRULE"===d){for(o=r+1,l=r+1+(n=parseInt(c[1],10));o<l;o++)i=(t=u[o]).split(/\s+/),this.compoundRules.push(i[1]);r+=n}else"REP"===d?3===(i=t.split(/\s+/)).length&&this.replacementTable.push([i[1],i[2]]):this.flags[d]=c[1]}return s},_removeAffixComments:function(e){return e.match(/^\s*#/,"")?"":e},_parseDIC:function(e){var t=(e=this._removeDicComments(e)).split(/\r?\n/),n={};function i(e,t){n.hasOwnProperty(e)||(n[e]=null),t.length>0&&(null===n[e]&&(n[e]=[]),n[e].push(t))}for(var r=1,o=t.length;r<o;r++){var a=t[r];if(a){var l=a.split("/",2),s=l[0];if(l.length>1){var u=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=u.indexOf(this.flags.NEEDAFFIX)||i(s,u);for(var c=0,d=u.length;c<d;c++){var h=u[c],f=this.rules[h];if(f)for(var p=this._applyRule(s,f),m=0,g=p.length;m<g;m++){var v=p[m];if(i(v,[]),f.combineable)for(var x=c+1;x<d;x++){var y=u[x],b=this.rules[y];if(b&&b.combineable&&f.type!=b.type)for(var D=this._applyRule(v,b),C=0,w=D.length;C<w;C++){i(D[C],[])}}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}else i(s.trim(),[])}}return n},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(e){if("FLAG"in this.flags){if("long"===this.flags.FLAG){for(var t=[],n=0,i=e.length;n<i;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?e.split(","):"UTF-8"===this.flags.FLAG?Array.from(e):e.split("")}return e.split("")}return[]},_applyRule:function(e,t){for(var n=t.entries,i=[],r=0,o=n.length;r<o;r++){var a=n[r];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,i.push(l),"continuationClasses"in a)for(var s=0,u=a.continuationClasses.length;s<u;s++){var c=this.rules[a.continuationClasses[s]];c&&(i=i.concat(this._applyRule(l,c)))}}}return i},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0;if(this.checkExact(t.toLowerCase()))return!0}var i=t[0].toLowerCase()+t.substring(1);if(i!==t){if(this.hasFlag(i,"KEEPCASE"))return!1;if(this.checkExact(i))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,n,i=this.dictionaryTable[e];if(void 0===i){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t<n;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===i)return!0;if("object"==typeof i)for(t=0,n=i.length;t<n;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",i[t]))return!0}return!1},hasFlag:function(e,t,n){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||(void 0===n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[e])),!n||-1===n.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var n=this.memoized[e].limit;if(t<=n||this.memoized[e].suggestions.length<n)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var i=0,r=this.replacementTable.length;i<r;i++){var o=this.replacementTable[i];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var l=this;function s(e,t){var n,i,r,o,a={},s=l.alphabet.length;if("string"==typeof e){var u=e;(e={})[u]=!0}for(var u in e)for(n=0,r=u.length+1;n<r;n++){var c=[u.substring(0,n),u.substring(n)];if(c[1]&&(o=c[0]+c[1].substring(1),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)),c[1].length>1&&c[1][1]!==c[1][0]&&(o=c[0]+c[1][1]+c[1][0]+c[1].substring(2),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)),c[1]){var d=c[1].substring(0,1).toUpperCase()===c[1].substring(0,1)?"uppercase":"lowercase";for(i=0;i<s;i++){var h=l.alphabet[i];"uppercase"===d&&(h=h.toUpperCase()),h!=c[1].substring(0,1)&&(o=c[0]+h+c[1].substring(1),t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1))}}if(c[1])for(i=0;i<s;i++){d=c[0].substring(-1).toUpperCase()===c[0].substring(-1)&&c[1].substring(0,1).toUpperCase()===c[1].substring(0,1)?"uppercase":"lowercase",h=l.alphabet[i];"uppercase"===d&&(h=h.toUpperCase()),o=c[0]+h+c[1],t&&!l.check(o)||(o in a?a[o]+=1:a[o]=1)}}return a}return l.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){var n,i=s(e),r=s(i,!0);for(var o in i)l.check(o)&&(o in r?r[o]+=i[o]:r[o]=i[o]);var a=[];for(n in r)r.hasOwnProperty(n)&&a.push([n,r[n]]);a.sort((function(e,t){var n=e[1],i=t[1];return n<i?-1:n>i?1:t[0].localeCompare(e[0])})).reverse();var u=[],c="lowercase";e.toUpperCase()===e?c="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(c="capitalized");var d=t;for(n=0;n<Math.min(d,a.length);n++)"uppercase"===c?a[n][0]=a[n][0].toUpperCase():"capitalized"===c&&(a[n][0]=a[n][0].substr(0,1).toUpperCase()+a[n][0].substr(1)),l.hasFlag(a[n][0],"NOSUGGEST")||-1!=u.indexOf(a[n][0])?d++:u.push(a[n][0]);return u}(e),limit:t},this.memoized[e].suggestions}}}(),void 0!==t&&(t.exports=i)}).call(this)}).call(this,"/node_modules/typo-js")},{fs:1}],17:[function(e,t,n){var i=e("codemirror");i.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}},i.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var n=Array(e.options.tabSize+1).join(" ");e.replaceSelection(n)}}},{codemirror:10}],18:[function(e,t,n){"use strict";var i=e("codemirror");e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/display/autorefresh.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/addon/search/searchcursor.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js");var r=e("codemirror-spell-checker"),o=e("marked").marked,a=/Mac/.test(navigator.platform),l=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),s={toggleBold:x,toggleItalic:y,drawLink:O,toggleHeadingSmaller:w,toggleHeadingBigger:k,drawImage:I,toggleBlockquote:C,toggleOrderedList:B,toggleUnorderedList:M,toggleCodeBlock:D,togglePreview:U,toggleStrikethrough:b,toggleHeading1:S,toggleHeading2:F,toggleHeading3:A,toggleHeading4:E,toggleHeading5:L,toggleHeading6:T,cleanBlock:N,drawTable:P,drawHorizontalRule:_,undo:W,redo:j,toggleSideBySide:q,toggleFullScreen:v},u={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},c=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))&&(t=!0),t};function d(e){return e=a?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function h(e,t,n,i){var r=f(e,!1,t,n,"button",i);r.classList.add("easymde-dropdown"),r.onclick=function(){r.focus()};var o=document.createElement("div");o.className="easymde-dropdown-content";for(var a=0;a<e.children.length;a++){var l,s=e.children[a];(l=f("string"==typeof s&&s in te?te[s]:s,!0,t,n,"button",i)).addEventListener("click",(function(e){e.stopPropagation()}),!1),o.appendChild(l)}return r.appendChild(o),r}function f(e,t,n,i,r,o){e=e||{};var l=document.createElement(r);if(e.attributes)for(var u in e.attributes)Object.prototype.hasOwnProperty.call(e.attributes,u)&&l.setAttribute(u,e.attributes[u]);var c=o.options.toolbarButtonClassPrefix?o.options.toolbarButtonClassPrefix+"-":"";l.className=c+e.name,l.setAttribute("type",r),n=null==n||n,e.text&&(l.innerText=e.text),e.name&&e.name in i&&(s[e.name]=e.action),e.title&&n&&(l.title=function(e,t,n){var i,r=e;t&&n[i=function(e){for(var t in s)if(s[t]===e)return t;return null}(t)]&&(r+=" ("+d(n[i])+")");return r}(e.title,e.action,i),a&&(l.title=l.title.replace("Ctrl","⌘"),l.title=l.title.replace("Alt","⌥"))),e.title&&l.setAttribute("aria-label",e.title),e.noDisable&&l.classList.add("no-disable"),e.noMobile&&l.classList.add("no-mobile");var h=[];void 0!==e.className&&(h=e.className.split(" "));for(var f=[],p=0;p<h.length;p++){var m=h[p];m.match(/^fa([srlb]|(-[\w-]*)|$)/)?f.push(m):l.classList.add(m)}if(l.tabIndex=-1,f.length>0){for(var g=document.createElement("i"),v=0;v<f.length;v++){var x=f[v];g.classList.add(x)}l.appendChild(g)}return void 0!==e.icon&&(l.innerHTML=e.icon),e.action&&t&&("function"==typeof e.action?l.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(l.onclick=function(t){t.preventDefault(),window.open(e.action,"_blank")})),l}function p(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function m(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var i,r,o=n.type.split(" "),a={},l=0;l<o.length;l++)"strong"===(i=o[l])?a.bold=!0:"variable-2"===i?(r=e.getLine(t.line),/^\s*\d+\.\s/.test(r)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===i?a.quote=!0:"em"===i?a.italic=!0:"quote"===i?a.quote=!0:"strikethrough"===i?a.strikethrough=!0:"comment"===i?a.code=!0:"link"!==i||a.image?"image"===i?a.image=!0:i.match(/^header(-[1-6])?$/)&&(a[i.replace("header","heading")]=!0):a.link=!0;return a}var g="";function v(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(g=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=g;var n=t.getWrapperElement(),i=n.nextSibling;if(i.classList.contains("editor-preview-active-side"))if(!1===e.options.sideBySideFullscreen){var r=n.parentNode;t.getOption("fullScreen")?r.classList.remove("sided--no-fullscreen"):r.classList.add("sided--no-fullscreen")}else q(e);(e.options.onToggleFullScreen&&e.options.onToggleFullScreen(t.getOption("fullScreen")||!1),void 0!==e.options.maxHeight&&(t.getOption("fullScreen")?(t.getScrollerElement().style.removeProperty("height"),i.style.removeProperty("height")):(t.getScrollerElement().style.height=e.options.maxHeight,e.setPreviewMaxHeight())),e.toolbar_div.classList.toggle("fullscreen"),e.toolbarElements&&e.toolbarElements.fullscreen)&&e.toolbarElements.fullscreen.classList.toggle("active")}function x(e){K(e,"bold",e.options.blockStyles.bold)}function y(e){K(e,"italic",e.options.blockStyles.italic)}function b(e){K(e,"strikethrough","~~")}function D(e){var t=e.options.blockStyles.code;function n(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text).  Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function i(e){return e.state.base.base||e.state.base}function r(e,t,r,o,a){r=r||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!r.text&&e.getTokenAt({line:t,ch:r.text.length-1});var l=o.type?o.type.split(" "):[];return a&&i(a).indentedCode?"indented":-1!==l.indexOf("comment")&&(i(o).fencedChars||i(a).fencedChars||n(r)?"fenced":"single")}var o,a,l,s=e.codemirror,u=s.getCursor("start"),c=s.getCursor("end"),d=s.getTokenAt({line:u.line,ch:u.ch||1}),h=s.getLineHandle(u.line),f=r(s,u.line,h,d);if("single"===f){var p=h.text.slice(0,u.ch).replace("`",""),m=h.text.slice(u.ch).replace("`","");s.replaceRange(p+m,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),u.ch--,u!==c&&c.ch--,s.setSelection(u,c),s.focus()}else if("fenced"===f)if(u.line!==c.line||u.ch!==c.ch){for(o=u.line;o>=0&&!n(h=s.getLineHandle(o));o--);var g,v,x,y,b=i(s.getTokenAt({line:o,ch:1})).fencedChars;n(s.getLineHandle(u.line))?(g="",v=u.line):n(s.getLineHandle(u.line-1))?(g="",v=u.line-1):(g=b+"\n",v=u.line),n(s.getLineHandle(c.line))?(x="",y=c.line,0===c.ch&&(y+=1)):0!==c.ch&&n(s.getLineHandle(c.line+1))?(x="",y=c.line+1):(x=b+"\n",y=c.line+1),0===c.ch&&(y-=1),s.operation((function(){s.replaceRange(x,{line:y,ch:0},{line:y+(x?0:1),ch:0}),s.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})})),s.setSelection({line:v+(g?1:0),ch:0},{line:y+(g?1:-1),ch:0}),s.focus()}else{var D=u.line;if(n(s.getLineHandle(u.line))&&("fenced"===r(s,u.line+1)?(o=u.line,D=u.line+1):(a=u.line,D=u.line-1)),void 0===o)for(o=D;o>=0&&!n(h=s.getLineHandle(o));o--);if(void 0===a)for(l=s.lineCount(),a=D;a<l&&!n(h=s.getLineHandle(a));a++);s.operation((function(){s.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),s.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),s.focus()}else if("indented"===f){if(u.line!==c.line||u.ch!==c.ch)o=u.line,a=c.line,0===c.ch&&a--;else{for(o=u.line;o>=0;o--)if(!(h=s.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==r(s,o,h)){o+=1;break}for(l=s.lineCount(),a=u.line;a<l;a++)if(!(h=s.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==r(s,a,h)){a-=1;break}}var C=s.getLineHandle(a+1),w=C&&s.getTokenAt({line:a+1,ch:C.text.length-1});w&&i(w).indentedCode&&s.replaceRange("\n",{line:a+1,ch:0});for(var k=o;k<=a;k++)s.indentLine(k,"subtract");s.focus()}else{var S=u.line===c.line&&u.ch===c.ch&&0===u.ch,F=u.line!==c.line;S||F?function(e,t,n,i){var r=t.line+1,o=n.line+1,a=t.line!==n.line,l=i+"\n",s="\n"+i;a&&o++,a&&0===n.ch&&(s=i+"\n",o--),$(e,!1,[l,s]),e.setSelection({line:r,ch:0},{line:o,ch:0})}(s,u,c,t):$(s,!1,["`","`"])}}function C(e){V(e.codemirror,"quote")}function w(e){G(e.codemirror,"smaller")}function k(e){G(e.codemirror,"bigger")}function S(e){G(e.codemirror,void 0,1)}function F(e){G(e.codemirror,void 0,2)}function A(e){G(e.codemirror,void 0,3)}function E(e){G(e.codemirror,void 0,4)}function L(e){G(e.codemirror,void 0,5)}function T(e){G(e.codemirror,void 0,6)}function M(e){var t=e.codemirror,n="*";["-","+","*"].includes(e.options.unorderedListStyle)&&(n=e.options.unorderedListStyle),V(t,"unordered-list",n)}function B(e){V(e.codemirror,"ordered-list")}function N(e){!function(e){if(e.getWrapperElement().lastChild.classList.contains("editor-preview-active"))return;for(var t,n=e.getCursor("start"),i=e.getCursor("end"),r=n.line;r<=i.line;r++)t=(t=e.getLine(r)).replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:r,ch:0},{line:r,ch:99999999999999})}(e.codemirror)}function O(e){var t=e.options,n="https://";if(t.promptURLs){var i=prompt(t.promptTexts.link,n);if(!i)return!1;n=z(i)}X(e,"link",t.insertTexts.link,n)}function I(e){var t=e.options,n="https://";if(t.promptURLs){var i=prompt(t.promptTexts.image,n);if(!i)return!1;n=z(i)}X(e,"image",t.insertTexts.image,n)}function z(e){return encodeURI(e).replace(/([\\()])/g,"\\$1")}function H(e){e.openBrowseFileWindow()}function R(e,t){var n=e.codemirror,i=m(n),r=e.options,o=t.substr(t.lastIndexOf("/")+1),a=o.substring(o.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(a))$(n,i.image,r.insertTexts.uploadedImage,t);else{var l=r.insertTexts.link;l[0]="["+o,$(n,i.link,l,t)}e.updateStatusBar("upload-image",e.options.imageTexts.sbOnUploaded.replace("#image_name#",o)),setTimeout((function(){e.updateStatusBar("upload-image",e.options.imageTexts.sbInit)}),1e3)}function P(e){var t=e.codemirror,n=m(t),i=e.options;$(t,n.table,i.insertTexts.table)}function _(e){var t=e.codemirror,n=m(t),i=e.options;$(t,n.image,i.insertTexts.horizontalRule)}function W(e){var t=e.codemirror;t.undo(),t.focus()}function j(e){var t=e.codemirror;t.redo(),t.focus()}function q(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.nextSibling,r=e.toolbarElements&&e.toolbarElements["side-by-side"],o=!1,a=n.parentNode;i.classList.contains("editor-preview-active-side")?(!1===e.options.sideBySideFullscreen&&a.classList.remove("sided--no-fullscreen"),i.classList.remove("editor-preview-active-side"),r&&r.classList.remove("active"),n.classList.remove("CodeMirror-sided")):(setTimeout((function(){t.getOption("fullScreen")||(!1===e.options.sideBySideFullscreen?a.classList.add("sided--no-fullscreen"):v(e)),i.classList.add("editor-preview-active-side")}),1),r&&r.classList.add("active"),n.classList.add("CodeMirror-sided"),o=!0);var l=n.lastChild;if(l.classList.contains("editor-preview-active")){l.classList.remove("editor-preview-active");var s=e.toolbarElements.preview,u=e.toolbar_div;s.classList.remove("active"),u.classList.remove("disabled-for-preview")}if(t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){var t=e.options.previewRender(e.value(),i);null!=t&&(i.innerHTML=t)}),o){var c=e.options.previewRender(e.value(),i);null!=c&&(i.innerHTML=c),t.on("update",t.sideBySideRenderingFunction)}else t.off("update",t.sideBySideRenderingFunction);t.refresh()}function U(e){var t=e.codemirror,n=t.getWrapperElement(),i=e.toolbar_div,r=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;if(t.getWrapperElement().nextSibling.classList.contains("editor-preview-active-side")&&q(e),!o||!o.classList.contains("editor-preview-full")){if((o=document.createElement("div")).className="editor-preview-full",e.options.previewClass)if(Array.isArray(e.options.previewClass))for(var a=0;a<e.options.previewClass.length;a++)o.classList.add(e.options.previewClass[a]);else"string"==typeof e.options.previewClass&&o.classList.add(e.options.previewClass);n.appendChild(o)}o.classList.contains("editor-preview-active")?(o.classList.remove("editor-preview-active"),r&&(r.classList.remove("active"),i.classList.remove("disabled-for-preview"))):(setTimeout((function(){o.classList.add("editor-preview-active")}),1),r&&(r.classList.add("active"),i.classList.add("disabled-for-preview")));var l=e.options.previewRender(e.value(),o);null!==l&&(o.innerHTML=l)}function $(e,t,n,i){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var r,o=n[0],a=n[1],l={},s={};Object.assign(l,e.getCursor("start")),Object.assign(s,e.getCursor("end")),i&&(o=o.replace("#url#",i),a=a.replace("#url#",i)),t?(o=(r=e.getLine(l.line)).slice(0,l.ch),a=r.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(r=e.getSelection(),e.replaceSelection(o+r+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function G(e,t,n){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var i=e.getCursor("start"),r=e.getCursor("end"),o=i.line;o<=r.line;o++)!function(i){var r=e.getLine(i),o=r.search(/[^#]/);r=void 0!==t?o<=0?"bigger"==t?"###### "+r:"# "+r:6==o&&"smaller"==t?r.substr(7):1==o&&"bigger"==t?r.substr(2):"bigger"==t?r.substr(1):"#"+r:o<=0?"#".repeat(n)+" "+r:o==n?r.substr(o+1):"#".repeat(n)+" "+r.substr(o+1),e.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(o);e.focus()}}function V(e,t,n){if(!e.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var i=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,r=/^\s*/,o=m(e),a=e.getCursor("start"),l=e.getCursor("end"),s={quote:/^(\s*)>\s+/,"unordered-list":i,"ordered-list":i},u=function(e,t,o){var a=i.exec(t),l=function(e,t){return{quote:">","unordered-list":n,"ordered-list":"%%i."}[e].replace("%%i",t)}(e,c);return null!==a?(function(e,t){var i=new RegExp({quote:">","unordered-list":"\\"+n,"ordered-list":"\\d+."}[e]);return t&&i.test(t)}(e,a[2])&&(l=""),t=a[1]+l+a[3]+t.replace(r,"").replace(s[e],"$1")):0==o&&(t=l+" "+t),t},c=1,d=a.line;d<=l.line;d++)!function(n){var i=e.getLine(n);o[t]?i=i.replace(s[t],"$1"):("unordered-list"==t&&(i=u("ordered-list",i,!0)),i=u(t,i,!1),c+=1),e.replaceRange(i,{line:n,ch:0},{line:n,ch:99999999999999})}(d);e.focus()}}function X(e,t,n,i){if(e.codemirror&&!e.isPreviewActive()){var r=e.codemirror,o=m(r)[t];if(o){var a=r.getCursor("start"),l=r.getCursor("end"),s=r.getLine(a.line),u=s.slice(0,a.ch),c=s.slice(a.ch);"link"==t?u=u.replace(/(.*)[^!]\[/,"$1"):"image"==t&&(u=u.replace(/(.*)!\[$/,"$1")),c=c.replace(/]\(.*?\)/,""),r.replaceRange(u+c,{line:a.line,ch:0},{line:a.line,ch:99999999999999}),a.ch-=n[0].length,a!==l&&(l.ch-=n[0].length),r.setSelection(a,l),r.focus()}else $(r,o,n,i)}}function K(e,t,n,i){if(e.codemirror&&!e.isPreviewActive()){i=void 0===i?n:i;var r,o=e.codemirror,a=m(o),l=n,s=i,u=o.getCursor("start"),c=o.getCursor("end");a[t]?(l=(r=o.getLine(u.line)).slice(0,u.ch),s=r.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),s=s.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),s=s.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),s=s.replace(/(\*\*|~~)/,"")),o.replaceRange(l+s,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==c&&(c.ch-=2)):"italic"==t&&(u.ch-=1,u!==c&&(c.ch-=1))):(r=o.getSelection(),"bold"==t?r=(r=r.split("**").join("")).split("__").join(""):"italic"==t?r=(r=r.split("*").join("")).split("_").join(""):"strikethrough"==t&&(r=r.split("~~").join("")),o.replaceSelection(l+r+s),u.ch+=n.length,c.ch=u.ch+r.length),o.setSelection(u,c),o.focus()}}function Z(e,t){if(Math.abs(e)<1024)return""+e+t[0];var n=0;do{e/=1024,++n}while(Math.abs(e)>=1024&&n<t.length);return""+e.toFixed(1)+t[n]}function Y(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=Y(e[n]||{},t[n]):e[n]=t[n]);return e}function Q(e){for(var t=1;t<arguments.length;t++)e=Y(e,arguments[t]);return e}function J(e){var t=e.match(/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),n=0;if(null===t)return n;for(var i=0;i<t.length;i++)t[i].charCodeAt(0)>=19968?n+=t[i].length:n+=1;return n}var ee={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},te={bold:{name:"bold",action:x,className:ee.bold,title:"Bold",default:!0},italic:{name:"italic",action:y,className:ee.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:b,className:ee.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:w,className:ee.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:w,className:ee["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:k,className:ee["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:S,className:ee["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:F,className:ee["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:A,className:ee["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:D,className:ee.code,title:"Code"},quote:{name:"quote",action:C,className:ee.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:M,className:ee["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:B,className:ee["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:N,className:ee["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:O,className:ee.link,title:"Create Link",default:!0},image:{name:"image",action:I,className:ee.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:H,className:ee["upload-image"],title:"Import an image"},table:{name:"table",action:P,className:ee.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:_,className:ee["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:U,className:ee.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:q,className:ee["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:v,className:ee.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:ee.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:W,className:ee.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:j,className:ee.redo,noDisable:!0,title:"Redo"}},ne={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text     | Text     | Text     |\n\n"],horizontalRule:["","\n\n-----\n\n"]},ie={link:"URL for the link:",image:"URL of the image:"},re={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},oe={bold:"**",code:"```",italic:"*"},ae={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},le={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:"Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.",importError:"Something went wrong when uploading the image #image_name#."};function se(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,i=0;i<n.length;i++)n[i].href&&n[i].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var r=document.createElement("link");r.rel="stylesheet",r.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(r)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("EasyMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],te)Object.prototype.hasOwnProperty.call(te,o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===te[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));if(Object.prototype.hasOwnProperty.call(e,"previewClass")||(e.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(e,"status")||(e.status=["autosave","lines","words","cursor"],e.uploadImage&&e.status.unshift("upload-image")),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=Q({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=Q({},ne,e.insertTexts||{}),e.promptTexts=Q({},ie,e.promptTexts||{}),e.blockStyles=Q({},oe,e.blockStyles||{}),null!=e.autosave&&(e.autosave.timeFormat=Q({},re,e.autosave.timeFormat||{})),e.iconClassMap=Q({},ee,e.iconClassMap||{}),e.shortcuts=Q({},u,e.shortcuts||{}),e.maxHeight=e.maxHeight||void 0,e.direction=e.direction||"ltr",void 0!==e.maxHeight?e.minHeight=e.maxHeight:e.minHeight=e.minHeight||"300px",e.errorCallback=e.errorCallback||function(e){alert(e)},e.uploadImage=e.uploadImage||!1,e.imageMaxSize=e.imageMaxSize||2097152,e.imageAccept=e.imageAccept||"image/png, image/jpeg, image/gif, image/avif",e.imageTexts=Q({},ae,e.imageTexts||{}),e.errorMessages=Q({},le,e.errorMessages||{}),e.imagePathAbsolute=e.imagePathAbsolute||!1,e.imageCSRFName=e.imageCSRFName||"csrfmiddlewaretoken",e.imageCSRFHeader=e.imageCSRFHeader||!1,null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),e.overlayMode&&void 0===e.overlayMode.combine&&(e.overlayMode.combine=!0),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue),e.uploadImage){var a=this;this.codemirror.on("dragenter",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragend",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragleave",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragover",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("drop",(function(t,n){n.stopPropagation(),n.preventDefault(),e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,n.dataTransfer.files):a.uploadImages(n.dataTransfer.files)})),this.codemirror.on("paste",(function(t,n){e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,n.clipboardData.files):a.uploadImages(n.clipboardData.files)}))}}function ue(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}se.prototype.uploadImages=function(e,t,n){if(0!==e.length){for(var i=[],r=0;r<e.length;r++)i.push(e[r].name),this.uploadImage(e[r],t,n);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",i.join(", ")))}},se.prototype.uploadImagesUsingCustomFunction=function(e,t){if(0!==t.length){for(var n=[],i=0;i<t.length;i++)n.push(t[i].name),this.uploadImageUsingCustomFunction(e,t[i]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",n.join(", ")))}},se.prototype.updateStatusBar=function(e,t){if(this.gui.statusbar){var n=this.gui.statusbar.getElementsByClassName(e);1===n.length?this.gui.statusbar.getElementsByClassName(e)[0].textContent=t:0===n.length?console.log("EasyMDE: status bar item "+e+" was not found."):console.log("EasyMDE: Several status bar items named "+e+" was found.")}},se.prototype.markdown=function(e){if(o){var t;if(t=this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?this.options.renderingConfig.markedOptions:{},this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting){var n=this.options.renderingConfig.hljs||window.hljs;n&&(t.highlight=function(e,t){return t&&n.getLanguage(t)?n.highlight(t,e).value:n.highlightAuto(e).value})}o.setOptions(t);var i=o.parse(e);return this.options.renderingConfig&&"function"==typeof this.options.renderingConfig.sanitizerFunction&&(i=this.options.renderingConfig.sanitizerFunction.call(this,i)),i=function(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),n=t.getElementsByTagName("li"),i=0;i<n.length;i++)for(var r=n[i],o=0;o<r.children.length;o++){var a=r.children[o];a instanceof HTMLInputElement&&"checkbox"===a.type&&(r.style.marginLeft="-1.5em",r.style.listStyleType="none")}return t.documentElement.innerHTML}(i=function(e){for(var t;null!==(t=l.exec(e));){var n=t[0];if(-1===n.indexOf("target=")){var i=n.replace(/>$/,' target="_blank">');e=e.replace(n,i)}}return e}(i))}},se.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,n,o=this.options,a=this,l={};for(var u in o.shortcuts)null!==o.shortcuts[u]&&null!==s[u]&&function(e){l[d(o.shortcuts[e])]=function(){var t=s[e];"function"==typeof t?t(a):"string"==typeof t&&window.open(t,"_blank")}}(u);if(l.Enter="newlineAndIndentContinueMarkdownList",l.Tab="tabAndIndentMarkdownList",l["Shift-Tab"]="shiftTabAndUnindentMarkdownList",l.Esc=function(e){e.getOption("fullScreen")&&v(a)},this.documentOnKeyDown=function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&v(a)},document.addEventListener("keydown",this.documentOnKeyDown,!1),o.overlayMode?(i.defineMode("overlay-mode",(function(e){return i.overlayMode(i.getMode(e,!1!==o.spellChecker?"spell-checker":"gfm"),o.overlayMode.mode,o.overlayMode.combine)})),t="overlay-mode",(n=o.parsingConfig).gitHubSpice=!1):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),!1!==o.spellChecker&&(t="spell-checker",(n=o.parsingConfig).name="gfm",n.gitHubSpice=!1,"function"==typeof o.spellChecker?o.spellChecker({codeMirrorInstance:i}):r({codeMirrorInstance:i})),this.codemirror=i.fromTextArea(e,{mode:t,backdrop:n,theme:null!=o.theme?o.theme:"easymde",tabSize:null!=o.tabSize?o.tabSize:2,indentUnit:null!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!0===o.lineNumbers,autofocus:!0===o.autofocus,extraKeys:l,direction:o.direction,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=o.styleSelectedText?o.styleSelectedText:!c(),scrollbarStyle:null!=o.scrollbarStyle?o.scrollbarStyle:"native",configureMouse:function(e,t,n){return{addNew:!1}},inputStyle:null!=o.inputStyle?o.inputStyle:c()?"contenteditable":"textarea",spellcheck:null==o.nativeSpellcheck||o.nativeSpellcheck,autoRefresh:null!=o.autoRefresh&&o.autoRefresh}),this.codemirror.getScrollerElement().style.minHeight=o.minHeight,void 0!==o.maxHeight&&(this.codemirror.getScrollerElement().style.height=o.maxHeight),!0===o.forceSync){var h=this.codemirror;h.on("change",(function(){h.save()}))}this.gui={};var f=document.createElement("div");f.classList.add("EasyMDEContainer"),f.setAttribute("role","application");var p=this.codemirror.getWrapperElement();p.parentNode.insertBefore(f,p),f.appendChild(p),!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),null!=o.autosave&&!0===o.autosave.enabled&&(this.autosave(),this.codemirror.on("change",(function(){clearTimeout(a._autosave_timeout),a._autosave_timeout=setTimeout((function(){a.autosave()}),a.options.autosave.submit_delay||a.options.autosave.delay||1e3)})));var m=this;this.codemirror.on("update",(function(){o.previewImagesInEditor&&f.querySelectorAll(".cm-image-marker").forEach((function(e){var t=e.parentElement;if(t.innerText.match(/^!\[.*?\]\(.*\)/g)&&!t.hasAttribute("data-img-src")){var n=t.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),n&&n.length>=2){var i=n[1];if(o.imagesPreviewHandler){var r=o.imagesPreviewHandler(n[1]);"string"==typeof r&&(i=r)}if(window.EMDEimagesCache[i])x(t,window.EMDEimagesCache[i]);else{var a=document.createElement("img");a.onload=function(){window.EMDEimagesCache[i]={naturalWidth:a.naturalWidth,naturalHeight:a.naturalHeight,url:i},x(t,window.EMDEimagesCache[i])},a.src=i}}}}))})),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(!0===o.autofocus||e.autofocus)&&this.codemirror.focus();var g=this.codemirror;setTimeout(function(){g.refresh()}.bind(g),0)}function x(e,t){var n,i;e.setAttribute("data-img-src",t.url),e.setAttribute("style","--bg-image:url("+t.url+");--width:"+t.naturalWidth+"px;--height:"+(n=t.naturalWidth,i=t.naturalHeight,n<window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","")?i+"px":i/n*100+"%")),m.codemirror.setSize()}},se.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)},se.prototype.autosave=function(){if(ue()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),this.options.autosave.binded=!0),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var t=e.value();""!==t?localStorage.setItem("smde_"+this.options.autosave.uniqueId,t):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var n=document.getElementById("autosaved");if(null!=n&&null!=n&&""!=n){var i=new Date,r=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(i),o=null==this.options.autosave.text?"Autosaved: ":this.options.autosave.text;n.innerHTML=o+r}}else console.log("EasyMDE: localStorage not available, cannot autosave")},se.prototype.clearAutosavedValue=function(){if(ue()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},se.prototype.openBrowseFileWindow=function(e,t){var n=this,i=this.gui.toolbar.getElementsByClassName("imageInput")[0];i.click(),i.addEventListener("change",(function r(o){n.options.imageUploadFunction?n.uploadImagesUsingCustomFunction(n.options.imageUploadFunction,o.target.files):n.uploadImages(o.target.files,e,t),i.removeEventListener("change",r)}))},se.prototype.uploadImage=function(e,t,n){var i=this;function r(e){i.updateStatusBar("upload-image",e),setTimeout((function(){i.updateStatusBar("upload-image",i.options.imageTexts.sbInit)}),1e4),n&&"function"==typeof n&&n(e),i.options.errorCallback(e)}function o(t){var n=i.options.imageTexts.sizeUnits.split(",");return t.replace("#image_name#",e.name).replace("#image_size#",Z(e.size,n)).replace("#image_max_size#",Z(i.options.imageMaxSize,n))}if(t=t||function(e){R(i,e)},e.size>this.options.imageMaxSize)r(o(this.options.errorMessages.fileTooLarge));else{var a=new FormData;a.append("image",e),i.options.imageCSRFToken&&!i.options.imageCSRFHeader&&a.append(i.options.imageCSRFName,i.options.imageCSRFToken);var l=new XMLHttpRequest;l.upload.onprogress=function(t){if(t.lengthComputable){var n=""+Math.round(100*t.loaded/t.total);i.updateStatusBar("upload-image",i.options.imageTexts.sbProgress.replace("#file_name#",e.name).replace("#progress#",n))}},l.open("POST",this.options.imageUploadEndpoint),i.options.imageCSRFToken&&i.options.imageCSRFHeader&&l.setRequestHeader(i.options.imageCSRFName,i.options.imageCSRFToken),l.onload=function(){try{var e=JSON.parse(this.responseText)}catch(e){return console.error("EasyMDE: The server did not return a valid json."),void r(o(i.options.errorMessages.importError))}200===this.status&&e&&!e.error&&e.data&&e.data.filePath?t((i.options.imagePathAbsolute?"":window.location.origin+"/")+e.data.filePath):e.error&&e.error in i.options.errorMessages?r(o(i.options.errorMessages[e.error])):e.error?r(o(e.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),r(o(i.options.errorMessages.importError)))},l.onerror=function(e){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+e.target.status+" ("+e.target.statusText+")"),r(i.options.errorMessages.importError)},l.send(a)}},se.prototype.uploadImageUsingCustomFunction=function(e,t){var n=this;e.apply(this,[t,function(e){R(n,e)},function(e){var i=function(e){var i=n.options.imageTexts.sizeUnits.split(",");return e.replace("#image_name#",t.name).replace("#image_size#",Z(t.size,i)).replace("#image_max_size#",Z(n.options.imageMaxSize,i))}(e);n.updateStatusBar("upload-image",i),setTimeout((function(){n.updateStatusBar("upload-image",n.options.imageTexts.sbInit)}),1e4),n.options.errorCallback(i)}])},se.prototype.setPreviewMaxHeight=function(){var e=this.codemirror.getWrapperElement(),t=e.nextSibling,n=parseInt(window.getComputedStyle(e).paddingTop),i=parseInt(window.getComputedStyle(e).borderTopWidth),r=(parseInt(this.options.maxHeight)+2*n+2*i).toString()+"px";t.style.height=r},se.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;if(!n||!n.classList.contains("editor-preview-side")){if((n=document.createElement("div")).className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var i=0;i<this.options.previewClass.length;i++)n.classList.add(this.options.previewClass[i]);else"string"==typeof this.options.previewClass&&n.classList.add(this.options.previewClass);t.parentNode.insertBefore(n,t.nextSibling)}if(void 0!==this.options.maxHeight&&this.setPreviewMaxHeight(),!1===this.options.syncSideBySidePreviewScroll)return n;var r=!1,o=!1;return e.on("scroll",(function(e){if(r)r=!1;else{o=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,i=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*i;n.scrollTop=a}})),n.onscroll=function(){if(o)o=!1;else{r=!0;var t=n.scrollHeight-n.clientHeight,i=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*i;e.scrollTo(0,a)}},n},se.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)null!=te[e[t]]&&(e[t]=te[e[t]]);var n=document.createElement("div");n.className="editor-toolbar",n.setAttribute("role","toolbar");var i=this,r={};for(i.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==i.options.toolbarGuideIcon)&&!(i.options.hideIcons&&-1!=i.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&c())){if("|"===e[t]){for(var o=!1,a=t+1;a<e.length;a++)"|"===e[a]||i.options.hideIcons&&-1!=i.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}!function(e){var t;if(t="|"===e?p():e.children?h(e,i.options.toolbarTips,i.options.shortcuts,i):f(e,!0,i.options.toolbarTips,i.options.shortcuts,"button",i),r[e.name||e]=t,n.appendChild(t),"upload-image"===e.name){var o=document.createElement("input");o.className="imageInput",o.type="file",o.multiple=!0,o.name="image",o.accept=i.options.imageAccept,o.style.display="none",o.style.opacity=0,n.appendChild(o)}}(e[t])}i.toolbar_div=n,i.toolbarElements=r;var l=this.codemirror;l.on("cursorActivity",(function(){var e=m(l);for(var t in r)!function(t){var n=r[t];e[t]?n.classList.add("active"):"fullscreen"!=t&&"side-by-side"!=t&&n.classList.remove("active")}(t)}));var s=l.getWrapperElement();return s.parentNode.insertBefore(n,s),n}},se.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,n=this.codemirror;if(e&&0!==e.length){var i,r,o,a,l=[];for(i=0;i<e.length;i++)if(r=void 0,o=void 0,a=void 0,"object"==typeof e[i])l.push({className:e[i].className,defaultValue:e[i].defaultValue,onUpdate:e[i].onUpdate,onActivity:e[i].onActivity});else{var s=e[i];"words"===s?(a=function(e){e.innerHTML=J(n.getValue())},r=function(e){e.innerHTML=J(n.getValue())}):"lines"===s?(a=function(e){e.innerHTML=n.lineCount()},r=function(e){e.innerHTML=n.lineCount()}):"cursor"===s?(a=function(e){e.innerHTML="1:1"},o=function(e){var t=n.getCursor(),i=t.line+1,r=t.ch+1;e.innerHTML=i+":"+r}):"autosave"===s?a=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}:"upload-image"===s&&(a=function(e){e.innerHTML=t.imageTexts.sbInit}),l.push({className:s,defaultValue:a,onUpdate:r,onActivity:o})}var u=document.createElement("div");for(u.className="editor-statusbar",i=0;i<l.length;i++){var c=l[i],d=document.createElement("span");d.className=c.className,"function"==typeof c.defaultValue&&c.defaultValue(d),"function"==typeof c.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(d,c)),"function"==typeof c.onActivity&&this.codemirror.on("cursorActivity",function(e,t){return function(){t.onActivity(e)}}(d,c)),u.appendChild(d)}var h=this.codemirror.getWrapperElement();return h.parentNode.insertBefore(u,h.nextSibling),u}},se.prototype.value=function(e){var t=this.codemirror;if(void 0===e)return t.getValue();if(t.getDoc().setValue(e),this.isPreviewActive()){var n=t.getWrapperElement().lastChild,i=this.options.previewRender(e,n);null!==i&&(n.innerHTML=i)}return this},se.toggleBold=x,se.toggleItalic=y,se.toggleStrikethrough=b,se.toggleBlockquote=C,se.toggleHeadingSmaller=w,se.toggleHeadingBigger=k,se.toggleHeading1=S,se.toggleHeading2=F,se.toggleHeading3=A,se.toggleHeading4=E,se.toggleHeading5=L,se.toggleHeading6=T,se.toggleCodeBlock=D,se.toggleUnorderedList=M,se.toggleOrderedList=B,se.cleanBlock=N,se.drawLink=O,se.drawImage=I,se.drawUploadedImage=H,se.drawTable=P,se.drawHorizontalRule=_,se.undo=W,se.redo=j,se.togglePreview=U,se.toggleSideBySide=q,se.toggleFullScreen=v,se.prototype.toggleBold=function(){x(this)},se.prototype.toggleItalic=function(){y(this)},se.prototype.toggleStrikethrough=function(){b(this)},se.prototype.toggleBlockquote=function(){C(this)},se.prototype.toggleHeadingSmaller=function(){w(this)},se.prototype.toggleHeadingBigger=function(){k(this)},se.prototype.toggleHeading1=function(){S(this)},se.prototype.toggleHeading2=function(){F(this)},se.prototype.toggleHeading3=function(){A(this)},se.prototype.toggleHeading4=function(){E(this)},se.prototype.toggleHeading5=function(){L(this)},se.prototype.toggleHeading6=function(){T(this)},se.prototype.toggleCodeBlock=function(){D(this)},se.prototype.toggleUnorderedList=function(){M(this)},se.prototype.toggleOrderedList=function(){B(this)},se.prototype.cleanBlock=function(){N(this)},se.prototype.drawLink=function(){O(this)},se.prototype.drawImage=function(){I(this)},se.prototype.drawUploadedImage=function(){H(this)},se.prototype.drawTable=function(){P(this)},se.prototype.drawHorizontalRule=function(){_(this)},se.prototype.undo=function(){W(this)},se.prototype.redo=function(){j(this)},se.prototype.togglePreview=function(){U(this)},se.prototype.toggleSideBySide=function(){q(this)},se.prototype.toggleFullScreen=function(){v(this)},se.prototype.isPreviewActive=function(){return this.codemirror.getWrapperElement().lastChild.classList.contains("editor-preview-active")},se.prototype.isSideBySideActive=function(){return this.codemirror.getWrapperElement().nextSibling.classList.contains("editor-preview-active-side")},se.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},se.prototype.getState=function(){return m(this.codemirror)},se.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.parentNode;n&&(this.gui.toolbar&&n.removeChild(this.gui.toolbar),this.gui.statusbar&&n.removeChild(this.gui.statusbar),this.gui.sideBySide&&n.removeChild(this.gui.sideBySide)),n.parentNode.insertBefore(t,n),n.remove(),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},t.exports=se},{"./codemirror/tablist":17,codemirror:10,"codemirror-spell-checker":2,"codemirror/addon/display/autorefresh.js":3,"codemirror/addon/display/fullscreen.js":4,"codemirror/addon/display/placeholder.js":5,"codemirror/addon/edit/continuelist.js":6,"codemirror/addon/mode/overlay.js":7,"codemirror/addon/search/searchcursor.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14,marked:15}]},{},[18])(18)}));
\ No newline at end of file
diff --git a/dist/editor.mjs b/dist/editor.mjs
new file mode 100644
index 0000000..7ef22fb
--- /dev/null
+++ b/dist/editor.mjs
@@ -0,0 +1,4 @@
+import{renderWith as e,parseConfigsFromYaml as s,defaultAliases as w}from"mapclay";const C={};function decode$1(e,s){"string"!=typeof s&&(s=decode$1.defaultChars);const w=function getDecodeCache(e){let s=C[e];if(s)return s;s=C[e]=[];for(let e=0;e<128;e++){const w=String.fromCharCode(e);s.push(w)}for(let w=0;w<e.length;w++){const C=e.charCodeAt(w);s[C]="%"+("0"+C.toString(16).toUpperCase()).slice(-2)}return s}(s);return e.replace(/(%[a-f0-9]{2})+/gi,(function(e){let s="";for(let C=0,O=e.length;C<O;C+=3){const D=parseInt(e.slice(C+1,C+3),16);if(D<128)s+=w[D];else{if(192==(224&D)&&C+3<O){const w=parseInt(e.slice(C+4,C+6),16);if(128==(192&w)){const e=D<<6&1984|63&w;s+=e<128?"��":String.fromCharCode(e),C+=3;continue}}if(224==(240&D)&&C+6<O){const w=parseInt(e.slice(C+4,C+6),16),O=parseInt(e.slice(C+7,C+9),16);if(128==(192&w)&&128==(192&O)){const e=D<<12&61440|w<<6&4032|63&O;s+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),C+=6;continue}}if(240==(248&D)&&C+9<O){const w=parseInt(e.slice(C+4,C+6),16),O=parseInt(e.slice(C+7,C+9),16),T=parseInt(e.slice(C+10,C+12),16);if(128==(192&w)&&128==(192&O)&&128==(192&T)){let e=D<<18&1835008|w<<12&258048|O<<6&4032|63&T;e<65536||e>1114111?s+="����":(e-=65536,s+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),C+=9;continue}}s+="�"}}return s}))}decode$1.defaultChars=";/?:@&=+$,#",decode$1.componentChars="";const O={};function encode$1(e,s,w){"string"!=typeof s&&(w=s,s=encode$1.defaultChars),void 0===w&&(w=!0);const C=function getEncodeCache(e){let s=O[e];if(s)return s;s=O[e]=[];for(let e=0;e<128;e++){const w=String.fromCharCode(e);/^[0-9a-z]$/i.test(w)?s.push(w):s.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let w=0;w<e.length;w++)s[e.charCodeAt(w)]=e[w];return s}(s);let D="";for(let s=0,O=e.length;s<O;s++){const T=e.charCodeAt(s);if(w&&37===T&&s+2<O&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3)))D+=e.slice(s,s+3),s+=2;else if(T<128)D+=C[T];else if(T>=55296&&T<=57343){if(T>=55296&&T<=56319&&s+1<O){const w=e.charCodeAt(s+1);if(w>=56320&&w<=57343){D+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}D+="%EF%BF%BD"}else D+=encodeURIComponent(e[s])}return D}function format(e){let s="";return s+=e.protocol||"",s+=e.slashes?"//":"",s+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?s+="["+e.hostname+"]":s+=e.hostname||"",s+=e.port?":"+e.port:"",s+=e.pathname||"",s+=e.search||"",s+=e.hash||"",s}function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}encode$1.defaultChars=";/?:@&=+$,-_.!~*'()#",encode$1.componentChars="-_.!~*'()";const D=/^([a-z0-9.+-]+:)/i,T=/:[0-9]*$/,A=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,B=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),L=["'"].concat(B),P=["%","/","?",";","#"].concat(L),M=["/","?","#"],I=/^[+a-z0-9A-Z_-]{0,63}$/,F=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,$={javascript:!0,"javascript:":!0},N={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function urlParse(e,s){if(e&&e instanceof Url)return e;const w=new Url;return w.parse(e,s),w}Url.prototype.parse=function(e,s){let w,C,O,T=e;if(T=T.trim(),!s&&1===e.split("#").length){const e=A.exec(T);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let B=D.exec(T);if(B&&(B=B[0],w=B.toLowerCase(),this.protocol=B,T=T.substr(B.length)),(s||B||T.match(/^\/\/[^@\/]+@[^@\/]+/))&&(O="//"===T.substr(0,2),!O||B&&$[B]||(T=T.substr(2),this.slashes=!0)),!$[B]&&(O||B&&!N[B])){let e,s,w=-1;for(let e=0;e<M.length;e++)C=T.indexOf(M[e]),-1!==C&&(-1===w||C<w)&&(w=C);s=-1===w?T.lastIndexOf("@"):T.lastIndexOf("@",w),-1!==s&&(e=T.slice(0,s),T=T.slice(s+1),this.auth=e),w=-1;for(let e=0;e<P.length;e++)C=T.indexOf(P[e]),-1!==C&&(-1===w||C<w)&&(w=C);-1===w&&(w=T.length),":"===T[w-1]&&w--;const O=T.slice(0,w);T=T.slice(w),this.parseHost(O),this.hostname=this.hostname||"";const D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D){const e=this.hostname.split(/\./);for(let s=0,w=e.length;s<w;s++){const w=e[s];if(w&&!w.match(I)){let C="";for(let e=0,s=w.length;e<s;e++)w.charCodeAt(e)>127?C+="x":C+=w[e];if(!C.match(I)){const C=e.slice(0,s),O=e.slice(s+1),D=w.match(F);D&&(C.push(D[1]),O.unshift(D[2])),O.length&&(T=O.join(".")+T),this.hostname=C.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const L=T.indexOf("#");-1!==L&&(this.hash=T.substr(L),T=T.slice(0,L));const V=T.indexOf("?");return-1!==V&&(this.search=T.substr(V),T=T.slice(0,V)),T&&(this.pathname=T),N[w]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Url.prototype.parseHost=function(e){let s=T.exec(e);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),e=e.substr(0,e.length-s.length)),e&&(this.hostname=e)};var V,R=Object.freeze({__proto__:null,decode:decode$1,encode:encode$1,format:format,parse:urlParse}),H=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,z=/[\0-\x1F\x7F-\x9F]/,W=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,j=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,X=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,q=Object.freeze({__proto__:null,Any:H,Cc:z,Cf:/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P:W,S:j,Z:X}),Y=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((e=>e.charCodeAt(0)))),G=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((e=>e.charCodeAt(0))));const U=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Z=null!==(V=String.fromCodePoint)&&void 0!==V?V:function(e){let s="";return e>65535&&(e-=65536,s+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),s+=String.fromCharCode(e),s};var K;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(K||(K={}));var J,Q,ee;function isNumber(e){return e>=K.ZERO&&e<=K.NINE}function isHexadecimalCharacter(e){return e>=K.UPPER_A&&e<=K.UPPER_F||e>=K.LOWER_A&&e<=K.LOWER_F}function isEntityInAttributeInvalidEnd(e){return e===K.EQUALS||function isAsciiAlphaNumeric(e){return e>=K.UPPER_A&&e<=K.UPPER_Z||e>=K.LOWER_A&&e<=K.LOWER_Z||isNumber(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(J||(J={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(Q||(Q={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(ee||(ee={}));class EntityDecoder{constructor(e,s,w){this.decodeTree=e,this.emitCodePoint=s,this.errors=w,this.state=Q.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ee.Strict}startEntity(e){this.decodeMode=e,this.state=Q.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,s){switch(this.state){case Q.EntityStart:return e.charCodeAt(s)===K.NUM?(this.state=Q.NumericStart,this.consumed+=1,this.stateNumericStart(e,s+1)):(this.state=Q.NamedEntity,this.stateNamedEntity(e,s));case Q.NumericStart:return this.stateNumericStart(e,s);case Q.NumericDecimal:return this.stateNumericDecimal(e,s);case Q.NumericHex:return this.stateNumericHex(e,s);case Q.NamedEntity:return this.stateNamedEntity(e,s)}}stateNumericStart(e,s){return s>=e.length?-1:(32|e.charCodeAt(s))===K.LOWER_X?(this.state=Q.NumericHex,this.consumed+=1,this.stateNumericHex(e,s+1)):(this.state=Q.NumericDecimal,this.stateNumericDecimal(e,s))}addToNumericResult(e,s,w,C){if(s!==w){const O=w-s;this.result=this.result*Math.pow(C,O)+parseInt(e.substr(s,O),C),this.consumed+=O}}stateNumericHex(e,s){const w=s;for(;s<e.length;){const C=e.charCodeAt(s);if(!isNumber(C)&&!isHexadecimalCharacter(C))return this.addToNumericResult(e,w,s,16),this.emitNumericEntity(C,3);s+=1}return this.addToNumericResult(e,w,s,16),-1}stateNumericDecimal(e,s){const w=s;for(;s<e.length;){const C=e.charCodeAt(s);if(!isNumber(C))return this.addToNumericResult(e,w,s,10),this.emitNumericEntity(C,2);s+=1}return this.addToNumericResult(e,w,s,10),-1}emitNumericEntity(e,s){var w;if(this.consumed<=s)return null===(w=this.errors)||void 0===w||w.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===K.SEMI)this.consumed+=1;else if(this.decodeMode===ee.Strict)return 0;return this.emitCodePoint(function replaceCodePoint(e){var s;return e>=55296&&e<=57343||e>1114111?65533:null!==(s=U.get(e))&&void 0!==s?s:e}(this.result),this.consumed),this.errors&&(e!==K.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,s){const{decodeTree:w}=this;let C=w[this.treeIndex],O=(C&J.VALUE_LENGTH)>>14;for(;s<e.length;s++,this.excess++){const D=e.charCodeAt(s);if(this.treeIndex=determineBranch(w,C,this.treeIndex+Math.max(1,O),D),this.treeIndex<0)return 0===this.result||this.decodeMode===ee.Attribute&&(0===O||isEntityInAttributeInvalidEnd(D))?0:this.emitNotTerminatedNamedEntity();if(C=w[this.treeIndex],O=(C&J.VALUE_LENGTH)>>14,0!==O){if(D===K.SEMI)return this.emitNamedEntityData(this.treeIndex,O,this.consumed+this.excess);this.decodeMode!==ee.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:s,decodeTree:w}=this,C=(w[s]&J.VALUE_LENGTH)>>14;return this.emitNamedEntityData(s,C,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,s,w){const{decodeTree:C}=this;return this.emitCodePoint(1===s?C[e]&~J.VALUE_LENGTH:C[e+1],w),3===s&&this.emitCodePoint(C[e+2],w),w}end(){var e;switch(this.state){case Q.NamedEntity:return 0===this.result||this.decodeMode===ee.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case Q.NumericDecimal:return this.emitNumericEntity(0,2);case Q.NumericHex:return this.emitNumericEntity(0,3);case Q.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Q.EntityStart:return 0}}}function getDecoder(e){let s="";const w=new EntityDecoder(e,(e=>s+=Z(e)));return function decodeWithTrie(e,C){let O=0,D=0;for(;(D=e.indexOf("&",D))>=0;){s+=e.slice(O,D),w.startEntity(C);const T=w.write(e,D+1);if(T<0){O=D+w.end();break}O=D+T,D=0===T?O+1:O}const T=s+e.slice(O);return s="",T}}function determineBranch(e,s,w,C){const O=(s&J.BRANCH_LENGTH)>>7,D=s&J.JUMP_TABLE;if(0===O)return 0!==D&&C===D?w:-1;if(D){const s=C-D;return s<0||s>=O?-1:e[w+s]-1}let T=w,A=T+O-1;for(;T<=A;){const s=T+A>>>1,w=e[s];if(w<C)T=s+1;else{if(!(w>C))return e[s+O];A=s-1}}return-1}const te=getDecoder(Y);function decodeHTML(e,s=ee.Legacy){return te(e,s)}function isString$1(e){return"[object String]"===function _class$1(e){return Object.prototype.toString.call(e)}(e)}getDecoder(G);const ne=Object.prototype.hasOwnProperty;function assign$1(e){return Array.prototype.slice.call(arguments,1).forEach((function(s){if(s){if("object"!=typeof s)throw new TypeError(s+"must be object");Object.keys(s).forEach((function(w){e[w]=s[w]}))}})),e}function arrayReplaceAt(e,s,w){return[].concat(e.slice(0,s),w,e.slice(s+1))}function isValidEntityCode(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function fromCodePoint(e){if(e>65535){const s=55296+((e-=65536)>>10),w=56320+(1023&e);return String.fromCharCode(s,w)}return String.fromCharCode(e)}const oe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,re=new RegExp(oe.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),ie=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function unescapeAll(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(re,(function(e,s,w){return s||function replaceEntityPattern(e,s){if(35===s.charCodeAt(0)&&ie.test(s)){const w="x"===s[1].toLowerCase()?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return isValidEntityCode(w)?fromCodePoint(w):e}const w=decodeHTML(e);return w!==e?w:e}(e,w)}))}const ae=/[&<>"]/,se=/[&<>"]/g,le={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function replaceUnsafeChar(e){return le[e]}function escapeHtml(e){return ae.test(e)?e.replace(se,replaceUnsafeChar):e}const ce=/[.?*+^$[\]\\(){}|-]/g;function isSpace(e){switch(e){case 9:case 32:return!0}return!1}function isWhiteSpace(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function isPunctChar(e){return W.test(e)||j.test(e)}function isMdAsciiPunct(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function normalizeReference(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const ue={mdurl:R,ucmicro:q};var de=Object.freeze({__proto__:null,arrayReplaceAt:arrayReplaceAt,assign:assign$1,escapeHtml:escapeHtml,escapeRE:function escapeRE$1(e){return e.replace(ce,"\\$&")},fromCodePoint:fromCodePoint,has:function has(e,s){return ne.call(e,s)},isMdAsciiPunct:isMdAsciiPunct,isPunctChar:isPunctChar,isSpace:isSpace,isString:isString$1,isValidEntityCode:isValidEntityCode,isWhiteSpace:isWhiteSpace,lib:ue,normalizeReference:normalizeReference,unescapeAll:unescapeAll,unescapeMd:function unescapeMd(e){return e.indexOf("\\")<0?e:e.replace(oe,"$1")}});var pe=Object.freeze({__proto__:null,parseLinkDestination:function parseLinkDestination(e,s,w){let C,O=s;const D={ok:!1,pos:0,str:""};if(60===e.charCodeAt(O)){for(O++;O<w;){if(C=e.charCodeAt(O),10===C)return D;if(60===C)return D;if(62===C)return D.pos=O+1,D.str=unescapeAll(e.slice(s+1,O)),D.ok=!0,D;92===C&&O+1<w?O+=2:O++}return D}let T=0;for(;O<w&&(C=e.charCodeAt(O),32!==C)&&!(C<32||127===C);)if(92===C&&O+1<w){if(32===e.charCodeAt(O+1))break;O+=2}else{if(40===C&&(T++,T>32))return D;if(41===C){if(0===T)break;T--}O++}return s===O||0!==T||(D.str=unescapeAll(e.slice(s,O)),D.pos=O,D.ok=!0),D},parseLinkLabel:function parseLinkLabel(e,s,w){let C,O,D,T;const A=e.posMax,B=e.pos;for(e.pos=s+1,C=1;e.pos<A;){if(D=e.src.charCodeAt(e.pos),93===D&&(C--,0===C)){O=!0;break}if(T=e.pos,e.md.inline.skipToken(e),91===D)if(T===e.pos-1)C++;else if(w)return e.pos=B,-1}let L=-1;return O&&(L=e.pos),e.pos=B,L},parseLinkTitle:function parseLinkTitle(e,s,w,C){let O,D=s;const T={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(C)T.str=C.str,T.marker=C.marker;else{if(D>=w)return T;let C=e.charCodeAt(D);if(34!==C&&39!==C&&40!==C)return T;s++,D++,40===C&&(C=41),T.marker=C}for(;D<w;){if(O=e.charCodeAt(D),O===T.marker)return T.pos=D+1,T.str+=unescapeAll(e.slice(s,D)),T.ok=!0,T;if(40===O&&41===T.marker)return T;92===O&&D+1<w&&D++,D++}return T.can_continue=!0,T.str+=unescapeAll(e.slice(s,D)),T}});const he={};function Renderer(){this.rules=assign$1({},he)}function Ruler(){this.__rules__=[],this.__cache__=null}function Token(e,s,w){this.type=e,this.tag=s,this.attrs=null,this.map=null,this.nesting=w,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}function StateCore(e,s,w){this.src=e,this.env=w,this.tokens=[],this.inlineMode=!1,this.md=s}he.code_inline=function(e,s,w,C,O){const D=e[s];return"<code"+O.renderAttrs(D)+">"+escapeHtml(D.content)+"</code>"},he.code_block=function(e,s,w,C,O){const D=e[s];return"<pre"+O.renderAttrs(D)+"><code>"+escapeHtml(e[s].content)+"</code></pre>\n"},he.fence=function(e,s,w,C,O){const D=e[s],T=D.info?unescapeAll(D.info).trim():"";let A,B="",L="";if(T){const e=T.split(/(\s+)/g);B=e[0],L=e.slice(2).join("")}if(A=w.highlight&&w.highlight(D.content,B,L)||escapeHtml(D.content),0===A.indexOf("<pre"))return A+"\n";if(T){const e=D.attrIndex("class"),s=D.attrs?D.attrs.slice():[];e<0?s.push(["class",w.langPrefix+B]):(s[e]=s[e].slice(),s[e][1]+=" "+w.langPrefix+B);const C={attrs:s};return`<pre><code${O.renderAttrs(C)}>${A}</code></pre>\n`}return`<pre><code${O.renderAttrs(D)}>${A}</code></pre>\n`},he.image=function(e,s,w,C,O){const D=e[s];return D.attrs[D.attrIndex("alt")][1]=O.renderInlineAsText(D.children,w,C),O.renderToken(e,s,w)},he.hardbreak=function(e,s,w){return w.xhtmlOut?"<br />\n":"<br>\n"},he.softbreak=function(e,s,w){return w.breaks?w.xhtmlOut?"<br />\n":"<br>\n":"\n"},he.text=function(e,s){return escapeHtml(e[s].content)},he.html_block=function(e,s){return e[s].content},he.html_inline=function(e,s){return e[s].content},Renderer.prototype.renderAttrs=function renderAttrs(e){let s,w,C;if(!e.attrs)return"";for(C="",s=0,w=e.attrs.length;s<w;s++)C+=" "+escapeHtml(e.attrs[s][0])+'="'+escapeHtml(e.attrs[s][1])+'"';return C},Renderer.prototype.renderToken=function renderToken(e,s,w){const C=e[s];let O="";if(C.hidden)return"";C.block&&-1!==C.nesting&&s&&e[s-1].hidden&&(O+="\n"),O+=(-1===C.nesting?"</":"<")+C.tag,O+=this.renderAttrs(C),0===C.nesting&&w.xhtmlOut&&(O+=" /");let D=!1;if(C.block&&(D=!0,1===C.nesting&&s+1<e.length)){const w=e[s+1];("inline"===w.type||w.hidden||-1===w.nesting&&w.tag===C.tag)&&(D=!1)}return O+=D?">\n":">",O},Renderer.prototype.renderInline=function(e,s,w){let C="";const O=this.rules;for(let D=0,T=e.length;D<T;D++){const T=e[D].type;void 0!==O[T]?C+=O[T](e,D,s,w,this):C+=this.renderToken(e,D,s)}return C},Renderer.prototype.renderInlineAsText=function(e,s,w){let C="";for(let O=0,D=e.length;O<D;O++)switch(e[O].type){case"text":case"html_inline":case"html_block":C+=e[O].content;break;case"image":C+=this.renderInlineAsText(e[O].children,s,w);break;case"softbreak":case"hardbreak":C+="\n"}return C},Renderer.prototype.render=function(e,s,w){let C="";const O=this.rules;for(let D=0,T=e.length;D<T;D++){const T=e[D].type;"inline"===T?C+=this.renderInline(e[D].children,s,w):void 0!==O[T]?C+=O[T](e,D,s,w,this):C+=this.renderToken(e,D,s,w)}return C},Ruler.prototype.__find__=function(e){for(let s=0;s<this.__rules__.length;s++)if(this.__rules__[s].name===e)return s;return-1},Ruler.prototype.__compile__=function(){const e=this,s=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){s.indexOf(e)<0&&s.push(e)}))})),e.__cache__={},s.forEach((function(s){e.__cache__[s]=[],e.__rules__.forEach((function(w){w.enabled&&(s&&w.alt.indexOf(s)<0||e.__cache__[s].push(w.fn))}))}))},Ruler.prototype.at=function(e,s,w){const C=this.__find__(e),O=w||{};if(-1===C)throw new Error("Parser rule not found: "+e);this.__rules__[C].fn=s,this.__rules__[C].alt=O.alt||[],this.__cache__=null},Ruler.prototype.before=function(e,s,w,C){const O=this.__find__(e),D=C||{};if(-1===O)throw new Error("Parser rule not found: "+e);this.__rules__.splice(O,0,{name:s,enabled:!0,fn:w,alt:D.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(e,s,w,C){const O=this.__find__(e),D=C||{};if(-1===O)throw new Error("Parser rule not found: "+e);this.__rules__.splice(O+1,0,{name:s,enabled:!0,fn:w,alt:D.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(e,s,w){const C=w||{};this.__rules__.push({name:e,enabled:!0,fn:s,alt:C.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(e,s){Array.isArray(e)||(e=[e]);const w=[];return e.forEach((function(e){const C=this.__find__(e);if(C<0){if(s)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[C].enabled=!0,w.push(e)}),this),this.__cache__=null,w},Ruler.prototype.enableOnly=function(e,s){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,s)},Ruler.prototype.disable=function(e,s){Array.isArray(e)||(e=[e]);const w=[];return e.forEach((function(e){const C=this.__find__(e);if(C<0){if(s)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[C].enabled=!1,w.push(e)}),this),this.__cache__=null,w},Ruler.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},Token.prototype.attrIndex=function attrIndex(e){if(!this.attrs)return-1;const s=this.attrs;for(let w=0,C=s.length;w<C;w++)if(s[w][0]===e)return w;return-1},Token.prototype.attrPush=function attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]},Token.prototype.attrSet=function attrSet(e,s){const w=this.attrIndex(e),C=[e,s];w<0?this.attrPush(C):this.attrs[w]=C},Token.prototype.attrGet=function attrGet(e){const s=this.attrIndex(e);let w=null;return s>=0&&(w=this.attrs[s][1]),w},Token.prototype.attrJoin=function attrJoin(e,s){const w=this.attrIndex(e);w<0?this.attrPush([e,s]):this.attrs[w][1]=this.attrs[w][1]+" "+s},StateCore.prototype.Token=Token;const fe=/\r\n?|\n/g,me=/\0/g;function isLinkClose$1(e){return/^<\/a\s*>/i.test(e)}const ge=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,ye=/\((c|tm|r)\)/i,ve=/\((c|tm|r)\)/gi,_e={c:"©",r:"®",tm:"™"};function replaceFn(e,s){return _e[s.toLowerCase()]}function replace_scoped(e){let s=0;for(let w=e.length-1;w>=0;w--){const C=e[w];"text"!==C.type||s||(C.content=C.content.replace(ve,replaceFn)),"link_open"===C.type&&"auto"===C.info&&s--,"link_close"===C.type&&"auto"===C.info&&s++}}function replace_rare(e){let s=0;for(let w=e.length-1;w>=0;w--){const C=e[w];"text"!==C.type||s||ge.test(C.content)&&(C.content=C.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===C.type&&"auto"===C.info&&s--,"link_close"===C.type&&"auto"===C.info&&s++}}const Se=/['"]/,st=/['"]/g;function replaceAt(e,s,w){return e.slice(0,s)+w+e.slice(s+1)}function process_inlines(e,s){let w;const C=[];for(let O=0;O<e.length;O++){const D=e[O],T=e[O].level;for(w=C.length-1;w>=0&&!(C[w].level<=T);w--);if(C.length=w+1,"text"!==D.type)continue;let A=D.content,B=0,L=A.length;e:for(;B<L;){st.lastIndex=B;const P=st.exec(A);if(!P)break;let M=!0,I=!0;B=P.index+1;const F="'"===P[0];let $=32;if(P.index-1>=0)$=A.charCodeAt(P.index-1);else for(w=O-1;w>=0&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w--)if(e[w].content){$=e[w].content.charCodeAt(e[w].content.length-1);break}let N=32;if(B<L)N=A.charCodeAt(B);else for(w=O+1;w<e.length&&("softbreak"!==e[w].type&&"hardbreak"!==e[w].type);w++)if(e[w].content){N=e[w].content.charCodeAt(0);break}const V=isMdAsciiPunct($)||isPunctChar(String.fromCharCode($)),R=isMdAsciiPunct(N)||isPunctChar(String.fromCharCode(N)),H=isWhiteSpace($),z=isWhiteSpace(N);if(z?M=!1:R&&(H||V||(M=!1)),H?I=!1:V&&(z||R||(I=!1)),34===N&&'"'===P[0]&&$>=48&&$<=57&&(I=M=!1),M&&I&&(M=V,I=R),M||I){if(I)for(w=C.length-1;w>=0;w--){let M=C[w];if(C[w].level<T)break;if(M.single===F&&C[w].level===T){let T,I;M=C[w],F?(T=s.md.options.quotes[2],I=s.md.options.quotes[3]):(T=s.md.options.quotes[0],I=s.md.options.quotes[1]),D.content=replaceAt(D.content,P.index,I),e[M.token].content=replaceAt(e[M.token].content,M.pos,T),B+=I.length-1,M.token===O&&(B+=T.length-1),A=D.content,L=A.length,C.length=w;continue e}}M?C.push({token:O,pos:P.index,single:F,level:T}):I&&F&&(D.content=replaceAt(D.content,P.index,"’"))}else F&&(D.content=replaceAt(D.content,P.index,"’"))}}}const ct=[["normalize",function normalize$2(e){let s;s=e.src.replace(fe,"\n"),s=s.replace(me,"�"),e.src=s}],["block",function block(e){let s;e.inlineMode?(s=new e.Token("inline","",0),s.content=e.src,s.map=[0,1],s.children=[],e.tokens.push(s)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}],["inline",function inline(e){const s=e.tokens;for(let w=0,C=s.length;w<C;w++){const C=s[w];"inline"===C.type&&e.md.inline.parse(C.content,e.md,e.env,C.children)}}],["linkify",function linkify$1(e){const s=e.tokens;var w;if(e.md.options.linkify)for(let C=0,O=s.length;C<O;C++){if("inline"!==s[C].type||!e.md.linkify.pretest(s[C].content))continue;let O=s[C].children,D=0;for(let T=O.length-1;T>=0;T--){const A=O[T];if("link_close"!==A.type){if("html_inline"===A.type&&(w=A.content,/^<a[>\s]/i.test(w)&&D>0&&D--,isLinkClose$1(A.content)&&D++),!(D>0)&&"text"===A.type&&e.md.linkify.test(A.content)){const w=A.content;let D=e.md.linkify.match(w);const B=[];let L=A.level,P=0;D.length>0&&0===D[0].index&&T>0&&"text_special"===O[T-1].type&&(D=D.slice(1));for(let s=0;s<D.length;s++){const C=D[s].url,O=e.md.normalizeLink(C);if(!e.md.validateLink(O))continue;let T=D[s].text;T=D[s].schema?"mailto:"!==D[s].schema||/^mailto:/i.test(T)?e.md.normalizeLinkText(T):e.md.normalizeLinkText("mailto:"+T).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+T).replace(/^http:\/\//,"");const A=D[s].index;if(A>P){const s=new e.Token("text","",0);s.content=w.slice(P,A),s.level=L,B.push(s)}const M=new e.Token("link_open","a",1);M.attrs=[["href",O]],M.level=L++,M.markup="linkify",M.info="auto",B.push(M);const I=new e.Token("text","",0);I.content=T,I.level=L,B.push(I);const F=new e.Token("link_close","a",-1);F.level=--L,F.markup="linkify",F.info="auto",B.push(F),P=D[s].lastIndex}if(P<w.length){const s=new e.Token("text","",0);s.content=w.slice(P),s.level=L,B.push(s)}s[C].children=O=arrayReplaceAt(O,T,B)}}else for(T--;O[T].level!==A.level&&"link_open"!==O[T].type;)T--}}}],["replacements",function replace(e){let s;if(e.md.options.typographer)for(s=e.tokens.length-1;s>=0;s--)"inline"===e.tokens[s].type&&(ye.test(e.tokens[s].content)&&replace_scoped(e.tokens[s].children),ge.test(e.tokens[s].content)&&replace_rare(e.tokens[s].children))}],["smartquotes",function smartquotes(e){if(e.md.options.typographer)for(let s=e.tokens.length-1;s>=0;s--)"inline"===e.tokens[s].type&&Se.test(e.tokens[s].content)&&process_inlines(e.tokens[s].children,e)}],["text_join",function text_join(e){let s,w;const C=e.tokens,O=C.length;for(let e=0;e<O;e++){if("inline"!==C[e].type)continue;const O=C[e].children,D=O.length;for(s=0;s<D;s++)"text_special"===O[s].type&&(O[s].type="text");for(s=w=0;s<D;s++)"text"===O[s].type&&s+1<D&&"text"===O[s+1].type?O[s+1].content=O[s].content+O[s+1].content:(s!==w&&(O[w]=O[s]),w++);s!==w&&(O.length=w)}}]];function Core(){this.ruler=new Ruler;for(let e=0;e<ct.length;e++)this.ruler.push(ct[e][0],ct[e][1])}function StateBlock(e,s,w,C){this.src=e,this.md=s,this.env=w,this.tokens=C,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const O=this.src;for(let e=0,s=0,w=0,C=0,D=O.length,T=!1;s<D;s++){const A=O.charCodeAt(s);if(!T){if(isSpace(A)){w++,9===A?C+=4-C%4:C++;continue}T=!0}10!==A&&s!==D-1||(10!==A&&s++,this.bMarks.push(e),this.eMarks.push(s),this.tShift.push(w),this.sCount.push(C),this.bsCount.push(0),T=!1,w=0,C=0,e=s+1)}this.bMarks.push(O.length),this.eMarks.push(O.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Core.prototype.process=function(e){const s=this.ruler.getRules("");for(let w=0,C=s.length;w<C;w++)s[w](e)},Core.prototype.State=StateCore,StateBlock.prototype.push=function(e,s,w){const C=new Token(e,s,w);return C.block=!0,w<0&&this.level--,C.level=this.level,w>0&&this.level++,this.tokens.push(C),C},StateBlock.prototype.isEmpty=function isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(e){for(let s=this.lineMax;e<s&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},StateBlock.prototype.skipSpaces=function skipSpaces(e){for(let s=this.src.length;e<s;e++){if(!isSpace(this.src.charCodeAt(e)))break}return e},StateBlock.prototype.skipSpacesBack=function skipSpacesBack(e,s){if(e<=s)return e;for(;e>s;)if(!isSpace(this.src.charCodeAt(--e)))return e+1;return e},StateBlock.prototype.skipChars=function skipChars(e,s){for(let w=this.src.length;e<w&&this.src.charCodeAt(e)===s;e++);return e},StateBlock.prototype.skipCharsBack=function skipCharsBack(e,s,w){if(e<=w)return e;for(;e>w;)if(s!==this.src.charCodeAt(--e))return e+1;return e},StateBlock.prototype.getLines=function getLines(e,s,w,C){if(e>=s)return"";const O=new Array(s-e);for(let D=0,T=e;T<s;T++,D++){let e=0;const A=this.bMarks[T];let B,L=A;for(B=T+1<s||C?this.eMarks[T]+1:this.eMarks[T];L<B&&e<w;){const s=this.src.charCodeAt(L);if(isSpace(s))9===s?e+=4-(e+this.bsCount[T])%4:e++;else{if(!(L-A<this.tShift[T]))break;e++}L++}O[D]=e>w?new Array(e-w+1).join(" ")+this.src.slice(L,B):this.src.slice(L,B)}return O.join("")},StateBlock.prototype.Token=Token;function getLine(e,s){const w=e.bMarks[s]+e.tShift[s],C=e.eMarks[s];return e.src.slice(w,C)}function escapedSplit(e){const s=[],w=e.length;let C=0,O=e.charCodeAt(C),D=!1,T=0,A="";for(;C<w;)124===O&&(D?(A+=e.substring(T,C-1),T=C):(s.push(A+e.substring(T,C)),A="",T=C+1)),D=92===O,C++,O=e.charCodeAt(C);return s.push(A+e.substring(T)),s}function skipBulletListMarker(e,s){const w=e.eMarks[s];let C=e.bMarks[s]+e.tShift[s];const O=e.src.charCodeAt(C++);if(42!==O&&45!==O&&43!==O)return-1;if(C<w){if(!isSpace(e.src.charCodeAt(C)))return-1}return C}function skipOrderedListMarker(e,s){const w=e.bMarks[s]+e.tShift[s],C=e.eMarks[s];let O=w;if(O+1>=C)return-1;let D=e.src.charCodeAt(O++);if(D<48||D>57)return-1;for(;;){if(O>=C)return-1;if(D=e.src.charCodeAt(O++),!(D>=48&&D<=57)){if(41===D||46===D)break;return-1}if(O-w>=10)return-1}return O<C&&(D=e.src.charCodeAt(O),!isSpace(D))?-1:O}const ut="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",dt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",pt=new RegExp("^(?:"+ut+"|"+dt+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),ht=new RegExp("^(?:"+ut+"|"+dt+")"),ft=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ht.source+"\\s*$"),/^$/,!1]];const mt=[["table",function table(e,s,w,C){if(s+2>w)return!1;let O=s+1;if(e.sCount[O]<e.blkIndent)return!1;if(e.sCount[O]-e.blkIndent>=4)return!1;let D=e.bMarks[O]+e.tShift[O];if(D>=e.eMarks[O])return!1;const T=e.src.charCodeAt(D++);if(124!==T&&45!==T&&58!==T)return!1;if(D>=e.eMarks[O])return!1;const A=e.src.charCodeAt(D++);if(124!==A&&45!==A&&58!==A&&!isSpace(A))return!1;if(45===T&&isSpace(A))return!1;for(;D<e.eMarks[O];){const s=e.src.charCodeAt(D);if(124!==s&&45!==s&&58!==s&&!isSpace(s))return!1;D++}let B=getLine(e,s+1),L=B.split("|");const P=[];for(let e=0;e<L.length;e++){const s=L[e].trim();if(!s){if(0===e||e===L.length-1)continue;return!1}if(!/^:?-+:?$/.test(s))return!1;58===s.charCodeAt(s.length-1)?P.push(58===s.charCodeAt(0)?"center":"right"):58===s.charCodeAt(0)?P.push("left"):P.push("")}if(B=getLine(e,s).trim(),-1===B.indexOf("|"))return!1;if(e.sCount[s]-e.blkIndent>=4)return!1;L=escapedSplit(B),L.length&&""===L[0]&&L.shift(),L.length&&""===L[L.length-1]&&L.pop();const M=L.length;if(0===M||M!==P.length)return!1;if(C)return!0;const I=e.parentType;e.parentType="table";const F=e.md.block.ruler.getRules("blockquote"),$=[s,0];e.push("table_open","table",1).map=$,e.push("thead_open","thead",1).map=[s,s+1],e.push("tr_open","tr",1).map=[s,s+1];for(let s=0;s<L.length;s++){const w=e.push("th_open","th",1);P[s]&&(w.attrs=[["style","text-align:"+P[s]]]);const C=e.push("inline","",0);C.content=L[s].trim(),C.children=[],e.push("th_close","th",-1)}let N;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let V=0;for(O=s+2;O<w&&!(e.sCount[O]<e.blkIndent);O++){let C=!1;for(let s=0,D=F.length;s<D;s++)if(F[s](e,O,w,!0)){C=!0;break}if(C)break;if(B=getLine(e,O).trim(),!B)break;if(e.sCount[O]-e.blkIndent>=4)break;if(L=escapedSplit(B),L.length&&""===L[0]&&L.shift(),L.length&&""===L[L.length-1]&&L.pop(),V+=M-L.length,V>65536)break;if(O===s+2){e.push("tbody_open","tbody",1).map=N=[s+2,0]}e.push("tr_open","tr",1).map=[O,O+1];for(let s=0;s<M;s++){const w=e.push("td_open","td",1);P[s]&&(w.attrs=[["style","text-align:"+P[s]]]);const C=e.push("inline","",0);C.content=L[s]?L[s].trim():"",C.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return N&&(e.push("tbody_close","tbody",-1),N[1]=O),e.push("table_close","table",-1),$[1]=O,e.parentType=I,e.line=O,!0},["paragraph","reference"]],["code",function code(e,s,w){if(e.sCount[s]-e.blkIndent<4)return!1;let C=s+1,O=C;for(;C<w;)if(e.isEmpty(C))C++;else{if(!(e.sCount[C]-e.blkIndent>=4))break;C++,O=C}e.line=O;const D=e.push("code_block","code",0);return D.content=e.getLines(s,O,4+e.blkIndent,!1)+"\n",D.map=[s,e.line],!0}],["fence",function fence(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;if(O+3>D)return!1;const T=e.src.charCodeAt(O);if(126!==T&&96!==T)return!1;let A=O;O=e.skipChars(O,T);let B=O-A;if(B<3)return!1;const L=e.src.slice(A,O),P=e.src.slice(O,D);if(96===T&&P.indexOf(String.fromCharCode(T))>=0)return!1;if(C)return!0;let M=s,I=!1;for(;(M++,!(M>=w))&&(O=A=e.bMarks[M]+e.tShift[M],D=e.eMarks[M],!(O<D&&e.sCount[M]<e.blkIndent));)if(e.src.charCodeAt(O)===T&&!(e.sCount[M]-e.blkIndent>=4||(O=e.skipChars(O,T),O-A<B||(O=e.skipSpaces(O),O<D)))){I=!0;break}B=e.sCount[s],e.line=M+(I?1:0);const F=e.push("fence","code",0);return F.info=P,F.content=e.getLines(s+1,M,B,!0),F.markup=L,F.map=[s,e.line],!0},["paragraph","reference","blockquote","list"]],["blockquote",function blockquote(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];const T=e.lineMax;if(e.sCount[s]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(O))return!1;if(C)return!0;const A=[],B=[],L=[],P=[],M=e.md.block.ruler.getRules("blockquote"),I=e.parentType;e.parentType="blockquote";let F,$=!1;for(F=s;F<w;F++){const s=e.sCount[F]<e.blkIndent;if(O=e.bMarks[F]+e.tShift[F],D=e.eMarks[F],O>=D)break;if(62===e.src.charCodeAt(O++)&&!s){let s,w,C=e.sCount[F]+1;32===e.src.charCodeAt(O)?(O++,C++,w=!1,s=!0):9===e.src.charCodeAt(O)?(s=!0,(e.bsCount[F]+C)%4==3?(O++,C++,w=!1):w=!0):s=!1;let T=C;for(A.push(e.bMarks[F]),e.bMarks[F]=O;O<D;){const s=e.src.charCodeAt(O);if(!isSpace(s))break;9===s?T+=4-(T+e.bsCount[F]+(w?1:0))%4:T++,O++}$=O>=D,B.push(e.bsCount[F]),e.bsCount[F]=e.sCount[F]+1+(s?1:0),L.push(e.sCount[F]),e.sCount[F]=T-C,P.push(e.tShift[F]),e.tShift[F]=O-e.bMarks[F];continue}if($)break;let C=!1;for(let s=0,O=M.length;s<O;s++)if(M[s](e,F,w,!0)){C=!0;break}if(C){e.lineMax=F,0!==e.blkIndent&&(A.push(e.bMarks[F]),B.push(e.bsCount[F]),P.push(e.tShift[F]),L.push(e.sCount[F]),e.sCount[F]-=e.blkIndent);break}A.push(e.bMarks[F]),B.push(e.bsCount[F]),P.push(e.tShift[F]),L.push(e.sCount[F]),e.sCount[F]=-1}const N=e.blkIndent;e.blkIndent=0;const V=e.push("blockquote_open","blockquote",1);V.markup=">";const R=[s,0];V.map=R,e.md.block.tokenize(e,s,F),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=T,e.parentType=I,R[1]=e.line;for(let w=0;w<P.length;w++)e.bMarks[w+s]=A[w],e.tShift[w+s]=P[w],e.sCount[w+s]=L[w],e.bsCount[w+s]=B[w];return e.blkIndent=N,!0},["paragraph","reference","blockquote","list"]],["hr",function hr(e,s,w,C){const O=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;let D=e.bMarks[s]+e.tShift[s];const T=e.src.charCodeAt(D++);if(42!==T&&45!==T&&95!==T)return!1;let A=1;for(;D<O;){const s=e.src.charCodeAt(D++);if(s!==T&&!isSpace(s))return!1;s===T&&A++}if(A<3)return!1;if(C)return!0;e.line=s+1;const B=e.push("hr","hr",0);return B.map=[s,e.line],B.markup=Array(A+1).join(String.fromCharCode(T)),!0},["paragraph","reference","blockquote","list"]],["list",function list(e,s,w,C){let O,D,T,A,B=s,L=!0;if(e.sCount[B]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[B]-e.listIndent>=4&&e.sCount[B]<e.blkIndent)return!1;let P,M,I,F=!1;if(C&&"paragraph"===e.parentType&&e.sCount[B]>=e.blkIndent&&(F=!0),(I=skipOrderedListMarker(e,B))>=0){if(P=!0,T=e.bMarks[B]+e.tShift[B],M=Number(e.src.slice(T,I-1)),F&&1!==M)return!1}else{if(!((I=skipBulletListMarker(e,B))>=0))return!1;P=!1}if(F&&e.skipSpaces(I)>=e.eMarks[B])return!1;if(C)return!0;const $=e.src.charCodeAt(I-1),N=e.tokens.length;P?(A=e.push("ordered_list_open","ol",1),1!==M&&(A.attrs=[["start",M]])):A=e.push("bullet_list_open","ul",1);const V=[B,0];A.map=V,A.markup=String.fromCharCode($);let R=!1;const H=e.md.block.ruler.getRules("list"),z=e.parentType;for(e.parentType="list";B<w;){D=I,O=e.eMarks[B];const s=e.sCount[B]+I-(e.bMarks[B]+e.tShift[B]);let C=s;for(;D<O;){const s=e.src.charCodeAt(D);if(9===s)C+=4-(C+e.bsCount[B])%4;else{if(32!==s)break;C++}D++}const M=D;let F;F=M>=O?1:C-s,F>4&&(F=1);const N=s+F;A=e.push("list_item_open","li",1),A.markup=String.fromCharCode($);const V=[B,0];A.map=V,P&&(A.info=e.src.slice(T,I-1));const z=e.tight,W=e.tShift[B],j=e.sCount[B],X=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=N,e.tight=!0,e.tShift[B]=M-e.bMarks[B],e.sCount[B]=C,M>=O&&e.isEmpty(B+1)?e.line=Math.min(e.line+2,w):e.md.block.tokenize(e,B,w,!0),e.tight&&!R||(L=!1),R=e.line-B>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=X,e.tShift[B]=W,e.sCount[B]=j,e.tight=z,A=e.push("list_item_close","li",-1),A.markup=String.fromCharCode($),B=e.line,V[1]=B,B>=w)break;if(e.sCount[B]<e.blkIndent)break;if(e.sCount[B]-e.blkIndent>=4)break;let q=!1;for(let s=0,C=H.length;s<C;s++)if(H[s](e,B,w,!0)){q=!0;break}if(q)break;if(P){if(I=skipOrderedListMarker(e,B),I<0)break;T=e.bMarks[B]+e.tShift[B]}else if(I=skipBulletListMarker(e,B),I<0)break;if($!==e.src.charCodeAt(I-1))break}return A=P?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),A.markup=String.fromCharCode($),V[1]=B,e.line=B,e.parentType=z,L&&function markTightParagraphs(e,s){const w=e.level+2;for(let C=s+2,O=e.tokens.length-2;C<O;C++)e.tokens[C].level===w&&"paragraph_open"===e.tokens[C].type&&(e.tokens[C+2].hidden=!0,e.tokens[C].hidden=!0,C+=2)}(e,N),!0},["paragraph","reference","blockquote"]],["reference",function reference(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s],T=s+1;if(e.sCount[s]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(O))return!1;function getNextLine(s){const w=e.lineMax;if(s>=w||e.isEmpty(s))return null;let C=!1;if(e.sCount[s]-e.blkIndent>3&&(C=!0),e.sCount[s]<0&&(C=!0),!C){const C=e.md.block.ruler.getRules("reference"),O=e.parentType;e.parentType="reference";let D=!1;for(let O=0,T=C.length;O<T;O++)if(C[O](e,s,w,!0)){D=!0;break}if(e.parentType=O,D)return null}const O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];return e.src.slice(O,D+1)}let A=e.src.slice(O,D+1);D=A.length;let B=-1;for(O=1;O<D;O++){const e=A.charCodeAt(O);if(91===e)return!1;if(93===e){B=O;break}if(10===e){const e=getNextLine(T);null!==e&&(A+=e,D=A.length,T++)}else if(92===e&&(O++,O<D&&10===A.charCodeAt(O))){const e=getNextLine(T);null!==e&&(A+=e,D=A.length,T++)}}if(B<0||58!==A.charCodeAt(B+1))return!1;for(O=B+2;O<D;O++){const e=A.charCodeAt(O);if(10===e){const e=getNextLine(T);null!==e&&(A+=e,D=A.length,T++)}else if(!isSpace(e))break}const L=e.md.helpers.parseLinkDestination(A,O,D);if(!L.ok)return!1;const P=e.md.normalizeLink(L.str);if(!e.md.validateLink(P))return!1;O=L.pos;const M=O,I=T,F=O;for(;O<D;O++){const e=A.charCodeAt(O);if(10===e){const e=getNextLine(T);null!==e&&(A+=e,D=A.length,T++)}else if(!isSpace(e))break}let $,N=e.md.helpers.parseLinkTitle(A,O,D);for(;N.can_continue;){const s=getNextLine(T);if(null===s)break;A+=s,O=D,D=A.length,T++,N=e.md.helpers.parseLinkTitle(A,O,D,N)}for(O<D&&F!==O&&N.ok?($=N.str,O=N.pos):($="",O=M,T=I);O<D;){if(!isSpace(A.charCodeAt(O)))break;O++}if(O<D&&10!==A.charCodeAt(O)&&$)for($="",O=M,T=I;O<D;){if(!isSpace(A.charCodeAt(O)))break;O++}if(O<D&&10!==A.charCodeAt(O))return!1;const V=normalizeReference(A.slice(1,B));return!!V&&(C||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[V]&&(e.env.references[V]={title:$,href:P}),e.line=T),!0)}],["html_block",function html_block(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(O))return!1;let T=e.src.slice(O,D),A=0;for(;A<ft.length&&!ft[A][0].test(T);A++);if(A===ft.length)return!1;if(C)return ft[A][2];let B=s+1;if(!ft[A][1].test(T))for(;B<w&&!(e.sCount[B]<e.blkIndent);B++)if(O=e.bMarks[B]+e.tShift[B],D=e.eMarks[B],T=e.src.slice(O,D),ft[A][1].test(T)){0!==T.length&&B++;break}e.line=B;const L=e.push("html_block","",0);return L.map=[s,B],L.content=e.getLines(s,B,e.blkIndent,!0),!0},["paragraph","reference","blockquote"]],["heading",function heading(e,s,w,C){let O=e.bMarks[s]+e.tShift[s],D=e.eMarks[s];if(e.sCount[s]-e.blkIndent>=4)return!1;let T=e.src.charCodeAt(O);if(35!==T||O>=D)return!1;let A=1;for(T=e.src.charCodeAt(++O);35===T&&O<D&&A<=6;)A++,T=e.src.charCodeAt(++O);if(A>6||O<D&&!isSpace(T))return!1;if(C)return!0;D=e.skipSpacesBack(D,O);const B=e.skipCharsBack(D,35,O);B>O&&isSpace(e.src.charCodeAt(B-1))&&(D=B),e.line=s+1;const L=e.push("heading_open","h"+String(A),1);L.markup="########".slice(0,A),L.map=[s,e.line];const P=e.push("inline","",0);return P.content=e.src.slice(O,D).trim(),P.map=[s,e.line],P.children=[],e.push("heading_close","h"+String(A),-1).markup="########".slice(0,A),!0},["paragraph","reference","blockquote"]],["lheading",function lheading(e,s,w){const C=e.md.block.ruler.getRules("paragraph");if(e.sCount[s]-e.blkIndent>=4)return!1;const O=e.parentType;e.parentType="paragraph";let D,T=0,A=s+1;for(;A<w&&!e.isEmpty(A);A++){if(e.sCount[A]-e.blkIndent>3)continue;if(e.sCount[A]>=e.blkIndent){let s=e.bMarks[A]+e.tShift[A];const w=e.eMarks[A];if(s<w&&(D=e.src.charCodeAt(s),(45===D||61===D)&&(s=e.skipChars(s,D),s=e.skipSpaces(s),s>=w))){T=61===D?1:2;break}}if(e.sCount[A]<0)continue;let s=!1;for(let O=0,D=C.length;O<D;O++)if(C[O](e,A,w,!0)){s=!0;break}if(s)break}if(!T)return!1;const B=e.getLines(s,A,e.blkIndent,!1).trim();e.line=A+1;const L=e.push("heading_open","h"+String(T),1);L.markup=String.fromCharCode(D),L.map=[s,e.line];const P=e.push("inline","",0);return P.content=B,P.map=[s,e.line-1],P.children=[],e.push("heading_close","h"+String(T),-1).markup=String.fromCharCode(D),e.parentType=O,!0}],["paragraph",function paragraph(e,s,w){const C=e.md.block.ruler.getRules("paragraph"),O=e.parentType;let D=s+1;for(e.parentType="paragraph";D<w&&!e.isEmpty(D);D++){if(e.sCount[D]-e.blkIndent>3)continue;if(e.sCount[D]<0)continue;let s=!1;for(let O=0,T=C.length;O<T;O++)if(C[O](e,D,w,!0)){s=!0;break}if(s)break}const T=e.getLines(s,D,e.blkIndent,!1).trim();e.line=D,e.push("paragraph_open","p",1).map=[s,e.line];const A=e.push("inline","",0);return A.content=T,A.map=[s,e.line],A.children=[],e.push("paragraph_close","p",-1),e.parentType=O,!0}]];function ParserBlock(){this.ruler=new Ruler;for(let e=0;e<mt.length;e++)this.ruler.push(mt[e][0],mt[e][1],{alt:(mt[e][2]||[]).slice()})}function StateInline(e,s,w,C){this.src=e,this.env=w,this.md=s,this.tokens=C,this.tokens_meta=Array(C.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}function isTerminatorChar(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}ParserBlock.prototype.tokenize=function(e,s,w){const C=this.ruler.getRules(""),O=C.length,D=e.md.options.maxNesting;let T=s,A=!1;for(;T<w&&(e.line=T=e.skipEmptyLines(T),!(T>=w))&&!(e.sCount[T]<e.blkIndent);){if(e.level>=D){e.line=w;break}const s=e.line;let B=!1;for(let D=0;D<O;D++)if(B=C[D](e,T,w,!1),B){if(s>=e.line)throw new Error("block rule didn't increment state.line");break}if(!B)throw new Error("none of the block rules matched");e.tight=!A,e.isEmpty(e.line-1)&&(A=!0),T=e.line,T<w&&e.isEmpty(T)&&(A=!0,T++,e.line=T)}},ParserBlock.prototype.parse=function(e,s,w,C){if(!e)return;const O=new this.State(e,s,w,C);this.tokenize(O,O.line,O.lineMax)},ParserBlock.prototype.State=StateBlock,StateInline.prototype.pushPending=function(){const e=new Token("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},StateInline.prototype.push=function(e,s,w){this.pending&&this.pushPending();const C=new Token(e,s,w);let O=null;return w<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),C.level=this.level,w>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],O={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(C),this.tokens_meta.push(O),C},StateInline.prototype.scanDelims=function(e,s){const w=this.posMax,C=this.src.charCodeAt(e),O=e>0?this.src.charCodeAt(e-1):32;let D=e;for(;D<w&&this.src.charCodeAt(D)===C;)D++;const T=D-e,A=D<w?this.src.charCodeAt(D):32,B=isMdAsciiPunct(O)||isPunctChar(String.fromCharCode(O)),L=isMdAsciiPunct(A)||isPunctChar(String.fromCharCode(A)),P=isWhiteSpace(O),M=isWhiteSpace(A),I=!M&&(!L||P||B),F=!P&&(!B||M||L);return{can_open:I&&(s||!F||B),can_close:F&&(s||!I||L),length:T}},StateInline.prototype.Token=Token;const gt=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;const yt=[];for(let Ai=0;Ai<256;Ai++)yt.push(0);function postProcess$1(e,s){let w;const C=[],O=s.length;for(let D=0;D<O;D++){const O=s[D];if(126!==O.marker)continue;if(-1===O.end)continue;const T=s[O.end];w=e.tokens[O.token],w.type="s_open",w.tag="s",w.nesting=1,w.markup="~~",w.content="",w=e.tokens[T.token],w.type="s_close",w.tag="s",w.nesting=-1,w.markup="~~",w.content="","text"===e.tokens[T.token-1].type&&"~"===e.tokens[T.token-1].content&&C.push(T.token-1)}for(;C.length;){const s=C.pop();let O=s+1;for(;O<e.tokens.length&&"s_close"===e.tokens[O].type;)O++;O--,s!==O&&(w=e.tokens[O],e.tokens[O]=e.tokens[s],e.tokens[s]=w)}}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){yt[e.charCodeAt(0)]=1}));var vt={tokenize:function strikethrough_tokenize(e,s){const w=e.pos,C=e.src.charCodeAt(w);if(s)return!1;if(126!==C)return!1;const O=e.scanDelims(e.pos,!0);let D=O.length;const T=String.fromCharCode(C);if(D<2)return!1;let A;D%2&&(A=e.push("text","",0),A.content=T,D--);for(let s=0;s<D;s+=2)A=e.push("text","",0),A.content=T+T,e.delimiters.push({marker:C,length:0,token:e.tokens.length-1,end:-1,open:O.can_open,close:O.can_close});return e.pos+=O.length,!0},postProcess:function strikethrough_postProcess(e){const s=e.tokens_meta,w=e.tokens_meta.length;postProcess$1(e,e.delimiters);for(let C=0;C<w;C++)s[C]&&s[C].delimiters&&postProcess$1(e,s[C].delimiters)}};function postProcess(e,s){for(let w=s.length-1;w>=0;w--){const C=s[w];if(95!==C.marker&&42!==C.marker)continue;if(-1===C.end)continue;const O=s[C.end],D=w>0&&s[w-1].end===C.end+1&&s[w-1].marker===C.marker&&s[w-1].token===C.token-1&&s[C.end+1].token===O.token+1,T=String.fromCharCode(C.marker),A=e.tokens[C.token];A.type=D?"strong_open":"em_open",A.tag=D?"strong":"em",A.nesting=1,A.markup=D?T+T:T,A.content="";const B=e.tokens[O.token];B.type=D?"strong_close":"em_close",B.tag=D?"strong":"em",B.nesting=-1,B.markup=D?T+T:T,B.content="",D&&(e.tokens[s[w-1].token].content="",e.tokens[s[C.end+1].token].content="",w--)}}var _t={tokenize:function emphasis_tokenize(e,s){const w=e.pos,C=e.src.charCodeAt(w);if(s)return!1;if(95!==C&&42!==C)return!1;const O=e.scanDelims(e.pos,42===C);for(let s=0;s<O.length;s++){e.push("text","",0).content=String.fromCharCode(C),e.delimiters.push({marker:C,length:O.length,token:e.tokens.length-1,end:-1,open:O.can_open,close:O.can_close})}return e.pos+=O.length,!0},postProcess:function emphasis_post_process(e){const s=e.tokens_meta,w=e.tokens_meta.length;postProcess(e,e.delimiters);for(let C=0;C<w;C++)s[C]&&s[C].delimiters&&postProcess(e,s[C].delimiters)}};const bt=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,kt=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;const Et=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,xt=/^&([a-z][a-z0-9]{1,31});/i;function processDelimiters(e){const s={},w=e.length;if(!w)return;let C=0,O=-2;const D=[];for(let T=0;T<w;T++){const w=e[T];if(D.push(0),e[C].marker===w.marker&&O===w.token-1||(C=T),O=w.token,w.length=w.length||0,!w.close)continue;s.hasOwnProperty(w.marker)||(s[w.marker]=[-1,-1,-1,-1,-1,-1]);const A=s[w.marker][(w.open?3:0)+w.length%3];let B=C-D[C]-1,L=B;for(;B>A;B-=D[B]+1){const s=e[B];if(s.marker===w.marker&&(s.open&&s.end<0)){let C=!1;if((s.close||w.open)&&(s.length+w.length)%3==0&&(s.length%3==0&&w.length%3==0||(C=!0)),!C){const C=B>0&&!e[B-1].open?D[B-1]+1:0;D[T]=T-B+C,D[B]=C,w.open=!1,s.end=T,s.close=!1,L=-1,O=-2;break}}}-1!==L&&(s[w.marker][(w.open?3:0)+(w.length||0)%3]=L)}}const St=[["text",function text(e,s){let w=e.pos;for(;w<e.posMax&&!isTerminatorChar(e.src.charCodeAt(w));)w++;return w!==e.pos&&(s||(e.pending+=e.src.slice(e.pos,w)),e.pos=w,!0)}],["linkify",function linkify(e,s){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const w=e.pos;if(w+3>e.posMax)return!1;if(58!==e.src.charCodeAt(w))return!1;if(47!==e.src.charCodeAt(w+1))return!1;if(47!==e.src.charCodeAt(w+2))return!1;const C=e.pending.match(gt);if(!C)return!1;const O=C[1],D=e.md.linkify.matchAtStart(e.src.slice(w-O.length));if(!D)return!1;let T=D.url;if(T.length<=O.length)return!1;T=T.replace(/\*+$/,"");const A=e.md.normalizeLink(T);if(!e.md.validateLink(A))return!1;if(!s){e.pending=e.pending.slice(0,-O.length);const s=e.push("link_open","a",1);s.attrs=[["href",A]],s.markup="linkify",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(T);const w=e.push("link_close","a",-1);w.markup="linkify",w.info="auto"}return e.pos+=T.length-O.length,!0}],["newline",function newline(e,s){let w=e.pos;if(10!==e.src.charCodeAt(w))return!1;const C=e.pending.length-1,O=e.posMax;if(!s)if(C>=0&&32===e.pending.charCodeAt(C))if(C>=1&&32===e.pending.charCodeAt(C-1)){let s=C-1;for(;s>=1&&32===e.pending.charCodeAt(s-1);)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(w++;w<O&&isSpace(e.src.charCodeAt(w));)w++;return e.pos=w,!0}],["escape",function escape(e,s){let w=e.pos;const C=e.posMax;if(92!==e.src.charCodeAt(w))return!1;if(w++,w>=C)return!1;let O=e.src.charCodeAt(w);if(10===O){for(s||e.push("hardbreak","br",0),w++;w<C&&(O=e.src.charCodeAt(w),isSpace(O));)w++;return e.pos=w,!0}let D=e.src[w];if(O>=55296&&O<=56319&&w+1<C){const s=e.src.charCodeAt(w+1);s>=56320&&s<=57343&&(D+=e.src[w+1],w++)}const T="\\"+D;if(!s){const s=e.push("text_special","",0);O<256&&0!==yt[O]?s.content=D:s.content=T,s.markup=T,s.info="escape"}return e.pos=w+1,!0}],["backticks",function backtick(e,s){let w=e.pos;if(96!==e.src.charCodeAt(w))return!1;const C=w;w++;const O=e.posMax;for(;w<O&&96===e.src.charCodeAt(w);)w++;const D=e.src.slice(C,w),T=D.length;if(e.backticksScanned&&(e.backticks[T]||0)<=C)return s||(e.pending+=D),e.pos+=T,!0;let A,B=w;for(;-1!==(A=e.src.indexOf("`",B));){for(B=A+1;B<O&&96===e.src.charCodeAt(B);)B++;const C=B-A;if(C===T){if(!s){const s=e.push("code_inline","code",0);s.markup=D,s.content=e.src.slice(w,A).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=B,!0}e.backticks[C]=A}return e.backticksScanned=!0,s||(e.pending+=D),e.pos+=T,!0}],["strikethrough",vt.tokenize],["emphasis",_t.tokenize],["link",function link(e,s){let w,C,O,D,T="",A="",B=e.pos,L=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const P=e.pos,M=e.posMax,I=e.pos+1,F=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(F<0)return!1;let $=F+1;if($<M&&40===e.src.charCodeAt($)){for(L=!1,$++;$<M&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);if($>=M)return!1;if(B=$,O=e.md.helpers.parseLinkDestination(e.src,$,e.posMax),O.ok){for(T=e.md.normalizeLink(O.str),e.md.validateLink(T)?$=O.pos:T="",B=$;$<M&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);if(O=e.md.helpers.parseLinkTitle(e.src,$,e.posMax),$<M&&B!==$&&O.ok)for(A=O.str,$=O.pos;$<M&&(w=e.src.charCodeAt($),isSpace(w)||10===w);$++);}($>=M||41!==e.src.charCodeAt($))&&(L=!0),$++}if(L){if(void 0===e.env.references)return!1;if($<M&&91===e.src.charCodeAt($)?(B=$+1,$=e.md.helpers.parseLinkLabel(e,$),$>=0?C=e.src.slice(B,$++):$=F+1):$=F+1,C||(C=e.src.slice(I,F)),D=e.env.references[normalizeReference(C)],!D)return e.pos=P,!1;T=D.href,A=D.title}if(!s){e.pos=I,e.posMax=F;const s=[["href",T]];e.push("link_open","a",1).attrs=s,A&&s.push(["title",A]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=$,e.posMax=M,!0}],["image",function image(e,s){let w,C,O,D,T,A,B,L,P="";const M=e.pos,I=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const F=e.pos+2,$=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if($<0)return!1;if(D=$+1,D<I&&40===e.src.charCodeAt(D)){for(D++;D<I&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);if(D>=I)return!1;for(L=D,A=e.md.helpers.parseLinkDestination(e.src,D,e.posMax),A.ok&&(P=e.md.normalizeLink(A.str),e.md.validateLink(P)?D=A.pos:P=""),L=D;D<I&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);if(A=e.md.helpers.parseLinkTitle(e.src,D,e.posMax),D<I&&L!==D&&A.ok)for(B=A.str,D=A.pos;D<I&&(w=e.src.charCodeAt(D),isSpace(w)||10===w);D++);else B="";if(D>=I||41!==e.src.charCodeAt(D))return e.pos=M,!1;D++}else{if(void 0===e.env.references)return!1;if(D<I&&91===e.src.charCodeAt(D)?(L=D+1,D=e.md.helpers.parseLinkLabel(e,D),D>=0?O=e.src.slice(L,D++):D=$+1):D=$+1,O||(O=e.src.slice(F,$)),T=e.env.references[normalizeReference(O)],!T)return e.pos=M,!1;P=T.href,B=T.title}if(!s){C=e.src.slice(F,$);const s=[];e.md.inline.parse(C,e.md,e.env,s);const w=e.push("image","img",0),O=[["src",P],["alt",""]];w.attrs=O,w.children=s,w.content=C,B&&O.push(["title",B])}return e.pos=D,e.posMax=I,!0}],["autolink",function autolink(e,s){let w=e.pos;if(60!==e.src.charCodeAt(w))return!1;const C=e.pos,O=e.posMax;for(;;){if(++w>=O)return!1;const s=e.src.charCodeAt(w);if(60===s)return!1;if(62===s)break}const D=e.src.slice(C+1,w);if(kt.test(D)){const w=e.md.normalizeLink(D);if(!e.md.validateLink(w))return!1;if(!s){const s=e.push("link_open","a",1);s.attrs=[["href",w]],s.markup="autolink",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(D);const C=e.push("link_close","a",-1);C.markup="autolink",C.info="auto"}return e.pos+=D.length+2,!0}if(bt.test(D)){const w=e.md.normalizeLink("mailto:"+D);if(!e.md.validateLink(w))return!1;if(!s){const s=e.push("link_open","a",1);s.attrs=[["href",w]],s.markup="autolink",s.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(D);const C=e.push("link_close","a",-1);C.markup="autolink",C.info="auto"}return e.pos+=D.length+2,!0}return!1}],["html_inline",function html_inline(e,s){if(!e.md.options.html)return!1;const w=e.posMax,C=e.pos;if(60!==e.src.charCodeAt(C)||C+2>=w)return!1;const O=e.src.charCodeAt(C+1);if(33!==O&&63!==O&&47!==O&&!function isLetter(e){const s=32|e;return s>=97&&s<=122}(O))return!1;const D=e.src.slice(C).match(pt);if(!D)return!1;if(!s){const s=e.push("html_inline","",0);s.content=D[0],function isLinkOpen(e){return/^<a[>\s]/i.test(e)}(s.content)&&e.linkLevel++,function isLinkClose(e){return/^<\/a\s*>/i.test(e)}(s.content)&&e.linkLevel--}return e.pos+=D[0].length,!0}],["entity",function entity(e,s){const w=e.pos,C=e.posMax;if(38!==e.src.charCodeAt(w))return!1;if(w+1>=C)return!1;if(35===e.src.charCodeAt(w+1)){const C=e.src.slice(w).match(Et);if(C){if(!s){const s="x"===C[1][0].toLowerCase()?parseInt(C[1].slice(1),16):parseInt(C[1],10),w=e.push("text_special","",0);w.content=isValidEntityCode(s)?fromCodePoint(s):fromCodePoint(65533),w.markup=C[0],w.info="entity"}return e.pos+=C[0].length,!0}}else{const C=e.src.slice(w).match(xt);if(C){const w=decodeHTML(C[0]);if(w!==C[0]){if(!s){const s=e.push("text_special","",0);s.content=w,s.markup=C[0],s.info="entity"}return e.pos+=C[0].length,!0}}}return!1}]],wt=[["balance_pairs",function link_pairs(e){const s=e.tokens_meta,w=e.tokens_meta.length;processDelimiters(e.delimiters);for(let e=0;e<w;e++)s[e]&&s[e].delimiters&&processDelimiters(s[e].delimiters)}],["strikethrough",vt.postProcess],["emphasis",_t.postProcess],["fragments_join",function fragments_join(e){let s,w,C=0;const O=e.tokens,D=e.tokens.length;for(s=w=0;s<D;s++)O[s].nesting<0&&C--,O[s].level=C,O[s].nesting>0&&C++,"text"===O[s].type&&s+1<D&&"text"===O[s+1].type?O[s+1].content=O[s].content+O[s+1].content:(s!==w&&(O[w]=O[s]),w++);s!==w&&(O.length=w)}]];function ParserInline(){this.ruler=new Ruler;for(let e=0;e<St.length;e++)this.ruler.push(St[e][0],St[e][1]);this.ruler2=new Ruler;for(let e=0;e<wt.length;e++)this.ruler2.push(wt[e][0],wt[e][1])}function assign(e){return Array.prototype.slice.call(arguments,1).forEach((function(s){s&&Object.keys(s).forEach((function(w){e[w]=s[w]}))})),e}function _class(e){return Object.prototype.toString.call(e)}function isFunction(e){return"[object Function]"===_class(e)}function escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}ParserInline.prototype.skipToken=function(e){const s=e.pos,w=this.ruler.getRules(""),C=w.length,O=e.md.options.maxNesting,D=e.cache;if(void 0!==D[s])return void(e.pos=D[s]);let T=!1;if(e.level<O){for(let O=0;O<C;O++)if(e.level++,T=w[O](e,!0),e.level--,T){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;T||e.pos++,D[s]=e.pos},ParserInline.prototype.tokenize=function(e){const s=this.ruler.getRules(""),w=s.length,C=e.posMax,O=e.md.options.maxNesting;for(;e.pos<C;){const D=e.pos;let T=!1;if(e.level<O)for(let C=0;C<w;C++)if(T=s[C](e,!1),T){if(D>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(T){if(e.pos>=C)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},ParserInline.prototype.parse=function(e,s,w,C){const O=new this.State(e,s,w,C);this.tokenize(O);const D=this.ruler2.getRules(""),T=D.length;for(let e=0;e<T;e++)D[e](O)},ParserInline.prototype.State=StateInline;const Ct={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const Ot={"http:":{validate:function(e,s,w){const C=e.slice(s);return w.re.http||(w.re.http=new RegExp("^\\/\\/"+w.re.src_auth+w.re.src_host_port_strict+w.re.src_path,"i")),w.re.http.test(C)?C.match(w.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,s,w){const C=e.slice(s);return w.re.no_http||(w.re.no_http=new RegExp("^"+w.re.src_auth+"(?:localhost|(?:(?:"+w.re.src_domain+")\\.)+"+w.re.src_domain_root+")"+w.re.src_port+w.re.src_host_terminator+w.re.src_path,"i")),w.re.no_http.test(C)?s>=3&&":"===e[s-3]||s>=3&&"/"===e[s-3]?0:C.match(w.re.no_http)[0].length:0}},"mailto:":{validate:function(e,s,w){const C=e.slice(s);return w.re.mailto||(w.re.mailto=new RegExp("^"+w.re.src_email_name+"@"+w.re.src_host_strict,"i")),w.re.mailto.test(C)?C.match(w.re.mailto)[0].length:0}}},Dt="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function compile(e){const s=e.re=function reFactory(e){const s={};e=e||{},s.src_Any=H.source,s.src_Cc=z.source,s.src_Z=X.source,s.src_P=W.source,s.src_ZPCc=[s.src_Z,s.src_P,s.src_Cc].join("|"),s.src_ZCc=[s.src_Z,s.src_Cc].join("|");const w="[><|]";return s.src_pseudo_letter="(?:(?![><|]|"+s.src_ZPCc+")"+s.src_Any+")",s.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",s.src_auth="(?:(?:(?!"+s.src_ZCc+"|[@/\\[\\]()]).)+@)?",s.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",s.src_host_terminator="(?=$|[><|]|"+s.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+s.src_ZPCc+"))",s.src_path="(?:[/?#](?:(?!"+s.src_ZCc+"|"+w+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+s.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+s.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+s.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+s.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+s.src_ZCc+"|[']).)+\\'|\\'(?="+s.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+s.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+s.src_ZCc+"|$)|;(?!"+s.src_ZCc+"|$)|\\!+(?!"+s.src_ZCc+"|[!]|$)|\\?(?!"+s.src_ZCc+"|[?]|$))+|\\/)?",s.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',s.src_xn="xn--[a-z0-9\\-]{1,59}",s.src_domain_root="(?:"+s.src_xn+"|"+s.src_pseudo_letter+"{1,63})",s.src_domain="(?:"+s.src_xn+"|(?:"+s.src_pseudo_letter+")|(?:"+s.src_pseudo_letter+"(?:-|"+s.src_pseudo_letter+"){0,61}"+s.src_pseudo_letter+"))",s.src_host="(?:(?:(?:(?:"+s.src_domain+")\\.)*"+s.src_domain+"))",s.tpl_host_fuzzy="(?:"+s.src_ip4+"|(?:(?:(?:"+s.src_domain+")\\.)+(?:%TLDS%)))",s.tpl_host_no_ip_fuzzy="(?:(?:(?:"+s.src_domain+")\\.)+(?:%TLDS%))",s.src_host_strict=s.src_host+s.src_host_terminator,s.tpl_host_fuzzy_strict=s.tpl_host_fuzzy+s.src_host_terminator,s.src_host_port_strict=s.src_host+s.src_port+s.src_host_terminator,s.tpl_host_port_fuzzy_strict=s.tpl_host_fuzzy+s.src_port+s.src_host_terminator,s.tpl_host_port_no_ip_fuzzy_strict=s.tpl_host_no_ip_fuzzy+s.src_port+s.src_host_terminator,s.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+s.src_ZPCc+"|>|$))",s.tpl_email_fuzzy='(^|[><|]|"|\\(|'+s.src_ZCc+")("+s.src_email_name+"@"+s.tpl_host_fuzzy_strict+")",s.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+s.src_ZPCc+"))((?![$+<=>^`||])"+s.tpl_host_port_fuzzy_strict+s.src_path+")",s.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+s.src_ZPCc+"))((?![$+<=>^`||])"+s.tpl_host_port_no_ip_fuzzy_strict+s.src_path+")",s}(e.__opts__),w=e.__tlds__.slice();function untpl(e){return e.replace("%TLDS%",s.src_tlds)}e.onCompile(),e.__tlds_replaced__||w.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),w.push(s.src_xn),s.src_tlds=w.join("|"),s.email_fuzzy=RegExp(untpl(s.tpl_email_fuzzy),"i"),s.link_fuzzy=RegExp(untpl(s.tpl_link_fuzzy),"i"),s.link_no_ip_fuzzy=RegExp(untpl(s.tpl_link_no_ip_fuzzy),"i"),s.host_fuzzy_test=RegExp(untpl(s.tpl_host_fuzzy_test),"i");const C=[];function schemaError(e,s){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+s)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(s){const w=e.__schemas__[s];if(null===w)return;const O={validate:null,link:null};if(e.__compiled__[s]=O,function isObject$4(e){return"[object Object]"===_class(e)}(w))return!function isRegExp(e){return"[object RegExp]"===_class(e)}(w.validate)?isFunction(w.validate)?O.validate=w.validate:schemaError(s,w):O.validate=function createValidator(e){return function(s,w){const C=s.slice(w);return e.test(C)?C.match(e)[0].length:0}}(w.validate),void(isFunction(w.normalize)?O.normalize=w.normalize:w.normalize?schemaError(s,w):O.normalize=function(e,s){s.normalize(e)});!function isString(e){return"[object String]"===_class(e)}(w)?schemaError(s,w):C.push(s)})),C.forEach((function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,s){s.normalize(e)}};const O=Object.keys(e.__compiled__).filter((function(s){return s.length>0&&e.__compiled__[s]})).map(escapeRE).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+s.src_ZPCc+"))("+O+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+s.src_ZPCc+"))("+O+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function resetScanCache(e){e.__index__=-1,e.__text_cache__=""}(e)}function Match(e,s){const w=e.__index__,C=e.__last_index__,O=e.__text_cache__.slice(w,C);this.schema=e.__schema__.toLowerCase(),this.index=w+s,this.lastIndex=C+s,this.raw=O,this.text=O,this.url=O}function createMatch(e,s){const w=new Match(e,s);return e.__compiled__[w.schema].normalize(w,e),w}function LinkifyIt(e,s){if(!(this instanceof LinkifyIt))return new LinkifyIt(e,s);s||function isOptionsObj(e){return Object.keys(e||{}).reduce((function(e,s){return e||Ct.hasOwnProperty(s)}),!1)}(e)&&(s=e,e={}),this.__opts__=assign({},Ct,s),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=assign({},Ot,e),this.__compiled__={},this.__tlds__=Dt,this.__tlds_replaced__=!1,this.re={},compile(this)}LinkifyIt.prototype.add=function add(e,s){return this.__schemas__[e]=s,compile(this),this},LinkifyIt.prototype.set=function set(e){return this.__opts__=assign(this.__opts__,e),this},LinkifyIt.prototype.test=function test(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let s,w,C,O,D,T,A,B,L;if(this.re.schema_test.test(e))for(A=this.re.schema_search,A.lastIndex=0;null!==(s=A.exec(e));)if(O=this.testSchemaAt(e,s[2],A.lastIndex),O){this.__schema__=s[2],this.__index__=s.index+s[1].length,this.__last_index__=s.index+s[0].length+O;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(B=e.search(this.re.host_fuzzy_test),B>=0&&(this.__index__<0||B<this.__index__)&&null!==(w=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(D=w.index+w[1].length,(this.__index__<0||D<this.__index__)&&(this.__schema__="",this.__index__=D,this.__last_index__=w.index+w[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(L=e.indexOf("@"),L>=0&&null!==(C=e.match(this.re.email_fuzzy))&&(D=C.index+C[1].length,T=C.index+C[0].length,(this.__index__<0||D<this.__index__||D===this.__index__&&T>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=D,this.__last_index__=T))),this.__index__>=0},LinkifyIt.prototype.pretest=function pretest(e){return this.re.pretest.test(e)},LinkifyIt.prototype.testSchemaAt=function testSchemaAt(e,s,w){return this.__compiled__[s.toLowerCase()]?this.__compiled__[s.toLowerCase()].validate(e,w,this):0},LinkifyIt.prototype.match=function match(e){const s=[];let w=0;this.__index__>=0&&this.__text_cache__===e&&(s.push(createMatch(this,w)),w=this.__last_index__);let C=w?e.slice(w):e;for(;this.test(C);)s.push(createMatch(this,w)),C=C.slice(this.__last_index__),w+=this.__last_index__;return s.length?s:null},LinkifyIt.prototype.matchAtStart=function matchAtStart(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const s=this.re.schema_at_start.exec(e);if(!s)return null;const w=this.testSchemaAt(e,s[2],s[0].length);return w?(this.__schema__=s[2],this.__index__=s.index+s[1].length,this.__last_index__=s.index+s[0].length+w,createMatch(this,0)):null},LinkifyIt.prototype.tlds=function tlds(e,s){return e=Array.isArray(e)?e:[e],s?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,s,w){return e!==w[s-1]})).reverse(),compile(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,compile(this),this)},LinkifyIt.prototype.normalize=function normalize(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},LinkifyIt.prototype.onCompile=function onCompile(){};const Tt=2147483647,At=36,Bt=/^xn--/,Lt=/[^\0-\x7F]/,Pt=/[\x2E\u3002\uFF0E\uFF61]/g,Mt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},It=Math.floor,Ft=String.fromCharCode;function error(e){throw new RangeError(Mt[e])}function mapDomain(e,s){const w=e.split("@");let C="";w.length>1&&(C=w[0]+"@",e=w[1]);const O=function map(e,s){const w=[];let C=e.length;for(;C--;)w[C]=s(e[C]);return w}((e=e.replace(Pt,".")).split("."),s).join(".");return C+O}function ucs2decode(e){const s=[];let w=0;const C=e.length;for(;w<C;){const O=e.charCodeAt(w++);if(O>=55296&&O<=56319&&w<C){const C=e.charCodeAt(w++);56320==(64512&C)?s.push(((1023&O)<<10)+(1023&C)+65536):(s.push(O),w--)}else s.push(O)}return s}const digitToBasic=function(e,s){return e+22+75*(e<26)-((0!=s)<<5)},adapt=function(e,s,w){let C=0;for(e=w?It(e/700):e>>1,e+=It(e/s);e>455;C+=At)e=It(e/35);return It(C+36*e/(e+38))},decode=function(e){const s=[],w=e.length;let C=0,O=128,D=72,T=e.lastIndexOf("-");T<0&&(T=0);for(let w=0;w<T;++w)e.charCodeAt(w)>=128&&error("not-basic"),s.push(e.charCodeAt(w));for(let B=T>0?T+1:0;B<w;){const T=C;for(let s=1,O=At;;O+=At){B>=w&&error("invalid-input");const T=(A=e.charCodeAt(B++))>=48&&A<58?A-48+26:A>=65&&A<91?A-65:A>=97&&A<123?A-97:At;T>=At&&error("invalid-input"),T>It((Tt-C)/s)&&error("overflow"),C+=T*s;const L=O<=D?1:O>=D+26?26:O-D;if(T<L)break;const P=At-L;s>It(Tt/P)&&error("overflow"),s*=P}const L=s.length+1;D=adapt(C-T,L,0==T),It(C/L)>Tt-O&&error("overflow"),O+=It(C/L),C%=L,s.splice(C++,0,O)}var A;return String.fromCodePoint(...s)},encode=function(e){const s=[],w=(e=ucs2decode(e)).length;let C=128,O=0,D=72;for(const w of e)w<128&&s.push(Ft(w));const T=s.length;let A=T;for(T&&s.push("-");A<w;){let w=Tt;for(const s of e)s>=C&&s<w&&(w=s);const B=A+1;w-C>It((Tt-O)/B)&&error("overflow"),O+=(w-C)*B,C=w;for(const w of e)if(w<C&&++O>Tt&&error("overflow"),w===C){let e=O;for(let w=At;;w+=At){const C=w<=D?1:w>=D+26?26:w-D;if(e<C)break;const O=e-C,T=At-C;s.push(Ft(digitToBasic(C+O%T,0))),e=It(O/T)}s.push(Ft(digitToBasic(e,0))),D=adapt(O,B,A===T),O=0,++A}++O,++C}return s.join("")},punycode_toASCII=function(e){return mapDomain(e,(function(e){return Lt.test(e)?"xn--"+encode(e):e}))},punycode_toUnicode=function(e){return mapDomain(e,(function(e){return Bt.test(e)?decode(e.slice(4).toLowerCase()):e}))};const $t={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Nt=/^(vbscript|javascript|file|data):/,Vt=/^data:image\/(gif|png|jpeg|webp);/;function validateLink(e){const s=e.trim().toLowerCase();return!Nt.test(s)||Vt.test(s)}const Rt=["http:","https:","mailto:"];function normalizeLink(e){const s=urlParse(e,!0);if(s.hostname&&(!s.protocol||Rt.indexOf(s.protocol)>=0))try{s.hostname=punycode_toASCII(s.hostname)}catch(e){}return encode$1(format(s))}function normalizeLinkText(e){const s=urlParse(e,!0);if(s.hostname&&(!s.protocol||Rt.indexOf(s.protocol)>=0))try{s.hostname=punycode_toUnicode(s.hostname)}catch(e){}return decode$1(format(s),decode$1.defaultChars+"%")}function MarkdownIt(e,s){if(!(this instanceof MarkdownIt))return new MarkdownIt(e,s);s||isString$1(e)||(s=e||{},e="default"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.linkify=new LinkifyIt,this.validateLink=validateLink,this.normalizeLink=normalizeLink,this.normalizeLinkText=normalizeLinkText,this.utils=de,this.helpers=assign$1({},pe),this.options={},this.configure(e),s&&this.set(s)}MarkdownIt.prototype.set=function(e){return assign$1(this.options,e),this},MarkdownIt.prototype.configure=function(e){const s=this;if(isString$1(e)){const s=e;if(!(e=$t[s]))throw new Error('Wrong `markdown-it` preset "'+s+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&s.set(e.options),e.components&&Object.keys(e.components).forEach((function(w){e.components[w].rules&&s[w].ruler.enableOnly(e.components[w].rules),e.components[w].rules2&&s[w].ruler2.enableOnly(e.components[w].rules2)})),this},MarkdownIt.prototype.enable=function(e,s){let w=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(s){w=w.concat(this[s].ruler.enable(e,!0))}),this),w=w.concat(this.inline.ruler2.enable(e,!0));const C=e.filter((function(e){return w.indexOf(e)<0}));if(C.length&&!s)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+C);return this},MarkdownIt.prototype.disable=function(e,s){let w=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(s){w=w.concat(this[s].ruler.disable(e,!0))}),this),w=w.concat(this.inline.ruler2.disable(e,!0));const C=e.filter((function(e){return w.indexOf(e)<0}));if(C.length&&!s)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+C);return this},MarkdownIt.prototype.use=function(e){const s=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,s),this},MarkdownIt.prototype.parse=function(e,s){if("string"!=typeof e)throw new Error("Input data should be a String");const w=new this.core.State(e,this,s);return this.core.process(w),w.tokens},MarkdownIt.prototype.render=function(e,s){return s=s||{},this.renderer.render(this.parse(e,s),this.options,s)},MarkdownIt.prototype.parseInline=function(e,s){const w=new this.core.State(e,this,s);return w.inlineMode=!0,this.core.process(w),w.tokens},MarkdownIt.prototype.renderInline=function(e,s){return s=s||{},this.renderer.render(this.parseInline(e,s),this.options,s)};var Ht=!1,zt={false:"push",true:"unshift",after:"push",before:"unshift"},Wt={isPermalinkSymbol:!0};function r(e,s,w,C){var O;if(!Ht){var D="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";"object"==typeof process&&process&&process.emitWarning?process.emitWarning(D):console.warn(D),Ht=!0}var T=[Object.assign(new w.Token("link_open","a",1),{attrs:[].concat(s.permalinkClass?[["class",s.permalinkClass]]:[],[["href",s.permalinkHref(e,w)]],Object.entries(s.permalinkAttrs(e,w)))}),Object.assign(new w.Token("html_block","",0),{content:s.permalinkSymbol,meta:Wt}),new w.Token("link_close","a",-1)];s.permalinkSpace&&w.tokens[C+1].children[zt[s.permalinkBefore]](Object.assign(new w.Token("text","",0),{content:" "})),(O=w.tokens[C+1].children)[zt[s.permalinkBefore]].apply(O,T)}function a(e){return"#"+e}function i(e){return{}}var jt={class:"header-anchor",symbol:"#",renderHref:a,renderAttrs:i};function o(e){function n(s){return s=Object.assign({},n.defaults,s),function(w,C,O,D){return e(w,s,C,O,D)}}return n.defaults=Object.assign({},jt),n.renderPermalinkImpl=e,n}function c(e){var s=[],w=e.filter((function(e){if("class"!==e[0])return!0;s.push(e[1])}));return s.length>0&&w.unshift(["class",s.join(" ")]),w}var Xt=o((function(e,s,w,C,O){var D,T=[Object.assign(new C.Token("link_open","a",1),{attrs:c([].concat(s.class?[["class",s.class]]:[],[["href",s.renderHref(e,C)]],s.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(s.renderAttrs(e,C))))}),Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}),new C.Token("link_close","a",-1)];if(s.space){var A="string"==typeof s.space?s.space:" ";C.tokens[O+1].children[zt[s.placement]](Object.assign(new C.Token("string"==typeof s.space?"html_inline":"text","",0),{content:A}))}(D=C.tokens[O+1].children)[zt[s.placement]].apply(D,T)}));Object.assign(Xt.defaults,{space:!0,placement:"after",ariaHidden:!1});var qt=o(Xt.renderPermalinkImpl);qt.defaults=Object.assign({},Xt.defaults,{ariaHidden:!0});var Yt=o((function(e,s,w,C,O){var D=[Object.assign(new C.Token("link_open","a",1),{attrs:c([].concat(s.class?[["class",s.class]]:[],[["href",s.renderHref(e,C)]],Object.entries(s.renderAttrs(e,C))))})].concat(s.safariReaderFix?[new C.Token("span_open","span",1)]:[],C.tokens[O+1].children,s.safariReaderFix?[new C.Token("span_close","span",-1)]:[],[new C.Token("link_close","a",-1)]);C.tokens[O+1]=Object.assign(new C.Token("inline","",0),{children:D})}));Object.assign(Yt.defaults,{safariReaderFix:!1});var Gt=o((function(e,s,w,C,O){var D;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(s.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+s.style+"`");if(!["aria-describedby","aria-labelledby"].includes(s.style)&&!s.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+s.style+"` style");if("visually-hidden"===s.style&&!s.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var T=C.tokens[O+1].children.filter((function(e){return"text"===e.type||"code_inline"===e.type})).reduce((function(e,s){return e+s.content}),""),A=[],B=[];if(s.class&&B.push(["class",s.class]),B.push(["href",s.renderHref(e,C)]),B.push.apply(B,Object.entries(s.renderAttrs(e,C))),"visually-hidden"===s.style){if(A.push(Object.assign(new C.Token("span_open","span",1),{attrs:[["class",s.visuallyHiddenClass]]}),Object.assign(new C.Token("text","",0),{content:s.assistiveText(T)}),new C.Token("span_close","span",-1)),s.space){var L="string"==typeof s.space?s.space:" ";A[zt[s.placement]](Object.assign(new C.Token("string"==typeof s.space?"html_inline":"text","",0),{content:L}))}A[zt[s.placement]](Object.assign(new C.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}),new C.Token("span_close","span",-1))}else A.push(Object.assign(new C.Token("html_inline","",0),{content:s.symbol,meta:Wt}));"aria-label"===s.style?B.push(["aria-label",s.assistiveText(T)]):["aria-describedby","aria-labelledby"].includes(s.style)&&B.push([s.style,e]);var P=[Object.assign(new C.Token("link_open","a",1),{attrs:c(B)})].concat(A,[new C.Token("link_close","a",-1)]);(D=C.tokens).splice.apply(D,[O+3,0].concat(P)),s.wrapper&&(C.tokens.splice(O,0,Object.assign(new C.Token("html_block","",0),{content:s.wrapper[0]+"\n"})),C.tokens.splice(O+3+P.length+1,0,Object.assign(new C.Token("html_block","",0),{content:s.wrapper[1]+"\n"})))}));function p(e,s,w,C){var O=e,D=C;if(w&&Object.prototype.hasOwnProperty.call(s,O))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(s,O);)O=e+"-"+D,D+=1;return s[O]=!0,O}function b(e,s){s=Object.assign({},b.defaults,s),e.core.ruler.push("anchor",(function(e){for(var w,C={},O=e.tokens,D=Array.isArray(s.level)?(w=s.level,function(e){return w.includes(e)}):function(e){return function(s){return s>=e}}(s.level),T=0;T<O.length;T++){var A=O[T];if("heading_open"===A.type&&D(Number(A.tag.substr(1)))){var B=s.getTokensText(O[T+1].children),L=A.attrGet("id");L=null==L?p(L=s.slugifyWithState?s.slugifyWithState(B,e):s.slugify(B),C,!1,s.uniqueSlugStartIndex):p(L,C,!0,s.uniqueSlugStartIndex),A.attrSet("id",L),!1!==s.tabIndex&&A.attrSet("tabindex",""+s.tabIndex),"function"==typeof s.permalink?s.permalink(L,s,e,T):(s.permalink||s.renderPermalink&&s.renderPermalink!==r)&&s.renderPermalink(L,s,e,T),T=O.indexOf(A),s.callback&&s.callback(A,{slug:L,title:B})}}}))}function render_footnote_anchor_name(e,s,w,C){const O=Number(e[s].meta.id+1).toString();let D="";return"string"==typeof C.docId&&(D=`-${C.docId}-`),D+O}function render_footnote_caption(e,s){let w=Number(e[s].meta.id+1).toString();return e[s].meta.subId>0&&(w+=`:${e[s].meta.subId}`),`[${w}]`}function render_footnote_ref(e,s,w,C,O){const D=O.rules.footnote_anchor_name(e,s,w,C,O),T=O.rules.footnote_caption(e,s,w,C,O);let A=D;return e[s].meta.subId>0&&(A+=`:${e[s].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${D}" id="fnref${A}">${T}</a></sup>`}function render_footnote_block_open(e,s,w){return(w.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function render_footnote_block_close(){return"</ol>\n</section>\n"}function render_footnote_open(e,s,w,C,O){let D=O.rules.footnote_anchor_name(e,s,w,C,O);return e[s].meta.subId>0&&(D+=`:${e[s].meta.subId}`),`<li id="fn${D}" class="footnote-item">`}function render_footnote_close(){return"</li>\n"}function render_footnote_anchor(e,s,w,C,O){let D=O.rules.footnote_anchor_name(e,s,w,C,O);return e[s].meta.subId>0&&(D+=`:${e[s].meta.subId}`),` <a href="#fnref${D}" class="footnote-backref">↩︎</a>`}function footnote_plugin(e){const s=e.helpers.parseLinkLabel,w=e.utils.isSpace;e.renderer.rules.footnote_ref=render_footnote_ref,e.renderer.rules.footnote_block_open=render_footnote_block_open,e.renderer.rules.footnote_block_close=render_footnote_block_close,e.renderer.rules.footnote_open=render_footnote_open,e.renderer.rules.footnote_close=render_footnote_close,e.renderer.rules.footnote_anchor=render_footnote_anchor,e.renderer.rules.footnote_caption=render_footnote_caption,e.renderer.rules.footnote_anchor_name=render_footnote_anchor_name,e.block.ruler.before("reference","footnote_def",(function footnote_def(e,s,C,O){const D=e.bMarks[s]+e.tShift[s],T=e.eMarks[s];if(D+4>T)return!1;if(91!==e.src.charCodeAt(D))return!1;if(94!==e.src.charCodeAt(D+1))return!1;let A;for(A=D+2;A<T;A++){if(32===e.src.charCodeAt(A))return!1;if(93===e.src.charCodeAt(A))break}if(A===D+2)return!1;if(A+1>=T||58!==e.src.charCodeAt(++A))return!1;if(O)return!0;A++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={});const B=e.src.slice(D+2,A-2);e.env.footnotes.refs[`:${B}`]=-1;const L=new e.Token("footnote_reference_open","",1);L.meta={label:B},L.level=e.level++,e.tokens.push(L);const P=e.bMarks[s],M=e.tShift[s],I=e.sCount[s],F=e.parentType,$=A,N=e.sCount[s]+A-(e.bMarks[s]+e.tShift[s]);let V=N;for(;A<T;){const s=e.src.charCodeAt(A);if(!w(s))break;9===s?V+=4-V%4:V++,A++}e.tShift[s]=A-$,e.sCount[s]=V-N,e.bMarks[s]=$,e.blkIndent+=4,e.parentType="footnote",e.sCount[s]<e.blkIndent&&(e.sCount[s]+=e.blkIndent),e.md.block.tokenize(e,s,C,!0),e.parentType=F,e.blkIndent-=4,e.tShift[s]=M,e.sCount[s]=I,e.bMarks[s]=P;const R=new e.Token("footnote_reference_close","",-1);return R.level=--e.level,e.tokens.push(R),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function footnote_inline(e,w){const C=e.posMax,O=e.pos;if(O+2>=C)return!1;if(94!==e.src.charCodeAt(O))return!1;if(91!==e.src.charCodeAt(O+1))return!1;const D=O+2,T=s(e,O+1);if(T<0)return!1;if(!w){e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]);const s=e.env.footnotes.list.length,w=[];e.md.inline.parse(e.src.slice(D,T),e.md,e.env,w);e.push("footnote_ref","",0).meta={id:s},e.env.footnotes.list[s]={content:e.src.slice(D,T),tokens:w}}return e.pos=T+1,e.posMax=C,!0})),e.inline.ruler.after("footnote_inline","footnote_ref",(function footnote_ref(e,s){const w=e.posMax,C=e.pos;if(C+3>w)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(C))return!1;if(94!==e.src.charCodeAt(C+1))return!1;let O;for(O=C+2;O<w;O++){if(32===e.src.charCodeAt(O))return!1;if(10===e.src.charCodeAt(O))return!1;if(93===e.src.charCodeAt(O))break}if(O===C+2)return!1;if(O>=w)return!1;O++;const D=e.src.slice(C+2,O-1);if(void 0===e.env.footnotes.refs[`:${D}`])return!1;if(!s){let s;e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[`:${D}`]<0?(s=e.env.footnotes.list.length,e.env.footnotes.list[s]={label:D,count:0},e.env.footnotes.refs[`:${D}`]=s):s=e.env.footnotes.refs[`:${D}`];const w=e.env.footnotes.list[s].count;e.env.footnotes.list[s].count++;e.push("footnote_ref","",0).meta={id:s,subId:w,label:D}}return e.pos=O,e.posMax=w,!0})),e.core.ruler.after("inline","footnote_tail",(function footnote_tail(e){let s,w,C,O=!1;const D={};if(!e.env.footnotes)return;if(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(O=!0,w=[],C=e.meta.label,!1):"footnote_reference_close"===e.type?(O=!1,D[":"+C]=w,!1):(O&&w.push(e),!O)})),!e.env.footnotes.list)return;const T=e.env.footnotes.list;e.tokens.push(new e.Token("footnote_block_open","",1));for(let w=0,C=T.length;w<C;w++){const C=new e.Token("footnote_open","",1);if(C.meta={id:w,label:T[w].label},e.tokens.push(C),T[w].tokens){s=[];const C=new e.Token("paragraph_open","p",1);C.block=!0,s.push(C);const O=new e.Token("inline","",0);O.children=T[w].tokens,O.content=T[w].content,s.push(O);const D=new e.Token("paragraph_close","p",-1);D.block=!0,s.push(D)}else T[w].label&&(s=D[`:${T[w].label}`]);let O;s&&(e.tokens=e.tokens.concat(s)),O="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null;const A=T[w].count>0?T[w].count:1;for(let s=0;s<A;s++){const C=new e.Token("footnote_anchor","",0);C.meta={id:w,subId:s,label:T[w].label},e.tokens.push(C)}O&&e.tokens.push(O),e.tokens.push(new e.Token("footnote_close","",-1))}e.tokens.push(new e.Token("footnote_block_close","",-1))}))}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Object.assign(Gt.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),b.permalink={__proto__:null,legacy:r,renderHref:a,renderAttrs:i,makePermalink:o,linkInsideHeader:Xt,ariaHidden:qt,headerLink:Yt,linkAfterHeader:Gt},b.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter((function(e){return["text","code_inline"].includes(e.type)})).map((function(e){return e.content})).join("")},permalink:!1,renderPermalink:r,permalinkClass:qt.defaults.class,permalinkSpace:qt.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===qt.defaults.placement,permalinkHref:qt.defaults.renderHref,permalinkAttrs:qt.defaults.renderAttrs},b.default=b;var Ut=getDefaultExportFromCjs((function front_matter_plugin(e,s){var w="-",C=w.charCodeAt(0);e.block.ruler.before("table","front_matter",(function frontMatter(e,O,D,T){var A,B,L,P,M,I,F,$=!1,N=e.bMarks[O]+e.tShift[O],V=e.eMarks[O];if(0!==O||C!==e.src.charCodeAt(0))return!1;for(A=N+1;A<=V;A++)if(w[(A-N)%1]!==e.src[A]){F=A+1;break}if((L=Math.floor((A-N)/1))<3)return!1;if(A-=(A-N)%1,T)return!0;for(B=O;!(++B>=D)&&"..."!==e.src.slice(N,V)&&!((N=e.bMarks[B]+e.tShift[B])<(V=e.eMarks[B])&&e.sCount[B]<e.blkIndent);)if(C===e.src.charCodeAt(N)&&!(e.sCount[B]-e.blkIndent>=4)){for(A=N+1;A<=V&&w[(A-N)%1]===e.src[A];A++);if(!(Math.floor((A-N)/1)<L||(A-=(A-N)%1,(A=e.skipSpaces(A))<V))){$=!0;break}}return M=e.parentType,I=e.lineMax,e.parentType="container",e.lineMax=B,(P=e.push("front_matter",null,0)).hidden=!0,P.markup=e.src.slice(O,A),P.block=!0,P.map=[O,B+($?1:0)],P.meta=e.src.slice(F,N-1),e.parentType=M,e.lineMax=I,e.line=B+($?1:0),s(P.meta),!0}),{alt:["paragraph","reference","blockquote","list"]})})),Zt=getDefaultExportFromCjs((function inject_linenumbers_plugin(e){function injectLineNumbers(e,s,w,C,O){var D;return e[s].map&&(D=e[s].map[0],e[s].attrJoin("class","source-line"),e[s].attrSet("data-source-line",String(D))),O.renderToken(e,s,w,C,O)}e.renderer.rules.paragraph_open=injectLineNumbers,e.renderer.rules.heading_open=injectLineNumbers,e.renderer.rules.list_item_open=injectLineNumbers,e.renderer.rules.table_open=injectLineNumbers}));const onRemove=(e,s)=>{const w=e.parentNode;if(!w)throw new Error("The node must already be attached");const C=new window.MutationObserver((w=>{for(const O of w)for(const w of O.removedNodes)w===e&&(C.disconnect(),s())}));C.observe(w,{childList:!0})},animateRectTransition=(e,s,w={})=>{if(!e.parentElement)throw new Error("The node must already be attached");const{width:C,height:O,left:D,top:T}=s,{width:A,height:B,left:L,top:P}=e.getBoundingClientRect(),M=(C??A)/A,I=(O??B)/B,F=D-L,$=T-P;if(0===F&&0===$||!isFinite(M)||!isFinite(I))return e.animate([],{duration:0});const N=[{transform:"translate(0, 0) scale(1, 1)",opacity:1},{transform:`translate(${F}px, ${$}px) scale(${M}, ${I})`,opacity:.3}];return!0===w.resume&&N.reverse(),e.animate(N,{duration:w.duration??500,easing:"ease-in-out"})};function throttle(e,s){let w=null;return function(...C){return null!==w?null:(w=setTimeout((()=>w=null),"function"==typeof s?s.call(this):s),e.call(this,...C))}}const shiftByWindow=e=>{const s=e.getBoundingClientRect(),w=window.innerWidth-s.left-s.width,C=window.innerHeight-s.top-s.height;e.style.transform=`translate(${w<0?w:0}px, ${C<0?C:0}px)`};var Kt,Jt=1e3/60,Qt=[],en=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,Jt)},tn=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},nn=Date.now();function step$1(){var e,s;Kt&&(tn.call(window,Kt),Kt=null),Qt.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(nn=Date.now(),s=!0):Date.now()-nn<500&&(s=!0),s&&(Kt=en.call(window,step$1))}function indexOfTasks$1(e){var s=-1;return Qt.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}var rn=function add(e){var s;return-1===indexOfTasks$1(e)?(Qt.push(s={listener:e}),function(e){s.event=e,Kt||step$1()}):null};function _defineProperties$6(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var an=[],sn=[],ln=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){ln=!0}}))}catch(error){}function addEventListenerWithOptions$1(e,s,w,C){e.addEventListener(s,w,ln?C:C.capture)}function getPointsLength$1(e,s){var w=e.x-s.x,C=e.y-s.y;return Math.sqrt(w*w+C*C)}function getTouchById$1(e,s){if(null!=e&&null!=s)for(var w=0;w<e.length;w++)if(e[w].identifier===s)return e[w];return null}function hasXY$1(e){return e&&"number"==typeof e.clientX&&"number"==typeof e.clientY}function dragstart$1(e){e.preventDefault()}var cn=function(){function PointerEvent(e){var s=this;!function _classCallCheck$6(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PointerEvent),this.startHandlers={},this.lastHandlerId=0,this.curPointerClass=null,this.curTouchId=null,this.lastPointerXY={clientX:0,clientY:0},this.lastTouchTime=0,this.options={preventDefault:!0,stopPropagation:!0},e&&["preventDefault","stopPropagation"].forEach((function(w){"boolean"==typeof e[w]&&(s.options[w]=e[w])}))}return function _createClass$6(e,s,w){return s&&_defineProperties$6(e.prototype,s),w&&_defineProperties$6(e,w),e}(PointerEvent,[{key:"regStartHandler",value:function regStartHandler(e){var s=this;return s.startHandlers[++s.lastHandlerId]=function(w){var C,O,D="mousedown"===w.type?"mouse":"touch",T=Date.now();if("touch"===D)s.lastTouchTime=T,C=w.changedTouches[0],O=w.changedTouches[0].identifier;else{if(T-s.lastTouchTime<400)return;C=w}if(!hasXY$1(C))throw new Error("No clientX/clientY");s.curPointerClass&&s.cancel(),e.call(s,C)&&(s.curPointerClass=D,s.curTouchId="touch"===D?O:null,s.lastPointerXY.clientX=C.clientX,s.lastPointerXY.clientY=C.clientY,s.options.preventDefault&&w.preventDefault(),s.options.stopPropagation&&w.stopPropagation())},s.lastHandlerId}},{key:"unregStartHandler",value:function unregStartHandler(e){delete this.startHandlers[e]}},{key:"addStartHandler",value:function addStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return addEventListenerWithOptions$1(e,"mousedown",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchstart",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"dragstart",dragstart$1,{capture:!1,passive:!1}),s}},{key:"removeStartHandler",value:function removeStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return e.removeEventListener("mousedown",this.startHandlers[s],!1),e.removeEventListener("touchstart",this.startHandlers[s],!1),e.removeEventListener("dragstart",dragstart$1,!1),s}},{key:"addMoveHandler",value:function addMoveHandler(e,s,w){var C=this;function handler(e){var s="mousemove"===e.type?"mouse":"touch";if("touch"===s&&(C.lastTouchTime=Date.now()),s===C.curPointerClass){var w="touch"===s?getTouchById$1(e.changedTouches,C.curTouchId):e;hasXY$1(w)&&(w.clientX===C.lastPointerXY.clientX&&w.clientY===C.lastPointerXY.clientY||C.move(w),C.options.preventDefault&&e.preventDefault(),C.options.stopPropagation&&e.stopPropagation())}}var O=w?handler:rn(handler);addEventListenerWithOptions$1(e,"mousemove",O,{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchmove",O,{capture:!1,passive:!1}),C.curMoveHandler=s}},{key:"move",value:function move(e){hasXY$1(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curMoveHandler&&this.curMoveHandler(this.lastPointerXY)}},{key:"addEndHandler",value:function addEndHandler(e,s){var w=this;function wrappedHandler(e){var s="mouseup"===e.type?"mouse":"touch";if("touch"===s&&(w.lastTouchTime=Date.now()),s===w.curPointerClass){var C="touch"===s?getTouchById$1(e.changedTouches,w.curTouchId)||(getTouchById$1(e.touches,w.curTouchId)?null:{}):e;C&&(w.end(C),w.options.preventDefault&&e.preventDefault(),w.options.stopPropagation&&e.stopPropagation())}}addEventListenerWithOptions$1(e,"mouseup",wrappedHandler,{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchend",wrappedHandler,{capture:!1,passive:!1}),w.curEndHandler=s}},{key:"end",value:function end(e){hasXY$1(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curEndHandler&&this.curEndHandler(this.lastPointerXY),this.curPointerClass=this.curTouchId=null}},{key:"addCancelHandler",value:function addCancelHandler(e,s){var w=this;addEventListenerWithOptions$1(e,"touchcancel",(function wrappedHandler(e){w.lastTouchTime=Date.now(),null!=w.curPointerClass&&(getTouchById$1(e.changedTouches,w.curTouchId)||(getTouchById$1(e.touches,w.curTouchId)?null:{}))&&w.cancel()}),{capture:!1,passive:!1}),w.curCancelHandler=s}},{key:"cancel",value:function cancel(){this.curCancelHandler&&this.curCancelHandler(),this.curPointerClass=this.curTouchId=null}}],[{key:"addEventListenerWithOptions",get:function get(){return addEventListenerWithOptions$1}},{key:"initClickEmulator",value:function initClickEmulator(e,s,w){if(an.includes(e))return e;an.push(e);var C,O,D,T;return null==s&&(s=16),null==w&&(w=400),addEventListenerWithOptions$1(e,"touchstart",(function(e){var s=e.changedTouches[0];C=s.clientX,O=s.clientY,D=s.identifier,T=performance.now()}),{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchend",(function(A){var B=getTouchById$1(A.changedTouches,D);"number"==typeof C&&"number"==typeof O&&"number"==typeof T&&B&&"number"==typeof B.clientX&&"number"==typeof B.clientY&&getPointsLength$1({x:C,y:O},{x:B.clientX,y:B.clientY})<=s&&performance.now()-T<=w&&setTimeout((function(){var s=new MouseEvent("click",{clientX:B.clientX,clientY:B.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=T=null}),{capture:!1,passive:!1}),addEventListenerWithOptions$1(e,"touchcancel",(function(){C=O=D=T=null}),{capture:!1,passive:!1}),e}},{key:"initDblClickEmulator",value:function initDblClickEmulator(e,s,w){if(sn.includes(e))return e;sn.push(e);var C,O,D;return null==s&&(s=16),null==w&&(w=400),PointerEvent.initClickEmulator(e,s,w),addEventListenerWithOptions$1(e,"click",(function(T){T.emulated&&"number"==typeof T.clientX&&"number"==typeof T.clientY&&("number"==typeof C&&getPointsLength$1({x:C,y:O},{x:T.clientX,y:T.clientY})<=s&&performance.now()-D<=2*w?(setTimeout((function(){var s=new MouseEvent("dblclick",{clientX:T.clientX,clientY:T.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=null):(C=T.clientX,O=T.clientY,D=performance.now()))}),{capture:!1,passive:!1}),e}}]),PointerEvent}();function ucf$1(e){return e.substr(0,1).toUpperCase()+e.substr(1)}var un,dn,pn,hn=["webkit","moz","ms","o"],fn=hn.reduce((function(e,s){return e.push(s),e.push(ucf$1(s)),e}),[]),mn=hn.map((function(e){return"-".concat(e,"-")})),gn=function(){var e;return function(){return e=e||document.createElement("div").style}}(),yn=(dn=new RegExp("^(?:"+hn.join("|")+")(.)","i"),pn=/[A-Z]/,function(e){return"float"===(e=(e+"").replace(/\s/g,"").replace(/-([\da-z])/gi,(function(e,s){return s.toUpperCase()})).replace(dn,(function(e,s){return pn.test(s)?s.toLowerCase():e}))).toLowerCase()?"cssFloat":e}),vn=(un=new RegExp("^(?:"+mn.join("|")+")","i"),function(e){return(null!=e?e+"":"").replace(/\s/g,"").replace(un,"")}),cssSupports$1=function(e,s){var w=gn();return e=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),w.setProperty(e,s),null!=w[e]&&w.getPropertyValue(e)===s},_n={},bn={};function getName$1(e){if((e=yn(e))&&null==_n[e]){var s=gn();if(null!=s[e])_n[e]=e;else{var w=ucf$1(e);fn.some((function(C){var O=C+w;return null!=s[O]&&(_n[e]=O,!0)}))||(_n[e]=!1)}}return _n[e]||void 0}var kn={getName:getName$1,getValue:function getValue$1(e,s){var w;return(e=getName$1(e))?(bn[e]=bn[e]||{},(Array.isArray(s)?s:[s]).some((function(s){return s=vn(s),null!=bn[e][s]?!1!==bn[e][s]&&(w=bn[e][s],!0):cssSupports$1(e,s)?(w=bn[e][s]=s,!0):!!mn.some((function(C){var O=C+s;return!!cssSupports$1(e,O)&&(w=bn[e][s]=O,!0)}))||(bn[e][s]=!1,!1)})),"string"==typeof w?w:void 0):w}};function normalize$1(e){return(e+"").trim()}function applyList$1(e,s){s.setAttribute("class",e.join(" "))}function mClassList$1(e){return!mClassList$1.ignoreNative&&e.classList||function(){var s=(e.getAttribute("class")||"").trim().split(/\s+/).filter((function(e){return!!e})),w={length:s.length,item:function item(e){return s[e]},contains:function contains(e){return-1!==s.indexOf(normalize$1(e))},add:function add(){return function _add$1(e,s,w){w.filter((function(s){return!(!(s=normalize$1(s))||-1!==e.indexOf(s)||(e.push(s),0))})).length&&applyList$1(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList$1.methodChain?w:void 0},remove:function remove(){return function _remove$1(e,s,w){w.filter((function(s){var w;return!(!(s=normalize$1(s))||-1===(w=e.indexOf(s))||(e.splice(w,1),0))})).length&&applyList$1(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList$1.methodChain?w:void 0},toggle:function toggle(w,C){return function _toggle$1(e,s,w,C){var O=e.indexOf(w=normalize$1(w));return-1!==O?!!C||(e.splice(O,1),applyList$1(e,s),!1):!1!==C&&(e.push(w),applyList$1(e,s),!0)}(s,e,w,C)},replace:function replace(C,O){return function _replace$1(e,s,w,C){var O;(w=normalize$1(w))&&(C=normalize$1(C))&&w!==C&&-1!==(O=e.indexOf(w))&&(e.splice(O,1),-1===e.indexOf(C)&&e.push(C),applyList$1(e,s))}(s,e,C,O),mClassList$1.methodChain?w:void 0}};return w}()}function _defineProperties$5(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}mClassList$1.methodChain=!0,mClassList$1.ignoreNative=!0;var En,xn,Sn,wn,Cn,On,Dn,Tn,An,Bn,Ln,Pn,Mn,In=["tl","tr","bl","br"],Fn=["start","end"],$n=["inside","outside"],Nn=[40,200,1e3],Vn=[100,40,0],Rn="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Hn=!Rn&&!!document.uniqueID,zn="MozAppearance"in document.documentElement.style,Wn=!(Rn||zn||!window.chrome||!window.CSS),jn=!(Rn||Hn||zn||Wn||window.chrome||!("WebkitAppearance"in document.documentElement.style)),Xn=(En={}.toString,xn={}.hasOwnProperty.toString,Sn=xn.call(Object),function(e){var s,w;return e&&"[object Object]"===En.call(e)&&(!(s=Object.getPrototypeOf(e))||(w=s.hasOwnProperty("constructor")&&s.constructor)&&"function"==typeof w&&xn.call(w)===Sn)}),qn=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},Yn={},Gn={},Un=new cn,Zn=0,Kn=jn?["all-scroll","move"]:["grab","all-scroll","move"],Jn=jn?"move":["grabbing","move"],Qn="plain-draggable",eo="plain-draggable-dragging",to="plain-draggable-moving",no={},oo=1e3/60,ro=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,oo)},io=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)};{var ao,so,lo,co={};function frameUpdate(){var e=Date.now();["x","y"].forEach((function(s){var w=co[s];if(w){var C=e-w.lastFrameTime,O=so(ao,s),D=null!=w.lastValue&&Math.abs(w.lastValue-O)<10?w.lastValue:O;if(-1===w.dir?D>w.min:D<w.max){var T=D+w.speed*C*w.dir;T<w.min?T=w.min:T>w.max&&(T=w.max),so(ao,s,T),w.lastValue=T}w.lastFrameTime=e}}))}function frame(){io.call(window,lo),frameUpdate(),lo=ro.call(window,frame)}no.move=function(e,s,w){io.call(window,lo),frameUpdate(),ao===e&&(s.x&&co.x&&(s.x.lastValue=co.x.lastValue),s.y&&co.y&&(s.y.lastValue=co.y.lastValue)),ao=e,co=s,so=w;var C=Date.now();["x","y"].forEach((function(e){var s=co[e];s&&(s.lastFrameTime=C)})),lo=ro.call(window,frame)},no.stop=function(){io.call(window,lo),frameUpdate(),co={},ao=null}}function scrollXYWindow$1(e,s,w){return null!=w&&("x"===s?e.scrollTo(w,e.pageYOffset):e.scrollTo(e.pageXOffset,w)),"x"===s?e.pageXOffset:e.pageYOffset}function scrollXYElement$1(e,s,w){var C="x"===s?"scrollLeft":"scrollTop";return null!=w&&(e[C]=w),e[C]}function copyTree$1(e){return e?Xn(e)?Object.keys(e).reduce((function(s,w){return s[w]=copyTree$1(e[w]),s}),{}):Array.isArray(e)?e.map(copyTree$1):e:e}function hasChanged$1(e,s){var w,C;return _typeof$1(e)!==_typeof$1(s)||(w=Xn(e)?"obj":Array.isArray(e)?"array":"")!=(Xn(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?hasChanged$1(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return hasChanged$1(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return hasChanged$1(e,s[w])})):e!==s)}function isElement$2(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function validBBox$1(e){if(!Xn(e))return null;var s;if(!qn(s=e.left)&&!qn(s=e.x))return null;if(e.left=e.x=s,!qn(s=e.top)&&!qn(s=e.y))return null;if(e.top=e.y=s,qn(e.width)&&e.width>=0)e.right=e.left+e.width;else{if(!(qn(e.right)&&e.right>=e.left))return null;e.width=e.right-e.left}if(qn(e.height)&&e.height>=0)e.bottom=e.top+e.height;else{if(!(qn(e.bottom)&&e.bottom>=e.top))return null;e.height=e.bottom-e.top}return e}function validPPValue$1(e){return qn(e)?{value:e,isRatio:!1}:"string"==typeof e?function string2PPValue(e){var s,w,C=/^(.+?)(%)?$/.exec(e);return C&&qn(s=parseFloat(C[1]))?{value:(w=!(!C[2]||!s))?s/100:s,isRatio:w}:null}(e.replace(/\s/g,"")):null}function ppValue2OptionValue$1(e){return e.isRatio?"".concat(100*e.value,"%"):e.value}function resolvePPValue$1(e,s,w){return"number"==typeof e?e:s+e.value*(e.isRatio?w:1)}function validPPBBox$1(e){if(!Xn(e))return null;var s;if(!(s=validPPValue$1(e.left))&&!(s=validPPValue$1(e.x)))return null;if(e.left=e.x=s,!(s=validPPValue$1(e.top))&&!(s=validPPValue$1(e.y)))return null;if(e.top=e.y=s,(s=validPPValue$1(e.width))&&s.value>=0)e.width=s,delete e.right;else{if(!(s=validPPValue$1(e.right)))return null;e.right=s,delete e.width}if((s=validPPValue$1(e.height))&&s.value>=0)e.height=s,delete e.bottom;else{if(!(s=validPPValue$1(e.bottom)))return null;e.bottom=s,delete e.height}return e}function ppBBox2OptionObject$1(e){return Object.keys(e).reduce((function(s,w){return s[w]=ppValue2OptionValue$1(e[w]),s}),{})}function resolvePPBBox$1(e,s){var w={left:"x",right:"x",x:"x",width:"x",top:"y",bottom:"y",y:"y",height:"y"},C={x:s.left,y:s.top},O={x:s.width,y:s.height};return validBBox$1(Object.keys(e).reduce((function(s,D){return s[D]=resolvePPValue$1(e[D],"width"===D||"height"===D?0:C[w[D]],O[w[D]]),s}),{}))}function getBBox$2(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,width:w.width,height:w.height};if(C.left+=window.pageXOffset,C.top+=window.pageYOffset,s){var O=window.getComputedStyle(e,""),D=parseFloat(O.borderTopWidth)||0,T=parseFloat(O.borderRightWidth)||0,A=parseFloat(O.borderBottomWidth)||0,B=parseFloat(O.borderLeftWidth)||0;C.left+=B,C.top+=D,C.width-=B+T,C.height-=D+A}return validBBox$1(C)}function setDraggableCursor$1(e,s){null==Dn&&(!1!==Kn&&(Dn=kn.getValue("cursor",Kn)),null==Dn&&(Dn=!1)),e.style.cursor=!1===Dn?s:Dn}function setDraggingCursor$1(e){null==Tn&&(!1!==Jn&&(Tn=kn.getValue("cursor",Jn)),null==Tn&&(Tn=!1)),!1!==Tn&&(e.style.cursor=Tn)}function viewPoint2SvgPoint$1(e,s,w){var C=e.svgPoint;return C.x=s,C.y=w,C.matrixTransform(e.svgCtmElement.getScreenCTM().inverse())}function moveTranslate$1(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.htmlOffset;return e.elementStyle[Ln]="translate(".concat(s.left+C.left,"px, ").concat(s.top+C.top,"px)"),!0}return!1}function moveLeftTop$1(e,s){var w=e.elementBBox,C=e.elementStyle,O=e.htmlOffset,D=!1;return s.left!==w.left&&(C.left=s.left+O.left+"px",D=!0),s.top!==w.top&&(C.top=s.top+O.top+"px",D=!0),D}function moveSvg$1(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.svgOffset,O=e.svgOriginBBox,D=viewPoint2SvgPoint$1(e,s.left-window.pageXOffset,s.top-window.pageYOffset);return e.svgTransform.setTranslate(D.x+C.x-O.x,D.y+C.y-O.y),!0}return!1}function move$1(e,s,w){var C=e.elementBBox;function fix(){e.minLeft>=e.maxLeft?s.left=C.left:s.left<e.minLeft?s.left=e.minLeft:s.left>e.maxLeft&&(s.left=e.maxLeft),e.minTop>=e.maxTop?s.top=C.top:s.top<e.minTop?s.top=e.minTop:s.top>e.maxTop&&(s.top=e.maxTop)}if(fix(),w){if(!1===w(s))return!1;fix()}var O=e.moveElm(e,s);return O&&(e.elementBBox=validBBox$1({left:s.left,top:s.top,width:C.width,height:C.height})),O}function initTranslate$1(e){var s=e.element,w=e.elementStyle,C=getBBox$2(s),O=["display","marginTop","marginBottom","width","height"];O.unshift(Ln);var D=w[Bn];w[Bn]="none";var T=getBBox$2(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var A=getBBox$2(s),B=window.getComputedStyle(s,"");"inline"===B.display&&(w.display="inline-block",["Top","Bottom"].forEach((function(e){var s=parseFloat(B["padding".concat(e)]);w["margin".concat(e)]=s?"-".concat(s,"px"):"0"}))),w[Ln]="translate(0, 0)";var L=getBBox$2(s),P=e.htmlOffset={left:L.left?-L.left:0,top:L.top?-L.top:0};return w[Ln]="translate(".concat(C.left+P.left,"px, ").concat(C.top+P.top,"px)"),["width","height"].forEach((function(C){L[C]!==A[C]&&(w[C]=A[C]+"px",(L=getBBox$2(s))[C]!==A[C]&&(w[C]=A[C]-(L[C]-A[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[Bn]=D,T.left===C.left&&T.top===C.top||(w[Ln]="translate(".concat(T.left+P.left,"px, ").concat(T.top+P.top,"px)")),T}function initLeftTop$1(e){var s=e.element,w=e.elementStyle,C=getBBox$2(s),O=["position","marginTop","marginRight","marginBottom","marginLeft","width","height"],D=w[Bn];w[Bn]="none";var T=getBBox$2(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var A=getBBox$2(s);w.position="absolute",w.left=w.top=w.margin="0";var B=getBBox$2(s),L=e.htmlOffset={left:B.left?-B.left:0,top:B.top?-B.top:0};return w.left=C.left+L.left+"px",w.top=C.top+L.top+"px",["width","height"].forEach((function(C){B[C]!==A[C]&&(w[C]=A[C]+"px",(B=getBBox$2(s))[C]!==A[C]&&(w[C]=A[C]-(B[C]-A[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[Bn]=D,T.left===C.left&&T.top===C.top||(w.left=T.left+L.left+"px",w.top=T.top+L.top+"px"),T}function initSvg$1(e){var s=e.element,w=e.svgTransform,C=s.getBoundingClientRect(),O=getBBox$2(s);w.setTranslate(0,0);var D=e.svgOriginBBox=s.getBBox(),T=s.getBoundingClientRect(),A=viewPoint2SvgPoint$1(e,T.left,T.top),B=e.svgOffset={x:D.x-A.x,y:D.y-A.y},L=viewPoint2SvgPoint$1(e,C.left,C.top);return w.setTranslate(L.x+B.x-D.x,L.y+B.y-D.y),O}function initBBox$1(e,s){var w=getBBox$2(document.documentElement),C=e.elementBBox=e.initElm(e),O=e.containmentBBox=e.containmentIsBBox?resolvePPBBox$1(e.options.containment,w)||w:getBBox$2(e.options.containment,!0);if(e.minLeft=O.left,e.maxLeft=O.right-C.width,e.minTop=O.top,e.maxTop=O.bottom-C.height,move$1(e,{left:C.left,top:C.top}),e.parsedSnapTargets){var D={x:C.width,y:C.height},T={x:e.minLeft,y:e.minTop},A={x:e.maxLeft,y:e.maxTop},B={left:"x",right:"x",x:"x",width:"x",xStart:"x",xEnd:"x",xStep:"x",top:"y",bottom:"y",y:"y",height:"y",yStart:"y",yEnd:"y",yStep:"y"},L=e.parsedSnapTargets.reduce((function(e,s){var L,P="containment"===s.base?O:w,M={x:P.left,y:P.top},I={x:P.width,y:P.height};function addSnapTarget(w){if(null==w.center&&(w.center=s.center),null==w.xGravity&&(w.xGravity=s.gravity),null==w.yGravity&&(w.yGravity=s.gravity),null!=w.x&&null!=w.y)w.x=resolvePPValue$1(w.x,M.x,I.x),w.y=resolvePPValue$1(w.y,M.y,I.y),w.center&&(w.x-=D.x/2,w.y-=D.y/2,w.corners=["tl"]),(w.corners||s.corners).forEach((function(s){var C=w.x-("tr"===s||"br"===s?D.x:0),O=w.y-("bl"===s||"br"===s?D.y:0);if(C>=T.x&&C<=A.x&&O>=T.y&&O<=A.y){var B={x:C,y:O},L=C-w.xGravity,P=C+w.xGravity,M=O-w.yGravity,I=O+w.yGravity;L>T.x&&(B.gravityXStart=L),P<A.x&&(B.gravityXEnd=P),M>T.y&&(B.gravityYStart=M),I<A.y&&(B.gravityYEnd=I),e.push(B)}}));else{var C=null!=w.x?"x":"y",O="x"===C?"y":"x",B="".concat(O,"Start"),L="".concat(O,"End"),P="".concat(C,"Gravity"),F=C.toUpperCase(),$=O.toUpperCase(),N="gravity".concat(F,"Start"),V="gravity".concat(F,"End"),R="gravity".concat($,"Start"),H="gravity".concat($,"End");if(w[C]=resolvePPValue$1(w[C],M[C],I[C]),w[B]=resolvePPValue$1(w[B],M[O],I[O]),w[L]=resolvePPValue$1(w[L],M[O],I[O])-D[O],w[B]>w[L]||w[B]>A[O]||w[L]<T[O])return;w.center&&(w[C]-=D[C]/2,w.sides=["start"]),(w.sides||s.sides).forEach((function(s){var M=w[C]-("end"===s?D[C]:0);if(M>=T[C]&&M<=A[C]){var I={},F=M-w[P],$=M+w[P];I[C]=M,F>T[C]&&(I[N]=F),$<A[C]&&(I[V]=$),w[B]>T[O]&&(I[R]=w[B]),w[L]<A[O]&&(I[H]=w[L]),e.push(I)}}))}}if((L=s.element?getBBox$2(s.element):null)||s.ppBBox)s.ppBBox&&(L=resolvePPBBox$1(s.ppBBox,P)),L&&s.edges.forEach((function(e){var w=s.gravity,O=s.gravity;"outside"===e&&(w+=C.width,O+=C.height);var D=L.left-w,T=L.right+w,A=L.top-O,B=L.bottom+O,P="inside"===e?"start":"end";addSnapTarget({xStart:D,xEnd:T,y:L.top,sides:[P],center:!1}),addSnapTarget({x:L.left,yStart:A,yEnd:B,sides:[P],center:!1}),P="inside"===e?"end":"start",addSnapTarget({xStart:D,xEnd:T,y:L.bottom,sides:[P],center:!1}),addSnapTarget({x:L.right,yStart:A,yEnd:B,sides:[P],center:!1})}));else{var F=[["x","y","xStart","xEnd","xStep","yStart","yEnd","yStep"].reduce((function(e,w){return s[w]&&(e[w]=resolvePPValue$1(s[w],"xStep"===w||"yStep"===w?0:M[B[w]],I[B[w]])),e}),{})];["x","y"].forEach((function(e){var w="".concat(e,"Start"),C="".concat(e,"End"),O="".concat(e,"Step"),D="".concat(e,"Gravity");F=F.reduce((function(T,A){var B=A[w],L=A[C],P=A[O];if(null!=B&&null!=L&&B>=L)return T;if(null!=P){if(P<2)return T;var M=P/2;M=s.gravity>M?M:null;for(var I=B;I<=L;I+=P){var F=Object.keys(A).reduce((function(e,s){return s!==w&&s!==C&&s!==O&&(e[s]=A[s]),e}),{});F[e]=I,F[D]=M,T.push(F)}}else T.push(A);return T}),[])})),F.forEach((function(e){addSnapTarget(e)}))}return e}),[]);e.snapTargets=L.length?L:null}var P={},M=e.options.autoScroll;if(M){P.isWindow=M.target===window,P.target=M.target;var I="scroll"===s,F=function getScrollable$1(e,s,w){var C,O,D,T,A={};T=s?document.documentElement:e,A.clientWidth=T.clientWidth,A.clientHeight=T.clientHeight;var B,L,P,M=0,I=0;return w||(s?(B=scrollXYWindow$1(e,"x"),L=scrollXYWindow$1(e,"y"),C=getComputedStyle(document.documentElement,""),O=getComputedStyle(document.body,""),M=scrollXYWindow$1(e,"x",document.documentElement.scrollWidth+A.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),I=scrollXYWindow$1(e,"y",document.documentElement.scrollHeight+A.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),scrollXYWindow$1(e,"x",B),scrollXYWindow$1(e,"y",L)):(B=scrollXYElement$1(e,"x"),L=scrollXYElement$1(e,"y"),D=getComputedStyle(e,""),M=scrollXYElement$1(e,"x",e.scrollWidth+A.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),I=scrollXYElement$1(e,"y",e.scrollHeight+A.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),scrollXYElement$1(e,"x",B),scrollXYElement$1(e,"y",L))),A.scrollWidth=A.clientWidth+M,A.scrollHeight=A.clientHeight+I,s?A.clientX=A.clientY=0:(P=e.getBoundingClientRect(),D||(D=getComputedStyle(e,"")),A.clientX=P.left+(parseFloat(D.borderLeftWidth)||0),A.clientY=P.top+(parseFloat(D.borderTopWidth)||0)),A}(M.target,P.isWindow,I),$=validBBox$1({left:F.clientX,top:F.clientY,width:F.clientWidth,height:F.clientHeight});I?e.autoScroll&&(P.scrollWidth=e.autoScroll.scrollWidth,P.scrollHeight=e.autoScroll.scrollHeight):(P.scrollWidth=F.scrollWidth,P.scrollHeight=F.scrollHeight),[["X","Width","left","right"],["Y","Height","top","bottom"]].forEach((function(e){var s=e[0],w=e[1],O=e[2],D=e[3],T=(P["scroll".concat(w)]||0)-F["client".concat(w)],A=M["min".concat(s)]||0,B=qn(M["max".concat(s)])?M["max".concat(s)]:T;if(A<B&&A<T){B>T&&(B=T);for(var L=[],I=C[w.toLowerCase()],N=M.sensitivity.length-1;N>=0;N--){var V=M.sensitivity[N],R=M.speed[N];L.push({dir:-1,speed:R,position:$[O]+V}),L.push({dir:1,speed:R,position:$[D]-V-I})}P[s.toLowerCase()]={min:A,max:B,lines:L}}}))}e.autoScroll=P.x||P.y?P:null}function dragEnd$1(e){no.stop(),setDraggableCursor$1(e.options.handle,e.orgCursor),On.style.cursor=An,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.orgZIndex),Pn&&(On.style[Pn]=Mn);var s=mClassList$1(e.element);to&&s.remove(to),eo&&s.remove(eo),wn=null,Un.cancel(),e.onDragEnd&&e.onDragEnd({left:e.elementBBox.left,top:e.elementBBox.top})}function _setOptions$4(e,s){var w,C,O=e.options;s.containment&&(isElement$2(s.containment)?s.containment!==O.containment&&(O.containment=s.containment,e.containmentIsBBox=!1,w=!0):(C=validPPBBox$1(copyTree$1(s.containment)))&&hasChanged$1(C,O.containment)&&(O.containment=C,e.containmentIsBBox=!0,w=!0));function commonSnapOptions(e,s){function cleanString(e){return"string"==typeof e?e.replace(/[, ]+/g," ").trim().toLowerCase():null}qn(s.gravity)&&s.gravity>0&&(e.gravity=s.gravity);var w=cleanString(s.corner);if(w){if("all"!==w){var C={},O=w.split(/\s/).reduce((function(e,s){return(s="tl"===(s=s.trim().replace(/^(.).*?-(.).*$/,"$1$2"))||"lt"===s?"tl":"tr"===s||"rt"===s?"tr":"bl"===s||"lb"===s?"bl":"br"===s||"rb"===s?"br":null)&&!C[s]&&(e.push(s),C[s]=!0),e}),[]),D=O.length;w=D?4===D?"all":O.join(" "):null}w&&(e.corner=w)}var T=cleanString(s.side);T&&("start"===T||"end"===T||"both"===T?e.side=T:"start end"!==T&&"end start"!==T||(e.side="both")),"boolean"==typeof s.center&&(e.center=s.center);var A=cleanString(s.edge);A&&("inside"===A||"outside"===A||"both"===A?e.edge=A:"inside outside"!==A&&"outside inside"!==A||(e.edge="both"));var B="string"==typeof s.base?s.base.trim().toLowerCase():null;return!B||"containment"!==B&&"document"!==B||(e.base=B),e}if(null!=s.snap){var D=Xn(s.snap)&&null!=s.snap.targets?s.snap:{targets:s.snap},T=[],A=commonSnapOptions({targets:T},D);A.gravity||(A.gravity=20),A.corner||(A.corner="tl"),A.side||(A.side="both"),"boolean"!=typeof A.center&&(A.center=!1),A.edge||(A.edge="both"),A.base||(A.base="containment");var B=(Array.isArray(D.targets)?D.targets:[D.targets]).reduce((function(e,s){if(null==s)return e;var w,C=isElement$2(s),O=validPPBBox$1(copyTree$1(s)),D=C||O?{boundingBox:s}:Xn(s)&&null==s.start&&null==s.end&&null==s.step?s:{x:s,y:s},B=[],L={},P=D.boundingBox;if(C||isElement$2(P))B.push({element:P}),L.boundingBox=P;else if(w=O||validPPBBox$1(copyTree$1(P)))B.push({ppBBox:w}),L.boundingBox=ppBBox2OptionObject$1(w);else{var M,I=["x","y"].reduce((function(e,s){var w,C,O,T,A=D[s];(w=validPPValue$1(A))?(e[s]=w,L[s]=ppValue2OptionValue$1(w)):(Xn(A)&&(C=validPPValue$1(A.start),O=validPPValue$1(A.end),T=validPPValue$1(A.step),C&&O&&C.isRatio===O.isRatio&&C.value>=O.value&&(M=!0)),C=e["".concat(s,"Start")]=C||{value:0,isRatio:!1},O=e["".concat(s,"End")]=O||{value:1,isRatio:!0},L[s]={start:ppValue2OptionValue$1(C),end:ppValue2OptionValue$1(O)},T&&((T.isRatio?T.value>0:T.value>=2)?(e["".concat(s,"Step")]=T,L[s].step=ppValue2OptionValue$1(T)):M=!0));return e}),{});if(M)return e;I.xStart&&!I.xStep&&I.yStart&&!I.yStep?B.push({xStart:I.xStart,xEnd:I.xEnd,y:I.yStart},{xStart:I.xStart,xEnd:I.xEnd,y:I.yEnd},{x:I.xStart,yStart:I.yStart,yEnd:I.yEnd},{x:I.xEnd,yStart:I.yStart,yEnd:I.yEnd}):B.push(I)}if(B.length){T.push(commonSnapOptions(L,D));var F=L.corner||A.corner,$=L.side||A.side,N=L.edge||A.edge,V={gravity:L.gravity||A.gravity,base:L.base||A.base,center:"boolean"==typeof L.center?L.center:A.center,corners:"all"===F?In:F.split(" "),sides:"both"===$?Fn:[$],edges:"both"===N?$n:[N]};B.forEach((function(s){["gravity","corners","sides","center","edges","base"].forEach((function(e){s[e]=V[e]})),e.push(s)}))}return e}),[]);B.length&&(O.snap=A,hasChanged$1(B,e.parsedSnapTargets)&&(e.parsedSnapTargets=B,w=!0))}else s.hasOwnProperty("snap")&&e.parsedSnapTargets&&(O.snap=e.parsedSnapTargets=e.snapTargets=void 0);if(s.autoScroll){var L=Xn(s.autoScroll)?s.autoScroll:{target:!0===s.autoScroll?window:s.autoScroll},P={};P.target=isElement$2(L.target)?L.target:window,P.speed=[],(Array.isArray(L.speed)?L.speed:[L.speed]).every((function(e,s){return!!(s<=2&&qn(e))&&(P.speed[s]=e,!0)})),P.speed.length||(P.speed=Nn);var M=Array.isArray(L.sensitivity)?L.sensitivity:[L.sensitivity];P.sensitivity=P.speed.map((function(e,s){return qn(M[s])?M[s]:Vn[s]})),["X","Y"].forEach((function(e){var s="min".concat(e),w="max".concat(e);qn(L[s])&&L[s]>=0&&(P[s]=L[s]),qn(L[w])&&L[w]>=0&&(!P[s]||L[w]>=P[s])&&(P[w]=L[w])})),hasChanged$1(P,O.autoScroll)&&(O.autoScroll=P,w=!0)}else s.hasOwnProperty("autoScroll")&&(O.autoScroll&&(w=!0),O.autoScroll=void 0);if(w&&initBBox$1(e),isElement$2(s.handle)&&s.handle!==O.handle){O.handle&&(O.handle.style.cursor=e.orgCursor,Pn&&(O.handle.style[Pn]=e.orgUserSelect),Un.removeStartHandler(O.handle,e.pointerEventHandlerId));var I=O.handle=s.handle;e.orgCursor=I.style.cursor,setDraggableCursor$1(I,e.orgCursor),Pn&&(e.orgUserSelect=I.style[Pn],I.style[Pn]="none"),Un.addStartHandler(I,e.pointerEventHandlerId)}(qn(s.zIndex)||!1===s.zIndex)&&(O.zIndex=s.zIndex,e===wn&&(e.elementStyle.zIndex=!1===O.zIndex?e.orgZIndex:O.zIndex));var F,$={left:e.elementBBox.left,top:e.elementBBox.top};qn(s.left)&&s.left!==$.left&&($.left=s.left,F=!0),qn(s.top)&&s.top!==$.top&&($.top=s.top,F=!0),F&&move$1(e,$),["onDrag","onMove","onDragStart","onMoveStart","onDragEnd"].forEach((function(w){"function"==typeof s[w]?(O[w]=s[w],e[w]=O[w].bind(e.ins)):s.hasOwnProperty(w)&&null==s[w]&&(O[w]=e[w]=void 0)}))}var uo=function(){function PlainDraggable(e,s){!function _classCallCheck$5(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainDraggable);var w={ins:this,options:{zIndex:9e3},disabled:!1};if(Object.defineProperty(this,"_id",{value:++Zn}),w._id=this._id,Yn[this._id]=w,!isElement$2(e)||e===On)throw new Error("This element is not accepted.");if(s){if(!Xn(s))throw new Error("Invalid options.")}else s={};var C,O,D=!0;if(e instanceof SVGElement&&(C=e.ownerSVGElement)){if(!e.getBBox)throw new Error("This element is not accepted. (SVGLocatable)");if(!e.transform)throw new Error("This element is not accepted. (SVGAnimatedTransformList)");w.svgTransform=e.transform.baseVal.appendItem(C.createSVGTransform()),w.svgPoint=C.createSVGPoint();var T=e.nearestViewportElement||e.viewportElement;w.svgCtmElement=zn?T.appendChild(document.createElementNS(C.namespaceURI,"rect")):T,D=!1,w.initElm=initSvg$1,w.moveElm=moveSvg$1}else{var A=kn.getName("willChange");A&&(D=!1),!s.leftTop&&Ln?(A&&(e.style[A]="transform"),w.initElm=initTranslate$1,w.moveElm=moveTranslate$1):(A&&(e.style[A]="left, top"),w.initElm=initLeftTop$1,w.moveElm=moveLeftTop$1)}(w.element=function initAnim$1(e,s){var w=e.style;w.webkitTapHighlightColor="transparent";var C=kn.getName("boxShadow"),O=window.getComputedStyle(e,"")[C];return O&&"none"!==O||(w[C]="0 0 1px transparent"),s&&Ln&&(w[Ln]="translateZ(0)"),e}(e,D),w.elementStyle=e.style,w.orgZIndex=w.elementStyle.zIndex,Qn&&mClassList$1(e).add(Qn),w.pointerEventHandlerId=Un.regStartHandler((function(e){return function dragStart$1(e,s){return!(e.disabled||e.onDragStart&&!1===e.onDragStart(s)||(wn&&dragEnd$1(wn),setDraggingCursor$1(e.options.handle),On.style.cursor=Tn||window.getComputedStyle(e.options.handle,"").cursor,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.options.zIndex),Pn&&(On.style[Pn]="none"),eo&&mClassList$1(e.element).add(eo),wn=e,Cn=!1,Gn.left=e.elementBBox.left-(s.clientX+window.pageXOffset),Gn.top=e.elementBBox.top-(s.clientY+window.pageYOffset),0))}(w,e)})),s.containment)||(s.containment=(O=e.parentNode)&&isElement$2(O)?O:On);s.handle||(s.handle=e),_setOptions$4(w,s)}return function _createClass$5(e,s,w){return s&&_defineProperties$5(e.prototype,s),w&&_defineProperties$5(e,w),e}(PlainDraggable,[{key:"remove",value:function remove(){var e=Yn[this._id];this.disabled=!0,Un.unregStartHandler(Un.removeStartHandler(e.options.handle,e.pointerEventHandlerId)),delete Yn[this._id]}},{key:"setOptions",value:function setOptions(e){return Xn(e)&&_setOptions$4(Yn[this._id],e),this}},{key:"position",value:function position(){return initBBox$1(Yn[this._id]),this}},{key:"disabled",get:function get(){return Yn[this._id].disabled},set:function set(e){var s=Yn[this._id];(e=!!e)!==s.disabled&&(s.disabled=e,s.disabled?(s===wn&&dragEnd$1(s),s.options.handle.style.cursor=s.orgCursor,Pn&&(s.options.handle.style[Pn]=s.orgUserSelect),Qn&&mClassList$1(s.element).remove(Qn)):(setDraggableCursor$1(s.options.handle,s.orgCursor),Pn&&(s.options.handle.style[Pn]="none"),Qn&&mClassList$1(s.element).add(Qn)))}},{key:"element",get:function get(){return Yn[this._id].element}},{key:"rect",get:function get(){return copyTree$1(Yn[this._id].elementBBox)}},{key:"left",get:function get(){return Yn[this._id].elementBBox.left},set:function set(e){_setOptions$4(Yn[this._id],{left:e})}},{key:"top",get:function get(){return Yn[this._id].elementBBox.top},set:function set(e){_setOptions$4(Yn[this._id],{top:e})}},{key:"containment",get:function get(){var e=Yn[this._id];return e.containmentIsBBox?ppBBox2OptionObject$1(e.options.containment):e.options.containment},set:function set(e){_setOptions$4(Yn[this._id],{containment:e})}},{key:"snap",get:function get(){return copyTree$1(Yn[this._id].options.snap)},set:function set(e){_setOptions$4(Yn[this._id],{snap:e})}},{key:"autoScroll",get:function get(){return copyTree$1(Yn[this._id].options.autoScroll)},set:function set(e){_setOptions$4(Yn[this._id],{autoScroll:e})}},{key:"handle",get:function get(){return Yn[this._id].options.handle},set:function set(e){_setOptions$4(Yn[this._id],{handle:e})}},{key:"zIndex",get:function get(){return Yn[this._id].options.zIndex},set:function set(e){_setOptions$4(Yn[this._id],{zIndex:e})}},{key:"onDrag",get:function get(){return Yn[this._id].options.onDrag},set:function set(e){_setOptions$4(Yn[this._id],{onDrag:e})}},{key:"onMove",get:function get(){return Yn[this._id].options.onMove},set:function set(e){_setOptions$4(Yn[this._id],{onMove:e})}},{key:"onDragStart",get:function get(){return Yn[this._id].options.onDragStart},set:function set(e){_setOptions$4(Yn[this._id],{onDragStart:e})}},{key:"onMoveStart",get:function get(){return Yn[this._id].options.onMoveStart},set:function set(e){_setOptions$4(Yn[this._id],{onMoveStart:e})}},{key:"onDragEnd",get:function get(){return Yn[this._id].options.onDragEnd},set:function set(e){_setOptions$4(Yn[this._id],{onDragEnd:e})}}],[{key:"draggableCursor",get:function get(){return Kn},set:function set(e){Kn!==e&&(Kn=e,Dn=null,Object.keys(Yn).forEach((function(e){var s=Yn[e];s.disabled||s===wn&&!1!==Tn||(setDraggableCursor$1(s.options.handle,s.orgCursor),s===wn&&(On.style.cursor=An,On.style.cursor=window.getComputedStyle(s.options.handle,"").cursor))})))}},{key:"draggingCursor",get:function get(){return Jn},set:function set(e){Jn!==e&&(Jn=e,Tn=null,wn&&(setDraggingCursor$1(wn.options.handle),!1===Tn&&(setDraggableCursor$1(wn.options.handle,wn.orgCursor),On.style.cursor=An),On.style.cursor=Tn||window.getComputedStyle(wn.options.handle,"").cursor))}},{key:"draggableClass",get:function get(){return Qn},set:function set(e){(e=e?e+"":void 0)!==Qn&&(Object.keys(Yn).forEach((function(s){var w=Yn[s];if(!w.disabled){var C=mClassList$1(w.element);Qn&&C.remove(Qn),e&&C.add(e)}})),Qn=e)}},{key:"draggingClass",get:function get(){return eo},set:function set(e){if((e=e?e+"":void 0)!==eo){if(wn){var s=mClassList$1(wn.element);eo&&s.remove(eo),e&&s.add(e)}eo=e}}},{key:"movingClass",get:function get(){return to},set:function set(e){if((e=e?e+"":void 0)!==to){if(wn&&Cn){var s=mClassList$1(wn.element);to&&s.remove(to),e&&s.add(e)}to=e}}}]),PlainDraggable}();Un.addMoveHandler(document,(function(e){if(wn){var s={left:e.clientX+window.pageXOffset+Gn.left,top:e.clientY+window.pageYOffset+Gn.top};if(move$1(wn,s,wn.snapTargets?function(e){var s,w=wn.snapTargets.length,C=!1,O=!1;for(s=0;s<w&&(!C||!O);s++){var D=wn.snapTargets[s];(null==D.gravityXStart||e.left>=D.gravityXStart)&&(null==D.gravityXEnd||e.left<=D.gravityXEnd)&&(null==D.gravityYStart||e.top>=D.gravityYStart)&&(null==D.gravityYEnd||e.top<=D.gravityYEnd)&&(C||null==D.x||(e.left=D.x,C=!0,s=-1),O||null==D.y||(e.top=D.y,O=!0,s=-1))}return e.snapped=C||O,!wn.onDrag||wn.onDrag(e)}:wn.onDrag)){var w={},C=wn.autoScroll;if(C){var O={x:wn.elementBBox.left-window.pageXOffset,y:wn.elementBBox.top-window.pageYOffset};["x","y"].forEach((function(e){if(C[e]){var s=C[e].min,D=C[e].max;C[e].lines.some((function(C){return(-1===C.dir?O[e]<=C.position:O[e]>=C.position)&&(w[e]={dir:C.dir,speed:C.speed/1e3,min:s,max:D},!0)}))}}))}w.x||w.y?(no.move(C.target,w,C.isWindow?scrollXYWindow$1:scrollXYElement$1),s.autoScroll=!0):no.stop(),Cn||(Cn=!0,to&&mClassList$1(wn.element).add(to),wn.onMoveStart&&wn.onMoveStart(s)),wn.onMove&&wn.onMove(s)}}}));{function endHandler(){wn&&dragEnd$1(wn)}Un.addEndHandler(document,endHandler),Un.addCancelHandler(document,endHandler)}{function initDoc(){Bn=kn.getName("transitionProperty"),Ln=kn.getName("transform"),An=On.style.cursor,(Pn=kn.getName("userSelect"))&&(Mn=On.style[Pn]);var e,s={};function checkInitBBox(e,s){e.initElm&&initBBox$1(e,s)}var w=!1,C=rn((function(C){w||(w=!0,wn&&(checkInitBBox(wn,C.type),Un.move(),s[wn._id]=!0),clearTimeout(e),e=setTimeout((function(){!function initAll(w){clearTimeout(e),Object.keys(Yn).forEach((function(e){s[e]||checkInitBBox(Yn[e],w)})),s={}}(C.type)}),200),w=!1)}));window.addEventListener("resize",C,!0),window.addEventListener("scroll",C,!0)}(On=document.body)?initDoc():document.addEventListener("DOMContentLoaded",(function(){On=document.body,initDoc()}),!0)}class Layout{constructor(e={}){if(!e.name)throw Error("Layout name is not given");this.name=e.name,this.enterHandler=e.enterHandler,this.leaveHandler=e.leaveHandler}valueOf=()=>this.name}
+/*! LeaderLine v1.0.7 (c) anseki https://anseki.github.io/leader-line/ */
+var po=function(){var e,s,w,C,O,D,T,A,B,L,P,M,I,F,$,N,V,R,H,z,W,j,X,q="leader-line",Y={top:1,right:2,bottom:3,left:4},G={straight:1,arc:2,fluid:3,magnet:4,grid:5},U="behind",Z=q+"-defs",K={disc:{elmId:"leader-line-disc",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},square:{elmId:"leader-line-square",noRotate:!0,bBox:{left:-5,top:-5,width:10,height:10,right:5,bottom:5},widthR:2.5,heightR:2.5,bCircle:5,sideLen:5,backLen:5,overhead:0,outlineBase:1,outlineMax:4},arrow1:{elmId:"leader-line-arrow1",bBox:{left:-8,top:-8,width:16,height:16,right:8,bottom:8},widthR:4,heightR:4,bCircle:8,sideLen:8,backLen:8,overhead:8,outlineBase:2,outlineMax:1.5},arrow2:{elmId:"leader-line-arrow2",bBox:{left:-7,top:-8,width:11,height:16,right:4,bottom:8},widthR:2.75,heightR:4,bCircle:8,sideLen:8,backLen:7,overhead:4,outlineBase:1,outlineMax:1.75},arrow3:{elmId:"leader-line-arrow3",bBox:{left:-4,top:-5,width:12,height:10,right:8,bottom:5},widthR:3,heightR:2.5,bCircle:8,sideLen:5,backLen:4,overhead:8,outlineBase:1,outlineMax:2.5},hand:{elmId:"leader-line-hand",bBox:{left:-3,top:-12,width:40,height:24,right:37,bottom:12},widthR:10,heightR:6,bCircle:37,sideLen:12,backLen:3,overhead:37},crosshair:{elmId:"leader-line-crosshair",noRotate:!0,bBox:{left:-96,top:-96,width:192,height:192,right:96,bottom:96},widthR:48,heightR:48,bCircle:96,sideLen:96,backLen:96,overhead:0}},J={behind:U,disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},Q={disc:"disc",square:"square",arrow1:"arrow1",arrow2:"arrow2",arrow3:"arrow3",hand:"hand",crosshair:"crosshair"},ee=[1,2,3,4],te="auto",ne={x:"left",y:"top",width:"width",height:"height"},oe=10,re=30,ie=.5522847,ae=.25*Math.PI,se=/^\s*(\-?[\d\.]+)\s*(\%)?\s*$/,le="http://www.w3.org/2000/svg",ce=!(ve="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled)&&!!document.uniqueID,ue="MozAppearance"in document.documentElement.style,de=!(ve||ue||!window.chrome||!window.CSS),pe=!(ve||ce||ue||de||window.chrome||!("WebkitAppearance"in document.documentElement.style)),he=ce||ve?.2:.1,fe={path:3,lineColor:"coral",lineSize:4,plugSE:[U,"arrow1"],plugSizeSE:[1,1],lineOutlineEnabled:!1,lineOutlineColor:"indianred",lineOutlineSize:.25,plugOutlineEnabledSE:[!1,!1],plugOutlineSizeSE:[1,1]},me=(W={}.toString,j={}.hasOwnProperty.toString,X=j.call(Object),function(e){return e&&"[object Object]"===W.call(e)&&(!(e=Object.getPrototypeOf(e))||(e=e.hasOwnProperty("constructor")&&e.constructor)&&"function"==typeof e&&j.call(e)===X)}),ge=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},ye=(F={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]},$=1e3/60/2,N=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,$)},V=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){clearTimeout(e)},R=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},H=[],z=0,{add:function(e,s,w,C,O,D,T){var A,B,L,P,M,I,N,V,R,W,j=++z;function g(s,w){return{value:e(w),timeRatio:s,outputRatio:w}}if("string"==typeof O&&(O=F[O]),e=e||function(){},w<$)A=[g(0,0),g(1,1)];else{if(B=$/w,A=[g(0,0)],0===O[0]&&0===O[1]&&1===O[2]&&1===O[3])for(P=B;P<=1;P+=B)A.push(g(P,P));else for(M=L=(P=B)/10;M<=1;M+=L)M,W=void 0,V=(W=M*M)*M,W*=3*(R=1-M),P<=(I={x:(N=R*R*3*M)*O[0]+W*O[2]+V,y:N*O[1]+W*O[3]+V}).x&&(A.push(g(I.x,I.y)),P+=B);A.push(g(1,1))}return H.push(D={animId:j,frameCallback:s,duration:w,count:C,frames:A,reverse:!!D}),!1!==T&&be(D,T),j},remove:function(e){var s;H.some((function(w,C){return w.animId===e&&(s=C,!(w.framesStart=null))}))&&H.splice(s,1)},start:function(e,s,w){H.some((function(C){return C.animId===e&&(C.reverse=!!s,be(C,w),!0)}))},stop:function(e,s){var w;return H.some((function(C){return C.animId===e&&(s?null!=C.lastFrame&&(w=C.frames[C.lastFrame].timeRatio):(w=(Date.now()-C.framesStart)/C.duration,(w=C.reverse?1-w:w)<0?w=0:1<w&&(w=1)),!(C.framesStart=null))})),w},validTiming:function(e){return"string"==typeof e?F[e]:Array.isArray(e)&&[0,1,2,3].every((function(s){return R(e[s])&&0<=e[s]&&e[s]<=1}))?[e[0],e[1],e[2],e[3]]:null}}),ve=(M={},Ee.m=P=[function(e,s,w){w.r(s);var C=[],O=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)},D=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},T=Date.now(),A=void 0;function u(){var e=void 0,s=void 0;A&&(D.call(window,A),A=null),C.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(T=Date.now(),s=!0):Date.now()-T<500&&(s=!0),s&&(A=O.call(window,u))}function h(e){var s=-1;return C.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}s.default={add:function(e){var s=void 0;return-1===h(e)?(C.push(s={listener:e}),function(e){s.event=e,A||u()}):null},remove:function(e){-1<(e=h(e))&&(C.splice(e,1),!C.length&&A&&(D.call(window,A),A=null))}}}],Ee.c=M,Ee.d=function(e,s,w){Ee.o(e,s)||Object.defineProperty(e,s,{enumerable:!0,get:w})},Ee.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},Ee.t=function(e,s){if(1&s&&(e=Ee(e)),8&s)return e;if(4&s&&"object"==typeof e&&e&&e.__esModule)return e;var w=Object.create(null);if(Ee.r(w),Object.defineProperty(w,"default",{enumerable:!0,value:e}),2&s&&"string"!=typeof e)for(var C in e)Ee.d(w,C,function(s){return e[s]}.bind(null,C));return w},Ee.n=function(e){var s=e&&e.__esModule?function(){return e.default}:function(){return e};return Ee.d(s,"a",s),s},Ee.o=function(e,s){return Object.prototype.hasOwnProperty.call(e,s)},Ee.p="",Ee(Ee.s=0).default),_e={line_altColor:{iniValue:!1},line_color:{},line_colorTra:{iniValue:!1},line_strokeWidth:{},plug_enabled:{iniValue:!1},plug_enabledSE:{hasSE:!0,iniValue:!1},plug_plugSE:{hasSE:!0,iniValue:U},plug_colorSE:{hasSE:!0},plug_colorTraSE:{hasSE:!0,iniValue:!1},plug_markerWidthSE:{hasSE:!0},plug_markerHeightSE:{hasSE:!0},lineOutline_enabled:{iniValue:!1},lineOutline_color:{},lineOutline_colorTra:{iniValue:!1},lineOutline_strokeWidth:{},lineOutline_inStrokeWidth:{},plugOutline_enabledSE:{hasSE:!0,iniValue:!1},plugOutline_plugSE:{hasSE:!0,iniValue:U},plugOutline_colorSE:{hasSE:!0},plugOutline_colorTraSE:{hasSE:!0,iniValue:!1},plugOutline_strokeWidthSE:{hasSE:!0},plugOutline_inStrokeWidthSE:{hasSE:!0},position_socketXYSE:{hasSE:!0,hasProps:!0},position_plugOverheadSE:{hasSE:!0},position_path:{},position_lineStrokeWidth:{},position_socketGravitySE:{hasSE:!0},path_pathData:{},path_edge:{hasProps:!0},viewBox_bBox:{hasProps:!0},viewBox_plugBCircleSE:{hasSE:!0},lineMask_enabled:{iniValue:!1},lineMask_outlineMode:{iniValue:!1},lineMask_x:{},lineMask_y:{},lineOutlineMask_x:{},lineOutlineMask_y:{},maskBGRect_x:{},maskBGRect_y:{},capsMaskAnchor_enabledSE:{hasSE:!0,iniValue:!1},capsMaskAnchor_pathDataSE:{hasSE:!0},capsMaskAnchor_strokeWidthSE:{hasSE:!0},capsMaskMarker_enabled:{iniValue:!1},capsMaskMarker_enabledSE:{hasSE:!0,iniValue:!1},capsMaskMarker_plugSE:{hasSE:!0,iniValue:U},capsMaskMarker_markerWidthSE:{hasSE:!0},capsMaskMarker_markerHeightSE:{hasSE:!0},caps_enabled:{iniValue:!1},attach_plugSideLenSE:{hasSE:!0},attach_plugBackLenSE:{hasSE:!0}},Se={show_on:{},show_effect:{},show_animOptions:{},show_animId:{},show_inAnim:{}},st="fade",ct=[],ut={},dt=0,pt={},ht=0;function Ee(e){if(M[e])return M[e].exports;var s=M[e]={i:e,l:!1,exports:{}};return P[e].call(s.exports,s,s.exports,Ee),s.l=!0,s.exports}function xe(){var e=Date.now(),s=!1;I&&(V.call(window,I),I=null),H.forEach((function(w){var C,O,D;if(w.framesStart){if((C=e-w.framesStart)>=w.duration&&w.count&&w.loopsLeft<=1)return D=w.frames[w.lastFrame=w.reverse?0:w.frames.length-1],w.frameCallback(D.value,!0,D.timeRatio,D.outputRatio),void(w.framesStart=null);if(C>w.duration){if(O=Math.floor(C/w.duration),w.count){if(O>=w.loopsLeft)return D=w.frames[w.lastFrame=w.reverse?0:w.frames.length-1],w.frameCallback(D.value,!0,D.timeRatio,D.outputRatio),void(w.framesStart=null);w.loopsLeft-=O}w.framesStart+=w.duration*O,C=e-w.framesStart}w.reverse&&(C=w.duration-C),D=w.frames[w.lastFrame=Math.round(C/$)],!1!==w.frameCallback(D.value,!1,D.timeRatio,D.outputRatio)?s=!0:w.framesStart=null}})),s&&(I=N.call(window,xe))}function be(e,s){e.framesStart=Date.now(),null!=s&&(e.framesStart-=e.duration*(e.reverse?1-s:s)),e.loopsLeft=e.count,e.lastFrame=null,xe()}function ke(e,s){var w,C;return typeof e!=typeof s||(w=me(e)?"obj":Array.isArray(e)?"array":"")!=(me(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?ke(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return ke(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return ke(e,s[w])})):e!==s)}function we(e){return e&&(me(e)?Object.keys(e).reduce((function(s,w){return s[w]=we(e[w]),s}),{}):Array.isArray(e)?e.map(we):e)}function Oe(e){var s,w,C,O=1,D=e=(e+"").trim();function l(e){var s=1;return(e=se.exec(e))&&(s=parseFloat(e[1]),e[2]?s=0<=s&&s<=100?s/100:1:(s<0||1<s)&&(s=1)),s}return(s=/^(rgba|hsla|hwb|gray|device\-cmyk)\s*\(([\s\S]+)\)$/i.exec(e))?(w=s[1].toLowerCase(),C=s[2].trim().split(/\s*,\s*/),"rgba"===w&&4===C.length?(O=l(C[3]),D="rgb("+C.slice(0,3).join(", ")+")"):"hsla"===w&&4===C.length?(O=l(C[3]),D="hsl("+C.slice(0,3).join(", ")+")"):"hwb"===w&&4===C.length?(O=l(C[3]),D="hwb("+C.slice(0,3).join(", ")+")"):"gray"===w&&2===C.length?(O=l(C[1]),D="gray("+C[0]+")"):"device-cmyk"===w&&5<=C.length&&(O=l(C[4]),D="device-cmyk("+C.slice(0,4).join(", ")+")")):(s=/^\#(?:([\da-f]{6})([\da-f]{2})|([\da-f]{3})([\da-f]))$/i.exec(e))?D=s[1]?(O=parseInt(s[2],16)/255,"#"+s[1]):(O=parseInt(s[4]+s[4],16)/255,"#"+s[3]):"transparent"===e.toLocaleLowerCase()&&(O=0),[O,D]}function Me(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect)}function Ie(e,s){var w,C,O,D={};if(!(O=e.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(e.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_DISCONNECTED)return console.error("A disconnected element was passed."),null;for(C in w=e.getBoundingClientRect())D[C]=w[C];if(!s){if(!(O=O.defaultView))return console.error("Cannot get window that contains the element."),null;D.left+=O.pageXOffset,D.right+=O.pageXOffset,D.top+=O.pageYOffset,D.bottom+=O.pageYOffset}return D}function Ce(e,s){var w,C=[],O=e;for(s=s||window;;){if(!(w=O.ownerDocument))return console.error("Cannot get document that contains the element."),null;if(!(w=w.defaultView))return console.error("Cannot get window that contains the element."),null;if(w===s)break;if(!(O=w.frameElement))return console.error("`baseWindow` was not found."),null;C.unshift(O)}return C}function Le(e,s){var w=0,C=0;return(s=Ce(e,s=s||window))?s.length?(s.forEach((function(e,s){var O=Ie(e,0<s);w+=O.left,C+=O.top,e=(s=e).ownerDocument.defaultView.getComputedStyle(s,""),O={left:s.clientLeft+parseFloat(e.paddingLeft),top:s.clientTop+parseFloat(e.paddingTop)},w+=O.left,C+=O.top})),(s=Ie(e,!0)).left+=w,s.right+=w,s.top+=C,s.bottom+=C,s):Ie(e):null}function Ae(e,s){var w=e.x-s.x;s=e.y-s.y;return Math.sqrt(w*w+s*s)}function Ve(e,s,w){var C=s.x-e.x;s=s.y-e.y;return{x:e.x+C*w,y:e.y+s*w,angle:Math.atan2(s,C)/(Math.PI/180)}}function Pe(e,s,w){return e=Math.atan2(e.y-s.y,s.x-e.x),{x:s.x+Math.cos(e)*w,y:s.y+Math.sin(e)*w*-1}}function Ne(e,s,w,C,O){var D=(I=O*O)*O,T=1-O,A=(P=(M=T*T)*T)*e.x+3*M*O*s.x+3*T*I*w.x+D*C.x,B=P*e.y+3*M*O*s.y+3*T*I*w.y+D*C.y,L=e.x+2*O*(s.x-e.x)+I*(w.x-2*s.x+e.x),P=e.y+2*O*(s.y-e.y)+I*(w.y-2*s.y+e.y),M=s.x+2*O*(w.x-s.x)+I*(C.x-2*w.x+s.x),I=(D=s.y+2*O*(w.y-s.y)+I*(C.y-2*w.y+s.y),T*e.x+O*s.x);e=T*e.y+O*s.y,s=T*w.x+O*C.x,O=T*w.y+O*C.y,C=90-180*Math.atan2(L-M,P-D)/Math.PI;return{x:A,y:B,fromP2:{x:L,y:P},toP1:{x:M,y:D},fromP1:{x:I,y:e},toP2:{x:s,y:O},angle:C+=180<C?-180:180}}function Te(e,s,w,C,O){function l(e,s,w,C,O){return e*(e*(-3*s+9*w-9*C+3*O)+6*s-12*w+6*C)-3*s+3*w}var D,T,A=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],B=0,L=(O=null==O||1<O?1:O<0?0:O)/2;return[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816].forEach((function(O,P){D=l(T=L*O+L,e.x,s.x,w.x,C.x),T=l(T,e.y,s.y,w.y,C.y),T=D*D+T*T,B+=A[P]*Math.sqrt(T)})),L*B}function We(e,s,w,C,O){for(var D,T=.5,A=1-T;D=Te(e,s,w,C,A),!(Math.abs(D-O)<=.01);)A+=(D<O?1:-1)*(T/=2);return A}function Be(e,s){var w;return e.forEach((function(e){e=s?e.map((function(e){return e={x:e.x,y:e.y},s(e),e})):e,(w=w||[{type:"M",values:[e[0].x,e[0].y]}]).push(e.length?2===e.length?{type:"L",values:[e[1].x,e[1].y]}:{type:"C",values:[e[1].x,e[1].y,e[2].x,e[2].y,e[3].x,e[3].y]}:{type:"Z",values:[]})})),w}function Re(e){var s=[],w=0;return e.forEach((function(e){e=(2===e.length?Ae:Te).apply(null,e),s.push(e),w+=e})),{segsLen:s,lenAll:w}}function Fe(e,s){return null==e||null==s||e.length!==s.length||e.some((function(e,w){var C=s[w];return e.type!==C.type||e.values.some((function(e,s){return e!==C.values[s]}))}))}function Ge(e,s,w){e.events[s]?e.events[s].indexOf(w)<0&&e.events[s].push(w):e.events[s]=[w]}function De(e,s,w){var C;e.events[s]&&-1<(C=e.events[s].indexOf(w))&&e.events[s].splice(C,1)}function ze(e){T&&clearTimeout(T),ct.push(e),T=setTimeout((function(){ct.forEach((function(e){e()})),ct=[]}),0)}function je(e,s){e.reflowTargets.indexOf(s)<0&&e.reflowTargets.push(s)}function He(e){e.reflowTargets.forEach((function(e){var s;s=e,setTimeout((function(){var e=s.parentNode,w=s.nextSibling;e.insertBefore(e.removeChild(s),w)}),0)})),e.reflowTargets=[]}function Ue(e,s,w,C,O,D,T){var B;"auto-start-reverse"===w?("boolean"!=typeof A&&(s.setAttribute("orient","auto-start-reverse"),A=s.orientType.baseVal===SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN),A?s.setAttribute("orient",w):((B=O.createSVGTransform()).setRotate(180,0,0),D.transform.baseVal.appendItem(B),s.setAttribute("orient","auto"),B=!0)):(s.setAttribute("orient",w),!1===A&&D.transform.baseVal.clear()),s=s.viewBox.baseVal,B?(s.x=-C.right,s.y=-C.bottom):(s.x=C.left,s.y=C.top),s.width=C.width,s.height=C.height,ce&&je(e,T)}function Ze(e,s){return{prop:e?"markerEnd":"markerStart",orient:s?s.noRotate?"0":e?"auto":"auto-start-reverse":null}}function Ye(e,s){Object.keys(s).forEach((function(w){var C=s[w];e[w]=null!=C.iniValue?C.hasSE?[C.iniValue,C.iniValue]:C.iniValue:C.hasSE?C.hasProps?[{},{}]:[]:C.hasProps?{}:null}))}function Xe(e,s,w,C,O){return C!==s[w]&&(s[w]=C,O&&O.forEach((function(s){s(e,C,w)})),!0)}function qe(e){function t(e,s){return e+parseFloat(s)}var s=e.document,w=e.getComputedStyle(s.documentElement,"");e=e.getComputedStyle(s.body,""),s={x:0,y:0};return"static"!==e.position?(s.x-=[w.marginLeft,w.borderLeftWidth,w.paddingLeft,e.marginLeft,e.borderLeftWidth].reduce(t,0),s.y-=[w.marginTop,w.borderTopWidth,w.paddingTop,e.marginTop,e.borderTopWidth].reduce(t,0)):"static"!==w.position&&(s.x-=[w.marginLeft,w.borderLeftWidth].reduce(t,0),s.y-=[w.marginTop,w.borderTopWidth].reduce(t,0)),s}function Qe(e){var s,w=e.document;w.getElementById(Z)||(s=(new e.DOMParser).parseFromString('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="leader-line-defs"><style><![CDATA[.leader-line{position:absolute;overflow:visible!important;pointer-events:none!important;font-size:16px}#leader-line-defs{width:0;height:0;position:absolute;left:0;top:0}.leader-line-line-path{fill:none}.leader-line-mask-bg-rect{fill:white}.leader-line-caps-mask-anchor,.leader-line-caps-mask-marker-shape{fill:black}.leader-line-caps-mask-anchor{stroke:black}.leader-line-caps-mask-line,.leader-line-plugs-face{stroke:rgba(0,0,0,0)}.leader-line-line-mask-shape{stroke:white}.leader-line-line-outline-mask-shape{stroke:black}.leader-line-plug-mask-shape{fill:white;stroke:black}.leader-line-plug-outline-mask-shape{fill:black;stroke:white}.leader-line-areaAnchor{position:absolute;overflow:visible!important}]]></style><defs><circle id="leader-line-disc" cx="0" cy="0" r="5"/><rect id="leader-line-square" x="-5" y="-5" width="10" height="10"/><polygon id="leader-line-arrow1" points="-8,-8 8,0 -8,8 -5,0"/><polygon id="leader-line-arrow2" points="-4,-8 4,0 -4,8 -7,5 -2,0 -7,-5"/><polygon id="leader-line-arrow3" points="-4,-5 8,0 -4,5"/><g id="leader-line-hand"><path style="fill: #fcfcfc" d="M9.19 11.14h4.75c1.38 0 2.49-1.11 2.49-2.49 0-.51-.15-.98-.41-1.37h1.3c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.53-2.49-2.53h1.02c1.38 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49h14.96c1.37 0 2.49-1.11 2.49-2.49s-1.11-2.49-2.49-2.49H16.58C16-9.86 14.28-11.14 9.7-11.14c-4.79 0-6.55 3.42-7.87 4.73H-2.14v13.23h3.68C3.29 9.97 5.47 11.14 9.19 11.14L9.19 11.14Z"/><path style="fill: black" d="M13.95 12c1.85 0 3.35-1.5 3.35-3.35 0-.17-.02-.34-.04-.51h.07c1.85 0 3.35-1.5 3.35-3.35 0-.79-.27-1.51-.72-2.08 1.03-.57 1.74-1.67 1.74-2.93 0-.59-.16-1.15-.43-1.63h12.04c1.85 0 3.35-1.5 3.35-3.35 0-1.85-1.5-3.35-3.35-3.35H17.2C16.26-10.93 13.91-12 9.7-12 5.36-12 3.22-9.4 1.94-7.84c0 0-.29.33-.5.57-.63 0-3.58 0-3.58 0C-2.61-7.27-3-6.88-3-6.41v13.23c0 .47.39.86.86.86 0 0 2.48 0 3.2 0C2.9 10.73 5.29 12 9.19 12L13.95 12ZM9.19 10.28c-3.46 0-5.33-1.05-6.9-3.87-.15-.27-.44-.44-.75-.44 0 0-1.81 0-2.82 0V-5.55c1.06 0 3.11 0 3.11 0 .25 0 .44-.06.61-.25l.83-.95c1.23-1.49 2.91-3.53 6.43-3.53 3.45 0 4.9.74 5.57 1.72h-4.3c-.48 0-.86.38-.86.86s.39.86.86.86h22.34c.9 0 1.63.73 1.63 1.63 0 .9-.73 1.63-1.63 1.63H15.83c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.52c.9 0 1.63.73 1.63 1.63s-.73 1.63-1.63 1.63h-3.12c-.48 0-.86.38-.86.86 0 .47.39.86.86.86h2.11c.88 0 1.63.76 1.63 1.67 0 .9-.73 1.63-1.63 1.63h-3.2c-.48 0-.86.39-.86.86 0 .47.39.86.86.86h1.36c.05.16.09.34.09.51 0 .9-.73 1.63-1.63 1.63C13.95 10.28 9.19 10.28 9.19 10.28Z"/></g><g id="leader-line-crosshair"><path d="M0-78.97c-43.54 0-78.97 35.43-78.97 78.97 0 43.54 35.43 78.97 78.97 78.97s78.97-35.43 78.97-78.97C78.97-43.54 43.55-78.97 0-78.97ZM76.51-1.21h-9.91v-9.11h-2.43v9.11h-11.45c-.64-28.12-23.38-50.86-51.5-51.5V-64.17h9.11V-66.6h-9.11v-9.91C42.46-75.86 75.86-42.45 76.51-1.21ZM-1.21-30.76h-9.11v2.43h9.11V-4.2c-1.44.42-2.57 1.54-2.98 2.98H-28.33v-9.11h-2.43v9.11H-50.29C-49.65-28-27.99-49.65-1.21-50.29V-30.76ZM-30.76 1.21v9.11h2.43v-9.11H-4.2c.42 1.44 1.54 2.57 2.98 2.98v24.13h-9.11v2.43h9.11v19.53C-27.99 49.65-49.65 28-50.29 1.21H-30.76ZM1.22 30.75h9.11v-2.43h-9.11V4.2c1.44-.42 2.56-1.54 2.98-2.98h24.13v9.11h2.43v-9.11h19.53C49.65 28 28 49.65 1.22 50.29V30.75ZM30.76-1.21v-9.11h-2.43v9.11H4.2c-.42-1.44-1.54-2.56-2.98-2.98V-28.33h9.11v-2.43h-9.11V-50.29C28-49.65 49.65-28 50.29-1.21H30.76ZM-1.21-76.51v9.91h-9.11v2.43h9.11v11.45c-28.12.64-50.86 23.38-51.5 51.5H-64.17v-9.11H-66.6v9.11h-9.91C-75.86-42.45-42.45-75.86-1.21-76.51ZM-76.51 1.21h9.91v9.11h2.43v-9.11h11.45c.64 28.12 23.38 50.86 51.5 51.5v11.45h-9.11v2.43h9.11v9.91C-42.45 75.86-75.86 42.45-76.51 1.21ZM1.22 76.51v-9.91h9.11v-2.43h-9.11v-11.45c28.12-.64 50.86-23.38 51.5-51.5h11.45v9.11h2.43v-9.11h9.91C75.86 42.45 42.45 75.86 1.22 76.51Z"/><path d="M0 83.58-7.1 96 7.1 96Z"/><path d="M0-83.58 7.1-96-7.1-96"/><path d="M83.58 0 96 7.1 96-7.1Z"/><path d="M-83.58 0-96-7.1-96 7.1Z"/></g></defs></svg>',"image/svg+xml"),w.body.appendChild(s.documentElement),function(e){e.SVGPathElement.prototype.getPathData&&e.SVGPathElement.prototype.setPathData||function(){function i(e){this._string=e,this._currentIndex=0,this._endIndex=this._string.length,this._prevCommand=null,this._skipOptionalSpaces()}var s={Z:"Z",M:"M",L:"L",C:"C",Q:"Q",A:"A",H:"H",V:"V",S:"S",T:"T",z:"Z",m:"m",l:"l",c:"c",q:"q",a:"a",h:"h",v:"v",s:"s",t:"t"},w=-1!==e.navigator.userAgent.indexOf("MSIE ");function n(e){if(!e||0===e.length)return[];var s=new i(e),w=[];if(s.initialCommandIsMoveTo())for(;s.hasMoreData();){var C=s.parseSegment();if(null===C)break;w.push(C)}return w}function l(e){return e.map((function(e){return{type:e.type,values:Array.prototype.slice.call(e.values)}}))}function r(e){var s=[],w=null,C=null,O=null,D=null,T=null,A=null,B=null;return e.forEach((function(e){var L,P,M,I,F,$,N,V;"M"===e.type?(N=e.values[0],V=e.values[1],s.push({type:"M",values:[N,V]}),D=A=N,T=B=V):"C"===e.type?(F=e.values[0],$=e.values[1],L=e.values[2],P=e.values[3],N=e.values[4],V=e.values[5],s.push({type:"C",values:[F,$,L,P,N,V]}),C=L,O=P,D=N,T=V):"L"===e.type?(N=e.values[0],V=e.values[1],s.push({type:"L",values:[N,V]}),D=N,T=V):"H"===e.type?(N=e.values[0],s.push({type:"L",values:[N,T]}),D=N):"V"===e.type?(V=e.values[0],s.push({type:"L",values:[D,V]}),T=V):"S"===e.type?(L=e.values[0],P=e.values[1],N=e.values[2],V=e.values[3],I="C"===w||"S"===w?(M=D+(D-C),T+(T-O)):(M=D,T),s.push({type:"C",values:[M,I,L,P,N,V]}),C=L,O=P,D=N,T=V):"T"===e.type?(N=e.values[0],V=e.values[1],$="Q"===w||"T"===w?(F=D+(D-C),T+(T-O)):(F=D,T),s.push({type:"C",values:[M=D+2*(F-D)/3,I=T+2*($-T)/3,N+2*(F-N)/3,V+2*($-V)/3,N,V]}),C=F,O=$,D=N,T=V):"Q"===e.type?(F=e.values[0],$=e.values[1],N=e.values[2],V=e.values[3],s.push({type:"C",values:[M=D+2*(F-D)/3,I=T+2*($-T)/3,N+2*(F-N)/3,V+2*($-V)/3,N,V]}),C=F,O=$,D=N,T=V):"A"===e.type?(P=e.values[0],M=e.values[1],I=e.values[2],F=e.values[3],$=e.values[4],N=e.values[5],V=e.values[6],0===P||0===M?(s.push({type:"C",values:[D,T,N,V,N,V]}),D=N,T=V):D===N&&T===V||b(D,T,N,V,P,M,I,F,$).forEach((function(e){s.push({type:"C",values:e}),D=N,T=V}))):"Z"===e.type&&(s.push(e),D=A,T=B),w=e.type})),s}i.prototype={parseSegment:function(){var e=this._string[this._currentIndex],w=s[e]||null;if(null===w){if(null===this._prevCommand)return null;if(null===(w=("+"===e||"-"===e||"."===e||"0"<=e&&e<="9")&&"Z"!==this._prevCommand?"M"===this._prevCommand?"L":"m"===this._prevCommand?"l":this._prevCommand:null))return null}else this._currentIndex+=1;var C=null;return"H"===(e=(this._prevCommand=w).toUpperCase())||"V"===e?C=[this._parseNumber()]:"M"===e||"L"===e||"T"===e?C=[this._parseNumber(),this._parseNumber()]:"S"===e||"Q"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"C"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseNumber()]:"A"===e?C=[this._parseNumber(),this._parseNumber(),this._parseNumber(),this._parseArcFlag(),this._parseArcFlag(),this._parseNumber(),this._parseNumber()]:"Z"===e&&(this._skipOptionalSpaces(),C=[]),null===C||0<=C.indexOf(null)?null:{type:w,values:C}},hasMoreData:function(){return this._currentIndex<this._endIndex},peekSegmentType:function(){var e=this._string[this._currentIndex];return s[e]||null},initialCommandIsMoveTo:function(){if(!this.hasMoreData())return!0;var e=this.peekSegmentType();return"M"===e||"m"===e},_isCurrentSpace:function(){var e=this._string[this._currentIndex];return e<=" "&&(" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e)},_skipOptionalSpaces:function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex+=1;return this._currentIndex<this._endIndex},_skipOptionalSpacesOrDelimiter:function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!==this._string[this._currentIndex])&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","===this._string[this._currentIndex]&&(this._currentIndex+=1,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},_parseNumber:function(){var e=0,s=0,w=1,C=0,O=1,D=1,T=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"===this._string[this._currentIndex]?this._currentIndex+=1:this._currentIndex<this._endIndex&&"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,O=-1),this._currentIndex===this._endIndex||(this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])&&"."!==this._string[this._currentIndex])return null;for(var A=this._currentIndex;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)this._currentIndex+=1;if(this._currentIndex!==A)for(var B=this._currentIndex-1,L=1;A<=B;)s+=L*(this._string[B]-"0"),--B,L*=10;if(this._currentIndex<this._endIndex&&"."===this._string[this._currentIndex]){if(this._currentIndex+=1,this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)w*=10,C+=(this._string.charAt(this._currentIndex)-"0")/w,this._currentIndex+=1}if(this._currentIndex!==T&&this._currentIndex+1<this._endIndex&&("e"===this._string[this._currentIndex]||"E"===this._string[this._currentIndex])&&"x"!==this._string[this._currentIndex+1]&&"m"!==this._string[this._currentIndex+1]){if(this._currentIndex+=1,"+"===this._string[this._currentIndex]?this._currentIndex+=1:"-"===this._string[this._currentIndex]&&(this._currentIndex+=1,D=-1),this._currentIndex>=this._endIndex||this._string[this._currentIndex]<"0"||"9"<this._string[this._currentIndex])return null;for(;this._currentIndex<this._endIndex&&"0"<=this._string[this._currentIndex]&&this._string[this._currentIndex]<="9";)e*=10,e+=this._string[this._currentIndex]-"0",this._currentIndex+=1}var P=s+C;return P*=O,e&&(P*=Math.pow(10,D*e)),T===this._currentIndex?null:(this._skipOptionalSpacesOrDelimiter(),P)},_parseArcFlag:function(){if(this._currentIndex>=this._endIndex)return null;var e=null,s=this._string[this._currentIndex];if(this._currentIndex+=1,"0"===s)e=0;else{if("1"!==s)return null;e=1}return this._skipOptionalSpacesOrDelimiter(),e}};var C=e.SVGPathElement.prototype.setAttribute,O=e.SVGPathElement.prototype.removeAttribute,D=e.Symbol?e.Symbol():"__cachedPathData",T=e.Symbol?e.Symbol():"__cachedNormalizedPathData",b=function(e,s,w,C,O,D,T,A,B,L){function h(e,s,w){return{x:e*Math.cos(w)-s*Math.sin(w),y:e*Math.sin(w)+s*Math.cos(w)}}var P=Math.PI*T/180,M=[];L?(H=L[0],z=L[1],V=L[2],R=L[3]):(e=(N=h(e,s,-P)).x,s=N.y,1<(N=($=(e-(w=(F=h(w,C,-P)).x))/2)*$/(O*O)+(I=(s-(C=F.y))/2)*I/(D*D))&&(O*=N=Math.sqrt(N),D*=N),F=O*O,N=D*D,V=(F=(A===B?-1:1)*Math.sqrt(Math.abs((F*N-F*I*I-N*$*$)/(F*I*I+N*$*$))))*O*I/D+(e+w)/2,R=F*-D*$/O+(s+C)/2,H=Math.asin(parseFloat(((s-R)/D).toFixed(9))),z=Math.asin(parseFloat(((C-R)/D).toFixed(9))),e<V&&(H=Math.PI-H),w<V&&(z=Math.PI-z),H<0&&(H=2*Math.PI+H),z<0&&(z=2*Math.PI+z),B&&z<H&&(H-=2*Math.PI),!B&&H<z&&(z-=2*Math.PI));var I,F,$,N=z-H;Math.abs(N)>120*Math.PI/180&&(I=z,F=w,$=C,z=B&&H<z?H+120*Math.PI/180*1:H+120*Math.PI/180*-1,w=V+O*Math.cos(z),C=R+D*Math.sin(z),M=b(w,C,F,$,O,D,T,0,B,[z,I,V,R])),N=z-H;var V=Math.cos(H),R=Math.sin(H),H=Math.cos(z),z=Math.sin(z);if(H=[w+(O=4/3*O*(N=Math.tan(N/4)))*z,C-(D=4/3*D*N)*H],C=[w,C],(V=[e+O*R,s-D*V])[0]=2*(N=[e,s])[0]-V[0],V[1]=2*N[1]-V[1],L)return[V,H,C].concat(M);M=[V,H,C].concat(M).join().split(",");var W=[],j=[];return M.forEach((function(e,s){s%2?j.push(h(M[s-1],M[s],P).y):j.push(h(M[s],M[s+1],P).x),6===j.length&&(W.push(j),j=[])})),W};e.SVGPathElement.prototype.setAttribute=function(e,s){"d"===e&&(this[D]=null,this[T]=null),C.call(this,e,s)},e.SVGPathElement.prototype.removeAttribute=function(e,s){"d"===e&&(this[D]=null,this[T]=null),O.call(this,e)},e.SVGPathElement.prototype.getPathData=function(e){if(e&&e.normalize)return this[T]?l(this[T]):(this[D]?B=l(this[D]):(B=n(this.getAttribute("d")||""),this[D]=l(B)),e=r((s=[],A=O=C=w=null,B.forEach((function(e){var D,T,B,L,P,M,I=e.type;"M"===I?(P=e.values[0],M=e.values[1],s.push({type:"M",values:[P,M]}),w=O=P,C=A=M):"m"===I?(P=w+e.values[0],M=C+e.values[1],s.push({type:"M",values:[P,M]}),w=O=P,C=A=M):"L"===I?(P=e.values[0],M=e.values[1],s.push({type:"L",values:[P,M]}),w=P,C=M):"l"===I?(P=w+e.values[0],M=C+e.values[1],s.push({type:"L",values:[P,M]}),w=P,C=M):"C"===I?(D=e.values[0],T=e.values[1],B=e.values[2],L=e.values[3],P=e.values[4],M=e.values[5],s.push({type:"C",values:[D,T,B,L,P,M]}),w=P,C=M):"c"===I?(D=w+e.values[0],T=C+e.values[1],B=w+e.values[2],L=C+e.values[3],P=w+e.values[4],M=C+e.values[5],s.push({type:"C",values:[D,T,B,L,P,M]}),w=P,C=M):"Q"===I?(D=e.values[0],T=e.values[1],P=e.values[2],M=e.values[3],s.push({type:"Q",values:[D,T,P,M]}),w=P,C=M):"q"===I?(D=w+e.values[0],T=C+e.values[1],P=w+e.values[2],M=C+e.values[3],s.push({type:"Q",values:[D,T,P,M]}),w=P,C=M):"A"===I?(P=e.values[5],M=e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],P,M]}),w=P,C=M):"a"===I?(P=w+e.values[5],M=C+e.values[6],s.push({type:"A",values:[e.values[0],e.values[1],e.values[2],e.values[3],e.values[4],P,M]}),w=P,C=M):"H"===I?(P=e.values[0],s.push({type:"H",values:[P]}),w=P):"h"===I?(P=w+e.values[0],s.push({type:"H",values:[P]}),w=P):"V"===I?(M=e.values[0],s.push({type:"V",values:[M]}),C=M):"v"===I?(M=C+e.values[0],s.push({type:"V",values:[M]}),C=M):"S"===I?(B=e.values[0],L=e.values[1],P=e.values[2],M=e.values[3],s.push({type:"S",values:[B,L,P,M]}),w=P,C=M):"s"===I?(B=w+e.values[0],L=C+e.values[1],P=w+e.values[2],M=C+e.values[3],s.push({type:"S",values:[B,L,P,M]}),w=P,C=M):"T"===I?(P=e.values[0],M=e.values[1],s.push({type:"T",values:[P,M]}),w=P,C=M):"t"===I?(P=w+e.values[0],M=C+e.values[1],s.push({type:"T",values:[P,M]}),w=P,C=M):"Z"!==I&&"z"!==I||(s.push({type:"Z",values:[]}),w=O,C=A)})),s)),this[T]=l(e),e);if(this[D])return l(this[D]);var s,w,C,O,A,B=n(this.getAttribute("d")||"");return this[D]=l(B),B},e.SVGPathElement.prototype.setPathData=function(e){if(0===e.length)w?this.setAttribute("d",""):this.removeAttribute("d");else{for(var s="",C=0,O=e.length;C<O;C+=1){var D=e[C];0<C&&(s+=" "),s+=D.type,D.values&&0<D.values.length&&(s+=" "+D.values.join(" "))}this.setAttribute("d",s)}},e.SVGRectElement.prototype.getPathData=function(e){var s=this.x.baseVal.value,w=this.y.baseVal.value,C=this.width.baseVal.value,O=this.height.baseVal.value,D=(this.hasAttribute("rx")?this.rx:this.ry).baseVal.value,T=(this.hasAttribute("ry")?this.ry:this.rx).baseVal.value;return w=(w=[{type:"M",values:[s+(D=C/2<D?C/2:D),w]},{type:"H",values:[s+C-D]},{type:"A",values:[D,T=O/2<T?O/2:T,0,0,1,s+C,w+T]},{type:"V",values:[w+O-T]},{type:"A",values:[D,T,0,0,1,s+C-D,w+O]},{type:"H",values:[s+D]},{type:"A",values:[D,T,0,0,1,s,w+O-T]},{type:"V",values:[w+T]},{type:"A",values:[D,T,0,0,1,s+D,w]},{type:"Z",values:[]}]).filter((function(e){return"A"!==e.type||0!==e.values[0]&&0!==e.values[1]})),e&&!0===e.normalize?r(w):w},e.SVGCircleElement.prototype.getPathData=function(e){var s=this.cx.baseVal.value,w=this.cy.baseVal.value,C=this.r.baseVal.value;return w=[{type:"M",values:[s+C,w]},{type:"A",values:[C,C,0,0,1,s,w+C]},{type:"A",values:[C,C,0,0,1,s-C,w]},{type:"A",values:[C,C,0,0,1,s,w-C]},{type:"A",values:[C,C,0,0,1,s+C,w]},{type:"Z",values:[]}],e&&!0===e.normalize?r(w):w},e.SVGEllipseElement.prototype.getPathData=function(e){var s=this.cx.baseVal.value,w=this.cy.baseVal.value,C=this.rx.baseVal.value,O=this.ry.baseVal.value;return w=[{type:"M",values:[s+C,w]},{type:"A",values:[C,O,0,0,1,s,w+O]},{type:"A",values:[C,O,0,0,1,s-C,w]},{type:"A",values:[C,O,0,0,1,s,w-O]},{type:"A",values:[C,O,0,0,1,s+C,w]},{type:"Z",values:[]}],e&&!0===e.normalize?r(w):w},e.SVGLineElement.prototype.getPathData=function(){return[{type:"M",values:[this.x1.baseVal.value,this.y1.baseVal.value]},{type:"L",values:[this.x2.baseVal.value,this.y2.baseVal.value]}]},e.SVGPolylineElement.prototype.getPathData=function(){for(var e=[],s=0;s<this.points.numberOfItems;s+=1){var w=this.points.getItem(s);e.push({type:0===s?"M":"L",values:[w.x,w.y]})}return e},e.SVGPolygonElement.prototype.getPathData=function(){for(var e=[],s=0;s<this.points.numberOfItems;s+=1){var w=this.points.getItem(s);e.push({type:0===s?"M":"L",values:[w.x,w.y]})}return e.push({type:"Z",values:[]}),e}}()}(e))}function Ke(e){var s,w,C,O,D,T,A,B,L,P,M,I,F,$,N=e.options,V=e.curStats,R=e.aplStats,H=V.position_socketXYSE,z=!1;function S(e,s){return(e=1===s?{x:e.left+e.width/2,y:e.top}:2===s?{x:e.right,y:e.top+e.height/2}:3===s?{x:e.left+e.width/2,y:e.bottom}:{x:e.left,y:e.top+e.height/2}).socketId=s,e}function E(e){return{x:e.x,y:e.y}}if(V.position_path=N.path,V.position_lineStrokeWidth=V.line_strokeWidth,V.position_socketGravitySE=s=we(N.socketGravitySE),w=[0,1].map((function(s){var w=N.anchorSE[s],C=e.optionIsAttach.anchorSE[s],O=!1!==C?pt[w._id]:null,D=!1!==C&&O.conf.getStrokeWidth?O.conf.getStrokeWidth(O,e):0,T=!1!==C&&O.conf.getBBoxNest?O.conf.getBBoxNest(O,e,D):Le(w,e.baseWindow);return V.capsMaskAnchor_pathDataSE[s]=!1!==C&&O.conf.getPathData?O.conf.getPathData(O,e,D):(C=null!=(w=T).right?w.right:w.left+w.width,O=null!=w.bottom?w.bottom:w.top+w.height,[{type:"M",values:[w.left,w.top]},{type:"L",values:[C,w.top]},{type:"L",values:[C,O]},{type:"L",values:[w.left,O]},{type:"Z",values:[]}]),V.capsMaskAnchor_strokeWidthSE[s]=D,T})),A=-1,N.socketSE[0]&&N.socketSE[1]?(H[0]=S(w[0],N.socketSE[0]),H[1]=S(w[1],N.socketSE[1])):(N.socketSE[0]||N.socketSE[1]?(T=N.socketSE[0]?(D=0,1):(D=1,0),H[D]=S(w[D],N.socketSE[D]),(O=ee.map((function(e){return S(w[T],e)}))).forEach((function(e){var s=Ae(e,H[D]);(s<A||-1===A)&&(H[T]=e,A=s)}))):(O=ee.map((function(e){return S(w[1],e)})),ee.map((function(e){return S(w[0],e)})).forEach((function(e){O.forEach((function(s){var w=Ae(e,s);(w<A||-1===A)&&(H[0]=e,H[1]=s,A=w)}))}))),[0,1].forEach((function(e){var s,C;N.socketSE[e]||(w[e].width||w[e].height?w[e].width||4!==H[e].socketId&&2!==H[e].socketId?w[e].height||1!==H[e].socketId&&3!==H[e].socketId||(H[e].socketId=0<=H[e?0:1].y-w[e].top?3:1):H[e].socketId=0<=H[e?0:1].x-w[e].left?2:4:(s=H[e?0:1].x-w[e].left,C=H[e?0:1].y-w[e].top,H[e].socketId=Math.abs(s)>=Math.abs(C)?0<=s?2:4:0<=C?3:1))}))),V.position_path!==R.position_path||V.position_lineStrokeWidth!==R.position_lineStrokeWidth||[0,1].some((function(e){return V.position_plugOverheadSE[e]!==R.position_plugOverheadSE[e]||(w=H[e],C=R.position_socketXYSE[e],w.x!==C.x||w.y!==C.y||w.socketId!==C.socketId)||(w=s[e],C=R.position_socketGravitySE[e],(e=null==w?"auto":Array.isArray(w)?"array":"number")!=(null==C?"auto":Array.isArray(C)?"array":"number")||("array"==e?w[0]!==C[0]||w[1]!==C[1]:w!==C));var w,C}))){switch(e.pathList.baseVal=C=[],e.pathList.animVal=null,V.position_path){case 1:C.push([E(H[0]),E(H[1])]);break;case 2:I="number"==typeof s[0]&&0<s[0]||"number"==typeof s[1]&&0<s[1],I=(F=ae*(I?-1:1))-($=Math.atan2(H[1].y-H[0].y,H[1].x-H[0].x)),$=Math.PI-$-F,F=Ae(H[0],H[1])/Math.sqrt(2)*ie,I={x:H[0].x+Math.cos(I)*F,y:H[0].y+Math.sin(I)*F*-1},F={x:H[1].x+Math.cos($)*F,y:H[1].y+Math.sin($)*F*-1},C.push([E(H[0]),I,F,E(H[1])]);break;case 3:case 4:L=[s[0],4===V.position_path?0:s[1]],P=[],M=[],H.forEach((function(e,s){var w,C=L[s],O=Array.isArray(C)?{x:C[0],y:C[1]}:"number"==typeof C?1===e.socketId?{x:0,y:-C}:2===e.socketId?{x:C,y:0}:3===e.socketId?{x:0,y:C}:{x:-C,y:0}:(w=H[s?0:1],C=0<(C=V.position_plugOverheadSE[s])?120+(8<C?3.75*(C-8):0):80+(V.position_lineStrokeWidth>4?5*(V.position_lineStrokeWidth-4):0),1===e.socketId?{x:0,y:-(O=(O=(e.y-w.y)/2)<C?C:O)}:2===e.socketId?{x:O=(O=(w.x-e.x)/2)<C?C:O,y:0}:3===e.socketId?{x:0,y:O=(O=(w.y-e.y)/2)<C?C:O}:{x:-(O=(O=(e.x-w.x)/2)<C?C:O),y:0});P[s]=e.x+O.x,M[s]=e.y+O.y})),C.push([E(H[0]),{x:P[0],y:M[0]},{x:P[1],y:M[1]},E(H[1])]);break;case 5:!function(){var e,w=[[],[]],O=[];function h(e){return 1===e?3:2===e?4:3===e?1:2}function p(e){return 2===e||4===e?"x":"y"}function c(e,s,w){var C={x:e.x,y:e.y};if(w){if(w===h(e.dirId))throw new Error("Invalid dirId: "+w);C.dirId=w}else C.dirId=e.dirId;return 1===C.dirId?C.y-=s:2===C.dirId?C.x+=s:3===C.dirId?C.y+=s:C.x-=s,C}function d(e,s){return 1===s.dirId?e.y<=s.y:2===s.dirId?e.x>=s.x:3===s.dirId?e.y>=s.y:e.x<=s.x}function f(e,s){return 1===s.dirId||3===s.dirId?e.x===s.x:e.y===s.y}function y(e){return e[0]?{contain:0,notContain:1}:{contain:1,notContain:0}}function m(e,s,w){return Math.abs(s[w]-e[w])}function S(e,s,w){return"x"===w?e.x<s.x?2:4:e.y<s.y?3:1}for(H.forEach((function(e,C){var D=E(e),T=s[C];e=Array.isArray(T)?T[0]<0?[4,-T[0]]:0<T[0]?[2,T[0]]:T[1]<0?[1,-T[1]]:0<T[1]?[3,T[1]]:[e.socketId,0]:"number"!=typeof T?[e.socketId,re]:0<=T?[e.socketId,T]:[h(e.socketId),-T],D.dirId=e[0],T=e[1],w[C].push(D),O[C]=c(D,T)}));function(){var e,s,C,D,T=[d(O[1],O[0]),d(O[0],O[1])],A=[p(O[0].dirId),p(O[1].dirId)];if(A[0]===A[1]){if(T[0]&&T[1])return void(f(O[1],O[0])||(O[0][A[0]]===O[1][A[1]]?(w[0].push(O[0]),w[1].push(O[1])):(e=O[0][A[0]]+(O[1][A[1]]-O[0][A[0]])/2,w[0].push(c(O[0],Math.abs(e-O[0][A[0]]))),w[1].push(c(O[1],Math.abs(e-O[1][A[1]]))))));T[0]!==T[1]?(s=y(T),(C=m(O[s.notContain],O[s.contain],A[s.notContain]))<re&&(O[s.notContain]=c(O[s.notContain],re-C)),w[s.notContain].push(O[s.notContain]),O[s.notContain]=c(O[s.notContain],re,f(O[s.contain],O[s.notContain])?"x"===A[s.notContain]?3:2:S(O[s.notContain],O[s.contain],"x"===A[s.notContain]?"y":"x"))):(C=m(O[0],O[1],"x"===A[0]?"y":"x"),w.forEach((function(e,s){var w=0===s?1:0;e.push(O[s]),O[s]=c(O[s],re,60<=C?S(O[s],O[w],"x"===A[s]?"y":"x"):"x"===A[s]?3:2)})))}else{if(T[0]&&T[1])return void(f(O[1],O[0])?w[1].push(O[1]):f(O[0],O[1])?w[0].push(O[0]):w[0].push("x"===A[0]?{x:O[1].x,y:O[0].y}:{x:O[0].x,y:O[1].y}));T[0]!==T[1]?(s=y(T),w[s.notContain].push(O[s.notContain]),O[s.notContain]=c(O[s.notContain],re,m(O[s.notContain],O[s.contain],A[s.contain])>=re?S(O[s.notContain],O[s.contain],A[s.contain]):O[s.contain].dirId)):(D=[{x:O[0].x,y:O[0].y},{x:O[1].x,y:O[1].y}],w.forEach((function(e,s){var w=0===s?1:0,C=m(D[s],D[w],A[s]);C<re&&(O[s]=c(O[s],re-C)),e.push(O[s]),O[s]=c(O[s],re,S(O[s],O[w],A[w]))})))}return 1}(););w[1].reverse(),w[0].concat(w[1]).forEach((function(s,w){s={x:s.x,y:s.y},0<w&&C.push([e,s]),e=s}))}()}B=[],V.position_plugOverheadSE.forEach((function(e,s){var O,D,T,A,L,P,M,I,F,$=!s;0<e?2===(O=C[D=$?0:C.length-1]).length?(B[D]=B[D]||Ae.apply(null,O),B[D]>oe&&(B[D]-e<oe&&(e=B[D]-oe),M=Ve(O[0],O[1],($?e:B[D]-e)/B[D]),C[D]=$?[M,O[1]]:[O[0],M],B[D]-=e)):(B[D]=B[D]||Te.apply(null,O),B[D]>oe&&(B[D]-e<oe&&(e=B[D]-oe),M=Ne(O[0],O[1],O[2],O[3],We(O[0],O[1],O[2],O[3],$?e:B[D]-e)),A=$?(T=O[0],M.toP1):(T=O[3],M.fromP2),L=Math.atan2(T.y-M.y,M.x-T.x),P=Ae(M,A),M.x=T.x+Math.cos(L)*e,M.y=T.y+Math.sin(L)*e*-1,A.x=M.x+Math.cos(L)*P,A.y=M.y+Math.sin(L)*P*-1,C[D]=$?[M,M.toP1,M.toP2,O[3]]:[O[0],M.fromP1,M.fromP2,M],B[D]=null)):e<0&&(O=C[D=$?0:C.length-1],M=H[s].socketId,s=-w[s]["x"==(I=4===M||2===M?"x":"y")?"width":"height"],F=(e=e<s?s:e)*(4===M||1===M?-1:1),2===O.length?O[$?0:O.length-1][I]+=F:($?[0,1]:[O.length-2,O.length-1]).forEach((function(e){O[e][I]+=F})),B[D]=null)})),R.position_socketXYSE=we(H),R.position_plugOverheadSE=we(V.position_plugOverheadSE),R.position_path=V.position_path,R.position_lineStrokeWidth=V.position_lineStrokeWidth,R.position_socketGravitySE=we(s),z=!0,e.events.apl_position&&e.events.apl_position.forEach((function(s){s(e,C)}))}return z}function Je(e,s){s!==e.isShown&&(!!s!=!!e.isShown&&(e.svg.style.visibility=s?"":"hidden"),e.isShown=s,e.events&&e.events.svgShow&&e.events.svgShow.forEach((function(w){w(e,s)})))}function $e(s,w){var C,O,D,T,A,B,L,P,M,I,F,$,N,V,R,H,z,W,j,X,q,Y,G,Z,J,ee,te,oe,re,ie,ae,se,le,me,ge,ye,ve,_e,Se,st,ct,ut,dt,pt={};w.line&&(pt.line=(P=(C=s).options,O=C.curStats,M=C.events,I=!1,I=Xe(C,O,"line_color",P.lineColor,M.cur_line_color)||I,I=Xe(C,O,"line_colorTra",Oe(O.line_color)[0]<1)||I,I=Xe(C,O,"line_strokeWidth",P.lineSize,M.cur_line_strokeWidth)||I)),(w.plug||pt.line)&&(pt.plug=(T=(D=s).options,A=D.curStats,B=D.events,L=!1,[0,1].forEach((function(e){var s,w,C,O,P,M,I,F,$=T.plugSE[e];L=Xe(D,A.plug_enabledSE,e,$!==U)||L,L=Xe(D,A.plug_plugSE,e,$)||L,L=Xe(D,A.plug_colorSE,e,F=T.plugColorSE[e]||A.line_color,B.cur_plug_colorSE)||L,L=Xe(D,A.plug_colorTraSE,e,Oe(F)[0]<1)||L,$!==U&&(O=w=(s=K[Q[$]]).widthR*T.plugSizeSE[e],P=C=s.heightR*T.plugSizeSE[e],pe&&(O*=A.line_strokeWidth,P*=A.line_strokeWidth),L=Xe(D,A.plug_markerWidthSE,e,O)||L,L=Xe(D,A.plug_markerHeightSE,e,P)||L,A.capsMaskMarker_markerWidthSE[e]=w,A.capsMaskMarker_markerHeightSE[e]=C),A.plugOutline_plugSE[e]=A.capsMaskMarker_plugSE[e]=$,A.plug_enabledSE[e]?(F=A.line_strokeWidth/fe.lineSize*T.plugSizeSE[e],A.position_plugOverheadSE[e]=s.overhead*F,A.viewBox_plugBCircleSE[e]=s.bCircle*F,M=s.sideLen*F,I=s.backLen*F):(A.position_plugOverheadSE[e]=-A.line_strokeWidth/2,A.viewBox_plugBCircleSE[e]=M=I=0),Xe(D,A.attach_plugSideLenSE,e,M,B.cur_attach_plugSideLenSE),Xe(D,A.attach_plugBackLenSE,e,I,B.cur_attach_plugBackLenSE),A.capsMaskAnchor_enabledSE[e]=!A.plug_enabledSE[e]})),L=Xe(D,A,"plug_enabled",A.plug_enabledSE[0]||A.plug_enabledSE[1])||L)),(w.lineOutline||pt.line)&&(pt.lineOutline=(M=(P=s).options,G=!1,G=Xe(P,I=P.curStats,"lineOutline_enabled",M.lineOutlineEnabled)||G,G=Xe(P,I,"lineOutline_color",M.lineOutlineColor)||G,G=Xe(P,I,"lineOutline_colorTra",Oe(I.lineOutline_color)[0]<1)||G,M=I.line_strokeWidth*M.lineOutlineSize,G=Xe(P,I,"lineOutline_strokeWidth",I.line_strokeWidth-2*M)||G,G=Xe(P,I,"lineOutline_inStrokeWidth",I.lineOutline_colorTra?I.lineOutline_strokeWidth+2*he:I.line_strokeWidth-M)||G)),(w.plugOutline||pt.line||pt.plug||pt.lineOutline)&&(pt.plugOutline=($=(F=s).options,N=F.curStats,V=!1,[0,1].forEach((function(e){var s=N.plugOutline_plugSE[e],w=s!==U?K[Q[s]]:null;V=Xe(F,N.plugOutline_enabledSE,e,$.plugOutlineEnabledSE[e]&&N.plug_enabled&&N.plug_enabledSE[e]&&!!w&&!!w.outlineBase)||V,V=Xe(F,N.plugOutline_colorSE,e,s=$.plugOutlineColorSE[e]||N.lineOutline_color)||V,V=Xe(F,N.plugOutline_colorTraSE,e,Oe(s)[0]<1)||V,w&&w.outlineBase&&((s=$.plugOutlineSizeSE[e])>w.outlineMax&&(s=w.outlineMax),s*=2*w.outlineBase,V=Xe(F,N.plugOutline_strokeWidthSE,e,s)||V,V=Xe(F,N.plugOutline_inStrokeWidthSE,e,N.plugOutline_colorTraSE[e]?s-he/(N.line_strokeWidth/fe.lineSize)/$.plugSizeSE[e]*2:s/2)||V)})),V)),(w.faces||pt.line||pt.plug||pt.lineOutline||pt.plugOutline)&&(pt.faces=(z=(R=s).curStats,W=R.aplStats,j=R.events,X=!1,!z.line_altColor&&Xe(R,W,"line_color",H=z.line_color,j.apl_line_color)&&(R.lineFace.style.stroke=H,X=!0),Xe(R,W,"line_strokeWidth",H=z.line_strokeWidth,j.apl_line_strokeWidth)&&(R.lineShape.style.strokeWidth=H+"px",X=!0,(ue||ce)&&(je(R,R.lineShape),ce&&(je(R,R.lineFace),je(R,R.lineMaskCaps)))),Xe(R,W,"lineOutline_enabled",H=z.lineOutline_enabled,j.apl_lineOutline_enabled)&&(R.lineOutlineFace.style.display=H?"inline":"none",X=!0),z.lineOutline_enabled&&(Xe(R,W,"lineOutline_color",H=z.lineOutline_color,j.apl_lineOutline_color)&&(R.lineOutlineFace.style.stroke=H,X=!0),Xe(R,W,"lineOutline_strokeWidth",H=z.lineOutline_strokeWidth,j.apl_lineOutline_strokeWidth)&&(R.lineOutlineMaskShape.style.strokeWidth=H+"px",X=!0,ce&&(je(R,R.lineOutlineMaskCaps),je(R,R.lineOutlineFace))),Xe(R,W,"lineOutline_inStrokeWidth",H=z.lineOutline_inStrokeWidth,j.apl_lineOutline_inStrokeWidth)&&(R.lineMaskShape.style.strokeWidth=H+"px",X=!0,ce&&(je(R,R.lineOutlineMaskCaps),je(R,R.lineOutlineFace)))),Xe(R,W,"plug_enabled",H=z.plug_enabled,j.apl_plug_enabled)&&(R.plugsFace.style.display=H?"inline":"none",X=!0),z.plug_enabled&&[0,1].forEach((function(e){var s=z.plug_plugSE[e],w=s!==U?K[Q[s]]:null,C=Ze(e,w);Xe(R,W.plug_enabledSE,e,H=z.plug_enabledSE[e],j.apl_plug_enabledSE)&&(R.plugsFace.style[C.prop]=H?"url(#"+R.plugMarkerIdSE[e]+")":"none",X=!0),z.plug_enabledSE[e]&&(Xe(R,W.plug_plugSE,e,s,j.apl_plug_plugSE)&&(R.plugFaceSE[e].href.baseVal="#"+w.elmId,Ue(R,R.plugMarkerSE[e],C.orient,w.bBox,R.svg,R.plugMarkerShapeSE[e],R.plugsFace),X=!0,ue&&je(R,R.plugsFace)),Xe(R,W.plug_colorSE,e,H=z.plug_colorSE[e],j.apl_plug_colorSE)&&(R.plugFaceSE[e].style.fill=H,X=!0,(de||pe||ce)&&!z.line_colorTra&&je(R,ce?R.lineMaskCaps:R.capsMaskLine)),["markerWidth","markerHeight"].forEach((function(s){var w="plug_"+s+"SE";Xe(R,W[w],e,H=z[w][e],j["apl_"+w])&&(R.plugMarkerSE[e][s].baseVal.value=H,X=!0)})),Xe(R,W.plugOutline_enabledSE,e,H=z.plugOutline_enabledSE[e],j.apl_plugOutline_enabledSE)&&(H?(R.plugFaceSE[e].style.mask="url(#"+R.plugMaskIdSE[e]+")",R.plugOutlineFaceSE[e].style.display="inline"):(R.plugFaceSE[e].style.mask="none",R.plugOutlineFaceSE[e].style.display="none"),X=!0),z.plugOutline_enabledSE[e]&&(Xe(R,W.plugOutline_plugSE,e,s,j.apl_plugOutline_plugSE)&&(R.plugOutlineFaceSE[e].href.baseVal=R.plugMaskShapeSE[e].href.baseVal=R.plugOutlineMaskShapeSE[e].href.baseVal="#"+w.elmId,[R.plugMaskSE[e],R.plugOutlineMaskSE[e]].forEach((function(e){e.x.baseVal.value=w.bBox.left,e.y.baseVal.value=w.bBox.top,e.width.baseVal.value=w.bBox.width,e.height.baseVal.value=w.bBox.height})),X=!0),Xe(R,W.plugOutline_colorSE,e,H=z.plugOutline_colorSE[e],j.apl_plugOutline_colorSE)&&(R.plugOutlineFaceSE[e].style.fill=H,X=!0,ce&&(je(R,R.lineMaskCaps),je(R,R.lineOutlineMaskCaps))),Xe(R,W.plugOutline_strokeWidthSE,e,H=z.plugOutline_strokeWidthSE[e],j.apl_plugOutline_strokeWidthSE)&&(R.plugOutlineMaskShapeSE[e].style.strokeWidth=H+"px",X=!0),Xe(R,W.plugOutline_inStrokeWidthSE,e,H=z.plugOutline_inStrokeWidthSE[e],j.apl_plugOutline_inStrokeWidthSE)&&(R.plugMaskShapeSE[e].style.strokeWidth=H+"px",X=!0)))})),X)),(w.position||pt.line||pt.plug)&&(pt.position=Ke(s)),(w.path||pt.position)&&(pt.path=(G=(q=s).curStats,te=q.aplStats,ee=q.pathList.animVal||q.pathList.baseVal,Z=G.path_edge,oe=!1,ee&&(Z.x1=Z.x2=ee[0][0].x,Z.y1=Z.y2=ee[0][0].y,G.path_pathData=Y=Be(ee,(function(e){e.x<Z.x1&&(Z.x1=e.x),e.y<Z.y1&&(Z.y1=e.y),e.x>Z.x2&&(Z.x2=e.x),e.y>Z.y2&&(Z.y2=e.y)})),Fe(Y,te.path_pathData)&&(q.linePath.setPathData(Y),te.path_pathData=Y,oe=!0,ce?(je(q,q.plugsFace),je(q,q.lineMaskCaps)):ue&&je(q,q.linePath),q.events.apl_path&&q.events.apl_path.forEach((function(e){e(q,Y)})))),oe)),pt.viewBox=(ee=(J=s).curStats,te=J.aplStats,oe=ee.path_edge,re=ee.viewBox_bBox,ie=te.viewBox_bBox,ae=J.svg.viewBox.baseVal,se=J.svg.style,le=!1,te=Math.max(ee.line_strokeWidth/2,ee.viewBox_plugBCircleSE[0]||0,ee.viewBox_plugBCircleSE[1]||0),me={x1:oe.x1-te,y1:oe.y1-te,x2:oe.x2+te,y2:oe.y2+te},J.events.new_edge4viewBox&&J.events.new_edge4viewBox.forEach((function(e){e(J,me)})),re.x=ee.lineMask_x=ee.lineOutlineMask_x=ee.maskBGRect_x=me.x1,re.y=ee.lineMask_y=ee.lineOutlineMask_y=ee.maskBGRect_y=me.y1,re.width=me.x2-me.x1,re.height=me.y2-me.y1,["x","y","width","height"].forEach((function(e){var s;(s=re[e])!==ie[e]&&(ae[e]=ie[e]=s,se[ne[e]]=s+("x"===e||"y"===e?J.bodyOffset[e]:0)+"px",le=!0)})),le),pt.mask=(ve=(ge=s).curStats,_e=ge.aplStats,Se=!1,ve.plug_enabled?[0,1].forEach((function(e){ve.capsMaskMarker_enabledSE[e]=ve.plug_enabledSE[e]&&ve.plug_colorTraSE[e]||ve.plugOutline_enabledSE[e]&&ve.plugOutline_colorTraSE[e]})):ve.capsMaskMarker_enabledSE[0]=ve.capsMaskMarker_enabledSE[1]=!1,ve.capsMaskMarker_enabled=ve.capsMaskMarker_enabledSE[0]||ve.capsMaskMarker_enabledSE[1],ve.lineMask_outlineMode=ve.lineOutline_enabled,ve.caps_enabled=ve.capsMaskMarker_enabled||ve.capsMaskAnchor_enabledSE[0]||ve.capsMaskAnchor_enabledSE[1],ve.lineMask_enabled=ve.caps_enabled||ve.lineMask_outlineMode,(ve.lineMask_enabled&&!ve.lineMask_outlineMode||ve.lineOutline_enabled)&&["x","y"].forEach((function(e){var s="maskBGRect_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.maskBGRect[e].baseVal.value=ye,Se=!0)})),Xe(ge,_e,"lineMask_enabled",ye=ve.lineMask_enabled)&&(ge.lineFace.style.mask=ye?"url(#"+ge.lineMaskId+")":"none",Se=!0,pe&&je(ge,ge.lineMask)),ve.lineMask_enabled&&(Xe(ge,_e,"lineMask_outlineMode",ye=ve.lineMask_outlineMode)&&(ye?(ge.lineMaskBG.style.display="none",ge.lineMaskShape.style.display="inline"):(ge.lineMaskBG.style.display="inline",ge.lineMaskShape.style.display="none"),Se=!0),["x","y"].forEach((function(e){var s="lineMask_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.lineMask[e].baseVal.value=ye,Se=!0)})),Xe(ge,_e,"caps_enabled",ye=ve.caps_enabled)&&(ge.lineMaskCaps.style.display=ge.lineOutlineMaskCaps.style.display=ye?"inline":"none",Se=!0,pe&&je(ge,ge.capsMaskLine)),ve.caps_enabled&&([0,1].forEach((function(e){var s;Xe(ge,_e.capsMaskAnchor_enabledSE,e,ye=ve.capsMaskAnchor_enabledSE[e])&&(ge.capsMaskAnchorSE[e].style.display=ye?"inline":"none",Se=!0,pe&&je(ge,ge.lineMask)),ve.capsMaskAnchor_enabledSE[e]&&(Fe(s=ve.capsMaskAnchor_pathDataSE[e],_e.capsMaskAnchor_pathDataSE[e])&&(ge.capsMaskAnchorSE[e].setPathData(s),_e.capsMaskAnchor_pathDataSE[e]=s,Se=!0),Xe(ge,_e.capsMaskAnchor_strokeWidthSE,e,ye=ve.capsMaskAnchor_strokeWidthSE[e])&&(ge.capsMaskAnchorSE[e].style.strokeWidth=ye+"px",Se=!0))})),Xe(ge,_e,"capsMaskMarker_enabled",ye=ve.capsMaskMarker_enabled)&&(ge.capsMaskLine.style.display=ye?"inline":"none",Se=!0),ve.capsMaskMarker_enabled&&[0,1].forEach((function(e){var s=ve.capsMaskMarker_plugSE[e],w=s!==U?K[Q[s]]:null,C=Ze(e,w);Xe(ge,_e.capsMaskMarker_enabledSE,e,ye=ve.capsMaskMarker_enabledSE[e])&&(ge.capsMaskLine.style[C.prop]=ye?"url(#"+ge.lineMaskMarkerIdSE[e]+")":"none",Se=!0),ve.capsMaskMarker_enabledSE[e]&&(Xe(ge,_e.capsMaskMarker_plugSE,e,s)&&(ge.capsMaskMarkerShapeSE[e].href.baseVal="#"+w.elmId,Ue(ge,ge.capsMaskMarkerSE[e],C.orient,w.bBox,ge.svg,ge.capsMaskMarkerShapeSE[e],ge.capsMaskLine),Se=!0,ue&&(je(ge,ge.capsMaskLine),je(ge,ge.lineFace))),["markerWidth","markerHeight"].forEach((function(s){var w="capsMaskMarker_"+s+"SE";Xe(ge,_e[w],e,ye=ve[w][e])&&(ge.capsMaskMarkerSE[e][s].baseVal.value=ye,Se=!0)})))})))),ve.lineOutline_enabled&&["x","y"].forEach((function(e){var s="lineOutlineMask_"+e;Xe(ge,_e,s,ye=ve[s])&&(ge.lineOutlineMask[e].baseVal.value=ye,Se=!0)})),Se),w.effect&&(ut=(st=s).curStats,dt=st.aplStats,Object.keys(e).forEach((function(s){var w=e[s],C=s+"_enabled",O=s+"_options";s=ut[O];Xe(st,dt,C,ct=ut[C])?(ct&&(dt[O]=we(s)),w[ct?"init":"remove"](st)):ct&&ke(s,dt[O])&&(w.remove(st),dt[C]=!0,dt[O]=we(s),w.init(st))}))),(de||pe)&&pt.line&&!pt.path&&je(s,s.lineShape),de&&pt.plug&&!pt.line&&je(s,s.plugsFace),He(s)}function et(e,s){return{duration:(ge(e.duration)&&0<e.duration?e:s).duration,timing:ye.validTiming(e.timing)?e.timing:we(s.timing)}}function tt(e,w,C,O){var D=e.curStats,T=e.aplStats,A={};function r(){["show_on","show_effect","show_animOptions"].forEach((function(e){T[e]=D[e]}))}D.show_on=w,C&&s[C]&&(D.show_effect=C,D.show_animOptions=et(me(O)?O:{},s[C].defaultAnimOptions)),A.show_on=D.show_on!==T.show_on,A.show_effect=D.show_effect!==T.show_effect,A.show_animOptions=ke(D.show_animOptions,T.show_animOptions),A.show_effect||A.show_animOptions?D.show_inAnim?(C=A.show_effect?s[T.show_effect].stop(e,!0,!0):s[T.show_effect].stop(e),r(),s[T.show_effect].init(e,C)):A.show_on&&(T.show_effect&&A.show_effect&&s[T.show_effect].stop(e,!0,!0),r(),s[T.show_effect].init(e)):A.show_on&&(r(),s[T.show_effect].start(e))}function nt(e,s,w){return w={props:e,optionName:w},e.attachments.indexOf(s)<0&&(!s.conf.bind||s.conf.bind(s,w))&&(e.attachments.push(s),s.boundTargets.push(w),1)}function at(e,s,w){var C=e.attachments.indexOf(s);-1<C&&e.attachments.splice(C,1),s.boundTargets.some((function(w,O){return w.props===e&&(s.conf.unbind&&s.conf.unbind(s,w),C=O,!0)}))&&(s.boundTargets.splice(C,1),w||ze((function(){s.boundTargets.length||D(s)})))}function it(D,T){var A,B,L,P,M,I,F,$,N,V,R,H,z,W,j,X=D.options,U={};function _(e,s,w,C,O){var D={};return w?null!=C?(D.container=e[w],D.key=C):(D.container=e,D.key=w):(D.container=e,D.key=s),D.default=O,D.acceptsAuto=null==D.default,D}function v(e,s,w,C,O,D,T){var A,B,L;T=_(e,w,O,D,T);return null!=s[w]&&(B=(s[w]+"").toLowerCase())&&(T.acceptsAuto&&B===te||(L=C[B]))&&L!==T.container[T.key]&&(T.container[T.key]=L,A=!0),null!=T.container[T.key]||T.acceptsAuto||(T.container[T.key]=T.default,A=!0),A}function E(e,s,w,C,O,D,T,A,B){var L,P,M,I;T=_(e,w,O,D,T);if(!C){if(null==T.default)throw new Error("Invalid `type`: "+w);C=typeof T.default}return null!=s[w]&&(T.acceptsAuto&&(s[w]+"").toLowerCase()===te||(M=P=s[w],("number"===(I=C)?ge(M):typeof M===I)&&(P=B&&"string"===C&&P?P.trim():P,1)&&(!A||A(P))))&&P!==T.container[T.key]&&(T.container[T.key]=P,L=!0),null!=T.container[T.key]||T.acceptsAuto||(T.container[T.key]=T.default,L=!0),L}if(T=T||{},["start","end"].forEach((function(e,s){var w=T[e],C=!1;if(w&&(Me(w)||(C=O(w,"anchor")))&&w!==X.anchorSE[s]){if(!1!==D.optionIsAttach.anchorSE[s]&&at(D,pt[X.anchorSE[s]._id]),C&&!nt(D,pt[w._id],e))throw new Error("Can't bind attachment");X.anchorSE[s]=w,D.optionIsAttach.anchorSE[s]=C,A=U.position=!0}})),!X.anchorSE[0]||!X.anchorSE[1]||X.anchorSE[0]===X.anchorSE[1])throw new Error("`start` and `end` are required.");function x(e){var s=M.appendChild(W.createElementNS(le,"mask"));return s.id=e,s.maskUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[s.x,s.y,s.width,s.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),s}function b(e){var s=M.appendChild(W.createElementNS(le,"marker"));return s.id=e,s.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_STROKEWIDTH,s.viewBox.baseVal||s.setAttribute("viewBox","0 0 0 0"),s}function k(e){return[e.width,e.height].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100)})),e}A&&(R=function(e,s){var w,C;if(!(e=Ce(e))||!(w=Ce(s)))throw new Error("Cannot get frames.");return e.length&&w.length&&(e.reverse(),w.reverse(),e.some((function(e){return w.some((function(s){return s===e&&(C=s.contentWindow,!0)}))}))),C||window}(!1!==D.optionIsAttach.anchorSE[0]?pt[X.anchorSE[0]._id].element:X.anchorSE[0],!1!==D.optionIsAttach.anchorSE[1]?pt[X.anchorSE[1]._id].element:X.anchorSE[1]))!==D.baseWindow&&(L=R,z=(B=D).aplStats,W=L.document,j=q+"-"+B._id,B.pathList={},Ye(z,_e),Object.keys(e).forEach((function(s){var w=s+"_enabled";z[w]&&(e[s].remove(B),z[w]=!1)})),B.baseWindow&&B.svg&&B.baseWindow.document.body.removeChild(B.svg),Qe(B.baseWindow=L),B.bodyOffset=qe(L),B.svg=P=W.createElementNS(le,"svg"),P.className.baseVal=q,P.viewBox.baseVal||P.setAttribute("viewBox","0 0 0 0"),B.defs=M=P.appendChild(W.createElementNS(le,"defs")),B.linePath=F=M.appendChild(W.createElementNS(le,"path")),F.id=$=j+"-line-path",F.className.baseVal=q+"-line-path",pe&&(F.style.fill="none"),B.lineShape=F=M.appendChild(W.createElementNS(le,"use")),F.id=N=j+"-line-shape",F.href.baseVal="#"+$,(I=M.appendChild(W.createElementNS(le,"g"))).id=V=j+"-caps",B.capsMaskAnchorSE=[0,1].map((function(){var e=I.appendChild(W.createElementNS(le,"path"));return e.className.baseVal=q+"-caps-mask-anchor",e})),B.lineMaskMarkerIdSE=[j+"-caps-mask-marker-0",j+"-caps-mask-marker-1"],B.capsMaskMarkerSE=[0,1].map((function(e){return b(B.lineMaskMarkerIdSE[e])})),B.capsMaskMarkerShapeSE=[0,1].map((function(e){return(e=B.capsMaskMarkerSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-caps-mask-marker-shape",e})),B.capsMaskLine=F=I.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-caps-mask-line",F.href.baseVal="#"+N,B.maskBGRect=F=k(M.appendChild(W.createElementNS(le,"rect"))),F.id=R=j+"-mask-bg-rect",F.className.baseVal=q+"-mask-bg-rect",pe&&(F.style.fill="white"),B.lineMask=k(x(B.lineMaskId=j+"-line-mask")),B.lineMaskBG=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+R,B.lineMaskShape=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-line-mask-shape",F.href.baseVal="#"+$,F.style.display="none",B.lineMaskCaps=F=B.lineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+V,B.lineOutlineMask=k(x(L=j+"-line-outline-mask")),(F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use"))).href.baseVal="#"+R,B.lineOutlineMaskShape=F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-line-outline-mask-shape",F.href.baseVal="#"+$,B.lineOutlineMaskCaps=F=B.lineOutlineMask.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+V,B.face=P.appendChild(W.createElementNS(le,"g")),B.lineFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+N,B.lineOutlineFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.href.baseVal="#"+N,F.style.mask="url(#"+L+")",F.style.display="none",B.plugMaskIdSE=[j+"-plug-mask-0",j+"-plug-mask-1"],B.plugMaskSE=[0,1].map((function(e){return x(B.plugMaskIdSE[e])})),B.plugMaskShapeSE=[0,1].map((function(e){return(e=B.plugMaskSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-plug-mask-shape",e})),H=[],B.plugOutlineMaskSE=[0,1].map((function(e){return x(H[e]=j+"-plug-outline-mask-"+e)})),B.plugOutlineMaskShapeSE=[0,1].map((function(e){return(e=B.plugOutlineMaskSE[e].appendChild(W.createElementNS(le,"use"))).className.baseVal=q+"-plug-outline-mask-shape",e})),B.plugMarkerIdSE=[j+"-plug-marker-0",j+"-plug-marker-1"],B.plugMarkerSE=[0,1].map((function(e){return e=b(B.plugMarkerIdSE[e]),pe&&(e.markerUnits.baseVal=SVGMarkerElement.SVG_MARKERUNITS_USERSPACEONUSE),e})),B.plugMarkerShapeSE=[0,1].map((function(e){return B.plugMarkerSE[e].appendChild(W.createElementNS(le,"g"))})),B.plugFaceSE=[0,1].map((function(e){return B.plugMarkerShapeSE[e].appendChild(W.createElementNS(le,"use"))})),B.plugOutlineFaceSE=[0,1].map((function(e){var s=B.plugMarkerShapeSE[e].appendChild(W.createElementNS(le,"use"));return s.style.mask="url(#"+H[e]+")",s.style.display="none",s})),B.plugsFace=F=B.face.appendChild(W.createElementNS(le,"use")),F.className.baseVal=q+"-plugs-face",F.href.baseVal="#"+N,F.style.display="none",B.curStats.show_inAnim?(B.isShown=1,s[z.show_effect].stop(B,!0)):B.isShown||(P.style.visibility="hidden"),W.body.appendChild(P),[0,1,2].forEach((function(e){var s;(e=B.options.labelSEM[e])&&O(e,"label")&&(s=pt[e._id]).conf.initSvg&&s.conf.initSvg(s,B)})),U.line=U.plug=U.lineOutline=U.plugOutline=U.faces=U.effect=!0),U.position=v(X,T,"path",G,null,null,fe.path)||U.position,U.position=v(X,T,"startSocket",Y,"socketSE",0)||U.position,U.position=v(X,T,"endSocket",Y,"socketSE",1)||U.position,[T.startSocketGravity,T.endSocketGravity].forEach((function(e,s){var w,C,O=!1;null!=e&&(Array.isArray(e)?ge(e[0])&&ge(e[1])&&(O=[e[0],e[1]],Array.isArray(X.socketGravitySE[s])&&(w=O,C=X.socketGravitySE[s],w.length===C.length&&w.every((function(e,s){return e===C[s]})))&&(O=!1)):((e+"").toLowerCase()===te?O=null:ge(e)&&0<=e&&(O=e),O===X.socketGravitySE[s]&&(O=!1)),!1!==O&&(X.socketGravitySE[s]=O,U.position=!0))})),U.line=E(X,T,"color",null,"lineColor",null,fe.lineColor,null,!0)||U.line,U.line=E(X,T,"size",null,"lineSize",null,fe.lineSize,(function(e){return 0<e}))||U.line,["startPlug","endPlug"].forEach((function(e,s){U.plug=v(X,T,e,J,"plugSE",s,fe.plugSE[s])||U.plug,U.plug=E(X,T,e+"Color","string","plugColorSE",s,null,null,!0)||U.plug,U.plug=E(X,T,e+"Size",null,"plugSizeSE",s,fe.plugSizeSE[s],(function(e){return 0<e}))||U.plug})),U.lineOutline=E(X,T,"outline",null,"lineOutlineEnabled",null,fe.lineOutlineEnabled)||U.lineOutline,U.lineOutline=E(X,T,"outlineColor",null,"lineOutlineColor",null,fe.lineOutlineColor,null,!0)||U.lineOutline,U.lineOutline=E(X,T,"outlineSize",null,"lineOutlineSize",null,fe.lineOutlineSize,(function(e){return 0<e&&e<=.48}))||U.lineOutline,["startPlugOutline","endPlugOutline"].forEach((function(e,s){U.plugOutline=E(X,T,e,null,"plugOutlineEnabledSE",s,fe.plugOutlineEnabledSE[s])||U.plugOutline,U.plugOutline=E(X,T,e+"Color","string","plugOutlineColorSE",s,null,null,!0)||U.plugOutline,U.plugOutline=E(X,T,e+"Size",null,"plugOutlineSizeSE",s,fe.plugOutlineSizeSE[s],(function(e){return 1<=e}))||U.plugOutline})),["startLabel","endLabel","middleLabel"].forEach((function(e,s){var A,B,L,P=T[e],M=X.labelSEM[s]&&!D.optionIsAttach.labelSEM[s]?pt[X.labelSEM[s]._id].text:X.labelSEM[s],I=!1;if((A="string"==typeof P)&&(P=P.trim()),(A||P&&(I=O(P,"label")))&&P!==M){if(X.labelSEM[s]&&(at(D,pt[X.labelSEM[s]._id]),X.labelSEM[s]=""),P){if(I?(B=pt[(L=P)._id]).boundTargets.slice().forEach((function(e){B.conf.removeOption(B,e)})):L=new C(w.captionLabel,[P]),!nt(D,pt[L._id],e))throw new Error("Can't bind attachment");X.labelSEM[s]=L}D.optionIsAttach.labelSEM[s]=I}})),Object.keys(e).forEach((function(s){var w,C,O=e[s],A=s+"_enabled",B=s+"_options";function l(e){var s={};return O.optionsConf.forEach((function(w){var C=w[0],O=w[3];null==w[4]||s[O]||(s[O]=[]),("function"==typeof C?C:"id"===C?v:E).apply(null,[s,e].concat(w.slice(1)))})),s}function r(e){var w,C=s+"_animOptions";return e.hasOwnProperty("animation")?me(e.animation)?w=D.curStats[C]=et(e.animation,O.defaultAnimOptions):(w=!!e.animation,D.curStats[C]=w?et({},O.defaultAnimOptions):null):(w=!!O.defaultEnabled,D.curStats[C]=w?et({},O.defaultAnimOptions):null),w}T.hasOwnProperty(s)&&(w=T[s],me(w)?(D.curStats[A]=!0,C=D.curStats[B]=l(w),O.anim&&(D.curStats[B].animation=r(w))):(C=D.curStats[A]=!!w)&&(D.curStats[B]=l({}),O.anim&&(D.curStats[B].animation=r({}))),ke(C,X[s])&&(X[s]=C,U.effect=!0))})),$e(D,U)}function ot(w,C,O){var D={options:{anchorSE:[],socketSE:[],socketGravitySE:[],plugSE:[],plugColorSE:[],plugSizeSE:[],plugOutlineEnabledSE:[],plugOutlineColorSE:[],plugOutlineSizeSE:[],labelSEM:["","",""]},optionIsAttach:{anchorSE:[!1,!1],labelSEM:[!1,!1,!1]},curStats:{},aplStats:{},attachments:[],events:{},reflowTargets:[]};Ye(D.curStats,_e),Ye(D.aplStats,_e),Object.keys(e).forEach((function(s){var w=e[s].stats;Ye(D.curStats,w),Ye(D.aplStats,w),D.options[s]=!1})),Ye(D.curStats,Se),Ye(D.aplStats,Se),D.curStats.show_effect=st,D.curStats.show_animOptions=we(s[st].defaultAnimOptions),Object.defineProperty(this,"_id",{value:++dt}),D._id=this._id,ut[this._id]=D,1===arguments.length&&(O=w,w=null),O=O||{},(w||C)&&(O=we(O),w&&(O.start=w),C&&(O.end=C)),D.isShown=D.aplStats.show_on=!O.hide,this.setOptions(O)}function lt(e){return function(s){var w={};w[e]=s,this.setOptions(w)}}function rt(e,s){var w,C={conf:e,curStats:{},aplStats:{},boundTargets:[]},O={};e.argOptions.every((function(e){return!(!s.length||("string"==typeof e.type?typeof s[0]!==e.type:"function"!=typeof e.type||!e.type(s[0]))||(O[e.optionName]=s.shift(),0))})),w=s.length&&me(s[0])?we(s[0]):{},Object.keys(O).forEach((function(e){w[e]=O[e]})),e.stats&&(Ye(C.curStats,e.stats),Ye(C.aplStats,e.stats)),Object.defineProperty(this,"_id",{value:++ht}),Object.defineProperty(this,"isRemoved",{get:function(){return!pt[this._id]}}),C._id=this._id,e.init&&!e.init(C,w)||(pt[this._id]=C)}return e={dash:{stats:{dash_len:{},dash_gap:{},dash_maxOffset:{}},anim:!0,defaultAnimOptions:{duration:1e3,timing:"linear"},optionsConf:[["type","len","number",null,null,null,function(e){return 0<e}],["type","gap","number",null,null,null,function(e){return 0<e}]],init:function(s){Ge(s,"apl_line_strokeWidth",e.dash.update),s.lineFace.style.strokeDashoffset=0,e.dash.update(s)},remove:function(s){var w=s.curStats;De(s,"apl_line_strokeWidth",e.dash.update),w.dash_animId&&(ye.remove(w.dash_animId),w.dash_animId=null),s.lineFace.style.strokeDasharray="none",s.lineFace.style.strokeDashoffset=0,Ye(s.aplStats,e.dash.stats)},update:function(e){var s,w=e.curStats,C=e.aplStats,O=C.dash_options,D=!1;w.dash_len=O.len||2*C.line_strokeWidth,w.dash_gap=O.gap||C.line_strokeWidth,w.dash_maxOffset=w.dash_len+w.dash_gap,D=Xe(e,C,"dash_len",w.dash_len)||D,(D=Xe(e,C,"dash_gap",w.dash_gap)||D)&&(e.lineFace.style.strokeDasharray=C.dash_len+","+C.dash_gap),w.dash_animOptions?(D=Xe(e,C,"dash_maxOffset",w.dash_maxOffset),C.dash_animOptions&&(D||ke(w.dash_animOptions,C.dash_animOptions))&&(w.dash_animId&&(s=ye.stop(w.dash_animId),ye.remove(w.dash_animId)),C.dash_animOptions=null),C.dash_animOptions||(w.dash_animId=ye.add((function(e){return(1-e)*C.dash_maxOffset+"px"}),(function(s){e.lineFace.style.strokeDashoffset=s}),w.dash_animOptions.duration,0,w.dash_animOptions.timing,!1,s),C.dash_animOptions=we(w.dash_animOptions))):C.dash_animOptions&&(w.dash_animId&&(ye.remove(w.dash_animId),w.dash_animId=null),e.lineFace.style.strokeDashoffset=0,C.dash_animOptions=null)}},gradient:{stats:{gradient_colorSE:{hasSE:!0},gradient_pointSE:{hasSE:!0,hasProps:!0}},optionsConf:[["type","startColor","string","colorSE",0,null,null,!0],["type","endColor","string","colorSE",1,null,null,!0]],init:function(s){var w=s.baseWindow.document,C=s.defs,O=q+"-"+s._id+"-gradient";s.efc_gradient_gradient=C=C.appendChild(w.createElementNS(le,"linearGradient")),C.id=O,C.gradientUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,[C.x1,C.y1,C.x2,C.y2].forEach((function(e){e.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0)})),s.efc_gradient_stopSE=[0,1].map((function(e){var C=s.efc_gradient_gradient.appendChild(w.createElementNS(le,"stop"));try{C.offset.baseVal=e}catch(s){if(s.code!==DOMException.NO_MODIFICATION_ALLOWED_ERR)throw s;C.setAttribute("offset",e)}return C})),Ge(s,"cur_plug_colorSE",e.gradient.update),Ge(s,"apl_path",e.gradient.update),s.curStats.line_altColor=!0,s.lineFace.style.stroke="url(#"+O+")",e.gradient.update(s)},remove:function(s){s.efc_gradient_gradient&&(s.defs.removeChild(s.efc_gradient_gradient),s.efc_gradient_gradient=s.efc_gradient_stopSE=null),De(s,"cur_plug_colorSE",e.gradient.update),De(s,"apl_path",e.gradient.update),s.curStats.line_altColor=!1,s.lineFace.style.stroke=s.curStats.line_color,Ye(s.aplStats,e.gradient.stats)},update:function(e){var s,w=e.curStats,C=e.aplStats,O=C.gradient_options,D=e.pathList.animVal||e.pathList.baseVal;[0,1].forEach((function(e){w.gradient_colorSE[e]=O.colorSE[e]||w.plug_colorSE[e]})),s=D[0][0],w.gradient_pointSE[0]={x:s.x,y:s.y},s=(D=D[D.length-1])[D.length-1],w.gradient_pointSE[1]={x:s.x,y:s.y},[0,1].forEach((function(s){var O;Xe(e,C.gradient_colorSE,s,O=w.gradient_colorSE[s])&&(pe?(O=Oe(O),e.efc_gradient_stopSE[s].style.stopColor=O[1],e.efc_gradient_stopSE[s].style.stopOpacity=O[0]):e.efc_gradient_stopSE[s].style.stopColor=O),["x","y"].forEach((function(D){(O=w.gradient_pointSE[s][D])!==C.gradient_pointSE[s][D]&&(e.efc_gradient_gradient[D+(s+1)].baseVal.value=C.gradient_pointSE[s][D]=O)}))}))}},dropShadow:{stats:{dropShadow_dx:{},dropShadow_dy:{},dropShadow_blur:{},dropShadow_color:{},dropShadow_opacity:{},dropShadow_x:{},dropShadow_y:{}},optionsConf:[["type","dx",null,null,null,2],["type","dy",null,null,null,4],["type","blur",null,null,null,3,function(e){return 0<=e}],["type","color",null,null,null,"#000",null,!0],["type","opacity",null,null,null,.8,function(e){return 0<=e&&e<=1}]],init:function(s){var w,C,O,D,T=s.baseWindow.document,A=s.defs,B=q+"-"+s._id+"-dropShadow",P=(w=T,C=B,D={},"boolean"!=typeof L&&(L=!!window.SVGFEDropShadowElement&&!pe),D.elmsAppend=[D.elmFilter=T=w.createElementNS(le,"filter")],T.filterUnits.baseVal=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,T.x.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),T.y.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),T.width.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),T.height.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,100),T.id=C,L?(D.elmOffset=D.elmBlur=O=T.appendChild(w.createElementNS(le,"feDropShadow")),D.styleFlood=O.style):(D.elmBlur=T.appendChild(w.createElementNS(le,"feGaussianBlur")),D.elmOffset=O=T.appendChild(w.createElementNS(le,"feOffset")),O.result.baseVal="offsetblur",O=T.appendChild(w.createElementNS(le,"feFlood")),D.styleFlood=O.style,(O=T.appendChild(w.createElementNS(le,"feComposite"))).in2.baseVal="offsetblur",O.operator.baseVal=SVGFECompositeElement.SVG_FECOMPOSITE_OPERATOR_IN,(O=T.appendChild(w.createElementNS(le,"feMerge"))).appendChild(w.createElementNS(le,"feMergeNode")),O.appendChild(w.createElementNS(le,"feMergeNode")).in1.baseVal="SourceGraphic"),D);["elmFilter","elmOffset","elmBlur","styleFlood","elmsAppend"].forEach((function(e){s["efc_dropShadow_"+e]=P[e]})),P.elmsAppend.forEach((function(e){A.appendChild(e)})),s.face.setAttribute("filter","url(#"+B+")"),Ge(s,"new_edge4viewBox",e.dropShadow.adjustEdge),e.dropShadow.update(s)},remove:function(s){var w=s.defs;s.efc_dropShadow_elmsAppend&&(s.efc_dropShadow_elmsAppend.forEach((function(e){w.removeChild(e)})),s.efc_dropShadow_elmFilter=s.efc_dropShadow_elmOffset=s.efc_dropShadow_elmBlur=s.efc_dropShadow_styleFlood=s.efc_dropShadow_elmsAppend=null),De(s,"new_edge4viewBox",e.dropShadow.adjustEdge),$e(s,{}),s.face.removeAttribute("filter"),Ye(s.aplStats,e.dropShadow.stats)},update:function(e){var s,w,C=e.curStats,O=e.aplStats,D=O.dropShadow_options;C.dropShadow_dx=s=D.dx,Xe(e,O,"dropShadow_dx",s)&&(e.efc_dropShadow_elmOffset.dx.baseVal=s,w=!0),C.dropShadow_dy=s=D.dy,Xe(e,O,"dropShadow_dy",s)&&(e.efc_dropShadow_elmOffset.dy.baseVal=s,w=!0),C.dropShadow_blur=s=D.blur,Xe(e,O,"dropShadow_blur",s)&&(e.efc_dropShadow_elmBlur.setStdDeviation(s,s),w=!0),w&&$e(e,{}),C.dropShadow_color=s=D.color,Xe(e,O,"dropShadow_color",s)&&(e.efc_dropShadow_styleFlood.floodColor=s),C.dropShadow_opacity=s=D.opacity,Xe(e,O,"dropShadow_opacity",s)&&(e.efc_dropShadow_styleFlood.floodOpacity=s)},adjustEdge:function(e,s){var w,C=e.curStats,O=e.aplStats;null!=C.dropShadow_dx&&(w=3*C.dropShadow_blur,(w={x1:s.x1-w+C.dropShadow_dx,y1:s.y1-w+C.dropShadow_dy,x2:s.x2+w+C.dropShadow_dx,y2:s.y2+w+C.dropShadow_dy}).x1<s.x1&&(s.x1=w.x1),w.y1<s.y1&&(s.y1=w.y1),w.x2>s.x2&&(s.x2=w.x2),w.y2>s.y2&&(s.y2=w.y2),["x","y"].forEach((function(w){var D,T="dropShadow_"+w;C[T]=D=s[w+"1"],Xe(e,O,T,D)&&(e.efc_dropShadow_elmFilter[w].baseVal.value=D)})))}}},Object.keys(e).forEach((function(s){var w=e[s],C=w.stats;C[s+"_enabled"]={iniValue:!1},C[s+"_options"]={hasProps:!0},w.anim&&(C[s+"_animOptions"]={},C[s+"_animId"]={})})),s={none:{defaultAnimOptions:{},init:function(e,w){var C=e.curStats;C.show_animId&&(ye.remove(C.show_animId),C.show_animId=null),s.none.start(e,w)},start:function(e,w){s.none.stop(e,!0)},stop:function(e,s,w){var C=e.curStats;return w=null!=w?w:e.aplStats.show_on,C.show_inAnim=!1,s&&Je(e,w),w?1:0}},fade:{defaultAnimOptions:{duration:300,timing:"linear"},init:function(e,w){var C=e.curStats,O=e.aplStats;C.show_animId&&ye.remove(C.show_animId),C.show_animId=ye.add((function(e){return e}),(function(w,C){C?s.fade.stop(e,!0):(e.svg.style.opacity=w+"",ce&&(je(e,e.svg),He(e)))}),O.show_animOptions.duration,1,O.show_animOptions.timing,null,!1),s.fade.start(e,w)},start:function(e,s){var w,C=e.curStats;C.show_inAnim&&(w=ye.stop(C.show_animId)),Je(e,1),C.show_inAnim=!0,ye.start(C.show_animId,!e.aplStats.show_on,null!=s?s:w)},stop:function(e,s,w){var C,O=e.curStats;return w=null!=w?w:e.aplStats.show_on,C=O.show_inAnim?ye.stop(O.show_animId):w?1:0,O.show_inAnim=!1,s&&(e.svg.style.opacity=w?"":"0",Je(e,w)),C}},draw:{defaultAnimOptions:{duration:500,timing:[.58,0,.42,1]},init:function(e,w){var C=e.curStats,O=e.aplStats,D=e.pathList.baseVal,T=Re(D),A=T.segsLen,B=T.lenAll;C.show_animId&&ye.remove(C.show_animId),C.show_animId=ye.add((function(e){var s,w,C,O=-1;if(0===e)w=[[D[0][0],D[0][0]]];else if(1===e)w=D;else{for(s=B*e,w=[];s>=A[++O];)w.push(D[O]),s-=A[O];s&&(2===(C=D[O]).length?w.push([C[0],Ve(C[0],C[1],s/A[O])]):(e=Ne(C[0],C[1],C[2],C[3],We(C[0],C[1],C[2],C[3],s)),w.push([C[0],e.fromP1,e.fromP2,e])))}return w}),(function(w,C){C?s.draw.stop(e,!0):(e.pathList.animVal=w,$e(e,{path:!0}))}),O.show_animOptions.duration,1,O.show_animOptions.timing,null,!1),s.draw.start(e,w)},start:function(e,w){var C,O=e.curStats;O.show_inAnim&&(C=ye.stop(O.show_animId)),Je(e,1),O.show_inAnim=!0,Ge(e,"apl_position",s.draw.update),ye.start(O.show_animId,!e.aplStats.show_on,null!=w?w:C)},stop:function(e,s,w){var C,O=e.curStats;return w=null!=w?w:e.aplStats.show_on,C=O.show_inAnim?ye.stop(O.show_animId):w?1:0,O.show_inAnim=!1,s&&(e.pathList.animVal=w?null:[[e.pathList.baseVal[0][0],e.pathList.baseVal[0][0]]],$e(e,{path:!0}),Je(e,w)),C},update:function(e){De(e,"apl_position",s.draw.update),e.curStats.show_inAnim?s.draw.init(e,s.draw.stop(e)):e.aplStats.show_animOptions={}}}},[["start","anchorSE",0],["end","anchorSE",1],["color","lineColor"],["size","lineSize"],["startSocketGravity","socketGravitySE",0],["endSocketGravity","socketGravitySE",1],["startPlugColor","plugColorSE",0],["endPlugColor","plugColorSE",1],["startPlugSize","plugSizeSE",0],["endPlugSize","plugSizeSE",1],["outline","lineOutlineEnabled"],["outlineColor","lineOutlineColor"],["outlineSize","lineOutlineSize"],["startPlugOutline","plugOutlineEnabledSE",0],["endPlugOutline","plugOutlineEnabledSE",1],["startPlugOutlineColor","plugOutlineColorSE",0],["endPlugOutlineColor","plugOutlineColorSE",1],["startPlugOutlineSize","plugOutlineSizeSE",0],["endPlugOutlineSize","plugOutlineSizeSE",1]].forEach((function(e){var s=e[0],w=e[1],C=e[2];Object.defineProperty(ot.prototype,s,{get:function(){var e=null!=C?ut[this._id].options[w][C]:w?ut[this._id].options[w]:ut[this._id].options[s];return null==e?te:we(e)},set:lt(s),enumerable:!0})})),[["path",G],["startSocket",Y,"socketSE",0],["endSocket",Y,"socketSE",1],["startPlug",J,"plugSE",0],["endPlug",J,"plugSE",1]].forEach((function(e){var s=e[0],w=e[1],C=e[2],O=e[3];Object.defineProperty(ot.prototype,s,{get:function(){var e,D=null!=O?ut[this._id].options[C][O]:C?ut[this._id].options[C]:ut[this._id].options[s];return D?Object.keys(w).some((function(s){return w[s]===D&&(e=s,!0)}))?e:new Error("It's broken"):te},set:lt(s),enumerable:!0})})),Object.keys(e).forEach((function(s){var w=e[s];Object.defineProperty(ot.prototype,s,{get:function(){var e,C,O=ut[this._id].options[s];return me(O)?(e=O,C=w.optionsConf.reduce((function(s,w){var C,O=w[0],D=w[1],T=w[2],A=w[3],B=null!=(w=w[4])?e[A][w]:A?e[A]:e[D];return s[D]="id"===O?B?Object.keys(T).some((function(e){return T[e]===B&&(C=e,!0)}))?C:new Error("It's broken"):te:null==B?te:we(B),s}),{}),w.anim&&(C.animation=we(e.animation)),C):O},set:lt(s),enumerable:!0})})),["startLabel","endLabel","middleLabel"].forEach((function(e,s){Object.defineProperty(ot.prototype,e,{get:function(){var e=ut[this._id],w=e.options;return w.labelSEM[s]&&!e.optionIsAttach.labelSEM[s]?pt[w.labelSEM[s]._id].text:w.labelSEM[s]||""},set:lt(e),enumerable:!0})})),ot.prototype.setOptions=function(e){return it(ut[this._id],e),this},ot.prototype.position=function(){return $e(ut[this._id],{position:!0}),this},ot.prototype.remove=function(){var s=ut[this._id],w=s.curStats;Object.keys(e).forEach((function(e){w[e+="_animId"]&&ye.remove(w[e])})),w.show_animId&&ye.remove(w.show_animId),s.attachments.slice().forEach((function(e){at(s,e)})),s.baseWindow&&s.svg&&s.baseWindow.document.body.removeChild(s.svg),delete ut[this._id]},ot.prototype.show=function(e,s){return tt(ut[this._id],!0,e,s),this},ot.prototype.hide=function(e,s){return tt(ut[this._id],!1,e,s),this},D=function(e){e&&pt[e._id]&&(e.boundTargets.slice().forEach((function(s){at(s.props,e,!0)})),e.conf.remove&&e.conf.remove(e),delete pt[e._id])},rt.prototype.remove=function(){var e=this,s=pt[e._id];s&&(s.boundTargets.slice().forEach((function(e){s.conf.removeOption(s,e)})),ze((function(){var s=pt[e._id];s&&(console.error("LeaderLineAttachment was not removed by removeOption"),D(s))})))},C=rt,window.LeaderLineAttachment=C,O=function(e,s){return e instanceof C&&(!(e.isRemoved||s&&pt[e._id].conf.type!==s)||null)},w={pointAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me}],init:function(e,s){return e.element=w.pointAnchor.checkElement(s.element),e.x=w.pointAnchor.parsePercent(s.x,!0)||[.5,!0],e.y=w.pointAnchor.parsePercent(s.y,!0)||[.5,!0],!0},removeOption:function(e,s){var O=s.props,D={},T=e.element;T===(e=O.options.anchorSE["start"===s.optionName?1:0])&&(T=e===document.body?new C(w.pointAnchor,[T]):document.body),D[s.optionName]=T,it(O,D)},getBBoxNest:function(e,s){var w=Le(e.element,s.baseWindow),C=w.width;s=w.height;return w.width=w.height=0,w.left=w.right=w.left+e.x[0]*(e.x[1]?C:1),w.top=w.bottom=w.top+e.y[0]*(e.y[1]?s:1),w},parsePercent:function(e,s){var w,C,O=!1;return ge(e)?C=e:"string"==typeof e&&(w=se.exec(e))&&w[2]&&(O=0!=(C=parseFloat(w[1])/100)),null!=C&&(s||0<=C)?[C,O]:null},checkElement:function(e){if(null==e)e=document.body;else if(!Me(e))throw new Error("`element` must be Element");return e}},areaAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"shape",type:"string"}],stats:{color:{},strokeWidth:{},elementWidth:{},elementHeight:{},elementLeft:{},elementTop:{},pathListRel:{},bBoxRel:{},pathData:{},viewBoxBBox:{hasProps:!0},dashLen:{},dashGap:{}},init:function(e,s){var C,O=[];return e.element=w.pointAnchor.checkElement(s.element),"string"==typeof s.color&&(e.color=s.color.trim()),"string"==typeof s.fillColor&&(e.fill=s.fillColor.trim()),ge(s.size)&&0<=s.size&&(e.size=s.size),s.dash&&(e.dash=!0,ge(s.dash.len)&&0<s.dash.len&&(e.dashLen=s.dash.len),ge(s.dash.gap)&&0<s.dash.gap&&(e.dashGap=s.dash.gap)),"circle"===s.shape?e.shape=s.shape:"polygon"===s.shape&&Array.isArray(s.points)&&3<=s.points.length&&s.points.every((function(s){var C={};return!(!(C.x=w.pointAnchor.parsePercent(s[0],!0))||!(C.y=w.pointAnchor.parsePercent(s[1],!0))||(O.push(C),(C.x[1]||C.y[1])&&(e.hasRatio=!0),0))}))?(e.shape=s.shape,e.points=O):(e.shape="rect",e.radius=ge(s.radius)&&0<=s.radius?s.radius:0),"rect"!==e.shape&&"circle"!==e.shape||(e.x=w.pointAnchor.parsePercent(s.x,!0)||[-.05,!0],e.y=w.pointAnchor.parsePercent(s.y,!0)||[-.05,!0],e.width=w.pointAnchor.parsePercent(s.width)||[1.1,!0],e.height=w.pointAnchor.parsePercent(s.height)||[1.1,!0],(e.x[1]||e.y[1]||e.width[1]||e.height[1])&&(e.hasRatio=!0)),C=e.element.ownerDocument,e.svg=s=C.createElementNS(le,"svg"),s.className.baseVal=q+"-areaAnchor",s.viewBox.baseVal||s.setAttribute("viewBox","0 0 0 0"),e.path=s.appendChild(C.createElementNS(le,"path")),e.path.style.fill=e.fill||"none",e.isShown=!1,s.style.visibility="hidden",C.body.appendChild(s),Qe(C=C.defaultView),e.bodyOffset=qe(C),e.updateColor=function(){var s=e.curStats,w=e.aplStats,C=e.boundTargets.length?e.boundTargets[0].props.curStats:null;s.color=C=e.color||(C?C.line_color:fe.lineColor),Xe(e,w,"color",C)&&(e.path.style.stroke=C)},e.updateShow=function(){Je(e,e.boundTargets.some((function(e){return!0===e.props.isShown})))},!0},bind:function(e,s){return s=s.props,e.color||Ge(s,"cur_line_color",e.updateColor),Ge(s,"svgShow",e.updateShow),ze((function(){e.updateColor(),e.updateShow()})),!0},unbind:function(e,s){s=s.props,e.color||De(s,"cur_line_color",e.updateColor),De(s,"svgShow",e.updateShow),1<e.boundTargets.length&&ze((function(){e.updateColor(),e.updateShow(),w.areaAnchor.update(e)&&e.boundTargets.forEach((function(e){$e(e.props,{position:!0})}))}))},removeOption:function(e,s){w.pointAnchor.removeOption(e,s)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.areaAnchor.unbind(e,s)}))),e.svg.parentNode.removeChild(e.svg)},getStrokeWidth:function(e,s){return w.areaAnchor.update(e)&&1<e.boundTargets.length&&ze((function(){e.boundTargets.forEach((function(e){e.props!==s&&$e(e.props,{position:!0})}))})),e.curStats.strokeWidth},getPathData:function(e,s){var w=Le(e.element,s.baseWindow);return Be(e.curStats.pathListRel,(function(e){e.x+=w.left,e.y+=w.top}))},getBBoxNest:function(e,s){return s=Le(e.element,s.baseWindow),{left:(e=e.curStats.bBoxRel).left+s.left,top:e.top+s.top,right:e.right+s.left,bottom:e.bottom+s.top,width:e.width,height:e.height}},update:function(e){var s,w,C,O,D,T,A,B,L,P,M,I,F,$,N,V,R=e.curStats,H=e.aplStats,z=e.boundTargets.length?e.boundTargets[0].props.curStats:null,W={};if(W.strokeWidth=Xe(e,R,"strokeWidth",null!=e.size?e.size:z?z.line_strokeWidth:fe.lineSize),s=Ie(e.element),W.elementWidth=Xe(e,R,"elementWidth",s.width),W.elementHeight=Xe(e,R,"elementHeight",s.height),W.elementLeft=Xe(e,R,"elementLeft",s.left),W.elementTop=Xe(e,R,"elementTop",s.top),W.strokeWidth||e.hasRatio&&(W.elementWidth||W.elementHeight)){switch(e.shape){case"rect":(I={left:e.x[0]*(e.x[1]?s.width:1),top:e.y[0]*(e.y[1]?s.height:1),width:e.width[0]*(e.width[1]?s.width:1),height:e.height[0]*(e.height[1]?s.height:1)}).right=I.left+I.width,I.bottom=I.top+I.height,M=R.strokeWidth/2,B=(A=Math.min(I.width,I.height))?A/2*Math.SQRT2+M:0,P=(A=e.radius?e.radius<=B?e.radius:B:0)?(B=(A-M)/Math.SQRT2,P=[{x:I.left-(L=A-B),y:I.top+B},{x:I.left+B,y:I.top-L},{x:I.right-B,y:I.top-L},{x:I.right+L,y:I.top+B},{x:I.right+L,y:I.bottom-B},{x:I.right-B,y:I.bottom+L},{x:I.left+B,y:I.bottom+L},{x:I.left-L,y:I.bottom-B}],R.pathListRel=[[P[0],{x:P[0].x,y:P[0].y-(M=A*ie)},{x:P[1].x-M,y:P[1].y},P[1]]],P[1].x!==P[2].x&&R.pathListRel.push([P[1],P[2]]),R.pathListRel.push([P[2],{x:P[2].x+M,y:P[2].y},{x:P[3].x,y:P[3].y-M},P[3]]),P[3].y!==P[4].y&&R.pathListRel.push([P[3],P[4]]),R.pathListRel.push([P[4],{x:P[4].x,y:P[4].y+M},{x:P[5].x+M,y:P[5].y},P[5]]),P[5].x!==P[6].x&&R.pathListRel.push([P[5],P[6]]),R.pathListRel.push([P[6],{x:P[6].x-M,y:P[6].y},{x:P[7].x,y:P[7].y+M},P[7]]),P[7].y!==P[0].y&&R.pathListRel.push([P[7],P[0]]),R.pathListRel.push([]),L=A-B+R.strokeWidth/2,[{x:I.left-L,y:I.top-L},{x:I.right+L,y:I.bottom+L}]):(L=R.strokeWidth/2,P=[{x:I.left-L,y:I.top-L},{x:I.right+L,y:I.bottom+L}],R.pathListRel=[[P[0],{x:P[1].x,y:P[0].y}],[{x:P[1].x,y:P[0].y},P[1]],[P[1],{x:P[0].x,y:P[1].y}],[]],[{x:I.left-R.strokeWidth,y:I.top-R.strokeWidth},{x:I.right+R.strokeWidth,y:I.bottom+R.strokeWidth}]),R.bBoxRel={left:P[0].x,top:P[0].y,right:P[1].x,bottom:P[1].y,width:P[1].x-P[0].x,height:P[1].y-P[0].y};break;case"circle":(T={left:e.x[0]*(e.x[1]?s.width:1),top:e.y[0]*(e.y[1]?s.height:1),width:e.width[0]*(e.width[1]?s.width:1),height:e.height[0]*(e.height[1]?s.height:1)}).width||T.height||(T.width=T.height=10),T.width||(T.width=T.height),T.height||(T.height=T.width),T.right=T.left+T.width,T.bottom=T.top+T.height,M=T.left+T.width/2,A=T.top+T.height/2,D=R.strokeWidth/2,B=T.width/2,L=T.height/2,I=B*Math.SQRT2+D,P=L*Math.SQRT2+D,R.pathListRel=[[(D=[{x:M-I,y:A},{x:M,y:A-P},{x:M+I,y:A},{x:M,y:A+P}])[0],{x:D[0].x,y:D[0].y-(M=P*ie)},{x:D[1].x-(A=I*ie),y:D[1].y},D[1]],[D[1],{x:D[1].x+A,y:D[1].y},{x:D[2].x,y:D[2].y-M},D[2]],[D[2],{x:D[2].x,y:D[2].y+M},{x:D[3].x+A,y:D[3].y},D[3]],[D[3],{x:D[3].x-A,y:D[3].y},{x:D[0].x,y:D[0].y+M},D[0]],[]],B=I-B+R.strokeWidth/2,L=P-L+R.strokeWidth/2,D=[{x:T.left-B,y:T.top-L},{x:T.right+B,y:T.bottom+L}],R.bBoxRel={left:D[0].x,top:D[0].y,right:D[1].x,bottom:D[1].y,width:D[1].x-D[0].x,height:D[1].y-D[0].y};break;case"polygon":e.points.forEach((function(e){var w=e.x[0]*(e.x[1]?s.width:1);e=e.y[0]*(e.y[1]?s.height:1);C?(w<C.left&&(C.left=w),w>C.right&&(C.right=w),e<C.top&&(C.top=e),e>C.bottom&&(C.bottom=e)):C={left:w,right:w,top:e,bottom:e},O?R.pathListRel.push([O,{x:w,y:e}]):R.pathListRel=[],O={x:w,y:e}})),R.pathListRel.push([]),D=R.strokeWidth/2,D=[{x:C.left-D,y:C.top-D},{x:C.right+D,y:C.bottom+D}],R.bBoxRel={left:D[0].x,top:D[0].y,right:D[1].x,bottom:D[1].y,width:D[1].x-D[0].x,height:D[1].y-D[0].y}}W.pathListRel=W.bBoxRel=!0}return(W.pathListRel||W.elementLeft||W.elementTop)&&(R.pathData=Be(R.pathListRel,(function(e){e.x+=s.left,e.y+=s.top}))),Xe(e,H,"strokeWidth",w=R.strokeWidth)&&(e.path.style.strokeWidth=w+"px"),Fe(w=R.pathData,H.pathData)&&(e.path.setPathData(w),H.pathData=w,W.pathData=!0),e.dash&&(!W.pathData&&(!W.strokeWidth||e.dashLen&&e.dashGap)||(R.dashLen=e.dashLen||2*R.strokeWidth,R.dashGap=e.dashGap||R.strokeWidth),W.dash=Xe(e,H,"dashLen",R.dashLen)||W.dash,W.dash=Xe(e,H,"dashGap",R.dashGap)||W.dash,W.dash&&(e.path.style.strokeDasharray=H.dashLen+","+H.dashGap)),F=R.viewBoxBBox,$=H.viewBoxBBox,N=e.svg.viewBox.baseVal,V=e.svg.style,F.x=R.bBoxRel.left+s.left,F.y=R.bBoxRel.top+s.top,F.width=R.bBoxRel.width,F.height=R.bBoxRel.height,["x","y","width","height"].forEach((function(s){(w=F[s])!==$[s]&&(N[s]=$[s]=w,V[ne[s]]=w+("x"===s||"y"===s?e.bodyOffset[s]:0)+"px")})),W.strokeWidth||W.pathListRel||W.bBoxRel}},mouseHoverAnchor:{type:"anchor",argOptions:[{optionName:"element",type:Me},{optionName:"showEffectName",type:"string"}],style:{backgroundImage:"url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cG9seWdvbiBwb2ludHM9IjI0LDAgMCw4IDgsMTEgMCwxOSA1LDI0IDEzLDE2IDE2LDI0IiBmaWxsPSJjb3JhbCIvPjwvc3ZnPg==')",backgroundSize:"",backgroundRepeat:"no-repeat",backgroundColor:"#f8f881",cursor:"default"},hoverStyle:{backgroundImage:"none",backgroundColor:"#fadf8f"},padding:{top:1,right:15,bottom:1,left:2},minHeight:15,backgroundPosition:{right:2,top:2},backgroundSize:{width:12,height:12},dirKeys:[["top","Top"],["right","Right"],["bottom","Bottom"],["left","Left"]],init:function(e,C){var O,D,T,A,B,L,P,M,I,F=w.mouseHoverAnchor,$={};if(e.element=w.pointAnchor.checkElement(C.element),!((M=(P=e.element).ownerDocument)&&(I=M.defaultView)&&I.HTMLElement&&P instanceof I.HTMLElement))throw new Error("`element` must be HTML element");return F.style.backgroundSize=F.backgroundSize.width+"px "+F.backgroundSize.height+"px",["style","hoverStyle"].forEach((function(s){var w=F[s];e[s]=Object.keys(w).reduce((function(e,s){return e[s]=w[s],e}),{})})),"inline"===(O=e.element.ownerDocument.defaultView.getComputedStyle(e.element,"")).display?e.style.display="inline-block":"none"===O.display&&(e.style.display="block"),w.mouseHoverAnchor.dirKeys.forEach((function(s){var w=s[0];s="padding"+s[1];parseFloat(O[s])<F.padding[w]&&(e.style[s]=F.padding[w]+"px")})),e.style.display&&(T=e.element.style.display,e.element.style.display=e.style.display),w.mouseHoverAnchor.dirKeys.forEach((function(s){s="padding"+s[1],e.style[s]&&($[s]=e.element.style[s],e.element.style[s]=e.style[s])})),(P=e.element.getBoundingClientRect()).height<F.minHeight&&(ce?(I=F.minHeight,"content-box"===O.boxSizing?I-=parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth)+parseFloat(O.paddingTop)+parseFloat(O.paddingBottom):"padding-box"===O.boxSizing&&(I-=parseFloat(O.borderTopWidth)+parseFloat(O.borderBottomWidth)),e.style.height=I+"px"):e.style.height=parseFloat(O.height)+(F.minHeight-P.height)+"px"),e.style.backgroundPosition=pe?P.width-F.backgroundSize.width-F.backgroundPosition.right+"px "+F.backgroundPosition.top+"px":"right "+F.backgroundPosition.right+"px top "+F.backgroundPosition.top+"px",e.style.display&&(e.element.style.display=T),w.mouseHoverAnchor.dirKeys.forEach((function(s){s="padding"+s[1],e.style[s]&&(e.element.style[s]=$[s])})),["style","hoverStyle"].forEach((function(s){var w=e[s],O=C[s];me(O)&&Object.keys(O).forEach((function(e){"string"==typeof O[e]||ge(O[e])?w[e]=O[e]:null==O[e]&&delete w[e]}))})),"function"==typeof C.onSwitch&&(L=C.onSwitch),C.showEffectName&&s[C.showEffectName]&&(e.showEffectName=A=C.showEffectName),B=C.animOptions,e.elmStyle=D=e.element.style,e.mouseenter=function(s){e.hoverStyleSave=F.getStyles(D,Object.keys(e.hoverStyle)),F.setStyles(D,e.hoverStyle),e.boundTargets.forEach((function(e){tt(e.props,!0,A,B)})),L&&L(s)},e.mouseleave=function(s){F.setStyles(D,e.hoverStyleSave),e.boundTargets.forEach((function(e){tt(e.props,!1,A,B)})),L&&L(s)},!0},bind:function(e,s){var C,O,D,T,A;return s.props.svg?w.mouseHoverAnchor.llShow(s.props,!1,e.showEffectName):ze((function(){w.mouseHoverAnchor.llShow(s.props,!1,e.showEffectName)})),e.enabled||(e.styleSave=w.mouseHoverAnchor.getStyles(e.elmStyle,Object.keys(e.style)),w.mouseHoverAnchor.setStyles(e.elmStyle,e.style),e.removeEventListener=(C=e.element,O=e.mouseenter,D=e.mouseleave,"onmouseenter"in C&&"onmouseleave"in C?(C.addEventListener("mouseenter",O,!1),C.addEventListener("mouseleave",D,!1),function(){C.removeEventListener("mouseenter",O,!1),C.removeEventListener("mouseleave",D,!1)}):(console.warn("mouseenter and mouseleave events polyfill is enabled."),C.addEventListener("mouseover",T=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||O.apply(this,arguments)}),C.addEventListener("mouseout",A=function(e){e.relatedTarget&&(e.relatedTarget===this||this.compareDocumentPosition(e.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||D.apply(this,arguments)}),function(){C.removeEventListener("mouseover",T,!1),C.removeEventListener("mouseout",A,!1)})),e.enabled=!0),!0},unbind:function(e,s){e.enabled&&e.boundTargets.length<=1&&(e.removeEventListener(),w.mouseHoverAnchor.setStyles(e.elmStyle,e.styleSave),e.enabled=!1),w.mouseHoverAnchor.llShow(s.props,!0,e.showEffectName)},removeOption:function(e,s){w.pointAnchor.removeOption(e,s)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.mouseHoverAnchor.unbind(e,s)})))},getBBoxNest:function(e,s){return Le(e.element,s.baseWindow)},llShow:function(e,w,C){s[C||e.curStats.show_effect].stop(e,!0,w),e.aplStats.show_on=w},getStyles:function(e,s){return s.reduce((function(s,w){return s[w]=e[w],s}),{})},setStyles:function(e,s){Object.keys(s).forEach((function(w){e[w]=s[w]}))}},captionLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},x:{},y:{}},textStyleProps:["fontFamily","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","kerning","letterSpacing","wordSpacing","textDecoration"],init:function(e,s){return"string"==typeof s.text&&(e.text=s.text.trim()),!!e.text&&("string"==typeof s.color&&(e.color=s.color.trim()),e.outlineColor="string"==typeof s.outlineColor?s.outlineColor.trim():"#fff",Array.isArray(s.offset)&&ge(s.offset[0])&&ge(s.offset[1])&&(e.offset={x:s.offset[0],y:s.offset[1]}),ge(s.lineOffset)&&(e.lineOffset=s.lineOffset),w.captionLabel.textStyleProps.forEach((function(w){null!=s[w]&&(e[w]=s[w])})),e.updateColor=function(s){w.captionLabel.updateColor(e,s)},e.updateSocketXY=function(s){var w,C=e.curStats,O=e.aplStats,D=s.curStats,T=D.position_socketXYSE[e.socketIndex];null!=T.x&&(e.offset?(C.x=T.x+e.offset.x,C.y=T.y+e.offset.y):(w=e.height/2,s=Math.max(D.attach_plugSideLenSE[e.socketIndex]||0,D.line_strokeWidth/2),D=D.position_socketXYSE[e.socketIndex?0:1],4===T.socketId||2===T.socketId?(C.x=4===T.socketId?T.x-w-e.width:T.x+w,C.y=D.y<T.y?T.y+s+w:T.y-s-w-e.height):(C.x=D.x<T.x?T.x+s+w:T.x-s-w-e.width,C.y=1===T.socketId?T.y-w-e.height:T.y+w)),Xe(e,O,"x",w=C.x)&&(e.elmPosition.x.baseVal.getItem(0).value=w),Xe(e,O,"y",w=C.y)&&(e.elmPosition.y.baseVal.getItem(0).value=w+e.height))},e.updatePath=function(s){var C=e.curStats,O=e.aplStats;(s=s.pathList.animVal||s.pathList.baseVal)&&(s=w.captionLabel.getMidPoint(s,e.lineOffset),C.x=s.x-e.width/2,C.y=s.y-e.height/2,Xe(e,O,"x",s=C.x)&&(e.elmPosition.x.baseVal.getItem(0).value=s),Xe(e,O,"y",s=C.y)&&(e.elmPosition.y.baseVal.getItem(0).value=s+e.height))},e.updateShow=function(s){w.captionLabel.updateShow(e,s)},pe&&(e.adjustEdge=function(s,C){var O=e.curStats;null!=O.x&&w.captionLabel.adjustEdge(C,{x:O.x,y:O.y,width:e.width,height:e.height},e.strokeWidth/2)}),!0)},updateColor:function(e,s){var w=e.curStats,C=e.aplStats;s=s.curStats;w.color=s=e.color||s.line_color,Xe(e,C,"color",s)&&(e.styleFill.fill=s)},updateShow:function(e,s){(s=!0===s.isShown)!==e.isShown&&(e.styleShow.visibility=s?"":"hidden",e.isShown=s)},adjustEdge:function(e,s,w){(w={x1:s.x-w,y1:s.y-w,x2:s.x+s.width+w,y2:s.y+s.height+w}).x1<e.x1&&(e.x1=w.x1),w.y1<e.y1&&(e.y1=w.y1),w.x2>e.x2&&(e.x2=w.x2),w.y2>e.y2&&(e.y2=w.y2)},newText:function(e,s,w,C,O){var D,T,A=s.createElementNS(le,"text");return A.textContent=e,[A.x,A.y].forEach((function(e){var s=w.createSVGLength();s.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),e.baseVal.initialize(s)})),"boolean"!=typeof B&&(B="paintOrder"in A.style),O&&!B?(D=s.createElementNS(le,"defs"),A.id=C,D.appendChild(A),(T=(e=s.createElementNS(le,"g")).appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+C,(s=e.appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+C,(T=T.style).strokeLinejoin="round",{elmPosition:A,styleText:A.style,styleFill:s.style,styleStroke:T,styleShow:e.style,elmsAppend:[D,e]}):(T=A.style,O&&(T.strokeLinejoin="round",T.paintOrder="stroke"),{elmPosition:A,styleText:T,styleFill:T,styleStroke:O?T:null,styleShow:T,elmsAppend:[A]})},getMidPoint:function(e,s){var w,C,O,D=(O=Re(e)).segsLen,T=-1,A=(O=O.lenAll)/2+(s||0);if(A<=0)return 2===(w=e[0]).length?Ve(w[0],w[1],0):Ne(w[0],w[1],w[2],w[3],0);if(O<=A)return 2===(w=e[e.length-1]).length?Ve(w[0],w[1],1):Ne(w[0],w[1],w[2],w[3],1);for(C=[];A>D[++T];)C.push(e[T]),A-=D[T];return 2===(w=e[T]).length?Ve(w[0],w[1],A/D[T]):Ne(w[0],w[1],w[2],w[3],We(w[0],w[1],w[2],w[3],A))},initSvg:function(e,s){var C,O,D=w.captionLabel.newText(e.text,s.baseWindow.document,s.svg,q+"-captionLabel-"+e._id,e.outlineColor);["elmPosition","styleFill","styleShow","elmsAppend"].forEach((function(s){e[s]=D[s]})),e.isShown=!1,e.styleShow.visibility="hidden",w.captionLabel.textStyleProps.forEach((function(s){null!=e[s]&&(D.styleText[s]=e[s])})),D.elmsAppend.forEach((function(e){s.svg.appendChild(e)})),C=D.elmPosition.getBBox(),e.width=C.width,e.height=C.height,e.outlineColor&&(O=C.height/9,D.styleStroke.strokeWidth=(O=10<O?10:O<2?2:O)+"px",D.styleStroke.stroke=e.outlineColor),e.strokeWidth=O||0,Ye(e.aplStats,w.captionLabel.stats),e.updateColor(s),e.refSocketXY?e.updateSocketXY(s):e.updatePath(s),pe&&$e(s,{}),e.updateShow(s)},bind:function(e,s){var C=s.props;return e.color||Ge(C,"cur_line_color",e.updateColor),(e.refSocketXY="startLabel"===s.optionName||"endLabel"===s.optionName)?(e.socketIndex="startLabel"===s.optionName?0:1,Ge(C,"apl_position",e.updateSocketXY),e.offset||(Ge(C,"cur_attach_plugSideLenSE",e.updateSocketXY),Ge(C,"cur_line_strokeWidth",e.updateSocketXY))):Ge(C,"apl_path",e.updatePath),Ge(C,"svgShow",e.updateShow),pe&&Ge(C,"new_edge4viewBox",e.adjustEdge),w.captionLabel.initSvg(e,C),!0},unbind:function(e,s){var C=s.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){C.svg.removeChild(e)})),e.elmPosition=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,w.captionLabel.stats),Ye(e.aplStats,w.captionLabel.stats),e.color||De(C,"cur_line_color",e.updateColor),e.refSocketXY?(De(C,"apl_position",e.updateSocketXY),e.offset||(De(C,"cur_attach_plugSideLenSE",e.updateSocketXY),De(C,"cur_line_strokeWidth",e.updateSocketXY))):De(C,"apl_path",e.updatePath),De(C,"svgShow",e.updateShow),pe&&(De(C,"new_edge4viewBox",e.adjustEdge),$e(C,{}))},removeOption:function(e,s){var w=s.props,C={};C[s.optionName]="",it(w,C)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.captionLabel.unbind(e,s)})))}},pathLabel:{type:"label",argOptions:[{optionName:"text",type:"string"}],stats:{color:{},startOffset:{},pathData:{}},init:function(e,s){return"string"==typeof s.text&&(e.text=s.text.trim()),!!e.text&&("string"==typeof s.color&&(e.color=s.color.trim()),e.outlineColor="string"==typeof s.outlineColor?s.outlineColor.trim():"#fff",ge(s.lineOffset)&&(e.lineOffset=s.lineOffset),w.captionLabel.textStyleProps.forEach((function(w){null!=s[w]&&(e[w]=s[w])})),e.updateColor=function(s){w.captionLabel.updateColor(e,s)},e.updatePath=function(s){var C=e.curStats,O=e.aplStats,D=s.curStats,T=s.pathList.animVal||s.pathList.baseVal;T&&(C.pathData=D=w.pathLabel.getOffsetPathData(T,D.line_strokeWidth/2+e.strokeWidth/2+e.height/4,1.25*e.height),Fe(D,O.pathData)&&(e.elmPath.setPathData(D),O.pathData=D,e.bBox=e.elmPosition.getBBox(),e.updateStartOffset(s)))},e.updateStartOffset=function(s){var w,C,O=e.curStats,D=e.aplStats,T=s.curStats;O.pathData&&(2===e.semIndex&&!e.lineOffset||(C=O.pathData.reduce((function(e,s){var C,O=s.values;switch(s.type){case"M":w={x:O[0],y:O[1]};break;case"L":C={x:O[0],y:O[1]},w&&(e+=Ae(w,C)),w=C;break;case"C":C={x:O[4],y:O[5]},w&&(e+=Te(w,{x:O[0],y:O[1]},{x:O[2],y:O[3]},C)),w=C}return e}),0),s=0===e.semIndex?0:1===e.semIndex?C:C/2,2!==e.semIndex&&(T=Math.max(T.attach_plugBackLenSE[e.semIndex]||0,T.line_strokeWidth/2)+e.strokeWidth/2+e.height/4,s=(s+=0===e.semIndex?T:-T)<0?0:C<s?C:s),e.lineOffset&&(s=(s+=e.lineOffset)<0?0:C<s?C:s),O.startOffset=s,Xe(e,D,"startOffset",s)&&(e.elmOffset.startOffset.baseVal.value=s)))},e.updateShow=function(s){w.captionLabel.updateShow(e,s)},pe&&(e.adjustEdge=function(s,C){e.bBox&&w.captionLabel.adjustEdge(C,e.bBox,e.strokeWidth/2)}),!0)},getOffsetPathData:function(e,s,w){var C,O,D=[];function y(e,s){return Math.abs(e.x-s.x)<3&&Math.abs(e.y-s.y)<3}return e.forEach((function(e){var w,O,T,A,B,L,P,M,I,F,$;2===e.length?(M=e[0],I=e[1],F=s,$=Math.atan2(M.y-I.y,I.x-M.x)+.5*Math.PI,w=[{x:M.x+Math.cos($)*F,y:M.y+Math.sin($)*F*-1},{x:I.x+Math.cos($)*F,y:I.y+Math.sin($)*F*-1}],C?(T=C.points,0<=(P=Math.atan2(T[1].y-T[0].y,T[0].x-T[1].x)-Math.atan2(e[0].y-e[1].y,e[1].x-e[0].x))&&P<=Math.PI?O={type:"line",points:w,inside:!0}:(B=Pe(T[0],T[1],s),A=Pe(w[1],w[0],s),L=T[0],M=w[1],$=(I=B).x-L.x,F=I.y-L.y,P=M.x-A.x,I=M.y-A.y,M=(-F*(L.x-A.x)+$*(L.y-A.y))/(-P*F+$*I),I=(P*(L.y-A.y)-I*(L.x-A.x))/(-P*F+$*I),O=(F=0<=M&&M<=1&&0<=I&&I<=1?{x:L.x+I*$,y:L.y+I*F}:null)?{type:"line",points:[T[1]=F,w[1]]}:(T[1]=y(A,B)?A:B,{type:"line",points:[A,w[1]]}),C.len=Ae(T[0],T[1]))):O={type:"line",points:w},O.len=Ae(O.points[0],O.points[1]),D.push(C=O)):(D.push({type:"cubic",points:function(e,s,w,C,O){for(var D,T,A=Te(e,s,w,C)/16,B=1/(16<O?O/16*A:A),L=[],P=0;T=(90-(D=Ne(e,s,w,C,P)).angle)*(Math.PI/180),L.push({x:D.x+Math.cos(T)*O,y:D.y+Math.sin(T)*O*-1}),!(1<=P);)1<(P+=B)&&(P=1);return L}(e[0],e[1],e[2],e[3],s)}),C=null)})),C=null,D.forEach((function(e){var O;C="line"===e.type?(e.inside&&(C.len>s?((O=C.points)[1]=Pe(O[0],O[1],-s),C.len=Ae(O[0],O[1])):(C.points=null,C.len=0),e.len>s+w?((O=e.points)[0]=Pe(O[1],O[0],-(s+w)),e.len=Ae(O[0],O[1])):(e.points=null,e.len=0)),e):null})),D.reduce((function(e,s){var w=s.points;return w&&(O&&y(w[0],O)||e.push({type:"M",values:[w[0].x,w[0].y]}),"line"===s.type?e.push({type:"L",values:[w[1].x,w[1].y]}):(w.shift(),w.forEach((function(s){e.push({type:"L",values:[s.x,s.y]})}))),O=w[w.length-1]),e}),[])},newText:function(e,s,w,C){var O,D,T,A,L=s.createElementNS(le,"defs"),P=L.appendChild(s.createElementNS(le,"path"));return P.id=O=w+"-path",(T=(D=s.createElementNS(le,"text")).appendChild(s.createElementNS(le,"textPath"))).href.baseVal="#"+O,T.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX,0),T.textContent=e,"boolean"!=typeof B&&(B="paintOrder"in D.style),C&&!B?(D.id=e=w+"-text",L.appendChild(D),(A=(w=s.createElementNS(le,"g")).appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+e,(s=w.appendChild(s.createElementNS(le,"use"))).href.baseVal="#"+e,(A=A.style).strokeLinejoin="round",{elmPosition:D,elmPath:P,elmOffset:T,styleText:D.style,styleFill:s.style,styleStroke:A,styleShow:w.style,elmsAppend:[L,w]}):(A=D.style,C&&(A.strokeLinejoin="round",A.paintOrder="stroke"),{elmPosition:D,elmPath:P,elmOffset:T,styleText:A,styleFill:A,styleStroke:C?A:null,styleShow:A,elmsAppend:[L,D]})},initSvg:function(e,s){var C,O,D,T=w.pathLabel.newText(e.text,s.baseWindow.document,q+"-pathLabel-"+e._id,e.outlineColor);["elmPosition","elmPath","elmOffset","styleFill","styleShow","elmsAppend"].forEach((function(s){e[s]=T[s]})),e.isShown=!1,e.styleShow.visibility="hidden",w.captionLabel.textStyleProps.forEach((function(s){null!=e[s]&&(T.styleText[s]=e[s])})),T.elmsAppend.forEach((function(e){s.svg.appendChild(e)})),T.elmPath.setPathData([{type:"M",values:[0,100]},{type:"h",values:[100]}]),de&&(D=T.elmOffset.href.baseVal,T.elmOffset.href.baseVal=""),C=T.elmPosition.getBBox(),de&&(T.elmOffset.href.baseVal=D),T.styleText.textAnchor=["start","end","middle"][e.semIndex],2!==e.semIndex||e.lineOffset||T.elmOffset.startOffset.baseVal.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE,50),e.height=C.height,e.outlineColor&&(O=C.height/9,T.styleStroke.strokeWidth=(O=10<O?10:O<2?2:O)+"px",T.styleStroke.stroke=e.outlineColor),e.strokeWidth=O||0,Ye(e.aplStats,w.pathLabel.stats),e.updateColor(s),e.updatePath(s),e.updateStartOffset(s),pe&&$e(s,{}),e.updateShow(s)},bind:function(e,s){var C=s.props;return e.color||Ge(C,"cur_line_color",e.updateColor),Ge(C,"cur_line_strokeWidth",e.updatePath),Ge(C,"apl_path",e.updatePath),e.semIndex="startLabel"===s.optionName?0:"endLabel"===s.optionName?1:2,2===e.semIndex&&!e.lineOffset||Ge(C,"cur_attach_plugBackLenSE",e.updateStartOffset),Ge(C,"svgShow",e.updateShow),pe&&Ge(C,"new_edge4viewBox",e.adjustEdge),w.pathLabel.initSvg(e,C),!0},unbind:function(e,s){var C=s.props;e.elmsAppend&&(e.elmsAppend.forEach((function(e){C.svg.removeChild(e)})),e.elmPosition=e.elmPath=e.elmOffset=e.styleFill=e.styleShow=e.elmsAppend=null),Ye(e.curStats,w.pathLabel.stats),Ye(e.aplStats,w.pathLabel.stats),e.color||De(C,"cur_line_color",e.updateColor),De(C,"cur_line_strokeWidth",e.updatePath),De(C,"apl_path",e.updatePath),2===e.semIndex&&!e.lineOffset||De(C,"cur_attach_plugBackLenSE",e.updateStartOffset),De(C,"svgShow",e.updateShow),pe&&(De(C,"new_edge4viewBox",e.adjustEdge),$e(C,{}))},removeOption:function(e,s){var w=s.props,C={};C[s.optionName]="",it(w,C)},remove:function(e){e.boundTargets.length&&(console.error("LeaderLineAttachment was not unbound by remove"),e.boundTargets.forEach((function(s){w.pathLabel.unbind(e,s)})))}}},Object.keys(w).forEach((function(e){ot[e]=function(){return new C(w[e],Array.prototype.slice.call(arguments))}})),ot.positionByWindowResize=!0,window.addEventListener("resize",ve.add((function(){ot.positionByWindowResize&&Object.keys(ut).forEach((function(e){$e(ut[e],{position:!0})}))})),!1),ot}();function focusNextMap(e=!1){const s=this.utils.renderedMaps(),w=s.findIndex((e=>e.classList.contains("focus"))),C=(w+(e?-1:1))%s.length,O=s.at(C);O.classList.add("focus"),O.scrollIntoView({behavior:"smooth"})}const scrollToBlock=e=>{const s=e.parentElement.getBoundingClientRect(),w=e.getBoundingClientRect().height>.8*s.height?"nearest":"center";e.scrollIntoView({behavior:"smooth",block:w})};function focusDelay(){return"none"===window.window.getComputedStyle(this.showcase).display?50:300}function switchToNextLayout(e=!1){const s=this.layouts,w=this.container.dataset.layout,C=s.map((e=>e.name)).indexOf(w),O=s[-1===C?0:(C+(e?-1:1)+s.length)%s.length];this.container.dataset.layout=O.name}const getMarkersFromMaps=e=>Array.from(e.closest(".Dumby").querySelectorAll('.mapclay[data-render="fulfilled"]')).filter((s=>!e.targets||e.targets.includes(s.id))).map((s=>{const w=s.renderer,C=`${e.targets??"all"}@${e.xy}`;return s.querySelector(`.marker[title="${C}"]`)??w.addMarker({xy:e.xy,title:C,type:e.type})})),createGeoLink=e=>{const s=new URL(e.href),w=s.searchParams.get("xy")?.split(",")?.map(Number),C=w??s?.href?.match(/^geo:([-]?[0-9.]+),([-]?[0-9.]+)/)?.splice(1)?.reverse()?.map(Number);return!(!C||isNaN(C[0])||isNaN(C[1]))&&(e.url=s,e.xy=C,e.classList.add("with-leader-line","geolink"),e.targets=e.url.searchParams.get("id")?.split(",")??null,e.type=e.url.searchParams.get("type")??null,e.lines=[],e.onmouseover=()=>{getMarkersFromMaps(e).filter(isAnchorVisible).forEach((s=>{const w=((e,s)=>{const w=new po({start:e,end:s,hide:!0,middleLabel:e.title,path:"magnet"});return w.show("draw",{duration:300}),w})(e,s);e.lines.push(w)}))},e.onmouseout=()=>removeLeaderLines(e),e.onclick=s=>{s.preventDefault(),removeLeaderLines(e),getMarkersFromMaps(e).forEach(updateMapCameraByMarker(e.xy))},!0)},createDocLink=e=>{e.classList.add("with-leader-line","doclink"),e.lines=[],e.onmouseover=()=>{const s=decodeURIComponent(e.href.split("#")[1]),w=e.title.split("=>")[1]??"#"+s;document.querySelectorAll(w).forEach((w=>{if(!w?.checkVisibility())return;const C=new po({start:e,end:w,middleLabel:po.pathLabel({text:s,fontWeight:"bold"}),hide:!0,path:"magnet"});e.lines.push(C),C.show("draw",{duration:300})}))},e.onmouseout=()=>{e.lines.forEach((e=>e.remove())),e.lines.length=0}},removeLeaderLines=e=>{e.lines&&(e.lines.forEach((e=>e.remove())),e.lines=[])},updateMapCameraByMarker=e=>s=>{const w=s.closest(".mapclay")?.renderer;w.updateCamera({center:e},!0)},isAnchorVisible=e=>{const s=e.closest(".mapclay");return(e=>{const s=e.getBoundingClientRect();return s.left>0&&s.right<window.innerWidth+s.width&&s.top>0&&s.bottom<window.innerHeight+s.height})(e)&&((e,s)=>{const w=e.getBoundingClientRect(),C=s.getBoundingClientRect();return w.left<C.right-10&&w.right>C.left+10&&w.top<C.bottom-10&&w.bottom>C.top+10})(e,s)},addAnchorByPoint=({point:e,map:s,validateAnchorName:w=()=>!0})=>{const C=s.getBoundingClientRect(),[O,D]=s.renderer.unproject([e.x-C.left,e.y-C.top]).map((e=>Number(e.toFixed(7))));let T,A;do{T=T?"Anchor name exists":"Name this anchor",A=window.prompt(T,`${O},${D}`)}while(null!==A&&!w(A));if(null===A)return;const B=window.prompt("Description",A)??A,L=`geo:${D},${O}?xy=${O},${D}&id=${s.id}&type=circle`;return s.renderer.addMarker({xy:[O,D],title:`${s.id}@${O},${D}`,type:"circle"}),{ref:A,link:L,title:B}};var ho=Object.freeze({__proto__:null,addAnchorByPoint:addAnchorByPoint,createDocLink:createDocLink,createGeoLink:createGeoLink,focusDelay:focusDelay,focusNextBlock:function focusNextBlock(e=!1){const s=this.blocks.filter((e=>e.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0}))),w=s.findIndex((e=>e.classList.contains("focus"))),C=(w+(e?-1:1))%s.length;s.forEach((e=>e.classList.remove("focus")));const O=s.at(C);O?.classList?.add("focus"),scrollToBlock(O)},focusNextMap:focusNextMap,removeBlockFocus:function removeBlockFocus(){this.blocks.forEach((e=>e.classList.remove("focus")))},scrollToBlock:scrollToBlock,switchToNextLayout:switchToNextLayout});class Item extends window.HTMLDivElement{constructor({text:e,innerHTML:s,title:w,onclick:C,style:O,className:D}){super(),this.innerHTML=s??e,this.title=w,this.onclick=C,this.style.cssText=O,this.classList.add("menu-item"),D?.forEach((e=>this.classList.add(e))),this.onmouseover=()=>{this.parentElement.querySelectorAll(".sub-menu").forEach((e=>e.remove()))}}}window.customElements.define("menu-item",Item,{extends:"div"});class Folder extends window.HTMLDivElement{constructor({text:e,innerHTML:s,items:w}){super(),this.innerHTML=s??e,this.classList.add("folder","menu-item"),this.items=w,this.onmouseover=()=>{if(this.querySelector(".sub-menu"))return;const e=document.createElement("div");e.className="sub-menu";const s=this.items.length>1?"-20px":"0px";e.style.cssText=`position: absolute; left: 105%; top: ${s};`,this.items.forEach((s=>e.appendChild(s))),e.onmouseleave=()=>e.remove(),this.parentElement.querySelectorAll(".sub-menu").forEach((e=>e.remove())),this.appendChild(e),shiftByWindow(e)}}}window.customElements.define("menu-folder",Folder,{extends:"div"});class Suggestion extends Item{constructor({text:e,replace:s,cm:w}){super({text:e}),this.replace=s,this.classList.add("suggestion"),this.onmouseover=()=>{Array.from(this.parentElement?.children)?.forEach((e=>e.classList.remove("focus"))),this.classList.add("focus")},this.onmouseout=()=>{this.classList.remove("focus")},this.onclick=()=>{const e=w.getCursor();w.setSelection(e,{...e,ch:0}),w.replaceSelection(this.replace),w.focus();const s={...e,ch:this.replace.length};w.setCursor(s)}}}window.customElements.define("menu-item-suggestion",Suggestion,{extends:"div"});const renderResults=({modal:e,modalContent:s},w)=>new Item({text:"Render Results",onclick:()=>{e.open(),e.overlayBlur=3,e.closeByEscKey=!1,document.querySelector(".plainmodal-overlay-force").style.position="relative",s.innerHTML="";const C=document.createElement("div");C.innerHTML=`<a href="${w.renderer.url??w.renderer.use}">Source Code</a>`,s.appendChild(C);const printDetails=e=>{const w={success:"green",fail:"red",skip:"black",stop:"chocolate"}[e.state]??"black";printObject(e,s,`${e.func.name} <span style='float: right;'><span style='display: inline-block; width: 100px; color: ${w};'>${e.state}</span></span>`)},O=document.createElement("h3");O.textContent="Prepare Steps",s.appendChild(O);const D=w.renderer.results.filter((e=>"prepare"===e.type));D.forEach(printDetails);const T=document.createElement("h3");T.textContent="Render Steps",s.appendChild(T);const A=w.renderer.results.filter((e=>"render"===e.type));A.forEach(printDetails)}});function printObject(e,s,w=null){const C=document.createElement("details"),O=w??(e instanceof Error?e.name:Object.values(e)[0]);C.innerHTML=`<summary>${O}</summary>`,s.appendChild(C),C.onclick=()=>{if(!C.querySelector(":scope > :not(summary)"))if(e instanceof Error){["name","message","stack",...Object.keys(e)].forEach((s=>{const w=e[s],O="stack"===s?`<pre>${w}</pre>`:w,D=document.createElement("p");D.innerHTML=`<strong>${s}</strong>: ${O}`,C.appendChild(D)}))}else Object.entries(e).forEach((([e,s])=>{if("object"==typeof s&&null!==s)printObject(s,C,e);else{const w="function"==typeof s?`<pre>${s}</pre>`:s??typeof s,O=document.createElement("p");O.innerHTML=`<strong>${e}</strong>: ${w}`,C.appendChild(O)}}))}}const addRefLink=(e,s)=>new Folder({text:"Add Link",items:s.map((s=>new Item({text:s.link.startsWith("geo:")?`@ ${s.ref}`:s.ref,title:s.link,onclick:()=>{const w=e.getSelection();w===s.ref?e.replaceSelection(`[${w}]`):e.replaceSelection(`[${w}][${s.ref}]`)}})))});function ucf(e){return e.substr(0,1).toUpperCase()+e.substr(1)}var fo=["webkit","moz","ms","o"],mo=fo.reduce((function(e,s){return e.push(s),e.push(ucf(s)),e}),[]),go=fo.map((function(e){return"-".concat(e,"-")})),yo=function(){var e;return function(){return e=e||document.createElement("div").style}}(),vo=function(){var e=new RegExp("^(?:"+fo.join("|")+")(.)","i"),s=/[A-Z]/;return function(w){return"float"===(w=(w+"").replace(/\s/g,"").replace(/-([\da-z])/gi,(function(e,s){return s.toUpperCase()})).replace(e,(function(e,w){return s.test(w)?w.toLowerCase():e}))).toLowerCase()?"cssFloat":w}}(),_o=function(){var e=new RegExp("^(?:"+go.join("|")+")","i");return function(s){return(null!=s?s+"":"").replace(/\s/g,"").replace(e,"")}}(),cssSupports=function(e,s){var w=yo();return e=e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLowerCase())})),w.setProperty(e,s),null!=w[e]&&w.getPropertyValue(e)===s},bo={},ko={};function getName(e){if((e=vo(e))&&null==bo[e]){var s=yo();if(null!=s[e])bo[e]=e;else{var w=ucf(e);mo.some((function(C){var O=C+w;return null!=s[O]&&(bo[e]=O,!0)}))||(bo[e]=!1)}}return bo[e]||void 0}var Eo={getName:getName,getValue:function getValue(e,s){var w;return(e=getName(e))?(ko[e]=ko[e]||{},(Array.isArray(s)?s:[s]).some((function(s){return s=_o(s),null!=ko[e][s]?!1!==ko[e][s]&&(w=ko[e][s],!0):cssSupports(e,s)?(w=ko[e][s]=s,!0):!!go.some((function(C){var O=C+s;return!!cssSupports(e,O)&&(w=ko[e][s]=O,!0)}))||(ko[e][s]=!1,!1)})),"string"==typeof w?w:void 0):w}};function normalize(e){return(e+"").trim()}function applyList(e,s){s.setAttribute("class",e.join(" "))}function mClassList(e){return!mClassList.ignoreNative&&e.classList||function(){var s=(e.getAttribute("class")||"").trim().split(/\s+/).filter((function(e){return!!e})),w={length:s.length,item:function item(e){return s[e]},contains:function contains(e){return-1!==s.indexOf(normalize(e))},add:function add(){return function _add(e,s,w){w.filter((function(s){return!(!(s=normalize(s))||-1!==e.indexOf(s)||(e.push(s),0))})).length&&applyList(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList.methodChain?w:void 0},remove:function remove(){return function _remove(e,s,w){w.filter((function(s){var w;return!(!(s=normalize(s))||-1===(w=e.indexOf(s))||(e.splice(w,1),0))})).length&&applyList(e,s)}(s,e,Array.prototype.slice.call(arguments)),mClassList.methodChain?w:void 0},toggle:function toggle(w,C){return function _toggle(e,s,w,C){var O=e.indexOf(w=normalize(w));return-1!==O?!!C||(e.splice(O,1),applyList(e,s),!1):!1!==C&&(e.push(w),applyList(e,s),!0)}(s,e,w,C)},replace:function replace(C,O){return function _replace(e,s,w,C){var O;(w=normalize(w))&&(C=normalize(C))&&w!==C&&-1!==(O=e.indexOf(w))&&(e.splice(O,1),-1===e.indexOf(C)&&e.push(C),applyList(e,s))}(s,e,C,O),mClassList.methodChain?w:void 0}};return w}()}mClassList.methodChain=!0;var xo,So=1e3/60,wo=[],Co=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,So)},Oo=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)},Do=Date.now();function step(){var e,s;xo&&(Oo.call(window,xo),xo=null),wo.forEach((function(s){var w;(w=s.event)&&(s.event=null,s.listener(w),e=!0)})),e?(Do=Date.now(),s=!0):Date.now()-Do<500&&(s=!0),s&&(xo=Co.call(window,step))}function indexOfTasks(e){var s=-1;return wo.some((function(w,C){return w.listener===e&&(s=C,!0)})),s}var To=function add(e){var s;return-1===indexOfTasks(e)?(wo.push(s={listener:e}),function(e){s.event=e,xo||step()}):null};function _defineProperties$4(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var Ao="timed",Bo="".concat(Ao,"TransitionRun"),Lo="".concat(Ao,"TransitionStart"),Po="".concat(Ao,"TransitionEnd"),Mo="".concat(Ao,"TransitionCancel"),Io="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Fo=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},$o={},No=0;function fireEvent(e,s){var w,C=(Math.min(Math.max(-e.delay,0),e.duration)+(s!==Po&&s!==Mo||!e.startTime?0:Date.now()-e.startTime))/1e3;try{w=new e.window.TransitionEvent(s,{propertyName:e.options.property,pseudoElement:e.options.pseudoElement,elapsedTime:C,bubbles:!0,cancelable:!1}),Io&&(w.pseudoElement=e.options.pseudoElement)}catch(O){(w=e.window.document.createEvent("TransitionEvent")).initTransitionEvent(s,!0,!1,e.options.property,C),w.pseudoElement=e.options.pseudoElement}w.timedTransition=e.ins,e.element.dispatchEvent(w)}function fixCurrentPosition(e){if(2===e.state){var s=Date.now()-e.startTime;e.currentPosition=e.isOn?Math.min(e.currentPosition+s,e.duration):Math.max(e.currentPosition-s,0)}}function finishAll(e){e.state=0,e.runTime=0,e.startTime=0,e.currentPosition=e.isOn?e.duration:0}function finishPlaying(e){2===e.state&&(e.state=0,fireEvent(e,Po),finishAll(e))}function finishDelaying(e){if(1===e.state){e.state=2,e.startTime=Date.now(),e.isReversing=!e.isOn,fireEvent(e,Lo);var s=e.isOn?e.duration-e.currentPosition:e.currentPosition;s>0?e.timer=setTimeout((function(){finishPlaying(e)}),s):finishPlaying(e)}}function abort(e){clearTimeout(e.timer),0!==e.state&&(e.state=0,fireEvent(e,Mo))}function _setOptions$3(e,s){var w=e.options;function parseAsCss(w){var C="number"==typeof s[w]?(e.window.getComputedStyle(e.element,"")[Eo.getName("transition-".concat(w))]||"").split(",")[s[w]]:s[w];return"string"==typeof C?C.trim():null}"string"==typeof s.pseudoElement&&(w.pseudoElement=s.pseudoElement);var C=parseAsCss("property");"string"==typeof C&&"all"!==C&&"none"!==C&&(w.property=C),["duration","delay"].forEach((function(s){var C,O,D=parseAsCss(s);"string"==typeof D&&(/^[0.]+$/.test(D)?(w[s]="0s",e[s]=0):(C=/^(.+?)(m)?s$/.exec(D))&&Fo(O=parseFloat(C[1]))&&("duration"!==s||O>=0)&&(w[s]="".concat(O).concat(C[2]||"","s"),e[s]=O*(C[2]?1:1e3)))})),["procToOn","procToOff"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}var Vo=function(){function TimedTransition(e,s,w){!function _classCallCheck$4(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,TimedTransition);var C={ins:this,options:{pseudoElement:"",property:""},duration:0,delay:0,isOn:!!w};if(Object.defineProperty(this,"_id",{value:++No}),C._id=this._id,$o[this._id]=C,!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)throw new Error("This `element` is not accepted.");C.element=e,s||(s={}),C.window=e.ownerDocument.defaultView||s.window||window,s.hasOwnProperty("property")||(s.property=0),s.hasOwnProperty("duration")||(s.duration=0),s.hasOwnProperty("delay")||(s.delay=0),_setOptions$3(C,s),finishAll(C)}return function _createClass$4(e,s,w){return s&&_defineProperties$4(e.prototype,s),w&&_defineProperties$4(e,w),e}(TimedTransition,[{key:"remove",value:function remove(){var e=$o[this._id];clearTimeout(e.timer),delete $o[this._id]}},{key:"setOptions",value:function setOptions(e){return e&&_setOptions$3($o[this._id],e),this}},{key:"on",value:function on(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _on(e,s,w){e.isOn&&0===e.state||e.isOn&&0!==e.state&&!s||(e.options.procToOn&&(w.unshift(!!s),e.options.procToOn.apply(e.ins,w)),s||!e.isOn&&1===e.state||-e.delay>e.duration?(abort(e),e.isOn=!0,finishAll(e)):(fixCurrentPosition(e),abort(e),e.state=1,e.isOn=!0,e.runTime=Date.now(),e.startTime=0,fireEvent(e,Bo),e.delay>0?e.timer=setTimeout((function(){finishDelaying(e)}),e.delay):(e.delay<0&&(e.currentPosition=Math.min(e.currentPosition-e.delay,e.duration)),finishDelaying(e))))}($o[this._id],e,Array.prototype.slice.call(arguments,2)),this}},{key:"off",value:function off(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _off(e,s,w){!e.isOn&&0===e.state||!e.isOn&&0!==e.state&&!s||(e.options.procToOff&&(w.unshift(!!s),e.options.procToOff.apply(e.ins,w)),s||e.isOn&&1===e.state||-e.delay>e.duration?(abort(e),e.isOn=!1,finishAll(e)):(fixCurrentPosition(e),abort(e),e.state=1,e.isOn=!1,e.runTime=Date.now(),e.startTime=0,fireEvent(e,Bo),e.delay>0?e.timer=setTimeout((function(){finishDelaying(e)}),e.delay):(e.delay<0&&(e.currentPosition=Math.max(e.currentPosition+e.delay,0)),finishDelaying(e))))}($o[this._id],e,Array.prototype.slice.call(arguments,2)),this}},{key:"state",get:function get(){return $o[this._id].state}},{key:"element",get:function get(){return $o[this._id].element}},{key:"isReversing",get:function get(){return $o[this._id].isReversing}},{key:"pseudoElement",get:function get(){return $o[this._id].options.pseudoElement},set:function set(e){_setOptions$3($o[this._id],{pseudoElement:e})}},{key:"property",get:function get(){return $o[this._id].options.property},set:function set(e){_setOptions$3($o[this._id],{property:e})}},{key:"duration",get:function get(){return $o[this._id].options.duration},set:function set(e){_setOptions$3($o[this._id],{duration:e})}},{key:"delay",get:function get(){return $o[this._id].options.delay},set:function set(e){_setOptions$3($o[this._id],{delay:e})}},{key:"procToOn",get:function get(){return $o[this._id].options.procToOn},set:function set(e){_setOptions$3($o[this._id],{procToOn:e})}},{key:"procToOff",get:function get(){return $o[this._id].options.procToOff},set:function set(e){_setOptions$3($o[this._id],{procToOff:e})}}],[{key:"STATE_STOPPED",get:function get(){return 0}},{key:"STATE_DELAYING",get:function get(){return 1}},{key:"STATE_PLAYING",get:function get(){return 2}}]),TimedTransition}();function _defineProperties$3(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}mClassList.ignoreNative=!0;var Ro="plainoverlay",Ho="".concat(Ro,"-style"),zo=Ro,Wo="".concat(Ro,"-doc"),jo="".concat(Ro,"-show"),Xo="".concat(Ro,"-hide"),qo="".concat(Ro,"-force"),Yo="".concat(Ro,"-body"),Go="".concat(Ro,"-builtin-face-defs"),Uo="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,Zo=!Uo&&!!document.uniqueID,Ko="MozAppearance"in document.documentElement.style,Jo=!(Uo||Ko||!window.chrome||!window.CSS),Qo=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),er=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},tr={},nr=0;function setStyle(e,s,w,C){var O=e.style;return(C||Object.keys(s)).forEach((function(e){null!=s[e]&&(w&&null==w[e]&&(w[e]=O[e]),O[e]=s[e],s[e]=null)})),e}function restoreStyle(e,s,w){return setStyle(e,s,null,w)}function getBBox$1(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,right:w.right,bottom:w.bottom,width:w.width,height:w.height};return s&&(C.left+=s.pageXOffset,C.right+=s.pageXOffset,C.top+=s.pageYOffset,C.bottom+=s.pageYOffset),C}function scrollLeft(e,s,w,C){return s?(null!=C&&w.scrollTo(C,w.pageYOffset),w.pageXOffset):(null!=C&&(e.scrollLeft=C),e.scrollLeft)}function scrollTop(e,s,w,C){return s?(null!=C&&w.scrollTo(w.pageXOffset,C),w.pageYOffset):(null!=C&&(e.scrollTop=C),e.scrollTop)}function getDocClientWH(e){var s=e.elmTarget,w=s.clientWidth,C=s.clientHeight;if(Zo||Uo){var O=e.window.getComputedStyle(e.elmTargetBody,""),D=O.writingMode||O["writing-mode"],T=O.direction;return"tb-rl"===D||"bt-rl"===D||"tb-lr"===D||"bt-lr"===D||Uo&&("ltr"===T&&("vertical-rl"===D||"vertical-lr"===D)||"rtl"===T&&("vertical-rl"===D||"vertical-lr"===D))?{width:C,height:w}:{width:w,height:C}}return{width:w,height:C}}function restoreScroll(e,s){function scrollElement(s,w,C,O){try{scrollLeft(s,w,e.window,C),scrollTop(s,w,e.window,O)}catch(e){}}return s?e.savedElementsScroll.some((function(e){return e.element===s&&(scrollElement(e.element,e.isDoc,e.left,e.top),!0)})):(e.savedElementsScroll.forEach((function(e){scrollElement(e.element,e.isDoc,e.left,e.top)})),!0)}function avoidFocus(e,s){return!((!e.isDoc||s===s.ownerDocument.body||e.elmOverlay.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)&&(e.isDoc||!(s===e.elmTargetBody||e.elmTargetBody.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY)))&&(s.blur?s.blur():s.ownerDocument.body.focus(),!0)}function avoidSelect(e){var s=("getSelection"in window?e.window:e.document).getSelection();if(s.rangeCount&&(e.isDoc?!function nodeContainsSel(e,s){var w=e.ownerDocument.createRange(),C=s.rangeCount;w.selectNode(e);for(var O=0;O<C;O++){var D=s.getRangeAt(O);if(D.compareBoundaryPoints(Range.START_TO_START,w)<0||D.compareBoundaryPoints(Range.END_TO_END,w)>0)return!1}return!0}(e.elmOverlayBody,s):!s.containsNode||Jo&&s.isCollapsed?function selContainsNode(e,s,w){var C=s.ownerDocument.createRange(),O=e.rangeCount;C.selectNodeContents(s);for(var D=0;D<O;D++){var T=e.getRangeAt(D);if(!T.toString().length&&e.toString().length&&1===O&&(T.setStart(e.anchorNode,e.anchorOffset),T.setEnd(e.focusNode,e.focusOffset),T.toString()!==e.toString()&&(T.setStart(e.focusNode,e.focusOffset),T.setEnd(e.anchorNode,e.anchorOffset),T.toString()!==e.toString())))throw new Error("Edge bug (Issue #7321753); Couldn't recover");if(T.compareBoundaryPoints(Range.START_TO_END,C)>=0&&T.compareBoundaryPoints(Range.END_TO_START,C)<=0)return!0}return!1}(s,e.elmTargetBody):s.containsNode(e.elmTargetBody,!0))){try{s.removeAllRanges()}catch(e){}if(e.document.body.focus(),s.rangeCount>0)try{s.removeAllRanges()}catch(e){}return!0}return!1}function disableDocBars(e){var s=e.elmTarget,w=e.elmTargetBody,C=w.getBoundingClientRect(),O=getDocClientWH(e),D=-O.width,T=-O.height;if(setStyle(s,{overflow:"hidden"},e.savedStyleTarget),D+=(O=getDocClientWH(e)).width,T+=O.height,D||T){var A,B,L=e.window.getComputedStyle(w,"");if(Zo||Uo){var P=L.writingMode||L["writing-mode"],M=L.direction;D&&(A=function barLeft(e,s){var w="rl-tb"===e||"tb-rl"===e||"bt-rl"===e||"rl-bt"===e;return Zo&&w||Uo&&(w||"rtl"===s&&("horizontal-tb"===e||"vertical-rl"===e)||"ltr"===s&&"vertical-rl"===e)}(P,M)?"marginLeft":"marginRight"),T&&(B=function barTop(e,s){var w="bt-rl"===e||"bt-lr"===e||"lr-bt"===e||"rl-bt"===e;return Zo&&w||Uo&&(w||"rtl"===s&&("vertical-lr"===e||"vertical-rl"===e))}(P,M)?"marginTop":"marginBottom")}else D&&(A="marginRight"),T&&(B="marginBottom");var I={};return D&&(I[A]="".concat(parseFloat(L[A])+D,"px")),T&&(I[B]="".concat(parseFloat(L[B])+T,"px")),setStyle(w,I,e.savedStyleTargetBody),function resizeTarget(e,s,w){var C=e.elmTargetBody,O=C.getBoundingClientRect();if(!(Math.abs(O.width-s)<.5&&Math.abs(O.height-w)<.5)){var D=e.window.getComputedStyle(C,""),T=D.boxSizing,A="border-box"===T?[]:"padding-box"===T?["border"]:["border","padding"],B={border:{width:["borderLeftWidth","borderRightWidth"],height:["borderTopWidth","borderBottomWidth"]},padding:{width:["paddingLeft","paddingRight"],height:["paddingTop","paddingBottom"]}},L=["width","height"].reduce((function(e,s){return A.forEach((function(w){B[w][s].forEach((function(w){e[s]-=parseFloat(D[w])}))})),e}),{width:s,height:w});setStyle(C,{width:L.width>0?"".concat(L.width,"px"):0,height:L.height>0?"".concat(L.height,"px"):0},e.savedStyleTargetBody);var P={};O=C.getBoundingClientRect(),Math.abs(O.width-s)>=.5&&(P.width="".concat(L.width-(O.width-s),"px")),O.height!==w&&(P.height="".concat(L.height-(O.height-w),"px")),setStyle(C,P,e.savedStyleTargetBody)}}(e,C.width,C.height),restoreScroll(e,s),!0}return restoreStyle(s,e.savedStyleTarget,["overflow"]),!1}function _position(e,s){var w=e.elmTargetBody,C=e.window.getComputedStyle(w,""),O=e.elmOverlay,D=e.window.getComputedStyle(O,""),T=getBBox$1(O,e.window),A=["Top","Right","Bottom","Left"].reduce((function(e,s){return e[s.toLowerCase()]=parseFloat(C["border".concat(s,"Width")]),e}),{}),B=T.left-parseFloat(D.left),L=T.top-parseFloat(D.top),P={left:"".concat(s.left-B+A.left,"px"),top:"".concat(s.top-L+A.top,"px"),width:"".concat(s.width-A.left-A.right,"px"),height:"".concat(s.height-A.top-A.bottom,"px")},M=/^([\d.]+)(px|%)$/;[{prop:"TopLeft",hBorder:"left",vBorder:"top"},{prop:"TopRight",hBorder:"right",vBorder:"top"},{prop:"BottomRight",hBorder:"right",vBorder:"bottom"},{prop:"BottomLeft",hBorder:"left",vBorder:"bottom"}].forEach((function(e){var w=Eo.getName("border".concat(e.prop,"Radius")),O=C[w].split(" "),D=O[0],T=O[1]||O[0],B=M.exec(D);D=B?"px"===B[2]?+B[1]:B[1]*s.width/100:0,T=(B=M.exec(T))?"px"===B[2]?+B[1]:B[1]*s.height/100:0,D-=A[e.hBorder],T-=A[e.vBorder],D>0&&T>0&&(P[w]="".concat(D,"px ").concat(T,"px"))})),setStyle(O,P),e.targetBodyBBox=s}function getTargetElements(e){var s=e.elmTargetBody,w=e.elmOverlay,C=[e.elmTarget];return e.isDoc?(C.push(s),Array.prototype.slice.call(s.childNodes).forEach((function(e){e.nodeType!==Node.ELEMENT_NODE||e===w||mClassList(e).contains(zo)||e.id===Go||(C.push(e),Array.prototype.push.apply(C,e.querySelectorAll("*")))}))):Array.prototype.push.apply(C,s.querySelectorAll("*")),C}function finishShowing(e){if(e.filterElements=null,!1!==e.options.blur){var s=Eo.getName("filter"),w=Eo.getValue("filter","blur(".concat(e.options.blur,"px)"));if(w){var C=e.isDoc?Array.prototype.slice.call(e.elmTargetBody.childNodes).filter((function(s){return s.nodeType===Node.ELEMENT_NODE&&s!==e.elmOverlay&&!mClassList(s).contains(zo)&&s.id!==Go})).map((function(e){return{element:e,savedStyle:{}}})):[{element:e.elmTargetBody,savedStyle:{}}];C.forEach((function(e){var C={};C[s]=w,setStyle(e.element,C,e.savedStyle)})),e.filterElements=C}}e.state=2,e.options.onShow&&e.options.onShow.call(e.ins)}function finishHiding(e){if(mClassList(e.elmOverlay).add(Xo),restoreStyle(e.elmTarget,e.savedStyleTarget),restoreStyle(e.elmTargetBody,e.savedStyleTargetBody),e.savedStyleTarget={},e.savedStyleTargetBody={},function restoreAccKeys(e){e.savedElementsAccKeys.forEach((function(e){try{!1===e.tabIndex?e.element.removeAttribute("tabindex"):null!=e.tabIndex&&(e.element.tabIndex=e.tabIndex)}catch(e){}try{e.accessKey&&(e.element.accessKey=e.accessKey)}catch(e){}}))}(e),e.savedElementsAccKeys=[],e.isDoc&&e.activeElement){var s=e.state;e.state=0,e.elmTargetBody.removeEventListener("focus",e.focusListener,!0),e.activeElement.focus(),e.state=s}e.activeElement=null,e.timerRestoreAndFinish&&(clearTimeout(e.timerRestoreAndFinish),e.timerRestoreAndFinish=null),e.timerRestoreAndFinish=setTimeout((function restoreAndFinish(){e.timerRestoreAndFinish=null,e.state=0,e.elmTargetBody.addEventListener("focus",e.focusListener,!0),restoreScroll(e),e.savedElementsScroll=null,e.options.onHide&&e.options.onHide.call(e.ins)}),0)}function _show(e,s){if(!(2===e.state||1===e.state&&!s||1!==e.state&&e.options.onBeforeShow&&!1===e.options.onBeforeShow.call(e.ins))){if(0===e.state){var w=e.elmOverlay,C=mClassList(w);e.document.body.appendChild(w);var O=getTargetElements(e);if(C.remove(Xo),!e.isDoc){var D=e.elmTargetBody;"inline"===e.window.getComputedStyle(D,"").display&&setStyle(D,{display:"inline-block"},e.savedStyleTargetBody),_position(e,getBBox$1(D,e.window))}e.savedElementsScroll=function getScroll(s,w){var C=[];return s.forEach((function(s,O){var D=w&&0===O;(function elementCanScroll(s,w){var C=e.window.getComputedStyle(s,""),O=s.nodeName.toLowerCase();return"scroll"===C.overflow||"auto"===C.overflow||"scroll"===C.overflowX||"auto"===C.overflowX||"scroll"===C.overflowY||"auto"===C.overflowY||w&&("visible"===C.overflow||"visible"===C.overflowX||"visible"===C.overflowY)||!w&&("textarea"===O||"select"===O)})(s,D)&&C.push({element:s,isDoc:D,left:scrollLeft(s,D,e.window),top:scrollTop(s,D,e.window)})})),C}(O,e.isDoc),e.disabledDocBars=!1,e.isDoc&&e.savedElementsScroll.length&&e.savedElementsScroll[0].isDoc&&(e.disabledDocBars=disableDocBars(e)),e.savedElementsAccKeys=function disableAccKeys(e,s){var w=[];return e.forEach((function(e,C){if(!s||0!==C){var O={},D=e.tabIndex;-1!==D&&(O.element=e,O.tabIndex=!!e.hasAttribute("tabindex")&&D,e.tabIndex=-1);var T=e.accessKey;T&&(O.element=e,O.accessKey=T,e.accessKey=""),O.element&&w.push(O)}})),w}(O,e.isDoc),e.activeElement=e.document.activeElement,e.activeElement&&avoidFocus(e,e.activeElement),avoidSelect(e),w.offsetWidth,e.options.onPosition&&e.options.onPosition.call(e.ins)}e.transition.on(s),e.state=1,s&&finishShowing(e)}}function _setOptions$2(e,s){var w=e.options;if(s.hasOwnProperty("face")&&(null==s.face?void 0:s.face)!==w.face){for(var C=e.elmOverlayBody;C.firstChild;)C.removeChild(C.firstChild);if(!1===s.face)w.face=!1;else if(s.face&&s.face.nodeType===Node.ELEMENT_NODE)w.face=s.face,C.appendChild(s.face);else if(null==s.face){var O=e.document;if(!O.getElementById(Go)){var D=(new e.window.DOMParser).parseFromString('<svg id="plainoverlay-builtin-face-defs" xmlns="http://www.w3.org/2000/svg" version="1.1"><defs><linearGradient id="plainoverlay-builtin-face_01-grad" gradientUnits="userSpaceOnUse" x1="160" y1="20" x2="300" y2="160"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset="0.2" stop-color="#fff" stop-opacity="0.1"/><stop offset="1" stop-color="#fff" stop-opacity="1"/></linearGradient><g id="plainoverlay-builtin-face_01"><circle cx="160" cy="160" r="140"/><path d="M160 20a140 140 0 0 1 140 140" stroke="url(\'#plainoverlay-builtin-face_01-grad\')"/></g></defs></svg>',"image/svg+xml");O.body.appendChild(D.documentElement)}w.face=void 0,C.innerHTML='<svg class="plainoverlay-builtin-face plainoverlay-builtin-face_01" version="1.1" viewBox="0 0 320 320"><use xlink:href="#plainoverlay-builtin-face_01"/></svg>'}}er(s.duration)&&s.duration!==w.duration&&(w.duration=s.duration,e.elmOverlay.style[Eo.getName("transitionDuration")]=200===s.duration?"":"".concat(s.duration,"ms"),e.transition.duration="".concat(s.duration,"ms")),(er(s.blur)||!1===s.blur)&&(w.blur=s.blur),Qo(s.style)&&setStyle(e.elmOverlay,s.style),["onShow","onHide","onBeforeShow","onBeforeHide","onPosition"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}function scroll(e,s,w,C){var O,D;if(s){if(-1===getTargetElements(e).indexOf(s))return D;O="html"===s.nodeName.toLowerCase()}else s=e.elmTarget,O=e.isDoc;var T,A=null!=C&&e.savedElementsScroll&&(e.savedElementsScroll.find?e.savedElementsScroll.find((function(e){return e.element===s})):(e.savedElementsScroll.some((function(e){return e.element===s&&(T=e,!0)})),T));return D=(w?scrollLeft:scrollTop)(s,O,e.window,C),A&&(A[w?"left":"top"]=D),D}var or=function(){function PlainOverlay(e,s){function getTarget(e){var s;if(e)if(e.nodeType){if(e.nodeType===Node.DOCUMENT_NODE)s=e.documentElement;else if(e.nodeType===Node.ELEMENT_NODE){var w=e.nodeName.toLowerCase();s="body"===w?e.ownerDocument.documentElement:"iframe"===w||"frame"===w?e.contentDocument.documentElement:e}if(!s)throw new Error("This element is not accepted.")}else e===e.window&&(s=e.document.documentElement);else s=document.documentElement;return s}!function _classCallCheck$3(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainOverlay);var w={ins:this,options:{face:!1,duration:200,blur:!1},state:0,savedStyleTarget:{},savedStyleTargetBody:{},blockingDisabled:!1};if(Object.defineProperty(this,"_id",{value:++nr}),w._id=this._id,tr[this._id]=w,1===arguments.length){if(!(w.elmTarget=getTarget(e))){if(!Qo(e))throw new Error("Invalid argument.");w.elmTarget=document.documentElement,s=e}}else if(!(w.elmTarget=getTarget(e)))throw new Error("This target is not accepted.");if(s){if(!Qo(s))throw new Error("Invalid options.")}else s={};w.isDoc="html"===w.elmTarget.nodeName.toLowerCase();var C=w.document=w.elmTarget.ownerDocument;w.window=C.defaultView;var O=w.elmTargetBody=w.isDoc?C.body:w.elmTarget;if(!C.getElementById(Ho)){var D=C.getElementsByTagName("head")[0]||C.documentElement,T=D.insertBefore(C.createElement("style"),D.firstChild);T.type="text/css",T.id=Ho,T.textContent=".plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01,.plainoverlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainoverlay{position:absolute;left:0;top:0;overflow:hidden;background-color:rgba(136,136,136,.6);cursor:wait;z-index:9000;transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:0}.plainoverlay.plainoverlay-show{opacity:1}.plainoverlay.plainoverlay-force{transition-property:none}.plainoverlay.plainoverlay-hide{display:none}.plainoverlay.plainoverlay-doc{position:fixed;left:-200px;top:-200px;overflow:visible;padding:200px;width:100vw;height:100vh}.plainoverlay-body{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plainoverlay.plainoverlay-doc .plainoverlay-body{width:100vw;height:100vh}.plainoverlay-builtin-face{width:90%;height:90%;max-width:320px;max-height:320px}#plainoverlay-builtin-face-defs{width:0;height:0;position:fixed;left:-100px;top:-100px}#plainoverlay-builtin-face_01 circle,#plainoverlay-builtin-face_01 path{fill:none;stroke-width:40px}#plainoverlay-builtin-face_01 circle{stroke:#fff;opacity:.25}#plainoverlay-builtin-face_01 path{stroke-linecap:round}.plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01{-webkit-animation-name:plainoverlay-builtin-face_01-spin;animation-name:plainoverlay-builtin-face_01-spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",(Zo||Uo)&&function forceReflow$1(e){setTimeout((function(){var s=e.parentNode,w=e.nextSibling;s.insertBefore(s.removeChild(e),w)}),0)}(T)}var A,B=w.elmOverlay=C.createElement("div"),L=mClassList(B);L.add(zo,Xo),w.isDoc&&L.add(Wo),w.transition=new Vo(B,{procToOn:function procToOn(e){var s=mClassList(B);s.toggle(qo,!!e),s.add(jo)},procToOff:function procToOff(e){var s=mClassList(B);s.toggle(qo,!!e),s.remove(jo)},property:"opacity",duration:"".concat(200,"ms")}),B.addEventListener("timedTransitionEnd",(function(e){e.target===B&&"opacity"===e.propertyName&&(1===w.state?finishShowing(w):3===w.state&&finishHiding(w))}),!0),(w.isDoc?w.window:O).addEventListener("scroll",(function(e){var s=e.target;0!==w.state&&!w.blockingDisabled&&restoreScroll(w,!w.isDoc||s!==w.window&&s!==w.document&&s!==w.elmTargetBody?s:w.elmTarget)&&(e.preventDefault(),e.stopImmediatePropagation())}),!0),w.focusListener=function(e){0!==w.state&&!w.blockingDisabled&&avoidFocus(w,e.target)&&(e.preventDefault(),e.stopImmediatePropagation())},O.addEventListener("focus",w.focusListener,!0),A=function(e){0!==w.state&&!w.blockingDisabled&&avoidSelect(w)&&(e.preventDefault(),e.stopImmediatePropagation())},["keyup","mouseup"].forEach((function(e){w.window.addEventListener(e,A,!0)})),w.resizing=!1,w.window.addEventListener("resize",To((function(){if(!w.resizing){if(w.resizing=!0,0!==w.state){if(w.isDoc)w.savedElementsScroll.length&&w.savedElementsScroll[0].isDoc&&(w.disabledDocBars&&(restoreStyle(w.elmTarget,w.savedStyleTarget,["overflow"]),restoreStyle(O,w.savedStyleTargetBody,["marginLeft","marginRight","marginTop","marginBottom","width","height"])),w.disabledDocBars=disableDocBars(w));else{var e=getBBox$1(O,w.window),s=w.targetBodyBBox;e.left===s.left&&e.top===s.top&&e.width===s.width&&e.height===s.height||_position(w,e)}w.options.onPosition&&w.options.onPosition.call(w.ins)}w.resizing=!1}})),!0),B.addEventListener("touchmove",(function(e){0!==w.state&&(e.preventDefault(),e.stopImmediatePropagation())}),!0),(w.elmOverlayBody=B.appendChild(C.createElement("div"))).className=Yo,C.body.appendChild(B),s.hasOwnProperty("face")||(s.face=null),_setOptions$2(w,s)}return function _createClass$3(e,s,w){return s&&_defineProperties$3(e.prototype,s),w&&_defineProperties$3(e,w),e}(PlainOverlay,[{key:"setOptions",value:function setOptions(e){return Qo(e)&&_setOptions$2(tr[this._id],e),this}},{key:"show",value:function show(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),_show(tr[this._id],e),this}},{key:"hide",value:function hide(e){return function _hide(e,s){if(!(0===e.state||3===e.state&&!s||3!==e.state&&e.options.onBeforeHide&&!1===e.options.onBeforeHide.call(e.ins))){e.filterElements&&(e.filterElements.forEach((function(e){restoreStyle(e.element,e.savedStyle)})),e.filterElements=null);var w=e.document.activeElement;w&&w!==w.ownerDocument.body&&e.elmOverlay.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY&&(w.blur?w.blur():w.ownerDocument.body.focus()),e.transition.off(s),e.state=3,s&&finishHiding(e)}}(tr[this._id],e),this}},{key:"scrollLeft",value:function scrollLeft(e,s){return scroll(tr[this._id],s,!0,e)}},{key:"scrollTop",value:function scrollTop(e,s){return scroll(tr[this._id],s,!1,e)}},{key:"position",value:function position(){var e=tr[this._id];return 0!==e.state&&(e.isDoc||_position(e,getBBox$1(e.elmTargetBody,e.window)),e.options.onPosition&&e.options.onPosition.call(e.ins)),this}},{key:"state",get:function get(){return tr[this._id].state}},{key:"style",get:function get(){return tr[this._id].elmOverlay.style}},{key:"blockingDisabled",get:function get(){return tr[this._id].blockingDisabled},set:function set(e){"boolean"==typeof e&&(tr[this._id].blockingDisabled=e)}},{key:"face",get:function get(){return tr[this._id].options.face},set:function set(e){_setOptions$2(tr[this._id],{face:e})}},{key:"duration",get:function get(){return tr[this._id].options.duration},set:function set(e){_setOptions$2(tr[this._id],{duration:e})}},{key:"blur",get:function get(){return tr[this._id].options.blur},set:function set(e){_setOptions$2(tr[this._id],{blur:e})}},{key:"onShow",get:function get(){return tr[this._id].options.onShow},set:function set(e){_setOptions$2(tr[this._id],{onShow:e})}},{key:"onHide",get:function get(){return tr[this._id].options.onHide},set:function set(e){_setOptions$2(tr[this._id],{onHide:e})}},{key:"onBeforeShow",get:function get(){return tr[this._id].options.onBeforeShow},set:function set(e){_setOptions$2(tr[this._id],{onBeforeShow:e})}},{key:"onBeforeHide",get:function get(){return tr[this._id].options.onBeforeHide},set:function set(e){_setOptions$2(tr[this._id],{onBeforeHide:e})}},{key:"onPosition",get:function get(){return tr[this._id].options.onPosition},set:function set(e){_setOptions$2(tr[this._id],{onPosition:e})}}],[{key:"show",value:function show(e,s){return new PlainOverlay(e,s).show()}},{key:"STATE_HIDDEN",get:function get(){return 0}},{key:"STATE_SHOWING",get:function get(){return 1}},{key:"STATE_SHOWN",get:function get(){return 2}},{key:"STATE_HIDING",get:function get(){return 3}}]),PlainOverlay}();function _defineProperties$2(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}var rr=[],ir=[],ar=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function get(){ar=!0}}))}catch(error){}function addEventListenerWithOptions(e,s,w,C){e.addEventListener(s,w,ar?C:C.capture)}function getPointsLength(e,s){var w=e.x-s.x,C=e.y-s.y;return Math.sqrt(w*w+C*C)}function getTouchById(e,s){if(null!=e&&null!=s)for(var w=0;w<e.length;w++)if(e[w].identifier===s)return e[w];return null}function hasXY(e){return e&&"number"==typeof e.clientX&&"number"==typeof e.clientY}function dragstart(e){e.preventDefault()}var sr=function(){function PointerEvent(e){var s=this;!function _classCallCheck$2(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PointerEvent),this.startHandlers={},this.lastHandlerId=0,this.curPointerClass=null,this.curTouchId=null,this.lastPointerXY={clientX:0,clientY:0},this.lastTouchTime=0,this.options={preventDefault:!0,stopPropagation:!0},e&&["preventDefault","stopPropagation"].forEach((function(w){"boolean"==typeof e[w]&&(s.options[w]=e[w])}))}return function _createClass$2(e,s,w){return s&&_defineProperties$2(e.prototype,s),w&&_defineProperties$2(e,w),e}(PointerEvent,[{key:"regStartHandler",value:function regStartHandler(e){var s=this;return s.startHandlers[++s.lastHandlerId]=function(w){var C,O,D="mousedown"===w.type?"mouse":"touch",T=Date.now();if("touch"===D)s.lastTouchTime=T,C=w.changedTouches[0],O=w.changedTouches[0].identifier;else{if(T-s.lastTouchTime<400)return;C=w}if(!hasXY(C))throw new Error("No clientX/clientY");s.curPointerClass&&s.cancel(),e.call(s,C)&&(s.curPointerClass=D,s.curTouchId="touch"===D?O:null,s.lastPointerXY.clientX=C.clientX,s.lastPointerXY.clientY=C.clientY,s.options.preventDefault&&w.preventDefault(),s.options.stopPropagation&&w.stopPropagation())},s.lastHandlerId}},{key:"unregStartHandler",value:function unregStartHandler(e){delete this.startHandlers[e]}},{key:"addStartHandler",value:function addStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return addEventListenerWithOptions(e,"mousedown",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchstart",this.startHandlers[s],{capture:!1,passive:!1}),addEventListenerWithOptions(e,"dragstart",dragstart,{capture:!1,passive:!1}),s}},{key:"removeStartHandler",value:function removeStartHandler(e,s){if(!this.startHandlers[s])throw new Error("Invalid handlerId: ".concat(s));return e.removeEventListener("mousedown",this.startHandlers[s],!1),e.removeEventListener("touchstart",this.startHandlers[s],!1),e.removeEventListener("dragstart",dragstart,!1),s}},{key:"addMoveHandler",value:function addMoveHandler(e,s,w){var C=this;function handler(e){var s="mousemove"===e.type?"mouse":"touch";if("touch"===s&&(C.lastTouchTime=Date.now()),s===C.curPointerClass){var w="touch"===s?getTouchById(e.changedTouches,C.curTouchId):e;hasXY(w)&&(w.clientX===C.lastPointerXY.clientX&&w.clientY===C.lastPointerXY.clientY||C.move(w),C.options.preventDefault&&e.preventDefault(),C.options.stopPropagation&&e.stopPropagation())}}var O=w?handler:To(handler);addEventListenerWithOptions(e,"mousemove",O,{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchmove",O,{capture:!1,passive:!1}),C.curMoveHandler=s}},{key:"move",value:function move(e){hasXY(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curMoveHandler&&this.curMoveHandler(this.lastPointerXY)}},{key:"addEndHandler",value:function addEndHandler(e,s){var w=this;function wrappedHandler(e){var s="mouseup"===e.type?"mouse":"touch";if("touch"===s&&(w.lastTouchTime=Date.now()),s===w.curPointerClass){var C="touch"===s?getTouchById(e.changedTouches,w.curTouchId)||(getTouchById(e.touches,w.curTouchId)?null:{}):e;C&&(w.end(C),w.options.preventDefault&&e.preventDefault(),w.options.stopPropagation&&e.stopPropagation())}}addEventListenerWithOptions(e,"mouseup",wrappedHandler,{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchend",wrappedHandler,{capture:!1,passive:!1}),w.curEndHandler=s}},{key:"end",value:function end(e){hasXY(e)&&(this.lastPointerXY.clientX=e.clientX,this.lastPointerXY.clientY=e.clientY),this.curEndHandler&&this.curEndHandler(this.lastPointerXY),this.curPointerClass=this.curTouchId=null}},{key:"addCancelHandler",value:function addCancelHandler(e,s){var w=this;addEventListenerWithOptions(e,"touchcancel",(function wrappedHandler(e){w.lastTouchTime=Date.now(),null!=w.curPointerClass&&(getTouchById(e.changedTouches,w.curTouchId)||(getTouchById(e.touches,w.curTouchId)?null:{}))&&w.cancel()}),{capture:!1,passive:!1}),w.curCancelHandler=s}},{key:"cancel",value:function cancel(){this.curCancelHandler&&this.curCancelHandler(),this.curPointerClass=this.curTouchId=null}}],[{key:"addEventListenerWithOptions",get:function get(){return addEventListenerWithOptions}},{key:"initClickEmulator",value:function initClickEmulator(e,s,w){if(rr.includes(e))return e;rr.push(e);var C,O,D,T;return null==s&&(s=16),null==w&&(w=400),addEventListenerWithOptions(e,"touchstart",(function(e){var s=e.changedTouches[0];C=s.clientX,O=s.clientY,D=s.identifier,T=performance.now()}),{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchend",(function(A){var B=getTouchById(A.changedTouches,D);"number"==typeof C&&"number"==typeof O&&"number"==typeof T&&B&&"number"==typeof B.clientX&&"number"==typeof B.clientY&&getPointsLength({x:C,y:O},{x:B.clientX,y:B.clientY})<=s&&performance.now()-T<=w&&setTimeout((function(){var s=new MouseEvent("click",{clientX:B.clientX,clientY:B.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=T=null}),{capture:!1,passive:!1}),addEventListenerWithOptions(e,"touchcancel",(function(){C=O=D=T=null}),{capture:!1,passive:!1}),e}},{key:"initDblClickEmulator",value:function initDblClickEmulator(e,s,w){if(ir.includes(e))return e;ir.push(e);var C,O,D;return null==s&&(s=16),null==w&&(w=400),PointerEvent.initClickEmulator(e,s,w),addEventListenerWithOptions(e,"click",(function(T){T.emulated&&"number"==typeof T.clientX&&"number"==typeof T.clientY&&("number"==typeof C&&getPointsLength({x:C,y:O},{x:T.clientX,y:T.clientY})<=s&&performance.now()-D<=2*w?(setTimeout((function(){var s=new MouseEvent("dblclick",{clientX:T.clientX,clientY:T.clientY});s.emulated=!0,e.dispatchEvent(s)}),0),C=O=D=null):(C=T.clientX,O=T.clientY,D=performance.now()))}),{capture:!1,passive:!1}),e}}]),PointerEvent}();function _defineProperties$1(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}mClassList.ignoreNative=!0;var lr,cr,ur,dr,pr,fr,mr,gr,yr,vr,_r=["tl","tr","bl","br"],br=["start","end"],kr=["inside","outside"],Er=[40,200,1e3],xr=[100,40,0],Sr="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,wr=!Sr&&!!document.uniqueID,Cr="MozAppearance"in document.documentElement.style,Or=!(Sr||Cr||!window.chrome||!window.CSS),Dr=!(Sr||wr||Cr||Or||window.chrome||!("WebkitAppearance"in document.documentElement.style)),Tr=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),Ar=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},Br={},Lr={},Pr=new sr,Mr=0,Ir=Dr?["all-scroll","move"]:["grab","all-scroll","move"],Fr=Dr?"move":["grabbing","move"],$r="plain-draggable",Nr="plain-draggable-dragging",Vr="plain-draggable-moving",Rr={},Hr=1e3/60,zr=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return setTimeout(e,Hr)},Wr=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||function(e){return clearTimeout(e)};{var jr,Xr,qr,Yr={};function frameUpdate(){var e=Date.now();["x","y"].forEach((function(s){var w=Yr[s];if(w){var C=e-w.lastFrameTime,O=Xr(jr,s),D=null!=w.lastValue&&Math.abs(w.lastValue-O)<10?w.lastValue:O;if(-1===w.dir?D>w.min:D<w.max){var T=D+w.speed*C*w.dir;T<w.min?T=w.min:T>w.max&&(T=w.max),Xr(jr,s,T),w.lastValue=T}w.lastFrameTime=e}}))}function frame(){Wr.call(window,qr),frameUpdate(),qr=zr.call(window,frame)}Rr.move=function(e,s,w){Wr.call(window,qr),frameUpdate(),jr===e&&(s.x&&Yr.x&&(s.x.lastValue=Yr.x.lastValue),s.y&&Yr.y&&(s.y.lastValue=Yr.y.lastValue)),jr=e,Yr=s,Xr=w;var C=Date.now();["x","y"].forEach((function(e){var s=Yr[e];s&&(s.lastFrameTime=C)})),qr=zr.call(window,frame)},Rr.stop=function(){Wr.call(window,qr),frameUpdate(),Yr={},jr=null}}function scrollXYWindow(e,s,w){return null!=w&&("x"===s?e.scrollTo(w,e.pageYOffset):e.scrollTo(e.pageXOffset,w)),"x"===s?e.pageXOffset:e.pageYOffset}function scrollXYElement(e,s,w){var C="x"===s?"scrollLeft":"scrollTop";return null!=w&&(e[C]=w),e[C]}function copyTree(e){return e?Tr(e)?Object.keys(e).reduce((function(s,w){return s[w]=copyTree(e[w]),s}),{}):Array.isArray(e)?e.map(copyTree):e:e}function hasChanged(e,s){var w,C;return _typeof(e)!==_typeof(s)||(w=Tr(e)?"obj":Array.isArray(e)?"array":"")!=(Tr(s)?"obj":Array.isArray(s)?"array":"")||("obj"===w?hasChanged(C=Object.keys(e).sort(),Object.keys(s).sort())||C.some((function(w){return hasChanged(e[w],s[w])})):"array"===w?e.length!==s.length||e.some((function(e,w){return hasChanged(e,s[w])})):e!==s)}function isElement$1(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function validBBox(e){if(!Tr(e))return null;var s;if(!Ar(s=e.left)&&!Ar(s=e.x))return null;if(e.left=e.x=s,!Ar(s=e.top)&&!Ar(s=e.y))return null;if(e.top=e.y=s,Ar(e.width)&&e.width>=0)e.right=e.left+e.width;else{if(!(Ar(e.right)&&e.right>=e.left))return null;e.width=e.right-e.left}if(Ar(e.height)&&e.height>=0)e.bottom=e.top+e.height;else{if(!(Ar(e.bottom)&&e.bottom>=e.top))return null;e.height=e.bottom-e.top}return e}function validPPValue(e){return Ar(e)?{value:e,isRatio:!1}:"string"==typeof e?function string2PPValue(e){var s,w,C=/^(.+?)(%)?$/.exec(e);return C&&Ar(s=parseFloat(C[1]))?{value:(w=!(!C[2]||!s))?s/100:s,isRatio:w}:null}(e.replace(/\s/g,"")):null}function ppValue2OptionValue(e){return e.isRatio?"".concat(100*e.value,"%"):e.value}function resolvePPValue(e,s,w){return"number"==typeof e?e:s+e.value*(e.isRatio?w:1)}function validPPBBox(e){if(!Tr(e))return null;var s;if(!(s=validPPValue(e.left))&&!(s=validPPValue(e.x)))return null;if(e.left=e.x=s,!(s=validPPValue(e.top))&&!(s=validPPValue(e.y)))return null;if(e.top=e.y=s,(s=validPPValue(e.width))&&s.value>=0)e.width=s,delete e.right;else{if(!(s=validPPValue(e.right)))return null;e.right=s,delete e.width}if((s=validPPValue(e.height))&&s.value>=0)e.height=s,delete e.bottom;else{if(!(s=validPPValue(e.bottom)))return null;e.bottom=s,delete e.height}return e}function ppBBox2OptionObject(e){return Object.keys(e).reduce((function(s,w){return s[w]=ppValue2OptionValue(e[w]),s}),{})}function resolvePPBBox(e,s){var w={left:"x",right:"x",x:"x",width:"x",top:"y",bottom:"y",y:"y",height:"y"},C={x:s.left,y:s.top},O={x:s.width,y:s.height};return validBBox(Object.keys(e).reduce((function(s,D){return s[D]=resolvePPValue(e[D],"width"===D||"height"===D?0:C[w[D]],O[w[D]]),s}),{}))}function getBBox(e,s){var w=e.getBoundingClientRect(),C={left:w.left,top:w.top,width:w.width,height:w.height};if(C.left+=window.pageXOffset,C.top+=window.pageYOffset,s){var O=window.getComputedStyle(e,""),D=parseFloat(O.borderTopWidth)||0,T=parseFloat(O.borderRightWidth)||0,A=parseFloat(O.borderBottomWidth)||0,B=parseFloat(O.borderLeftWidth)||0;C.left+=B,C.top+=D,C.width-=B+T,C.height-=D+A}return validBBox(C)}function setDraggableCursor(e,s){null==dr&&(!1!==Ir&&(dr=Eo.getValue("cursor",Ir)),null==dr&&(dr=!1)),e.style.cursor=!1===dr?s:dr}function setDraggingCursor(e){null==pr&&(!1!==Fr&&(pr=Eo.getValue("cursor",Fr)),null==pr&&(pr=!1)),!1!==pr&&(e.style.cursor=pr)}function viewPoint2SvgPoint(e,s,w){var C=e.svgPoint;return C.x=s,C.y=w,C.matrixTransform(e.svgCtmElement.getScreenCTM().inverse())}function moveTranslate(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.htmlOffset;return e.elementStyle[gr]="translate(".concat(s.left+C.left,"px, ").concat(s.top+C.top,"px)"),!0}return!1}function moveLeftTop(e,s){var w=e.elementBBox,C=e.elementStyle,O=e.htmlOffset,D=!1;return s.left!==w.left&&(C.left=s.left+O.left+"px",D=!0),s.top!==w.top&&(C.top=s.top+O.top+"px",D=!0),D}function moveSvg(e,s){var w=e.elementBBox;if(s.left!==w.left||s.top!==w.top){var C=e.svgOffset,O=e.svgOriginBBox,D=viewPoint2SvgPoint(e,s.left-window.pageXOffset,s.top-window.pageYOffset);return e.svgTransform.setTranslate(D.x+C.x-O.x,D.y+C.y-O.y),!0}return!1}function move(e,s,w){var C=e.elementBBox;function fix(){e.minLeft>=e.maxLeft?s.left=C.left:s.left<e.minLeft?s.left=e.minLeft:s.left>e.maxLeft&&(s.left=e.maxLeft),e.minTop>=e.maxTop?s.top=C.top:s.top<e.minTop?s.top=e.minTop:s.top>e.maxTop&&(s.top=e.maxTop)}if(fix(),w){if(!1===w(s))return!1;fix()}var O=e.moveElm(e,s);return O&&(e.elementBBox=validBBox({left:s.left,top:s.top,width:C.width,height:C.height})),O}function initTranslate(e){var s=e.element,w=e.elementStyle,C=getBBox(s),O=["display","marginTop","marginBottom","width","height"];O.unshift(gr);var D=w[mr];w[mr]="none";var T=getBBox(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var A=getBBox(s),B=window.getComputedStyle(s,"");"inline"===B.display&&(w.display="inline-block",["Top","Bottom"].forEach((function(e){var s=parseFloat(B["padding".concat(e)]);w["margin".concat(e)]=s?"-".concat(s,"px"):"0"}))),w[gr]="translate(0, 0)";var L=getBBox(s),P=e.htmlOffset={left:L.left?-L.left:0,top:L.top?-L.top:0};return w[gr]="translate(".concat(C.left+P.left,"px, ").concat(C.top+P.top,"px)"),["width","height"].forEach((function(C){L[C]!==A[C]&&(w[C]=A[C]+"px",(L=getBBox(s))[C]!==A[C]&&(w[C]=A[C]-(L[C]-A[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[mr]=D,T.left===C.left&&T.top===C.top||(w[gr]="translate(".concat(T.left+P.left,"px, ").concat(T.top+P.top,"px)")),T}function initLeftTop(e){var s=e.element,w=e.elementStyle,C=getBBox(s),O=["position","marginTop","marginRight","marginBottom","marginLeft","width","height"],D=w[mr];w[mr]="none";var T=getBBox(s);e.orgStyle?O.forEach((function(s){null!=e.lastStyle[s]&&w[s]!==e.lastStyle[s]||(w[s]=e.orgStyle[s])})):(e.orgStyle=O.reduce((function(e,s){return e[s]=w[s]||"",e}),{}),e.lastStyle={});var A=getBBox(s);w.position="absolute",w.left=w.top=w.margin="0";var B=getBBox(s),L=e.htmlOffset={left:B.left?-B.left:0,top:B.top?-B.top:0};return w.left=C.left+L.left+"px",w.top=C.top+L.top+"px",["width","height"].forEach((function(C){B[C]!==A[C]&&(w[C]=A[C]+"px",(B=getBBox(s))[C]!==A[C]&&(w[C]=A[C]-(B[C]-A[C])+"px")),e.lastStyle[C]=w[C]})),s.offsetWidth,w[mr]=D,T.left===C.left&&T.top===C.top||(w.left=T.left+L.left+"px",w.top=T.top+L.top+"px"),T}function initSvg(e){var s=e.element,w=e.svgTransform,C=s.getBoundingClientRect(),O=getBBox(s);w.setTranslate(0,0);var D=e.svgOriginBBox=s.getBBox(),T=s.getBoundingClientRect(),A=viewPoint2SvgPoint(e,T.left,T.top),B=e.svgOffset={x:D.x-A.x,y:D.y-A.y},L=viewPoint2SvgPoint(e,C.left,C.top);return w.setTranslate(L.x+B.x-D.x,L.y+B.y-D.y),O}function initBBox(e,s){var w=getBBox(document.documentElement),C=e.elementBBox=e.initElm(e),O=e.containmentBBox=e.containmentIsBBox?resolvePPBBox(e.options.containment,w)||w:getBBox(e.options.containment,!0);if(e.minLeft=O.left,e.maxLeft=O.right-C.width,e.minTop=O.top,e.maxTop=O.bottom-C.height,move(e,{left:C.left,top:C.top}),e.parsedSnapTargets){var D={x:C.width,y:C.height},T={x:e.minLeft,y:e.minTop},A={x:e.maxLeft,y:e.maxTop},B={left:"x",right:"x",x:"x",width:"x",xStart:"x",xEnd:"x",xStep:"x",top:"y",bottom:"y",y:"y",height:"y",yStart:"y",yEnd:"y",yStep:"y"},L=e.parsedSnapTargets.reduce((function(e,s){var L,P="containment"===s.base?O:w,M={x:P.left,y:P.top},I={x:P.width,y:P.height};function addSnapTarget(w){if(null==w.center&&(w.center=s.center),null==w.xGravity&&(w.xGravity=s.gravity),null==w.yGravity&&(w.yGravity=s.gravity),null!=w.x&&null!=w.y)w.x=resolvePPValue(w.x,M.x,I.x),w.y=resolvePPValue(w.y,M.y,I.y),w.center&&(w.x-=D.x/2,w.y-=D.y/2,w.corners=["tl"]),(w.corners||s.corners).forEach((function(s){var C=w.x-("tr"===s||"br"===s?D.x:0),O=w.y-("bl"===s||"br"===s?D.y:0);if(C>=T.x&&C<=A.x&&O>=T.y&&O<=A.y){var B={x:C,y:O},L=C-w.xGravity,P=C+w.xGravity,M=O-w.yGravity,I=O+w.yGravity;L>T.x&&(B.gravityXStart=L),P<A.x&&(B.gravityXEnd=P),M>T.y&&(B.gravityYStart=M),I<A.y&&(B.gravityYEnd=I),e.push(B)}}));else{var C=null!=w.x?"x":"y",O="x"===C?"y":"x",B="".concat(O,"Start"),L="".concat(O,"End"),P="".concat(C,"Gravity"),F=C.toUpperCase(),$=O.toUpperCase(),N="gravity".concat(F,"Start"),V="gravity".concat(F,"End"),R="gravity".concat($,"Start"),H="gravity".concat($,"End");if(w[C]=resolvePPValue(w[C],M[C],I[C]),w[B]=resolvePPValue(w[B],M[O],I[O]),w[L]=resolvePPValue(w[L],M[O],I[O])-D[O],w[B]>w[L]||w[B]>A[O]||w[L]<T[O])return;w.center&&(w[C]-=D[C]/2,w.sides=["start"]),(w.sides||s.sides).forEach((function(s){var M=w[C]-("end"===s?D[C]:0);if(M>=T[C]&&M<=A[C]){var I={},F=M-w[P],$=M+w[P];I[C]=M,F>T[C]&&(I[N]=F),$<A[C]&&(I[V]=$),w[B]>T[O]&&(I[R]=w[B]),w[L]<A[O]&&(I[H]=w[L]),e.push(I)}}))}}if((L=s.element?getBBox(s.element):null)||s.ppBBox)s.ppBBox&&(L=resolvePPBBox(s.ppBBox,P)),L&&s.edges.forEach((function(e){var w=s.gravity,O=s.gravity;"outside"===e&&(w+=C.width,O+=C.height);var D=L.left-w,T=L.right+w,A=L.top-O,B=L.bottom+O,P="inside"===e?"start":"end";addSnapTarget({xStart:D,xEnd:T,y:L.top,sides:[P],center:!1}),addSnapTarget({x:L.left,yStart:A,yEnd:B,sides:[P],center:!1}),P="inside"===e?"end":"start",addSnapTarget({xStart:D,xEnd:T,y:L.bottom,sides:[P],center:!1}),addSnapTarget({x:L.right,yStart:A,yEnd:B,sides:[P],center:!1})}));else{var F=[["x","y","xStart","xEnd","xStep","yStart","yEnd","yStep"].reduce((function(e,w){return s[w]&&(e[w]=resolvePPValue(s[w],"xStep"===w||"yStep"===w?0:M[B[w]],I[B[w]])),e}),{})];["x","y"].forEach((function(e){var w="".concat(e,"Start"),C="".concat(e,"End"),O="".concat(e,"Step"),D="".concat(e,"Gravity");F=F.reduce((function(T,A){var B=A[w],L=A[C],P=A[O];if(null!=B&&null!=L&&B>=L)return T;if(null!=P){if(P<2)return T;var M=P/2;M=s.gravity>M?M:null;for(var I=B;I<=L;I+=P){var F=Object.keys(A).reduce((function(e,s){return s!==w&&s!==C&&s!==O&&(e[s]=A[s]),e}),{});F[e]=I,F[D]=M,T.push(F)}}else T.push(A);return T}),[])})),F.forEach((function(e){addSnapTarget(e)}))}return e}),[]);e.snapTargets=L.length?L:null}var P={},M=e.options.autoScroll;if(M){P.isWindow=M.target===window,P.target=M.target;var I="scroll"===s,F=function getScrollable(e,s,w){var C,O,D,T,A={};T=s?document.documentElement:e,A.clientWidth=T.clientWidth,A.clientHeight=T.clientHeight;var B,L,P,M=0,I=0;return w||(s?(B=scrollXYWindow(e,"x"),L=scrollXYWindow(e,"y"),C=getComputedStyle(document.documentElement,""),O=getComputedStyle(document.body,""),M=scrollXYWindow(e,"x",document.documentElement.scrollWidth+A.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),I=scrollXYWindow(e,"y",document.documentElement.scrollHeight+A.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(C[s])||0)+(parseFloat(O[s])||0)}),0)),scrollXYWindow(e,"x",B),scrollXYWindow(e,"y",L)):(B=scrollXYElement(e,"x"),L=scrollXYElement(e,"y"),D=getComputedStyle(e,""),M=scrollXYElement(e,"x",e.scrollWidth+A.clientWidth+["marginLeft","marginRight","borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),I=scrollXYElement(e,"y",e.scrollHeight+A.clientHeight+["marginTop","marginBottom","borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"].reduce((function(e,s){return e+(parseFloat(D[s])||0)}),0)),scrollXYElement(e,"x",B),scrollXYElement(e,"y",L))),A.scrollWidth=A.clientWidth+M,A.scrollHeight=A.clientHeight+I,s?A.clientX=A.clientY=0:(P=e.getBoundingClientRect(),D||(D=getComputedStyle(e,"")),A.clientX=P.left+(parseFloat(D.borderLeftWidth)||0),A.clientY=P.top+(parseFloat(D.borderTopWidth)||0)),A}(M.target,P.isWindow,I),$=validBBox({left:F.clientX,top:F.clientY,width:F.clientWidth,height:F.clientHeight});I?e.autoScroll&&(P.scrollWidth=e.autoScroll.scrollWidth,P.scrollHeight=e.autoScroll.scrollHeight):(P.scrollWidth=F.scrollWidth,P.scrollHeight=F.scrollHeight),[["X","Width","left","right"],["Y","Height","top","bottom"]].forEach((function(e){var s=e[0],w=e[1],O=e[2],D=e[3],T=(P["scroll".concat(w)]||0)-F["client".concat(w)],A=M["min".concat(s)]||0,B=Ar(M["max".concat(s)])?M["max".concat(s)]:T;if(A<B&&A<T){B>T&&(B=T);for(var L=[],I=C[w.toLowerCase()],N=M.sensitivity.length-1;N>=0;N--){var V=M.sensitivity[N],R=M.speed[N];L.push({dir:-1,speed:R,position:$[O]+V}),L.push({dir:1,speed:R,position:$[D]-V-I})}P[s.toLowerCase()]={min:A,max:B,lines:L}}}))}e.autoScroll=P.x||P.y?P:null}function dragEnd(e){Rr.stop(),setDraggableCursor(e.options.handle,e.orgCursor),ur.style.cursor=fr,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.orgZIndex),yr&&(ur.style[yr]=vr);var s=mClassList(e.element);Vr&&s.remove(Vr),Nr&&s.remove(Nr),lr=null,Pr.cancel(),e.onDragEnd&&e.onDragEnd({left:e.elementBBox.left,top:e.elementBBox.top})}function _setOptions$1(e,s){var w,C,O=e.options;s.containment&&(isElement$1(s.containment)?s.containment!==O.containment&&(O.containment=s.containment,e.containmentIsBBox=!1,w=!0):(C=validPPBBox(copyTree(s.containment)))&&hasChanged(C,O.containment)&&(O.containment=C,e.containmentIsBBox=!0,w=!0));function commonSnapOptions(e,s){function cleanString(e){return"string"==typeof e?e.replace(/[, ]+/g," ").trim().toLowerCase():null}Ar(s.gravity)&&s.gravity>0&&(e.gravity=s.gravity);var w=cleanString(s.corner);if(w){if("all"!==w){var C={},O=w.split(/\s/).reduce((function(e,s){return(s="tl"===(s=s.trim().replace(/^(.).*?-(.).*$/,"$1$2"))||"lt"===s?"tl":"tr"===s||"rt"===s?"tr":"bl"===s||"lb"===s?"bl":"br"===s||"rb"===s?"br":null)&&!C[s]&&(e.push(s),C[s]=!0),e}),[]),D=O.length;w=D?4===D?"all":O.join(" "):null}w&&(e.corner=w)}var T=cleanString(s.side);T&&("start"===T||"end"===T||"both"===T?e.side=T:"start end"!==T&&"end start"!==T||(e.side="both")),"boolean"==typeof s.center&&(e.center=s.center);var A=cleanString(s.edge);A&&("inside"===A||"outside"===A||"both"===A?e.edge=A:"inside outside"!==A&&"outside inside"!==A||(e.edge="both"));var B="string"==typeof s.base?s.base.trim().toLowerCase():null;return!B||"containment"!==B&&"document"!==B||(e.base=B),e}if(null!=s.snap){var D=Tr(s.snap)&&null!=s.snap.targets?s.snap:{targets:s.snap},T=[],A=commonSnapOptions({targets:T},D);A.gravity||(A.gravity=20),A.corner||(A.corner="tl"),A.side||(A.side="both"),"boolean"!=typeof A.center&&(A.center=!1),A.edge||(A.edge="both"),A.base||(A.base="containment");var B=(Array.isArray(D.targets)?D.targets:[D.targets]).reduce((function(e,s){if(null==s)return e;var w,C=isElement$1(s),O=validPPBBox(copyTree(s)),D=C||O?{boundingBox:s}:Tr(s)&&null==s.start&&null==s.end&&null==s.step?s:{x:s,y:s},B=[],L={},P=D.boundingBox;if(C||isElement$1(P))B.push({element:P}),L.boundingBox=P;else if(w=O||validPPBBox(copyTree(P)))B.push({ppBBox:w}),L.boundingBox=ppBBox2OptionObject(w);else{var M,I=["x","y"].reduce((function(e,s){var w,C,O,T,A=D[s];(w=validPPValue(A))?(e[s]=w,L[s]=ppValue2OptionValue(w)):(Tr(A)&&(C=validPPValue(A.start),O=validPPValue(A.end),T=validPPValue(A.step),C&&O&&C.isRatio===O.isRatio&&C.value>=O.value&&(M=!0)),C=e["".concat(s,"Start")]=C||{value:0,isRatio:!1},O=e["".concat(s,"End")]=O||{value:1,isRatio:!0},L[s]={start:ppValue2OptionValue(C),end:ppValue2OptionValue(O)},T&&((T.isRatio?T.value>0:T.value>=2)?(e["".concat(s,"Step")]=T,L[s].step=ppValue2OptionValue(T)):M=!0));return e}),{});if(M)return e;I.xStart&&!I.xStep&&I.yStart&&!I.yStep?B.push({xStart:I.xStart,xEnd:I.xEnd,y:I.yStart},{xStart:I.xStart,xEnd:I.xEnd,y:I.yEnd},{x:I.xStart,yStart:I.yStart,yEnd:I.yEnd},{x:I.xEnd,yStart:I.yStart,yEnd:I.yEnd}):B.push(I)}if(B.length){T.push(commonSnapOptions(L,D));var F=L.corner||A.corner,$=L.side||A.side,N=L.edge||A.edge,V={gravity:L.gravity||A.gravity,base:L.base||A.base,center:"boolean"==typeof L.center?L.center:A.center,corners:"all"===F?_r:F.split(" "),sides:"both"===$?br:[$],edges:"both"===N?kr:[N]};B.forEach((function(s){["gravity","corners","sides","center","edges","base"].forEach((function(e){s[e]=V[e]})),e.push(s)}))}return e}),[]);B.length&&(O.snap=A,hasChanged(B,e.parsedSnapTargets)&&(e.parsedSnapTargets=B,w=!0))}else s.hasOwnProperty("snap")&&e.parsedSnapTargets&&(O.snap=e.parsedSnapTargets=e.snapTargets=void 0);if(s.autoScroll){var L=Tr(s.autoScroll)?s.autoScroll:{target:!0===s.autoScroll?window:s.autoScroll},P={};P.target=isElement$1(L.target)?L.target:window,P.speed=[],(Array.isArray(L.speed)?L.speed:[L.speed]).every((function(e,s){return!!(s<=2&&Ar(e))&&(P.speed[s]=e,!0)})),P.speed.length||(P.speed=Er);var M=Array.isArray(L.sensitivity)?L.sensitivity:[L.sensitivity];P.sensitivity=P.speed.map((function(e,s){return Ar(M[s])?M[s]:xr[s]})),["X","Y"].forEach((function(e){var s="min".concat(e),w="max".concat(e);Ar(L[s])&&L[s]>=0&&(P[s]=L[s]),Ar(L[w])&&L[w]>=0&&(!P[s]||L[w]>=P[s])&&(P[w]=L[w])})),hasChanged(P,O.autoScroll)&&(O.autoScroll=P,w=!0)}else s.hasOwnProperty("autoScroll")&&(O.autoScroll&&(w=!0),O.autoScroll=void 0);if(w&&initBBox(e),isElement$1(s.handle)&&s.handle!==O.handle){O.handle&&(O.handle.style.cursor=e.orgCursor,yr&&(O.handle.style[yr]=e.orgUserSelect),Pr.removeStartHandler(O.handle,e.pointerEventHandlerId));var I=O.handle=s.handle;e.orgCursor=I.style.cursor,setDraggableCursor(I,e.orgCursor),yr&&(e.orgUserSelect=I.style[yr],I.style[yr]="none"),Pr.addStartHandler(I,e.pointerEventHandlerId)}(Ar(s.zIndex)||!1===s.zIndex)&&(O.zIndex=s.zIndex,e===lr&&(e.elementStyle.zIndex=!1===O.zIndex?e.orgZIndex:O.zIndex));var F,$={left:e.elementBBox.left,top:e.elementBBox.top};Ar(s.left)&&s.left!==$.left&&($.left=s.left,F=!0),Ar(s.top)&&s.top!==$.top&&($.top=s.top,F=!0),F&&move(e,$),["onDrag","onMove","onDragStart","onMoveStart","onDragEnd"].forEach((function(w){"function"==typeof s[w]?(O[w]=s[w],e[w]=O[w].bind(e.ins)):s.hasOwnProperty(w)&&null==s[w]&&(O[w]=e[w]=void 0)}))}var Gr=function(){function PlainDraggable(e,s){!function _classCallCheck$1(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainDraggable);var w={ins:this,options:{zIndex:9e3},disabled:!1};if(Object.defineProperty(this,"_id",{value:++Mr}),w._id=this._id,Br[this._id]=w,!isElement$1(e)||e===ur)throw new Error("This element is not accepted.");if(s){if(!Tr(s))throw new Error("Invalid options.")}else s={};var C,O,D=!0;if(e instanceof SVGElement&&(C=e.ownerSVGElement)){if(!e.getBBox)throw new Error("This element is not accepted. (SVGLocatable)");if(!e.transform)throw new Error("This element is not accepted. (SVGAnimatedTransformList)");w.svgTransform=e.transform.baseVal.appendItem(C.createSVGTransform()),w.svgPoint=C.createSVGPoint();var T=e.nearestViewportElement;w.svgCtmElement=Cr?T.appendChild(document.createElementNS(C.namespaceURI,"rect")):T,D=!1,w.initElm=initSvg,w.moveElm=moveSvg}else{var A=Eo.getName("willChange");A&&(D=!1),!s.leftTop&&gr?(A&&(e.style[A]="transform"),w.initElm=initTranslate,w.moveElm=moveTranslate):(A&&(e.style[A]="left, top"),w.initElm=initLeftTop,w.moveElm=moveLeftTop)}(w.element=function initAnim(e,s){var w=e.style;w.webkitTapHighlightColor="transparent";var C=Eo.getName("boxShadow"),O=window.getComputedStyle(e,"")[C];return O&&"none"!==O||(w[C]="0 0 1px transparent"),s&&gr&&(w[gr]="translateZ(0)"),e}(e,D),w.elementStyle=e.style,w.orgZIndex=w.elementStyle.zIndex,$r&&mClassList(e).add($r),w.pointerEventHandlerId=Pr.regStartHandler((function(e){return function dragStart(e,s){return!(e.disabled||e.onDragStart&&!1===e.onDragStart(s)||(lr&&dragEnd(lr),setDraggingCursor(e.options.handle),ur.style.cursor=pr||window.getComputedStyle(e.options.handle,"").cursor,!1!==e.options.zIndex&&(e.elementStyle.zIndex=e.options.zIndex),yr&&(ur.style[yr]="none"),Nr&&mClassList(e.element).add(Nr),lr=e,cr=!1,Lr.left=e.elementBBox.left-(s.clientX+window.pageXOffset),Lr.top=e.elementBBox.top-(s.clientY+window.pageYOffset),0))}(w,e)})),s.containment)||(s.containment=(O=e.parentNode)&&isElement$1(O)?O:ur);s.handle||(s.handle=e),_setOptions$1(w,s)}return function _createClass$1(e,s,w){return s&&_defineProperties$1(e.prototype,s),w&&_defineProperties$1(e,w),e}(PlainDraggable,[{key:"remove",value:function remove(){var e=Br[this._id];this.disabled=!0,Pr.unregStartHandler(Pr.removeStartHandler(e.options.handle,e.pointerEventHandlerId)),delete Br[this._id]}},{key:"setOptions",value:function setOptions(e){return Tr(e)&&_setOptions$1(Br[this._id],e),this}},{key:"position",value:function position(){return initBBox(Br[this._id]),this}},{key:"disabled",get:function get(){return Br[this._id].disabled},set:function set(e){var s=Br[this._id];(e=!!e)!==s.disabled&&(s.disabled=e,s.disabled?(s===lr&&dragEnd(s),s.options.handle.style.cursor=s.orgCursor,yr&&(s.options.handle.style[yr]=s.orgUserSelect),$r&&mClassList(s.element).remove($r)):(setDraggableCursor(s.options.handle,s.orgCursor),yr&&(s.options.handle.style[yr]="none"),$r&&mClassList(s.element).add($r)))}},{key:"element",get:function get(){return Br[this._id].element}},{key:"rect",get:function get(){return copyTree(Br[this._id].elementBBox)}},{key:"left",get:function get(){return Br[this._id].elementBBox.left},set:function set(e){_setOptions$1(Br[this._id],{left:e})}},{key:"top",get:function get(){return Br[this._id].elementBBox.top},set:function set(e){_setOptions$1(Br[this._id],{top:e})}},{key:"containment",get:function get(){var e=Br[this._id];return e.containmentIsBBox?ppBBox2OptionObject(e.options.containment):e.options.containment},set:function set(e){_setOptions$1(Br[this._id],{containment:e})}},{key:"snap",get:function get(){return copyTree(Br[this._id].options.snap)},set:function set(e){_setOptions$1(Br[this._id],{snap:e})}},{key:"autoScroll",get:function get(){return copyTree(Br[this._id].options.autoScroll)},set:function set(e){_setOptions$1(Br[this._id],{autoScroll:e})}},{key:"handle",get:function get(){return Br[this._id].options.handle},set:function set(e){_setOptions$1(Br[this._id],{handle:e})}},{key:"zIndex",get:function get(){return Br[this._id].options.zIndex},set:function set(e){_setOptions$1(Br[this._id],{zIndex:e})}},{key:"onDrag",get:function get(){return Br[this._id].options.onDrag},set:function set(e){_setOptions$1(Br[this._id],{onDrag:e})}},{key:"onMove",get:function get(){return Br[this._id].options.onMove},set:function set(e){_setOptions$1(Br[this._id],{onMove:e})}},{key:"onDragStart",get:function get(){return Br[this._id].options.onDragStart},set:function set(e){_setOptions$1(Br[this._id],{onDragStart:e})}},{key:"onMoveStart",get:function get(){return Br[this._id].options.onMoveStart},set:function set(e){_setOptions$1(Br[this._id],{onMoveStart:e})}},{key:"onDragEnd",get:function get(){return Br[this._id].options.onDragEnd},set:function set(e){_setOptions$1(Br[this._id],{onDragEnd:e})}}],[{key:"draggableCursor",get:function get(){return Ir},set:function set(e){Ir!==e&&(Ir=e,dr=null,Object.keys(Br).forEach((function(e){var s=Br[e];s.disabled||s===lr&&!1!==pr||(setDraggableCursor(s.options.handle,s.orgCursor),s===lr&&(ur.style.cursor=fr,ur.style.cursor=window.getComputedStyle(s.options.handle,"").cursor))})))}},{key:"draggingCursor",get:function get(){return Fr},set:function set(e){Fr!==e&&(Fr=e,pr=null,lr&&(setDraggingCursor(lr.options.handle),!1===pr&&(setDraggableCursor(lr.options.handle,lr.orgCursor),ur.style.cursor=fr),ur.style.cursor=pr||window.getComputedStyle(lr.options.handle,"").cursor))}},{key:"draggableClass",get:function get(){return $r},set:function set(e){(e=e?e+"":void 0)!==$r&&(Object.keys(Br).forEach((function(s){var w=Br[s];if(!w.disabled){var C=mClassList(w.element);$r&&C.remove($r),e&&C.add(e)}})),$r=e)}},{key:"draggingClass",get:function get(){return Nr},set:function set(e){if((e=e?e+"":void 0)!==Nr){if(lr){var s=mClassList(lr.element);Nr&&s.remove(Nr),e&&s.add(e)}Nr=e}}},{key:"movingClass",get:function get(){return Vr},set:function set(e){if((e=e?e+"":void 0)!==Vr){if(lr&&cr){var s=mClassList(lr.element);Vr&&s.remove(Vr),e&&s.add(e)}Vr=e}}}]),PlainDraggable}();Pr.addMoveHandler(document,(function(e){if(lr){var s={left:e.clientX+window.pageXOffset+Lr.left,top:e.clientY+window.pageYOffset+Lr.top};if(move(lr,s,lr.snapTargets?function(e){var s,w=lr.snapTargets.length,C=!1,O=!1;for(s=0;s<w&&(!C||!O);s++){var D=lr.snapTargets[s];(null==D.gravityXStart||e.left>=D.gravityXStart)&&(null==D.gravityXEnd||e.left<=D.gravityXEnd)&&(null==D.gravityYStart||e.top>=D.gravityYStart)&&(null==D.gravityYEnd||e.top<=D.gravityYEnd)&&(C||null==D.x||(e.left=D.x,C=!0,s=-1),O||null==D.y||(e.top=D.y,O=!0,s=-1))}return e.snapped=C||O,!lr.onDrag||lr.onDrag(e)}:lr.onDrag)){var w={},C=lr.autoScroll;if(C){var O={x:lr.elementBBox.left-window.pageXOffset,y:lr.elementBBox.top-window.pageYOffset};["x","y"].forEach((function(e){if(C[e]){var s=C[e].min,D=C[e].max;C[e].lines.some((function(C){return(-1===C.dir?O[e]<=C.position:O[e]>=C.position)&&(w[e]={dir:C.dir,speed:C.speed/1e3,min:s,max:D},!0)}))}}))}w.x||w.y?(Rr.move(C.target,w,C.isWindow?scrollXYWindow:scrollXYElement),s.autoScroll=!0):Rr.stop(),cr||(cr=!0,Vr&&mClassList(lr.element).add(Vr),lr.onMoveStart&&lr.onMoveStart(s)),lr.onMove&&lr.onMove(s)}}}));{function endHandler(){lr&&dragEnd(lr)}Pr.addEndHandler(document,endHandler),Pr.addCancelHandler(document,endHandler)}{function initDoc(){mr=Eo.getName("transitionProperty"),gr=Eo.getName("transform"),fr=ur.style.cursor,(yr=Eo.getName("userSelect"))&&(vr=ur.style[yr]);var e,s={};function checkInitBBox(e,s){e.initElm&&initBBox(e,s)}var w=!1,C=To((function(C){w||(w=!0,lr&&(checkInitBBox(lr,C.type),Pr.move(),s[lr._id]=!0),clearTimeout(e),e=setTimeout((function(){!function initAll(w){clearTimeout(e),Object.keys(Br).forEach((function(e){s[e]||checkInitBBox(Br[e],w)})),s={}}(C.type)}),200),w=!1)}));window.addEventListener("resize",C,!0),window.addEventListener("scroll",C,!0)}(ur=document.body)?initDoc():document.addEventListener("DOMContentLoaded",(function(){ur=document.body,initDoc()}),!0)}function _defineProperties(e,s){for(var w=0;w<s.length;w++){var C=s[w];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(e,C.key,C)}}mClassList.ignoreNative=!0;var Ur,Zr="plainmodal",Kr="".concat(Zr,"-style"),Jr=Zr,Qr="".concat(Zr,"-content"),ei="".concat(Zr,"-overlay"),ti="".concat(ei,"-hide"),ni="".concat(ei,"-force"),oi="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style&&!window.navigator.msPointerEnabled,ri=!oi&&!!document.uniqueID,ii=function(){var e={}.toString,s={}.hasOwnProperty.toString,w=s.call(Object);return function(C){var O,D;return C&&"[object Object]"===e.call(C)&&(!(O=Object.getPrototypeOf(C))||(D=O.hasOwnProperty("constructor")&&O.constructor)&&"function"==typeof D&&s.call(D)===w)}}(),ai={},si=[],li=!0,ci=!0,ui=0;function isElement(e){return!(!e||e.nodeType!==Node.ELEMENT_NODE||"function"!=typeof e.getBoundingClientRect||e.compareDocumentPosition(document)&Node.DOCUMENT_POSITION_DISCONNECTED)}function switchDraggable(e){if(e.plainDraggable){var s=!(e.options.dragHandle&&2===e.state);e.plainDraggable.disabled=s,s||e.plainDraggable.position()}}function finishOpenEffect(e,s){1===e.state&&(e.effectFinished[s]=!0,!e.effectFinished.plainOverlay||e.options.openEffect&&!e.effectFinished.option||function finishOpening(e){Ur=null,e.state=2,switchDraggable(e),e.parentProps&&(e.parentProps.state=5),e.options.onOpen&&e.options.onOpen.call(e.ins)}(e))}function finishCloseEffect(e,s){3===e.state&&(e.effectFinished[s]=!0,!e.effectFinished.plainOverlay||e.options.closeEffect&&!e.effectFinished.option||function finishClosing(e){si.pop(),Ur=null,e.state=0,e.parentProps&&(e.parentProps.state=2,switchDraggable(e.parentProps),e.parentProps=null),e.options.onClose&&e.options.onClose.call(e.ins)}(e))}function execOpening(e,s){if(e.parentProps){var w=e.parentProps,C=w.elmOverlay;2===w.state&&(C.style[Eo.getName("transitionDuration")]=200===e.options.duration?"":"".concat(e.options.duration,"ms"));var O=mClassList(C);O.toggle(ni,!!s),O.add(ti),w.state=4,w.plainOverlay.blockingDisabled=!0,switchDraggable(w)}e.state=1,e.plainOverlay.blockingDisabled=!1,e.effectFinished.plainOverlay=e.effectFinished.option=!1,e.plainOverlay.show(s),e.options.openEffect&&(s?(e.options.openEffect.call(e.ins),finishOpenEffect(e,"option")):e.options.openEffect.call(e.ins,e.openEffectDone))}function execClosing(e,s,w){if(e.parentProps){var C=e.parentProps,O=C.elmOverlay;5===C.state&&(O.style[Eo.getName("transitionDuration")]=200===e.options.duration?"":"".concat(e.options.duration,"ms"));var D=mClassList(O);D.toggle(ni,!!s),D.remove(ti),C.state=6,C.plainOverlay.blockingDisabled=!1}e.state=3,switchDraggable(e),e.effectFinished.plainOverlay=e.effectFinished.option=!1,e.plainOverlay.hide(s,w),e.options.closeEffect&&(s?(e.options.closeEffect.call(e.ins),finishCloseEffect(e,"option")):e.options.closeEffect.call(e.ins,e.closeEffectDone))}function fixOpenClose(e){1===e.state?execOpening(e,!0):3===e.state&&execClosing(e,!0,!0)}function _close(e,s){if(0===e.state||3===e.state&&!s||3!==e.state&&e.options.onBeforeClose&&!1===e.options.onBeforeClose.call(e.ins))return!1;if(Ur&&Ur!==e&&(fixOpenClose(Ur),Ur=null),5===e.state)for(var w;(w=si[si.length-1])!==e;)execClosing(w,!0,!0);return 2===e.state&&(Ur=e),execClosing(e,s),!0}function _setOptions(e,s){var w=e.options,C=e.plainOverlay;s.hasOwnProperty("closeButton")&&!1!==(s.closeButton=isElement(s.closeButton)?s.closeButton:null==s.closeButton&&void 0)&&s.closeButton!==w.closeButton&&(w.closeButton&&w.closeButton.removeEventListener("click",e.handleClose,!1),w.closeButton=s.closeButton,w.closeButton&&w.closeButton.addEventListener("click",e.handleClose,!1)),C.duration=s.duration,w.duration=C.duration,C.blur=s.overlayBlur,w.overlayBlur=C.blur,s.hasOwnProperty("dragHandle")&&!1!==(s.dragHandle=isElement(s.dragHandle)?s.dragHandle:null==s.dragHandle&&void 0)&&s.dragHandle!==w.dragHandle&&(w.dragHandle=s.dragHandle,w.dragHandle&&(e.plainDraggable||(e.plainDraggable=new Gr(e.elmContent)),e.plainDraggable.handle=w.dragHandle),switchDraggable(e)),["openEffect","closeEffect","onOpen","onClose","onBeforeOpen","onBeforeClose"].forEach((function(e){"function"==typeof s[e]?w[e]=s[e]:s.hasOwnProperty(e)&&null==s[e]&&(w[e]=void 0)}))}var di=function(){function PlainModal(e,s){!function _classCallCheck(e,s){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this,PlainModal);var w={ins:this,options:{closeButton:void 0,duration:200,dragHandle:void 0,overlayBlur:!1},state:0,effectFinished:{plainOverlay:!1,option:!1}};if(Object.defineProperty(this,"_id",{value:++ui}),w._id=this._id,ai[this._id]=w,!e.nodeType||e.nodeType!==Node.ELEMENT_NODE||e.ownerDocument.defaultView!==window)throw new Error("This `content` is not accepted.");if(w.elmContent=e,s){if(!ii(s))throw new Error("Invalid options.")}else s={};if(!document.getElementById(Kr)){var C=document.getElementsByTagName("head")[0]||document.documentElement,O=C.insertBefore(document.createElement("style"),C.firstChild);O.type="text/css",O.id=Kr,O.textContent=".plainmodal .plainmodal-overlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainmodal.plainoverlay{background-color:transparent;cursor:auto}.plainmodal .plainmodal-content{z-index:9000}.plainmodal .plainmodal-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(136,136,136,.6);transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:1}.plainmodal .plainmodal-overlay.plainmodal-overlay-hide{opacity:0}.plainmodal .plainmodal-overlay.plainmodal-overlay-force{transition-property:none}",(ri||oi)&&function forceReflow(e){setTimeout((function(){var s=e.parentNode,w=e.nextSibling;s.insertBefore(s.removeChild(e),w)}),0)}(O),window.addEventListener("keydown",(function(e){var s,w;li&&("escape"===(s=e.key.toLowerCase())||"esc"===s)&&(w=si.length&&si[si.length-1])&&_close(w)&&(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation())}),!0)}mClassList(e).add(Qr),w.plainOverlay=new or({face:e,onShow:function onShow(){finishOpenEffect(w,"plainOverlay")},onHide:function onHide(){finishCloseEffect(w,"plainOverlay")}}),"none"===window.getComputedStyle(e,"").display&&(e.style.display="block");var D=e.parentNode;mClassList(D.parentNode).add(Jr);var T=w.elmOverlay=D.appendChild(document.createElement("div"));T.className=ei,T.addEventListener("click",(function(e){e.target===T&&ci&&_close(w)}),!0),w.handleClose=function(){_close(w)},w.openEffectDone=function(){finishOpenEffect(w,"option")},w.closeEffectDone=function(){finishCloseEffect(w,"option")},w.effectDone=function(){1===w.state?finishOpenEffect(w,"option"):3===w.state&&finishCloseEffect(w,"option")},_setOptions(w,s)}return function _createClass(e,s,w){return s&&_defineProperties(e.prototype,s),w&&_defineProperties(e,w),e}(PlainModal,[{key:"setOptions",value:function setOptions(e){return ii(e)&&_setOptions(ai[this._id],e),this}},{key:"open",value:function open(e,s){return arguments.length<2&&"boolean"!=typeof e&&(s=e,e=!1),this.setOptions(s),function _open(e,s){return!(0!==e.state&&3!==e.state&&1!==e.state||1===e.state&&!s||1!==e.state&&e.options.onBeforeOpen&&!1===e.options.onBeforeOpen.call(e.ins)||(0===e.state&&(Ur&&fixOpenClose(Ur),Ur=e,si.length&&(e.parentProps=si[si.length-1]),si.push(e),mClassList(e.elmOverlay).add(ni).remove(ti)),execOpening(e,s),0))}(ai[this._id],e),this}},{key:"close",value:function close(e){return _close(ai[this._id],e),this}},{key:"state",get:function get(){return ai[this._id].state}},{key:"closeButton",get:function get(){return ai[this._id].options.closeButton},set:function set(e){_setOptions(ai[this._id],{closeButton:e})}},{key:"duration",get:function get(){return ai[this._id].options.duration},set:function set(e){_setOptions(ai[this._id],{duration:e})}},{key:"overlayBlur",get:function get(){return ai[this._id].options.overlayBlur},set:function set(e){_setOptions(ai[this._id],{overlayBlur:e})}},{key:"dragHandle",get:function get(){return ai[this._id].options.dragHandle},set:function set(e){_setOptions(ai[this._id],{dragHandle:e})}},{key:"openEffect",get:function get(){return ai[this._id].options.openEffect},set:function set(e){_setOptions(ai[this._id],{openEffect:e})}},{key:"closeEffect",get:function get(){return ai[this._id].options.closeEffect},set:function set(e){_setOptions(ai[this._id],{closeEffect:e})}},{key:"effectDone",get:function get(){return ai[this._id].effectDone}},{key:"onOpen",get:function get(){return ai[this._id].options.onOpen},set:function set(e){_setOptions(ai[this._id],{onOpen:e})}},{key:"onClose",get:function get(){return ai[this._id].options.onClose},set:function set(e){_setOptions(ai[this._id],{onClose:e})}},{key:"onBeforeOpen",get:function get(){return ai[this._id].options.onBeforeOpen},set:function set(e){_setOptions(ai[this._id],{onBeforeOpen:e})}},{key:"onBeforeClose",get:function get(){return ai[this._id].options.onBeforeClose},set:function set(e){_setOptions(ai[this._id],{onBeforeClose:e})}}],[{key:"closeByEscKey",get:function get(){return li},set:function set(e){"boolean"==typeof e&&(li=e)}},{key:"closeByOverlay",get:function get(){return ci},set:function set(e){"boolean"==typeof e&&(ci=e)}},{key:"STATE_CLOSED",get:function get(){return 0}},{key:"STATE_OPENING",get:function get(){return 1}},{key:"STATE_OPENED",get:function get(){return 2}},{key:"STATE_CLOSING",get:function get(){return 3}},{key:"STATE_INACTIVATING",get:function get(){return 4}},{key:"STATE_INACTIVATED",get:function get(){return 5}},{key:"STATE_ACTIVATING",get:function get(){return 6}}]),PlainModal}();const pi=[new Layout({name:"normal"}),new class SideBySide extends Layout{name="side-by-side";enterHandler=({container:e,htmlHolder:s,showcase:w})=>{const C=document.createElement("div");C.className="bar",C.innerHTML='<div class="bar-handle"></div>';const O=C.querySelector(".bar-handle");e.appendChild(C);const D=new uo(C,{handle:O,containment:{left:"25%",top:0,right:"75%",height:0}});D.draggableCursor="grab",D.onDrag=C=>{var D;O.style.transform="unset",D=C.left,s.style.width=D+"px",w.style.width=parseFloat(window.getComputedStyle(e).width)-D+"px"},D.onDragEnd=e=>{O.style.cssText=""},onRemove(C,(()=>D.remove()))};leaveHandler=({container:e})=>{e.querySelector(".bar")?.remove()}}({name:"side-by-side"}),new class Overlay extends Layout{name="overlay";saveLeftTopAsData=e=>{const{left:s,top:w}=e.getBoundingClientRect();e.dataset.left=s,e.dataset.top=w};addDraggable=e=>{const s=Array.from(e.parentElement?.querySelectorAll(":scope > *")??[]);let w=null;e.onmouseover=()=>{w=setTimeout((()=>{s.forEach((e=>e.style.removeProperty("z-index"))),e.style.zIndex="9001"}),200)},e.onmouseout=()=>{clearTimeout(w)};const C=document.createElement("div");e.appendChild(C),C.className="draggable-part",C.innerHTML='<div class="handle">☰</div>';const{left:O,top:D}=e.getBoundingClientRect(),T=new uo(e,{top:D,left:O,handle:C,snap:{x:{step:20},y:{step:20}}}),A=e.querySelector(".utils");T.onDragStart=()=>{A.style.display="none",e.classList.add("drag")},T.onDragEnd=()=>{A.style="",e.classList.remove("drag"),e.style.zIndex="9000"},new window.ResizeObserver((()=>{try{T.position()}catch(e){console.warn(e)}})).observe(e),onRemove(e,(()=>{T.remove()}))};enterHandler=({htmlHolder:e,blocks:s})=>{s.forEach(this.saveLeftTopAsData);let[w,C]=[20,20];s.forEach((s=>{const O=Number(s.dataset.left),D=Number(s.dataset.top),T=document.createElement("div");T.classList.add("draggable-block"),T.innerHTML='\n        <div class="utils">\n          <div id="close">❌</div>\n          <div id="plus-font-size" ">➕</div>\n          <div id="minus-font-size">➖</div>\n        </div>\n      ',T.title="Middle-click to hide block",T.onmouseup=e=>{1===e.button&&s.classList.remove("focus")},T.appendChild(s),T.style.left=w+"px",T.style.top=C+"px",e.appendChild(T);const{width:A}=T.getBoundingClientRect();w+=A+30,w>window.innerWidth&&(C+=200,w%=window.innerWidth),animateRectTransition(T,{left:O,top:D},{resume:!0,duration:300}).finished.finally((()=>this.addDraggable(T)));const B=T.querySelector(".utils");B.onmouseover=()=>{const{left:e,top:s}=B.getBoundingClientRect();B.style.cssText=`visibility: visible; z-index: 9000; position: fixed; transition: unset; left: ${e}px; top: ${s}px;`,document.body.appendChild(B)},B.onmouseout=()=>{T.appendChild(B),B.style.cssText=""},T.querySelector("#close").onclick=()=>{s.classList.remove("focus"),B.style.cssText=""},T.querySelector("#plus-font-size").onclick=()=>{const e=parseFloat(window.getComputedStyle(s).fontSize)/16;s.style.fontSize=`${e+.2}rem`},T.querySelector("#minus-font-size").onclick=()=>{const e=parseFloat(window.getComputedStyle(s).fontSize)/16;s.style.fontSize=e-.2+"rem"}}))};leaveHandler=({htmlHolder:e,blocks:s})=>{s.forEach((s=>{const w=s.closest(".draggable-block");w&&(e.appendChild(s),w.remove())}))}}({name:"overlay"})],hi={},generateMaps=(C,{layouts:O=[],delay:D,renderCallback:T}={})=>{C.classList.add("Dumby"),delete C.dataset.layout,C.dataset.layout=pi[0].name;const A=C.querySelector(".SemanticHtml")??C,B=Array.from(A.querySelectorAll(".dumby-block")),L=document.createElement("div");C.appendChild(L),L.classList.add("Showcase");const P=document.createElement("div");C.appendChild(P);const M=new di(P),I={layouts:[...pi,...O.map((e=>"object"==typeof e?e:{name:e}))],container:C,htmlHolder:A,showcase:L,blocks:B,modal:M,modalContent:P,utils:{...ho,renderedMaps:()=>Array.from(C.querySelectorAll(".mapclay[data-render=fulfilled]")).sort(((e,s)=>e.style.order>s.style.order)),setContextMenu:e=>{const s=C.oncontextmenu;C.oncontextmenu=w=>{const C=s(w);e(w,C),C.style.transform="",shiftByWindow(C)}},focusNextMap:throttle(focusNextMap,focusDelay),switchToNextLayout:throttle(switchToNextLayout,300)}};Object.entries(I.utils).forEach((([e,s])=>{I.utils[e]=s.bind(I)})),C.querySelectorAll('a[href^="#"][title^="=>"]').forEach(createDocLink),C.querySelectorAll('a[href^="geo:"]').forEach(createGeoLink);const F=new window.MutationObserver((e=>{const s=e.at(-1).oldValue,w=C.dataset.layout;s&&I.layouts.find((e=>e.name===s))?.leaveHandler?.call(window,I),Object.values(I).flat().filter((e=>e instanceof window.HTMLElement)).forEach((e=>{e.style.cssText=""})),w&&I.layouts.find((e=>e.name===w))?.enterHandler?.call(window,I);const O=C.querySelector(".mapclay.focus")??C.querySelector(".mapclay");O?.classList?.add("focus")}));F.observe(C,{attributes:!0,attributeFilter:["data-layout"],attributeOldValue:!0,characterDataOldValue:!0}),onRemove(A,(()=>F.disconnect()));const afterMapRendered=e=>{const s=e.target;if(s.renderer=e,s.tabindex=-1,"fulfilled"!==s.dataset.render)return;hi[s.id]??=e,T?.(e);const w=new window.MutationObserver((e=>{const s=e.at(-1).target,w=s.classList.contains("focus"),C=w&&L.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0});if(w&&I.utils.renderedMaps().filter((e=>e.id!==s.id)).forEach((e=>e.classList.remove("focus"))),C){if(L.contains(s))return;const e=s.cloneNode(!0);delete e.id,e.className="";const w=s.parentElement;w.replaceChild(e,s),onRemove(e,(()=>{w.appendChild(s)})),e.getBoundingClientRect(),e.dataset.placeholder=s.id,s.style.cssText="",s.style.order=e.style.order,L.appendChild(s),animateRectTransition(s,e.getBoundingClientRect(),{duration:300,resume:!0})}else if(L.contains(s)){const e=A.querySelector(`[data-placeholder="${s.id}"]`);if(!e)throw Error(`Cannot find placeholder for map "${s.id}"`);const afterAnimation=()=>{s.style=e.style.cssText,e.remove()};animateRectTransition(s,e.getBoundingClientRect(),{duration:300}).finished.finally(afterAnimation)}}));w.observe(s,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0}),onRemove(I.htmlHolder,(()=>{w.disconnect()}))},$=[],assignMapId=e=>{let s=e.id?.replaceAll(" ","_");if(!s){s=e.use?.split("/")?.at(-1);let w=1;for(;!s||$.includes(s);)s=`${e.use??"unnamed"}-${w}`,w++}return e.id=s,$.push(s),e},N=Array.from(C.querySelectorAll("pre:has(.language-map)")??[]),updateAttributeByStep=({results:e,target:s,steps:w})=>{let C=e.filter((e=>"render"===e.type&&e.state.match(/success|skip/))).length;const O=w.length;C+=`/${O}`;const D=e.filter((e=>"render"===e.type)).length===O;s.animations||(s.animations=Promise.resolve()),s.animations=s.animations.then((async()=>{await new Promise((e=>setTimeout(e,100))),D&&(C+=" "),s.dataset.report=C,D&&setTimeout((()=>delete s.dataset.report),100)}))},V=e((e=>({use:e.use??"Leaflet",width:"100%",...e,aliases:{...w,...e.aliases??{}},stepCallback:updateAttributeByStep})));let R=0;N.forEach((e=>{const w=e.querySelector(".language-map").textContent.replace(/\u00A0/g," ");let C=[];try{C=s(w).map(assignMapId)}catch(s){return void console.warn("Fail to parse yaml config for element",e)}C.forEach((s=>{const w=hi[s.id];w&&(e.appendChild(w.target),s.target=w.target)})),e.querySelector(".mapclay")&&e.querySelectorAll(":scope > :not([data-render=fulfilled])").forEach((e=>e.remove()));const O=setTimeout((()=>{V(e,C).forEach((e=>{e.then(afterMapRendered)})),Array.from(e.children).forEach((e=>{e.style.order=R,R++,"fulfilled"===e.dataset.render&&afterMapRendered(e.renderer)}))}),D??1e3);onRemove(A,(()=>{clearTimeout(O)}))}));const H=document.createElement("div");H.className="menu",H.style.display="none",H.onclick=e=>{e.target.closest(".keep-menu")||e.target.classList.contains(".keep-menu")||(H.style.display="none")},C.appendChild(H),C.oncontextmenu=e=>{H.replaceChildren(),H.style.display="block",H.style.cssText=`left: ${e.x-H.offsetParent.offsetLeft+10}px; top: ${e.y-H.offsetParent.offsetTop+5}px;`,e.preventDefault();const s=e.target.closest(".mapclay");if(s?.renderer?.results){const w=s.getBoundingClientRect(),[C,O]=[e.x-w.left,e.y-w.top];H.appendChild((e=>new Item({text:"Toggle Focus",onclick:()=>e.classList.toggle("focus")}))(s)),H.appendChild(renderResults(I,s)),H.appendChild(((e,s)=>new Item({text:"Get Coordinates",onclick:()=>{const[w,C]=e.renderer.unproject(s),O=`[${w.toFixed(7)}, ${C.toFixed(7)}]`;navigator.clipboard.writeText(O),window.alert(`${O} copied to clipboard`)}}))(s,[C,O])),H.appendChild((e=>new Item({text:"Restore Camera",onclick:()=>e.renderer.restoreCamera()}))(s))}else{const s=e.target.closest(".dumby-block");s&&H.appendChild((e=>new Item({text:"Toggle Focus",onclick:()=>e.classList.toggle("focus")}))(s))}return s&&!s.closest(".Showcase")||(I.utils.renderedMaps().length>0&&H.appendChild((({utils:e})=>new Folder({innerHTML:'<span>Maps<span><span class="info">(Tab)</span>',items:e.renderedMaps().map((e=>new Item({text:e.id,onclick:()=>{e.classList.add("focus"),e.scrollIntoView({behavior:"smooth"})}})))}))(I)),H.appendChild((({blocks:e,utils:s})=>new Folder({innerHTML:'<span>Blocks<span><span class="info">(n/p)</span>',items:e.map(((e,w)=>{const C=e.classList.contains("focus"),O=e.querySelector("p")?.textContent.substring(0,15)?.concat(" ","...  ")??"";return new Item({className:["keep-menu",C?"checked":"unchecked"],innerHTML:`<strong>(${w})</strong><span style='display: inline-block; margin-inline: 1.2em;'>${O}</span>`,onclick:w=>{e.classList.toggle("focus");const C=e.classList.contains("focus");C&&s.scrollToBlock(e);const O=w.target.closest(".menu-item.keep-menu");O.classList.add(C?"checked":"unchecked"),O.classList.remove(C?"unchecked":"checked");const D=w.target.closest(".sub-menu");D.onmouseleave=()=>{D.closest(".menu").style.display="none"}}})}))}))(I)),H.appendChild((({container:e,layouts:s})=>new Folder({innerHTML:'<span>Layouts<span><span class="info">(x)</span>',items:[...s.map((s=>new Item({text:s.name,onclick:()=>e.setAttribute("data-layout",s.name)}))),new Item({innerHTML:'<a href="https://github.com/outdoorsafetylab/dumbymap#layouts" class="external" style="display: block; padding: 0.5rem;">More...</a>',style:"padding: 0;"})]}))(I))),shiftByWindow(H),H};const actionOutsideMenu=e=>{if("none"===H.style.display)return;if(e.target.closest(".keep-menu")||e.target.classList.contains(".keep-menu"))return;const s=H.getBoundingClientRect();(e.clientX<s.left||e.clientX>s.left+s.width||e.clientY<s.top||e.clientY>s.top+s.height)&&(H.style.display="none")};return document.addEventListener("click",actionOutsideMenu),onRemove(A,(()=>document.removeEventListener("click",actionOutsideMenu))),Object.seal(I)},fi=new URL(window.location),mi=document.querySelector("[data-mode]"),gi=document.querySelector(".DumbyMap");gi.dataset.scrollLine="";const yi=document.querySelector(".editor textarea");let vi;const _i=/\[([^\x5B\x5D]+)\]:\s+(\S+)(\s["'](\S+)["'])?/;let bi=[];const validateAnchorName=e=>!bi.find((s=>s.ref===e)),appendRefLink=(e,s)=>{const{ref:w,link:C,title:O}=s;let D=`\n[${w}]: ${C} "${O??""}"`;e.getLine(e.lastLine()).match(_i)||(D="\n"+D),e.replaceRange(D,{line:1/0}),bi.push(s)};new window.MutationObserver((()=>{const e=mi.dataset.mode,s=gi.dataset.layout;"editing"===e&&"normal"!==s&&(gi.dataset.layout="normal")})).observe(mi,{attributes:!0,attributeFilter:["data-mode"],attributeOldValue:!0});const ki='<br>\n\n> <big>Hello My Friend! This is DumbyMap!</big>\n\n<br>\n\n```map\nuse: Leaflet\nheight: 120px\nXYZ: https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png\n```\n\n\nDumbyMap generates **interactive document with maps** from raw texts.\n\nYou can use it to:\n\n1. [Roll a Dice] for a new map\n2. Hover on [GeoLink][example-geolink] to show point in maps.\n3. Add GeoLink by dragging **selected text**\n4. Change contents by [Editor] with [Markdown] text\n5. **Right click** to call context menu, you can:\n    + Change focus between maps\n    + Select a block for browsing\n    + Switch layouts for various use cases\n\n\nIf you want know more, take a look at subjects below:\n1. [How to write Markdown text?](https://www.markdownguide.org/basic-syntax/)\n1. <details>\n      <summary>How can I save contents for next use?</summary>\n\n      Since All contents come from raw texts, you can:\n      1. Save current page as bookmark by [hash button](#create-hash "=>.mde-hash")\n      2. Copy texts in editor and save as `.txt` file\n      3. Use online service for hosting Markdown, for example: [HackMD](https://hackmd.io)\n\n   </details>\n1. <details>\n      <summary>I want more features in map!</summary>\n\n      DumbyMap use [mapclay](https://github.com/outdoorsafetylab/mapclay) to render maps.\n      1. You can use `eval` options to add custom scripts, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#run-scripts-after-map-is-created) for more details\n      2. You can use custom Renderer indtead of default ones, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#renderer) for more details\n\n   </details>\n1. [I am an experienced developer, show me what you got!](https://github.com/outdoorsafetylab/dumbymap)\n\n\n<br>\n\n> <big>Have Fun ~<big>\n\n <br>\n\n[Roll a dice]: #Click%20it! "=>.mde-roll"\n[example-geolink]: geo:24,121?xy=121,24&text=Use%20yellow%20link%20point%20to%20map\n[Markdown]: https://www.markdownguide.org/basic-syntax/\n[Editor]: #This%20is%20editor! "=>.editor"',Ei=new EasyMDE({element:yi,initialValue:ki,autosave:{enabled:!0,uniqueId:"dumbymap"},indentWithTabs:!1,lineNumbers:!0,promptURLs:!0,uploadImage:!0,spellChecker:!1,toolbarButtonClassPrefix:"mde",status:!1,shortcuts:{map:"Ctrl-Alt-M",debug:"Ctrl-Alt-D",toggleUnorderedList:null,toggleOrderedList:null},toolbar:[{name:"roll",title:"Roll a Dice",text:"⚄",action:()=>addMapRandomlyByPreset()},{name:"export",title:"Export current page",text:"💾",action:()=>{}},{name:"hash",title:"Save content as URL",text:"#",action:()=>{const e={content:Ei.value()};window.location.hash=encodeURIComponent(JSON.stringify(e)),window.location.search="",navigator.clipboard.writeText(window.location.href),window.alert("URL updated in address bar, you can save current page as bookmark")}},"|",{name:"undo",title:"Undo last editing",text:"⟲",action:EasyMDE.undo},{name:"redo",text:"⟳",title:"Redo editing",action:EasyMDE.redo},"|",{name:"heading-1",text:"H1",title:"Big Heading",action:EasyMDE["heading-1"]},{name:"heading-2",text:"H2",title:"Medium Heading",action:EasyMDE["heading-2"]},"|",{name:"link",text:"🔗",title:"Create Link",action:EasyMDE.drawLink},{name:"image",text:"🖼",title:"Create Image",action:EasyMDE.drawImage},"|",{name:"Bold",text:"𝐁",title:"Bold",action:EasyMDE.toggleBold},{name:"Italic",text:"𝐼",title:"Italic",action:EasyMDE.toggleItalic},"|",{name:"tutorial",text:"❓",title:"Reset for content for tutorial",action:()=>{Ei.value(ki),bi=getRefLinks(),updateDumbyMap()}}]}),xi=Ei.codemirror,getRefLinks=()=>Ei.value().split("\n").map((e=>{const[,s,w,,C]=e.match(_i)??[];return{ref:s,link:w,title:C}})).filter((({ref:e,link:s})=>e&&s));bi=getRefLinks();const getContentFromHash=e=>{const s=(e=>{const s=e.substring(1),w=decodeURIComponent(s);try{return JSON.parse(w)??{}}catch(e){return{}}})(e);return s.content},Si=getContentFromHash(window.location.hash);window.location.hash="","tutorial"===fi.searchParams.get("content")?Ei.value(ki):Si&&(Ei.cleanup(),Ei.value(Si));new window.MutationObserver((()=>{clearTimeout(gi.timer),gi.timer=setTimeout((()=>{gi.dataset.scrollLine=""}),50);const e=gi.dataset.scrollLine;if(e){const[s,w]=e.split("/");isNaN(s)||xi.scrollIntoView({line:s,ch:0},w)}})).observe(gi,{attributes:!0,attributeFilter:["data-scroll-line"]});const updateCMScrollLine=e=>{if(gi.dataset.scrollLine)return;const s=e.getCursor()?.line??e.lineAtHeight(e.getScrollInfo().top,"local");yi.dataset.scrollLine=s};xi.on("scroll",(()=>{xi.hasFocus()&&updateCMScrollLine(xi)})),new window.MutationObserver((()=>{clearTimeout(yi.timer),yi.timer=setTimeout((()=>{yi.dataset.scrollLine=""}),1e3);const e=yi.dataset.scrollLine;let s,w=Number(e);if(isNaN(w))return;const C=Array.from(vi.htmlHolder.querySelectorAll("p"));do{s=C.find((e=>Number(e.dataset.sourceLine)===w)),w++}while(!s&&w<xi.doc.size);if(s=s??C.at(-1),!s)return;const O=xi.charCoords({line:w,ch:0});s.scrollIntoView({inline:"start"});const D=s.getBoundingClientRect().top;vi.htmlHolder.scrollBy(0,D-O.top+30)})).observe(yi,{attributes:!0,attributeFilter:["data-scroll-line"]});const addClassToCodeLines=()=>{const e=xi.getLineHandle(0).parent.lines;let s=!1;e.forEach(((e,w)=>{e.text.match(/^[\u0060]{3}/)?s=!s:s?xi.addLineClass(w,"text","inside-code-block"):xi.removeLineClass(w,"text","inside-code-block")}))};addClassToCodeLines();const menuForEditor=(e,s)=>{if(e.preventDefault(),"Range"===document.getSelection().type&&xi.getSelection()&&bi.length>0&&(s.replaceChildren(),s.appendChild(addRefLink(xi,bi))),"editing"!==mi.dataset.mode){const e=new Item({innerHTML:"<strong>EDIT</strong>",onclick:()=>mi.dataset.mode="editing"});s.appendChild(e)}const w=e.target.closest(".mapclay");if(w){const e=new Item({text:"Add Anchor",onclick:e=>{const s=addAnchorByPoint({point:e,map:w,validateAnchorName:validateAnchorName});appendRefLink(xi,s)}});s.insertBefore(e,s.firstChild)}},updateDumbyMap=(e=null)=>{((e,s)=>{e.replaceChildren(),e.innerHTML='<div class="SemanticHtml"></div>';const w=e.querySelector(".SemanticHtml"),C=MarkdownIt({html:!0,breaks:!0,linkify:!0}).use(b,{permalink:b.permalink.linkInsideHeader({placement:"before"})}).use(footnote_plugin).use(Ut).use(Zt),O=/^(\D*)(-?\d+\.?\d*)\s*([,\x2F\uFF0C])\s*(-?\d+\.?\d*)/,D={validate:O,normalize:function(e){const[,,s,w,C]=e.text.match(O);return e.url=`geo:${C},${s}?xy=${s},${C}`,e.text=`${s}${w} ${C}`,e.index+=e.text.indexOf(s)+1,e}};["[","(","📍","(","@","geo:","twd"].forEach((e=>C.linkify.add(e,D))),C.renderer.rules.dumby_block_open=()=>"<div>",C.renderer.rules.dumby_block_close=()=>"</div>",C.core.ruler.before("block","dumby_block",(e=>{e.tokens.push(new e.Token("dumby_block_open","",1))})),C.block.ruler.before("table","dumby_block",((e,s)=>{"\n"===e.src[e.bMarks[s-1]]&&"\n"===e.src[e.bMarks[s-2]]&&"list_item_open"!==e.tokens.at(-1).type&&(e.push("dumby_block_close","",-1),e.push("dumby_block_open","",1))})),C.core.ruler.after("block","dumby_block",(e=>{e.tokens.push(new e.Token("dumby_block_close","",-1))})),w.innerHTML=C.render(s);const T=w.querySelectorAll(":scope > div:not(:has(nav))");T.forEach((e=>{e.classList.add("dumby-block"),e.dataset.total=T.length}))})(gi,Ei.value()),vi=generateMaps(gi);const s=vi.htmlHolder;var w;s.onscroll=(w=s,()=>{if(yi.dataset.scrollLine)return;const e=w.scrollTop+window.innerHeight/2+30,s=Array.from(w.children).findLast((s=>s.offsetTop<e))??w.firstChild,C=Array.from(s.querySelectorAll("p")).findLast((w=>w.offsetTop+s.offsetTop<e)),O=C?.dataset?.sourceLine;if(!O)return;const D=C.offsetTop+s.offsetTop-w.scrollTop;O&&(w.closest("[data-scroll-line]").dataset.scrollLine=O+"/"+D)}),vi.utils.setContextMenu(menuForEditor),e?.(vi)};updateDumbyMap(),xi.on("change",((e,s)=>{updateDumbyMap((()=>{updateCMScrollLine(xi)})),addClassToCodeLines(),(e=>{const s=e.to.line;if("+input"===e.origin){const w=e.text[0];if("-"===w&&0===e.to.ch&&insideCodeblockForMap(xi.getCursor())&&(xi.setSelection({line:s,ch:0},{line:s,ch:1}),xi.replaceSelection(w.repeat(3)+"\n")),"`"===w&&0===e.to.ch){xi.setSelection({line:s,ch:0},{line:s,ch:1}),xi.replaceSelection(w.repeat(3));const e=xi.getValue().split("\n").filter((e=>e.match(/[\u0060]{3}/))).length;e%2==1&&(xi.replaceSelection("map\n\n```"),xi.setCursor({line:s+1}))}}if("+delete"===e.origin){const w=e.removed[0].match(/^[-\u0060]$/)?.at(0);w&&xi.getLine(s)===w.repeat(2)&&w&&(xi.setSelection({line:s,ch:0},{line:s,ch:2}),xi.replaceSelection(""))}})(s)})),xi.on("focus",(()=>{xi.getWrapperElement().classList.add("focus"),gi.classList.remove("focus")})),xi.on("beforeChange",((e,s)=>{if(yi.dataset.scrollLine=xi.getCursor().line,s.origin&&s.origin.match(/^(\+input|paste)$/)){const e=s.to.line;"---"===xi.getLine(e)&&""!==s.text[0]&&s.cancel()}})),window.onhashchange=()=>{const e=getContentFromHash(window.location.hash);e&&Ei.value(e)};const wi=document.createElement("div");wi.className="menu editor-menu",wi.style.display="none",wi.onclick=()=>wi.style.display="none",new window.MutationObserver((()=>{"none"===wi.style.display&&wi.replaceChildren()})).observe(wi,{attributes:!0,attributeFilter:["style"]}),document.body.append(wi);const Ci={},Oi={},Di="./assets/default.yml";fetch(Di).then((e=>e.text())).then((e=>{const w=s(e)?.at(0);Object.assign(Oi,w.aliases??{})})).catch((e=>console.warn(`Fail to get aliases from ${Di}`,e)));const insideCodeblockForMap=e=>{if(!(xi.getTokenAt(e).state.overlay.codeBlock&&!xi.getLine(e.line).match(/^[\u0060]{3}/)))return!1;let s=e.line-1;for(;s>=0;){const e=xi.getLine(s);if("```map"===e)return!0;if("```"===e)return!1;s-=1}return!1},getSuggestionFromMapOption=e=>{if(!e.example)return null;const s=e.example_desc?`<span>${e.example_desc}</span><span class="truncate"style="color: gray">${e.example}</span>`:`<span>${e.example}</span>`;return new Suggestion({text:s,replace:`${e.valueOf()}: ${e.example??""}`,cm:xi})},handleTypingInCodeBlock=e=>{const s=xi.getLine(e.line);if(s.match(/^\s\+$/)&&s.length%2!=0);else if(s.match(/^-/));else{const s=getSuggestions(e);addSuggestions(e,s)}},getSuggestions=e=>{const s=xi.getLine(e.line);xi.findMarks({...e,ch:0},{...e,ch:s.length}).forEach((e=>e.clear()));const markInputIsInvalid=()=>xi.getDoc().markText({...e,ch:0},{...e,ch:s.length},{className:"invalid-input"}),C=(e=>{const s=e.line;if(!xi.getLine)return null;const match=e=>xi.getLine(e).match(/^use: /);if(match(s))return s;let w=s-1;for(;w>0&&insideCodeblockForMap(e);){const e=xi.getLine(w);if(match(w))return w;if(e.match(/^---|^[\u0060]{3}/))break;w-=1}let C=s+1;for(;insideCodeblockForMap(e);){const e=xi.getLine(C);if(match(C))return C;if(e.match(/^---|^[\u0060]{3}/))return null;C+=1}return null})(e),O=C?xi.getLine(C).split(" ")[1]:null;if(!O||e.line===C){const e=Object.entries(w.use).filter((([e])=>{const w=`use: ${e}`,C=w.replace(" ","").toLowerCase(),O=s.replace(" ","").toLowerCase();return w!==s&&C.includes(O)})).map((([e,s])=>new Suggestion({text:`<span>use: ${e}</span><span class='info' title="${s.desc}">ⓘ</span>`,replace:`use: ${e}`,cm:xi})));return 0===e.length?[]:[...e,new Item({innerHTML:'<a href="https://github.com/outdoorsafetylab/mapclay#renderer" class="external" style="display: block;">More...</a>',className:["suggestion"],onclick:()=>window.open("https://github.com/outdoorsafetylab/mapclay#renderer","_blank")})]}{if(s.startsWith("  "))return[];const e=Ci[O];if(!e){const e=w.use[O]?.value;return import(e).then((e=>{Ci[O]=e.default.validOptions;const s=xi.getCursor();insideCodeblockForMap(s)&&handleTypingInCodeBlock(s)})).catch((e=>{markInputIsInvalid(),console.warn(`Fail to get valid options from Renderer typed: ${O}`)})),[]}const C=s.includes(":"),T=s.match(/^[^:]+:\s+/);if(C&&!T)return markInputIsInvalid(),[];const A=s.split(":")[0].trim();if(!C)return markInputIsInvalid(),((e,s)=>{let w=[];const C=s.filter((s=>s.valueOf().toLowerCase().includes(e.toLowerCase())));return w=C.length>0?C:s,w.map((e=>new Suggestion({text:`<span>${e.valueOf()}</span><span class='info' title="${e.desc??""}">ⓘ</span>`,replace:`${e.valueOf()}: `,cm:xi})))})(A,e);const B=e.find((e=>e.name===A));if(C&&!B&&markInputIsInvalid(),C&&B){const e=s.substring(s.indexOf(":")+1).trim(),w=B.isValid(e);if(!e)return[getSuggestionFromMapOption(B),...(D=B,Object.entries(Oi[D.valueOf()]??{})?.map((e=>{const[s,w]=e,C=JSON.stringify(w).replaceAll('"',"");return new Suggestion({text:`<span>${s}</span><span class="truncate" style="color: gray">${C}</span>`,replace:`${D.valueOf()}: ${C}`,cm:xi})}))??[])].filter((e=>e instanceof Suggestion));if(e&&!w)return markInputIsInvalid(),[]}}var D;return[]},addSuggestions=(e,s)=>{if(0===s.length)return void(wi.style.display="none");wi.style.display="block",wi.innerHTML="",s.forEach((e=>wi.appendChild(e)));const w=document.createElement("div");xi.addWidget(e,w,!0);const C=w.getBoundingClientRect();wi.style.left=`calc(${C.left}px + 2rem)`,wi.style.top=`calc(${C.bottom}px + 1rem)`,wi.style.display="block",shiftByWindow(wi)};xi.on("cursorActivity",(e=>{wi.style.display="none";const s=xi.getCursor();insideCodeblockForMap(s)&&handleTypingInCodeBlock(s)})),xi.on("blur",(()=>{bi=getRefLinks(),wi.checkVisibility()?xi.focus():(xi.getWrapperElement().classList.remove("focus"),gi.classList.add("focus"))}));const Ti=["Tab","Enter","Escape"];xi.on("keydown",((e,s)=>{if(!xi.hasFocus||!Ti.includes(s.key)||"none"===wi.style.display)return;const w=wi.querySelector(".menu-item.focus");if(!w&&"Enter"===s.key)return;s.preventDefault();const C=w?.nextSibling??wi.querySelector(".menu-item:first-child"),O=w?.previousSibling??wi.querySelector(".menu-item:last-child"),D=s.shiftKey?O:C;switch(s.key){case"Tab":Array.from(wi.children).forEach((e=>e.classList.remove("focus"))),D.classList.add("focus"),D.scrollIntoView({behavior:"smooth",block:"nearest"});break;case"Enter":w.onclick();break;case"Escape":if(!wi.checkVisibility())break;setTimeout((()=>wi.style.display="none"),50)}})),document.onkeydown=e=>{if(e.altKey&&e.ctrlKey&&"m"===e.key)return"editing"===mi.dataset.mode?delete mi.dataset.mode:mi.dataset.mode="editing",e.preventDefault(),null;xi.hasFocus()||("F1"===e.key&&(e.preventDefault(),xi.focus()),"Tab"===e.key&&(e.preventDefault(),vi.utils.focusNextMap(e.shiftKey)),"x"!==e.key&&"X"!==e.key||(e.preventDefault(),vi.utils.switchToNextLayout(e.shiftKey)),"n"===e.key&&(e.preventDefault(),vi.utils.focusNextBlock()),"p"===e.key&&(e.preventDefault(),vi.utils.focusNextBlock(!0)),"Escape"===e.key&&(e.preventDefault(),vi.utils.removeBlockFocus()))},new window.MutationObserver((e=>{const s=e.at(-1);"normal"===gi.dataset.layout&&"normal"!==s.oldValue||delete mi.dataset.mode})).observe(gi,{attributes:!0,attributeFilter:["data-layout"],attributeOldValue:!0});const addMapRandomlyByPreset=()=>{const e=["apply: ./assets/default.yml","width: 85%","height: 200px"],s=["id","apply","use","width","height","center","XYZ","zoom"],w=Object.entries(Oi).filter((([w,C])=>s.includes(w)&&!e.find((e=>e.startsWith(w)))));if(0===w.length)return;w.forEach((([s,w])=>{const C=Object.entries(w).filter((([w,C])=>{if("XYZ"===s){const s=e.find((e=>e.match(/center: TAIWAN/)));if(!s)return!w.includes("TAIWAN")}return"zoom"!==s||C>6&&C<15})),O=C.at(Math.random()*C.length|0).at(0);e.push(`${s}: ${"object"==typeof O?O.value:O}`),"center"===s&&e.push(`id: ${O}`)})),e.sort(((e,w)=>s.indexOf(e.split(":")[0])>s.indexOf(w.split(":")[0])));const C=xi.getCursor();xi.replaceRange("\n```map\n"+e.join("\n")+"\n```\n",C)};xi.getWrapperElement().oncontextmenu=e=>{insideCodeblockForMap(xi.getCursor())||(e.preventDefault(),xi.getSelection()&&bi.length>0&&wi.appendChild(addRefLink(xi,bi)),wi.children.length>0&&(wi.style.cssText=`display: block; transform: translate(${e.x}px, ${e.y}px); overflow: visible;`))},document.addEventListener("selectionchange",(()=>{if(xi.hasFocus()||gi.onmousemove)return;const e=document.getSelection();if("Range"===e.type){const s=e.getRangeAt(0).toString(),w=e.anchorNode.parentElement.closest(".source-line"),C=Number(w?.dataset?.sourceLine??NaN),O=Number(w?.nextSibling?.dataset?.sourceLine??NaN);if(s.includes("\n")||isNaN(C))return void xi.setSelection(xi.getCursor());const D=[s];let T=e.anchorNode.previousSibling;for(;T;)D.push(T.textContent),T=T.previousSibling;const A={line:C,ch:0};D.filter((e=>e&&"\n"!==e)).map((e=>e.replace("\n",""))).reverse().forEach((e=>{let s=xi.getLine(A.line)?.indexOf(e,A.ch);for(;-1===s;){if(A.line+=1,A.ch=0,A.line>=O)return void xi.setSelection(xi.setCursor());s=xi.getLine(A.line)?.indexOf(e)}A.ch=s+e.length})),xi.setSelection({line:A.line,ch:A.ch-s.length},A)}})),gi.onmousedown=e=>{if(1!==e.which)return;const s=document.getSelection();if(""===xi.getSelection()||"Range"!==s.type)return;const w=s.getRangeAt(0),C=w.getBoundingClientRect();if(!(e.x<C.right&&e.x>C.left&&e.y<C.bottom&&e.y>C.top))return;const O=document.createElement("a");O.textContent=w.toString(),O.classList.add("with-leader-line","geolink","drag"),w.deleteContents(),w.insertNode(O);const D=document.createElement("div");D.style.cssText=`position: absolute; left: ${e.clientX}px; top: ${e.clientY}px;`,document.body.appendChild(D);const T=new po({start:O,end:D,path:"magnet"});mi.classList.add("dragging-geolink"),gi.onmousemove=function onMouseMove(e){D.style.left=e.clientX+"px",D.style.top=e.clientY+"px",T.position()},vi.utils.renderedMaps().forEach((e=>{e.style.cursor="crosshair"})),gi.onmouseup=function(e){mi.classList.remove("dragging-geolink"),gi.onmousemove=null,gi.onmouseup=null,T?.remove(),D.remove(),vi.utils.renderedMaps().forEach((e=>e.style.removeProperty("cursor")));const resumeContent=()=>updateDumbyMap((e=>{const s=vi.htmlHolder.scrollTop;e.htmlHolder.scrollBy(0,s)})),s=document.elementFromPoint(e.clientX,e.clientY).closest(".mapclay"),w=xi.getSelection();if(!s||!w)return void resumeContent();const C=addAnchorByPoint({point:e,map:s,validateAnchorName:validateAnchorName});C?(appendRefLink(xi,C),w===C.ref?xi.replaceSelection(`[${w}]`):xi.replaceSelection(`[${w}][${C.ref}]`)):resumeContent()}},gi.ondragstart=()=>!1;
+//# sourceMappingURL=editor.mjs.map
diff --git a/dist/editor.mjs.map b/dist/editor.mjs.map
new file mode 100644
index 0000000..f956418
--- /dev/null
+++ b/dist/editor.mjs.map
@@ -0,0 +1 @@
+{"version":3,"file":"editor.mjs","sources":["../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/decode.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/encode.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/format.mjs","../node_modules/.pnpm/mdurl@2.0.0/node_modules/mdurl/lib/parse.mjs","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode_codepoint.js","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/properties/Any/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cc/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/P/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/S/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Z/regex.mjs","../node_modules/.pnpm/uc.micro@2.1.0/node_modules/uc.micro/categories/Cf/regex.mjs","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-html.js","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/generated/decode-data-xml.js","../node_modules/.pnpm/entities@4.5.0/node_modules/entities/lib/esm/decode.js","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/utils.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_label.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/helpers/parse_link_title.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/renderer.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/ruler.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/token.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/state_core.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/normalize.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/linkify.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/replacements.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/smartquotes.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_core.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_core/text_join.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/state_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/table.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/list.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_re.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/html_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/common/html_blocks.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_block.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/code.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/fence.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/blockquote.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/hr.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/reference.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/heading.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/lheading.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_block/paragraph.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/state_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/text.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/linkify.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/escape.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/emphasis.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/autolink.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/entity.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/parser_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/newline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/backticks.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/link.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/image.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/html_inline.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs","../node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/index.mjs","../node_modules/.pnpm/linkify-it@5.0.0/node_modules/linkify-it/lib/re.mjs","../node_modules/.pnpm/punycode.js@2.3.1/node_modules/punycode.js/punycode.es6.js","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/index.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/default.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/zero.mjs","../node_modules/.pnpm/markdown-it@14.1.0/node_modules/markdown-it/lib/presets/commonmark.mjs","../node_modules/.pnpm/markdown-it-anchor@9.2.0_@types+markdown-it@14.1.2_markdown-it@14.1.0/node_modules/markdown-it-anchor/dist/markdownItAnchor.mjs","../node_modules/.pnpm/markdown-it-footnote@4.0.0/node_modules/markdown-it-footnote/index.mjs","../node_modules/.pnpm/markdown-it-front-matter@0.2.4/node_modules/markdown-it-front-matter/index.js","../node_modules/.pnpm/markdown-it-inject-linenumbers@0.3.0/node_modules/markdown-it-inject-linenumbers/index.js","../src/utils.mjs","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","../node_modules/.pnpm/plain-draggable@2.5.15/node_modules/plain-draggable/plain-draggable.esm.js","../src/Layout.mjs","../src/dumbyUtils.mjs","../src/MenuItem.mjs","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/cssprefix@2.0.17/node_modules/cssprefix/cssprefix.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/m-class-list@1.1.10/node_modules/m-class-list/m-class-list.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/anim-event@1.0.17/node_modules/anim-event/anim-event.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/timed-transition@1.5.4/node_modules/timed-transition/timed-transition.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-overlay@1.4.17/node_modules/plain-overlay/plain-overlay.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/pointer-event@1.3.1/node_modules/pointer-event/pointer-event.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/node_modules/.pnpm/plain-draggable@2.5.14/node_modules/plain-draggable/plain-draggable.esm.js","../node_modules/.pnpm/plain-modal@1.0.34/node_modules/plain-modal/plain-modal.esm.js","../src/dumbymap.mjs","../src/editor.mjs"],"sourcesContent":["/* eslint-disable no-bitwise */\n\nconst decodeCache = {}\n\nfunction getDecodeCache (exclude) {\n  let cache = decodeCache[exclude]\n  if (cache) { return cache }\n\n  cache = decodeCache[exclude] = []\n\n  for (let i = 0; i < 128; i++) {\n    const ch = String.fromCharCode(i)\n    cache.push(ch)\n  }\n\n  for (let i = 0; i < exclude.length; i++) {\n    const ch = exclude.charCodeAt(i)\n    cache[ch] = '%' + ('0' + ch.toString(16).toUpperCase()).slice(-2)\n  }\n\n  return cache\n}\n\n// Decode percent-encoded string.\n//\nfunction decode (string, exclude) {\n  if (typeof exclude !== 'string') {\n    exclude = decode.defaultChars\n  }\n\n  const cache = getDecodeCache(exclude)\n\n  return string.replace(/(%[a-f0-9]{2})+/gi, function (seq) {\n    let result = ''\n\n    for (let i = 0, l = seq.length; i < l; i += 3) {\n      const b1 = parseInt(seq.slice(i + 1, i + 3), 16)\n\n      if (b1 < 0x80) {\n        result += cache[b1]\n        continue\n      }\n\n      if ((b1 & 0xE0) === 0xC0 && (i + 3 < l)) {\n        // 110xxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n\n        if ((b2 & 0xC0) === 0x80) {\n          const chr = ((b1 << 6) & 0x7C0) | (b2 & 0x3F)\n\n          if (chr < 0x80) {\n            result += '\\ufffd\\ufffd'\n          } else {\n            result += String.fromCharCode(chr)\n          }\n\n          i += 3\n          continue\n        }\n      }\n\n      if ((b1 & 0xF0) === 0xE0 && (i + 6 < l)) {\n        // 1110xxxx 10xxxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n        const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n\n        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n          const chr = ((b1 << 12) & 0xF000) | ((b2 << 6) & 0xFC0) | (b3 & 0x3F)\n\n          if (chr < 0x800 || (chr >= 0xD800 && chr <= 0xDFFF)) {\n            result += '\\ufffd\\ufffd\\ufffd'\n          } else {\n            result += String.fromCharCode(chr)\n          }\n\n          i += 6\n          continue\n        }\n      }\n\n      if ((b1 & 0xF8) === 0xF0 && (i + 9 < l)) {\n        // 111110xx 10xxxxxx 10xxxxxx 10xxxxxx\n        const b2 = parseInt(seq.slice(i + 4, i + 6), 16)\n        const b3 = parseInt(seq.slice(i + 7, i + 9), 16)\n        const b4 = parseInt(seq.slice(i + 10, i + 12), 16)\n\n        if ((b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80 && (b4 & 0xC0) === 0x80) {\n          let chr = ((b1 << 18) & 0x1C0000) | ((b2 << 12) & 0x3F000) | ((b3 << 6) & 0xFC0) | (b4 & 0x3F)\n\n          if (chr < 0x10000 || chr > 0x10FFFF) {\n            result += '\\ufffd\\ufffd\\ufffd\\ufffd'\n          } else {\n            chr -= 0x10000\n            result += String.fromCharCode(0xD800 + (chr >> 10), 0xDC00 + (chr & 0x3FF))\n          }\n\n          i += 9\n          continue\n        }\n      }\n\n      result += '\\ufffd'\n    }\n\n    return result\n  })\n}\n\ndecode.defaultChars = ';/?:@&=+$,#'\ndecode.componentChars = ''\n\nexport default decode\n","const encodeCache = {}\n\n// Create a lookup array where anything but characters in `chars` string\n// and alphanumeric chars is percent-encoded.\n//\nfunction getEncodeCache (exclude) {\n  let cache = encodeCache[exclude]\n  if (cache) { return cache }\n\n  cache = encodeCache[exclude] = []\n\n  for (let i = 0; i < 128; i++) {\n    const ch = String.fromCharCode(i)\n\n    if (/^[0-9a-z]$/i.test(ch)) {\n      // always allow unencoded alphanumeric characters\n      cache.push(ch)\n    } else {\n      cache.push('%' + ('0' + i.toString(16).toUpperCase()).slice(-2))\n    }\n  }\n\n  for (let i = 0; i < exclude.length; i++) {\n    cache[exclude.charCodeAt(i)] = exclude[i]\n  }\n\n  return cache\n}\n\n// Encode unsafe characters with percent-encoding, skipping already\n// encoded sequences.\n//\n//  - string       - string to encode\n//  - exclude      - list of characters to ignore (in addition to a-zA-Z0-9)\n//  - keepEscaped  - don't encode '%' in a correct escape sequence (default: true)\n//\nfunction encode (string, exclude, keepEscaped) {\n  if (typeof exclude !== 'string') {\n    // encode(string, keepEscaped)\n    keepEscaped = exclude\n    exclude = encode.defaultChars\n  }\n\n  if (typeof keepEscaped === 'undefined') {\n    keepEscaped = true\n  }\n\n  const cache = getEncodeCache(exclude)\n  let result = ''\n\n  for (let i = 0, l = string.length; i < l; i++) {\n    const code = string.charCodeAt(i)\n\n    if (keepEscaped && code === 0x25 /* % */ && i + 2 < l) {\n      if (/^[0-9a-f]{2}$/i.test(string.slice(i + 1, i + 3))) {\n        result += string.slice(i, i + 3)\n        i += 2\n        continue\n      }\n    }\n\n    if (code < 128) {\n      result += cache[code]\n      continue\n    }\n\n    if (code >= 0xD800 && code <= 0xDFFF) {\n      if (code >= 0xD800 && code <= 0xDBFF && i + 1 < l) {\n        const nextCode = string.charCodeAt(i + 1)\n        if (nextCode >= 0xDC00 && nextCode <= 0xDFFF) {\n          result += encodeURIComponent(string[i] + string[i + 1])\n          i++\n          continue\n        }\n      }\n      result += '%EF%BF%BD'\n      continue\n    }\n\n    result += encodeURIComponent(string[i])\n  }\n\n  return result\n}\n\nencode.defaultChars = \";/?:@&=+$,-_.!~*'()#\"\nencode.componentChars = \"-_.!~*'()\"\n\nexport default encode\n","export default function format (url) {\n  let result = ''\n\n  result += url.protocol || ''\n  result += url.slashes ? '//' : ''\n  result += url.auth ? url.auth + '@' : ''\n\n  if (url.hostname && url.hostname.indexOf(':') !== -1) {\n    // ipv6 address\n    result += '[' + url.hostname + ']'\n  } else {\n    result += url.hostname || ''\n  }\n\n  result += url.port ? ':' + url.port : ''\n  result += url.pathname || ''\n  result += url.search || ''\n  result += url.hash || ''\n\n  return result\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n//\n// Changes from joyent/node:\n//\n// 1. No leading slash in paths,\n//    e.g. in `url.parse('http://foo?bar')` pathname is ``, not `/`\n//\n// 2. Backslashes are not replaced with slashes,\n//    so `http:\\\\example.org\\` is treated like a relative path\n//\n// 3. Trailing colon is treated like a part of the path,\n//    i.e. in `http://example.org:foo` pathname is `:foo`\n//\n// 4. Nothing is URL-encoded in the resulting object,\n//    (in joyent/node some chars in auth and paths are encoded)\n//\n// 5. `url.parse()` does not have `parseQueryString` argument\n//\n// 6. Removed extraneous result properties: `host`, `path`, `query`, etc.,\n//    which can be constructed using other parts of the url.\n//\n\nfunction Url () {\n  this.protocol = null\n  this.slashes = null\n  this.auth = null\n  this.port = null\n  this.hostname = null\n  this.hash = null\n  this.search = null\n  this.pathname = null\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nconst protocolPattern = /^([a-z0-9.+-]+:)/i\nconst portPattern = /:[0-9]*$/\n\n// Special case for a simple path URL\n/* eslint-disable-next-line no-useless-escape */\nconst simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/\n\n// RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\nconst delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t']\n\n// RFC 2396: characters not allowed for various reasons.\nconst unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims)\n\n// Allowed by RFCs, but cause of XSS attacks.  Always escape these.\nconst autoEscape = ['\\''].concat(unwise)\n// Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nconst nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape)\nconst hostEndingChars = ['/', '?', '#']\nconst hostnameMaxLen = 255\nconst hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/\nconst hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/\n// protocols that can allow \"unsafe\" and \"unwise\" chars.\n// protocols that never have a hostname.\nconst hostlessProtocol = {\n  javascript: true,\n  'javascript:': true\n}\n// protocols that always contain a // bit.\nconst slashedProtocol = {\n  http: true,\n  https: true,\n  ftp: true,\n  gopher: true,\n  file: true,\n  'http:': true,\n  'https:': true,\n  'ftp:': true,\n  'gopher:': true,\n  'file:': true\n}\n\nfunction urlParse (url, slashesDenoteHost) {\n  if (url && url instanceof Url) return url\n\n  const u = new Url()\n  u.parse(url, slashesDenoteHost)\n  return u\n}\n\nUrl.prototype.parse = function (url, slashesDenoteHost) {\n  let lowerProto, hec, slashes\n  let rest = url\n\n  // trim before proceeding.\n  // This is to support parse stuff like \"  http://foo.com  \\n\"\n  rest = rest.trim()\n\n  if (!slashesDenoteHost && url.split('#').length === 1) {\n    // Try fast path regexp\n    const simplePath = simplePathPattern.exec(rest)\n    if (simplePath) {\n      this.pathname = simplePath[1]\n      if (simplePath[2]) {\n        this.search = simplePath[2]\n      }\n      return this\n    }\n  }\n\n  let proto = protocolPattern.exec(rest)\n  if (proto) {\n    proto = proto[0]\n    lowerProto = proto.toLowerCase()\n    this.protocol = proto\n    rest = rest.substr(proto.length)\n  }\n\n  // figure out if it's got a host\n  // user@server is *always* interpreted as a hostname, and url\n  // resolution will treat //foo/bar as host=foo,path=bar because that's\n  // how the browser resolves relative URLs.\n  /* eslint-disable-next-line no-useless-escape */\n  if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n    slashes = rest.substr(0, 2) === '//'\n    if (slashes && !(proto && hostlessProtocol[proto])) {\n      rest = rest.substr(2)\n      this.slashes = true\n    }\n  }\n\n  if (!hostlessProtocol[proto] &&\n      (slashes || (proto && !slashedProtocol[proto]))) {\n    // there's a hostname.\n    // the first instance of /, ?, ;, or # ends the host.\n    //\n    // If there is an @ in the hostname, then non-host chars *are* allowed\n    // to the left of the last @ sign, unless some host-ending character\n    // comes *before* the @-sign.\n    // URLs are obnoxious.\n    //\n    // ex:\n    // http://a@b@c/ => user:a@b host:c\n    // http://a@b?@c => user:a host:c path:/?@c\n\n    // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n    // Review our test case against browsers more comprehensively.\n\n    // find the first instance of any hostEndingChars\n    let hostEnd = -1\n    for (let i = 0; i < hostEndingChars.length; i++) {\n      hec = rest.indexOf(hostEndingChars[i])\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n        hostEnd = hec\n      }\n    }\n\n    // at this point, either we have an explicit point where the\n    // auth portion cannot go past, or the last @ char is the decider.\n    let auth, atSign\n    if (hostEnd === -1) {\n      // atSign can be anywhere.\n      atSign = rest.lastIndexOf('@')\n    } else {\n      // atSign must be in auth portion.\n      // http://a@b/c@d => host:b auth:a path:/c@d\n      atSign = rest.lastIndexOf('@', hostEnd)\n    }\n\n    // Now we have a portion which is definitely the auth.\n    // Pull that off.\n    if (atSign !== -1) {\n      auth = rest.slice(0, atSign)\n      rest = rest.slice(atSign + 1)\n      this.auth = auth\n    }\n\n    // the host is the remaining to the left of the first non-host char\n    hostEnd = -1\n    for (let i = 0; i < nonHostChars.length; i++) {\n      hec = rest.indexOf(nonHostChars[i])\n      if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) {\n        hostEnd = hec\n      }\n    }\n    // if we still have not hit it, then the entire thing is a host.\n    if (hostEnd === -1) {\n      hostEnd = rest.length\n    }\n\n    if (rest[hostEnd - 1] === ':') { hostEnd-- }\n    const host = rest.slice(0, hostEnd)\n    rest = rest.slice(hostEnd)\n\n    // pull out port.\n    this.parseHost(host)\n\n    // we've indicated that there is a hostname,\n    // so even if it's empty, it has to be present.\n    this.hostname = this.hostname || ''\n\n    // if hostname begins with [ and ends with ]\n    // assume that it's an IPv6 address.\n    const ipv6Hostname = this.hostname[0] === '[' &&\n        this.hostname[this.hostname.length - 1] === ']'\n\n    // validate a little.\n    if (!ipv6Hostname) {\n      const hostparts = this.hostname.split(/\\./)\n      for (let i = 0, l = hostparts.length; i < l; i++) {\n        const part = hostparts[i]\n        if (!part) { continue }\n        if (!part.match(hostnamePartPattern)) {\n          let newpart = ''\n          for (let j = 0, k = part.length; j < k; j++) {\n            if (part.charCodeAt(j) > 127) {\n              // we replace non-ASCII char with a temporary placeholder\n              // we need this to make sure size of hostname is not\n              // broken by replacing non-ASCII by nothing\n              newpart += 'x'\n            } else {\n              newpart += part[j]\n            }\n          }\n          // we test again with ASCII char only\n          if (!newpart.match(hostnamePartPattern)) {\n            const validParts = hostparts.slice(0, i)\n            const notHost = hostparts.slice(i + 1)\n            const bit = part.match(hostnamePartStart)\n            if (bit) {\n              validParts.push(bit[1])\n              notHost.unshift(bit[2])\n            }\n            if (notHost.length) {\n              rest = notHost.join('.') + rest\n            }\n            this.hostname = validParts.join('.')\n            break\n          }\n        }\n      }\n    }\n\n    if (this.hostname.length > hostnameMaxLen) {\n      this.hostname = ''\n    }\n\n    // strip [ and ] from the hostname\n    // the host field still retains them, though\n    if (ipv6Hostname) {\n      this.hostname = this.hostname.substr(1, this.hostname.length - 2)\n    }\n  }\n\n  // chop off from the tail first.\n  const hash = rest.indexOf('#')\n  if (hash !== -1) {\n    // got a fragment string.\n    this.hash = rest.substr(hash)\n    rest = rest.slice(0, hash)\n  }\n  const qm = rest.indexOf('?')\n  if (qm !== -1) {\n    this.search = rest.substr(qm)\n    rest = rest.slice(0, qm)\n  }\n  if (rest) { this.pathname = rest }\n  if (slashedProtocol[lowerProto] &&\n      this.hostname && !this.pathname) {\n    this.pathname = ''\n  }\n\n  return this\n}\n\nUrl.prototype.parseHost = function (host) {\n  let port = portPattern.exec(host)\n  if (port) {\n    port = port[0]\n    if (port !== ':') {\n      this.port = port.substr(1)\n    }\n    host = host.substr(0, host.length - port.length)\n  }\n  if (host) { this.hostname = host }\n}\n\nexport default urlParse\n","// Adapted from https://github.com/mathiasbynens/he/blob/36afe179392226cf1b6ccdb16ebbb7a5a844d93a/src/he.js#L106-L134\nvar _a;\nconst decodeMap = new Map([\n    [0, 65533],\n    // C1 Unicode control character reference replacements\n    [128, 8364],\n    [130, 8218],\n    [131, 402],\n    [132, 8222],\n    [133, 8230],\n    [134, 8224],\n    [135, 8225],\n    [136, 710],\n    [137, 8240],\n    [138, 352],\n    [139, 8249],\n    [140, 338],\n    [142, 381],\n    [145, 8216],\n    [146, 8217],\n    [147, 8220],\n    [148, 8221],\n    [149, 8226],\n    [150, 8211],\n    [151, 8212],\n    [152, 732],\n    [153, 8482],\n    [154, 353],\n    [155, 8250],\n    [156, 339],\n    [158, 382],\n    [159, 376],\n]);\n/**\n * Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.\n */\nexport const fromCodePoint = \n// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins\n(_a = String.fromCodePoint) !== null && _a !== void 0 ? _a : function (codePoint) {\n    let output = \"\";\n    if (codePoint > 0xffff) {\n        codePoint -= 0x10000;\n        output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800);\n        codePoint = 0xdc00 | (codePoint & 0x3ff);\n    }\n    output += String.fromCharCode(codePoint);\n    return output;\n};\n/**\n * Replace the given code point with a replacement character if it is a\n * surrogate or is outside the valid range. Otherwise return the code\n * point unchanged.\n */\nexport function replaceCodePoint(codePoint) {\n    var _a;\n    if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) {\n        return 0xfffd;\n    }\n    return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;\n}\n/**\n * Replace the code point if relevant, then convert it to a string.\n *\n * @deprecated Use `fromCodePoint(replaceCodePoint(codePoint))` instead.\n * @param codePoint The code point to decode.\n * @returns The decoded code point.\n */\nexport default function decodeCodePoint(codePoint) {\n    return fromCodePoint(replaceCodePoint(codePoint));\n}\n//# sourceMappingURL=decode_codepoint.js.map","export default /[\\0-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/","export default /[\\0-\\x1F\\x7F-\\x9F]/","export default /[!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}\\xA1\\xA7\\xAB\\xB6\\xB7\\xBB\\xBF\\u037E\\u0387\\u055A-\\u055F\\u0589\\u058A\\u05BE\\u05C0\\u05C3\\u05C6\\u05F3\\u05F4\\u0609\\u060A\\u060C\\u060D\\u061B\\u061D-\\u061F\\u066A-\\u066D\\u06D4\\u0700-\\u070D\\u07F7-\\u07F9\\u0830-\\u083E\\u085E\\u0964\\u0965\\u0970\\u09FD\\u0A76\\u0AF0\\u0C77\\u0C84\\u0DF4\\u0E4F\\u0E5A\\u0E5B\\u0F04-\\u0F12\\u0F14\\u0F3A-\\u0F3D\\u0F85\\u0FD0-\\u0FD4\\u0FD9\\u0FDA\\u104A-\\u104F\\u10FB\\u1360-\\u1368\\u1400\\u166E\\u169B\\u169C\\u16EB-\\u16ED\\u1735\\u1736\\u17D4-\\u17D6\\u17D8-\\u17DA\\u1800-\\u180A\\u1944\\u1945\\u1A1E\\u1A1F\\u1AA0-\\u1AA6\\u1AA8-\\u1AAD\\u1B5A-\\u1B60\\u1B7D\\u1B7E\\u1BFC-\\u1BFF\\u1C3B-\\u1C3F\\u1C7E\\u1C7F\\u1CC0-\\u1CC7\\u1CD3\\u2010-\\u2027\\u2030-\\u2043\\u2045-\\u2051\\u2053-\\u205E\\u207D\\u207E\\u208D\\u208E\\u2308-\\u230B\\u2329\\u232A\\u2768-\\u2775\\u27C5\\u27C6\\u27E6-\\u27EF\\u2983-\\u2998\\u29D8-\\u29DB\\u29FC\\u29FD\\u2CF9-\\u2CFC\\u2CFE\\u2C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09]|\\uD807[\\uDC41-\\uDC45\\uDC70\\uDC71\\uDEF7\\uDEF8\\uDF43-\\uDF4F\\uDFFF]|\\uD809[\\uDC70-\\uDC74]|\\uD80B[\\uDFF1\\uDFF2]|\\uD81A[\\uDE6E\\uDE6F\\uDEF5\\uDF37-\\uDF3B\\uDF44]|\\uD81B[\\uDE97-\\uDE9A\\uDFE2]|\\uD82F\\uDC9F|\\uD836[\\uDE87-\\uDE8B]|\\uD83A[\\uDD5E\\uDD5F]/","export default /[\\$\\+<->\\^`\\|~\\xA2-\\xA6\\xA8\\xA9\\xAC\\xAE-\\xB1\\xB4\\xB8\\xD7\\xF7\\u02C2-\\u02C5\\u02D2-\\u02DF\\u02E5-\\u02EB\\u02ED\\u02EF-\\u02FF\\u0375\\u0384\\u0385\\u03F6\\u0482\\u058D-\\u058F\\u0606-\\u0608\\u060B\\u060E\\u060F\\u06DE\\u06E9\\u06FD\\u06FE\\u07F6\\u07FE\\u07FF\\u0888\\u09F2\\u09F3\\u09FA\\u09FB\\u0AF1\\u0B70\\u0BF3-\\u0BFA\\u0C7F\\u0D4F\\u0D79\\u0E3F\\u0F01-\\u0F03\\u0F13\\u0F15-\\u0F17\\u0F1A-\\u0F1F\\u0F34\\u0F36\\u0F38\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE\\u0FCF\\u0FD5-\\u0FD8\\u109E\\u109F\\u1390-\\u1399\\u166D\\u17DB\\u1940\\u19DE-\\u19FF\\u1B61-\\u1B6A\\u1B74-\\u1B7C\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u2044\\u2052\\u207A-\\u207C\\u208A-\\u208C\\u20A0-\\u20C0\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u214F\\u218A\\u218B\\u2190-\\u2307\\u230C-\\u2328\\u232B-\\u2426\\u2440-\\u244A\\u249C-\\u24E9\\u2500-\\u2767\\u2794-\\u27C4\\u27C7-\\u27E5\\u27F0-\\u2982\\u2999-\\u29D7\\u29DC-\\u29FB\\u29FE-\\u2B73\\u2B76-\\u2B95\\u2B97-\\u2BFF\\u2CE5-\\u2CEA\\u2E50\\u2E51\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3004\\u3012\\u3013\\u3020\\u3036\\u3037\\u303E\\u303F\\u309B\\u309C\\u3190\\u3191\\u3196-\\u319F\\u31C0-\\u31E3\\u31EF\\u3200-\\u321E\\u322A-\\u3247\\u3250\\u3260-\\u327F\\u328A-\\u32B0\\u32C0-\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA700-\\uA716\\uA720\\uA721\\uA789\\uA78A\\uA828-\\uA82B\\uA836-\\uA839\\uAA77-\\uAA79\\uAB5B\\uAB6A\\uAB6B\\uFB29\\uFBB2-\\uFBC2\\uFD40-\\uFD4F\\uFDCF\\uFDFC-\\uFDFF\\uFE62\\uFE64-\\uFE66\\uFE69\\uFF04\\uFF0B\\uFF1C-\\uFF1E\\uFF3E\\uFF40\\uFF5C\\uFF5E\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFFC\\uFFFD]|\\uD800[\\uDD37-\\uDD3F\\uDD79-\\uDD89\\uDD8C-\\uDD8E\\uDD90-\\uDD9C\\uDDA0\\uDDD0-\\uDDFC]|\\uD802[\\uDC77\\uDC78\\uDEC8]|\\uD805\\uDF3F|\\uD807[\\uDFD5-\\uDFF1]|\\uD81A[\\uDF3C-\\uDF3F\\uDF45]|\\uD82F\\uDC9C|\\uD833[\\uDF50-\\uDFC3]|\\uD834[\\uDC00-\\uDCF5\\uDD00-\\uDD26\\uDD29-\\uDD64\\uDD6A-\\uDD6C\\uDD83\\uDD84\\uDD8C-\\uDDA9\\uDDAE-\\uDDEA\\uDE00-\\uDE41\\uDE45\\uDF00-\\uDF56]|\\uD835[\\uDEC1\\uDEDB\\uDEFB\\uDF15\\uDF35\\uDF4F\\uDF6F\\uDF89\\uDFA9\\uDFC3]|\\uD836[\\uDC00-\\uDDFF\\uDE37-\\uDE3A\\uDE6D-\\uDE74\\uDE76-\\uDE83\\uDE85\\uDE86]|\\uD838[\\uDD4F\\uDEFF]|\\uD83B[\\uDCAC\\uDCB0\\uDD2E\\uDEF0\\uDEF1]|\\uD83C[\\uDC00-\\uDC2B\\uDC30-\\uDC93\\uDCA0-\\uDCAE\\uDCB1-\\uDCBF\\uDCC1-\\uDCCF\\uDCD1-\\uDCF5\\uDD0D-\\uDDAD\\uDDE6-\\uDE02\\uDE10-\\uDE3B\\uDE40-\\uDE48\\uDE50\\uDE51\\uDE60-\\uDE65\\uDF00-\\uDFFF]|\\uD83D[\\uDC00-\\uDED7\\uDEDC-\\uDEEC\\uDEF0-\\uDEFC\\uDF00-\\uDF76\\uDF7B-\\uDFD9\\uDFE0-\\uDFEB\\uDFF0]|\\uD83E[\\uDC00-\\uDC0B\\uDC10-\\uDC47\\uDC50-\\uDC59\\uDC60-\\uDC87\\uDC90-\\uDCAD\\uDCB0\\uDCB1\\uDD00-\\uDE53\\uDE60-\\uDE6D\\uDE70-\\uDE7C\\uDE80-\\uDE88\\uDE90-\\uDEBD\\uDEBF-\\uDEC5\\uDECE-\\uDEDB\\uDEE0-\\uDEE8\\uDEF0-\\uDEF8\\uDF00-\\uDF92\\uDF94-\\uDFCA]/","export default /[ \\xA0\\u1680\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]/","export default /[\\xAD\\u0600-\\u0605\\u061C\\u06DD\\u070F\\u0890\\u0891\\u08E2\\u180E\\u200B-\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u2066-\\u206F\\uFEFF\\uFFF9-\\uFFFB]|\\uD804[\\uDCBD\\uDCCD]|\\uD80D[\\uDC30-\\uDC3F]|\\uD82F[\\uDCA0-\\uDCA3]|\\uD834[\\uDD73-\\uDD7A]|\\uDB40[\\uDC01\\uDC20-\\uDC7F]/","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u1d41<\\xd5\\u0131\\u028a\\u049d\\u057b\\u05d0\\u0675\\u06de\\u07a2\\u07d6\\u080f\\u0a4a\\u0a91\\u0da1\\u0e6d\\u0f09\\u0f26\\u10ca\\u1228\\u12e1\\u1415\\u149d\\u14c3\\u14df\\u1525\\0\\0\\0\\0\\0\\0\\u156b\\u16cd\\u198d\\u1c12\\u1ddd\\u1f7e\\u2060\\u21b0\\u228d\\u23c0\\u23fb\\u2442\\u2824\\u2912\\u2d08\\u2e48\\u2fce\\u3016\\u32ba\\u3639\\u37ac\\u38fe\\u3a28\\u3a71\\u3ae0\\u3b2e\\u0800EMabcfglmnoprstu\\\\bfms\\x7f\\x84\\x8b\\x90\\x95\\x98\\xa6\\xb3\\xb9\\xc8\\xcflig\\u803b\\xc6\\u40c6P\\u803b&\\u4026cute\\u803b\\xc1\\u40c1reve;\\u4102\\u0100iyx}rc\\u803b\\xc2\\u40c2;\\u4410r;\\uc000\\ud835\\udd04rave\\u803b\\xc0\\u40c0pha;\\u4391acr;\\u4100d;\\u6a53\\u0100gp\\x9d\\xa1on;\\u4104f;\\uc000\\ud835\\udd38plyFunction;\\u6061ing\\u803b\\xc5\\u40c5\\u0100cs\\xbe\\xc3r;\\uc000\\ud835\\udc9cign;\\u6254ilde\\u803b\\xc3\\u40c3ml\\u803b\\xc4\\u40c4\\u0400aceforsu\\xe5\\xfb\\xfe\\u0117\\u011c\\u0122\\u0127\\u012a\\u0100cr\\xea\\xf2kslash;\\u6216\\u0176\\xf6\\xf8;\\u6ae7ed;\\u6306y;\\u4411\\u0180crt\\u0105\\u010b\\u0114ause;\\u6235noullis;\\u612ca;\\u4392r;\\uc000\\ud835\\udd05pf;\\uc000\\ud835\\udd39eve;\\u42d8c\\xf2\\u0113mpeq;\\u624e\\u0700HOacdefhilorsu\\u014d\\u0151\\u0156\\u0180\\u019e\\u01a2\\u01b5\\u01b7\\u01ba\\u01dc\\u0215\\u0273\\u0278\\u027ecy;\\u4427PY\\u803b\\xa9\\u40a9\\u0180cpy\\u015d\\u0162\\u017aute;\\u4106\\u0100;i\\u0167\\u0168\\u62d2talDifferentialD;\\u6145leys;\\u612d\\u0200aeio\\u0189\\u018e\\u0194\\u0198ron;\\u410cdil\\u803b\\xc7\\u40c7rc;\\u4108nint;\\u6230ot;\\u410a\\u0100dn\\u01a7\\u01adilla;\\u40b8terDot;\\u40b7\\xf2\\u017fi;\\u43a7rcle\\u0200DMPT\\u01c7\\u01cb\\u01d1\\u01d6ot;\\u6299inus;\\u6296lus;\\u6295imes;\\u6297o\\u0100cs\\u01e2\\u01f8kwiseContourIntegral;\\u6232eCurly\\u0100DQ\\u0203\\u020foubleQuote;\\u601duote;\\u6019\\u0200lnpu\\u021e\\u0228\\u0247\\u0255on\\u0100;e\\u0225\\u0226\\u6237;\\u6a74\\u0180git\\u022f\\u0236\\u023aruent;\\u6261nt;\\u622fourIntegral;\\u622e\\u0100fr\\u024c\\u024e;\\u6102oduct;\\u6210nterClockwiseContourIntegral;\\u6233oss;\\u6a2fcr;\\uc000\\ud835\\udc9ep\\u0100;C\\u0284\\u0285\\u62d3ap;\\u624d\\u0580DJSZacefios\\u02a0\\u02ac\\u02b0\\u02b4\\u02b8\\u02cb\\u02d7\\u02e1\\u02e6\\u0333\\u048d\\u0100;o\\u0179\\u02a5trahd;\\u6911cy;\\u4402cy;\\u4405cy;\\u440f\\u0180grs\\u02bf\\u02c4\\u02c7ger;\\u6021r;\\u61a1hv;\\u6ae4\\u0100ay\\u02d0\\u02d5ron;\\u410e;\\u4414l\\u0100;t\\u02dd\\u02de\\u6207a;\\u4394r;\\uc000\\ud835\\udd07\\u0100af\\u02eb\\u0327\\u0100cm\\u02f0\\u0322ritical\\u0200ADGT\\u0300\\u0306\\u0316\\u031ccute;\\u40b4o\\u0174\\u030b\\u030d;\\u42d9bleAcute;\\u42ddrave;\\u4060ilde;\\u42dcond;\\u62c4ferentialD;\\u6146\\u0470\\u033d\\0\\0\\0\\u0342\\u0354\\0\\u0405f;\\uc000\\ud835\\udd3b\\u0180;DE\\u0348\\u0349\\u034d\\u40a8ot;\\u60dcqual;\\u6250ble\\u0300CDLRUV\\u0363\\u0372\\u0382\\u03cf\\u03e2\\u03f8ontourIntegra\\xec\\u0239o\\u0274\\u0379\\0\\0\\u037b\\xbb\\u0349nArrow;\\u61d3\\u0100eo\\u0387\\u03a4ft\\u0180ART\\u0390\\u0396\\u03a1rrow;\\u61d0ightArrow;\\u61d4e\\xe5\\u02cang\\u0100LR\\u03ab\\u03c4eft\\u0100AR\\u03b3\\u03b9rrow;\\u67f8ightArrow;\\u67faightArrow;\\u67f9ight\\u0100AT\\u03d8\\u03derrow;\\u61d2ee;\\u62a8p\\u0241\\u03e9\\0\\0\\u03efrrow;\\u61d1ownArrow;\\u61d5erticalBar;\\u6225n\\u0300ABLRTa\\u0412\\u042a\\u0430\\u045e\\u047f\\u037crrow\\u0180;BU\\u041d\\u041e\\u0422\\u6193ar;\\u6913pArrow;\\u61f5reve;\\u4311eft\\u02d2\\u043a\\0\\u0446\\0\\u0450ightVector;\\u6950eeVector;\\u695eector\\u0100;B\\u0459\\u045a\\u61bdar;\\u6956ight\\u01d4\\u0467\\0\\u0471eeVector;\\u695fector\\u0100;B\\u047a\\u047b\\u61c1ar;\\u6957ee\\u0100;A\\u0486\\u0487\\u62a4rrow;\\u61a7\\u0100ct\\u0492\\u0497r;\\uc000\\ud835\\udc9frok;\\u4110\\u0800NTacdfglmopqstux\\u04bd\\u04c0\\u04c4\\u04cb\\u04de\\u04e2\\u04e7\\u04ee\\u04f5\\u0521\\u052f\\u0536\\u0552\\u055d\\u0560\\u0565G;\\u414aH\\u803b\\xd0\\u40d0cute\\u803b\\xc9\\u40c9\\u0180aiy\\u04d2\\u04d7\\u04dcron;\\u411arc\\u803b\\xca\\u40ca;\\u442dot;\\u4116r;\\uc000\\ud835\\udd08rave\\u803b\\xc8\\u40c8ement;\\u6208\\u0100ap\\u04fa\\u04fecr;\\u4112ty\\u0253\\u0506\\0\\0\\u0512mallSquare;\\u65fberySmallSquare;\\u65ab\\u0100gp\\u0526\\u052aon;\\u4118f;\\uc000\\ud835\\udd3csilon;\\u4395u\\u0100ai\\u053c\\u0549l\\u0100;T\\u0542\\u0543\\u6a75ilde;\\u6242librium;\\u61cc\\u0100ci\\u0557\\u055ar;\\u6130m;\\u6a73a;\\u4397ml\\u803b\\xcb\\u40cb\\u0100ip\\u056a\\u056fsts;\\u6203onentialE;\\u6147\\u0280cfios\\u0585\\u0588\\u058d\\u05b2\\u05ccy;\\u4424r;\\uc000\\ud835\\udd09lled\\u0253\\u0597\\0\\0\\u05a3mallSquare;\\u65fcerySmallSquare;\\u65aa\\u0370\\u05ba\\0\\u05bf\\0\\0\\u05c4f;\\uc000\\ud835\\udd3dAll;\\u6200riertrf;\\u6131c\\xf2\\u05cb\\u0600JTabcdfgorst\\u05e8\\u05ec\\u05ef\\u05fa\\u0600\\u0612\\u0616\\u061b\\u061d\\u0623\\u066c\\u0672cy;\\u4403\\u803b>\\u403emma\\u0100;d\\u05f7\\u05f8\\u4393;\\u43dcreve;\\u411e\\u0180eiy\\u0607\\u060c\\u0610dil;\\u4122rc;\\u411c;\\u4413ot;\\u4120r;\\uc000\\ud835\\udd0a;\\u62d9pf;\\uc000\\ud835\\udd3eeater\\u0300EFGLST\\u0635\\u0644\\u064e\\u0656\\u065b\\u0666qual\\u0100;L\\u063e\\u063f\\u6265ess;\\u62dbullEqual;\\u6267reater;\\u6aa2ess;\\u6277lantEqual;\\u6a7eilde;\\u6273cr;\\uc000\\ud835\\udca2;\\u626b\\u0400Aacfiosu\\u0685\\u068b\\u0696\\u069b\\u069e\\u06aa\\u06be\\u06caRDcy;\\u442a\\u0100ct\\u0690\\u0694ek;\\u42c7;\\u405eirc;\\u4124r;\\u610clbertSpace;\\u610b\\u01f0\\u06af\\0\\u06b2f;\\u610dizontalLine;\\u6500\\u0100ct\\u06c3\\u06c5\\xf2\\u06a9rok;\\u4126mp\\u0144\\u06d0\\u06d8ownHum\\xf0\\u012fqual;\\u624f\\u0700EJOacdfgmnostu\\u06fa\\u06fe\\u0703\\u0707\\u070e\\u071a\\u071e\\u0721\\u0728\\u0744\\u0778\\u078b\\u078f\\u0795cy;\\u4415lig;\\u4132cy;\\u4401cute\\u803b\\xcd\\u40cd\\u0100iy\\u0713\\u0718rc\\u803b\\xce\\u40ce;\\u4418ot;\\u4130r;\\u6111rave\\u803b\\xcc\\u40cc\\u0180;ap\\u0720\\u072f\\u073f\\u0100cg\\u0734\\u0737r;\\u412ainaryI;\\u6148lie\\xf3\\u03dd\\u01f4\\u0749\\0\\u0762\\u0100;e\\u074d\\u074e\\u622c\\u0100gr\\u0753\\u0758ral;\\u622bsection;\\u62c2isible\\u0100CT\\u076c\\u0772omma;\\u6063imes;\\u6062\\u0180gpt\\u077f\\u0783\\u0788on;\\u412ef;\\uc000\\ud835\\udd40a;\\u4399cr;\\u6110ilde;\\u4128\\u01eb\\u079a\\0\\u079ecy;\\u4406l\\u803b\\xcf\\u40cf\\u0280cfosu\\u07ac\\u07b7\\u07bc\\u07c2\\u07d0\\u0100iy\\u07b1\\u07b5rc;\\u4134;\\u4419r;\\uc000\\ud835\\udd0dpf;\\uc000\\ud835\\udd41\\u01e3\\u07c7\\0\\u07ccr;\\uc000\\ud835\\udca5rcy;\\u4408kcy;\\u4404\\u0380HJacfos\\u07e4\\u07e8\\u07ec\\u07f1\\u07fd\\u0802\\u0808cy;\\u4425cy;\\u440cppa;\\u439a\\u0100ey\\u07f6\\u07fbdil;\\u4136;\\u441ar;\\uc000\\ud835\\udd0epf;\\uc000\\ud835\\udd42cr;\\uc000\\ud835\\udca6\\u0580JTaceflmost\\u0825\\u0829\\u082c\\u0850\\u0863\\u09b3\\u09b8\\u09c7\\u09cd\\u0a37\\u0a47cy;\\u4409\\u803b<\\u403c\\u0280cmnpr\\u0837\\u083c\\u0841\\u0844\\u084dute;\\u4139bda;\\u439bg;\\u67ealacetrf;\\u6112r;\\u619e\\u0180aey\\u0857\\u085c\\u0861ron;\\u413ddil;\\u413b;\\u441b\\u0100fs\\u0868\\u0970t\\u0500ACDFRTUVar\\u087e\\u08a9\\u08b1\\u08e0\\u08e6\\u08fc\\u092f\\u095b\\u0390\\u096a\\u0100nr\\u0883\\u088fgleBracket;\\u67e8row\\u0180;BR\\u0899\\u089a\\u089e\\u6190ar;\\u61e4ightArrow;\\u61c6eiling;\\u6308o\\u01f5\\u08b7\\0\\u08c3bleBracket;\\u67e6n\\u01d4\\u08c8\\0\\u08d2eeVector;\\u6961ector\\u0100;B\\u08db\\u08dc\\u61c3ar;\\u6959loor;\\u630aight\\u0100AV\\u08ef\\u08f5rrow;\\u6194ector;\\u694e\\u0100er\\u0901\\u0917e\\u0180;AV\\u0909\\u090a\\u0910\\u62a3rrow;\\u61a4ector;\\u695aiangle\\u0180;BE\\u0924\\u0925\\u0929\\u62b2ar;\\u69cfqual;\\u62b4p\\u0180DTV\\u0937\\u0942\\u094cownVector;\\u6951eeVector;\\u6960ector\\u0100;B\\u0956\\u0957\\u61bfar;\\u6958ector\\u0100;B\\u0965\\u0966\\u61bcar;\\u6952ight\\xe1\\u039cs\\u0300EFGLST\\u097e\\u098b\\u0995\\u099d\\u09a2\\u09adqualGreater;\\u62daullEqual;\\u6266reater;\\u6276ess;\\u6aa1lantEqual;\\u6a7dilde;\\u6272r;\\uc000\\ud835\\udd0f\\u0100;e\\u09bd\\u09be\\u62d8ftarrow;\\u61daidot;\\u413f\\u0180npw\\u09d4\\u0a16\\u0a1bg\\u0200LRlr\\u09de\\u09f7\\u0a02\\u0a10eft\\u0100AR\\u09e6\\u09ecrrow;\\u67f5ightArrow;\\u67f7ightArrow;\\u67f6eft\\u0100ar\\u03b3\\u0a0aight\\xe1\\u03bfight\\xe1\\u03caf;\\uc000\\ud835\\udd43er\\u0100LR\\u0a22\\u0a2ceftArrow;\\u6199ightArrow;\\u6198\\u0180cht\\u0a3e\\u0a40\\u0a42\\xf2\\u084c;\\u61b0rok;\\u4141;\\u626a\\u0400acefiosu\\u0a5a\\u0a5d\\u0a60\\u0a77\\u0a7c\\u0a85\\u0a8b\\u0a8ep;\\u6905y;\\u441c\\u0100dl\\u0a65\\u0a6fiumSpace;\\u605flintrf;\\u6133r;\\uc000\\ud835\\udd10nusPlus;\\u6213pf;\\uc000\\ud835\\udd44c\\xf2\\u0a76;\\u439c\\u0480Jacefostu\\u0aa3\\u0aa7\\u0aad\\u0ac0\\u0b14\\u0b19\\u0d91\\u0d97\\u0d9ecy;\\u440acute;\\u4143\\u0180aey\\u0ab4\\u0ab9\\u0aberon;\\u4147dil;\\u4145;\\u441d\\u0180gsw\\u0ac7\\u0af0\\u0b0eative\\u0180MTV\\u0ad3\\u0adf\\u0ae8ediumSpace;\\u600bhi\\u0100cn\\u0ae6\\u0ad8\\xeb\\u0ad9eryThi\\xee\\u0ad9ted\\u0100GL\\u0af8\\u0b06reaterGreate\\xf2\\u0673essLes\\xf3\\u0a48Line;\\u400ar;\\uc000\\ud835\\udd11\\u0200Bnpt\\u0b22\\u0b28\\u0b37\\u0b3areak;\\u6060BreakingSpace;\\u40a0f;\\u6115\\u0680;CDEGHLNPRSTV\\u0b55\\u0b56\\u0b6a\\u0b7c\\u0ba1\\u0beb\\u0c04\\u0c5e\\u0c84\\u0ca6\\u0cd8\\u0d61\\u0d85\\u6aec\\u0100ou\\u0b5b\\u0b64ngruent;\\u6262pCap;\\u626doubleVerticalBar;\\u6226\\u0180lqx\\u0b83\\u0b8a\\u0b9bement;\\u6209ual\\u0100;T\\u0b92\\u0b93\\u6260ilde;\\uc000\\u2242\\u0338ists;\\u6204reater\\u0380;EFGLST\\u0bb6\\u0bb7\\u0bbd\\u0bc9\\u0bd3\\u0bd8\\u0be5\\u626fqual;\\u6271ullEqual;\\uc000\\u2267\\u0338reater;\\uc000\\u226b\\u0338ess;\\u6279lantEqual;\\uc000\\u2a7e\\u0338ilde;\\u6275ump\\u0144\\u0bf2\\u0bfdownHump;\\uc000\\u224e\\u0338qual;\\uc000\\u224f\\u0338e\\u0100fs\\u0c0a\\u0c27tTriangle\\u0180;BE\\u0c1a\\u0c1b\\u0c21\\u62eaar;\\uc000\\u29cf\\u0338qual;\\u62ecs\\u0300;EGLST\\u0c35\\u0c36\\u0c3c\\u0c44\\u0c4b\\u0c58\\u626equal;\\u6270reater;\\u6278ess;\\uc000\\u226a\\u0338lantEqual;\\uc000\\u2a7d\\u0338ilde;\\u6274ested\\u0100GL\\u0c68\\u0c79reaterGreater;\\uc000\\u2aa2\\u0338essLess;\\uc000\\u2aa1\\u0338recedes\\u0180;ES\\u0c92\\u0c93\\u0c9b\\u6280qual;\\uc000\\u2aaf\\u0338lantEqual;\\u62e0\\u0100ei\\u0cab\\u0cb9verseElement;\\u620cghtTriangle\\u0180;BE\\u0ccb\\u0ccc\\u0cd2\\u62ebar;\\uc000\\u29d0\\u0338qual;\\u62ed\\u0100qu\\u0cdd\\u0d0cuareSu\\u0100bp\\u0ce8\\u0cf9set\\u0100;E\\u0cf0\\u0cf3\\uc000\\u228f\\u0338qual;\\u62e2erset\\u0100;E\\u0d03\\u0d06\\uc000\\u2290\\u0338qual;\\u62e3\\u0180bcp\\u0d13\\u0d24\\u0d4eset\\u0100;E\\u0d1b\\u0d1e\\uc000\\u2282\\u20d2qual;\\u6288ceeds\\u0200;EST\\u0d32\\u0d33\\u0d3b\\u0d46\\u6281qual;\\uc000\\u2ab0\\u0338lantEqual;\\u62e1ilde;\\uc000\\u227f\\u0338erset\\u0100;E\\u0d58\\u0d5b\\uc000\\u2283\\u20d2qual;\\u6289ilde\\u0200;EFT\\u0d6e\\u0d6f\\u0d75\\u0d7f\\u6241qual;\\u6244ullEqual;\\u6247ilde;\\u6249erticalBar;\\u6224cr;\\uc000\\ud835\\udca9ilde\\u803b\\xd1\\u40d1;\\u439d\\u0700Eacdfgmoprstuv\\u0dbd\\u0dc2\\u0dc9\\u0dd5\\u0ddb\\u0de0\\u0de7\\u0dfc\\u0e02\\u0e20\\u0e22\\u0e32\\u0e3f\\u0e44lig;\\u4152cute\\u803b\\xd3\\u40d3\\u0100iy\\u0dce\\u0dd3rc\\u803b\\xd4\\u40d4;\\u441eblac;\\u4150r;\\uc000\\ud835\\udd12rave\\u803b\\xd2\\u40d2\\u0180aei\\u0dee\\u0df2\\u0df6cr;\\u414cga;\\u43a9cron;\\u439fpf;\\uc000\\ud835\\udd46enCurly\\u0100DQ\\u0e0e\\u0e1aoubleQuote;\\u601cuote;\\u6018;\\u6a54\\u0100cl\\u0e27\\u0e2cr;\\uc000\\ud835\\udcaaash\\u803b\\xd8\\u40d8i\\u016c\\u0e37\\u0e3cde\\u803b\\xd5\\u40d5es;\\u6a37ml\\u803b\\xd6\\u40d6er\\u0100BP\\u0e4b\\u0e60\\u0100ar\\u0e50\\u0e53r;\\u603eac\\u0100ek\\u0e5a\\u0e5c;\\u63deet;\\u63b4arenthesis;\\u63dc\\u0480acfhilors\\u0e7f\\u0e87\\u0e8a\\u0e8f\\u0e92\\u0e94\\u0e9d\\u0eb0\\u0efcrtialD;\\u6202y;\\u441fr;\\uc000\\ud835\\udd13i;\\u43a6;\\u43a0usMinus;\\u40b1\\u0100ip\\u0ea2\\u0eadncareplan\\xe5\\u069df;\\u6119\\u0200;eio\\u0eb9\\u0eba\\u0ee0\\u0ee4\\u6abbcedes\\u0200;EST\\u0ec8\\u0ec9\\u0ecf\\u0eda\\u627aqual;\\u6aaflantEqual;\\u627cilde;\\u627eme;\\u6033\\u0100dp\\u0ee9\\u0eeeuct;\\u620fortion\\u0100;a\\u0225\\u0ef9l;\\u621d\\u0100ci\\u0f01\\u0f06r;\\uc000\\ud835\\udcab;\\u43a8\\u0200Ufos\\u0f11\\u0f16\\u0f1b\\u0f1fOT\\u803b\\\"\\u4022r;\\uc000\\ud835\\udd14pf;\\u611acr;\\uc000\\ud835\\udcac\\u0600BEacefhiorsu\\u0f3e\\u0f43\\u0f47\\u0f60\\u0f73\\u0fa7\\u0faa\\u0fad\\u1096\\u10a9\\u10b4\\u10bearr;\\u6910G\\u803b\\xae\\u40ae\\u0180cnr\\u0f4e\\u0f53\\u0f56ute;\\u4154g;\\u67ebr\\u0100;t\\u0f5c\\u0f5d\\u61a0l;\\u6916\\u0180aey\\u0f67\\u0f6c\\u0f71ron;\\u4158dil;\\u4156;\\u4420\\u0100;v\\u0f78\\u0f79\\u611cerse\\u0100EU\\u0f82\\u0f99\\u0100lq\\u0f87\\u0f8eement;\\u620builibrium;\\u61cbpEquilibrium;\\u696fr\\xbb\\u0f79o;\\u43a1ght\\u0400ACDFTUVa\\u0fc1\\u0feb\\u0ff3\\u1022\\u1028\\u105b\\u1087\\u03d8\\u0100nr\\u0fc6\\u0fd2gleBracket;\\u67e9row\\u0180;BL\\u0fdc\\u0fdd\\u0fe1\\u6192ar;\\u61e5eftArrow;\\u61c4eiling;\\u6309o\\u01f5\\u0ff9\\0\\u1005bleBracket;\\u67e7n\\u01d4\\u100a\\0\\u1014eeVector;\\u695dector\\u0100;B\\u101d\\u101e\\u61c2ar;\\u6955loor;\\u630b\\u0100er\\u102d\\u1043e\\u0180;AV\\u1035\\u1036\\u103c\\u62a2rrow;\\u61a6ector;\\u695biangle\\u0180;BE\\u1050\\u1051\\u1055\\u62b3ar;\\u69d0qual;\\u62b5p\\u0180DTV\\u1063\\u106e\\u1078ownVector;\\u694feeVector;\\u695cector\\u0100;B\\u1082\\u1083\\u61bear;\\u6954ector\\u0100;B\\u1091\\u1092\\u61c0ar;\\u6953\\u0100pu\\u109b\\u109ef;\\u611dndImplies;\\u6970ightarrow;\\u61db\\u0100ch\\u10b9\\u10bcr;\\u611b;\\u61b1leDelayed;\\u69f4\\u0680HOacfhimoqstu\\u10e4\\u10f1\\u10f7\\u10fd\\u1119\\u111e\\u1151\\u1156\\u1161\\u1167\\u11b5\\u11bb\\u11bf\\u0100Cc\\u10e9\\u10eeHcy;\\u4429y;\\u4428FTcy;\\u442ccute;\\u415a\\u0280;aeiy\\u1108\\u1109\\u110e\\u1113\\u1117\\u6abcron;\\u4160dil;\\u415erc;\\u415c;\\u4421r;\\uc000\\ud835\\udd16ort\\u0200DLRU\\u112a\\u1134\\u113e\\u1149ownArrow\\xbb\\u041eeftArrow\\xbb\\u089aightArrow\\xbb\\u0fddpArrow;\\u6191gma;\\u43a3allCircle;\\u6218pf;\\uc000\\ud835\\udd4a\\u0272\\u116d\\0\\0\\u1170t;\\u621aare\\u0200;ISU\\u117b\\u117c\\u1189\\u11af\\u65a1ntersection;\\u6293u\\u0100bp\\u118f\\u119eset\\u0100;E\\u1197\\u1198\\u628fqual;\\u6291erset\\u0100;E\\u11a8\\u11a9\\u6290qual;\\u6292nion;\\u6294cr;\\uc000\\ud835\\udcaear;\\u62c6\\u0200bcmp\\u11c8\\u11db\\u1209\\u120b\\u0100;s\\u11cd\\u11ce\\u62d0et\\u0100;E\\u11cd\\u11d5qual;\\u6286\\u0100ch\\u11e0\\u1205eeds\\u0200;EST\\u11ed\\u11ee\\u11f4\\u11ff\\u627bqual;\\u6ab0lantEqual;\\u627dilde;\\u627fTh\\xe1\\u0f8c;\\u6211\\u0180;es\\u1212\\u1213\\u1223\\u62d1rset\\u0100;E\\u121c\\u121d\\u6283qual;\\u6287et\\xbb\\u1213\\u0580HRSacfhiors\\u123e\\u1244\\u1249\\u1255\\u125e\\u1271\\u1276\\u129f\\u12c2\\u12c8\\u12d1ORN\\u803b\\xde\\u40deADE;\\u6122\\u0100Hc\\u124e\\u1252cy;\\u440by;\\u4426\\u0100bu\\u125a\\u125c;\\u4009;\\u43a4\\u0180aey\\u1265\\u126a\\u126fron;\\u4164dil;\\u4162;\\u4422r;\\uc000\\ud835\\udd17\\u0100ei\\u127b\\u1289\\u01f2\\u1280\\0\\u1287efore;\\u6234a;\\u4398\\u0100cn\\u128e\\u1298kSpace;\\uc000\\u205f\\u200aSpace;\\u6009lde\\u0200;EFT\\u12ab\\u12ac\\u12b2\\u12bc\\u623cqual;\\u6243ullEqual;\\u6245ilde;\\u6248pf;\\uc000\\ud835\\udd4bipleDot;\\u60db\\u0100ct\\u12d6\\u12dbr;\\uc000\\ud835\\udcafrok;\\u4166\\u0ae1\\u12f7\\u130e\\u131a\\u1326\\0\\u132c\\u1331\\0\\0\\0\\0\\0\\u1338\\u133d\\u1377\\u1385\\0\\u13ff\\u1404\\u140a\\u1410\\u0100cr\\u12fb\\u1301ute\\u803b\\xda\\u40dar\\u0100;o\\u1307\\u1308\\u619fcir;\\u6949r\\u01e3\\u1313\\0\\u1316y;\\u440eve;\\u416c\\u0100iy\\u131e\\u1323rc\\u803b\\xdb\\u40db;\\u4423blac;\\u4170r;\\uc000\\ud835\\udd18rave\\u803b\\xd9\\u40d9acr;\\u416a\\u0100di\\u1341\\u1369er\\u0100BP\\u1348\\u135d\\u0100ar\\u134d\\u1350r;\\u405fac\\u0100ek\\u1357\\u1359;\\u63dfet;\\u63b5arenthesis;\\u63ddon\\u0100;P\\u1370\\u1371\\u62c3lus;\\u628e\\u0100gp\\u137b\\u137fon;\\u4172f;\\uc000\\ud835\\udd4c\\u0400ADETadps\\u1395\\u13ae\\u13b8\\u13c4\\u03e8\\u13d2\\u13d7\\u13f3rrow\\u0180;BD\\u1150\\u13a0\\u13a4ar;\\u6912ownArrow;\\u61c5ownArrow;\\u6195quilibrium;\\u696eee\\u0100;A\\u13cb\\u13cc\\u62a5rrow;\\u61a5own\\xe1\\u03f3er\\u0100LR\\u13de\\u13e8eftArrow;\\u6196ightArrow;\\u6197i\\u0100;l\\u13f9\\u13fa\\u43d2on;\\u43a5ing;\\u416ecr;\\uc000\\ud835\\udcb0ilde;\\u4168ml\\u803b\\xdc\\u40dc\\u0480Dbcdefosv\\u1427\\u142c\\u1430\\u1433\\u143e\\u1485\\u148a\\u1490\\u1496ash;\\u62abar;\\u6aeby;\\u4412ash\\u0100;l\\u143b\\u143c\\u62a9;\\u6ae6\\u0100er\\u1443\\u1445;\\u62c1\\u0180bty\\u144c\\u1450\\u147aar;\\u6016\\u0100;i\\u144f\\u1455cal\\u0200BLST\\u1461\\u1465\\u146a\\u1474ar;\\u6223ine;\\u407ceparator;\\u6758ilde;\\u6240ThinSpace;\\u600ar;\\uc000\\ud835\\udd19pf;\\uc000\\ud835\\udd4dcr;\\uc000\\ud835\\udcb1dash;\\u62aa\\u0280cefos\\u14a7\\u14ac\\u14b1\\u14b6\\u14bcirc;\\u4174dge;\\u62c0r;\\uc000\\ud835\\udd1apf;\\uc000\\ud835\\udd4ecr;\\uc000\\ud835\\udcb2\\u0200fios\\u14cb\\u14d0\\u14d2\\u14d8r;\\uc000\\ud835\\udd1b;\\u439epf;\\uc000\\ud835\\udd4fcr;\\uc000\\ud835\\udcb3\\u0480AIUacfosu\\u14f1\\u14f5\\u14f9\\u14fd\\u1504\\u150f\\u1514\\u151a\\u1520cy;\\u442fcy;\\u4407cy;\\u442ecute\\u803b\\xdd\\u40dd\\u0100iy\\u1509\\u150drc;\\u4176;\\u442br;\\uc000\\ud835\\udd1cpf;\\uc000\\ud835\\udd50cr;\\uc000\\ud835\\udcb4ml;\\u4178\\u0400Hacdefos\\u1535\\u1539\\u153f\\u154b\\u154f\\u155d\\u1560\\u1564cy;\\u4416cute;\\u4179\\u0100ay\\u1544\\u1549ron;\\u417d;\\u4417ot;\\u417b\\u01f2\\u1554\\0\\u155boWidt\\xe8\\u0ad9a;\\u4396r;\\u6128pf;\\u6124cr;\\uc000\\ud835\\udcb5\\u0be1\\u1583\\u158a\\u1590\\0\\u15b0\\u15b6\\u15bf\\0\\0\\0\\0\\u15c6\\u15db\\u15eb\\u165f\\u166d\\0\\u1695\\u169b\\u16b2\\u16b9\\0\\u16becute\\u803b\\xe1\\u40e1reve;\\u4103\\u0300;Ediuy\\u159c\\u159d\\u15a1\\u15a3\\u15a8\\u15ad\\u623e;\\uc000\\u223e\\u0333;\\u623frc\\u803b\\xe2\\u40e2te\\u80bb\\xb4\\u0306;\\u4430lig\\u803b\\xe6\\u40e6\\u0100;r\\xb2\\u15ba;\\uc000\\ud835\\udd1erave\\u803b\\xe0\\u40e0\\u0100ep\\u15ca\\u15d6\\u0100fp\\u15cf\\u15d4sym;\\u6135\\xe8\\u15d3ha;\\u43b1\\u0100ap\\u15dfc\\u0100cl\\u15e4\\u15e7r;\\u4101g;\\u6a3f\\u0264\\u15f0\\0\\0\\u160a\\u0280;adsv\\u15fa\\u15fb\\u15ff\\u1601\\u1607\\u6227nd;\\u6a55;\\u6a5clope;\\u6a58;\\u6a5a\\u0380;elmrsz\\u1618\\u1619\\u161b\\u161e\\u163f\\u164f\\u1659\\u6220;\\u69a4e\\xbb\\u1619sd\\u0100;a\\u1625\\u1626\\u6221\\u0461\\u1630\\u1632\\u1634\\u1636\\u1638\\u163a\\u163c\\u163e;\\u69a8;\\u69a9;\\u69aa;\\u69ab;\\u69ac;\\u69ad;\\u69ae;\\u69aft\\u0100;v\\u1645\\u1646\\u621fb\\u0100;d\\u164c\\u164d\\u62be;\\u699d\\u0100pt\\u1654\\u1657h;\\u6222\\xbb\\xb9arr;\\u637c\\u0100gp\\u1663\\u1667on;\\u4105f;\\uc000\\ud835\\udd52\\u0380;Eaeiop\\u12c1\\u167b\\u167d\\u1682\\u1684\\u1687\\u168a;\\u6a70cir;\\u6a6f;\\u624ad;\\u624bs;\\u4027rox\\u0100;e\\u12c1\\u1692\\xf1\\u1683ing\\u803b\\xe5\\u40e5\\u0180cty\\u16a1\\u16a6\\u16a8r;\\uc000\\ud835\\udcb6;\\u402amp\\u0100;e\\u12c1\\u16af\\xf1\\u0288ilde\\u803b\\xe3\\u40e3ml\\u803b\\xe4\\u40e4\\u0100ci\\u16c2\\u16c8onin\\xf4\\u0272nt;\\u6a11\\u0800Nabcdefiklnoprsu\\u16ed\\u16f1\\u1730\\u173c\\u1743\\u1748\\u1778\\u177d\\u17e0\\u17e6\\u1839\\u1850\\u170d\\u193d\\u1948\\u1970ot;\\u6aed\\u0100cr\\u16f6\\u171ek\\u0200ceps\\u1700\\u1705\\u170d\\u1713ong;\\u624cpsilon;\\u43f6rime;\\u6035im\\u0100;e\\u171a\\u171b\\u623dq;\\u62cd\\u0176\\u1722\\u1726ee;\\u62bded\\u0100;g\\u172c\\u172d\\u6305e\\xbb\\u172drk\\u0100;t\\u135c\\u1737brk;\\u63b6\\u0100oy\\u1701\\u1741;\\u4431quo;\\u601e\\u0280cmprt\\u1753\\u175b\\u1761\\u1764\\u1768aus\\u0100;e\\u010a\\u0109ptyv;\\u69b0s\\xe9\\u170cno\\xf5\\u0113\\u0180ahw\\u176f\\u1771\\u1773;\\u43b2;\\u6136een;\\u626cr;\\uc000\\ud835\\udd1fg\\u0380costuvw\\u178d\\u179d\\u17b3\\u17c1\\u17d5\\u17db\\u17de\\u0180aiu\\u1794\\u1796\\u179a\\xf0\\u0760rc;\\u65efp\\xbb\\u1371\\u0180dpt\\u17a4\\u17a8\\u17adot;\\u6a00lus;\\u6a01imes;\\u6a02\\u0271\\u17b9\\0\\0\\u17becup;\\u6a06ar;\\u6605riangle\\u0100du\\u17cd\\u17d2own;\\u65bdp;\\u65b3plus;\\u6a04e\\xe5\\u1444\\xe5\\u14adarow;\\u690d\\u0180ako\\u17ed\\u1826\\u1835\\u0100cn\\u17f2\\u1823k\\u0180lst\\u17fa\\u05ab\\u1802ozenge;\\u69ebriangle\\u0200;dlr\\u1812\\u1813\\u1818\\u181d\\u65b4own;\\u65beeft;\\u65c2ight;\\u65b8k;\\u6423\\u01b1\\u182b\\0\\u1833\\u01b2\\u182f\\0\\u1831;\\u6592;\\u65914;\\u6593ck;\\u6588\\u0100eo\\u183e\\u184d\\u0100;q\\u1843\\u1846\\uc000=\\u20e5uiv;\\uc000\\u2261\\u20e5t;\\u6310\\u0200ptwx\\u1859\\u185e\\u1867\\u186cf;\\uc000\\ud835\\udd53\\u0100;t\\u13cb\\u1863om\\xbb\\u13cctie;\\u62c8\\u0600DHUVbdhmptuv\\u1885\\u1896\\u18aa\\u18bb\\u18d7\\u18db\\u18ec\\u18ff\\u1905\\u190a\\u1910\\u1921\\u0200LRlr\\u188e\\u1890\\u1892\\u1894;\\u6557;\\u6554;\\u6556;\\u6553\\u0280;DUdu\\u18a1\\u18a2\\u18a4\\u18a6\\u18a8\\u6550;\\u6566;\\u6569;\\u6564;\\u6567\\u0200LRlr\\u18b3\\u18b5\\u18b7\\u18b9;\\u655d;\\u655a;\\u655c;\\u6559\\u0380;HLRhlr\\u18ca\\u18cb\\u18cd\\u18cf\\u18d1\\u18d3\\u18d5\\u6551;\\u656c;\\u6563;\\u6560;\\u656b;\\u6562;\\u655fox;\\u69c9\\u0200LRlr\\u18e4\\u18e6\\u18e8\\u18ea;\\u6555;\\u6552;\\u6510;\\u650c\\u0280;DUdu\\u06bd\\u18f7\\u18f9\\u18fb\\u18fd;\\u6565;\\u6568;\\u652c;\\u6534inus;\\u629flus;\\u629eimes;\\u62a0\\u0200LRlr\\u1919\\u191b\\u191d\\u191f;\\u655b;\\u6558;\\u6518;\\u6514\\u0380;HLRhlr\\u1930\\u1931\\u1933\\u1935\\u1937\\u1939\\u193b\\u6502;\\u656a;\\u6561;\\u655e;\\u653c;\\u6524;\\u651c\\u0100ev\\u0123\\u1942bar\\u803b\\xa6\\u40a6\\u0200ceio\\u1951\\u1956\\u195a\\u1960r;\\uc000\\ud835\\udcb7mi;\\u604fm\\u0100;e\\u171a\\u171cl\\u0180;bh\\u1968\\u1969\\u196b\\u405c;\\u69c5sub;\\u67c8\\u016c\\u1974\\u197el\\u0100;e\\u1979\\u197a\\u6022t\\xbb\\u197ap\\u0180;Ee\\u012f\\u1985\\u1987;\\u6aae\\u0100;q\\u06dc\\u06db\\u0ce1\\u19a7\\0\\u19e8\\u1a11\\u1a15\\u1a32\\0\\u1a37\\u1a50\\0\\0\\u1ab4\\0\\0\\u1ac1\\0\\0\\u1b21\\u1b2e\\u1b4d\\u1b52\\0\\u1bfd\\0\\u1c0c\\u0180cpr\\u19ad\\u19b2\\u19ddute;\\u4107\\u0300;abcds\\u19bf\\u19c0\\u19c4\\u19ca\\u19d5\\u19d9\\u6229nd;\\u6a44rcup;\\u6a49\\u0100au\\u19cf\\u19d2p;\\u6a4bp;\\u6a47ot;\\u6a40;\\uc000\\u2229\\ufe00\\u0100eo\\u19e2\\u19e5t;\\u6041\\xee\\u0693\\u0200aeiu\\u19f0\\u19fb\\u1a01\\u1a05\\u01f0\\u19f5\\0\\u19f8s;\\u6a4don;\\u410ddil\\u803b\\xe7\\u40e7rc;\\u4109ps\\u0100;s\\u1a0c\\u1a0d\\u6a4cm;\\u6a50ot;\\u410b\\u0180dmn\\u1a1b\\u1a20\\u1a26il\\u80bb\\xb8\\u01adptyv;\\u69b2t\\u8100\\xa2;e\\u1a2d\\u1a2e\\u40a2r\\xe4\\u01b2r;\\uc000\\ud835\\udd20\\u0180cei\\u1a3d\\u1a40\\u1a4dy;\\u4447ck\\u0100;m\\u1a47\\u1a48\\u6713ark\\xbb\\u1a48;\\u43c7r\\u0380;Ecefms\\u1a5f\\u1a60\\u1a62\\u1a6b\\u1aa4\\u1aaa\\u1aae\\u65cb;\\u69c3\\u0180;el\\u1a69\\u1a6a\\u1a6d\\u42c6q;\\u6257e\\u0261\\u1a74\\0\\0\\u1a88rrow\\u0100lr\\u1a7c\\u1a81eft;\\u61baight;\\u61bb\\u0280RSacd\\u1a92\\u1a94\\u1a96\\u1a9a\\u1a9f\\xbb\\u0f47;\\u64c8st;\\u629birc;\\u629aash;\\u629dnint;\\u6a10id;\\u6aefcir;\\u69c2ubs\\u0100;u\\u1abb\\u1abc\\u6663it\\xbb\\u1abc\\u02ec\\u1ac7\\u1ad4\\u1afa\\0\\u1b0aon\\u0100;e\\u1acd\\u1ace\\u403a\\u0100;q\\xc7\\xc6\\u026d\\u1ad9\\0\\0\\u1ae2a\\u0100;t\\u1ade\\u1adf\\u402c;\\u4040\\u0180;fl\\u1ae8\\u1ae9\\u1aeb\\u6201\\xee\\u1160e\\u0100mx\\u1af1\\u1af6ent\\xbb\\u1ae9e\\xf3\\u024d\\u01e7\\u1afe\\0\\u1b07\\u0100;d\\u12bb\\u1b02ot;\\u6a6dn\\xf4\\u0246\\u0180fry\\u1b10\\u1b14\\u1b17;\\uc000\\ud835\\udd54o\\xe4\\u0254\\u8100\\xa9;s\\u0155\\u1b1dr;\\u6117\\u0100ao\\u1b25\\u1b29rr;\\u61b5ss;\\u6717\\u0100cu\\u1b32\\u1b37r;\\uc000\\ud835\\udcb8\\u0100bp\\u1b3c\\u1b44\\u0100;e\\u1b41\\u1b42\\u6acf;\\u6ad1\\u0100;e\\u1b49\\u1b4a\\u6ad0;\\u6ad2dot;\\u62ef\\u0380delprvw\\u1b60\\u1b6c\\u1b77\\u1b82\\u1bac\\u1bd4\\u1bf9arr\\u0100lr\\u1b68\\u1b6a;\\u6938;\\u6935\\u0270\\u1b72\\0\\0\\u1b75r;\\u62dec;\\u62dfarr\\u0100;p\\u1b7f\\u1b80\\u61b6;\\u693d\\u0300;bcdos\\u1b8f\\u1b90\\u1b96\\u1ba1\\u1ba5\\u1ba8\\u622arcap;\\u6a48\\u0100au\\u1b9b\\u1b9ep;\\u6a46p;\\u6a4aot;\\u628dr;\\u6a45;\\uc000\\u222a\\ufe00\\u0200alrv\\u1bb5\\u1bbf\\u1bde\\u1be3rr\\u0100;m\\u1bbc\\u1bbd\\u61b7;\\u693cy\\u0180evw\\u1bc7\\u1bd4\\u1bd8q\\u0270\\u1bce\\0\\0\\u1bd2re\\xe3\\u1b73u\\xe3\\u1b75ee;\\u62ceedge;\\u62cfen\\u803b\\xa4\\u40a4earrow\\u0100lr\\u1bee\\u1bf3eft\\xbb\\u1b80ight\\xbb\\u1bbde\\xe4\\u1bdd\\u0100ci\\u1c01\\u1c07onin\\xf4\\u01f7nt;\\u6231lcty;\\u632d\\u0980AHabcdefhijlorstuwz\\u1c38\\u1c3b\\u1c3f\\u1c5d\\u1c69\\u1c75\\u1c8a\\u1c9e\\u1cac\\u1cb7\\u1cfb\\u1cff\\u1d0d\\u1d7b\\u1d91\\u1dab\\u1dbb\\u1dc6\\u1dcdr\\xf2\\u0381ar;\\u6965\\u0200glrs\\u1c48\\u1c4d\\u1c52\\u1c54ger;\\u6020eth;\\u6138\\xf2\\u1133h\\u0100;v\\u1c5a\\u1c5b\\u6010\\xbb\\u090a\\u016b\\u1c61\\u1c67arow;\\u690fa\\xe3\\u0315\\u0100ay\\u1c6e\\u1c73ron;\\u410f;\\u4434\\u0180;ao\\u0332\\u1c7c\\u1c84\\u0100gr\\u02bf\\u1c81r;\\u61catseq;\\u6a77\\u0180glm\\u1c91\\u1c94\\u1c98\\u803b\\xb0\\u40b0ta;\\u43b4ptyv;\\u69b1\\u0100ir\\u1ca3\\u1ca8sht;\\u697f;\\uc000\\ud835\\udd21ar\\u0100lr\\u1cb3\\u1cb5\\xbb\\u08dc\\xbb\\u101e\\u0280aegsv\\u1cc2\\u0378\\u1cd6\\u1cdc\\u1ce0m\\u0180;os\\u0326\\u1cca\\u1cd4nd\\u0100;s\\u0326\\u1cd1uit;\\u6666amma;\\u43ddin;\\u62f2\\u0180;io\\u1ce7\\u1ce8\\u1cf8\\u40f7de\\u8100\\xf7;o\\u1ce7\\u1cf0ntimes;\\u62c7n\\xf8\\u1cf7cy;\\u4452c\\u026f\\u1d06\\0\\0\\u1d0arn;\\u631eop;\\u630d\\u0280lptuw\\u1d18\\u1d1d\\u1d22\\u1d49\\u1d55lar;\\u4024f;\\uc000\\ud835\\udd55\\u0280;emps\\u030b\\u1d2d\\u1d37\\u1d3d\\u1d42q\\u0100;d\\u0352\\u1d33ot;\\u6251inus;\\u6238lus;\\u6214quare;\\u62a1blebarwedg\\xe5\\xfan\\u0180adh\\u112e\\u1d5d\\u1d67ownarrow\\xf3\\u1c83arpoon\\u0100lr\\u1d72\\u1d76ef\\xf4\\u1cb4igh\\xf4\\u1cb6\\u0162\\u1d7f\\u1d85karo\\xf7\\u0f42\\u026f\\u1d8a\\0\\0\\u1d8ern;\\u631fop;\\u630c\\u0180cot\\u1d98\\u1da3\\u1da6\\u0100ry\\u1d9d\\u1da1;\\uc000\\ud835\\udcb9;\\u4455l;\\u69f6rok;\\u4111\\u0100dr\\u1db0\\u1db4ot;\\u62f1i\\u0100;f\\u1dba\\u1816\\u65bf\\u0100ah\\u1dc0\\u1dc3r\\xf2\\u0429a\\xf2\\u0fa6angle;\\u69a6\\u0100ci\\u1dd2\\u1dd5y;\\u445fgrarr;\\u67ff\\u0900Dacdefglmnopqrstux\\u1e01\\u1e09\\u1e19\\u1e38\\u0578\\u1e3c\\u1e49\\u1e61\\u1e7e\\u1ea5\\u1eaf\\u1ebd\\u1ee1\\u1f2a\\u1f37\\u1f44\\u1f4e\\u1f5a\\u0100Do\\u1e06\\u1d34o\\xf4\\u1c89\\u0100cs\\u1e0e\\u1e14ute\\u803b\\xe9\\u40e9ter;\\u6a6e\\u0200aioy\\u1e22\\u1e27\\u1e31\\u1e36ron;\\u411br\\u0100;c\\u1e2d\\u1e2e\\u6256\\u803b\\xea\\u40ealon;\\u6255;\\u444dot;\\u4117\\u0100Dr\\u1e41\\u1e45ot;\\u6252;\\uc000\\ud835\\udd22\\u0180;rs\\u1e50\\u1e51\\u1e57\\u6a9aave\\u803b\\xe8\\u40e8\\u0100;d\\u1e5c\\u1e5d\\u6a96ot;\\u6a98\\u0200;ils\\u1e6a\\u1e6b\\u1e72\\u1e74\\u6a99nters;\\u63e7;\\u6113\\u0100;d\\u1e79\\u1e7a\\u6a95ot;\\u6a97\\u0180aps\\u1e85\\u1e89\\u1e97cr;\\u4113ty\\u0180;sv\\u1e92\\u1e93\\u1e95\\u6205et\\xbb\\u1e93p\\u01001;\\u1e9d\\u1ea4\\u0133\\u1ea1\\u1ea3;\\u6004;\\u6005\\u6003\\u0100gs\\u1eaa\\u1eac;\\u414bp;\\u6002\\u0100gp\\u1eb4\\u1eb8on;\\u4119f;\\uc000\\ud835\\udd56\\u0180als\\u1ec4\\u1ece\\u1ed2r\\u0100;s\\u1eca\\u1ecb\\u62d5l;\\u69e3us;\\u6a71i\\u0180;lv\\u1eda\\u1edb\\u1edf\\u43b5on\\xbb\\u1edb;\\u43f5\\u0200csuv\\u1eea\\u1ef3\\u1f0b\\u1f23\\u0100io\\u1eef\\u1e31rc\\xbb\\u1e2e\\u0269\\u1ef9\\0\\0\\u1efb\\xed\\u0548ant\\u0100gl\\u1f02\\u1f06tr\\xbb\\u1e5dess\\xbb\\u1e7a\\u0180aei\\u1f12\\u1f16\\u1f1als;\\u403dst;\\u625fv\\u0100;D\\u0235\\u1f20D;\\u6a78parsl;\\u69e5\\u0100Da\\u1f2f\\u1f33ot;\\u6253rr;\\u6971\\u0180cdi\\u1f3e\\u1f41\\u1ef8r;\\u612fo\\xf4\\u0352\\u0100ah\\u1f49\\u1f4b;\\u43b7\\u803b\\xf0\\u40f0\\u0100mr\\u1f53\\u1f57l\\u803b\\xeb\\u40ebo;\\u60ac\\u0180cip\\u1f61\\u1f64\\u1f67l;\\u4021s\\xf4\\u056e\\u0100eo\\u1f6c\\u1f74ctatio\\xee\\u0559nential\\xe5\\u0579\\u09e1\\u1f92\\0\\u1f9e\\0\\u1fa1\\u1fa7\\0\\0\\u1fc6\\u1fcc\\0\\u1fd3\\0\\u1fe6\\u1fea\\u2000\\0\\u2008\\u205allingdotse\\xf1\\u1e44y;\\u4444male;\\u6640\\u0180ilr\\u1fad\\u1fb3\\u1fc1lig;\\u8000\\ufb03\\u0269\\u1fb9\\0\\0\\u1fbdg;\\u8000\\ufb00ig;\\u8000\\ufb04;\\uc000\\ud835\\udd23lig;\\u8000\\ufb01lig;\\uc000fj\\u0180alt\\u1fd9\\u1fdc\\u1fe1t;\\u666dig;\\u8000\\ufb02ns;\\u65b1of;\\u4192\\u01f0\\u1fee\\0\\u1ff3f;\\uc000\\ud835\\udd57\\u0100ak\\u05bf\\u1ff7\\u0100;v\\u1ffc\\u1ffd\\u62d4;\\u6ad9artint;\\u6a0d\\u0100ao\\u200c\\u2055\\u0100cs\\u2011\\u2052\\u03b1\\u201a\\u2030\\u2038\\u2045\\u2048\\0\\u2050\\u03b2\\u2022\\u2025\\u2027\\u202a\\u202c\\0\\u202e\\u803b\\xbd\\u40bd;\\u6153\\u803b\\xbc\\u40bc;\\u6155;\\u6159;\\u615b\\u01b3\\u2034\\0\\u2036;\\u6154;\\u6156\\u02b4\\u203e\\u2041\\0\\0\\u2043\\u803b\\xbe\\u40be;\\u6157;\\u615c5;\\u6158\\u01b6\\u204c\\0\\u204e;\\u615a;\\u615d8;\\u615el;\\u6044wn;\\u6322cr;\\uc000\\ud835\\udcbb\\u0880Eabcdefgijlnorstv\\u2082\\u2089\\u209f\\u20a5\\u20b0\\u20b4\\u20f0\\u20f5\\u20fa\\u20ff\\u2103\\u2112\\u2138\\u0317\\u213e\\u2152\\u219e\\u0100;l\\u064d\\u2087;\\u6a8c\\u0180cmp\\u2090\\u2095\\u209dute;\\u41f5ma\\u0100;d\\u209c\\u1cda\\u43b3;\\u6a86reve;\\u411f\\u0100iy\\u20aa\\u20aerc;\\u411d;\\u4433ot;\\u4121\\u0200;lqs\\u063e\\u0642\\u20bd\\u20c9\\u0180;qs\\u063e\\u064c\\u20c4lan\\xf4\\u0665\\u0200;cdl\\u0665\\u20d2\\u20d5\\u20e5c;\\u6aa9ot\\u0100;o\\u20dc\\u20dd\\u6a80\\u0100;l\\u20e2\\u20e3\\u6a82;\\u6a84\\u0100;e\\u20ea\\u20ed\\uc000\\u22db\\ufe00s;\\u6a94r;\\uc000\\ud835\\udd24\\u0100;g\\u0673\\u061bmel;\\u6137cy;\\u4453\\u0200;Eaj\\u065a\\u210c\\u210e\\u2110;\\u6a92;\\u6aa5;\\u6aa4\\u0200Eaes\\u211b\\u211d\\u2129\\u2134;\\u6269p\\u0100;p\\u2123\\u2124\\u6a8arox\\xbb\\u2124\\u0100;q\\u212e\\u212f\\u6a88\\u0100;q\\u212e\\u211bim;\\u62e7pf;\\uc000\\ud835\\udd58\\u0100ci\\u2143\\u2146r;\\u610am\\u0180;el\\u066b\\u214e\\u2150;\\u6a8e;\\u6a90\\u8300>;cdlqr\\u05ee\\u2160\\u216a\\u216e\\u2173\\u2179\\u0100ci\\u2165\\u2167;\\u6aa7r;\\u6a7aot;\\u62d7Par;\\u6995uest;\\u6a7c\\u0280adels\\u2184\\u216a\\u2190\\u0656\\u219b\\u01f0\\u2189\\0\\u218epro\\xf8\\u209er;\\u6978q\\u0100lq\\u063f\\u2196les\\xf3\\u2088i\\xed\\u066b\\u0100en\\u21a3\\u21adrtneqq;\\uc000\\u2269\\ufe00\\xc5\\u21aa\\u0500Aabcefkosy\\u21c4\\u21c7\\u21f1\\u21f5\\u21fa\\u2218\\u221d\\u222f\\u2268\\u227dr\\xf2\\u03a0\\u0200ilmr\\u21d0\\u21d4\\u21d7\\u21dbrs\\xf0\\u1484f\\xbb\\u2024il\\xf4\\u06a9\\u0100dr\\u21e0\\u21e4cy;\\u444a\\u0180;cw\\u08f4\\u21eb\\u21efir;\\u6948;\\u61adar;\\u610firc;\\u4125\\u0180alr\\u2201\\u220e\\u2213rts\\u0100;u\\u2209\\u220a\\u6665it\\xbb\\u220alip;\\u6026con;\\u62b9r;\\uc000\\ud835\\udd25s\\u0100ew\\u2223\\u2229arow;\\u6925arow;\\u6926\\u0280amopr\\u223a\\u223e\\u2243\\u225e\\u2263rr;\\u61fftht;\\u623bk\\u0100lr\\u2249\\u2253eftarrow;\\u61a9ightarrow;\\u61aaf;\\uc000\\ud835\\udd59bar;\\u6015\\u0180clt\\u226f\\u2274\\u2278r;\\uc000\\ud835\\udcbdas\\xe8\\u21f4rok;\\u4127\\u0100bp\\u2282\\u2287ull;\\u6043hen\\xbb\\u1c5b\\u0ae1\\u22a3\\0\\u22aa\\0\\u22b8\\u22c5\\u22ce\\0\\u22d5\\u22f3\\0\\0\\u22f8\\u2322\\u2367\\u2362\\u237f\\0\\u2386\\u23aa\\u23b4cute\\u803b\\xed\\u40ed\\u0180;iy\\u0771\\u22b0\\u22b5rc\\u803b\\xee\\u40ee;\\u4438\\u0100cx\\u22bc\\u22bfy;\\u4435cl\\u803b\\xa1\\u40a1\\u0100fr\\u039f\\u22c9;\\uc000\\ud835\\udd26rave\\u803b\\xec\\u40ec\\u0200;ino\\u073e\\u22dd\\u22e9\\u22ee\\u0100in\\u22e2\\u22e6nt;\\u6a0ct;\\u622dfin;\\u69dcta;\\u6129lig;\\u4133\\u0180aop\\u22fe\\u231a\\u231d\\u0180cgt\\u2305\\u2308\\u2317r;\\u412b\\u0180elp\\u071f\\u230f\\u2313in\\xe5\\u078ear\\xf4\\u0720h;\\u4131f;\\u62b7ed;\\u41b5\\u0280;cfot\\u04f4\\u232c\\u2331\\u233d\\u2341are;\\u6105in\\u0100;t\\u2338\\u2339\\u621eie;\\u69dddo\\xf4\\u2319\\u0280;celp\\u0757\\u234c\\u2350\\u235b\\u2361al;\\u62ba\\u0100gr\\u2355\\u2359er\\xf3\\u1563\\xe3\\u234darhk;\\u6a17rod;\\u6a3c\\u0200cgpt\\u236f\\u2372\\u2376\\u237by;\\u4451on;\\u412ff;\\uc000\\ud835\\udd5aa;\\u43b9uest\\u803b\\xbf\\u40bf\\u0100ci\\u238a\\u238fr;\\uc000\\ud835\\udcben\\u0280;Edsv\\u04f4\\u239b\\u239d\\u23a1\\u04f3;\\u62f9ot;\\u62f5\\u0100;v\\u23a6\\u23a7\\u62f4;\\u62f3\\u0100;i\\u0777\\u23aelde;\\u4129\\u01eb\\u23b8\\0\\u23bccy;\\u4456l\\u803b\\xef\\u40ef\\u0300cfmosu\\u23cc\\u23d7\\u23dc\\u23e1\\u23e7\\u23f5\\u0100iy\\u23d1\\u23d5rc;\\u4135;\\u4439r;\\uc000\\ud835\\udd27ath;\\u4237pf;\\uc000\\ud835\\udd5b\\u01e3\\u23ec\\0\\u23f1r;\\uc000\\ud835\\udcbfrcy;\\u4458kcy;\\u4454\\u0400acfghjos\\u240b\\u2416\\u2422\\u2427\\u242d\\u2431\\u2435\\u243bppa\\u0100;v\\u2413\\u2414\\u43ba;\\u43f0\\u0100ey\\u241b\\u2420dil;\\u4137;\\u443ar;\\uc000\\ud835\\udd28reen;\\u4138cy;\\u4445cy;\\u445cpf;\\uc000\\ud835\\udd5ccr;\\uc000\\ud835\\udcc0\\u0b80ABEHabcdefghjlmnoprstuv\\u2470\\u2481\\u2486\\u248d\\u2491\\u250e\\u253d\\u255a\\u2580\\u264e\\u265e\\u2665\\u2679\\u267d\\u269a\\u26b2\\u26d8\\u275d\\u2768\\u278b\\u27c0\\u2801\\u2812\\u0180art\\u2477\\u247a\\u247cr\\xf2\\u09c6\\xf2\\u0395ail;\\u691barr;\\u690e\\u0100;g\\u0994\\u248b;\\u6a8bar;\\u6962\\u0963\\u24a5\\0\\u24aa\\0\\u24b1\\0\\0\\0\\0\\0\\u24b5\\u24ba\\0\\u24c6\\u24c8\\u24cd\\0\\u24f9ute;\\u413amptyv;\\u69b4ra\\xee\\u084cbda;\\u43bbg\\u0180;dl\\u088e\\u24c1\\u24c3;\\u6991\\xe5\\u088e;\\u6a85uo\\u803b\\xab\\u40abr\\u0400;bfhlpst\\u0899\\u24de\\u24e6\\u24e9\\u24eb\\u24ee\\u24f1\\u24f5\\u0100;f\\u089d\\u24e3s;\\u691fs;\\u691d\\xeb\\u2252p;\\u61abl;\\u6939im;\\u6973l;\\u61a2\\u0180;ae\\u24ff\\u2500\\u2504\\u6aabil;\\u6919\\u0100;s\\u2509\\u250a\\u6aad;\\uc000\\u2aad\\ufe00\\u0180abr\\u2515\\u2519\\u251drr;\\u690crk;\\u6772\\u0100ak\\u2522\\u252cc\\u0100ek\\u2528\\u252a;\\u407b;\\u405b\\u0100es\\u2531\\u2533;\\u698bl\\u0100du\\u2539\\u253b;\\u698f;\\u698d\\u0200aeuy\\u2546\\u254b\\u2556\\u2558ron;\\u413e\\u0100di\\u2550\\u2554il;\\u413c\\xec\\u08b0\\xe2\\u2529;\\u443b\\u0200cqrs\\u2563\\u2566\\u256d\\u257da;\\u6936uo\\u0100;r\\u0e19\\u1746\\u0100du\\u2572\\u2577har;\\u6967shar;\\u694bh;\\u61b2\\u0280;fgqs\\u258b\\u258c\\u0989\\u25f3\\u25ff\\u6264t\\u0280ahlrt\\u2598\\u25a4\\u25b7\\u25c2\\u25e8rrow\\u0100;t\\u0899\\u25a1a\\xe9\\u24f6arpoon\\u0100du\\u25af\\u25b4own\\xbb\\u045ap\\xbb\\u0966eftarrows;\\u61c7ight\\u0180ahs\\u25cd\\u25d6\\u25derrow\\u0100;s\\u08f4\\u08a7arpoon\\xf3\\u0f98quigarro\\xf7\\u21f0hreetimes;\\u62cb\\u0180;qs\\u258b\\u0993\\u25falan\\xf4\\u09ac\\u0280;cdgs\\u09ac\\u260a\\u260d\\u261d\\u2628c;\\u6aa8ot\\u0100;o\\u2614\\u2615\\u6a7f\\u0100;r\\u261a\\u261b\\u6a81;\\u6a83\\u0100;e\\u2622\\u2625\\uc000\\u22da\\ufe00s;\\u6a93\\u0280adegs\\u2633\\u2639\\u263d\\u2649\\u264bppro\\xf8\\u24c6ot;\\u62d6q\\u0100gq\\u2643\\u2645\\xf4\\u0989gt\\xf2\\u248c\\xf4\\u099bi\\xed\\u09b2\\u0180ilr\\u2655\\u08e1\\u265asht;\\u697c;\\uc000\\ud835\\udd29\\u0100;E\\u099c\\u2663;\\u6a91\\u0161\\u2669\\u2676r\\u0100du\\u25b2\\u266e\\u0100;l\\u0965\\u2673;\\u696alk;\\u6584cy;\\u4459\\u0280;acht\\u0a48\\u2688\\u268b\\u2691\\u2696r\\xf2\\u25c1orne\\xf2\\u1d08ard;\\u696bri;\\u65fa\\u0100io\\u269f\\u26a4dot;\\u4140ust\\u0100;a\\u26ac\\u26ad\\u63b0che\\xbb\\u26ad\\u0200Eaes\\u26bb\\u26bd\\u26c9\\u26d4;\\u6268p\\u0100;p\\u26c3\\u26c4\\u6a89rox\\xbb\\u26c4\\u0100;q\\u26ce\\u26cf\\u6a87\\u0100;q\\u26ce\\u26bbim;\\u62e6\\u0400abnoptwz\\u26e9\\u26f4\\u26f7\\u271a\\u272f\\u2741\\u2747\\u2750\\u0100nr\\u26ee\\u26f1g;\\u67ecr;\\u61fdr\\xeb\\u08c1g\\u0180lmr\\u26ff\\u270d\\u2714eft\\u0100ar\\u09e6\\u2707ight\\xe1\\u09f2apsto;\\u67fcight\\xe1\\u09fdparrow\\u0100lr\\u2725\\u2729ef\\xf4\\u24edight;\\u61ac\\u0180afl\\u2736\\u2739\\u273dr;\\u6985;\\uc000\\ud835\\udd5dus;\\u6a2dimes;\\u6a34\\u0161\\u274b\\u274fst;\\u6217\\xe1\\u134e\\u0180;ef\\u2757\\u2758\\u1800\\u65cange\\xbb\\u2758ar\\u0100;l\\u2764\\u2765\\u4028t;\\u6993\\u0280achmt\\u2773\\u2776\\u277c\\u2785\\u2787r\\xf2\\u08a8orne\\xf2\\u1d8car\\u0100;d\\u0f98\\u2783;\\u696d;\\u600eri;\\u62bf\\u0300achiqt\\u2798\\u279d\\u0a40\\u27a2\\u27ae\\u27bbquo;\\u6039r;\\uc000\\ud835\\udcc1m\\u0180;eg\\u09b2\\u27aa\\u27ac;\\u6a8d;\\u6a8f\\u0100bu\\u252a\\u27b3o\\u0100;r\\u0e1f\\u27b9;\\u601arok;\\u4142\\u8400<;cdhilqr\\u082b\\u27d2\\u2639\\u27dc\\u27e0\\u27e5\\u27ea\\u27f0\\u0100ci\\u27d7\\u27d9;\\u6aa6r;\\u6a79re\\xe5\\u25f2mes;\\u62c9arr;\\u6976uest;\\u6a7b\\u0100Pi\\u27f5\\u27f9ar;\\u6996\\u0180;ef\\u2800\\u092d\\u181b\\u65c3r\\u0100du\\u2807\\u280dshar;\\u694ahar;\\u6966\\u0100en\\u2817\\u2821rtneqq;\\uc000\\u2268\\ufe00\\xc5\\u281e\\u0700Dacdefhilnopsu\\u2840\\u2845\\u2882\\u288e\\u2893\\u28a0\\u28a5\\u28a8\\u28da\\u28e2\\u28e4\\u0a83\\u28f3\\u2902Dot;\\u623a\\u0200clpr\\u284e\\u2852\\u2863\\u287dr\\u803b\\xaf\\u40af\\u0100et\\u2857\\u2859;\\u6642\\u0100;e\\u285e\\u285f\\u6720se\\xbb\\u285f\\u0100;s\\u103b\\u2868to\\u0200;dlu\\u103b\\u2873\\u2877\\u287bow\\xee\\u048cef\\xf4\\u090f\\xf0\\u13d1ker;\\u65ae\\u0100oy\\u2887\\u288cmma;\\u6a29;\\u443cash;\\u6014asuredangle\\xbb\\u1626r;\\uc000\\ud835\\udd2ao;\\u6127\\u0180cdn\\u28af\\u28b4\\u28c9ro\\u803b\\xb5\\u40b5\\u0200;acd\\u1464\\u28bd\\u28c0\\u28c4s\\xf4\\u16a7ir;\\u6af0ot\\u80bb\\xb7\\u01b5us\\u0180;bd\\u28d2\\u1903\\u28d3\\u6212\\u0100;u\\u1d3c\\u28d8;\\u6a2a\\u0163\\u28de\\u28e1p;\\u6adb\\xf2\\u2212\\xf0\\u0a81\\u0100dp\\u28e9\\u28eeels;\\u62a7f;\\uc000\\ud835\\udd5e\\u0100ct\\u28f8\\u28fdr;\\uc000\\ud835\\udcc2pos\\xbb\\u159d\\u0180;lm\\u2909\\u290a\\u290d\\u43bctimap;\\u62b8\\u0c00GLRVabcdefghijlmoprstuvw\\u2942\\u2953\\u297e\\u2989\\u2998\\u29da\\u29e9\\u2a15\\u2a1a\\u2a58\\u2a5d\\u2a83\\u2a95\\u2aa4\\u2aa8\\u2b04\\u2b07\\u2b44\\u2b7f\\u2bae\\u2c34\\u2c67\\u2c7c\\u2ce9\\u0100gt\\u2947\\u294b;\\uc000\\u22d9\\u0338\\u0100;v\\u2950\\u0bcf\\uc000\\u226b\\u20d2\\u0180elt\\u295a\\u2972\\u2976ft\\u0100ar\\u2961\\u2967rrow;\\u61cdightarrow;\\u61ce;\\uc000\\u22d8\\u0338\\u0100;v\\u297b\\u0c47\\uc000\\u226a\\u20d2ightarrow;\\u61cf\\u0100Dd\\u298e\\u2993ash;\\u62afash;\\u62ae\\u0280bcnpt\\u29a3\\u29a7\\u29ac\\u29b1\\u29ccla\\xbb\\u02deute;\\u4144g;\\uc000\\u2220\\u20d2\\u0280;Eiop\\u0d84\\u29bc\\u29c0\\u29c5\\u29c8;\\uc000\\u2a70\\u0338d;\\uc000\\u224b\\u0338s;\\u4149ro\\xf8\\u0d84ur\\u0100;a\\u29d3\\u29d4\\u666el\\u0100;s\\u29d3\\u0b38\\u01f3\\u29df\\0\\u29e3p\\u80bb\\xa0\\u0b37mp\\u0100;e\\u0bf9\\u0c00\\u0280aeouy\\u29f4\\u29fe\\u2a03\\u2a10\\u2a13\\u01f0\\u29f9\\0\\u29fb;\\u6a43on;\\u4148dil;\\u4146ng\\u0100;d\\u0d7e\\u2a0aot;\\uc000\\u2a6d\\u0338p;\\u6a42;\\u443dash;\\u6013\\u0380;Aadqsx\\u0b92\\u2a29\\u2a2d\\u2a3b\\u2a41\\u2a45\\u2a50rr;\\u61d7r\\u0100hr\\u2a33\\u2a36k;\\u6924\\u0100;o\\u13f2\\u13f0ot;\\uc000\\u2250\\u0338ui\\xf6\\u0b63\\u0100ei\\u2a4a\\u2a4ear;\\u6928\\xed\\u0b98ist\\u0100;s\\u0ba0\\u0b9fr;\\uc000\\ud835\\udd2b\\u0200Eest\\u0bc5\\u2a66\\u2a79\\u2a7c\\u0180;qs\\u0bbc\\u2a6d\\u0be1\\u0180;qs\\u0bbc\\u0bc5\\u2a74lan\\xf4\\u0be2i\\xed\\u0bea\\u0100;r\\u0bb6\\u2a81\\xbb\\u0bb7\\u0180Aap\\u2a8a\\u2a8d\\u2a91r\\xf2\\u2971rr;\\u61aear;\\u6af2\\u0180;sv\\u0f8d\\u2a9c\\u0f8c\\u0100;d\\u2aa1\\u2aa2\\u62fc;\\u62facy;\\u445a\\u0380AEadest\\u2ab7\\u2aba\\u2abe\\u2ac2\\u2ac5\\u2af6\\u2af9r\\xf2\\u2966;\\uc000\\u2266\\u0338rr;\\u619ar;\\u6025\\u0200;fqs\\u0c3b\\u2ace\\u2ae3\\u2aeft\\u0100ar\\u2ad4\\u2ad9rro\\xf7\\u2ac1ightarro\\xf7\\u2a90\\u0180;qs\\u0c3b\\u2aba\\u2aealan\\xf4\\u0c55\\u0100;s\\u0c55\\u2af4\\xbb\\u0c36i\\xed\\u0c5d\\u0100;r\\u0c35\\u2afei\\u0100;e\\u0c1a\\u0c25i\\xe4\\u0d90\\u0100pt\\u2b0c\\u2b11f;\\uc000\\ud835\\udd5f\\u8180\\xac;in\\u2b19\\u2b1a\\u2b36\\u40acn\\u0200;Edv\\u0b89\\u2b24\\u2b28\\u2b2e;\\uc000\\u22f9\\u0338ot;\\uc000\\u22f5\\u0338\\u01e1\\u0b89\\u2b33\\u2b35;\\u62f7;\\u62f6i\\u0100;v\\u0cb8\\u2b3c\\u01e1\\u0cb8\\u2b41\\u2b43;\\u62fe;\\u62fd\\u0180aor\\u2b4b\\u2b63\\u2b69r\\u0200;ast\\u0b7b\\u2b55\\u2b5a\\u2b5flle\\xec\\u0b7bl;\\uc000\\u2afd\\u20e5;\\uc000\\u2202\\u0338lint;\\u6a14\\u0180;ce\\u0c92\\u2b70\\u2b73u\\xe5\\u0ca5\\u0100;c\\u0c98\\u2b78\\u0100;e\\u0c92\\u2b7d\\xf1\\u0c98\\u0200Aait\\u2b88\\u2b8b\\u2b9d\\u2ba7r\\xf2\\u2988rr\\u0180;cw\\u2b94\\u2b95\\u2b99\\u619b;\\uc000\\u2933\\u0338;\\uc000\\u219d\\u0338ghtarrow\\xbb\\u2b95ri\\u0100;e\\u0ccb\\u0cd6\\u0380chimpqu\\u2bbd\\u2bcd\\u2bd9\\u2b04\\u0b78\\u2be4\\u2bef\\u0200;cer\\u0d32\\u2bc6\\u0d37\\u2bc9u\\xe5\\u0d45;\\uc000\\ud835\\udcc3ort\\u026d\\u2b05\\0\\0\\u2bd6ar\\xe1\\u2b56m\\u0100;e\\u0d6e\\u2bdf\\u0100;q\\u0d74\\u0d73su\\u0100bp\\u2beb\\u2bed\\xe5\\u0cf8\\xe5\\u0d0b\\u0180bcp\\u2bf6\\u2c11\\u2c19\\u0200;Ees\\u2bff\\u2c00\\u0d22\\u2c04\\u6284;\\uc000\\u2ac5\\u0338et\\u0100;e\\u0d1b\\u2c0bq\\u0100;q\\u0d23\\u2c00c\\u0100;e\\u0d32\\u2c17\\xf1\\u0d38\\u0200;Ees\\u2c22\\u2c23\\u0d5f\\u2c27\\u6285;\\uc000\\u2ac6\\u0338et\\u0100;e\\u0d58\\u2c2eq\\u0100;q\\u0d60\\u2c23\\u0200gilr\\u2c3d\\u2c3f\\u2c45\\u2c47\\xec\\u0bd7lde\\u803b\\xf1\\u40f1\\xe7\\u0c43iangle\\u0100lr\\u2c52\\u2c5ceft\\u0100;e\\u0c1a\\u2c5a\\xf1\\u0c26ight\\u0100;e\\u0ccb\\u2c65\\xf1\\u0cd7\\u0100;m\\u2c6c\\u2c6d\\u43bd\\u0180;es\\u2c74\\u2c75\\u2c79\\u4023ro;\\u6116p;\\u6007\\u0480DHadgilrs\\u2c8f\\u2c94\\u2c99\\u2c9e\\u2ca3\\u2cb0\\u2cb6\\u2cd3\\u2ce3ash;\\u62adarr;\\u6904p;\\uc000\\u224d\\u20d2ash;\\u62ac\\u0100et\\u2ca8\\u2cac;\\uc000\\u2265\\u20d2;\\uc000>\\u20d2nfin;\\u69de\\u0180Aet\\u2cbd\\u2cc1\\u2cc5rr;\\u6902;\\uc000\\u2264\\u20d2\\u0100;r\\u2cca\\u2ccd\\uc000<\\u20d2ie;\\uc000\\u22b4\\u20d2\\u0100At\\u2cd8\\u2cdcrr;\\u6903rie;\\uc000\\u22b5\\u20d2im;\\uc000\\u223c\\u20d2\\u0180Aan\\u2cf0\\u2cf4\\u2d02rr;\\u61d6r\\u0100hr\\u2cfa\\u2cfdk;\\u6923\\u0100;o\\u13e7\\u13e5ear;\\u6927\\u1253\\u1a95\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\u2d2d\\0\\u2d38\\u2d48\\u2d60\\u2d65\\u2d72\\u2d84\\u1b07\\0\\0\\u2d8d\\u2dab\\0\\u2dc8\\u2dce\\0\\u2ddc\\u2e19\\u2e2b\\u2e3e\\u2e43\\u0100cs\\u2d31\\u1a97ute\\u803b\\xf3\\u40f3\\u0100iy\\u2d3c\\u2d45r\\u0100;c\\u1a9e\\u2d42\\u803b\\xf4\\u40f4;\\u443e\\u0280abios\\u1aa0\\u2d52\\u2d57\\u01c8\\u2d5alac;\\u4151v;\\u6a38old;\\u69bclig;\\u4153\\u0100cr\\u2d69\\u2d6dir;\\u69bf;\\uc000\\ud835\\udd2c\\u036f\\u2d79\\0\\0\\u2d7c\\0\\u2d82n;\\u42dbave\\u803b\\xf2\\u40f2;\\u69c1\\u0100bm\\u2d88\\u0df4ar;\\u69b5\\u0200acit\\u2d95\\u2d98\\u2da5\\u2da8r\\xf2\\u1a80\\u0100ir\\u2d9d\\u2da0r;\\u69beoss;\\u69bbn\\xe5\\u0e52;\\u69c0\\u0180aei\\u2db1\\u2db5\\u2db9cr;\\u414dga;\\u43c9\\u0180cdn\\u2dc0\\u2dc5\\u01cdron;\\u43bf;\\u69b6pf;\\uc000\\ud835\\udd60\\u0180ael\\u2dd4\\u2dd7\\u01d2r;\\u69b7rp;\\u69b9\\u0380;adiosv\\u2dea\\u2deb\\u2dee\\u2e08\\u2e0d\\u2e10\\u2e16\\u6228r\\xf2\\u1a86\\u0200;efm\\u2df7\\u2df8\\u2e02\\u2e05\\u6a5dr\\u0100;o\\u2dfe\\u2dff\\u6134f\\xbb\\u2dff\\u803b\\xaa\\u40aa\\u803b\\xba\\u40bagof;\\u62b6r;\\u6a56lope;\\u6a57;\\u6a5b\\u0180clo\\u2e1f\\u2e21\\u2e27\\xf2\\u2e01ash\\u803b\\xf8\\u40f8l;\\u6298i\\u016c\\u2e2f\\u2e34de\\u803b\\xf5\\u40f5es\\u0100;a\\u01db\\u2e3as;\\u6a36ml\\u803b\\xf6\\u40f6bar;\\u633d\\u0ae1\\u2e5e\\0\\u2e7d\\0\\u2e80\\u2e9d\\0\\u2ea2\\u2eb9\\0\\0\\u2ecb\\u0e9c\\0\\u2f13\\0\\0\\u2f2b\\u2fbc\\0\\u2fc8r\\u0200;ast\\u0403\\u2e67\\u2e72\\u0e85\\u8100\\xb6;l\\u2e6d\\u2e6e\\u40b6le\\xec\\u0403\\u0269\\u2e78\\0\\0\\u2e7bm;\\u6af3;\\u6afdy;\\u443fr\\u0280cimpt\\u2e8b\\u2e8f\\u2e93\\u1865\\u2e97nt;\\u4025od;\\u402eil;\\u6030enk;\\u6031r;\\uc000\\ud835\\udd2d\\u0180imo\\u2ea8\\u2eb0\\u2eb4\\u0100;v\\u2ead\\u2eae\\u43c6;\\u43d5ma\\xf4\\u0a76ne;\\u660e\\u0180;tv\\u2ebf\\u2ec0\\u2ec8\\u43c0chfork\\xbb\\u1ffd;\\u43d6\\u0100au\\u2ecf\\u2edfn\\u0100ck\\u2ed5\\u2eddk\\u0100;h\\u21f4\\u2edb;\\u610e\\xf6\\u21f4s\\u0480;abcdemst\\u2ef3\\u2ef4\\u1908\\u2ef9\\u2efd\\u2f04\\u2f06\\u2f0a\\u2f0e\\u402bcir;\\u6a23ir;\\u6a22\\u0100ou\\u1d40\\u2f02;\\u6a25;\\u6a72n\\u80bb\\xb1\\u0e9dim;\\u6a26wo;\\u6a27\\u0180ipu\\u2f19\\u2f20\\u2f25ntint;\\u6a15f;\\uc000\\ud835\\udd61nd\\u803b\\xa3\\u40a3\\u0500;Eaceinosu\\u0ec8\\u2f3f\\u2f41\\u2f44\\u2f47\\u2f81\\u2f89\\u2f92\\u2f7e\\u2fb6;\\u6ab3p;\\u6ab7u\\xe5\\u0ed9\\u0100;c\\u0ece\\u2f4c\\u0300;acens\\u0ec8\\u2f59\\u2f5f\\u2f66\\u2f68\\u2f7eppro\\xf8\\u2f43urlye\\xf1\\u0ed9\\xf1\\u0ece\\u0180aes\\u2f6f\\u2f76\\u2f7approx;\\u6ab9qq;\\u6ab5im;\\u62e8i\\xed\\u0edfme\\u0100;s\\u2f88\\u0eae\\u6032\\u0180Eas\\u2f78\\u2f90\\u2f7a\\xf0\\u2f75\\u0180dfp\\u0eec\\u2f99\\u2faf\\u0180als\\u2fa0\\u2fa5\\u2faalar;\\u632eine;\\u6312urf;\\u6313\\u0100;t\\u0efb\\u2fb4\\xef\\u0efbrel;\\u62b0\\u0100ci\\u2fc0\\u2fc5r;\\uc000\\ud835\\udcc5;\\u43c8ncsp;\\u6008\\u0300fiopsu\\u2fda\\u22e2\\u2fdf\\u2fe5\\u2feb\\u2ff1r;\\uc000\\ud835\\udd2epf;\\uc000\\ud835\\udd62rime;\\u6057cr;\\uc000\\ud835\\udcc6\\u0180aeo\\u2ff8\\u3009\\u3013t\\u0100ei\\u2ffe\\u3005rnion\\xf3\\u06b0nt;\\u6a16st\\u0100;e\\u3010\\u3011\\u403f\\xf1\\u1f19\\xf4\\u0f14\\u0a80ABHabcdefhilmnoprstux\\u3040\\u3051\\u3055\\u3059\\u30e0\\u310e\\u312b\\u3147\\u3162\\u3172\\u318e\\u3206\\u3215\\u3224\\u3229\\u3258\\u326e\\u3272\\u3290\\u32b0\\u32b7\\u0180art\\u3047\\u304a\\u304cr\\xf2\\u10b3\\xf2\\u03ddail;\\u691car\\xf2\\u1c65ar;\\u6964\\u0380cdenqrt\\u3068\\u3075\\u3078\\u307f\\u308f\\u3094\\u30cc\\u0100eu\\u306d\\u3071;\\uc000\\u223d\\u0331te;\\u4155i\\xe3\\u116emptyv;\\u69b3g\\u0200;del\\u0fd1\\u3089\\u308b\\u308d;\\u6992;\\u69a5\\xe5\\u0fd1uo\\u803b\\xbb\\u40bbr\\u0580;abcfhlpstw\\u0fdc\\u30ac\\u30af\\u30b7\\u30b9\\u30bc\\u30be\\u30c0\\u30c3\\u30c7\\u30cap;\\u6975\\u0100;f\\u0fe0\\u30b4s;\\u6920;\\u6933s;\\u691e\\xeb\\u225d\\xf0\\u272el;\\u6945im;\\u6974l;\\u61a3;\\u619d\\u0100ai\\u30d1\\u30d5il;\\u691ao\\u0100;n\\u30db\\u30dc\\u6236al\\xf3\\u0f1e\\u0180abr\\u30e7\\u30ea\\u30eer\\xf2\\u17e5rk;\\u6773\\u0100ak\\u30f3\\u30fdc\\u0100ek\\u30f9\\u30fb;\\u407d;\\u405d\\u0100es\\u3102\\u3104;\\u698cl\\u0100du\\u310a\\u310c;\\u698e;\\u6990\\u0200aeuy\\u3117\\u311c\\u3127\\u3129ron;\\u4159\\u0100di\\u3121\\u3125il;\\u4157\\xec\\u0ff2\\xe2\\u30fa;\\u4440\\u0200clqs\\u3134\\u3137\\u313d\\u3144a;\\u6937dhar;\\u6969uo\\u0100;r\\u020e\\u020dh;\\u61b3\\u0180acg\\u314e\\u315f\\u0f44l\\u0200;ips\\u0f78\\u3158\\u315b\\u109cn\\xe5\\u10bbar\\xf4\\u0fa9t;\\u65ad\\u0180ilr\\u3169\\u1023\\u316esht;\\u697d;\\uc000\\ud835\\udd2f\\u0100ao\\u3177\\u3186r\\u0100du\\u317d\\u317f\\xbb\\u047b\\u0100;l\\u1091\\u3184;\\u696c\\u0100;v\\u318b\\u318c\\u43c1;\\u43f1\\u0180gns\\u3195\\u31f9\\u31fcht\\u0300ahlrst\\u31a4\\u31b0\\u31c2\\u31d8\\u31e4\\u31eerrow\\u0100;t\\u0fdc\\u31ada\\xe9\\u30c8arpoon\\u0100du\\u31bb\\u31bfow\\xee\\u317ep\\xbb\\u1092eft\\u0100ah\\u31ca\\u31d0rrow\\xf3\\u0feaarpoon\\xf3\\u0551ightarrows;\\u61c9quigarro\\xf7\\u30cbhreetimes;\\u62ccg;\\u42daingdotse\\xf1\\u1f32\\u0180ahm\\u320d\\u3210\\u3213r\\xf2\\u0feaa\\xf2\\u0551;\\u600foust\\u0100;a\\u321e\\u321f\\u63b1che\\xbb\\u321fmid;\\u6aee\\u0200abpt\\u3232\\u323d\\u3240\\u3252\\u0100nr\\u3237\\u323ag;\\u67edr;\\u61fer\\xeb\\u1003\\u0180afl\\u3247\\u324a\\u324er;\\u6986;\\uc000\\ud835\\udd63us;\\u6a2eimes;\\u6a35\\u0100ap\\u325d\\u3267r\\u0100;g\\u3263\\u3264\\u4029t;\\u6994olint;\\u6a12ar\\xf2\\u31e3\\u0200achq\\u327b\\u3280\\u10bc\\u3285quo;\\u603ar;\\uc000\\ud835\\udcc7\\u0100bu\\u30fb\\u328ao\\u0100;r\\u0214\\u0213\\u0180hir\\u3297\\u329b\\u32a0re\\xe5\\u31f8mes;\\u62cai\\u0200;efl\\u32aa\\u1059\\u1821\\u32ab\\u65b9tri;\\u69celuhar;\\u6968;\\u611e\\u0d61\\u32d5\\u32db\\u32df\\u332c\\u3338\\u3371\\0\\u337a\\u33a4\\0\\0\\u33ec\\u33f0\\0\\u3428\\u3448\\u345a\\u34ad\\u34b1\\u34ca\\u34f1\\0\\u3616\\0\\0\\u3633cute;\\u415bqu\\xef\\u27ba\\u0500;Eaceinpsy\\u11ed\\u32f3\\u32f5\\u32ff\\u3302\\u330b\\u330f\\u331f\\u3326\\u3329;\\u6ab4\\u01f0\\u32fa\\0\\u32fc;\\u6ab8on;\\u4161u\\xe5\\u11fe\\u0100;d\\u11f3\\u3307il;\\u415frc;\\u415d\\u0180Eas\\u3316\\u3318\\u331b;\\u6ab6p;\\u6abaim;\\u62e9olint;\\u6a13i\\xed\\u1204;\\u4441ot\\u0180;be\\u3334\\u1d47\\u3335\\u62c5;\\u6a66\\u0380Aacmstx\\u3346\\u334a\\u3357\\u335b\\u335e\\u3363\\u336drr;\\u61d8r\\u0100hr\\u3350\\u3352\\xeb\\u2228\\u0100;o\\u0a36\\u0a34t\\u803b\\xa7\\u40a7i;\\u403bwar;\\u6929m\\u0100in\\u3369\\xf0nu\\xf3\\xf1t;\\u6736r\\u0100;o\\u3376\\u2055\\uc000\\ud835\\udd30\\u0200acoy\\u3382\\u3386\\u3391\\u33a0rp;\\u666f\\u0100hy\\u338b\\u338fcy;\\u4449;\\u4448rt\\u026d\\u3399\\0\\0\\u339ci\\xe4\\u1464ara\\xec\\u2e6f\\u803b\\xad\\u40ad\\u0100gm\\u33a8\\u33b4ma\\u0180;fv\\u33b1\\u33b2\\u33b2\\u43c3;\\u43c2\\u0400;deglnpr\\u12ab\\u33c5\\u33c9\\u33ce\\u33d6\\u33de\\u33e1\\u33e6ot;\\u6a6a\\u0100;q\\u12b1\\u12b0\\u0100;E\\u33d3\\u33d4\\u6a9e;\\u6aa0\\u0100;E\\u33db\\u33dc\\u6a9d;\\u6a9fe;\\u6246lus;\\u6a24arr;\\u6972ar\\xf2\\u113d\\u0200aeit\\u33f8\\u3408\\u340f\\u3417\\u0100ls\\u33fd\\u3404lsetm\\xe9\\u336ahp;\\u6a33parsl;\\u69e4\\u0100dl\\u1463\\u3414e;\\u6323\\u0100;e\\u341c\\u341d\\u6aaa\\u0100;s\\u3422\\u3423\\u6aac;\\uc000\\u2aac\\ufe00\\u0180flp\\u342e\\u3433\\u3442tcy;\\u444c\\u0100;b\\u3438\\u3439\\u402f\\u0100;a\\u343e\\u343f\\u69c4r;\\u633ff;\\uc000\\ud835\\udd64a\\u0100dr\\u344d\\u0402es\\u0100;u\\u3454\\u3455\\u6660it\\xbb\\u3455\\u0180csu\\u3460\\u3479\\u349f\\u0100au\\u3465\\u346fp\\u0100;s\\u1188\\u346b;\\uc000\\u2293\\ufe00p\\u0100;s\\u11b4\\u3475;\\uc000\\u2294\\ufe00u\\u0100bp\\u347f\\u348f\\u0180;es\\u1197\\u119c\\u3486et\\u0100;e\\u1197\\u348d\\xf1\\u119d\\u0180;es\\u11a8\\u11ad\\u3496et\\u0100;e\\u11a8\\u349d\\xf1\\u11ae\\u0180;af\\u117b\\u34a6\\u05b0r\\u0165\\u34ab\\u05b1\\xbb\\u117car\\xf2\\u1148\\u0200cemt\\u34b9\\u34be\\u34c2\\u34c5r;\\uc000\\ud835\\udcc8tm\\xee\\xf1i\\xec\\u3415ar\\xe6\\u11be\\u0100ar\\u34ce\\u34d5r\\u0100;f\\u34d4\\u17bf\\u6606\\u0100an\\u34da\\u34edight\\u0100ep\\u34e3\\u34eapsilo\\xee\\u1ee0h\\xe9\\u2eafs\\xbb\\u2852\\u0280bcmnp\\u34fb\\u355e\\u1209\\u358b\\u358e\\u0480;Edemnprs\\u350e\\u350f\\u3511\\u3515\\u351e\\u3523\\u352c\\u3531\\u3536\\u6282;\\u6ac5ot;\\u6abd\\u0100;d\\u11da\\u351aot;\\u6ac3ult;\\u6ac1\\u0100Ee\\u3528\\u352a;\\u6acb;\\u628alus;\\u6abfarr;\\u6979\\u0180eiu\\u353d\\u3552\\u3555t\\u0180;en\\u350e\\u3545\\u354bq\\u0100;q\\u11da\\u350feq\\u0100;q\\u352b\\u3528m;\\u6ac7\\u0100bp\\u355a\\u355c;\\u6ad5;\\u6ad3c\\u0300;acens\\u11ed\\u356c\\u3572\\u3579\\u357b\\u3326ppro\\xf8\\u32faurlye\\xf1\\u11fe\\xf1\\u11f3\\u0180aes\\u3582\\u3588\\u331bppro\\xf8\\u331aq\\xf1\\u3317g;\\u666a\\u0680123;Edehlmnps\\u35a9\\u35ac\\u35af\\u121c\\u35b2\\u35b4\\u35c0\\u35c9\\u35d5\\u35da\\u35df\\u35e8\\u35ed\\u803b\\xb9\\u40b9\\u803b\\xb2\\u40b2\\u803b\\xb3\\u40b3;\\u6ac6\\u0100os\\u35b9\\u35bct;\\u6abeub;\\u6ad8\\u0100;d\\u1222\\u35c5ot;\\u6ac4s\\u0100ou\\u35cf\\u35d2l;\\u67c9b;\\u6ad7arr;\\u697bult;\\u6ac2\\u0100Ee\\u35e4\\u35e6;\\u6acc;\\u628blus;\\u6ac0\\u0180eiu\\u35f4\\u3609\\u360ct\\u0180;en\\u121c\\u35fc\\u3602q\\u0100;q\\u1222\\u35b2eq\\u0100;q\\u35e7\\u35e4m;\\u6ac8\\u0100bp\\u3611\\u3613;\\u6ad4;\\u6ad6\\u0180Aan\\u361c\\u3620\\u362drr;\\u61d9r\\u0100hr\\u3626\\u3628\\xeb\\u222e\\u0100;o\\u0a2b\\u0a29war;\\u692alig\\u803b\\xdf\\u40df\\u0be1\\u3651\\u365d\\u3660\\u12ce\\u3673\\u3679\\0\\u367e\\u36c2\\0\\0\\0\\0\\0\\u36db\\u3703\\0\\u3709\\u376c\\0\\0\\0\\u3787\\u0272\\u3656\\0\\0\\u365bget;\\u6316;\\u43c4r\\xeb\\u0e5f\\u0180aey\\u3666\\u366b\\u3670ron;\\u4165dil;\\u4163;\\u4442lrec;\\u6315r;\\uc000\\ud835\\udd31\\u0200eiko\\u3686\\u369d\\u36b5\\u36bc\\u01f2\\u368b\\0\\u3691e\\u01004f\\u1284\\u1281a\\u0180;sv\\u3698\\u3699\\u369b\\u43b8ym;\\u43d1\\u0100cn\\u36a2\\u36b2k\\u0100as\\u36a8\\u36aeppro\\xf8\\u12c1im\\xbb\\u12acs\\xf0\\u129e\\u0100as\\u36ba\\u36ae\\xf0\\u12c1rn\\u803b\\xfe\\u40fe\\u01ec\\u031f\\u36c6\\u22e7es\\u8180\\xd7;bd\\u36cf\\u36d0\\u36d8\\u40d7\\u0100;a\\u190f\\u36d5r;\\u6a31;\\u6a30\\u0180eps\\u36e1\\u36e3\\u3700\\xe1\\u2a4d\\u0200;bcf\\u0486\\u36ec\\u36f0\\u36f4ot;\\u6336ir;\\u6af1\\u0100;o\\u36f9\\u36fc\\uc000\\ud835\\udd65rk;\\u6ada\\xe1\\u3362rime;\\u6034\\u0180aip\\u370f\\u3712\\u3764d\\xe5\\u1248\\u0380adempst\\u3721\\u374d\\u3740\\u3751\\u3757\\u375c\\u375fngle\\u0280;dlqr\\u3730\\u3731\\u3736\\u3740\\u3742\\u65b5own\\xbb\\u1dbbeft\\u0100;e\\u2800\\u373e\\xf1\\u092e;\\u625cight\\u0100;e\\u32aa\\u374b\\xf1\\u105aot;\\u65ecinus;\\u6a3alus;\\u6a39b;\\u69cdime;\\u6a3bezium;\\u63e2\\u0180cht\\u3772\\u377d\\u3781\\u0100ry\\u3777\\u377b;\\uc000\\ud835\\udcc9;\\u4446cy;\\u445brok;\\u4167\\u0100io\\u378b\\u378ex\\xf4\\u1777head\\u0100lr\\u3797\\u37a0eftarro\\xf7\\u084fightarrow\\xbb\\u0f5d\\u0900AHabcdfghlmoprstuw\\u37d0\\u37d3\\u37d7\\u37e4\\u37f0\\u37fc\\u380e\\u381c\\u3823\\u3834\\u3851\\u385d\\u386b\\u38a9\\u38cc\\u38d2\\u38ea\\u38f6r\\xf2\\u03edar;\\u6963\\u0100cr\\u37dc\\u37e2ute\\u803b\\xfa\\u40fa\\xf2\\u1150r\\u01e3\\u37ea\\0\\u37edy;\\u445eve;\\u416d\\u0100iy\\u37f5\\u37farc\\u803b\\xfb\\u40fb;\\u4443\\u0180abh\\u3803\\u3806\\u380br\\xf2\\u13adlac;\\u4171a\\xf2\\u13c3\\u0100ir\\u3813\\u3818sht;\\u697e;\\uc000\\ud835\\udd32rave\\u803b\\xf9\\u40f9\\u0161\\u3827\\u3831r\\u0100lr\\u382c\\u382e\\xbb\\u0957\\xbb\\u1083lk;\\u6580\\u0100ct\\u3839\\u384d\\u026f\\u383f\\0\\0\\u384arn\\u0100;e\\u3845\\u3846\\u631cr\\xbb\\u3846op;\\u630fri;\\u65f8\\u0100al\\u3856\\u385acr;\\u416b\\u80bb\\xa8\\u0349\\u0100gp\\u3862\\u3866on;\\u4173f;\\uc000\\ud835\\udd66\\u0300adhlsu\\u114b\\u3878\\u387d\\u1372\\u3891\\u38a0own\\xe1\\u13b3arpoon\\u0100lr\\u3888\\u388cef\\xf4\\u382digh\\xf4\\u382fi\\u0180;hl\\u3899\\u389a\\u389c\\u43c5\\xbb\\u13faon\\xbb\\u389aparrows;\\u61c8\\u0180cit\\u38b0\\u38c4\\u38c8\\u026f\\u38b6\\0\\0\\u38c1rn\\u0100;e\\u38bc\\u38bd\\u631dr\\xbb\\u38bdop;\\u630eng;\\u416fri;\\u65f9cr;\\uc000\\ud835\\udcca\\u0180dir\\u38d9\\u38dd\\u38e2ot;\\u62f0lde;\\u4169i\\u0100;f\\u3730\\u38e8\\xbb\\u1813\\u0100am\\u38ef\\u38f2r\\xf2\\u38a8l\\u803b\\xfc\\u40fcangle;\\u69a7\\u0780ABDacdeflnoprsz\\u391c\\u391f\\u3929\\u392d\\u39b5\\u39b8\\u39bd\\u39df\\u39e4\\u39e8\\u39f3\\u39f9\\u39fd\\u3a01\\u3a20r\\xf2\\u03f7ar\\u0100;v\\u3926\\u3927\\u6ae8;\\u6ae9as\\xe8\\u03e1\\u0100nr\\u3932\\u3937grt;\\u699c\\u0380eknprst\\u34e3\\u3946\\u394b\\u3952\\u395d\\u3964\\u3996app\\xe1\\u2415othin\\xe7\\u1e96\\u0180hir\\u34eb\\u2ec8\\u3959op\\xf4\\u2fb5\\u0100;h\\u13b7\\u3962\\xef\\u318d\\u0100iu\\u3969\\u396dgm\\xe1\\u33b3\\u0100bp\\u3972\\u3984setneq\\u0100;q\\u397d\\u3980\\uc000\\u228a\\ufe00;\\uc000\\u2acb\\ufe00setneq\\u0100;q\\u398f\\u3992\\uc000\\u228b\\ufe00;\\uc000\\u2acc\\ufe00\\u0100hr\\u399b\\u399fet\\xe1\\u369ciangle\\u0100lr\\u39aa\\u39afeft\\xbb\\u0925ight\\xbb\\u1051y;\\u4432ash\\xbb\\u1036\\u0180elr\\u39c4\\u39d2\\u39d7\\u0180;be\\u2dea\\u39cb\\u39cfar;\\u62bbq;\\u625alip;\\u62ee\\u0100bt\\u39dc\\u1468a\\xf2\\u1469r;\\uc000\\ud835\\udd33tr\\xe9\\u39aesu\\u0100bp\\u39ef\\u39f1\\xbb\\u0d1c\\xbb\\u0d59pf;\\uc000\\ud835\\udd67ro\\xf0\\u0efbtr\\xe9\\u39b4\\u0100cu\\u3a06\\u3a0br;\\uc000\\ud835\\udccb\\u0100bp\\u3a10\\u3a18n\\u0100Ee\\u3980\\u3a16\\xbb\\u397en\\u0100Ee\\u3992\\u3a1e\\xbb\\u3990igzag;\\u699a\\u0380cefoprs\\u3a36\\u3a3b\\u3a56\\u3a5b\\u3a54\\u3a61\\u3a6airc;\\u4175\\u0100di\\u3a40\\u3a51\\u0100bg\\u3a45\\u3a49ar;\\u6a5fe\\u0100;q\\u15fa\\u3a4f;\\u6259erp;\\u6118r;\\uc000\\ud835\\udd34pf;\\uc000\\ud835\\udd68\\u0100;e\\u1479\\u3a66at\\xe8\\u1479cr;\\uc000\\ud835\\udccc\\u0ae3\\u178e\\u3a87\\0\\u3a8b\\0\\u3a90\\u3a9b\\0\\0\\u3a9d\\u3aa8\\u3aab\\u3aaf\\0\\0\\u3ac3\\u3ace\\0\\u3ad8\\u17dc\\u17dftr\\xe9\\u17d1r;\\uc000\\ud835\\udd35\\u0100Aa\\u3a94\\u3a97r\\xf2\\u03c3r\\xf2\\u09f6;\\u43be\\u0100Aa\\u3aa1\\u3aa4r\\xf2\\u03b8r\\xf2\\u09eba\\xf0\\u2713is;\\u62fb\\u0180dpt\\u17a4\\u3ab5\\u3abe\\u0100fl\\u3aba\\u17a9;\\uc000\\ud835\\udd69im\\xe5\\u17b2\\u0100Aa\\u3ac7\\u3acar\\xf2\\u03cer\\xf2\\u0a01\\u0100cq\\u3ad2\\u17b8r;\\uc000\\ud835\\udccd\\u0100pt\\u17d6\\u3adcr\\xe9\\u17d4\\u0400acefiosu\\u3af0\\u3afd\\u3b08\\u3b0c\\u3b11\\u3b15\\u3b1b\\u3b21c\\u0100uy\\u3af6\\u3afbte\\u803b\\xfd\\u40fd;\\u444f\\u0100iy\\u3b02\\u3b06rc;\\u4177;\\u444bn\\u803b\\xa5\\u40a5r;\\uc000\\ud835\\udd36cy;\\u4457pf;\\uc000\\ud835\\udd6acr;\\uc000\\ud835\\udcce\\u0100cm\\u3b26\\u3b29y;\\u444el\\u803b\\xff\\u40ff\\u0500acdefhiosw\\u3b42\\u3b48\\u3b54\\u3b58\\u3b64\\u3b69\\u3b6d\\u3b74\\u3b7a\\u3b80cute;\\u417a\\u0100ay\\u3b4d\\u3b52ron;\\u417e;\\u4437ot;\\u417c\\u0100et\\u3b5d\\u3b61tr\\xe6\\u155fa;\\u43b6r;\\uc000\\ud835\\udd37cy;\\u4436grarr;\\u61ddpf;\\uc000\\ud835\\udd6bcr;\\uc000\\ud835\\udccf\\u0100jn\\u3b85\\u3b87;\\u600dj;\\u600c\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-html.js.map","// Generated using scripts/write-decode-map.ts\nexport default new Uint16Array(\n// prettier-ignore\n\"\\u0200aglq\\t\\x15\\x18\\x1b\\u026d\\x0f\\0\\0\\x12p;\\u4026os;\\u4027t;\\u403et;\\u403cuot;\\u4022\"\n    .split(\"\")\n    .map((c) => c.charCodeAt(0)));\n//# sourceMappingURL=decode-data-xml.js.map","import htmlDecodeTree from \"./generated/decode-data-html.js\";\nimport xmlDecodeTree from \"./generated/decode-data-xml.js\";\nimport decodeCodePoint, { replaceCodePoint, fromCodePoint, } from \"./decode_codepoint.js\";\n// Re-export for use by eg. htmlparser2\nexport { htmlDecodeTree, xmlDecodeTree, decodeCodePoint };\nexport { replaceCodePoint, fromCodePoint } from \"./decode_codepoint.js\";\nvar CharCodes;\n(function (CharCodes) {\n    CharCodes[CharCodes[\"NUM\"] = 35] = \"NUM\";\n    CharCodes[CharCodes[\"SEMI\"] = 59] = \"SEMI\";\n    CharCodes[CharCodes[\"EQUALS\"] = 61] = \"EQUALS\";\n    CharCodes[CharCodes[\"ZERO\"] = 48] = \"ZERO\";\n    CharCodes[CharCodes[\"NINE\"] = 57] = \"NINE\";\n    CharCodes[CharCodes[\"LOWER_A\"] = 97] = \"LOWER_A\";\n    CharCodes[CharCodes[\"LOWER_F\"] = 102] = \"LOWER_F\";\n    CharCodes[CharCodes[\"LOWER_X\"] = 120] = \"LOWER_X\";\n    CharCodes[CharCodes[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n    CharCodes[CharCodes[\"UPPER_A\"] = 65] = \"UPPER_A\";\n    CharCodes[CharCodes[\"UPPER_F\"] = 70] = \"UPPER_F\";\n    CharCodes[CharCodes[\"UPPER_Z\"] = 90] = \"UPPER_Z\";\n})(CharCodes || (CharCodes = {}));\n/** Bit that needs to be set to convert an upper case ASCII character to lower case */\nconst TO_LOWER_BIT = 0b100000;\nexport var BinTrieFlags;\n(function (BinTrieFlags) {\n    BinTrieFlags[BinTrieFlags[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"BRANCH_LENGTH\"] = 16256] = \"BRANCH_LENGTH\";\n    BinTrieFlags[BinTrieFlags[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\nfunction isNumber(code) {\n    return code >= CharCodes.ZERO && code <= CharCodes.NINE;\n}\nfunction isHexadecimalCharacter(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));\n}\nfunction isAsciiAlphaNumeric(code) {\n    return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||\n        (code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||\n        isNumber(code));\n}\n/**\n * Checks if the given character is a valid end character for an entity in an attribute.\n *\n * Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.\n * See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state\n */\nfunction isEntityInAttributeInvalidEnd(code) {\n    return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);\n}\nvar EntityDecoderState;\n(function (EntityDecoderState) {\n    EntityDecoderState[EntityDecoderState[\"EntityStart\"] = 0] = \"EntityStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericStart\"] = 1] = \"NumericStart\";\n    EntityDecoderState[EntityDecoderState[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n    EntityDecoderState[EntityDecoderState[\"NumericHex\"] = 3] = \"NumericHex\";\n    EntityDecoderState[EntityDecoderState[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\nexport var DecodingMode;\n(function (DecodingMode) {\n    /** Entities in text nodes that can end with any character. */\n    DecodingMode[DecodingMode[\"Legacy\"] = 0] = \"Legacy\";\n    /** Only allow entities terminated with a semicolon. */\n    DecodingMode[DecodingMode[\"Strict\"] = 1] = \"Strict\";\n    /** Entities in attributes have limitations on ending characters. */\n    DecodingMode[DecodingMode[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n * Token decoder with support of writing partial entities.\n */\nexport class EntityDecoder {\n    constructor(\n    /** The tree used to decode entities. */\n    decodeTree, \n    /**\n     * The function that is called when a codepoint is decoded.\n     *\n     * For multi-byte named entities, this will be called multiple times,\n     * with the second codepoint, and the same `consumed` value.\n     *\n     * @param codepoint The decoded codepoint.\n     * @param consumed The number of bytes consumed by the decoder.\n     */\n    emitCodePoint, \n    /** An object that is used to produce errors. */\n    errors) {\n        this.decodeTree = decodeTree;\n        this.emitCodePoint = emitCodePoint;\n        this.errors = errors;\n        /** The current state of the decoder. */\n        this.state = EntityDecoderState.EntityStart;\n        /** Characters that were consumed while parsing an entity. */\n        this.consumed = 1;\n        /**\n         * The result of the entity.\n         *\n         * Either the result index of a numeric entity, or the codepoint of a\n         * numeric entity.\n         */\n        this.result = 0;\n        /** The current index in the decode tree. */\n        this.treeIndex = 0;\n        /** The number of characters that were consumed in excess. */\n        this.excess = 1;\n        /** The mode in which the decoder is operating. */\n        this.decodeMode = DecodingMode.Strict;\n    }\n    /** Resets the instance to make it reusable. */\n    startEntity(decodeMode) {\n        this.decodeMode = decodeMode;\n        this.state = EntityDecoderState.EntityStart;\n        this.result = 0;\n        this.treeIndex = 0;\n        this.excess = 1;\n        this.consumed = 1;\n    }\n    /**\n     * Write an entity to the decoder. This can be called multiple times with partial entities.\n     * If the entity is incomplete, the decoder will return -1.\n     *\n     * Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the\n     * entity is incomplete, and resume when the next string is written.\n     *\n     * @param string The string containing the entity (or a continuation of the entity).\n     * @param offset The offset at which the entity begins. Should be 0 if this is not the first call.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    write(str, offset) {\n        switch (this.state) {\n            case EntityDecoderState.EntityStart: {\n                if (str.charCodeAt(offset) === CharCodes.NUM) {\n                    this.state = EntityDecoderState.NumericStart;\n                    this.consumed += 1;\n                    return this.stateNumericStart(str, offset + 1);\n                }\n                this.state = EntityDecoderState.NamedEntity;\n                return this.stateNamedEntity(str, offset);\n            }\n            case EntityDecoderState.NumericStart: {\n                return this.stateNumericStart(str, offset);\n            }\n            case EntityDecoderState.NumericDecimal: {\n                return this.stateNumericDecimal(str, offset);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.stateNumericHex(str, offset);\n            }\n            case EntityDecoderState.NamedEntity: {\n                return this.stateNamedEntity(str, offset);\n            }\n        }\n    }\n    /**\n     * Switches between the numeric decimal and hexadecimal states.\n     *\n     * Equivalent to the `Numeric character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericStart(str, offset) {\n        if (offset >= str.length) {\n            return -1;\n        }\n        if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n            this.state = EntityDecoderState.NumericHex;\n            this.consumed += 1;\n            return this.stateNumericHex(str, offset + 1);\n        }\n        this.state = EntityDecoderState.NumericDecimal;\n        return this.stateNumericDecimal(str, offset);\n    }\n    addToNumericResult(str, start, end, base) {\n        if (start !== end) {\n            const digitCount = end - start;\n            this.result =\n                this.result * Math.pow(base, digitCount) +\n                    parseInt(str.substr(start, digitCount), base);\n            this.consumed += digitCount;\n        }\n    }\n    /**\n     * Parses a hexadecimal numeric entity.\n     *\n     * Equivalent to the `Hexademical character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericHex(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char) || isHexadecimalCharacter(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 16);\n                return this.emitNumericEntity(char, 3);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 16);\n        return -1;\n    }\n    /**\n     * Parses a decimal numeric entity.\n     *\n     * Equivalent to the `Decimal character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNumericDecimal(str, offset) {\n        const startIdx = offset;\n        while (offset < str.length) {\n            const char = str.charCodeAt(offset);\n            if (isNumber(char)) {\n                offset += 1;\n            }\n            else {\n                this.addToNumericResult(str, startIdx, offset, 10);\n                return this.emitNumericEntity(char, 2);\n            }\n        }\n        this.addToNumericResult(str, startIdx, offset, 10);\n        return -1;\n    }\n    /**\n     * Validate and emit a numeric entity.\n     *\n     * Implements the logic from the `Hexademical character reference start\n     * state` and `Numeric character reference end state` in the HTML spec.\n     *\n     * @param lastCp The last code point of the entity. Used to see if the\n     *               entity was terminated with a semicolon.\n     * @param expectedLength The minimum number of characters that should be\n     *                       consumed. Used to validate that at least one digit\n     *                       was consumed.\n     * @returns The number of characters that were consumed.\n     */\n    emitNumericEntity(lastCp, expectedLength) {\n        var _a;\n        // Ensure we consumed at least one digit.\n        if (this.consumed <= expectedLength) {\n            (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n            return 0;\n        }\n        // Figure out if this is a legit end of the entity\n        if (lastCp === CharCodes.SEMI) {\n            this.consumed += 1;\n        }\n        else if (this.decodeMode === DecodingMode.Strict) {\n            return 0;\n        }\n        this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n        if (this.errors) {\n            if (lastCp !== CharCodes.SEMI) {\n                this.errors.missingSemicolonAfterCharacterReference();\n            }\n            this.errors.validateNumericCharacterReference(this.result);\n        }\n        return this.consumed;\n    }\n    /**\n     * Parses a named entity.\n     *\n     * Equivalent to the `Named character reference state` in the HTML spec.\n     *\n     * @param str The string containing the entity (or a continuation of the entity).\n     * @param offset The current offset.\n     * @returns The number of characters that were consumed, or -1 if the entity is incomplete.\n     */\n    stateNamedEntity(str, offset) {\n        const { decodeTree } = this;\n        let current = decodeTree[this.treeIndex];\n        // The mask is the number of bytes of the value, including the current byte.\n        let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n        for (; offset < str.length; offset++, this.excess++) {\n            const char = str.charCodeAt(offset);\n            this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n            if (this.treeIndex < 0) {\n                return this.result === 0 ||\n                    // If we are parsing an attribute\n                    (this.decodeMode === DecodingMode.Attribute &&\n                        // We shouldn't have consumed any characters after the entity,\n                        (valueLength === 0 ||\n                            // And there should be no invalid characters.\n                            isEntityInAttributeInvalidEnd(char)))\n                    ? 0\n                    : this.emitNotTerminatedNamedEntity();\n            }\n            current = decodeTree[this.treeIndex];\n            valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n            // If the branch is a value, store it and continue\n            if (valueLength !== 0) {\n                // If the entity is terminated by a semicolon, we are done.\n                if (char === CharCodes.SEMI) {\n                    return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n                }\n                // If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.\n                if (this.decodeMode !== DecodingMode.Strict) {\n                    this.result = this.treeIndex;\n                    this.consumed += this.excess;\n                    this.excess = 0;\n                }\n            }\n        }\n        return -1;\n    }\n    /**\n     * Emit a named entity that was not terminated with a semicolon.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNotTerminatedNamedEntity() {\n        var _a;\n        const { result, decodeTree } = this;\n        const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n        this.emitNamedEntityData(result, valueLength, this.consumed);\n        (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();\n        return this.consumed;\n    }\n    /**\n     * Emit a named entity.\n     *\n     * @param result The index of the entity in the decode tree.\n     * @param valueLength The number of bytes in the entity.\n     * @param consumed The number of characters consumed.\n     *\n     * @returns The number of characters consumed.\n     */\n    emitNamedEntityData(result, valueLength, consumed) {\n        const { decodeTree } = this;\n        this.emitCodePoint(valueLength === 1\n            ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH\n            : decodeTree[result + 1], consumed);\n        if (valueLength === 3) {\n            // For multi-byte values, we need to emit the second byte.\n            this.emitCodePoint(decodeTree[result + 2], consumed);\n        }\n        return consumed;\n    }\n    /**\n     * Signal to the parser that the end of the input was reached.\n     *\n     * Remaining data will be emitted and relevant errors will be produced.\n     *\n     * @returns The number of characters consumed.\n     */\n    end() {\n        var _a;\n        switch (this.state) {\n            case EntityDecoderState.NamedEntity: {\n                // Emit a named entity if we have one.\n                return this.result !== 0 &&\n                    (this.decodeMode !== DecodingMode.Attribute ||\n                        this.result === this.treeIndex)\n                    ? this.emitNotTerminatedNamedEntity()\n                    : 0;\n            }\n            // Otherwise, emit a numeric entity if we have one.\n            case EntityDecoderState.NumericDecimal: {\n                return this.emitNumericEntity(0, 2);\n            }\n            case EntityDecoderState.NumericHex: {\n                return this.emitNumericEntity(0, 3);\n            }\n            case EntityDecoderState.NumericStart: {\n                (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);\n                return 0;\n            }\n            case EntityDecoderState.EntityStart: {\n                // Return 0 if we have no entity.\n                return 0;\n            }\n        }\n    }\n}\n/**\n * Creates a function that decodes entities in a string.\n *\n * @param decodeTree The decode tree.\n * @returns A function that decodes entities in a string.\n */\nfunction getDecoder(decodeTree) {\n    let ret = \"\";\n    const decoder = new EntityDecoder(decodeTree, (str) => (ret += fromCodePoint(str)));\n    return function decodeWithTrie(str, decodeMode) {\n        let lastIndex = 0;\n        let offset = 0;\n        while ((offset = str.indexOf(\"&\", offset)) >= 0) {\n            ret += str.slice(lastIndex, offset);\n            decoder.startEntity(decodeMode);\n            const len = decoder.write(str, \n            // Skip the \"&\"\n            offset + 1);\n            if (len < 0) {\n                lastIndex = offset + decoder.end();\n                break;\n            }\n            lastIndex = offset + len;\n            // If `len` is 0, skip the current `&` and continue.\n            offset = len === 0 ? lastIndex + 1 : lastIndex;\n        }\n        const result = ret + str.slice(lastIndex);\n        // Make sure we don't keep a reference to the final string.\n        ret = \"\";\n        return result;\n    };\n}\n/**\n * Determines the branch of the current node that is taken given the current\n * character. This function is used to traverse the trie.\n *\n * @param decodeTree The trie.\n * @param current The current node.\n * @param nodeIdx The index right after the current node and its value.\n * @param char The current character.\n * @returns The index of the next node, or -1 if no branch is taken.\n */\nexport function determineBranch(decodeTree, current, nodeIdx, char) {\n    const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n    const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n    // Case 1: Single branch encoded in jump offset\n    if (branchCount === 0) {\n        return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;\n    }\n    // Case 2: Multiple branches encoded in jump table\n    if (jumpOffset) {\n        const value = char - jumpOffset;\n        return value < 0 || value >= branchCount\n            ? -1\n            : decodeTree[nodeIdx + value] - 1;\n    }\n    // Case 3: Multiple branches encoded in dictionary\n    // Binary search for the character.\n    let lo = nodeIdx;\n    let hi = lo + branchCount - 1;\n    while (lo <= hi) {\n        const mid = (lo + hi) >>> 1;\n        const midVal = decodeTree[mid];\n        if (midVal < char) {\n            lo = mid + 1;\n        }\n        else if (midVal > char) {\n            hi = mid - 1;\n        }\n        else {\n            return decodeTree[mid + branchCount];\n        }\n    }\n    return -1;\n}\nconst htmlDecoder = getDecoder(htmlDecodeTree);\nconst xmlDecoder = getDecoder(xmlDecodeTree);\n/**\n * Decodes an HTML string.\n *\n * @param str The string to decode.\n * @param mode The decoding mode.\n * @returns The decoded string.\n */\nexport function decodeHTML(str, mode = DecodingMode.Legacy) {\n    return htmlDecoder(str, mode);\n}\n/**\n * Decodes an HTML string in an attribute.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLAttribute(str) {\n    return htmlDecoder(str, DecodingMode.Attribute);\n}\n/**\n * Decodes an HTML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeHTMLStrict(str) {\n    return htmlDecoder(str, DecodingMode.Strict);\n}\n/**\n * Decodes an XML string, requiring all entities to be terminated by a semicolon.\n *\n * @param str The string to decode.\n * @returns The decoded string.\n */\nexport function decodeXML(str) {\n    return xmlDecoder(str, DecodingMode.Strict);\n}\n//# sourceMappingURL=decode.js.map","// Utilities\n//\n\nimport * as mdurl from 'mdurl'\nimport * as ucmicro from 'uc.micro'\nimport { decodeHTML } from 'entities'\n\nfunction _class (obj) { return Object.prototype.toString.call(obj) }\n\nfunction isString (obj) { return _class(obj) === '[object String]' }\n\nconst _hasOwnProperty = Object.prototype.hasOwnProperty\n\nfunction has (object, key) {\n  return _hasOwnProperty.call(object, key)\n}\n\n// Merge objects\n//\nfunction assign (obj /* from1, from2, from3, ... */) {\n  const sources = Array.prototype.slice.call(arguments, 1)\n\n  sources.forEach(function (source) {\n    if (!source) { return }\n\n    if (typeof source !== 'object') {\n      throw new TypeError(source + 'must be object')\n    }\n\n    Object.keys(source).forEach(function (key) {\n      obj[key] = source[key]\n    })\n  })\n\n  return obj\n}\n\n// Remove element from array and put another array at those position.\n// Useful for some operations with tokens\nfunction arrayReplaceAt (src, pos, newElements) {\n  return [].concat(src.slice(0, pos), newElements, src.slice(pos + 1))\n}\n\nfunction isValidEntityCode (c) {\n  /* eslint no-bitwise:0 */\n  // broken sequence\n  if (c >= 0xD800 && c <= 0xDFFF) { return false }\n  // never used\n  if (c >= 0xFDD0 && c <= 0xFDEF) { return false }\n  if ((c & 0xFFFF) === 0xFFFF || (c & 0xFFFF) === 0xFFFE) { return false }\n  // control codes\n  if (c >= 0x00 && c <= 0x08) { return false }\n  if (c === 0x0B) { return false }\n  if (c >= 0x0E && c <= 0x1F) { return false }\n  if (c >= 0x7F && c <= 0x9F) { return false }\n  // out of range\n  if (c > 0x10FFFF) { return false }\n  return true\n}\n\nfunction fromCodePoint (c) {\n  /* eslint no-bitwise:0 */\n  if (c > 0xffff) {\n    c -= 0x10000\n    const surrogate1 = 0xd800 + (c >> 10)\n    const surrogate2 = 0xdc00 + (c & 0x3ff)\n\n    return String.fromCharCode(surrogate1, surrogate2)\n  }\n  return String.fromCharCode(c)\n}\n\nconst UNESCAPE_MD_RE  = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_`{|}~])/g\nconst ENTITY_RE       = /&([a-z#][a-z0-9]{1,31});/gi\nconst UNESCAPE_ALL_RE = new RegExp(UNESCAPE_MD_RE.source + '|' + ENTITY_RE.source, 'gi')\n\nconst DIGITAL_ENTITY_TEST_RE = /^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i\n\nfunction replaceEntityPattern (match, name) {\n  if (name.charCodeAt(0) === 0x23/* # */ && DIGITAL_ENTITY_TEST_RE.test(name)) {\n    const code = name[1].toLowerCase() === 'x'\n      ? parseInt(name.slice(2), 16)\n      : parseInt(name.slice(1), 10)\n\n    if (isValidEntityCode(code)) {\n      return fromCodePoint(code)\n    }\n\n    return match\n  }\n\n  const decoded = decodeHTML(match)\n  if (decoded !== match) {\n    return decoded\n  }\n\n  return match\n}\n\n/* function replaceEntities(str) {\n  if (str.indexOf('&') < 0) { return str; }\n\n  return str.replace(ENTITY_RE, replaceEntityPattern);\n} */\n\nfunction unescapeMd (str) {\n  if (str.indexOf('\\\\') < 0) { return str }\n  return str.replace(UNESCAPE_MD_RE, '$1')\n}\n\nfunction unescapeAll (str) {\n  if (str.indexOf('\\\\') < 0 && str.indexOf('&') < 0) { return str }\n\n  return str.replace(UNESCAPE_ALL_RE, function (match, escaped, entity) {\n    if (escaped) { return escaped }\n    return replaceEntityPattern(match, entity)\n  })\n}\n\nconst HTML_ESCAPE_TEST_RE = /[&<>\"]/\nconst HTML_ESCAPE_REPLACE_RE = /[&<>\"]/g\nconst HTML_REPLACEMENTS = {\n  '&': '&amp;',\n  '<': '&lt;',\n  '>': '&gt;',\n  '\"': '&quot;'\n}\n\nfunction replaceUnsafeChar (ch) {\n  return HTML_REPLACEMENTS[ch]\n}\n\nfunction escapeHtml (str) {\n  if (HTML_ESCAPE_TEST_RE.test(str)) {\n    return str.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar)\n  }\n  return str\n}\n\nconst REGEXP_ESCAPE_RE = /[.?*+^$[\\]\\\\(){}|-]/g\n\nfunction escapeRE (str) {\n  return str.replace(REGEXP_ESCAPE_RE, '\\\\$&')\n}\n\nfunction isSpace (code) {\n  switch (code) {\n    case 0x09:\n    case 0x20:\n      return true\n  }\n  return false\n}\n\n// Zs (unicode class) || [\\t\\f\\v\\r\\n]\nfunction isWhiteSpace (code) {\n  if (code >= 0x2000 && code <= 0x200A) { return true }\n  switch (code) {\n    case 0x09: // \\t\n    case 0x0A: // \\n\n    case 0x0B: // \\v\n    case 0x0C: // \\f\n    case 0x0D: // \\r\n    case 0x20:\n    case 0xA0:\n    case 0x1680:\n    case 0x202F:\n    case 0x205F:\n    case 0x3000:\n      return true\n  }\n  return false\n}\n\n/* eslint-disable max-len */\n\n// Currently without astral characters support.\nfunction isPunctChar (ch) {\n  return ucmicro.P.test(ch) || ucmicro.S.test(ch)\n}\n\n// Markdown ASCII punctuation characters.\n//\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\n//\n// Don't confuse with unicode punctuation !!! It lacks some chars in ascii range.\n//\nfunction isMdAsciiPunct (ch) {\n  switch (ch) {\n    case 0x21/* ! */:\n    case 0x22/* \" */:\n    case 0x23/* # */:\n    case 0x24/* $ */:\n    case 0x25/* % */:\n    case 0x26/* & */:\n    case 0x27/* ' */:\n    case 0x28/* ( */:\n    case 0x29/* ) */:\n    case 0x2A/* * */:\n    case 0x2B/* + */:\n    case 0x2C/* , */:\n    case 0x2D/* - */:\n    case 0x2E/* . */:\n    case 0x2F/* / */:\n    case 0x3A/* : */:\n    case 0x3B/* ; */:\n    case 0x3C/* < */:\n    case 0x3D/* = */:\n    case 0x3E/* > */:\n    case 0x3F/* ? */:\n    case 0x40/* @ */:\n    case 0x5B/* [ */:\n    case 0x5C/* \\ */:\n    case 0x5D/* ] */:\n    case 0x5E/* ^ */:\n    case 0x5F/* _ */:\n    case 0x60/* ` */:\n    case 0x7B/* { */:\n    case 0x7C/* | */:\n    case 0x7D/* } */:\n    case 0x7E/* ~ */:\n      return true\n    default:\n      return false\n  }\n}\n\n// Hepler to unify [reference labels].\n//\nfunction normalizeReference (str) {\n  // Trim and collapse whitespace\n  //\n  str = str.trim().replace(/\\s+/g, ' ')\n\n  // In node v10 'ẞ'.toLowerCase() === 'Ṿ', which is presumed to be a bug\n  // fixed in v12 (couldn't find any details).\n  //\n  // So treat this one as a special case\n  // (remove this when node v10 is no longer supported).\n  //\n  if ('ẞ'.toLowerCase() === 'Ṿ') {\n    str = str.replace(/ẞ/g, 'ß')\n  }\n\n  // .toLowerCase().toUpperCase() should get rid of all differences\n  // between letter variants.\n  //\n  // Simple .toLowerCase() doesn't normalize 125 code points correctly,\n  // and .toUpperCase doesn't normalize 6 of them (list of exceptions:\n  // İ, ϴ, ẞ, Ω, K, Å - those are already uppercased, but have differently\n  // uppercased versions).\n  //\n  // Here's an example showing how it happens. Lets take greek letter omega:\n  // uppercase U+0398 (Θ), U+03f4 (ϴ) and lowercase U+03b8 (θ), U+03d1 (ϑ)\n  //\n  // Unicode entries:\n  // 0398;GREEK CAPITAL LETTER THETA;Lu;0;L;;;;;N;;;;03B8;\n  // 03B8;GREEK SMALL LETTER THETA;Ll;0;L;;;;;N;;;0398;;0398\n  // 03D1;GREEK THETA SYMBOL;Ll;0;L;<compat> 03B8;;;;N;GREEK SMALL LETTER SCRIPT THETA;;0398;;0398\n  // 03F4;GREEK CAPITAL THETA SYMBOL;Lu;0;L;<compat> 0398;;;;N;;;;03B8;\n  //\n  // Case-insensitive comparison should treat all of them as equivalent.\n  //\n  // But .toLowerCase() doesn't change ϑ (it's already lowercase),\n  // and .toUpperCase() doesn't change ϴ (already uppercase).\n  //\n  // Applying first lower then upper case normalizes any character:\n  // '\\u0398\\u03f4\\u03b8\\u03d1'.toLowerCase().toUpperCase() === '\\u0398\\u0398\\u0398\\u0398'\n  //\n  // Note: this is equivalent to unicode case folding; unicode normalization\n  // is a different step that is not required here.\n  //\n  // Final result should be uppercased, because it's later stored in an object\n  // (this avoid a conflict with Object.prototype members,\n  // most notably, `__proto__`)\n  //\n  return str.toLowerCase().toUpperCase()\n}\n\n// Re-export libraries commonly used in both markdown-it and its plugins,\n// so plugins won't have to depend on them explicitly, which reduces their\n// bundled size (e.g. a browser build).\n//\nconst lib = { mdurl, ucmicro }\n\nexport {\n  lib,\n  assign,\n  isString,\n  has,\n  unescapeMd,\n  unescapeAll,\n  isValidEntityCode,\n  fromCodePoint,\n  escapeHtml,\n  arrayReplaceAt,\n  isSpace,\n  isWhiteSpace,\n  isMdAsciiPunct,\n  isPunctChar,\n  escapeRE,\n  normalizeReference\n}\n","// Parse link destination\n//\n\nimport { unescapeAll } from '../common/utils.mjs'\n\nexport default function parseLinkDestination (str, start, max) {\n  let code\n  let pos = start\n\n  const result = {\n    ok: false,\n    pos: 0,\n    str: ''\n  }\n\n  if (str.charCodeAt(pos) === 0x3C /* < */) {\n    pos++\n    while (pos < max) {\n      code = str.charCodeAt(pos)\n      if (code === 0x0A /* \\n */) { return result }\n      if (code === 0x3C /* < */) { return result }\n      if (code === 0x3E /* > */) {\n        result.pos = pos + 1\n        result.str = unescapeAll(str.slice(start + 1, pos))\n        result.ok = true\n        return result\n      }\n      if (code === 0x5C /* \\ */ && pos + 1 < max) {\n        pos += 2\n        continue\n      }\n\n      pos++\n    }\n\n    // no closing '>'\n    return result\n  }\n\n  // this should be ... } else { ... branch\n\n  let level = 0\n  while (pos < max) {\n    code = str.charCodeAt(pos)\n\n    if (code === 0x20) { break }\n\n    // ascii control characters\n    if (code < 0x20 || code === 0x7F) { break }\n\n    if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      if (str.charCodeAt(pos + 1) === 0x20) { break }\n      pos += 2\n      continue\n    }\n\n    if (code === 0x28 /* ( */) {\n      level++\n      if (level > 32) { return result }\n    }\n\n    if (code === 0x29 /* ) */) {\n      if (level === 0) { break }\n      level--\n    }\n\n    pos++\n  }\n\n  if (start === pos) { return result }\n  if (level !== 0) { return result }\n\n  result.str = unescapeAll(str.slice(start, pos))\n  result.pos = pos\n  result.ok = true\n  return result\n}\n","// Parse link label\n//\n// this function assumes that first character (\"[\") already matches;\n// returns the end of the label\n//\n\nexport default function parseLinkLabel (state, start, disableNested) {\n  let level, found, marker, prevPos\n\n  const max = state.posMax\n  const oldPos = state.pos\n\n  state.pos = start + 1\n  level = 1\n\n  while (state.pos < max) {\n    marker = state.src.charCodeAt(state.pos)\n    if (marker === 0x5D /* ] */) {\n      level--\n      if (level === 0) {\n        found = true\n        break\n      }\n    }\n\n    prevPos = state.pos\n    state.md.inline.skipToken(state)\n    if (marker === 0x5B /* [ */) {\n      if (prevPos === state.pos - 1) {\n        // increase level if we find text `[`, which is not a part of any token\n        level++\n      } else if (disableNested) {\n        state.pos = oldPos\n        return -1\n      }\n    }\n  }\n\n  let labelEnd = -1\n\n  if (found) {\n    labelEnd = state.pos\n  }\n\n  // restore old state\n  state.pos = oldPos\n\n  return labelEnd\n}\n","// Parse link title\n//\n\nimport { unescapeAll } from '../common/utils.mjs'\n\n// Parse link title within `str` in [start, max] range,\n// or continue previous parsing if `prev_state` is defined (equal to result of last execution).\n//\nexport default function parseLinkTitle (str, start, max, prev_state) {\n  let code\n  let pos = start\n\n  const state = {\n    // if `true`, this is a valid link title\n    ok: false,\n    // if `true`, this link can be continued on the next line\n    can_continue: false,\n    // if `ok`, it's the position of the first character after the closing marker\n    pos: 0,\n    // if `ok`, it's the unescaped title\n    str: '',\n    // expected closing marker character code\n    marker: 0\n  }\n\n  if (prev_state) {\n    // this is a continuation of a previous parseLinkTitle call on the next line,\n    // used in reference links only\n    state.str = prev_state.str\n    state.marker = prev_state.marker\n  } else {\n    if (pos >= max) { return state }\n\n    let marker = str.charCodeAt(pos)\n    if (marker !== 0x22 /* \" */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return state }\n\n    start++\n    pos++\n\n    // if opening marker is \"(\", switch it to closing marker \")\"\n    if (marker === 0x28) { marker = 0x29 }\n\n    state.marker = marker\n  }\n\n  while (pos < max) {\n    code = str.charCodeAt(pos)\n    if (code === state.marker) {\n      state.pos = pos + 1\n      state.str += unescapeAll(str.slice(start, pos))\n      state.ok = true\n      return state\n    } else if (code === 0x28 /* ( */ && state.marker === 0x29 /* ) */) {\n      return state\n    } else if (code === 0x5C /* \\ */ && pos + 1 < max) {\n      pos++\n    }\n\n    pos++\n  }\n\n  // no closing marker found, but this link title may continue on the next line (for references)\n  state.can_continue = true\n  state.str += unescapeAll(str.slice(start, pos))\n  return state\n}\n","/**\n * class Renderer\n *\n * Generates HTML from parsed token stream. Each instance has independent\n * copy of rules. Those can be rewritten with ease. Also, you can add new\n * rules if you create plugin and adds new token types.\n **/\n\nimport { assign, unescapeAll, escapeHtml } from './common/utils.mjs'\n\nconst default_rules = {}\n\ndefault_rules.code_inline = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  return  '<code' + slf.renderAttrs(token) + '>' +\n          escapeHtml(token.content) +\n          '</code>'\n}\n\ndefault_rules.code_block = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  return  '<pre' + slf.renderAttrs(token) + '><code>' +\n          escapeHtml(tokens[idx].content) +\n          '</code></pre>\\n'\n}\n\ndefault_rules.fence = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n  const info = token.info ? unescapeAll(token.info).trim() : ''\n  let langName = ''\n  let langAttrs = ''\n\n  if (info) {\n    const arr = info.split(/(\\s+)/g)\n    langName = arr[0]\n    langAttrs = arr.slice(2).join('')\n  }\n\n  let highlighted\n  if (options.highlight) {\n    highlighted = options.highlight(token.content, langName, langAttrs) || escapeHtml(token.content)\n  } else {\n    highlighted = escapeHtml(token.content)\n  }\n\n  if (highlighted.indexOf('<pre') === 0) {\n    return highlighted + '\\n'\n  }\n\n  // If language exists, inject class gently, without modifying original token.\n  // May be, one day we will add .deepClone() for token and simplify this part, but\n  // now we prefer to keep things local.\n  if (info) {\n    const i = token.attrIndex('class')\n    const tmpAttrs = token.attrs ? token.attrs.slice() : []\n\n    if (i < 0) {\n      tmpAttrs.push(['class', options.langPrefix + langName])\n    } else {\n      tmpAttrs[i] = tmpAttrs[i].slice()\n      tmpAttrs[i][1] += ' ' + options.langPrefix + langName\n    }\n\n    // Fake token just to render attributes\n    const tmpToken = {\n      attrs: tmpAttrs\n    }\n\n    return `<pre><code${slf.renderAttrs(tmpToken)}>${highlighted}</code></pre>\\n`\n  }\n\n  return `<pre><code${slf.renderAttrs(token)}>${highlighted}</code></pre>\\n`\n}\n\ndefault_rules.image = function (tokens, idx, options, env, slf) {\n  const token = tokens[idx]\n\n  // \"alt\" attr MUST be set, even if empty. Because it's mandatory and\n  // should be placed on proper position for tests.\n  //\n  // Replace content with actual value\n\n  token.attrs[token.attrIndex('alt')][1] =\n    slf.renderInlineAsText(token.children, options, env)\n\n  return slf.renderToken(tokens, idx, options)\n}\n\ndefault_rules.hardbreak = function (tokens, idx, options /*, env */) {\n  return options.xhtmlOut ? '<br />\\n' : '<br>\\n'\n}\ndefault_rules.softbreak = function (tokens, idx, options /*, env */) {\n  return options.breaks ? (options.xhtmlOut ? '<br />\\n' : '<br>\\n') : '\\n'\n}\n\ndefault_rules.text = function (tokens, idx /*, options, env */) {\n  return escapeHtml(tokens[idx].content)\n}\n\ndefault_rules.html_block = function (tokens, idx /*, options, env */) {\n  return tokens[idx].content\n}\ndefault_rules.html_inline = function (tokens, idx /*, options, env */) {\n  return tokens[idx].content\n}\n\n/**\n * new Renderer()\n *\n * Creates new [[Renderer]] instance and fill [[Renderer#rules]] with defaults.\n **/\nfunction Renderer () {\n  /**\n   * Renderer#rules -> Object\n   *\n   * Contains render rules for tokens. Can be updated and extended.\n   *\n   * ##### Example\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   *\n   * md.renderer.rules.strong_open  = function () { return '<b>'; };\n   * md.renderer.rules.strong_close = function () { return '</b>'; };\n   *\n   * var result = md.renderInline(...);\n   * ```\n   *\n   * Each rule is called as independent static function with fixed signature:\n   *\n   * ```javascript\n   * function my_token_render(tokens, idx, options, env, renderer) {\n   *   // ...\n   *   return renderedHTML;\n   * }\n   * ```\n   *\n   * See [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs)\n   * for more details and examples.\n   **/\n  this.rules = assign({}, default_rules)\n}\n\n/**\n * Renderer.renderAttrs(token) -> String\n *\n * Render token attributes to string.\n **/\nRenderer.prototype.renderAttrs = function renderAttrs (token) {\n  let i, l, result\n\n  if (!token.attrs) { return '' }\n\n  result = ''\n\n  for (i = 0, l = token.attrs.length; i < l; i++) {\n    result += ' ' + escapeHtml(token.attrs[i][0]) + '=\"' + escapeHtml(token.attrs[i][1]) + '\"'\n  }\n\n  return result\n}\n\n/**\n * Renderer.renderToken(tokens, idx, options) -> String\n * - tokens (Array): list of tokens\n * - idx (Numbed): token index to render\n * - options (Object): params of parser instance\n *\n * Default token renderer. Can be overriden by custom function\n * in [[Renderer#rules]].\n **/\nRenderer.prototype.renderToken = function renderToken (tokens, idx, options) {\n  const token = tokens[idx]\n  let result = ''\n\n  // Tight list paragraphs\n  if (token.hidden) {\n    return ''\n  }\n\n  // Insert a newline between hidden paragraph and subsequent opening\n  // block-level tag.\n  //\n  // For example, here we should insert a newline before blockquote:\n  //  - a\n  //    >\n  //\n  if (token.block && token.nesting !== -1 && idx && tokens[idx - 1].hidden) {\n    result += '\\n'\n  }\n\n  // Add token name, e.g. `<img`\n  result += (token.nesting === -1 ? '</' : '<') + token.tag\n\n  // Encode attributes, e.g. `<img src=\"foo\"`\n  result += this.renderAttrs(token)\n\n  // Add a slash for self-closing tags, e.g. `<img src=\"foo\" /`\n  if (token.nesting === 0 && options.xhtmlOut) {\n    result += ' /'\n  }\n\n  // Check if we need to add a newline after this tag\n  let needLf = false\n  if (token.block) {\n    needLf = true\n\n    if (token.nesting === 1) {\n      if (idx + 1 < tokens.length) {\n        const nextToken = tokens[idx + 1]\n\n        if (nextToken.type === 'inline' || nextToken.hidden) {\n          // Block-level tag containing an inline tag.\n          //\n          needLf = false\n        } else if (nextToken.nesting === -1 && nextToken.tag === token.tag) {\n          // Opening tag + closing tag of the same type. E.g. `<li></li>`.\n          //\n          needLf = false\n        }\n      }\n    }\n  }\n\n  result += needLf ? '>\\n' : '>'\n\n  return result\n}\n\n/**\n * Renderer.renderInline(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * The same as [[Renderer.render]], but for single token of `inline` type.\n **/\nRenderer.prototype.renderInline = function (tokens, options, env) {\n  let result = ''\n  const rules = this.rules\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    const type = tokens[i].type\n\n    if (typeof rules[type] !== 'undefined') {\n      result += rules[type](tokens, i, options, env, this)\n    } else {\n      result += this.renderToken(tokens, i, options)\n    }\n  }\n\n  return result\n}\n\n/** internal\n * Renderer.renderInlineAsText(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Special kludge for image `alt` attributes to conform CommonMark spec.\n * Don't try to use it! Spec requires to show `alt` content with stripped markup,\n * instead of simple escaping.\n **/\nRenderer.prototype.renderInlineAsText = function (tokens, options, env) {\n  let result = ''\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    switch (tokens[i].type) {\n      case 'text':\n        result += tokens[i].content\n        break\n      case 'image':\n        result += this.renderInlineAsText(tokens[i].children, options, env)\n        break\n      case 'html_inline':\n      case 'html_block':\n        result += tokens[i].content\n        break\n      case 'softbreak':\n      case 'hardbreak':\n        result += '\\n'\n        break\n      default:\n        // all other tokens are skipped\n    }\n  }\n\n  return result\n}\n\n/**\n * Renderer.render(tokens, options, env) -> String\n * - tokens (Array): list on block tokens to render\n * - options (Object): params of parser instance\n * - env (Object): additional data from parsed input (references, for example)\n *\n * Takes token stream and generates HTML. Probably, you will never need to call\n * this method directly.\n **/\nRenderer.prototype.render = function (tokens, options, env) {\n  let result = ''\n  const rules = this.rules\n\n  for (let i = 0, len = tokens.length; i < len; i++) {\n    const type = tokens[i].type\n\n    if (type === 'inline') {\n      result += this.renderInline(tokens[i].children, options, env)\n    } else if (typeof rules[type] !== 'undefined') {\n      result += rules[type](tokens, i, options, env, this)\n    } else {\n      result += this.renderToken(tokens, i, options, env)\n    }\n  }\n\n  return result\n}\n\nexport default Renderer\n","/**\n * class Ruler\n *\n * Helper class, used by [[MarkdownIt#core]], [[MarkdownIt#block]] and\n * [[MarkdownIt#inline]] to manage sequences of functions (rules):\n *\n * - keep rules in defined order\n * - assign the name to each rule\n * - enable/disable rules\n * - add/replace rules\n * - allow assign rules to additional named chains (in the same)\n * - cacheing lists of active rules\n *\n * You will not need use this class directly until write plugins. For simple\n * rules control use [[MarkdownIt.disable]], [[MarkdownIt.enable]] and\n * [[MarkdownIt.use]].\n **/\n\n/**\n * new Ruler()\n **/\nfunction Ruler () {\n  // List of added rules. Each element is:\n  //\n  // {\n  //   name: XXX,\n  //   enabled: Boolean,\n  //   fn: Function(),\n  //   alt: [ name2, name3 ]\n  // }\n  //\n  this.__rules__ = []\n\n  // Cached rule chains.\n  //\n  // First level - chain name, '' for default.\n  // Second level - diginal anchor for fast filtering by charcodes.\n  //\n  this.__cache__ = null\n}\n\n// Helper methods, should not be used directly\n\n// Find rule index by name\n//\nRuler.prototype.__find__ = function (name) {\n  for (let i = 0; i < this.__rules__.length; i++) {\n    if (this.__rules__[i].name === name) {\n      return i\n    }\n  }\n  return -1\n}\n\n// Build rules lookup cache\n//\nRuler.prototype.__compile__ = function () {\n  const self = this\n  const chains = ['']\n\n  // collect unique names\n  self.__rules__.forEach(function (rule) {\n    if (!rule.enabled) { return }\n\n    rule.alt.forEach(function (altName) {\n      if (chains.indexOf(altName) < 0) {\n        chains.push(altName)\n      }\n    })\n  })\n\n  self.__cache__ = {}\n\n  chains.forEach(function (chain) {\n    self.__cache__[chain] = []\n    self.__rules__.forEach(function (rule) {\n      if (!rule.enabled) { return }\n\n      if (chain && rule.alt.indexOf(chain) < 0) { return }\n\n      self.__cache__[chain].push(rule.fn)\n    })\n  })\n}\n\n/**\n * Ruler.at(name, fn [, options])\n * - name (String): rule name to replace.\n * - fn (Function): new rule function.\n * - options (Object): new rule options (not mandatory).\n *\n * Replace rule by name with new function & options. Throws error if name not\n * found.\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * Replace existing typographer replacement rule with new one:\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.at('replacements', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.at = function (name, fn, options) {\n  const index = this.__find__(name)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + name) }\n\n  this.__rules__[index].fn = fn\n  this.__rules__[index].alt = opt.alt || []\n  this.__cache__ = null\n}\n\n/**\n * Ruler.before(beforeName, ruleName, fn [, options])\n * - beforeName (String): new rule will be added before this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain before one with given name. See also\n * [[Ruler.after]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.block.ruler.before('paragraph', 'my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.before = function (beforeName, ruleName, fn, options) {\n  const index = this.__find__(beforeName)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + beforeName) }\n\n  this.__rules__.splice(index, 0, {\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.after(afterName, ruleName, fn [, options])\n * - afterName (String): new rule will be added after this one.\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Add new rule to chain after one with given name. See also\n * [[Ruler.before]], [[Ruler.push]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.inline.ruler.after('text', 'my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.after = function (afterName, ruleName, fn, options) {\n  const index = this.__find__(afterName)\n  const opt = options || {}\n\n  if (index === -1) { throw new Error('Parser rule not found: ' + afterName) }\n\n  this.__rules__.splice(index + 1, 0, {\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.push(ruleName, fn [, options])\n * - ruleName (String): name of added rule.\n * - fn (Function): rule function.\n * - options (Object): rule options (not mandatory).\n *\n * Push new rule to the end of chain. See also\n * [[Ruler.before]], [[Ruler.after]].\n *\n * ##### Options:\n *\n * - __alt__ - array with names of \"alternate\" chains.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')();\n *\n * md.core.ruler.push('my_rule', function replace(state) {\n *   //...\n * });\n * ```\n **/\nRuler.prototype.push = function (ruleName, fn, options) {\n  const opt = options || {}\n\n  this.__rules__.push({\n    name: ruleName,\n    enabled: true,\n    fn,\n    alt: opt.alt || []\n  })\n\n  this.__cache__ = null\n}\n\n/**\n * Ruler.enable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to enable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.disable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.enable = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  const result = []\n\n  // Search by name and enable\n  list.forEach(function (name) {\n    const idx = this.__find__(name)\n\n    if (idx < 0) {\n      if (ignoreInvalid) { return }\n      throw new Error('Rules manager: invalid rule name ' + name)\n    }\n    this.__rules__[idx].enabled = true\n    result.push(name)\n  }, this)\n\n  this.__cache__ = null\n  return result\n}\n\n/**\n * Ruler.enableOnly(list [, ignoreInvalid])\n * - list (String|Array): list of rule names to enable (whitelist).\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable rules with given names, and disable everything else. If any rule name\n * not found - throw Error. Errors can be disabled by second param.\n *\n * See also [[Ruler.disable]], [[Ruler.enable]].\n **/\nRuler.prototype.enableOnly = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  this.__rules__.forEach(function (rule) { rule.enabled = false })\n\n  this.enable(list, ignoreInvalid)\n}\n\n/**\n * Ruler.disable(list [, ignoreInvalid]) -> Array\n * - list (String|Array): list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Disable rules with given names. If any rule name not found - throw Error.\n * Errors can be disabled by second param.\n *\n * Returns list of found rule names (if no exception happened).\n *\n * See also [[Ruler.enable]], [[Ruler.enableOnly]].\n **/\nRuler.prototype.disable = function (list, ignoreInvalid) {\n  if (!Array.isArray(list)) { list = [list] }\n\n  const result = []\n\n  // Search by name and disable\n  list.forEach(function (name) {\n    const idx = this.__find__(name)\n\n    if (idx < 0) {\n      if (ignoreInvalid) { return }\n      throw new Error('Rules manager: invalid rule name ' + name)\n    }\n    this.__rules__[idx].enabled = false\n    result.push(name)\n  }, this)\n\n  this.__cache__ = null\n  return result\n}\n\n/**\n * Ruler.getRules(chainName) -> Array\n *\n * Return array of active functions (rules) for given chain name. It analyzes\n * rules configuration, compiles caches if not exists and returns result.\n *\n * Default chain name is `''` (empty string). It can't be skipped. That's\n * done intentionally, to keep signature monomorphic for high speed.\n **/\nRuler.prototype.getRules = function (chainName) {\n  if (this.__cache__ === null) {\n    this.__compile__()\n  }\n\n  // Chain can be empty, if rules disabled. But we still have to return Array.\n  return this.__cache__[chainName] || []\n}\n\nexport default Ruler\n","// Token class\n\n/**\n * class Token\n **/\n\n/**\n * new Token(type, tag, nesting)\n *\n * Create new token and fill passed properties.\n **/\nfunction Token (type, tag, nesting) {\n  /**\n   * Token#type -> String\n   *\n   * Type of the token (string, e.g. \"paragraph_open\")\n   **/\n  this.type     = type\n\n  /**\n   * Token#tag -> String\n   *\n   * html tag name, e.g. \"p\"\n   **/\n  this.tag      = tag\n\n  /**\n   * Token#attrs -> Array\n   *\n   * Html attributes. Format: `[ [ name1, value1 ], [ name2, value2 ] ]`\n   **/\n  this.attrs    = null\n\n  /**\n   * Token#map -> Array\n   *\n   * Source map info. Format: `[ line_begin, line_end ]`\n   **/\n  this.map      = null\n\n  /**\n   * Token#nesting -> Number\n   *\n   * Level change (number in {-1, 0, 1} set), where:\n   *\n   * -  `1` means the tag is opening\n   * -  `0` means the tag is self-closing\n   * - `-1` means the tag is closing\n   **/\n  this.nesting  = nesting\n\n  /**\n   * Token#level -> Number\n   *\n   * nesting level, the same as `state.level`\n   **/\n  this.level    = 0\n\n  /**\n   * Token#children -> Array\n   *\n   * An array of child nodes (inline and img tokens)\n   **/\n  this.children = null\n\n  /**\n   * Token#content -> String\n   *\n   * In a case of self-closing tag (code, html, fence, etc.),\n   * it has contents of this tag.\n   **/\n  this.content  = ''\n\n  /**\n   * Token#markup -> String\n   *\n   * '*' or '_' for emphasis, fence string for fence, etc.\n   **/\n  this.markup   = ''\n\n  /**\n   * Token#info -> String\n   *\n   * Additional information:\n   *\n   * - Info string for \"fence\" tokens\n   * - The value \"auto\" for autolink \"link_open\" and \"link_close\" tokens\n   * - The string value of the item marker for ordered-list \"list_item_open\" tokens\n   **/\n  this.info     = ''\n\n  /**\n   * Token#meta -> Object\n   *\n   * A place for plugins to store an arbitrary data\n   **/\n  this.meta     = null\n\n  /**\n   * Token#block -> Boolean\n   *\n   * True for block-level tokens, false for inline tokens.\n   * Used in renderer to calculate line breaks\n   **/\n  this.block    = false\n\n  /**\n   * Token#hidden -> Boolean\n   *\n   * If it's true, ignore this element when rendering. Used for tight lists\n   * to hide paragraphs.\n   **/\n  this.hidden   = false\n}\n\n/**\n * Token.attrIndex(name) -> Number\n *\n * Search attribute index by name.\n **/\nToken.prototype.attrIndex = function attrIndex (name) {\n  if (!this.attrs) { return -1 }\n\n  const attrs = this.attrs\n\n  for (let i = 0, len = attrs.length; i < len; i++) {\n    if (attrs[i][0] === name) { return i }\n  }\n  return -1\n}\n\n/**\n * Token.attrPush(attrData)\n *\n * Add `[ name, value ]` attribute to list. Init attrs if necessary\n **/\nToken.prototype.attrPush = function attrPush (attrData) {\n  if (this.attrs) {\n    this.attrs.push(attrData)\n  } else {\n    this.attrs = [attrData]\n  }\n}\n\n/**\n * Token.attrSet(name, value)\n *\n * Set `name` attribute to `value`. Override old value if exists.\n **/\nToken.prototype.attrSet = function attrSet (name, value) {\n  const idx = this.attrIndex(name)\n  const attrData = [name, value]\n\n  if (idx < 0) {\n    this.attrPush(attrData)\n  } else {\n    this.attrs[idx] = attrData\n  }\n}\n\n/**\n * Token.attrGet(name)\n *\n * Get the value of attribute `name`, or null if it does not exist.\n **/\nToken.prototype.attrGet = function attrGet (name) {\n  const idx = this.attrIndex(name)\n  let value = null\n  if (idx >= 0) {\n    value = this.attrs[idx][1]\n  }\n  return value\n}\n\n/**\n * Token.attrJoin(name, value)\n *\n * Join value to existing attribute via space. Or create new attribute if not\n * exists. Useful to operate with token classes.\n **/\nToken.prototype.attrJoin = function attrJoin (name, value) {\n  const idx = this.attrIndex(name)\n\n  if (idx < 0) {\n    this.attrPush([name, value])\n  } else {\n    this.attrs[idx][1] = this.attrs[idx][1] + ' ' + value\n  }\n}\n\nexport default Token\n","// Core state object\n//\n\nimport Token from '../token.mjs'\n\nfunction StateCore (src, md, env) {\n  this.src = src\n  this.env = env\n  this.tokens = []\n  this.inlineMode = false\n  this.md = md // link to parser instance\n}\n\n// re-export Token class to use in core rules\nStateCore.prototype.Token = Token\n\nexport default StateCore\n","// Normalize input string\n\n// https://spec.commonmark.org/0.29/#line-ending\nconst NEWLINES_RE  = /\\r\\n?|\\n/g\nconst NULL_RE      = /\\0/g\n\nexport default function normalize (state) {\n  let str\n\n  // Normalize newlines\n  str = state.src.replace(NEWLINES_RE, '\\n')\n\n  // Replace NULL characters\n  str = str.replace(NULL_RE, '\\uFFFD')\n\n  state.src = str\n}\n","// Replace link-like texts with link nodes.\n//\n// Currently restricted by `md.validateLink()` to http/https/ftp\n//\n\nimport { arrayReplaceAt } from '../common/utils.mjs'\n\nfunction isLinkOpen (str) {\n  return /^<a[>\\s]/i.test(str)\n}\nfunction isLinkClose (str) {\n  return /^<\\/a\\s*>/i.test(str)\n}\n\nexport default function linkify (state) {\n  const blockTokens = state.tokens\n\n  if (!state.md.options.linkify) { return }\n\n  for (let j = 0, l = blockTokens.length; j < l; j++) {\n    if (blockTokens[j].type !== 'inline' ||\n        !state.md.linkify.pretest(blockTokens[j].content)) {\n      continue\n    }\n\n    let tokens = blockTokens[j].children\n\n    let htmlLinkLevel = 0\n\n    // We scan from the end, to keep position when new tags added.\n    // Use reversed logic in links start/end match\n    for (let i = tokens.length - 1; i >= 0; i--) {\n      const currentToken = tokens[i]\n\n      // Skip content of markdown links\n      if (currentToken.type === 'link_close') {\n        i--\n        while (tokens[i].level !== currentToken.level && tokens[i].type !== 'link_open') {\n          i--\n        }\n        continue\n      }\n\n      // Skip content of html tag links\n      if (currentToken.type === 'html_inline') {\n        if (isLinkOpen(currentToken.content) && htmlLinkLevel > 0) {\n          htmlLinkLevel--\n        }\n        if (isLinkClose(currentToken.content)) {\n          htmlLinkLevel++\n        }\n      }\n      if (htmlLinkLevel > 0) { continue }\n\n      if (currentToken.type === 'text' && state.md.linkify.test(currentToken.content)) {\n        const text = currentToken.content\n        let links = state.md.linkify.match(text)\n\n        // Now split string to nodes\n        const nodes = []\n        let level = currentToken.level\n        let lastPos = 0\n\n        // forbid escape sequence at the start of the string,\n        // this avoids http\\://example.com/ from being linkified as\n        // http:<a href=\"//example.com/\">//example.com/</a>\n        if (links.length > 0 &&\n            links[0].index === 0 &&\n            i > 0 &&\n            tokens[i - 1].type === 'text_special') {\n          links = links.slice(1)\n        }\n\n        for (let ln = 0; ln < links.length; ln++) {\n          const url = links[ln].url\n          const fullUrl = state.md.normalizeLink(url)\n          if (!state.md.validateLink(fullUrl)) { continue }\n\n          let urlText = links[ln].text\n\n          // Linkifier might send raw hostnames like \"example.com\", where url\n          // starts with domain name. So we prepend http:// in those cases,\n          // and remove it afterwards.\n          //\n          if (!links[ln].schema) {\n            urlText = state.md.normalizeLinkText('http://' + urlText).replace(/^http:\\/\\//, '')\n          } else if (links[ln].schema === 'mailto:' && !/^mailto:/i.test(urlText)) {\n            urlText = state.md.normalizeLinkText('mailto:' + urlText).replace(/^mailto:/, '')\n          } else {\n            urlText = state.md.normalizeLinkText(urlText)\n          }\n\n          const pos = links[ln].index\n\n          if (pos > lastPos) {\n            const token   = new state.Token('text', '', 0)\n            token.content = text.slice(lastPos, pos)\n            token.level   = level\n            nodes.push(token)\n          }\n\n          const token_o   = new state.Token('link_open', 'a', 1)\n          token_o.attrs   = [['href', fullUrl]]\n          token_o.level   = level++\n          token_o.markup  = 'linkify'\n          token_o.info    = 'auto'\n          nodes.push(token_o)\n\n          const token_t   = new state.Token('text', '', 0)\n          token_t.content = urlText\n          token_t.level   = level\n          nodes.push(token_t)\n\n          const token_c   = new state.Token('link_close', 'a', -1)\n          token_c.level   = --level\n          token_c.markup  = 'linkify'\n          token_c.info    = 'auto'\n          nodes.push(token_c)\n\n          lastPos = links[ln].lastIndex\n        }\n        if (lastPos < text.length) {\n          const token   = new state.Token('text', '', 0)\n          token.content = text.slice(lastPos)\n          token.level   = level\n          nodes.push(token)\n        }\n\n        // replace current node\n        blockTokens[j].children = tokens = arrayReplaceAt(tokens, i, nodes)\n      }\n    }\n  }\n}\n","// Simple typographic replacements\n//\n// (c) (C) → ©\n// (tm) (TM) → ™\n// (r) (R) → ®\n// +- → ±\n// ... → … (also ?.... → ?.., !.... → !..)\n// ???????? → ???, !!!!! → !!!, `,,` → `,`\n// -- → &ndash;, --- → &mdash;\n//\n\n// TODO:\n// - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾\n// - multiplications 2 x 4 -> 2 × 4\n\nconst RARE_RE = /\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/\n\n// Workaround for phantomjs - need regex without /g flag,\n// or root check will fail every second time\nconst SCOPED_ABBR_TEST_RE = /\\((c|tm|r)\\)/i\n\nconst SCOPED_ABBR_RE = /\\((c|tm|r)\\)/ig\nconst SCOPED_ABBR = {\n  c: '©',\n  r: '®',\n  tm: '™'\n}\n\nfunction replaceFn (match, name) {\n  return SCOPED_ABBR[name.toLowerCase()]\n}\n\nfunction replace_scoped (inlineTokens) {\n  let inside_autolink = 0\n\n  for (let i = inlineTokens.length - 1; i >= 0; i--) {\n    const token = inlineTokens[i]\n\n    if (token.type === 'text' && !inside_autolink) {\n      token.content = token.content.replace(SCOPED_ABBR_RE, replaceFn)\n    }\n\n    if (token.type === 'link_open' && token.info === 'auto') {\n      inside_autolink--\n    }\n\n    if (token.type === 'link_close' && token.info === 'auto') {\n      inside_autolink++\n    }\n  }\n}\n\nfunction replace_rare (inlineTokens) {\n  let inside_autolink = 0\n\n  for (let i = inlineTokens.length - 1; i >= 0; i--) {\n    const token = inlineTokens[i]\n\n    if (token.type === 'text' && !inside_autolink) {\n      if (RARE_RE.test(token.content)) {\n        token.content = token.content\n          .replace(/\\+-/g, '±')\n          // .., ..., ....... -> …\n          // but ?..... & !..... -> ?.. & !..\n          .replace(/\\.{2,}/g, '…').replace(/([?!])…/g, '$1..')\n          .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',')\n          // em-dash\n          .replace(/(^|[^-])---(?=[^-]|$)/mg, '$1\\u2014')\n          // en-dash\n          .replace(/(^|\\s)--(?=\\s|$)/mg, '$1\\u2013')\n          .replace(/(^|[^-\\s])--(?=[^-\\s]|$)/mg, '$1\\u2013')\n      }\n    }\n\n    if (token.type === 'link_open' && token.info === 'auto') {\n      inside_autolink--\n    }\n\n    if (token.type === 'link_close' && token.info === 'auto') {\n      inside_autolink++\n    }\n  }\n}\n\nexport default function replace (state) {\n  let blkIdx\n\n  if (!state.md.options.typographer) { return }\n\n  for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n    if (state.tokens[blkIdx].type !== 'inline') { continue }\n\n    if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) {\n      replace_scoped(state.tokens[blkIdx].children)\n    }\n\n    if (RARE_RE.test(state.tokens[blkIdx].content)) {\n      replace_rare(state.tokens[blkIdx].children)\n    }\n  }\n}\n","// Convert straight quotation marks to typographic ones\n//\n\nimport { isWhiteSpace, isPunctChar, isMdAsciiPunct } from '../common/utils.mjs'\n\nconst QUOTE_TEST_RE = /['\"]/\nconst QUOTE_RE = /['\"]/g\nconst APOSTROPHE = '\\u2019' /* ’ */\n\nfunction replaceAt (str, index, ch) {\n  return str.slice(0, index) + ch + str.slice(index + 1)\n}\n\nfunction process_inlines (tokens, state) {\n  let j\n\n  const stack = []\n\n  for (let i = 0; i < tokens.length; i++) {\n    const token = tokens[i]\n\n    const thisLevel = tokens[i].level\n\n    for (j = stack.length - 1; j >= 0; j--) {\n      if (stack[j].level <= thisLevel) { break }\n    }\n    stack.length = j + 1\n\n    if (token.type !== 'text') { continue }\n\n    let text = token.content\n    let pos = 0\n    let max = text.length\n\n    /* eslint no-labels:0,block-scoped-var:0 */\n    OUTER:\n    while (pos < max) {\n      QUOTE_RE.lastIndex = pos\n      const t = QUOTE_RE.exec(text)\n      if (!t) { break }\n\n      let canOpen = true\n      let canClose = true\n      pos = t.index + 1\n      const isSingle = (t[0] === \"'\")\n\n      // Find previous character,\n      // default to space if it's the beginning of the line\n      //\n      let lastChar = 0x20\n\n      if (t.index - 1 >= 0) {\n        lastChar = text.charCodeAt(t.index - 1)\n      } else {\n        for (j = i - 1; j >= 0; j--) {\n          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // lastChar defaults to 0x20\n          if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n          lastChar = tokens[j].content.charCodeAt(tokens[j].content.length - 1)\n          break\n        }\n      }\n\n      // Find next character,\n      // default to space if it's the end of the line\n      //\n      let nextChar = 0x20\n\n      if (pos < max) {\n        nextChar = text.charCodeAt(pos)\n      } else {\n        for (j = i + 1; j < tokens.length; j++) {\n          if (tokens[j].type === 'softbreak' || tokens[j].type === 'hardbreak') break // nextChar defaults to 0x20\n          if (!tokens[j].content) continue // should skip all tokens except 'text', 'html_inline' or 'code_inline'\n\n          nextChar = tokens[j].content.charCodeAt(0)\n          break\n        }\n      }\n\n      const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar))\n      const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar))\n\n      const isLastWhiteSpace = isWhiteSpace(lastChar)\n      const isNextWhiteSpace = isWhiteSpace(nextChar)\n\n      if (isNextWhiteSpace) {\n        canOpen = false\n      } else if (isNextPunctChar) {\n        if (!(isLastWhiteSpace || isLastPunctChar)) {\n          canOpen = false\n        }\n      }\n\n      if (isLastWhiteSpace) {\n        canClose = false\n      } else if (isLastPunctChar) {\n        if (!(isNextWhiteSpace || isNextPunctChar)) {\n          canClose = false\n        }\n      }\n\n      if (nextChar === 0x22 /* \" */ && t[0] === '\"') {\n        if (lastChar >= 0x30 /* 0 */ && lastChar <= 0x39 /* 9 */) {\n          // special case: 1\"\" - count first quote as an inch\n          canClose = canOpen = false\n        }\n      }\n\n      if (canOpen && canClose) {\n        // Replace quotes in the middle of punctuation sequence, but not\n        // in the middle of the words, i.e.:\n        //\n        // 1. foo \" bar \" baz - not replaced\n        // 2. foo-\"-bar-\"-baz - replaced\n        // 3. foo\"bar\"baz     - not replaced\n        //\n        canOpen = isLastPunctChar\n        canClose = isNextPunctChar\n      }\n\n      if (!canOpen && !canClose) {\n        // middle of word\n        if (isSingle) {\n          token.content = replaceAt(token.content, t.index, APOSTROPHE)\n        }\n        continue\n      }\n\n      if (canClose) {\n        // this could be a closing quote, rewind the stack to get a match\n        for (j = stack.length - 1; j >= 0; j--) {\n          let item = stack[j]\n          if (stack[j].level < thisLevel) { break }\n          if (item.single === isSingle && stack[j].level === thisLevel) {\n            item = stack[j]\n\n            let openQuote\n            let closeQuote\n            if (isSingle) {\n              openQuote = state.md.options.quotes[2]\n              closeQuote = state.md.options.quotes[3]\n            } else {\n              openQuote = state.md.options.quotes[0]\n              closeQuote = state.md.options.quotes[1]\n            }\n\n            // replace token.content *before* tokens[item.token].content,\n            // because, if they are pointing at the same token, replaceAt\n            // could mess up indices when quote length != 1\n            token.content = replaceAt(token.content, t.index, closeQuote)\n            tokens[item.token].content = replaceAt(\n              tokens[item.token].content, item.pos, openQuote)\n\n            pos += closeQuote.length - 1\n            if (item.token === i) { pos += openQuote.length - 1 }\n\n            text = token.content\n            max = text.length\n\n            stack.length = j\n            continue OUTER\n          }\n        }\n      }\n\n      if (canOpen) {\n        stack.push({\n          token: i,\n          pos: t.index,\n          single: isSingle,\n          level: thisLevel\n        })\n      } else if (canClose && isSingle) {\n        token.content = replaceAt(token.content, t.index, APOSTROPHE)\n      }\n    }\n  }\n}\n\nexport default function smartquotes (state) {\n  /* eslint max-depth:0 */\n  if (!state.md.options.typographer) { return }\n\n  for (let blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) {\n    if (state.tokens[blkIdx].type !== 'inline' ||\n        !QUOTE_TEST_RE.test(state.tokens[blkIdx].content)) {\n      continue\n    }\n\n    process_inlines(state.tokens[blkIdx].children, state)\n  }\n}\n","/** internal\n * class Core\n *\n * Top-level rules executor. Glues block/inline parsers and does intermediate\n * transformations.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateCore from './rules_core/state_core.mjs'\n\nimport r_normalize from './rules_core/normalize.mjs'\nimport r_block from './rules_core/block.mjs'\nimport r_inline from './rules_core/inline.mjs'\nimport r_linkify from './rules_core/linkify.mjs'\nimport r_replacements from './rules_core/replacements.mjs'\nimport r_smartquotes from './rules_core/smartquotes.mjs'\nimport r_text_join from './rules_core/text_join.mjs'\n\nconst _rules = [\n  ['normalize',      r_normalize],\n  ['block',          r_block],\n  ['inline',         r_inline],\n  ['linkify',        r_linkify],\n  ['replacements',   r_replacements],\n  ['smartquotes',    r_smartquotes],\n  // `text_join` finds `text_special` tokens (for escape sequences)\n  // and joins them with the rest of the text\n  ['text_join',      r_text_join]\n]\n\n/**\n * new Core()\n **/\nfunction Core () {\n  /**\n   * Core#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of core rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1])\n  }\n}\n\n/**\n * Core.process(state)\n *\n * Executes core chain rules.\n **/\nCore.prototype.process = function (state) {\n  const rules = this.ruler.getRules('')\n\n  for (let i = 0, l = rules.length; i < l; i++) {\n    rules[i](state)\n  }\n}\n\nCore.prototype.State = StateCore\n\nexport default Core\n","export default function block (state) {\n  let token\n\n  if (state.inlineMode) {\n    token          = new state.Token('inline', '', 0)\n    token.content  = state.src\n    token.map      = [0, 1]\n    token.children = []\n    state.tokens.push(token)\n  } else {\n    state.md.block.parse(state.src, state.md, state.env, state.tokens)\n  }\n}\n","export default function inline (state) {\n  const tokens = state.tokens\n\n  // Parse inlines\n  for (let i = 0, l = tokens.length; i < l; i++) {\n    const tok = tokens[i]\n    if (tok.type === 'inline') {\n      state.md.inline.parse(tok.content, state.md, state.env, tok.children)\n    }\n  }\n}\n","// Join raw text tokens with the rest of the text\n//\n// This is set as a separate rule to provide an opportunity for plugins\n// to run text replacements after text join, but before escape join.\n//\n// For example, `\\:)` shouldn't be replaced with an emoji.\n//\n\nexport default function text_join (state) {\n  let curr, last\n  const blockTokens = state.tokens\n  const l = blockTokens.length\n\n  for (let j = 0; j < l; j++) {\n    if (blockTokens[j].type !== 'inline') continue\n\n    const tokens = blockTokens[j].children\n    const max = tokens.length\n\n    for (curr = 0; curr < max; curr++) {\n      if (tokens[curr].type === 'text_special') {\n        tokens[curr].type = 'text'\n      }\n    }\n\n    for (curr = last = 0; curr < max; curr++) {\n      if (tokens[curr].type === 'text' &&\n          curr + 1 < max &&\n          tokens[curr + 1].type === 'text') {\n        // collapse two adjacent text nodes\n        tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content\n      } else {\n        if (curr !== last) { tokens[last] = tokens[curr] }\n\n        last++\n      }\n    }\n\n    if (curr !== last) {\n      tokens.length = last\n    }\n  }\n}\n","// Parser state class\n\nimport Token from '../token.mjs'\nimport { isSpace } from '../common/utils.mjs'\n\nfunction StateBlock (src, md, env, tokens) {\n  this.src = src\n\n  // link to parser instance\n  this.md     = md\n\n  this.env = env\n\n  //\n  // Internal state vartiables\n  //\n\n  this.tokens = tokens\n\n  this.bMarks = []  // line begin offsets for fast jumps\n  this.eMarks = []  // line end offsets for fast jumps\n  this.tShift = []  // offsets of the first non-space characters (tabs not expanded)\n  this.sCount = []  // indents for each line (tabs expanded)\n\n  // An amount of virtual spaces (tabs expanded) between beginning\n  // of each line (bMarks) and real beginning of that line.\n  //\n  // It exists only as a hack because blockquotes override bMarks\n  // losing information in the process.\n  //\n  // It's used only when expanding tabs, you can think about it as\n  // an initial tab length, e.g. bsCount=21 applied to string `\\t123`\n  // means first tab should be expanded to 4-21%4 === 3 spaces.\n  //\n  this.bsCount = []\n\n  // block parser variables\n\n  // required block content indent (for example, if we are\n  // inside a list, it would be positioned after list marker)\n  this.blkIndent  = 0\n  this.line       = 0 // line index in src\n  this.lineMax    = 0 // lines count\n  this.tight      = false  // loose/tight mode for lists\n  this.ddIndent   = -1 // indent of the current dd block (-1 if there isn't any)\n  this.listIndent = -1 // indent of the current list block (-1 if there isn't any)\n\n  // can be 'blockquote', 'list', 'root', 'paragraph' or 'reference'\n  // used in lists to determine if they interrupt a paragraph\n  this.parentType = 'root'\n\n  this.level = 0\n\n  // Create caches\n  // Generate markers.\n  const s = this.src\n\n  for (let start = 0, pos = 0, indent = 0, offset = 0, len = s.length, indent_found = false; pos < len; pos++) {\n    const ch = s.charCodeAt(pos)\n\n    if (!indent_found) {\n      if (isSpace(ch)) {\n        indent++\n\n        if (ch === 0x09) {\n          offset += 4 - offset % 4\n        } else {\n          offset++\n        }\n        continue\n      } else {\n        indent_found = true\n      }\n    }\n\n    if (ch === 0x0A || pos === len - 1) {\n      if (ch !== 0x0A) { pos++ }\n      this.bMarks.push(start)\n      this.eMarks.push(pos)\n      this.tShift.push(indent)\n      this.sCount.push(offset)\n      this.bsCount.push(0)\n\n      indent_found = false\n      indent = 0\n      offset = 0\n      start = pos + 1\n    }\n  }\n\n  // Push fake entry to simplify cache bounds checks\n  this.bMarks.push(s.length)\n  this.eMarks.push(s.length)\n  this.tShift.push(0)\n  this.sCount.push(0)\n  this.bsCount.push(0)\n\n  this.lineMax = this.bMarks.length - 1 // don't count last fake line\n}\n\n// Push new token to \"stream\".\n//\nStateBlock.prototype.push = function (type, tag, nesting) {\n  const token = new Token(type, tag, nesting)\n  token.block = true\n\n  if (nesting < 0) this.level-- // closing tag\n  token.level = this.level\n  if (nesting > 0) this.level++ // opening tag\n\n  this.tokens.push(token)\n  return token\n}\n\nStateBlock.prototype.isEmpty = function isEmpty (line) {\n  return this.bMarks[line] + this.tShift[line] >= this.eMarks[line]\n}\n\nStateBlock.prototype.skipEmptyLines = function skipEmptyLines (from) {\n  for (let max = this.lineMax; from < max; from++) {\n    if (this.bMarks[from] + this.tShift[from] < this.eMarks[from]) {\n      break\n    }\n  }\n  return from\n}\n\n// Skip spaces from given position.\nStateBlock.prototype.skipSpaces = function skipSpaces (pos) {\n  for (let max = this.src.length; pos < max; pos++) {\n    const ch = this.src.charCodeAt(pos)\n    if (!isSpace(ch)) { break }\n  }\n  return pos\n}\n\n// Skip spaces from given position in reverse.\nStateBlock.prototype.skipSpacesBack = function skipSpacesBack (pos, min) {\n  if (pos <= min) { return pos }\n\n  while (pos > min) {\n    if (!isSpace(this.src.charCodeAt(--pos))) { return pos + 1 }\n  }\n  return pos\n}\n\n// Skip char codes from given position\nStateBlock.prototype.skipChars = function skipChars (pos, code) {\n  for (let max = this.src.length; pos < max; pos++) {\n    if (this.src.charCodeAt(pos) !== code) { break }\n  }\n  return pos\n}\n\n// Skip char codes reverse from given position - 1\nStateBlock.prototype.skipCharsBack = function skipCharsBack (pos, code, min) {\n  if (pos <= min) { return pos }\n\n  while (pos > min) {\n    if (code !== this.src.charCodeAt(--pos)) { return pos + 1 }\n  }\n  return pos\n}\n\n// cut lines range from source.\nStateBlock.prototype.getLines = function getLines (begin, end, indent, keepLastLF) {\n  if (begin >= end) {\n    return ''\n  }\n\n  const queue = new Array(end - begin)\n\n  for (let i = 0, line = begin; line < end; line++, i++) {\n    let lineIndent = 0\n    const lineStart = this.bMarks[line]\n    let first = lineStart\n    let last\n\n    if (line + 1 < end || keepLastLF) {\n      // No need for bounds check because we have fake entry on tail.\n      last = this.eMarks[line] + 1\n    } else {\n      last = this.eMarks[line]\n    }\n\n    while (first < last && lineIndent < indent) {\n      const ch = this.src.charCodeAt(first)\n\n      if (isSpace(ch)) {\n        if (ch === 0x09) {\n          lineIndent += 4 - (lineIndent + this.bsCount[line]) % 4\n        } else {\n          lineIndent++\n        }\n      } else if (first - lineStart < this.tShift[line]) {\n        // patched tShift masked characters to look like spaces (blockquotes, list markers)\n        lineIndent++\n      } else {\n        break\n      }\n\n      first++\n    }\n\n    if (lineIndent > indent) {\n      // partially expanding tabs in code blocks, e.g '\\t\\tfoobar'\n      // with indent=2 becomes '  \\tfoobar'\n      queue[i] = new Array(lineIndent - indent + 1).join(' ') + this.src.slice(first, last)\n    } else {\n      queue[i] = this.src.slice(first, last)\n    }\n  }\n\n  return queue.join('')\n}\n\n// re-export Token class to use in block rules\nStateBlock.prototype.Token = Token\n\nexport default StateBlock\n","// GFM table, https://github.github.com/gfm/#tables-extension-\n\nimport { isSpace } from '../common/utils.mjs'\n\n// Limit the amount of empty autocompleted cells in a table,\n// see https://github.com/markdown-it/markdown-it/issues/1000,\n//\n// Both pulldown-cmark and commonmark-hs limit the number of cells this way to ~200k.\n// We set it to 65k, which can expand user input by a factor of x370\n// (256x256 square is 1.8kB expanded into 650kB).\nconst MAX_AUTOCOMPLETED_CELLS = 0x10000\n\nfunction getLine (state, line) {\n  const pos = state.bMarks[line] + state.tShift[line]\n  const max = state.eMarks[line]\n\n  return state.src.slice(pos, max)\n}\n\nfunction escapedSplit (str) {\n  const result = []\n  const max = str.length\n\n  let pos = 0\n  let ch = str.charCodeAt(pos)\n  let isEscaped = false\n  let lastPos = 0\n  let current = ''\n\n  while (pos < max) {\n    if (ch === 0x7c/* | */) {\n      if (!isEscaped) {\n        // pipe separating cells, '|'\n        result.push(current + str.substring(lastPos, pos))\n        current = ''\n        lastPos = pos + 1\n      } else {\n        // escaped pipe, '\\|'\n        current += str.substring(lastPos, pos - 1)\n        lastPos = pos\n      }\n    }\n\n    isEscaped = (ch === 0x5c/* \\ */)\n    pos++\n\n    ch = str.charCodeAt(pos)\n  }\n\n  result.push(current + str.substring(lastPos))\n\n  return result\n}\n\nexport default function table (state, startLine, endLine, silent) {\n  // should have at least two lines\n  if (startLine + 2 > endLine) { return false }\n\n  let nextLine = startLine + 1\n\n  if (state.sCount[nextLine] < state.blkIndent) { return false }\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[nextLine] - state.blkIndent >= 4) { return false }\n\n  // first character of the second line should be '|', '-', ':',\n  // and no other characters are allowed but spaces;\n  // basically, this is the equivalent of /^[-:|][-:|\\s]*$/ regexp\n\n  let pos = state.bMarks[nextLine] + state.tShift[nextLine]\n  if (pos >= state.eMarks[nextLine]) { return false }\n\n  const firstCh = state.src.charCodeAt(pos++)\n  if (firstCh !== 0x7C/* | */ && firstCh !== 0x2D/* - */ && firstCh !== 0x3A/* : */) { return false }\n\n  if (pos >= state.eMarks[nextLine]) { return false }\n\n  const secondCh = state.src.charCodeAt(pos++)\n  if (secondCh !== 0x7C/* | */ && secondCh !== 0x2D/* - */ && secondCh !== 0x3A/* : */ && !isSpace(secondCh)) {\n    return false\n  }\n\n  // if first character is '-', then second character must not be a space\n  // (due to parsing ambiguity with list)\n  if (firstCh === 0x2D/* - */ && isSpace(secondCh)) { return false }\n\n  while (pos < state.eMarks[nextLine]) {\n    const ch = state.src.charCodeAt(pos)\n\n    if (ch !== 0x7C/* | */ && ch !== 0x2D/* - */ && ch !== 0x3A/* : */ && !isSpace(ch)) { return false }\n\n    pos++\n  }\n\n  let lineText = getLine(state, startLine + 1)\n  let columns = lineText.split('|')\n  const aligns = []\n  for (let i = 0; i < columns.length; i++) {\n    const t = columns[i].trim()\n    if (!t) {\n      // allow empty columns before and after table, but not in between columns;\n      // e.g. allow ` |---| `, disallow ` ---||--- `\n      if (i === 0 || i === columns.length - 1) {\n        continue\n      } else {\n        return false\n      }\n    }\n\n    if (!/^:?-+:?$/.test(t)) { return false }\n    if (t.charCodeAt(t.length - 1) === 0x3A/* : */) {\n      aligns.push(t.charCodeAt(0) === 0x3A/* : */ ? 'center' : 'right')\n    } else if (t.charCodeAt(0) === 0x3A/* : */) {\n      aligns.push('left')\n    } else {\n      aligns.push('')\n    }\n  }\n\n  lineText = getLine(state, startLine).trim()\n  if (lineText.indexOf('|') === -1) { return false }\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n  columns = escapedSplit(lineText)\n  if (columns.length && columns[0] === '') columns.shift()\n  if (columns.length && columns[columns.length - 1] === '') columns.pop()\n\n  // header row will define an amount of columns in the entire table,\n  // and align row should be exactly the same (the rest of the rows can differ)\n  const columnCount = columns.length\n  if (columnCount === 0 || columnCount !== aligns.length) { return false }\n\n  if (silent) { return true }\n\n  const oldParentType = state.parentType\n  state.parentType = 'table'\n\n  // use 'blockquote' lists for termination because it's\n  // the most similar to tables\n  const terminatorRules = state.md.block.ruler.getRules('blockquote')\n\n  const token_to = state.push('table_open', 'table', 1)\n  const tableLines = [startLine, 0]\n  token_to.map = tableLines\n\n  const token_tho = state.push('thead_open', 'thead', 1)\n  token_tho.map = [startLine, startLine + 1]\n\n  const token_htro = state.push('tr_open', 'tr', 1)\n  token_htro.map = [startLine, startLine + 1]\n\n  for (let i = 0; i < columns.length; i++) {\n    const token_ho = state.push('th_open', 'th', 1)\n    if (aligns[i]) {\n      token_ho.attrs  = [['style', 'text-align:' + aligns[i]]]\n    }\n\n    const token_il = state.push('inline', '', 0)\n    token_il.content  = columns[i].trim()\n    token_il.children = []\n\n    state.push('th_close', 'th', -1)\n  }\n\n  state.push('tr_close', 'tr', -1)\n  state.push('thead_close', 'thead', -1)\n\n  let tbodyLines\n  let autocompletedCells = 0\n\n  for (nextLine = startLine + 2; nextLine < endLine; nextLine++) {\n    if (state.sCount[nextLine] < state.blkIndent) { break }\n\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n\n    if (terminate) { break }\n    lineText = getLine(state, nextLine).trim()\n    if (!lineText) { break }\n    if (state.sCount[nextLine] - state.blkIndent >= 4) { break }\n    columns = escapedSplit(lineText)\n    if (columns.length && columns[0] === '') columns.shift()\n    if (columns.length && columns[columns.length - 1] === '') columns.pop()\n\n    // note: autocomplete count can be negative if user specifies more columns than header,\n    // but that does not affect intended use (which is limiting expansion)\n    autocompletedCells += columnCount - columns.length\n    if (autocompletedCells > MAX_AUTOCOMPLETED_CELLS) { break }\n\n    if (nextLine === startLine + 2) {\n      const token_tbo = state.push('tbody_open', 'tbody', 1)\n      token_tbo.map = tbodyLines = [startLine + 2, 0]\n    }\n\n    const token_tro = state.push('tr_open', 'tr', 1)\n    token_tro.map = [nextLine, nextLine + 1]\n\n    for (let i = 0; i < columnCount; i++) {\n      const token_tdo = state.push('td_open', 'td', 1)\n      if (aligns[i]) {\n        token_tdo.attrs  = [['style', 'text-align:' + aligns[i]]]\n      }\n\n      const token_il = state.push('inline', '', 0)\n      token_il.content  = columns[i] ? columns[i].trim() : ''\n      token_il.children = []\n\n      state.push('td_close', 'td', -1)\n    }\n    state.push('tr_close', 'tr', -1)\n  }\n\n  if (tbodyLines) {\n    state.push('tbody_close', 'tbody', -1)\n    tbodyLines[1] = nextLine\n  }\n\n  state.push('table_close', 'table', -1)\n  tableLines[1] = nextLine\n\n  state.parentType = oldParentType\n  state.line = nextLine\n  return true\n}\n","// Lists\n\nimport { isSpace } from '../common/utils.mjs'\n\n// Search `[-+*][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipBulletListMarker (state, startLine) {\n  const max = state.eMarks[startLine]\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n\n  const marker = state.src.charCodeAt(pos++)\n  // Check bullet\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x2B/* + */) {\n    return -1\n  }\n\n  if (pos < max) {\n    const ch = state.src.charCodeAt(pos)\n\n    if (!isSpace(ch)) {\n      // \" -test \" - is not a list item\n      return -1\n    }\n  }\n\n  return pos\n}\n\n// Search `\\d+[.)][\\n ]`, returns next pos after marker on success\n// or -1 on fail.\nfunction skipOrderedListMarker (state, startLine) {\n  const start = state.bMarks[startLine] + state.tShift[startLine]\n  const max = state.eMarks[startLine]\n  let pos = start\n\n  // List marker should have at least 2 chars (digit + dot)\n  if (pos + 1 >= max) { return -1 }\n\n  let ch = state.src.charCodeAt(pos++)\n\n  if (ch < 0x30/* 0 */ || ch > 0x39/* 9 */) { return -1 }\n\n  for (;;) {\n    // EOL -> fail\n    if (pos >= max) { return -1 }\n\n    ch = state.src.charCodeAt(pos++)\n\n    if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) {\n      // List marker should have no more than 9 digits\n      // (prevents integer overflow in browsers)\n      if (pos - start >= 10) { return -1 }\n\n      continue\n    }\n\n    // found valid marker\n    if (ch === 0x29/* ) */ || ch === 0x2e/* . */) {\n      break\n    }\n\n    return -1\n  }\n\n  if (pos < max) {\n    ch = state.src.charCodeAt(pos)\n\n    if (!isSpace(ch)) {\n      // \" 1.test \" - is not a list item\n      return -1\n    }\n  }\n  return pos\n}\n\nfunction markTightParagraphs (state, idx) {\n  const level = state.level + 2\n\n  for (let i = idx + 2, l = state.tokens.length - 2; i < l; i++) {\n    if (state.tokens[i].level === level && state.tokens[i].type === 'paragraph_open') {\n      state.tokens[i + 2].hidden = true\n      state.tokens[i].hidden = true\n      i += 2\n    }\n  }\n}\n\nexport default function list (state, startLine, endLine, silent) {\n  let max, pos, start, token\n  let nextLine = startLine\n  let tight = true\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[nextLine] - state.blkIndent >= 4) { return false }\n\n  // Special case:\n  //  - item 1\n  //   - item 2\n  //    - item 3\n  //     - item 4\n  //      - this one is a paragraph continuation\n  if (state.listIndent >= 0 &&\n      state.sCount[nextLine] - state.listIndent >= 4 &&\n      state.sCount[nextLine] < state.blkIndent) {\n    return false\n  }\n\n  let isTerminatingParagraph = false\n\n  // limit conditions when list can interrupt\n  // a paragraph (validation mode only)\n  if (silent && state.parentType === 'paragraph') {\n    // Next list item should still terminate previous list item;\n    //\n    // This code can fail if plugins use blkIndent as well as lists,\n    // but I hope the spec gets fixed long before that happens.\n    //\n    if (state.sCount[nextLine] >= state.blkIndent) {\n      isTerminatingParagraph = true\n    }\n  }\n\n  // Detect list type and position after marker\n  let isOrdered\n  let markerValue\n  let posAfterMarker\n  if ((posAfterMarker = skipOrderedListMarker(state, nextLine)) >= 0) {\n    isOrdered = true\n    start = state.bMarks[nextLine] + state.tShift[nextLine]\n    markerValue = Number(state.src.slice(start, posAfterMarker - 1))\n\n    // If we're starting a new ordered list right after\n    // a paragraph, it should start with 1.\n    if (isTerminatingParagraph && markerValue !== 1) return false\n  } else if ((posAfterMarker = skipBulletListMarker(state, nextLine)) >= 0) {\n    isOrdered = false\n  } else {\n    return false\n  }\n\n  // If we're starting a new unordered list right after\n  // a paragraph, first line should not be empty.\n  if (isTerminatingParagraph) {\n    if (state.skipSpaces(posAfterMarker) >= state.eMarks[nextLine]) return false\n  }\n\n  // For validation mode we can terminate immediately\n  if (silent) { return true }\n\n  // We should terminate list on style change. Remember first one to compare.\n  const markerCharCode = state.src.charCodeAt(posAfterMarker - 1)\n\n  // Start list\n  const listTokIdx = state.tokens.length\n\n  if (isOrdered) {\n    token       = state.push('ordered_list_open', 'ol', 1)\n    if (markerValue !== 1) {\n      token.attrs = [['start', markerValue]]\n    }\n  } else {\n    token       = state.push('bullet_list_open', 'ul', 1)\n  }\n\n  const listLines = [nextLine, 0]\n  token.map    = listLines\n  token.markup = String.fromCharCode(markerCharCode)\n\n  //\n  // Iterate list items\n  //\n\n  let prevEmptyEnd = false\n  const terminatorRules = state.md.block.ruler.getRules('list')\n\n  const oldParentType = state.parentType\n  state.parentType = 'list'\n\n  while (nextLine < endLine) {\n    pos = posAfterMarker\n    max = state.eMarks[nextLine]\n\n    const initial = state.sCount[nextLine] + posAfterMarker - (state.bMarks[nextLine] + state.tShift[nextLine])\n    let offset = initial\n\n    while (pos < max) {\n      const ch = state.src.charCodeAt(pos)\n\n      if (ch === 0x09) {\n        offset += 4 - (offset + state.bsCount[nextLine]) % 4\n      } else if (ch === 0x20) {\n        offset++\n      } else {\n        break\n      }\n\n      pos++\n    }\n\n    const contentStart = pos\n    let indentAfterMarker\n\n    if (contentStart >= max) {\n      // trimming space in \"-    \\n  3\" case, indent is 1 here\n      indentAfterMarker = 1\n    } else {\n      indentAfterMarker = offset - initial\n    }\n\n    // If we have more than 4 spaces, the indent is 1\n    // (the rest is just indented code block)\n    if (indentAfterMarker > 4) { indentAfterMarker = 1 }\n\n    // \"  -  test\"\n    //  ^^^^^ - calculating total length of this thing\n    const indent = initial + indentAfterMarker\n\n    // Run subparser & write tokens\n    token        = state.push('list_item_open', 'li', 1)\n    token.markup = String.fromCharCode(markerCharCode)\n    const itemLines = [nextLine, 0]\n    token.map    = itemLines\n    if (isOrdered) {\n      token.info = state.src.slice(start, posAfterMarker - 1)\n    }\n\n    // change current state, then restore it after parser subcall\n    const oldTight = state.tight\n    const oldTShift = state.tShift[nextLine]\n    const oldSCount = state.sCount[nextLine]\n\n    //  - example list\n    // ^ listIndent position will be here\n    //   ^ blkIndent position will be here\n    //\n    const oldListIndent = state.listIndent\n    state.listIndent = state.blkIndent\n    state.blkIndent = indent\n\n    state.tight = true\n    state.tShift[nextLine] = contentStart - state.bMarks[nextLine]\n    state.sCount[nextLine] = offset\n\n    if (contentStart >= max && state.isEmpty(nextLine + 1)) {\n      // workaround for this case\n      // (list item is empty, list terminates before \"foo\"):\n      // ~~~~~~~~\n      //   -\n      //\n      //     foo\n      // ~~~~~~~~\n      state.line = Math.min(state.line + 2, endLine)\n    } else {\n      state.md.block.tokenize(state, nextLine, endLine, true)\n    }\n\n    // If any of list item is tight, mark list as tight\n    if (!state.tight || prevEmptyEnd) {\n      tight = false\n    }\n    // Item become loose if finish with empty line,\n    // but we should filter last element, because it means list finish\n    prevEmptyEnd = (state.line - nextLine) > 1 && state.isEmpty(state.line - 1)\n\n    state.blkIndent = state.listIndent\n    state.listIndent = oldListIndent\n    state.tShift[nextLine] = oldTShift\n    state.sCount[nextLine] = oldSCount\n    state.tight = oldTight\n\n    token        = state.push('list_item_close', 'li', -1)\n    token.markup = String.fromCharCode(markerCharCode)\n\n    nextLine = state.line\n    itemLines[1] = nextLine\n\n    if (nextLine >= endLine) { break }\n\n    //\n    // Try to check if list is terminated or continued.\n    //\n    if (state.sCount[nextLine] < state.blkIndent) { break }\n\n    // if it's indented more than 3 spaces, it should be a code block\n    if (state.sCount[nextLine] - state.blkIndent >= 4) { break }\n\n    // fail if terminating block found\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n\n    // fail if list has another type\n    if (isOrdered) {\n      posAfterMarker = skipOrderedListMarker(state, nextLine)\n      if (posAfterMarker < 0) { break }\n      start = state.bMarks[nextLine] + state.tShift[nextLine]\n    } else {\n      posAfterMarker = skipBulletListMarker(state, nextLine)\n      if (posAfterMarker < 0) { break }\n    }\n\n    if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break }\n  }\n\n  // Finalize list\n  if (isOrdered) {\n    token = state.push('ordered_list_close', 'ol', -1)\n  } else {\n    token = state.push('bullet_list_close', 'ul', -1)\n  }\n  token.markup = String.fromCharCode(markerCharCode)\n\n  listLines[1] = nextLine\n  state.line = nextLine\n\n  state.parentType = oldParentType\n\n  // mark paragraphs tight if needed\n  if (tight) {\n    markTightParagraphs(state, listTokIdx)\n  }\n\n  return true\n}\n","// Regexps to match html elements\n\nconst attr_name     = '[a-zA-Z_:][a-zA-Z0-9:._-]*'\n\nconst unquoted      = '[^\"\\'=<>`\\\\x00-\\\\x20]+'\nconst single_quoted = \"'[^']*'\"\nconst double_quoted = '\"[^\"]*\"'\n\nconst attr_value  = '(?:' + unquoted + '|' + single_quoted + '|' + double_quoted + ')'\n\nconst attribute   = '(?:\\\\s+' + attr_name + '(?:\\\\s*=\\\\s*' + attr_value + ')?)'\n\nconst open_tag    = '<[A-Za-z][A-Za-z0-9\\\\-]*' + attribute + '*\\\\s*\\\\/?>'\n\nconst close_tag   = '<\\\\/[A-Za-z][A-Za-z0-9\\\\-]*\\\\s*>'\nconst comment     = '<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->'\nconst processing  = '<[?][\\\\s\\\\S]*?[?]>'\nconst declaration = '<![A-Za-z][^>]*>'\nconst cdata       = '<!\\\\[CDATA\\\\[[\\\\s\\\\S]*?\\\\]\\\\]>'\n\nconst HTML_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + '|' + comment +\n                        '|' + processing + '|' + declaration + '|' + cdata + ')')\nconst HTML_OPEN_CLOSE_TAG_RE = new RegExp('^(?:' + open_tag + '|' + close_tag + ')')\n\nexport { HTML_TAG_RE, HTML_OPEN_CLOSE_TAG_RE }\n","// HTML block\n\nimport block_names from '../common/html_blocks.mjs'\nimport { HTML_OPEN_CLOSE_TAG_RE } from '../common/html_re.mjs'\n\n// An array of opening and corresponding closing sequences for html tags,\n// last argument defines whether it can terminate a paragraph or not\n//\nconst HTML_SEQUENCES = [\n  [/^<(script|pre|style|textarea)(?=(\\s|>|$))/i, /<\\/(script|pre|style|textarea)>/i, true],\n  [/^<!--/,        /-->/,   true],\n  [/^<\\?/,         /\\?>/,   true],\n  [/^<![A-Z]/,     />/,     true],\n  [/^<!\\[CDATA\\[/, /\\]\\]>/, true],\n  [new RegExp('^</?(' + block_names.join('|') + ')(?=(\\\\s|/?>|$))', 'i'), /^$/, true],\n  [new RegExp(HTML_OPEN_CLOSE_TAG_RE.source + '\\\\s*$'),  /^$/, false]\n]\n\nexport default function html_block (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (!state.md.options.html) { return false }\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false }\n\n  let lineText = state.src.slice(pos, max)\n\n  let i = 0\n  for (; i < HTML_SEQUENCES.length; i++) {\n    if (HTML_SEQUENCES[i][0].test(lineText)) { break }\n  }\n  if (i === HTML_SEQUENCES.length) { return false }\n\n  if (silent) {\n    // true if this sequence can be a terminator, false otherwise\n    return HTML_SEQUENCES[i][2]\n  }\n\n  let nextLine = startLine + 1\n\n  // If we are here - we detected HTML block.\n  // Let's roll down till block end.\n  if (!HTML_SEQUENCES[i][1].test(lineText)) {\n    for (; nextLine < endLine; nextLine++) {\n      if (state.sCount[nextLine] < state.blkIndent) { break }\n\n      pos = state.bMarks[nextLine] + state.tShift[nextLine]\n      max = state.eMarks[nextLine]\n      lineText = state.src.slice(pos, max)\n\n      if (HTML_SEQUENCES[i][1].test(lineText)) {\n        if (lineText.length !== 0) { nextLine++ }\n        break\n      }\n    }\n  }\n\n  state.line = nextLine\n\n  const token   = state.push('html_block', '', 0)\n  token.map     = [startLine, nextLine]\n  token.content = state.getLines(startLine, nextLine, state.blkIndent, true)\n\n  return true\n}\n","// List of valid html blocks names, according to commonmark spec\n// https://spec.commonmark.org/0.30/#html-blocks\n\nexport default [\n  'address',\n  'article',\n  'aside',\n  'base',\n  'basefont',\n  'blockquote',\n  'body',\n  'caption',\n  'center',\n  'col',\n  'colgroup',\n  'dd',\n  'details',\n  'dialog',\n  'dir',\n  'div',\n  'dl',\n  'dt',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'footer',\n  'form',\n  'frame',\n  'frameset',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'head',\n  'header',\n  'hr',\n  'html',\n  'iframe',\n  'legend',\n  'li',\n  'link',\n  'main',\n  'menu',\n  'menuitem',\n  'nav',\n  'noframes',\n  'ol',\n  'optgroup',\n  'option',\n  'p',\n  'param',\n  'search',\n  'section',\n  'summary',\n  'table',\n  'tbody',\n  'td',\n  'tfoot',\n  'th',\n  'thead',\n  'title',\n  'tr',\n  'track',\n  'ul'\n]\n","/** internal\n * class ParserBlock\n *\n * Block-level tokenizer.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateBlock from './rules_block/state_block.mjs'\n\nimport r_table from './rules_block/table.mjs'\nimport r_code from './rules_block/code.mjs'\nimport r_fence from './rules_block/fence.mjs'\nimport r_blockquote from './rules_block/blockquote.mjs'\nimport r_hr from './rules_block/hr.mjs'\nimport r_list from './rules_block/list.mjs'\nimport r_reference from './rules_block/reference.mjs'\nimport r_html_block from './rules_block/html_block.mjs'\nimport r_heading from './rules_block/heading.mjs'\nimport r_lheading from './rules_block/lheading.mjs'\nimport r_paragraph from './rules_block/paragraph.mjs'\n\nconst _rules = [\n  // First 2 params - rule name & source. Secondary array - list of rules,\n  // which can be terminated by this one.\n  ['table',      r_table,      ['paragraph', 'reference']],\n  ['code',       r_code],\n  ['fence',      r_fence,      ['paragraph', 'reference', 'blockquote', 'list']],\n  ['blockquote', r_blockquote, ['paragraph', 'reference', 'blockquote', 'list']],\n  ['hr',         r_hr,         ['paragraph', 'reference', 'blockquote', 'list']],\n  ['list',       r_list,       ['paragraph', 'reference', 'blockquote']],\n  ['reference',  r_reference],\n  ['html_block', r_html_block, ['paragraph', 'reference', 'blockquote']],\n  ['heading',    r_heading,    ['paragraph', 'reference', 'blockquote']],\n  ['lheading',   r_lheading],\n  ['paragraph',  r_paragraph]\n]\n\n/**\n * new ParserBlock()\n **/\nfunction ParserBlock () {\n  /**\n   * ParserBlock#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of block rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1], { alt: (_rules[i][2] || []).slice() })\n  }\n}\n\n// Generate tokens for input range\n//\nParserBlock.prototype.tokenize = function (state, startLine, endLine) {\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const maxNesting = state.md.options.maxNesting\n  let line = startLine\n  let hasEmptyLines = false\n\n  while (line < endLine) {\n    state.line = line = state.skipEmptyLines(line)\n    if (line >= endLine) { break }\n\n    // Termination condition for nested calls.\n    // Nested calls currently used for blockquotes & lists\n    if (state.sCount[line] < state.blkIndent) { break }\n\n    // If nesting level exceeded - skip tail to the end. That's not ordinary\n    // situation and we should not care about content.\n    if (state.level >= maxNesting) {\n      state.line = endLine\n      break\n    }\n\n    // Try all possible rules.\n    // On success, rule should:\n    //\n    // - update `state.line`\n    // - update `state.tokens`\n    // - return true\n    const prevLine = state.line\n    let ok = false\n\n    for (let i = 0; i < len; i++) {\n      ok = rules[i](state, line, endLine, false)\n      if (ok) {\n        if (prevLine >= state.line) {\n          throw new Error(\"block rule didn't increment state.line\")\n        }\n        break\n      }\n    }\n\n    // this can only happen if user disables paragraph rule\n    if (!ok) throw new Error('none of the block rules matched')\n\n    // set state.tight if we had an empty line before current tag\n    // i.e. latest empty line should not count\n    state.tight = !hasEmptyLines\n\n    // paragraph might \"eat\" one newline after it in nested lists\n    if (state.isEmpty(state.line - 1)) {\n      hasEmptyLines = true\n    }\n\n    line = state.line\n\n    if (line < endLine && state.isEmpty(line)) {\n      hasEmptyLines = true\n      line++\n      state.line = line\n    }\n  }\n}\n\n/**\n * ParserBlock.parse(str, md, env, outTokens)\n *\n * Process input string and push block tokens into `outTokens`\n **/\nParserBlock.prototype.parse = function (src, md, env, outTokens) {\n  if (!src) { return }\n\n  const state = new this.State(src, md, env, outTokens)\n\n  this.tokenize(state, state.line, state.lineMax)\n}\n\nParserBlock.prototype.State = StateBlock\n\nexport default ParserBlock\n","// Code block (4 spaces padded)\n\nexport default function code (state, startLine, endLine/*, silent */) {\n  if (state.sCount[startLine] - state.blkIndent < 4) { return false }\n\n  let nextLine = startLine + 1\n  let last = nextLine\n\n  while (nextLine < endLine) {\n    if (state.isEmpty(nextLine)) {\n      nextLine++\n      continue\n    }\n\n    if (state.sCount[nextLine] - state.blkIndent >= 4) {\n      nextLine++\n      last = nextLine\n      continue\n    }\n    break\n  }\n\n  state.line = last\n\n  const token   = state.push('code_block', 'code', 0)\n  token.content = state.getLines(startLine, last, 4 + state.blkIndent, false) + '\\n'\n  token.map     = [startLine, state.line]\n\n  return true\n}\n","// fences (``` lang, ~~~ lang)\n\nexport default function fence (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (pos + 3 > max) { return false }\n\n  const marker = state.src.charCodeAt(pos)\n\n  if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {\n    return false\n  }\n\n  // scan marker length\n  let mem = pos\n  pos = state.skipChars(pos, marker)\n\n  let len = pos - mem\n\n  if (len < 3) { return false }\n\n  const markup = state.src.slice(mem, pos)\n  const params = state.src.slice(pos, max)\n\n  if (marker === 0x60 /* ` */) {\n    if (params.indexOf(String.fromCharCode(marker)) >= 0) {\n      return false\n    }\n  }\n\n  // Since start is found, we can report success here in validation mode\n  if (silent) { return true }\n\n  // search end of block\n  let nextLine = startLine\n  let haveEndMarker = false\n\n  for (;;) {\n    nextLine++\n    if (nextLine >= endLine) {\n      // unclosed block should be autoclosed by end of document.\n      // also block seems to be autoclosed by end of parent\n      break\n    }\n\n    pos = mem = state.bMarks[nextLine] + state.tShift[nextLine]\n    max = state.eMarks[nextLine]\n\n    if (pos < max && state.sCount[nextLine] < state.blkIndent) {\n      // non-empty line with negative indent should stop the list:\n      // - ```\n      //  test\n      break\n    }\n\n    if (state.src.charCodeAt(pos) !== marker) { continue }\n\n    if (state.sCount[nextLine] - state.blkIndent >= 4) {\n      // closing fence should be indented less than 4 spaces\n      continue\n    }\n\n    pos = state.skipChars(pos, marker)\n\n    // closing code fence must be at least as long as the opening one\n    if (pos - mem < len) { continue }\n\n    // make sure tail has spaces only\n    pos = state.skipSpaces(pos)\n\n    if (pos < max) { continue }\n\n    haveEndMarker = true\n    // found!\n    break\n  }\n\n  // If a fence has heading spaces, they should be removed from its inner block\n  len = state.sCount[startLine]\n\n  state.line = nextLine + (haveEndMarker ? 1 : 0)\n\n  const token   = state.push('fence', 'code', 0)\n  token.info    = params\n  token.content = state.getLines(startLine + 1, nextLine, len, true)\n  token.markup  = markup\n  token.map     = [startLine, state.line]\n\n  return true\n}\n","// Block quotes\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function blockquote (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  const oldLineMax = state.lineMax\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  // check the block quote marker\n  if (state.src.charCodeAt(pos) !== 0x3E/* > */) { return false }\n\n  // we know that it's going to be a valid blockquote,\n  // so no point trying to find the end of it in silent mode\n  if (silent) { return true }\n\n  const oldBMarks  = []\n  const oldBSCount = []\n  const oldSCount  = []\n  const oldTShift  = []\n\n  const terminatorRules = state.md.block.ruler.getRules('blockquote')\n\n  const oldParentType = state.parentType\n  state.parentType = 'blockquote'\n  let lastLineEmpty = false\n  let nextLine\n\n  // Search the end of the block\n  //\n  // Block ends with either:\n  //  1. an empty line outside:\n  //     ```\n  //     > test\n  //\n  //     ```\n  //  2. an empty line inside:\n  //     ```\n  //     >\n  //     test\n  //     ```\n  //  3. another tag:\n  //     ```\n  //     > test\n  //      - - -\n  //     ```\n  for (nextLine = startLine; nextLine < endLine; nextLine++) {\n    // check if it's outdented, i.e. it's inside list item and indented\n    // less than said list item:\n    //\n    // ```\n    // 1. anything\n    //    > current blockquote\n    // 2. checking this line\n    // ```\n    const isOutdented = state.sCount[nextLine] < state.blkIndent\n\n    pos = state.bMarks[nextLine] + state.tShift[nextLine]\n    max = state.eMarks[nextLine]\n\n    if (pos >= max) {\n      // Case 1: line is not inside the blockquote, and this line is empty.\n      break\n    }\n\n    if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) {\n      // This line is inside the blockquote.\n\n      // set offset past spaces and \">\"\n      let initial = state.sCount[nextLine] + 1\n      let spaceAfterMarker\n      let adjustTab\n\n      // skip one optional space after '>'\n      if (state.src.charCodeAt(pos) === 0x20 /* space */) {\n        // ' >   test '\n        //     ^ -- position start of line here:\n        pos++\n        initial++\n        adjustTab = false\n        spaceAfterMarker = true\n      } else if (state.src.charCodeAt(pos) === 0x09 /* tab */) {\n        spaceAfterMarker = true\n\n        if ((state.bsCount[nextLine] + initial) % 4 === 3) {\n          // '  >\\t  test '\n          //       ^ -- position start of line here (tab has width===1)\n          pos++\n          initial++\n          adjustTab = false\n        } else {\n          // ' >\\t  test '\n          //    ^ -- position start of line here + shift bsCount slightly\n          //         to make extra space appear\n          adjustTab = true\n        }\n      } else {\n        spaceAfterMarker = false\n      }\n\n      let offset = initial\n      oldBMarks.push(state.bMarks[nextLine])\n      state.bMarks[nextLine] = pos\n\n      while (pos < max) {\n        const ch = state.src.charCodeAt(pos)\n\n        if (isSpace(ch)) {\n          if (ch === 0x09) {\n            offset += 4 - (offset + state.bsCount[nextLine] + (adjustTab ? 1 : 0)) % 4\n          } else {\n            offset++\n          }\n        } else {\n          break\n        }\n\n        pos++\n      }\n\n      lastLineEmpty = pos >= max\n\n      oldBSCount.push(state.bsCount[nextLine])\n      state.bsCount[nextLine] = state.sCount[nextLine] + 1 + (spaceAfterMarker ? 1 : 0)\n\n      oldSCount.push(state.sCount[nextLine])\n      state.sCount[nextLine] = offset - initial\n\n      oldTShift.push(state.tShift[nextLine])\n      state.tShift[nextLine] = pos - state.bMarks[nextLine]\n      continue\n    }\n\n    // Case 2: line is not inside the blockquote, and the last line was empty.\n    if (lastLineEmpty) { break }\n\n    // Case 3: another tag found.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n\n    if (terminate) {\n      // Quirk to enforce \"hard termination mode\" for paragraphs;\n      // normally if you call `tokenize(state, startLine, nextLine)`,\n      // paragraphs will look below nextLine for paragraph continuation,\n      // but if blockquote is terminated by another tag, they shouldn't\n      state.lineMax = nextLine\n\n      if (state.blkIndent !== 0) {\n        // state.blkIndent was non-zero, we now set it to zero,\n        // so we need to re-calculate all offsets to appear as\n        // if indent wasn't changed\n        oldBMarks.push(state.bMarks[nextLine])\n        oldBSCount.push(state.bsCount[nextLine])\n        oldTShift.push(state.tShift[nextLine])\n        oldSCount.push(state.sCount[nextLine])\n        state.sCount[nextLine] -= state.blkIndent\n      }\n\n      break\n    }\n\n    oldBMarks.push(state.bMarks[nextLine])\n    oldBSCount.push(state.bsCount[nextLine])\n    oldTShift.push(state.tShift[nextLine])\n    oldSCount.push(state.sCount[nextLine])\n\n    // A negative indentation means that this is a paragraph continuation\n    //\n    state.sCount[nextLine] = -1\n  }\n\n  const oldIndent = state.blkIndent\n  state.blkIndent = 0\n\n  const token_o  = state.push('blockquote_open', 'blockquote', 1)\n  token_o.markup = '>'\n  const lines = [startLine, 0]\n  token_o.map    = lines\n\n  state.md.block.tokenize(state, startLine, nextLine)\n\n  const token_c  = state.push('blockquote_close', 'blockquote', -1)\n  token_c.markup = '>'\n\n  state.lineMax = oldLineMax\n  state.parentType = oldParentType\n  lines[1] = state.line\n\n  // Restore original tShift; this might not be necessary since the parser\n  // has already been here, but just to make sure we can do that.\n  for (let i = 0; i < oldTShift.length; i++) {\n    state.bMarks[i + startLine] = oldBMarks[i]\n    state.tShift[i + startLine] = oldTShift[i]\n    state.sCount[i + startLine] = oldSCount[i]\n    state.bsCount[i + startLine] = oldBSCount[i]\n  }\n  state.blkIndent = oldIndent\n\n  return true\n}\n","// Horizontal rule\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function hr (state, startLine, endLine, silent) {\n  const max = state.eMarks[startLine]\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  const marker = state.src.charCodeAt(pos++)\n\n  // Check hr marker\n  if (marker !== 0x2A/* * */ &&\n      marker !== 0x2D/* - */ &&\n      marker !== 0x5F/* _ */) {\n    return false\n  }\n\n  // markers can be mixed with spaces, but there should be at least 3 of them\n\n  let cnt = 1\n  while (pos < max) {\n    const ch = state.src.charCodeAt(pos++)\n    if (ch !== marker && !isSpace(ch)) { return false }\n    if (ch === marker) { cnt++ }\n  }\n\n  if (cnt < 3) { return false }\n\n  if (silent) { return true }\n\n  state.line = startLine + 1\n\n  const token  = state.push('hr', 'hr', 0)\n  token.map    = [startLine, state.line]\n  token.markup = Array(cnt + 1).join(String.fromCharCode(marker))\n\n  return true\n}\n","import { isSpace, normalizeReference } from '../common/utils.mjs'\n\nexport default function reference (state, startLine, _endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n  let nextLine = startLine + 1\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  if (state.src.charCodeAt(pos) !== 0x5B/* [ */) { return false }\n\n  function getNextLine (nextLine) {\n    const endLine = state.lineMax\n\n    if (nextLine >= endLine || state.isEmpty(nextLine)) {\n      // empty line or end of input\n      return null\n    }\n\n    let isContinuation = false\n\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { isContinuation = true }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { isContinuation = true }\n\n    if (!isContinuation) {\n      const terminatorRules = state.md.block.ruler.getRules('reference')\n      const oldParentType = state.parentType\n      state.parentType = 'reference'\n\n      // Some tags can terminate paragraph without empty line.\n      let terminate = false\n      for (let i = 0, l = terminatorRules.length; i < l; i++) {\n        if (terminatorRules[i](state, nextLine, endLine, true)) {\n          terminate = true\n          break\n        }\n      }\n\n      state.parentType = oldParentType\n      if (terminate) {\n        // terminated by another block\n        return null\n      }\n    }\n\n    const pos = state.bMarks[nextLine] + state.tShift[nextLine]\n    const max = state.eMarks[nextLine]\n\n    // max + 1 explicitly includes the newline\n    return state.src.slice(pos, max + 1)\n  }\n\n  let str = state.src.slice(pos, max + 1)\n\n  max = str.length\n  let labelEnd = -1\n\n  for (pos = 1; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x5B /* [ */) {\n      return false\n    } else if (ch === 0x5D /* ] */) {\n      labelEnd = pos\n      break\n    } else if (ch === 0x0A /* \\n */) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (ch === 0x5C /* \\ */) {\n      pos++\n      if (pos < max && str.charCodeAt(pos) === 0x0A) {\n        const lineContent = getNextLine(nextLine)\n        if (lineContent !== null) {\n          str += lineContent\n          max = str.length\n          nextLine++\n        }\n      }\n    }\n  }\n\n  if (labelEnd < 0 || str.charCodeAt(labelEnd + 1) !== 0x3A/* : */) { return false }\n\n  // [label]:   destination   'title'\n  //         ^^^ skip optional whitespace here\n  for (pos = labelEnd + 2; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x0A) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (isSpace(ch)) {\n      /* eslint no-empty:0 */\n    } else {\n      break\n    }\n  }\n\n  // [label]:   destination   'title'\n  //            ^^^^^^^^^^^ parse this\n  const destRes = state.md.helpers.parseLinkDestination(str, pos, max)\n  if (!destRes.ok) { return false }\n\n  const href = state.md.normalizeLink(destRes.str)\n  if (!state.md.validateLink(href)) { return false }\n\n  pos = destRes.pos\n\n  // save cursor state, we could require to rollback later\n  const destEndPos = pos\n  const destEndLineNo = nextLine\n\n  // [label]:   destination   'title'\n  //                       ^^^ skipping those spaces\n  const start = pos\n  for (; pos < max; pos++) {\n    const ch = str.charCodeAt(pos)\n    if (ch === 0x0A) {\n      const lineContent = getNextLine(nextLine)\n      if (lineContent !== null) {\n        str += lineContent\n        max = str.length\n        nextLine++\n      }\n    } else if (isSpace(ch)) {\n      /* eslint no-empty:0 */\n    } else {\n      break\n    }\n  }\n\n  // [label]:   destination   'title'\n  //                          ^^^^^^^ parse this\n  let titleRes = state.md.helpers.parseLinkTitle(str, pos, max)\n  while (titleRes.can_continue) {\n    const lineContent = getNextLine(nextLine)\n    if (lineContent === null) break\n    str += lineContent\n    pos = max\n    max = str.length\n    nextLine++\n    titleRes = state.md.helpers.parseLinkTitle(str, pos, max, titleRes)\n  }\n  let title\n\n  if (pos < max && start !== pos && titleRes.ok) {\n    title = titleRes.str\n    pos = titleRes.pos\n  } else {\n    title = ''\n    pos = destEndPos\n    nextLine = destEndLineNo\n  }\n\n  // skip trailing spaces until the rest of the line\n  while (pos < max) {\n    const ch = str.charCodeAt(pos)\n    if (!isSpace(ch)) { break }\n    pos++\n  }\n\n  if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n    if (title) {\n      // garbage at the end of the line after title,\n      // but it could still be a valid reference if we roll back\n      title = ''\n      pos = destEndPos\n      nextLine = destEndLineNo\n      while (pos < max) {\n        const ch = str.charCodeAt(pos)\n        if (!isSpace(ch)) { break }\n        pos++\n      }\n    }\n  }\n\n  if (pos < max && str.charCodeAt(pos) !== 0x0A) {\n    // garbage at the end of the line\n    return false\n  }\n\n  const label = normalizeReference(str.slice(1, labelEnd))\n  if (!label) {\n    // CommonMark 0.20 disallows empty labels\n    return false\n  }\n\n  // Reference can not terminate anything. This check is for safety only.\n  /* istanbul ignore if */\n  if (silent) { return true }\n\n  if (typeof state.env.references === 'undefined') {\n    state.env.references = {}\n  }\n  if (typeof state.env.references[label] === 'undefined') {\n    state.env.references[label] = { title, href }\n  }\n\n  state.line = nextLine\n  return true\n}\n","// heading (#, ##, ...)\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function heading (state, startLine, endLine, silent) {\n  let pos = state.bMarks[startLine] + state.tShift[startLine]\n  let max = state.eMarks[startLine]\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  let ch  = state.src.charCodeAt(pos)\n\n  if (ch !== 0x23/* # */ || pos >= max) { return false }\n\n  // count heading level\n  let level = 1\n  ch = state.src.charCodeAt(++pos)\n  while (ch === 0x23/* # */ && pos < max && level <= 6) {\n    level++\n    ch = state.src.charCodeAt(++pos)\n  }\n\n  if (level > 6 || (pos < max && !isSpace(ch))) { return false }\n\n  if (silent) { return true }\n\n  // Let's cut tails like '    ###  ' from the end of string\n\n  max = state.skipSpacesBack(max, pos)\n  const tmp = state.skipCharsBack(max, 0x23, pos) // #\n  if (tmp > pos && isSpace(state.src.charCodeAt(tmp - 1))) {\n    max = tmp\n  }\n\n  state.line = startLine + 1\n\n  const token_o  = state.push('heading_open', 'h' + String(level), 1)\n  token_o.markup = '########'.slice(0, level)\n  token_o.map    = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = state.src.slice(pos, max).trim()\n  token_i.map      = [startLine, state.line]\n  token_i.children = []\n\n  const token_c  = state.push('heading_close', 'h' + String(level), -1)\n  token_c.markup = '########'.slice(0, level)\n\n  return true\n}\n","// lheading (---, ===)\n\nexport default function lheading (state, startLine, endLine/*, silent */) {\n  const terminatorRules = state.md.block.ruler.getRules('paragraph')\n\n  // if it's indented more than 3 spaces, it should be a code block\n  if (state.sCount[startLine] - state.blkIndent >= 4) { return false }\n\n  const oldParentType = state.parentType\n  state.parentType = 'paragraph' // use paragraph to match terminatorRules\n\n  // jump line-by-line until empty one or EOF\n  let level = 0\n  let marker\n  let nextLine = startLine + 1\n\n  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { continue }\n\n    //\n    // Check for underline in setext header\n    //\n    if (state.sCount[nextLine] >= state.blkIndent) {\n      let pos = state.bMarks[nextLine] + state.tShift[nextLine]\n      const max = state.eMarks[nextLine]\n\n      if (pos < max) {\n        marker = state.src.charCodeAt(pos)\n\n        if (marker === 0x2D/* - */ || marker === 0x3D/* = */) {\n          pos = state.skipChars(pos, marker)\n          pos = state.skipSpaces(pos)\n\n          if (pos >= max) {\n            level = (marker === 0x3D/* = */ ? 1 : 2)\n            break\n          }\n        }\n      }\n    }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { continue }\n\n    // Some tags can terminate paragraph without empty line.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n  }\n\n  if (!level) {\n    // Didn't find valid underline\n    return false\n  }\n\n  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim()\n\n  state.line = nextLine + 1\n\n  const token_o    = state.push('heading_open', 'h' + String(level), 1)\n  token_o.markup   = String.fromCharCode(marker)\n  token_o.map      = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = content\n  token_i.map      = [startLine, state.line - 1]\n  token_i.children = []\n\n  const token_c    = state.push('heading_close', 'h' + String(level), -1)\n  token_c.markup   = String.fromCharCode(marker)\n\n  state.parentType = oldParentType\n\n  return true\n}\n","// Paragraph\n\nexport default function paragraph (state, startLine, endLine) {\n  const terminatorRules = state.md.block.ruler.getRules('paragraph')\n  const oldParentType = state.parentType\n  let nextLine = startLine + 1\n  state.parentType = 'paragraph'\n\n  // jump line-by-line until empty one or EOF\n  for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) {\n    // this would be a code block normally, but after paragraph\n    // it's considered a lazy continuation regardless of what's there\n    if (state.sCount[nextLine] - state.blkIndent > 3) { continue }\n\n    // quirk for blockquotes, this line should already be checked by that rule\n    if (state.sCount[nextLine] < 0) { continue }\n\n    // Some tags can terminate paragraph without empty line.\n    let terminate = false\n    for (let i = 0, l = terminatorRules.length; i < l; i++) {\n      if (terminatorRules[i](state, nextLine, endLine, true)) {\n        terminate = true\n        break\n      }\n    }\n    if (terminate) { break }\n  }\n\n  const content = state.getLines(startLine, nextLine, state.blkIndent, false).trim()\n\n  state.line = nextLine\n\n  const token_o    = state.push('paragraph_open', 'p', 1)\n  token_o.map      = [startLine, state.line]\n\n  const token_i    = state.push('inline', '', 0)\n  token_i.content  = content\n  token_i.map      = [startLine, state.line]\n  token_i.children = []\n\n  state.push('paragraph_close', 'p', -1)\n\n  state.parentType = oldParentType\n\n  return true\n}\n","// Inline parser state\n\nimport Token from '../token.mjs'\nimport { isWhiteSpace, isPunctChar, isMdAsciiPunct } from '../common/utils.mjs'\n\nfunction StateInline (src, md, env, outTokens) {\n  this.src = src\n  this.env = env\n  this.md = md\n  this.tokens = outTokens\n  this.tokens_meta = Array(outTokens.length)\n\n  this.pos = 0\n  this.posMax = this.src.length\n  this.level = 0\n  this.pending = ''\n  this.pendingLevel = 0\n\n  // Stores { start: end } pairs. Useful for backtrack\n  // optimization of pairs parse (emphasis, strikes).\n  this.cache = {}\n\n  // List of emphasis-like delimiters for current tag\n  this.delimiters = []\n\n  // Stack of delimiter lists for upper level tags\n  this._prev_delimiters = []\n\n  // backtick length => last seen position\n  this.backticks = {}\n  this.backticksScanned = false\n\n  // Counter used to disable inline linkify-it execution\n  // inside <a> and markdown links\n  this.linkLevel = 0\n}\n\n// Flush pending text\n//\nStateInline.prototype.pushPending = function () {\n  const token = new Token('text', '', 0)\n  token.content = this.pending\n  token.level = this.pendingLevel\n  this.tokens.push(token)\n  this.pending = ''\n  return token\n}\n\n// Push new token to \"stream\".\n// If pending text exists - flush it as text token\n//\nStateInline.prototype.push = function (type, tag, nesting) {\n  if (this.pending) {\n    this.pushPending()\n  }\n\n  const token = new Token(type, tag, nesting)\n  let token_meta = null\n\n  if (nesting < 0) {\n    // closing tag\n    this.level--\n    this.delimiters = this._prev_delimiters.pop()\n  }\n\n  token.level = this.level\n\n  if (nesting > 0) {\n    // opening tag\n    this.level++\n    this._prev_delimiters.push(this.delimiters)\n    this.delimiters = []\n    token_meta = { delimiters: this.delimiters }\n  }\n\n  this.pendingLevel = this.level\n  this.tokens.push(token)\n  this.tokens_meta.push(token_meta)\n  return token\n}\n\n// Scan a sequence of emphasis-like markers, and determine whether\n// it can start an emphasis sequence or end an emphasis sequence.\n//\n//  - start - position to scan from (it should point at a valid marker);\n//  - canSplitWord - determine if these markers can be found inside a word\n//\nStateInline.prototype.scanDelims = function (start, canSplitWord) {\n  const max = this.posMax\n  const marker = this.src.charCodeAt(start)\n\n  // treat beginning of the line as a whitespace\n  const lastChar = start > 0 ? this.src.charCodeAt(start - 1) : 0x20\n\n  let pos = start\n  while (pos < max && this.src.charCodeAt(pos) === marker) { pos++ }\n\n  const count = pos - start\n\n  // treat end of the line as a whitespace\n  const nextChar = pos < max ? this.src.charCodeAt(pos) : 0x20\n\n  const isLastPunctChar = isMdAsciiPunct(lastChar) || isPunctChar(String.fromCharCode(lastChar))\n  const isNextPunctChar = isMdAsciiPunct(nextChar) || isPunctChar(String.fromCharCode(nextChar))\n\n  const isLastWhiteSpace = isWhiteSpace(lastChar)\n  const isNextWhiteSpace = isWhiteSpace(nextChar)\n\n  const left_flanking =\n    !isNextWhiteSpace && (!isNextPunctChar || isLastWhiteSpace || isLastPunctChar)\n  const right_flanking =\n    !isLastWhiteSpace && (!isLastPunctChar || isNextWhiteSpace || isNextPunctChar)\n\n  const can_open  = left_flanking  && (canSplitWord || !right_flanking || isLastPunctChar)\n  const can_close = right_flanking && (canSplitWord || !left_flanking  || isNextPunctChar)\n\n  return { can_open, can_close, length: count }\n}\n\n// re-export Token class to use in block rules\nStateInline.prototype.Token = Token\n\nexport default StateInline\n","// Skip text characters for text token, place those to pending buffer\n// and increment current pos\n\n// Rule to skip pure text\n// '{}$%@~+=:' reserved for extentions\n\n// !, \", #, $, %, &, ', (, ), *, +, ,, -, ., /, :, ;, <, =, >, ?, @, [, \\, ], ^, _, `, {, |, }, or ~\n\n// !!!! Don't confuse with \"Markdown ASCII Punctuation\" chars\n// http://spec.commonmark.org/0.15/#ascii-punctuation-character\nfunction isTerminatorChar (ch) {\n  switch (ch) {\n    case 0x0A/* \\n */:\n    case 0x21/* ! */:\n    case 0x23/* # */:\n    case 0x24/* $ */:\n    case 0x25/* % */:\n    case 0x26/* & */:\n    case 0x2A/* * */:\n    case 0x2B/* + */:\n    case 0x2D/* - */:\n    case 0x3A/* : */:\n    case 0x3C/* < */:\n    case 0x3D/* = */:\n    case 0x3E/* > */:\n    case 0x40/* @ */:\n    case 0x5B/* [ */:\n    case 0x5C/* \\ */:\n    case 0x5D/* ] */:\n    case 0x5E/* ^ */:\n    case 0x5F/* _ */:\n    case 0x60/* ` */:\n    case 0x7B/* { */:\n    case 0x7D/* } */:\n    case 0x7E/* ~ */:\n      return true\n    default:\n      return false\n  }\n}\n\nexport default function text (state, silent) {\n  let pos = state.pos\n\n  while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) {\n    pos++\n  }\n\n  if (pos === state.pos) { return false }\n\n  if (!silent) { state.pending += state.src.slice(state.pos, pos) }\n\n  state.pos = pos\n\n  return true\n}\n\n// Alternative implementation, for memory.\n//\n// It costs 10% of performance, but allows extend terminators list, if place it\n// to `ParserInline` property. Probably, will switch to it sometime, such\n// flexibility required.\n\n/*\nvar TERMINATOR_RE = /[\\n!#$%&*+\\-:<=>@[\\\\\\]^_`{}~]/;\n\nmodule.exports = function text(state, silent) {\n  var pos = state.pos,\n      idx = state.src.slice(pos).search(TERMINATOR_RE);\n\n  // first char is terminator -> empty text\n  if (idx === 0) { return false; }\n\n  // no terminator -> text till end of string\n  if (idx < 0) {\n    if (!silent) { state.pending += state.src.slice(pos); }\n    state.pos = state.src.length;\n    return true;\n  }\n\n  if (!silent) { state.pending += state.src.slice(pos, pos + idx); }\n\n  state.pos += idx;\n\n  return true;\n}; */\n","// Process links like https://example.org/\n\n// RFC3986: scheme = ALPHA *( ALPHA / DIGIT / \"+\" / \"-\" / \".\" )\nconst SCHEME_RE = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i\n\nexport default function linkify (state, silent) {\n  if (!state.md.options.linkify) return false\n  if (state.linkLevel > 0) return false\n\n  const pos = state.pos\n  const max = state.posMax\n\n  if (pos + 3 > max) return false\n  if (state.src.charCodeAt(pos) !== 0x3A/* : */) return false\n  if (state.src.charCodeAt(pos + 1) !== 0x2F/* / */) return false\n  if (state.src.charCodeAt(pos + 2) !== 0x2F/* / */) return false\n\n  const match = state.pending.match(SCHEME_RE)\n  if (!match) return false\n\n  const proto = match[1]\n\n  const link = state.md.linkify.matchAtStart(state.src.slice(pos - proto.length))\n  if (!link) return false\n\n  let url = link.url\n\n  // invalid link, but still detected by linkify somehow;\n  // need to check to prevent infinite loop below\n  if (url.length <= proto.length) return false\n\n  // disallow '*' at the end of the link (conflicts with emphasis)\n  url = url.replace(/\\*+$/, '')\n\n  const fullUrl = state.md.normalizeLink(url)\n  if (!state.md.validateLink(fullUrl)) return false\n\n  if (!silent) {\n    state.pending = state.pending.slice(0, -proto.length)\n\n    const token_o = state.push('link_open', 'a', 1)\n    token_o.attrs = [['href', fullUrl]]\n    token_o.markup = 'linkify'\n    token_o.info = 'auto'\n\n    const token_t = state.push('text', '', 0)\n    token_t.content = state.md.normalizeLinkText(url)\n\n    const token_c = state.push('link_close', 'a', -1)\n    token_c.markup = 'linkify'\n    token_c.info = 'auto'\n  }\n\n  state.pos += url.length - proto.length\n  return true\n}\n","// Process escaped chars and hardbreaks\n\nimport { isSpace } from '../common/utils.mjs'\n\nconst ESCAPED = []\n\nfor (let i = 0; i < 256; i++) { ESCAPED.push(0) }\n\n'\\\\!\"#$%&\\'()*+,./:;<=>?@[]^_`{|}~-'\n  .split('').forEach(function (ch) { ESCAPED[ch.charCodeAt(0)] = 1 })\n\nexport default function escape (state, silent) {\n  let pos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(pos) !== 0x5C/* \\ */) return false\n  pos++\n\n  // '\\' at the end of the inline block\n  if (pos >= max) return false\n\n  let ch1 = state.src.charCodeAt(pos)\n\n  if (ch1 === 0x0A) {\n    if (!silent) {\n      state.push('hardbreak', 'br', 0)\n    }\n\n    pos++\n    // skip leading whitespaces from next line\n    while (pos < max) {\n      ch1 = state.src.charCodeAt(pos)\n      if (!isSpace(ch1)) break\n      pos++\n    }\n\n    state.pos = pos\n    return true\n  }\n\n  let escapedStr = state.src[pos]\n\n  if (ch1 >= 0xD800 && ch1 <= 0xDBFF && pos + 1 < max) {\n    const ch2 = state.src.charCodeAt(pos + 1)\n\n    if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {\n      escapedStr += state.src[pos + 1]\n      pos++\n    }\n  }\n\n  const origStr = '\\\\' + escapedStr\n\n  if (!silent) {\n    const token = state.push('text_special', '', 0)\n\n    if (ch1 < 256 && ESCAPED[ch1] !== 0) {\n      token.content = escapedStr\n    } else {\n      token.content = origStr\n    }\n\n    token.markup = origStr\n    token.info   = 'escape'\n  }\n\n  state.pos = pos + 1\n  return true\n}\n","// ~~strike through~~\n//\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nfunction strikethrough_tokenize (state, silent) {\n  const start = state.pos\n  const marker = state.src.charCodeAt(start)\n\n  if (silent) { return false }\n\n  if (marker !== 0x7E/* ~ */) { return false }\n\n  const scanned = state.scanDelims(state.pos, true)\n  let len = scanned.length\n  const ch = String.fromCharCode(marker)\n\n  if (len < 2) { return false }\n\n  let token\n\n  if (len % 2) {\n    token         = state.push('text', '', 0)\n    token.content = ch\n    len--\n  }\n\n  for (let i = 0; i < len; i += 2) {\n    token         = state.push('text', '', 0)\n    token.content = ch + ch\n\n    state.delimiters.push({\n      marker,\n      length: 0,     // disable \"rule of 3\" length checks meant for emphasis\n      token: state.tokens.length - 1,\n      end: -1,\n      open: scanned.can_open,\n      close: scanned.can_close\n    })\n  }\n\n  state.pos += scanned.length\n\n  return true\n}\n\nfunction postProcess (state, delimiters) {\n  let token\n  const loneMarkers = []\n  const max = delimiters.length\n\n  for (let i = 0; i < max; i++) {\n    const startDelim = delimiters[i]\n\n    if (startDelim.marker !== 0x7E/* ~ */) {\n      continue\n    }\n\n    if (startDelim.end === -1) {\n      continue\n    }\n\n    const endDelim = delimiters[startDelim.end]\n\n    token         = state.tokens[startDelim.token]\n    token.type    = 's_open'\n    token.tag     = 's'\n    token.nesting = 1\n    token.markup  = '~~'\n    token.content = ''\n\n    token         = state.tokens[endDelim.token]\n    token.type    = 's_close'\n    token.tag     = 's'\n    token.nesting = -1\n    token.markup  = '~~'\n    token.content = ''\n\n    if (state.tokens[endDelim.token - 1].type === 'text' &&\n        state.tokens[endDelim.token - 1].content === '~') {\n      loneMarkers.push(endDelim.token - 1)\n    }\n  }\n\n  // If a marker sequence has an odd number of characters, it's splitted\n  // like this: `~~~~~` -> `~` + `~~` + `~~`, leaving one marker at the\n  // start of the sequence.\n  //\n  // So, we have to move all those markers after subsequent s_close tags.\n  //\n  while (loneMarkers.length) {\n    const i = loneMarkers.pop()\n    let j = i + 1\n\n    while (j < state.tokens.length && state.tokens[j].type === 's_close') {\n      j++\n    }\n\n    j--\n\n    if (i !== j) {\n      token = state.tokens[j]\n      state.tokens[j] = state.tokens[i]\n      state.tokens[i] = token\n    }\n  }\n}\n\n// Walk through delimiter list and replace text tokens with tags\n//\nfunction strikethrough_postProcess (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  postProcess(state, state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      postProcess(state, tokens_meta[curr].delimiters)\n    }\n  }\n}\n\nexport default {\n  tokenize: strikethrough_tokenize,\n  postProcess: strikethrough_postProcess\n}\n","// Process *this* and _that_\n//\n\n// Insert each marker as a separate text token, and add it to delimiter list\n//\nfunction emphasis_tokenize (state, silent) {\n  const start = state.pos\n  const marker = state.src.charCodeAt(start)\n\n  if (silent) { return false }\n\n  if (marker !== 0x5F /* _ */ && marker !== 0x2A /* * */) { return false }\n\n  const scanned = state.scanDelims(state.pos, marker === 0x2A)\n\n  for (let i = 0; i < scanned.length; i++) {\n    const token = state.push('text', '', 0)\n    token.content = String.fromCharCode(marker)\n\n    state.delimiters.push({\n      // Char code of the starting marker (number).\n      //\n      marker,\n\n      // Total length of these series of delimiters.\n      //\n      length: scanned.length,\n\n      // A position of the token this delimiter corresponds to.\n      //\n      token: state.tokens.length - 1,\n\n      // If this delimiter is matched as a valid opener, `end` will be\n      // equal to its position, otherwise it's `-1`.\n      //\n      end: -1,\n\n      // Boolean flags that determine if this delimiter could open or close\n      // an emphasis.\n      //\n      open: scanned.can_open,\n      close: scanned.can_close\n    })\n  }\n\n  state.pos += scanned.length\n\n  return true\n}\n\nfunction postProcess (state, delimiters) {\n  const max = delimiters.length\n\n  for (let i = max - 1; i >= 0; i--) {\n    const startDelim = delimiters[i]\n\n    if (startDelim.marker !== 0x5F/* _ */ && startDelim.marker !== 0x2A/* * */) {\n      continue\n    }\n\n    // Process only opening markers\n    if (startDelim.end === -1) {\n      continue\n    }\n\n    const endDelim = delimiters[startDelim.end]\n\n    // If the previous delimiter has the same marker and is adjacent to this one,\n    // merge those into one strong delimiter.\n    //\n    // `<em><em>whatever</em></em>` -> `<strong>whatever</strong>`\n    //\n    const isStrong = i > 0 &&\n               delimiters[i - 1].end === startDelim.end + 1 &&\n               // check that first two markers match and adjacent\n               delimiters[i - 1].marker === startDelim.marker &&\n               delimiters[i - 1].token === startDelim.token - 1 &&\n               // check that last two markers are adjacent (we can safely assume they match)\n               delimiters[startDelim.end + 1].token === endDelim.token + 1\n\n    const ch = String.fromCharCode(startDelim.marker)\n\n    const token_o   = state.tokens[startDelim.token]\n    token_o.type    = isStrong ? 'strong_open' : 'em_open'\n    token_o.tag     = isStrong ? 'strong' : 'em'\n    token_o.nesting = 1\n    token_o.markup  = isStrong ? ch + ch : ch\n    token_o.content = ''\n\n    const token_c   = state.tokens[endDelim.token]\n    token_c.type    = isStrong ? 'strong_close' : 'em_close'\n    token_c.tag     = isStrong ? 'strong' : 'em'\n    token_c.nesting = -1\n    token_c.markup  = isStrong ? ch + ch : ch\n    token_c.content = ''\n\n    if (isStrong) {\n      state.tokens[delimiters[i - 1].token].content = ''\n      state.tokens[delimiters[startDelim.end + 1].token].content = ''\n      i--\n    }\n  }\n}\n\n// Walk through delimiter list and replace text tokens with tags\n//\nfunction emphasis_post_process (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  postProcess(state, state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      postProcess(state, tokens_meta[curr].delimiters)\n    }\n  }\n}\n\nexport default {\n  tokenize: emphasis_tokenize,\n  postProcess: emphasis_post_process\n}\n","// Process autolinks '<protocol:...>'\n\n/* eslint max-len:0 */\nconst EMAIL_RE    = /^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/\n/* eslint-disable-next-line no-control-regex */\nconst AUTOLINK_RE = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\\x00-\\x20]*)$/\n\nexport default function autolink (state, silent) {\n  let pos = state.pos\n\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */) { return false }\n\n  const start = state.pos\n  const max = state.posMax\n\n  for (;;) {\n    if (++pos >= max) return false\n\n    const ch = state.src.charCodeAt(pos)\n\n    if (ch === 0x3C /* < */) return false\n    if (ch === 0x3E /* > */) break\n  }\n\n  const url = state.src.slice(start + 1, pos)\n\n  if (AUTOLINK_RE.test(url)) {\n    const fullUrl = state.md.normalizeLink(url)\n    if (!state.md.validateLink(fullUrl)) { return false }\n\n    if (!silent) {\n      const token_o   = state.push('link_open', 'a', 1)\n      token_o.attrs   = [['href', fullUrl]]\n      token_o.markup  = 'autolink'\n      token_o.info    = 'auto'\n\n      const token_t   = state.push('text', '', 0)\n      token_t.content = state.md.normalizeLinkText(url)\n\n      const token_c   = state.push('link_close', 'a', -1)\n      token_c.markup  = 'autolink'\n      token_c.info    = 'auto'\n    }\n\n    state.pos += url.length + 2\n    return true\n  }\n\n  if (EMAIL_RE.test(url)) {\n    const fullUrl = state.md.normalizeLink('mailto:' + url)\n    if (!state.md.validateLink(fullUrl)) { return false }\n\n    if (!silent) {\n      const token_o   = state.push('link_open', 'a', 1)\n      token_o.attrs   = [['href', fullUrl]]\n      token_o.markup  = 'autolink'\n      token_o.info    = 'auto'\n\n      const token_t   = state.push('text', '', 0)\n      token_t.content = state.md.normalizeLinkText(url)\n\n      const token_c   = state.push('link_close', 'a', -1)\n      token_c.markup  = 'autolink'\n      token_c.info    = 'auto'\n    }\n\n    state.pos += url.length + 2\n    return true\n  }\n\n  return false\n}\n","// Process html entity - &#123;, &#xAF;, &quot;, ...\n\nimport { decodeHTML } from 'entities'\nimport { isValidEntityCode, fromCodePoint } from '../common/utils.mjs'\n\nconst DIGITAL_RE = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i\nconst NAMED_RE   = /^&([a-z][a-z0-9]{1,31});/i\n\nexport default function entity (state, silent) {\n  const pos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(pos) !== 0x26/* & */) return false\n\n  if (pos + 1 >= max) return false\n\n  const ch = state.src.charCodeAt(pos + 1)\n\n  if (ch === 0x23 /* # */) {\n    const match = state.src.slice(pos).match(DIGITAL_RE)\n    if (match) {\n      if (!silent) {\n        const code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10)\n\n        const token   = state.push('text_special', '', 0)\n        token.content = isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD)\n        token.markup  = match[0]\n        token.info    = 'entity'\n      }\n      state.pos += match[0].length\n      return true\n    }\n  } else {\n    const match = state.src.slice(pos).match(NAMED_RE)\n    if (match) {\n      const decoded = decodeHTML(match[0])\n      if (decoded !== match[0]) {\n        if (!silent) {\n          const token   = state.push('text_special', '', 0)\n          token.content = decoded\n          token.markup  = match[0]\n          token.info    = 'entity'\n        }\n        state.pos += match[0].length\n        return true\n      }\n    }\n  }\n\n  return false\n}\n","// For each opening emphasis-like marker find a matching closing one\n//\n\nfunction processDelimiters (delimiters) {\n  const openersBottom = {}\n  const max = delimiters.length\n\n  if (!max) return\n\n  // headerIdx is the first delimiter of the current (where closer is) delimiter run\n  let headerIdx = 0\n  let lastTokenIdx = -2 // needs any value lower than -1\n  const jumps = []\n\n  for (let closerIdx = 0; closerIdx < max; closerIdx++) {\n    const closer = delimiters[closerIdx]\n\n    jumps.push(0)\n\n    // markers belong to same delimiter run if:\n    //  - they have adjacent tokens\n    //  - AND markers are the same\n    //\n    if (delimiters[headerIdx].marker !== closer.marker || lastTokenIdx !== closer.token - 1) {\n      headerIdx = closerIdx\n    }\n\n    lastTokenIdx = closer.token\n\n    // Length is only used for emphasis-specific \"rule of 3\",\n    // if it's not defined (in strikethrough or 3rd party plugins),\n    // we can default it to 0 to disable those checks.\n    //\n    closer.length = closer.length || 0\n\n    if (!closer.close) continue\n\n    // Previously calculated lower bounds (previous fails)\n    // for each marker, each delimiter length modulo 3,\n    // and for whether this closer can be an opener;\n    // https://github.com/commonmark/cmark/commit/34250e12ccebdc6372b8b49c44fab57c72443460\n    /* eslint-disable-next-line no-prototype-builtins */\n    if (!openersBottom.hasOwnProperty(closer.marker)) {\n      openersBottom[closer.marker] = [-1, -1, -1, -1, -1, -1]\n    }\n\n    const minOpenerIdx = openersBottom[closer.marker][(closer.open ? 3 : 0) + (closer.length % 3)]\n\n    let openerIdx = headerIdx - jumps[headerIdx] - 1\n\n    let newMinOpenerIdx = openerIdx\n\n    for (; openerIdx > minOpenerIdx; openerIdx -= jumps[openerIdx] + 1) {\n      const opener = delimiters[openerIdx]\n\n      if (opener.marker !== closer.marker) continue\n\n      if (opener.open && opener.end < 0) {\n        let isOddMatch = false\n\n        // from spec:\n        //\n        // If one of the delimiters can both open and close emphasis, then the\n        // sum of the lengths of the delimiter runs containing the opening and\n        // closing delimiters must not be a multiple of 3 unless both lengths\n        // are multiples of 3.\n        //\n        if (opener.close || closer.open) {\n          if ((opener.length + closer.length) % 3 === 0) {\n            if (opener.length % 3 !== 0 || closer.length % 3 !== 0) {\n              isOddMatch = true\n            }\n          }\n        }\n\n        if (!isOddMatch) {\n          // If previous delimiter cannot be an opener, we can safely skip\n          // the entire sequence in future checks. This is required to make\n          // sure algorithm has linear complexity (see *_*_*_*_*_... case).\n          //\n          const lastJump = openerIdx > 0 && !delimiters[openerIdx - 1].open\n            ? jumps[openerIdx - 1] + 1\n            : 0\n\n          jumps[closerIdx] = closerIdx - openerIdx + lastJump\n          jumps[openerIdx] = lastJump\n\n          closer.open  = false\n          opener.end   = closerIdx\n          opener.close = false\n          newMinOpenerIdx = -1\n          // treat next token as start of run,\n          // it optimizes skips in **<...>**a**<...>** pathological case\n          lastTokenIdx = -2\n          break\n        }\n      }\n    }\n\n    if (newMinOpenerIdx !== -1) {\n      // If match for this delimiter run failed, we want to set lower bound for\n      // future lookups. This is required to make sure algorithm has linear\n      // complexity.\n      //\n      // See details here:\n      // https://github.com/commonmark/cmark/issues/178#issuecomment-270417442\n      //\n      openersBottom[closer.marker][(closer.open ? 3 : 0) + ((closer.length || 0) % 3)] = newMinOpenerIdx\n    }\n  }\n}\n\nexport default function link_pairs (state) {\n  const tokens_meta = state.tokens_meta\n  const max = state.tokens_meta.length\n\n  processDelimiters(state.delimiters)\n\n  for (let curr = 0; curr < max; curr++) {\n    if (tokens_meta[curr] && tokens_meta[curr].delimiters) {\n      processDelimiters(tokens_meta[curr].delimiters)\n    }\n  }\n}\n","/** internal\n * class ParserInline\n *\n * Tokenizes paragraph content.\n **/\n\nimport Ruler from './ruler.mjs'\nimport StateInline from './rules_inline/state_inline.mjs'\n\nimport r_text from './rules_inline/text.mjs'\nimport r_linkify from './rules_inline/linkify.mjs'\nimport r_newline from './rules_inline/newline.mjs'\nimport r_escape from './rules_inline/escape.mjs'\nimport r_backticks from './rules_inline/backticks.mjs'\nimport r_strikethrough from './rules_inline/strikethrough.mjs'\nimport r_emphasis from './rules_inline/emphasis.mjs'\nimport r_link from './rules_inline/link.mjs'\nimport r_image from './rules_inline/image.mjs'\nimport r_autolink from './rules_inline/autolink.mjs'\nimport r_html_inline from './rules_inline/html_inline.mjs'\nimport r_entity from './rules_inline/entity.mjs'\n\nimport r_balance_pairs from './rules_inline/balance_pairs.mjs'\nimport r_fragments_join from './rules_inline/fragments_join.mjs'\n\n// Parser rules\n\nconst _rules = [\n  ['text',            r_text],\n  ['linkify',         r_linkify],\n  ['newline',         r_newline],\n  ['escape',          r_escape],\n  ['backticks',       r_backticks],\n  ['strikethrough',   r_strikethrough.tokenize],\n  ['emphasis',        r_emphasis.tokenize],\n  ['link',            r_link],\n  ['image',           r_image],\n  ['autolink',        r_autolink],\n  ['html_inline',     r_html_inline],\n  ['entity',          r_entity]\n]\n\n// `rule2` ruleset was created specifically for emphasis/strikethrough\n// post-processing and may be changed in the future.\n//\n// Don't use this for anything except pairs (plugins working with `balance_pairs`).\n//\nconst _rules2 = [\n  ['balance_pairs',   r_balance_pairs],\n  ['strikethrough',   r_strikethrough.postProcess],\n  ['emphasis',        r_emphasis.postProcess],\n  // rules for pairs separate '**' into its own text tokens, which may be left unused,\n  // rule below merges unused segments back with the rest of the text\n  ['fragments_join',  r_fragments_join]\n]\n\n/**\n * new ParserInline()\n **/\nfunction ParserInline () {\n  /**\n   * ParserInline#ruler -> Ruler\n   *\n   * [[Ruler]] instance. Keep configuration of inline rules.\n   **/\n  this.ruler = new Ruler()\n\n  for (let i = 0; i < _rules.length; i++) {\n    this.ruler.push(_rules[i][0], _rules[i][1])\n  }\n\n  /**\n   * ParserInline#ruler2 -> Ruler\n   *\n   * [[Ruler]] instance. Second ruler used for post-processing\n   * (e.g. in emphasis-like rules).\n   **/\n  this.ruler2 = new Ruler()\n\n  for (let i = 0; i < _rules2.length; i++) {\n    this.ruler2.push(_rules2[i][0], _rules2[i][1])\n  }\n}\n\n// Skip single token by running all rules in validation mode;\n// returns `true` if any rule reported success\n//\nParserInline.prototype.skipToken = function (state) {\n  const pos = state.pos\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const maxNesting = state.md.options.maxNesting\n  const cache = state.cache\n\n  if (typeof cache[pos] !== 'undefined') {\n    state.pos = cache[pos]\n    return\n  }\n\n  let ok = false\n\n  if (state.level < maxNesting) {\n    for (let i = 0; i < len; i++) {\n      // Increment state.level and decrement it later to limit recursion.\n      // It's harmless to do here, because no tokens are created. But ideally,\n      // we'd need a separate private state variable for this purpose.\n      //\n      state.level++\n      ok = rules[i](state, true)\n      state.level--\n\n      if (ok) {\n        if (pos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\") }\n        break\n      }\n    }\n  } else {\n    // Too much nesting, just skip until the end of the paragraph.\n    //\n    // NOTE: this will cause links to behave incorrectly in the following case,\n    //       when an amount of `[` is exactly equal to `maxNesting + 1`:\n    //\n    //       [[[[[[[[[[[[[[[[[[[[[foo]()\n    //\n    // TODO: remove this workaround when CM standard will allow nested links\n    //       (we can replace it by preventing links from being parsed in\n    //       validation mode)\n    //\n    state.pos = state.posMax\n  }\n\n  if (!ok) { state.pos++ }\n  cache[pos] = state.pos\n}\n\n// Generate tokens for input range\n//\nParserInline.prototype.tokenize = function (state) {\n  const rules = this.ruler.getRules('')\n  const len = rules.length\n  const end = state.posMax\n  const maxNesting = state.md.options.maxNesting\n\n  while (state.pos < end) {\n    // Try all possible rules.\n    // On success, rule should:\n    //\n    // - update `state.pos`\n    // - update `state.tokens`\n    // - return true\n    const prevPos = state.pos\n    let ok = false\n\n    if (state.level < maxNesting) {\n      for (let i = 0; i < len; i++) {\n        ok = rules[i](state, false)\n        if (ok) {\n          if (prevPos >= state.pos) { throw new Error(\"inline rule didn't increment state.pos\") }\n          break\n        }\n      }\n    }\n\n    if (ok) {\n      if (state.pos >= end) { break }\n      continue\n    }\n\n    state.pending += state.src[state.pos++]\n  }\n\n  if (state.pending) {\n    state.pushPending()\n  }\n}\n\n/**\n * ParserInline.parse(str, md, env, outTokens)\n *\n * Process input string and push inline tokens into `outTokens`\n **/\nParserInline.prototype.parse = function (str, md, env, outTokens) {\n  const state = new this.State(str, md, env, outTokens)\n\n  this.tokenize(state)\n\n  const rules = this.ruler2.getRules('')\n  const len = rules.length\n\n  for (let i = 0; i < len; i++) {\n    rules[i](state)\n  }\n}\n\nParserInline.prototype.State = StateInline\n\nexport default ParserInline\n","// Proceess '\\n'\n\nimport { isSpace } from '../common/utils.mjs'\n\nexport default function newline (state, silent) {\n  let pos = state.pos\n\n  if (state.src.charCodeAt(pos) !== 0x0A/* \\n */) { return false }\n\n  const pmax = state.pending.length - 1\n  const max = state.posMax\n\n  // '  \\n' -> hardbreak\n  // Lookup in pending chars is bad practice! Don't copy to other rules!\n  // Pending string is stored in concat mode, indexed lookups will cause\n  // convertion to flat mode.\n  if (!silent) {\n    if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {\n      if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {\n        // Find whitespaces tail of pending chars.\n        let ws = pmax - 1\n        while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--\n\n        state.pending = state.pending.slice(0, ws)\n        state.push('hardbreak', 'br', 0)\n      } else {\n        state.pending = state.pending.slice(0, -1)\n        state.push('softbreak', 'br', 0)\n      }\n    } else {\n      state.push('softbreak', 'br', 0)\n    }\n  }\n\n  pos++\n\n  // skip heading spaces for next line\n  while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++ }\n\n  state.pos = pos\n  return true\n}\n","// Parse backticks\n\nexport default function backtick (state, silent) {\n  let pos = state.pos\n  const ch = state.src.charCodeAt(pos)\n\n  if (ch !== 0x60/* ` */) { return false }\n\n  const start = pos\n  pos++\n  const max = state.posMax\n\n  // scan marker length\n  while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++ }\n\n  const marker = state.src.slice(start, pos)\n  const openerLength = marker.length\n\n  if (state.backticksScanned && (state.backticks[openerLength] || 0) <= start) {\n    if (!silent) state.pending += marker\n    state.pos += openerLength\n    return true\n  }\n\n  let matchEnd = pos\n  let matchStart\n\n  // Nothing found in the cache, scan until the end of the line (or until marker is found)\n  while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) {\n    matchEnd = matchStart + 1\n\n    // scan marker length\n    while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++ }\n\n    const closerLength = matchEnd - matchStart\n\n    if (closerLength === openerLength) {\n      // Found matching closer length.\n      if (!silent) {\n        const token = state.push('code_inline', 'code', 0)\n        token.markup = marker\n        token.content = state.src.slice(pos, matchStart)\n          .replace(/\\n/g, ' ')\n          .replace(/^ (.+) $/, '$1')\n      }\n      state.pos = matchEnd\n      return true\n    }\n\n    // Some different length found, put it in cache as upper limit of where closer can be found\n    state.backticks[closerLength] = matchStart\n  }\n\n  // Scanned through the end, didn't find anything\n  state.backticksScanned = true\n\n  if (!silent) state.pending += marker\n  state.pos += openerLength\n  return true\n}\n","// Process [link](<to> \"stuff\")\n\nimport { normalizeReference, isSpace } from '../common/utils.mjs'\n\nexport default function link (state, silent) {\n  let code, label, res, ref\n  let href = ''\n  let title = ''\n  let start = state.pos\n  let parseReference = true\n\n  if (state.src.charCodeAt(state.pos) !== 0x5B/* [ */) { return false }\n\n  const oldPos = state.pos\n  const max = state.posMax\n  const labelStart = state.pos + 1\n  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos, true)\n\n  // parser failed to find ']', so it's not a valid link\n  if (labelEnd < 0) { return false }\n\n  let pos = labelEnd + 1\n  if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n    //\n    // Inline link\n    //\n\n    // might have found a valid shortcut link, disable reference parsing\n    parseReference = false\n\n    // [link](  <href>  \"title\"  )\n    //        ^^ skipping these spaces\n    pos++\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n    if (pos >= max) { return false }\n\n    // [link](  <href>  \"title\"  )\n    //          ^^^^^^ parsing link destination\n    start = pos\n    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)\n    if (res.ok) {\n      href = state.md.normalizeLink(res.str)\n      if (state.md.validateLink(href)) {\n        pos = res.pos\n      } else {\n        href = ''\n      }\n\n      // [link](  <href>  \"title\"  )\n      //                ^^ skipping these spaces\n      start = pos\n      for (; pos < max; pos++) {\n        code = state.src.charCodeAt(pos)\n        if (!isSpace(code) && code !== 0x0A) { break }\n      }\n\n      // [link](  <href>  \"title\"  )\n      //                  ^^^^^^^ parsing link title\n      res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax)\n      if (pos < max && start !== pos && res.ok) {\n        title = res.str\n        pos = res.pos\n\n        // [link](  <href>  \"title\"  )\n        //                         ^^ skipping these spaces\n        for (; pos < max; pos++) {\n          code = state.src.charCodeAt(pos)\n          if (!isSpace(code) && code !== 0x0A) { break }\n        }\n      }\n    }\n\n    if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n      // parsing a valid shortcut link failed, fallback to reference\n      parseReference = true\n    }\n    pos++\n  }\n\n  if (parseReference) {\n    //\n    // Link reference\n    //\n    if (typeof state.env.references === 'undefined') { return false }\n\n    if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n      start = pos + 1\n      pos = state.md.helpers.parseLinkLabel(state, pos)\n      if (pos >= 0) {\n        label = state.src.slice(start, pos++)\n      } else {\n        pos = labelEnd + 1\n      }\n    } else {\n      pos = labelEnd + 1\n    }\n\n    // covers label === '' and label === undefined\n    // (collapsed reference link and shortcut reference link respectively)\n    if (!label) { label = state.src.slice(labelStart, labelEnd) }\n\n    ref = state.env.references[normalizeReference(label)]\n    if (!ref) {\n      state.pos = oldPos\n      return false\n    }\n    href = ref.href\n    title = ref.title\n  }\n\n  //\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    state.pos = labelStart\n    state.posMax = labelEnd\n\n    const token_o = state.push('link_open', 'a', 1)\n    const attrs = [['href', href]]\n    token_o.attrs  = attrs\n    if (title) {\n      attrs.push(['title', title])\n    }\n\n    state.linkLevel++\n    state.md.inline.tokenize(state)\n    state.linkLevel--\n\n    state.push('link_close', 'a', -1)\n  }\n\n  state.pos = pos\n  state.posMax = max\n  return true\n}\n","// Process ![image](<src> \"title\")\n\nimport { normalizeReference, isSpace } from '../common/utils.mjs'\n\nexport default function image (state, silent) {\n  let code, content, label, pos, ref, res, title, start\n  let href = ''\n  const oldPos = state.pos\n  const max = state.posMax\n\n  if (state.src.charCodeAt(state.pos) !== 0x21/* ! */) { return false }\n  if (state.src.charCodeAt(state.pos + 1) !== 0x5B/* [ */) { return false }\n\n  const labelStart = state.pos + 2\n  const labelEnd = state.md.helpers.parseLinkLabel(state, state.pos + 1, false)\n\n  // parser failed to find ']', so it's not a valid link\n  if (labelEnd < 0) { return false }\n\n  pos = labelEnd + 1\n  if (pos < max && state.src.charCodeAt(pos) === 0x28/* ( */) {\n    //\n    // Inline link\n    //\n\n    // [link](  <href>  \"title\"  )\n    //        ^^ skipping these spaces\n    pos++\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n    if (pos >= max) { return false }\n\n    // [link](  <href>  \"title\"  )\n    //          ^^^^^^ parsing link destination\n    start = pos\n    res = state.md.helpers.parseLinkDestination(state.src, pos, state.posMax)\n    if (res.ok) {\n      href = state.md.normalizeLink(res.str)\n      if (state.md.validateLink(href)) {\n        pos = res.pos\n      } else {\n        href = ''\n      }\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                ^^ skipping these spaces\n    start = pos\n    for (; pos < max; pos++) {\n      code = state.src.charCodeAt(pos)\n      if (!isSpace(code) && code !== 0x0A) { break }\n    }\n\n    // [link](  <href>  \"title\"  )\n    //                  ^^^^^^^ parsing link title\n    res = state.md.helpers.parseLinkTitle(state.src, pos, state.posMax)\n    if (pos < max && start !== pos && res.ok) {\n      title = res.str\n      pos = res.pos\n\n      // [link](  <href>  \"title\"  )\n      //                         ^^ skipping these spaces\n      for (; pos < max; pos++) {\n        code = state.src.charCodeAt(pos)\n        if (!isSpace(code) && code !== 0x0A) { break }\n      }\n    } else {\n      title = ''\n    }\n\n    if (pos >= max || state.src.charCodeAt(pos) !== 0x29/* ) */) {\n      state.pos = oldPos\n      return false\n    }\n    pos++\n  } else {\n    //\n    // Link reference\n    //\n    if (typeof state.env.references === 'undefined') { return false }\n\n    if (pos < max && state.src.charCodeAt(pos) === 0x5B/* [ */) {\n      start = pos + 1\n      pos = state.md.helpers.parseLinkLabel(state, pos)\n      if (pos >= 0) {\n        label = state.src.slice(start, pos++)\n      } else {\n        pos = labelEnd + 1\n      }\n    } else {\n      pos = labelEnd + 1\n    }\n\n    // covers label === '' and label === undefined\n    // (collapsed reference link and shortcut reference link respectively)\n    if (!label) { label = state.src.slice(labelStart, labelEnd) }\n\n    ref = state.env.references[normalizeReference(label)]\n    if (!ref) {\n      state.pos = oldPos\n      return false\n    }\n    href = ref.href\n    title = ref.title\n  }\n\n  //\n  // We found the end of the link, and know for a fact it's a valid link;\n  // so all that's left to do is to call tokenizer.\n  //\n  if (!silent) {\n    content = state.src.slice(labelStart, labelEnd)\n\n    const tokens = []\n    state.md.inline.parse(\n      content,\n      state.md,\n      state.env,\n      tokens\n    )\n\n    const token = state.push('image', 'img', 0)\n    const attrs = [['src', href], ['alt', '']]\n    token.attrs = attrs\n    token.children = tokens\n    token.content = content\n\n    if (title) {\n      attrs.push(['title', title])\n    }\n  }\n\n  state.pos = pos\n  state.posMax = max\n  return true\n}\n","// Process html tags\n\nimport { HTML_TAG_RE } from '../common/html_re.mjs'\n\nfunction isLinkOpen (str) {\n  return /^<a[>\\s]/i.test(str)\n}\nfunction isLinkClose (str) {\n  return /^<\\/a\\s*>/i.test(str)\n}\n\nfunction isLetter (ch) {\n  /* eslint no-bitwise:0 */\n  const lc = ch | 0x20 // to lower case\n  return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */)\n}\n\nexport default function html_inline (state, silent) {\n  if (!state.md.options.html) { return false }\n\n  // Check start\n  const max = state.posMax\n  const pos = state.pos\n  if (state.src.charCodeAt(pos) !== 0x3C/* < */ ||\n      pos + 2 >= max) {\n    return false\n  }\n\n  // Quick fail on second char\n  const ch = state.src.charCodeAt(pos + 1)\n  if (ch !== 0x21/* ! */ &&\n      ch !== 0x3F/* ? */ &&\n      ch !== 0x2F/* / */ &&\n      !isLetter(ch)) {\n    return false\n  }\n\n  const match = state.src.slice(pos).match(HTML_TAG_RE)\n  if (!match) { return false }\n\n  if (!silent) {\n    const token = state.push('html_inline', '', 0)\n    token.content = match[0]\n\n    if (isLinkOpen(token.content))  state.linkLevel++\n    if (isLinkClose(token.content)) state.linkLevel--\n  }\n  state.pos += match[0].length\n  return true\n}\n","// Clean up tokens after emphasis and strikethrough postprocessing:\n// merge adjacent text nodes into one and re-calculate all token levels\n//\n// This is necessary because initially emphasis delimiter markers (*, _, ~)\n// are treated as their own separate text tokens. Then emphasis rule either\n// leaves them as text (needed to merge with adjacent text) or turns them\n// into opening/closing tags (which messes up levels inside).\n//\n\nexport default function fragments_join (state) {\n  let curr, last\n  let level = 0\n  const tokens = state.tokens\n  const max = state.tokens.length\n\n  for (curr = last = 0; curr < max; curr++) {\n    // re-calculate levels after emphasis/strikethrough turns some text nodes\n    // into opening/closing tags\n    if (tokens[curr].nesting < 0) level-- // closing tag\n    tokens[curr].level = level\n    if (tokens[curr].nesting > 0) level++ // opening tag\n\n    if (tokens[curr].type === 'text' &&\n        curr + 1 < max &&\n        tokens[curr + 1].type === 'text') {\n      // collapse two adjacent text nodes\n      tokens[curr + 1].content = tokens[curr].content + tokens[curr + 1].content\n    } else {\n      if (curr !== last) { tokens[last] = tokens[curr] }\n\n      last++\n    }\n  }\n\n  if (curr !== last) {\n    tokens.length = last\n  }\n}\n","import reFactory from './lib/re.mjs'\n\n//\n// Helpers\n//\n\n// Merge objects\n//\nfunction assign (obj /* from1, from2, from3, ... */) {\n  const sources = Array.prototype.slice.call(arguments, 1)\n\n  sources.forEach(function (source) {\n    if (!source) { return }\n\n    Object.keys(source).forEach(function (key) {\n      obj[key] = source[key]\n    })\n  })\n\n  return obj\n}\n\nfunction _class (obj) { return Object.prototype.toString.call(obj) }\nfunction isString (obj) { return _class(obj) === '[object String]' }\nfunction isObject (obj) { return _class(obj) === '[object Object]' }\nfunction isRegExp (obj) { return _class(obj) === '[object RegExp]' }\nfunction isFunction (obj) { return _class(obj) === '[object Function]' }\n\nfunction escapeRE (str) { return str.replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&') }\n\n//\n\nconst defaultOptions = {\n  fuzzyLink: true,\n  fuzzyEmail: true,\n  fuzzyIP: false\n}\n\nfunction isOptionsObj (obj) {\n  return Object.keys(obj || {}).reduce(function (acc, k) {\n    /* eslint-disable-next-line no-prototype-builtins */\n    return acc || defaultOptions.hasOwnProperty(k)\n  }, false)\n}\n\nconst defaultSchemas = {\n  'http:': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.http) {\n        // compile lazily, because \"host\"-containing variables can change on tlds update.\n        self.re.http = new RegExp(\n          '^\\\\/\\\\/' + self.re.src_auth + self.re.src_host_port_strict + self.re.src_path, 'i'\n        )\n      }\n      if (self.re.http.test(tail)) {\n        return tail.match(self.re.http)[0].length\n      }\n      return 0\n    }\n  },\n  'https:': 'http:',\n  'ftp:': 'http:',\n  '//': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.no_http) {\n      // compile lazily, because \"host\"-containing variables can change on tlds update.\n        self.re.no_http = new RegExp(\n          '^' +\n          self.re.src_auth +\n          // Don't allow single-level domains, because of false positives like '//test'\n          // with code comments\n          '(?:localhost|(?:(?:' + self.re.src_domain + ')\\\\.)+' + self.re.src_domain_root + ')' +\n          self.re.src_port +\n          self.re.src_host_terminator +\n          self.re.src_path,\n\n          'i'\n        )\n      }\n\n      if (self.re.no_http.test(tail)) {\n        // should not be `://` & `///`, that protects from errors in protocol name\n        if (pos >= 3 && text[pos - 3] === ':') { return 0 }\n        if (pos >= 3 && text[pos - 3] === '/') { return 0 }\n        return tail.match(self.re.no_http)[0].length\n      }\n      return 0\n    }\n  },\n  'mailto:': {\n    validate: function (text, pos, self) {\n      const tail = text.slice(pos)\n\n      if (!self.re.mailto) {\n        self.re.mailto = new RegExp(\n          '^' + self.re.src_email_name + '@' + self.re.src_host_strict, 'i'\n        )\n      }\n      if (self.re.mailto.test(tail)) {\n        return tail.match(self.re.mailto)[0].length\n      }\n      return 0\n    }\n  }\n}\n\n// RE pattern for 2-character tlds (autogenerated by ./support/tlds_2char_gen.js)\n/* eslint-disable-next-line max-len */\nconst tlds_2ch_src_re = 'a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]'\n\n// DON'T try to make PRs with changes. Extend TLDs with LinkifyIt.tlds() instead\nconst tlds_default = 'biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф'.split('|')\n\nfunction resetScanCache (self) {\n  self.__index__ = -1\n  self.__text_cache__ = ''\n}\n\nfunction createValidator (re) {\n  return function (text, pos) {\n    const tail = text.slice(pos)\n\n    if (re.test(tail)) {\n      return tail.match(re)[0].length\n    }\n    return 0\n  }\n}\n\nfunction createNormalizer () {\n  return function (match, self) {\n    self.normalize(match)\n  }\n}\n\n// Schemas compiler. Build regexps.\n//\nfunction compile (self) {\n  // Load & clone RE patterns.\n  const re = self.re = reFactory(self.__opts__)\n\n  // Define dynamic patterns\n  const tlds = self.__tlds__.slice()\n\n  self.onCompile()\n\n  if (!self.__tlds_replaced__) {\n    tlds.push(tlds_2ch_src_re)\n  }\n  tlds.push(re.src_xn)\n\n  re.src_tlds = tlds.join('|')\n\n  function untpl (tpl) { return tpl.replace('%TLDS%', re.src_tlds) }\n\n  re.email_fuzzy = RegExp(untpl(re.tpl_email_fuzzy), 'i')\n  re.link_fuzzy = RegExp(untpl(re.tpl_link_fuzzy), 'i')\n  re.link_no_ip_fuzzy = RegExp(untpl(re.tpl_link_no_ip_fuzzy), 'i')\n  re.host_fuzzy_test = RegExp(untpl(re.tpl_host_fuzzy_test), 'i')\n\n  //\n  // Compile each schema\n  //\n\n  const aliases = []\n\n  self.__compiled__ = {} // Reset compiled data\n\n  function schemaError (name, val) {\n    throw new Error('(LinkifyIt) Invalid schema \"' + name + '\": ' + val)\n  }\n\n  Object.keys(self.__schemas__).forEach(function (name) {\n    const val = self.__schemas__[name]\n\n    // skip disabled methods\n    if (val === null) { return }\n\n    const compiled = { validate: null, link: null }\n\n    self.__compiled__[name] = compiled\n\n    if (isObject(val)) {\n      if (isRegExp(val.validate)) {\n        compiled.validate = createValidator(val.validate)\n      } else if (isFunction(val.validate)) {\n        compiled.validate = val.validate\n      } else {\n        schemaError(name, val)\n      }\n\n      if (isFunction(val.normalize)) {\n        compiled.normalize = val.normalize\n      } else if (!val.normalize) {\n        compiled.normalize = createNormalizer()\n      } else {\n        schemaError(name, val)\n      }\n\n      return\n    }\n\n    if (isString(val)) {\n      aliases.push(name)\n      return\n    }\n\n    schemaError(name, val)\n  })\n\n  //\n  // Compile postponed aliases\n  //\n\n  aliases.forEach(function (alias) {\n    if (!self.__compiled__[self.__schemas__[alias]]) {\n      // Silently fail on missed schemas to avoid errons on disable.\n      // schemaError(alias, self.__schemas__[alias]);\n      return\n    }\n\n    self.__compiled__[alias].validate =\n      self.__compiled__[self.__schemas__[alias]].validate\n    self.__compiled__[alias].normalize =\n      self.__compiled__[self.__schemas__[alias]].normalize\n  })\n\n  //\n  // Fake record for guessed links\n  //\n  self.__compiled__[''] = { validate: null, normalize: createNormalizer() }\n\n  //\n  // Build schema condition\n  //\n  const slist = Object.keys(self.__compiled__)\n    .filter(function (name) {\n      // Filter disabled & fake schemas\n      return name.length > 0 && self.__compiled__[name]\n    })\n    .map(escapeRE)\n    .join('|')\n  // (?!_) cause 1.5x slowdown\n  self.re.schema_test = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'i')\n  self.re.schema_search = RegExp('(^|(?!_)(?:[><\\uff5c]|' + re.src_ZPCc + '))(' + slist + ')', 'ig')\n  self.re.schema_at_start = RegExp('^' + self.re.schema_search.source, 'i')\n\n  self.re.pretest = RegExp(\n    '(' + self.re.schema_test.source + ')|(' + self.re.host_fuzzy_test.source + ')|@',\n    'i'\n  )\n\n  //\n  // Cleanup\n  //\n\n  resetScanCache(self)\n}\n\n/**\n * class Match\n *\n * Match result. Single element of array, returned by [[LinkifyIt#match]]\n **/\nfunction Match (self, shift) {\n  const start = self.__index__\n  const end = self.__last_index__\n  const text = self.__text_cache__.slice(start, end)\n\n  /**\n   * Match#schema -> String\n   *\n   * Prefix (protocol) for matched string.\n   **/\n  this.schema = self.__schema__.toLowerCase()\n  /**\n   * Match#index -> Number\n   *\n   * First position of matched string.\n   **/\n  this.index = start + shift\n  /**\n   * Match#lastIndex -> Number\n   *\n   * Next position after matched string.\n   **/\n  this.lastIndex = end + shift\n  /**\n   * Match#raw -> String\n   *\n   * Matched string.\n   **/\n  this.raw = text\n  /**\n   * Match#text -> String\n   *\n   * Notmalized text of matched string.\n   **/\n  this.text = text\n  /**\n   * Match#url -> String\n   *\n   * Normalized url of matched string.\n   **/\n  this.url = text\n}\n\nfunction createMatch (self, shift) {\n  const match = new Match(self, shift)\n\n  self.__compiled__[match.schema].normalize(match, self)\n\n  return match\n}\n\n/**\n * class LinkifyIt\n **/\n\n/**\n * new LinkifyIt(schemas, options)\n * - schemas (Object): Optional. Additional schemas to validate (prefix/validator)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Creates new linkifier instance with optional additional schemas.\n * Can be called without `new` keyword for convenience.\n *\n * By default understands:\n *\n * - `http(s)://...` , `ftp://...`, `mailto:...` & `//...` links\n * - \"fuzzy\" links and emails (example.com, foo@bar.com).\n *\n * `schemas` is an object, where each key/value describes protocol/rule:\n *\n * - __key__ - link prefix (usually, protocol name with `:` at the end, `skype:`\n *   for example). `linkify-it` makes shure that prefix is not preceeded with\n *   alphanumeric char and symbols. Only whitespaces and punctuation allowed.\n * - __value__ - rule to check tail after link prefix\n *   - _String_ - just alias to existing rule\n *   - _Object_\n *     - _validate_ - validator function (should return matched length on success),\n *       or `RegExp`.\n *     - _normalize_ - optional function to normalize text & url of matched result\n *       (for example, for @twitter mentions).\n *\n * `options`:\n *\n * - __fuzzyLink__ - recognige URL-s without `http(s):` prefix. Default `true`.\n * - __fuzzyIP__ - allow IPs in fuzzy links above. Can conflict with some texts\n *   like version numbers. Default `false`.\n * - __fuzzyEmail__ - recognize emails without `mailto:` prefix.\n *\n **/\nfunction LinkifyIt (schemas, options) {\n  if (!(this instanceof LinkifyIt)) {\n    return new LinkifyIt(schemas, options)\n  }\n\n  if (!options) {\n    if (isOptionsObj(schemas)) {\n      options = schemas\n      schemas = {}\n    }\n  }\n\n  this.__opts__ = assign({}, defaultOptions, options)\n\n  // Cache last tested result. Used to skip repeating steps on next `match` call.\n  this.__index__ = -1\n  this.__last_index__ = -1 // Next scan position\n  this.__schema__ = ''\n  this.__text_cache__ = ''\n\n  this.__schemas__ = assign({}, defaultSchemas, schemas)\n  this.__compiled__ = {}\n\n  this.__tlds__ = tlds_default\n  this.__tlds_replaced__ = false\n\n  this.re = {}\n\n  compile(this)\n}\n\n/** chainable\n * LinkifyIt#add(schema, definition)\n * - schema (String): rule name (fixed pattern prefix)\n * - definition (String|RegExp|Object): schema definition\n *\n * Add new rule definition. See constructor description for details.\n **/\nLinkifyIt.prototype.add = function add (schema, definition) {\n  this.__schemas__[schema] = definition\n  compile(this)\n  return this\n}\n\n/** chainable\n * LinkifyIt#set(options)\n * - options (Object): { fuzzyLink|fuzzyEmail|fuzzyIP: true|false }\n *\n * Set recognition options for links without schema.\n **/\nLinkifyIt.prototype.set = function set (options) {\n  this.__opts__ = assign(this.__opts__, options)\n  return this\n}\n\n/**\n * LinkifyIt#test(text) -> Boolean\n *\n * Searches linkifiable pattern and returns `true` on success or `false` on fail.\n **/\nLinkifyIt.prototype.test = function test (text) {\n  // Reset scan cache\n  this.__text_cache__ = text\n  this.__index__ = -1\n\n  if (!text.length) { return false }\n\n  let m, ml, me, len, shift, next, re, tld_pos, at_pos\n\n  // try to scan for link with schema - that's the most simple rule\n  if (this.re.schema_test.test(text)) {\n    re = this.re.schema_search\n    re.lastIndex = 0\n    while ((m = re.exec(text)) !== null) {\n      len = this.testSchemaAt(text, m[2], re.lastIndex)\n      if (len) {\n        this.__schema__ = m[2]\n        this.__index__ = m.index + m[1].length\n        this.__last_index__ = m.index + m[0].length + len\n        break\n      }\n    }\n  }\n\n  if (this.__opts__.fuzzyLink && this.__compiled__['http:']) {\n    // guess schemaless links\n    tld_pos = text.search(this.re.host_fuzzy_test)\n    if (tld_pos >= 0) {\n      // if tld is located after found link - no need to check fuzzy pattern\n      if (this.__index__ < 0 || tld_pos < this.__index__) {\n        if ((ml = text.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null) {\n          shift = ml.index + ml[1].length\n\n          if (this.__index__ < 0 || shift < this.__index__) {\n            this.__schema__ = ''\n            this.__index__ = shift\n            this.__last_index__ = ml.index + ml[0].length\n          }\n        }\n      }\n    }\n  }\n\n  if (this.__opts__.fuzzyEmail && this.__compiled__['mailto:']) {\n    // guess schemaless emails\n    at_pos = text.indexOf('@')\n    if (at_pos >= 0) {\n      // We can't skip this check, because this cases are possible:\n      // 192.168.1.1@gmail.com, my.in@example.com\n      if ((me = text.match(this.re.email_fuzzy)) !== null) {\n        shift = me.index + me[1].length\n        next = me.index + me[0].length\n\n        if (this.__index__ < 0 || shift < this.__index__ ||\n            (shift === this.__index__ && next > this.__last_index__)) {\n          this.__schema__ = 'mailto:'\n          this.__index__ = shift\n          this.__last_index__ = next\n        }\n      }\n    }\n  }\n\n  return this.__index__ >= 0\n}\n\n/**\n * LinkifyIt#pretest(text) -> Boolean\n *\n * Very quick check, that can give false positives. Returns true if link MAY BE\n * can exists. Can be used for speed optimization, when you need to check that\n * link NOT exists.\n **/\nLinkifyIt.prototype.pretest = function pretest (text) {\n  return this.re.pretest.test(text)\n}\n\n/**\n * LinkifyIt#testSchemaAt(text, name, position) -> Number\n * - text (String): text to scan\n * - name (String): rule (schema) name\n * - position (Number): text offset to check from\n *\n * Similar to [[LinkifyIt#test]] but checks only specific protocol tail exactly\n * at given position. Returns length of found pattern (0 on fail).\n **/\nLinkifyIt.prototype.testSchemaAt = function testSchemaAt (text, schema, pos) {\n  // If not supported schema check requested - terminate\n  if (!this.__compiled__[schema.toLowerCase()]) {\n    return 0\n  }\n  return this.__compiled__[schema.toLowerCase()].validate(text, pos, this)\n}\n\n/**\n * LinkifyIt#match(text) -> Array|null\n *\n * Returns array of found link descriptions or `null` on fail. We strongly\n * recommend to use [[LinkifyIt#test]] first, for best speed.\n *\n * ##### Result match description\n *\n * - __schema__ - link schema, can be empty for fuzzy links, or `//` for\n *   protocol-neutral  links.\n * - __index__ - offset of matched text\n * - __lastIndex__ - index of next char after mathch end\n * - __raw__ - matched text\n * - __text__ - normalized text\n * - __url__ - link, generated from matched text\n **/\nLinkifyIt.prototype.match = function match (text) {\n  const result = []\n  let shift = 0\n\n  // Try to take previous element from cache, if .test() called before\n  if (this.__index__ >= 0 && this.__text_cache__ === text) {\n    result.push(createMatch(this, shift))\n    shift = this.__last_index__\n  }\n\n  // Cut head if cache was used\n  let tail = shift ? text.slice(shift) : text\n\n  // Scan string until end reached\n  while (this.test(tail)) {\n    result.push(createMatch(this, shift))\n\n    tail = tail.slice(this.__last_index__)\n    shift += this.__last_index__\n  }\n\n  if (result.length) {\n    return result\n  }\n\n  return null\n}\n\n/**\n * LinkifyIt#matchAtStart(text) -> Match|null\n *\n * Returns fully-formed (not fuzzy) link if it starts at the beginning\n * of the string, and null otherwise.\n **/\nLinkifyIt.prototype.matchAtStart = function matchAtStart (text) {\n  // Reset scan cache\n  this.__text_cache__ = text\n  this.__index__ = -1\n\n  if (!text.length) return null\n\n  const m = this.re.schema_at_start.exec(text)\n  if (!m) return null\n\n  const len = this.testSchemaAt(text, m[2], m[0].length)\n  if (!len) return null\n\n  this.__schema__ = m[2]\n  this.__index__ = m.index + m[1].length\n  this.__last_index__ = m.index + m[0].length + len\n\n  return createMatch(this, 0)\n}\n\n/** chainable\n * LinkifyIt#tlds(list [, keepOld]) -> this\n * - list (Array): list of tlds\n * - keepOld (Boolean): merge with current list if `true` (`false` by default)\n *\n * Load (or merge) new tlds list. Those are user for fuzzy links (without prefix)\n * to avoid false positives. By default this algorythm used:\n *\n * - hostname with any 2-letter root zones are ok.\n * - biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф\n *   are ok.\n * - encoded (`xn--...`) root zones are ok.\n *\n * If list is replaced, then exact match for 2-chars root zones will be checked.\n **/\nLinkifyIt.prototype.tlds = function tlds (list, keepOld) {\n  list = Array.isArray(list) ? list : [list]\n\n  if (!keepOld) {\n    this.__tlds__ = list.slice()\n    this.__tlds_replaced__ = true\n    compile(this)\n    return this\n  }\n\n  this.__tlds__ = this.__tlds__.concat(list)\n    .sort()\n    .filter(function (el, idx, arr) {\n      return el !== arr[idx - 1]\n    })\n    .reverse()\n\n  compile(this)\n  return this\n}\n\n/**\n * LinkifyIt#normalize(match)\n *\n * Default normalizer (if schema does not define it's own).\n **/\nLinkifyIt.prototype.normalize = function normalize (match) {\n  // Do minimal possible changes by default. Need to collect feedback prior\n  // to move forward https://github.com/markdown-it/linkify-it/issues/1\n\n  if (!match.schema) { match.url = 'http://' + match.url }\n\n  if (match.schema === 'mailto:' && !/^mailto:/i.test(match.url)) {\n    match.url = 'mailto:' + match.url\n  }\n}\n\n/**\n * LinkifyIt#onCompile()\n *\n * Override to modify basic RegExp-s.\n **/\nLinkifyIt.prototype.onCompile = function onCompile () {\n}\n\nexport default LinkifyIt\n","import { Any, Cc, Z, P } from 'uc.micro'\n\nexport default function (opts) {\n  const re = {}\n  opts = opts || {}\n\n  re.src_Any = Any.source\n  re.src_Cc = Cc.source\n  re.src_Z = Z.source\n  re.src_P = P.source\n\n  // \\p{\\Z\\P\\Cc\\CF} (white spaces + control + format + punctuation)\n  re.src_ZPCc = [re.src_Z, re.src_P, re.src_Cc].join('|')\n\n  // \\p{\\Z\\Cc} (white spaces + control)\n  re.src_ZCc = [re.src_Z, re.src_Cc].join('|')\n\n  // Experimental. List of chars, completely prohibited in links\n  // because can separate it from other part of text\n  const text_separators = '[><\\uff5c]'\n\n  // All possible word characters (everything without punctuation, spaces & controls)\n  // Defined via punctuation & spaces to save space\n  // Should be something like \\p{\\L\\N\\S\\M} (\\w but without `_`)\n  re.src_pseudo_letter = '(?:(?!' + text_separators + '|' + re.src_ZPCc + ')' + re.src_Any + ')'\n  // The same as abothe but without [0-9]\n  // var src_pseudo_letter_non_d = '(?:(?![0-9]|' + src_ZPCc + ')' + src_Any + ')';\n\n  re.src_ip4 =\n\n    '(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)'\n\n  // Prohibit any of \"@/[]()\" in user/pass to avoid wrong domain fetch.\n  re.src_auth = '(?:(?:(?!' + re.src_ZCc + '|[@/\\\\[\\\\]()]).)+@)?'\n\n  re.src_port =\n\n    '(?::(?:6(?:[0-4]\\\\d{3}|5(?:[0-4]\\\\d{2}|5(?:[0-2]\\\\d|3[0-5])))|[1-5]?\\\\d{1,4}))?'\n\n  re.src_host_terminator =\n\n    '(?=$|' + text_separators + '|' + re.src_ZPCc + ')' +\n    '(?!' + (opts['---'] ? '-(?!--)|' : '-|') + '_|:\\\\d|\\\\.-|\\\\.(?!$|' + re.src_ZPCc + '))'\n\n  re.src_path =\n\n    '(?:' +\n      '[/?#]' +\n        '(?:' +\n          '(?!' + re.src_ZCc + '|' + text_separators + '|[()[\\\\]{}.,\"\\'?!\\\\-;]).|' +\n          '\\\\[(?:(?!' + re.src_ZCc + '|\\\\]).)*\\\\]|' +\n          '\\\\((?:(?!' + re.src_ZCc + '|[)]).)*\\\\)|' +\n          '\\\\{(?:(?!' + re.src_ZCc + '|[}]).)*\\\\}|' +\n          '\\\\\"(?:(?!' + re.src_ZCc + '|[\"]).)+\\\\\"|' +\n          \"\\\\'(?:(?!\" + re.src_ZCc + \"|[']).)+\\\\'|\" +\n\n          // allow `I'm_king` if no pair found\n          \"\\\\'(?=\" + re.src_pseudo_letter + '|[-])|' +\n\n          // google has many dots in \"google search\" links (#66, #81).\n          // github has ... in commit range links,\n          // Restrict to\n          // - english\n          // - percent-encoded\n          // - parts of file path\n          // - params separator\n          // until more examples found.\n          '\\\\.{2,}[a-zA-Z0-9%/&]|' +\n\n          '\\\\.(?!' + re.src_ZCc + '|[.]|$)|' +\n          (opts['---']\n            ? '\\\\-(?!--(?:[^-]|$))(?:-*)|' // `---` => long dash, terminate\n            : '\\\\-+|'\n          ) +\n          // allow `,,,` in paths\n          ',(?!' + re.src_ZCc + '|$)|' +\n\n          // allow `;` if not followed by space-like char\n          ';(?!' + re.src_ZCc + '|$)|' +\n\n          // allow `!!!` in paths, but not at the end\n          '\\\\!+(?!' + re.src_ZCc + '|[!]|$)|' +\n\n          '\\\\?(?!' + re.src_ZCc + '|[?]|$)' +\n        ')+' +\n      '|\\\\/' +\n    ')?'\n\n  // Allow anything in markdown spec, forbid quote (\") at the first position\n  // because emails enclosed in quotes are far more common\n  re.src_email_name =\n\n    '[\\\\-;:&=\\\\+\\\\$,\\\\.a-zA-Z0-9_][\\\\-;:&=\\\\+\\\\$,\\\\\"\\\\.a-zA-Z0-9_]*'\n\n  re.src_xn =\n\n    'xn--[a-z0-9\\\\-]{1,59}'\n\n  // More to read about domain names\n  // http://serverfault.com/questions/638260/\n\n  re.src_domain_root =\n\n    // Allow letters & digits (http://test1)\n    '(?:' +\n      re.src_xn +\n      '|' +\n      re.src_pseudo_letter + '{1,63}' +\n    ')'\n\n  re.src_domain =\n\n    '(?:' +\n      re.src_xn +\n      '|' +\n      '(?:' + re.src_pseudo_letter + ')' +\n      '|' +\n      '(?:' + re.src_pseudo_letter + '(?:-|' + re.src_pseudo_letter + '){0,61}' + re.src_pseudo_letter + ')' +\n    ')'\n\n  re.src_host =\n\n    '(?:' +\n    // Don't need IP check, because digits are already allowed in normal domain names\n    //   src_ip4 +\n    // '|' +\n      '(?:(?:(?:' + re.src_domain + ')\\\\.)*' + re.src_domain/* _root */ + ')' +\n    ')'\n\n  re.tpl_host_fuzzy =\n\n    '(?:' +\n      re.src_ip4 +\n    '|' +\n      '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))' +\n    ')'\n\n  re.tpl_host_no_ip_fuzzy =\n\n    '(?:(?:(?:' + re.src_domain + ')\\\\.)+(?:%TLDS%))'\n\n  re.src_host_strict =\n\n    re.src_host + re.src_host_terminator\n\n  re.tpl_host_fuzzy_strict =\n\n    re.tpl_host_fuzzy + re.src_host_terminator\n\n  re.src_host_port_strict =\n\n    re.src_host + re.src_port + re.src_host_terminator\n\n  re.tpl_host_port_fuzzy_strict =\n\n    re.tpl_host_fuzzy + re.src_port + re.src_host_terminator\n\n  re.tpl_host_port_no_ip_fuzzy_strict =\n\n    re.tpl_host_no_ip_fuzzy + re.src_port + re.src_host_terminator\n\n  //\n  // Main rules\n  //\n\n  // Rude test fuzzy links by host, for quick deny\n  re.tpl_host_fuzzy_test =\n\n    'localhost|www\\\\.|\\\\.\\\\d{1,3}\\\\.|(?:\\\\.(?:%TLDS%)(?:' + re.src_ZPCc + '|>|$))'\n\n  re.tpl_email_fuzzy =\n\n      '(^|' + text_separators + '|\"|\\\\(|' + re.src_ZCc + ')' +\n      '(' + re.src_email_name + '@' + re.tpl_host_fuzzy_strict + ')'\n\n  re.tpl_link_fuzzy =\n      // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n      // but can start with > (markdown blockquote)\n      '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n      '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_fuzzy_strict + re.src_path + ')'\n\n  re.tpl_link_no_ip_fuzzy =\n      // Fuzzy link can't be prepended with .:/\\- and non punctuation.\n      // but can start with > (markdown blockquote)\n      '(^|(?![.:/\\\\-_@])(?:[$+<=>^`|\\uff5c]|' + re.src_ZPCc + '))' +\n      '((?![$+<=>^`|\\uff5c])' + re.tpl_host_port_no_ip_fuzzy_strict + re.src_path + ')'\n\n  return re\n}\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","// Main parser class\n\nimport * as utils from './common/utils.mjs'\nimport * as helpers from './helpers/index.mjs'\nimport Renderer from './renderer.mjs'\nimport ParserCore from './parser_core.mjs'\nimport ParserBlock from './parser_block.mjs'\nimport ParserInline from './parser_inline.mjs'\nimport LinkifyIt from 'linkify-it'\nimport * as mdurl from 'mdurl'\nimport punycode from 'punycode.js'\n\nimport cfg_default from './presets/default.mjs'\nimport cfg_zero from './presets/zero.mjs'\nimport cfg_commonmark from './presets/commonmark.mjs'\n\nconst config = {\n  default: cfg_default,\n  zero: cfg_zero,\n  commonmark: cfg_commonmark\n}\n\n//\n// This validator can prohibit more than really needed to prevent XSS. It's a\n// tradeoff to keep code simple and to be secure by default.\n//\n// If you need different setup - override validator method as you wish. Or\n// replace it with dummy function and use external sanitizer.\n//\n\nconst BAD_PROTO_RE = /^(vbscript|javascript|file|data):/\nconst GOOD_DATA_RE = /^data:image\\/(gif|png|jpeg|webp);/\n\nfunction validateLink (url) {\n  // url should be normalized at this point, and existing entities are decoded\n  const str = url.trim().toLowerCase()\n\n  return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true\n}\n\nconst RECODE_HOSTNAME_FOR = ['http:', 'https:', 'mailto:']\n\nfunction normalizeLink (url) {\n  const parsed = mdurl.parse(url, true)\n\n  if (parsed.hostname) {\n    // Encode hostnames in urls like:\n    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n    //\n    // We don't encode unknown schemas, because it's likely that we encode\n    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n    //\n    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n      try {\n        parsed.hostname = punycode.toASCII(parsed.hostname)\n      } catch (er) { /**/ }\n    }\n  }\n\n  return mdurl.encode(mdurl.format(parsed))\n}\n\nfunction normalizeLinkText (url) {\n  const parsed = mdurl.parse(url, true)\n\n  if (parsed.hostname) {\n    // Encode hostnames in urls like:\n    // `http://host/`, `https://host/`, `mailto:user@host`, `//host/`\n    //\n    // We don't encode unknown schemas, because it's likely that we encode\n    // something we shouldn't (e.g. `skype:name` treated as `skype:host`)\n    //\n    if (!parsed.protocol || RECODE_HOSTNAME_FOR.indexOf(parsed.protocol) >= 0) {\n      try {\n        parsed.hostname = punycode.toUnicode(parsed.hostname)\n      } catch (er) { /**/ }\n    }\n  }\n\n  // add '%' to exclude list because of https://github.com/markdown-it/markdown-it/issues/720\n  return mdurl.decode(mdurl.format(parsed), mdurl.decode.defaultChars + '%')\n}\n\n/**\n * class MarkdownIt\n *\n * Main parser/renderer class.\n *\n * ##### Usage\n *\n * ```javascript\n * // node.js, \"classic\" way:\n * var MarkdownIt = require('markdown-it'),\n *     md = new MarkdownIt();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // node.js, the same, but with sugar:\n * var md = require('markdown-it')();\n * var result = md.render('# markdown-it rulezz!');\n *\n * // browser without AMD, added to \"window\" on script load\n * // Note, there are no dash.\n * var md = window.markdownit();\n * var result = md.render('# markdown-it rulezz!');\n * ```\n *\n * Single line rendering, without paragraph wrap:\n *\n * ```javascript\n * var md = require('markdown-it')();\n * var result = md.renderInline('__markdown-it__ rulezz!');\n * ```\n **/\n\n/**\n * new MarkdownIt([presetName, options])\n * - presetName (String): optional, `commonmark` / `zero`\n * - options (Object)\n *\n * Creates parser instanse with given config. Can be called without `new`.\n *\n * ##### presetName\n *\n * MarkdownIt provides named presets as a convenience to quickly\n * enable/disable active syntax rules and options for common use cases.\n *\n * - [\"commonmark\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/commonmark.mjs) -\n *   configures parser to strict [CommonMark](http://commonmark.org/) mode.\n * - [default](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/default.mjs) -\n *   similar to GFM, used when no preset name given. Enables all available rules,\n *   but still without html, typographer & autolinker.\n * - [\"zero\"](https://github.com/markdown-it/markdown-it/blob/master/lib/presets/zero.mjs) -\n *   all rules disabled. Useful to quickly setup your config via `.enable()`.\n *   For example, when you need only `bold` and `italic` markup and nothing else.\n *\n * ##### options:\n *\n * - __html__ - `false`. Set `true` to enable HTML tags in source. Be careful!\n *   That's not safe! You may need external sanitizer to protect output from XSS.\n *   It's better to extend features via plugins, instead of enabling HTML.\n * - __xhtmlOut__ - `false`. Set `true` to add '/' when closing single tags\n *   (`<br />`). This is needed only for full CommonMark compatibility. In real\n *   world you will need HTML output.\n * - __breaks__ - `false`. Set `true` to convert `\\n` in paragraphs into `<br>`.\n * - __langPrefix__ - `language-`. CSS language class prefix for fenced blocks.\n *   Can be useful for external highlighters.\n * - __linkify__ - `false`. Set `true` to autoconvert URL-like text to links.\n * - __typographer__  - `false`. Set `true` to enable [some language-neutral\n *   replacement](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/replacements.mjs) +\n *   quotes beautification (smartquotes).\n * - __quotes__ - `“”‘’`, String or Array. Double + single quotes replacement\n *   pairs, when typographer enabled and smartquotes on. For example, you can\n *   use `'«»„“'` for Russian, `'„“‚‘'` for German, and\n *   `['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›']` for French (including nbsp).\n * - __highlight__ - `null`. Highlighter function for fenced code blocks.\n *   Highlighter `function (str, lang)` should return escaped HTML. It can also\n *   return empty string if the source was not changed and should be escaped\n *   externaly. If result starts with <pre... internal wrapper is skipped.\n *\n * ##### Example\n *\n * ```javascript\n * // commonmark mode\n * var md = require('markdown-it')('commonmark');\n *\n * // default mode\n * var md = require('markdown-it')();\n *\n * // enable everything\n * var md = require('markdown-it')({\n *   html: true,\n *   linkify: true,\n *   typographer: true\n * });\n * ```\n *\n * ##### Syntax highlighting\n *\n * ```js\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * var md = require('markdown-it')({\n *   highlight: function (str, lang) {\n *     if (lang && hljs.getLanguage(lang)) {\n *       try {\n *         return hljs.highlight(str, { language: lang, ignoreIllegals: true }).value;\n *       } catch (__) {}\n *     }\n *\n *     return ''; // use external default escaping\n *   }\n * });\n * ```\n *\n * Or with full wrapper override (if you need assign class to `<pre>` or `<code>`):\n *\n * ```javascript\n * var hljs = require('highlight.js') // https://highlightjs.org/\n *\n * // Actual default values\n * var md = require('markdown-it')({\n *   highlight: function (str, lang) {\n *     if (lang && hljs.getLanguage(lang)) {\n *       try {\n *         return '<pre><code class=\"hljs\">' +\n *                hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +\n *                '</code></pre>';\n *       } catch (__) {}\n *     }\n *\n *     return '<pre><code class=\"hljs\">' + md.utils.escapeHtml(str) + '</code></pre>';\n *   }\n * });\n * ```\n *\n **/\nfunction MarkdownIt (presetName, options) {\n  if (!(this instanceof MarkdownIt)) {\n    return new MarkdownIt(presetName, options)\n  }\n\n  if (!options) {\n    if (!utils.isString(presetName)) {\n      options = presetName || {}\n      presetName = 'default'\n    }\n  }\n\n  /**\n   * MarkdownIt#inline -> ParserInline\n   *\n   * Instance of [[ParserInline]]. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.inline = new ParserInline()\n\n  /**\n   * MarkdownIt#block -> ParserBlock\n   *\n   * Instance of [[ParserBlock]]. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.block = new ParserBlock()\n\n  /**\n   * MarkdownIt#core -> Core\n   *\n   * Instance of [[Core]] chain executor. You may need it to add new rules when\n   * writing plugins. For simple rules control use [[MarkdownIt.disable]] and\n   * [[MarkdownIt.enable]].\n   **/\n  this.core = new ParserCore()\n\n  /**\n   * MarkdownIt#renderer -> Renderer\n   *\n   * Instance of [[Renderer]]. Use it to modify output look. Or to add rendering\n   * rules for new token types, generated by plugins.\n   *\n   * ##### Example\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   *\n   * function myToken(tokens, idx, options, env, self) {\n   *   //...\n   *   return result;\n   * };\n   *\n   * md.renderer.rules['my_token'] = myToken\n   * ```\n   *\n   * See [[Renderer]] docs and [source code](https://github.com/markdown-it/markdown-it/blob/master/lib/renderer.mjs).\n   **/\n  this.renderer = new Renderer()\n\n  /**\n   * MarkdownIt#linkify -> LinkifyIt\n   *\n   * [linkify-it](https://github.com/markdown-it/linkify-it) instance.\n   * Used by [linkify](https://github.com/markdown-it/markdown-it/blob/master/lib/rules_core/linkify.mjs)\n   * rule.\n   **/\n  this.linkify = new LinkifyIt()\n\n  /**\n   * MarkdownIt#validateLink(url) -> Boolean\n   *\n   * Link validation function. CommonMark allows too much in links. By default\n   * we disable `javascript:`, `vbscript:`, `file:` schemas, and almost all `data:...` schemas\n   * except some embedded image types.\n   *\n   * You can change this behaviour:\n   *\n   * ```javascript\n   * var md = require('markdown-it')();\n   * // enable everything\n   * md.validateLink = function () { return true; }\n   * ```\n   **/\n  this.validateLink = validateLink\n\n  /**\n   * MarkdownIt#normalizeLink(url) -> String\n   *\n   * Function used to encode link url to a machine-readable format,\n   * which includes url-encoding, punycode, etc.\n   **/\n  this.normalizeLink = normalizeLink\n\n  /**\n   * MarkdownIt#normalizeLinkText(url) -> String\n   *\n   * Function used to decode link url to a human-readable format`\n   **/\n  this.normalizeLinkText = normalizeLinkText\n\n  // Expose utils & helpers for easy acces from plugins\n\n  /**\n   * MarkdownIt#utils -> utils\n   *\n   * Assorted utility functions, useful to write plugins. See details\n   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/common/utils.mjs).\n   **/\n  this.utils = utils\n\n  /**\n   * MarkdownIt#helpers -> helpers\n   *\n   * Link components parser functions, useful to write plugins. See details\n   * [here](https://github.com/markdown-it/markdown-it/blob/master/lib/helpers).\n   **/\n  this.helpers = utils.assign({}, helpers)\n\n  this.options = {}\n  this.configure(presetName)\n\n  if (options) { this.set(options) }\n}\n\n/** chainable\n * MarkdownIt.set(options)\n *\n * Set parser options (in the same format as in constructor). Probably, you\n * will never need it, but you can change options after constructor call.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n *             .set({ html: true, breaks: true })\n *             .set({ typographer, true });\n * ```\n *\n * __Note:__ To achieve the best possible performance, don't modify a\n * `markdown-it` instance options on the fly. If you need multiple configurations\n * it's best to create multiple instances and initialize each with separate\n * config.\n **/\nMarkdownIt.prototype.set = function (options) {\n  utils.assign(this.options, options)\n  return this\n}\n\n/** chainable, internal\n * MarkdownIt.configure(presets)\n *\n * Batch load of all options and compenent settings. This is internal method,\n * and you probably will not need it. But if you will - see available presets\n * and data structure [here](https://github.com/markdown-it/markdown-it/tree/master/lib/presets)\n *\n * We strongly recommend to use presets instead of direct config loads. That\n * will give better compatibility with next versions.\n **/\nMarkdownIt.prototype.configure = function (presets) {\n  const self = this\n\n  if (utils.isString(presets)) {\n    const presetName = presets\n    presets = config[presetName]\n    if (!presets) { throw new Error('Wrong `markdown-it` preset \"' + presetName + '\", check name') }\n  }\n\n  if (!presets) { throw new Error('Wrong `markdown-it` preset, can\\'t be empty') }\n\n  if (presets.options) { self.set(presets.options) }\n\n  if (presets.components) {\n    Object.keys(presets.components).forEach(function (name) {\n      if (presets.components[name].rules) {\n        self[name].ruler.enableOnly(presets.components[name].rules)\n      }\n      if (presets.components[name].rules2) {\n        self[name].ruler2.enableOnly(presets.components[name].rules2)\n      }\n    })\n  }\n  return this\n}\n\n/** chainable\n * MarkdownIt.enable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to enable\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * Enable list or rules. It will automatically find appropriate components,\n * containing rules with given names. If rule not found, and `ignoreInvalid`\n * not set - throws exception.\n *\n * ##### Example\n *\n * ```javascript\n * var md = require('markdown-it')()\n *             .enable(['sub', 'sup'])\n *             .disable('smartquotes');\n * ```\n **/\nMarkdownIt.prototype.enable = function (list, ignoreInvalid) {\n  let result = []\n\n  if (!Array.isArray(list)) { list = [list] }\n\n  ['core', 'block', 'inline'].forEach(function (chain) {\n    result = result.concat(this[chain].ruler.enable(list, true))\n  }, this)\n\n  result = result.concat(this.inline.ruler2.enable(list, true))\n\n  const missed = list.filter(function (name) { return result.indexOf(name) < 0 })\n\n  if (missed.length && !ignoreInvalid) {\n    throw new Error('MarkdownIt. Failed to enable unknown rule(s): ' + missed)\n  }\n\n  return this\n}\n\n/** chainable\n * MarkdownIt.disable(list, ignoreInvalid)\n * - list (String|Array): rule name or list of rule names to disable.\n * - ignoreInvalid (Boolean): set `true` to ignore errors when rule not found.\n *\n * The same as [[MarkdownIt.enable]], but turn specified rules off.\n **/\nMarkdownIt.prototype.disable = function (list, ignoreInvalid) {\n  let result = []\n\n  if (!Array.isArray(list)) { list = [list] }\n\n  ['core', 'block', 'inline'].forEach(function (chain) {\n    result = result.concat(this[chain].ruler.disable(list, true))\n  }, this)\n\n  result = result.concat(this.inline.ruler2.disable(list, true))\n\n  const missed = list.filter(function (name) { return result.indexOf(name) < 0 })\n\n  if (missed.length && !ignoreInvalid) {\n    throw new Error('MarkdownIt. Failed to disable unknown rule(s): ' + missed)\n  }\n  return this\n}\n\n/** chainable\n * MarkdownIt.use(plugin, params)\n *\n * Load specified plugin with given params into current parser instance.\n * It's just a sugar to call `plugin(md, params)` with curring.\n *\n * ##### Example\n *\n * ```javascript\n * var iterator = require('markdown-it-for-inline');\n * var md = require('markdown-it')()\n *             .use(iterator, 'foo_replace', 'text', function (tokens, idx) {\n *               tokens[idx].content = tokens[idx].content.replace(/foo/g, 'bar');\n *             });\n * ```\n **/\nMarkdownIt.prototype.use = function (plugin /*, params, ... */) {\n  const args = [this].concat(Array.prototype.slice.call(arguments, 1))\n  plugin.apply(plugin, args)\n  return this\n}\n\n/** internal\n * MarkdownIt.parse(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Parse input string and return list of block tokens (special token type\n * \"inline\" will contain list of inline tokens). You should not call this\n * method directly, until you write custom renderer (for example, to produce\n * AST).\n *\n * `env` is used to pass data between \"distributed\" rules and return additional\n * metadata like reference info, needed for the renderer. It also can be used to\n * inject data in specific cases. Usually, you will be ok to pass `{}`,\n * and then pass updated object to renderer.\n **/\nMarkdownIt.prototype.parse = function (src, env) {\n  if (typeof src !== 'string') {\n    throw new Error('Input data should be a String')\n  }\n\n  const state = new this.core.State(src, this, env)\n\n  this.core.process(state)\n\n  return state.tokens\n}\n\n/**\n * MarkdownIt.render(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Render markdown string into html. It does all magic for you :).\n *\n * `env` can be used to inject additional metadata (`{}` by default).\n * But you will not need it with high probability. See also comment\n * in [[MarkdownIt.parse]].\n **/\nMarkdownIt.prototype.render = function (src, env) {\n  env = env || {}\n\n  return this.renderer.render(this.parse(src, env), this.options, env)\n}\n\n/** internal\n * MarkdownIt.parseInline(src, env) -> Array\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * The same as [[MarkdownIt.parse]] but skip all block rules. It returns the\n * block tokens list with the single `inline` element, containing parsed inline\n * tokens in `children` property. Also updates `env` object.\n **/\nMarkdownIt.prototype.parseInline = function (src, env) {\n  const state = new this.core.State(src, this, env)\n\n  state.inlineMode = true\n  this.core.process(state)\n\n  return state.tokens\n}\n\n/**\n * MarkdownIt.renderInline(src [, env]) -> String\n * - src (String): source string\n * - env (Object): environment sandbox\n *\n * Similar to [[MarkdownIt.render]] but for single paragraph content. Result\n * will NOT be wrapped into `<p>` tags.\n **/\nMarkdownIt.prototype.renderInline = function (src, env) {\n  env = env || {}\n\n  return this.renderer.render(this.parseInline(src, env), this.options, env)\n}\n\nexport default MarkdownIt\n","// markdown-it default options\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: false,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: false,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 100\n  },\n\n  components: {\n    core: {},\n    block: {},\n    inline: {}\n  }\n}\n","// \"Zero\" preset, with nothing enabled. Useful for manual configuring of simple\n// modes. For example, to parse bold/italic only.\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: false,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: false,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 20\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'normalize',\n        'block',\n        'inline',\n        'text_join'\n      ]\n    },\n\n    block: {\n      rules: [\n        'paragraph'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'text'\n      ],\n      rules2: [\n        'balance_pairs',\n        'fragments_join'\n      ]\n    }\n  }\n}\n","// Commonmark default options\n\nexport default {\n  options: {\n    // Enable HTML tags in source\n    html: true,\n\n    // Use '/' to close single tags (<br />)\n    xhtmlOut: true,\n\n    // Convert '\\n' in paragraphs into <br>\n    breaks: false,\n\n    // CSS language prefix for fenced blocks\n    langPrefix: 'language-',\n\n    // autoconvert URL-like texts to links\n    linkify: false,\n\n    // Enable some language-neutral replacements + quotes beautification\n    typographer: false,\n\n    // Double + single quotes replacement pairs, when typographer enabled,\n    // and smartquotes on. Could be either a String or an Array.\n    //\n    // For example, you can use '«»„“' for Russian, '„“‚‘' for German,\n    // and ['«\\xA0', '\\xA0»', '‹\\xA0', '\\xA0›'] for French (including nbsp).\n    quotes: '\\u201c\\u201d\\u2018\\u2019', /* “”‘’ */\n\n    // Highlighter function. Should return escaped HTML,\n    // or '' if the source string is not changed and should be escaped externaly.\n    // If result starts with <pre... internal wrapper is skipped.\n    //\n    // function (/*str, lang*/) { return ''; }\n    //\n    highlight: null,\n\n    // Internal protection, recursion limit\n    maxNesting: 20\n  },\n\n  components: {\n\n    core: {\n      rules: [\n        'normalize',\n        'block',\n        'inline',\n        'text_join'\n      ]\n    },\n\n    block: {\n      rules: [\n        'blockquote',\n        'code',\n        'fence',\n        'heading',\n        'hr',\n        'html_block',\n        'lheading',\n        'list',\n        'reference',\n        'paragraph'\n      ]\n    },\n\n    inline: {\n      rules: [\n        'autolink',\n        'backticks',\n        'emphasis',\n        'entity',\n        'escape',\n        'html_inline',\n        'image',\n        'link',\n        'newline',\n        'text'\n      ],\n      rules2: [\n        'balance_pairs',\n        'emphasis',\n        'fragments_join'\n      ]\n    }\n  }\n}\n","var e=!1,n={false:\"push\",true:\"unshift\",after:\"push\",before:\"unshift\"},t={isPermalinkSymbol:!0};function r(r,a,i,l){var o;if(!e){var c=\"Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks\";\"object\"==typeof process&&process&&process.emitWarning?process.emitWarning(c):console.warn(c),e=!0}var s=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:[].concat(a.permalinkClass?[[\"class\",a.permalinkClass]]:[],[[\"href\",a.permalinkHref(r,i)]],Object.entries(a.permalinkAttrs(r,i)))}),Object.assign(new i.Token(\"html_block\",\"\",0),{content:a.permalinkSymbol,meta:t}),new i.Token(\"link_close\",\"a\",-1)];a.permalinkSpace&&i.tokens[l+1].children[n[a.permalinkBefore]](Object.assign(new i.Token(\"text\",\"\",0),{content:\" \"})),(o=i.tokens[l+1].children)[n[a.permalinkBefore]].apply(o,s)}function a(e){return\"#\"+e}function i(e){return{}}var l={class:\"header-anchor\",symbol:\"#\",renderHref:a,renderAttrs:i};function o(e){function n(t){return t=Object.assign({},n.defaults,t),function(n,r,a,i){return e(n,t,r,a,i)}}return n.defaults=Object.assign({},l),n.renderPermalinkImpl=e,n}function c(e){var n=[],t=e.filter(function(e){if(\"class\"!==e[0])return!0;n.push(e[1])});return n.length>0&&t.unshift([\"class\",n.join(\" \")]),t}var s=o(function(e,r,a,i,l){var o,s=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:c([].concat(r.class?[[\"class\",r.class]]:[],[[\"href\",r.renderHref(e,i)]],r.ariaHidden?[[\"aria-hidden\",\"true\"]]:[],Object.entries(r.renderAttrs(e,i))))}),Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}),new i.Token(\"link_close\",\"a\",-1)];if(r.space){var u=\"string\"==typeof r.space?r.space:\" \";i.tokens[l+1].children[n[r.placement]](Object.assign(new i.Token(\"string\"==typeof r.space?\"html_inline\":\"text\",\"\",0),{content:u}))}(o=i.tokens[l+1].children)[n[r.placement]].apply(o,s)});Object.assign(s.defaults,{space:!0,placement:\"after\",ariaHidden:!1});var u=o(s.renderPermalinkImpl);u.defaults=Object.assign({},s.defaults,{ariaHidden:!0});var d=o(function(e,n,t,r,a){var i=[Object.assign(new r.Token(\"link_open\",\"a\",1),{attrs:c([].concat(n.class?[[\"class\",n.class]]:[],[[\"href\",n.renderHref(e,r)]],Object.entries(n.renderAttrs(e,r))))})].concat(n.safariReaderFix?[new r.Token(\"span_open\",\"span\",1)]:[],r.tokens[a+1].children,n.safariReaderFix?[new r.Token(\"span_close\",\"span\",-1)]:[],[new r.Token(\"link_close\",\"a\",-1)]);r.tokens[a+1]=Object.assign(new r.Token(\"inline\",\"\",0),{children:i})});Object.assign(d.defaults,{safariReaderFix:!1});var f=o(function(e,r,a,i,l){var o;if(![\"visually-hidden\",\"aria-label\",\"aria-describedby\",\"aria-labelledby\"].includes(r.style))throw new Error(\"`permalink.linkAfterHeader` called with unknown style option `\"+r.style+\"`\");if(![\"aria-describedby\",\"aria-labelledby\"].includes(r.style)&&!r.assistiveText)throw new Error(\"`permalink.linkAfterHeader` called without the `assistiveText` option in `\"+r.style+\"` style\");if(\"visually-hidden\"===r.style&&!r.visuallyHiddenClass)throw new Error(\"`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style\");var s=i.tokens[l+1].children.filter(function(e){return\"text\"===e.type||\"code_inline\"===e.type}).reduce(function(e,n){return e+n.content},\"\"),u=[],d=[];if(r.class&&d.push([\"class\",r.class]),d.push([\"href\",r.renderHref(e,i)]),d.push.apply(d,Object.entries(r.renderAttrs(e,i))),\"visually-hidden\"===r.style){if(u.push(Object.assign(new i.Token(\"span_open\",\"span\",1),{attrs:[[\"class\",r.visuallyHiddenClass]]}),Object.assign(new i.Token(\"text\",\"\",0),{content:r.assistiveText(s)}),new i.Token(\"span_close\",\"span\",-1)),r.space){var f=\"string\"==typeof r.space?r.space:\" \";u[n[r.placement]](Object.assign(new i.Token(\"string\"==typeof r.space?\"html_inline\":\"text\",\"\",0),{content:f}))}u[n[r.placement]](Object.assign(new i.Token(\"span_open\",\"span\",1),{attrs:[[\"aria-hidden\",\"true\"]]}),Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}),new i.Token(\"span_close\",\"span\",-1))}else u.push(Object.assign(new i.Token(\"html_inline\",\"\",0),{content:r.symbol,meta:t}));\"aria-label\"===r.style?d.push([\"aria-label\",r.assistiveText(s)]):[\"aria-describedby\",\"aria-labelledby\"].includes(r.style)&&d.push([r.style,e]);var p=[Object.assign(new i.Token(\"link_open\",\"a\",1),{attrs:c(d)})].concat(u,[new i.Token(\"link_close\",\"a\",-1)]);(o=i.tokens).splice.apply(o,[l+3,0].concat(p)),r.wrapper&&(i.tokens.splice(l,0,Object.assign(new i.Token(\"html_block\",\"\",0),{content:r.wrapper[0]+\"\\n\"})),i.tokens.splice(l+3+p.length+1,0,Object.assign(new i.Token(\"html_block\",\"\",0),{content:r.wrapper[1]+\"\\n\"})))});function p(e,n,t,r){var a=e,i=r;if(t&&Object.prototype.hasOwnProperty.call(n,a))throw new Error(\"User defined `id` attribute `\"+e+\"` is not unique. Please fix it in your Markdown to continue.\");for(;Object.prototype.hasOwnProperty.call(n,a);)a=e+\"-\"+i,i+=1;return n[a]=!0,a}function b(e,n){n=Object.assign({},b.defaults,n),e.core.ruler.push(\"anchor\",function(e){for(var t,a={},i=e.tokens,l=Array.isArray(n.level)?(t=n.level,function(e){return t.includes(e)}):function(e){return function(n){return n>=e}}(n.level),o=0;o<i.length;o++){var c=i[o];if(\"heading_open\"===c.type&&l(Number(c.tag.substr(1)))){var s=n.getTokensText(i[o+1].children),u=c.attrGet(\"id\");u=null==u?p(u=n.slugifyWithState?n.slugifyWithState(s,e):n.slugify(s),a,!1,n.uniqueSlugStartIndex):p(u,a,!0,n.uniqueSlugStartIndex),c.attrSet(\"id\",u),!1!==n.tabIndex&&c.attrSet(\"tabindex\",\"\"+n.tabIndex),\"function\"==typeof n.permalink?n.permalink(u,n,e,o):(n.permalink||n.renderPermalink&&n.renderPermalink!==r)&&n.renderPermalink(u,n,e,o),o=i.indexOf(c),n.callback&&n.callback(c,{slug:u,title:s})}}})}Object.assign(f.defaults,{style:\"visually-hidden\",space:!0,placement:\"after\",wrapper:null}),b.permalink={__proto__:null,legacy:r,renderHref:a,renderAttrs:i,makePermalink:o,linkInsideHeader:s,ariaHidden:u,headerLink:d,linkAfterHeader:f},b.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\\s+/g,\"-\"))},uniqueSlugStartIndex:1,tabIndex:\"-1\",getTokensText:function(e){return e.filter(function(e){return[\"text\",\"code_inline\"].includes(e.type)}).map(function(e){return e.content}).join(\"\")},permalink:!1,renderPermalink:r,permalinkClass:u.defaults.class,permalinkSpace:u.defaults.space,permalinkSymbol:\"¶\",permalinkBefore:\"before\"===u.defaults.placement,permalinkHref:u.defaults.renderHref,permalinkAttrs:u.defaults.renderAttrs},b.default=b;export{b as default};\n//# sourceMappingURL=markdownItAnchor.mjs.map\n","// Process footnotes\n//\n'use strict'\n\n/// /////////////////////////////////////////////////////////////////////////////\n// Renderer partials\n\nfunction render_footnote_anchor_name (tokens, idx, options, env/*, slf */) {\n  const n = Number(tokens[idx].meta.id + 1).toString()\n  let prefix = ''\n\n  if (typeof env.docId === 'string') prefix = `-${env.docId}-`\n\n  return prefix + n\n}\n\nfunction render_footnote_caption (tokens, idx/*, options, env, slf */) {\n  let n = Number(tokens[idx].meta.id + 1).toString()\n\n  if (tokens[idx].meta.subId > 0) n += `:${tokens[idx].meta.subId}`\n\n  return `[${n}]`\n}\n\nfunction render_footnote_ref (tokens, idx, options, env, slf) {\n  const id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n  const caption = slf.rules.footnote_caption(tokens, idx, options, env, slf)\n  let refid = id\n\n  if (tokens[idx].meta.subId > 0) refid += `:${tokens[idx].meta.subId}`\n\n  return `<sup class=\"footnote-ref\"><a href=\"#fn${id}\" id=\"fnref${refid}\">${caption}</a></sup>`\n}\n\nfunction render_footnote_block_open (tokens, idx, options) {\n  return (options.xhtmlOut ? '<hr class=\"footnotes-sep\" />\\n' : '<hr class=\"footnotes-sep\">\\n') +\n         '<section class=\"footnotes\">\\n' +\n         '<ol class=\"footnotes-list\">\\n'\n}\n\nfunction render_footnote_block_close () {\n  return '</ol>\\n</section>\\n'\n}\n\nfunction render_footnote_open (tokens, idx, options, env, slf) {\n  let id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n\n  if (tokens[idx].meta.subId > 0) id += `:${tokens[idx].meta.subId}`\n\n  return `<li id=\"fn${id}\" class=\"footnote-item\">`\n}\n\nfunction render_footnote_close () {\n  return '</li>\\n'\n}\n\nfunction render_footnote_anchor (tokens, idx, options, env, slf) {\n  let id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf)\n\n  if (tokens[idx].meta.subId > 0) id += `:${tokens[idx].meta.subId}`\n\n  /* ↩ with escape code to prevent display as Apple Emoji on iOS */\n  return ` <a href=\"#fnref${id}\" class=\"footnote-backref\">\\u21a9\\uFE0E</a>`\n}\n\nexport default function footnote_plugin (md) {\n  const parseLinkLabel = md.helpers.parseLinkLabel\n  const isSpace = md.utils.isSpace\n\n  md.renderer.rules.footnote_ref          = render_footnote_ref\n  md.renderer.rules.footnote_block_open   = render_footnote_block_open\n  md.renderer.rules.footnote_block_close  = render_footnote_block_close\n  md.renderer.rules.footnote_open         = render_footnote_open\n  md.renderer.rules.footnote_close        = render_footnote_close\n  md.renderer.rules.footnote_anchor       = render_footnote_anchor\n\n  // helpers (only used in other rules, no tokens are attached to those)\n  md.renderer.rules.footnote_caption      = render_footnote_caption\n  md.renderer.rules.footnote_anchor_name  = render_footnote_anchor_name\n\n  // Process footnote block definition\n  function footnote_def (state, startLine, endLine, silent) {\n    const start = state.bMarks[startLine] + state.tShift[startLine]\n    const max = state.eMarks[startLine]\n\n    // line should be at least 5 chars - \"[^x]:\"\n    if (start + 4 > max) return false\n\n    if (state.src.charCodeAt(start) !== 0x5B/* [ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) return false\n\n    let pos\n\n    for (pos = start + 2; pos < max; pos++) {\n      if (state.src.charCodeAt(pos) === 0x20) return false\n      if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n        break\n      }\n    }\n\n    if (pos === start + 2) return false // no empty footnote labels\n    if (pos + 1 >= max || state.src.charCodeAt(++pos) !== 0x3A /* : */) return false\n    if (silent) return true\n    pos++\n\n    if (!state.env.footnotes) state.env.footnotes = {}\n    if (!state.env.footnotes.refs) state.env.footnotes.refs = {}\n    const label = state.src.slice(start + 2, pos - 2)\n    state.env.footnotes.refs[`:${label}`] = -1\n\n    const token_fref_o = new state.Token('footnote_reference_open', '', 1)\n    token_fref_o.meta  = { label }\n    token_fref_o.level = state.level++\n    state.tokens.push(token_fref_o)\n\n    const oldBMark = state.bMarks[startLine]\n    const oldTShift = state.tShift[startLine]\n    const oldSCount = state.sCount[startLine]\n    const oldParentType = state.parentType\n\n    const posAfterColon = pos\n    const initial = state.sCount[startLine] + pos - (state.bMarks[startLine] + state.tShift[startLine])\n    let offset = initial\n\n    while (pos < max) {\n      const ch = state.src.charCodeAt(pos)\n\n      if (isSpace(ch)) {\n        if (ch === 0x09) {\n          offset += 4 - offset % 4\n        } else {\n          offset++\n        }\n      } else {\n        break\n      }\n\n      pos++\n    }\n\n    state.tShift[startLine] = pos - posAfterColon\n    state.sCount[startLine] = offset - initial\n\n    state.bMarks[startLine] = posAfterColon\n    state.blkIndent += 4\n    state.parentType = 'footnote'\n\n    if (state.sCount[startLine] < state.blkIndent) {\n      state.sCount[startLine] += state.blkIndent\n    }\n\n    state.md.block.tokenize(state, startLine, endLine, true)\n\n    state.parentType = oldParentType\n    state.blkIndent -= 4\n    state.tShift[startLine] = oldTShift\n    state.sCount[startLine] = oldSCount\n    state.bMarks[startLine] = oldBMark\n\n    const token_fref_c = new state.Token('footnote_reference_close', '', -1)\n    token_fref_c.level = --state.level\n    state.tokens.push(token_fref_c)\n\n    return true\n  }\n\n  // Process inline footnotes (^[...])\n  function footnote_inline (state, silent) {\n    const max = state.posMax\n    const start = state.pos\n\n    if (start + 2 >= max) return false\n    if (state.src.charCodeAt(start) !== 0x5E/* ^ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) return false\n\n    const labelStart = start + 2\n    const labelEnd = parseLinkLabel(state, start + 1)\n\n    // parser failed to find ']', so it's not a valid note\n    if (labelEnd < 0) return false\n\n    // We found the end of the link, and know for a fact it's a valid link;\n    // so all that's left to do is to call tokenizer.\n    //\n    if (!silent) {\n      if (!state.env.footnotes) state.env.footnotes = {}\n      if (!state.env.footnotes.list) state.env.footnotes.list = []\n      const footnoteId = state.env.footnotes.list.length\n      const tokens = []\n\n      state.md.inline.parse(\n        state.src.slice(labelStart, labelEnd),\n        state.md,\n        state.env,\n        tokens\n      )\n\n      const token = state.push('footnote_ref', '', 0)\n      token.meta = { id: footnoteId }\n\n      state.env.footnotes.list[footnoteId] = {\n        content: state.src.slice(labelStart, labelEnd),\n        tokens\n      }\n    }\n\n    state.pos = labelEnd + 1\n    state.posMax = max\n    return true\n  }\n\n  // Process footnote references ([^...])\n  function footnote_ref (state, silent) {\n    const max = state.posMax\n    const start = state.pos\n\n    // should be at least 4 chars - \"[^x]\"\n    if (start + 3 > max) return false\n\n    if (!state.env.footnotes || !state.env.footnotes.refs) return false\n    if (state.src.charCodeAt(start) !== 0x5B/* [ */) return false\n    if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) return false\n\n    let pos\n\n    for (pos = start + 2; pos < max; pos++) {\n      if (state.src.charCodeAt(pos) === 0x20) return false\n      if (state.src.charCodeAt(pos) === 0x0A) return false\n      if (state.src.charCodeAt(pos) === 0x5D /* ] */) {\n        break\n      }\n    }\n\n    if (pos === start + 2) return false // no empty footnote labels\n    if (pos >= max) return false\n    pos++\n\n    const label = state.src.slice(start + 2, pos - 1)\n    if (typeof state.env.footnotes.refs[`:${label}`] === 'undefined') return false\n\n    if (!silent) {\n      if (!state.env.footnotes.list) state.env.footnotes.list = []\n\n      let footnoteId\n\n      if (state.env.footnotes.refs[`:${label}`] < 0) {\n        footnoteId = state.env.footnotes.list.length\n        state.env.footnotes.list[footnoteId] = { label, count: 0 }\n        state.env.footnotes.refs[`:${label}`] = footnoteId\n      } else {\n        footnoteId = state.env.footnotes.refs[`:${label}`]\n      }\n\n      const footnoteSubId = state.env.footnotes.list[footnoteId].count\n      state.env.footnotes.list[footnoteId].count++\n\n      const token = state.push('footnote_ref', '', 0)\n      token.meta = { id: footnoteId, subId: footnoteSubId, label }\n    }\n\n    state.pos = pos\n    state.posMax = max\n    return true\n  }\n\n  // Glue footnote tokens to end of token stream\n  function footnote_tail (state) {\n    let tokens\n    let current\n    let currentLabel\n    let insideRef = false\n    const refTokens = {}\n\n    if (!state.env.footnotes) { return }\n\n    state.tokens = state.tokens.filter(function (tok) {\n      if (tok.type === 'footnote_reference_open') {\n        insideRef = true\n        current = []\n        currentLabel = tok.meta.label\n        return false\n      }\n      if (tok.type === 'footnote_reference_close') {\n        insideRef = false\n        // prepend ':' to avoid conflict with Object.prototype members\n        refTokens[':' + currentLabel] = current\n        return false\n      }\n      if (insideRef) { current.push(tok) }\n      return !insideRef\n    })\n\n    if (!state.env.footnotes.list) { return }\n    const list = state.env.footnotes.list\n\n    state.tokens.push(new state.Token('footnote_block_open', '', 1))\n\n    for (let i = 0, l = list.length; i < l; i++) {\n      const token_fo = new state.Token('footnote_open', '', 1)\n      token_fo.meta = { id: i, label: list[i].label }\n      state.tokens.push(token_fo)\n\n      if (list[i].tokens) {\n        tokens = []\n\n        const token_po = new state.Token('paragraph_open', 'p', 1)\n        token_po.block = true\n        tokens.push(token_po)\n\n        const token_i = new state.Token('inline', '', 0)\n        token_i.children = list[i].tokens\n        token_i.content = list[i].content\n        tokens.push(token_i)\n\n        const token_pc = new state.Token('paragraph_close', 'p', -1)\n        token_pc.block    = true\n        tokens.push(token_pc)\n      } else if (list[i].label) {\n        tokens = refTokens[`:${list[i].label}`]\n      }\n\n      if (tokens) state.tokens = state.tokens.concat(tokens)\n\n      let lastParagraph\n\n      if (state.tokens[state.tokens.length - 1].type === 'paragraph_close') {\n        lastParagraph = state.tokens.pop()\n      } else {\n        lastParagraph = null\n      }\n\n      const t = list[i].count > 0 ? list[i].count : 1\n      for (let j = 0; j < t; j++) {\n        const token_a = new state.Token('footnote_anchor', '', 0)\n        token_a.meta = { id: i, subId: j, label: list[i].label }\n        state.tokens.push(token_a)\n      }\n\n      if (lastParagraph) {\n        state.tokens.push(lastParagraph)\n      }\n\n      state.tokens.push(new state.Token('footnote_close', '', -1))\n    }\n\n    state.tokens.push(new state.Token('footnote_block_close', '', -1))\n  }\n\n  md.block.ruler.before('reference', 'footnote_def', footnote_def, { alt: ['paragraph', 'reference'] })\n  md.inline.ruler.after('image', 'footnote_inline', footnote_inline)\n  md.inline.ruler.after('footnote_inline', 'footnote_ref', footnote_ref)\n  md.core.ruler.after('inline', 'footnote_tail', footnote_tail)\n};\n","// Process front matter and pass to cb\n'use strict';\n\nmodule.exports = function front_matter_plugin(md, cb) {\n  var min_markers = 3,\n      marker_str  = '-',\n      marker_char = marker_str.charCodeAt(0),\n      marker_len  = marker_str.length;\n\n  function frontMatter(state, startLine, endLine, silent) {\n    var pos,\n        nextLine,\n        marker_count,\n        token,\n        old_parent,\n        old_line_max,\n        start_content,\n        auto_closed = false,\n        start = state.bMarks[startLine] + state.tShift[startLine],\n        max = state.eMarks[startLine];\n\n    // Check out the first character of the first line quickly,\n    // this should filter out non-front matter\n    if (startLine !== 0 || marker_char !== state.src.charCodeAt(0)) {\n      return false;\n    }\n\n    // Check out the rest of the marker string\n    // while pos <= 3\n    for (pos = start + 1; pos <= max; pos++) {\n      if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {\n        start_content = pos + 1;\n        break;\n      }\n    }\n\n    marker_count = Math.floor((pos - start) / marker_len);\n\n    if (marker_count < min_markers) {\n      return false;\n    }\n    pos -= (pos - start) % marker_len;\n\n    // Since start is found, we can report success here in validation mode\n    if (silent) {\n      return true;\n    }\n\n    // Search for the end of the block\n    nextLine = startLine;\n\n    for (;;) {\n      nextLine++;\n      if (nextLine >= endLine) {\n        // unclosed block should be autoclosed by end of document.\n        // also block seems to be autoclosed by end of parent\n        break;\n      }\n\n      if (state.src.slice(start, max) === '...') {\n        break;\n      }\n\n      start = state.bMarks[nextLine] + state.tShift[nextLine];\n      max = state.eMarks[nextLine];\n\n      if (start < max && state.sCount[nextLine] < state.blkIndent) {\n        // non-empty line with negative indent should stop the list:\n        // - ```\n        //  test\n        break;\n      }\n\n      if (marker_char !== state.src.charCodeAt(start)) {\n        continue;\n      }\n\n      if (state.sCount[nextLine] - state.blkIndent >= 4) {\n        // closing fence should be indented less than 4 spaces\n        continue;\n      }\n\n      for (pos = start + 1; pos <= max; pos++) {\n        if (marker_str[(pos - start) % marker_len] !== state.src[pos]) {\n          break;\n        }\n      }\n\n      // closing code fence must be at least as long as the opening one\n      if (Math.floor((pos - start) / marker_len) < marker_count) {\n        continue;\n      }\n\n      // make sure tail has spaces only\n      pos -= (pos - start) % marker_len;\n      pos = state.skipSpaces(pos);\n\n      if (pos < max) {\n        continue;\n      }\n\n      // found!\n      auto_closed = true;\n      break;\n    }\n\n    old_parent = state.parentType;\n    old_line_max = state.lineMax;\n    state.parentType = 'container';\n\n    // this will prevent lazy continuations from ever going past our end marker\n    state.lineMax = nextLine;\n\n    token        = state.push('front_matter', null, 0);\n    token.hidden = true;\n    token.markup = state.src.slice(startLine, pos);\n    token.block  = true;\n    token.map    = [ startLine, nextLine + (auto_closed ? 1 : 0) ];\n    token.meta   = state.src.slice(start_content, start - 1);\n\n    state.parentType = old_parent;\n    state.lineMax = old_line_max;\n    state.line = nextLine + (auto_closed ? 1 : 0);\n\n    cb(token.meta);\n\n    return true;\n  }\n\n  md.block.ruler.before(\n    'table',\n    'front_matter',\n    frontMatter,\n    {\n      alt: [\n        'paragraph',\n        'reference',\n        'blockquote',\n        'list' \n      ]\n    }\n  );\n};\n","'use strict';\n\n\nmodule.exports = function inject_linenumbers_plugin(md) {\n  //\n  // Inject line numbers for sync scroll. Notes:\n  //\n  // - We track only headings and paragraphs, at any level.\n  // - TODO Footnotes content causes jumps. Level limit filters it automatically.\n  function injectLineNumbers(tokens, idx, options, env, slf) {\n    var line;\n    // if (tokens[idx].map && tokens[idx].level === 0) {\n    if (tokens[idx].map) {\n      line = tokens[idx].map[0];\n      tokens[idx].attrJoin('class', 'source-line');\n      tokens[idx].attrSet('data-source-line', String(line));\n    }\n    return slf.renderToken(tokens, idx, options, env, slf);\n  }\n\n  md.renderer.rules.paragraph_open = injectLineNumbers;\n  md.renderer.rules.heading_open   = injectLineNumbers;\n  md.renderer.rules.list_item_open = injectLineNumbers;\n  md.renderer.rules.table_open     = injectLineNumbers;\n};\n","/**\n * Do callback when HTMLElement in removed\n *\n * @param {HTMLElement} element observing\n * @param {Function} callback\n */\nexport const onRemove = (element, callback) => {\n  const parent = element.parentNode\n  if (!parent) throw new Error('The node must already be attached')\n\n  const obs = new window.MutationObserver(mutations => {\n    for (const mutation of mutations) {\n      for (const el of mutation.removedNodes) {\n        if (el === element) {\n          obs.disconnect()\n          callback()\n        }\n      }\n    }\n  })\n  obs.observe(parent, { childList: true })\n}\n\n/**\n * Animate transition of DOMRect, with Web Animation API\n *\n * @param {HTMLElement} element                 Element which animation applies\n * @param {DOMRect}     rect                    DOMRect for transition\n * @param {Object}      options\n * @param {Boolean}     options.resume          If true, transition starts from rect to DOMRect of element\n * @param {Number}      options.duration        Duration of animation in milliseconds\n * @returns {Animation} https://developer.mozilla.org/en-US/docs/Web/API/Animation\n */\nexport const animateRectTransition = (element, rect, options = {}) => {\n  if (!element.parentElement) { throw new Error('The node must already be attached') }\n\n  const { width: w1, height: h1, left: x1, top: y1 } = rect\n  const {\n    width: w2,\n    height: h2,\n    left: x2,\n    top: y2,\n  } = element.getBoundingClientRect()\n\n  const rw = (w1 ?? w2) / w2\n  const rh = (h1 ?? h2) / h2\n  const dx = x1 - x2\n  const dy = y1 - y2\n\n  if ((dx === 0 && dy === 0) || !isFinite(rw) || !isFinite(rh)) {\n    return element.animate([], { duration: 0 })\n  }\n\n  const transform1 = 'translate(0, 0) scale(1, 1)'\n  const transform2 = `translate(${dx}px, ${dy}px) scale(${rw}, ${rh})`\n  const keyframes = [\n    { transform: transform1, opacity: 1 },\n    { transform: transform2, opacity: 0.3 },\n  ]\n  if (options.resume === true) keyframes.reverse()\n\n  return element.animate(keyframes, {\n    duration: options.duration ?? 500,\n    easing: 'ease-in-out',\n  })\n}\n\n/**\n * Throttle for function call\n *\n * @param {Function} func\n * @param {Number} delay milliseconds\n * @returns {Any} return value of function call, or null if throttled\n */\nexport function throttle (func, delay) {\n  let timerFlag = null\n\n  return function (...args) {\n    const context = this\n    if (timerFlag !== null) return null\n\n    timerFlag = setTimeout(\n      () => (timerFlag = null),\n      typeof delay === 'function' ? delay.call(context) : delay,\n    )\n\n    return func.call(context, ...args)\n  }\n}\n\n/**\n * shiftByWindow. make sure HTMLElement inside viewport\n *\n * @param {HTMLElement} element\n */\nexport const shiftByWindow = element => {\n  const rect = element.getBoundingClientRect()\n  const offsetX = window.innerWidth - rect.left - rect.width\n  const offsetY = window.innerHeight - rect.top - rect.height\n  element.style.transform = `translate(${offsetX < 0 ? offsetX : 0}px, ${offsetY < 0 ? offsetY : 0}px)`\n}\n\n/**\n * insideWindow. check DOMRect is inside window\n *\n * @param {HTMLElement} element\n */\nexport const insideWindow = element => {\n  const rect = element.getBoundingClientRect()\n  return (\n    rect.left > 0 &&\n    rect.right < window.innerWidth + rect.width &&\n    rect.top > 0 &&\n    rect.bottom < window.innerHeight + rect.height\n  )\n}\n\n/**\n * insideParent. check children element is inside DOMRect of parent element\n *\n * @param {HTMLElement} childElement\n * @param {HTMLElement} parentElement\n */\nexport const insideParent = (childElement, parentElement) => {\n  const childRect = childElement.getBoundingClientRect()\n  const parentRect = parentElement.getBoundingClientRect()\n  const offset = 10\n\n  return (\n    childRect.left < parentRect.right - offset &&\n    childRect.right > parentRect.left + offset &&\n    childRect.top < parentRect.bottom - offset &&\n    childRect.bottom > parentRect.top + offset\n  )\n}\n","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * AnimEvent\n * https://github.com/anseki/anim-event\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nvar MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nKEEP_LOOP = 500,\n\n/**\n * @typedef {Object} task\n * @property {Event} event\n * @property {function} listener\n */\n\n/** @type {task[]} */\ntasks = [];\n\nvar requestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\nvar lastFrameTime = Date.now(),\n    requestID;\n\nfunction step() {\n  var called, next;\n\n  if (requestID) {\n    cancelAnim.call(window, requestID);\n    requestID = null;\n  }\n\n  tasks.forEach(function (task) {\n    var event;\n\n    if (event = task.event) {\n      task.event = null; // Clear it before `task.listener()` because that might fire another event.\n\n      task.listener(event);\n      called = true;\n    }\n  });\n\n  if (called) {\n    lastFrameTime = Date.now();\n    next = true;\n  } else if (Date.now() - lastFrameTime < KEEP_LOOP) {\n    // Go on for a while\n    next = true;\n  }\n\n  if (next) {\n    requestID = requestAnim.call(window, step);\n  }\n}\n\nfunction indexOfTasks(listener) {\n  var index = -1;\n  tasks.some(function (task, i) {\n    if (task.listener === listener) {\n      index = i;\n      return true;\n    }\n\n    return false;\n  });\n  return index;\n}\n\nvar AnimEvent = {\n  /**\n   * @param {function} listener - An event listener.\n   * @returns {(function|null)} A wrapped event listener.\n   */\n  add: function add(listener) {\n    var task;\n\n    if (indexOfTasks(listener) === -1) {\n      tasks.push(task = {\n        listener: listener\n      });\n      return function (event) {\n        task.event = event;\n\n        if (!requestID) {\n          step();\n        }\n      };\n    }\n\n    return null;\n  },\n  remove: function remove(listener) {\n    var iRemove;\n\n    if ((iRemove = indexOfTasks(listener)) > -1) {\n      tasks.splice(iRemove, 1);\n\n      if (!tasks.length && requestID) {\n        cancelAnim.call(window, requestID);\n        requestID = null;\n      }\n    }\n  }\n};\nexport default AnimEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PointerEvent\n * https://github.com/anseki/pointer-event\n *\n * Copyright (c) 2022 anseki\n * Licensed under the MIT license.\n */\nimport AnimEvent from 'anim-event';\nvar MOUSE_EMU_INTERVAL = 400,\n    // Avoid mouse events emulation\nCLICK_EMULATOR_ELEMENTS = [],\n    DBLCLICK_EMULATOR_ELEMENTS = []; // Support options for addEventListener\n\nvar passiveSupported = false;\n\ntry {\n  window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n    get: function get() {\n      passiveSupported = true;\n    }\n  }));\n} catch (error) {\n  /* ignore */\n}\n/**\n * addEventListener with specific option.\n * @param {Element} target - An event-target element.\n * @param {string} type - The event type to listen for.\n * @param {function} listener - The EventListener.\n * @param {Object} options - An options object.\n * @returns {void}\n */\n\n\nfunction addEventListenerWithOptions(target, type, listener, options) {\n  // When `passive` is not supported, consider that the `useCapture` is supported instead of\n  // `options` (i.e. options other than the `passive` also are not supported).\n  target.addEventListener(type, listener, passiveSupported ? options : options.capture);\n}\n\nfunction getPointsLength(p0, p1) {\n  var lx = p0.x - p1.x,\n      ly = p0.y - p1.y;\n  return Math.sqrt(lx * lx + ly * ly);\n}\n/**\n * Get Touch instance in list.\n * @param {Touch[]} touches - An Array or TouchList instance.\n * @param {number} id - Touch#identifier\n * @returns {(Touch|null)} - A found Touch instance.\n */\n\n\nfunction getTouchById(touches, id) {\n  if (touches != null && id != null) {\n    for (var i = 0; i < touches.length; i++) {\n      if (touches[i].identifier === id) {\n        return touches[i];\n      }\n    }\n  }\n\n  return null;\n}\n/**\n * @param {Object} xy - Something that might have clientX and clientY.\n * @returns {boolean} - `true` if it has valid clientX and clientY.\n */\n\n\nfunction hasXY(xy) {\n  return xy && typeof xy.clientX === 'number' && typeof xy.clientY === 'number';\n} // Gecko, Trident pick drag-event of some elements such as img, a, etc.\n\n\nfunction dragstart(event) {\n  event.preventDefault();\n}\n\nvar PointerEvent = /*#__PURE__*/function () {\n  /**\n   * Create a `PointerEvent` instance.\n   * @param {Object} [options] - Options\n   */\n  function PointerEvent(options) {\n    var _this = this;\n\n    _classCallCheck(this, PointerEvent);\n\n    this.startHandlers = {};\n    this.lastHandlerId = 0;\n    this.curPointerClass = null;\n    this.curTouchId = null;\n    this.lastPointerXY = {\n      clientX: 0,\n      clientY: 0\n    };\n    this.lastTouchTime = 0; // Options\n\n    this.options = {\n      // Default\n      preventDefault: true,\n      stopPropagation: true\n    };\n\n    if (options) {\n      ['preventDefault', 'stopPropagation'].forEach(function (option) {\n        if (typeof options[option] === 'boolean') {\n          _this.options[option] = options[option];\n        }\n      });\n    }\n  }\n  /**\n   * @param {function} startHandler - This is called with pointerXY when it starts. This returns boolean.\n   * @returns {number} handlerId which is used for adding/removing to element.\n   */\n\n\n  _createClass(PointerEvent, [{\n    key: \"regStartHandler\",\n    value: function regStartHandler(startHandler) {\n      var that = this;\n\n      that.startHandlers[++that.lastHandlerId] = function (event) {\n        var pointerClass = event.type === 'mousedown' ? 'mouse' : 'touch',\n            now = Date.now();\n        var pointerXY, touchId;\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = now; // Avoid mouse events emulation\n\n          pointerXY = event.changedTouches[0];\n          touchId = event.changedTouches[0].identifier;\n        } else {\n          // Avoid mouse events emulation\n          if (now - that.lastTouchTime < MOUSE_EMU_INTERVAL) {\n            return;\n          }\n\n          pointerXY = event;\n        }\n\n        if (!hasXY(pointerXY)) {\n          throw new Error('No clientX/clientY');\n        } // It is new one even if those are 'mouse' or ID is same, then cancel current one.\n\n\n        if (that.curPointerClass) {\n          that.cancel();\n        }\n\n        if (startHandler.call(that, pointerXY)) {\n          that.curPointerClass = pointerClass;\n          that.curTouchId = pointerClass === 'touch' ? touchId : null;\n          that.lastPointerXY.clientX = pointerXY.clientX;\n          that.lastPointerXY.clientY = pointerXY.clientY;\n\n          if (that.options.preventDefault) {\n            event.preventDefault();\n          }\n\n          if (that.options.stopPropagation) {\n            event.stopPropagation();\n          }\n        }\n      };\n\n      return that.lastHandlerId;\n    }\n    /**\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"unregStartHandler\",\n    value: function unregStartHandler(handlerId) {\n      delete this.startHandlers[handlerId];\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"addStartHandler\",\n    value: function addStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      addEventListenerWithOptions(element, 'mousedown', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchstart', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'dragstart', dragstart, {\n        capture: false,\n        passive: false\n      });\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"removeStartHandler\",\n    value: function removeStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      element.removeEventListener('mousedown', this.startHandlers[handlerId], false);\n      element.removeEventListener('touchstart', this.startHandlers[handlerId], false);\n      element.removeEventListener('dragstart', dragstart, false);\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} moveHandler - This is called with pointerXY when it moves.\n     * @param {?boolean} rawEvent - Capture events without `requestAnimationFrame`.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addMoveHandler\",\n    value: function addMoveHandler(element, moveHandler, rawEvent) {\n      var that = this;\n\n      function handler(event) {\n        var pointerClass = event.type === 'mousemove' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) : event;\n\n          if (hasXY(pointerXY)) {\n            if (pointerXY.clientX !== that.lastPointerXY.clientX || pointerXY.clientY !== that.lastPointerXY.clientY) {\n              that.move(pointerXY);\n            }\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      var wrappedHandler = rawEvent ? handler : AnimEvent.add(handler);\n      addEventListenerWithOptions(element, 'mousemove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchmove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curMoveHandler = moveHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"move\",\n    value: function move(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curMoveHandler) {\n        this.curMoveHandler(this.lastPointerXY);\n      }\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} endHandler - This is called with pointerXY when it ends.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addEndHandler\",\n    value: function addEndHandler(element, endHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        var pointerClass = event.type === 'mouseup' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}) : // `{}` means matching\n          event;\n\n          if (pointerXY) {\n            that.end(pointerXY);\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'mouseup', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curEndHandler = endHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"end\",\n    value: function end(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curEndHandler) {\n        this.curEndHandler(this.lastPointerXY);\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} cancelHandler - This is called when it cancels.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addCancelHandler\",\n    value: function addCancelHandler(element, cancelHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        /*\n          Now, this is fired by touchcancel only, but it might be fired even if curPointerClass is mouse.\n        */\n        // const pointerClass = 'touch';\n        that.lastTouchTime = Date.now(); // Avoid mouse events emulation\n\n        if (that.curPointerClass != null) {\n          var pointerXY = getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}); // `{}` means matching\n\n          if (pointerXY) {\n            that.cancel();\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'touchcancel', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curCancelHandler = cancelHandler;\n    }\n    /**\n     * @returns {void}\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      if (this.curCancelHandler) {\n        this.curCancelHandler();\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n  }], [{\n    key: \"addEventListenerWithOptions\",\n    get: function get() {\n      return addEventListenerWithOptions;\n    }\n    /**\n     * Emulate `click` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initClickEmulator\",\n    value: function initClickEmulator(element, moveTolerance, timeTolerance) {\n      if (CLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      CLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, touchId, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      addEventListenerWithOptions(element, 'touchstart', function (event) {\n        var touch = event.changedTouches[0];\n        startX = touch.clientX;\n        startY = touch.clientY;\n        touchId = touch.identifier;\n        startMs = performance.now();\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', function (event) {\n        var touch = getTouchById(event.changedTouches, touchId);\n\n        if (typeof startX === 'number' && typeof startY === 'number' && typeof startMs === 'number' && touch && typeof touch.clientX === 'number' && typeof touch.clientY === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: touch.clientX,\n          y: touch.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance) {\n          // FIRE\n          setTimeout(function () {\n            var newEvent = new MouseEvent('click', {\n              clientX: touch.clientX,\n              clientY: touch.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n        }\n\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchcancel', function () {\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n    /**\n     * Emulate `dblclick` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initDblClickEmulator\",\n    value: function initDblClickEmulator(element, moveTolerance, timeTolerance) {\n      if (DBLCLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      DBLCLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      PointerEvent.initClickEmulator(element, moveTolerance, timeTolerance);\n      addEventListenerWithOptions(element, 'click', function (event) {\n        if (!event.emulated || // Ignore events that are not from `touchend`.\n        typeof event.clientX !== 'number' || typeof event.clientY !== 'number') {\n          return;\n        }\n\n        if (typeof startX === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: event.clientX,\n          y: event.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance * 2) {\n          // up (tolerance) down (tolerance) up\n          setTimeout(function () {\n            // FIRE\n            var newEvent = new MouseEvent('dblclick', {\n              clientX: event.clientX,\n              clientY: event.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n          startX = startY = startMs = null;\n        } else {\n          // 1st\n          startX = event.clientX;\n          startY = event.clientY;\n          startMs = performance.now();\n        }\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n  }]);\n\n  return PointerEvent;\n}();\n\nexport default PointerEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * CSSPrefix\n * https://github.com/anseki/cssprefix\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction ucf(text) {\n  return text.substr(0, 1).toUpperCase() + text.substr(1);\n}\n\nvar PREFIXES = ['webkit', 'moz', 'ms', 'o'],\n    NAME_PREFIXES = PREFIXES.reduce(function (prefixes, prefix) {\n  prefixes.push(prefix);\n  prefixes.push(ucf(prefix));\n  return prefixes;\n}, []),\n    VALUE_PREFIXES = PREFIXES.map(function (prefix) {\n  return \"-\".concat(prefix, \"-\");\n}),\n\n/**\n * Get sample CSSStyleDeclaration.\n * @returns {CSSStyleDeclaration}\n */\ngetDeclaration = function () {\n  var declaration;\n  return function () {\n    return declaration = declaration || document.createElement('div').style;\n  };\n}(),\n\n/**\n * Normalize name.\n * @param {} propName - A name that is normalized.\n * @returns {string} A normalized name.\n */\nnormalizeName = function () {\n  var rePrefixedName = new RegExp('^(?:' + PREFIXES.join('|') + ')(.)', 'i'),\n      reUc = /[A-Z]/;\n  return function (propName) {\n    return (propName = (propName + '').replace(/\\s/g, '').replace(/-([\\da-z])/gi, function (str, p1) {\n      return p1.toUpperCase();\n    }) // camelCase\n    // 'ms' and 'Ms' are found by rePrefixedName 'i' option\n    .replace(rePrefixedName, function (str, p1) {\n      return reUc.test(p1) ? p1.toLowerCase() : str;\n    }) // Remove prefix\n    ).toLowerCase() === 'float' ? 'cssFloat' : propName;\n  }; // For old CSSOM\n}(),\n\n/**\n * Normalize value.\n * @param {} propValue - A value that is normalized.\n * @returns {string} A normalized value.\n */\nnormalizeValue = function () {\n  var rePrefixedValue = new RegExp('^(?:' + VALUE_PREFIXES.join('|') + ')', 'i');\n  return function (propValue) {\n    return (propValue != null ? propValue + '' : '').replace(/\\s/g, '').replace(rePrefixedValue, '');\n  };\n}(),\n\n/**\n * Polyfill for `CSS.supports`.\n * @param {string} propName - A name.\n * @param {string} propValue - A value.\n *     Since `CSSStyleDeclaration.setProperty` might return unexpected result,\n *     the `propValue` should be checked before the `cssSupports` is called.\n * @returns {boolean} `true` if given pair is accepted.\n */\ncssSupports = function () {\n  return (// return window.CSS && window.CSS.supports || ((propName, propValue) => {\n    // `CSS.supports` doesn't find prefixed property.\n    function (propName, propValue) {\n      var declaration = getDeclaration(); // In some browsers, `declaration[prop] = value` updates any property.\n\n      propName = propName.replace(/[A-Z]/g, function (str) {\n        return \"-\".concat(str.toLowerCase());\n      }); // kebab-case\n\n      declaration.setProperty(propName, propValue);\n      return declaration[propName] != null && // Because getPropertyValue returns '' if it is unsupported\n      declaration.getPropertyValue(propName) === propValue;\n    }\n  );\n}(),\n    // Cache\npropNames = {},\n    propValues = {};\n\nfunction getName(propName) {\n  propName = normalizeName(propName);\n\n  if (propName && propNames[propName] == null) {\n    var declaration = getDeclaration();\n\n    if (declaration[propName] != null) {\n      // Original\n      propNames[propName] = propName;\n    } else {\n      // Try with prefixes\n      var ucfName = ucf(propName);\n\n      if (!NAME_PREFIXES.some(function (prefix) {\n        var prefixed = prefix + ucfName;\n\n        if (declaration[prefixed] != null) {\n          propNames[propName] = prefixed;\n          return true;\n        }\n\n        return false;\n      })) {\n        propNames[propName] = false;\n      }\n    }\n  }\n\n  return propNames[propName] || void 0;\n}\n\nfunction getValue(propName, propValue) {\n  var res;\n\n  if (!(propName = getName(propName))) {\n    return res;\n  } // Invalid property\n\n\n  propValues[propName] = propValues[propName] || {};\n  (Array.isArray(propValue) ? propValue : [propValue]).some(function (propValue) {\n    propValue = normalizeValue(propValue);\n\n    if (propValues[propName][propValue] != null) {\n      // Cache\n      if (propValues[propName][propValue] !== false) {\n        res = propValues[propName][propValue];\n        return true;\n      }\n\n      return false; // Continue to next value\n    }\n\n    if (cssSupports(propName, propValue)) {\n      // Original\n      res = propValues[propName][propValue] = propValue;\n      return true;\n    }\n\n    if (VALUE_PREFIXES.some(function (prefix) {\n      // Try with prefixes\n      var prefixed = prefix + propValue;\n\n      if (cssSupports(propName, prefixed)) {\n        res = propValues[propName][propValue] = prefixed;\n        return true;\n      }\n\n      return false;\n    })) {\n      return true;\n    }\n\n    propValues[propName][propValue] = false;\n    return false; // Continue to next value\n  });\n  return typeof res === 'string' ? res : void 0; // It might be empty string.\n}\n\nvar CSSPrefix = {\n  getName: getName,\n  getValue: getValue\n};\nexport default CSSPrefix;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * mClassList\n * https://github.com/anseki/m-class-list\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction normalize(token) {\n  return (token + '').trim();\n} // Not `||`\n\n\nfunction applyList(list, element) {\n  element.setAttribute('class', list.join(' '));\n}\n\nfunction _add(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    if (!(token = normalize(token)) || list.indexOf(token) !== -1) {\n      return false;\n    }\n\n    list.push(token);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _remove(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    var i;\n\n    if (!(token = normalize(token)) || (i = list.indexOf(token)) === -1) {\n      return false;\n    }\n\n    list.splice(i, 1);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _toggle(list, element, token, force) {\n  var i = list.indexOf(token = normalize(token));\n\n  if (i !== -1) {\n    if (force) {\n      return true;\n    }\n\n    list.splice(i, 1);\n    applyList(list, element);\n    return false;\n  }\n\n  if (force === false) {\n    return false;\n  }\n\n  list.push(token);\n  applyList(list, element);\n  return true;\n}\n\nfunction _replace(list, element, token, newToken) {\n  var i;\n\n  if (!(token = normalize(token)) || !(newToken = normalize(newToken)) || token === newToken || (i = list.indexOf(token)) === -1) {\n    return;\n  }\n\n  list.splice(i, 1);\n\n  if (list.indexOf(newToken) === -1) {\n    list.push(newToken);\n  }\n\n  applyList(list, element);\n}\n\nfunction mClassList(element) {\n  return !mClassList.ignoreNative && element.classList || function () {\n    var list = (element.getAttribute('class') || '').trim().split(/\\s+/).filter(function (token) {\n      return !!token;\n    }),\n        ins = {\n      length: list.length,\n      item: function item(i) {\n        return list[i];\n      },\n      contains: function contains(token) {\n        return list.indexOf(normalize(token)) !== -1;\n      },\n      add: function add() {\n        _add(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      remove: function remove() {\n        _remove(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      toggle: function toggle(token, force) {\n        return _toggle(list, element, token, force);\n      },\n      replace: function replace(token, newToken) {\n        _replace(list, element, token, newToken);\n\n        return mClassList.methodChain ? ins : void 0;\n      }\n    };\n    return ins;\n  }();\n}\n\nmClassList.methodChain = true;\nexport default mClassList;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\n * PlainDraggable\n * https://anseki.github.io/plain-draggable/\n *\n * Copyright (c) 2024 anseki\n * Licensed under the MIT license.\n */\nimport PointerEvent from 'pointer-event';\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nmClassList.ignoreNative = true;\n\nvar ZINDEX = 9000,\n    // [SNAP]\nSNAP_GRAVITY = 20,\n    SNAP_CORNER = 'tl',\n    SNAP_SIDE = 'both',\n    SNAP_EDGE = 'both',\n    SNAP_BASE = 'containment',\n    SNAP_ALL_CORNERS = ['tl', 'tr', 'bl', 'br'],\n    SNAP_ALL_SIDES = ['start', 'end'],\n    SNAP_ALL_EDGES = ['inside', 'outside'],\n    // [/SNAP]\n// [AUTO-SCROLL]\nAUTOSCROLL_SPEED = [40, 200, 1000],\n    AUTOSCROLL_SENSITIVITY = [100, 40, 0],\n    // [/AUTO-SCROLL]\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    IS_WEBKIT = !IS_EDGE && !IS_TRIDENT && !IS_GECKO && !IS_BLINK && // Some engines support `webkit-*` properties.\n!window.chrome && 'WebkitAppearance' in document.documentElement.style,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n    pointerOffset = {},\n    pointerEvent = new PointerEvent();\n\nvar insId = 0,\n    activeProps,\n    hasMoved,\n    body,\n    // CSS property/value\ncssValueDraggableCursor,\n    cssValueDraggingCursor,\n    cssOrgValueBodyCursor,\n    cssPropTransitionProperty,\n    cssPropTransform,\n    cssPropUserSelect,\n    cssOrgValueBodyUserSelect,\n    // Try to set `cursor` property.\ncssWantedValueDraggableCursor = IS_WEBKIT ? ['all-scroll', 'move'] : ['grab', 'all-scroll', 'move'],\n    cssWantedValueDraggingCursor = IS_WEBKIT ? 'move' : ['grabbing', 'move'],\n    // class\ndraggableClass = 'plain-draggable',\n    draggingClass = 'plain-draggable-dragging',\n    movingClass = 'plain-draggable-moving'; // [AUTO-SCROLL]\n// Scroll Animation Controller\n\nvar scrollFrame = {},\n    MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nrequestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\n{\n  /**\n   * @typedef {Object} MoveArgs\n   * @property {number} dir - [-1 | 1] minus or plus to position value.\n   * @property {number} speed - px/ms\n   * @property {number} min - Minimum position value.\n   * @property {number} max - Maximum position value.\n   * @property {number} [lastFrameTime] - Time of last frame.\n   * @property {number} [lastValue] - Strict value of last frame.\n   */\n  var curXyMoveArgs = {},\n      curElement,\n      curScrollXY,\n      requestID;\n\n  function frameUpdate() {\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        var timeLen = now - moveArgs.lastFrameTime,\n            absValue = curScrollXY(curElement, xy),\n            curValue = moveArgs.lastValue != null && Math.abs(moveArgs.lastValue - absValue) < 10 // It was not moved manually\n        ? moveArgs.lastValue : absValue;\n\n        if (moveArgs.dir === -1 ? curValue > moveArgs.min : curValue < moveArgs.max) {\n          var newValue = curValue + moveArgs.speed * timeLen * moveArgs.dir;\n\n          if (newValue < moveArgs.min) {\n            newValue = moveArgs.min;\n          } else if (newValue > moveArgs.max) {\n            newValue = moveArgs.max;\n          }\n\n          curScrollXY(curElement, xy, newValue);\n          moveArgs.lastValue = newValue;\n        }\n\n        moveArgs.lastFrameTime = now;\n      }\n    });\n  }\n\n  function frame() {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    requestID = requestAnim.call(window, frame);\n  }\n  /**\n   * @param {Element} element - A target element.\n   * @param {{x: ?MoveArgs, y: ?MoveArgs}} xyMoveArgs - MoveArgs for x and y\n   * @param {function} scrollXY - (element: Element, xy: string, value: number) => number\n   * @returns {void}\n   */\n\n\n  scrollFrame.move = function (element, xyMoveArgs, scrollXY) {\n    cancelAnim.call(window, requestID);\n    frameUpdate(); // Update current data now because it might be not continuation.\n    // Re-use lastValue\n\n    if (curElement === element) {\n      if (xyMoveArgs.x && curXyMoveArgs.x) {\n        xyMoveArgs.x.lastValue = curXyMoveArgs.x.lastValue;\n      }\n\n      if (xyMoveArgs.y && curXyMoveArgs.y) {\n        xyMoveArgs.y.lastValue = curXyMoveArgs.y.lastValue;\n      }\n    }\n\n    curElement = element;\n    curXyMoveArgs = xyMoveArgs;\n    curScrollXY = scrollXY;\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        moveArgs.lastFrameTime = now;\n      }\n    });\n    requestID = requestAnim.call(window, frame);\n  };\n\n  scrollFrame.stop = function () {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    curXyMoveArgs = {};\n    curElement = null; // Remove reference\n  };\n}\n\nfunction scrollXYWindow(element, xy, value) {\n  if (value != null) {\n    if (xy === 'x') {\n      element.scrollTo(value, element.pageYOffset);\n    } else {\n      element.scrollTo(element.pageXOffset, value);\n    }\n  }\n\n  return xy === 'x' ? element.pageXOffset : element.pageYOffset;\n}\n\nfunction scrollXYElement(element, xy, value) {\n  var prop = xy === 'x' ? 'scrollLeft' : 'scrollTop';\n\n  if (value != null) {\n    element[prop] = value;\n  }\n\n  return element[prop];\n}\n/**\n * @typedef {Object} Scrollable\n * @property {number} clientWidth - width of scrollable area.\n * @property {number} clientHeight - height of scrollable area.\n * @property {number} scrollWidth - width of inner content.\n * @property {number} scrollHeight - height of inner content.\n * @property {number} clientX - X of scrollable area, document coordinate.\n * @property {number} clientY - T of scrollable area, document coordinate.\n */\n\n/**\n * @param {Element} element - A target element.\n * @param {boolean} [isWindow] - `true` if element is window.\n * @param {boolean} [dontScroll] - `true` makes it skip scroll that gets scrollWidth/Height.\n * @returns {Scrollable} Information for scroll.\n */\n\n\nfunction getScrollable(element, isWindow, dontScroll) {\n  var scrollable = {};\n  var cmpStyleHtml, cmpStyleBody, cmpStyleElement; // clientWidth/Height\n\n  (function (target) {\n    scrollable.clientWidth = target.clientWidth;\n    scrollable.clientHeight = target.clientHeight;\n  })(isWindow ? document.documentElement : element); // scrollWidth/Height\n\n  /*\n    Gecko bug, bottom-padding of element is reduced.\n    Blink for Android bug, borders of <html> is rendered but those are not added to scrollW/H.\n    Then, move it to max scroll position (sufficiently larger values) forcibly, and get scroll position.\n  */\n\n\n  var maxScrollLeft = 0,\n      maxScrollTop = 0;\n\n  if (!dontScroll) {\n    var curScrollLeft, curScrollTop;\n\n    if (isWindow) {\n      curScrollLeft = scrollXYWindow(element, 'x');\n      curScrollTop = scrollXYWindow(element, 'y');\n      cmpStyleHtml = getComputedStyle(document.documentElement, '');\n      cmpStyleBody = getComputedStyle(document.body, '');\n      maxScrollLeft = scrollXYWindow(element, 'x', document.documentElement.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYWindow(element, 'y', document.documentElement.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      scrollXYWindow(element, 'x', curScrollLeft);\n      scrollXYWindow(element, 'y', curScrollTop);\n    } else {\n      curScrollLeft = scrollXYElement(element, 'x');\n      curScrollTop = scrollXYElement(element, 'y');\n      cmpStyleElement = getComputedStyle(element, '');\n      maxScrollLeft = scrollXYElement(element, 'x', element.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYElement(element, 'y', element.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      scrollXYElement(element, 'x', curScrollLeft);\n      scrollXYElement(element, 'y', curScrollTop);\n    }\n  }\n\n  scrollable.scrollWidth = scrollable.clientWidth + maxScrollLeft;\n  scrollable.scrollHeight = scrollable.clientHeight + maxScrollTop; // clientX/Y\n\n  var rect;\n\n  if (isWindow) {\n    scrollable.clientX = scrollable.clientY = 0;\n  } else {\n    // padding-box\n    rect = element.getBoundingClientRect();\n\n    if (!cmpStyleElement) {\n      cmpStyleElement = getComputedStyle(element, '');\n    }\n\n    scrollable.clientX = rect.left + (parseFloat(cmpStyleElement.borderLeftWidth) || 0);\n    scrollable.clientY = rect.top + (parseFloat(cmpStyleElement.borderTopWidth) || 0);\n  }\n\n  return scrollable;\n} // [/AUTO-SCROLL]\n\n\nfunction copyTree(obj) {\n  return !obj ? obj : isObject(obj) ? Object.keys(obj).reduce(function (copyObj, key) {\n    copyObj[key] = copyTree(obj[key]);\n    return copyObj;\n  }, {}) : Array.isArray(obj) ? obj.map(copyTree) : obj;\n}\n\nfunction hasChanged(a, b) {\n  var typeA, keysA;\n  return _typeof(a) !== _typeof(b) || (typeA = isObject(a) ? 'obj' : Array.isArray(a) ? 'array' : '') !== (isObject(b) ? 'obj' : Array.isArray(b) ? 'array' : '') || (typeA === 'obj' ? hasChanged(keysA = Object.keys(a).sort(), Object.keys(b).sort()) || keysA.some(function (prop) {\n    return hasChanged(a[prop], b[prop]);\n  }) : typeA === 'array' ? a.length !== b.length || a.some(function (aVal, i) {\n    return hasChanged(aVal, b[i]);\n  }) : a !== b);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} x - Substitutes for left\n * @property {(number|null)} y - Substitutes for top\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(BBox|null)} A normalized `BBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var value;\n\n  if (isFinite(value = bBox.left) || isFinite(value = bBox.x)) {\n    bBox.left = bBox.x = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(value = bBox.top) || isFinite(value = bBox.y)) {\n    bBox.top = bBox.y = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.width) && bBox.width >= 0) {\n    bBox.right = bBox.left + bBox.width;\n  } else if (isFinite(bBox.right) && bBox.right >= bBox.left) {\n    bBox.width = bBox.right - bBox.left;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.height) && bBox.height >= 0) {\n    bBox.bottom = bBox.top + bBox.height;\n  } else if (isFinite(bBox.bottom) && bBox.bottom >= bBox.top) {\n    bBox.height = bBox.bottom - bBox.top;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n/**\n * A value that is Pixels or Ratio\n * @typedef {{value: number, isRatio: boolean}} PPValue\n */\n\n\nfunction validPPValue(value) {\n  // Get PPValue from string (all `/s` were already removed)\n  function string2PPValue(inString) {\n    var matches = /^(.+?)(%)?$/.exec(inString);\n    var value, isRatio;\n    return matches && isFinite(value = parseFloat(matches[1])) ? {\n      value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n      isRatio: isRatio\n    } : null; // 0% -> 0\n  }\n\n  return isFinite(value) ? {\n    value: value,\n    isRatio: false\n  } : typeof value === 'string' ? string2PPValue(value.replace(/\\s/g, '')) : null;\n}\n\nfunction ppValue2OptionValue(ppValue) {\n  return ppValue.isRatio ? \"\".concat(ppValue.value * 100, \"%\") : ppValue.value;\n}\n\nfunction resolvePPValue(ppValue, baseOrigin, baseSize) {\n  return typeof ppValue === 'number' ? ppValue : baseOrigin + ppValue.value * (ppValue.isRatio ? baseSize : 1);\n}\n/**\n * An object that simulates BBox but properties are PPValue.\n * @typedef {Object} PPBBox\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(PPBBox|null)} A normalized `PPBBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validPPBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var ppValue;\n\n  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {\n    bBox.left = bBox.x = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {\n    bBox.top = bBox.y = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {\n    bBox.width = ppValue;\n    delete bBox.right;\n  } else if (ppValue = validPPValue(bBox.right)) {\n    bBox.right = ppValue;\n    delete bBox.width;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {\n    bBox.height = ppValue;\n    delete bBox.bottom;\n  } else if (ppValue = validPPValue(bBox.bottom)) {\n    bBox.bottom = ppValue;\n    delete bBox.height;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n\nfunction ppBBox2OptionObject(ppBBox) {\n  return Object.keys(ppBBox).reduce(function (obj, prop) {\n    obj[prop] = ppValue2OptionValue(ppBBox[prop]);\n    return obj;\n  }, {});\n} // PPBBox -> BBox\n\n\nfunction resolvePPBBox(ppBBox, baseBBox) {\n  var prop2Axis = {\n    left: 'x',\n    right: 'x',\n    x: 'x',\n    width: 'x',\n    top: 'y',\n    bottom: 'y',\n    y: 'y',\n    height: 'y'\n  },\n      baseOriginXY = {\n    x: baseBBox.left,\n    y: baseBBox.top\n  },\n      baseSizeXY = {\n    x: baseBBox.width,\n    y: baseBBox.height\n  };\n  return validBBox(Object.keys(ppBBox).reduce(function (bBox, prop) {\n    bBox[prop] = resolvePPValue(ppBBox[prop], prop === 'width' || prop === 'height' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n    return bBox;\n  }, {}));\n}\n/**\n * @param {Element} element - A target element.\n * @param {?boolean} getPaddingBox - Get padding-box instead of border-box as bounding-box.\n * @returns {BBox} A bounding-box of `element`.\n */\n\n\nfunction getBBox(element, getPaddingBox) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.width,\n    height: rect.height\n  };\n  bBox.left += window.pageXOffset;\n  bBox.top += window.pageYOffset;\n\n  if (getPaddingBox) {\n    var style = window.getComputedStyle(element, ''),\n        borderTop = parseFloat(style.borderTopWidth) || 0,\n        borderRight = parseFloat(style.borderRightWidth) || 0,\n        borderBottom = parseFloat(style.borderBottomWidth) || 0,\n        borderLeft = parseFloat(style.borderLeftWidth) || 0;\n    bBox.left += borderLeft;\n    bBox.top += borderTop;\n    bBox.width -= borderLeft + borderRight;\n    bBox.height -= borderTop + borderBottom;\n  }\n\n  return validBBox(bBox);\n}\n/**\n * Optimize an element for animation.\n * @param {Element} element - A target element.\n * @param {?boolean} gpuTrigger - Initialize for SVGElement if `true`.\n * @returns {Element} A target element.\n */\n\n\nfunction initAnim(element, gpuTrigger) {\n  var style = element.style;\n  style.webkitTapHighlightColor = 'transparent'; // Only when it has no shadow\n\n  var cssPropBoxShadow = CSSPrefix.getName('boxShadow'),\n      boxShadow = window.getComputedStyle(element, '')[cssPropBoxShadow];\n\n  if (!boxShadow || boxShadow === 'none') {\n    style[cssPropBoxShadow] = '0 0 1px transparent';\n  }\n\n  if (gpuTrigger && cssPropTransform) {\n    style[cssPropTransform] = 'translateZ(0)';\n  }\n\n  return element;\n}\n\nfunction setDraggableCursor(element, orgCursor) {\n  if (cssValueDraggableCursor == null) {\n    if (cssWantedValueDraggableCursor !== false) {\n      cssValueDraggableCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggableCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggableCursor == null) {\n      cssValueDraggableCursor = false;\n    }\n  } // Update it to change a state even if cssValueDraggableCursor is false.\n\n\n  element.style.cursor = cssValueDraggableCursor === false ? orgCursor : cssValueDraggableCursor;\n}\n\nfunction setDraggingCursor(element) {\n  if (cssValueDraggingCursor == null) {\n    if (cssWantedValueDraggingCursor !== false) {\n      cssValueDraggingCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggingCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggingCursor == null) {\n      cssValueDraggingCursor = false;\n    }\n  }\n\n  if (cssValueDraggingCursor !== false) {\n    element.style.cursor = cssValueDraggingCursor;\n  }\n} // [SVG]\n\n/**\n * Get SVG coordinates from viewport coordinates.\n * @param {props} props - `props` of instance.\n * @param {number} clientX - viewport X.\n * @param {number} clientY - viewport Y.\n * @returns {SVGPoint} SVG coordinates.\n */\n\n\nfunction viewPoint2SvgPoint(props, clientX, clientY) {\n  var svgPoint = props.svgPoint;\n  svgPoint.x = clientX;\n  svgPoint.y = clientY;\n  return svgPoint.matrixTransform(props.svgCtmElement.getScreenCTM().inverse());\n} // [/SVG]\n\n/**\n * Move by `translate`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveTranslate(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.htmlOffset;\n    props.elementStyle[cssPropTransform] = \"translate(\".concat(position.left + offset.left, \"px, \").concat(position.top + offset.top, \"px)\");\n    return true;\n  }\n\n  return false;\n} // [LEFTTOP]\n\n/**\n * Move by `left` and `top`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveLeftTop(props, position) {\n  var elementBBox = props.elementBBox,\n      elementStyle = props.elementStyle,\n      offset = props.htmlOffset;\n  var moved = false;\n\n  if (position.left !== elementBBox.left) {\n    elementStyle.left = position.left + offset.left + 'px';\n    moved = true;\n  }\n\n  if (position.top !== elementBBox.top) {\n    elementStyle.top = position.top + offset.top + 'px';\n    moved = true;\n  }\n\n  return moved;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Move SVGElement.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveSvg(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.svgOffset,\n        originBBox = props.svgOriginBBox,\n        point = viewPoint2SvgPoint(props, position.left - window.pageXOffset, position.top - window.pageYOffset);\n    props.svgTransform.setTranslate(point.x + offset.x - originBBox.x, point.y + offset.y - originBBox.y);\n    return true;\n  }\n\n  return false;\n} // [/SVG]\n\n/**\n * Set `props.element` position.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @param {function} [cbCheck] - Callback that is called with valid position, cancel moving if it returns `false`.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction move(props, position, cbCheck) {\n  var elementBBox = props.elementBBox;\n\n  function fix() {\n    if (props.minLeft >= props.maxLeft) {\n      // Disabled\n      position.left = elementBBox.left;\n    } else if (position.left < props.minLeft) {\n      position.left = props.minLeft;\n    } else if (position.left > props.maxLeft) {\n      position.left = props.maxLeft;\n    }\n\n    if (props.minTop >= props.maxTop) {\n      // Disabled\n      position.top = elementBBox.top;\n    } else if (position.top < props.minTop) {\n      position.top = props.minTop;\n    } else if (position.top > props.maxTop) {\n      position.top = props.maxTop;\n    }\n  }\n\n  fix();\n\n  if (cbCheck) {\n    if (cbCheck(position) === false) {\n      return false;\n    }\n\n    fix(); // Again\n  }\n\n  var moved = props.moveElm(props, position);\n\n  if (moved) {\n    // Update elementBBox\n    props.elementBBox = validBBox({\n      left: position.left,\n      top: position.top,\n      width: elementBBox.width,\n      height: elementBBox.height\n    });\n  }\n\n  return moved;\n}\n/**\n * Initialize HTMLElement for `translate`, and get `offset` that is used by `moveTranslate`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initTranslate(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['display', 'marginTop', 'marginBottom', 'width', 'height'];\n  RESTORE_PROPS.unshift(cssPropTransform); // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element),\n      cmpStyle = window.getComputedStyle(element, ''); // https://www.w3.org/TR/css-transforms-1/#transformable-element\n\n  if (cmpStyle.display === 'inline') {\n    elementStyle.display = 'inline-block';\n    ['Top', 'Bottom'].forEach(function (dirProp) {\n      var padding = parseFloat(cmpStyle[\"padding\".concat(dirProp)]); // paddingTop/Bottom make padding but don't make space -> negative margin in inline-block\n      // marginTop/Bottom don't work in inline element -> `0` in inline-block\n\n      elementStyle[\"margin\".concat(dirProp)] = padding ? \"-\".concat(padding, \"px\") : '0';\n    });\n  }\n\n  elementStyle[cssPropTransform] = 'translate(0, 0)'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle[cssPropTransform] = \"translate(\".concat(curPosition.left + offset.left, \"px, \").concat(curPosition.top + offset.top, \"px)\"); // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle[cssPropTransform] = \"translate(\".concat(fixPosition.left + offset.left, \"px, \").concat(fixPosition.top + offset.top, \"px)\");\n  }\n\n  return fixPosition;\n} // [LEFTTOP]\n\n/**\n * Initialize HTMLElement for `left` and `top`, and get `offset` that is used by `moveLeftTop`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initLeftTop(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['position', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'width', 'height']; // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element);\n  elementStyle.position = 'absolute';\n  elementStyle.left = elementStyle.top = elementStyle.margin = '0'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle.left = curPosition.left + offset.left + 'px';\n  elementStyle.top = curPosition.top + offset.top + 'px'; // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle.left = fixPosition.left + offset.left + 'px';\n    elementStyle.top = fixPosition.top + offset.top + 'px';\n  }\n\n  return fixPosition;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Initialize SVGElement, and get `offset` that is used by `moveSvg`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initSvg(props) {\n  var element = props.element,\n      svgTransform = props.svgTransform,\n      curRect = element.getBoundingClientRect(),\n      // Get Rect before change position.\n  fixPosition = getBBox(element);\n  svgTransform.setTranslate(0, 0);\n  var originBBox = props.svgOriginBBox = element.getBBox(),\n      // Try to get SVG coordinates of current position.\n  newRect = element.getBoundingClientRect(),\n      originPoint = viewPoint2SvgPoint(props, newRect.left, newRect.top),\n      // Gecko bug, getScreenCTM returns incorrect CTM, and originPoint might not be current position.\n  offset = props.svgOffset = {\n    x: originBBox.x - originPoint.x,\n    y: originBBox.y - originPoint.y\n  },\n      // Restore position\n  curPoint = viewPoint2SvgPoint(props, curRect.left, curRect.top);\n  svgTransform.setTranslate(curPoint.x + offset.x - originBBox.x, curPoint.y + offset.y - originBBox.y);\n  return fixPosition;\n} // [/SVG]\n\n/**\n * Set `elementBBox`, `containmentBBox`, `min/max``Left/Top` and `snapTargets`.\n * @param {props} props - `props` of instance.\n * @param {string} [eventType] - A type of event that kicked this method.\n * @returns {void}\n */\n\n\nfunction initBBox(props, eventType) {\n  // eslint-disable-line no-unused-vars\n  var docBBox = getBBox(document.documentElement),\n      elementBBox = props.elementBBox = props.initElm(props),\n      // reset offset etc.\n  containmentBBox = props.containmentBBox = props.containmentIsBBox ? resolvePPBBox(props.options.containment, docBBox) || docBBox : getBBox(props.options.containment, true);\n  props.minLeft = containmentBBox.left;\n  props.maxLeft = containmentBBox.right - elementBBox.width;\n  props.minTop = containmentBBox.top;\n  props.maxTop = containmentBBox.bottom - elementBBox.height; // Adjust position\n\n  move(props, {\n    left: elementBBox.left,\n    top: elementBBox.top\n  }); // [SNAP]\n  // Snap-targets\n\n  /**\n   * @typedef {Object} SnapTarget\n   * @property {number} [x] - A coordinate it moves to. It has x or y or both.\n   * @property {number} [y]\n   * @property {number} [gravityXStart] - Gravity zone. It has *Start or *End or both, and *X* or *Y* or both.\n   * @property {number} [gravityXEnd]\n   * @property {number} [gravityYStart]\n   * @property {number} [gravityYEnd]\n   */\n\n  if (props.parsedSnapTargets) {\n    var elementSizeXY = {\n      x: elementBBox.width,\n      y: elementBBox.height\n    },\n        minXY = {\n      x: props.minLeft,\n      y: props.minTop\n    },\n        maxXY = {\n      x: props.maxLeft,\n      y: props.maxTop\n    },\n        prop2Axis = {\n      left: 'x',\n      right: 'x',\n      x: 'x',\n      width: 'x',\n      xStart: 'x',\n      xEnd: 'x',\n      xStep: 'x',\n      top: 'y',\n      bottom: 'y',\n      y: 'y',\n      height: 'y',\n      yStart: 'y',\n      yEnd: 'y',\n      yStep: 'y'\n    },\n        snapTargets = props.parsedSnapTargets.reduce(function (snapTargets, parsedSnapTarget) {\n      var baseRect = parsedSnapTarget.base === 'containment' ? containmentBBox : docBBox,\n          baseOriginXY = {\n        x: baseRect.left,\n        y: baseRect.top\n      },\n          baseSizeXY = {\n        x: baseRect.width,\n        y: baseRect.height\n      };\n      /**\n       * Basically, shallow copy from parsedSnapTarget, and it can have resolved values.\n       * @typedef {{x: (number|PPValue), y, xStart, xEnd, xStep, yStart, yEnd, yStep}} TargetXY\n       * @property {string[]} [corners] - Applied value.\n       * @property {string[]} [sides]\n       * @property {boolean} center\n       * @property {number} [xGravity] - Override parsedSnapTarget.gravity.\n       * @property {number} [yGravity]\n       */\n      // Add single Point or Line (i.e. targetXY has no *Step)\n\n      function addSnapTarget(targetXY) {\n        if (targetXY.center == null) {\n          targetXY.center = parsedSnapTarget.center;\n        }\n\n        if (targetXY.xGravity == null) {\n          targetXY.xGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.yGravity == null) {\n          targetXY.yGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.x != null && targetXY.y != null) {\n          // Point\n          targetXY.x = resolvePPValue(targetXY.x, baseOriginXY.x, baseSizeXY.x);\n          targetXY.y = resolvePPValue(targetXY.y, baseOriginXY.y, baseSizeXY.y);\n\n          if (targetXY.center) {\n            targetXY.x -= elementSizeXY.x / 2;\n            targetXY.y -= elementSizeXY.y / 2;\n            targetXY.corners = ['tl'];\n          }\n\n          (targetXY.corners || parsedSnapTarget.corners).forEach(function (corner) {\n            var x = targetXY.x - (corner === 'tr' || corner === 'br' ? elementSizeXY.x : 0),\n                y = targetXY.y - (corner === 'bl' || corner === 'br' ? elementSizeXY.y : 0);\n\n            if (x >= minXY.x && x <= maxXY.x && y >= minXY.y && y <= maxXY.y) {\n              var snapTarget = {\n                x: x,\n                y: y\n              },\n                  gravityXStart = x - targetXY.xGravity,\n                  gravityXEnd = x + targetXY.xGravity,\n                  gravityYStart = y - targetXY.yGravity,\n                  gravityYEnd = y + targetXY.yGravity;\n\n              if (gravityXStart > minXY.x) {\n                snapTarget.gravityXStart = gravityXStart;\n              }\n\n              if (gravityXEnd < maxXY.x) {\n                snapTarget.gravityXEnd = gravityXEnd;\n              }\n\n              if (gravityYStart > minXY.y) {\n                snapTarget.gravityYStart = gravityYStart;\n              }\n\n              if (gravityYEnd < maxXY.y) {\n                snapTarget.gravityYEnd = gravityYEnd;\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        } else {\n          // Line\n          var specAxis = targetXY.x != null ? 'x' : 'y',\n              rangeAxis = specAxis === 'x' ? 'y' : 'x',\n              startProp = \"\".concat(rangeAxis, \"Start\"),\n              endProp = \"\".concat(rangeAxis, \"End\"),\n              gravityProp = \"\".concat(specAxis, \"Gravity\"),\n              specAxisL = specAxis.toUpperCase(),\n              rangeAxisL = rangeAxis.toUpperCase(),\n              gravitySpecStartProp = \"gravity\".concat(specAxisL, \"Start\"),\n              gravitySpecEndProp = \"gravity\".concat(specAxisL, \"End\"),\n              gravityRangeStartProp = \"gravity\".concat(rangeAxisL, \"Start\"),\n              gravityRangeEndProp = \"gravity\".concat(rangeAxisL, \"End\");\n          targetXY[specAxis] = resolvePPValue(targetXY[specAxis], baseOriginXY[specAxis], baseSizeXY[specAxis]);\n          targetXY[startProp] = resolvePPValue(targetXY[startProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]);\n          targetXY[endProp] = resolvePPValue(targetXY[endProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]) - elementSizeXY[rangeAxis]; // Reduce the end of the line.\n\n          if (targetXY[startProp] > targetXY[endProp] || // Smaller than element size.\n          targetXY[startProp] > maxXY[rangeAxis] || targetXY[endProp] < minXY[rangeAxis]) {\n            return;\n          }\n\n          if (targetXY.center) {\n            targetXY[specAxis] -= elementSizeXY[specAxis] / 2;\n            targetXY.sides = ['start'];\n          }\n\n          (targetXY.sides || parsedSnapTarget.sides).forEach(function (side) {\n            var xy = targetXY[specAxis] - (side === 'end' ? elementSizeXY[specAxis] : 0);\n\n            if (xy >= minXY[specAxis] && xy <= maxXY[specAxis]) {\n              var snapTarget = {},\n                  gravitySpecStart = xy - targetXY[gravityProp],\n                  gravitySpecEnd = xy + targetXY[gravityProp];\n              snapTarget[specAxis] = xy;\n\n              if (gravitySpecStart > minXY[specAxis]) {\n                snapTarget[gravitySpecStartProp] = gravitySpecStart;\n              }\n\n              if (gravitySpecEnd < maxXY[specAxis]) {\n                snapTarget[gravitySpecEndProp] = gravitySpecEnd;\n              }\n\n              if (targetXY[startProp] > minXY[rangeAxis]) {\n                snapTarget[gravityRangeStartProp] = targetXY[startProp];\n              }\n\n              if (targetXY[endProp] < maxXY[rangeAxis]) {\n                snapTarget[gravityRangeEndProp] = targetXY[endProp];\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        }\n      }\n\n      var bBox;\n\n      if ((bBox = parsedSnapTarget.element ? getBBox(parsedSnapTarget.element) : null) || // Element\n      parsedSnapTarget.ppBBox) {\n        if (parsedSnapTarget.ppBBox) {\n          bBox = resolvePPBBox(parsedSnapTarget.ppBBox, baseRect);\n        } // BBox\n\n\n        if (bBox) {\n          // Drop invalid BBox.\n          // Expand into 4 lines.\n          parsedSnapTarget.edges.forEach(function (edge) {\n            var lengthenX = parsedSnapTarget.gravity,\n                lengthenY = parsedSnapTarget.gravity;\n\n            if (edge === 'outside') {\n              // Snap it when a part of the element is part of the range.\n              lengthenX += elementBBox.width;\n              lengthenY += elementBBox.height;\n            }\n\n            var xStart = bBox.left - lengthenX,\n                xEnd = bBox.right + lengthenX,\n                yStart = bBox.top - lengthenY,\n                yEnd = bBox.bottom + lengthenY;\n            var side = edge === 'inside' ? 'start' : 'end';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.top,\n              sides: [side],\n              center: false\n            }); // Top\n\n            addSnapTarget({\n              x: bBox.left,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Left\n\n            side = edge === 'inside' ? 'end' : 'start';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.bottom,\n              sides: [side],\n              center: false\n            }); // Bottom\n\n            addSnapTarget({\n              x: bBox.right,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Right\n          });\n        }\n      } else {\n        var expanded = [['x', 'y', 'xStart', 'xEnd', 'xStep', 'yStart', 'yEnd', 'yStep'].reduce(function (targetXY, prop) {\n          if (parsedSnapTarget[prop]) {\n            targetXY[prop] = resolvePPValue(parsedSnapTarget[prop], prop === 'xStep' || prop === 'yStep' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n          }\n\n          return targetXY;\n        }, {})];\n        ['x', 'y'].forEach(function (axis) {\n          var startProp = \"\".concat(axis, \"Start\"),\n              endProp = \"\".concat(axis, \"End\"),\n              stepProp = \"\".concat(axis, \"Step\"),\n              gravityProp = \"\".concat(axis, \"Gravity\");\n          expanded = expanded.reduce(function (expanded, targetXY) {\n            var start = targetXY[startProp],\n                end = targetXY[endProp],\n                step = targetXY[stepProp];\n\n            if (start != null && end != null && start >= end) {\n              return expanded;\n            } // start >= end\n\n\n            if (step != null) {\n              if (step < 2) {\n                return expanded;\n              } // step >= 2px -> Expand by step\n\n\n              var gravity = step / 2; // max\n\n              gravity = parsedSnapTarget.gravity > gravity ? gravity : null;\n\n              for (var curValue = start; curValue <= end; curValue += step) {\n                var expandedXY = Object.keys(targetXY).reduce(function (expandedXY, prop) {\n                  if (prop !== startProp && prop !== endProp && prop !== stepProp) {\n                    expandedXY[prop] = targetXY[prop];\n                  }\n\n                  return expandedXY;\n                }, {});\n                expandedXY[axis] = curValue;\n                expandedXY[gravityProp] = gravity;\n                expanded.push(expandedXY);\n              }\n            } else {\n              expanded.push(targetXY);\n            }\n\n            return expanded;\n          }, []);\n        });\n        expanded.forEach(function (targetXY) {\n          addSnapTarget(targetXY);\n        });\n      }\n\n      return snapTargets;\n    }, []);\n    props.snapTargets = snapTargets.length ? snapTargets : null;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n\n  var autoScroll = {},\n      autoScrollOptions = props.options.autoScroll;\n\n  if (autoScrollOptions) {\n    autoScroll.isWindow = autoScrollOptions.target === window;\n    autoScroll.target = autoScrollOptions.target;\n    var dontScroll = eventType === 'scroll',\n        // Avoid duplicated calling\n    scrollable = getScrollable(autoScrollOptions.target, autoScroll.isWindow, dontScroll),\n        scrollableBBox = validBBox({\n      left: scrollable.clientX,\n      top: scrollable.clientY,\n      width: scrollable.clientWidth,\n      height: scrollable.clientHeight\n    });\n\n    if (!dontScroll) {\n      autoScroll.scrollWidth = scrollable.scrollWidth;\n      autoScroll.scrollHeight = scrollable.scrollHeight;\n    } else if (props.autoScroll) {\n      autoScroll.scrollWidth = props.autoScroll.scrollWidth;\n      autoScroll.scrollHeight = props.autoScroll.scrollHeight;\n    }\n\n    [['X', 'Width', 'left', 'right'], ['Y', 'Height', 'top', 'bottom']].forEach(function (axis) {\n      var xy = axis[0],\n          wh = axis[1],\n          back = axis[2],\n          forward = axis[3],\n          maxAbs = (autoScroll[\"scroll\".concat(wh)] || 0) - scrollable[\"client\".concat(wh)],\n          min = autoScrollOptions[\"min\".concat(xy)] || 0;\n      var max = isFinite(autoScrollOptions[\"max\".concat(xy)]) ? autoScrollOptions[\"max\".concat(xy)] : maxAbs;\n\n      if (min < max && min < maxAbs) {\n        if (max > maxAbs) {\n          max = maxAbs;\n        }\n\n        var lines = [],\n            elementSize = elementBBox[wh.toLowerCase()];\n\n        for (var i = autoScrollOptions.sensitivity.length - 1; i >= 0; i--) {\n          // near -> far\n          var sensitivity = autoScrollOptions.sensitivity[i],\n              speed = autoScrollOptions.speed[i]; // back\n\n          lines.push({\n            dir: -1,\n            speed: speed,\n            position: scrollableBBox[back] + sensitivity\n          }); // forward\n\n          lines.push({\n            dir: 1,\n            speed: speed,\n            position: scrollableBBox[forward] - sensitivity - elementSize\n          });\n        }\n\n        autoScroll[xy.toLowerCase()] = {\n          min: min,\n          max: max,\n          lines: lines\n        };\n      }\n    });\n  }\n\n  props.autoScroll = autoScroll.x || autoScroll.y ? autoScroll : null; // [/AUTO-SCROLL]\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction dragEnd(props) {\n  scrollFrame.stop(); // [AUTO-SCROLL/]\n\n  setDraggableCursor(props.options.handle, props.orgCursor);\n  body.style.cursor = cssOrgValueBodyCursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.orgZIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = cssOrgValueBodyUserSelect;\n  }\n\n  var classList = mClassList(props.element);\n\n  if (movingClass) {\n    classList.remove(movingClass);\n  }\n\n  if (draggingClass) {\n    classList.remove(draggingClass);\n  }\n\n  activeProps = null;\n  pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)\n\n  if (props.onDragEnd) {\n    props.onDragEnd({\n      left: props.elementBBox.left,\n      top: props.elementBBox.top\n    });\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {{clientX, clientY}} pointerXY - This might be MouseEvent, Touch of TouchEvent or Object.\n * @returns {boolean} `true` if it started.\n */\n\n\nfunction dragStart(props, pointerXY) {\n  if (props.disabled) {\n    return false;\n  }\n\n  if (props.onDragStart && props.onDragStart(pointerXY) === false) {\n    return false;\n  }\n\n  if (activeProps) {\n    dragEnd(activeProps);\n  } // activeItem is normally null by pointerEvent.end.\n\n\n  setDraggingCursor(props.options.handle);\n  body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n  window.getComputedStyle(props.options.handle, '').cursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.options.zIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = 'none';\n  }\n\n  if (draggingClass) {\n    mClassList(props.element).add(draggingClass);\n  }\n\n  activeProps = props;\n  hasMoved = false;\n  pointerOffset.left = props.elementBBox.left - (pointerXY.clientX + window.pageXOffset);\n  pointerOffset.top = props.elementBBox.top - (pointerXY.clientY + window.pageYOffset);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n  var needsInitBBox; // containment\n\n  if (newOptions.containment) {\n    var bBox;\n\n    if (isElement(newOptions.containment)) {\n      // Specific element\n      if (newOptions.containment !== options.containment) {\n        options.containment = newOptions.containment;\n        props.containmentIsBBox = false;\n        needsInitBBox = true;\n      }\n    } else if ((bBox = validPPBBox(copyTree(newOptions.containment))) && // bBox\n    hasChanged(bBox, options.containment)) {\n      options.containment = bBox;\n      props.containmentIsBBox = true;\n      needsInitBBox = true;\n    }\n  } // [SNAP]\n\n  /**\n   * @typedef {Object} SnapOptions\n   * @property {SnapTargetOptions[]} targets\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} SnapTargetOptions\n   * @property {(number|string)} [x] - pixels | '<n>%' | {start, end} | {step, start, end}\n   * @property {(number|string)} [y]\n   * @property {(Element|Object)} [boundingBox] - Object has properties that are string or number from PPBBox.\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} ParsedSnapTarget\n   * @property {PPValue} [x] - (input: pixels | '<n>%')\n   * @property {PPValue} [y]\n   * @property {PPValue} [xStart] - (input: {start, end} | {step, start, end})\n   * @property {PPValue} [xEnd]\n   * @property {PPValue} [xStep] - (input: {step, start, end})\n   * @property {PPValue} [yStart]\n   * @property {PPValue} [yEnd]\n   * @property {PPValue} [yStep]\n   * @property {Element} [element]\n   * @property {PPBBox} [ppBBox]\n   * @property {number} gravity\n   * @property {string[]} corners\n   * @property {string[]} sides\n   * @property {boolean} center\n   * @property {string[]} edges\n   * @property {string} base\n   */\n  // Normalize `gravity`, `corner`, `side`, `center`, `edge`, `base`\n\n\n  function commonSnapOptions(options, newOptions) {\n    function cleanString(inString) {\n      return typeof inString === 'string' ? inString.replace(/[, ]+/g, ' ').trim().toLowerCase() : null;\n    } // gravity\n\n\n    if (isFinite(newOptions.gravity) && newOptions.gravity > 0) {\n      options.gravity = newOptions.gravity;\n    } // corner\n\n\n    var corner = cleanString(newOptions.corner);\n\n    if (corner) {\n      if (corner !== 'all') {\n        var added = {},\n            corners = corner.split(/\\s/).reduce(function (corners, corner) {\n          corner = corner.trim().replace(/^(.).*?-(.).*$/, '$1$2');\n\n          if ((corner = corner === 'tl' || corner === 'lt' ? 'tl' : corner === 'tr' || corner === 'rt' ? 'tr' : corner === 'bl' || corner === 'lb' ? 'bl' : corner === 'br' || corner === 'rb' ? 'br' : null) && !added[corner]) {\n            corners.push(corner);\n            added[corner] = true;\n          }\n\n          return corners;\n        }, []),\n            cornersLen = corners.length;\n        corner = !cornersLen ? null : cornersLen === 4 ? 'all' : corners.join(' ');\n      }\n\n      if (corner) {\n        options.corner = corner;\n      }\n    } // side\n\n\n    var side = cleanString(newOptions.side);\n\n    if (side) {\n      if (side === 'start' || side === 'end' || side === 'both') {\n        options.side = side;\n      } else if (side === 'start end' || side === 'end start') {\n        options.side = 'both';\n      }\n    } // center\n\n\n    if (typeof newOptions.center === 'boolean') {\n      options.center = newOptions.center;\n    } // edge\n\n\n    var edge = cleanString(newOptions.edge);\n\n    if (edge) {\n      if (edge === 'inside' || edge === 'outside' || edge === 'both') {\n        options.edge = edge;\n      } else if (edge === 'inside outside' || edge === 'outside inside') {\n        options.edge = 'both';\n      }\n    } // base\n\n\n    var base = typeof newOptions.base === 'string' ? newOptions.base.trim().toLowerCase() : null;\n\n    if (base && (base === 'containment' || base === 'document')) {\n      options.base = base;\n    }\n\n    return options;\n  } // snap\n\n\n  if (newOptions.snap != null) {\n    var newSnapOptions = isObject(newOptions.snap) && newOptions.snap.targets != null ? newOptions.snap : {\n      targets: newOptions.snap\n    },\n        snapTargetsOptions = [],\n        snapOptions = commonSnapOptions({\n      targets: snapTargetsOptions\n    }, newSnapOptions); // Set default options into top level.\n\n    if (!snapOptions.gravity) {\n      snapOptions.gravity = SNAP_GRAVITY;\n    }\n\n    if (!snapOptions.corner) {\n      snapOptions.corner = SNAP_CORNER;\n    }\n\n    if (!snapOptions.side) {\n      snapOptions.side = SNAP_SIDE;\n    }\n\n    if (typeof snapOptions.center !== 'boolean') {\n      snapOptions.center = false;\n    }\n\n    if (!snapOptions.edge) {\n      snapOptions.edge = SNAP_EDGE;\n    }\n\n    if (!snapOptions.base) {\n      snapOptions.base = SNAP_BASE;\n    }\n\n    var parsedSnapTargets = (Array.isArray(newSnapOptions.targets) ? newSnapOptions.targets : [newSnapOptions.targets]).reduce(function (parsedSnapTargets, target) {\n      if (target == null) {\n        return parsedSnapTargets;\n      }\n\n      var isElementPre = isElement(target),\n          // Pre-check direct value\n      ppBBoxPre = validPPBBox(copyTree(target)),\n          // Pre-check direct value\n      newSnapTargetOptions = isElementPre || ppBBoxPre ? {\n        boundingBox: target\n      } : // Direct Element | PPBBox\n      isObject(target) && target.start == null && target.end == null && target.step == null ? target : // SnapTargetOptions\n      {\n        x: target,\n        y: target\n      },\n          // Others, it might be {step, start, end}\n      expandedParsedSnapTargets = [],\n          snapTargetOptions = {},\n          newOptionsBBox = newSnapTargetOptions.boundingBox;\n      var ppBBox;\n\n      if (isElementPre || isElement(newOptionsBBox)) {\n        // Element\n        expandedParsedSnapTargets.push({\n          element: newOptionsBBox\n        });\n        snapTargetOptions.boundingBox = newOptionsBBox;\n      } else if (ppBBox = ppBBoxPre || validPPBBox(copyTree(newOptionsBBox))) {\n        // Object -> PPBBox\n        expandedParsedSnapTargets.push({\n          ppBBox: ppBBox\n        });\n        snapTargetOptions.boundingBox = ppBBox2OptionObject(ppBBox);\n      } else {\n        var invalid; // `true` if valid PPValue was given but the contained value is invalid.\n\n        var parsedXY = ['x', 'y'].reduce(function (parsedXY, axis) {\n          var newOptionsXY = newSnapTargetOptions[axis];\n          var ppValue;\n\n          if (ppValue = validPPValue(newOptionsXY)) {\n            // pixels | '<n>%'\n            parsedXY[axis] = ppValue;\n            snapTargetOptions[axis] = ppValue2OptionValue(ppValue);\n          } else {\n            // {start, end} | {step, start, end}\n            var start, end, step;\n\n            if (isObject(newOptionsXY)) {\n              start = validPPValue(newOptionsXY.start);\n              end = validPPValue(newOptionsXY.end);\n              step = validPPValue(newOptionsXY.step);\n\n              if (start && end && start.isRatio === end.isRatio && start.value >= end.value) {\n                // start >= end\n                invalid = true;\n              }\n            }\n\n            start = parsedXY[\"\".concat(axis, \"Start\")] = start || {\n              value: 0,\n              isRatio: false\n            };\n            end = parsedXY[\"\".concat(axis, \"End\")] = end || {\n              value: 1,\n              isRatio: true\n            };\n            snapTargetOptions[axis] = {\n              start: ppValue2OptionValue(start),\n              end: ppValue2OptionValue(end)\n            };\n\n            if (step) {\n              if (step.isRatio ? step.value > 0 : step.value >= 2) {\n                // step > 0% || step >= 2px\n                parsedXY[\"\".concat(axis, \"Step\")] = step;\n                snapTargetOptions[axis].step = ppValue2OptionValue(step);\n              } else {\n                invalid = true;\n              }\n            }\n          }\n\n          return parsedXY;\n        }, {});\n\n        if (invalid) {\n          return parsedSnapTargets;\n        }\n\n        if (parsedXY.xStart && !parsedXY.xStep && parsedXY.yStart && !parsedXY.yStep) {\n          // Expand into 4 lines. This is not BBox, and `edge` is ignored.\n          expandedParsedSnapTargets.push({\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yStart\n          }, // Top\n          {\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yEnd\n          }, // Bottom\n          {\n            x: parsedXY.xStart,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          }, // Left\n          {\n            x: parsedXY.xEnd,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          } // Right\n          );\n        } else {\n          expandedParsedSnapTargets.push(parsedXY);\n        }\n      }\n\n      if (expandedParsedSnapTargets.length) {\n        snapTargetsOptions.push(commonSnapOptions(snapTargetOptions, newSnapTargetOptions)); // Copy common SnapOptions\n\n        var corner = snapTargetOptions.corner || snapOptions.corner,\n            side = snapTargetOptions.side || snapOptions.side,\n            edge = snapTargetOptions.edge || snapOptions.edge,\n            commonOptions = {\n          gravity: snapTargetOptions.gravity || snapOptions.gravity,\n          base: snapTargetOptions.base || snapOptions.base,\n          center: typeof snapTargetOptions.center === 'boolean' ? snapTargetOptions.center : snapOptions.center,\n          corners: corner === 'all' ? SNAP_ALL_CORNERS : corner.split(' '),\n          // Split\n          sides: side === 'both' ? SNAP_ALL_SIDES : [side],\n          // Split\n          edges: edge === 'both' ? SNAP_ALL_EDGES : [edge] // Split\n\n        };\n        expandedParsedSnapTargets.forEach(function (parsedSnapTarget) {\n          // Set common SnapOptions\n          ['gravity', 'corners', 'sides', 'center', 'edges', 'base'].forEach(function (option) {\n            parsedSnapTarget[option] = commonOptions[option];\n          });\n          parsedSnapTargets.push(parsedSnapTarget);\n        });\n      }\n\n      return parsedSnapTargets;\n    }, []);\n\n    if (parsedSnapTargets.length) {\n      options.snap = snapOptions; // Update always\n\n      if (hasChanged(parsedSnapTargets, props.parsedSnapTargets)) {\n        props.parsedSnapTargets = parsedSnapTargets;\n        needsInitBBox = true;\n      }\n    }\n  } else if (newOptions.hasOwnProperty('snap') && props.parsedSnapTargets) {\n    options.snap = props.parsedSnapTargets = props.snapTargets = void 0;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n  /**\n   * @typedef {Object} AutoScrollOptions\n   * @property {(Element|Window)} target\n   * @property {Array} speed\n   * @property {Array} sensitivity\n   * @property {number} [minX]\n   * @property {number} [maxX]\n   * @property {number} [minY]\n   * @property {number} [maxY]\n   */\n  // autoScroll\n\n\n  if (newOptions.autoScroll) {\n    var newAutoScrollOptions = isObject(newOptions.autoScroll) ? newOptions.autoScroll : {\n      target: newOptions.autoScroll === true ? window : newOptions.autoScroll\n    },\n        autoScrollOptions = {}; // target\n\n    autoScrollOptions.target = isElement(newAutoScrollOptions.target) ? newAutoScrollOptions.target : window; // speed\n\n    autoScrollOptions.speed = [];\n    (Array.isArray(newAutoScrollOptions.speed) ? newAutoScrollOptions.speed : [newAutoScrollOptions.speed]).every(function (speed, i) {\n      if (i <= 2 && isFinite(speed)) {\n        autoScrollOptions.speed[i] = speed;\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!autoScrollOptions.speed.length) {\n      autoScrollOptions.speed = AUTOSCROLL_SPEED;\n    } // sensitivity\n\n\n    var newSensitivity = Array.isArray(newAutoScrollOptions.sensitivity) ? newAutoScrollOptions.sensitivity : [newAutoScrollOptions.sensitivity];\n    autoScrollOptions.sensitivity = autoScrollOptions.speed.map(function (v, i) {\n      return isFinite(newSensitivity[i]) ? newSensitivity[i] : AUTOSCROLL_SENSITIVITY[i];\n    }); // min*, max*\n\n    ['X', 'Y'].forEach(function (option) {\n      var optionMin = \"min\".concat(option),\n          optionMax = \"max\".concat(option);\n\n      if (isFinite(newAutoScrollOptions[optionMin]) && newAutoScrollOptions[optionMin] >= 0) {\n        autoScrollOptions[optionMin] = newAutoScrollOptions[optionMin];\n      }\n\n      if (isFinite(newAutoScrollOptions[optionMax]) && newAutoScrollOptions[optionMax] >= 0 && (!autoScrollOptions[optionMin] || newAutoScrollOptions[optionMax] >= autoScrollOptions[optionMin])) {\n        autoScrollOptions[optionMax] = newAutoScrollOptions[optionMax];\n      }\n    });\n\n    if (hasChanged(autoScrollOptions, options.autoScroll)) {\n      options.autoScroll = autoScrollOptions;\n      needsInitBBox = true;\n    }\n  } else if (newOptions.hasOwnProperty('autoScroll')) {\n    if (options.autoScroll) {\n      needsInitBBox = true;\n    }\n\n    options.autoScroll = void 0;\n  } // [/AUTO-SCROLL]\n\n\n  if (needsInitBBox) {\n    initBBox(props);\n  } // handle\n\n\n  if (isElement(newOptions.handle) && newOptions.handle !== options.handle) {\n    if (options.handle) {\n      // Restore\n      options.handle.style.cursor = props.orgCursor;\n\n      if (cssPropUserSelect) {\n        options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n      }\n\n      pointerEvent.removeStartHandler(options.handle, props.pointerEventHandlerId);\n    }\n\n    var handle = options.handle = newOptions.handle;\n    props.orgCursor = handle.style.cursor;\n    setDraggableCursor(handle, props.orgCursor);\n\n    if (cssPropUserSelect) {\n      props.orgUserSelect = handle.style[cssPropUserSelect];\n      handle.style[cssPropUserSelect] = 'none';\n    }\n\n    pointerEvent.addStartHandler(handle, props.pointerEventHandlerId);\n  } // zIndex\n\n\n  if (isFinite(newOptions.zIndex) || newOptions.zIndex === false) {\n    options.zIndex = newOptions.zIndex;\n\n    if (props === activeProps) {\n      props.elementStyle.zIndex = options.zIndex === false ? props.orgZIndex : options.zIndex;\n    }\n  } // left/top\n\n\n  var position = {\n    left: props.elementBBox.left,\n    top: props.elementBBox.top\n  };\n  var needsMove;\n\n  if (isFinite(newOptions.left) && newOptions.left !== position.left) {\n    position.left = newOptions.left;\n    needsMove = true;\n  }\n\n  if (isFinite(newOptions.top) && newOptions.top !== position.top) {\n    position.top = newOptions.top;\n    needsMove = true;\n  }\n\n  if (needsMove) {\n    move(props, position);\n  } // Event listeners\n\n\n  ['onDrag', 'onMove', 'onDragStart', 'onMoveStart', 'onDragEnd'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n      props[option] = options[option].bind(props.ins);\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = props[option] = void 0;\n    }\n  });\n}\n\nvar PlainDraggable = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainDraggable` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainDraggable(element, options) {\n    _classCallCheck(this, PlainDraggable);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        zIndex: ZINDEX // Initial state.\n\n      },\n      disabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!isElement(element) || element === body) {\n      throw new Error('This element is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    var gpuTrigger = true; // [SVG]\n\n    var ownerSvg; // SVGElement which is not root view\n\n    if (element instanceof SVGElement && (ownerSvg = element.ownerSVGElement)) {\n      // It means `instanceof SVGLocatable` (many browsers don't have SVGLocatable)\n      if (!element.getBBox) {\n        throw new Error('This element is not accepted. (SVGLocatable)');\n      } // Trident and Edge bug, SVGSVGElement doesn't have SVGAnimatedTransformList?\n\n\n      if (!element.transform) {\n        throw new Error('This element is not accepted. (SVGAnimatedTransformList)');\n      } // Trident bug, returned value must be used (That is not given value).\n\n\n      props.svgTransform = element.transform.baseVal.appendItem(ownerSvg.createSVGTransform());\n      props.svgPoint = ownerSvg.createSVGPoint(); // Gecko bug, view.getScreenCTM returns CTM with root view.\n\n      var svgView = element.nearestViewportElement || element.viewportElement;\n      props.svgCtmElement = !IS_GECKO ? svgView : svgView.appendChild(document.createElementNS(ownerSvg.namespaceURI, 'rect'));\n      gpuTrigger = false;\n      props.initElm = initSvg;\n      props.moveElm = moveSvg;\n    } else {\n      // [/SVG]\n\n      /* eslint-disable indent */\n\n      /* [SVG/] */\n      var cssPropWillChange = CSSPrefix.getName('willChange');\n\n      if (cssPropWillChange) {\n        gpuTrigger = false;\n      }\n\n      if (!options.leftTop && cssPropTransform) {\n        // translate\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'transform';\n        }\n\n        props.initElm = initTranslate;\n        props.moveElm = moveTranslate;\n      } else {\n        // left and top\n        // [LEFTTOP]\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'left, top';\n        }\n\n        props.initElm = initLeftTop;\n        props.moveElm = moveLeftTop; // [/LEFTTOP]\n\n        /* [LEFTTOP/]\n        throw new Error('`transform` is not supported.');\n        [LEFTTOP/] */\n      }\n      /* eslint-enable indent */\n\n      /* [SVG/] */\n\n    } // [SVG/]\n\n\n    props.element = initAnim(element, gpuTrigger);\n    props.elementStyle = element.style;\n    props.orgZIndex = props.elementStyle.zIndex;\n\n    if (draggableClass) {\n      mClassList(element).add(draggableClass);\n    }\n\n    props.pointerEventHandlerId = pointerEvent.regStartHandler(function (pointerXY) {\n      return dragStart(props, pointerXY);\n    }); // Default options\n\n    if (!options.containment) {\n      var parent;\n      options.containment = (parent = element.parentNode) && isElement(parent) ? parent : body;\n    }\n\n    if (!options.handle) {\n      options.handle = element;\n    }\n\n    _setOptions(props, options);\n  }\n\n  _createClass(PlainDraggable, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      this.disabled = true; // To restore element and reset pointer\n\n      pointerEvent.unregStartHandler(pointerEvent.removeStartHandler(props.options.handle, props.pointerEventHandlerId));\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {PlainDraggable} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      initBBox(insProps[this._id]);\n      return this;\n    }\n  }, {\n    key: \"disabled\",\n    get: function get() {\n      return insProps[this._id].disabled;\n    },\n    set: function set(value) {\n      var props = insProps[this._id];\n\n      if ((value = !!value) !== props.disabled) {\n        props.disabled = value;\n\n        if (props.disabled) {\n          if (props === activeProps) {\n            dragEnd(props);\n          }\n\n          props.options.handle.style.cursor = props.orgCursor;\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).remove(draggableClass);\n          }\n        } else {\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = 'none';\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).add(draggableClass);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"rect\",\n    get: function get() {\n      return copyTree(insProps[this._id].elementBBox);\n    }\n  }, {\n    key: \"left\",\n    get: function get() {\n      return insProps[this._id].elementBBox.left;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        left: value\n      });\n    }\n  }, {\n    key: \"top\",\n    get: function get() {\n      return insProps[this._id].elementBBox.top;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        top: value\n      });\n    }\n  }, {\n    key: \"containment\",\n    get: function get() {\n      var props = insProps[this._id];\n      return props.containmentIsBBox ? ppBBox2OptionObject(props.options.containment) : props.options.containment;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        containment: value\n      });\n    } // [SNAP]\n\n  }, {\n    key: \"snap\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.snap);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        snap: value\n      });\n    } // [/SNAP]\n    // [AUTO-SCROLL]\n\n  }, {\n    key: \"autoScroll\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.autoScroll);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        autoScroll: value\n      });\n    } // [/AUTO-SCROLL]\n\n  }, {\n    key: \"handle\",\n    get: function get() {\n      return insProps[this._id].options.handle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        handle: value\n      });\n    }\n  }, {\n    key: \"zIndex\",\n    get: function get() {\n      return insProps[this._id].options.zIndex;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        zIndex: value\n      });\n    }\n  }, {\n    key: \"onDrag\",\n    get: function get() {\n      return insProps[this._id].options.onDrag;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDrag: value\n      });\n    }\n  }, {\n    key: \"onMove\",\n    get: function get() {\n      return insProps[this._id].options.onMove;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMove: value\n      });\n    }\n  }, {\n    key: \"onDragStart\",\n    get: function get() {\n      return insProps[this._id].options.onDragStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragStart: value\n      });\n    }\n  }, {\n    key: \"onMoveStart\",\n    get: function get() {\n      return insProps[this._id].options.onMoveStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMoveStart: value\n      });\n    }\n  }, {\n    key: \"onDragEnd\",\n    get: function get() {\n      return insProps[this._id].options.onDragEnd;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragEnd: value\n      });\n    }\n  }], [{\n    key: \"draggableCursor\",\n    get: function get() {\n      return cssWantedValueDraggableCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggableCursor !== value) {\n        cssWantedValueDraggableCursor = value;\n        cssValueDraggableCursor = null; // Reset\n\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (props.disabled || props === activeProps && cssValueDraggingCursor !== false) {\n            return;\n          }\n\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (props === activeProps) {\n            // Since cssValueDraggingCursor is `false`, copy cursor again.\n            body.style.cursor = cssOrgValueBodyCursor;\n            body.style.cursor = window.getComputedStyle(props.options.handle, '').cursor;\n          }\n        });\n      }\n    }\n  }, {\n    key: \"draggingCursor\",\n    get: function get() {\n      return cssWantedValueDraggingCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggingCursor !== value) {\n        cssWantedValueDraggingCursor = value;\n        cssValueDraggingCursor = null; // Reset\n\n        if (activeProps) {\n          setDraggingCursor(activeProps.options.handle);\n\n          if (cssValueDraggingCursor === false) {\n            setDraggableCursor(activeProps.options.handle, activeProps.orgCursor); // draggableCursor\n\n            body.style.cursor = cssOrgValueBodyCursor;\n          }\n\n          body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n          window.getComputedStyle(activeProps.options.handle, '').cursor;\n        }\n      }\n    }\n  }, {\n    key: \"draggableClass\",\n    get: function get() {\n      return draggableClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggableClass) {\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (!props.disabled) {\n            var classList = mClassList(props.element);\n\n            if (draggableClass) {\n              classList.remove(draggableClass);\n            }\n\n            if (value) {\n              classList.add(value);\n            }\n          }\n        });\n        draggableClass = value;\n      }\n    }\n  }, {\n    key: \"draggingClass\",\n    get: function get() {\n      return draggingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggingClass) {\n        if (activeProps) {\n          var classList = mClassList(activeProps.element);\n\n          if (draggingClass) {\n            classList.remove(draggingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        draggingClass = value;\n      }\n    }\n  }, {\n    key: \"movingClass\",\n    get: function get() {\n      return movingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== movingClass) {\n        if (activeProps && hasMoved) {\n          var classList = mClassList(activeProps.element);\n\n          if (movingClass) {\n            classList.remove(movingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        movingClass = value;\n      }\n    }\n  }]);\n\n  return PlainDraggable;\n}();\n\npointerEvent.addMoveHandler(document, function (pointerXY) {\n  if (!activeProps) {\n    return;\n  }\n\n  var position = {\n    left: pointerXY.clientX + window.pageXOffset + pointerOffset.left,\n    top: pointerXY.clientY + window.pageYOffset + pointerOffset.top\n  };\n\n  if (move(activeProps, position, // [SNAP]\n  activeProps.snapTargets ? function (position) {\n    // Snap\n    var iLen = activeProps.snapTargets.length;\n    var snappedX = false,\n        snappedY = false,\n        i;\n\n    for (i = 0; i < iLen && (!snappedX || !snappedY); i++) {\n      var snapTarget = activeProps.snapTargets[i];\n\n      if ((snapTarget.gravityXStart == null || position.left >= snapTarget.gravityXStart) && (snapTarget.gravityXEnd == null || position.left <= snapTarget.gravityXEnd) && (snapTarget.gravityYStart == null || position.top >= snapTarget.gravityYStart) && (snapTarget.gravityYEnd == null || position.top <= snapTarget.gravityYEnd)) {\n        if (!snappedX && snapTarget.x != null) {\n          position.left = snapTarget.x;\n          snappedX = true;\n          i = -1; // Restart loop\n        }\n\n        if (!snappedY && snapTarget.y != null) {\n          position.top = snapTarget.y;\n          snappedY = true;\n          i = -1; // Restart loop\n        }\n      }\n    }\n\n    position.snapped = snappedX || snappedY;\n    return activeProps.onDrag ? activeProps.onDrag(position) : true;\n  } : // [/SNAP]\n  activeProps.onDrag)) {\n    // [AUTO-SCROLL]\n    var xyMoveArgs = {},\n        autoScroll = activeProps.autoScroll;\n\n    if (autoScroll) {\n      var clientXY = {\n        x: activeProps.elementBBox.left - window.pageXOffset,\n        y: activeProps.elementBBox.top - window.pageYOffset\n      };\n      ['x', 'y'].forEach(function (axis) {\n        if (autoScroll[axis]) {\n          var min = autoScroll[axis].min,\n              max = autoScroll[axis].max;\n          autoScroll[axis].lines.some(function (line) {\n            if (line.dir === -1 ? clientXY[axis] <= line.position : clientXY[axis] >= line.position) {\n              xyMoveArgs[axis] = {\n                dir: line.dir,\n                speed: line.speed / 1000,\n                min: min,\n                max: max\n              };\n              return true;\n            }\n\n            return false;\n          });\n        }\n      });\n    }\n\n    if (xyMoveArgs.x || xyMoveArgs.y) {\n      scrollFrame.move(autoScroll.target, xyMoveArgs, autoScroll.isWindow ? scrollXYWindow : scrollXYElement);\n      position.autoScroll = true;\n    } else {\n      scrollFrame.stop();\n    } // [/AUTO-SCROLL]\n\n\n    if (!hasMoved) {\n      hasMoved = true;\n\n      if (movingClass) {\n        mClassList(activeProps.element).add(movingClass);\n      }\n\n      if (activeProps.onMoveStart) {\n        activeProps.onMoveStart(position);\n      }\n    }\n\n    if (activeProps.onMove) {\n      activeProps.onMove(position);\n    }\n  }\n});\n{\n  function endHandler() {\n    if (activeProps) {\n      dragEnd(activeProps);\n    }\n  }\n\n  pointerEvent.addEndHandler(document, endHandler);\n  pointerEvent.addCancelHandler(document, endHandler);\n}\n{\n  function initDoc() {\n    cssPropTransitionProperty = CSSPrefix.getName('transitionProperty');\n    cssPropTransform = CSSPrefix.getName('transform');\n    cssOrgValueBodyCursor = body.style.cursor;\n\n    if (cssPropUserSelect = CSSPrefix.getName('userSelect')) {\n      cssOrgValueBodyUserSelect = body.style[cssPropUserSelect];\n    } // Init active item when layout is changed, and init others later.\n\n\n    var LAZY_INIT_DELAY = 200;\n    var initDoneItems = {},\n        lazyInitTimer;\n\n    function checkInitBBox(props, eventType) {\n      if (props.initElm) {\n        // Easy checking for instance without errors.\n        initBBox(props, eventType);\n      } // eslint-disable-line brace-style\n\n    }\n\n    function initAll(eventType) {\n      clearTimeout(lazyInitTimer);\n      Object.keys(insProps).forEach(function (id) {\n        if (!initDoneItems[id]) {\n          checkInitBBox(insProps[id], eventType);\n        }\n      });\n      initDoneItems = {};\n    }\n\n    var layoutChanging = false; // Gecko bug, multiple calling by `resize`.\n\n    var layoutChange = AnimEvent.add(function (event) {\n      if (layoutChanging) {\n        return;\n      }\n\n      layoutChanging = true;\n\n      if (activeProps) {\n        checkInitBBox(activeProps, event.type);\n        pointerEvent.move();\n        initDoneItems[activeProps._id] = true;\n      }\n\n      clearTimeout(lazyInitTimer);\n      lazyInitTimer = setTimeout(function () {\n        initAll(event.type);\n      }, LAZY_INIT_DELAY);\n      layoutChanging = false;\n    });\n    window.addEventListener('resize', layoutChange, true);\n    window.addEventListener('scroll', layoutChange, true);\n  }\n\n  if (body = document.body) {\n    initDoc();\n  } else {\n    document.addEventListener('DOMContentLoaded', function () {\n      body = document.body;\n      initDoc();\n    }, true);\n  }\n}\n/* [SNAP/]\nPlainDraggable.limit = true;\n[SNAP/] */\n\nexport default PlainDraggable;","import PlainDraggable from 'plain-draggable'\nimport { onRemove, animateRectTransition } from './utils'\n\n/**\n * Basic class for layout\n */\nexport class Layout {\n  /**\n   * Creates a new Layout instance\n   *\n   * @param {Object} options - The options for the layout\n   * @param {string} options.name - The name of the layout\n   * @param {Function} [options.enterHandler] - Handler called when entering the layout\n   * @param {Function} [options.leaveHandler] - Handler called when leaving the layout\n   * @throws {Error} If the layout name is not provided\n   */\n  constructor (options = {}) {\n    if (!options.name) throw Error('Layout name is not given')\n    this.name = options.name\n    this.enterHandler = options.enterHandler\n    this.leaveHandler = options.leaveHandler\n  }\n\n  /**\n   * Returns the name of the layout\n   *\n   * @returns {string} The name of the layout\n   */\n  valueOf = () => this.name\n}\n\n/**\n * Side-By-Side Layout, HTML content and Showcase show on left/right side\n *\n * @extends {Layout}\n */\nexport class SideBySide extends Layout {\n  /**\n   * @type {}\n   */\n  name = 'side-by-side'\n\n  /**\n   * Handler called when entering the Side-By-Side layout\n   *\n   * @param {Object} options - The options object\n   * @param {HTMLElement} options.container - The main container element\n   * @param {HTMLElement} options.htmlHolder - The HTML content holder\n   * @param {HTMLElement} options.showcase - The showcase element\n   */\n  enterHandler = ({ container, htmlHolder, showcase }) => {\n    const bar = document.createElement('div')\n    bar.className = 'bar'\n    bar.innerHTML = '<div class=\"bar-handle\"></div>'\n    const handle = bar.querySelector('.bar-handle')\n    container.appendChild(bar)\n\n    // Resize views by value\n    const resizeByLeft = left => {\n      htmlHolder.style.width = left + 'px'\n      showcase.style.width =\n        parseFloat(window.getComputedStyle(container).width) - left + 'px'\n    }\n\n    const draggable = new PlainDraggable(bar, {\n      handle,\n      containment: { left: '25%', top: 0, right: '75%', height: 0 },\n    })\n    draggable.draggableCursor = 'grab'\n\n    draggable.onDrag = pos => {\n      handle.style.transform = 'unset'\n      resizeByLeft(pos.left)\n    }\n    draggable.onDragEnd = _ => {\n      handle.style.cssText = ''\n    }\n\n    onRemove(bar, () => draggable.remove())\n  }\n\n  /**\n   * Handler called when leaving the Side-By-Side layout\n   *\n   * @param {Object} options - The options object\n   * @param {HTMLElement} options.container - The main container element\n   */\n  leaveHandler = ({ container }) => {\n    container.querySelector('.bar')?.remove()\n  }\n}\n\n/**\n * Overlay Layout, Showcase occupies viewport, and HTML content becomes draggable blocks\n *\n * @extends {Layout}\n */\nexport class Overlay extends Layout {\n  /**\n   * @type {}\n   */\n  name = 'overlay'\n\n  /**\n   * saveLeftTopAsData.\n   *\n   * @param {} element\n   */\n  saveLeftTopAsData = element => {\n    const { left, top } = element.getBoundingClientRect()\n    element.dataset.left = left\n    element.dataset.top = top\n  }\n\n  /**\n   * addDraggable.\n   *\n   * @param {} element\n   */\n  addDraggable = element => {\n    // Make sure current element always on top\n    const siblings = Array.from(\n      element.parentElement?.querySelectorAll(':scope > *') ?? [],\n    )\n    let popTimer = null\n    element.onmouseover = () => {\n      popTimer = setTimeout(() => {\n        siblings.forEach(e => e.style.removeProperty('z-index'))\n        element.style.zIndex = '9001'\n      }, 200)\n    }\n    element.onmouseout = () => {\n      clearTimeout(popTimer)\n    }\n\n    // Add draggable part\n    const draggablePart = document.createElement('div')\n    element.appendChild(draggablePart)\n    draggablePart.className = 'draggable-part'\n    draggablePart.innerHTML = '<div class=\"handle\">\\u2630</div>'\n\n    // Add draggable instance\n    const { left, top } = element.getBoundingClientRect()\n    const draggable = new PlainDraggable(element, {\n      top,\n      left,\n      handle: draggablePart,\n      snap: { x: { step: 20 }, y: { step: 20 } },\n    })\n\n    // FIXME use pure CSS to hide utils\n    const utils = element.querySelector('.utils')\n    draggable.onDragStart = () => {\n      utils.style.display = 'none'\n      element.classList.add('drag')\n    }\n\n    draggable.onDragEnd = () => {\n      utils.style = ''\n      element.classList.remove('drag')\n      element.style.zIndex = '9000'\n    }\n\n    // Reposition draggable instance when resized\n    new window.ResizeObserver(() => {\n      try {\n        draggable.position()\n      } catch (err) {\n        console.warn(err)\n      }\n    }).observe(element)\n\n    // Callback for remove\n    onRemove(element, () => {\n      draggable.remove()\n    })\n  }\n\n  /**\n   * enterHandler.\n   *\n   * @param {}\n   */\n  enterHandler = ({ htmlHolder, blocks }) => {\n    // FIXME It is weird rect from this method and this scope are different...\n    blocks.forEach(this.saveLeftTopAsData)\n\n    // Create draggable blocks and set each position by previous one\n    let [left, top] = [20, 20]\n    blocks.forEach(block => {\n      const originLeft = Number(block.dataset.left)\n      const originTop = Number(block.dataset.top)\n\n      // Create draggable block\n      const wrapper = document.createElement('div')\n      wrapper.classList.add('draggable-block')\n      wrapper.innerHTML = `\n        <div class=\"utils\">\n          <div id=\"close\">\\u274C</div>\n          <div id=\"plus-font-size\" \">\\u2795</div>\n          <div id=\"minus-font-size\">\\u2796</div>\n        </div>\n      `\n      wrapper.title = 'Middle-click to hide block'\n      wrapper.onmouseup = e => {\n        // Hide block with middle click\n        if (e.button === 1) {\n          block.classList.remove('focus')\n        }\n      }\n\n      // Set DOMRect for wrapper\n      wrapper.appendChild(block)\n      wrapper.style.left = left + 'px'\n      wrapper.style.top = top + 'px'\n      htmlHolder.appendChild(wrapper)\n      const { width } = wrapper.getBoundingClientRect()\n      left += width + 30\n      if (left > window.innerWidth) {\n        top += 200\n        left = left % window.innerWidth\n      }\n\n      // Animation for DOMRect\n      animateRectTransition(\n        wrapper,\n        { left: originLeft, top: originTop },\n        { resume: true, duration: 300 },\n      ).finished.finally(() => this.addDraggable(wrapper))\n\n      // Trivial case:\n      // This hack make sure utils remains at the same place even when wrapper resized\n      // Prevent DOMRect changes when user clicking plus/minus button many times\n      const utils = wrapper.querySelector('.utils')\n      utils.onmouseover = () => {\n        const { left, top } = utils.getBoundingClientRect()\n        utils.style.cssText = `visibility: visible; z-index: 9000; position: fixed; transition: unset; left: ${left}px; top: ${top}px;`\n        document.body.appendChild(utils)\n      }\n      utils.onmouseout = () => {\n        wrapper.appendChild(utils)\n        utils.style.cssText = ''\n      }\n\n      // Close button\n      wrapper.querySelector('#close').onclick = () => {\n        block.classList.remove('focus')\n        utils.style.cssText = ''\n      }\n      // Plus/Minus font-size of content\n      wrapper.querySelector('#plus-font-size').onclick = () => {\n        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16\n        block.style.fontSize = `${fontSize + 0.2}rem`\n      }\n      wrapper.querySelector('#minus-font-size').onclick = () => {\n        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16\n        block.style.fontSize = `${fontSize - 0.2}rem`\n      }\n    })\n  }\n\n  /**\n   * leaveHandler.\n   *\n   * @param {}\n   */\n  leaveHandler = ({ htmlHolder, blocks }) => {\n    const resumeFromDraggable = block => {\n      const draggableContainer = block.closest('.draggable-block')\n      if (!draggableContainer) return\n      htmlHolder.appendChild(block)\n      draggableContainer.remove()\n    }\n    blocks.forEach(resumeFromDraggable)\n  }\n}\n","import LeaderLine from 'leader-line'\nimport { insideWindow, insideParent } from './utils'\n\n/**\n * focusNextMap.\n *\n * @param {Boolean} reverse -- focus previous map\n */\nexport function focusNextMap (reverse = false) {\n  const renderedList = this.utils.renderedMaps()\n  const index = renderedList.findIndex(e => e.classList.contains('focus'))\n  const nextIndex = (index + (reverse ? -1 : 1)) % renderedList.length\n\n  const nextMap = renderedList.at(nextIndex)\n  nextMap.classList.add('focus')\n  nextMap.scrollIntoView({ behavior: 'smooth' })\n}\n\n/**\n * focusNextBlock.\n *\n * @param {Boolean} reverse -- focus previous block\n */\nexport function focusNextBlock (reverse = false) {\n  const blocks = this.blocks.filter(b =>\n    b.checkVisibility({\n      contentVisibilityAuto: true,\n      opacityProperty: true,\n      visibilityProperty: true,\n    }),\n  )\n  const index = blocks.findIndex(e => e.classList.contains('focus'))\n  const nextIndex = (index + (reverse ? -1 : 1)) % blocks.length\n\n  blocks.forEach(b => b.classList.remove('focus'))\n  const nextBlock = blocks.at(nextIndex)\n  nextBlock?.classList?.add('focus')\n  scrollToBlock(nextBlock)\n}\n\n/**\n * scrollToBlock. Smoothly scroll to target block.\n * If block is bigger than viewport, then pick strategy wisely.\n *\n * @param {HTMLElement} block -- Scroll to this element\n */\nexport const scrollToBlock = block => {\n  const parentRect = block.parentElement.getBoundingClientRect()\n  const scrollBlock =\n    block.getBoundingClientRect().height > parentRect.height * 0.8\n      ? 'nearest'\n      : 'center'\n  block.scrollIntoView({ behavior: 'smooth', block: scrollBlock })\n}\n\n/**\n * focusDelay. Delay of throttle, value changes by cases\n */\nexport function focusDelay () {\n  return window.window.getComputedStyle(this.showcase).display === 'none' ? 50 : 300\n}\n\n/**\n * switchToNextLayout.\n *\n * @param {Boolean} reverse -- Switch to previous one\n */\nexport function switchToNextLayout (reverse = false) {\n  const layouts = this.layouts\n  const currentLayoutName = this.container.dataset.layout\n  const currentIndex = layouts.map(l => l.name).indexOf(currentLayoutName)\n  const padding = reverse ? -1 : 1\n  const nextIndex =\n    currentIndex === -1\n      ? 0\n      : (currentIndex + padding + layouts.length) % layouts.length\n  const nextLayout = layouts[nextIndex]\n  this.container.dataset.layout = nextLayout.name\n}\n\n/**\n * removeBlockFocus.\n */\nexport function removeBlockFocus () {\n  this.blocks.forEach(b => b.classList.remove('focus'))\n}\n\n/**\n * getMarkersFromMaps. Get marker elements by GeoLink\n *\n * @param {HTMLAnchorElement} link\n * @return {HTMLElement[]} markers\n */\nconst getMarkersFromMaps = link => {\n  const maps = Array.from(\n    link.closest('.Dumby')\n      .querySelectorAll('.mapclay[data-render=\"fulfilled\"]'),\n  )\n  return maps\n    .filter(map => link.targets ? link.targets.includes(map.id) : true)\n    .map(map => {\n      const renderer = map.renderer\n      const markerTitle = `${link.targets ?? 'all'}@${link.xy}`\n\n      return map.querySelector(`.marker[title=\"${markerTitle}\"]`) ??\n        renderer.addMarker({\n          xy: link.xy,\n          title: markerTitle,\n          type: link.type,\n        })\n    })\n}\n\n/**\n * addLeaderLine, from link element to target element\n *\n * @param {HTMLAnchorElement} link\n * @param {Element} target\n */\nconst addLeaderLine = (link, target) => {\n  const line = new LeaderLine({\n    start: link,\n    end: target,\n    hide: true,\n    middleLabel: link.title,\n    path: 'magnet',\n  })\n  line.show('draw', { duration: 300 })\n\n  return line\n}\n\n/**\n * Create geolinks, which points to map by geo schema and id\n *\n * @param {HTMLElement} Elements contains anchor elements for doclinks\n * @returns {Boolean} ture is link is created, false if coordinates are invalid\n */\nexport const createGeoLink = (link) => {\n  const url = new URL(link.href)\n  const xyInParams = url.searchParams.get('xy')?.split(',')?.map(Number)\n  const xy = xyInParams ?? url?.href\n    ?.match(/^geo:([-]?[0-9.]+),([-]?[0-9.]+)/)\n    ?.splice(1)\n    ?.reverse()\n    ?.map(Number)\n\n  if (!xy || isNaN(xy[0]) || isNaN(xy[1])) return false\n\n  // Geo information in link\n  link.url = url\n  link.xy = xy\n  link.classList.add('with-leader-line', 'geolink')\n  link.targets = link.url.searchParams.get('id')?.split(',') ?? null\n  link.type = link.url.searchParams.get('type') ?? null\n\n  link.lines = []\n\n  // LeaderLine\n  link.onmouseover = () => {\n    const anchors = getMarkersFromMaps(link)\n    anchors\n      .filter(isAnchorVisible)\n      .forEach(anchor => {\n        const line = addLeaderLine(link, anchor)\n        link.lines.push(line)\n      })\n  }\n  link.onmouseout = () => removeLeaderLines(link)\n  link.onclick = (event) => {\n    event.preventDefault()\n    removeLeaderLines(link)\n    getMarkersFromMaps(link).forEach(updateMapCameraByMarker(link.xy))\n  }\n  return true\n}\n\n/**\n * CreateDocLink.\n *\n * @param {HTMLElement} Elements contains anchor elements for doclinks\n */\nexport const createDocLink = link => {\n  link.classList.add('with-leader-line', 'doclink')\n  link.lines = []\n\n  link.onmouseover = () => {\n    const label = decodeURIComponent(link.href.split('#')[1])\n    const selector = link.title.split('=>')[1] ?? '#' + label\n    const targets = document.querySelectorAll(selector)\n\n    targets.forEach(target => {\n      if (!target?.checkVisibility()) return\n\n      const line = new LeaderLine({\n        start: link,\n        end: target,\n        middleLabel: LeaderLine.pathLabel({\n          text: label,\n          fontWeight: 'bold',\n        }),\n        hide: true,\n        path: 'magnet',\n      })\n      link.lines.push(line)\n      line.show('draw', { duration: 300 })\n    })\n  }\n  link.onmouseout = () => {\n    link.lines.forEach(line => line.remove())\n    link.lines.length = 0\n  }\n}\n\n/**\n * removeLeaderLines. clean lines start from link\n *\n * @param {HTMLAnchorElement} link\n */\nconst removeLeaderLines = link => {\n  if (!link.lines) return\n  link.lines.forEach(line => line.remove())\n  link.lines = []\n}\n\n/**\n * updateMapByMarker. get function for updating map camera by marker\n *\n * @param {Number[]} xy\n * @return {Function} function\n */\nconst updateMapCameraByMarker = xy => marker => {\n  const renderer = marker.closest('.mapclay')?.renderer\n  renderer.updateCamera({ center: xy }, true)\n}\n\n/**\n * isAnchorVisible. check anchor(marker) is visible for current map camera\n *\n * @param {Element} anchor\n */\nconst isAnchorVisible = anchor => {\n  const mapContainer = anchor.closest('.mapclay')\n  return insideWindow(anchor) && insideParent(anchor, mapContainer)\n}\n\n/**\n * addAnchorByPoint.\n *\n * @param {point} options.point -- object has {x, y} for window coordinates\n * @param {HTMLElement} options.map\n * @param {Function} options.validateAnchorName -- validate anchor name is OK to use\n */\nexport const addAnchorByPoint = ({\n  point,\n  map,\n  validateAnchorName = () => true,\n}) => {\n  const rect = map.getBoundingClientRect()\n  const [x, y] = map.renderer\n    .unproject([point.x - rect.left, point.y - rect.top])\n    .map(coord => Number(coord.toFixed(7)))\n\n  let prompt\n  let anchorName\n\n  do {\n    prompt = prompt ? 'Anchor name exists' : 'Name this anchor'\n    anchorName = window.prompt(prompt, `${x},${y}`)\n  }\n  while (anchorName !== null && !validateAnchorName(anchorName))\n  if (anchorName === null) return\n\n  const desc = window.prompt('Description', anchorName) ?? anchorName\n\n  const link = `geo:${y},${x}?xy=${x},${y}&id=${map.id}&type=circle`\n  map.renderer.addMarker({\n    xy: [x, y],\n    title: `${map.id}@${x},${y}`,\n    type: 'circle',\n  })\n\n  return { ref: anchorName, link, title: desc }\n}\n","import { shiftByWindow } from './utils.mjs'\n\n/**\n * @typedef {Object} RefLink\n * @property {string} ref -- name of link\n * @property {string} link -- content of link\n * @property {string|null} title -- title of link\n */\n\n/**\n * Basic Element for menu item\n *\n * @extends {window.HTMLDivElement}\n */\nexport class Item extends window.HTMLDivElement {\n  /**\n   * Creates a new Item instance\n   *\n   * @param {Object} options - The options for the item\n   * @param {string} [options.text] - The text content of the item\n   * @param {string} [options.innerHTML] - The HTML content of the item\n   * @param {string} [options.title] - The title attribute for the item\n   * @param {Function} [options.onclick] - The click event handler\n   * @param {string} [options.style] - The CSS style string\n   * @param {string[]} [options.className] - Additional CSS classes\n   */\n  constructor ({ text, innerHTML, title, onclick, style, className }) {\n    super()\n    this.innerHTML = innerHTML ?? text\n    this.title = title\n    this.onclick = onclick\n    this.style.cssText = style\n    this.classList.add('menu-item')\n    className?.forEach(c => this.classList.add(c))\n\n    this.onmouseover = () => {\n      this.parentElement\n        .querySelectorAll('.sub-menu')\n        .forEach(sub => sub.remove())\n    }\n  }\n}\nwindow.customElements.define('menu-item', Item, { extends: 'div' })\n\n/**\n * Basic Element for menu item that generates a submenu on hover\n *\n * @extends {window.HTMLDivElement}\n */\nexport class Folder extends window.HTMLDivElement {\n  /**\n   * Creates a new Folder instance\n   *\n   * @param {Object} options - The options for the folder\n   * @param {string} [options.text] - The text content of the folder\n   * @param {string} [options.innerHTML] - The HTML content of the folder\n   * @param {Item[]} options.items - The submenu items\n   */\n  constructor ({ text, innerHTML, items }) {\n    super()\n    this.innerHTML = innerHTML ?? text\n    this.classList.add('folder', 'menu-item')\n    this.items = items\n    this.onmouseover = () => {\n      if (this.querySelector('.sub-menu')) return\n      // Prepare submenu\n      const submenu = document.createElement('div')\n      submenu.className = 'sub-menu'\n      const offset = this.items.length > 1 ? '-20px' : '0px'\n      submenu.style.cssText = `position: absolute; left: 105%; top: ${offset};`\n      this.items.forEach(item => submenu.appendChild(item))\n      submenu.onmouseleave = () => submenu.remove()\n\n      // hover effect\n      this.parentElement\n        .querySelectorAll('.sub-menu')\n        .forEach(sub => sub.remove())\n      this.appendChild(submenu)\n      shiftByWindow(submenu)\n    }\n  }\n}\nwindow.customElements.define('menu-folder', Folder, { extends: 'div' })\n\n/**\n * Creates a menu item for picking a map\n *\n * @param {Object} options - The options object\n * @param {Object} options.utils - Utility functions\n * @returns {Folder} A Folder instance for picking a map\n */\nexport const pickMapItem = ({ utils }) =>\n  new Folder({\n    innerHTML: '<span>Maps<span><span class=\"info\">(Tab)</span>',\n    items: utils.renderedMaps().map(\n      map =>\n        new Item({\n          text: map.id,\n          onclick: () => {\n            map.classList.add('focus')\n            map.scrollIntoView({ behavior: 'smooth' })\n          },\n        }),\n    ),\n  })\n\n/**\n * pickBlockItem.\n *\n * @param {HTMLElement[]} options.blocks\n * @param {Function[]} options.utils\n */\nexport const pickBlockItem = ({ blocks, utils }) =>\n  new Folder({\n    innerHTML: '<span>Blocks<span><span class=\"info\">(n/p)</span>',\n    items: blocks.map(\n      (block, index) => {\n        const focus = block.classList.contains('focus')\n        const preview = block.querySelector('p')\n          ?.textContent.substring(0, 15)\n          ?.concat(' ', '...  ') ?? ''\n\n        return new Item({\n          className: ['keep-menu', focus ? 'checked' : 'unchecked'],\n          innerHTML:\n            `<strong>(${index})</strong><span style='display: inline-block; margin-inline: 1.2em;'>${preview}</span>`,\n          onclick: (e) => {\n            block.classList.toggle('focus')\n\n            const focus = block.classList.contains('focus')\n            if (focus) utils.scrollToBlock(block)\n            const item = e.target.closest('.menu-item.keep-menu')\n            item.classList.add(focus ? 'checked' : 'unchecked')\n            item.classList.remove(focus ? 'unchecked' : 'checked')\n\n            // UX: remove menu after user select/deselect blocks\n            const submenu = e.target.closest('.sub-menu')\n            submenu.onmouseleave = () => { submenu.closest('.menu').style.display = 'none' }\n          },\n        })\n      },\n    ),\n  })\n\n/**\n * pickLayoutItem.\n *\n * @param {HTEMElement} options.container\n * @param {String[]} options.layouts\n */\nexport const pickLayoutItem = ({ container, layouts }) =>\n  new Folder({\n    innerHTML: '<span>Layouts<span><span class=\"info\">(x)</span>',\n    items: [\n      ...layouts.map(\n        layout =>\n          new Item({\n            text: layout.name,\n            onclick: () => container.setAttribute('data-layout', layout.name),\n          }),\n      ),\n      new Item({\n        innerHTML: '<a href=\"https://github.com/outdoorsafetylab/dumbymap#layouts\" class=\"external\" style=\"display: block; padding: 0.5rem;\">More...</a>',\n        style: 'padding: 0;',\n      }),\n    ],\n  })\n\n/**\n * addGeoLink.\n *\n * @param {Function[]} options.utils\n * @param {Range} range\n */\nexport const addGeoLink = ({ utils }, range) =>\n  new Item({\n    text: 'Add GeoLink',\n    onclick: () => {\n      const content = range.toString()\n      // FIXME Apply geolink only on matching sub-range\n      const match = content.match(/(^\\D*[\\d.]+)\\D+([\\d.]+)\\D*$/)\n      if (!match) return false\n\n      const [x, y] = match.slice(1)\n      const anchor = document.createElement('a')\n      anchor.textContent = content\n      // FIXME apply WGS84\n      anchor.href = `geo:${y},${x}?xy=${x},${y}`\n\n      // FIXME\n      if (utils.createGeoLink(anchor)) {\n        range.deleteContents()\n        range.insertNode(anchor)\n      }\n    },\n  })\n\n/**\n * Suggestion. Menu Item for editor suggestion\n *\n * @extends {Item}\n */\nexport class Suggestion extends Item {\n  /**\n   * constructor.\n   *\n   * @param {}\n   */\n  constructor ({ text, replace, cm }) {\n    super({ text })\n    this.replace = replace\n    this.classList.add('suggestion')\n\n    this.onmouseover = () => {\n      Array.from(this.parentElement?.children)?.forEach(s =>\n        s.classList.remove('focus'),\n      )\n      this.classList.add('focus')\n    }\n    this.onmouseout = () => {\n      this.classList.remove('focus')\n    }\n    this.onclick = () => {\n      const anchor = cm.getCursor()\n      cm.setSelection(anchor, { ...anchor, ch: 0 })\n      cm.replaceSelection(this.replace)\n      cm.focus()\n      const newAnchor = { ...anchor, ch: this.replace.length }\n      cm.setCursor(newAnchor)\n    }\n  }\n}\nwindow.customElements.define('menu-item-suggestion', Suggestion, { extends: 'div' })\n\n/**\n * renderResults. return a menu item for reporting render results\n *\n * @param {Object} options.modal -- Ojbect of plain-modal\n * @param {HTMLElement} options.modalContent\n * @param {HTMLElement} map -- Rendered map element\n */\nexport const renderResults = ({ modal, modalContent }, map) =>\n  new Item({\n    text: 'Render Results',\n    onclick: () => {\n      modal.open()\n      modal.overlayBlur = 3\n      modal.closeByEscKey = false\n      // HACK find another way to override inline style\n      document.querySelector('.plainmodal-overlay-force').style.position =\n        'relative'\n\n      modalContent.innerHTML = ''\n      const sourceCode = document.createElement('div')\n      sourceCode.innerHTML = `<a href=\"${map.renderer.url ?? map.renderer.use}\">Source Code</a>`\n      modalContent.appendChild(sourceCode)\n      const printDetails = result => {\n        // const funcBody = result.func.toString()\n        // const loc = funcBody.split('\\n').length\n        const color =\n          {\n            success: 'green',\n            fail: 'red',\n            skip: 'black',\n            stop: 'chocolate',\n          }[result.state] ?? 'black'\n        printObject(\n          result,\n          modalContent,\n          `${result.func.name} <span style='float: right;'><span style='display: inline-block; width: 100px; color: ${color};'>${result.state}</span></span>`,\n        )\n      }\n\n      // Add contents about prepare steps\n      const prepareHeading = document.createElement('h3')\n      prepareHeading.textContent = 'Prepare Steps'\n      modalContent.appendChild(prepareHeading)\n      const prepareSteps = map.renderer.results.filter(\n        r => r.type === 'prepare',\n      )\n      prepareSteps.forEach(printDetails)\n\n      // Add contents about render steps\n      const renderHeading = document.createElement('h3')\n      renderHeading.textContent = 'Render Steps'\n      modalContent.appendChild(renderHeading)\n      const renderSteps = map.renderer.results.filter(r => r.type === 'render')\n      renderSteps.forEach(printDetails)\n    },\n  })\n\n/**\n * printObject. Generate <details> in parent element based on Ojbect properties\n *\n * @param {Object} obj\n * @param {HTMLElement} parentElement\n * @param {String} name\n */\nfunction printObject (obj, parentElement, name = null) {\n  // Create <details> and <summary> inside\n  const detailsEle = document.createElement('details')\n  const details = name ?? (obj instanceof Error ? obj.name : Object.values(obj)[0])\n  detailsEle.innerHTML = `<summary>${details}</summary>`\n  parentElement.appendChild(detailsEle)\n\n  detailsEle.onclick = () => {\n    // Don't add items if it has contents\n    if (detailsEle.querySelector(':scope > :not(summary)')) return\n\n    if (obj instanceof Error) {\n      // Handle Error objects specially\n      const errorProps = ['name', 'message', 'stack', ...Object.keys(obj)]\n      errorProps.forEach(key => {\n        const value = obj[key]\n        const valueString = key === 'stack' ? `<pre>${value}</pre>` : value\n        const propertyElement = document.createElement('p')\n        propertyElement.innerHTML = `<strong>${key}</strong>: ${valueString}`\n        detailsEle.appendChild(propertyElement)\n      })\n    } else {\n      // Handle regular objects\n      Object.entries(obj).forEach(([key, value]) => {\n        if (typeof value === 'object' && value !== null) {\n          printObject(value, detailsEle, key)\n        } else {\n          const valueString =\n            typeof value === 'function'\n              ? `<pre>${value}</pre>`\n              : value ?? typeof value\n          const propertyElement = document.createElement('p')\n          propertyElement.innerHTML = `<strong>${key}</strong>: ${valueString}`\n          detailsEle.appendChild(propertyElement)\n        }\n      })\n    }\n  }\n}\n\n/**\n * toggleBlockFocus. Menu Item for toggling focus on a block\n *\n * @param {HTMLElement} block\n */\nexport const toggleBlockFocus = block =>\n  new Item({\n    text: 'Toggle Focus',\n    onclick: () => block.classList.toggle('focus'),\n  })\n\n/**\n * toggleMapFocus. Menu Item for toggling focus on a map\n *\n * @param {HTMLElement} map\n */\nexport const toggleMapFocus = map =>\n  new Item({\n    text: 'Toggle Focus',\n    onclick: () => map.classList.toggle('focus'),\n  })\n\n/**\n * getCoordinatesByPixels.\n *\n * @param {HTMLElement} map instance\n * @param {Number[]} xy -- pixel of window\n */\nexport const getCoordinatesByPixels = (map, xy) =>\n  new Item({\n    text: 'Get Coordinates',\n    onclick: () => {\n      const [x, y] = map.renderer.unproject(xy)\n      const xyString = `[${x.toFixed(7)}, ${y.toFixed(7)}]`\n      navigator.clipboard.writeText(xyString)\n      window.alert(`${xyString} copied to clipboard`)\n    },\n  })\n\n/**\n * restoreCamera.\n *\n * @param {HTMLElement} map\n */\nexport const restoreCamera = map =>\n  new Item({\n    text: 'Restore Camera',\n    onclick: () => map.renderer.restoreCamera(),\n  })\n\n/**\n * addRefLink. replace selected text into markdown link by reference style links\n *\n * @param {CodeMirror} cm\n * @param {RefLink[]} refLinks\n */\nexport const addRefLink = (cm, refLinks) =>\n  new Folder({\n    text: 'Add Link',\n    items: refLinks.map(refLink => new Item({\n      text: refLink.link.startsWith('geo:') ? `@ ${refLink.ref}` : refLink.ref,\n      title: refLink.link,\n      onclick: () => {\n        const selection = cm.getSelection()\n        if (selection === refLink.ref) {\n          cm.replaceSelection(`[${selection}]`)\n        } else {\n          cm.replaceSelection(`[${selection}][${refLink.ref}]`)\n        }\n      },\n    })),\n  })\n","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * CSSPrefix\n * https://github.com/anseki/cssprefix\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction ucf(text) {\n  return text.substr(0, 1).toUpperCase() + text.substr(1);\n}\n\nvar PREFIXES = ['webkit', 'moz', 'ms', 'o'],\n    NAME_PREFIXES = PREFIXES.reduce(function (prefixes, prefix) {\n  prefixes.push(prefix);\n  prefixes.push(ucf(prefix));\n  return prefixes;\n}, []),\n    VALUE_PREFIXES = PREFIXES.map(function (prefix) {\n  return \"-\".concat(prefix, \"-\");\n}),\n\n/**\n * Get sample CSSStyleDeclaration.\n * @returns {CSSStyleDeclaration}\n */\ngetDeclaration = function () {\n  var declaration;\n  return function () {\n    return declaration = declaration || document.createElement('div').style;\n  };\n}(),\n\n/**\n * Normalize name.\n * @param {} propName - A name that is normalized.\n * @returns {string} A normalized name.\n */\nnormalizeName = function () {\n  var rePrefixedName = new RegExp('^(?:' + PREFIXES.join('|') + ')(.)', 'i'),\n      reUc = /[A-Z]/;\n  return function (propName) {\n    return (propName = (propName + '').replace(/\\s/g, '').replace(/-([\\da-z])/gi, function (str, p1) {\n      return p1.toUpperCase();\n    }) // camelCase\n    // 'ms' and 'Ms' are found by rePrefixedName 'i' option\n    .replace(rePrefixedName, function (str, p1) {\n      return reUc.test(p1) ? p1.toLowerCase() : str;\n    }) // Remove prefix\n    ).toLowerCase() === 'float' ? 'cssFloat' : propName;\n  }; // For old CSSOM\n}(),\n\n/**\n * Normalize value.\n * @param {} propValue - A value that is normalized.\n * @returns {string} A normalized value.\n */\nnormalizeValue = function () {\n  var rePrefixedValue = new RegExp('^(?:' + VALUE_PREFIXES.join('|') + ')', 'i');\n  return function (propValue) {\n    return (propValue != null ? propValue + '' : '').replace(/\\s/g, '').replace(rePrefixedValue, '');\n  };\n}(),\n\n/**\n * Polyfill for `CSS.supports`.\n * @param {string} propName - A name.\n * @param {string} propValue - A value.\n *     Since `CSSStyleDeclaration.setProperty` might return unexpected result,\n *     the `propValue` should be checked before the `cssSupports` is called.\n * @returns {boolean} `true` if given pair is accepted.\n */\ncssSupports = function () {\n  return (// return window.CSS && window.CSS.supports || ((propName, propValue) => {\n    // `CSS.supports` doesn't find prefixed property.\n    function (propName, propValue) {\n      var declaration = getDeclaration(); // In some browsers, `declaration[prop] = value` updates any property.\n\n      propName = propName.replace(/[A-Z]/g, function (str) {\n        return \"-\".concat(str.toLowerCase());\n      }); // kebab-case\n\n      declaration.setProperty(propName, propValue);\n      return declaration[propName] != null && // Because getPropertyValue returns '' if it is unsupported\n      declaration.getPropertyValue(propName) === propValue;\n    }\n  );\n}(),\n    // Cache\npropNames = {},\n    propValues = {};\n\nfunction getName(propName) {\n  propName = normalizeName(propName);\n\n  if (propName && propNames[propName] == null) {\n    var declaration = getDeclaration();\n\n    if (declaration[propName] != null) {\n      // Original\n      propNames[propName] = propName;\n    } else {\n      // Try with prefixes\n      var ucfName = ucf(propName);\n\n      if (!NAME_PREFIXES.some(function (prefix) {\n        var prefixed = prefix + ucfName;\n\n        if (declaration[prefixed] != null) {\n          propNames[propName] = prefixed;\n          return true;\n        }\n\n        return false;\n      })) {\n        propNames[propName] = false;\n      }\n    }\n  }\n\n  return propNames[propName] || void 0;\n}\n\nfunction getValue(propName, propValue) {\n  var res;\n\n  if (!(propName = getName(propName))) {\n    return res;\n  } // Invalid property\n\n\n  propValues[propName] = propValues[propName] || {};\n  (Array.isArray(propValue) ? propValue : [propValue]).some(function (propValue) {\n    propValue = normalizeValue(propValue);\n\n    if (propValues[propName][propValue] != null) {\n      // Cache\n      if (propValues[propName][propValue] !== false) {\n        res = propValues[propName][propValue];\n        return true;\n      }\n\n      return false; // Continue to next value\n    }\n\n    if (cssSupports(propName, propValue)) {\n      // Original\n      res = propValues[propName][propValue] = propValue;\n      return true;\n    }\n\n    if (VALUE_PREFIXES.some(function (prefix) {\n      // Try with prefixes\n      var prefixed = prefix + propValue;\n\n      if (cssSupports(propName, prefixed)) {\n        res = propValues[propName][propValue] = prefixed;\n        return true;\n      }\n\n      return false;\n    })) {\n      return true;\n    }\n\n    propValues[propName][propValue] = false;\n    return false; // Continue to next value\n  });\n  return typeof res === 'string' ? res : void 0; // It might be empty string.\n}\n\nvar CSSPrefix = {\n  getName: getName,\n  getValue: getValue\n};\nexport default CSSPrefix;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * mClassList\n * https://github.com/anseki/m-class-list\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nfunction normalize(token) {\n  return (token + '').trim();\n} // Not `||`\n\n\nfunction applyList(list, element) {\n  element.setAttribute('class', list.join(' '));\n}\n\nfunction _add(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    if (!(token = normalize(token)) || list.indexOf(token) !== -1) {\n      return false;\n    }\n\n    list.push(token);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _remove(list, element, tokens) {\n  if (tokens.filter(function (token) {\n    var i;\n\n    if (!(token = normalize(token)) || (i = list.indexOf(token)) === -1) {\n      return false;\n    }\n\n    list.splice(i, 1);\n    return true;\n  }).length) {\n    applyList(list, element);\n  }\n}\n\nfunction _toggle(list, element, token, force) {\n  var i = list.indexOf(token = normalize(token));\n\n  if (i !== -1) {\n    if (force) {\n      return true;\n    }\n\n    list.splice(i, 1);\n    applyList(list, element);\n    return false;\n  }\n\n  if (force === false) {\n    return false;\n  }\n\n  list.push(token);\n  applyList(list, element);\n  return true;\n}\n\nfunction _replace(list, element, token, newToken) {\n  var i;\n\n  if (!(token = normalize(token)) || !(newToken = normalize(newToken)) || token === newToken || (i = list.indexOf(token)) === -1) {\n    return;\n  }\n\n  list.splice(i, 1);\n\n  if (list.indexOf(newToken) === -1) {\n    list.push(newToken);\n  }\n\n  applyList(list, element);\n}\n\nfunction mClassList(element) {\n  return !mClassList.ignoreNative && element.classList || function () {\n    var list = (element.getAttribute('class') || '').trim().split(/\\s+/).filter(function (token) {\n      return !!token;\n    }),\n        ins = {\n      length: list.length,\n      item: function item(i) {\n        return list[i];\n      },\n      contains: function contains(token) {\n        return list.indexOf(normalize(token)) !== -1;\n      },\n      add: function add() {\n        _add(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      remove: function remove() {\n        _remove(list, element, Array.prototype.slice.call(arguments));\n\n        return mClassList.methodChain ? ins : void 0;\n      },\n      toggle: function toggle(token, force) {\n        return _toggle(list, element, token, force);\n      },\n      replace: function replace(token, newToken) {\n        _replace(list, element, token, newToken);\n\n        return mClassList.methodChain ? ins : void 0;\n      }\n    };\n    return ins;\n  }();\n}\n\nmClassList.methodChain = true;\nexport default mClassList;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\n/*\n * AnimEvent\n * https://github.com/anseki/anim-event\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nvar MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nKEEP_LOOP = 500,\n\n/**\n * @typedef {Object} task\n * @property {Event} event\n * @property {function} listener\n */\n\n/** @type {task[]} */\ntasks = [];\n\nvar requestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\nvar lastFrameTime = Date.now(),\n    requestID;\n\nfunction step() {\n  var called, next;\n\n  if (requestID) {\n    cancelAnim.call(window, requestID);\n    requestID = null;\n  }\n\n  tasks.forEach(function (task) {\n    var event;\n\n    if (event = task.event) {\n      task.event = null; // Clear it before `task.listener()` because that might fire another event.\n\n      task.listener(event);\n      called = true;\n    }\n  });\n\n  if (called) {\n    lastFrameTime = Date.now();\n    next = true;\n  } else if (Date.now() - lastFrameTime < KEEP_LOOP) {\n    // Go on for a while\n    next = true;\n  }\n\n  if (next) {\n    requestID = requestAnim.call(window, step);\n  }\n}\n\nfunction indexOfTasks(listener) {\n  var index = -1;\n  tasks.some(function (task, i) {\n    if (task.listener === listener) {\n      index = i;\n      return true;\n    }\n\n    return false;\n  });\n  return index;\n}\n\nvar AnimEvent = {\n  /**\n   * @param {function} listener - An event listener.\n   * @returns {(function|null)} A wrapped event listener.\n   */\n  add: function add(listener) {\n    var task;\n\n    if (indexOfTasks(listener) === -1) {\n      tasks.push(task = {\n        listener: listener\n      });\n      return function (event) {\n        task.event = event;\n\n        if (!requestID) {\n          step();\n        }\n      };\n    }\n\n    return null;\n  },\n  remove: function remove(listener) {\n    var iRemove;\n\n    if ((iRemove = indexOfTasks(listener)) > -1) {\n      tasks.splice(iRemove, 1);\n\n      if (!tasks.length && requestID) {\n        cancelAnim.call(window, requestID);\n        requestID = null;\n      }\n    }\n  }\n};\nexport default AnimEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * TimedTransition\n * https://github.com/anseki/timed-transition\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\n\nvar STATE_STOPPED = 0,\n    STATE_DELAYING = 1,\n    STATE_PLAYING = 2,\n    PREFIX = 'timed',\n    EVENT_TYPE_RUN = \"\".concat(PREFIX, \"TransitionRun\"),\n    EVENT_TYPE_START = \"\".concat(PREFIX, \"TransitionStart\"),\n    EVENT_TYPE_END = \"\".concat(PREFIX, \"TransitionEnd\"),\n    EVENT_TYPE_CANCEL = \"\".concat(PREFIX, \"TransitionCancel\"),\n    IS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Object} options - Options.\n * @property {Element} element - Target element.\n * @property {Window} window - Window that contains target element.\n * @property {number} duration - Milliseconds from `transition-duration`.\n * @property {number} delay - Milliseconds from `transition-delay`.\n * @property {number} state - Current state.\n * @property {boolean} isOn - `on` was called and `off` is not called yet. It is changed by only on/off.\n * @property {number} runTime - 0, or Date.now() when EVENT_TYPE_RUN.\n * @property {number} startTime - 0, or Date.now() when EVENT_TYPE_START. It might not be runTime + delay.\n * @property {number} currentPosition - A time elapsed from initial state, in milliseconds.\n * @property {boolean} isReversing - The current playing is reversing when STATE_PLAYING.\n * @property {number} timer - Timer ID.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {};\n\nvar insId = 0;\n/**\n * @param {props} props - `props` of instance.\n * @param {string} type - One of EVENT_TYPE_*.\n * @returns {void}\n */\n\nfunction fireEvent(props, type) {\n  var initTime = Math.min(Math.max(-props.delay, 0), props.duration),\n      elapsedTime = (initTime + ( // The value for transitionend might NOT be transition-duration. (csswg.org may be wrong)\n  (type === EVENT_TYPE_END || type === EVENT_TYPE_CANCEL) && props.startTime ? Date.now() - props.startTime : 0)) / 1000;\n  var event;\n\n  try {\n    event = new props.window.TransitionEvent(type, {\n      propertyName: props.options.property,\n      pseudoElement: props.options.pseudoElement,\n      elapsedTime: elapsedTime,\n      bubbles: true,\n      cancelable: false\n    }); // Edge bug, can't set pseudoElement\n\n    if (IS_EDGE) {\n      event.pseudoElement = props.options.pseudoElement;\n    }\n  } catch (error) {\n    event = props.window.document.createEvent('TransitionEvent');\n    event.initTransitionEvent(type, true, false, props.options.property, elapsedTime);\n    event.pseudoElement = props.options.pseudoElement;\n  }\n\n  event.timedTransition = props.ins;\n  props.element.dispatchEvent(event);\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction fixCurrentPosition(props) {\n  if (props.state !== STATE_PLAYING) {\n    return;\n  }\n\n  var playingTime = Date.now() - props.startTime;\n  props.currentPosition = props.isOn ? Math.min(props.currentPosition + playingTime, props.duration) : Math.max(props.currentPosition - playingTime, 0);\n}\n/**\n * Finish the \"on/off\" immediately by isOn.\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishAll(props) {\n  props.state = STATE_STOPPED;\n  props.runTime = 0;\n  props.startTime = 0;\n  props.currentPosition = props.isOn ? props.duration : 0;\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishPlaying(props) {\n  if (props.state !== STATE_PLAYING) {\n    return;\n  }\n\n  props.state = STATE_STOPPED;\n  fireEvent(props, EVENT_TYPE_END);\n  finishAll(props);\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction finishDelaying(props) {\n  if (props.state !== STATE_DELAYING) {\n    return;\n  }\n\n  props.state = STATE_PLAYING;\n  props.startTime = Date.now();\n  props.isReversing = !props.isOn;\n  fireEvent(props, EVENT_TYPE_START);\n  var durationLeft = props.isOn ? props.duration - props.currentPosition : props.currentPosition;\n\n  if (durationLeft > 0) {\n    props.timer = setTimeout(function () {\n      finishPlaying(props);\n    }, durationLeft);\n  } else {\n    finishPlaying(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction abort(props) {\n  clearTimeout(props.timer);\n\n  if (props.state === STATE_STOPPED) {\n    return;\n  }\n\n  props.state = STATE_STOPPED;\n  fireEvent(props, EVENT_TYPE_CANCEL);\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} force - Skip transition.\n * @param {Array} args - Arguments that are passed to procToOn.\n * @returns {void}\n */\n\n\nfunction _on(props, force, args) {\n  if (props.isOn && props.state === STATE_STOPPED || props.isOn && props.state !== STATE_STOPPED && !force) {\n    return;\n  }\n  /*\n    Cases:\n      - Done `off` or playing to `off`, regardless of `force`\n      - Playing to `on` and `force`\n  */\n\n\n  if (props.options.procToOn) {\n    args.unshift(!!force);\n    props.options.procToOn.apply(props.ins, args);\n  }\n\n  if (force || !props.isOn && props.state === STATE_DELAYING || -props.delay > props.duration) {\n    // The delay must have not changed before turning over.\n    abort(props);\n    props.isOn = true;\n    finishAll(props);\n  } else {\n    fixCurrentPosition(props);\n    abort(props);\n    props.state = STATE_DELAYING;\n    props.isOn = true;\n    props.runTime = Date.now();\n    props.startTime = 0;\n    fireEvent(props, EVENT_TYPE_RUN);\n\n    if (props.delay > 0) {\n      props.timer = setTimeout(function () {\n        finishDelaying(props);\n      }, props.delay);\n    } else {\n      if (props.delay < 0) {\n        // Move the position to the right.\n        props.currentPosition = Math.min(props.currentPosition - props.delay, props.duration);\n      }\n\n      finishDelaying(props);\n    }\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} force - Skip transition.\n * @param {Array} args - Arguments that are passed to procToOff.\n * @returns {void}\n */\n\n\nfunction _off(props, force, args) {\n  if (!props.isOn && props.state === STATE_STOPPED || !props.isOn && props.state !== STATE_STOPPED && !force) {\n    return;\n  }\n  /*\n    Cases:\n      - Done `on` or playing to `on`, regardless of `force`\n      - Playing to `off` and `force`\n  */\n\n\n  if (props.options.procToOff) {\n    args.unshift(!!force);\n    props.options.procToOff.apply(props.ins, args);\n  }\n\n  if (force || props.isOn && props.state === STATE_DELAYING || -props.delay > props.duration) {\n    // The delay must have not changed before turning over.\n    abort(props);\n    props.isOn = false;\n    finishAll(props);\n  } else {\n    fixCurrentPosition(props);\n    abort(props);\n    props.state = STATE_DELAYING;\n    props.isOn = false;\n    props.runTime = Date.now();\n    props.startTime = 0;\n    fireEvent(props, EVENT_TYPE_RUN);\n\n    if (props.delay > 0) {\n      props.timer = setTimeout(function () {\n        finishDelaying(props);\n      }, props.delay);\n    } else {\n      if (props.delay < 0) {\n        // Move the position to the left.\n        props.currentPosition = Math.max(props.currentPosition + props.delay, 0);\n      }\n\n      finishDelaying(props);\n    }\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n\n  function parseAsCss(option) {\n    var optionValue = typeof newOptions[option] === 'number' // From CSS\n    ? (props.window.getComputedStyle(props.element, '')[CSSPrefix.getName(\"transition-\".concat(option))] || '').split(',')[newOptions[option]] : newOptions[option];\n    return typeof optionValue === 'string' ? optionValue.trim() : null;\n  } // pseudoElement\n\n\n  if (typeof newOptions.pseudoElement === 'string') {\n    options.pseudoElement = newOptions.pseudoElement;\n  } // property\n\n\n  {\n    var value = parseAsCss('property');\n\n    if (typeof value === 'string' && value !== 'all' && value !== 'none') {\n      options.property = value;\n    }\n  } // duration, delay\n\n  ['duration', 'delay'].forEach(function (option) {\n    var value = parseAsCss(option);\n\n    if (typeof value === 'string') {\n      var matches, timeValue;\n\n      if (/^[0.]+$/.test(value)) {\n        // This is invalid for CSS.\n        options[option] = '0s';\n        props[option] = 0;\n      } else if ((matches = /^(.+?)(m)?s$/.exec(value)) && isFinite(timeValue = parseFloat(matches[1])) && (option !== 'duration' || timeValue >= 0)) {\n        options[option] = \"\".concat(timeValue).concat(matches[2] || '', \"s\");\n        props[option] = timeValue * (matches[2] ? 1 : 1000);\n      }\n    }\n  }); // procToOn, procToOff\n\n  ['procToOn', 'procToOff'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nvar TimedTransition = /*#__PURE__*/function () {\n  /**\n   * Create a `TimedTransition` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   * @param {boolean} [initOn] - Initial `on`.\n   */\n  function TimedTransition(element, options, initOn) {\n    _classCallCheck(this, TimedTransition);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        pseudoElement: '',\n        property: ''\n      },\n      duration: 0,\n      delay: 0,\n      isOn: !!initOn\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!element.nodeType || element.nodeType !== Node.ELEMENT_NODE) {\n      throw new Error('This `element` is not accepted.');\n    }\n\n    props.element = element;\n\n    if (!options) {\n      options = {};\n    }\n\n    props.window = element.ownerDocument.defaultView || options.window || window; // Default options\n\n    if (!options.hasOwnProperty('property')) {\n      options.property = 0;\n    }\n\n    if (!options.hasOwnProperty('duration')) {\n      options.duration = 0;\n    }\n\n    if (!options.hasOwnProperty('delay')) {\n      options.delay = 0;\n    }\n\n    _setOptions(props, options);\n\n    finishAll(props);\n  }\n\n  _createClass(TimedTransition, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      clearTimeout(props.timer);\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (options) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Set `on`.\n     * @param {boolean} [force] - Set `on` it immediately without transition.\n     * @param {Object} [options] - New options.\n     * @param {...{}} [args] - Arguments that are passed to procToOn.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"on\",\n    value: function on(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _on(insProps[this._id], force, Array.prototype.slice.call(arguments, 2));\n\n      return this;\n    }\n    /**\n     * Set 'off'.\n     * @param {boolean} [force] - Set `off` it immediately without transition.\n     * @param {Object} [options] - New options.\n     * @param {...{}} [args] - Arguments that are passed to procToOff.\n     * @returns {TimedTransition} Current instance itself.\n     */\n\n  }, {\n    key: \"off\",\n    value: function off(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _off(insProps[this._id], force, Array.prototype.slice.call(arguments, 2));\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"isReversing\",\n    get: function get() {\n      return insProps[this._id].isReversing;\n    }\n  }, {\n    key: \"pseudoElement\",\n    get: function get() {\n      return insProps[this._id].options.pseudoElement;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        pseudoElement: value\n      });\n    }\n  }, {\n    key: \"property\",\n    get: function get() {\n      return insProps[this._id].options.property;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        property: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"delay\",\n    get: function get() {\n      return insProps[this._id].options.delay;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        delay: value\n      });\n    }\n  }, {\n    key: \"procToOn\",\n    get: function get() {\n      return insProps[this._id].options.procToOn;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        procToOn: value\n      });\n    }\n  }, {\n    key: \"procToOff\",\n    get: function get() {\n      return insProps[this._id].options.procToOff;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        procToOff: value\n      });\n    }\n  }], [{\n    key: \"STATE_STOPPED\",\n    get: function get() {\n      return STATE_STOPPED;\n    }\n  }, {\n    key: \"STATE_DELAYING\",\n    get: function get() {\n      return STATE_DELAYING;\n    }\n  }, {\n    key: \"STATE_PLAYING\",\n    get: function get() {\n      return STATE_PLAYING;\n    }\n  }]);\n\n  return TimedTransition;\n}();\n\nexport default TimedTransition;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PlainOverlay\n * https://anseki.github.io/plain-overlay/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nimport TimedTransition from 'timed-transition';\n/* Static ESM */ /* import CSS_TEXT from './default.scss' */ var CSS_TEXT = \".plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01,.plainoverlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainoverlay{position:absolute;left:0;top:0;overflow:hidden;background-color:rgba(136,136,136,.6);cursor:wait;z-index:9000;transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:0}.plainoverlay.plainoverlay-show{opacity:1}.plainoverlay.plainoverlay-force{transition-property:none}.plainoverlay.plainoverlay-hide{display:none}.plainoverlay.plainoverlay-doc{position:fixed;left:-200px;top:-200px;overflow:visible;padding:200px;width:100vw;height:100vh}.plainoverlay-body{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.plainoverlay.plainoverlay-doc .plainoverlay-body{width:100vw;height:100vh}.plainoverlay-builtin-face{width:90%;height:90%;max-width:320px;max-height:320px}#plainoverlay-builtin-face-defs{width:0;height:0;position:fixed;left:-100px;top:-100px}#plainoverlay-builtin-face_01 circle,#plainoverlay-builtin-face_01 path{fill:none;stroke-width:40px}#plainoverlay-builtin-face_01 circle{stroke:#fff;opacity:.25}#plainoverlay-builtin-face_01 path{stroke-linecap:round}.plainoverlay:not(.plainoverlay-hide) .plainoverlay-builtin-face_01{-webkit-animation-name:plainoverlay-builtin-face_01-spin;animation-name:plainoverlay-builtin-face_01-spin;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes plainoverlay-builtin-face_01-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}\"; // [FACE]\n\n/* Static ESM */ /* import FACE_DEFS from './face.html?tag=defs' */ var FACE_DEFS = \"<svg id=\\\"plainoverlay-builtin-face-defs\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\" version=\\\"1.1\\\"><defs><linearGradient id=\\\"plainoverlay-builtin-face_01-grad\\\" gradientUnits=\\\"userSpaceOnUse\\\" x1=\\\"160\\\" y1=\\\"20\\\" x2=\\\"300\\\" y2=\\\"160\\\"><stop offset=\\\"0\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"0\\\"/><stop offset=\\\"0.2\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"0.1\\\"/><stop offset=\\\"1\\\" stop-color=\\\"#fff\\\" stop-opacity=\\\"1\\\"/></linearGradient><g id=\\\"plainoverlay-builtin-face_01\\\"><circle cx=\\\"160\\\" cy=\\\"160\\\" r=\\\"140\\\"/><path d=\\\"M160 20a140 140 0 0 1 140 140\\\" stroke=\\\"url('#plainoverlay-builtin-face_01-grad')\\\"/></g></defs></svg>\";\n/* Static ESM */ /* import FACE_01 from './face.html?tag=face_01' */ var FACE_01 = \"<svg class=\\\"plainoverlay-builtin-face plainoverlay-builtin-face_01\\\" version=\\\"1.1\\\" viewBox=\\\"0 0 320 320\\\"><use xlink:href=\\\"#plainoverlay-builtin-face_01\\\"/></svg>\"; // [/FACE]\n\nmClassList.ignoreNative = true;\n\nvar APP_ID = 'plainoverlay',\n    STYLE_ELEMENT_ID = \"\".concat(APP_ID, \"-style\"),\n    STYLE_CLASS = APP_ID,\n    STYLE_CLASS_DOC = \"\".concat(APP_ID, \"-doc\"),\n    STYLE_CLASS_SHOW = \"\".concat(APP_ID, \"-show\"),\n    STYLE_CLASS_HIDE = \"\".concat(APP_ID, \"-hide\"),\n    STYLE_CLASS_FORCE = \"\".concat(APP_ID, \"-force\"),\n    STYLE_CLASS_BODY = \"\".concat(APP_ID, \"-body\"),\n    FACE_DEFS_ELEMENT_ID = \"\".concat(APP_ID, \"-builtin-face-defs\"),\n    STATE_HIDDEN = 0,\n    STATE_SHOWING = 1,\n    STATE_SHOWN = 2,\n    STATE_HIDING = 3,\n    // DURATION = 2500, // COPY: default.scss\nDURATION = 200,\n    // COPY: default.scss\nTOLERANCE = 0.5,\n    IS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Element} elmTarget - Target element.\n * @property {Element} elmTargetBody - Target body element.\n * @property {Element} elmOverlay - Overlay element.\n * @property {Element} elmOverlayBody - Overlay body element.\n * @property {boolean} isDoc - `true` if target is document.\n * @property {Window} window - Window that conatins target element.\n * @property {HTMLDocument} document - Document that conatins target element.\n * @property {TimedTransition} transition - TimedTransition instance.\n * @property {number} state - Current state.\n * @property {Object} options - Options.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {};\n\nvar insId = 0;\n\nfunction forceReflow(target) {\n  // Trident and Blink bug (reflow like `offsetWidth` can't update)\n  setTimeout(function () {\n    var parent = target.parentNode,\n        next = target.nextSibling; // It has to be removed first for Blink.\n\n    parent.insertBefore(parent.removeChild(target), next);\n  }, 0);\n}\n/**\n * Set style properties while saving current properties.\n * @param {Element} element - Target element.\n * @param {Object} styleProps - New style properties.\n * @param {(Object|null)} savedStyleProps - Current style properties holder.\n * @param {Array} [propNames] - Names of target properties.\n * @returns {Element} Target element itself.\n */\n\n\nfunction setStyle(element, styleProps, savedStyleProps, propNames) {\n  var style = element.style;\n  (propNames || Object.keys(styleProps)).forEach(function (prop) {\n    if (styleProps[prop] != null) {\n      if (savedStyleProps && savedStyleProps[prop] == null) {\n        savedStyleProps[prop] = style[prop];\n      }\n\n      style[prop] = styleProps[prop];\n      styleProps[prop] = null;\n    }\n  });\n  return element;\n}\n/**\n * Restore saved style properties.\n * @param {Element} element - Target element.\n * @param {Object} savedStyleProps - Saved style properties.\n * @param {Array} [propNames] - Names of properties that is restored.\n * @returns {Element} Target element itself.\n */\n\n\nfunction restoreStyle(element, savedStyleProps, propNames) {\n  return setStyle(element, savedStyleProps, null, propNames);\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * Get an element's bounding-box that contains coordinates relative to the element's document or window.\n * @param {Element} element - Target element.\n * @param {Window} [window] - Whether it's relative to the element's window, or document.\n * @returns {(BBox|null)} A bounding-box or null when failed.\n */\n\n\nfunction getBBox(element, window) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    right: rect.right,\n    bottom: rect.bottom,\n    width: rect.width,\n    height: rect.height\n  };\n\n  if (window) {\n    bBox.left += window.pageXOffset;\n    bBox.right += window.pageXOffset;\n    bBox.top += window.pageYOffset;\n    bBox.bottom += window.pageYOffset;\n  }\n\n  return bBox;\n}\n\nfunction scrollLeft(element, isDoc, window, value) {\n  if (isDoc) {\n    if (value != null) {\n      window.scrollTo(value, window.pageYOffset);\n    }\n\n    return window.pageXOffset;\n  }\n\n  if (value != null) {\n    element.scrollLeft = value;\n  }\n\n  return element.scrollLeft;\n}\n\nfunction scrollTop(element, isDoc, window, value) {\n  if (isDoc) {\n    if (value != null) {\n      window.scrollTo(window.pageXOffset, value);\n    }\n\n    return window.pageYOffset;\n  }\n\n  if (value != null) {\n    element.scrollTop = value;\n  }\n\n  return element.scrollTop;\n}\n\nfunction resizeTarget(props, width, height) {\n  var elmTargetBody = props.elmTargetBody;\n  var rect = elmTargetBody.getBoundingClientRect();\n\n  if (Math.abs(rect.width - width) < TOLERANCE && Math.abs(rect.height - height) < TOLERANCE) {\n    return;\n  }\n\n  var targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, ''),\n      boxSizing = targetBodyCmpStyle.boxSizing,\n      includeProps = boxSizing === 'border-box' ? [] : boxSizing === 'padding-box' ? ['border'] : ['border', 'padding'],\n      // content-box\n  PROP_NAMES = {\n    border: {\n      width: ['borderLeftWidth', 'borderRightWidth'],\n      height: ['borderTopWidth', 'borderBottomWidth']\n    },\n    padding: {\n      width: ['paddingLeft', 'paddingRight'],\n      height: ['paddingTop', 'paddingBottom']\n    }\n  },\n      values = ['width', 'height'].reduce(function (values, dir) {\n    includeProps.forEach(function (part) {\n      PROP_NAMES[part][dir].forEach(function (propName) {\n        values[dir] -= parseFloat(targetBodyCmpStyle[propName]);\n      });\n    });\n    return values;\n  }, {\n    width: width,\n    height: height\n  }); // Since the `width` and `height` might change each other, fix both.\n\n  setStyle(elmTargetBody, {\n    // The value might be negative number when size is too small.\n    width: values.width > 0 ? \"\".concat(values.width, \"px\") : 0,\n    height: values.height > 0 ? \"\".concat(values.height, \"px\") : 0\n  }, props.savedStyleTargetBody); // In some browsers, getComputedStyle might return computed values that is not px instead of used values.\n\n  var fixStyle = {};\n  rect = elmTargetBody.getBoundingClientRect();\n\n  if (Math.abs(rect.width - width) >= TOLERANCE) {\n    fixStyle.width = \"\".concat(values.width - (rect.width - width), \"px\");\n  }\n\n  if (rect.height !== height) {\n    fixStyle.height = \"\".concat(values.height - (rect.height - height), \"px\");\n  }\n\n  setStyle(elmTargetBody, fixStyle, props.savedStyleTargetBody);\n} // Trident and Edge bug, width and height are interchanged.\n\n\nfunction getDocClientWH(props) {\n  var elmTarget = props.elmTarget,\n      width = elmTarget.clientWidth,\n      height = elmTarget.clientHeight;\n\n  if (IS_TRIDENT || IS_EDGE) {\n    var targetBodyCmpStyle = props.window.getComputedStyle(props.elmTargetBody, ''),\n        wMode = targetBodyCmpStyle.writingMode || targetBodyCmpStyle['writing-mode'],\n        // Trident bug\n    direction = targetBodyCmpStyle.direction;\n    return wMode === 'tb-rl' || wMode === 'bt-rl' || wMode === 'tb-lr' || wMode === 'bt-lr' || IS_EDGE && (direction === 'ltr' && (wMode === 'vertical-rl' || wMode === 'vertical-lr') || direction === 'rtl' && (wMode === 'vertical-rl' || wMode === 'vertical-lr')) ? {\n      width: height,\n      height: width\n    } : // interchange\n    {\n      width: width,\n      height: height\n    };\n  }\n\n  return {\n    width: width,\n    height: height\n  };\n}\n\nfunction restoreScroll(props, element) {\n  function scrollElement(element, isDoc, left, top) {\n    try {\n      scrollLeft(element, isDoc, props.window, left);\n      scrollTop(element, isDoc, props.window, top);\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n  }\n\n  if (element) {\n    return props.savedElementsScroll.some(function (elementScroll) {\n      if (elementScroll.element === element) {\n        scrollElement(elementScroll.element, elementScroll.isDoc, elementScroll.left, elementScroll.top);\n        return true;\n      }\n\n      return false;\n    }); // eslint-disable-line semi-style\n  }\n\n  props.savedElementsScroll.forEach(function (elementScroll) {\n    scrollElement(elementScroll.element, elementScroll.isDoc, elementScroll.left, elementScroll.top);\n  });\n  return true;\n}\n\nfunction restoreAccKeys(props) {\n  props.savedElementsAccKeys.forEach(function (elementAccKeys) {\n    try {\n      if (elementAccKeys.tabIndex === false) {\n        elementAccKeys.element.removeAttribute('tabindex');\n      } else if (elementAccKeys.tabIndex != null) {\n        elementAccKeys.element.tabIndex = elementAccKeys.tabIndex;\n      }\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n\n    try {\n      if (elementAccKeys.accessKey) {\n        elementAccKeys.element.accessKey = elementAccKeys.accessKey;\n      }\n    } catch (error) {\n      /* Something might have been changed, and that can be ignored. */\n    }\n  });\n}\n\nfunction avoidFocus(props, element) {\n  if (props.isDoc && element !== element.ownerDocument.body && !(props.elmOverlay.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY) || !props.isDoc && (element === props.elmTargetBody || props.elmTargetBody.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY)) {\n    if (element.blur) {\n      // Trident and Edge don't support SVG#blur\n      element.blur();\n    } else {\n      element.ownerDocument.body.focus();\n    }\n\n    return true;\n  }\n\n  return false;\n} // Selection.containsNode polyfill for Trident\n\n\nfunction selContainsNode(selection, node, partialContainment) {\n  var nodeRange = node.ownerDocument.createRange(),\n      iLen = selection.rangeCount;\n  nodeRange.selectNodeContents(node);\n\n  for (var i = 0; i < iLen; i++) {\n    var selRange = selection.getRangeAt(i); // Edge bug (Issue #7321753); getRangeAt returns empty (collapsed) range\n    // NOTE: It can not recover when the selection has multiple ranges.\n\n    if (!selRange.toString().length && selection.toString().length && iLen === 1) {\n      selRange.setStart(selection.anchorNode, selection.anchorOffset);\n      selRange.setEnd(selection.focusNode, selection.focusOffset); // Edge doesn't throw when end is upper than start.\n\n      if (selRange.toString() !== selection.toString()) {\n        selRange.setStart(selection.focusNode, selection.focusOffset);\n        selRange.setEnd(selection.anchorNode, selection.anchorOffset);\n\n        if (selRange.toString() !== selection.toString()) {\n          throw new Error('Edge bug (Issue #7321753); Couldn\\'t recover');\n        }\n      }\n    }\n\n    if (partialContainment ? selRange.compareBoundaryPoints(Range.START_TO_END, nodeRange) >= 0 && selRange.compareBoundaryPoints(Range.END_TO_START, nodeRange) <= 0 : selRange.compareBoundaryPoints(Range.START_TO_START, nodeRange) < 0 && selRange.compareBoundaryPoints(Range.END_TO_END, nodeRange) > 0) {\n      return true;\n    }\n  }\n\n  return false;\n}\n/**\n * Indicates whether the selection is part of the node or not.\n * @param {Node} node - Target node.\n * @param {Selection} selection - The parsed selection.\n * @returns {boolean} `true` if all ranges of `selection` are part of `node`.\n */\n\n\nfunction nodeContainsSel(node, selection) {\n  var nodeRange = node.ownerDocument.createRange(),\n      iLen = selection.rangeCount;\n  nodeRange.selectNode(node);\n\n  for (var i = 0; i < iLen; i++) {\n    var selRange = selection.getRangeAt(i);\n\n    if (selRange.compareBoundaryPoints(Range.START_TO_START, nodeRange) < 0 || selRange.compareBoundaryPoints(Range.END_TO_END, nodeRange) > 0) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nfunction avoidSelect(props) {\n  var selection = ('getSelection' in window ? props.window : props.document).getSelection();\n\n  if (selection.rangeCount && (props.isDoc ? !nodeContainsSel(props.elmOverlayBody, selection) : selection.containsNode && (!IS_BLINK || !selection.isCollapsed) // Blink bug, fails with empty string.\n  ? selection.containsNode(props.elmTargetBody, true) : selContainsNode(selection, props.elmTargetBody, true))) {\n    try {\n      selection.removeAllRanges(); // Trident bug?, `Error:800a025e` comes sometime\n    } catch (error) {\n      /* ignore */\n    }\n\n    props.document.body.focus(); // Trident bug? It seems that `focus()` makes selection again.\n\n    if (selection.rangeCount > 0) {\n      try {\n        selection.removeAllRanges(); // Trident bug?, `Error:800a025e` comes sometime\n      } catch (error) {\n        /* ignore */\n      }\n    }\n\n    return true;\n  }\n\n  return false;\n}\n\nfunction barLeft(wMode, direction) {\n  var svgSpec = wMode === 'rl-tb' || wMode === 'tb-rl' || wMode === 'bt-rl' || wMode === 'rl-bt';\n  return IS_TRIDENT && svgSpec || IS_EDGE && (svgSpec || direction === 'rtl' && (wMode === 'horizontal-tb' || wMode === 'vertical-rl') || direction === 'ltr' && wMode === 'vertical-rl');\n}\n\nfunction barTop(wMode, direction) {\n  var svgSpec = wMode === 'bt-rl' || wMode === 'bt-lr' || wMode === 'lr-bt' || wMode === 'rl-bt';\n  return IS_TRIDENT && svgSpec || IS_EDGE && (svgSpec || direction === 'rtl' && (wMode === 'vertical-lr' || wMode === 'vertical-rl'));\n}\n\nfunction disableDocBars(props) {\n  var elmTarget = props.elmTarget,\n      elmTargetBody = props.elmTargetBody,\n      targetBodyRect = elmTargetBody.getBoundingClientRect(); // Get size of each scrollbar.\n\n  var clientWH = getDocClientWH(props),\n      barV = -clientWH.width,\n      barH = -clientWH.height; // elmTarget.clientWidth/clientHeight\n\n  setStyle(elmTarget, {\n    overflow: 'hidden'\n  }, props.savedStyleTarget);\n  clientWH = getDocClientWH(props);\n  barV += clientWH.width;\n  barH += clientWH.height;\n\n  if (barV || barH) {\n    var targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, '');\n    var propV, propH; // There is no way to get absolute position of document.\n    // We need distance between the document and its window, or a method like `element.screenX`\n    // that gets absolute position of an element.\n    // For the moment, Trident and Edge make a scrollbar at the left/top side when RTL document\n    // or CJK vertical document is rendered.\n\n    if (IS_TRIDENT || IS_EDGE) {\n      var wMode = targetBodyCmpStyle.writingMode || targetBodyCmpStyle['writing-mode'],\n          // Trident bug\n      direction = targetBodyCmpStyle.direction;\n\n      if (barV) {\n        propV = barLeft(wMode, direction) ? 'marginLeft' : 'marginRight';\n      }\n\n      if (barH) {\n        propH = barTop(wMode, direction) ? 'marginTop' : 'marginBottom';\n      }\n    } else {\n      if (barV) {\n        propV = 'marginRight';\n      }\n\n      if (barH) {\n        propH = 'marginBottom';\n      }\n    }\n\n    var addStyle = {};\n\n    if (barV) {\n      addStyle[propV] = \"\".concat(parseFloat(targetBodyCmpStyle[propV]) + barV, \"px\");\n    }\n\n    if (barH) {\n      addStyle[propH] = \"\".concat(parseFloat(targetBodyCmpStyle[propH]) + barH, \"px\");\n    }\n\n    setStyle(elmTargetBody, addStyle, props.savedStyleTargetBody);\n    resizeTarget(props, targetBodyRect.width, targetBodyRect.height); // `overflow: 'hidden'` might change scroll.\n\n    restoreScroll(props, elmTarget);\n    return true;\n  }\n\n  restoreStyle(elmTarget, props.savedStyleTarget, ['overflow']);\n  return false;\n}\n\nfunction _position(props, targetBodyBBox) {\n  var elmTargetBody = props.elmTargetBody,\n      targetBodyCmpStyle = props.window.getComputedStyle(elmTargetBody, ''),\n      elmOverlay = props.elmOverlay,\n      overlayCmpStyle = props.window.getComputedStyle(elmOverlay, ''),\n      overlayBBox = getBBox(elmOverlay, props.window),\n      borders = ['Top', 'Right', 'Bottom', 'Left'].reduce(function (borders, prop) {\n    borders[prop.toLowerCase()] = parseFloat(targetBodyCmpStyle[\"border\".concat(prop, \"Width\")]);\n    return borders;\n  }, {}),\n      // Get distance between document and origin of `elmOverlay`.\n  offset = {\n    left: overlayBBox.left - parseFloat(overlayCmpStyle.left),\n    top: overlayBBox.top - parseFloat(overlayCmpStyle.top)\n  },\n      style = {\n    left: \"\".concat(targetBodyBBox.left - offset.left + borders.left, \"px\"),\n    top: \"\".concat(targetBodyBBox.top - offset.top + borders.top, \"px\"),\n    width: \"\".concat(targetBodyBBox.width - borders.left - borders.right, \"px\"),\n    height: \"\".concat(targetBodyBBox.height - borders.top - borders.bottom, \"px\")\n  },\n      reValue = /^([\\d.]+)(px|%)$/; // border-radius\n\n  [{\n    prop: 'TopLeft',\n    hBorder: 'left',\n    vBorder: 'top'\n  }, {\n    prop: 'TopRight',\n    hBorder: 'right',\n    vBorder: 'top'\n  }, {\n    prop: 'BottomRight',\n    hBorder: 'right',\n    vBorder: 'bottom'\n  }, {\n    prop: 'BottomLeft',\n    hBorder: 'left',\n    vBorder: 'bottom'\n  }].forEach(function (corner) {\n    var prop = CSSPrefix.getName(\"border\".concat(corner.prop, \"Radius\")),\n        values = targetBodyCmpStyle[prop].split(' ');\n    var h = values[0],\n        v = values[1] || values[0],\n        matches = reValue.exec(h);\n    h = !matches ? 0 : matches[2] === 'px' ? +matches[1] : matches[1] * targetBodyBBox.width / 100;\n    matches = reValue.exec(v);\n    v = !matches ? 0 : matches[2] === 'px' ? +matches[1] : matches[1] * targetBodyBBox.height / 100;\n    h -= borders[corner.hBorder];\n    v -= borders[corner.vBorder];\n\n    if (h > 0 && v > 0) {\n      style[prop] = \"\".concat(h, \"px \").concat(v, \"px\");\n    }\n  });\n  setStyle(elmOverlay, style);\n  props.targetBodyBBox = targetBodyBBox;\n}\n\nfunction getTargetElements(props) {\n  var elmTargetBody = props.elmTargetBody,\n      elmOverlay = props.elmOverlay,\n      targetElements = [props.elmTarget];\n\n  if (props.isDoc) {\n    targetElements.push(elmTargetBody);\n    Array.prototype.slice.call(elmTargetBody.childNodes).forEach(function (childNode) {\n      if (childNode.nodeType === Node.ELEMENT_NODE && childNode !== elmOverlay && !mClassList(childNode).contains(STYLE_CLASS) && childNode.id !== FACE_DEFS_ELEMENT_ID) {\n        targetElements.push(childNode);\n        Array.prototype.push.apply(targetElements, childNode.querySelectorAll('*'));\n      }\n    });\n  } else {\n    Array.prototype.push.apply(targetElements, elmTargetBody.querySelectorAll('*'));\n  }\n\n  return targetElements;\n}\n\nfunction finishShowing(props) {\n  // blur\n  props.filterElements = null;\n\n  if (props.options.blur !== false) {\n    var propName = CSSPrefix.getName('filter'),\n        propValue = CSSPrefix.getValue('filter', \"blur(\".concat(props.options.blur, \"px)\"));\n\n    if (propValue) {\n      // undefined if no propName\n      // Array of {element: element, savedStyle: {}}\n      var filterElements = props.isDoc ? Array.prototype.slice.call(props.elmTargetBody.childNodes).filter(function (childNode) {\n        return childNode.nodeType === Node.ELEMENT_NODE && childNode !== props.elmOverlay && !mClassList(childNode).contains(STYLE_CLASS) && childNode.id !== FACE_DEFS_ELEMENT_ID;\n      }).map(function (element) {\n        return {\n          element: element,\n          savedStyle: {}\n        };\n      }) : [{\n        element: props.elmTargetBody,\n        savedStyle: {}\n      }];\n      filterElements.forEach(function (filterElement) {\n        var style = {}; // new object for each element.\n\n        style[propName] = propValue;\n        setStyle(filterElement.element, style, filterElement.savedStyle);\n      });\n      props.filterElements = filterElements;\n    }\n  }\n\n  props.state = STATE_SHOWN;\n\n  if (props.options.onShow) {\n    props.options.onShow.call(props.ins);\n  }\n}\n\nfunction finishHiding(props\n/* [DISABLE-SYNC/]\n, sync\n[DISABLE-SYNC/] */\n) {\n  // sync-mode (`sync` is `true`): Skip restoring active element and finish all immediately.\n\n  /* [DISABLE-SYNC/]\n  [DISABLE-SYNC/] */\n  mClassList(props.elmOverlay).add(STYLE_CLASS_HIDE);\n  restoreStyle(props.elmTarget, props.savedStyleTarget);\n  restoreStyle(props.elmTargetBody, props.savedStyleTargetBody);\n  props.savedStyleTarget = {};\n  props.savedStyleTargetBody = {};\n  restoreAccKeys(props);\n  props.savedElementsAccKeys = [];\n\n  if (\n  /* [DISABLE-SYNC/]\n  !sync &&\n  [DISABLE-SYNC/] */\n  props.isDoc && props.activeElement) {\n    // props.state must be STATE_HIDDEN for avoiding focus.\n    var stateSave = props.state;\n    props.state = STATE_HIDDEN; // the event is fired after function exited in some browsers (e.g. Trident).\n\n    props.elmTargetBody.removeEventListener('focus', props.focusListener, true);\n    props.activeElement.focus(); // Don't change props.state for calling `hide(force)` before `restoreAndFinish` (async-mode)\n\n    props.state = stateSave;\n  }\n\n  props.activeElement = null; // Since `focus()` might scroll, do this after `focus()` and reflow.\n\n  function restoreAndFinish() {\n    props.timerRestoreAndFinish = null;\n    props.state = STATE_HIDDEN;\n    props.elmTargetBody.addEventListener('focus', props.focusListener, true);\n    restoreScroll(props);\n    props.savedElementsScroll = null;\n\n    if (props.options.onHide) {\n      props.options.onHide.call(props.ins);\n    }\n  }\n\n  if (props.timerRestoreAndFinish) {\n    clearTimeout(props.timerRestoreAndFinish);\n    props.timerRestoreAndFinish = null;\n  }\n  /* [DISABLE-SYNC/]\n  if (sync) {\n    restoreAndFinish();\n  } else {\n  [DISABLE-SYNC/] */\n  // eslint-disable-next-line indent\n\n\n  props.timerRestoreAndFinish = setTimeout(restoreAndFinish, 0);\n  /* [DISABLE-SYNC/]\n  }\n  [DISABLE-SYNC/] */\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _show(props, force) {\n  function getScroll(elements, fromDoc) {\n    function elementCanScroll(element, isDoc) {\n      var cmpStyle = props.window.getComputedStyle(element, ''),\n          tagName = element.nodeName.toLowerCase();\n      return cmpStyle.overflow === 'scroll' || cmpStyle.overflow === 'auto' || cmpStyle.overflowX === 'scroll' || cmpStyle.overflowX === 'auto' || cmpStyle.overflowY === 'scroll' || cmpStyle.overflowY === 'auto' || // document with `visible` might make scrollbars.\n      isDoc && (cmpStyle.overflow === 'visible' || cmpStyle.overflowX === 'visible' || cmpStyle.overflowY === 'visible') || // `overflow` of these differs depending on browser.\n      !isDoc && (tagName === 'textarea' || tagName === 'select');\n    }\n\n    var elementsScroll = [];\n    elements.forEach(function (element, i) {\n      var isDoc = fromDoc && i === 0;\n\n      if (elementCanScroll(element, isDoc)) {\n        elementsScroll.push({\n          element: element,\n          isDoc: isDoc,\n          left: scrollLeft(element, isDoc, props.window),\n          top: scrollTop(element, isDoc, props.window)\n        });\n      }\n    });\n    return elementsScroll;\n  }\n\n  function disableAccKeys(elements, fromDoc) {\n    var savedElementsAccKeys = [];\n    elements.forEach(function (element, i) {\n      if (fromDoc && i === 0) {\n        return;\n      }\n\n      var elementAccKeys = {},\n          tabIndex = element.tabIndex; // In Trident and Edge, `tabIndex` of all elements are `0` or something even if the element is not focusable.\n\n      if (tabIndex !== -1) {\n        elementAccKeys.element = element;\n        elementAccKeys.tabIndex = element.hasAttribute('tabindex') ? tabIndex : false;\n        element.tabIndex = -1;\n      }\n\n      var accessKey = element.accessKey;\n\n      if (accessKey) {\n        elementAccKeys.element = element;\n        elementAccKeys.accessKey = accessKey;\n        element.accessKey = '';\n      }\n\n      if (elementAccKeys.element) {\n        savedElementsAccKeys.push(elementAccKeys);\n      }\n    });\n    return savedElementsAccKeys;\n  }\n\n  if (props.state === STATE_SHOWN || props.state === STATE_SHOWING && !force || props.state !== STATE_SHOWING && props.options.onBeforeShow && props.options.onBeforeShow.call(props.ins) === false) {\n    return;\n  }\n\n  if (props.state === STATE_HIDDEN) {\n    var elmOverlay = props.elmOverlay,\n        elmOverlayClassList = mClassList(elmOverlay);\n    props.document.body.appendChild(elmOverlay); // Move to last (for same z-index)\n\n    var targetElements = getTargetElements(props);\n    elmOverlayClassList.remove(STYLE_CLASS_HIDE); // Before `getBoundingClientRect` (`position`).\n\n    if (!props.isDoc) {\n      var elmTargetBody = props.elmTargetBody;\n\n      if (props.window.getComputedStyle(elmTargetBody, '').display === 'inline') {\n        setStyle(elmTargetBody, {\n          display: 'inline-block'\n        }, props.savedStyleTargetBody);\n      }\n\n      _position(props, getBBox(elmTargetBody, props.window));\n    }\n\n    props.savedElementsScroll = getScroll(targetElements, props.isDoc);\n    props.disabledDocBars = false; // savedElementsScroll is empty when document is disconnected.\n\n    if (props.isDoc && props.savedElementsScroll.length && props.savedElementsScroll[0].isDoc) {\n      props.disabledDocBars = disableDocBars(props);\n    }\n\n    props.savedElementsAccKeys = disableAccKeys(targetElements, props.isDoc);\n    props.activeElement = props.document.activeElement;\n\n    if (props.activeElement) {\n      avoidFocus(props, props.activeElement);\n    }\n\n    avoidSelect(props);\n    elmOverlay.offsetWidth;\n    /* force reflow */\n    // eslint-disable-line no-unused-expressions\n\n    if (props.options.onPosition) {\n      props.options.onPosition.call(props.ins);\n    }\n  }\n\n  props.transition.on(force);\n  props.state = STATE_SHOWING;\n\n  if (force) {\n    finishShowing(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @param {boolean} [sync] - sync-mode\n * @returns {void}\n */\n\n\nfunction _hide(props, force\n/* [DISABLE-SYNC/]\n, sync\n[DISABLE-SYNC/] */\n) {\n  // sync-mode (both `force` and `sync` are `true`)\n\n  /* [DISABLE-SYNC/]\n  [DISABLE-SYNC/] */\n  if (props.state === STATE_HIDDEN || props.state === STATE_HIDING && !force || props.state !== STATE_HIDING && props.options.onBeforeHide && props.options.onBeforeHide.call(props.ins) === false) {\n    return;\n  } // blur\n\n\n  if (props.filterElements) {\n    props.filterElements.forEach(function (filterElement) {\n      restoreStyle(filterElement.element, filterElement.savedStyle);\n    });\n    props.filterElements = null;\n  } // In Gecko, hidden element can be activeElement.\n\n\n  var element = props.document.activeElement;\n\n  if (element && element !== element.ownerDocument.body && props.elmOverlay.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n    if (element.blur) {\n      // Trident and Edge don't support SVG#blur\n      element.blur();\n    } else {\n      element.ownerDocument.body.focus();\n    }\n  }\n\n  props.transition.off(force);\n  props.state = STATE_HIDING;\n\n  if (force) {\n    finishHiding(props\n    /* [DISABLE-SYNC/]\n    , sync\n    [DISABLE-SYNC/] */\n    );\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options; // face\n\n  if (newOptions.hasOwnProperty('face') && (newOptions.face == null ? void 0 : newOptions.face) !== options.face) {\n    var elmOverlayBody = props.elmOverlayBody; // Clear\n\n    while (elmOverlayBody.firstChild) {\n      elmOverlayBody.removeChild(elmOverlayBody.firstChild);\n    }\n\n    if (newOptions.face === false) {\n      // No face\n      options.face = false;\n    } else if (newOptions.face && newOptions.face.nodeType === Node.ELEMENT_NODE) {\n      // Specific face\n      options.face = newOptions.face;\n      elmOverlayBody.appendChild(newOptions.face);\n    } else if (newOptions.face == null) {\n      // Builtin face\n      // [FACE]\n      var elmDocument = props.document;\n\n      if (!elmDocument.getElementById(FACE_DEFS_ELEMENT_ID)) {\n        // Add svg defs\n        var defsSvg = new props.window.DOMParser().parseFromString(FACE_DEFS, 'image/svg+xml');\n        elmDocument.body.appendChild(defsSvg.documentElement);\n      } // [/FACE]\n\n\n      options.face = void 0;\n      elmOverlayBody.innerHTML = FACE_01; // [FACE/]\n    }\n  } // duration\n\n\n  if (isFinite(newOptions.duration) && newOptions.duration !== options.duration) {\n    options.duration = newOptions.duration;\n    props.elmOverlay.style[CSSPrefix.getName('transitionDuration')] = newOptions.duration === DURATION ? '' : \"\".concat(newOptions.duration, \"ms\");\n    props.transition.duration = \"\".concat(newOptions.duration, \"ms\");\n  } // blur\n\n\n  if (isFinite(newOptions.blur) || newOptions.blur === false) {\n    options.blur = newOptions.blur;\n  } // style\n\n\n  if (isObject(newOptions.style)) {\n    setStyle(props.elmOverlay, newOptions.style);\n  } // Event listeners\n\n\n  ['onShow', 'onHide', 'onBeforeShow', 'onBeforeHide', 'onPosition'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nfunction scroll(props, target, dirLeft, value) {\n  var isDoc, // To return undefined\n  curValue; // eslint-disable-line prefer-const\n\n  if (target) {\n    var targetElements = getTargetElements(props);\n\n    if (targetElements.indexOf(target) === -1) {\n      return curValue;\n    } // return undefined\n\n\n    isDoc = target.nodeName.toLowerCase() === 'html';\n  } else {\n    target = props.elmTarget;\n    isDoc = props.isDoc;\n  }\n\n  var elementScroll = value != null && props.savedElementsScroll && (props.savedElementsScroll.find ? props.savedElementsScroll.find(function (elementScroll) {\n    return elementScroll.element === target;\n  }) : function (elementsScroll) {\n    var found;\n    elementsScroll.some(function (elementScroll) {\n      if (elementScroll.element === target) {\n        found = elementScroll;\n        return true;\n      }\n\n      return false;\n    });\n    return found;\n  }(props.savedElementsScroll));\n  curValue = (dirLeft ? scrollLeft : scrollTop)(target, isDoc, props.window, value);\n\n  if (elementScroll) {\n    elementScroll[dirLeft ? 'left' : 'top'] = curValue;\n  }\n\n  return curValue;\n}\n\nvar PlainOverlay = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainOverlay` instance.\n   * @param {Element} [target] - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainOverlay(target, options) {\n    _classCallCheck(this, PlainOverlay);\n\n    /**\n     * @param {Object} [target] - Element or something that is checked.\n     * @returns {(Element|null)} Valid element or null.\n     */\n    function getTarget(target) {\n      var validElement;\n\n      if (!target) {\n        validElement = document.documentElement; // documentElement of current document\n      } else if (target.nodeType) {\n        if (target.nodeType === Node.DOCUMENT_NODE) {\n          validElement = target.documentElement; // documentElement of target document\n        } else if (target.nodeType === Node.ELEMENT_NODE) {\n          var nodeName = target.nodeName.toLowerCase();\n          validElement = nodeName === 'body' ? target.ownerDocument.documentElement : // documentElement of target body\n          nodeName === 'iframe' || nodeName === 'frame' ? target.contentDocument.documentElement : // documentElement of target frame\n          target;\n        }\n\n        if (!validElement) {\n          throw new Error('This element is not accepted.');\n        }\n      } else if (target === target.window) {\n        validElement = target.document.documentElement; // documentElement of target window\n      }\n\n      return validElement;\n    }\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        face: false,\n        // Initial state.\n        duration: DURATION,\n        // Initial state.\n        blur: false // Initial state.\n\n      },\n      state: STATE_HIDDEN,\n      savedStyleTarget: {},\n      savedStyleTargetBody: {},\n      blockingDisabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (arguments.length === 1) {\n      if (!(props.elmTarget = getTarget(target))) {\n        if (!isObject(target)) {\n          throw new Error('Invalid argument.');\n        }\n\n        props.elmTarget = document.documentElement; // documentElement of current document\n\n        options = target;\n      }\n    } else if (!(props.elmTarget = getTarget(target))) {\n      throw new Error('This target is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    props.isDoc = props.elmTarget.nodeName.toLowerCase() === 'html';\n    var elmDocument = props.document = props.elmTarget.ownerDocument;\n    props.window = elmDocument.defaultView;\n    var elmTargetBody = props.elmTargetBody = props.isDoc ? elmDocument.body : props.elmTarget; // Setup window\n\n    if (!elmDocument.getElementById(STYLE_ELEMENT_ID)) {\n      var head = elmDocument.getElementsByTagName('head')[0] || elmDocument.documentElement,\n          sheet = head.insertBefore(elmDocument.createElement('style'), head.firstChild);\n      sheet.type = 'text/css';\n      sheet.id = STYLE_ELEMENT_ID;\n      sheet.textContent = CSS_TEXT;\n\n      if (IS_TRIDENT || IS_EDGE) {\n        forceReflow(sheet);\n      } // Trident bug\n\n    } // elmOverlay\n\n\n    var elmOverlay = props.elmOverlay = elmDocument.createElement('div'),\n        elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.add(STYLE_CLASS, STYLE_CLASS_HIDE);\n\n    if (props.isDoc) {\n      elmOverlayClassList.add(STYLE_CLASS_DOC);\n    } // TimedTransition\n\n\n    props.transition = new TimedTransition(elmOverlay, {\n      procToOn: function procToOn(force) {\n        var elmOverlayClassList = mClassList(elmOverlay);\n        elmOverlayClassList.toggle(STYLE_CLASS_FORCE, !!force);\n        elmOverlayClassList.add(STYLE_CLASS_SHOW);\n      },\n      procToOff: function procToOff(force) {\n        var elmOverlayClassList = mClassList(elmOverlay);\n        elmOverlayClassList.toggle(STYLE_CLASS_FORCE, !!force);\n        elmOverlayClassList.remove(STYLE_CLASS_SHOW);\n      },\n      // for setting before element online\n      property: 'opacity',\n      duration: \"\".concat(DURATION, \"ms\")\n    });\n    elmOverlay.addEventListener('timedTransitionEnd', function (event) {\n      if (event.target === elmOverlay && event.propertyName === 'opacity') {\n        if (props.state === STATE_SHOWING) {\n          finishShowing(props);\n        } else if (props.state === STATE_HIDING) {\n          finishHiding(props);\n        }\n      }\n    }, true);\n    (props.isDoc ? props.window : elmTargetBody).addEventListener('scroll', function (event) {\n      var target = event.target;\n\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && restoreScroll(props, props.isDoc && (target === props.window || target === props.document || target === props.elmTargetBody) ? props.elmTarget : target)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }, true); // props.state can't control the listener\n    // because the event is fired after flow function exited in some browsers (e.g. Trident).\n\n    props.focusListener = function (event) {\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && avoidFocus(props, event.target)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    };\n\n    elmTargetBody.addEventListener('focus', props.focusListener, true);\n\n    (function (listener) {\n      // simulation \"text-select\" event\n      ['keyup', 'mouseup'].forEach(function (type) {\n        // To listen to keydown in the target and keyup in outside, it is window, not `elmTargetBody`.\n        props.window.addEventListener(type, listener, true);\n      });\n    })(function (event) {\n      if (props.state !== STATE_HIDDEN && !props.blockingDisabled && avoidSelect(props)) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }); // Gecko bug, multiple calling (parallel) by `requestAnimationFrame`.\n\n\n    props.resizing = false;\n    props.window.addEventListener('resize', AnimEvent.add(function () {\n      if (props.resizing) {\n        return;\n      }\n\n      props.resizing = true;\n\n      if (props.state !== STATE_HIDDEN) {\n        if (props.isDoc) {\n          if (props.savedElementsScroll.length && props.savedElementsScroll[0].isDoc) {\n            if (props.disabledDocBars) {\n              // Restore DocBars\n              restoreStyle(props.elmTarget, props.savedStyleTarget, ['overflow']);\n              restoreStyle(elmTargetBody, props.savedStyleTargetBody, ['marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'width', 'height']);\n            }\n\n            props.disabledDocBars = disableDocBars(props);\n          }\n        } else {\n          var bBox = getBBox(elmTargetBody, props.window),\n              lastBBox = props.targetBodyBBox;\n\n          if (bBox.left !== lastBBox.left || bBox.top !== lastBBox.top || bBox.width !== lastBBox.width || bBox.height !== lastBBox.height) {\n            _position(props, bBox);\n          }\n        }\n\n        if (props.options.onPosition) {\n          props.options.onPosition.call(props.ins);\n        }\n      }\n\n      props.resizing = false;\n    }), true); // Avoid scroll on touch device\n\n    elmOverlay.addEventListener('touchmove', function (event) {\n      if (props.state !== STATE_HIDDEN) {\n        event.preventDefault();\n        event.stopImmediatePropagation();\n      }\n    }, true); // elmOverlayBody\n\n    (props.elmOverlayBody = elmOverlay.appendChild(elmDocument.createElement('div'))).className = STYLE_CLASS_BODY;\n    elmDocument.body.appendChild(elmOverlay); // Default options\n\n    if (!options.hasOwnProperty('face')) {\n      options.face = null;\n    }\n\n    _setOptions(props, options);\n  }\n  /**\n   * @param {Object} options - New options.\n   * @returns {PlainOverlay} Current instance itself.\n   */\n\n\n  _createClass(PlainOverlay, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Show the overlay.\n     * @param {boolean} [force] - Show it immediately without effect.\n     * @param {Object} [options] - New options.\n     * @returns {PlainOverlay} Current instance itself.\n     */\n\n  }, {\n    key: \"show\",\n    value: function show(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _show(insProps[this._id], force);\n\n      return this;\n    }\n    /**\n     * Hide the overlay.\n     * @param {boolean} [force] - Hide it immediately without effect.\n     * @param {boolean} [sync] - sync-mode\n     * @returns {PlainOverlay} Current instance itself.\n     */\n\n  }, {\n    key: \"hide\",\n    value: function hide(force\n    /* [DISABLE-SYNC/]\n    , sync\n    [DISABLE-SYNC/] */\n    ) {\n      // sync-mode (both `force` and `sync` are `true`)\n      _hide(insProps[this._id], force\n      /* [DISABLE-SYNC/]\n      , sync\n      [DISABLE-SYNC/] */\n      );\n\n      return this;\n    }\n  }, {\n    key: \"scrollLeft\",\n    value: function scrollLeft(value, target) {\n      return scroll(insProps[this._id], target, true, value);\n    }\n  }, {\n    key: \"scrollTop\",\n    value: function scrollTop(value, target) {\n      return scroll(insProps[this._id], target, false, value);\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      var props = insProps[this._id];\n\n      if (props.state !== STATE_HIDDEN) {\n        if (!props.isDoc) {\n          _position(props, getBBox(props.elmTargetBody, props.window));\n        }\n\n        if (props.options.onPosition) {\n          props.options.onPosition.call(props.ins);\n        }\n      }\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"style\",\n    get: function get() {\n      return insProps[this._id].elmOverlay.style;\n    }\n  }, {\n    key: \"blockingDisabled\",\n    get: function get() {\n      return insProps[this._id].blockingDisabled;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        insProps[this._id].blockingDisabled = value;\n      }\n    }\n  }, {\n    key: \"face\",\n    get: function get() {\n      return insProps[this._id].options.face;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        face: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"blur\",\n    get: function get() {\n      return insProps[this._id].options.blur;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        blur: value\n      });\n    }\n  }, {\n    key: \"onShow\",\n    get: function get() {\n      return insProps[this._id].options.onShow;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onShow: value\n      });\n    }\n  }, {\n    key: \"onHide\",\n    get: function get() {\n      return insProps[this._id].options.onHide;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onHide: value\n      });\n    }\n  }, {\n    key: \"onBeforeShow\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeShow;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeShow: value\n      });\n    }\n  }, {\n    key: \"onBeforeHide\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeHide;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeHide: value\n      });\n    }\n  }, {\n    key: \"onPosition\",\n    get: function get() {\n      return insProps[this._id].options.onPosition;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onPosition: value\n      });\n    }\n  }], [{\n    key: \"show\",\n    value: function show(target, options) {\n      return new PlainOverlay(target, options).show();\n    }\n  }, {\n    key: \"STATE_HIDDEN\",\n    get: function get() {\n      return STATE_HIDDEN;\n    }\n  }, {\n    key: \"STATE_SHOWING\",\n    get: function get() {\n      return STATE_SHOWING;\n    }\n  }, {\n    key: \"STATE_SHOWN\",\n    get: function get() {\n      return STATE_SHOWN;\n    }\n  }, {\n    key: \"STATE_HIDING\",\n    get: function get() {\n      return STATE_HIDING;\n    }\n  }]);\n\n  return PlainOverlay;\n}();\n/* [FACE/]\nPlainOverlay.limit = true;\n[FACE/] */\n\n\nexport default PlainOverlay;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PointerEvent\n * https://github.com/anseki/pointer-event\n *\n * Copyright (c) 2022 anseki\n * Licensed under the MIT license.\n */\nimport AnimEvent from 'anim-event';\nvar MOUSE_EMU_INTERVAL = 400,\n    // Avoid mouse events emulation\nCLICK_EMULATOR_ELEMENTS = [],\n    DBLCLICK_EMULATOR_ELEMENTS = []; // Support options for addEventListener\n\nvar passiveSupported = false;\n\ntry {\n  window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\n    get: function get() {\n      passiveSupported = true;\n    }\n  }));\n} catch (error) {\n  /* ignore */\n}\n/**\n * addEventListener with specific option.\n * @param {Element} target - An event-target element.\n * @param {string} type - The event type to listen for.\n * @param {function} listener - The EventListener.\n * @param {Object} options - An options object.\n * @returns {void}\n */\n\n\nfunction addEventListenerWithOptions(target, type, listener, options) {\n  // When `passive` is not supported, consider that the `useCapture` is supported instead of\n  // `options` (i.e. options other than the `passive` also are not supported).\n  target.addEventListener(type, listener, passiveSupported ? options : options.capture);\n}\n\nfunction getPointsLength(p0, p1) {\n  var lx = p0.x - p1.x,\n      ly = p0.y - p1.y;\n  return Math.sqrt(lx * lx + ly * ly);\n}\n/**\n * Get Touch instance in list.\n * @param {Touch[]} touches - An Array or TouchList instance.\n * @param {number} id - Touch#identifier\n * @returns {(Touch|null)} - A found Touch instance.\n */\n\n\nfunction getTouchById(touches, id) {\n  if (touches != null && id != null) {\n    for (var i = 0; i < touches.length; i++) {\n      if (touches[i].identifier === id) {\n        return touches[i];\n      }\n    }\n  }\n\n  return null;\n}\n/**\n * @param {Object} xy - Something that might have clientX and clientY.\n * @returns {boolean} - `true` if it has valid clientX and clientY.\n */\n\n\nfunction hasXY(xy) {\n  return xy && typeof xy.clientX === 'number' && typeof xy.clientY === 'number';\n} // Gecko, Trident pick drag-event of some elements such as img, a, etc.\n\n\nfunction dragstart(event) {\n  event.preventDefault();\n}\n\nvar PointerEvent = /*#__PURE__*/function () {\n  /**\n   * Create a `PointerEvent` instance.\n   * @param {Object} [options] - Options\n   */\n  function PointerEvent(options) {\n    var _this = this;\n\n    _classCallCheck(this, PointerEvent);\n\n    this.startHandlers = {};\n    this.lastHandlerId = 0;\n    this.curPointerClass = null;\n    this.curTouchId = null;\n    this.lastPointerXY = {\n      clientX: 0,\n      clientY: 0\n    };\n    this.lastTouchTime = 0; // Options\n\n    this.options = {\n      // Default\n      preventDefault: true,\n      stopPropagation: true\n    };\n\n    if (options) {\n      ['preventDefault', 'stopPropagation'].forEach(function (option) {\n        if (typeof options[option] === 'boolean') {\n          _this.options[option] = options[option];\n        }\n      });\n    }\n  }\n  /**\n   * @param {function} startHandler - This is called with pointerXY when it starts. This returns boolean.\n   * @returns {number} handlerId which is used for adding/removing to element.\n   */\n\n\n  _createClass(PointerEvent, [{\n    key: \"regStartHandler\",\n    value: function regStartHandler(startHandler) {\n      var that = this;\n\n      that.startHandlers[++that.lastHandlerId] = function (event) {\n        var pointerClass = event.type === 'mousedown' ? 'mouse' : 'touch',\n            now = Date.now();\n        var pointerXY, touchId;\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = now; // Avoid mouse events emulation\n\n          pointerXY = event.changedTouches[0];\n          touchId = event.changedTouches[0].identifier;\n        } else {\n          // Avoid mouse events emulation\n          if (now - that.lastTouchTime < MOUSE_EMU_INTERVAL) {\n            return;\n          }\n\n          pointerXY = event;\n        }\n\n        if (!hasXY(pointerXY)) {\n          throw new Error('No clientX/clientY');\n        } // It is new one even if those are 'mouse' or ID is same, then cancel current one.\n\n\n        if (that.curPointerClass) {\n          that.cancel();\n        }\n\n        if (startHandler.call(that, pointerXY)) {\n          that.curPointerClass = pointerClass;\n          that.curTouchId = pointerClass === 'touch' ? touchId : null;\n          that.lastPointerXY.clientX = pointerXY.clientX;\n          that.lastPointerXY.clientY = pointerXY.clientY;\n\n          if (that.options.preventDefault) {\n            event.preventDefault();\n          }\n\n          if (that.options.stopPropagation) {\n            event.stopPropagation();\n          }\n        }\n      };\n\n      return that.lastHandlerId;\n    }\n    /**\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"unregStartHandler\",\n    value: function unregStartHandler(handlerId) {\n      delete this.startHandlers[handlerId];\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"addStartHandler\",\n    value: function addStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      addEventListenerWithOptions(element, 'mousedown', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchstart', this.startHandlers[handlerId], {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'dragstart', dragstart, {\n        capture: false,\n        passive: false\n      });\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {number} handlerId - An ID which was returned by regStartHandler.\n     * @returns {number} handlerId which was passed.\n     */\n\n  }, {\n    key: \"removeStartHandler\",\n    value: function removeStartHandler(element, handlerId) {\n      if (!this.startHandlers[handlerId]) {\n        throw new Error(\"Invalid handlerId: \".concat(handlerId));\n      }\n\n      element.removeEventListener('mousedown', this.startHandlers[handlerId], false);\n      element.removeEventListener('touchstart', this.startHandlers[handlerId], false);\n      element.removeEventListener('dragstart', dragstart, false);\n      return handlerId;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} moveHandler - This is called with pointerXY when it moves.\n     * @param {?boolean} rawEvent - Capture events without `requestAnimationFrame`.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addMoveHandler\",\n    value: function addMoveHandler(element, moveHandler, rawEvent) {\n      var that = this;\n\n      function handler(event) {\n        var pointerClass = event.type === 'mousemove' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) : event;\n\n          if (hasXY(pointerXY)) {\n            if (pointerXY.clientX !== that.lastPointerXY.clientX || pointerXY.clientY !== that.lastPointerXY.clientY) {\n              that.move(pointerXY);\n            }\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      var wrappedHandler = rawEvent ? handler : AnimEvent.add(handler);\n      addEventListenerWithOptions(element, 'mousemove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchmove', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curMoveHandler = moveHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"move\",\n    value: function move(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curMoveHandler) {\n        this.curMoveHandler(this.lastPointerXY);\n      }\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} endHandler - This is called with pointerXY when it ends.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addEndHandler\",\n    value: function addEndHandler(element, endHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        var pointerClass = event.type === 'mouseup' ? 'mouse' : 'touch'; // Avoid mouse events emulation\n\n        if (pointerClass === 'touch') {\n          that.lastTouchTime = Date.now();\n        }\n\n        if (pointerClass === that.curPointerClass) {\n          var pointerXY = pointerClass === 'touch' ? getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}) : // `{}` means matching\n          event;\n\n          if (pointerXY) {\n            that.end(pointerXY);\n\n            if (that.options.preventDefault) {\n              event.preventDefault();\n            }\n\n            if (that.options.stopPropagation) {\n              event.stopPropagation();\n            }\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'mouseup', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curEndHandler = endHandler;\n    }\n    /**\n     * @param {{clientX, clientY}} [pointerXY] - This might be MouseEvent, Touch of TouchEvent or Object.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"end\",\n    value: function end(pointerXY) {\n      if (hasXY(pointerXY)) {\n        this.lastPointerXY.clientX = pointerXY.clientX;\n        this.lastPointerXY.clientY = pointerXY.clientY;\n      }\n\n      if (this.curEndHandler) {\n        this.curEndHandler(this.lastPointerXY);\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n    /**\n     * @param {Element} element - A target element.\n     * @param {function} cancelHandler - This is called when it cancels.\n     * @returns {void}\n     */\n\n  }, {\n    key: \"addCancelHandler\",\n    value: function addCancelHandler(element, cancelHandler) {\n      var that = this;\n\n      function wrappedHandler(event) {\n        /*\n          Now, this is fired by touchcancel only, but it might be fired even if curPointerClass is mouse.\n        */\n        // const pointerClass = 'touch';\n        that.lastTouchTime = Date.now(); // Avoid mouse events emulation\n\n        if (that.curPointerClass != null) {\n          var pointerXY = getTouchById(event.changedTouches, that.curTouchId) || ( // It might have been removed from `touches` even if it is not in `changedTouches`.\n          getTouchById(event.touches, that.curTouchId) ? null : {}); // `{}` means matching\n\n          if (pointerXY) {\n            that.cancel();\n          }\n        }\n      }\n\n      addEventListenerWithOptions(element, 'touchcancel', wrappedHandler, {\n        capture: false,\n        passive: false\n      });\n      that.curCancelHandler = cancelHandler;\n    }\n    /**\n     * @returns {void}\n     */\n\n  }, {\n    key: \"cancel\",\n    value: function cancel() {\n      if (this.curCancelHandler) {\n        this.curCancelHandler();\n      }\n\n      this.curPointerClass = this.curTouchId = null;\n    }\n  }], [{\n    key: \"addEventListenerWithOptions\",\n    get: function get() {\n      return addEventListenerWithOptions;\n    }\n    /**\n     * Emulate `click` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initClickEmulator\",\n    value: function initClickEmulator(element, moveTolerance, timeTolerance) {\n      if (CLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      CLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, touchId, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      addEventListenerWithOptions(element, 'touchstart', function (event) {\n        var touch = event.changedTouches[0];\n        startX = touch.clientX;\n        startY = touch.clientY;\n        touchId = touch.identifier;\n        startMs = performance.now();\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchend', function (event) {\n        var touch = getTouchById(event.changedTouches, touchId);\n\n        if (typeof startX === 'number' && typeof startY === 'number' && typeof startMs === 'number' && touch && typeof touch.clientX === 'number' && typeof touch.clientY === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: touch.clientX,\n          y: touch.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance) {\n          // FIRE\n          setTimeout(function () {\n            var newEvent = new MouseEvent('click', {\n              clientX: touch.clientX,\n              clientY: touch.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n        }\n\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      addEventListenerWithOptions(element, 'touchcancel', function () {\n        startX = startY = touchId = startMs = null;\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n    /**\n     * Emulate `dblclick` event via `touchend` event.\n     * @param {Element} element - Target element, listeners that call `event.preventDefault()` are attached later.\n     * @param {?number} moveTolerance - Move tolerance.\n     * @param {?number} timeTolerance - Time tolerance.\n     * @returns {Element} The passed `element`.\n     */\n\n  }, {\n    key: \"initDblClickEmulator\",\n    value: function initDblClickEmulator(element, moveTolerance, timeTolerance) {\n      if (DBLCLICK_EMULATOR_ELEMENTS.includes(element)) {\n        return element;\n      }\n\n      DBLCLICK_EMULATOR_ELEMENTS.push(element);\n      var DEFAULT_MOVE_TOLERANCE = 16,\n          // px\n      DEFAULT_TIME_TOLERANCE = 400; // ms\n\n      var startX, startY, startMs;\n\n      if (moveTolerance == null) {\n        moveTolerance = DEFAULT_MOVE_TOLERANCE;\n      }\n\n      if (timeTolerance == null) {\n        timeTolerance = DEFAULT_TIME_TOLERANCE;\n      }\n\n      PointerEvent.initClickEmulator(element, moveTolerance, timeTolerance);\n      addEventListenerWithOptions(element, 'click', function (event) {\n        if (!event.emulated || // Ignore events that are not from `touchend`.\n        typeof event.clientX !== 'number' || typeof event.clientY !== 'number') {\n          return;\n        }\n\n        if (typeof startX === 'number' && getPointsLength({\n          x: startX,\n          y: startY\n        }, {\n          x: event.clientX,\n          y: event.clientY\n        }) <= moveTolerance && performance.now() - startMs <= timeTolerance * 2) {\n          // up (tolerance) down (tolerance) up\n          setTimeout(function () {\n            // FIRE\n            var newEvent = new MouseEvent('dblclick', {\n              clientX: event.clientX,\n              clientY: event.clientY\n            });\n            newEvent.emulated = true;\n            element.dispatchEvent(newEvent);\n          }, 0);\n          startX = startY = startMs = null;\n        } else {\n          // 1st\n          startX = event.clientX;\n          startY = event.clientY;\n          startMs = performance.now();\n        }\n      }, {\n        capture: false,\n        passive: false\n      });\n      return element;\n    }\n  }]);\n\n  return PointerEvent;\n}();\n\nexport default PointerEvent;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*\n * PlainDraggable\n * https://anseki.github.io/plain-draggable/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport PointerEvent from 'pointer-event';\nimport CSSPrefix from 'cssprefix';\nimport AnimEvent from 'anim-event';\nimport mClassList from 'm-class-list';\nmClassList.ignoreNative = true;\n\nvar ZINDEX = 9000,\n    // [SNAP]\nSNAP_GRAVITY = 20,\n    SNAP_CORNER = 'tl',\n    SNAP_SIDE = 'both',\n    SNAP_EDGE = 'both',\n    SNAP_BASE = 'containment',\n    SNAP_ALL_CORNERS = ['tl', 'tr', 'bl', 'br'],\n    SNAP_ALL_SIDES = ['start', 'end'],\n    SNAP_ALL_EDGES = ['inside', 'outside'],\n    // [/SNAP]\n// [AUTO-SCROLL]\nAUTOSCROLL_SPEED = [40, 200, 1000],\n    AUTOSCROLL_SENSITIVITY = [100, 40, 0],\n    // [/AUTO-SCROLL]\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nIS_GECKO = ('MozAppearance' in document.documentElement.style),\n    IS_BLINK = !IS_EDGE && !IS_GECKO && // Edge has `window.chrome`, and future Gecko might have that.\n!!window.chrome && !!window.CSS,\n    IS_WEBKIT = !IS_EDGE && !IS_TRIDENT && !IS_GECKO && !IS_BLINK && // Some engines support `webkit-*` properties.\n!window.chrome && 'WebkitAppearance' in document.documentElement.style,\n    isObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n    isFinite = Number.isFinite || function (value) {\n  return typeof value === 'number' && window.isFinite(value);\n},\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n    pointerOffset = {},\n    pointerEvent = new PointerEvent();\n\nvar insId = 0,\n    activeProps,\n    hasMoved,\n    body,\n    // CSS property/value\ncssValueDraggableCursor,\n    cssValueDraggingCursor,\n    cssOrgValueBodyCursor,\n    cssPropTransitionProperty,\n    cssPropTransform,\n    cssPropUserSelect,\n    cssOrgValueBodyUserSelect,\n    // Try to set `cursor` property.\ncssWantedValueDraggableCursor = IS_WEBKIT ? ['all-scroll', 'move'] : ['grab', 'all-scroll', 'move'],\n    cssWantedValueDraggingCursor = IS_WEBKIT ? 'move' : ['grabbing', 'move'],\n    // class\ndraggableClass = 'plain-draggable',\n    draggingClass = 'plain-draggable-dragging',\n    movingClass = 'plain-draggable-moving'; // [AUTO-SCROLL]\n// Scroll Animation Controller\n\nvar scrollFrame = {},\n    MSPF = 1000 / 60,\n    // ms/frame (FPS: 60)\nrequestAnim = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) {\n  return setTimeout(callback, MSPF);\n},\n    cancelAnim = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || function (requestID) {\n  return clearTimeout(requestID);\n};\n\n{\n  /**\n   * @typedef {Object} MoveArgs\n   * @property {number} dir - [-1 | 1] minus or plus to position value.\n   * @property {number} speed - px/ms\n   * @property {number} min - Minimum position value.\n   * @property {number} max - Maximum position value.\n   * @property {number} [lastFrameTime] - Time of last frame.\n   * @property {number} [lastValue] - Strict value of last frame.\n   */\n  var curXyMoveArgs = {},\n      curElement,\n      curScrollXY,\n      requestID;\n\n  function frameUpdate() {\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        var timeLen = now - moveArgs.lastFrameTime,\n            absValue = curScrollXY(curElement, xy),\n            curValue = moveArgs.lastValue != null && Math.abs(moveArgs.lastValue - absValue) < 10 // It was not moved manually\n        ? moveArgs.lastValue : absValue;\n\n        if (moveArgs.dir === -1 ? curValue > moveArgs.min : curValue < moveArgs.max) {\n          var newValue = curValue + moveArgs.speed * timeLen * moveArgs.dir;\n\n          if (newValue < moveArgs.min) {\n            newValue = moveArgs.min;\n          } else if (newValue > moveArgs.max) {\n            newValue = moveArgs.max;\n          }\n\n          curScrollXY(curElement, xy, newValue);\n          moveArgs.lastValue = newValue;\n        }\n\n        moveArgs.lastFrameTime = now;\n      }\n    });\n  }\n\n  function frame() {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    requestID = requestAnim.call(window, frame);\n  }\n  /**\n   * @param {Element} element - A target element.\n   * @param {{x: ?MoveArgs, y: ?MoveArgs}} xyMoveArgs - MoveArgs for x and y\n   * @param {function} scrollXY - (element: Element, xy: string, value: number) => number\n   * @returns {void}\n   */\n\n\n  scrollFrame.move = function (element, xyMoveArgs, scrollXY) {\n    cancelAnim.call(window, requestID);\n    frameUpdate(); // Update current data now because it might be not continuation.\n    // Re-use lastValue\n\n    if (curElement === element) {\n      if (xyMoveArgs.x && curXyMoveArgs.x) {\n        xyMoveArgs.x.lastValue = curXyMoveArgs.x.lastValue;\n      }\n\n      if (xyMoveArgs.y && curXyMoveArgs.y) {\n        xyMoveArgs.y.lastValue = curXyMoveArgs.y.lastValue;\n      }\n    }\n\n    curElement = element;\n    curXyMoveArgs = xyMoveArgs;\n    curScrollXY = scrollXY;\n    var now = Date.now();\n    ['x', 'y'].forEach(function (xy) {\n      var moveArgs = curXyMoveArgs[xy];\n\n      if (moveArgs) {\n        moveArgs.lastFrameTime = now;\n      }\n    });\n    requestID = requestAnim.call(window, frame);\n  };\n\n  scrollFrame.stop = function () {\n    cancelAnim.call(window, requestID);\n    frameUpdate();\n    curXyMoveArgs = {};\n    curElement = null; // Remove reference\n  };\n}\n\nfunction scrollXYWindow(element, xy, value) {\n  if (value != null) {\n    if (xy === 'x') {\n      element.scrollTo(value, element.pageYOffset);\n    } else {\n      element.scrollTo(element.pageXOffset, value);\n    }\n  }\n\n  return xy === 'x' ? element.pageXOffset : element.pageYOffset;\n}\n\nfunction scrollXYElement(element, xy, value) {\n  var prop = xy === 'x' ? 'scrollLeft' : 'scrollTop';\n\n  if (value != null) {\n    element[prop] = value;\n  }\n\n  return element[prop];\n}\n/**\n * @typedef {Object} Scrollable\n * @property {number} clientWidth - width of scrollable area.\n * @property {number} clientHeight - height of scrollable area.\n * @property {number} scrollWidth - width of inner content.\n * @property {number} scrollHeight - height of inner content.\n * @property {number} clientX - X of scrollable area, document coordinate.\n * @property {number} clientY - T of scrollable area, document coordinate.\n */\n\n/**\n * @param {Element} element - A target element.\n * @param {boolean} [isWindow] - `true` if element is window.\n * @param {boolean} [dontScroll] - `true` makes it skip scroll that gets scrollWidth/Height.\n * @returns {Scrollable} Information for scroll.\n */\n\n\nfunction getScrollable(element, isWindow, dontScroll) {\n  var scrollable = {};\n  var cmpStyleHtml, cmpStyleBody, cmpStyleElement; // clientWidth/Height\n\n  (function (target) {\n    scrollable.clientWidth = target.clientWidth;\n    scrollable.clientHeight = target.clientHeight;\n  })(isWindow ? document.documentElement : element); // scrollWidth/Height\n\n  /*\n    Gecko bug, bottom-padding of element is reduced.\n    Blink for Android bug, borders of <html> is rendered but those are not added to scrollW/H.\n    Then, move it to max scroll position (sufficiently larger values) forcibly, and get scroll position.\n  */\n\n\n  var maxScrollLeft = 0,\n      maxScrollTop = 0;\n\n  if (!dontScroll) {\n    var curScrollLeft, curScrollTop;\n\n    if (isWindow) {\n      curScrollLeft = scrollXYWindow(element, 'x');\n      curScrollTop = scrollXYWindow(element, 'y');\n      cmpStyleHtml = getComputedStyle(document.documentElement, '');\n      cmpStyleBody = getComputedStyle(document.body, '');\n      maxScrollLeft = scrollXYWindow(element, 'x', document.documentElement.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYWindow(element, 'y', document.documentElement.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleHtml[prop]) || 0) + (parseFloat(cmpStyleBody[prop]) || 0);\n      }, 0));\n      scrollXYWindow(element, 'x', curScrollLeft);\n      scrollXYWindow(element, 'y', curScrollTop);\n    } else {\n      curScrollLeft = scrollXYElement(element, 'x');\n      curScrollTop = scrollXYElement(element, 'y');\n      cmpStyleElement = getComputedStyle(element, '');\n      maxScrollLeft = scrollXYElement(element, 'x', element.scrollWidth + scrollable.clientWidth + // Blink for Android bug, scroll* returns size of smaller body\n      ['marginLeft', 'marginRight', 'borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      maxScrollTop = scrollXYElement(element, 'y', element.scrollHeight + scrollable.clientHeight + ['marginTop', 'marginBottom', 'borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'].reduce(function (len, prop) {\n        return len + (parseFloat(cmpStyleElement[prop]) || 0);\n      }, 0));\n      scrollXYElement(element, 'x', curScrollLeft);\n      scrollXYElement(element, 'y', curScrollTop);\n    }\n  }\n\n  scrollable.scrollWidth = scrollable.clientWidth + maxScrollLeft;\n  scrollable.scrollHeight = scrollable.clientHeight + maxScrollTop; // clientX/Y\n\n  var rect;\n\n  if (isWindow) {\n    scrollable.clientX = scrollable.clientY = 0;\n  } else {\n    // padding-box\n    rect = element.getBoundingClientRect();\n\n    if (!cmpStyleElement) {\n      cmpStyleElement = getComputedStyle(element, '');\n    }\n\n    scrollable.clientX = rect.left + (parseFloat(cmpStyleElement.borderLeftWidth) || 0);\n    scrollable.clientY = rect.top + (parseFloat(cmpStyleElement.borderTopWidth) || 0);\n  }\n\n  return scrollable;\n} // [/AUTO-SCROLL]\n\n\nfunction copyTree(obj) {\n  return !obj ? obj : isObject(obj) ? Object.keys(obj).reduce(function (copyObj, key) {\n    copyObj[key] = copyTree(obj[key]);\n    return copyObj;\n  }, {}) : Array.isArray(obj) ? obj.map(copyTree) : obj;\n}\n\nfunction hasChanged(a, b) {\n  var typeA, keysA;\n  return _typeof(a) !== _typeof(b) || (typeA = isObject(a) ? 'obj' : Array.isArray(a) ? 'array' : '') !== (isObject(b) ? 'obj' : Array.isArray(b) ? 'array' : '') || (typeA === 'obj' ? hasChanged(keysA = Object.keys(a).sort(), Object.keys(b).sort()) || keysA.some(function (prop) {\n    return hasChanged(a[prop], b[prop]);\n  }) : typeA === 'array' ? a.length !== b.length || a.some(function (aVal, i) {\n    return hasChanged(aVal, b[i]);\n  }) : a !== b);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n}\n/**\n * An object that simulates `DOMRect` to indicate a bounding-box.\n * @typedef {Object} BBox\n * @property {(number|null)} left - document coordinate\n * @property {(number|null)} top - document coordinate\n * @property {(number|null)} right - document coordinate\n * @property {(number|null)} bottom - document coordinate\n * @property {(number|null)} x - Substitutes for left\n * @property {(number|null)} y - Substitutes for top\n * @property {(number|null)} width\n * @property {(number|null)} height\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(BBox|null)} A normalized `BBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var value;\n\n  if (isFinite(value = bBox.left) || isFinite(value = bBox.x)) {\n    bBox.left = bBox.x = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(value = bBox.top) || isFinite(value = bBox.y)) {\n    bBox.top = bBox.y = value;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.width) && bBox.width >= 0) {\n    bBox.right = bBox.left + bBox.width;\n  } else if (isFinite(bBox.right) && bBox.right >= bBox.left) {\n    bBox.width = bBox.right - bBox.left;\n  } else {\n    return null;\n  }\n\n  if (isFinite(bBox.height) && bBox.height >= 0) {\n    bBox.bottom = bBox.top + bBox.height;\n  } else if (isFinite(bBox.bottom) && bBox.bottom >= bBox.top) {\n    bBox.height = bBox.bottom - bBox.top;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n/**\n * A value that is Pixels or Ratio\n * @typedef {{value: number, isRatio: boolean}} PPValue\n */\n\n\nfunction validPPValue(value) {\n  // Get PPValue from string (all `/s` were already removed)\n  function string2PPValue(inString) {\n    var matches = /^(.+?)(%)?$/.exec(inString);\n    var value, isRatio;\n    return matches && isFinite(value = parseFloat(matches[1])) ? {\n      value: (isRatio = !!(matches[2] && value)) ? value / 100 : value,\n      isRatio: isRatio\n    } : null; // 0% -> 0\n  }\n\n  return isFinite(value) ? {\n    value: value,\n    isRatio: false\n  } : typeof value === 'string' ? string2PPValue(value.replace(/\\s/g, '')) : null;\n}\n\nfunction ppValue2OptionValue(ppValue) {\n  return ppValue.isRatio ? \"\".concat(ppValue.value * 100, \"%\") : ppValue.value;\n}\n\nfunction resolvePPValue(ppValue, baseOrigin, baseSize) {\n  return typeof ppValue === 'number' ? ppValue : baseOrigin + ppValue.value * (ppValue.isRatio ? baseSize : 1);\n}\n/**\n * An object that simulates BBox but properties are PPValue.\n * @typedef {Object} PPBBox\n */\n\n/**\n * @param {Object} bBox - A target object.\n * @returns {(PPBBox|null)} A normalized `PPBBox`, or null if `bBox` is invalid.\n */\n\n\nfunction validPPBBox(bBox) {\n  if (!isObject(bBox)) {\n    return null;\n  }\n\n  var ppValue;\n\n  if ((ppValue = validPPValue(bBox.left)) || (ppValue = validPPValue(bBox.x))) {\n    bBox.left = bBox.x = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.top)) || (ppValue = validPPValue(bBox.y))) {\n    bBox.top = bBox.y = ppValue;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.width)) && ppValue.value >= 0) {\n    bBox.width = ppValue;\n    delete bBox.right;\n  } else if (ppValue = validPPValue(bBox.right)) {\n    bBox.right = ppValue;\n    delete bBox.width;\n  } else {\n    return null;\n  }\n\n  if ((ppValue = validPPValue(bBox.height)) && ppValue.value >= 0) {\n    bBox.height = ppValue;\n    delete bBox.bottom;\n  } else if (ppValue = validPPValue(bBox.bottom)) {\n    bBox.bottom = ppValue;\n    delete bBox.height;\n  } else {\n    return null;\n  }\n\n  return bBox;\n}\n\nfunction ppBBox2OptionObject(ppBBox) {\n  return Object.keys(ppBBox).reduce(function (obj, prop) {\n    obj[prop] = ppValue2OptionValue(ppBBox[prop]);\n    return obj;\n  }, {});\n} // PPBBox -> BBox\n\n\nfunction resolvePPBBox(ppBBox, baseBBox) {\n  var prop2Axis = {\n    left: 'x',\n    right: 'x',\n    x: 'x',\n    width: 'x',\n    top: 'y',\n    bottom: 'y',\n    y: 'y',\n    height: 'y'\n  },\n      baseOriginXY = {\n    x: baseBBox.left,\n    y: baseBBox.top\n  },\n      baseSizeXY = {\n    x: baseBBox.width,\n    y: baseBBox.height\n  };\n  return validBBox(Object.keys(ppBBox).reduce(function (bBox, prop) {\n    bBox[prop] = resolvePPValue(ppBBox[prop], prop === 'width' || prop === 'height' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n    return bBox;\n  }, {}));\n}\n/**\n * @param {Element} element - A target element.\n * @param {?boolean} getPaddingBox - Get padding-box instead of border-box as bounding-box.\n * @returns {BBox} A bounding-box of `element`.\n */\n\n\nfunction getBBox(element, getPaddingBox) {\n  var rect = element.getBoundingClientRect(),\n      bBox = {\n    left: rect.left,\n    top: rect.top,\n    width: rect.width,\n    height: rect.height\n  };\n  bBox.left += window.pageXOffset;\n  bBox.top += window.pageYOffset;\n\n  if (getPaddingBox) {\n    var style = window.getComputedStyle(element, ''),\n        borderTop = parseFloat(style.borderTopWidth) || 0,\n        borderRight = parseFloat(style.borderRightWidth) || 0,\n        borderBottom = parseFloat(style.borderBottomWidth) || 0,\n        borderLeft = parseFloat(style.borderLeftWidth) || 0;\n    bBox.left += borderLeft;\n    bBox.top += borderTop;\n    bBox.width -= borderLeft + borderRight;\n    bBox.height -= borderTop + borderBottom;\n  }\n\n  return validBBox(bBox);\n}\n/**\n * Optimize an element for animation.\n * @param {Element} element - A target element.\n * @param {?boolean} gpuTrigger - Initialize for SVGElement if `true`.\n * @returns {Element} A target element.\n */\n\n\nfunction initAnim(element, gpuTrigger) {\n  var style = element.style;\n  style.webkitTapHighlightColor = 'transparent'; // Only when it has no shadow\n\n  var cssPropBoxShadow = CSSPrefix.getName('boxShadow'),\n      boxShadow = window.getComputedStyle(element, '')[cssPropBoxShadow];\n\n  if (!boxShadow || boxShadow === 'none') {\n    style[cssPropBoxShadow] = '0 0 1px transparent';\n  }\n\n  if (gpuTrigger && cssPropTransform) {\n    style[cssPropTransform] = 'translateZ(0)';\n  }\n\n  return element;\n}\n\nfunction setDraggableCursor(element, orgCursor) {\n  if (cssValueDraggableCursor == null) {\n    if (cssWantedValueDraggableCursor !== false) {\n      cssValueDraggableCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggableCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggableCursor == null) {\n      cssValueDraggableCursor = false;\n    }\n  } // Update it to change a state even if cssValueDraggableCursor is false.\n\n\n  element.style.cursor = cssValueDraggableCursor === false ? orgCursor : cssValueDraggableCursor;\n}\n\nfunction setDraggingCursor(element) {\n  if (cssValueDraggingCursor == null) {\n    if (cssWantedValueDraggingCursor !== false) {\n      cssValueDraggingCursor = CSSPrefix.getValue('cursor', cssWantedValueDraggingCursor);\n    } // The wanted value was denied, or changing is not wanted.\n\n\n    if (cssValueDraggingCursor == null) {\n      cssValueDraggingCursor = false;\n    }\n  }\n\n  if (cssValueDraggingCursor !== false) {\n    element.style.cursor = cssValueDraggingCursor;\n  }\n} // [SVG]\n\n/**\n * Get SVG coordinates from viewport coordinates.\n * @param {props} props - `props` of instance.\n * @param {number} clientX - viewport X.\n * @param {number} clientY - viewport Y.\n * @returns {SVGPoint} SVG coordinates.\n */\n\n\nfunction viewPoint2SvgPoint(props, clientX, clientY) {\n  var svgPoint = props.svgPoint;\n  svgPoint.x = clientX;\n  svgPoint.y = clientY;\n  return svgPoint.matrixTransform(props.svgCtmElement.getScreenCTM().inverse());\n} // [/SVG]\n\n/**\n * Move by `translate`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveTranslate(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.htmlOffset;\n    props.elementStyle[cssPropTransform] = \"translate(\".concat(position.left + offset.left, \"px, \").concat(position.top + offset.top, \"px)\");\n    return true;\n  }\n\n  return false;\n} // [LEFTTOP]\n\n/**\n * Move by `left` and `top`.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveLeftTop(props, position) {\n  var elementBBox = props.elementBBox,\n      elementStyle = props.elementStyle,\n      offset = props.htmlOffset;\n  var moved = false;\n\n  if (position.left !== elementBBox.left) {\n    elementStyle.left = position.left + offset.left + 'px';\n    moved = true;\n  }\n\n  if (position.top !== elementBBox.top) {\n    elementStyle.top = position.top + offset.top + 'px';\n    moved = true;\n  }\n\n  return moved;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Move SVGElement.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction moveSvg(props, position) {\n  var elementBBox = props.elementBBox;\n\n  if (position.left !== elementBBox.left || position.top !== elementBBox.top) {\n    var offset = props.svgOffset,\n        originBBox = props.svgOriginBBox,\n        point = viewPoint2SvgPoint(props, position.left - window.pageXOffset, position.top - window.pageYOffset);\n    props.svgTransform.setTranslate(point.x + offset.x - originBBox.x, point.y + offset.y - originBBox.y);\n    return true;\n  }\n\n  return false;\n} // [/SVG]\n\n/**\n * Set `props.element` position.\n * @param {props} props - `props` of instance.\n * @param {{left: number, top: number}} position - New position.\n * @param {function} [cbCheck] - Callback that is called with valid position, cancel moving if it returns `false`.\n * @returns {boolean} `true` if it was moved.\n */\n\n\nfunction move(props, position, cbCheck) {\n  var elementBBox = props.elementBBox;\n\n  function fix() {\n    if (props.minLeft >= props.maxLeft) {\n      // Disabled\n      position.left = elementBBox.left;\n    } else if (position.left < props.minLeft) {\n      position.left = props.minLeft;\n    } else if (position.left > props.maxLeft) {\n      position.left = props.maxLeft;\n    }\n\n    if (props.minTop >= props.maxTop) {\n      // Disabled\n      position.top = elementBBox.top;\n    } else if (position.top < props.minTop) {\n      position.top = props.minTop;\n    } else if (position.top > props.maxTop) {\n      position.top = props.maxTop;\n    }\n  }\n\n  fix();\n\n  if (cbCheck) {\n    if (cbCheck(position) === false) {\n      return false;\n    }\n\n    fix(); // Again\n  }\n\n  var moved = props.moveElm(props, position);\n\n  if (moved) {\n    // Update elementBBox\n    props.elementBBox = validBBox({\n      left: position.left,\n      top: position.top,\n      width: elementBBox.width,\n      height: elementBBox.height\n    });\n  }\n\n  return moved;\n}\n/**\n * Initialize HTMLElement for `translate`, and get `offset` that is used by `moveTranslate`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initTranslate(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['display', 'marginTop', 'marginBottom', 'width', 'height'];\n  RESTORE_PROPS.unshift(cssPropTransform); // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element),\n      cmpStyle = window.getComputedStyle(element, ''); // https://www.w3.org/TR/css-transforms-1/#transformable-element\n\n  if (cmpStyle.display === 'inline') {\n    elementStyle.display = 'inline-block';\n    ['Top', 'Bottom'].forEach(function (dirProp) {\n      var padding = parseFloat(cmpStyle[\"padding\".concat(dirProp)]); // paddingTop/Bottom make padding but don't make space -> negative margin in inline-block\n      // marginTop/Bottom don't work in inline element -> `0` in inline-block\n\n      elementStyle[\"margin\".concat(dirProp)] = padding ? \"-\".concat(padding, \"px\") : '0';\n    });\n  }\n\n  elementStyle[cssPropTransform] = 'translate(0, 0)'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle[cssPropTransform] = \"translate(\".concat(curPosition.left + offset.left, \"px, \").concat(curPosition.top + offset.top, \"px)\"); // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle[cssPropTransform] = \"translate(\".concat(fixPosition.left + offset.left, \"px, \").concat(fixPosition.top + offset.top, \"px)\");\n  }\n\n  return fixPosition;\n} // [LEFTTOP]\n\n/**\n * Initialize HTMLElement for `left` and `top`, and get `offset` that is used by `moveLeftTop`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initLeftTop(props) {\n  var element = props.element,\n      elementStyle = props.elementStyle,\n      curPosition = getBBox(element),\n      // Get BBox before change style.\n  RESTORE_PROPS = ['position', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'width', 'height']; // Reset `transition-property` every time because it might be changed frequently.\n\n  var orgTransitionProperty = elementStyle[cssPropTransitionProperty];\n  elementStyle[cssPropTransitionProperty] = 'none'; // Disable animation\n\n  var fixPosition = getBBox(element);\n\n  if (!props.orgStyle) {\n    props.orgStyle = RESTORE_PROPS.reduce(function (orgStyle, prop) {\n      orgStyle[prop] = elementStyle[prop] || '';\n      return orgStyle;\n    }, {});\n    props.lastStyle = {};\n  } else {\n    RESTORE_PROPS.forEach(function (prop) {\n      // Skip this if it seems user changed it. (it can't check perfectly.)\n      if (props.lastStyle[prop] == null || elementStyle[prop] === props.lastStyle[prop]) {\n        elementStyle[prop] = props.orgStyle[prop];\n      }\n    });\n  }\n\n  var orgSize = getBBox(element);\n  elementStyle.position = 'absolute';\n  elementStyle.left = elementStyle.top = elementStyle.margin = '0'; // Get document offset.\n\n  var newBBox = getBBox(element);\n  var offset = props.htmlOffset = {\n    left: newBBox.left ? -newBBox.left : 0,\n    top: newBBox.top ? -newBBox.top : 0\n  }; // avoid `-0`\n  // Restore position\n\n  elementStyle.left = curPosition.left + offset.left + 'px';\n  elementStyle.top = curPosition.top + offset.top + 'px'; // Restore size\n\n  ['width', 'height'].forEach(function (prop) {\n    if (newBBox[prop] !== orgSize[prop]) {\n      // Ignore `box-sizing`\n      elementStyle[prop] = orgSize[prop] + 'px';\n      newBBox = getBBox(element);\n\n      if (newBBox[prop] !== orgSize[prop]) {\n        // Retry\n        elementStyle[prop] = orgSize[prop] - (newBBox[prop] - orgSize[prop]) + 'px';\n      }\n    }\n\n    props.lastStyle[prop] = elementStyle[prop];\n  }); // Restore `transition-property`\n\n  element.offsetWidth;\n  /* force reflow */\n  // eslint-disable-line no-unused-expressions\n\n  elementStyle[cssPropTransitionProperty] = orgTransitionProperty;\n\n  if (fixPosition.left !== curPosition.left || fixPosition.top !== curPosition.top) {\n    // It seems that it is moving.\n    elementStyle.left = fixPosition.left + offset.left + 'px';\n    elementStyle.top = fixPosition.top + offset.top + 'px';\n  }\n\n  return fixPosition;\n} // [/LEFTTOP]\n// [SVG]\n\n/**\n * Initialize SVGElement, and get `offset` that is used by `moveSvg`.\n * @param {props} props - `props` of instance.\n * @returns {BBox} Current BBox without animation, i.e. left/top properties.\n */\n\n\nfunction initSvg(props) {\n  var element = props.element,\n      svgTransform = props.svgTransform,\n      curRect = element.getBoundingClientRect(),\n      // Get Rect before change position.\n  fixPosition = getBBox(element);\n  svgTransform.setTranslate(0, 0);\n  var originBBox = props.svgOriginBBox = element.getBBox(),\n      // Try to get SVG coordinates of current position.\n  newRect = element.getBoundingClientRect(),\n      originPoint = viewPoint2SvgPoint(props, newRect.left, newRect.top),\n      // Gecko bug, getScreenCTM returns incorrect CTM, and originPoint might not be current position.\n  offset = props.svgOffset = {\n    x: originBBox.x - originPoint.x,\n    y: originBBox.y - originPoint.y\n  },\n      // Restore position\n  curPoint = viewPoint2SvgPoint(props, curRect.left, curRect.top);\n  svgTransform.setTranslate(curPoint.x + offset.x - originBBox.x, curPoint.y + offset.y - originBBox.y);\n  return fixPosition;\n} // [/SVG]\n\n/**\n * Set `elementBBox`, `containmentBBox`, `min/max``Left/Top` and `snapTargets`.\n * @param {props} props - `props` of instance.\n * @param {string} [eventType] - A type of event that kicked this method.\n * @returns {void}\n */\n\n\nfunction initBBox(props, eventType) {\n  // eslint-disable-line no-unused-vars\n  var docBBox = getBBox(document.documentElement),\n      elementBBox = props.elementBBox = props.initElm(props),\n      // reset offset etc.\n  containmentBBox = props.containmentBBox = props.containmentIsBBox ? resolvePPBBox(props.options.containment, docBBox) || docBBox : getBBox(props.options.containment, true);\n  props.minLeft = containmentBBox.left;\n  props.maxLeft = containmentBBox.right - elementBBox.width;\n  props.minTop = containmentBBox.top;\n  props.maxTop = containmentBBox.bottom - elementBBox.height; // Adjust position\n\n  move(props, {\n    left: elementBBox.left,\n    top: elementBBox.top\n  }); // [SNAP]\n  // Snap-targets\n\n  /**\n   * @typedef {Object} SnapTarget\n   * @property {number} [x] - A coordinate it moves to. It has x or y or both.\n   * @property {number} [y]\n   * @property {number} [gravityXStart] - Gravity zone. It has *Start or *End or both, and *X* or *Y* or both.\n   * @property {number} [gravityXEnd]\n   * @property {number} [gravityYStart]\n   * @property {number} [gravityYEnd]\n   */\n\n  if (props.parsedSnapTargets) {\n    var elementSizeXY = {\n      x: elementBBox.width,\n      y: elementBBox.height\n    },\n        minXY = {\n      x: props.minLeft,\n      y: props.minTop\n    },\n        maxXY = {\n      x: props.maxLeft,\n      y: props.maxTop\n    },\n        prop2Axis = {\n      left: 'x',\n      right: 'x',\n      x: 'x',\n      width: 'x',\n      xStart: 'x',\n      xEnd: 'x',\n      xStep: 'x',\n      top: 'y',\n      bottom: 'y',\n      y: 'y',\n      height: 'y',\n      yStart: 'y',\n      yEnd: 'y',\n      yStep: 'y'\n    },\n        snapTargets = props.parsedSnapTargets.reduce(function (snapTargets, parsedSnapTarget) {\n      var baseRect = parsedSnapTarget.base === 'containment' ? containmentBBox : docBBox,\n          baseOriginXY = {\n        x: baseRect.left,\n        y: baseRect.top\n      },\n          baseSizeXY = {\n        x: baseRect.width,\n        y: baseRect.height\n      };\n      /**\n       * Basically, shallow copy from parsedSnapTarget, and it can have resolved values.\n       * @typedef {{x: (number|PPValue), y, xStart, xEnd, xStep, yStart, yEnd, yStep}} TargetXY\n       * @property {string[]} [corners] - Applied value.\n       * @property {string[]} [sides]\n       * @property {boolean} center\n       * @property {number} [xGravity] - Override parsedSnapTarget.gravity.\n       * @property {number} [yGravity]\n       */\n      // Add single Point or Line (i.e. targetXY has no *Step)\n\n      function addSnapTarget(targetXY) {\n        if (targetXY.center == null) {\n          targetXY.center = parsedSnapTarget.center;\n        }\n\n        if (targetXY.xGravity == null) {\n          targetXY.xGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.yGravity == null) {\n          targetXY.yGravity = parsedSnapTarget.gravity;\n        }\n\n        if (targetXY.x != null && targetXY.y != null) {\n          // Point\n          targetXY.x = resolvePPValue(targetXY.x, baseOriginXY.x, baseSizeXY.x);\n          targetXY.y = resolvePPValue(targetXY.y, baseOriginXY.y, baseSizeXY.y);\n\n          if (targetXY.center) {\n            targetXY.x -= elementSizeXY.x / 2;\n            targetXY.y -= elementSizeXY.y / 2;\n            targetXY.corners = ['tl'];\n          }\n\n          (targetXY.corners || parsedSnapTarget.corners).forEach(function (corner) {\n            var x = targetXY.x - (corner === 'tr' || corner === 'br' ? elementSizeXY.x : 0),\n                y = targetXY.y - (corner === 'bl' || corner === 'br' ? elementSizeXY.y : 0);\n\n            if (x >= minXY.x && x <= maxXY.x && y >= minXY.y && y <= maxXY.y) {\n              var snapTarget = {\n                x: x,\n                y: y\n              },\n                  gravityXStart = x - targetXY.xGravity,\n                  gravityXEnd = x + targetXY.xGravity,\n                  gravityYStart = y - targetXY.yGravity,\n                  gravityYEnd = y + targetXY.yGravity;\n\n              if (gravityXStart > minXY.x) {\n                snapTarget.gravityXStart = gravityXStart;\n              }\n\n              if (gravityXEnd < maxXY.x) {\n                snapTarget.gravityXEnd = gravityXEnd;\n              }\n\n              if (gravityYStart > minXY.y) {\n                snapTarget.gravityYStart = gravityYStart;\n              }\n\n              if (gravityYEnd < maxXY.y) {\n                snapTarget.gravityYEnd = gravityYEnd;\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        } else {\n          // Line\n          var specAxis = targetXY.x != null ? 'x' : 'y',\n              rangeAxis = specAxis === 'x' ? 'y' : 'x',\n              startProp = \"\".concat(rangeAxis, \"Start\"),\n              endProp = \"\".concat(rangeAxis, \"End\"),\n              gravityProp = \"\".concat(specAxis, \"Gravity\"),\n              specAxisL = specAxis.toUpperCase(),\n              rangeAxisL = rangeAxis.toUpperCase(),\n              gravitySpecStartProp = \"gravity\".concat(specAxisL, \"Start\"),\n              gravitySpecEndProp = \"gravity\".concat(specAxisL, \"End\"),\n              gravityRangeStartProp = \"gravity\".concat(rangeAxisL, \"Start\"),\n              gravityRangeEndProp = \"gravity\".concat(rangeAxisL, \"End\");\n          targetXY[specAxis] = resolvePPValue(targetXY[specAxis], baseOriginXY[specAxis], baseSizeXY[specAxis]);\n          targetXY[startProp] = resolvePPValue(targetXY[startProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]);\n          targetXY[endProp] = resolvePPValue(targetXY[endProp], baseOriginXY[rangeAxis], baseSizeXY[rangeAxis]) - elementSizeXY[rangeAxis]; // Reduce the end of the line.\n\n          if (targetXY[startProp] > targetXY[endProp] || // Smaller than element size.\n          targetXY[startProp] > maxXY[rangeAxis] || targetXY[endProp] < minXY[rangeAxis]) {\n            return;\n          }\n\n          if (targetXY.center) {\n            targetXY[specAxis] -= elementSizeXY[specAxis] / 2;\n            targetXY.sides = ['start'];\n          }\n\n          (targetXY.sides || parsedSnapTarget.sides).forEach(function (side) {\n            var xy = targetXY[specAxis] - (side === 'end' ? elementSizeXY[specAxis] : 0);\n\n            if (xy >= minXY[specAxis] && xy <= maxXY[specAxis]) {\n              var snapTarget = {},\n                  gravitySpecStart = xy - targetXY[gravityProp],\n                  gravitySpecEnd = xy + targetXY[gravityProp];\n              snapTarget[specAxis] = xy;\n\n              if (gravitySpecStart > minXY[specAxis]) {\n                snapTarget[gravitySpecStartProp] = gravitySpecStart;\n              }\n\n              if (gravitySpecEnd < maxXY[specAxis]) {\n                snapTarget[gravitySpecEndProp] = gravitySpecEnd;\n              }\n\n              if (targetXY[startProp] > minXY[rangeAxis]) {\n                snapTarget[gravityRangeStartProp] = targetXY[startProp];\n              }\n\n              if (targetXY[endProp] < maxXY[rangeAxis]) {\n                snapTarget[gravityRangeEndProp] = targetXY[endProp];\n              }\n\n              snapTargets.push(snapTarget);\n            }\n          });\n        }\n      }\n\n      var bBox;\n\n      if ((bBox = parsedSnapTarget.element ? getBBox(parsedSnapTarget.element) : null) || // Element\n      parsedSnapTarget.ppBBox) {\n        if (parsedSnapTarget.ppBBox) {\n          bBox = resolvePPBBox(parsedSnapTarget.ppBBox, baseRect);\n        } // BBox\n\n\n        if (bBox) {\n          // Drop invalid BBox.\n          // Expand into 4 lines.\n          parsedSnapTarget.edges.forEach(function (edge) {\n            var lengthenX = parsedSnapTarget.gravity,\n                lengthenY = parsedSnapTarget.gravity;\n\n            if (edge === 'outside') {\n              // Snap it when a part of the element is part of the range.\n              lengthenX += elementBBox.width;\n              lengthenY += elementBBox.height;\n            }\n\n            var xStart = bBox.left - lengthenX,\n                xEnd = bBox.right + lengthenX,\n                yStart = bBox.top - lengthenY,\n                yEnd = bBox.bottom + lengthenY;\n            var side = edge === 'inside' ? 'start' : 'end';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.top,\n              sides: [side],\n              center: false\n            }); // Top\n\n            addSnapTarget({\n              x: bBox.left,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Left\n\n            side = edge === 'inside' ? 'end' : 'start';\n            addSnapTarget({\n              xStart: xStart,\n              xEnd: xEnd,\n              y: bBox.bottom,\n              sides: [side],\n              center: false\n            }); // Bottom\n\n            addSnapTarget({\n              x: bBox.right,\n              yStart: yStart,\n              yEnd: yEnd,\n              sides: [side],\n              center: false\n            }); // Right\n          });\n        }\n      } else {\n        var expanded = [['x', 'y', 'xStart', 'xEnd', 'xStep', 'yStart', 'yEnd', 'yStep'].reduce(function (targetXY, prop) {\n          if (parsedSnapTarget[prop]) {\n            targetXY[prop] = resolvePPValue(parsedSnapTarget[prop], prop === 'xStep' || prop === 'yStep' ? 0 : baseOriginXY[prop2Axis[prop]], baseSizeXY[prop2Axis[prop]]);\n          }\n\n          return targetXY;\n        }, {})];\n        ['x', 'y'].forEach(function (axis) {\n          var startProp = \"\".concat(axis, \"Start\"),\n              endProp = \"\".concat(axis, \"End\"),\n              stepProp = \"\".concat(axis, \"Step\"),\n              gravityProp = \"\".concat(axis, \"Gravity\");\n          expanded = expanded.reduce(function (expanded, targetXY) {\n            var start = targetXY[startProp],\n                end = targetXY[endProp],\n                step = targetXY[stepProp];\n\n            if (start != null && end != null && start >= end) {\n              return expanded;\n            } // start >= end\n\n\n            if (step != null) {\n              if (step < 2) {\n                return expanded;\n              } // step >= 2px -> Expand by step\n\n\n              var gravity = step / 2; // max\n\n              gravity = parsedSnapTarget.gravity > gravity ? gravity : null;\n\n              for (var curValue = start; curValue <= end; curValue += step) {\n                var expandedXY = Object.keys(targetXY).reduce(function (expandedXY, prop) {\n                  if (prop !== startProp && prop !== endProp && prop !== stepProp) {\n                    expandedXY[prop] = targetXY[prop];\n                  }\n\n                  return expandedXY;\n                }, {});\n                expandedXY[axis] = curValue;\n                expandedXY[gravityProp] = gravity;\n                expanded.push(expandedXY);\n              }\n            } else {\n              expanded.push(targetXY);\n            }\n\n            return expanded;\n          }, []);\n        });\n        expanded.forEach(function (targetXY) {\n          addSnapTarget(targetXY);\n        });\n      }\n\n      return snapTargets;\n    }, []);\n    props.snapTargets = snapTargets.length ? snapTargets : null;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n\n  var autoScroll = {},\n      autoScrollOptions = props.options.autoScroll;\n\n  if (autoScrollOptions) {\n    autoScroll.isWindow = autoScrollOptions.target === window;\n    autoScroll.target = autoScrollOptions.target;\n    var dontScroll = eventType === 'scroll',\n        // Avoid duplicated calling\n    scrollable = getScrollable(autoScrollOptions.target, autoScroll.isWindow, dontScroll),\n        scrollableBBox = validBBox({\n      left: scrollable.clientX,\n      top: scrollable.clientY,\n      width: scrollable.clientWidth,\n      height: scrollable.clientHeight\n    });\n\n    if (!dontScroll) {\n      autoScroll.scrollWidth = scrollable.scrollWidth;\n      autoScroll.scrollHeight = scrollable.scrollHeight;\n    } else if (props.autoScroll) {\n      autoScroll.scrollWidth = props.autoScroll.scrollWidth;\n      autoScroll.scrollHeight = props.autoScroll.scrollHeight;\n    }\n\n    [['X', 'Width', 'left', 'right'], ['Y', 'Height', 'top', 'bottom']].forEach(function (axis) {\n      var xy = axis[0],\n          wh = axis[1],\n          back = axis[2],\n          forward = axis[3],\n          maxAbs = (autoScroll[\"scroll\".concat(wh)] || 0) - scrollable[\"client\".concat(wh)],\n          min = autoScrollOptions[\"min\".concat(xy)] || 0;\n      var max = isFinite(autoScrollOptions[\"max\".concat(xy)]) ? autoScrollOptions[\"max\".concat(xy)] : maxAbs;\n\n      if (min < max && min < maxAbs) {\n        if (max > maxAbs) {\n          max = maxAbs;\n        }\n\n        var lines = [],\n            elementSize = elementBBox[wh.toLowerCase()];\n\n        for (var i = autoScrollOptions.sensitivity.length - 1; i >= 0; i--) {\n          // near -> far\n          var sensitivity = autoScrollOptions.sensitivity[i],\n              speed = autoScrollOptions.speed[i]; // back\n\n          lines.push({\n            dir: -1,\n            speed: speed,\n            position: scrollableBBox[back] + sensitivity\n          }); // forward\n\n          lines.push({\n            dir: 1,\n            speed: speed,\n            position: scrollableBBox[forward] - sensitivity - elementSize\n          });\n        }\n\n        autoScroll[xy.toLowerCase()] = {\n          min: min,\n          max: max,\n          lines: lines\n        };\n      }\n    });\n  }\n\n  props.autoScroll = autoScroll.x || autoScroll.y ? autoScroll : null; // [/AUTO-SCROLL]\n}\n/**\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction dragEnd(props) {\n  scrollFrame.stop(); // [AUTO-SCROLL/]\n\n  setDraggableCursor(props.options.handle, props.orgCursor);\n  body.style.cursor = cssOrgValueBodyCursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.orgZIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = cssOrgValueBodyUserSelect;\n  }\n\n  var classList = mClassList(props.element);\n\n  if (movingClass) {\n    classList.remove(movingClass);\n  }\n\n  if (draggingClass) {\n    classList.remove(draggingClass);\n  }\n\n  activeProps = null;\n  pointerEvent.cancel(); // Reset pointer (activeProps must be null because this calls endHandler)\n\n  if (props.onDragEnd) {\n    props.onDragEnd({\n      left: props.elementBBox.left,\n      top: props.elementBBox.top\n    });\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {{clientX, clientY}} pointerXY - This might be MouseEvent, Touch of TouchEvent or Object.\n * @returns {boolean} `true` if it started.\n */\n\n\nfunction dragStart(props, pointerXY) {\n  if (props.disabled) {\n    return false;\n  }\n\n  if (props.onDragStart && props.onDragStart(pointerXY) === false) {\n    return false;\n  }\n\n  if (activeProps) {\n    dragEnd(activeProps);\n  } // activeItem is normally null by pointerEvent.end.\n\n\n  setDraggingCursor(props.options.handle);\n  body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n  window.getComputedStyle(props.options.handle, '').cursor;\n\n  if (props.options.zIndex !== false) {\n    props.elementStyle.zIndex = props.options.zIndex;\n  }\n\n  if (cssPropUserSelect) {\n    body.style[cssPropUserSelect] = 'none';\n  }\n\n  if (draggingClass) {\n    mClassList(props.element).add(draggingClass);\n  }\n\n  activeProps = props;\n  hasMoved = false;\n  pointerOffset.left = props.elementBBox.left - (pointerXY.clientX + window.pageXOffset);\n  pointerOffset.top = props.elementBBox.top - (pointerXY.clientY + window.pageYOffset);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options;\n  var needsInitBBox; // containment\n\n  if (newOptions.containment) {\n    var bBox;\n\n    if (isElement(newOptions.containment)) {\n      // Specific element\n      if (newOptions.containment !== options.containment) {\n        options.containment = newOptions.containment;\n        props.containmentIsBBox = false;\n        needsInitBBox = true;\n      }\n    } else if ((bBox = validPPBBox(copyTree(newOptions.containment))) && // bBox\n    hasChanged(bBox, options.containment)) {\n      options.containment = bBox;\n      props.containmentIsBBox = true;\n      needsInitBBox = true;\n    }\n  } // [SNAP]\n\n  /**\n   * @typedef {Object} SnapOptions\n   * @property {SnapTargetOptions[]} targets\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} SnapTargetOptions\n   * @property {(number|string)} [x] - pixels | '<n>%' | {start, end} | {step, start, end}\n   * @property {(number|string)} [y]\n   * @property {(Element|Object)} [boundingBox] - Object has properties that are string or number from PPBBox.\n   * @property {number} [gravity]\n   * @property {string} [corner]\n   * @property {string} [side]\n   * @property {boolean} [center]\n   * @property {string} [edge]\n   * @property {string} [base]\n   */\n\n  /**\n   * @typedef {Object} ParsedSnapTarget\n   * @property {PPValue} [x] - (input: pixels | '<n>%')\n   * @property {PPValue} [y]\n   * @property {PPValue} [xStart] - (input: {start, end} | {step, start, end})\n   * @property {PPValue} [xEnd]\n   * @property {PPValue} [xStep] - (input: {step, start, end})\n   * @property {PPValue} [yStart]\n   * @property {PPValue} [yEnd]\n   * @property {PPValue} [yStep]\n   * @property {Element} [element]\n   * @property {PPBBox} [ppBBox]\n   * @property {number} gravity\n   * @property {string[]} corners\n   * @property {string[]} sides\n   * @property {boolean} center\n   * @property {string[]} edges\n   * @property {string} base\n   */\n  // Normalize `gravity`, `corner`, `side`, `center`, `edge`, `base`\n\n\n  function commonSnapOptions(options, newOptions) {\n    function cleanString(inString) {\n      return typeof inString === 'string' ? inString.replace(/[, ]+/g, ' ').trim().toLowerCase() : null;\n    } // gravity\n\n\n    if (isFinite(newOptions.gravity) && newOptions.gravity > 0) {\n      options.gravity = newOptions.gravity;\n    } // corner\n\n\n    var corner = cleanString(newOptions.corner);\n\n    if (corner) {\n      if (corner !== 'all') {\n        var added = {},\n            corners = corner.split(/\\s/).reduce(function (corners, corner) {\n          corner = corner.trim().replace(/^(.).*?-(.).*$/, '$1$2');\n\n          if ((corner = corner === 'tl' || corner === 'lt' ? 'tl' : corner === 'tr' || corner === 'rt' ? 'tr' : corner === 'bl' || corner === 'lb' ? 'bl' : corner === 'br' || corner === 'rb' ? 'br' : null) && !added[corner]) {\n            corners.push(corner);\n            added[corner] = true;\n          }\n\n          return corners;\n        }, []),\n            cornersLen = corners.length;\n        corner = !cornersLen ? null : cornersLen === 4 ? 'all' : corners.join(' ');\n      }\n\n      if (corner) {\n        options.corner = corner;\n      }\n    } // side\n\n\n    var side = cleanString(newOptions.side);\n\n    if (side) {\n      if (side === 'start' || side === 'end' || side === 'both') {\n        options.side = side;\n      } else if (side === 'start end' || side === 'end start') {\n        options.side = 'both';\n      }\n    } // center\n\n\n    if (typeof newOptions.center === 'boolean') {\n      options.center = newOptions.center;\n    } // edge\n\n\n    var edge = cleanString(newOptions.edge);\n\n    if (edge) {\n      if (edge === 'inside' || edge === 'outside' || edge === 'both') {\n        options.edge = edge;\n      } else if (edge === 'inside outside' || edge === 'outside inside') {\n        options.edge = 'both';\n      }\n    } // base\n\n\n    var base = typeof newOptions.base === 'string' ? newOptions.base.trim().toLowerCase() : null;\n\n    if (base && (base === 'containment' || base === 'document')) {\n      options.base = base;\n    }\n\n    return options;\n  } // snap\n\n\n  if (newOptions.snap != null) {\n    var newSnapOptions = isObject(newOptions.snap) && newOptions.snap.targets != null ? newOptions.snap : {\n      targets: newOptions.snap\n    },\n        snapTargetsOptions = [],\n        snapOptions = commonSnapOptions({\n      targets: snapTargetsOptions\n    }, newSnapOptions); // Set default options into top level.\n\n    if (!snapOptions.gravity) {\n      snapOptions.gravity = SNAP_GRAVITY;\n    }\n\n    if (!snapOptions.corner) {\n      snapOptions.corner = SNAP_CORNER;\n    }\n\n    if (!snapOptions.side) {\n      snapOptions.side = SNAP_SIDE;\n    }\n\n    if (typeof snapOptions.center !== 'boolean') {\n      snapOptions.center = false;\n    }\n\n    if (!snapOptions.edge) {\n      snapOptions.edge = SNAP_EDGE;\n    }\n\n    if (!snapOptions.base) {\n      snapOptions.base = SNAP_BASE;\n    }\n\n    var parsedSnapTargets = (Array.isArray(newSnapOptions.targets) ? newSnapOptions.targets : [newSnapOptions.targets]).reduce(function (parsedSnapTargets, target) {\n      if (target == null) {\n        return parsedSnapTargets;\n      }\n\n      var isElementPre = isElement(target),\n          // Pre-check direct value\n      ppBBoxPre = validPPBBox(copyTree(target)),\n          // Pre-check direct value\n      newSnapTargetOptions = isElementPre || ppBBoxPre ? {\n        boundingBox: target\n      } : // Direct Element | PPBBox\n      isObject(target) && target.start == null && target.end == null && target.step == null ? target : // SnapTargetOptions\n      {\n        x: target,\n        y: target\n      },\n          // Others, it might be {step, start, end}\n      expandedParsedSnapTargets = [],\n          snapTargetOptions = {},\n          newOptionsBBox = newSnapTargetOptions.boundingBox;\n      var ppBBox;\n\n      if (isElementPre || isElement(newOptionsBBox)) {\n        // Element\n        expandedParsedSnapTargets.push({\n          element: newOptionsBBox\n        });\n        snapTargetOptions.boundingBox = newOptionsBBox;\n      } else if (ppBBox = ppBBoxPre || validPPBBox(copyTree(newOptionsBBox))) {\n        // Object -> PPBBox\n        expandedParsedSnapTargets.push({\n          ppBBox: ppBBox\n        });\n        snapTargetOptions.boundingBox = ppBBox2OptionObject(ppBBox);\n      } else {\n        var invalid; // `true` if valid PPValue was given but the contained value is invalid.\n\n        var parsedXY = ['x', 'y'].reduce(function (parsedXY, axis) {\n          var newOptionsXY = newSnapTargetOptions[axis];\n          var ppValue;\n\n          if (ppValue = validPPValue(newOptionsXY)) {\n            // pixels | '<n>%'\n            parsedXY[axis] = ppValue;\n            snapTargetOptions[axis] = ppValue2OptionValue(ppValue);\n          } else {\n            // {start, end} | {step, start, end}\n            var start, end, step;\n\n            if (isObject(newOptionsXY)) {\n              start = validPPValue(newOptionsXY.start);\n              end = validPPValue(newOptionsXY.end);\n              step = validPPValue(newOptionsXY.step);\n\n              if (start && end && start.isRatio === end.isRatio && start.value >= end.value) {\n                // start >= end\n                invalid = true;\n              }\n            }\n\n            start = parsedXY[\"\".concat(axis, \"Start\")] = start || {\n              value: 0,\n              isRatio: false\n            };\n            end = parsedXY[\"\".concat(axis, \"End\")] = end || {\n              value: 1,\n              isRatio: true\n            };\n            snapTargetOptions[axis] = {\n              start: ppValue2OptionValue(start),\n              end: ppValue2OptionValue(end)\n            };\n\n            if (step) {\n              if (step.isRatio ? step.value > 0 : step.value >= 2) {\n                // step > 0% || step >= 2px\n                parsedXY[\"\".concat(axis, \"Step\")] = step;\n                snapTargetOptions[axis].step = ppValue2OptionValue(step);\n              } else {\n                invalid = true;\n              }\n            }\n          }\n\n          return parsedXY;\n        }, {});\n\n        if (invalid) {\n          return parsedSnapTargets;\n        }\n\n        if (parsedXY.xStart && !parsedXY.xStep && parsedXY.yStart && !parsedXY.yStep) {\n          // Expand into 4 lines. This is not BBox, and `edge` is ignored.\n          expandedParsedSnapTargets.push({\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yStart\n          }, // Top\n          {\n            xStart: parsedXY.xStart,\n            xEnd: parsedXY.xEnd,\n            y: parsedXY.yEnd\n          }, // Bottom\n          {\n            x: parsedXY.xStart,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          }, // Left\n          {\n            x: parsedXY.xEnd,\n            yStart: parsedXY.yStart,\n            yEnd: parsedXY.yEnd\n          } // Right\n          );\n        } else {\n          expandedParsedSnapTargets.push(parsedXY);\n        }\n      }\n\n      if (expandedParsedSnapTargets.length) {\n        snapTargetsOptions.push(commonSnapOptions(snapTargetOptions, newSnapTargetOptions)); // Copy common SnapOptions\n\n        var corner = snapTargetOptions.corner || snapOptions.corner,\n            side = snapTargetOptions.side || snapOptions.side,\n            edge = snapTargetOptions.edge || snapOptions.edge,\n            commonOptions = {\n          gravity: snapTargetOptions.gravity || snapOptions.gravity,\n          base: snapTargetOptions.base || snapOptions.base,\n          center: typeof snapTargetOptions.center === 'boolean' ? snapTargetOptions.center : snapOptions.center,\n          corners: corner === 'all' ? SNAP_ALL_CORNERS : corner.split(' '),\n          // Split\n          sides: side === 'both' ? SNAP_ALL_SIDES : [side],\n          // Split\n          edges: edge === 'both' ? SNAP_ALL_EDGES : [edge] // Split\n\n        };\n        expandedParsedSnapTargets.forEach(function (parsedSnapTarget) {\n          // Set common SnapOptions\n          ['gravity', 'corners', 'sides', 'center', 'edges', 'base'].forEach(function (option) {\n            parsedSnapTarget[option] = commonOptions[option];\n          });\n          parsedSnapTargets.push(parsedSnapTarget);\n        });\n      }\n\n      return parsedSnapTargets;\n    }, []);\n\n    if (parsedSnapTargets.length) {\n      options.snap = snapOptions; // Update always\n\n      if (hasChanged(parsedSnapTargets, props.parsedSnapTargets)) {\n        props.parsedSnapTargets = parsedSnapTargets;\n        needsInitBBox = true;\n      }\n    }\n  } else if (newOptions.hasOwnProperty('snap') && props.parsedSnapTargets) {\n    options.snap = props.parsedSnapTargets = props.snapTargets = void 0;\n  } // [/SNAP]\n  // [AUTO-SCROLL]\n\n  /**\n   * @typedef {Object} AutoScrollOptions\n   * @property {(Element|Window)} target\n   * @property {Array} speed\n   * @property {Array} sensitivity\n   * @property {number} [minX]\n   * @property {number} [maxX]\n   * @property {number} [minY]\n   * @property {number} [maxY]\n   */\n  // autoScroll\n\n\n  if (newOptions.autoScroll) {\n    var newAutoScrollOptions = isObject(newOptions.autoScroll) ? newOptions.autoScroll : {\n      target: newOptions.autoScroll === true ? window : newOptions.autoScroll\n    },\n        autoScrollOptions = {}; // target\n\n    autoScrollOptions.target = isElement(newAutoScrollOptions.target) ? newAutoScrollOptions.target : window; // speed\n\n    autoScrollOptions.speed = [];\n    (Array.isArray(newAutoScrollOptions.speed) ? newAutoScrollOptions.speed : [newAutoScrollOptions.speed]).every(function (speed, i) {\n      if (i <= 2 && isFinite(speed)) {\n        autoScrollOptions.speed[i] = speed;\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!autoScrollOptions.speed.length) {\n      autoScrollOptions.speed = AUTOSCROLL_SPEED;\n    } // sensitivity\n\n\n    var newSensitivity = Array.isArray(newAutoScrollOptions.sensitivity) ? newAutoScrollOptions.sensitivity : [newAutoScrollOptions.sensitivity];\n    autoScrollOptions.sensitivity = autoScrollOptions.speed.map(function (v, i) {\n      return isFinite(newSensitivity[i]) ? newSensitivity[i] : AUTOSCROLL_SENSITIVITY[i];\n    }); // min*, max*\n\n    ['X', 'Y'].forEach(function (option) {\n      var optionMin = \"min\".concat(option),\n          optionMax = \"max\".concat(option);\n\n      if (isFinite(newAutoScrollOptions[optionMin]) && newAutoScrollOptions[optionMin] >= 0) {\n        autoScrollOptions[optionMin] = newAutoScrollOptions[optionMin];\n      }\n\n      if (isFinite(newAutoScrollOptions[optionMax]) && newAutoScrollOptions[optionMax] >= 0 && (!autoScrollOptions[optionMin] || newAutoScrollOptions[optionMax] >= autoScrollOptions[optionMin])) {\n        autoScrollOptions[optionMax] = newAutoScrollOptions[optionMax];\n      }\n    });\n\n    if (hasChanged(autoScrollOptions, options.autoScroll)) {\n      options.autoScroll = autoScrollOptions;\n      needsInitBBox = true;\n    }\n  } else if (newOptions.hasOwnProperty('autoScroll')) {\n    if (options.autoScroll) {\n      needsInitBBox = true;\n    }\n\n    options.autoScroll = void 0;\n  } // [/AUTO-SCROLL]\n\n\n  if (needsInitBBox) {\n    initBBox(props);\n  } // handle\n\n\n  if (isElement(newOptions.handle) && newOptions.handle !== options.handle) {\n    if (options.handle) {\n      // Restore\n      options.handle.style.cursor = props.orgCursor;\n\n      if (cssPropUserSelect) {\n        options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n      }\n\n      pointerEvent.removeStartHandler(options.handle, props.pointerEventHandlerId);\n    }\n\n    var handle = options.handle = newOptions.handle;\n    props.orgCursor = handle.style.cursor;\n    setDraggableCursor(handle, props.orgCursor);\n\n    if (cssPropUserSelect) {\n      props.orgUserSelect = handle.style[cssPropUserSelect];\n      handle.style[cssPropUserSelect] = 'none';\n    }\n\n    pointerEvent.addStartHandler(handle, props.pointerEventHandlerId);\n  } // zIndex\n\n\n  if (isFinite(newOptions.zIndex) || newOptions.zIndex === false) {\n    options.zIndex = newOptions.zIndex;\n\n    if (props === activeProps) {\n      props.elementStyle.zIndex = options.zIndex === false ? props.orgZIndex : options.zIndex;\n    }\n  } // left/top\n\n\n  var position = {\n    left: props.elementBBox.left,\n    top: props.elementBBox.top\n  };\n  var needsMove;\n\n  if (isFinite(newOptions.left) && newOptions.left !== position.left) {\n    position.left = newOptions.left;\n    needsMove = true;\n  }\n\n  if (isFinite(newOptions.top) && newOptions.top !== position.top) {\n    position.top = newOptions.top;\n    needsMove = true;\n  }\n\n  if (needsMove) {\n    move(props, position);\n  } // Event listeners\n\n\n  ['onDrag', 'onMove', 'onDragStart', 'onMoveStart', 'onDragEnd'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n      props[option] = options[option].bind(props.ins);\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = props[option] = void 0;\n    }\n  });\n}\n\nvar PlainDraggable = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainDraggable` instance.\n   * @param {Element} element - Target element.\n   * @param {Object} [options] - Options.\n   */\n  function PlainDraggable(element, options) {\n    _classCallCheck(this, PlainDraggable);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        zIndex: ZINDEX // Initial state.\n\n      },\n      disabled: false\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!isElement(element) || element === body) {\n      throw new Error('This element is not accepted.');\n    }\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    }\n\n    var gpuTrigger = true; // [SVG]\n\n    var ownerSvg; // SVGElement which is not root view\n\n    if (element instanceof SVGElement && (ownerSvg = element.ownerSVGElement)) {\n      // It means `instanceof SVGLocatable` (many browsers don't have SVGLocatable)\n      if (!element.getBBox) {\n        throw new Error('This element is not accepted. (SVGLocatable)');\n      } // Trident and Edge bug, SVGSVGElement doesn't have SVGAnimatedTransformList?\n\n\n      if (!element.transform) {\n        throw new Error('This element is not accepted. (SVGAnimatedTransformList)');\n      } // Trident bug, returned value must be used (That is not given value).\n\n\n      props.svgTransform = element.transform.baseVal.appendItem(ownerSvg.createSVGTransform());\n      props.svgPoint = ownerSvg.createSVGPoint(); // Gecko bug, view.getScreenCTM returns CTM with root view.\n\n      var svgView = element.nearestViewportElement;\n      props.svgCtmElement = !IS_GECKO ? svgView : svgView.appendChild(document.createElementNS(ownerSvg.namespaceURI, 'rect'));\n      gpuTrigger = false;\n      props.initElm = initSvg;\n      props.moveElm = moveSvg;\n    } else {\n      // [/SVG]\n\n      /* eslint-disable indent */\n\n      /* [SVG/] */\n      var cssPropWillChange = CSSPrefix.getName('willChange');\n\n      if (cssPropWillChange) {\n        gpuTrigger = false;\n      }\n\n      if (!options.leftTop && cssPropTransform) {\n        // translate\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'transform';\n        }\n\n        props.initElm = initTranslate;\n        props.moveElm = moveTranslate;\n      } else {\n        // left and top\n        // [LEFTTOP]\n        if (cssPropWillChange) {\n          element.style[cssPropWillChange] = 'left, top';\n        }\n\n        props.initElm = initLeftTop;\n        props.moveElm = moveLeftTop; // [/LEFTTOP]\n\n        /* [LEFTTOP/]\n        throw new Error('`transform` is not supported.');\n        [LEFTTOP/] */\n      }\n      /* eslint-enable indent */\n\n      /* [SVG/] */\n\n    } // [SVG/]\n\n\n    props.element = initAnim(element, gpuTrigger);\n    props.elementStyle = element.style;\n    props.orgZIndex = props.elementStyle.zIndex;\n\n    if (draggableClass) {\n      mClassList(element).add(draggableClass);\n    }\n\n    props.pointerEventHandlerId = pointerEvent.regStartHandler(function (pointerXY) {\n      return dragStart(props, pointerXY);\n    }); // Default options\n\n    if (!options.containment) {\n      var parent;\n      options.containment = (parent = element.parentNode) && isElement(parent) ? parent : body;\n    }\n\n    if (!options.handle) {\n      options.handle = element;\n    }\n\n    _setOptions(props, options);\n  }\n\n  _createClass(PlainDraggable, [{\n    key: \"remove\",\n    value: function remove() {\n      var props = insProps[this._id];\n      this.disabled = true; // To restore element and reset pointer\n\n      pointerEvent.unregStartHandler(pointerEvent.removeStartHandler(props.options.handle, props.pointerEventHandlerId));\n      delete insProps[this._id];\n    }\n    /**\n     * @param {Object} options - New options.\n     * @returns {PlainDraggable} Current instance itself.\n     */\n\n  }, {\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n  }, {\n    key: \"position\",\n    value: function position() {\n      initBBox(insProps[this._id]);\n      return this;\n    }\n  }, {\n    key: \"disabled\",\n    get: function get() {\n      return insProps[this._id].disabled;\n    },\n    set: function set(value) {\n      var props = insProps[this._id];\n\n      if ((value = !!value) !== props.disabled) {\n        props.disabled = value;\n\n        if (props.disabled) {\n          if (props === activeProps) {\n            dragEnd(props);\n          }\n\n          props.options.handle.style.cursor = props.orgCursor;\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = props.orgUserSelect;\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).remove(draggableClass);\n          }\n        } else {\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (cssPropUserSelect) {\n            props.options.handle.style[cssPropUserSelect] = 'none';\n          }\n\n          if (draggableClass) {\n            mClassList(props.element).add(draggableClass);\n          }\n        }\n      }\n    }\n  }, {\n    key: \"element\",\n    get: function get() {\n      return insProps[this._id].element;\n    }\n  }, {\n    key: \"rect\",\n    get: function get() {\n      return copyTree(insProps[this._id].elementBBox);\n    }\n  }, {\n    key: \"left\",\n    get: function get() {\n      return insProps[this._id].elementBBox.left;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        left: value\n      });\n    }\n  }, {\n    key: \"top\",\n    get: function get() {\n      return insProps[this._id].elementBBox.top;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        top: value\n      });\n    }\n  }, {\n    key: \"containment\",\n    get: function get() {\n      var props = insProps[this._id];\n      return props.containmentIsBBox ? ppBBox2OptionObject(props.options.containment) : props.options.containment;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        containment: value\n      });\n    } // [SNAP]\n\n  }, {\n    key: \"snap\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.snap);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        snap: value\n      });\n    } // [/SNAP]\n    // [AUTO-SCROLL]\n\n  }, {\n    key: \"autoScroll\",\n    get: function get() {\n      return copyTree(insProps[this._id].options.autoScroll);\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        autoScroll: value\n      });\n    } // [/AUTO-SCROLL]\n\n  }, {\n    key: \"handle\",\n    get: function get() {\n      return insProps[this._id].options.handle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        handle: value\n      });\n    }\n  }, {\n    key: \"zIndex\",\n    get: function get() {\n      return insProps[this._id].options.zIndex;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        zIndex: value\n      });\n    }\n  }, {\n    key: \"onDrag\",\n    get: function get() {\n      return insProps[this._id].options.onDrag;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDrag: value\n      });\n    }\n  }, {\n    key: \"onMove\",\n    get: function get() {\n      return insProps[this._id].options.onMove;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMove: value\n      });\n    }\n  }, {\n    key: \"onDragStart\",\n    get: function get() {\n      return insProps[this._id].options.onDragStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragStart: value\n      });\n    }\n  }, {\n    key: \"onMoveStart\",\n    get: function get() {\n      return insProps[this._id].options.onMoveStart;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onMoveStart: value\n      });\n    }\n  }, {\n    key: \"onDragEnd\",\n    get: function get() {\n      return insProps[this._id].options.onDragEnd;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onDragEnd: value\n      });\n    }\n  }], [{\n    key: \"draggableCursor\",\n    get: function get() {\n      return cssWantedValueDraggableCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggableCursor !== value) {\n        cssWantedValueDraggableCursor = value;\n        cssValueDraggableCursor = null; // Reset\n\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (props.disabled || props === activeProps && cssValueDraggingCursor !== false) {\n            return;\n          }\n\n          setDraggableCursor(props.options.handle, props.orgCursor);\n\n          if (props === activeProps) {\n            // Since cssValueDraggingCursor is `false`, copy cursor again.\n            body.style.cursor = cssOrgValueBodyCursor;\n            body.style.cursor = window.getComputedStyle(props.options.handle, '').cursor;\n          }\n        });\n      }\n    }\n  }, {\n    key: \"draggingCursor\",\n    get: function get() {\n      return cssWantedValueDraggingCursor;\n    },\n    set: function set(value) {\n      if (cssWantedValueDraggingCursor !== value) {\n        cssWantedValueDraggingCursor = value;\n        cssValueDraggingCursor = null; // Reset\n\n        if (activeProps) {\n          setDraggingCursor(activeProps.options.handle);\n\n          if (cssValueDraggingCursor === false) {\n            setDraggableCursor(activeProps.options.handle, activeProps.orgCursor); // draggableCursor\n\n            body.style.cursor = cssOrgValueBodyCursor;\n          }\n\n          body.style.cursor = cssValueDraggingCursor || // If it is `false` or `''`\n          window.getComputedStyle(activeProps.options.handle, '').cursor;\n        }\n      }\n    }\n  }, {\n    key: \"draggableClass\",\n    get: function get() {\n      return draggableClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggableClass) {\n        Object.keys(insProps).forEach(function (id) {\n          var props = insProps[id];\n\n          if (!props.disabled) {\n            var classList = mClassList(props.element);\n\n            if (draggableClass) {\n              classList.remove(draggableClass);\n            }\n\n            if (value) {\n              classList.add(value);\n            }\n          }\n        });\n        draggableClass = value;\n      }\n    }\n  }, {\n    key: \"draggingClass\",\n    get: function get() {\n      return draggingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== draggingClass) {\n        if (activeProps) {\n          var classList = mClassList(activeProps.element);\n\n          if (draggingClass) {\n            classList.remove(draggingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        draggingClass = value;\n      }\n    }\n  }, {\n    key: \"movingClass\",\n    get: function get() {\n      return movingClass;\n    },\n    set: function set(value) {\n      value = value ? value + '' : void 0;\n\n      if (value !== movingClass) {\n        if (activeProps && hasMoved) {\n          var classList = mClassList(activeProps.element);\n\n          if (movingClass) {\n            classList.remove(movingClass);\n          }\n\n          if (value) {\n            classList.add(value);\n          }\n        }\n\n        movingClass = value;\n      }\n    }\n  }]);\n\n  return PlainDraggable;\n}();\n\npointerEvent.addMoveHandler(document, function (pointerXY) {\n  if (!activeProps) {\n    return;\n  }\n\n  var position = {\n    left: pointerXY.clientX + window.pageXOffset + pointerOffset.left,\n    top: pointerXY.clientY + window.pageYOffset + pointerOffset.top\n  };\n\n  if (move(activeProps, position, // [SNAP]\n  activeProps.snapTargets ? function (position) {\n    // Snap\n    var iLen = activeProps.snapTargets.length;\n    var snappedX = false,\n        snappedY = false,\n        i;\n\n    for (i = 0; i < iLen && (!snappedX || !snappedY); i++) {\n      var snapTarget = activeProps.snapTargets[i];\n\n      if ((snapTarget.gravityXStart == null || position.left >= snapTarget.gravityXStart) && (snapTarget.gravityXEnd == null || position.left <= snapTarget.gravityXEnd) && (snapTarget.gravityYStart == null || position.top >= snapTarget.gravityYStart) && (snapTarget.gravityYEnd == null || position.top <= snapTarget.gravityYEnd)) {\n        if (!snappedX && snapTarget.x != null) {\n          position.left = snapTarget.x;\n          snappedX = true;\n          i = -1; // Restart loop\n        }\n\n        if (!snappedY && snapTarget.y != null) {\n          position.top = snapTarget.y;\n          snappedY = true;\n          i = -1; // Restart loop\n        }\n      }\n    }\n\n    position.snapped = snappedX || snappedY;\n    return activeProps.onDrag ? activeProps.onDrag(position) : true;\n  } : // [/SNAP]\n  activeProps.onDrag)) {\n    // [AUTO-SCROLL]\n    var xyMoveArgs = {},\n        autoScroll = activeProps.autoScroll;\n\n    if (autoScroll) {\n      var clientXY = {\n        x: activeProps.elementBBox.left - window.pageXOffset,\n        y: activeProps.elementBBox.top - window.pageYOffset\n      };\n      ['x', 'y'].forEach(function (axis) {\n        if (autoScroll[axis]) {\n          var min = autoScroll[axis].min,\n              max = autoScroll[axis].max;\n          autoScroll[axis].lines.some(function (line) {\n            if (line.dir === -1 ? clientXY[axis] <= line.position : clientXY[axis] >= line.position) {\n              xyMoveArgs[axis] = {\n                dir: line.dir,\n                speed: line.speed / 1000,\n                min: min,\n                max: max\n              };\n              return true;\n            }\n\n            return false;\n          });\n        }\n      });\n    }\n\n    if (xyMoveArgs.x || xyMoveArgs.y) {\n      scrollFrame.move(autoScroll.target, xyMoveArgs, autoScroll.isWindow ? scrollXYWindow : scrollXYElement);\n      position.autoScroll = true;\n    } else {\n      scrollFrame.stop();\n    } // [/AUTO-SCROLL]\n\n\n    if (!hasMoved) {\n      hasMoved = true;\n\n      if (movingClass) {\n        mClassList(activeProps.element).add(movingClass);\n      }\n\n      if (activeProps.onMoveStart) {\n        activeProps.onMoveStart(position);\n      }\n    }\n\n    if (activeProps.onMove) {\n      activeProps.onMove(position);\n    }\n  }\n});\n{\n  function endHandler() {\n    if (activeProps) {\n      dragEnd(activeProps);\n    }\n  }\n\n  pointerEvent.addEndHandler(document, endHandler);\n  pointerEvent.addCancelHandler(document, endHandler);\n}\n{\n  function initDoc() {\n    cssPropTransitionProperty = CSSPrefix.getName('transitionProperty');\n    cssPropTransform = CSSPrefix.getName('transform');\n    cssOrgValueBodyCursor = body.style.cursor;\n\n    if (cssPropUserSelect = CSSPrefix.getName('userSelect')) {\n      cssOrgValueBodyUserSelect = body.style[cssPropUserSelect];\n    } // Init active item when layout is changed, and init others later.\n\n\n    var LAZY_INIT_DELAY = 200;\n    var initDoneItems = {},\n        lazyInitTimer;\n\n    function checkInitBBox(props, eventType) {\n      if (props.initElm) {\n        // Easy checking for instance without errors.\n        initBBox(props, eventType);\n      } // eslint-disable-line brace-style\n\n    }\n\n    function initAll(eventType) {\n      clearTimeout(lazyInitTimer);\n      Object.keys(insProps).forEach(function (id) {\n        if (!initDoneItems[id]) {\n          checkInitBBox(insProps[id], eventType);\n        }\n      });\n      initDoneItems = {};\n    }\n\n    var layoutChanging = false; // Gecko bug, multiple calling by `resize`.\n\n    var layoutChange = AnimEvent.add(function (event) {\n      if (layoutChanging) {\n        return;\n      }\n\n      layoutChanging = true;\n\n      if (activeProps) {\n        checkInitBBox(activeProps, event.type);\n        pointerEvent.move();\n        initDoneItems[activeProps._id] = true;\n      }\n\n      clearTimeout(lazyInitTimer);\n      lazyInitTimer = setTimeout(function () {\n        initAll(event.type);\n      }, LAZY_INIT_DELAY);\n      layoutChanging = false;\n    });\n    window.addEventListener('resize', layoutChange, true);\n    window.addEventListener('scroll', layoutChange, true);\n  }\n\n  if (body = document.body) {\n    initDoc();\n  } else {\n    document.addEventListener('DOMContentLoaded', function () {\n      body = document.body;\n      initDoc();\n    }, true);\n  }\n}\n/* [SNAP/]\nPlainDraggable.limit = true;\n[SNAP/] */\n\nexport default PlainDraggable;","/* ================================================\n        DON'T MANUALLY EDIT THIS FILE\n================================================ */\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\n * PlainModal\n * https://anseki.github.io/plain-modal/\n *\n * Copyright (c) 2021 anseki\n * Licensed under the MIT license.\n */\nimport CSSPrefix from 'cssprefix';\nimport mClassList from 'm-class-list';\nimport PlainOverlay from 'plain-overlay';\n/* Static ESM */ /* import CSS_TEXT from './default.scss' */ var CSS_TEXT = \".plainmodal .plainmodal-overlay{-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0)}.plainmodal.plainoverlay{background-color:transparent;cursor:auto}.plainmodal .plainmodal-content{z-index:9000}.plainmodal .plainmodal-overlay{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(136,136,136,.6);transition-property:opacity;transition-duration:200ms;transition-timing-function:linear;opacity:1}.plainmodal .plainmodal-overlay.plainmodal-overlay-hide{opacity:0}.plainmodal .plainmodal-overlay.plainmodal-overlay-force{transition-property:none}\"; // [DRAG]\n\nimport PlainDraggable from 'plain-draggable'; // [/DRAG]\n\nmClassList.ignoreNative = true;\n\nvar APP_ID = 'plainmodal',\n    STYLE_ELEMENT_ID = \"\".concat(APP_ID, \"-style\"),\n    STYLE_CLASS = APP_ID,\n    STYLE_CLASS_CONTENT = \"\".concat(APP_ID, \"-content\"),\n    STYLE_CLASS_OVERLAY = \"\".concat(APP_ID, \"-overlay\"),\n    STYLE_CLASS_OVERLAY_HIDE = \"\".concat(STYLE_CLASS_OVERLAY, \"-hide\"),\n    STYLE_CLASS_OVERLAY_FORCE = \"\".concat(STYLE_CLASS_OVERLAY, \"-force\"),\n    STATE_CLOSED = 0,\n    STATE_OPENING = 1,\n    STATE_OPENED = 2,\n    STATE_CLOSING = 3,\n    STATE_INACTIVATING = 4,\n    STATE_INACTIVATED = 5,\n    STATE_ACTIVATING = 6,\n    DURATION = 200,\n    // COPY from PlainOverlay\nIS_EDGE = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled,\n    IS_TRIDENT = !IS_EDGE && !!document.uniqueID,\n    // Future Edge might support `document.uniqueID`.\nisObject = function () {\n  var toString = {}.toString,\n      fnToString = {}.hasOwnProperty.toString,\n      objFnString = fnToString.call(Object);\n  return function (obj) {\n    var proto, constr;\n    return obj && toString.call(obj) === '[object Object]' && (!(proto = Object.getPrototypeOf(obj)) || (constr = proto.hasOwnProperty('constructor') && proto.constructor) && typeof constr === 'function' && fnToString.call(constr) === objFnString);\n  };\n}(),\n\n/**\n * An object that has properties of instance.\n * @typedef {Object} props\n * @property {Element} elmContent - Content element.\n * @property {Element} elmOverlay - Overlay element. (Not PlainOverlay)\n * @property {PlainOverlay} plainOverlay - PlainOverlay instance.\n * @property {PlainDraggable} plainDraggable - PlainDraggable instance.\n * @property {number} state - Current state.\n * @property {Object} options - Options.\n * @property {props} parentProps - props that is effected with current props.\n * @property {{plainOverlay: boolean, option: boolean}} effectFinished - The effect finished.\n */\n\n/** @type {Object.<_id: number, props>} */\ninsProps = {},\n\n/**\n * A `props` list, it have a `state` other than `STATE_CLOSED`.\n * A `props` is pushed to the end of this array, `shownProps[shownProps.length - 1]` can be active.\n * @type {Array.<props>}\n */\nshownProps = [];\n\nvar closeByEscKey = true,\n    closeByOverlay = true,\n    insId = 0,\n    openCloseEffectProps; // A `props` that is running the \"open/close\" effect now.\n\nfunction forceReflow(target) {\n  // Trident and Blink bug (reflow like `offsetWidth` can't update)\n  setTimeout(function () {\n    var parent = target.parentNode,\n        next = target.nextSibling; // It has to be removed first for Blink.\n\n    parent.insertBefore(parent.removeChild(target), next);\n  }, 0);\n}\n/**\n * @param {Element} element - A target element.\n * @returns {boolean} `true` if connected element.\n */\n\n\nfunction isElement(element) {\n  return !!(element && element.nodeType === Node.ELEMENT_NODE && // element instanceof HTMLElement &&\n  typeof element.getBoundingClientRect === 'function' && !(element.compareDocumentPosition(document) & Node.DOCUMENT_POSITION_DISCONNECTED));\n} // [DRAG]\n\n\nfunction switchDraggable(props) {\n  if (props.plainDraggable) {\n    var disabled = !(props.options.dragHandle && props.state === STATE_OPENED);\n    props.plainDraggable.disabled = disabled;\n\n    if (!disabled) {\n      props.plainDraggable.position();\n    }\n  }\n} // [/DRAG]\n\n\nfunction finishOpening(props) {\n  openCloseEffectProps = null;\n  props.state = STATE_OPENED;\n  switchDraggable(props); // [DRAG/]\n\n  if (props.parentProps) {\n    props.parentProps.state = STATE_INACTIVATED;\n  }\n\n  if (props.options.onOpen) {\n    props.options.onOpen.call(props.ins);\n  }\n}\n\nfunction finishClosing(props) {\n  shownProps.pop();\n  openCloseEffectProps = null;\n  props.state = STATE_CLOSED;\n\n  if (props.parentProps) {\n    props.parentProps.state = STATE_OPENED;\n    switchDraggable(props.parentProps); // [DRAG/]\n\n    props.parentProps = null;\n  }\n\n  if (props.options.onClose) {\n    props.options.onClose.call(props.ins);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {string} effectKey - `plainOverlay' or 'option`\n * @returns {void}\n */\n\n\nfunction finishOpenEffect(props, effectKey) {\n  if (props.state !== STATE_OPENING) {\n    return;\n  }\n\n  props.effectFinished[effectKey] = true;\n\n  if (props.effectFinished.plainOverlay && (!props.options.openEffect || props.effectFinished.option)) {\n    finishOpening(props);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {string} effectKey - `plainOverlay' or 'option`\n * @returns {void}\n */\n\n\nfunction finishCloseEffect(props, effectKey) {\n  if (props.state !== STATE_CLOSING) {\n    return;\n  }\n\n  props.effectFinished[effectKey] = true;\n\n  if (props.effectFinished.plainOverlay && (!props.options.closeEffect || props.effectFinished.option)) {\n    finishClosing(props);\n  }\n}\n/**\n * Process after preparing data and adjusting style.\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction execOpening(props, force) {\n  if (props.parentProps) {\n    // inactivate parentProps\n\n    /*\n      Cases:\n        - STATE_OPENED or STATE_ACTIVATING, regardless of force\n        - STATE_INACTIVATING and force\n    */\n    var parentProps = props.parentProps,\n        elmOverlay = parentProps.elmOverlay;\n\n    if (parentProps.state === STATE_OPENED) {\n      elmOverlay.style[CSSPrefix.getName('transitionDuration')] = props.options.duration === DURATION ? '' : \"\".concat(props.options.duration, \"ms\");\n    }\n\n    var elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.toggle(STYLE_CLASS_OVERLAY_FORCE, !!force);\n    elmOverlayClassList.add(STYLE_CLASS_OVERLAY_HIDE); // Update `state` regardless of force, for switchDraggable.\n\n    parentProps.state = STATE_INACTIVATING;\n    parentProps.plainOverlay.blockingDisabled = true;\n    switchDraggable(parentProps); // [DRAG/]\n  }\n\n  props.state = STATE_OPENING;\n  props.plainOverlay.blockingDisabled = false;\n  props.effectFinished.plainOverlay = props.effectFinished.option = false;\n  props.plainOverlay.show(force);\n\n  if (props.options.openEffect) {\n    if (force) {\n      props.options.openEffect.call(props.ins);\n      finishOpenEffect(props, 'option');\n    } else {\n      props.options.openEffect.call(props.ins, props.openEffectDone);\n    }\n  }\n}\n/**\n * Process after preparing data and adjusting style.\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @param {boolean} [sync] - `force` with sync-mode. (Skip restoring active element)\n * @returns {void}\n */\n\n\nfunction execClosing(props, force, sync) {\n  if (props.parentProps) {\n    // activate parentProps\n\n    /*\n      Cases:\n        - STATE_INACTIVATED or STATE_INACTIVATING, regardless of `force`\n        - STATE_ACTIVATING and `force`\n    */\n    var parentProps = props.parentProps,\n        elmOverlay = parentProps.elmOverlay;\n\n    if (parentProps.state === STATE_INACTIVATED) {\n      elmOverlay.style[CSSPrefix.getName('transitionDuration')] = props.options.duration === DURATION ? '' : \"\".concat(props.options.duration, \"ms\");\n    }\n\n    var elmOverlayClassList = mClassList(elmOverlay);\n    elmOverlayClassList.toggle(STYLE_CLASS_OVERLAY_FORCE, !!force);\n    elmOverlayClassList.remove(STYLE_CLASS_OVERLAY_HIDE); // same condition as props\n\n    parentProps.state = STATE_ACTIVATING;\n    parentProps.plainOverlay.blockingDisabled = false;\n  }\n\n  props.state = STATE_CLOSING;\n  switchDraggable(props); // [DRAG/]\n\n  props.effectFinished.plainOverlay = props.effectFinished.option = false;\n  props.plainOverlay.hide(force, sync);\n\n  if (props.options.closeEffect) {\n    if (force) {\n      props.options.closeEffect.call(props.ins);\n      finishCloseEffect(props, 'option');\n    } else {\n      props.options.closeEffect.call(props.ins, props.closeEffectDone);\n    }\n  }\n}\n/**\n * Finish the \"open/close\" effect immediately with sync-mode.\n * @param {props} props - `props` of instance.\n * @returns {void}\n */\n\n\nfunction fixOpenClose(props) {\n  if (props.state === STATE_OPENING) {\n    execOpening(props, true);\n  } else if (props.state === STATE_CLOSING) {\n    execClosing(props, true, true);\n  }\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _open(props, force) {\n  if (props.state !== STATE_CLOSED && props.state !== STATE_CLOSING && props.state !== STATE_OPENING || props.state === STATE_OPENING && !force || props.state !== STATE_OPENING && props.options.onBeforeOpen && props.options.onBeforeOpen.call(props.ins) === false) {\n    return false;\n  }\n  /*\n    Cases:\n      - STATE_CLOSED or STATE_CLOSING, regardless of `force`\n      - STATE_OPENING and `force`\n  */\n\n\n  if (props.state === STATE_CLOSED) {\n    if (openCloseEffectProps) {\n      fixOpenClose(openCloseEffectProps);\n    }\n\n    openCloseEffectProps = props;\n\n    if (shownProps.length) {\n      props.parentProps = shownProps[shownProps.length - 1];\n    }\n\n    shownProps.push(props);\n    mClassList(props.elmOverlay).add(STYLE_CLASS_OVERLAY_FORCE).remove(STYLE_CLASS_OVERLAY_HIDE);\n  }\n\n  execOpening(props, force);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {boolean} [force] - Skip effect.\n * @returns {void}\n */\n\n\nfunction _close(props, force) {\n  if (props.state === STATE_CLOSED || props.state === STATE_CLOSING && !force || props.state !== STATE_CLOSING && props.options.onBeforeClose && props.options.onBeforeClose.call(props.ins) === false) {\n    return false;\n  }\n  /*\n    Cases:\n      - Other than STATE_CLOSED and STATE_CLOSING, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (openCloseEffectProps && openCloseEffectProps !== props) {\n    fixOpenClose(openCloseEffectProps);\n    openCloseEffectProps = null;\n  }\n  /*\n    Cases:\n      - STATE_OPENED, STATE_OPENING or STATE_INACTIVATED, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (props.state === STATE_INACTIVATED) {\n    // -> STATE_OPENED\n    var topProps;\n\n    while ((topProps = shownProps[shownProps.length - 1]) !== props) {\n      execClosing(topProps, true, true);\n    }\n  }\n  /*\n    Cases:\n      - STATE_OPENED or STATE_OPENING, regardless of `force`\n      - STATE_CLOSING and `force`\n  */\n\n\n  if (props.state === STATE_OPENED) {\n    openCloseEffectProps = props;\n  }\n\n  execClosing(props, force);\n  return true;\n}\n/**\n * @param {props} props - `props` of instance.\n * @param {Object} newOptions - New options.\n * @returns {void}\n */\n\n\nfunction _setOptions(props, newOptions) {\n  var options = props.options,\n      plainOverlay = props.plainOverlay; // closeButton\n\n  if (newOptions.hasOwnProperty('closeButton') && (newOptions.closeButton = isElement(newOptions.closeButton) ? newOptions.closeButton : newOptions.closeButton == null ? void 0 : false) !== false && newOptions.closeButton !== options.closeButton) {\n    if (options.closeButton) {\n      // Remove\n      options.closeButton.removeEventListener('click', props.handleClose, false);\n    }\n\n    options.closeButton = newOptions.closeButton;\n\n    if (options.closeButton) {\n      // Add\n      options.closeButton.addEventListener('click', props.handleClose, false);\n    }\n  } // duration\n  // Check by PlainOverlay\n\n\n  plainOverlay.duration = newOptions.duration;\n  options.duration = plainOverlay.duration; // overlayBlur\n  // Check by PlainOverlay\n\n  plainOverlay.blur = newOptions.overlayBlur;\n  options.overlayBlur = plainOverlay.blur; // [DRAG]\n  // dragHandle\n\n  if (newOptions.hasOwnProperty('dragHandle') && (newOptions.dragHandle = isElement(newOptions.dragHandle) ? newOptions.dragHandle : newOptions.dragHandle == null ? void 0 : false) !== false && newOptions.dragHandle !== options.dragHandle) {\n    options.dragHandle = newOptions.dragHandle;\n\n    if (options.dragHandle) {\n      if (!props.plainDraggable) {\n        props.plainDraggable = new PlainDraggable(props.elmContent);\n      }\n\n      props.plainDraggable.handle = options.dragHandle;\n    }\n\n    switchDraggable(props);\n  } // [/DRAG]\n  // effect functions and event listeners\n\n\n  ['openEffect', 'closeEffect', 'onOpen', 'onClose', 'onBeforeOpen', 'onBeforeClose'].forEach(function (option) {\n    if (typeof newOptions[option] === 'function') {\n      options[option] = newOptions[option];\n    } else if (newOptions.hasOwnProperty(option) && newOptions[option] == null) {\n      options[option] = void 0;\n    }\n  });\n}\n\nvar PlainModal = /*#__PURE__*/function () {\n  /**\n   * Create a `PlainModal` instance.\n   * @param {Element} content - An element that is shown as the content of the modal window.\n   * @param {Object} [options] - Options.\n   */\n  function PlainModal(content, options) {\n    _classCallCheck(this, PlainModal);\n\n    var props = {\n      ins: this,\n      options: {\n        // Initial options (not default)\n        closeButton: void 0,\n        duration: DURATION,\n        dragHandle: void 0,\n        // [DRAG/]\n        overlayBlur: false\n      },\n      state: STATE_CLOSED,\n      effectFinished: {\n        plainOverlay: false,\n        option: false\n      }\n    };\n    Object.defineProperty(this, '_id', {\n      value: ++insId\n    });\n    props._id = this._id;\n    insProps[this._id] = props;\n\n    if (!content.nodeType || content.nodeType !== Node.ELEMENT_NODE || content.ownerDocument.defaultView !== window) {\n      throw new Error('This `content` is not accepted.');\n    }\n\n    props.elmContent = content;\n\n    if (!options) {\n      options = {};\n    } else if (!isObject(options)) {\n      throw new Error('Invalid options.');\n    } // Setup window\n\n\n    if (!document.getElementById(STYLE_ELEMENT_ID)) {\n      var head = document.getElementsByTagName('head')[0] || document.documentElement,\n          sheet = head.insertBefore(document.createElement('style'), head.firstChild);\n      sheet.type = 'text/css';\n      sheet.id = STYLE_ELEMENT_ID;\n      sheet.textContent = CSS_TEXT;\n\n      if (IS_TRIDENT || IS_EDGE) {\n        forceReflow(sheet);\n      } // Trident bug\n      // for closeByEscKey\n\n\n      window.addEventListener('keydown', function (event) {\n        var key, topProps;\n\n        if (closeByEscKey && ((key = event.key.toLowerCase()) === 'escape' || key === 'esc') && (topProps = shownProps.length && shownProps[shownProps.length - 1]) && _close(topProps)) {\n          event.preventDefault();\n          event.stopImmediatePropagation(); // preventDefault stops other listeners, maybe.\n\n          event.stopPropagation();\n        }\n      }, true);\n    }\n\n    mClassList(content).add(STYLE_CLASS_CONTENT); // Overlay\n\n    props.plainOverlay = new PlainOverlay({\n      face: content,\n      onShow: function onShow() {\n        finishOpenEffect(props, 'plainOverlay');\n      },\n      onHide: function onHide() {\n        finishCloseEffect(props, 'plainOverlay');\n      }\n    }); // The `content` is now contained into PlainOverlay, and update `display`.\n\n    if (window.getComputedStyle(content, '').display === 'none') {\n      content.style.display = 'block';\n    } // Trident can not get parent of SVG by parentElement.\n\n\n    var elmPlainOverlayBody = content.parentNode; // elmOverlayBody of PlainOverlay\n\n    mClassList(elmPlainOverlayBody.parentNode).add(STYLE_CLASS); // elmOverlay of PlainOverlay\n    // elmOverlay (own overlay)\n\n    var elmOverlay = props.elmOverlay = elmPlainOverlayBody.appendChild(document.createElement('div'));\n    elmOverlay.className = STYLE_CLASS_OVERLAY; // for closeByOverlay\n\n    elmOverlay.addEventListener('click', function (event) {\n      if (event.target === elmOverlay && closeByOverlay) {\n        _close(props);\n      }\n    }, true); // Prepare removable event listeners for each instance.\n\n    props.handleClose = function () {\n      _close(props);\n    }; // Callback functions for additional effects, prepare these to allow to be used as listener.\n\n\n    props.openEffectDone = function () {\n      finishOpenEffect(props, 'option');\n    };\n\n    props.closeEffectDone = function () {\n      finishCloseEffect(props, 'option');\n    };\n\n    props.effectDone = function () {\n      if (props.state === STATE_OPENING) {\n        finishOpenEffect(props, 'option');\n      } else if (props.state === STATE_CLOSING) {\n        finishCloseEffect(props, 'option');\n      }\n    };\n\n    _setOptions(props, options);\n  }\n  /**\n   * @param {Object} options - New options.\n   * @returns {PlainModal} Current instance itself.\n   */\n\n\n  _createClass(PlainModal, [{\n    key: \"setOptions\",\n    value: function setOptions(options) {\n      if (isObject(options)) {\n        _setOptions(insProps[this._id], options);\n      }\n\n      return this;\n    }\n    /**\n     * Open the modal window.\n     * @param {boolean} [force] - Show it immediately without effect.\n     * @param {Object} [options] - New options.\n     * @returns {PlainModal} Current instance itself.\n     */\n\n  }, {\n    key: \"open\",\n    value: function open(force, options) {\n      if (arguments.length < 2 && typeof force !== 'boolean') {\n        options = force;\n        force = false;\n      }\n\n      this.setOptions(options);\n\n      _open(insProps[this._id], force);\n\n      return this;\n    }\n    /**\n     * Close the modal window.\n     * @param {boolean} [force] - Close it immediately without effect.\n     * @returns {PlainModal} Current instance itself.\n     */\n\n  }, {\n    key: \"close\",\n    value: function close(force) {\n      _close(insProps[this._id], force);\n\n      return this;\n    }\n  }, {\n    key: \"state\",\n    get: function get() {\n      return insProps[this._id].state;\n    }\n  }, {\n    key: \"closeButton\",\n    get: function get() {\n      return insProps[this._id].options.closeButton;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        closeButton: value\n      });\n    }\n  }, {\n    key: \"duration\",\n    get: function get() {\n      return insProps[this._id].options.duration;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        duration: value\n      });\n    }\n  }, {\n    key: \"overlayBlur\",\n    get: function get() {\n      return insProps[this._id].options.overlayBlur;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        overlayBlur: value\n      });\n    } // [DRAG]\n\n  }, {\n    key: \"dragHandle\",\n    get: function get() {\n      return insProps[this._id].options.dragHandle;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        dragHandle: value\n      });\n    } // [/DRAG]\n\n  }, {\n    key: \"openEffect\",\n    get: function get() {\n      return insProps[this._id].options.openEffect;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        openEffect: value\n      });\n    }\n  }, {\n    key: \"closeEffect\",\n    get: function get() {\n      return insProps[this._id].options.closeEffect;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        closeEffect: value\n      });\n    }\n  }, {\n    key: \"effectDone\",\n    get: function get() {\n      return insProps[this._id].effectDone;\n    }\n  }, {\n    key: \"onOpen\",\n    get: function get() {\n      return insProps[this._id].options.onOpen;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onOpen: value\n      });\n    }\n  }, {\n    key: \"onClose\",\n    get: function get() {\n      return insProps[this._id].options.onClose;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onClose: value\n      });\n    }\n  }, {\n    key: \"onBeforeOpen\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeOpen;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeOpen: value\n      });\n    }\n  }, {\n    key: \"onBeforeClose\",\n    get: function get() {\n      return insProps[this._id].options.onBeforeClose;\n    },\n    set: function set(value) {\n      _setOptions(insProps[this._id], {\n        onBeforeClose: value\n      });\n    }\n  }], [{\n    key: \"closeByEscKey\",\n    get: function get() {\n      return closeByEscKey;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        closeByEscKey = value;\n      }\n    }\n  }, {\n    key: \"closeByOverlay\",\n    get: function get() {\n      return closeByOverlay;\n    },\n    set: function set(value) {\n      if (typeof value === 'boolean') {\n        closeByOverlay = value;\n      }\n    }\n  }, {\n    key: \"STATE_CLOSED\",\n    get: function get() {\n      return STATE_CLOSED;\n    }\n  }, {\n    key: \"STATE_OPENING\",\n    get: function get() {\n      return STATE_OPENING;\n    }\n  }, {\n    key: \"STATE_OPENED\",\n    get: function get() {\n      return STATE_OPENED;\n    }\n  }, {\n    key: \"STATE_CLOSING\",\n    get: function get() {\n      return STATE_CLOSING;\n    }\n  }, {\n    key: \"STATE_INACTIVATING\",\n    get: function get() {\n      return STATE_INACTIVATING;\n    }\n  }, {\n    key: \"STATE_INACTIVATED\",\n    get: function get() {\n      return STATE_INACTIVATED;\n    }\n  }, {\n    key: \"STATE_ACTIVATING\",\n    get: function get() {\n      return STATE_ACTIVATING;\n    }\n  }]);\n\n  return PlainModal;\n}();\n/* [DRAG/]\nPlainModal.limit = true;\n[DRAG/] */\n\n\nexport default PlainModal;","import MarkdownIt from 'markdown-it'\nimport MarkdownItAnchor from 'markdown-it-anchor'\nimport MarkdownItFootnote from 'markdown-it-footnote'\nimport MarkdownItFrontMatter from 'markdown-it-front-matter'\nimport MarkdownItInjectLinenumbers from 'markdown-it-inject-linenumbers'\nimport { renderWith, defaultAliases, parseConfigsFromYaml } from 'mapclay'\nimport { onRemove, animateRectTransition, throttle, shiftByWindow } from './utils'\nimport { Layout, SideBySide, Overlay } from './Layout'\nimport * as utils from './dumbyUtils'\nimport * as menuItem from './MenuItem'\nimport PlainModal from 'plain-modal'\n\n/** Selector of special HTML Elements */\nconst mapBlockSelector = 'pre:has(.language-map)'\nconst docLinkSelector = 'a[href^=\"#\"][title^=\"=>\"]'\nconst geoLinkSelector = 'a[href^=\"geo:\"]'\n\n/** Default Layouts */\nconst defaultLayouts = [\n  new Layout({ name: 'normal' }),\n  new SideBySide({ name: 'side-by-side' }),\n  new Overlay({ name: 'overlay' }),\n]\n\n/** Cache across every dumbymap generation */\nconst mapCache = {}\n\n/**\n * Converts Markdown content to HTML and prepares it for DumbyMap rendering\n *\n * @param {HTMLElement} container - Target Element to include generated HTML contents\n * @param {string} mdContent - Texts in Markdown format\n * @returns {Object} An object representing the DumbyMap instance\n */\nexport const markdown2HTML = (container, mdContent) => {\n  /** Prepare Elements for Container */\n  container.replaceChildren()\n  container.innerHTML = '<div class=\"SemanticHtml\"></div>'\n  const htmlHolder = container.querySelector('.SemanticHtml')\n\n  /** Prepare MarkdownIt Instance */\n  const md = MarkdownIt({\n    html: true,\n    breaks: true,\n    linkify: true,\n  })\n    .use(MarkdownItAnchor, {\n      permalink: MarkdownItAnchor.permalink.linkInsideHeader({\n        placement: 'before',\n      }),\n    })\n    .use(MarkdownItFootnote)\n    .use(MarkdownItFrontMatter)\n    .use(MarkdownItInjectLinenumbers)\n\n  /** Set up linkify for GeoLinks */\n  const coordinateRegex = /^(\\D*)(-?\\d+\\.?\\d*)\\s*([,\\x2F\\uFF0C])\\s*(-?\\d+\\.?\\d*)/\n  const coordinateValue = {\n    validate: coordinateRegex,\n    normalize: function (match) {\n      const [, , x, sep, y] = match.text.match(coordinateRegex)\n      match.url = `geo:${y},${x}?xy=${x},${y}`\n      match.text = `${x}${sep} ${y}`\n      match.index += match.text.indexOf(x) + 1\n      return match\n    },\n  }\n  const patterns = ['[', '(', '📍', '\\uFF08', '@', 'geo:', 'twd']\n  patterns.forEach(prefix =>\n    md.linkify.add(prefix, coordinateValue),\n  )\n\n  /** Custom rule for Blocks in DumbyMap */\n  // FIXME A better way to generate blocks\n  md.renderer.rules.dumby_block_open = () => '<div>'\n  md.renderer.rules.dumby_block_close = () => '</div>'\n  md.core.ruler.before('block', 'dumby_block', state => {\n    state.tokens.push(new state.Token('dumby_block_open', '', 1))\n  })\n  // Add close tag for block with more than 2 empty lines\n  md.block.ruler.before('table', 'dumby_block', (state, startLine) => {\n    if (\n      state.src[state.bMarks[startLine - 1]] === '\\n' &&\n      state.src[state.bMarks[startLine - 2]] === '\\n' &&\n      state.tokens.at(-1).type !== 'list_item_open' // Quick hack for not adding tag after \"::marker\" for <li>\n    ) {\n      state.push('dumby_block_close', '', -1)\n      state.push('dumby_block_open', '', 1)\n    }\n  })\n\n  md.core.ruler.after('block', 'dumby_block', state => {\n    state.tokens.push(new state.Token('dumby_block_close', '', -1))\n  })\n\n  /** Render HTML */\n  htmlHolder.innerHTML = md.render(mdContent)\n  /** Post HTML rendered */\n  // TODO Do this in markdown-it\n  const blocks = htmlHolder.querySelectorAll(':scope > div:not(:has(nav))')\n  blocks.forEach(b => {\n    b.classList.add('dumby-block')\n    b.dataset.total = blocks.length\n  })\n\n  return container\n}\n\n/**\n * Generates maps based on the provided configuration\n *\n * @param {HTMLElement} container - The container element for the maps\n * @param {Object} options - Configuration options\n * @param {number} [options.delay=1000] - Delay before rendering maps (in milliseconds)\n * @param {Function} options.mapCallback - Callback function to be called after map rendering\n */\nexport const generateMaps = (container, { layouts = [], delay, renderCallback } = {}) => {\n  /** Prepare Contaner/HTML Holder/Showcase */\n  container.classList.add('Dumby')\n  delete container.dataset.layout\n  container.dataset.layout = defaultLayouts[0].name\n  const htmlHolder = container.querySelector('.SemanticHtml') ?? container\n  const blocks = Array.from(htmlHolder.querySelectorAll('.dumby-block'))\n  const showcase = document.createElement('div')\n  container.appendChild(showcase)\n  showcase.classList.add('Showcase')\n  const renderPromises = []\n\n  /** Prepare Modal */\n  const modalContent = document.createElement('div')\n  container.appendChild(modalContent)\n  const modal = new PlainModal(modalContent)\n\n  /** Define dumbymap Object */\n  const dumbymap = {\n    layouts: [...defaultLayouts, ...layouts.map(l => typeof l === 'object' ? l : { name: l })],\n    container,\n    htmlHolder,\n    showcase,\n    blocks,\n    modal,\n    modalContent,\n    utils: {\n      ...utils,\n      renderedMaps: () =>\n        Array.from(\n          container.querySelectorAll('.mapclay[data-render=fulfilled]'),\n        ).sort((a, b) => a.style.order > b.style.order),\n      setContextMenu: (menuCallback) => {\n        const originalCallback = container.oncontextmenu\n        container.oncontextmenu = (e) => {\n          const menu = originalCallback(e)\n          menuCallback(e, menu)\n          menu.style.transform = ''\n          shiftByWindow(menu)\n        }\n      },\n      focusNextMap: throttle(utils.focusNextMap, utils.focusDelay),\n      switchToNextLayout: throttle(utils.switchToNextLayout, 300),\n    },\n  }\n  Object.entries(dumbymap.utils).forEach(([util, func]) => {\n    dumbymap.utils[util] = func.bind(dumbymap)\n  })\n\n  /** Create GeoLinks and DocLinks */\n  container.querySelectorAll(docLinkSelector)\n    .forEach(utils.createDocLink)\n  container.querySelectorAll(geoLinkSelector)\n    .forEach(utils.createGeoLink)\n\n  /**\n   * mapFocusObserver. observe for map focus\n   * @return {MutationObserver} observer\n   */\n  const mapFocusObserver = () =>\n    new window.MutationObserver(mutations => {\n      const mutation = mutations.at(-1)\n      const target = mutation.target\n      const focus = target.classList.contains('focus')\n      const shouldBeInShowcase =\n        focus &&\n        showcase.checkVisibility({\n          contentVisibilityAuto: true,\n          opacityProperty: true,\n          visibilityProperty: true,\n        })\n\n      if (focus) {\n        dumbymap.utils\n          .renderedMaps()\n          .filter(map => map.id !== target.id)\n          .forEach(map => map.classList.remove('focus'))\n      }\n\n      if (shouldBeInShowcase) {\n        if (showcase.contains(target)) return\n\n        // Placeholder for map in Showcase, it should has the same DOMRect\n        const placeholder = target.cloneNode(true)\n        delete placeholder.id\n        placeholder.className = ''\n\n        const parent = target.parentElement\n        parent.replaceChild(placeholder, target)\n        onRemove(placeholder, () => {\n          parent.appendChild(target)\n        })\n\n        // FIXME Maybe use @start-style for CSS\n        // Trigger CSS transition, if placeholde is the olny child element in block,\n        // reduce its height to zero.\n        // To make sure the original height of placeholder is applied, DOM changes seems needed\n        // then set data-attribute for CSS selector to change height to 0\n        placeholder.getBoundingClientRect()\n        placeholder.dataset.placeholder = target.id\n\n        // To fit showcase, remove all inline style\n        target.style.cssText = ''\n        target.style.order = placeholder.style.order\n        showcase.appendChild(target)\n\n        // Resume rect from Semantic HTML to Showcase, with animation\n        animateRectTransition(target, placeholder.getBoundingClientRect(), {\n          duration: 300,\n          resume: true,\n        })\n      } else if (showcase.contains(target)) {\n        // Check placeholder is inside Semantic HTML\n        const placeholder = htmlHolder.querySelector(\n          `[data-placeholder=\"${target.id}\"]`,\n        )\n        if (!placeholder) { throw Error(`Cannot find placeholder for map \"${target.id}\"`) }\n\n        // Consider animation may fail, write callback\n        const afterAnimation = () => {\n          target.style = placeholder.style.cssText\n          placeholder.remove()\n        }\n\n        // animation from Showcase to placeholder\n        animateRectTransition(target, placeholder.getBoundingClientRect(), {\n          duration: 300,\n        }).finished.finally(afterAnimation)\n      }\n    })\n\n  /** Observer for layout changes */\n  const layoutObserver = new window.MutationObserver(mutations => {\n    const mutation = mutations.at(-1)\n    const oldLayout = mutation.oldValue\n    const newLayout = container.dataset.layout\n\n    // Apply handler for leaving/entering layouts\n    if (oldLayout) {\n      dumbymap.layouts\n        .find(l => l.name === oldLayout)\n        ?.leaveHandler?.call(this, dumbymap)\n    }\n\n    Object.values(dumbymap)\n      .flat()\n      .filter(ele => ele instanceof window.HTMLElement)\n      .forEach(ele => { ele.style.cssText = '' })\n\n    if (newLayout) {\n      dumbymap.layouts\n        .find(l => l.name === newLayout)\n        ?.enterHandler?.call(this, dumbymap)\n    }\n\n    // Since layout change may show/hide showcase, the current focused map may need to go into/outside showcase\n    // Reset attribute triggers MutationObserver which is observing it\n    const focusMap =\n      container.querySelector('.mapclay.focus') ??\n      container.querySelector('.mapclay')\n    focusMap?.classList?.add('focus')\n  })\n  layoutObserver.observe(container, {\n    attributes: true,\n    attributeFilter: ['data-layout'],\n    attributeOldValue: true,\n    characterDataOldValue: true,\n  })\n\n  onRemove(htmlHolder, () => layoutObserver.disconnect())\n\n  /**\n   * afterMapRendered. callback of each map rendered\n   *\n   * @param {Object} renderer\n   */\n  const afterMapRendered = renderer => {\n    const mapElement = renderer.target\n    // FIXME\n    mapElement.renderer = renderer\n    mapElement.tabindex = -1\n    if (mapElement.dataset.render === 'fulfilled') {\n      mapCache[mapElement.id] ??= renderer\n    } else {\n      return\n    }\n\n    renderCallback?.(renderer)\n\n    // Work with Mutation Observer\n    const observer = mapFocusObserver()\n    observer.observe(mapElement, {\n      attributes: true,\n      attributeFilter: ['class'],\n      attributeOldValue: true,\n    })\n    onRemove(dumbymap.htmlHolder, () => {\n      observer.disconnect()\n    })\n  }\n\n  // Set unique ID for map container\n  const mapIdList = []\n  const assignMapId = config => {\n    let mapId = config.id?.replaceAll('\\x20', '_')\n    if (!mapId) {\n      mapId = config.use?.split('/')?.at(-1)\n      let counter = 1\n      while (!mapId || mapIdList.includes(mapId)) {\n        mapId = `${config.use ?? 'unnamed'}-${counter}`\n        counter++\n      }\n    }\n\n    config.id = mapId\n    mapIdList.push(mapId)\n    return config\n  }\n\n  // Render each code block with \"language-map\" class\n  const elementsWithMapConfig = Array.from(\n    container.querySelectorAll(mapBlockSelector) ?? [],\n  )\n  /**\n   * updateAttributeByStep.\n   *\n   * @param {Object} -- renderer which is running steps\n   */\n  const updateAttributeByStep = ({ results, target, steps }) => {\n    let passNum = results.filter(\n      r => r.type === 'render' && r.state.match(/success|skip/),\n    ).length\n    const total = steps.length\n    passNum += `/${total}`\n\n    const final = results.filter(r => r.type === 'render').length === total\n\n    // FIXME HACK use MutationObserver for animation\n    if (!target.animations) target.animations = Promise.resolve()\n    target.animations = target.animations.then(async () => {\n      await new Promise(resolve => setTimeout(resolve, 100))\n      if (final) passNum += '\\x20'\n      target.dataset.report = passNum\n\n      if (final) setTimeout(() => delete target.dataset.report, 100)\n    })\n  }\n  /**\n   * config converter for mapclay.renderWith()\n   *\n   * @param {Object} config\n   * @return {Object} -- converted config\n   */\n  const configConverter = config => ({\n    use: config.use ?? 'Leaflet',\n    width: '100%',\n    ...config,\n    aliases: {\n      ...defaultAliases,\n      ...(config.aliases ?? {}),\n    },\n    stepCallback: updateAttributeByStep,\n  })\n\n  /** Get render method by converter */\n  const render = renderWith(configConverter)\n\n  /** Render each taget element for maps */\n  let order = 0\n  elementsWithMapConfig.forEach(target => {\n    // Get text in code block starts with markdown text '```map'\n    const configText = target\n      .querySelector('.language-map')\n      .textContent // BE CAREFUL!!! 0xa0 char is \"non-breaking spaces\" in HTML text content\n      // replace it by normal space\n      .replace(/\\u00A0/g, '\\u0020')\n\n    let configList = []\n    try {\n      configList = parseConfigsFromYaml(configText).map(assignMapId)\n    } catch (_) {\n      console.warn('Fail to parse yaml config for element', target)\n      return\n    }\n\n    // If map in cache has the same ID, just put it into target\n    // So user won't feel anything changes when editing markdown\n    configList.forEach(config => {\n      const cachedRenderer = mapCache[config.id]\n      if (!cachedRenderer) return\n\n      target.appendChild(cachedRenderer.target)\n      config.target = cachedRenderer.target\n    })\n\n    // trivial: if map cache is applied, do not show yaml text\n    if (target.querySelector('.mapclay')) {\n      target\n        .querySelectorAll(':scope > :not([data-render=fulfilled])')\n        .forEach(e => e.remove())\n    }\n\n    // TODO Use debounce of user input to decide rendering timing\n    // Render maps with delay\n    const timer = setTimeout(\n      () => {\n        render(target, configList).forEach(renderPromise => {\n          renderPromises.push(renderPromise)\n          renderPromise.then(afterMapRendered)\n        })\n        Array.from(target.children).forEach(e => {\n          e.style.order = order\n          order++\n          if (e.dataset.render === 'fulfilled') {\n            afterMapRendered(e.renderer)\n          }\n        })\n      },\n      delay ?? 1000,\n    )\n    onRemove(htmlHolder, () => {\n      clearTimeout(timer)\n    })\n  })\n\n  /** Prepare Context Menu */\n  const menu = document.createElement('div')\n  menu.className = 'menu'\n  menu.style.display = 'none'\n  menu.onclick = (e) => {\n    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')\n    if (keepMenu) return\n\n    menu.style.display = 'none'\n  }\n  container.appendChild(menu)\n\n  /** Menu Items for Context Menu */\n  container.oncontextmenu = e => {\n    menu.replaceChildren()\n    menu.style.display = 'block'\n    menu.style.cssText = `left: ${e.x - menu.offsetParent.offsetLeft + 10}px; top: ${e.y - menu.offsetParent.offsetTop + 5}px;`\n    e.preventDefault()\n\n    // Menu Items for map\n    const map = e.target.closest('.mapclay')\n    if (map?.renderer?.results) {\n      const rect = map.getBoundingClientRect()\n      const [x, y] = [e.x - rect.left, e.y - rect.top]\n      menu.appendChild(menuItem.toggleMapFocus(map))\n      menu.appendChild(menuItem.renderResults(dumbymap, map))\n      menu.appendChild(menuItem.getCoordinatesByPixels(map, [x, y]))\n      menu.appendChild(menuItem.restoreCamera(map))\n    } else {\n      // Toggle block focus\n      const block = e.target.closest('.dumby-block')\n      if (block) {\n        menu.appendChild(menuItem.toggleBlockFocus(block))\n      }\n    }\n\n    // Menu Items for map/block/layout\n    if (!map || map.closest('.Showcase')) {\n      if (dumbymap.utils.renderedMaps().length > 0) {\n        menu.appendChild(menuItem.pickMapItem(dumbymap))\n      }\n      menu.appendChild(menuItem.pickBlockItem(dumbymap))\n      menu.appendChild(menuItem.pickLayoutItem(dumbymap))\n    }\n\n    shiftByWindow(menu)\n\n    return menu\n  }\n\n  /** Event Handler when clicking outside of Context Manu */\n  const actionOutsideMenu = e => {\n    if (menu.style.display === 'none') return\n    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')\n    if (keepMenu) return\n\n    const rect = menu.getBoundingClientRect()\n    if (\n      e.clientX < rect.left ||\n      e.clientX > rect.left + rect.width ||\n      e.clientY < rect.top ||\n      e.clientY > rect.top + rect.height\n    ) {\n      menu.style.display = 'none'\n    }\n  }\n  document.addEventListener('click', actionOutsideMenu)\n  onRemove(htmlHolder, () =>\n    document.removeEventListener('click', actionOutsideMenu),\n  )\n\n  return Object.seal(dumbymap)\n}","/* global EasyMDE */\nimport { markdown2HTML, generateMaps } from './dumbymap'\nimport { defaultAliases, parseConfigsFromYaml } from 'mapclay'\nimport * as menuItem from './MenuItem'\nimport { addAnchorByPoint } from './dumbyUtils.mjs'\nimport { shiftByWindow } from './utils.mjs'\nimport LeaderLine from 'leader-line'\n\n/**\n * @typedef {Object} RefLink\n * @property {string} ref -- name of link\n * @property {string} link -- content of link\n * @property {string|null} title -- title of link\n */\n\n// Set up Containers {{{\n/** Variables about dumbymap and editor **/\nconst url = new URL(window.location)\nconst context = document.querySelector('[data-mode]')\nconst dumbyContainer = document.querySelector('.DumbyMap')\ndumbyContainer.dataset.scrollLine = ''\nconst textArea = document.querySelector('.editor textarea')\nlet dumbymap\n\n/** Variables about Reference Style Links in Markdown */\nconst refLinkPattern = /\\[([^\\x5B\\x5D]+)\\]:\\s+(\\S+)(\\s[\"'](\\S+)[\"'])?/\nlet refLinks = []\n\n/**\n * Validates if the given anchor name is unique\n *\n * @param {string} anchorName - The anchor name to validate\n * @returns {boolean} True if the anchor name is unique, false otherwise\n */\nconst validateAnchorName = anchorName =>\n  !refLinks.find(obj => obj.ref === anchorName)\n\n/**\n * Appends a reference link to the CodeMirror instance\n *\n * @param {CodeMirror} cm - The CodeMirror instance\n * @param {RefLink} refLink - The reference link to append\n */\nconst appendRefLink = (cm, refLink) => {\n  const { ref, link, title } = refLink\n  let refLinkString = `\\n[${ref}]: ${link} \"${title ?? ''}\"`\n  const lastLineIsRefLink = cm.getLine(cm.lastLine()).match(refLinkPattern)\n  if (!lastLineIsRefLink) refLinkString = '\\n' + refLinkString\n  cm.replaceRange(refLinkString, { line: Infinity })\n\n  refLinks.push(refLink)\n}\n/**\n * Watch for changes of editing mode\n *\n * For 'data-mode' attribute of the context element, if the mode is 'editing'\n * and the layout is not 'normal', it sets the layout to 'normal' and switch to editing mode\n */\nnew window.MutationObserver(() => {\n  const mode = context.dataset.mode\n  const layout = dumbyContainer.dataset.layout\n  if (mode === 'editing' && layout !== 'normal') {\n    dumbyContainer.dataset.layout = 'normal'\n  }\n}).observe(context, {\n  attributes: true,\n  attributeFilter: ['data-mode'],\n  attributeOldValue: true,\n})\n/**\n * Toggles the editing mode\n */\nconst toggleEditing = () => {\n  const mode = context.dataset.mode\n  if (mode === 'editing') {\n    delete context.dataset.mode\n  } else {\n    context.dataset.mode = 'editing'\n  }\n}\n// }}}\n// Set up EasyMDE {{{\n/** Contents for tutorial **/\nconst defaultContent =\n  `<br>\n\n> <big>Hello My Friend! This is DumbyMap!</big>\n\n<br>\n\n\\`\\`\\`map\nuse: Leaflet\nheight: 120px\nXYZ: https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png\n\\`\\`\\`\n\n\nDumbyMap generates **interactive document with maps** from raw texts.\n\nYou can use it to:\n\n1. [Roll a Dice] for a new map\n2. Hover on [GeoLink][example-geolink] to show point in maps.\n3. Add GeoLink by dragging **selected text**\n4. Change contents by [Editor] with [Markdown] text\n5. **Right click** to call context menu, you can:\n    + Change focus between maps\n    + Select a block for browsing\n    + Switch layouts for various use cases\n\n\nIf you want know more, take a look at subjects below:\n1. [How to write Markdown text?](https://www.markdownguide.org/basic-syntax/)\n1. <details>\n      <summary>How can I save contents for next use?</summary>\n\n      Since All contents come from raw texts, you can:\n      1. Save current page as bookmark by [hash button](#create-hash \"=>.mde-hash\")\n      2. Copy texts in editor and save as \\`.txt\\` file\n      3. Use online service for hosting Markdown, for example: [HackMD](https://hackmd.io)\n\n   </details>\n1. <details>\n      <summary>I want more features in map!</summary>\n\n      DumbyMap use [mapclay](https://github.com/outdoorsafetylab/mapclay) to render maps.\n      1. You can use \\`eval\\` options to add custom scripts, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#run-scripts-after-map-is-created) for more details\n      2. You can use custom Renderer indtead of default ones, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#renderer) for more details\n\n   </details>\n1. [I am an experienced developer, show me what you got!](https://github.com/outdoorsafetylab/dumbymap)\n\n\n<br>\n\n> <big>Have Fun ~<big>\n\n <br>\n\n[Roll a dice]: #Click%20it! \"=>.mde-roll\"\n[example-geolink]: geo:24,121?xy=121,24&text=Use%20yellow%20link%20point%20to%20map\n[Markdown]: https://www.markdownguide.org/basic-syntax/\n[Editor]: #This%20is%20editor! \"=>.editor\"`\n\n/** Editor from EasyMDE **/\nconst editor = new EasyMDE({\n  element: textArea,\n  initialValue: defaultContent,\n  autosave: {\n    enabled: true,\n    uniqueId: 'dumbymap',\n  },\n  indentWithTabs: false,\n  lineNumbers: true,\n  promptURLs: true,\n  uploadImage: true,\n  spellChecker: false,\n  toolbarButtonClassPrefix: 'mde',\n  status: false,\n  shortcuts: {\n    map: 'Ctrl-Alt-M',\n    debug: 'Ctrl-Alt-D',\n    toggleUnorderedList: null,\n    toggleOrderedList: null,\n  },\n  toolbar: [\n    {\n      name: 'roll',\n      title: 'Roll a Dice',\n      text: '\\u{2684}',\n      action: () => addMapRandomlyByPreset(),\n    },\n    {\n      name: 'export',\n      title: 'Export current page',\n      text: '\\u{1F4BE}',\n      action: () => {\n      },\n    },\n    {\n      name: 'hash',\n      title: 'Save content as URL',\n      // text: '\\u{1F4BE}',\n      text: '#',\n      action: () => {\n        const state = { content: editor.value() }\n        window.location.hash = encodeURIComponent(JSON.stringify(state))\n        window.location.search = ''\n        navigator.clipboard.writeText(window.location.href)\n        window.alert('URL updated in address bar, you can save current page as bookmark')\n      },\n    },\n    '|',\n    {\n      name: 'undo',\n      title: 'Undo last editing',\n      text: '\\u27F2',\n      action: EasyMDE.undo,\n    },\n    {\n      name: 'redo',\n      text: '\\u27F3',\n      title: 'Redo editing',\n      action: EasyMDE.redo,\n    },\n    '|',\n    {\n      name: 'heading-1',\n      text: 'H1',\n      title: 'Big Heading',\n      action: EasyMDE['heading-1'],\n    },\n    {\n      name: 'heading-2',\n      text: 'H2',\n      title: 'Medium Heading',\n      action: EasyMDE['heading-2'],\n    },\n    '|',\n    {\n      name: 'link',\n      text: '\\u{1F517}',\n      title: 'Create Link',\n      action: EasyMDE.drawLink,\n    },\n    {\n      name: 'image',\n      text: '\\u{1F5BC}',\n      title: 'Create Image',\n      action: EasyMDE.drawImage,\n    },\n    '|',\n    {\n      name: 'Bold',\n      text: '\\u{1D401}',\n      title: 'Bold',\n      action: EasyMDE.toggleBold,\n    },\n    {\n      name: 'Italic',\n      text: '\\u{1D43C}',\n      title: 'Italic',\n      action: EasyMDE.toggleItalic,\n    },\n    '|',\n    {\n      name: 'tutorial',\n      text: '\\u{2753}',\n      title: 'Reset for content for tutorial',\n      action: () => {\n        editor.value(defaultContent)\n        refLinks = getRefLinks()\n        updateDumbyMap()\n      },\n    },\n  ],\n})\n/** CodeMirror Instance **/\nconst cm = editor.codemirror\n\n/**\n * getRefLinks from contents of editor\n * @return {RefLink[]} refLinks\n */\nconst getRefLinks = () => editor.value()\n  .split('\\n')\n  .map(line => {\n    const [, ref, link,, title] = line.match(refLinkPattern) ?? []\n    return { ref, link, title }\n  })\n  .filter(({ ref, link }) => ref && link)\n\nrefLinks = getRefLinks()\n\n/**\n * get state of website from hash string\n *\n * @param {String} hash\n */\nconst getStateFromHash = hash => {\n  const hashValue = hash.substring(1)\n  const stateString = decodeURIComponent(hashValue)\n  try {\n    return JSON.parse(stateString) ?? {}\n  } catch (_) {\n    return {}\n  }\n}\n/**\n * get editor content from hash string\n *\n * @param {String} hash\n */\nconst getContentFromHash = hash => {\n  const state = getStateFromHash(hash)\n  return state.content\n}\n/** Hash and Query Parameters in URL **/\nconst contentFromHash = getContentFromHash(window.location.hash)\nwindow.location.hash = ''\n\nif (url.searchParams.get('content') === 'tutorial') {\n  editor.value(defaultContent)\n} else if (contentFromHash) {\n  // Seems like autosave would overwrite initialValue, set content from hash here\n  editor.cleanup()\n  editor.value(contentFromHash)\n}\n// }}}\n// Set up logic about editor content {{{\n\n/**\n * updateScrollLine. Update data attribute by scroll on given element\n *\n * @param {HTMLElement} ele\n */\nconst updateScrollLine = (ele) => () => {\n  if (textArea.dataset.scrollLine) return\n\n  const threshold = ele.scrollTop + window.innerHeight / 2 + 30\n  const block = Array.from(ele.children)\n    .findLast(e => e.offsetTop < threshold) ??\n    ele.firstChild\n\n  const line = Array.from(block.querySelectorAll('p'))\n    .findLast(e => e.offsetTop + block.offsetTop < threshold)\n  const linenumber = line?.dataset?.sourceLine\n  if (!linenumber) return\n  const offset = (line.offsetTop + block.offsetTop - ele.scrollTop)\n\n  if (linenumber) {\n    ele.closest('[data-scroll-line]').dataset.scrollLine = linenumber + '/' + offset\n  }\n}\n\nnew window.MutationObserver(() => {\n  clearTimeout(dumbyContainer.timer)\n  dumbyContainer.timer = setTimeout(\n    () => { dumbyContainer.dataset.scrollLine = '' },\n    50,\n  )\n\n  const line = dumbyContainer.dataset.scrollLine\n  if (line) {\n    const [lineNumber, offset] = line.split('/')\n\n    if (!isNaN(lineNumber)) {\n      cm.scrollIntoView({ line: lineNumber, ch: 0 }, offset)\n    }\n  }\n}).observe(dumbyContainer, {\n  attributes: true,\n  attributeFilter: ['data-scroll-line'],\n})\n\n/**\n * updateScrollLineByCodeMirror.\n * @param {CodeMirror} cm\n */\nconst updateCMScrollLine = (cm) => {\n  if (dumbyContainer.dataset.scrollLine) return\n\n  const lineNumber = cm.getCursor()?.line ??\n    cm.lineAtHeight(cm.getScrollInfo().top, 'local')\n  textArea.dataset.scrollLine = lineNumber\n}\ncm.on('scroll', () => {\n  if (cm.hasFocus()) updateCMScrollLine(cm)\n})\n\n/** Sync scroll from CodeMirror to HTML **/\nnew window.MutationObserver(() => {\n  clearTimeout(textArea.timer)\n  textArea.timer = setTimeout(\n    () => { textArea.dataset.scrollLine = '' },\n    1000,\n  )\n\n  const line = textArea.dataset.scrollLine\n  let lineNumber = Number(line)\n  let p\n  if (isNaN(lineNumber)) return\n\n  const paragraphs = Array.from(dumbymap.htmlHolder.querySelectorAll('p'))\n  do {\n    p = paragraphs.find(p => Number(p.dataset.sourceLine) === lineNumber)\n    lineNumber++\n  } while (!p && lineNumber < cm.doc.size)\n  p = p ?? paragraphs.at(-1)\n  if (!p) return\n\n  const coords = cm.charCoords({ line: lineNumber, ch: 0 })\n  p.scrollIntoView({ inline: 'start' })\n  const top = p.getBoundingClientRect().top\n  dumbymap.htmlHolder.scrollBy(0, top - coords.top + 30)\n}).observe(textArea, {\n  attributes: true,\n  attributeFilter: ['data-scroll-line'],\n})\n\n/**\n * addClassToCodeLines. Quick hack to style lines inside code block\n */\nconst addClassToCodeLines = () => {\n  const lines = cm.getLineHandle(0).parent.lines\n  let insideCodeBlock = false\n  lines.forEach((line, index) => {\n    if (line.text.match(/^[\\u0060]{3}/)) {\n      insideCodeBlock = !insideCodeBlock\n    } else if (insideCodeBlock) {\n      cm.addLineClass(index, 'text', 'inside-code-block')\n    } else {\n      cm.removeLineClass(index, 'text', 'inside-code-block')\n    }\n  })\n}\naddClassToCodeLines()\n\n/**\n * completeForCodeBlock.\n *\n * @param {Object} change -- codemirror change object\n */\nconst completeForCodeBlock = change => {\n  const line = change.to.line\n  if (change.origin === '+input') {\n    const text = change.text[0]\n\n    // Completion for YAML doc separator\n    if (\n      text === '-' &&\n      change.to.ch === 0 &&\n      insideCodeblockForMap(cm.getCursor())\n    ) {\n      cm.setSelection({ line, ch: 0 }, { line, ch: 1 })\n      cm.replaceSelection(text.repeat(3) + '\\n')\n    }\n\n    // Completion for Code fence\n    if (text === '`' && change.to.ch === 0) {\n      cm.setSelection({ line, ch: 0 }, { line, ch: 1 })\n      cm.replaceSelection(text.repeat(3))\n      const numberOfFences = cm\n        .getValue()\n        .split('\\n')\n        .filter(line => line.match(/[\\u0060]{3}/)).length\n      if (numberOfFences % 2 === 1) {\n        cm.replaceSelection('map\\n\\n```')\n        cm.setCursor({ line: line + 1 })\n      }\n    }\n  }\n\n  // For YAML doc separator, <hr> and code fence\n  // Auto delete to start of line\n  if (change.origin === '+delete') {\n    const match = change.removed[0].match(/^[-\\u0060]$/)?.at(0)\n    if (match && cm.getLine(line) === match.repeat(2) && match) {\n      cm.setSelection({ line, ch: 0 }, { line, ch: 2 })\n      cm.replaceSelection('')\n    }\n  }\n}\n\n/* Disable debounce temporarily */\n// const debounceForMap = (() => {\n//   const timer = null\n//\n//   return function (...args) {\n//     dumbymap = generateMaps.apply(this, args)\n// clearTimeout(timer);\n// timer = setTimeout(() => {\n//   dumbymap = generateMaps.apply(this, args)\n// }, 10);\n//   }\n// })()\n\n/**\n * menuForEditor.\n *\n * @param {Event} event -- Event for context menu\n * @param {HTMLElement} menu -- menu of dumbymap\n */\nconst menuForEditor = (event, menu) => {\n  event.preventDefault()\n\n  if (document.getSelection().type === 'Range' && cm.getSelection() && refLinks.length > 0) {\n    menu.replaceChildren()\n    menu.appendChild(menuItem.addRefLink(cm, refLinks))\n  }\n\n  if (context.dataset.mode !== 'editing') {\n    const switchToEditingMode = new menuItem.Item({\n      innerHTML: '<strong>EDIT</strong>',\n      onclick: () => (context.dataset.mode = 'editing'),\n    })\n    menu.appendChild(switchToEditingMode)\n  }\n\n  const map = event.target.closest('.mapclay')\n  if (map) {\n    const item = new menuItem.Item({\n      text: 'Add Anchor',\n      onclick: (event) => {\n        const refLink = addAnchorByPoint({ point: event, map, validateAnchorName })\n        appendRefLink(cm, refLink)\n      },\n    })\n    menu.insertBefore(item, menu.firstChild)\n  }\n}\n\n/**\n * update content of HTML about Dumbymap\n */\nconst updateDumbyMap = (callback = null) => {\n  markdown2HTML(dumbyContainer, editor.value())\n  // debounceForMap(dumbyContainer, afterMapRendered)\n  dumbymap = generateMaps(dumbyContainer)\n  // Set onscroll callback\n  const htmlHolder = dumbymap.htmlHolder\n  htmlHolder.onscroll = updateScrollLine(htmlHolder)\n  // Set oncontextmenu callback\n  dumbymap.utils.setContextMenu(menuForEditor)\n\n  callback?.(dumbymap)\n}\nupdateDumbyMap()\n\n// Re-render HTML by editor content\ncm.on('change', (_, change) => {\n  updateDumbyMap(() => {\n    updateCMScrollLine(cm)\n  })\n  addClassToCodeLines()\n  completeForCodeBlock(change)\n})\n\n// Set class for focus\ncm.on('focus', () => {\n  cm.getWrapperElement().classList.add('focus')\n  dumbyContainer.classList.remove('focus')\n})\n\ncm.on('beforeChange', (_, change) => {\n  textArea.dataset.scrollLine = cm.getCursor().line\n\n  // Don't allow more content after YAML doc separator\n  if (change.origin && change.origin.match(/^(\\+input|paste)$/)) {\n    const line = change.to.line\n    if (cm.getLine(line) === '---' && change.text[0] !== '') {\n      change.cancel()\n    }\n  }\n})\n\n// Reload editor content by hash value\nwindow.onhashchange = () => {\n  const content = getContentFromHash(window.location.hash)\n  if (content) editor.value(content)\n}\n\n// }}}\n// Completion in Code Blok {{{\n// Elements about suggestions {{{\nconst menu = document.createElement('div')\nmenu.className = 'menu editor-menu'\nmenu.style.display = 'none'\nmenu.onclick = () => (menu.style.display = 'none')\nnew window.MutationObserver(() => {\n  if (menu.style.display === 'none') {\n    menu.replaceChildren()\n  }\n}).observe(menu, {\n  attributes: true,\n  attributeFilter: ['style'],\n})\ndocument.body.append(menu)\n\nconst rendererOptions = {}\n\n// }}}\n// Aliases for map options {{{\nconst aliasesForMapOptions = {}\nconst defaultApply = './assets/default.yml'\nfetch(defaultApply)\n  .then(res => res.text())\n  .then(rawText => {\n    const config = parseConfigsFromYaml(rawText)?.at(0)\n    Object.assign(aliasesForMapOptions, config.aliases ?? {})\n  })\n  .catch(err => console.warn(`Fail to get aliases from ${defaultApply}`, err))\n// }}}\n/**\n * insideCodeblockForMap. Check if current token is inside code block {{{\n *\n * @param {Anchor} anchor\n */\nconst insideCodeblockForMap = anchor => {\n  const token = cm.getTokenAt(anchor)\n  const insideCodeBlock =\n    token.state.overlay.codeBlock &&\n    !cm.getLine(anchor.line).match(/^[\\u0060]{3}/)\n  if (!insideCodeBlock) return false\n\n  let line = anchor.line - 1\n  while (line >= 0) {\n    const content = cm.getLine(line)\n    if (content === '```map') {\n      return true\n    } else if (content === '```') {\n      return false\n    }\n    line = line - 1\n  }\n  return false\n}\n// }}}\n/**\n * getLineWithRenderer. Get Renderer by cursor position in code block {{{\n *\n * @param {Object} anchor -- Codemirror Anchor Object\n */\nconst getLineWithRenderer = anchor => {\n  const currentLine = anchor.line\n  if (!cm.getLine) return null\n\n  const match = line => cm.getLine(line).match(/^use: /)\n\n  if (match(currentLine)) return currentLine\n\n  // Look backward/forward for pattern of used renderer: /use: .+/\n  let pl = currentLine - 1\n  while (pl > 0 && insideCodeblockForMap(anchor)) {\n    const text = cm.getLine(pl)\n    if (match(pl)) {\n      return pl\n    } else if (text.match(/^---|^[\\u0060]{3}/)) {\n      break\n    }\n    pl = pl - 1\n  }\n\n  let nl = currentLine + 1\n  while (insideCodeblockForMap(anchor)) {\n    const text = cm.getLine(nl)\n    if (match(nl)) {\n      return nl\n    } else if (text.match(/^---|^[\\u0060]{3}/)) {\n      return null\n    }\n    nl = nl + 1\n  }\n\n  return null\n}\n// }}}\n/**\n * getSuggestionsForOptions. Return suggestions for valid options {{{\n *\n * @param {Boolean} optionTyped\n * @param {Object[]} validOptions\n */\nconst getSuggestionsForOptions = (optionTyped, validOptions) => {\n  let suggestOptions = []\n\n  const matchedOptions = validOptions.filter(o =>\n    o.valueOf().toLowerCase().includes(optionTyped.toLowerCase()),\n  )\n\n  if (matchedOptions.length > 0) {\n    suggestOptions = matchedOptions\n  } else {\n    suggestOptions = validOptions\n  }\n\n  return suggestOptions.map(\n    o =>\n      new menuItem.Suggestion({\n        text: `<span>${o.valueOf()}</span><span class='info' title=\"${o.desc ?? ''}\">ⓘ</span>`,\n        replace: `${o.valueOf()}: `,\n        cm,\n      }),\n  )\n}\n// }}}\n/**\n * getSuggestionFromMapOption. Return suggestion for example of option value {{{\n *\n * @param {Object} option\n */\nconst getSuggestionFromMapOption = option => {\n  if (!option.example) return null\n\n  const text = option.example_desc\n    ? `<span>${option.example_desc}</span><span class=\"truncate\"style=\"color: gray\">${option.example}</span>`\n    : `<span>${option.example}</span>`\n\n  return new menuItem.Suggestion({\n    text,\n    replace: `${option.valueOf()}: ${option.example ?? ''}`,\n    cm,\n  })\n}\n// }}}\n/**\n * getSuggestionsFromAliases. Return suggestions from aliases {{{\n *\n * @param {Object} option\n */\nconst getSuggestionsFromAliases = option =>\n  Object.entries(aliasesForMapOptions[option.valueOf()] ?? {})?.map(record => {\n    const [alias, value] = record\n    const valueString = JSON.stringify(value).replaceAll('\"', '')\n    return new menuItem.Suggestion({\n      text: `<span>${alias}</span><span class=\"truncate\" style=\"color: gray\">${valueString}</span>`,\n      replace: `${option.valueOf()}: ${valueString}`,\n      cm,\n    })\n  }) ?? []\n// }}}\n/**\n * handleTypingInCodeBlock. Handler for map codeblock {{{\n *\n * @param {Object} anchor -- Codemirror Anchor Object\n */\nconst handleTypingInCodeBlock = anchor => {\n  const text = cm.getLine(anchor.line)\n  if (text.match(/^\\s\\+$/) && text.length % 2 !== 0) {\n    // TODO Completion for even number of spaces\n  } else if (text.match(/^-/)) {\n    // TODO Completion for YAML doc separator\n  } else {\n    const suggestions = getSuggestions(anchor)\n    addSuggestions(anchor, suggestions)\n  }\n}\n// }}}\n/**\n * getSuggestions. Get suggestions by current input {{{\n *\n * @param {Object} anchor -- Codemirror Anchor Object\n */\nconst getSuggestions = anchor => {\n  const text = cm.getLine(anchor.line)\n\n  // Clear marks on text\n  cm.findMarks({ ...anchor, ch: 0 }, { ...anchor, ch: text.length }).forEach(\n    m => m.clear(),\n  )\n\n  // Mark user input invalid by case\n  const markInputIsInvalid = () =>\n    cm\n      .getDoc()\n      .markText(\n        { ...anchor, ch: 0 },\n        { ...anchor, ch: text.length },\n        { className: 'invalid-input' },\n      )\n\n  // Check if \"use: <renderer>\" is set\n  const lineWithRenderer = getLineWithRenderer(anchor)\n  const renderer = lineWithRenderer\n    ? cm.getLine(lineWithRenderer).split(' ')[1]\n    : null\n  if (renderer && anchor.line !== lineWithRenderer) {\n    // Do not check properties\n    if (text.startsWith('  ')) return []\n\n    // If no valid options for current used renderer, go get it!\n    const validOptions = rendererOptions[renderer]\n    if (!validOptions) {\n      // Get list of valid options for current renderer\n      const rendererUrl = defaultAliases.use[renderer]?.value\n      import(rendererUrl)\n        .then(rendererModule => {\n          rendererOptions[renderer] = rendererModule.default.validOptions\n          const currentAnchor = cm.getCursor()\n          if (insideCodeblockForMap(currentAnchor)) {\n            handleTypingInCodeBlock(currentAnchor)\n          }\n        })\n        .catch(_ => {\n          markInputIsInvalid(lineWithRenderer)\n          console.warn(\n            `Fail to get valid options from Renderer typed: ${renderer}`,\n          )\n        })\n      return []\n    }\n\n    // If input is \"key:value\" (no space left after colon), then it is invalid\n    const isKeyFinished = text.includes(':')\n    const isValidKeyValue = text.match(/^[^:]+:\\s+/)\n    if (isKeyFinished && !isValidKeyValue) {\n      markInputIsInvalid()\n      return []\n    }\n\n    // If user is typing option\n    const keyTyped = text.split(':')[0].trim()\n    if (!isKeyFinished) {\n      markInputIsInvalid()\n      return getSuggestionsForOptions(keyTyped, validOptions)\n    }\n\n    // If user is typing value\n    const matchedOption = validOptions.find(o => o.name === keyTyped)\n    if (isKeyFinished && !matchedOption) {\n      markInputIsInvalid()\n    }\n\n    if (isKeyFinished && matchedOption) {\n      const valueTyped = text.substring(text.indexOf(':') + 1).trim()\n      const isValidValue = matchedOption.isValid(valueTyped)\n      if (!valueTyped) {\n        return [\n          getSuggestionFromMapOption(matchedOption),\n          ...getSuggestionsFromAliases(matchedOption),\n        ].filter(s => s instanceof menuItem.Suggestion)\n      }\n      if (valueTyped && !isValidValue) {\n        markInputIsInvalid()\n        return []\n      }\n    }\n  } else {\n    // Suggestion for \"use\"\n    const rendererSuggestions = Object.entries(defaultAliases.use)\n      .filter(([renderer]) => {\n        const suggestion = `use: ${renderer}`\n        const suggestionPattern = suggestion.replace(' ', '').toLowerCase()\n        const textPattern = text.replace(' ', '').toLowerCase()\n        return suggestion !== text && suggestionPattern.includes(textPattern)\n      })\n      .map(\n        ([renderer, info]) =>\n          new menuItem.Suggestion({\n            text: `<span>use: ${renderer}</span><span class='info' title=\"${info.desc}\">ⓘ</span>`,\n            replace: `use: ${renderer}`,\n            cm,\n          }),\n      )\n    return rendererSuggestions.length === 0\n      ? []\n      : [\n          ...rendererSuggestions,\n          new menuItem.Item({\n            innerHTML: '<a href=\"https://github.com/outdoorsafetylab/mapclay#renderer\" class=\"external\" style=\"display: block;\">More...</a>',\n            className: ['suggestion'],\n            onclick: () => window.open('https://github.com/outdoorsafetylab/mapclay#renderer', '_blank'),\n          }),\n        ]\n  }\n  return []\n}\n// }}}\n/**\n * addSuggestions.  Show element about suggestions {{{\n *\n * @param {Object} anchor -- Codemirror Anchor Object\n * @param {Suggestion[]} suggestions\n */\nconst addSuggestions = (anchor, suggestions) => {\n  if (suggestions.length === 0) {\n    menu.style.display = 'none'\n    return\n  } else {\n    menu.style.display = 'block'\n  }\n\n  menu.innerHTML = ''\n  suggestions\n    .forEach(option => menu.appendChild(option))\n\n  const widgetAnchor = document.createElement('div')\n  cm.addWidget(anchor, widgetAnchor, true)\n  const rect = widgetAnchor.getBoundingClientRect()\n  menu.style.left = `calc(${rect.left}px + 2rem)`\n  menu.style.top = `calc(${rect.bottom}px + 1rem)`\n  menu.style.display = 'block'\n  shiftByWindow(menu)\n}\n// }}}\n// EVENT: Suggests for current selection {{{\n// FIXME Dont show suggestion when selecting multiple chars\ncm.on('cursorActivity', _ => {\n  menu.style.display = 'none'\n  const anchor = cm.getCursor()\n\n  if (insideCodeblockForMap(anchor)) {\n    handleTypingInCodeBlock(anchor)\n  }\n})\ncm.on('blur', () => {\n  refLinks = getRefLinks()\n\n  if (menu.checkVisibility()) {\n    cm.focus()\n  } else {\n    cm.getWrapperElement().classList.remove('focus')\n    dumbyContainer.classList.add('focus')\n  }\n})\n// }}}\n// EVENT: keydown for suggestions {{{\nconst keyForSuggestions = ['Tab', 'Enter', 'Escape']\ncm.on('keydown', (_, e) => {\n  if (\n    !cm.hasFocus ||\n    !keyForSuggestions.includes(e.key) ||\n    menu.style.display === 'none'\n  ) { return }\n\n  // Directly add a newline when no suggestion is selected\n  const currentSuggestion = menu.querySelector('.menu-item.focus')\n  if (!currentSuggestion && e.key === 'Enter') return\n\n  // Override default behavior\n  e.preventDefault()\n\n  // Suggestion when pressing Tab or Shift + Tab\n  const nextSuggestion =\n    currentSuggestion?.nextSibling ??\n    menu.querySelector('.menu-item:first-child')\n  const previousSuggestion =\n    currentSuggestion?.previousSibling ??\n    menu.querySelector('.menu-item:last-child')\n  const focusSuggestion = e.shiftKey ? previousSuggestion : nextSuggestion\n\n  // Current editor selection state\n  switch (e.key) {\n    case 'Tab':\n      Array.from(menu.children).forEach(s => s.classList.remove('focus'))\n      focusSuggestion.classList.add('focus')\n      focusSuggestion.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n      break\n    case 'Enter':\n      currentSuggestion.onclick()\n      break\n    case 'Escape':\n      if (!menu.checkVisibility()) break\n      // HACK delay menu display change for blur event, mark cm focus should keep\n      setTimeout(() => (menu.style.display = 'none'), 50)\n      break\n  }\n})\n\ndocument.onkeydown = e => {\n  if (e.altKey && e.ctrlKey && e.key === 'm') {\n    toggleEditing()\n    e.preventDefault()\n    return null\n  }\n\n  if (!cm.hasFocus()) {\n    if (e.key === 'F1') {\n      e.preventDefault()\n      cm.focus()\n    }\n    if (e.key === 'Tab') {\n      e.preventDefault()\n      dumbymap.utils.focusNextMap(e.shiftKey)\n    }\n    if (e.key === 'x' || e.key === 'X') {\n      e.preventDefault()\n      dumbymap.utils.switchToNextLayout(e.shiftKey)\n    }\n    if (e.key === 'n') {\n      e.preventDefault()\n      dumbymap.utils.focusNextBlock()\n    }\n    if (e.key === 'p') {\n      e.preventDefault()\n      dumbymap.utils.focusNextBlock(true)\n    }\n    if (e.key === 'Escape') {\n      e.preventDefault()\n      dumbymap.utils.removeBlockFocus()\n    }\n  }\n}\n\n// }}}\n// }}}\n// Layout Switch {{{\nnew window.MutationObserver(mutaions => {\n  const mutation = mutaions.at(-1)\n  const layout = dumbyContainer.dataset.layout\n  if (layout !== 'normal' || mutation.oldValue === 'normal') {\n    delete context.dataset.mode\n  }\n}).observe(dumbyContainer, {\n  attributes: true,\n  attributeFilter: ['data-layout'],\n  attributeOldValue: true,\n})\n// }}}\n\n/**\n * addMapRandomlyByPreset. insert random text of valid mapclay yaml into editor\n */\nconst addMapRandomlyByPreset = () => {\n  const yamlText = [\n    'apply: ./assets/default.yml',\n    'width: 85%',\n    'height: 200px',\n  ]\n  const order = [\n    'id',\n    'apply',\n    'use',\n    'width',\n    'height',\n    'center',\n    'XYZ',\n    'zoom',\n  ]\n  const aliasesEntries = Object.entries(aliasesForMapOptions)\n    .filter(([key, _]) =>\n      order.includes(key) &&\n      !yamlText.find(text => text.startsWith(key)),\n    )\n  if (aliasesEntries.length === 0) return\n\n  aliasesEntries.forEach(([option, aliases]) => {\n    const entries = Object.entries(aliases)\n    const validEntries = entries\n      .filter(([alias, value]) => {\n        // FIXME logic about picking XYZ data\n        if (option === 'XYZ') {\n          const inTaiwan = yamlText.find(text => text.match(/center: TAIWAN/))\n          if (!inTaiwan) return !alias.includes('TAIWAN')\n        }\n        if (option === 'zoom') {\n          return value > 6 && value < 15\n        }\n        return true\n      })\n    const randomValue = validEntries\n      .at((Math.random() * validEntries.length) | 0)\n      .at(0)\n\n    yamlText.push(`${option}: ${typeof randomValue === 'object' ? randomValue.value : randomValue}`)\n\n    if (option === 'center') yamlText.push(`id: ${randomValue}`)\n  })\n\n  yamlText.sort((a, b) =>\n    order.indexOf(a.split(':')[0]) > order.indexOf(b.split(':')[0]),\n  )\n  const anchor = cm.getCursor()\n  cm.replaceRange(\n    '\\n```map\\n' + yamlText.join('\\n') + '\\n```\\n',\n    anchor,\n  )\n}\n\ncm.getWrapperElement().oncontextmenu = e => {\n  if (insideCodeblockForMap(cm.getCursor())) return\n  e.preventDefault()\n\n  if (cm.getSelection() && refLinks.length > 0) {\n    menu.appendChild(menuItem.addRefLink(cm, refLinks))\n  }\n\n  if (menu.children.length > 0) {\n    menu.style.cssText = `display: block; transform: translate(${e.x}px, ${e.y}px); overflow: visible;`\n  }\n}\n\n/** HACK Sync selection from HTML to CodeMirror */\ndocument.addEventListener('selectionchange', () => {\n  if (cm.hasFocus() || dumbyContainer.onmousemove) {\n    return\n  }\n\n  const selection = document.getSelection()\n  if (selection.type === 'Range') {\n    const content = selection.getRangeAt(0).toString()\n    const parentWithSourceLine = selection.anchorNode.parentElement.closest('.source-line')\n    const lineStart = Number(parentWithSourceLine?.dataset?.sourceLine ?? NaN)\n    const lineEnd = Number(parentWithSourceLine?.nextSibling?.dataset?.sourceLine ?? NaN)\n    // TODO Also return when range contains anchor element\n    if (content.includes('\\n') || isNaN(lineStart)) {\n      cm.setSelection(cm.getCursor())\n      return\n    }\n\n    const texts = [content]\n    let sibling = selection.anchorNode.previousSibling\n    while (sibling) {\n      texts.push(sibling.textContent)\n      sibling = sibling.previousSibling\n    }\n\n    const anchor = { line: lineStart, ch: 0 }\n\n    texts\n      .filter(t => t && t !== '\\n')\n      .map(t => t.replace('\\n', ''))\n      .reverse()\n      .forEach(text => {\n        let index = cm.getLine(anchor.line)?.indexOf(text, anchor.ch)\n        while (index === -1) {\n          anchor.line += 1\n          anchor.ch = 0\n          if (anchor.line >= lineEnd) {\n            cm.setSelection(cm.setCursor())\n            return\n          }\n          index = cm.getLine(anchor.line)?.indexOf(text)\n        }\n        anchor.ch = index + text.length\n      })\n\n    cm.setSelection({ line: anchor.line, ch: anchor.ch - content.length }, anchor)\n  }\n})\n\n/** Drag/Drop on map for new reference style link */\ndumbyContainer.onmousedown = (e) => {\n  // Check should start drag event for GeoLink\n  if (e.which !== 1) return\n  const selection = document.getSelection()\n  if (cm.getSelection() === '' || selection.type !== 'Range') return\n  const range = selection.getRangeAt(0)\n  const rect = range.getBoundingClientRect()\n  const mouseInRange = e.x < rect.right && e.x > rect.left && e.y < rect.bottom && e.y > rect.top\n  if (!mouseInRange) return\n\n  const geoLink = document.createElement('a')\n  geoLink.textContent = range.toString()\n  geoLink.classList.add('with-leader-line', 'geolink', 'drag')\n  range.deleteContents()\n  range.insertNode(geoLink)\n\n  const lineEnd = document.createElement('div')\n  lineEnd.style.cssText = `position: absolute; left: ${e.clientX}px; top: ${e.clientY}px;`\n  document.body.appendChild(lineEnd)\n\n  const line = new LeaderLine({\n    start: geoLink,\n    end: lineEnd,\n    path: 'magnet',\n  })\n\n  function onMouseMove (event) {\n    lineEnd.style.left = event.clientX + 'px'\n    lineEnd.style.top = event.clientY + 'px'\n    line.position()\n  }\n\n  context.classList.add('dragging-geolink')\n  dumbyContainer.onmousemove = onMouseMove\n  dumbymap.utils.renderedMaps().forEach(map => { map.style.cursor = 'crosshair' })\n  dumbyContainer.onmouseup = function (e) {\n    context.classList.remove('dragging-geolink')\n    dumbyContainer.onmousemove = null\n    dumbyContainer.onmouseup = null\n    line?.remove()\n    lineEnd.remove()\n    dumbymap.utils.renderedMaps().forEach(map => map.style.removeProperty('cursor'))\n    const resumeContent = () => updateDumbyMap(newDumbymap => {\n      const scrollTop = dumbymap.htmlHolder.scrollTop\n      newDumbymap.htmlHolder.scrollBy(0, scrollTop)\n    })\n\n    const map = document.elementFromPoint(e.clientX, e.clientY).closest('.mapclay')\n    const selection = cm.getSelection()\n    if (!map || !selection) {\n      resumeContent()\n      return\n    }\n\n    const refLink = addAnchorByPoint({ point: e, map, validateAnchorName })\n    if (!refLink) {\n      resumeContent()\n      return\n    }\n\n    appendRefLink(cm, refLink)\n    if (selection === refLink.ref) {\n      cm.replaceSelection(`[${selection}]`)\n    } else {\n      cm.replaceSelection(`[${selection}][${refLink.ref}]`)\n    }\n  }\n}\n\ndumbyContainer.ondragstart = () => false\n"],"names":["decodeCache","decode","string","exclude","defaultChars","cache","getDecodeCache","i","ch","String","fromCharCode","push","length","charCodeAt","toString","toUpperCase","slice","replace","seq","result","l","b1","parseInt","b2","chr","b3","b4","componentChars","encodeCache","encode","keepEscaped","getEncodeCache","test","code","nextCode","encodeURIComponent","format","url","protocol","slashes","auth","hostname","indexOf","port","pathname","search","hash","Url","this","protocolPattern","portPattern","simplePathPattern","unwise","concat","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","hostlessProtocol","javascript","slashedProtocol","http","https","ftp","gopher","file","urlParse","slashesDenoteHost","u","parse","prototype","lowerProto","hec","rest","trim","split","simplePath","exec","proto","toLowerCase","substr","match","atSign","hostEnd","lastIndexOf","host","parseHost","ipv6Hostname","hostparts","part","newpart","j","k","validParts","notHost","bit","unshift","join","qm","_a","Any","Cc","P","regex","Z","htmlDecodeTree","Uint16Array","map","c","xmlDecodeTree","decodeMap","Map","fromCodePoint","codePoint","output","CharCodes","BinTrieFlags","EntityDecoderState","DecodingMode","isNumber","ZERO","NINE","isHexadecimalCharacter","UPPER_A","UPPER_F","LOWER_A","LOWER_F","isEntityInAttributeInvalidEnd","EQUALS","isAsciiAlphaNumeric","UPPER_Z","LOWER_Z","EntityDecoder","constructor","decodeTree","emitCodePoint","errors","state","EntityStart","consumed","treeIndex","excess","decodeMode","Strict","startEntity","write","str","offset","NUM","NumericStart","stateNumericStart","NamedEntity","stateNamedEntity","NumericDecimal","stateNumericDecimal","NumericHex","stateNumericHex","LOWER_X","addToNumericResult","start","end","base","digitCount","Math","pow","startIdx","char","emitNumericEntity","lastCp","expectedLength","absenceOfDigitsInNumericCharacterReference","SEMI","replaceCodePoint","get","missingSemicolonAfterCharacterReference","validateNumericCharacterReference","current","valueLength","VALUE_LENGTH","determineBranch","max","Attribute","emitNotTerminatedNamedEntity","emitNamedEntityData","getDecoder","ret","decoder","decodeWithTrie","lastIndex","len","nodeIdx","branchCount","BRANCH_LENGTH","jumpOffset","JUMP_TABLE","value","lo","hi","mid","midVal","htmlDecoder","decodeHTML","mode","Legacy","isString","obj","_class","Object","call","_hasOwnProperty","hasOwnProperty","assign","Array","arguments","forEach","source","TypeError","keys","key","arrayReplaceAt","src","pos","newElements","isValidEntityCode","surrogate1","surrogate2","UNESCAPE_MD_RE","UNESCAPE_ALL_RE","RegExp","DIGITAL_ENTITY_TEST_RE","unescapeAll","escaped","entity","replaceEntityPattern","name","decoded","HTML_ESCAPE_TEST_RE","HTML_ESCAPE_REPLACE_RE","HTML_REPLACEMENTS","replaceUnsafeChar","escapeHtml","REGEXP_ESCAPE_RE","isSpace","isWhiteSpace","isPunctChar","ucmicro.P","ucmicro.S","isMdAsciiPunct","normalizeReference","lib","mdurl","ucmicro","escapeRE","has","object","unescapeMd","parseLinkDestination","ok","level","parseLinkLabel","disableNested","found","marker","prevPos","posMax","oldPos","md","inline","skipToken","labelEnd","parseLinkTitle","prev_state","can_continue","default_rules","Renderer","rules","Ruler","__rules__","__cache__","Token","type","tag","nesting","attrs","children","content","markup","info","meta","block","hidden","StateCore","env","tokens","inlineMode","code_inline","idx","options","slf","token","renderAttrs","code_block","fence","highlighted","langName","langAttrs","arr","highlight","attrIndex","tmpAttrs","langPrefix","tmpToken","image","renderInlineAsText","renderToken","hardbreak","xhtmlOut","softbreak","breaks","text","html_block","html_inline","needLf","nextToken","renderInline","render","__find__","__compile__","self","chains","rule","enabled","alt","altName","chain","fn","at","index","opt","Error","before","beforeName","ruleName","splice","after","afterName","enable","list","ignoreInvalid","isArray","enableOnly","disable","getRules","chainName","attrPush","attrData","attrSet","attrGet","attrJoin","NEWLINES_RE","NULL_RE","isLinkClose","RARE_RE","SCOPED_ABBR_TEST_RE","SCOPED_ABBR_RE","SCOPED_ABBR","r","tm","replaceFn","replace_scoped","inlineTokens","inside_autolink","replace_rare","QUOTE_TEST_RE","QUOTE_RE","replaceAt","process_inlines","stack","thisLevel","OUTER","t","canOpen","canClose","isSingle","lastChar","nextChar","isLastPunctChar","isNextPunctChar","isLastWhiteSpace","isNextWhiteSpace","item","single","openQuote","closeQuote","quotes","_rules","normalize","tok","linkify","blockTokens","pretest","htmlLinkLevel","currentToken","links","nodes","lastPos","ln","fullUrl","normalizeLink","validateLink","urlText","schema","normalizeLinkText","token_o","token_t","token_c","blkIdx","typographer","smartquotes","text_join","curr","last","Core","ruler","StateBlock","bMarks","eMarks","tShift","sCount","bsCount","blkIndent","line","lineMax","tight","ddIndent","listIndent","parentType","s","indent","indent_found","process","State","isEmpty","skipEmptyLines","from","skipSpaces","skipSpacesBack","min","skipChars","skipCharsBack","getLines","begin","keepLastLF","queue","lineIndent","lineStart","first","getLine","escapedSplit","isEscaped","substring","skipBulletListMarker","startLine","skipOrderedListMarker","open_tag","close_tag","HTML_TAG_RE","HTML_OPEN_CLOSE_TAG_RE","HTML_SEQUENCES","table","endLine","silent","nextLine","firstCh","secondCh","lineText","columns","aligns","shift","pop","columnCount","oldParentType","terminatorRules","tableLines","token_ho","token_il","tbodyLines","autocompletedCells","terminate","token_tdo","mem","params","haveEndMarker","blockquote","oldLineMax","oldBMarks","oldBSCount","oldSCount","oldTShift","lastLineEmpty","isOutdented","spaceAfterMarker","adjustTab","initial","oldIndent","lines","tokenize","hr","cnt","isOrdered","markerValue","posAfterMarker","isTerminatingParagraph","Number","markerCharCode","listTokIdx","listLines","prevEmptyEnd","contentStart","indentAfterMarker","itemLines","oldTight","oldListIndent","markTightParagraphs","reference","_endLine","getNextLine","isContinuation","lineContent","destRes","helpers","href","destEndPos","destEndLineNo","title","titleRes","label","references","html","heading","tmp","token_i","lheading","paragraph","ParserBlock","StateInline","outTokens","tokens_meta","pending","pendingLevel","delimiters","_prev_delimiters","backticks","backticksScanned","linkLevel","isTerminatorChar","maxNesting","hasEmptyLines","prevLine","pushPending","token_meta","scanDelims","canSplitWord","count","left_flanking","right_flanking","can_open","can_close","SCHEME_RE","ESCAPED","postProcess","loneMarkers","startDelim","endDelim","r_strikethrough","strikethrough_tokenize","scanned","open","close","strikethrough_postProcess","isStrong","r_emphasis","emphasis_tokenize","emphasis_post_process","EMAIL_RE","AUTOLINK_RE","DIGITAL_RE","NAMED_RE","processDelimiters","openersBottom","headerIdx","lastTokenIdx","jumps","closerIdx","closer","minOpenerIdx","openerIdx","newMinOpenerIdx","opener","isOddMatch","lastJump","link","matchAtStart","newline","pmax","ws","escape","ch1","escapedStr","ch2","origStr","backtick","openerLength","matchStart","matchEnd","closerLength","res","ref","parseReference","labelStart","autolink","isLetter","lc","isLinkOpen","_rules2","link_pairs","fragments_join","ParserInline","ruler2","isFunction","defaultOptions","fuzzyLink","fuzzyEmail","fuzzyIP","defaultSchemas","validate","tail","re","src_auth","src_host_port_strict","src_path","no_http","src_domain","src_domain_root","src_port","src_host_terminator","mailto","src_email_name","src_host_strict","tlds_default","compile","reFactory","opts","src_Any","src_Cc","src_Z","src_P","src_ZPCc","src_ZCc","text_separators","src_pseudo_letter","src_ip4","src_xn","src_host","tpl_host_fuzzy","tpl_host_no_ip_fuzzy","tpl_host_fuzzy_strict","tpl_host_port_fuzzy_strict","tpl_host_port_no_ip_fuzzy_strict","tpl_host_fuzzy_test","tpl_email_fuzzy","tpl_link_fuzzy","tpl_link_no_ip_fuzzy","__opts__","tlds","__tlds__","untpl","tpl","src_tlds","onCompile","__tlds_replaced__","email_fuzzy","link_fuzzy","link_no_ip_fuzzy","host_fuzzy_test","aliases","schemaError","val","__compiled__","__schemas__","compiled","isObject","isRegExp","createValidator","alias","slist","filter","schema_test","schema_search","schema_at_start","resetScanCache","__index__","__text_cache__","Match","__last_index__","__schema__","raw","createMatch","LinkifyIt","schemas","isOptionsObj","reduce","acc","add","definition","set","m","ml","me","next","tld_pos","at_pos","testSchemaAt","keepOld","sort","el","reverse","maxInt","regexPunycode","regexNonASCII","regexSeparators","overflow","floor","stringFromCharCode","error","RangeError","mapDomain","domain","callback","parts","encoded","array","ucs2decode","counter","extra","digitToBasic","digit","flag","adapt","delta","numPoints","firstTime","baseMinusTMin","input","inputLength","n","bias","basic","oldi","w","baseMinusT","out","currentValue","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","punycode","config","default","components","core","zero","rules2","commonmark","BAD_PROTO_RE","GOOD_DATA_RE","RECODE_HOSTNAME_FOR","parsed","mdurl.parse","er","mdurl.encode","mdurl.format","mdurl.decode","MarkdownIt","presetName","utils.isString","ParserCore","renderer","utils","utils.assign","configure","presets","missed","use","plugin","args","apply","parseInline","e","false","true","isPermalinkSymbol","a","o","emitWarning","console","warn","permalinkClass","permalinkHref","entries","permalinkAttrs","permalinkSymbol","permalinkSpace","permalinkBefore","class","symbol","renderHref","defaults","renderPermalinkImpl","ariaHidden","space","placement","d","safariReaderFix","f","includes","style","assistiveText","visuallyHiddenClass","p","wrapper","b","getTokensText","slugifyWithState","slugify","uniqueSlugStartIndex","tabIndex","permalink","renderPermalink","slug","render_footnote_anchor_name","id","prefix","docId","render_footnote_caption","subId","render_footnote_ref","footnote_anchor_name","caption","footnote_caption","refid","render_footnote_block_open","render_footnote_block_close","render_footnote_open","render_footnote_close","render_footnote_anchor","footnote_plugin","footnote_ref","footnote_block_open","footnote_block_close","footnote_open","footnote_close","footnote_anchor","footnote_def","footnotes","refs","token_fref_o","oldBMark","posAfterColon","token_fref_c","footnote_inline","footnoteId","footnoteSubId","footnote_tail","currentLabel","insideRef","refTokens","token_fo","token_po","token_pc","lastParagraph","token_a","__proto__","legacy","makePermalink","linkInsideHeader","headerLink","linkAfterHeader","front_matter_plugin","cb","marker_str","marker_char","frontMatter","marker_count","old_parent","old_line_max","start_content","auto_closed","inject_linenumbers_plugin","injectLineNumbers","paragraph_open","heading_open","list_item_open","table_open","onRemove","element","parent","parentNode","obs","window","MutationObserver","mutations","mutation","removedNodes","disconnect","observe","childList","animateRectTransition","rect","parentElement","width","w1","height","h1","left","x1","top","y1","w2","h2","x2","y2","getBoundingClientRect","rw","rh","dx","dy","isFinite","animate","duration","keyframes","transform","opacity","resume","easing","throttle","func","delay","timerFlag","setTimeout","shiftByWindow","offsetX","innerWidth","offsetY","innerHeight","requestID","MSPF","tasks","requestAnim","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","msRequestAnimationFrame","cancelAnim","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","msCancelAnimationFrame","clearTimeout","lastFrameTime","Date","now","step","called","task","event","listener","indexOfTasks","some","AnimEvent","_defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","CLICK_EMULATOR_ELEMENTS","DBLCLICK_EMULATOR_ELEMENTS","passiveSupported","addEventListener","addEventListenerWithOptions","capture","getPointsLength","p0","p1","lx","x","ly","y","sqrt","getTouchById","touches","identifier","hasXY","xy","clientX","clientY","dragstart","preventDefault","PointerEvent","_this","_classCallCheck","instance","Constructor","startHandlers","lastHandlerId","curPointerClass","curTouchId","lastPointerXY","lastTouchTime","stopPropagation","option","_createClass","protoProps","staticProps","regStartHandler","startHandler","that","pointerXY","touchId","pointerClass","changedTouches","cancel","unregStartHandler","handlerId","addStartHandler","passive","removeStartHandler","removeEventListener","addMoveHandler","moveHandler","rawEvent","handler","move","wrappedHandler","curMoveHandler","addEndHandler","endHandler","curEndHandler","addCancelHandler","cancelHandler","curCancelHandler","initClickEmulator","moveTolerance","timeTolerance","startX","startY","startMs","touch","performance","newEvent","MouseEvent","emulated","dispatchEvent","initDblClickEmulator","ucf","rePrefixedValue","rePrefixedName","reUc","PREFIXES","NAME_PREFIXES","prefixes","VALUE_PREFIXES","getDeclaration","declaration","document","createElement","normalizeName","propName","normalizeValue","propValue","cssSupports","setProperty","getPropertyValue","propNames","propValues","getName","ucfName","prefixed","CSSPrefix","getValue","applyList","setAttribute","mClassList","ignoreNative","classList","getAttribute","ins","contains","_add","methodChain","remove","_remove","toggle","force","_toggle","newToken","_replace","_typeof","Symbol","iterator","fnToString","objFnString","activeProps","hasMoved","body","cssValueDraggableCursor","cssValueDraggingCursor","cssOrgValueBodyCursor","cssPropTransitionProperty","cssPropTransform","cssPropUserSelect","cssOrgValueBodyUserSelect","SNAP_ALL_CORNERS","SNAP_ALL_SIDES","SNAP_ALL_EDGES","AUTOSCROLL_SPEED","AUTOSCROLL_SENSITIVITY","IS_EDGE","documentElement","navigator","msPointerEnabled","IS_TRIDENT","uniqueID","IS_GECKO","IS_BLINK","chrome","CSS","IS_WEBKIT","constr","getPrototypeOf","insProps","pointerOffset","pointerEvent","insId","cssWantedValueDraggableCursor","cssWantedValueDraggingCursor","draggableClass","draggingClass","movingClass","scrollFrame","curElement","curScrollXY","curXyMoveArgs","frameUpdate","moveArgs","timeLen","absValue","curValue","lastValue","abs","dir","newValue","speed","frame","xyMoveArgs","scrollXY","stop","scrollXYWindow","scrollTo","pageYOffset","pageXOffset","scrollXYElement","prop","copyTree","copyObj","hasChanged","typeA","keysA","aVal","isElement","nodeType","Node","ELEMENT_NODE","compareDocumentPosition","DOCUMENT_POSITION_DISCONNECTED","validBBox","bBox","right","bottom","validPPValue","isRatio","string2PPValue","inString","matches","parseFloat","ppValue2OptionValue","ppValue","resolvePPValue","baseOrigin","baseSize","validPPBBox","ppBBox2OptionObject","ppBBox","resolvePPBBox","baseBBox","prop2Axis","baseOriginXY","baseSizeXY","getBBox","getPaddingBox","getComputedStyle","borderTop","borderTopWidth","borderRight","borderRightWidth","borderBottom","borderBottomWidth","borderLeft","borderLeftWidth","setDraggableCursor","orgCursor","cursor","setDraggingCursor","viewPoint2SvgPoint","svgPoint","matrixTransform","svgCtmElement","getScreenCTM","inverse","moveTranslate","position","elementBBox","htmlOffset","elementStyle","moveLeftTop","moved","moveSvg","svgOffset","originBBox","svgOriginBBox","point","svgTransform","setTranslate","cbCheck","fix","minLeft","maxLeft","minTop","maxTop","moveElm","initTranslate","curPosition","RESTORE_PROPS","orgTransitionProperty","fixPosition","orgStyle","lastStyle","orgSize","cmpStyle","display","dirProp","padding","newBBox","offsetWidth","initLeftTop","margin","initSvg","curRect","newRect","originPoint","curPoint","initBBox","eventType","docBBox","initElm","containmentBBox","containmentIsBBox","containment","parsedSnapTargets","elementSizeXY","minXY","maxXY","xStart","xEnd","xStep","yStart","yEnd","yStep","snapTargets","parsedSnapTarget","baseRect","addSnapTarget","targetXY","center","xGravity","gravity","yGravity","corners","corner","snapTarget","gravityXStart","gravityXEnd","gravityYStart","gravityYEnd","specAxis","rangeAxis","startProp","endProp","gravityProp","specAxisL","rangeAxisL","gravitySpecStartProp","gravitySpecEndProp","gravityRangeStartProp","gravityRangeEndProp","sides","side","gravitySpecStart","gravitySpecEnd","edges","edge","lengthenX","lengthenY","expanded","axis","stepProp","expandedXY","autoScroll","autoScrollOptions","isWindow","dontScroll","scrollable","getScrollable","cmpStyleHtml","cmpStyleBody","cmpStyleElement","clientWidth","clientHeight","curScrollLeft","curScrollTop","maxScrollLeft","maxScrollTop","scrollWidth","scrollHeight","scrollableBBox","wh","back","forward","maxAbs","elementSize","sensitivity","dragEnd","handle","zIndex","orgZIndex","onDragEnd","_setOptions","newOptions","needsInitBBox","commonSnapOptions","cleanString","added","cornersLen","snap","newSnapOptions","targets","snapTargetsOptions","snapOptions","isElementPre","ppBBoxPre","newSnapTargetOptions","boundingBox","expandedParsedSnapTargets","snapTargetOptions","newOptionsBBox","invalid","parsedXY","newOptionsXY","commonOptions","newAutoScrollOptions","every","newSensitivity","v","optionMin","optionMax","orgUserSelect","pointerEventHandlerId","needsMove","bind","PlainDraggable","disabled","_id","ownerSvg","gpuTrigger","SVGElement","ownerSVGElement","baseVal","appendItem","createSVGTransform","createSVGPoint","svgView","nearestViewportElement","viewportElement","appendChild","createElementNS","namespaceURI","cssPropWillChange","leftTop","initAnim","webkitTapHighlightColor","cssPropBoxShadow","boxShadow","dragStart","onDragStart","setOptions","onDrag","onMove","onMoveStart","iLen","snappedX","snappedY","snapped","clientXY","initDoc","lazyInitTimer","initDoneItems","checkInitBBox","layoutChanging","layoutChange","initAll","Layout","enterHandler","leaveHandler","valueOf","focusNextMap","renderedList","renderedMaps","findIndex","nextIndex","nextMap","scrollIntoView","behavior","scrollToBlock","parentRect","scrollBlock","focusDelay","showcase","switchToNextLayout","layouts","currentLayoutName","container","dataset","layout","currentIndex","nextLayout","getMarkersFromMaps","closest","querySelectorAll","markerTitle","querySelector","addMarker","createGeoLink","URL","xyInParams","searchParams","isNaN","onmouseover","isAnchorVisible","anchor","LeaderLine","hide","middleLabel","path","show","addLeaderLine","onmouseout","removeLeaderLines","onclick","updateMapCameraByMarker","createDocLink","decodeURIComponent","selector","checkVisibility","pathLabel","fontWeight","updateCamera","mapContainer","insideWindow","childElement","childRect","insideParent","addAnchorByPoint","validateAnchorName","unproject","coord","toFixed","prompt","anchorName","desc","focusNextBlock","blocks","contentVisibilityAuto","opacityProperty","visibilityProperty","nextBlock","removeBlockFocus","Item","HTMLDivElement","innerHTML","className","super","cssText","sub","customElements","define","extends","Folder","items","submenu","onmouseleave","Suggestion","cm","getCursor","setSelection","replaceSelection","focus","newAnchor","setCursor","renderResults","modal","modalContent","overlayBlur","closeByEscKey","sourceCode","printDetails","color","success","fail","skip","printObject","prepareHeading","textContent","prepareSteps","results","renderHeading","renderSteps","detailsEle","details","values","valueString","propertyElement","addRefLink","refLinks","refLink","startsWith","selection","getSelection","PREFIX","EVENT_TYPE_RUN","EVENT_TYPE_START","EVENT_TYPE_END","EVENT_TYPE_CANCEL","fireEvent","elapsedTime","startTime","TransitionEvent","propertyName","property","pseudoElement","bubbles","cancelable","createEvent","initTransitionEvent","timedTransition","fixCurrentPosition","playingTime","currentPosition","isOn","finishAll","runTime","finishPlaying","finishDelaying","isReversing","durationLeft","timer","abort","parseAsCss","optionValue","timeValue","TimedTransition","initOn","ownerDocument","defaultView","on","_on","procToOn","off","_off","procToOff","APP_ID","STYLE_ELEMENT_ID","STYLE_CLASS","STYLE_CLASS_DOC","STYLE_CLASS_SHOW","STYLE_CLASS_HIDE","STYLE_CLASS_FORCE","STYLE_CLASS_BODY","FACE_DEFS_ELEMENT_ID","setStyle","styleProps","savedStyleProps","restoreStyle","scrollLeft","isDoc","scrollTop","getDocClientWH","elmTarget","targetBodyCmpStyle","elmTargetBody","wMode","writingMode","direction","restoreScroll","scrollElement","savedElementsScroll","elementScroll","avoidFocus","elmOverlay","DOCUMENT_POSITION_CONTAINED_BY","blur","avoidSelect","rangeCount","nodeContainsSel","node","nodeRange","createRange","selectNode","selRange","getRangeAt","compareBoundaryPoints","Range","START_TO_START","END_TO_END","elmOverlayBody","containsNode","isCollapsed","selContainsNode","partialContainment","selectNodeContents","setStart","anchorNode","anchorOffset","setEnd","focusNode","focusOffset","START_TO_END","END_TO_START","removeAllRanges","disableDocBars","targetBodyRect","clientWH","barV","barH","savedStyleTarget","propV","propH","barLeft","svgSpec","barTop","addStyle","savedStyleTargetBody","resizeTarget","boxSizing","includeProps","PROP_NAMES","border","fixStyle","_position","targetBodyBBox","overlayCmpStyle","overlayBBox","borders","reValue","hBorder","vBorder","h","getTargetElements","targetElements","childNodes","childNode","finishShowing","filterElements","savedStyle","filterElement","onShow","finishHiding","restoreAccKeys","savedElementsAccKeys","elementAccKeys","removeAttribute","accessKey","activeElement","stateSave","focusListener","timerRestoreAndFinish","restoreAndFinish","onHide","_show","onBeforeShow","elmOverlayClassList","getScroll","elements","fromDoc","elementsScroll","elementCanScroll","tagName","nodeName","overflowX","overflowY","disabledDocBars","disableAccKeys","hasAttribute","onPosition","transition","face","firstChild","removeChild","elmDocument","getElementById","defsSvg","DOMParser","parseFromString","scroll","dirLeft","find","PlainOverlay","getTarget","validElement","DOCUMENT_NODE","contentDocument","blockingDisabled","head","getElementsByTagName","sheet","insertBefore","forceReflow","nextSibling","stopImmediatePropagation","resizing","lastBBox","_hide","onBeforeHide","openCloseEffectProps","STYLE_CLASS_CONTENT","STYLE_CLASS_OVERLAY","STYLE_CLASS_OVERLAY_HIDE","STYLE_CLASS_OVERLAY_FORCE","shownProps","closeByOverlay","switchDraggable","plainDraggable","dragHandle","finishOpenEffect","effectKey","effectFinished","plainOverlay","openEffect","finishOpening","parentProps","onOpen","finishCloseEffect","closeEffect","finishClosing","onClose","execOpening","openEffectDone","execClosing","sync","closeEffectDone","fixOpenClose","_close","onBeforeClose","topProps","closeButton","handleClose","elmContent","PlainModal","elmPlainOverlayBody","effectDone","_open","onBeforeOpen","defaultLayouts","SideBySide","htmlHolder","bar","draggable","draggableCursor","_","Overlay","saveLeftTopAsData","addDraggable","siblings","popTimer","removeProperty","draggablePart","ResizeObserver","err","originLeft","originTop","onmouseup","button","finished","finally","fontSize","draggableContainer","mapCache","generateMaps","renderCallback","dumbymap","order","setContextMenu","menuCallback","originalCallback","oncontextmenu","menu","utils.focusNextMap","utils.focusDelay","utils.switchToNextLayout","util","utils.createDocLink","utils.createGeoLink","layoutObserver","oldLayout","oldValue","newLayout","flat","ele","HTMLElement","focusMap","attributes","attributeFilter","attributeOldValue","characterDataOldValue","afterMapRendered","mapElement","tabindex","observer","shouldBeInShowcase","placeholder","cloneNode","replaceChild","afterAnimation","mapIdList","assignMapId","mapId","replaceAll","elementsWithMapConfig","updateAttributeByStep","steps","passNum","total","final","animations","Promise","resolve","then","async","report","renderWith","defaultAliases","stepCallback","configText","configList","parseConfigsFromYaml","cachedRenderer","renderPromise","replaceChildren","offsetParent","offsetLeft","offsetTop","menuItem.toggleMapFocus","menuItem.renderResults","xyString","clipboard","writeText","alert","menuItem.getCoordinatesByPixels","restoreCamera","menuItem.restoreCamera","menuItem.toggleBlockFocus","menuItem.pickMapItem","preview","menuItem.pickBlockItem","menuItem.pickLayoutItem","actionOutsideMenu","seal","location","context","dumbyContainer","scrollLine","textArea","refLinkPattern","appendRefLink","refLinkString","lastLine","replaceRange","Infinity","defaultContent","editor","EasyMDE","initialValue","autosave","uniqueId","indentWithTabs","lineNumbers","promptURLs","uploadImage","spellChecker","toolbarButtonClassPrefix","status","shortcuts","debug","toggleUnorderedList","toggleOrderedList","toolbar","action","addMapRandomlyByPreset","JSON","stringify","undo","redo","drawLink","drawImage","toggleBold","toggleItalic","getRefLinks","updateDumbyMap","codemirror","getContentFromHash","hashValue","stateString","getStateFromHash","contentFromHash","cleanup","lineNumber","updateCMScrollLine","lineAtHeight","getScrollInfo","hasFocus","paragraphs","sourceLine","doc","size","coords","charCoords","scrollBy","addClassToCodeLines","getLineHandle","insideCodeBlock","addLineClass","removeLineClass","menuForEditor","menuItem.addRefLink","switchToEditingMode","menuItem.Item","mdContent","MarkdownItAnchor","MarkdownItFootnote","MarkdownItFrontMatter","MarkdownItInjectLinenumbers","coordinateRegex","coordinateValue","sep","dumby_block_open","dumby_block_close","markdown2HTML","onscroll","threshold","findLast","linenumber","change","to","origin","insideCodeblockForMap","repeat","numberOfFences","removed","completeForCodeBlock","getWrapperElement","onhashchange","append","rendererOptions","aliasesForMapOptions","defaultApply","fetch","rawText","catch","getTokenAt","overlay","codeBlock","getSuggestionFromMapOption","example","example_desc","menuItem.Suggestion","handleTypingInCodeBlock","suggestions","getSuggestions","addSuggestions","findMarks","clear","markInputIsInvalid","getDoc","markText","lineWithRenderer","currentLine","pl","nl","getLineWithRenderer","rendererSuggestions","suggestion","suggestionPattern","textPattern","validOptions","rendererUrl","import","rendererModule","currentAnchor","isKeyFinished","isValidKeyValue","keyTyped","optionTyped","suggestOptions","matchedOptions","getSuggestionsForOptions","matchedOption","valueTyped","isValidValue","isValid","record","widgetAnchor","addWidget","keyForSuggestions","currentSuggestion","nextSuggestion","previousSuggestion","previousSibling","focusSuggestion","shiftKey","onkeydown","altKey","ctrlKey","mutaions","yamlText","aliasesEntries","validEntries","inTaiwan","randomValue","random","onmousemove","parentWithSourceLine","NaN","lineEnd","texts","sibling","onmousedown","which","range","geoLink","deleteContents","insertNode","onMouseMove","resumeContent","newDumbymap","elementFromPoint","ondragstart"],"mappings":"mFAEA,MAAMA,EAAc,CAAE,EAuBtB,SAASC,SAAQC,EAAQC,GACA,iBAAZA,IACTA,EAAUF,SAAOG,cAGnB,MAAMC,EA1BR,SAASC,eAAgBH,GACvB,IAAIE,EAAQL,EAAYG,GACxB,GAAIE,EAAS,OAAOA,EAEpBA,EAAQL,EAAYG,GAAW,GAE/B,IAAK,IAAII,EAAI,EAAGA,EAAI,IAAKA,IAAK,CAC5B,MAAMC,EAAKC,OAAOC,aAAaH,GAC/BF,EAAMM,KAAKH,EACZ,CAED,IAAK,IAAID,EAAI,EAAGA,EAAIJ,EAAQS,OAAQL,IAAK,CACvC,MAAMC,EAAKL,EAAQU,WAAWN,GAC9BF,EAAMG,GAAM,KAAO,IAA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Qj8B,SACR8sB,GAASzgC,MAAM2oB,eAAe3sC,SAAQ3G,GAAOA,EAAIitB,MAAMo9B,eAAe,YACtE,MAAM4Q,cAAgB,IAAMvI,gBAAewI,IACzC,MAAM1c,EAAY4M,GAASzB,WAAWnL,UACtC0c,EAAYvR,WAAWkK,SAAS,EAAGrV,EAAU,IAGzCx+C,EAAM48B,SAASu+B,iBAAiB9vC,EAAEiN,QAASjN,EAAEkN,SAASmc,QAAQ,YAC9DmG,EAAYlC,GAAGmC,eACrB,IAAK96C,IAAQ66C,EAEX,YADAogB,gBAIF,MAAMtgB,EAAU9D,iBAAiB,CAAE3P,MAAO7b,EAAGrrB,MAAK82C,wCAC7C6D,GAKL6V,cAAc7X,GAAIgC,GACdE,IAAcF,EAAQ76B,IACxB64B,GAAGG,iBAAiB,IAAI+B,MAExBlC,GAAGG,iBAAiB,IAAI+B,MAAcF,EAAQ76B,SAR9Cm7C,eAUH,CAAA,EAGH7K,GAAegL,YAAc,KAAM","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,75,76,77,81,82,83,84,85,86,87,88]}
\ No newline at end of file
diff --git a/dist/renderers/leaflet.js b/dist/renderers/leaflet.js
new file mode 100644
index 0000000..8faf263
--- /dev/null
+++ b/dist/renderers/leaflet.js
@@ -0,0 +1,6 @@
+!function(c,d){"object"==typeof exports&&"undefined"!=typeof module?d(exports):"function"==typeof define&&define.amd?define(["exports"],d):d((c="undefined"!=typeof globalThis?globalThis:c||self).leaflet={})}(this,(function(c){"use strict";var d="undefined"!=typeof document?document.currentScript:null;function t(){return t=Object.assign?Object.assign.bind():function(c){for(var d=1;d<arguments.length;d++){var p=arguments[d];for(var g in p)({}).hasOwnProperty.call(p,g)&&(c[g]=p[g])}return c},t.apply(null,arguments)}function e(c,d=9){const p=Math.pow(10,d);return Math.round(c*p)/p}const i$1=(c,d)=>{const{x:p,y:g}=c,{x:f,y:_}=d,y=f-p,v=_-g;return Math.sqrt(v*v+y*y)};class o{constructor({name:c,callback:d,unregister:p,register:g}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=c,this.register=()=>{this.registered||(this.registered=!0,g(d))},this.unregister=()=>{this.register&&(this.registered=!1,p(d))},this.callback=d}}class r{constructor(c){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof c.minPixelDragDistance?c.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof c.minPixelDragDistanceSelecting?c.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof c.minPixelDragDistanceDrawing?c.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof c.coordinatePrecision?c.coordinatePrecision:9}getButton(c){return-1===c.button?"neither":0===c.button?"left":1===c.button?"middle":2===c.button?"right":"neither"}getMapElementXYPosition(c){const d=this.getMapEventElement(),{left:p,top:g}=d.getBoundingClientRect();return{containerX:c.clientX-p,containerY:c.clientY-g}}getDrawEventFromEvent(c){const d=this.getLngLatFromEvent(c);if(!d)return null;const{lng:p,lat:g}=d,{containerX:f,containerY:_}=this.getMapElementXYPosition(c),y=this.getButton(c),v=Array.from(this._heldKeys);return{lng:e(p,this._coordinatePrecision),lat:e(g,this._coordinatePrecision),containerX:f,containerY:_,button:y,heldKeys:v}}register(c){this._currentModeCallbacks=c,this._listeners=this.getAdapterListeners(),this._listeners.forEach((c=>{c.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;const d=this.getDrawEventFromEvent(c);d&&(this._dragState="pre-dragging",this._lastDrawEvent=d)},register:c=>{this.getMapEventElement().addEventListener("pointerdown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerdown",c)}}),new o({name:"pointermove",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;c.preventDefault();const d=this.getDrawEventFromEvent(c);if(d)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(d),this._lastDrawEvent=d;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const c={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},p={x:d.containerX,y:d.containerY},g=this._currentModeCallbacks.getState(),f=i$1(c,p);let _=!1;if(_="drawing"===g?f<this._minPixelDragDistanceDrawing:"selecting"===g?f<this._minPixelDragDistanceSelecting:f<this._minPixelDragDistance,_)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(d,(c=>{this.setDraggability.bind(this)(c)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(d,(c=>{this.setDraggability.bind(this)(c)}))},register:c=>{this.getMapEventElement().addEventListener("pointermove",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointermove",c)}}),new o({name:"contextmenu",callback:c=>{this._currentModeCallbacks&&c.preventDefault()},register:c=>{this.getMapEventElement().addEventListener("contextmenu",c)},unregister:c=>{this.getMapEventElement().removeEventListener("contextmenu",c)}}),new o({name:"pointerup",callback:c=>{if(!this._currentModeCallbacks)return;if(c.target!==this.getMapEventElement())return;if(!c.isPrimary)return;const d=this.getDrawEventFromEvent(c);d&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(d,(c=>{this.setDraggability.bind(this)(c)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(d),this._dragState="not-dragging",this.setDraggability(!0))},register:c=>{this.getMapEventElement().addEventListener("pointerup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerup",c)}}),new o({name:"keyup",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.delete(c.key),this._currentModeCallbacks.onKeyUp({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keyup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keyup",c)}}),new o({name:"keydown",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.add(c.key),this._currentModeCallbacks.onKeyDown({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keydown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keydown",c)}})]}unregister(){this._listeners.forEach((c=>{c.unregister()})),this.clear()}}class n extends r{constructor(c){super(c),this._lib=void 0,this._map=void 0,this._panes={},this._container=void 0,this._layers={},this._lib=c.lib,this._map=c.map,this._container=this._map.getContainer()}createPaneStyleSheet(c,d){const p=document.createElement("style");return p.innerHTML=`.leaflet-${c}-pane {z-index: ${d+600}`,document.getElementsByTagName("head")[0].appendChild(p),this._map.createPane(c),p}clearPanes(){Object.values(this._panes).forEach((c=>{c&&c.remove()})),this._panes={}}clearLayers(){Object.values(this._layers).forEach((c=>{this._map.removeLayer(c)})),this._layers={}}styleGeoJSONLayer(c){return{pointToLayer:(d,p)=>{if(!d.properties)throw new Error("Feature has no properties");if("string"!=typeof d.properties.mode)throw new Error("Feature mode is not a string");const g=(0,c[d.properties.mode])(d),f=String(g.zIndex);return this._panes[f]||(this._panes[f]=this.createPaneStyleSheet(f,g.zIndex)),this._lib.circleMarker(p,{radius:g.pointWidth,stroke:g.pointOutlineWidth||!1,color:g.pointOutlineColor,weight:g.pointOutlineWidth,fillOpacity:.8,fillColor:g.pointColor,pane:f,interactive:!1})},style:d=>{if(!d||!d.properties)return{};const p=d,g=(0,c[p.properties.mode])(p),f=String(g.zIndex);return this._panes[f]||(this._panes[f]=this.createPaneStyleSheet(f,g.zIndex)),"LineString"===p.geometry.type?{interactive:!1,color:g.lineStringColor,weight:g.lineStringWidth,pane:f}:"Polygon"===p.geometry.type?{interactive:!1,fillOpacity:g.polygonFillOpacity,fillColor:g.polygonFillColor,weight:g.polygonOutlineWidth,stroke:!0,color:g.polygonFillColor,pane:f}:{}}}}getLngLatFromEvent(c){const{containerX:d,containerY:p}=this.getMapElementXYPosition(c),g=this._map.containerPointToLatLng({x:d,y:p});return null===g.lng||isNaN(g.lng)||null===g.lat||isNaN(g.lat)?null:{lng:g.lng,lat:g.lat}}getMapEventElement(){return this._container}setDraggability(c){c?this._map.dragging.enable():this._map.dragging.disable()}project(c,d){const{x:p,y:g}=this._map.latLngToContainerPoint({lng:c,lat:d});return{x:p,y:g}}unproject(c,d){const{lng:p,lat:g}=this._map.containerPointToLatLng({x:c,y:d});return{lng:p,lat:g}}setCursor(c){"unset"===c?this.getMapEventElement().style.removeProperty("cursor"):this.getMapEventElement().style.cursor=c}setDoubleClickToZoom(c){c?this._map.doubleClickZoom.enable():this._map.doubleClickZoom.disable()}render(c,d){c.created.forEach((c=>{this._layers[c.id]=this._lib.geoJSON(c,this.styleGeoJSONLayer(d)),this._map.addLayer(this._layers[c.id])})),c.deletedIds.forEach((c=>{this._map.removeLayer(this._layers[c])})),c.updated.forEach((c=>{this._map.removeLayer(this._layers[c.id]),this._layers[c.id]=this._lib.geoJSON(c,this.styleGeoJSONLayer(d)),this._map.addLayer(this._layers[c.id])}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers(),this.clearPanes())}register(c){super.register(c),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}}const p={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var g=class{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||p[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const f=6378137,_=Math.PI*f,y=[-_,-_,_,_],v=[-180,-85,180,85],x=f*Math.log(Math.tan(Math.PI/2));class m extends g{constructor(c){super({code:c,units:"m",extent:y,global:!0,worldExtent:v,getPointResolution:function(c,d){return c/Math.cosh(d[1]/f)}})}}const C=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],M=[-180,-90,180,90],E=6378137*Math.PI/180;class P extends g{constructor(c,d){super({code:c,units:"degrees",extent:M,axisOrientation:d,global:!0,metersPerUnit:E,worldExtent:M})}}const T=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let k={};function b(c,d,p){const g=c.getCode(),f=d.getCode();g in k||(k[g]={}),k[g][f]=p}function S(c,d){if(void 0!==d)for(let p=0,g=c.length;p<g;++p)d[p]=c[p];else d=c.slice();return d}function w(c){c.getCode(),b(c,c,S)}function F(c){!function(c){c.forEach(w)}(c),c.forEach((function(d){c.forEach((function(c){d!==c&&b(d,c,S)}))}))}var O,I,D,B;F(C),F(T),O=C,I=function(c,d,p){const g=c.length;p=p>1?p:2,void 0===d&&(d=p>2?c.slice():new Array(g));for(let y=0;y<g;y+=p){d[y]=_*c[y]/180;let p=f*Math.log(Math.tan(Math.PI*(+c[y+1]+90)/360));p>x?p=x:p<-x&&(p=-x),d[y+1]=p}return d},D=function(c,d,p){const g=c.length;p=p>1?p:2,void 0===d&&(d=p>2?c.slice():new Array(g));for(let y=0;y<g;y+=p)d[y]=180*c[y]/_,d[y+1]=360*Math.atan(Math.exp(c[y+1]/f))/Math.PI-90;return d},T.forEach((function(c){O.forEach((function(d){b(c,d,I),b(d,c,D)}))})),function(c){c.Commit="commit",c.Provisional="provisional",c.Finish="finish"}(B||(B={}));const j="selected",N="midPoint",Z="closingPoint";function A(c){return Boolean(c&&"object"==typeof c&&null!==c&&!Array.isArray(c))}function R(c){if(!function(c){return"number"==typeof c&&!isNaN(new Date(c).valueOf())}(c))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var W;!function(c){c.Drawing="drawing",c.Select="select",c.Static="static",c.Render="render"}(W||(W={}));class X{get state(){return this._state}set state(c){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(c){if("object"!=typeof c)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=c}registerBehaviors(c){}constructor(c){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=W.Drawing,this.mode="base",this._state="unregistered",this._styles=c&&c.styles?t({},c.styles):{},this.pointerDistance=c&&c.pointerDistance||40,this.validate=c&&c.validation,this.projection=c&&c.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(c){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=c.store,this.store.registerOnChange(c.onChange),this.setDoubleClickToZoom=c.setDoubleClickToZoom,this.project=c.project,this.unproject=c.unproject,this.onSelect=c.onSelect,this.onDeselect=c.onDeselect,this.setCursor=c.setCursor,this.onStyleChange=c.onChange,this.onFinish=c.onFinish,this.coordinatePrecision=c.coordinatePrecision,this.registerBehaviors({mode:c.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:c.coordinatePrecision,projection:this.projection})}validateFeature(c){if("unregistered"===this._state)throw new Error("Mode must be registered");const d=function(c,d){let p;if(A(c))if(null==c.id)p="Feature has no id";else if("string"!=typeof c.id&&"number"!=typeof c.id)p="Feature must be string or number as per GeoJSON spec";else if(d(c.id))if(A(c.geometry))if(A(c.properties))if("string"==typeof c.geometry.type&&["Polygon","LineString","Point"].includes(c.geometry.type))if(Array.isArray(c.geometry.coordinates)){if(!c.properties.mode||"string"!=typeof c.properties.mode)throw new Error("Feature does not have a valid mode property")}else p="Feature coordinates is not an array";else p="Feature is not Point, LineString or Polygon";else p="Feature has no properties";else p="Feature has no geometry";else p="Feature must match the id strategy (default is UUID4)";else p="Feature is not object";if(p)throw new Error(p);return!0}(c,this.store.idStrategy.isValidId);return this.validate?this.validate(c,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:B.Provisional}):d}onFinish(c,d){}onDeselect(c){}onSelect(c){}onKeyDown(c){}onKeyUp(c){}onMouseMove(c){}onClick(c){}onDragStart(c,d){}onDrag(c,d){}onDragEnd(c,d){}getHexColorStylingValue(c,d,p){return this.getStylingValue(c,d,p)}getNumericStylingValue(c,d,p){return this.getStylingValue(c,d,p)}getStylingValue(c,d,p){return void 0===c?d:"function"==typeof c?c(p):c}}class U extends X{constructor(...c){super(...c),this.type=W.Select}}function Y(c,d){const i=c=>c*Math.PI/180,p=i(c[1]),g=i(c[0]),f=i(d[1]),_=f-p,y=i(d[0])-g,v=Math.sin(_/2)*Math.sin(_/2)+Math.cos(p)*Math.cos(f)*Math.sin(y/2)*Math.sin(y/2);return 2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v))*6371e3/1e3}const V=6371008.8;function z(c){return c%360*Math.PI/180}function H(c){return c/(V/1e3)}function $(c){return c%(2*Math.PI)*180/Math.PI}const G=57.29577951308232,q=.017453292519943295,K=6378137,Q=(c,d)=>({x:0===c?0:c*q*K,y:0===d?0:Math.log(Math.tan(Math.PI/4+d*q/2))*K}),tt=(c,d)=>({lng:0===c?0:G*(c/K),lat:0===d?0:(2*Math.atan(Math.exp(d/K))-Math.PI/2)*G});function et(c,d,p){const g=z(c[0]),f=z(c[1]),_=z(p),y=H(d),v=Math.asin(Math.sin(f)*Math.cos(y)+Math.cos(f)*Math.sin(y)*Math.cos(_));return[$(g+Math.atan2(Math.sin(_)*Math.sin(y)*Math.cos(f),Math.cos(y)-Math.sin(f)*Math.sin(v))),$(v)]}function it(c){const{center:d,radiusKilometers:p,coordinatePrecision:g}=c,f=c.steps?c.steps:64,_=[];for(let c=0;c<f;c++){const y=et(d,p,-360*c/f);_.push([e(y[0],g),e(y[1],g)])}return _.push(_[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[_]},properties:{}}}function ot(c){const d={epsilon:0};let p;if("Polygon"===c.geometry.type)p=c.geometry.coordinates;else{if("LineString"!==c.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");p=[c.geometry.coordinates]}const g=[];for(let c=0;c<p.length;c++)for(let d=0;d<p[c].length-1;d++)for(let g=0;g<p.length;g++)for(let f=0;f<p[g].length-1;f++)s(c,d,g,f);return g.length>0;function r(c){return c<0-d.epsilon||c>1+d.epsilon}function s(c,d,f,_){const y=p[c][d],v=p[c][d+1],x=p[f][_],C=p[f][_+1],L=function(c,d,p,g){if(rt(c,p)||rt(c,g)||rt(d,p)||rt(g,p))return null;const f=c[0],_=c[1],y=d[0],v=d[1],x=p[0],C=p[1],L=g[0],M=g[1],E=(f-y)*(C-M)-(_-v)*(x-L);return 0===E?null:[((f*v-_*y)*(x-L)-(f-y)*(x*M-C*L))/E,((f*v-_*y)*(C-M)-(_-v)*(x*M-C*L))/E]}(y,v,x,C);if(null===L)return;let M,E;M=v[0]!==y[0]?(L[0]-y[0])/(v[0]-y[0]):(L[1]-y[1])/(v[1]-y[1]),E=C[0]!==x[0]?(L[0]-x[0])/(C[0]-x[0]):(L[1]-x[1])/(C[1]-x[1]),r(M)||r(E)||(L.toString(),g.push(L))}}function rt(c,d){return c[0]===d[0]&&c[1]===d[1]}function st(c,d){return 2===c.length&&"number"==typeof c[0]&&"number"==typeof c[1]&&1/0!==c[0]&&1/0!==c[1]&&(g=c[0])>=-180&&g<=180&&(p=c[1])>=-90&&p<=90&&nt(c[0])<=d&&nt(c[1])<=d;var p,g}function nt(c){let d=1,p=0;for(;Math.round(c*d)/d!==c;)d*=10,p++;return p}function at(c,d){return"Polygon"===c.geometry.type&&1===c.geometry.coordinates.length&&c.geometry.coordinates[0].length>=4&&c.geometry.coordinates[0].every((c=>st(c,d)))&&(p=c.geometry.coordinates[0][0])[0]===(g=c.geometry.coordinates[0][c.geometry.coordinates[0].length-1])[0]&&p[1]===g[1];var p,g}function lt(c,d){return at(c,d)&&!ot(c)}class ht extends X{constructor(c){var d;super(c),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const p={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},p,c.cursors):p,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}this.startingRadiusKilometers=null!=(d=null==c?void 0:c.startingRadiusKilometers)?d:1e-5,this.validate=null==c?void 0:c.validation}close(){if(void 0===this.currentCircleId)return;const c=this.currentCircleId;if(this.validate&&c){const d=this.store.getGeometryCopy(c);if(!this.validate({type:"Feature",id:c,geometry:d,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:B.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const d=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[p]=this.store.create([{geometry:d.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=p,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(c),this.close()}onMouseMove(c){this.updateCircle(c)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c])}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d):d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}updateCircle(c){if(1===this.clickCount&&this.center&&this.currentCircleId){const d=Y(this.center,[c.lng,c.lat]);let p;if("web-mercator"===this.projection){const g=function(c,d){const p=1e3*Y(c,d);if(0===p)return 1;const{x:g,y:f}=Q(c[0],c[1]),{x:_,y:y}=Q(d[0],d[1]);return Math.sqrt(Math.pow(_-g,2)+Math.pow(y-f,2))/p}(this.center,[c.lng,c.lat]);p=function(c){const{center:d,radiusKilometers:p,coordinatePrecision:g}=c,f=c.steps?c.steps:64,_=1e3*p,[y,v]=d,{x:x,y:C}=Q(y,v),L=[];for(let c=0;c<f;c++){const d=360*c/f*Math.PI/180,p=_*Math.cos(d),y=_*Math.sin(d),[v,M]=[x+p,C+y],{lng:E,lat:T}=tt(v,M);L.push([e(E,g),e(T,g)])}return L.push(L[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[L]},properties:{}}}({center:this.center,radiusKilometers:d*g,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");p=it({center:this.center,radiusKilometers:d,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:p.geometry,properties:{radiusKilometers:d}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:B.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:p.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:d}])}}}class dt{constructor({store:c,mode:d,project:p,unproject:g,pointerDistance:f,coordinatePrecision:_,projection:y}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=c,this.mode=d,this.project=p,this.unproject=g,this.pointerDistance=f,this.coordinatePrecision=_,this.projection=y}}function ut({unproject:c,point:d,pointerDistance:p}){const g=p/2,{x:f,y:_}=d;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[c(f-g,_-g),c(f+g,_-g),c(f+g,_+g),c(f-g,_+g),c(f-g,_-g)].map((c=>[c.lng,c.lat]))]}}}class gt extends dt{constructor(c){super(c)}create(c){const{containerX:d,containerY:p}=c;return ut({unproject:this.unproject,point:{x:d,y:p},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(c){super(c)}measure(c,d){const{x:p,y:g}=this.project(d[0],d[1]);return i$1({x:p,y:g},{x:c.containerX,y:c.containerY})}}class yt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=c=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode))),this.getSnappableCoordinate=(c,d)=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode&&c.id!==d))),this.config=c,this.pixelDistance=d,this.clickBoundingBox=p}getSnappable(c,d){const p=this.clickBoundingBox.create(c),g=this.store.search(p,d),f={coord:void 0,minDist:1/0};return g.forEach((d=>{let p;if("Polygon"===d.geometry.type)p=d.geometry.coordinates[0];else{if("LineString"!==d.geometry.type)return;p=d.geometry.coordinates}p.forEach((d=>{const p=this.pixelDistance.measure(c,d);p<f.minDist&&p<this.pointerDistance&&(f.coord=d,f.minDist=p)}))})),f.coord}}function mt(c,d,p){const g=z(c[0]),f=z(c[1]),_=z(p),y=H(d),v=Math.asin(Math.sin(f)*Math.cos(y)+Math.cos(f)*Math.sin(y)*Math.cos(_));return[$(g+Math.atan2(Math.sin(_)*Math.sin(y)*Math.cos(f),Math.cos(y)-Math.sin(f)*Math.sin(v))),$(v)]}function Ct(c,d){const p=z(c[0]),g=z(d[0]),f=z(c[1]),_=z(d[1]),y=Math.sin(g-p)*Math.cos(_),v=Math.cos(f)*Math.sin(_)-Math.sin(f)*Math.cos(_)*Math.cos(g-p);return $(Math.atan2(y,v))}function Pt(c,d,p){const g=[],f=c.length;let _,y,v,x=0;for(let f=0;f<c.length&&!(d>=x&&f===c.length-1);f++){if(x>d&&0===g.length){if(_=d-x,!_)return g.push(c[f]),g;y=Ct(c[f],c[f-1])-180,v=mt(c[f],_,y),g.push(v)}if(x>=p)return _=p-x,_?(y=Ct(c[f],c[f-1])-180,v=mt(c[f],_,y),g.push(v),g):(g.push(c[f]),g);if(x>=d&&g.push(c[f]),f===c.length-1)return g;x+=Y(c[f],c[f+1])}if(x<d&&c.length===f)throw new Error("Start position is beyond line");const C=c[c.length-1];return[C,C]}function _t(c){return c*(Math.PI/180)}function xt(c){return c*(180/Math.PI)}class Mt extends dt{constructor(c){super(c),this.config=void 0,this.config=c}generateInsertionCoordinates(c,d,p){const g=[c,d];let f=0;for(let c=0;c<g.length-1;c++)f+=Y(g[0],g[1]);if(f<=p)return g;let _=f/p-1;Number.isInteger(_)||(_=Math.floor(_)+1);const y=[];for(let c=0;c<_;c++){const d=Pt(g,p*c,p*(c+1));y.push(d)}const v=[];for(let c=0;c<y.length;c++)v.push(y[c][1]);return this.limitCoordinates(v)}generateInsertionGeodesicCoordinates(c,d,p){const g=Y(c,d),f=function(c,d,p){const g=[],f=_t(c[1]),_=_t(c[0]),y=_t(d[1]),v=_t(d[0]);p+=1;const x=2*Math.asin(Math.sqrt(Math.sin((y-f)/2)**2+Math.cos(f)*Math.cos(y)*Math.sin((v-_)/2)**2));if(0===x||isNaN(x))return g;for(let c=0;c<=p;c++){const d=c/p,C=Math.sin((1-d)*x)/Math.sin(x),L=Math.sin(d*x)/Math.sin(x),M=C*Math.cos(f)*Math.cos(_)+L*Math.cos(y)*Math.cos(v),E=C*Math.cos(f)*Math.sin(_)+L*Math.cos(y)*Math.sin(v),T=C*Math.sin(f)+L*Math.sin(y);if(isNaN(M)||isNaN(E)||isNaN(T))continue;const k=Math.atan2(T,Math.sqrt(M**2+E**2)),O=Math.atan2(E,M);isNaN(k)||isNaN(O)||g.push([xt(O),xt(k)])}return g.slice(1,-1)}(c,d,Math.floor(g/p));return this.limitCoordinates(f)}limitCoordinates(c){return c.map((c=>[e(c[0],this.config.coordinatePrecision),e(c[1],this.config.coordinatePrecision)]))}}function bt(c,d){return c[0]===d[0]&&c[1]===d[1]}class St extends X{constructor(c){super(c),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const d={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}this.validate=null==c?void 0:c.validation,this.insertCoordinates=null==c?void 0:c.insertCoordinates}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId);c.coordinates.pop(),this.updateGeometries([...c.coordinates],void 0,B.Commit);const d=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(d,{mode:this.mode,action:"draw"})}updateGeometries(c,d,p){if(!this.currentId)return;const g={type:"LineString",coordinates:c};if(this.validate&&!this.validate({type:"Feature",geometry:g},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:p}))return;const f=[{id:this.currentId,geometry:g}];this.closingPointId&&d&&f.push({id:this.closingPointId,geometry:{type:"Point",coordinates:d}}),"commit"===p&&(this.lastCommitedCoordinates=g.coordinates),this.store.updateGeometry(f)}generateInsertCoordinates(c,d){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const p=Y(c,d)/(this.insertCoordinates.value+1);let g=[];return"globe"===this.projection?g=this.insertPoint.generateInsertionGeodesicCoordinates(c,d,p):"web-mercator"===this.projection&&(g=this.insertPoint.generateInsertionCoordinates(c,d,p)),g}createLine(c){const[d]=this.store.create([{geometry:{type:"LineString",coordinates:[c,c]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[c,c],this.currentId=d,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(c){if(!this.currentId)return;const d=this.store.getGeometryCopy(this.currentId).coordinates,[p]=this.store.create([{geometry:{type:"Point",coordinates:[...c]},properties:{mode:this.mode}}]);this.closingPointId=p,this.setCursor(this.cursors.close);const g=[...d,c];this.updateGeometries(g,void 0,B.Commit),this.currentCoordinate++}updateToLine(c,d){if(!this.currentId)return;const p=this.store.getGeometryCopy(this.currentId).coordinates,[g,f]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:p[p.length-2],{x:_,y:y}=this.project(g,f);if(i$1({x:_,y:y},{x:d.x,y:d.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const v=[...p,c];this.updateGeometries(v,p[p.length-1],B.Commit),this.currentCoordinate++}registerBehaviors(c){this.snapping=new yt(c,new pt(c),new gt(c)),this.insertPoint=new Mt(c)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const d=this.store.getGeometryCopy(this.currentId).coordinates;d.pop();const p=this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];if(this.closingPointId){const[p,g]=d[d.length-1],{x:f,y:_}=this.project(p,g);i$1({x:f,y:_},{x:c.containerX,y:c.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let g=[...d,p];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const c=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],d=p;if(!bt(c,d)){const f=this.generateInsertCoordinates(c,d);g=[...this.lastCommitedCoordinates.slice(0,-1),...f,p]}}this.updateGeometries(g,void 0,B.Provisional)}onClick(c){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1;const d=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];0===this.currentCoordinate?this.createLine(d):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(d):this.currentId&&this.updateToLine(d,{x:c.containerX,y:c.containerY})}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel&&this.cleanUp(),c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"LineString"===c.geometry.type&&c.properties.mode===this.mode?(d.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,d.lineStringColor,c),d.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,d.lineStringWidth,c),d.zIndex=10,d):"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode?(d.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,d.pointColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,d.pointWidth,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),d.zIndex=40,d):d}validateFeature(c){return!!super.validateFeature(c)&&"LineString"===c.geometry.type&&c.properties.mode===this.mode&&c.geometry.coordinates.length>=2}}function Et(c,d){return"Point"===c.geometry.type&&st(c.geometry.coordinates,d)}class wt extends X{constructor(c){super(c),this.mode="point",this.cursors=void 0;const d={create:"crosshair"};this.cursors=c&&c.cursors?t({},d,c.cursors):d}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(!this.store)throw new Error("Mode must be registered first");const d={type:"Point",coordinates:[c.lng,c.lat]},p={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:d,properties:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:B.Finish}))return;const[g]=this.store.create([{geometry:d,properties:p}]);this.onFinish(g,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode&&(d.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.pointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,c),d.zIndex=30),d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&Et(c,this.coordinatePrecision)}}class It extends dt{constructor(c,d){super(c),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=c,this.pixelDistance=d}get ids(){return this._startEndPoints.concat()}set ids(c){}create(c,d){if(this.ids.length)throw new Error("Opening and closing points already created");if(c.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:c[0]},properties:{mode:d,[Z]:!0}},{geometry:{type:"Point",coordinates:c[c.length-2]},properties:{mode:d,[Z]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(c){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:c[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:c[c.length-3]}}])}isClosingPoint(c){const d=this.store.getGeometryCopy(this.ids[0]),p=this.store.getGeometryCopy(this.ids[1]),g=this.pixelDistance.measure(c,d.coordinates),f=this.pixelDistance.measure(c,p.coordinates);return{isClosing:g<this.pointerDistance,isPreviousClosing:f<this.pointerDistance}}}class Ft extends X{constructor(c){super(c),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const d={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId).coordinates[0];if(c.length<5)return;if(!this.updatePolygonGeometry([...c.slice(0,-2),c[0]],B.Finish))return;const d=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(d,{mode:this.mode,action:"draw"})}registerBehaviors(c){this.pixelDistance=new pt(c),this.snapping=new yt(c,this.pixelDistance,new gt(c)),this.closingPoints=new It(c,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,p=this.store.getGeometryCopy(this.currentId).coordinates[0];let g;if(d&&(c.lng=d[0],c.lat=d[1]),1===this.currentCoordinate){const d=1/Math.pow(10,this.coordinatePrecision-1),f=Math.max(1e-6,d);g=[p[0],[c.lng,c.lat],[c.lng,c.lat-f],p[0]]}else if(2===this.currentCoordinate)g=[p[0],p[1],[c.lng,c.lat],p[0]];else{const{isClosing:d,isPreviousClosing:f}=this.closingPoints.isClosingPoint(c);f||d?(this.setCursor(this.cursors.close),g=[...p.slice(0,-2),p[0],p[0]]):g=[...p.slice(0,-2),[c.lng,c.lat],p[0]]}this.updatePolygonGeometry(g,B.Provisional)}updatePolygonGeometry(c,d){if(!this.currentId)return!1;const p={type:"Polygon",coordinates:[c]};return!(this.validate&&!this.validate({type:"Feature",geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d})||(this.store.updateGeometry([{id:this.currentId,geometry:p}]),0))}onClick(c){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1,0===this.currentCoordinate){const d=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(c):void 0;d&&(c.lng=d[0],c.lat=d[1]);const[p]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentId=p,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;d&&(c.lng=d[0],c.lat=d[1]);const p=this.store.getGeometryCopy(this.currentId);if(bt([c.lng,c.lat],p.coordinates[0][0]))return;if(!this.updatePolygonGeometry([p.coordinates[0][0],[c.lng,c.lat],[c.lng,c.lat],p.coordinates[0][0]],B.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;d&&(c.lng=d[0],c.lat=d[1]);const p=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([c.lng,c.lat],p[1]))return;if(!this.updatePolygonGeometry([p[0],p[1],[c.lng,c.lat],[c.lng,c.lat],p[0]],B.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(p,"polygon"),this.currentCoordinate++}else if(this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,p=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:g,isPreviousClosing:f}=this.closingPoints.isClosingPoint(c);if(f||g)this.close();else{if(d&&(c.lng=d[0],c.lat=d[1]),bt([c.lng,c.lat],p[this.currentCoordinate-1]))return;const g=function(c=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:c},properties:{}}}([[...p.slice(0,-1),[c.lng,c.lat],p[0]]]);if(!this.updatePolygonGeometry(g.geometry.coordinates[0],B.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(g.geometry.coordinates[0])}}}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const c=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode){if("Polygon"===c.geometry.type)return d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d;if("Point"===c.geometry.type)return d.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),d.zIndex=30,d}return d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&at(c,this.coordinatePrecision)}}class Dt extends X{constructor(c){super(c),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const d={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}}updateRectangle(c,d){if(1===this.clickCount&&this.center&&this.currentRectangleId){const p=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],g={type:"Polygon",coordinates:[[p,[c.lng,p[1]],[c.lng,c.lat],[p[0],c.lat],p]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:g},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:g}])}}close(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),c&&this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const[d]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=d,this.clickCount++,this.setDrawing()}else this.updateRectangle(c,B.Finish),this.close()}onMouseMove(c){this.updateRectangle(c,B.Provisional)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==c&&this.store.delete([c])}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d):d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}}class kt extends X{constructor(c){super({styles:c.styles}),this.type=W.Render,this.mode="render",this.mode=c.modeName}registerBehaviors(c){this.mode=c.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(c){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",c),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,c),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",c),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,c),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",c),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,c),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",c),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,c),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,c),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",c),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,c)}}validateFeature(c){return super.validateFeature(c)&&(Et(c,this.coordinatePrecision)||at(c,this.coordinatePrecision)||function(c,d){return"LineString"===c.geometry.type&&c.geometry.coordinates.length>=2&&c.geometry.coordinates.every((c=>st(c,d)))}(c,this.coordinatePrecision))}}function Ot(c,d){const p=c,g=d,f=z(p[1]),_=z(g[1]);let y=z(g[0]-p[0]);y>Math.PI&&(y-=2*Math.PI),y<-Math.PI&&(y+=2*Math.PI);const v=Math.log(Math.tan(_/2+Math.PI/4)/Math.tan(f/2+Math.PI/4)),x=($(Math.atan2(y,v))+360)%360;return x>180?-(360-x):x}function jt(c,d,p){let g=d;d<0&&(g=-Math.abs(g));const f=g/V,_=c[0]*Math.PI/180,y=z(c[1]),v=z(p),x=f*Math.cos(v);let C=y+x;Math.abs(C)>Math.PI/2&&(C=C>0?Math.PI-C:-Math.PI-C);const L=Math.log(Math.tan(C/2+Math.PI/4)/Math.tan(y/2+Math.PI/4)),M=Math.abs(L)>1e-11?x/L:Math.cos(y),E=[(180*(_+f*Math.sin(v)/M)/Math.PI+540)%360-180,180*C/Math.PI];return E[0]+=E[0]-c[0]>180?-360:c[0]-E[0]>180?360:0,E}function Lt(c,d,p,g,f){const _=g(c[0],c[1]),y=g(d[0],d[1]),{lng:v,lat:x}=f((_.x+y.x)/2,(_.y+y.y)/2);return[e(v,p),e(x,p)]}function Wt(c,d,p){const g=jt(c,1e3*Y(c,d)/2,Ot(c,d));return[e(g[0],p),e(g[1],p)]}function Bt({featureCoords:c,precision:d,unproject:p,project:g,projection:f}){const _=[];for(let y=0;y<c.length-1;y++){let v;if("web-mercator"===f)v=Lt(c[y],c[y+1],d,g,p);else{if("globe"!==f)throw new Error("Invalid projection");v=Wt(c[y],c[y+1],d)}_.push(v)}return _}class Gt extends dt{constructor(c,d){super(c),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=c,this.selectionPointBehavior=d}get ids(){return this._midPoints.concat()}set ids(c){}insert(c,d){const p=this.store.getGeometryCopy(c),{midPointFeatureId:g,midPointSegment:f}=this.store.getPropertiesCopy(c),_=this.store.getGeometryCopy(g),y="Polygon"===_.type?_.coordinates[0]:_.coordinates;y.splice(f+1,0,p.coordinates),_.coordinates="Polygon"===_.type?[y]:y,this.store.updateGeometry([{id:g,geometry:_}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(y,g,d),this.selectionPointBehavior.create(y,_.type,g)}create(c,d,p){if(!this.store.has(d))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(c,d,p,g,f,_){return Bt({featureCoords:c,precision:p,project:g,unproject:f,projection:_}).map(((c,p)=>({geometry:{type:"Point",coordinates:c},properties:d(p)})))}(c,(c=>({mode:this.mode,[N]:!0,midPointSegment:c,midPointFeatureId:d})),p,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(c){if(0!==this._midPoints.length)return Bt({featureCoords:c,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((c,d)=>({id:this._midPoints[d],geometry:{type:"Point",coordinates:c}})))}}class Nt extends dt{constructor(c){super(c),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(c){}create(c,d,p){this._selectionPoints=this.store.create(function(c,d,p){const g=[],f="Polygon"===d?c.length-1:c.length;for(let d=0;d<f;d++)g.push({geometry:{type:"Point",coordinates:c[d]},properties:p(d)});return g}(c,d,(c=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:p,index:c}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(c){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((d,p)=>({id:d,geometry:{type:"Point",coordinates:c[p]}})))}getOneUpdated(c,d){if(void 0!==this._selectionPoints[c])return{id:this._selectionPoints[c],geometry:{type:"Point",coordinates:d}}}}function Vt(c,d){let p=!1;for(let y=0,v=d.length;y<v;y++){const v=d[y];for(let d=0,y=v.length,x=y-1;d<y;x=d++)(f=v[d])[1]>(g=c)[1]!=(_=v[x])[1]>g[1]&&g[0]<(_[0]-f[0])*(g[1]-f[1])/(_[1]-f[1])+f[0]&&(p=!p)}var g,f,_;return p}const At=(c,d,p)=>{const o=c=>c*c,r=(c,d)=>o(c.x-d.x)+o(c.y-d.y);return Math.sqrt(((c,d,p)=>{const g=r(d,p);if(0===g)return r(c,d);let f=((c.x-d.x)*(p.x-d.x)+(c.y-d.y)*(p.y-d.y))/g;return f=Math.max(0,Math.min(1,f)),r(c,{x:d.x+f*(p.x-d.x),y:d.y+f*(p.y-d.y)})})(c,d,p))};class Rt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=c,this.createClickBoundingBox=d,this.pixelDistance=p}find(c,d){let p,g,f,_,y=1/0,v=1/0,x=1/0;const C=this.createClickBoundingBox.create(c),L=this.store.search(C);for(let C=0;C<L.length;C++){const M=L[C],E=M.geometry;if("Point"===E.type){if(M.properties.selectionPoint||!d&&M.properties[N])continue;const g=this.pixelDistance.measure(c,E.coordinates);M.properties[N]&&g<this.pointerDistance&&g<x?(x=g,f=M):!M.properties[N]&&g<this.pointerDistance&&g<y&&(y=g,p=M)}else if("LineString"===E.type){if(p)continue;for(let d=0;d<E.coordinates.length-1;d++){const p=E.coordinates[d],f=E.coordinates[d+1],_=At({x:c.containerX,y:c.containerY},this.project(p[0],p[1]),this.project(f[0],f[1]));_<this.pointerDistance&&_<v&&(v=_,g=M)}}else if("Polygon"===E.type){if(p||g)continue;Vt([c.lng,c.lat],E.coordinates)&&(_=M)}}return{clickedFeature:p||g||_,clickedMidPoint:f}}}class Tt extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=c,this.featuresAtMouseEvent=d,this.selectionPoints=p,this.midPoints=g}startDragging(c,d){this.draggedFeatureId=d,this.dragPosition=[c.lng,c.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(c,d){const{clickedFeature:p}=this.featuresAtMouseEvent.find(c,!0);return!(!p||p.id!==d)}drag(c,d){if(!this.draggedFeatureId)return;const p=this.store.getGeometryCopy(this.draggedFeatureId),g=[c.lng,c.lat];if("Polygon"===p.type||"LineString"===p.type){let f,_;if("Polygon"===p.type?(f=p.coordinates[0],_=f.length-1):(f=p.coordinates,_=f.length),!this.dragPosition)return!1;for(let c=0;c<_;c++){const d=f[c],p=[this.dragPosition[0]-g[0],this.dragPosition[1]-g[1]],_=e(d[0]-p[0],this.config.coordinatePrecision),y=e(d[1]-p[1],this.config.coordinatePrecision);if(_>180||_<-180||y>90||y<-90)return!1;f[c]=[_,y]}"Polygon"===p.type&&(f[f.length-1]=[f[0][0],f[0][1]]);const y=this.selectionPoints.getUpdated(f)||[],v=this.midPoints.getUpdated(f)||[];if(d&&!d({type:"Feature",id:this.draggedFeatureId,geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:B.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:p},...y,...v]),this.dragPosition=[c.lng,c.lat]}else"Point"===p.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:g}}]),this.dragPosition=[c.lng,c.lat])}}class Xt extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=c,this.pixelDistance=d,this.selectionPoints=p,this.midPoints=g}getClosestCoordinate(c,d){const p={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let g;if("LineString"===d.type)g=d.coordinates;else{if("Polygon"!==d.type)return p;g=d.coordinates[0]}for(let f=0;f<g.length;f++){const _=this.pixelDistance.measure(c,g[f]);if(_<this.pointerDistance&&_<p.dist){const c="Polygon"===d.type&&(f===g.length-1||0===f);p.dist=_,p.index=c?0:f,p.isFirstOrLastPolygonCoord=c}}return p}getDraggableIndex(c,d){const p=this.store.getGeometryCopy(d),g=this.getClosestCoordinate(c,p);return-1===g.index?-1:g.index}drag(c,d,p){if(!this.draggedCoordinate.id)return!1;const g=this.draggedCoordinate.index,f=this.store.getGeometryCopy(this.draggedCoordinate.id),_="LineString"===f.type?f.coordinates:f.coordinates[0],y=[c.lng,c.lat];if(c.lng>180||c.lng<-180||c.lat>90||c.lat<-90)return!1;if("Polygon"!==f.type||g!==_.length-1&&0!==g)_[g]=y;else{const c=_.length-1;_[0]=y,_[c]=y}const v=this.selectionPoints.getOneUpdated(g,y),x=v?[v]:[],C=this.midPoints.getUpdated(_)||[];return!("Point"!==f.type&&!d&&ot({type:"Feature",geometry:f,properties:{}})||p&&!p({type:"Feature",id:this.draggedCoordinate.id,geometry:f,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:B.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:f},...x,...C]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,d){this.draggedCoordinate={id:c,index:d}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(c){let d=0,p=0,g=0;return("Polygon"===c.geometry.type?c.geometry.coordinates[0].slice(0,-1):c.geometry.coordinates).forEach((c=>{d+=c[0],p+=c[1],g++}),!0),[d/g,p/g]}function Yt(c,d){c[0]+=c[0]-d[0]>180?-360:d[0]-c[0]>180?360:0;const p=V,g=d[1]*Math.PI/180,f=c[1]*Math.PI/180,_=f-g;let y=Math.abs(c[0]-d[0])*Math.PI/180;y>Math.PI&&(y-=2*Math.PI);const v=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(g/2+Math.PI/4)),x=Math.abs(v)>1e-11?_/v:Math.cos(g);return Math.sqrt(_*_+x*x*y*y)*p}function Kt(c){const d=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((c=>{const{x:d,y:p}=Q(c[0],c[1]);return[d,p]}));return"Polygon"===c.geometry.type?function(c){let d=0,p=0,g=0;const f=c.length;for(let _=0;_<f-1;_++){const[f,y]=c[_],[v,x]=c[_+1],C=f*x-v*y;d+=C,p+=(f+v)*C,g+=(y+x)*C}return d/=2,p/=6*d,g/=6*d,{x:p,y:g}}(d):function(c){const d=c.length;let p=0,g=0;for(let f=0;f<d;f++){const[d,_]=c[f];p+=d,g+=_}return{x:p/d,y:g/d}}(d)}class zt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=c,this.selectionPoints=d,this.midPoints=p}reset(){this.lastBearing=void 0}rotate(c,d,p){const g=this.store.getGeometryCopy(d);if("Polygon"!==g.type&&"LineString"!==g.type)return;const f=[c.lng,c.lat];let _;const y={type:"Feature",geometry:g,properties:{}};if("web-mercator"===this.config.projection){if(_=function vt({x:c,y:d},{x:p,y:g}){let f=Math.atan2(g-d,p-c);return f*=180/Math.PI,f>180?f-=360:f<-180&&(f+=360),f}(Kt(y),Q(c.lng,c.lat)),!this.lastBearing)return void(this.lastBearing=_);((c,d)=>{if(0===d||360===d||-360===d)return c;const p=.017453292519943295*d,g=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,d])=>Q(c,d))),f=g.reduce(((c,d)=>({x:c.x+d.x,y:c.y+d.y})),{x:0,y:0});f.x/=g.length,f.y/=g.length;const _=g.map((c=>({x:f.x+(c.x-f.x)*Math.cos(p)-(c.y-f.y)*Math.sin(p),y:f.y+(c.x-f.x)*Math.sin(p)+(c.y-f.y)*Math.cos(p)}))).map((({x:c,y:d})=>[tt(c,d).lng,tt(c,d).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=_:(console.log("rotatedCoordinates linestring",_),c.geometry.coordinates=_)})(y,-(this.lastBearing-_))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(_=Ot(Ut({type:"Feature",geometry:g,properties:{}}),f),!this.lastBearing)return void(this.lastBearing=_+180);!function(c,d){if(0===d||360===d||-360===d)return c;const p=Ut(c);("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const g=Ot(p,c)+d,f=Yt(p,c),_=jt(p,f,g);c[0]=_[0],c[1]=_[1]}))}(y,-(this.lastBearing-(_+180)))}const v="Polygon"===g.type?g.coordinates[0]:g.coordinates;v.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const x=this.midPoints.getUpdated(v)||[],C=this.selectionPoints.getUpdated(v)||[];if(p&&!p({id:d,type:"Feature",geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:B.Provisional}))return!1;this.store.updateGeometry([{id:d,geometry:g},...C,...x]),"web-mercator"===this.projection?this.lastBearing=_:"globe"===this.projection&&(this.lastBearing=_+180)}}class Ht extends dt{constructor(c,d,p){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=c,this.selectionPoints=d,this.midPoints=p}reset(){this.lastDistance=void 0}scale(c,d,p){const g=this.store.getGeometryCopy(d);if("Polygon"!==g.type&&"LineString"!==g.type)return;const f=[c.lng,c.lat],_={type:"Feature",geometry:g,properties:{}};let y;const v=Kt(_);if("web-mercator"===this.config.projection){const d=Q(c.lng,c.lat);y=i$1(v,d)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");y=Y(Ut({type:"Feature",geometry:g,properties:{}}),f)}if(!this.lastDistance)return void(this.lastDistance=y);const x=1-(this.lastDistance-y)/y;if("web-mercator"===this.config.projection){const{lng:c,lat:d}=tt(v.x,v.y);!function(c,d,p){if(1===d)return c;const g=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,d])=>Q(c,d))),f=Q(p[0],p[1]),_=g.map((c=>({x:f.x+(c.x-f.x)*d,y:f.y+(c.y-f.y)*d}))).map((({x:c,y:d})=>[tt(c,d).lng,tt(c,d).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=_:c.geometry.coordinates=_}(_,x,[c,d])}else"globe"===this.config.projection&&function(c,d,p,g="xy"){1===d||("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const f=Yt(p,c),_=Ot(p,c),y=jt(p,f*d,_);"x"!==g&&"xy"!==g||(c[0]=y[0]),"y"!==g&&"xy"!==g||(c[1]=y[1])}))}(_,x,Ut(_));const C="Polygon"===g.type?g.coordinates[0]:g.coordinates;C.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const L=this.midPoints.getUpdated(C)||[],M=this.selectionPoints.getUpdated(C)||[];if(p&&!p({id:d,type:"Feature",geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:B.Provisional}))return!1;this.store.updateGeometry([{id:d,geometry:g},...M,...L]),this.lastDistance=y}}class $t extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=c,this.pixelDistance=d,this.selectionPoints=p,this.midPoints=g}getClosestCoordinate(c,d){const p={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let g;if("LineString"===d.type)g=d.coordinates;else{if("Polygon"!==d.type)return p;g=d.coordinates[0]}for(let f=0;f<g.length;f++){const _=this.pixelDistance.measure(c,g[f]);if(_<this.pointerDistance&&_<p.dist){const c="Polygon"===d.type&&(f===g.length-1||0===f);p.dist=_,p.index=c?0:f,p.isFirstOrLastPolygonCoord=c}}return p}isValidDragWebMercator(c,d,p){switch(c){case 0:if(d<=0||p>=0)return!1;break;case 1:if(p>=0)return!1;break;case 2:if(d>=0||p>=0)return!1;break;case 3:if(d>=0)return!1;break;case 4:if(d>=0||p<=0)return!1;break;case 5:if(p<=0)return!1;break;case 6:if(d<=0||p<=0)return!1;break;case 7:if(d<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const c=this.getFeature(this.draggedCoordinate.id);if(!c)return null;const d=this.getNormalisedCoordinates(c.geometry);return{boundingBox:this.getBBoxWebMercator(d),feature:c,updatedCoords:d,selectedCoordinate:d[this.draggedCoordinate.index]}}centerWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{feature:p,boundingBox:g,updatedCoords:f,selectedCoordinate:_}=d,y=Kt(p);if(!y)return null;const v=Q(_[0],_[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(g,v),C=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:x,updatedCoords:f,webMercatorCursor:C,webMercatorSelected:v,webMercatorOrigin:y}),f}centerFixedWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{feature:p,boundingBox:g,updatedCoords:f,selectedCoordinate:_}=d,y=Kt(p);if(!y)return null;const v=Q(_[0],_[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(g,v),C=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:x,updatedCoords:f,webMercatorCursor:C,webMercatorSelected:v,webMercatorOrigin:y}),f}scaleFixedWebMercator({closestBBoxIndex:c,webMercatorOrigin:d,webMercatorSelected:p,webMercatorCursor:g,updatedCoords:f}){if(!this.isValidDragWebMercator(c,d.x-g.x,d.y-g.y))return null;let _=i$1(d,g)/i$1(d,p);return _<0&&(_=this.minimumScale),this.performWebMercatorScale(f,d.x,d.y,_,_),f}oppositeFixedWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{boundingBox:p,updatedCoords:g,selectedCoordinate:f}=d,_=Q(f[0],f[1]),{oppositeBboxIndex:y,closestBBoxIndex:v}=this.getIndexesWebMercator(p,_),x={x:p[y][0],y:p[y][1]},C=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:v,updatedCoords:g,webMercatorCursor:C,webMercatorSelected:_,webMercatorOrigin:x}),g}oppositeWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{boundingBox:p,updatedCoords:g,selectedCoordinate:f}=d,_=Q(f[0],f[1]),{oppositeBboxIndex:y,closestBBoxIndex:v}=this.getIndexesWebMercator(p,_),x={x:p[y][0],y:p[y][1]},C=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:v,updatedCoords:g,webMercatorCursor:C,webMercatorSelected:_,webMercatorOrigin:x}),g}scaleWebMercator({closestBBoxIndex:c,webMercatorOrigin:d,webMercatorSelected:p,webMercatorCursor:g,updatedCoords:f}){const _=d.x-g.x,y=d.y-g.y;if(!this.isValidDragWebMercator(c,_,y))return null;let v=1;0!==_&&1!==c&&5!==c&&(v=1-(d.x-p.x-_)/_);let x=1;return 0!==y&&3!==c&&7!==c&&(x=1-(d.y-p.y-y)/y),this.validateScale(v,x)?(v<0&&(v=this.minimumScale),x<0&&(x=this.minimumScale),this.performWebMercatorScale(f,d.x,d.y,v,x),f):null}getFeature(c){if(null===this.draggedCoordinate.id)return null;const d=this.store.getGeometryCopy(c);return"Polygon"!==d.type&&"LineString"!==d.type?null:{type:"Feature",geometry:d,properties:{}}}getNormalisedCoordinates(c){return"Polygon"===c.type?c.coordinates[0]:c.coordinates}validateScale(c,d){const p=!isNaN(c)&&d<Number.MAX_SAFE_INTEGER,g=!isNaN(d)&&d<Number.MAX_SAFE_INTEGER;return p&&g}performWebMercatorScale(c,d,p,g,f){c.forEach((c=>{const{x:_,y:y}=Q(c[0],c[1]),v=d+(_-d)*g,x=p+(y-p)*f,{lng:C,lat:L}=tt(v,x);c[0]=C,c[1]=L}))}getBBoxWebMercator(c){const d=[1/0,1/0,-1/0,-1/0];(c=c.map((c=>{const{x:d,y:p}=Q(c[0],c[1]);return[d,p]}))).forEach((([c,p])=>{c<d[0]&&(d[0]=c),p<d[1]&&(d[1]=p),c>d[2]&&(d[2]=c),p>d[3]&&(d[3]=p)}));const[p,g,f,_]=d;return[[p,_],[(p+f)/2,_],[f,_],[f,_+(g-_)/2],[f,g],[(p+f)/2,g],[p,g],[p,_+(g-_)/2]]}getIndexesWebMercator(c,d){let p,g=1/0;for(let f=0;f<c.length;f++){const _=i$1({x:d.x,y:d.y},{x:c[f][0],y:c[f][1]});_<g&&(p=f,g=_)}if(void 0===p)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[p],closestBBoxIndex:p}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,d){this.draggedCoordinate={id:c,index:d}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(c,d){const p=this.store.getGeometryCopy(d),g=this.getClosestCoordinate(c,p);return-1===g.index?-1:g.index}drag(c,d,p){if(!this.draggedCoordinate.id)return!1;const g=this.getFeature(this.draggedCoordinate.id);if(!g)return!1;let f=null;if("center"===d?f=this.centerWebMercatorDrag(c):"opposite"===d?f=this.oppositeWebMercatorDrag(c):"center-fixed"===d?f=this.centerFixedWebMercatorDrag(c):"opposite-fixed"===d&&(f=this.oppositeFixedWebMercatorDrag(c)),!f)return!1;for(let c=0;c<f.length;c++){const d=f[c];if(d[0]=e(d[0],this.coordinatePrecision),d[1]=e(d[1],this.coordinatePrecision),!st(d,this.coordinatePrecision))return!1}const _=this.midPoints.getUpdated(f)||[],y=this.selectionPoints.getUpdated(f)||[],v={type:g.geometry.type,coordinates:"Polygon"===g.geometry.type?[f]:f};return!(p&&!p({id:this.draggedCoordinate.id,type:"Feature",geometry:v,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:B.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:v},...y,..._]),0))}}class Jt extends U{constructor(c){var d;super(c),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=c&&c.flags?c.flags:{};const p={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=c&&c.cursors?t({},p,c.cursors):p,null===(null==c?void 0:c.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const d={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}if(this.dragEventThrottle=c&&void 0!==c.dragEventThrottle&&c.dragEventThrottle||5,this.allowManualDeselection=null==(d=null==c?void 0:c.allowManualDeselection)||d,c&&c.flags&&c.flags)for(const d in c.flags){const p=c.flags[d].feature;p&&p.validation&&(this.validations[d]=p.validation)}}selectFeature(c){this.select(c,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(c){this.pixelDistance=new pt(c),this.clickBoundingBox=new gt(c),this.featuresAtMouseEvent=new Rt(c,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(c),this.midPoints=new Gt(c,this.selectionPoints),this.rotateFeature=new zt(c,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(c,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(c,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(c,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(c,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const c=this.selected.filter((c=>this.store.has(c))).map((c=>({id:c,property:j,value:!1})));this.store.updateProperty(c),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(c){if(!this.selectionPoints.ids.length)return;let d,p=1/0;if(this.selectionPoints.ids.forEach((g=>{const f=this.store.getGeometryCopy(g),_=this.pixelDistance.measure(c,f.coordinates);_<this.pointerDistance&&_<p&&(p=_,d=this.store.getPropertiesCopy(g))})),!d)return;const g=d.selectionPointFeatureId,f=d.index,_=this.store.getPropertiesCopy(g),y=this.flags[_.mode],v=this.validations[_.mode];if(!(y&&y.feature&&y.feature.coordinates&&y.feature.coordinates.deletable))return;const x=this.store.getGeometryCopy(g);let C;if("Polygon"===x.type){if(C=x.coordinates[0],C.length<=4)return}else if("LineString"===x.type&&(C=x.coordinates,C.length<=3))return;if(C){if("Polygon"===x.type&&0===f||f===C.length-1?(C.shift(),C.pop(),C.push([C[0][0],C[0][1]])):C.splice(f,1),v&&!v({id:g,type:"Feature",geometry:x,properties:_},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:B.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:g,geometry:x}]),this.selectionPoints.create(C,x.type,g),y&&y.feature&&y.feature.coordinates&&y.feature.coordinates.midpoints&&this.midPoints.create(C,g,this.coordinatePrecision)}}select(c,d=!0){if(this.selected[0]===c)return;const{mode:p}=this.store.getPropertiesCopy(c),g=this.flags[p];if(!g||!g.feature)return;const f=this.selected[0];if(f){if(f===c)return;this.deselect()}d&&this.setCursor(this.cursors.pointerOver),this.selected=[c],this.store.updateProperty([{id:c,property:"selected",value:!0}]),this.onSelect(c);const{type:_,coordinates:y}=this.store.getGeometryCopy(c);if("LineString"!==_&&"Polygon"!==_)return;const v="LineString"===_?y:y[0];v&&g&&g.feature.coordinates&&(this.selectionPoints.create(v,_,c),g.feature.coordinates.midpoints&&this.midPoints.create(v,c,this.coordinatePrecision))}onLeftClick(c){const{clickedFeature:d,clickedMidPoint:p}=this.featuresAtMouseEvent.find(c,this.selected.length>0);if(this.selected.length&&p)this.midPoints.insert(p.id,this.coordinatePrecision);else if(d&&d.id)this.select(d.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(c){"right"!==c.button?"left"===c.button&&this.onLeftClick(c):this.onRightClick(c)}canScale(c){return this.keyEvents.scale&&this.keyEvents.scale.every((d=>c.heldKeys.includes(d)))}canRotate(c){return this.keyEvents.rotate&&this.keyEvents.rotate.every((d=>c.heldKeys.includes(d)))}preventDefaultKeyEvent(c){const d=this.canRotate(c),p=this.canScale(c);(d||p)&&c.preventDefault()}onKeyDown(c){this.preventDefaultKeyEvent(c)}onKeyUp(c){if(this.preventDefaultKeyEvent(c),this.keyEvents.delete&&c.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&c.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(c,d){if(!this.selected.length)return;const p=this.store.getPropertiesCopy(this.selected[0]),g=this.flags[p.mode];if(!(g&&g.feature&&(g.feature.draggable||g.feature.coordinates&&g.feature.coordinates.draggable||g.feature.coordinates&&g.feature.coordinates.resizable)))return;this.dragEventCount=0;const f=this.selected[0],_=this.dragCoordinate.getDraggableIndex(c,f);return g&&g.feature&&g.feature.coordinates&&(g.feature.coordinates.draggable||g.feature.coordinates.resizable)&&-1!==_?(this.setCursor(this.cursors.dragStart),g.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(f,_):this.dragCoordinate.startDragging(f,_),void d(!1)):g&&g.feature&&g.feature.draggable&&this.dragFeature.canDrag(c,f)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(c,f),void d(!1)):void 0}onDrag(c,d){const p=this.selected[0];if(!p)return;const g=this.store.getPropertiesCopy(p),f=this.flags[g.mode],_=!0===(f&&f.feature&&f.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const y=this.validations[g.mode];if(f&&f.feature&&f.feature.rotateable&&this.canRotate(c))return d(!1),void this.rotateFeature.rotate(c,p,y);if(f&&f.feature&&f.feature.scaleable&&this.canScale(c))return d(!1),void this.scaleFeature.scale(c,p,y);if(this.dragCoordinateResizeFeature.isDragging()&&f.feature&&f.feature.coordinates&&f.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return d(!1),void this.dragCoordinateResizeFeature.drag(c,f.feature.coordinates.resizable,y)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(c,_,y):this.dragFeature.isDragging()?this.dragFeature.drag(c,y):d(!0)}onDragEnd(c,d){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),d(!0)}onMouseMove(c){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let d=!1;this.midPoints.ids.forEach((p=>{if(d)return;const g=this.store.getGeometryCopy(p);this.pixelDistance.measure(c,g.coordinates)<this.pointerDistance&&(d=!0)}));let p=!1;if(this.selectionPoints.ids.forEach((g=>{const f=this.store.getGeometryCopy(g);this.pixelDistance.measure(c,f.coordinates)<this.pointerDistance&&(d=!1,p=!0)})),d)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:g}=this.featuresAtMouseEvent.find(c,!0);this.setCursor(this.selected.length>0&&(g&&g.id===this.selected[0]||p)?this.cursors.pointerOver:"unset")}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode&&"Point"===c.geometry.type){if(c.properties.selectionPoint)return d.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,d.pointOutlineColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,d.pointWidth,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,c),d.zIndex=30,d;if(c.properties.midPoint)return d.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,d.pointOutlineColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,c),d.zIndex=40,d}else if(c.properties[j]){if("Polygon"===c.geometry.type)return d.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,d.polygonFillColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,d.polygonOutlineWidth,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,d.polygonOutlineColor,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d;if("LineString"===c.geometry.type)return d.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,d.lineStringColor,c),d.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,d.lineStringWidth,c),d.zIndex=10,d;if("Point"===c.geometry.type)return d.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,d.pointOutlineWidth,c),d.zIndex=10,d}return d}}class Zt extends X{constructor(...c){super(...c),this.type=W.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(c,d,p,g,f){for(;g>p;){if(g-p>600){const _=g-p+1,y=d-p+1,v=Math.log(_),x=.5*Math.exp(2*v/3),C=.5*Math.sqrt(v*x*(_-x)/_)*(y-_/2<0?-1:1);qt(c,d,Math.max(p,Math.floor(d-y*x/_+C)),Math.min(g,Math.floor(d+(_-y)*x/_+C)),f)}const _=c[d];let y=p,v=g;for(Qt(c,p,d),f(c[g],_)>0&&Qt(c,p,g);y<v;){for(Qt(c,y,v),y++,v--;f(c[y],_)<0;)y++;for(;f(c[v],_)>0;)v--}0===f(c[p],_)?Qt(c,p,v):(v++,Qt(c,v,g)),v<=d&&(p=v+1),d<=v&&(g=v-1)}}function Qt(c,d,p){const g=c[d];c[d]=c[p],c[p]=g}function te(c,d){ee(c,0,c.children.length,d,c)}function ee(c,d,p,g,f){f||(f=ce([])),f.minX=1/0,f.minY=1/0,f.maxX=-1/0,f.maxY=-1/0;for(let _=d;_<p;_++){const d=c.children[_];ie$1(f,c.leaf?g(d):d)}return f}function ie$1(c,d){return c.minX=Math.min(c.minX,d.minX),c.minY=Math.min(c.minY,d.minY),c.maxX=Math.max(c.maxX,d.maxX),c.maxY=Math.max(c.maxY,d.maxY),c}function oe(c,d){return c.minX-d.minX}function re(c,d){return c.minY-d.minY}function se(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function ne(c){return c.maxX-c.minX+(c.maxY-c.minY)}function ae(c,d){const p=Math.max(c.minX,d.minX),g=Math.max(c.minY,d.minY),f=Math.min(c.maxX,d.maxX),_=Math.min(c.maxY,d.maxY);return Math.max(0,f-p)*Math.max(0,_-g)}function le(c,d){return c.minX<=d.minX&&c.minY<=d.minY&&d.maxX<=c.maxX&&d.maxY<=c.maxY}function he(c,d){return d.minX<=c.maxX&&d.minY<=c.maxY&&d.maxX>=c.minX&&d.maxY>=c.minY}function ce(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(c,d,p,g,f){const _=[d,p];for(;_.length;){if((p=_.pop())-(d=_.pop())<=g)continue;const y=d+Math.ceil((p-d)/g/2)*g;qt(c,y,d,p,f),_.push(d,y,y,p)}}class ue{constructor(c){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(c){let d=this.data;const p=[];if(!he(c,d))return p;const g=this.toBBox,f=[];for(;d;){for(let _=0;_<d.children.length;_++){const y=d.children[_],v=d.leaf?g(y):y;he(c,v)&&(d.leaf?p.push(y):le(c,v)?this._all(y,p):f.push(y))}d=f.pop()}return p}collides(c){let d=this.data;if(he(c,d)){const p=[];for(;d;){for(let g=0;g<d.children.length;g++){const f=d.children[g],_=d.leaf?this.toBBox(f):f;if(he(c,_)){if(d.leaf||le(c,_))return!0;p.push(f)}}d=p.pop()}}return!1}load(c){if(c.length<this._minEntries){for(let d=0;d<c.length;d++)this.insert(c[d]);return}let d=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===d.height)this._splitRoot(this.data,d);else{if(this.data.height<d.height){const c=this.data;this.data=d,d=c}this._insert(d,this.data.height-d.height-1,!0)}else this.data=d}insert(c){this._insert(c,this.data.height-1)}clear(){this.data=ce([])}remove(c){let d=this.data;const p=this.toBBox(c),g=[],f=[];let _,y,v=!1;for(;d||g.length;){if(d||(d=g.pop(),y=g[g.length-1],_=f.pop(),v=!0),d.leaf){const p=d.children.indexOf(c);-1!==p&&(d.children.splice(p,1),g.push(d),this._condense(g))}v||d.leaf||!le(d,p)?y?(_++,d=y.children[_],v=!1):d=null:(g.push(d),f.push(_),_=0,y=d,d=d.children[0])}}toBBox(c){return c}compareMinX(c,d){return c.minX-d.minX}compareMinY(c,d){return c.minY-d.minY}_all(c,d){const p=[];for(;c;)c.leaf?d.push(...c.children):p.push(...c.children),c=p.pop();return d}_build(c,d,p,g){const f=p-d+1;let _,y=this._maxEntries;if(f<=y)return _=ce(c.slice(d,p+1)),te(_,this.toBBox),_;g||(g=Math.ceil(Math.log(f)/Math.log(y)),y=Math.ceil(f/Math.pow(y,g-1))),_=ce([]),_.leaf=!1,_.height=g;const v=Math.ceil(f/y),x=v*Math.ceil(Math.sqrt(y));de(c,d,p,x,this.compareMinX);for(let f=d;f<=p;f+=x){const d=Math.min(f+x-1,p);de(c,f,d,v,this.compareMinY);for(let p=f;p<=d;p+=v){const f=Math.min(p+v-1,d);_.children.push(this._build(c,p,f,g-1))}}return te(_,this.toBBox),_}_chooseSubtree(c,d,p,g){for(;g.push(d),!d.leaf&&g.length-1!==p;){let p,g=1/0,y=1/0;for(let v=0;v<d.children.length;v++){const x=d.children[v],C=se(x),L=(f=c,_=x,(Math.max(_.maxX,f.maxX)-Math.min(_.minX,f.minX))*(Math.max(_.maxY,f.maxY)-Math.min(_.minY,f.minY))-C);L<y?(y=L,g=C<g?C:g,p=x):L===y&&C<g&&(g=C,p=x)}d=p||d.children[0]}var f,_;return d}_insert(c,d,p){const g=p?c:this.toBBox(c),f=[],_=this._chooseSubtree(g,this.data,d,f);for(_.children.push(c),ie$1(_,g);d>=0&&f[d].children.length>this._maxEntries;)this._split(f,d),d--;this._adjustParentBBoxes(g,f,d)}_split(c,d){const p=c[d],g=p.children.length,f=this._minEntries;this._chooseSplitAxis(p,f,g);const _=this._chooseSplitIndex(p,f,g),y=ce(p.children.splice(_,p.children.length-_));y.height=p.height,y.leaf=p.leaf,te(p,this.toBBox),te(y,this.toBBox),d?c[d-1].children.push(y):this._splitRoot(p,y)}_splitRoot(c,d){this.data=ce([c,d]),this.data.height=c.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(c,d,p){let g,f=1/0,_=1/0;for(let y=d;y<=p-d;y++){const d=ee(c,0,y,this.toBBox),v=ee(c,y,p,this.toBBox),x=ae(d,v),C=se(d)+se(v);x<f?(f=x,g=y,_=C<_?C:_):x===f&&C<_&&(_=C,g=y)}return g||p-d}_chooseSplitAxis(c,d,p){const g=c.leaf?this.compareMinX:oe,f=c.leaf?this.compareMinY:re;this._allDistMargin(c,d,p,g)<this._allDistMargin(c,d,p,f)&&c.children.sort(g)}_allDistMargin(c,d,p,g){c.children.sort(g);const f=this.toBBox,_=ee(c,0,d,f),y=ee(c,p-d,p,f);let v=ne(_)+ne(y);for(let g=d;g<p-d;g++){const d=c.children[g];ie$1(_,c.leaf?f(d):d),v+=ne(_)}for(let g=p-d-1;g>=d;g--){const d=c.children[g];ie$1(y,c.leaf?f(d):d),v+=ne(y)}return v}_adjustParentBBoxes(c,d,p){for(let g=p;g>=0;g--)ie$1(d[g],c)}_condense(c){for(let d,p=c.length-1;p>=0;p--)0===c[p].children.length?p>0?(d=c[p-1].children,d.splice(d.indexOf(c[p]),1)):this.clear():te(c[p],this.toBBox)}}class ge{constructor(c){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(c&&c.maxEntries?c.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(c,d){this.idToNode.set(c.id,d),this.nodeToId.set(d,c.id)}toBBox(c){const d=[],p=[];let g;if("Polygon"===c.geometry.type)g=c.geometry.coordinates[0];else if("LineString"===c.geometry.type)g=c.geometry.coordinates;else{if("Point"!==c.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");g=[c.geometry.coordinates]}for(let c=0;c<g.length;c++)p.push(g[c][1]),d.push(g[c][0]);const f=Math.min(...p),_=Math.max(...p);return{minX:Math.min(...d),minY:f,maxX:Math.max(...d),maxY:_}}insert(c){if(this.idToNode.get(String(c.id)))throw new Error("Feature already exists");const d=this.toBBox(c);this.setMaps(c,d),this.tree.insert(d)}load(c){const d=[],p=new Set;c.forEach((c=>{const g=this.toBBox(c);if(this.setMaps(c,g),p.has(String(c.id)))throw new Error(`Duplicate feature ID found ${c.id}`);p.add(String(c.id)),d.push(g)})),this.tree.load(d)}update(c){this.remove(c.id);const d=this.toBBox(c);this.setMaps(c,d),this.tree.insert(d)}remove(c){const d=this.idToNode.get(c);if(!d)throw new Error(`${c} not inserted into the spatial index`);this.tree.remove(d)}clear(){this.tree.clear()}search(c){return this.tree.search(this.toBBox(c)).map((c=>this.nodeToId.get(c)))}collides(c){return this.tree.collides(this.toBBox(c))}}const J={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){const d=16*Math.random()|0;return("x"==c?d:3&d|8).toString(16)})),isValidId:c=>"string"==typeof c&&36===c.length};class ye{constructor(c){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!c||!1!==c.tracked,this.idStrategy=c&&c.idStrategy?c.idStrategy:J}clone(c){return JSON.parse(JSON.stringify(c))}getId(){return this.idStrategy.getId()}has(c){return Boolean(this.store[c])}load(c,d){if(0===c.length)return;const p=this.clone(c);p.forEach((c=>{null==c.id&&(c.id=this.idStrategy.getId()),this.tracked&&(c.properties.createdAt?R(c.properties.createdAt):c.properties.createdAt=+new Date,c.properties.updatedAt?R(c.properties.updatedAt):c.properties.updatedAt=+new Date)}));const g=[];p.forEach((c=>{const p=c.id;if(d&&!d(c))throw new Error(`Feature ${p} is not valid: ${JSON.stringify(c)}`);if(this.has(p))throw new Error(`Feature already exists with this id: ${p}`);this.store[p]=c,g.push(p)})),this.spatialIndex.load(p),this._onChange(g,"create")}search(c,d){const p=this.spatialIndex.search(c).map((c=>this.store[c]));return this.clone(d?p.filter(d):p)}registerOnChange(c){this._onChange=(d,p)=>{c(d,p)}}getGeometryCopy(c){const d=this.store[c];if(!d)throw new Error(`No feature with this id (${c}), can not get geometry copy`);return this.clone(d.geometry)}getPropertiesCopy(c){const d=this.store[c];if(!d)throw new Error(`No feature with this id (${c}), can not get properties copy`);return this.clone(d.properties)}updateProperty(c){const d=[];c.forEach((({id:c,property:p,value:g})=>{const f=this.store[c];if(!f)throw new Error(`No feature with this (${c}), can not update geometry`);d.push(c),f.properties[p]=g,this.tracked&&(f.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(d,"update")}updateGeometry(c){const d=[];c.forEach((({id:c,geometry:p})=>{d.push(c);const g=this.store[c];if(!g)throw new Error(`No feature with this (${c}), can not update geometry`);g.geometry=this.clone(p),this.spatialIndex.update(g),this.tracked&&(g.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(d,"update")}create(c){const d=[];return c.forEach((({geometry:c,properties:p})=>{let g,f=t({},p);this.tracked&&(g=+new Date,p?(f.createdAt="number"==typeof p.createdAt?p.createdAt:g,f.updatedAt="number"==typeof p.updatedAt?p.updatedAt:g):f={createdAt:g,updatedAt:g});const _=this.getId(),y={id:_,type:"Feature",geometry:c,properties:f};this.store[_]=y,this.spatialIndex.insert(y),d.push(_)})),this._onChange&&this._onChange([...d],"create"),d}delete(c){c.forEach((c=>{if(!this.store[c])throw new Error("No feature with this id, can not delete");delete this.store[c],this.spatialIndex.remove(c)})),this._onChange&&this._onChange([...c],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((c=>this.store[c])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(c){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=c.adapter,this._mode=new Zt;const d=new Set,p=c.modes.reduce(((c,p)=>{if(d.has(p.mode))throw new Error(`There is already a ${p.mode} mode provided`);return d.add(p.mode),c[p.mode]=p,c}),{}),g=Object.keys(p);if(0===g.length)throw new Error("No modes provided");g.forEach((c=>{if(p[c].type===W.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=c}})),this._modes=t({},p,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!c.tracked,idStrategy:c.idStrategy?c.idStrategy:void 0});const s=c=>{const d=[],p=this._store.copyAll().filter((p=>!c.includes(p.id)||(d.push(p),!1)));return{changed:d,unchanged:p}},n=(c,d)=>{this._enabled&&this._eventListeners.finish.forEach((p=>{p(c,d)}))},a=(c,d)=>{if(!this._enabled)return;this._eventListeners.change.forEach((p=>{p(c,d)}));const{changed:p,unchanged:g}=s(c);"create"===d?this._adapter.render({created:p,deletedIds:[],unchanged:g,updated:[]},this.getModeStyles()):"update"===d?this._adapter.render({created:[],deletedIds:[],unchanged:g,updated:p},this.getModeStyles()):"delete"===d?this._adapter.render({created:[],deletedIds:c,unchanged:g,updated:[]},this.getModeStyles()):"styling"===d&&this._adapter.render({created:[],deletedIds:[],unchanged:g,updated:[]},this.getModeStyles())},l=c=>{if(!this._enabled)return;this._eventListeners.select.forEach((d=>{d(c)}));const{changed:d,unchanged:p}=s([c]);this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles())},h=c=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((c=>{c()}));const{changed:d,unchanged:p}=s([c]);d&&this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles())};Object.keys(this._modes).forEach((c=>{this._modes[c].register({mode:c,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const c={};return Object.keys(this._modes).forEach((d=>{c[d]=c=>this._instanceSelectMode&&c.properties[j]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(c):this._modes[d].styleFeature.bind(this._modes[d])(c)})),c}featuresAtLocation({lng:c,lat:d},p){const g=p&&void 0!==p.pointerDistance?p.pointerDistance:30,f=!p||void 0===p.ignoreSelectFeatures||p.ignoreSelectFeatures,_=this._adapter.unproject.bind(this._adapter),y=this._adapter.project.bind(this._adapter),v=y(c,d),x=ut({unproject:_,point:v,pointerDistance:g});return this._store.search(x).filter((p=>{if(f&&(p.properties[N]||p.properties.selectionPoint))return!1;if("Point"===p.geometry.type){const c=p.geometry.coordinates,d=y(c[0],c[1]);return i$1(v,d)<g}if("LineString"===p.geometry.type){const c=p.geometry.coordinates;for(let d=0;d<c.length-1;d++){const p=c[d],f=c[d+1];if(At(v,y(p[0],p[1]),y(f[0],f[1]))<g)return!0}return!1}return!!Vt([c,d],p.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(c,d){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._modes[c].styles=d}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(c){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(c){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[c],this._mode.start()}removeFeatures(c){this.checkEnabled(),this._store.delete(c)}selectFeature(c){this.getSelectMode().selectFeature(c)}deselectFeature(c){this.getSelectMode().deselectFeature(c)}getFeatureId(){return this._store.getId()}hasFeature(c){return this._store.has(c)}addFeatures(c){this.checkEnabled(),0!==c.length&&this._store.load(c,(c=>{if(Boolean(c&&"object"==typeof c&&"properties"in c&&"object"==typeof c.properties&&null!==c.properties&&"mode"in c.properties)){const d=this._modes[c.properties.mode];return!!d&&d.validateFeature.bind(d)(c)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((c=>{c()}))},getState:()=>this._mode.state,onClick:c=>{this._mode.onClick(c)},onMouseMove:c=>{this._mode.onMouseMove(c)},onKeyDown:c=>{this._mode.onKeyDown(c)},onKeyUp:c=>{this._mode.onKeyUp(c)},onDragStart:(c,d)=>{this._mode.onDragStart(c,d)},onDrag:(c,d)=>{this._mode.onDrag(c,d)},onDragEnd:(c,d)=>{this._mode.onDragEnd(c,d)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(c,d){const{lng:p,lat:g}=c;return this.featuresAtLocation({lng:p,lat:g},d)}getFeaturesAtPointerEvent(c,d){const p=this._adapter.getLngLatFromEvent.bind(this._adapter)(c);return null===p?[]:this.featuresAtLocation(p,d)}stop(){this._enabled=!1,this._adapter.unregister()}on(c,d){const p=this._eventListeners[c];p.includes(d)||p.push(d)}off(c,d){const p=this._eventListeners[c];p.includes(d)&&p.splice(p.indexOf(d),1)}}class MapOption{constructor({name:c,desc:d,example:p,exampleDesc:g,isValid:f}){this.name=c,this.desc=d,this.example=p,this.exampleDesc=g,this.isValid=f}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(c){if(this._map)throw Error("map cannot be reassigned");this._map=c}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(c,d){const p=this.constructor.validOptions.find((d=>d.valueOf()===c))?.isValid;if(!p)throw Error(`Cannot find inValid method for option ${c}`);return p(d)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:c=>!!c?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`width: ${c}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`height: ${c}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:c=>{try{const[d,p]=JSON.parse(c);return!isNaN(d)&&!isNaN(p)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:c=>{const d=Number(c);return!isNaN(d)&&d>=0&&d<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:c=>"object"==typeof c}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:c=>"true"===c}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:c=>URL.parse(c)&&c.includes("{x}")&&c.includes("{y}")&&c.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:c=>URL.parse(c)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:c=>URL.parse(c)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:c=>"true"===c}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(c){if(c.XYZ){("string"==typeof c.XYZ?[c.XYZ]:c.XYZ).forEach((d=>{let p,g;if("string"==typeof d)g=new URL(d),p={type:"tile",url:d,title:`${g.host}${g.pathname.split("%7B")[0]}`};else{if("object"!=typeof d)return;g=new URL(d.url),p={type:"tile",url:d.url,title:d.title?d.title:`${g.host}${g.pathname.split("%7B")[0]}`}}c.data.push(p)})),delete c.XYZ}c.WMTS&&(c.data.push({type:"wmts",url:c.aliases[c.WMTS]??c.WMTS}),delete c.WMTS),c.GPX&&(c.data.push({type:"gpx",url:c.GPX}),delete c.GPX),"string"==typeof c.center&&Object.prototype.hasOwnProperty.call(c.aliases,c.center)&&(c.center=c.aliases[c.center]),c.data?.forEach((d=>{Object.prototype.hasOwnProperty.call(c.aliases,d.url)&&(d.title=d.url,d.url=c.aliases[d.url])}))}createView({target:c,width:d,height:p}){c.style.width=d,c.style.height=p,"flex"===window.getComputedStyle(c.parentElement).display&&(c.style.flexBasis=`calc(${d})`)}setDraw=({target:c,terraDrawAdapter:d})=>{const p=c?.id?c.id+"-":"",g={idStrategy:{isValidId:c=>!0,getId:function(){let c=p+window.crypto.randomUUID();return function(){return c=p+window.crypto.randomUUID(),c}}()}};return this.terraDraw=((c,d={})=>new Se({adapter:c,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...d}))(d,g),((c,d,p={})=>{const g=document.createElement("select");c.appendChild(g),g.name="Draw",g.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",g.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',d.start(),d.setMode("render");const f=c.id?`terra-draw-data-${c.id}`:"terra-draw-data",_=window.localStorage.getItem(f);if(_)try{const c=JSON.parse(_);c.forEach((c=>c.properties={mode:"render"})),d.addFeatures(c)}catch(c){console.warn("Fail to drawn features from Local Storage.",_,c),window.localStorage.removeItem(f)}const y=c.querySelector("canvas")??c;g.onchange=()=>{g.children[0].textContent="--STOP--",y.style.removeProperty("cursor");const c=d.getSnapshot();switch(g.value){case"nothing":d.setMode("render"),g.children[0].textContent="Draw Something";break;case"modify":d.setMode("select");break;case"delete":d.setMode("render"),y.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(f),g.value="nothing",g.onchange(),d.clear();break;case"features":window.alert(`${c.length} features\n\n${JSON.stringify(c,null,4)}`);break;default:d.setMode(g.value)}},d.on("change",(()=>{})),d.on("finish",((c,_)=>{if("draw"===_.action){const p=d.getSnapshot().find((d=>d.id===c));p&&(d.removeFeatures([c]),p.properties.mode="render",d.addFeatures([p]))}const y=p.idFilter??(()=>!0),v=d.getSnapshot().filter(y);window.localStorage.setItem(f,JSON.stringify(v)),"point"!==_.mode&&"draw"===_.action&&(g.value="nothing",g.onchange())})),document.onclick=c=>{if("delete"===g.value){const p=d.getFeaturesAtPointerEvent(c,{pointerDistance:40});p.length>0&&(d.removeFeatures([p[0].id]),0===d.getSnapshot().length&&(g.value="nothing",g.onchange()))}}})(c,this.terraDraw,{idFilter:c=>c.id.startsWith(p)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(c){const d=c.filter((c=>"wmts"===c.type)),p=c.filter((c=>"tile"===c.type));return d.length>0||p.length>1}propsForEval(){let c=this,d=[],p=[];for(;c!==Object.prototype;)d=d.concat(Object.getOwnPropertyNames(c)),p=p.concat(Object.entries(c)),c=Object.getPrototypeOf(c);return d}evalScript(c,d=[]){const p=this.propsForEval(),g=d.map((([c,d])=>c)),f=[...p.map((c=>this[c])),...d.map((([c,d])=>d))],_=Function([...p,...g],c).bind(this,...f);try{return _()}catch(c){return console.warn("Fail to run custom script:",c),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(c){return null==c}var ct=function extend$1(c,d){var p,g,f,_;if(d)for(p=0,g=(_=Object.keys(d)).length;p<g;p+=1)c[f=_[p]]=d[f];return c},ft={isNothing:isNothing,isObject:function isObject(c){return"object"==typeof c&&null!==c},toArray:function toArray(c){return Array.isArray(c)?c:isNothing(c)?[]:[c]},repeat:function repeat(c,d){var p,g="";for(p=0;p<d;p+=1)g+=c;return g},isNegativeZero:function isNegativeZero(c){return 0===c&&Number.NEGATIVE_INFINITY===1/c},extend:ct};function formatError(c,d){var p="",g=c.reason||"(unknown reason)";return c.mark?(c.mark.name&&(p+='in "'+c.mark.name+'" '),p+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!d&&c.mark.snippet&&(p+="\n\n"+c.mark.snippet),g+" "+p):g}function YAMLException$1(c,d){Error.call(this),this.name="YAMLException",this.reason=c,this.mark=d,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(c){return this.name+": "+formatError(this,c)};var ie=YAMLException$1;function getLine(c,d,p,g,f){var _="",y="",v=Math.floor(f/2)-1;return g-d>v&&(d=g-v+(_=" ... ").length),p-g>v&&(p=g+v-(y=" ...").length),{str:_+c.slice(d,p).replace(/\t/g,"→")+y,pos:g-d+_.length}}function padStart(c,d){return ft.repeat(" ",d-c.length)+c}var pe=function makeSnippet(c,d){if(d=Object.create(d||null),!c.buffer)return null;d.maxLength||(d.maxLength=79),"number"!=typeof d.indent&&(d.indent=1),"number"!=typeof d.linesBefore&&(d.linesBefore=3),"number"!=typeof d.linesAfter&&(d.linesAfter=2);for(var p,g=/\r?\n|\r|\0/g,f=[0],_=[],y=-1;p=g.exec(c.buffer);)_.push(p.index),f.push(p.index+p[0].length),c.position<=p.index&&y<0&&(y=f.length-2);y<0&&(y=f.length-1);var v,x,C="",L=Math.min(c.line+d.linesAfter,_.length).toString().length,M=d.maxLength-(d.indent+L+3);for(v=1;v<=d.linesBefore&&!(y-v<0);v++)x=getLine(c.buffer,f[y-v],_[y-v],c.position-(f[y]-f[y-v]),M),C=ft.repeat(" ",d.indent)+padStart((c.line-v+1).toString(),L)+" | "+x.str+"\n"+C;for(x=getLine(c.buffer,f[y],_[y],c.position,M),C+=ft.repeat(" ",d.indent)+padStart((c.line+1).toString(),L)+" | "+x.str+"\n",C+=ft.repeat("-",d.indent+L+3+x.pos)+"^\n",v=1;v<=d.linesAfter&&!(y+v>=_.length);v++)x=getLine(c.buffer,f[y+v],_[y+v],c.position-(f[y]-f[y+v]),M),C+=ft.repeat(" ",d.indent)+padStart((c.line+v+1).toString(),L)+" | "+x.str+"\n";return C.replace(/\n$/,"")},me=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fe=["scalar","sequence","mapping"];var _e=function Type$1(c,d){if(d=d||{},Object.keys(d).forEach((function(d){if(-1===me.indexOf(d))throw new ie('Unknown option "'+d+'" is met in definition of "'+c+'" YAML type.')})),this.options=d,this.tag=c,this.kind=d.kind||null,this.resolve=d.resolve||function(){return!0},this.construct=d.construct||function(c){return c},this.instanceOf=d.instanceOf||null,this.predicate=d.predicate||null,this.represent=d.represent||null,this.representName=d.representName||null,this.defaultStyle=d.defaultStyle||null,this.multi=d.multi||!1,this.styleAliases=function compileStyleAliases(c){var d={};return null!==c&&Object.keys(c).forEach((function(p){c[p].forEach((function(c){d[String(c)]=p}))})),d}(d.styleAliases||null),-1===fe.indexOf(this.kind))throw new ie('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')};function compileList(c,d){var p=[];return c[d].forEach((function(c){var d=p.length;p.forEach((function(p,g){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(d=g)})),p[d]=c})),p}function Schema$1(c){return this.extend(c)}Schema$1.prototype.extend=function extend(c){var d=[],p=[];if(c instanceof _e)p.push(c);else if(Array.isArray(c))p=p.concat(c);else{if(!c||!Array.isArray(c.implicit)&&!Array.isArray(c.explicit))throw new ie("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.implicit&&(d=d.concat(c.implicit)),c.explicit&&(p=p.concat(c.explicit))}d.forEach((function(c){if(!(c instanceof _e))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&"scalar"!==c.loadKind)throw new ie("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new ie("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),p.forEach((function(c){if(!(c instanceof _e))throw new ie("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var g=Object.create(Schema$1.prototype);return g.implicit=(this.implicit||[]).concat(d),g.explicit=(this.explicit||[]).concat(p),g.compiledImplicit=compileList(g,"implicit"),g.compiledExplicit=compileList(g,"explicit"),g.compiledTypeMap=function compileMap(){var c,d,p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(c){c.multi?(p.multi[c.kind].push(c),p.multi.fallback.push(c)):p[c.kind][c.tag]=p.fallback[c.tag]=c}for(c=0,d=arguments.length;c<d;c+=1)arguments[c].forEach(collectType);return p}(g.compiledImplicit,g.compiledExplicit),g};var ve=new Schema$1({explicit:[new _e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(c){return null!==c?c:""}}),new _e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(c){return null!==c?c:[]}}),new _e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(c){return null!==c?c:{}}})]});var xe=new _e("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(c){if(null===c)return!0;var d=c.length;return 1===d&&"~"===c||4===d&&("null"===c||"Null"===c||"NULL"===c)},construct:function constructYamlNull(){return null},predicate:function isNull(c){return null===c},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var Pe=new _e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(c){if(null===c)return!1;var d=c.length;return 4===d&&("true"===c||"True"===c||"TRUE"===c)||5===d&&("false"===c||"False"===c||"FALSE"===c)},construct:function constructYamlBoolean(c){return"true"===c||"True"===c||"TRUE"===c},predicate:function isBoolean(c){return"[object Boolean]"===Object.prototype.toString.call(c)},represent:{lowercase:function(c){return c?"true":"false"},uppercase:function(c){return c?"TRUE":"FALSE"},camelcase:function(c){return c?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}var we=new _e("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(c){if(null===c)return!1;var d,p=c.length,g=0,f=!1;if(!p)return!1;if("-"!==(d=c[g])&&"+"!==d||(d=c[++g]),"0"===d){if(g+1===p)return!0;if("b"===(d=c[++g])){for(g++;g<p;g++)if("_"!==(d=c[g])){if("0"!==d&&"1"!==d)return!1;f=!0}return f&&"_"!==d}if("x"===d){for(g++;g<p;g++)if("_"!==(d=c[g])){if(!isHexCode(c.charCodeAt(g)))return!1;f=!0}return f&&"_"!==d}if("o"===d){for(g++;g<p;g++)if("_"!==(d=c[g])){if(!isOctCode(c.charCodeAt(g)))return!1;f=!0}return f&&"_"!==d}}if("_"===d)return!1;for(;g<p;g++)if("_"!==(d=c[g])){if(!isDecCode(c.charCodeAt(g)))return!1;f=!0}return!(!f||"_"===d)},construct:function constructYamlInteger(c){var d,p=c,g=1;if(-1!==p.indexOf("_")&&(p=p.replace(/_/g,"")),"-"!==(d=p[0])&&"+"!==d||("-"===d&&(g=-1),d=(p=p.slice(1))[0]),"0"===p)return 0;if("0"===d){if("b"===p[1])return g*parseInt(p.slice(2),2);if("x"===p[1])return g*parseInt(p.slice(2),16);if("o"===p[1])return g*parseInt(p.slice(2),8)}return g*parseInt(p,10)},predicate:function isInteger(c){return"[object Number]"===Object.prototype.toString.call(c)&&c%1==0&&!ft.isNegativeZero(c)},represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),be=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Ce=/^[-+]?[0-9]+e/;var Le=new _e("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(c){return null!==c&&!(!be.test(c)||"_"===c[c.length-1])},construct:function constructYamlFloat(c){var d,p;return p="-"===(d=c.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(d[0])>=0&&(d=d.slice(1)),".inf"===d?1===p?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===d?NaN:p*parseFloat(d,10)},predicate:function isFloat(c){return"[object Number]"===Object.prototype.toString.call(c)&&(c%1!=0||ft.isNegativeZero(c))},represent:function representYamlFloat(c,d){var p;if(isNaN(c))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ft.isNegativeZero(c))return"-0.0";return p=c.toString(10),Ce.test(p)?p.replace("e",".e"):p},defaultStyle:"lowercase"}),Me=ve.extend({implicit:[xe,Pe,we,Le]}),Ee=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Te=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var ke=new _e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(c){return null!==c&&(null!==Ee.exec(c)||null!==Te.exec(c))},construct:function constructYamlTimestamp(c){var d,p,g,f,_,y,v,x,C=0,L=null;if(null===(d=Ee.exec(c))&&(d=Te.exec(c)),null===d)throw new Error("Date resolve error");if(p=+d[1],g=+d[2]-1,f=+d[3],!d[4])return new Date(Date.UTC(p,g,f));if(_=+d[4],y=+d[5],v=+d[6],d[7]){for(C=d[7].slice(0,3);C.length<3;)C+="0";C=+C}return d[9]&&(L=6e4*(60*+d[10]+ +(d[11]||0)),"-"===d[9]&&(L=-L)),x=new Date(Date.UTC(p,g,f,_,y,v,C)),L&&x.setTime(x.getTime()-L),x},instanceOf:Date,represent:function representYamlTimestamp(c){return c.toISOString()}});var Oe=new _e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(c){return"<<"===c||null===c}}),Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Ae=new _e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(c){if(null===c)return!1;var d,p,g=0,f=c.length,_=Ie;for(p=0;p<f;p++)if(!((d=_.indexOf(c.charAt(p)))>64)){if(d<0)return!1;g+=6}return g%8==0},construct:function constructYamlBinary(c){var d,p,g=c.replace(/[\r\n=]/g,""),f=g.length,_=Ie,y=0,v=[];for(d=0;d<f;d++)d%4==0&&d&&(v.push(y>>16&255),v.push(y>>8&255),v.push(255&y)),y=y<<6|_.indexOf(g.charAt(d));return 0===(p=f%4*6)?(v.push(y>>16&255),v.push(y>>8&255),v.push(255&y)):18===p?(v.push(y>>10&255),v.push(y>>2&255)):12===p&&v.push(y>>4&255),new Uint8Array(v)},predicate:function isBinary(c){return"[object Uint8Array]"===Object.prototype.toString.call(c)},represent:function representYamlBinary(c){var d,p,g="",f=0,_=c.length,y=Ie;for(d=0;d<_;d++)d%3==0&&d&&(g+=y[f>>18&63],g+=y[f>>12&63],g+=y[f>>6&63],g+=y[63&f]),f=(f<<8)+c[d];return 0===(p=_%3)?(g+=y[f>>18&63],g+=y[f>>12&63],g+=y[f>>6&63],g+=y[63&f]):2===p?(g+=y[f>>10&63],g+=y[f>>4&63],g+=y[f<<2&63],g+=y[64]):1===p&&(g+=y[f>>2&63],g+=y[f<<4&63],g+=y[64],g+=y[64]),g}}),De=Object.prototype.hasOwnProperty,Be=Object.prototype.toString;var Fe=new _e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(c){if(null===c)return!0;var d,p,g,f,_,y=[],v=c;for(d=0,p=v.length;d<p;d+=1){if(g=v[d],_=!1,"[object Object]"!==Be.call(g))return!1;for(f in g)if(De.call(g,f)){if(_)return!1;_=!0}if(!_)return!1;if(-1!==y.indexOf(f))return!1;y.push(f)}return!0},construct:function constructYamlOmap(c){return null!==c?c:[]}}),ze=Object.prototype.toString;var je=new _e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(c){if(null===c)return!0;var d,p,g,f,_,y=c;for(_=new Array(y.length),d=0,p=y.length;d<p;d+=1){if(g=y[d],"[object Object]"!==ze.call(g))return!1;if(1!==(f=Object.keys(g)).length)return!1;_[d]=[f[0],g[f[0]]]}return!0},construct:function constructYamlPairs(c){if(null===c)return[];var d,p,g,f,_,y=c;for(_=new Array(y.length),d=0,p=y.length;d<p;d+=1)g=y[d],f=Object.keys(g),_[d]=[f[0],g[f[0]]];return _}}),Ne=Object.prototype.hasOwnProperty;var Ze=new _e("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(c){if(null===c)return!0;var d,p=c;for(d in p)if(Ne.call(p,d)&&null!==p[d])return!1;return!0},construct:function constructYamlSet(c){return null!==c?c:{}}}),We=Me.extend({implicit:[ke,Oe],explicit:[Ae,Fe,je,Ze]}),Re=Object.prototype.hasOwnProperty,Ue=1,He=2,Ve=3,Ye=4,Ge=1,qe=2,Xe=3,$e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ke=/[\x85\u2028\u2029]/,Je=/[,\[\]\{\}]/,Qe=/^(?:!|!!|![a-z\-]+!)$/i,ti=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(c){return Object.prototype.toString.call(c)}function is_EOL(c){return 10===c||13===c}function is_WHITE_SPACE(c){return 9===c||32===c}function is_WS_OR_EOL(c){return 9===c||32===c||10===c||13===c}function is_FLOW_INDICATOR(c){return 44===c||91===c||93===c||123===c||125===c}function fromHexCode(c){var d;return 48<=c&&c<=57?c-48:97<=(d=32|c)&&d<=102?d-97+10:-1}function escapedHexLen(c){return 120===c?2:117===c?4:85===c?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return 48===c?"\0":97===c?"":98===c?"\b":116===c||9===c?"\t":110===c?"\n":118===c?"\v":102===c?"\f":114===c?"\r":101===c?"":32===c?" ":34===c?'"':47===c?"/":92===c?"\\":78===c?"…":95===c?" ":76===c?"\u2028":80===c?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode(55296+(c-65536>>10),56320+(c-65536&1023))}for(var ei=new Array(256),ii=new Array(256),ni=0;ni<256;ni++)ei[ni]=simpleEscapeSequence(ni)?1:0,ii[ni]=simpleEscapeSequence(ni);function State$1(c,d){this.input=c,this.filename=d.filename||null,this.schema=d.schema||We,this.onWarning=d.onWarning||null,this.legacy=d.legacy||!1,this.json=d.json||!1,this.listener=d.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(c,d){var p={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return p.snippet=pe(p),new ie(d,p)}function throwError(c,d){throw generateError(c,d)}function throwWarning(c,d){c.onWarning&&c.onWarning.call(null,generateError(c,d))}var oi={YAML:function handleYamlDirective(c,d,p){var g,f,_;null!==c.version&&throwError(c,"duplication of %YAML directive"),1!==p.length&&throwError(c,"YAML directive accepts exactly one argument"),null===(g=/^([0-9]+)\.([0-9]+)$/.exec(p[0]))&&throwError(c,"ill-formed argument of the YAML directive"),f=parseInt(g[1],10),_=parseInt(g[2],10),1!==f&&throwError(c,"unacceptable YAML version of the document"),c.version=p[0],c.checkLineBreaks=_<2,1!==_&&2!==_&&throwWarning(c,"unsupported YAML version of the document")},TAG:function handleTagDirective(c,d,p){var g,f;2!==p.length&&throwError(c,"TAG directive accepts exactly two arguments"),g=p[0],f=p[1],Qe.test(g)||throwError(c,"ill-formed tag handle (first argument) of the TAG directive"),Re.call(c.tagMap,g)&&throwError(c,'there is a previously declared suffix for "'+g+'" tag handle'),ti.test(f)||throwError(c,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch(d){throwError(c,"tag prefix is malformed: "+f)}c.tagMap[g]=f}};function captureSegment(c,d,p,g){var f,_,y,v;if(d<p){if(v=c.input.slice(d,p),g)for(f=0,_=v.length;f<_;f+=1)9===(y=v.charCodeAt(f))||32<=y&&y<=1114111||throwError(c,"expected valid JSON character");else $e.test(v)&&throwError(c,"the stream contains non-printable characters");c.result+=v}}function mergeMappings(c,d,p,g){var f,_,y,v;for(ft.isObject(p)||throwError(c,"cannot merge mappings; the provided source object is unacceptable"),y=0,v=(f=Object.keys(p)).length;y<v;y+=1)_=f[y],Re.call(d,_)||(d[_]=p[_],g[_]=!0)}function storeMappingPair(c,d,p,g,f,_,y,v,x){var C,L;if(Array.isArray(f))for(C=0,L=(f=Array.prototype.slice.call(f)).length;C<L;C+=1)Array.isArray(f[C])&&throwError(c,"nested arrays are not supported inside keys"),"object"==typeof f&&"[object Object]"===_class(f[C])&&(f[C]="[object Object]");if("object"==typeof f&&"[object Object]"===_class(f)&&(f="[object Object]"),f=String(f),null===d&&(d={}),"tag:yaml.org,2002:merge"===g)if(Array.isArray(_))for(C=0,L=_.length;C<L;C+=1)mergeMappings(c,d,_[C],p);else mergeMappings(c,d,_,p);else c.json||Re.call(p,f)||!Re.call(d,f)||(c.line=y||c.line,c.lineStart=v||c.lineStart,c.position=x||c.position,throwError(c,"duplicated mapping key")),"__proto__"===f?Object.defineProperty(d,f,{configurable:!0,enumerable:!0,writable:!0,value:_}):d[f]=_,delete p[f];return d}function readLineBreak(c){var d;10===(d=c.input.charCodeAt(c.position))?c.position++:13===d?(c.position++,10===c.input.charCodeAt(c.position)&&c.position++):throwError(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function skipSeparationSpace(c,d,p){for(var g=0,f=c.input.charCodeAt(c.position);0!==f;){for(;is_WHITE_SPACE(f);)9===f&&-1===c.firstTabInLine&&(c.firstTabInLine=c.position),f=c.input.charCodeAt(++c.position);if(d&&35===f)do{f=c.input.charCodeAt(++c.position)}while(10!==f&&13!==f&&0!==f);if(!is_EOL(f))break;for(readLineBreak(c),f=c.input.charCodeAt(c.position),g++,c.lineIndent=0;32===f;)c.lineIndent++,f=c.input.charCodeAt(++c.position)}return-1!==p&&0!==g&&c.lineIndent<p&&throwWarning(c,"deficient indentation"),g}function testDocumentSeparator(c){var d,p=c.position;return!(45!==(d=c.input.charCodeAt(p))&&46!==d||d!==c.input.charCodeAt(p+1)||d!==c.input.charCodeAt(p+2)||(p+=3,0!==(d=c.input.charCodeAt(p))&&!is_WS_OR_EOL(d)))}function writeFoldedLines(c,d){1===d?c.result+=" ":d>1&&(c.result+=ft.repeat("\n",d-1))}function readBlockSequence(c,d){var p,g,f=c.tag,_=c.anchor,y=[],v=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=y),g=c.input.charCodeAt(c.position);0!==g&&(-1!==c.firstTabInLine&&(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),45===g)&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1));)if(v=!0,c.position++,skipSeparationSpace(c,!0,-1)&&c.lineIndent<=d)y.push(null),g=c.input.charCodeAt(c.position);else if(p=c.line,composeNode(c,d,Ve,!1,!0),y.push(c.result),skipSeparationSpace(c,!0,-1),g=c.input.charCodeAt(c.position),(c.line===p||c.lineIndent>d)&&0!==g)throwError(c,"bad indentation of a sequence entry");else if(c.lineIndent<d)break;return!!v&&(c.tag=f,c.anchor=_,c.kind="sequence",c.result=y,!0)}function readTagProperty(c){var d,p,g,f,_=!1,y=!1;if(33!==(f=c.input.charCodeAt(c.position)))return!1;if(null!==c.tag&&throwError(c,"duplication of a tag property"),60===(f=c.input.charCodeAt(++c.position))?(_=!0,f=c.input.charCodeAt(++c.position)):33===f?(y=!0,p="!!",f=c.input.charCodeAt(++c.position)):p="!",d=c.position,_){do{f=c.input.charCodeAt(++c.position)}while(0!==f&&62!==f);c.position<c.length?(g=c.input.slice(d,c.position),f=c.input.charCodeAt(++c.position)):throwError(c,"unexpected end of the stream within a verbatim tag")}else{for(;0!==f&&!is_WS_OR_EOL(f);)33===f&&(y?throwError(c,"tag suffix cannot contain exclamation marks"):(p=c.input.slice(d-1,c.position+1),Qe.test(p)||throwError(c,"named tag handle cannot contain such characters"),y=!0,d=c.position+1)),f=c.input.charCodeAt(++c.position);g=c.input.slice(d,c.position),Je.test(g)&&throwError(c,"tag suffix cannot contain flow indicator characters")}g&&!ti.test(g)&&throwError(c,"tag name cannot contain such characters: "+g);try{g=decodeURIComponent(g)}catch(d){throwError(c,"tag name is malformed: "+g)}return _?c.tag=g:Re.call(c.tagMap,p)?c.tag=c.tagMap[p]+g:"!"===p?c.tag="!"+g:"!!"===p?c.tag="tag:yaml.org,2002:"+g:throwError(c,'undeclared tag handle "'+p+'"'),!0}function readAnchorProperty(c){var d,p;if(38!==(p=c.input.charCodeAt(c.position)))return!1;for(null!==c.anchor&&throwError(c,"duplication of an anchor property"),p=c.input.charCodeAt(++c.position),d=c.position;0!==p&&!is_WS_OR_EOL(p)&&!is_FLOW_INDICATOR(p);)p=c.input.charCodeAt(++c.position);return c.position===d&&throwError(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(d,c.position),!0}function composeNode(c,d,p,g,f){var _,y,v,x,C,L,M,E,T,k=1,O=!1,I=!1;if(null!==c.listener&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null,_=y=v=Ye===p||Ve===p,g&&skipSeparationSpace(c,!0,-1)&&(O=!0,c.lineIndent>d?k=1:c.lineIndent===d?k=0:c.lineIndent<d&&(k=-1)),1===k)for(;readTagProperty(c)||readAnchorProperty(c);)skipSeparationSpace(c,!0,-1)?(O=!0,v=_,c.lineIndent>d?k=1:c.lineIndent===d?k=0:c.lineIndent<d&&(k=-1)):v=!1;if(v&&(v=O||f),1!==k&&Ye!==p||(E=Ue===p||He===p?d:d+1,T=c.position-c.lineStart,1===k?v&&(readBlockSequence(c,T)||function readBlockMapping(c,d,p){var g,f,_,y,v,x,C,L=c.tag,M=c.anchor,E={},T=Object.create(null),k=null,O=null,I=null,D=!1,B=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=E),C=c.input.charCodeAt(c.position);0!==C;){if(D||-1===c.firstTabInLine||(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),g=c.input.charCodeAt(c.position+1),_=c.line,63!==C&&58!==C||!is_WS_OR_EOL(g)){if(y=c.line,v=c.lineStart,x=c.position,!composeNode(c,p,He,!1,!0))break;if(c.line===_){for(C=c.input.charCodeAt(c.position);is_WHITE_SPACE(C);)C=c.input.charCodeAt(++c.position);if(58===C)is_WS_OR_EOL(C=c.input.charCodeAt(++c.position))||throwError(c,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(storeMappingPair(c,E,T,k,O,null,y,v,x),k=O=I=null),B=!0,D=!1,f=!1,k=c.tag,O=c.result;else{if(!B)return c.tag=L,c.anchor=M,!0;throwError(c,"can not read an implicit mapping pair; a colon is missed")}}else{if(!B)return c.tag=L,c.anchor=M,!0;throwError(c,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===C?(D&&(storeMappingPair(c,E,T,k,O,null,y,v,x),k=O=I=null),B=!0,D=!0,f=!0):D?(D=!1,f=!0):throwError(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,C=g;if((c.line===_||c.lineIndent>d)&&(D&&(y=c.line,v=c.lineStart,x=c.position),composeNode(c,d,Ye,!0,f)&&(D?O=c.result:I=c.result),D||(storeMappingPair(c,E,T,k,O,I,y,v,x),k=O=I=null),skipSeparationSpace(c,!0,-1),C=c.input.charCodeAt(c.position)),(c.line===_||c.lineIndent>d)&&0!==C)throwError(c,"bad indentation of a mapping entry");else if(c.lineIndent<d)break}return D&&storeMappingPair(c,E,T,k,O,null,y,v,x),B&&(c.tag=L,c.anchor=M,c.kind="mapping",c.result=E),B}(c,T,E))||function readFlowCollection(c,d){var p,g,f,_,y,v,x,C,L,M,E,T,k=!0,O=c.tag,I=c.anchor,D=Object.create(null);if(91===(T=c.input.charCodeAt(c.position)))y=93,C=!1,_=[];else{if(123!==T)return!1;y=125,C=!0,_={}}for(null!==c.anchor&&(c.anchorMap[c.anchor]=_),T=c.input.charCodeAt(++c.position);0!==T;){if(skipSeparationSpace(c,!0,d),(T=c.input.charCodeAt(c.position))===y)return c.position++,c.tag=O,c.anchor=I,c.kind=C?"mapping":"sequence",c.result=_,!0;k?44===T&&throwError(c,"expected the node content, but found ','"):throwError(c,"missed comma between flow collection entries"),E=null,v=x=!1,63===T&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1))&&(v=x=!0,c.position++,skipSeparationSpace(c,!0,d)),p=c.line,g=c.lineStart,f=c.position,composeNode(c,d,Ue,!1,!0),M=c.tag,L=c.result,skipSeparationSpace(c,!0,d),T=c.input.charCodeAt(c.position),!x&&c.line!==p||58!==T||(v=!0,T=c.input.charCodeAt(++c.position),skipSeparationSpace(c,!0,d),composeNode(c,d,Ue,!1,!0),E=c.result),C?storeMappingPair(c,_,D,M,L,E,p,g,f):v?_.push(storeMappingPair(c,null,D,M,L,E,p,g,f)):_.push(L),skipSeparationSpace(c,!0,d),44===(T=c.input.charCodeAt(c.position))?(k=!0,T=c.input.charCodeAt(++c.position)):k=!1}throwError(c,"unexpected end of the stream within a flow collection")}(c,E)?I=!0:(y&&function readBlockScalar(c,d){var p,g,f,_,y=Ge,v=!1,x=!1,C=d,L=0,M=!1;if(124===(_=c.input.charCodeAt(c.position)))g=!1;else{if(62!==_)return!1;g=!0}for(c.kind="scalar",c.result="";0!==_;)if(43===(_=c.input.charCodeAt(++c.position))||45===_)Ge===y?y=43===_?Xe:qe:throwError(c,"repeat of a chomping mode identifier");else{if(!((f=fromDecimalCode(_))>=0))break;0===f?throwError(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):x?throwError(c,"repeat of an indentation width identifier"):(C=d+f-1,x=!0)}if(is_WHITE_SPACE(_)){do{_=c.input.charCodeAt(++c.position)}while(is_WHITE_SPACE(_));if(35===_)do{_=c.input.charCodeAt(++c.position)}while(!is_EOL(_)&&0!==_)}for(;0!==_;){for(readLineBreak(c),c.lineIndent=0,_=c.input.charCodeAt(c.position);(!x||c.lineIndent<C)&&32===_;)c.lineIndent++,_=c.input.charCodeAt(++c.position);if(!x&&c.lineIndent>C&&(C=c.lineIndent),is_EOL(_))L++;else{if(c.lineIndent<C){y===Xe?c.result+=ft.repeat("\n",v?1+L:L):y===Ge&&v&&(c.result+="\n");break}for(g?is_WHITE_SPACE(_)?(M=!0,c.result+=ft.repeat("\n",v?1+L:L)):M?(M=!1,c.result+=ft.repeat("\n",L+1)):0===L?v&&(c.result+=" "):c.result+=ft.repeat("\n",L):c.result+=ft.repeat("\n",v?1+L:L),v=!0,x=!0,L=0,p=c.position;!is_EOL(_)&&0!==_;)_=c.input.charCodeAt(++c.position);captureSegment(c,p,c.position,!1)}}return!0}(c,E)||function readSingleQuotedScalar(c,d){var p,g,f;if(39!==(p=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,g=f=c.position;0!==(p=c.input.charCodeAt(c.position));)if(39===p){if(captureSegment(c,g,c.position,!0),39!==(p=c.input.charCodeAt(++c.position)))return!0;g=c.position,c.position++,f=c.position}else is_EOL(p)?(captureSegment(c,g,f,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,d)),g=f=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a single quoted scalar"):(c.position++,f=c.position);throwError(c,"unexpected end of the stream within a single quoted scalar")}(c,E)||function readDoubleQuotedScalar(c,d){var p,g,f,_,y,v;if(34!==(v=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,p=g=c.position;0!==(v=c.input.charCodeAt(c.position));){if(34===v)return captureSegment(c,p,c.position,!0),c.position++,!0;if(92===v){if(captureSegment(c,p,c.position,!0),is_EOL(v=c.input.charCodeAt(++c.position)))skipSeparationSpace(c,!1,d);else if(v<256&&ei[v])c.result+=ii[v],c.position++;else if((y=escapedHexLen(v))>0){for(f=y,_=0;f>0;f--)(y=fromHexCode(v=c.input.charCodeAt(++c.position)))>=0?_=(_<<4)+y:throwError(c,"expected hexadecimal character");c.result+=charFromCodepoint(_),c.position++}else throwError(c,"unknown escape sequence");p=g=c.position}else is_EOL(v)?(captureSegment(c,p,g,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,d)),p=g=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a double quoted scalar"):(c.position++,g=c.position)}throwError(c,"unexpected end of the stream within a double quoted scalar")}(c,E)?I=!0:!function readAlias(c){var d,p,g;if(42!==(g=c.input.charCodeAt(c.position)))return!1;for(g=c.input.charCodeAt(++c.position),d=c.position;0!==g&&!is_WS_OR_EOL(g)&&!is_FLOW_INDICATOR(g);)g=c.input.charCodeAt(++c.position);return c.position===d&&throwError(c,"name of an alias node must contain at least one character"),p=c.input.slice(d,c.position),Re.call(c.anchorMap,p)||throwError(c,'unidentified alias "'+p+'"'),c.result=c.anchorMap[p],skipSeparationSpace(c,!0,-1),!0}(c)?function readPlainScalar(c,d,p){var g,f,_,y,v,x,C,L,M=c.kind,E=c.result;if(is_WS_OR_EOL(L=c.input.charCodeAt(c.position))||is_FLOW_INDICATOR(L)||35===L||38===L||42===L||33===L||124===L||62===L||39===L||34===L||37===L||64===L||96===L)return!1;if((63===L||45===L)&&(is_WS_OR_EOL(g=c.input.charCodeAt(c.position+1))||p&&is_FLOW_INDICATOR(g)))return!1;for(c.kind="scalar",c.result="",f=_=c.position,y=!1;0!==L;){if(58===L){if(is_WS_OR_EOL(g=c.input.charCodeAt(c.position+1))||p&&is_FLOW_INDICATOR(g))break}else if(35===L){if(is_WS_OR_EOL(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&testDocumentSeparator(c)||p&&is_FLOW_INDICATOR(L))break;if(is_EOL(L)){if(v=c.line,x=c.lineStart,C=c.lineIndent,skipSeparationSpace(c,!1,-1),c.lineIndent>=d){y=!0,L=c.input.charCodeAt(c.position);continue}c.position=_,c.line=v,c.lineStart=x,c.lineIndent=C;break}}y&&(captureSegment(c,f,_,!1),writeFoldedLines(c,c.line-v),f=_=c.position,y=!1),is_WHITE_SPACE(L)||(_=c.position+1),L=c.input.charCodeAt(++c.position)}return captureSegment(c,f,_,!1),!!c.result||(c.kind=M,c.result=E,!1)}(c,E,Ue===p)&&(I=!0,null===c.tag&&(c.tag="?")):(I=!0,null===c.tag&&null===c.anchor||throwError(c,"alias node should not have any properties")),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):0===k&&(I=v&&readBlockSequence(c,T))),null===c.tag)null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);else if("?"===c.tag){for(null!==c.result&&"scalar"!==c.kind&&throwError(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"'),x=0,C=c.implicitTypes.length;x<C;x+=1)if((M=c.implicitTypes[x]).resolve(c.result)){c.result=M.construct(c.result),c.tag=M.tag,null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);break}}else if("!"!==c.tag){if(Re.call(c.typeMap[c.kind||"fallback"],c.tag))M=c.typeMap[c.kind||"fallback"][c.tag];else for(M=null,x=0,C=(L=c.typeMap.multi[c.kind||"fallback"]).length;x<C;x+=1)if(c.tag.slice(0,L[x].tag.length)===L[x].tag){M=L[x];break}M||throwError(c,"unknown tag !<"+c.tag+">"),null!==c.result&&M.kind!==c.kind&&throwError(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+M.kind+'", not "'+c.kind+'"'),M.resolve(c.result,c.tag)?(c.result=M.construct(c.result,c.tag),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):throwError(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return null!==c.listener&&c.listener("close",c),null!==c.tag||null!==c.anchor||I}function readDocument(c){var d,p,g,f,_=c.position,y=!1;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);0!==(f=c.input.charCodeAt(c.position))&&(skipSeparationSpace(c,!0,-1),f=c.input.charCodeAt(c.position),!(c.lineIndent>0||37!==f));){for(y=!0,f=c.input.charCodeAt(++c.position),d=c.position;0!==f&&!is_WS_OR_EOL(f);)f=c.input.charCodeAt(++c.position);for(g=[],(p=c.input.slice(d,c.position)).length<1&&throwError(c,"directive name must not be less than one character in length");0!==f;){for(;is_WHITE_SPACE(f);)f=c.input.charCodeAt(++c.position);if(35===f){do{f=c.input.charCodeAt(++c.position)}while(0!==f&&!is_EOL(f));break}if(is_EOL(f))break;for(d=c.position;0!==f&&!is_WS_OR_EOL(f);)f=c.input.charCodeAt(++c.position);g.push(c.input.slice(d,c.position))}0!==f&&readLineBreak(c),Re.call(oi,p)?oi[p](c,p,g):throwWarning(c,'unknown document directive "'+p+'"')}skipSeparationSpace(c,!0,-1),0===c.lineIndent&&45===c.input.charCodeAt(c.position)&&45===c.input.charCodeAt(c.position+1)&&45===c.input.charCodeAt(c.position+2)?(c.position+=3,skipSeparationSpace(c,!0,-1)):y&&throwError(c,"directives end mark is expected"),composeNode(c,c.lineIndent-1,Ye,!1,!0),skipSeparationSpace(c,!0,-1),c.checkLineBreaks&&Ke.test(c.input.slice(_,c.position))&&throwWarning(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&testDocumentSeparator(c)?46===c.input.charCodeAt(c.position)&&(c.position+=3,skipSeparationSpace(c,!0,-1)):c.position<c.length-1&&throwError(c,"end of the stream or a document separator is expected")}function loadDocuments(c,d){d=d||{},0!==(c=String(c)).length&&(10!==c.charCodeAt(c.length-1)&&13!==c.charCodeAt(c.length-1)&&(c+="\n"),65279===c.charCodeAt(0)&&(c=c.slice(1)));var p=new State$1(c,d),g=c.indexOf("\0");for(-1!==g&&(p.position=g,throwError(p,"null byte is not allowed in input")),p.input+="\0";32===p.input.charCodeAt(p.position);)p.lineIndent+=1,p.position+=1;for(;p.position<p.length-1;)readDocument(p);return p.documents}var si=function loadAll$1(c,d,p){null!==d&&"object"==typeof d&&void 0===p&&(p=d,d=null);var g=loadDocuments(c,p);if("function"!=typeof d)return g;for(var f=0,_=g.length;f<_;f+=1)d(g[f])},ri={loadAll:si,load:function load$1(c,d){var p=loadDocuments(c,d);if(0!==p.length){if(1===p.length)return p[0];throw new ie("expected a single document in the stream, but found more")}}},ai=ri.load,li=ri.loadAll;const hi=new URL("./","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:d&&d.src||new URL("leaflet.js",document.baseURI).href),ci=Object.freeze({use:{Leaflet:{value:hi+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:hi+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:hi+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=c=>({use:c.use??"Leaflet",width:"100%",...c,aliases:{...ci,...c.aliases??{}}}),di={},setValueByAliases=c=>c.aliases?(Object.entries(c).filter((([c,d])=>"aliases"!==c&&"string"==typeof d&&d.match(/^[A-Z]/))).forEach((([d,p])=>{const g=c.aliases?.[d]?.[p],f="object"!=typeof g||Array.isArray(g)?g:g.value;f&&(c[d]=f,"use"===d&&(c.url=g.url,c.desc=g.desc))})),c):c,applyOtherConfig=async c=>{if(!c.apply)return c;await(async c=>{c&&!di[c]&&(di[c]=await fetch(c).then((c=>{if(200!==c.status)throw Error();return c.text()})).then((c=>ai(c))).catch((d=>{throw Error(`Fail to fetch applied config ${c}`,d)})))})(c.apply);const d=di[c.apply];if(!d)throw Error("Fail to fetch remote config "+c.aply);return{...d,...c,aliases:{...d.aliases,...c.aliases??{}}}},prepareRenderer=async c=>{let d;if(c.use)if(c.use.steps)d=c.use;else{const p=(await import(c.use)).default;d=new p}else d=c;return Object.entries(c).forEach((([c,p])=>d[c]=p)),d},healthCheck=c=>{if(!c.steps)throw c.steps=[],Error("not health");return c},renderWithConfig=async c=>{c.results=[];const d=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],p=(c=>{let d=c;return c=>c.reduce(((c,p)=>c.then((async()=>d.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(d=await p(d),d))).then((c=>d.results.push({type:"prepare",func:p.valueOf(),state:c?.state??"success",result:c?.reason??d}))).catch((c=>{d.results.push({type:"prepare",func:p.valueOf(),state:"fail",result:c})})).then((()=>{d.prepareCallback?.(d,d.results)}))),Promise.resolve(d)).then((()=>d))})(c)(d).then((c=>(c=>(c.steps??[]).reduce(((d,p)=>d.then((()=>{if("stop"===c.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(p.depends){const d=c.results.findLast((c=>c.func===p.depends))?.state;if(d.match(/skip|fail/))return{state:"skip"}}return p.valueOf().bind(c)(c)})).then((d=>c.results.push({type:"render",func:p.valueOf(),state:d?.state??"success",result:d?.reason??d}))).catch((d=>c.results.push({type:"render",func:p.valueOf(),state:"fail",result:d}))).then((()=>{c.stepCallback?.(c,c)}))),Promise.resolve()).then((()=>c)))(c))).then((c=>{const d=!c.results||0===c.results.length||!c.results.find((c=>c.state.match(/success/)))||c.results.find((c=>c.state.match(/fail|stop/))),p=d?"unfulfilled":"fulfilled";return c?.target?.setAttribute("data-render",p),c}));return p.valueOf=()=>c.results,p},setValueOf=c=>(c.valueOf=()=>JSON.stringify(c,((c,d)=>c.match(/aliases|target/)?void 0:d)),c),shouldRender=c=>!(c.target instanceof window.HTMLElement&&c.target.classList.contains("mapclay")&&c.valueOf()===c.target.getAttribute("data-mapclay")&&"fulfilled"===c.target.getAttribute("data-render")),renderWith=c=>(d,p)=>{c=c??(c=>c);const g="object"==typeof p?Array.isArray(p)?p.map(c):[p].map(c):null;if(!g)throw Error(`Invalid config files: ${p}`);d.innerHTML="";return g.map(setValueOf).map((c=>{if(shouldRender(c)){const d=document.createElement("div");c.id&&(d.id=c.id.replaceAll(" ","_"),d.title=`ID: ${d.id}`),d.classList.add("mapclay"),c.target=d,d.dataset.render="rendering",d.dataset.mapclay=c.valueOf()}return d.append(c.target),window.CSS.supports(`width: ${c.width}`)&&(c.target.style.width=c.width),window.CSS.supports(`height: ${c.height}`)&&(c.target.style.height=c.height),c})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(c=null)=>async(d,p=null)=>{const g=(c=>{const d=[];return li(c,(c=>{"object"!=typeof c||Array.isArray(c)?d.length>0&&(d.at(-1).eval=c.toString()):d.push(c??{})})),0===d.length?[{}]:d})(p??d.textContent);return renderWith(c)(d,g)},ui=renderWith(applyDefaultAliases),pi=renderByYamlWith(applyDefaultAliases);document.currentScript&&(globalThis.mapclay={render:ui,renderWith:renderWith,renderByYaml:pi,renderByYamlWith:renderByYamlWith})
+/* @preserve
+   * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
+   * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+   */;function extend(c){var d,p,g,f;for(p=1,g=arguments.length;p<g;p++)for(d in f=arguments[p])c[d]=f[d];return c}var gi=Object.create||function(){function F(){}return function(c){return F.prototype=c,new F}}();function bind(c,d){var p=Array.prototype.slice;if(c.bind)return c.bind.apply(c,p.call(arguments,1));var g=p.call(arguments,2);return function(){return c.apply(d,g.length?g.concat(p.call(arguments)):arguments)}}var mi=0;function stamp(c){return"_leaflet_id"in c||(c._leaflet_id=++mi),c._leaflet_id}function throttle(c,d,p){var g,f,_,y;return y=function(){g=!1,f&&(_.apply(p,f),f=!1)},_=function(){g?f=arguments:(c.apply(p,arguments),setTimeout(y,d),g=!0)},_}function wrapNum(c,d,p){var g=d[1],f=d[0],_=g-f;return c===g&&p?c:((c-f)%_+_)%_+f}function falseFn(){return!1}function formatNum(c,d){if(!1===d)return c;var p=Math.pow(10,void 0===d?6:d);return Math.round(c*p)/p}function trim(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function splitWords(c){return trim(c).split(/\s+/)}function setOptions(c,d){for(var p in Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?gi(c.options):{}),d)c.options[p]=d[p];return c.options}function getParamString(c,d,p){var g=[];for(var f in c)g.push(encodeURIComponent(p?f.toUpperCase():f)+"="+encodeURIComponent(c[f]));return(d&&-1!==d.indexOf("?")?"&":"?")+g.join("&")}var fi=/\{ *([\w_ -]+) *\}/g;function template(c,d){return c.replace(fi,(function(c,p){var g=d[p];if(void 0===g)throw new Error("No value provided for variable "+c);return"function"==typeof g&&(g=g(d)),g}))}var _i=Array.isArray||function(c){return"[object Array]"===Object.prototype.toString.call(c)};function indexOf(c,d){for(var p=0;p<c.length;p++)if(c[p]===d)return p;return-1}var yi="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function getPrefixed(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var vi=0;function timeoutDefer(c){var d=+new Date,p=Math.max(0,16-(d-vi));return vi=d+p,window.setTimeout(c,p)}var xi=window.requestAnimationFrame||getPrefixed("RequestAnimationFrame")||timeoutDefer,Pi=window.cancelAnimationFrame||getPrefixed("CancelAnimationFrame")||getPrefixed("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function requestAnimFrame(c,d,p){if(!p||xi!==timeoutDefer)return xi.call(window,bind(c,d));c.call(d)}function cancelAnimFrame(c){c&&Pi.call(window,c)}var wi={__proto__:null,extend:extend,create:gi,bind:bind,get lastId(){return mi},stamp:stamp,throttle:throttle,wrapNum:wrapNum,falseFn:falseFn,formatNum:formatNum,trim:trim,splitWords:splitWords,setOptions:setOptions,getParamString:getParamString,template:template,isArray:_i,indexOf:indexOf,emptyImageUrl:yi,requestFn:xi,cancelFn:Pi,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame};function Class(){}Class.extend=function(c){var NewClass=function(){setOptions(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},d=NewClass.__super__=this.prototype,p=gi(d);for(var g in p.constructor=NewClass,NewClass.prototype=p,this)Object.prototype.hasOwnProperty.call(this,g)&&"prototype"!==g&&"__super__"!==g&&(NewClass[g]=this[g]);return c.statics&&extend(NewClass,c.statics),c.includes&&(!function checkDeprecatedMixinEvents(c){if("undefined"==typeof L||!L||!L.Mixin)return;c=_i(c)?c:[c];for(var d=0;d<c.length;d++)c[d]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(c.includes),extend.apply(null,[p].concat(c.includes))),extend(p,c),delete p.statics,delete p.includes,p.options&&(p.options=d.options?gi(d.options):{},extend(p.options,c.options)),p._initHooks=[],p.callInitHooks=function(){if(!this._initHooksCalled){d.callInitHooks&&d.callInitHooks.call(this),this._initHooksCalled=!0;for(var c=0,g=p._initHooks.length;c<g;c++)p._initHooks[c].call(this)}},NewClass},Class.include=function(c){var d=this.prototype.options;return extend(this.prototype,c),c.options&&(this.prototype.options=d,this.mergeOptions(c.options)),this},Class.mergeOptions=function(c){return extend(this.prototype.options,c),this},Class.addInitHook=function(c){var d=Array.prototype.slice.call(arguments,1),p="function"==typeof c?c:function(){this[c].apply(this,d)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(p),this};var bi={on:function(c,d,p){if("object"==typeof c)for(var g in c)this._on(g,c[g],d);else for(var f=0,_=(c=splitWords(c)).length;f<_;f++)this._on(c[f],d,p);return this},off:function(c,d,p){if(arguments.length)if("object"==typeof c)for(var g in c)this._off(g,c[g],d);else{c=splitWords(c);for(var f=1===arguments.length,_=0,y=c.length;_<y;_++)f?this._off(c[_]):this._off(c[_],d,p)}else delete this._events;return this},_on:function(c,d,p,g){if("function"==typeof d){if(!1===this._listens(c,d,p)){p===this&&(p=void 0);var f={fn:d,ctx:p};g&&(f.once=!0),this._events=this._events||{},this._events[c]=this._events[c]||[],this._events[c].push(f)}}else console.warn("wrong listener type: "+typeof d)},_off:function(c,d,p){var g,f,_;if(this._events&&(g=this._events[c]))if(1!==arguments.length)if("function"==typeof d){var y=this._listens(c,d,p);if(!1!==y){var v=g[y];this._firingCount&&(v.fn=falseFn,this._events[c]=g=g.slice()),g.splice(y,1)}}else console.warn("wrong listener type: "+typeof d);else{if(this._firingCount)for(f=0,_=g.length;f<_;f++)g[f].fn=falseFn;delete this._events[c]}},fire:function(c,d,p){if(!this.listens(c,p))return this;var g=extend({},d,{type:c,target:this,sourceTarget:d&&d.sourceTarget||this});if(this._events){var f=this._events[c];if(f){this._firingCount=this._firingCount+1||1;for(var _=0,y=f.length;_<y;_++){var v=f[_],x=v.fn;v.once&&this.off(c,x,v.ctx),x.call(v.ctx||this,g)}this._firingCount--}}return p&&this._propagateEvent(g),this},listens:function(c,d,p,g){"string"!=typeof c&&console.warn('"string" type argument expected');var f=d;"function"!=typeof d&&(g=!!d,f=void 0,p=void 0);var _=this._events&&this._events[c];if(_&&_.length&&!1!==this._listens(c,f,p))return!0;if(g)for(var y in this._eventParents)if(this._eventParents[y].listens(c,d,p,g))return!0;return!1},_listens:function(c,d,p){if(!this._events)return!1;var g=this._events[c]||[];if(!d)return!!g.length;p===this&&(p=void 0);for(var f=0,_=g.length;f<_;f++)if(g[f].fn===d&&g[f].ctx===p)return f;return!1},once:function(c,d,p){if("object"==typeof c)for(var g in c)this._on(g,c[g],d,!0);else for(var f=0,_=(c=splitWords(c)).length;f<_;f++)this._on(c[f],d,p,!0);return this},addEventParent:function(c){return this._eventParents=this._eventParents||{},this._eventParents[stamp(c)]=c,this},removeEventParent:function(c){return this._eventParents&&delete this._eventParents[stamp(c)],this},_propagateEvent:function(c){for(var d in this._eventParents)this._eventParents[d].fire(c.type,extend({layer:c.target,propagatedFrom:c.target},c),!0)}};bi.addEventListener=bi.on,bi.removeEventListener=bi.clearAllEventListeners=bi.off,bi.addOneTimeEventListener=bi.once,bi.fireEvent=bi.fire,bi.hasEventListeners=bi.listens;var Ci=Class.extend(bi);function Point(c,d,p){this.x=p?Math.round(c):c,this.y=p?Math.round(d):d}var Li=Math.trunc||function(c){return c>0?Math.floor(c):Math.ceil(c)};function toPoint(c,d,p){return c instanceof Point?c:_i(c)?new Point(c[0],c[1]):null==c?c:"object"==typeof c&&"x"in c&&"y"in c?new Point(c.x,c.y):new Point(c,d,p)}function Bounds(c,d){if(c)for(var p=d?[c,d]:c,g=0,f=p.length;g<f;g++)this.extend(p[g])}function toBounds(c,d){return!c||c instanceof Bounds?c:new Bounds(c,d)}function LatLngBounds(c,d){if(c)for(var p=d?[c,d]:c,g=0,f=p.length;g<f;g++)this.extend(p[g])}function toLatLngBounds(c,d){return c instanceof LatLngBounds?c:new LatLngBounds(c,d)}function LatLng(c,d,p){if(isNaN(c)||isNaN(d))throw new Error("Invalid LatLng object: ("+c+", "+d+")");this.lat=+c,this.lng=+d,void 0!==p&&(this.alt=+p)}function toLatLng(c,d,p){return c instanceof LatLng?c:_i(c)&&"object"!=typeof c[0]?3===c.length?new LatLng(c[0],c[1],c[2]):2===c.length?new LatLng(c[0],c[1]):null:null==c?c:"object"==typeof c&&"lat"in c?new LatLng(c.lat,"lng"in c?c.lng:c.lon,c.alt):void 0===d?null:new LatLng(c,d,p)}Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(c){return this.clone()._add(toPoint(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(toPoint(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new Point(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new Point(this.x/c.x,this.y/c.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Li(this.x),this.y=Li(this.y),this},distanceTo:function(c){var d=(c=toPoint(c)).x-this.x,p=c.y-this.y;return Math.sqrt(d*d+p*p)},equals:function(c){return(c=toPoint(c)).x===this.x&&c.y===this.y},contains:function(c){return c=toPoint(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+formatNum(this.x)+", "+formatNum(this.y)+")"}},Bounds.prototype={extend:function(c){var d,p;if(!c)return this;if(c instanceof Point||"number"==typeof c[0]||"x"in c)d=p=toPoint(c);else if(d=(c=toBounds(c)).min,p=c.max,!d||!p)return this;return this.min||this.max?(this.min.x=Math.min(d.x,this.min.x),this.max.x=Math.max(p.x,this.max.x),this.min.y=Math.min(d.y,this.min.y),this.max.y=Math.max(p.y,this.max.y)):(this.min=d.clone(),this.max=p.clone()),this},getCenter:function(c){return toPoint((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,c)},getBottomLeft:function(){return toPoint(this.min.x,this.max.y)},getTopRight:function(){return toPoint(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(c){var d,p;return(c="number"==typeof c[0]||c instanceof Point?toPoint(c):toBounds(c))instanceof Bounds?(d=c.min,p=c.max):d=p=c,d.x>=this.min.x&&p.x<=this.max.x&&d.y>=this.min.y&&p.y<=this.max.y},intersects:function(c){c=toBounds(c);var d=this.min,p=this.max,g=c.min,f=c.max,_=f.x>=d.x&&g.x<=p.x,y=f.y>=d.y&&g.y<=p.y;return _&&y},overlaps:function(c){c=toBounds(c);var d=this.min,p=this.max,g=c.min,f=c.max,_=f.x>d.x&&g.x<p.x,y=f.y>d.y&&g.y<p.y;return _&&y},isValid:function(){return!(!this.min||!this.max)},pad:function(c){var d=this.min,p=this.max,g=Math.abs(d.x-p.x)*c,f=Math.abs(d.y-p.y)*c;return toBounds(toPoint(d.x-g,d.y-f),toPoint(p.x+g,p.y+f))},equals:function(c){return!!c&&(c=toBounds(c),this.min.equals(c.getTopLeft())&&this.max.equals(c.getBottomRight()))}},LatLngBounds.prototype={extend:function(c){var d,p,g=this._southWest,f=this._northEast;if(c instanceof LatLng)d=c,p=c;else{if(!(c instanceof LatLngBounds))return c?this.extend(toLatLng(c)||toLatLngBounds(c)):this;if(d=c._southWest,p=c._northEast,!d||!p)return this}return g||f?(g.lat=Math.min(d.lat,g.lat),g.lng=Math.min(d.lng,g.lng),f.lat=Math.max(p.lat,f.lat),f.lng=Math.max(p.lng,f.lng)):(this._southWest=new LatLng(d.lat,d.lng),this._northEast=new LatLng(p.lat,p.lng)),this},pad:function(c){var d=this._southWest,p=this._northEast,g=Math.abs(d.lat-p.lat)*c,f=Math.abs(d.lng-p.lng)*c;return new LatLngBounds(new LatLng(d.lat-g,d.lng-f),new LatLng(p.lat+g,p.lng+f))},getCenter:function(){return new LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(c){c="number"==typeof c[0]||c instanceof LatLng||"lat"in c?toLatLng(c):toLatLngBounds(c);var d,p,g=this._southWest,f=this._northEast;return c instanceof LatLngBounds?(d=c.getSouthWest(),p=c.getNorthEast()):d=p=c,d.lat>=g.lat&&p.lat<=f.lat&&d.lng>=g.lng&&p.lng<=f.lng},intersects:function(c){c=toLatLngBounds(c);var d=this._southWest,p=this._northEast,g=c.getSouthWest(),f=c.getNorthEast(),_=f.lat>=d.lat&&g.lat<=p.lat,y=f.lng>=d.lng&&g.lng<=p.lng;return _&&y},overlaps:function(c){c=toLatLngBounds(c);var d=this._southWest,p=this._northEast,g=c.getSouthWest(),f=c.getNorthEast(),_=f.lat>d.lat&&g.lat<p.lat,y=f.lng>d.lng&&g.lng<p.lng;return _&&y},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(c,d){return!!c&&(c=toLatLngBounds(c),this._southWest.equals(c.getSouthWest(),d)&&this._northEast.equals(c.getNorthEast(),d))},isValid:function(){return!(!this._southWest||!this._northEast)}},LatLng.prototype={equals:function(c,d){return!!c&&(c=toLatLng(c),Math.max(Math.abs(this.lat-c.lat),Math.abs(this.lng-c.lng))<=(void 0===d?1e-9:d))},toString:function(c){return"LatLng("+formatNum(this.lat,c)+", "+formatNum(this.lng,c)+")"},distanceTo:function(c){return Mi.distance(this,toLatLng(c))},wrap:function(){return Mi.wrapLatLng(this)},toBounds:function(c){var d=180*c/40075017,p=d/Math.cos(Math.PI/180*this.lat);return toLatLngBounds([this.lat-d,this.lng-p],[this.lat+d,this.lng+p])},clone:function(){return new LatLng(this.lat,this.lng,this.alt)}};var Si={latLngToPoint:function(c,d){var p=this.projection.project(c),g=this.scale(d);return this.transformation._transform(p,g)},pointToLatLng:function(c,d){var p=this.scale(d),g=this.transformation.untransform(c,p);return this.projection.unproject(g)},project:function(c){return this.projection.project(c)},unproject:function(c){return this.projection.unproject(c)},scale:function(c){return 256*Math.pow(2,c)},zoom:function(c){return Math.log(c/256)/Math.LN2},getProjectedBounds:function(c){if(this.infinite)return null;var d=this.projection.bounds,p=this.scale(c);return new Bounds(this.transformation.transform(d.min,p),this.transformation.transform(d.max,p))},infinite:!1,wrapLatLng:function(c){var d=this.wrapLng?wrapNum(c.lng,this.wrapLng,!0):c.lng;return new LatLng(this.wrapLat?wrapNum(c.lat,this.wrapLat,!0):c.lat,d,c.alt)},wrapLatLngBounds:function(c){var d=c.getCenter(),p=this.wrapLatLng(d),g=d.lat-p.lat,f=d.lng-p.lng;if(0===g&&0===f)return c;var _=c.getSouthWest(),y=c.getNorthEast();return new LatLngBounds(new LatLng(_.lat-g,_.lng-f),new LatLng(y.lat-g,y.lng-f))}},Mi=extend({},Si,{wrapLng:[-180,180],R:6371e3,distance:function(c,d){var p=Math.PI/180,g=c.lat*p,f=d.lat*p,_=Math.sin((d.lat-c.lat)*p/2),y=Math.sin((d.lng-c.lng)*p/2),v=_*_+Math.cos(g)*Math.cos(f)*y*y,x=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*x}}),Ei=6378137,Ti={R:Ei,MAX_LATITUDE:85.0511287798,project:function(c){var d=Math.PI/180,p=this.MAX_LATITUDE,g=Math.max(Math.min(p,c.lat),-p),f=Math.sin(g*d);return new Point(this.R*c.lng*d,this.R*Math.log((1+f)/(1-f))/2)},unproject:function(c){var d=180/Math.PI;return new LatLng((2*Math.atan(Math.exp(c.y/this.R))-Math.PI/2)*d,c.x*d/this.R)},bounds:function(){var c=Ei*Math.PI;return new Bounds([-c,-c],[c,c])}()};function Transformation(c,d,p,g){if(_i(c))return this._a=c[0],this._b=c[1],this._c=c[2],void(this._d=c[3]);this._a=c,this._b=d,this._c=p,this._d=g}function toTransformation(c,d,p,g){return new Transformation(c,d,p,g)}Transformation.prototype={transform:function(c,d){return this._transform(c.clone(),d)},_transform:function(c,d){return d=d||1,c.x=d*(this._a*c.x+this._b),c.y=d*(this._c*c.y+this._d),c},untransform:function(c,d){return d=d||1,new Point((c.x/d-this._b)/this._a,(c.y/d-this._d)/this._c)}};var ki=extend({},Mi,{code:"EPSG:3857",projection:Ti,transformation:function(){var c=.5/(Math.PI*Ti.R);return toTransformation(c,.5,-c,.5)}()}),Oi=extend({},ki,{code:"EPSG:900913"});function svgCreate(c){return document.createElementNS("http://www.w3.org/2000/svg",c)}function pointsToPath(c,d){var p,g,f,_,y,v,x="";for(p=0,f=c.length;p<f;p++){for(g=0,_=(y=c[p]).length;g<_;g++)x+=(g?"L":"M")+(v=y[g]).x+" "+v.y;x+=d?fn.svg?"z":"x":""}return x||"M0 0"}var Ii,Ai=document.documentElement.style,Di="ActiveXObject"in window,Bi=Di&&!document.addEventListener,Fi="msLaunchUri"in navigator&&!("documentMode"in document),zi=userAgentContains("webkit"),ji=userAgentContains("android"),Ni=userAgentContains("android 2")||userAgentContains("android 3"),Zi=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Wi=ji&&userAgentContains("Google")&&Zi<537&&!("AudioNode"in window),Ri=!!window.opera,Ui=!Fi&&userAgentContains("chrome"),Hi=userAgentContains("gecko")&&!zi&&!Ri&&!Di,Vi=!Ui&&userAgentContains("safari"),Yi=userAgentContains("phantom"),Gi="OTransition"in Ai,qi=0===navigator.platform.indexOf("Win"),Xi=Di&&"transition"in Ai,$i="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ni,Ki="MozPerspective"in Ai,Ji=!window.L_DISABLE_3D&&(Xi||$i||Ki)&&!Gi&&!Yi,Qi="undefined"!=typeof orientation||userAgentContains("mobile"),tn=Qi&&zi,en=Qi&&$i,nn=!window.PointerEvent&&window.MSPointerEvent,sn=!(!window.PointerEvent&&!nn),rn="ontouchstart"in window||!!window.TouchEvent,an=!window.L_NO_TOUCH&&(rn||sn),ln=Qi&&Ri,hn=Qi&&Hi,cn=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,dn=function(){var c=!1;try{var d=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",falseFn,d),window.removeEventListener("testPassiveEventSupport",falseFn,d)}catch(c){}return c}(),un=!!document.createElement("canvas").getContext,pn=!(!document.createElementNS||!svgCreate("svg").createSVGRect),gn=!!pn&&((Ii=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Ii.firstChild&&Ii.firstChild.namespaceURI)),mn=!pn&&function(){try{var c=document.createElement("div");c.innerHTML='<v:shape adj="1"/>';var d=c.firstChild;return d.style.behavior="url(#default#VML)",d&&"object"==typeof d.adj}catch(c){return!1}}();function userAgentContains(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var fn={ie:Di,ielt9:Bi,edge:Fi,webkit:zi,android:ji,android23:Ni,androidStock:Wi,opera:Ri,chrome:Ui,gecko:Hi,safari:Vi,phantom:Yi,opera12:Gi,win:qi,ie3d:Xi,webkit3d:$i,gecko3d:Ki,any3d:Ji,mobile:Qi,mobileWebkit:tn,mobileWebkit3d:en,msPointer:nn,pointer:sn,touch:an,touchNative:rn,mobileOpera:ln,mobileGecko:hn,retina:cn,passiveEvents:dn,canvas:un,svg:pn,vml:mn,inlineSvg:gn,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},_n=fn.msPointer?"MSPointerDown":"pointerdown",yn=fn.msPointer?"MSPointerMove":"pointermove",vn=fn.msPointer?"MSPointerUp":"pointerup",xn=fn.msPointer?"MSPointerCancel":"pointercancel",Pn={touchstart:_n,touchmove:yn,touchend:vn,touchcancel:xn},wn={touchstart:function _onPointerStart(c,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&preventDefault(d);_handlePointer(c,d)},touchmove:_handlePointer,touchend:_handlePointer,touchcancel:_handlePointer},bn={},Cn=!1;function addPointerListener(c,d,p){return"touchstart"===d&&function _addPointerDocListener(){Cn||(document.addEventListener(_n,_globalPointerDown,!0),document.addEventListener(yn,_globalPointerMove,!0),document.addEventListener(vn,_globalPointerUp,!0),document.addEventListener(xn,_globalPointerUp,!0),Cn=!0)}(),wn[d]?(p=wn[d].bind(this,p),c.addEventListener(Pn[d],p,!1),p):(console.warn("wrong event specified:",d),falseFn)}function _globalPointerDown(c){bn[c.pointerId]=c}function _globalPointerMove(c){bn[c.pointerId]&&(bn[c.pointerId]=c)}function _globalPointerUp(c){delete bn[c.pointerId]}function _handlePointer(c,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){for(var p in d.touches=[],bn)d.touches.push(bn[p]);d.changedTouches=[d],c(d)}}var Ln=200;var Sn,Mn,En,Tn,kn,On=testProp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),In=testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),An="webkitTransition"===In||"OTransition"===In?In+"End":"transitionend";function get(c){return"string"==typeof c?document.getElementById(c):c}function getStyle(c,d){var p=c.style[d]||c.currentStyle&&c.currentStyle[d];if((!p||"auto"===p)&&document.defaultView){var g=document.defaultView.getComputedStyle(c,null);p=g?g[d]:null}return"auto"===p?null:p}function create$1(c,d,p){var g=document.createElement(c);return g.className=d||"",p&&p.appendChild(g),g}function remove(c){var d=c.parentNode;d&&d.removeChild(c)}function empty(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function toFront(c){var d=c.parentNode;d&&d.lastChild!==c&&d.appendChild(c)}function toBack(c){var d=c.parentNode;d&&d.firstChild!==c&&d.insertBefore(c,d.firstChild)}function hasClass(c,d){if(void 0!==c.classList)return c.classList.contains(d);var p=getClass(c);return p.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(p)}function addClass(c,d){if(void 0!==c.classList)for(var p=splitWords(d),g=0,f=p.length;g<f;g++)c.classList.add(p[g]);else if(!hasClass(c,d)){var _=getClass(c);setClass(c,(_?_+" ":"")+d)}}function removeClass(c,d){void 0!==c.classList?c.classList.remove(d):setClass(c,trim((" "+getClass(c)+" ").replace(" "+d+" "," ")))}function setClass(c,d){void 0===c.className.baseVal?c.className=d:c.className.baseVal=d}function getClass(c){return c.correspondingElement&&(c=c.correspondingElement),void 0===c.className.baseVal?c.className:c.className.baseVal}function setOpacity(c,d){"opacity"in c.style?c.style.opacity=d:"filter"in c.style&&function _setOpacityIE(c,d){var p=!1,g="DXImageTransform.Microsoft.Alpha";try{p=c.filters.item(g)}catch(c){if(1===d)return}d=Math.round(100*d),p?(p.Enabled=100!==d,p.Opacity=d):c.style.filter+=" progid:"+g+"(opacity="+d+")"}(c,d)}function testProp(c){for(var d=document.documentElement.style,p=0;p<c.length;p++)if(c[p]in d)return c[p];return!1}function setTransform(c,d,p){var g=d||new Point(0,0);c.style[On]=(fn.ie3d?"translate("+g.x+"px,"+g.y+"px)":"translate3d("+g.x+"px,"+g.y+"px,0)")+(p?" scale("+p+")":"")}function setPosition(c,d){c._leaflet_pos=d,fn.any3d?setTransform(c,d):(c.style.left=d.x+"px",c.style.top=d.y+"px")}function getPosition(c){return c._leaflet_pos||new Point(0,0)}if("onselectstart"in document)Sn=function(){on(window,"selectstart",preventDefault)},Mn=function(){off(window,"selectstart",preventDefault)};else{var Dn=testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Sn=function(){if(Dn){var c=document.documentElement.style;En=c[Dn],c[Dn]="none"}},Mn=function(){Dn&&(document.documentElement.style[Dn]=En,En=void 0)}}function disableImageDrag(){on(window,"dragstart",preventDefault)}function enableImageDrag(){off(window,"dragstart",preventDefault)}function preventOutline(c){for(;-1===c.tabIndex;)c=c.parentNode;c.style&&(restoreOutline(),Tn=c,kn=c.style.outlineStyle,c.style.outlineStyle="none",on(window,"keydown",restoreOutline))}function restoreOutline(){Tn&&(Tn.style.outlineStyle=kn,Tn=void 0,kn=void 0,off(window,"keydown",restoreOutline))}function getSizedParentNode(c){do{c=c.parentNode}while(!(c.offsetWidth&&c.offsetHeight||c===document.body));return c}function getScale(c){var d=c.getBoundingClientRect();return{x:d.width/c.offsetWidth||1,y:d.height/c.offsetHeight||1,boundingClientRect:d}}var Bn={__proto__:null,TRANSFORM:On,TRANSITION:In,TRANSITION_END:An,get:get,getStyle:getStyle,create:create$1,remove:remove,empty:empty,toFront:toFront,toBack:toBack,hasClass:hasClass,addClass:addClass,removeClass:removeClass,setClass:setClass,getClass:getClass,setOpacity:setOpacity,testProp:testProp,setTransform:setTransform,setPosition:setPosition,getPosition:getPosition,get disableTextSelection(){return Sn},get enableTextSelection(){return Mn},disableImageDrag:disableImageDrag,enableImageDrag:enableImageDrag,preventOutline:preventOutline,restoreOutline:restoreOutline,getSizedParentNode:getSizedParentNode,getScale:getScale};function on(c,d,p,g){if(d&&"object"==typeof d)for(var f in d)addOne(c,f,d[f],p);else for(var _=0,y=(d=splitWords(d)).length;_<y;_++)addOne(c,d[_],p,g);return this}var Fn="_leaflet_events";function off(c,d,p,g){if(1===arguments.length)batchRemove(c),delete c[Fn];else if(d&&"object"==typeof d)for(var f in d)removeOne(c,f,d[f],p);else if(d=splitWords(d),2===arguments.length)batchRemove(c,(function(c){return-1!==indexOf(d,c)}));else for(var _=0,y=d.length;_<y;_++)removeOne(c,d[_],p,g);return this}function batchRemove(c,d){for(var p in c[Fn]){var g=p.split(/\d/)[0];d&&!d(g)||removeOne(c,g,null,null,p)}}var zn={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function addOne(c,d,p,g){var f=d+stamp(p)+(g?"_"+stamp(g):"");if(c[Fn]&&c[Fn][f])return this;var handler=function(d){return p.call(g||c,d||window.event)},_=handler;!fn.touchNative&&fn.pointer&&0===d.indexOf("touch")?handler=addPointerListener(c,d,handler):fn.touch&&"dblclick"===d?handler=function addDoubleTapListener(c,d){c.addEventListener("dblclick",d);var p,g=0;function simDblclick(c){if(1===c.detail){if("mouse"!==c.pointerType&&(!c.sourceCapabilities||c.sourceCapabilities.firesTouchEvents)){var f=getPropagationPath(c);if(!f.some((function(c){return c instanceof HTMLLabelElement&&c.attributes.for}))||f.some((function(c){return c instanceof HTMLInputElement||c instanceof HTMLSelectElement}))){var _=Date.now();_-g<=Ln?2==++p&&d(function makeDblclick(c){var d,p,g={};for(p in c)d=c[p],g[p]=d&&d.bind?d.bind(c):d;return c=g,g.type="dblclick",g.detail=2,g.isTrusted=!1,g._simulated=!0,g}(c)):p=1,g=_}}}else p=c.detail}return c.addEventListener("click",simDblclick),{dblclick:d,simDblclick:simDblclick}}(c,handler):"addEventListener"in c?"touchstart"===d||"touchmove"===d||"wheel"===d||"mousewheel"===d?c.addEventListener(zn[d]||d,handler,!!fn.passiveEvents&&{passive:!1}):"mouseenter"===d||"mouseleave"===d?(handler=function(d){d=d||window.event,isExternalTarget(c,d)&&_(d)},c.addEventListener(zn[d],handler,!1)):c.addEventListener(d,_,!1):c.attachEvent("on"+d,handler),c[Fn]=c[Fn]||{},c[Fn][f]=handler}function removeOne(c,d,p,g,f){f=f||d+stamp(p)+(g?"_"+stamp(g):"");var _=c[Fn]&&c[Fn][f];if(!_)return this;!fn.touchNative&&fn.pointer&&0===d.indexOf("touch")?function removePointerListener(c,d,p){Pn[d]?c.removeEventListener(Pn[d],p,!1):console.warn("wrong event specified:",d)}(c,d,_):fn.touch&&"dblclick"===d?function removeDoubleTapListener(c,d){c.removeEventListener("dblclick",d.dblclick),c.removeEventListener("click",d.simDblclick)}(c,_):"removeEventListener"in c?c.removeEventListener(zn[d]||d,_,!1):c.detachEvent("on"+d,_),c[Fn][f]=null}function stopPropagation(c){return c.stopPropagation?c.stopPropagation():c.originalEvent?c.originalEvent._stopped=!0:c.cancelBubble=!0,this}function disableScrollPropagation(c){return addOne(c,"wheel",stopPropagation),this}function disableClickPropagation(c){return on(c,"mousedown touchstart dblclick contextmenu",stopPropagation),c._leaflet_disable_click=!0,this}function preventDefault(c){return c.preventDefault?c.preventDefault():c.returnValue=!1,this}function stop(c){return preventDefault(c),stopPropagation(c),this}function getPropagationPath(c){if(c.composedPath)return c.composedPath();for(var d=[],p=c.target;p;)d.push(p),p=p.parentNode;return d}function getMousePosition(c,d){if(!d)return new Point(c.clientX,c.clientY);var p=getScale(d),g=p.boundingClientRect;return new Point((c.clientX-g.left)/p.x-d.clientLeft,(c.clientY-g.top)/p.y-d.clientTop)}var jn=fn.linux&&fn.chrome?window.devicePixelRatio:fn.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function getWheelDelta(c){return fn.edge?c.wheelDeltaY/2:c.deltaY&&0===c.deltaMode?-c.deltaY/jn:c.deltaY&&1===c.deltaMode?20*-c.deltaY:c.deltaY&&2===c.deltaMode?60*-c.deltaY:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?20*-c.detail:c.detail?c.detail/-32765*60:0}function isExternalTarget(c,d){var p=d.relatedTarget;if(!p)return!0;try{for(;p&&p!==c;)p=p.parentNode}catch(c){return!1}return p!==c}var Nn={__proto__:null,on:on,off:off,stopPropagation:stopPropagation,disableScrollPropagation:disableScrollPropagation,disableClickPropagation:disableClickPropagation,preventDefault:preventDefault,stop:stop,getPropagationPath:getPropagationPath,getMousePosition:getMousePosition,getWheelDelta:getWheelDelta,isExternalTarget:isExternalTarget,addListener:on,removeListener:off},Zn=Ci.extend({run:function(c,d,p,g){this.stop(),this._el=c,this._inProgress=!0,this._duration=p||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=getPosition(c),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=requestAnimFrame(this._animate,this),this._step()},_step:function(c){var d=+new Date-this._startTime,p=1e3*this._duration;d<p?this._runFrame(this._easeOut(d/p),c):(this._runFrame(1),this._complete())},_runFrame:function(c,d){var p=this._startPos.add(this._offset.multiplyBy(c));d&&p._round(),setPosition(this._el,p),this.fire("step")},_complete:function(){cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(c){return 1-Math.pow(1-c,this._easeOutPower)}}),Wn=Ci.extend({options:{crs:ki,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(c,d){d=setOptions(this,d),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(c),this._initLayout(),this._onResize=bind(this._onResize,this),this._initEvents(),d.maxBounds&&this.setMaxBounds(d.maxBounds),void 0!==d.zoom&&(this._zoom=this._limitZoom(d.zoom)),d.center&&void 0!==d.zoom&&this.setView(toLatLng(d.center),d.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=In&&fn.any3d&&!fn.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),on(this._proxy,An,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(c,d,p){if((d=void 0===d?this._zoom:this._limitZoom(d),c=this._limitCenter(toLatLng(c),d,this.options.maxBounds),p=p||{},this._stop(),this._loaded&&!p.reset&&!0!==p)&&(void 0!==p.animate&&(p.zoom=extend({animate:p.animate},p.zoom),p.pan=extend({animate:p.animate,duration:p.duration},p.pan)),this._zoom!==d?this._tryAnimatedZoom&&this._tryAnimatedZoom(c,d,p.zoom):this._tryAnimatedPan(c,p.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(c,d,p.pan&&p.pan.noMoveStart),this},setZoom:function(c,d){return this._loaded?this.setView(this.getCenter(),c,{zoom:d}):(this._zoom=c,this)},zoomIn:function(c,d){return c=c||(fn.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+c,d)},zoomOut:function(c,d){return c=c||(fn.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-c,d)},setZoomAround:function(c,d,p){var g=this.getZoomScale(d),f=this.getSize().divideBy(2),_=(c instanceof Point?c:this.latLngToContainerPoint(c)).subtract(f).multiplyBy(1-1/g),y=this.containerPointToLatLng(f.add(_));return this.setView(y,d,{zoom:p})},_getBoundsCenterZoom:function(c,d){d=d||{},c=c.getBounds?c.getBounds():toLatLngBounds(c);var p=toPoint(d.paddingTopLeft||d.padding||[0,0]),g=toPoint(d.paddingBottomRight||d.padding||[0,0]),f=this.getBoundsZoom(c,!1,p.add(g));if((f="number"==typeof d.maxZoom?Math.min(d.maxZoom,f):f)===1/0)return{center:c.getCenter(),zoom:f};var _=g.subtract(p).divideBy(2),y=this.project(c.getSouthWest(),f),v=this.project(c.getNorthEast(),f);return{center:this.unproject(y.add(v).divideBy(2).add(_),f),zoom:f}},fitBounds:function(c,d){if(!(c=toLatLngBounds(c)).isValid())throw new Error("Bounds are not valid.");var p=this._getBoundsCenterZoom(c,d);return this.setView(p.center,p.zoom,d)},fitWorld:function(c){return this.fitBounds([[-90,-180],[90,180]],c)},panTo:function(c,d){return this.setView(c,this._zoom,{pan:d})},panBy:function(c,d){if(d=d||{},!(c=toPoint(c).round()).x&&!c.y)return this.fire("moveend");if(!0!==d.animate&&!this.getSize().contains(c))return this._resetView(this.unproject(this.project(this.getCenter()).add(c)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Zn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),d.noMoveStart||this.fire("movestart"),!1!==d.animate){addClass(this._mapPane,"leaflet-pan-anim");var p=this._getMapPanePos().subtract(c).round();this._panAnim.run(this._mapPane,p,d.duration||.25,d.easeLinearity)}else this._rawPanBy(c),this.fire("move").fire("moveend");return this},flyTo:function(c,d,p){if(!1===(p=p||{}).animate||!fn.any3d)return this.setView(c,d,p);this._stop();var g=this.project(this.getCenter()),f=this.project(c),_=this.getSize(),y=this._zoom;c=toLatLng(c),d=void 0===d?y:d;var v=Math.max(_.x,_.y),x=v*this.getZoomScale(y,d),C=f.distanceTo(g)||1,L=1.42,M=L*L;function r(c){var d=(x*x-v*v+(c?-1:1)*M*M*C*C)/(2*(c?x:v)*M*C),p=Math.sqrt(d*d+1)-d;return p<1e-9?-18:Math.log(p)}function sinh(c){return(Math.exp(c)-Math.exp(-c))/2}function cosh(c){return(Math.exp(c)+Math.exp(-c))/2}var E=r(0);function u(c){return v*(cosh(E)*function tanh(c){return sinh(c)/cosh(c)}(E+L*c)-sinh(E))/M}var T=Date.now(),k=(r(1)-E)/L,O=p.duration?1e3*p.duration:1e3*k*.8;return this._moveStart(!0,p.noMoveStart),function frame(){var p=(Date.now()-T)/O,_=function easeOut(c){return 1-Math.pow(1-c,1.5)}(p)*k;p<=1?(this._flyToFrame=requestAnimFrame(frame,this),this._move(this.unproject(g.add(f.subtract(g).multiplyBy(u(_)/C)),y),this.getScaleZoom(v/function w(c){return v*(cosh(E)/cosh(E+L*c))}(_),y),{flyTo:!0})):this._move(c,d)._moveEnd(!0)}.call(this),this},flyToBounds:function(c,d){var p=this._getBoundsCenterZoom(c,d);return this.flyTo(p.center,p.zoom,d)},setMaxBounds:function(c){return c=toLatLngBounds(c),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),c.isValid()?(this.options.maxBounds=c,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(c){var d=this.options.minZoom;return this.options.minZoom=c,this._loaded&&d!==c&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(c):this},setMaxZoom:function(c){var d=this.options.maxZoom;return this.options.maxZoom=c,this._loaded&&d!==c&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,d){this._enforcingBounds=!0;var p=this.getCenter(),g=this._limitCenter(p,this._zoom,toLatLngBounds(c));return p.equals(g)||this.panTo(g,d),this._enforcingBounds=!1,this},panInside:function(c,d){var p=toPoint((d=d||{}).paddingTopLeft||d.padding||[0,0]),g=toPoint(d.paddingBottomRight||d.padding||[0,0]),f=this.project(this.getCenter()),_=this.project(c),y=this.getPixelBounds(),v=toBounds([y.min.add(p),y.max.subtract(g)]),x=v.getSize();if(!v.contains(_)){this._enforcingBounds=!0;var C=_.subtract(v.getCenter()),L=v.extend(_).getSize().subtract(x);f.x+=C.x<0?-L.x:L.x,f.y+=C.y<0?-L.y:L.y,this.panTo(this.unproject(f),d),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=extend({animate:!1,pan:!0},!0===c?{animate:!0}:c);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var p=this.getSize(),g=d.divideBy(2).round(),f=p.divideBy(2).round(),_=g.subtract(f);return _.x||_.y?(c.animate&&c.pan?this.panBy(_):(c.pan&&this._rawPanBy(_),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:p})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=extend({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=bind(this._handleGeolocationResponse,this),p=bind(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,p,c):navigator.geolocation.getCurrentPosition(d,p,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var d=c.code,p=c.message||(1===d?"permission denied":2===d?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+p+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var d=new LatLng(c.coords.latitude,c.coords.longitude),p=d.toBounds(2*c.coords.accuracy),g=this._locateOptions;if(g.setView){var f=this.getBoundsZoom(p);this.setView(d,g.maxZoom?Math.min(f,g.maxZoom):f)}var _={latlng:d,bounds:p,timestamp:c.timestamp};for(var y in c.coords)"number"==typeof c.coords[y]&&(_[y]=c.coords[y]);this.fire("locationfound",_)}},addHandler:function(c,d){if(!d)return this;var p=this[c]=new d(this);return this._handlers.push(p),this.options[c]&&p.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(c){this._container._leaflet_id=void 0,this._containerId=void 0}var c;for(c in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[c].remove();for(c in this._panes)remove(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,d){var p=create$1("div","leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),d||this._mapPane);return c&&(this._panes[c]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds();return new LatLngBounds(this.unproject(c.getBottomLeft()),this.unproject(c.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(c,d,p){c=toLatLngBounds(c),p=toPoint(p||[0,0]);var g=this.getZoom()||0,f=this.getMinZoom(),_=this.getMaxZoom(),y=c.getNorthWest(),v=c.getSouthEast(),x=this.getSize().subtract(p),C=toBounds(this.project(v,g),this.project(y,g)).getSize(),L=fn.any3d?this.options.zoomSnap:1,M=x.x/C.x,E=x.y/C.y,T=d?Math.max(M,E):Math.min(M,E);return g=this.getScaleZoom(T,g),L&&(g=Math.round(g/(L/100))*(L/100),g=d?Math.ceil(g/L)*L:Math.floor(g/L)*L),Math.max(f,Math.min(_,g))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,d){var p=this._getTopLeftPoint(c,d);return new Bounds(p,p.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(void 0===c?this.getZoom():c)},getPane:function(c){return"string"==typeof c?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,d){var p=this.options.crs;return d=void 0===d?this._zoom:d,p.scale(c)/p.scale(d)},getScaleZoom:function(c,d){var p=this.options.crs;d=void 0===d?this._zoom:d;var g=p.zoom(c*p.scale(d));return isNaN(g)?1/0:g},project:function(c,d){return d=void 0===d?this._zoom:d,this.options.crs.latLngToPoint(toLatLng(c),d)},unproject:function(c,d){return d=void 0===d?this._zoom:d,this.options.crs.pointToLatLng(toPoint(c),d)},layerPointToLatLng:function(c){var d=toPoint(c).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(c){return this.project(toLatLng(c))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(toLatLng(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(toLatLngBounds(c))},distance:function(c,d){return this.options.crs.distance(toLatLng(c),toLatLng(d))},containerPointToLayerPoint:function(c){return toPoint(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return toPoint(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var d=this.containerPointToLayerPoint(toPoint(c));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(c)))},mouseEventToContainerPoint:function(c){return getMousePosition(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var d=this._container=get(c);if(!d)throw new Error("Map container not found.");if(d._leaflet_id)throw new Error("Map container is already initialized.");on(d,"scroll",this._onScroll,this),this._containerId=stamp(d)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&fn.any3d,addClass(c,"leaflet-container"+(fn.touch?" leaflet-touch":"")+(fn.retina?" leaflet-retina":"")+(fn.ielt9?" leaflet-oldie":"")+(fn.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=getStyle(c,"position");"absolute"!==d&&"relative"!==d&&"fixed"!==d&&"sticky"!==d&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),setPosition(this._mapPane,new Point(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(addClass(c.markerPane,"leaflet-zoom-hide"),addClass(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,d,p){setPosition(this._mapPane,new Point(0,0));var g=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var f=this._zoom!==d;this._moveStart(f,p)._move(c,d)._moveEnd(f),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(c,d){return c&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(c,d,p,g){void 0===d&&(d=this._zoom);var f=this._zoom!==d;return this._zoom=d,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),g?p&&p.pinch&&this.fire("zoom",p):((f||p&&p.pinch)&&this.fire("zoom",p),this.fire("move",p)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){setPosition(this._mapPane,this._getMapPanePos().subtract(c))},_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(c){this._targets={},this._targets[stamp(this._container)]=this;var d=c?off:on;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),fn.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){cancelAnimFrame(this._resizeRequest),this._resizeRequest=requestAnimFrame((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,d){for(var p,g=[],f="mouseout"===d||"mouseover"===d,_=c.target||c.srcElement,y=!1;_;){if((p=this._targets[stamp(_)])&&("click"===d||"preclick"===d)&&this._draggableMoved(p)){y=!0;break}if(p&&p.listens(d,!0)){if(f&&!isExternalTarget(_,c))break;if(g.push(p),f)break}if(_===this._container)break;_=_.parentNode}return g.length||y||f||!this.listens(d,!0)||(g=[this]),g},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var d=c.target||c.srcElement;if(!(!this._loaded||d._leaflet_disable_events||"click"===c.type&&this._isClickDisabled(d))){var p=c.type;"mousedown"===p&&preventOutline(d),this._fireDOMEvent(c,p)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,d,p){if("click"===c.type){var g=extend({},c);g.type="preclick",this._fireDOMEvent(g,g.type,p)}var f=this._findEventTargets(c,d);if(p){for(var _=[],y=0;y<p.length;y++)p[y].listens(d,!0)&&_.push(p[y]);f=_.concat(f)}if(f.length){"contextmenu"===d&&preventDefault(c);var v=f[0],x={originalEvent:c};if("keypress"!==c.type&&"keydown"!==c.type&&"keyup"!==c.type){var C=v.getLatLng&&(!v._radius||v._radius<=10);x.containerPoint=C?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(c),x.layerPoint=this.containerPointToLayerPoint(x.containerPoint),x.latlng=C?v.getLatLng():this.layerPointToLatLng(x.layerPoint)}for(y=0;y<f.length;y++)if(f[y].fire(d,x,!0),x.originalEvent._stopped||!1===f[y].options.bubblingMouseEvents&&-1!==indexOf(this._mouseEvents,d))return}},_draggableMoved:function(c){return(c=c.dragging&&c.dragging.enabled()?c:this).dragging&&c.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var c=0,d=this._handlers.length;c<d;c++)this._handlers[c].disable()},whenReady:function(c,d){return this._loaded?c.call(d||this,{target:this}):this.on("load",c,d),this},_getMapPanePos:function(){return getPosition(this._mapPane)||new Point(0,0)},_moved:function(){var c=this._getMapPanePos();return c&&!c.equals([0,0])},_getTopLeftPoint:function(c,d){return(c&&void 0!==d?this._getNewPixelOrigin(c,d):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(c,d){var p=this.getSize()._divideBy(2);return this.project(c,d)._subtract(p)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(c,d,p){var g=this._getNewPixelOrigin(p,d);return this.project(c,d)._subtract(g)},_latLngBoundsToNewLayerBounds:function(c,d,p){var g=this._getNewPixelOrigin(p,d);return toBounds([this.project(c.getSouthWest(),d)._subtract(g),this.project(c.getNorthWest(),d)._subtract(g),this.project(c.getSouthEast(),d)._subtract(g),this.project(c.getNorthEast(),d)._subtract(g)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(c){return this.latLngToLayerPoint(c).subtract(this._getCenterLayerPoint())},_limitCenter:function(c,d,p){if(!p)return c;var g=this.project(c,d),f=this.getSize().divideBy(2),_=new Bounds(g.subtract(f),g.add(f)),y=this._getBoundsOffset(_,p,d);return Math.abs(y.x)<=1&&Math.abs(y.y)<=1?c:this.unproject(g.add(y),d)},_limitOffset:function(c,d){if(!d)return c;var p=this.getPixelBounds(),g=new Bounds(p.min.add(c),p.max.add(c));return c.add(this._getBoundsOffset(g,d))},_getBoundsOffset:function(c,d,p){var g=toBounds(this.project(d.getNorthEast(),p),this.project(d.getSouthWest(),p)),f=g.min.subtract(c.min),_=g.max.subtract(c.max);return new Point(this._rebound(f.x,-_.x),this._rebound(f.y,-_.y))},_rebound:function(c,d){return c+d>0?Math.round(c-d)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(d))},_limitZoom:function(c){var d=this.getMinZoom(),p=this.getMaxZoom(),g=fn.any3d?this.options.zoomSnap:1;return g&&(c=Math.round(c/g)*g),Math.max(d,Math.min(p,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,d){var p=this._getCenterOffset(c)._trunc();return!(!0!==(d&&d.animate)&&!this.getSize().contains(p))&&(this.panBy(p,d),!0)},_createAnimProxy:function(){var c=this._proxy=create$1("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",(function(c){var d=On,p=this._proxy.style[d];setTransform(this._proxy,this.project(c.center,c.zoom),this.getZoomScale(c.zoom,1)),p===this._proxy.style[d]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){remove(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),d=this.getZoom();setTransform(this._proxy,this.project(c,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,d,p){if(this._animatingZoom)return!0;if(p=p||{},!this._zoomAnimated||!1===p.animate||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(d),f=this._getCenterOffset(c)._divideBy(1-1/g);return!(!0!==p.animate&&!this.getSize().contains(f))&&(requestAnimFrame((function(){this._moveStart(!0,p.noMoveStart||!1)._animateZoom(c,d,!0)}),this),!0)},_animateZoom:function(c,d,p,g){this._mapPane&&(p&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=d,addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:d,noUpdate:g}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(bind(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&removeClass(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))}});function createMap(c,d){return new Wn(c,d)}var Rn=Class.extend({options:{position:"topright"},initialize:function(c){setOptions(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var d=this._map;return d&&d.removeControl(this),this.options.position=c,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var d=this._container=this.onAdd(c),p=this.getPosition(),g=c._controlCorners[p];return addClass(d,"leaflet-control"),-1!==p.indexOf("bottom")?g.insertBefore(d,g.firstChild):g.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(remove(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),control=function(c){return new Rn(c)};Wn.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},d="leaflet-",p=this._controlContainer=create$1("div",d+"control-container",this._container);function createCorner(g,f){var _=d+g+" "+d+f;c[g+f]=create$1("div",_,p)}createCorner("top","left"),createCorner("top","right"),createCorner("bottom","left"),createCorner("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)remove(this._controlCorners[c]);remove(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Un=Rn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,d,p,g){return p<g?-1:g<p?1:0}},initialize:function(c,d,p){for(var g in setOptions(this,p),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,c)this._addLayer(c[g],g);for(g in d)this._addLayer(d[g],g,!0)},onAdd:function(c){this._initLayout(),this._update(),this._map=c,c.on("zoomend",this._checkDisabledLayers,this);for(var d=0;d<this._layers.length;d++)this._layers[d].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(c){return Rn.prototype.addTo.call(this,c),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(c,d){return this._addLayer(c,d),this._map?this._update():this},addOverlay:function(c,d){return this._addLayer(c,d,!0),this._map?this._update():this},removeLayer:function(c){c.off("add remove",this._onLayerChange,this);var d=this._getLayer(stamp(c));return d&&this._layers.splice(this._layers.indexOf(d),1),this._map?this._update():this},expand:function(){addClass(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var c=this._map.getSize().y-(this._container.offsetTop+50);return c<this._section.clientHeight?(addClass(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=c+"px"):removeClass(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var c="leaflet-control-layers",d=this._container=create$1("div",c),p=this.options.collapsed;d.setAttribute("aria-haspopup",!0),disableClickPropagation(d),disableScrollPropagation(d);var g=this._section=create$1("section",c+"-list");p&&(this._map.on("click",this.collapse,this),on(d,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var f=this._layersLink=create$1("a",c+"-toggle",d);f.href="#",f.title="Layers",f.setAttribute("role","button"),on(f,{keydown:function(c){13===c.keyCode&&this._expandSafely()},click:function(c){preventDefault(c),this._expandSafely()}},this),p||this.expand(),this._baseLayersList=create$1("div",c+"-base",g),this._separator=create$1("div",c+"-separator",g),this._overlaysList=create$1("div",c+"-overlays",g),d.appendChild(g)},_getLayer:function(c){for(var d=0;d<this._layers.length;d++)if(this._layers[d]&&stamp(this._layers[d].layer)===c)return this._layers[d]},_addLayer:function(c,d,p){this._map&&c.on("add remove",this._onLayerChange,this),this._layers.push({layer:c,name:d,overlay:p}),this.options.sortLayers&&this._layers.sort(bind((function(c,d){return this.options.sortFunction(c.layer,d.layer,c.name,d.name)}),this)),this.options.autoZIndex&&c.setZIndex&&(this._lastZIndex++,c.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;empty(this._baseLayersList),empty(this._overlaysList),this._layerControlInputs=[];var c,d,p,g,f=0;for(p=0;p<this._layers.length;p++)g=this._layers[p],this._addItem(g),d=d||g.overlay,c=c||!g.overlay,f+=g.overlay?0:1;return this.options.hideSingleBase&&(c=c&&f>1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=d&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var d=this._getLayer(stamp(c.target)),p=d.overlay?"add"===c.type?"overlayadd":"overlayremove":"add"===c.type?"baselayerchange":null;p&&this._map.fire(p,d)},_createRadioElement:function(c,d){var p='<input type="radio" class="leaflet-control-layers-selector" name="'+c+'"'+(d?' checked="checked"':"")+"/>",g=document.createElement("div");return g.innerHTML=p,g.firstChild},_addItem:function(c){var d,p=document.createElement("label"),g=this._map.hasLayer(c.layer);c.overlay?((d=document.createElement("input")).type="checkbox",d.className="leaflet-control-layers-selector",d.defaultChecked=g):d=this._createRadioElement("leaflet-base-layers_"+stamp(this),g),this._layerControlInputs.push(d),d.layerId=stamp(c.layer),on(d,"click",this._onInputClick,this);var f=document.createElement("span");f.innerHTML=" "+c.name;var _=document.createElement("span");return p.appendChild(_),_.appendChild(d),_.appendChild(f),(c.overlay?this._overlaysList:this._baseLayersList).appendChild(p),this._checkDisabledLayers(),p},_onInputClick:function(){if(!this._preventClick){var c,d,p=this._layerControlInputs,g=[],f=[];this._handlingClick=!0;for(var _=p.length-1;_>=0;_--)c=p[_],d=this._getLayer(c.layerId).layer,c.checked?g.push(d):c.checked||f.push(d);for(_=0;_<f.length;_++)this._map.hasLayer(f[_])&&this._map.removeLayer(f[_]);for(_=0;_<g.length;_++)this._map.hasLayer(g[_])||this._map.addLayer(g[_]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var c,d,p=this._layerControlInputs,g=this._map.getZoom(),f=p.length-1;f>=0;f--)c=p[f],d=this._getLayer(c.layerId).layer,c.disabled=void 0!==d.options.minZoom&&g<d.options.minZoom||void 0!==d.options.maxZoom&&g>d.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,on(c,"click",preventDefault),this.expand();var d=this;setTimeout((function(){off(c,"click",preventDefault),d._preventClick=!1}))}}),Hn=Rn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(c){var d="leaflet-control-zoom",p=create$1("div",d+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,d+"-in",p,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,d+"-out",p,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),p},onRemove:function(c){c.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(c){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(c.shiftKey?3:1))},_zoomOut:function(c){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,d,p,g,f){var _=create$1("a",p,g);return _.innerHTML=c,_.href="#",_.title=d,_.setAttribute("role","button"),_.setAttribute("aria-label",d),disableClickPropagation(_),on(_,"click",stop),on(_,"click",f,this),on(_,"click",this._refocusOnMap,this),_},_updateDisabled:function(){var c=this._map,d="leaflet-disabled";removeClass(this._zoomInButton,d),removeClass(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(addClass(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(addClass(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});Wn.mergeOptions({zoomControl:!0}),Wn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Hn,this.addControl(this.zoomControl))}));var Vn=Rn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var d="leaflet-control-scale",p=create$1("div",d),g=this.options;return this._addScales(g,d+"-line",p),c.on(g.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),p},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,d,p){c.metric&&(this._mScale=create$1("div",d,p)),c.imperial&&(this._iScale=create$1("div",d,p))},_update:function(){var c=this._map,d=c.getSize().y/2,p=c.distance(c.containerPointToLatLng([0,d]),c.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(p)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var d=this._getRoundNum(c),p=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,p,d/c)},_updateImperial:function(c){var d,p,g,f=3.2808399*c;f>5280?(d=f/5280,p=this._getRoundNum(d),this._updateScale(this._iScale,p+" mi",p/d)):(g=this._getRoundNum(f),this._updateScale(this._iScale,g+" ft",g/f))},_updateScale:function(c,d,p){c.style.width=Math.round(this.options.maxWidth*p)+"px",c.innerHTML=d},_getRoundNum:function(c){var d=Math.pow(10,(Math.floor(c)+"").length-1),p=c/d;return d*(p=p>=10?10:p>=5?5:p>=3?3:p>=2?2:1)}}),Yn=Rn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(fn.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(c){setOptions(this,c),this._attributions={}},onAdd:function(c){for(var d in c.attributionControl=this,this._container=create$1("div","leaflet-control-attribution"),disableClickPropagation(this._container),c._layers)c._layers[d].getAttribution&&this.addAttribution(c._layers[d].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",(function(){this.removeAttribution(c.layer.getAttribution())}),this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var d in this._attributions)this._attributions[d]&&c.push(d);var p=[];this.options.prefix&&p.push(this.options.prefix),c.length&&p.push(c.join(", ")),this._container.innerHTML=p.join(' <span aria-hidden="true">|</span> ')}}});Wn.mergeOptions({attributionControl:!0}),Wn.addInitHook((function(){this.options.attributionControl&&(new Yn).addTo(this)}));Rn.Layers=Un,Rn.Zoom=Hn,Rn.Scale=Vn,Rn.Attribution=Yn,control.layers=function(c,d,p){return new Un(c,d,p)},control.zoom=function(c){return new Hn(c)},control.scale=function(c){return new Vn(c)},control.attribution=function(c){return new Yn(c)};var Gn=Class.extend({initialize:function(c){this._map=c},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}});Gn.addTo=function(c,d){return c.addHandler(d,this),this};var qn={Events:bi},Xn=fn.touch?"touchstart mousedown":"mousedown",$n=Ci.extend({options:{clickTolerance:3},initialize:function(c,d,p,g){setOptions(this,g),this._element=c,this._dragStartTarget=d||c,this._preventOutline=p},enable:function(){this._enabled||(on(this._dragStartTarget,Xn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&($n._dragging===this&&this.finishDrag(!0),off(this._dragStartTarget,Xn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!hasClass(this._element,"leaflet-zoom-anim")))if(c.touches&&1!==c.touches.length)$n._dragging===this&&this.finishDrag();else if(!($n._dragging||c.shiftKey||1!==c.which&&1!==c.button&&!c.touches||($n._dragging=this,this._preventOutline&&preventOutline(this._element),disableImageDrag(),Sn(),this._moving))){this.fire("down");var d=c.touches?c.touches[0]:c,p=getSizedParentNode(this._element);this._startPoint=new Point(d.clientX,d.clientY),this._startPos=getPosition(this._element),this._parentScale=getScale(p);var g="mousedown"===c.type;on(document,g?"mousemove":"touchmove",this._onMove,this),on(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(c){if(this._enabled)if(c.touches&&c.touches.length>1)this._moved=!0;else{var d=c.touches&&1===c.touches.length?c.touches[0]:c,p=new Point(d.clientX,d.clientY)._subtract(this._startPoint);(p.x||p.y)&&(Math.abs(p.x)+Math.abs(p.y)<this.options.clickTolerance||(p.x/=this._parentScale.x,p.y/=this._parentScale.y,preventDefault(c),this._moved||(this.fire("dragstart"),this._moved=!0,addClass(document.body,"leaflet-dragging"),this._lastTarget=c.target||c.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(p),this._moving=!0,this._lastEvent=c,this._updatePosition()))}},_updatePosition:function(){var c={originalEvent:this._lastEvent};this.fire("predrag",c),setPosition(this._element,this._newPos),this.fire("drag",c)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(c){removeClass(document.body,"leaflet-dragging"),this._lastTarget&&(removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),off(document,"mousemove touchmove",this._onMove,this),off(document,"mouseup touchend touchcancel",this._onUp,this),enableImageDrag(),Mn();var d=this._moved&&this._moving;this._moving=!1,$n._dragging=!1,d&&this.fire("dragend",{noInertia:c,distance:this._newPos.distanceTo(this._startPos)})}});function clipPolygon(c,d,p){var g,f,_,y,v,x,C,L,M,E=[1,4,2,8];for(f=0,C=c.length;f<C;f++)c[f]._code=_getBitCode(c[f],d);for(y=0;y<4;y++){for(L=E[y],g=[],f=0,_=(C=c.length)-1;f<C;_=f++)v=c[f],x=c[_],v._code&L?x._code&L||((M=_getEdgeIntersection(x,v,L,d,p))._code=_getBitCode(M,d),g.push(M)):(x._code&L&&((M=_getEdgeIntersection(x,v,L,d,p))._code=_getBitCode(M,d),g.push(M)),g.push(v));c=g}return c}function polygonCenter(c,d){var p,g,f,_,y,v,x,C,L;if(!c||0===c.length)throw new Error("latlngs not passed");isFlat(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var M=toLatLng([0,0]),E=toLatLngBounds(c);E.getNorthWest().distanceTo(E.getSouthWest())*E.getNorthEast().distanceTo(E.getNorthWest())<1700&&(M=centroid(c));var T=c.length,k=[];for(p=0;p<T;p++){var O=toLatLng(c[p]);k.push(d.project(toLatLng([O.lat-M.lat,O.lng-M.lng])))}for(v=x=C=0,p=0,g=T-1;p<T;g=p++)f=k[p],_=k[g],y=f.y*_.x-_.y*f.x,x+=(f.x+_.x)*y,C+=(f.y+_.y)*y,v+=3*y;L=0===v?k[0]:[x/v,C/v];var I=d.unproject(toPoint(L));return toLatLng([I.lat+M.lat,I.lng+M.lng])}function centroid(c){for(var d=0,p=0,g=0,f=0;f<c.length;f++){var _=toLatLng(c[f]);d+=_.lat,p+=_.lng,g++}return toLatLng([d/g,p/g])}var Kn,Jn={__proto__:null,clipPolygon:clipPolygon,polygonCenter:polygonCenter,centroid:centroid};function simplify(c,d){if(!d||!c.length)return c.slice();var p=d*d;return c=function _reducePoints(c,d){for(var p=[c[0]],g=1,f=0,_=c.length;g<_;g++)_sqDist(c[g],c[f])>d&&(p.push(c[g]),f=g);f<_-1&&p.push(c[_-1]);return p}(c,p),c=function _simplifyDP(c,d){var p=c.length,g=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(p);g[0]=g[p-1]=1,_simplifyDPStep(c,g,d,0,p-1);var f,_=[];for(f=0;f<p;f++)g[f]&&_.push(c[f]);return _}(c,p),c}function pointToSegmentDistance(c,d,p){return Math.sqrt(_sqClosestPointOnSegment(c,d,p,!0))}function _simplifyDPStep(c,d,p,g,f){var _,y,v,x=0;for(y=g+1;y<=f-1;y++)(v=_sqClosestPointOnSegment(c[y],c[g],c[f],!0))>x&&(_=y,x=v);x>p&&(d[_]=1,_simplifyDPStep(c,d,p,g,_),_simplifyDPStep(c,d,p,_,f))}function clipSegment(c,d,p,g,f){var _,y,v,x=g?Kn:_getBitCode(c,p),C=_getBitCode(d,p);for(Kn=C;;){if(!(x|C))return[c,d];if(x&C)return!1;v=_getBitCode(y=_getEdgeIntersection(c,d,_=x||C,p,f),p),_===x?(c=y,x=v):(d=y,C=v)}}function _getEdgeIntersection(c,d,p,g,f){var _,y,v=d.x-c.x,x=d.y-c.y,C=g.min,L=g.max;return 8&p?(_=c.x+v*(L.y-c.y)/x,y=L.y):4&p?(_=c.x+v*(C.y-c.y)/x,y=C.y):2&p?(_=L.x,y=c.y+x*(L.x-c.x)/v):1&p&&(_=C.x,y=c.y+x*(C.x-c.x)/v),new Point(_,y,f)}function _getBitCode(c,d){var p=0;return c.x<d.min.x?p|=1:c.x>d.max.x&&(p|=2),c.y<d.min.y?p|=4:c.y>d.max.y&&(p|=8),p}function _sqDist(c,d){var p=d.x-c.x,g=d.y-c.y;return p*p+g*g}function _sqClosestPointOnSegment(c,d,p,g){var f,_=d.x,y=d.y,v=p.x-_,x=p.y-y,C=v*v+x*x;return C>0&&((f=((c.x-_)*v+(c.y-y)*x)/C)>1?(_=p.x,y=p.y):f>0&&(_+=v*f,y+=x*f)),v=c.x-_,x=c.y-y,g?v*v+x*x:new Point(_,y)}function isFlat(c){return!_i(c[0])||"object"!=typeof c[0][0]&&void 0!==c[0][0]}function _flat(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),isFlat(c)}function polylineCenter(c,d){var p,g,f,_,y,v,x,C;if(!c||0===c.length)throw new Error("latlngs not passed");isFlat(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var L=toLatLng([0,0]),M=toLatLngBounds(c);M.getNorthWest().distanceTo(M.getSouthWest())*M.getNorthEast().distanceTo(M.getNorthWest())<1700&&(L=centroid(c));var E=c.length,T=[];for(p=0;p<E;p++){var k=toLatLng(c[p]);T.push(d.project(toLatLng([k.lat-L.lat,k.lng-L.lng])))}for(p=0,g=0;p<E-1;p++)g+=T[p].distanceTo(T[p+1])/2;if(0===g)C=T[0];else for(p=0,_=0;p<E-1;p++)if(y=T[p],v=T[p+1],(_+=f=y.distanceTo(v))>g){x=(_-g)/f,C=[v.x-x*(v.x-y.x),v.y-x*(v.y-y.y)];break}var O=d.unproject(toPoint(C));return toLatLng([O.lat+L.lat,O.lng+L.lng])}var Qn={__proto__:null,simplify:simplify,pointToSegmentDistance:pointToSegmentDistance,closestPointOnSegment:function closestPointOnSegment(c,d,p){return _sqClosestPointOnSegment(c,d,p)},clipSegment:clipSegment,_getEdgeIntersection:_getEdgeIntersection,_getBitCode:_getBitCode,_sqClosestPointOnSegment:_sqClosestPointOnSegment,isFlat:isFlat,_flat:_flat,polylineCenter:polylineCenter},to={project:function(c){return new Point(c.lng,c.lat)},unproject:function(c){return new LatLng(c.y,c.x)},bounds:new Bounds([-180,-90],[180,90])},eo={R:6378137,R_MINOR:6356752.314245179,bounds:new Bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(c){var d=Math.PI/180,p=this.R,g=c.lat*d,f=this.R_MINOR/p,_=Math.sqrt(1-f*f),y=_*Math.sin(g),v=Math.tan(Math.PI/4-g/2)/Math.pow((1-y)/(1+y),_/2);return g=-p*Math.log(Math.max(v,1e-10)),new Point(c.lng*d*p,g)},unproject:function(c){for(var d,p=180/Math.PI,g=this.R,f=this.R_MINOR/g,_=Math.sqrt(1-f*f),y=Math.exp(-c.y/g),v=Math.PI/2-2*Math.atan(y),x=0,C=.1;x<15&&Math.abs(C)>1e-7;x++)d=_*Math.sin(v),d=Math.pow((1-d)/(1+d),_/2),v+=C=Math.PI/2-2*Math.atan(y*d)-v;return new LatLng(v*p,c.x*p/g)}},io={__proto__:null,LonLat:to,Mercator:eo,SphericalMercator:Ti},no=extend({},Mi,{code:"EPSG:3395",projection:eo,transformation:function(){var c=.5/(Math.PI*eo.R);return toTransformation(c,.5,-c,.5)}()}),oo=extend({},Mi,{code:"EPSG:4326",projection:to,transformation:toTransformation(1/180,1,-1/180,.5)}),so=extend({},Si,{projection:to,transformation:toTransformation(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,d){var p=d.lng-c.lng,g=d.lat-c.lat;return Math.sqrt(p*p+g*g)},infinite:!0});Si.Earth=Mi,Si.EPSG3395=no,Si.EPSG3857=ki,Si.EPSG900913=Oi,Si.EPSG4326=oo,Si.Simple=so;var ro=Ci.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[stamp(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[stamp(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var d=c.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var p=this.getEvents();d.on(p,this),this.once("remove",(function(){d.off(p,this)}),this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});Wn.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var d=stamp(c);return this._layers[d]||(this._layers[d]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c)),this},removeLayer:function(c){var d=stamp(c);return this._layers[d]?(this._loaded&&c.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return stamp(c)in this._layers},eachLayer:function(c,d){for(var p in this._layers)c.call(d,this._layers[p]);return this},_addLayers:function(c){for(var d=0,p=(c=c?_i(c)?c:[c]:[]).length;d<p;d++)this.addLayer(c[d])},_addZoomLimit:function(c){isNaN(c.options.maxZoom)&&isNaN(c.options.minZoom)||(this._zoomBoundLayers[stamp(c)]=c,this._updateZoomLevels())},_removeZoomLimit:function(c){var d=stamp(c);this._zoomBoundLayers[d]&&(delete this._zoomBoundLayers[d],this._updateZoomLevels())},_updateZoomLevels:function(){var c=1/0,d=-1/0,p=this._getZoomSpan();for(var g in this._zoomBoundLayers){var f=this._zoomBoundLayers[g].options;c=void 0===f.minZoom?c:Math.min(c,f.minZoom),d=void 0===f.maxZoom?d:Math.max(d,f.maxZoom)}this._layersMaxZoom=d===-1/0?void 0:d,this._layersMinZoom=c===1/0?void 0:c,p!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ao=ro.extend({initialize:function(c,d){var p,g;if(setOptions(this,d),this._layers={},c)for(p=0,g=c.length;p<g;p++)this.addLayer(c[p])},addLayer:function(c){var d=this.getLayerId(c);return this._layers[d]=c,this._map&&this._map.addLayer(c),this},removeLayer:function(c){var d=c in this._layers?c:this.getLayerId(c);return this._map&&this._layers[d]&&this._map.removeLayer(this._layers[d]),delete this._layers[d],this},hasLayer:function(c){return("number"==typeof c?c:this.getLayerId(c))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(c){var d,p,g=Array.prototype.slice.call(arguments,1);for(d in this._layers)(p=this._layers[d])[c]&&p[c].apply(p,g);return this},onAdd:function(c){this.eachLayer(c.addLayer,c)},onRemove:function(c){this.eachLayer(c.removeLayer,c)},eachLayer:function(c,d){for(var p in this._layers)c.call(d,this._layers[p]);return this},getLayer:function(c){return this._layers[c]},getLayers:function(){var c=[];return this.eachLayer(c.push,c),c},setZIndex:function(c){return this.invoke("setZIndex",c)},getLayerId:function(c){return stamp(c)}}),lo=ao.extend({addLayer:function(c){return this.hasLayer(c)?this:(c.addEventParent(this),ao.prototype.addLayer.call(this,c),this.fire("layeradd",{layer:c}))},removeLayer:function(c){return this.hasLayer(c)?(c in this._layers&&(c=this._layers[c]),c.removeEventParent(this),ao.prototype.removeLayer.call(this,c),this.fire("layerremove",{layer:c})):this},setStyle:function(c){return this.invoke("setStyle",c)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var c=new LatLngBounds;for(var d in this._layers){var p=this._layers[d];c.extend(p.getBounds?p.getBounds():p.getLatLng())}return c}}),ho=Class.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(c){setOptions(this,c)},createIcon:function(c){return this._createIcon("icon",c)},createShadow:function(c){return this._createIcon("shadow",c)},_createIcon:function(c,d){var p=this._getIconUrl(c);if(!p){if("icon"===c)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var g=this._createImg(p,d&&"IMG"===d.tagName?d:null);return this._setIconStyles(g,c),(this.options.crossOrigin||""===this.options.crossOrigin)&&(g.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),g},_setIconStyles:function(c,d){var p=this.options,g=p[d+"Size"];"number"==typeof g&&(g=[g,g]);var f=toPoint(g),_=toPoint("shadow"===d&&p.shadowAnchor||p.iconAnchor||f&&f.divideBy(2,!0));c.className="leaflet-marker-"+d+" "+(p.className||""),_&&(c.style.marginLeft=-_.x+"px",c.style.marginTop=-_.y+"px"),f&&(c.style.width=f.x+"px",c.style.height=f.y+"px")},_createImg:function(c,d){return(d=d||document.createElement("img")).src=c,d},_getIconUrl:function(c){return fn.retina&&this.options[c+"RetinaUrl"]||this.options[c+"Url"]}});var co=ho.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(c){return"string"!=typeof co.imagePath&&(co.imagePath=this._detectIconPath()),(this.options.imagePath||co.imagePath)+ho.prototype._getIconUrl.call(this,c)},_stripUrl:function(c){var strip=function(c,d,p){var g=d.exec(c);return g&&g[p]};return(c=strip(c,/^url\((['"])?(.+)\1\)$/,2))&&strip(c,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var c=create$1("div","leaflet-default-icon-path",document.body),d=getStyle(c,"background-image")||getStyle(c,"backgroundImage");if(document.body.removeChild(c),d=this._stripUrl(d))return d;var p=document.querySelector('link[href$="leaflet.css"]');return p?p.href.substring(0,p.href.length-11-1):""}}),uo=Gn.extend({initialize:function(c){this._marker=c},addHooks:function(){var c=this._marker._icon;this._draggable||(this._draggable=new $n(c,c,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),addClass(c,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(c){var d=this._marker,p=d._map,g=this._marker.options.autoPanSpeed,f=this._marker.options.autoPanPadding,_=getPosition(d._icon),y=p.getPixelBounds(),v=p.getPixelOrigin(),x=toBounds(y.min._subtract(v).add(f),y.max._subtract(v).subtract(f));if(!x.contains(_)){var C=toPoint((Math.max(x.max.x,_.x)-x.max.x)/(y.max.x-x.max.x)-(Math.min(x.min.x,_.x)-x.min.x)/(y.min.x-x.min.x),(Math.max(x.max.y,_.y)-x.max.y)/(y.max.y-x.max.y)-(Math.min(x.min.y,_.y)-x.min.y)/(y.min.y-x.min.y)).multiplyBy(g);p.panBy(C,{animate:!1}),this._draggable._newPos._add(C),this._draggable._startPos._add(C),setPosition(d._icon,this._draggable._newPos),this._onDrag(c),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,c))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(c){this._marker.options.autoPan&&(cancelAnimFrame(this._panRequest),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,c)))},_onDrag:function(c){var d=this._marker,p=d._shadow,g=getPosition(d._icon),f=d._map.layerPointToLatLng(g);p&&setPosition(p,g),d._latlng=f,c.latlng=f,c.oldLatLng=this._oldLatLng,d.fire("move",c).fire("drag",c)},_onDragEnd:function(c){cancelAnimFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",c)}}),po=ro.extend({options:{icon:new co,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(c,d){setOptions(this,d),this._latlng=toLatLng(c)},onAdd:function(c){this._zoomAnimated=this._zoomAnimated&&c.options.markerZoomAnimation,this._zoomAnimated&&c.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(c){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&c.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(c){var d=this._latlng;return this._latlng=toLatLng(c),this.update(),this.fire("move",{oldLatLng:d,latlng:this._latlng})},setZIndexOffset:function(c){return this.options.zIndexOffset=c,this.update()},getIcon:function(){return this.options.icon},setIcon:function(c){return this.options.icon=c,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var c=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(c)}return this},_initIcon:function(){var c=this.options,d="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),p=c.icon.createIcon(this._icon),g=!1;p!==this._icon&&(this._icon&&this._removeIcon(),g=!0,c.title&&(p.title=c.title),"IMG"===p.tagName&&(p.alt=c.alt||"")),addClass(p,d),c.keyboard&&(p.tabIndex="0",p.setAttribute("role","button")),this._icon=p,c.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&on(p,"focus",this._panOnFocus,this);var f=c.icon.createShadow(this._shadow),_=!1;f!==this._shadow&&(this._removeShadow(),_=!0),f&&(addClass(f,d),f.alt=""),this._shadow=f,c.opacity<1&&this._updateOpacity(),g&&this.getPane().appendChild(this._icon),this._initInteraction(),f&&_&&this.getPane(c.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&off(this._icon,"focus",this._panOnFocus,this),remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&remove(this._shadow),this._shadow=null},_setPos:function(c){this._icon&&setPosition(this._icon,c),this._shadow&&setPosition(this._shadow,c),this._zIndex=c.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(c){this._icon&&(this._icon.style.zIndex=this._zIndex+c)},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center).round();this._setPos(d)},_initInteraction:function(){if(this.options.interactive&&(addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),uo)){var c=this.options.draggable;this.dragging&&(c=this.dragging.enabled(),this.dragging.disable()),this.dragging=new uo(this),c&&this.dragging.enable()}},setOpacity:function(c){return this.options.opacity=c,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var c=this.options.opacity;this._icon&&setOpacity(this._icon,c),this._shadow&&setOpacity(this._shadow,c)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var c=this._map;if(c){var d=this.options.icon.options,p=d.iconSize?toPoint(d.iconSize):toPoint(0,0),g=d.iconAnchor?toPoint(d.iconAnchor):toPoint(0,0);c.panInside(this._latlng,{paddingTopLeft:g,paddingBottomRight:p.subtract(g)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function marker(c,d){return new po(c,d)}var go=ro.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(c){this._renderer=c.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(c){return setOptions(this,c),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&c&&Object.prototype.hasOwnProperty.call(c,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),mo=go.extend({options:{fill:!0,radius:10},initialize:function(c,d){setOptions(this,d),this._latlng=toLatLng(c),this._radius=this.options.radius},setLatLng:function(c){var d=this._latlng;return this._latlng=toLatLng(c),this.redraw(),this.fire("move",{oldLatLng:d,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(c){return this.options.radius=this._radius=c,this.redraw()},getRadius:function(){return this._radius},setStyle:function(c){var d=c&&c.radius||this._radius;return go.prototype.setStyle.call(this,c),this.setRadius(d),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var c=this._radius,d=this._radiusY||c,p=this._clickTolerance(),g=[c+p,d+p];this._pxBounds=new Bounds(this._point.subtract(g),this._point.add(g))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(c){return c.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var fo=mo.extend({initialize:function(c,d,p){if("number"==typeof d&&(d=extend({},p,{radius:d})),setOptions(this,d),this._latlng=toLatLng(c),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(c){return this._mRadius=c,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var c=[this._radius,this._radiusY||this._radius];return new LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(c)),this._map.layerPointToLatLng(this._point.add(c)))},setStyle:go.prototype.setStyle,_project:function(){var c=this._latlng.lng,d=this._latlng.lat,p=this._map,g=p.options.crs;if(g.distance===Mi.distance){var f=Math.PI/180,_=this._mRadius/Mi.R/f,y=p.project([d+_,c]),v=p.project([d-_,c]),x=y.add(v).divideBy(2),C=p.unproject(x).lat,L=Math.acos((Math.cos(_*f)-Math.sin(d*f)*Math.sin(C*f))/(Math.cos(d*f)*Math.cos(C*f)))/f;(isNaN(L)||0===L)&&(L=_/Math.cos(Math.PI/180*d)),this._point=x.subtract(p.getPixelOrigin()),this._radius=isNaN(L)?0:x.x-p.project([C,c-L]).x,this._radiusY=x.y-y.y}else{var M=g.unproject(g.project(this._latlng).subtract([this._mRadius,0]));this._point=p.latLngToLayerPoint(this._latlng),this._radius=this._point.x-p.latLngToLayerPoint(M).x}this._updateBounds()}});var _o=go.extend({options:{smoothFactor:1,noClip:!1},initialize:function(c,d){setOptions(this,d),this._setLatLngs(c)},getLatLngs:function(){return this._latlngs},setLatLngs:function(c){return this._setLatLngs(c),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(c){for(var d,p,g=1/0,f=null,_=_sqClosestPointOnSegment,y=0,v=this._parts.length;y<v;y++)for(var x=this._parts[y],C=1,L=x.length;C<L;C++){var M=_(c,d=x[C-1],p=x[C],!0);M<g&&(g=M,f=_(c,d,p))}return f&&(f.distance=Math.sqrt(g)),f},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polylineCenter(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(c,d){return d=d||this._defaultShape(),c=toLatLng(c),d.push(c),this._bounds.extend(c),this.redraw()},_setLatLngs:function(c){this._bounds=new LatLngBounds,this._latlngs=this._convertLatLngs(c)},_defaultShape:function(){return isFlat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){for(var d=[],p=isFlat(c),g=0,f=c.length;g<f;g++)p?(d[g]=toLatLng(c[g]),this._bounds.extend(d[g])):d[g]=this._convertLatLngs(c[g]);return d},_project:function(){var c=new Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,c),this._bounds.isValid()&&c.isValid()&&(this._rawPxBounds=c,this._updateBounds())},_updateBounds:function(){var c=this._clickTolerance(),d=new Point(c,c);this._rawPxBounds&&(this._pxBounds=new Bounds([this._rawPxBounds.min.subtract(d),this._rawPxBounds.max.add(d)]))},_projectLatlngs:function(c,d,p){var g,f,_=c[0]instanceof LatLng,y=c.length;if(_){for(f=[],g=0;g<y;g++)f[g]=this._map.latLngToLayerPoint(c[g]),p.extend(f[g]);d.push(f)}else for(g=0;g<y;g++)this._projectLatlngs(c[g],d,p)},_clipPoints:function(){var c=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(c))if(this.options.noClip)this._parts=this._rings;else{var d,p,g,f,_,y,v,x=this._parts;for(d=0,g=0,f=this._rings.length;d<f;d++)for(p=0,_=(v=this._rings[d]).length;p<_-1;p++)(y=clipSegment(v[p],v[p+1],c,p,!0))&&(x[g]=x[g]||[],x[g].push(y[0]),y[1]===v[p+1]&&p!==_-2||(x[g].push(y[1]),g++))}},_simplifyPoints:function(){for(var c=this._parts,d=this.options.smoothFactor,p=0,g=c.length;p<g;p++)c[p]=simplify(c[p],d)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(c,d){var p,g,f,_,y,v,x=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(p=0,_=this._parts.length;p<_;p++)for(g=0,f=(y=(v=this._parts[p]).length)-1;g<y;f=g++)if((d||0!==g)&&pointToSegmentDistance(c,v[f],v[g])<=x)return!0;return!1}});_o._flat=_flat;var yo=_o.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polygonCenter(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(c){var d=_o.prototype._convertLatLngs.call(this,c),p=d.length;return p>=2&&d[0]instanceof LatLng&&d[0].equals(d[p-1])&&d.pop(),d},_setLatLngs:function(c){_o.prototype._setLatLngs.call(this,c),isFlat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return isFlat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,d=this.options.weight,p=new Point(d,d);if(c=new Bounds(c.min.subtract(p),c.max.add(p)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(c))if(this.options.noClip)this._parts=this._rings;else for(var g,f=0,_=this._rings.length;f<_;f++)(g=clipPolygon(this._rings[f],c,!0)).length&&this._parts.push(g)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(c){var d,p,g,f,_,y,v,x,C=!1;if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(f=0,v=this._parts.length;f<v;f++)for(_=0,y=(x=(d=this._parts[f]).length)-1;_<x;y=_++)p=d[_],g=d[y],p.y>c.y!=g.y>c.y&&c.x<(g.x-p.x)*(c.y-p.y)/(g.y-p.y)+p.x&&(C=!C);return C||_o.prototype._containsPoint.call(this,c,!0)}});var vo=lo.extend({initialize:function(c,d){setOptions(this,d),this._layers={},c&&this.addData(c)},addData:function(c){var d,p,g,f=_i(c)?c:c.features;if(f){for(d=0,p=f.length;d<p;d++)((g=f[d]).geometries||g.geometry||g.features||g.coordinates)&&this.addData(g);return this}var _=this.options;if(_.filter&&!_.filter(c))return this;var y=geometryToLayer(c,_);return y?(y.feature=asFeature(c),y.defaultOptions=y.options,this.resetStyle(y),_.onEachFeature&&_.onEachFeature(c,y),this.addLayer(y)):this},resetStyle:function(c){return void 0===c?this.eachLayer(this.resetStyle,this):(c.options=extend({},c.defaultOptions),this._setLayerStyle(c,this.options.style),this)},setStyle:function(c){return this.eachLayer((function(d){this._setLayerStyle(d,c)}),this)},_setLayerStyle:function(c,d){c.setStyle&&("function"==typeof d&&(d=d(c.feature)),c.setStyle(d))}});function geometryToLayer(c,d){var p,g,f,_,y="Feature"===c.type?c.geometry:c,v=y?y.coordinates:null,x=[],C=d&&d.pointToLayer,L=d&&d.coordsToLatLng||coordsToLatLng;if(!v&&!y)return null;switch(y.type){case"Point":return _pointToLayer(C,c,p=L(v),d);case"MultiPoint":for(f=0,_=v.length;f<_;f++)p=L(v[f]),x.push(_pointToLayer(C,c,p,d));return new lo(x);case"LineString":case"MultiLineString":return g=coordsToLatLngs(v,"LineString"===y.type?0:1,L),new _o(g,d);case"Polygon":case"MultiPolygon":return g=coordsToLatLngs(v,"Polygon"===y.type?1:2,L),new yo(g,d);case"GeometryCollection":for(f=0,_=y.geometries.length;f<_;f++){var M=geometryToLayer({geometry:y.geometries[f],type:"Feature",properties:c.properties},d);M&&x.push(M)}return new lo(x);case"FeatureCollection":for(f=0,_=y.features.length;f<_;f++){var E=geometryToLayer(y.features[f],d);E&&x.push(E)}return new lo(x);default:throw new Error("Invalid GeoJSON object.")}}function _pointToLayer(c,d,p,g){return c?c(d,p):new po(p,g&&g.markersInheritOptions&&g)}function coordsToLatLng(c){return new LatLng(c[1],c[0],c[2])}function coordsToLatLngs(c,d,p){for(var g,f=[],_=0,y=c.length;_<y;_++)g=d?coordsToLatLngs(c[_],d-1,p):(p||coordsToLatLng)(c[_]),f.push(g);return f}function latLngToCoords(c,d){return void 0!==(c=toLatLng(c)).alt?[formatNum(c.lng,d),formatNum(c.lat,d),formatNum(c.alt,d)]:[formatNum(c.lng,d),formatNum(c.lat,d)]}function latLngsToCoords(c,d,p,g){for(var f=[],_=0,y=c.length;_<y;_++)f.push(d?latLngsToCoords(c[_],isFlat(c[_])?0:d-1,p,g):latLngToCoords(c[_],g));return!d&&p&&f.length>0&&f.push(f[0].slice()),f}function getFeature(c,d){return c.feature?extend({},c.feature,{geometry:d}):asFeature(d)}function asFeature(c){return"Feature"===c.type||"FeatureCollection"===c.type?c:{type:"Feature",properties:{},geometry:c}}var xo={toGeoJSON:function(c){return getFeature(this,{type:"Point",coordinates:latLngToCoords(this.getLatLng(),c)})}};function geoJSON(c,d){return new vo(c,d)}po.include(xo),fo.include(xo),mo.include(xo),_o.include({toGeoJSON:function(c){var d=!isFlat(this._latlngs);return getFeature(this,{type:(d?"Multi":"")+"LineString",coordinates:latLngsToCoords(this._latlngs,d?1:0,!1,c)})}}),yo.include({toGeoJSON:function(c){var d=!isFlat(this._latlngs),p=d&&!isFlat(this._latlngs[0]),g=latLngsToCoords(this._latlngs,p?2:d?1:0,!0,c);return d||(g=[g]),getFeature(this,{type:(p?"Multi":"")+"Polygon",coordinates:g})}}),ao.include({toMultiPoint:function(c){var d=[];return this.eachLayer((function(p){d.push(p.toGeoJSON(c).geometry.coordinates)})),getFeature(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(c){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===d)return this.toMultiPoint(c);var p="GeometryCollection"===d,g=[];return this.eachLayer((function(d){if(d.toGeoJSON){var f=d.toGeoJSON(c);if(p)g.push(f.geometry);else{var _=asFeature(f);"FeatureCollection"===_.type?g.push.apply(g,_.features):g.push(_)}}})),p?getFeature(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});var Po=geoJSON,wo=ro.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,d,p){this._url=c,this._bounds=toLatLngBounds(d),setOptions(this,p)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&toFront(this._image),this},bringToBack:function(){return this._map&&toBack(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=toLatLngBounds(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c="IMG"===this._url.tagName,d=this._image=c?this._url:create$1("img");addClass(d,"leaflet-image-layer"),this._zoomAnimated&&addClass(d,"leaflet-zoom-animated"),this.options.className&&addClass(d,this.options.className),d.onselectstart=falseFn,d.onmousemove=falseFn,d.onload=bind(this.fire,this,"load"),d.onerror=bind(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(d.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c?this._url=d.src:(d.src=this._url,d.alt=this.options.alt)},_animateZoom:function(c){var d=this._map.getZoomScale(c.zoom),p=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;setTransform(this._image,p,d)},_reset:function(){var c=this._image,d=new Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),p=d.getSize();setPosition(c,d.min),c.style.width=p.x+"px",c.style.height=p.y+"px"},_updateOpacity:function(){setOpacity(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),bo=wo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var c="VIDEO"===this._url.tagName,d=this._image=c?this._url:create$1("video");if(addClass(d,"leaflet-image-layer"),this._zoomAnimated&&addClass(d,"leaflet-zoom-animated"),this.options.className&&addClass(d,this.options.className),d.onselectstart=falseFn,d.onmousemove=falseFn,d.onloadeddata=bind(this.fire,this,"load"),c){for(var p=d.getElementsByTagName("source"),g=[],f=0;f<p.length;f++)g.push(p[f].src);this._url=p.length>0?g:[d.src]}else{_i(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var _=0;_<this._url.length;_++){var y=create$1("source");y.src=this._url[_],d.appendChild(y)}}}});var Co=wo.extend({_initImage:function(){var c=this._image=this._url;addClass(c,"leaflet-image-layer"),this._zoomAnimated&&addClass(c,"leaflet-zoom-animated"),this.options.className&&addClass(c,this.options.className),c.onselectstart=falseFn,c.onmousemove=falseFn}});var Lo=ro.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(c,d){c&&(c instanceof LatLng||_i(c))?(this._latlng=toLatLng(c),setOptions(this,d)):(setOptions(this,c),this._source=d),this.options.content&&(this._content=this.options.content)},openOn:function(c){return(c=arguments.length?c:this._source._map).hasLayer(this)||c.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(c){return this._map?this.close():(arguments.length?this._source=c:c=this._source,this._prepareOpen(),this.openOn(c._map)),this},onAdd:function(c){this._zoomAnimated=c._zoomAnimated,this._container||this._initLayout(),c._fadeAnimated&&setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),c._fadeAnimated&&setOpacity(this._container,1),this.bringToFront(),this.options.interactive&&(addClass(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(c){c._fadeAnimated?(setOpacity(this._container,0),this._removeTimeout=setTimeout(bind(remove,void 0,this._container),200)):remove(this._container),this.options.interactive&&(removeClass(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(c){return this._latlng=toLatLng(c),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(c){return this._content=c,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var c={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&toFront(this._container),this},bringToBack:function(){return this._map&&toBack(this._container),this},_prepareOpen:function(c){var d=this._source;if(!d._map)return!1;if(d instanceof lo){d=null;var p=this._source._layers;for(var g in p)if(p[g]._map){d=p[g];break}if(!d)return!1;this._source=d}if(!c)if(d.getCenter)c=d.getCenter();else if(d.getLatLng)c=d.getLatLng();else{if(!d.getBounds)throw new Error("Unable to get source layer LatLng.");c=d.getBounds().getCenter()}return this.setLatLng(c),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var c=this._contentNode,d="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof d)c.innerHTML=d;else{for(;c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(d)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var c=this._map.latLngToLayerPoint(this._latlng),d=toPoint(this.options.offset),p=this._getAnchor();this._zoomAnimated?setPosition(this._container,c.add(p)):d=d.add(c).add(p);var g=this._containerBottom=-d.y,f=this._containerLeft=-Math.round(this._containerWidth/2)+d.x;this._container.style.bottom=g+"px",this._container.style.left=f+"px"}},_getAnchor:function(){return[0,0]}});Wn.include({_initOverlay:function(c,d,p,g){var f=d;return f instanceof c||(f=new c(g).setContent(d)),p&&f.setLatLng(p),f}}),ro.include({_initOverlay:function(c,d,p,g){var f=p;return f instanceof c?(setOptions(f,g),f._source=this):(f=d&&!g?d:new c(g,this)).setContent(p),f}});var So=Lo.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(c){return!(c=arguments.length?c:this._source._map).hasLayer(this)&&c._popup&&c._popup.options.autoClose&&c.removeLayer(c._popup),c._popup=this,Lo.prototype.openOn.call(this,c)},onAdd:function(c){Lo.prototype.onAdd.call(this,c),c.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof go||this._source.on("preclick",stopPropagation))},onRemove:function(c){Lo.prototype.onRemove.call(this,c),c.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof go||this._source.off("preclick",stopPropagation))},getEvents:function(){var c=Lo.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(c.preclick=this.close),this.options.keepInView&&(c.moveend=this._adjustPan),c},_initLayout:function(){var c="leaflet-popup",d=this._container=create$1("div",c+" "+(this.options.className||"")+" leaflet-zoom-animated"),p=this._wrapper=create$1("div",c+"-content-wrapper",d);if(this._contentNode=create$1("div",c+"-content",p),disableClickPropagation(d),disableScrollPropagation(this._contentNode),on(d,"contextmenu",stopPropagation),this._tipContainer=create$1("div",c+"-tip-container",d),this._tip=create$1("div",c+"-tip",this._tipContainer),this.options.closeButton){var g=this._closeButton=create$1("a",c+"-close-button",d);g.setAttribute("role","button"),g.setAttribute("aria-label","Close popup"),g.href="#close",g.innerHTML='<span aria-hidden="true">&#215;</span>',on(g,"click",(function(c){preventDefault(c),this.close()}),this)}},_updateLayout:function(){var c=this._contentNode,d=c.style;d.width="",d.whiteSpace="nowrap";var p=c.offsetWidth;p=Math.min(p,this.options.maxWidth),p=Math.max(p,this.options.minWidth),d.width=p+1+"px",d.whiteSpace="",d.height="";var g=c.offsetHeight,f=this.options.maxHeight,_="leaflet-popup-scrolled";f&&g>f?(d.height=f+"px",addClass(c,_)):removeClass(c,_),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),p=this._getAnchor();setPosition(this._container,d.add(p))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var c=this._map,d=parseInt(getStyle(this._container,"marginBottom"),10)||0,p=this._container.offsetHeight+d,g=this._containerWidth,f=new Point(this._containerLeft,-p-this._containerBottom);f._add(getPosition(this._container));var _=c.layerPointToContainerPoint(f),y=toPoint(this.options.autoPanPadding),v=toPoint(this.options.autoPanPaddingTopLeft||y),x=toPoint(this.options.autoPanPaddingBottomRight||y),C=c.getSize(),L=0,M=0;_.x+g+x.x>C.x&&(L=_.x+g-C.x+x.x),_.x-L-v.x<0&&(L=_.x-v.x),_.y+p+x.y>C.y&&(M=_.y+p-C.y+x.y),_.y-M-v.y<0&&(M=_.y-v.y),(L||M)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([L,M]))}},_getAnchor:function(){return toPoint(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Wn.mergeOptions({closePopupOnClick:!0}),Wn.include({openPopup:function(c,d,p){return this._initOverlay(So,c,d,p).openOn(this),this},closePopup:function(c){return(c=arguments.length?c:this._popup)&&c.close(),this}}),ro.include({bindPopup:function(c,d){return this._popup=this._initOverlay(So,this._popup,c,d),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(c){return this._popup&&(this instanceof lo||(this._popup._source=this),this._popup._prepareOpen(c||this._latlng)&&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(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(this._popup&&this._map){stop(c);var d=c.layer||c.target;this._popup._source!==d||d instanceof go?(this._popup._source=d,this.openPopup(c.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){13===c.originalEvent.keyCode&&this._openPopup(c)}});var Mo=Lo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){Lo.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){Lo.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=Lo.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=create$1("div",c),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+stamp(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var d,p,g=this._map,f=this._container,_=g.latLngToContainerPoint(g.getCenter()),y=g.layerPointToContainerPoint(c),v=this.options.direction,x=f.offsetWidth,C=f.offsetHeight,L=toPoint(this.options.offset),M=this._getAnchor();"top"===v?(d=x/2,p=C):"bottom"===v?(d=x/2,p=0):"center"===v?(d=x/2,p=C/2):"right"===v?(d=0,p=C/2):"left"===v?(d=x,p=C/2):y.x<_.x?(v="right",d=0,p=C/2):(v="left",d=x+2*(L.x+M.x),p=C/2),c=c.subtract(toPoint(d,p,!0)).add(L).add(M),removeClass(f,"leaflet-tooltip-right"),removeClass(f,"leaflet-tooltip-left"),removeClass(f,"leaflet-tooltip-top"),removeClass(f,"leaflet-tooltip-bottom"),addClass(f,"leaflet-tooltip-"+v),setPosition(f,c)},_updatePosition:function(){var c=this._map.latLngToLayerPoint(this._latlng);this._setPosition(c)},setOpacity:function(c){this.options.opacity=c,this._container&&setOpacity(this._container,c)},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center);this._setPosition(d)},_getAnchor:function(){return toPoint(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Wn.include({openTooltip:function(c,d,p){return this._initOverlay(Mo,c,d,p).openOn(this),this},closeTooltip:function(c){return c.close(),this}}),ro.include({bindTooltip:function(c,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Mo,this._tooltip,c,d),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(c){if(c||!this._tooltipHandlersAdded){var d=c?"off":"on",p={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?p.add=this._openTooltip:(p.mouseover=this._openTooltip,p.mouseout=this.closeTooltip,p.click=this._openTooltip,this._map?this._addFocusListeners():p.add=this._addFocusListeners),this._tooltip.options.sticky&&(p.mousemove=this._moveTooltip),this[d](p),this._tooltipHandlersAdded=!c}},openTooltip:function(c){return this._tooltip&&(this instanceof lo||(this._tooltip._source=this),this._tooltip._prepareOpen(c)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(c){return this._tooltip&&this._tooltip.setContent(c),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(c){var d="function"==typeof c.getElement&&c.getElement();d&&(on(d,"focus",(function(){this._tooltip._source=c,this.openTooltip()}),this),on(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(c){var d="function"==typeof c.getElement&&c.getElement();d&&d.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(c){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var d=this;this._map.once("moveend",(function(){d._openOnceFlag=!1,d._openTooltip(c)}))}else this._tooltip._source=c.layer||c.target,this.openTooltip(this._tooltip.options.sticky?c.latlng:void 0)},_moveTooltip:function(c){var d,p,g=c.latlng;this._tooltip.options.sticky&&c.originalEvent&&(d=this._map.mouseEventToContainerPoint(c.originalEvent),p=this._map.containerPointToLayerPoint(d),g=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(g)}});var Eo=ho.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(c){var d=c&&"DIV"===c.tagName?c:document.createElement("div"),p=this.options;if(p.html instanceof Element?(empty(d),d.appendChild(p.html)):d.innerHTML=!1!==p.html?p.html:"",p.bgPos){var g=toPoint(p.bgPos);d.style.backgroundPosition=-g.x+"px "+-g.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function divIcon(c){return new Eo(c)}ho.Default=co;var To=ro.extend({options:{tileSize:256,opacity:1,updateWhenIdle:fn.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(c){setOptions(this,c)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(c){c._addZoomLimit(this)},onRemove:function(c){this._removeAllTiles(),remove(this._container),c._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(c){return this.options.opacity=c,this._updateOpacity(),this},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var c=this._clampZoom(this._map.getZoom());c!==this._tileZoom&&(this._tileZoom=c,this._updateLevels()),this._update()}return this},getEvents:function(){var c={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=throttle(this._onMoveEnd,this.options.updateInterval,this)),c.move=this._onMove),this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},createTile:function(){return document.createElement("div")},getTileSize:function(){var c=this.options.tileSize;return c instanceof Point?c:new Point(c,c)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(c){for(var d,p=this.getPane().children,g=-c(-1/0,1/0),f=0,_=p.length;f<_;f++)d=p[f].style.zIndex,p[f]!==this._container&&d&&(g=c(g,+d));isFinite(g)&&(this.options.zIndex=g+c(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!fn.ielt9){setOpacity(this._container,this.options.opacity);var c=+new Date,d=!1,p=!1;for(var g in this._tiles){var f=this._tiles[g];if(f.current&&f.loaded){var _=Math.min(1,(c-f.loaded)/200);setOpacity(f.el,_),_<1?d=!0:(f.active?p=!0:this._onOpaqueTile(f),f.active=!0)}}p&&!this._noPrune&&this._pruneTiles(),d&&(cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this))}},_onOpaqueTile:falseFn,_initContainer:function(){this._container||(this._container=create$1("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var c=this._tileZoom,d=this.options.maxZoom;if(void 0!==c){for(var p in this._levels)p=Number(p),this._levels[p].el.children.length||p===c?(this._levels[p].el.style.zIndex=d-Math.abs(c-p),this._onUpdateLevel(p)):(remove(this._levels[p].el),this._removeTilesAtZoom(p),this._onRemoveLevel(p),delete this._levels[p]);var g=this._levels[c],f=this._map;return g||((g=this._levels[c]={}).el=create$1("div","leaflet-tile-container leaflet-zoom-animated",this._container),g.el.style.zIndex=d,g.origin=f.project(f.unproject(f.getPixelOrigin()),c).round(),g.zoom=c,this._setZoomTransform(g,f.getCenter(),f.getZoom()),g.el.offsetWidth,this._onCreateLevel(g)),this._level=g,g}},_onUpdateLevel:falseFn,_onRemoveLevel:falseFn,_onCreateLevel:falseFn,_pruneTiles:function(){if(this._map){var c,d,p=this._map.getZoom();if(p>this.options.maxZoom||p<this.options.minZoom)this._removeAllTiles();else{for(c in this._tiles)(d=this._tiles[c]).retain=d.current;for(c in this._tiles)if((d=this._tiles[c]).current&&!d.active){var g=d.coords;this._retainParent(g.x,g.y,g.z,g.z-5)||this._retainChildren(g.x,g.y,g.z,g.z+2)}for(c in this._tiles)this._tiles[c].retain||this._removeTile(c)}}},_removeTilesAtZoom:function(c){for(var d in this._tiles)this._tiles[d].coords.z===c&&this._removeTile(d)},_removeAllTiles:function(){for(var c in this._tiles)this._removeTile(c)},_invalidateAll:function(){for(var c in this._levels)remove(this._levels[c].el),this._onRemoveLevel(Number(c)),delete this._levels[c];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,d,p,g){var f=Math.floor(c/2),_=Math.floor(d/2),y=p-1,v=new Point(+f,+_);v.z=+y;var x=this._tileCoordsToKey(v),C=this._tiles[x];return C&&C.active?(C.retain=!0,!0):(C&&C.loaded&&(C.retain=!0),y>g&&this._retainParent(f,_,y,g))},_retainChildren:function(c,d,p,g){for(var f=2*c;f<2*c+2;f++)for(var _=2*d;_<2*d+2;_++){var y=new Point(f,_);y.z=p+1;var v=this._tileCoordsToKey(y),x=this._tiles[v];x&&x.active?x.retain=!0:(x&&x.loaded&&(x.retain=!0),p+1<g&&this._retainChildren(f,_,p+1,g))}},_resetView:function(c){var d=c&&(c.pinch||c.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),d,d)},_animateZoom:function(c){this._setView(c.center,c.zoom,!0,c.noUpdate)},_clampZoom:function(c){var d=this.options;return void 0!==d.minNativeZoom&&c<d.minNativeZoom?d.minNativeZoom:void 0!==d.maxNativeZoom&&d.maxNativeZoom<c?d.maxNativeZoom:c},_setView:function(c,d,p,g){var f=Math.round(d);f=void 0!==this.options.maxZoom&&f>this.options.maxZoom||void 0!==this.options.minZoom&&f<this.options.minZoom?void 0:this._clampZoom(f);var _=this.options.updateWhenZooming&&f!==this._tileZoom;g&&!_||(this._tileZoom=f,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==f&&this._update(c),p||this._pruneTiles(),this._noPrune=!!p),this._setZoomTransforms(c,d)},_setZoomTransforms:function(c,d){for(var p in this._levels)this._setZoomTransform(this._levels[p],c,d)},_setZoomTransform:function(c,d,p){var g=this._map.getZoomScale(p,c.zoom),f=c.origin.multiplyBy(g).subtract(this._map._getNewPixelOrigin(d,p)).round();fn.any3d?setTransform(c.el,f,g):setPosition(c.el,f)},_resetGrid:function(){var c=this._map,d=c.options.crs,p=this._tileSize=this.getTileSize(),g=this._tileZoom,f=this._map.getPixelWorldBounds(this._tileZoom);f&&(this._globalTileRange=this._pxBoundsToTileRange(f)),this._wrapX=d.wrapLng&&!this.options.noWrap&&[Math.floor(c.project([0,d.wrapLng[0]],g).x/p.x),Math.ceil(c.project([0,d.wrapLng[1]],g).x/p.y)],this._wrapY=d.wrapLat&&!this.options.noWrap&&[Math.floor(c.project([d.wrapLat[0],0],g).y/p.x),Math.ceil(c.project([d.wrapLat[1],0],g).y/p.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(c){var d=this._map,p=d._animatingZoom?Math.max(d._animateToZoom,d.getZoom()):d.getZoom(),g=d.getZoomScale(p,this._tileZoom),f=d.project(c,this._tileZoom).floor(),_=d.getSize().divideBy(2*g);return new Bounds(f.subtract(_),f.add(_))},_update:function(c){var d=this._map;if(d){var p=this._clampZoom(d.getZoom());if(void 0===c&&(c=d.getCenter()),void 0!==this._tileZoom){var g=this._getTiledPixelBounds(c),f=this._pxBoundsToTileRange(g),_=f.getCenter(),y=[],v=this.options.keepBuffer,x=new Bounds(f.getBottomLeft().subtract([v,-v]),f.getTopRight().add([v,-v]));if(!(isFinite(f.min.x)&&isFinite(f.min.y)&&isFinite(f.max.x)&&isFinite(f.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var C in this._tiles){var L=this._tiles[C].coords;L.z===this._tileZoom&&x.contains(new Point(L.x,L.y))||(this._tiles[C].current=!1)}if(Math.abs(p-this._tileZoom)>1)this._setView(c,p);else{for(var M=f.min.y;M<=f.max.y;M++)for(var E=f.min.x;E<=f.max.x;E++){var T=new Point(E,M);if(T.z=this._tileZoom,this._isValidTile(T)){var k=this._tiles[this._tileCoordsToKey(T)];k?k.current=!0:y.push(T)}}if(y.sort((function(c,d){return c.distanceTo(_)-d.distanceTo(_)})),0!==y.length){this._loading||(this._loading=!0,this.fire("loading"));var O=document.createDocumentFragment();for(E=0;E<y.length;E++)this._addTile(y[E],O);this._level.el.appendChild(O)}}}}},_isValidTile:function(c){var d=this._map.options.crs;if(!d.infinite){var p=this._globalTileRange;if(!d.wrapLng&&(c.x<p.min.x||c.x>p.max.x)||!d.wrapLat&&(c.y<p.min.y||c.y>p.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(c);return toLatLngBounds(this.options.bounds).overlaps(g)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var d=this._map,p=this.getTileSize(),g=c.scaleBy(p),f=g.add(p);return[d.unproject(g,c.z),d.unproject(f,c.z)]},_tileCoordsToBounds:function(c){var d=this._tileCoordsToNwSe(c),p=new LatLngBounds(d[0],d[1]);return this.options.noWrap||(p=this._map.wrapLatLngBounds(p)),p},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var d=c.split(":"),p=new Point(+d[0],+d[1]);return p.z=+d[2],p},_removeTile:function(c){var d=this._tiles[c];d&&(remove(d.el),delete this._tiles[c],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){addClass(c,"leaflet-tile");var d=this.getTileSize();c.style.width=d.x+"px",c.style.height=d.y+"px",c.onselectstart=falseFn,c.onmousemove=falseFn,fn.ielt9&&this.options.opacity<1&&setOpacity(c,this.options.opacity)},_addTile:function(c,d){var p=this._getTilePos(c),g=this._tileCoordsToKey(c),f=this.createTile(this._wrapCoords(c),bind(this._tileReady,this,c));this._initTile(f),this.createTile.length<2&&requestAnimFrame(bind(this._tileReady,this,c,null,f)),setPosition(f,p),this._tiles[g]={el:f,coords:c,current:!0},d.appendChild(f),this.fire("tileloadstart",{tile:f,coords:c})},_tileReady:function(c,d,p){d&&this.fire("tileerror",{error:d,tile:p,coords:c});var g=this._tileCoordsToKey(c);(p=this._tiles[g])&&(p.loaded=+new Date,this._map._fadeAnimated?(setOpacity(p.el,0),cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this)):(p.active=!0,this._pruneTiles()),d||(addClass(p.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:p.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),fn.ielt9||!this._map._fadeAnimated?requestAnimFrame(this._pruneTiles,this):setTimeout(bind(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var d=new Point(this._wrapX?wrapNum(c.x,this._wrapX):c.x,this._wrapY?wrapNum(c.y,this._wrapY):c.y);return d.z=c.z,d},_pxBoundsToTileRange:function(c){var d=this.getTileSize();return new Bounds(c.min.unscaleBy(d).floor(),c.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});var ko=To.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,d){this._url=c,(d=setOptions(this,d)).detectRetina&&fn.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),"string"==typeof d.subdomains&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,d){return this._url===c&&void 0===d&&(d=!0),this._url=c,d||this.redraw(),this},createTile:function(c,d){var p=document.createElement("img");return on(p,"load",bind(this._tileOnLoad,this,d,p)),on(p,"error",bind(this._tileOnError,this,d,p)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(p.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(p.referrerPolicy=this.options.referrerPolicy),p.alt="",p.src=this.getTileUrl(c),p},getTileUrl:function(c){var d={r:fn.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var p=this._globalTileRange.max.y-c.y;this.options.tms&&(d.y=p),d["-y"]=p}return template(this._url,extend(d,this.options))},_tileOnLoad:function(c,d){fn.ielt9?setTimeout(bind(c,this,null,d),0):c(null,d)},_tileOnError:function(c,d,p){var g=this.options.errorTileUrl;g&&d.getAttribute("src")!==g&&(d.src=g),c(p,d)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,d=this.options.maxZoom;return this.options.zoomReverse&&(c=d-c),c+this.options.zoomOffset},_getSubdomain:function(c){var d=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var c,d;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&((d=this._tiles[c].el).onload=falseFn,d.onerror=falseFn,!d.complete)){d.src=yi;var p=this._tiles[c].coords;remove(d),delete this._tiles[c],this.fire("tileabort",{tile:d,coords:p})}},_removeTile:function(c){var d=this._tiles[c];if(d)return d.el.setAttribute("src",yi),To.prototype._removeTile.call(this,c)},_tileReady:function(c,d,p){if(this._map&&(!p||p.getAttribute("src")!==yi))return To.prototype._tileReady.call(this,c,d,p)}});function tileLayer(c,d){return new ko(c,d)}var Oo=ko.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,d){this._url=c;var p=extend({},this.defaultWmsParams);for(var g in d)g in this.options||(p[g]=d[g]);var f=(d=setOptions(this,d)).detectRetina&&fn.retina?2:1,_=this.getTileSize();p.width=_.x*f,p.height=_.y*f,this.wmsParams=p},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,ko.prototype.onAdd.call(this,c)},getTileUrl:function(c){var d=this._tileCoordsToNwSe(c),p=this._crs,g=toBounds(p.project(d[0]),p.project(d[1])),f=g.min,_=g.max,y=(this._wmsVersion>=1.3&&this._crs===oo?[f.y,f.x,_.y,_.x]:[f.x,f.y,_.x,_.y]).join(","),v=ko.prototype.getTileUrl.call(this,c);return v+getParamString(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+y},setParams:function(c,d){return extend(this.wmsParams,c),d||this.redraw(),this}});ko.WMS=Oo,tileLayer.wms=function tileLayerWMS(c,d){return new Oo(c,d)};var Io=ro.extend({options:{padding:.1},initialize:function(c){setOptions(this,c),stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),addClass(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 c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,d){var p=this._map.getZoomScale(d,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),f=this._map.project(this._center,d),_=g.multiplyBy(-p).add(f).subtract(this._map._getNewPixelOrigin(c,d));fn.any3d?setTransform(this._container,_,p):setPosition(this._container,_)},_reset:function(){for(var c in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()},_update:function(){var c=this.options.padding,d=this._map.getSize(),p=this._map.containerPointToLayerPoint(d.multiplyBy(-c)).round();this._bounds=new Bounds(p,p.add(d.multiplyBy(1+2*c)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Ao=Io.extend({options:{tolerance:0},getEvents:function(){var c=Io.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Io.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");on(c,"mousemove",this._onMouseMove,this),on(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),on(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){cancelAnimFrame(this._redrawRequest),delete this._ctx,remove(this._container),off(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var c in this._redrawBounds=null,this._layers)this._layers[c]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Io.prototype._update.call(this);var c=this._bounds,d=this._container,p=c.getSize(),g=fn.retina?2:1;setPosition(d,c.min),d.width=g*p.x,d.height=g*p.y,d.style.width=p.x+"px",d.style.height=p.y+"px",fn.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){Io.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[stamp(c)]=c;var d=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var d=c._order,p=d.next,g=d.prev;p?p.prev=g:this._drawLast=g,g?g.next=p:this._drawFirst=p,delete c._order,delete this._layers[stamp(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if("string"==typeof c.options.dashArray){var d,p,g=c.options.dashArray.split(/[, ]+/),f=[];for(p=0;p<g.length;p++){if(d=Number(g[p]),isNaN(d))return;f.push(d)}c.options._dashArray=f}else c.options._dashArray=c.options.dashArray},_requestRedraw:function(c){this._map&&(this._extendRedrawBounds(c),this._redrawRequest=this._redrawRequest||requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(c){if(c._pxBounds){var d=(c.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Bounds,this._redrawBounds.extend(c._pxBounds.min.subtract([d,d])),this._redrawBounds.extend(c._pxBounds.max.add([d,d]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var c=this._redrawBounds;if(c){var d=c.getSize();this._ctx.clearRect(c.min.x,c.min.y,d.x,d.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var c,d=this._redrawBounds;if(this._ctx.save(),d){var p=d.getSize();this._ctx.beginPath(),this._ctx.rect(d.min.x,d.min.y,p.x,p.y),this._ctx.clip()}this._drawing=!0;for(var g=this._drawFirst;g;g=g.next)c=g.layer,(!d||c._pxBounds&&c._pxBounds.intersects(d))&&c._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(c,d){if(this._drawing){var p,g,f,_,y=c._parts,v=y.length,x=this._ctx;if(v){for(x.beginPath(),p=0;p<v;p++){for(g=0,f=y[p].length;g<f;g++)_=y[p][g],x[g?"lineTo":"moveTo"](_.x,_.y);d&&x.closePath()}this._fillStroke(x,c)}}},_updateCircle:function(c){if(this._drawing&&!c._empty()){var d=c._point,p=this._ctx,g=Math.max(Math.round(c._radius),1),f=(Math.max(Math.round(c._radiusY),1)||g)/g;1!==f&&(p.save(),p.scale(1,f)),p.beginPath(),p.arc(d.x,d.y/f,g,0,2*Math.PI,!1),1!==f&&p.restore(),this._fillStroke(p,c)}},_fillStroke:function(c,d){var p=d.options;p.fill&&(c.globalAlpha=p.fillOpacity,c.fillStyle=p.fillColor||p.color,c.fill(p.fillRule||"evenodd")),p.stroke&&0!==p.weight&&(c.setLineDash&&c.setLineDash(d.options&&d.options._dashArray||[]),c.globalAlpha=p.opacity,c.lineWidth=p.weight,c.strokeStyle=p.color,c.lineCap=p.lineCap,c.lineJoin=p.lineJoin,c.stroke())},_onClick:function(c){for(var d,p,g=this._map.mouseEventToLayerPoint(c),f=this._drawFirst;f;f=f.next)(d=f.layer).options.interactive&&d._containsPoint(g)&&("click"!==c.type&&"preclick"!==c.type||!this._map._draggableMoved(d))&&(p=d);this._fireEvent(!!p&&[p],c)},_onMouseMove:function(c){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var d=this._map.mouseEventToLayerPoint(c);this._handleMouseHover(c,d)}},_handleMouseOut:function(c){var d=this._hoveredLayer;d&&(removeClass(this._container,"leaflet-interactive"),this._fireEvent([d],c,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(c,d){if(!this._mouseHoverThrottled){for(var p,g,f=this._drawFirst;f;f=f.next)(p=f.layer).options.interactive&&p._containsPoint(d)&&(g=p);g!==this._hoveredLayer&&(this._handleMouseOut(c),g&&(addClass(this._container,"leaflet-interactive"),this._fireEvent([g],c,"mouseover"),this._hoveredLayer=g)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],c),this._mouseHoverThrottled=!0,setTimeout(bind((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(c,d,p){this._map._fireDOMEvent(d,p||d.type,c)},_bringToFront:function(c){var d=c._order;if(d){var p=d.next,g=d.prev;p&&(p.prev=g,g?g.next=p:p&&(this._drawFirst=p),d.prev=this._drawLast,this._drawLast.next=d,d.next=null,this._drawLast=d,this._requestRedraw(c))}},_bringToBack:function(c){var d=c._order;if(d){var p=d.next,g=d.prev;g&&(g.next=p,p?p.prev=g:g&&(this._drawLast=g),d.prev=null,d.next=this._drawFirst,this._drawFirst.prev=d,this._drawFirst=d,this._requestRedraw(c))}}});function canvas(c){return fn.canvas?new Ao(c):null}var Do=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(c){return document.createElement("<lvml:"+c+' class="lvml">')}}catch(c){}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Bo={_initContainer:function(){this._container=create$1("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Io.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var d=c._container=Do("shape");addClass(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",c._path=Do("path"),d.appendChild(c._path),this._updateStyle(c),this._layers[stamp(c)]=c},_addPath:function(c){var d=c._container;this._container.appendChild(d),c.options.interactive&&c.addInteractiveTarget(d)},_removePath:function(c){var d=c._container;remove(d),c.removeInteractiveTarget(d),delete this._layers[stamp(c)]},_updateStyle:function(c){var d=c._stroke,p=c._fill,g=c.options,f=c._container;f.stroked=!!g.stroke,f.filled=!!g.fill,g.stroke?(d||(d=c._stroke=Do("stroke")),f.appendChild(d),d.weight=g.weight+"px",d.color=g.color,d.opacity=g.opacity,g.dashArray?d.dashStyle=_i(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=g.lineCap.replace("butt","flat"),d.joinstyle=g.lineJoin):d&&(f.removeChild(d),c._stroke=null),g.fill?(p||(p=c._fill=Do("fill")),f.appendChild(p),p.color=g.fillColor||g.color,p.opacity=g.fillOpacity):p&&(f.removeChild(p),c._fill=null)},_updateCircle:function(c){var d=c._point.round(),p=Math.round(c._radius),g=Math.round(c._radiusY||p);this._setPath(c,c._empty()?"M0 0":"AL "+d.x+","+d.y+" "+p+","+g+" 0,23592600")},_setPath:function(c,d){c._path.v=d},_bringToFront:function(c){toFront(c._container)},_bringToBack:function(c){toBack(c._container)}},Fo=fn.vml?Do:svgCreate,zo=Io.extend({_initContainer:function(){this._container=Fo("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Fo("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){remove(this._container),off(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Io.prototype._update.call(this);var c=this._bounds,d=c.getSize(),p=this._container;this._svgSize&&this._svgSize.equals(d)||(this._svgSize=d,p.setAttribute("width",d.x),p.setAttribute("height",d.y)),setPosition(p,c.min),p.setAttribute("viewBox",[c.min.x,c.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(c){var d=c._path=Fo("path");c.options.className&&addClass(d,c.options.className),c.options.interactive&&addClass(d,"leaflet-interactive"),this._updateStyle(c),this._layers[stamp(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){remove(c._path),c.removeInteractiveTarget(c._path),delete this._layers[stamp(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var d=c._path,p=c.options;d&&(p.stroke?(d.setAttribute("stroke",p.color),d.setAttribute("stroke-opacity",p.opacity),d.setAttribute("stroke-width",p.weight),d.setAttribute("stroke-linecap",p.lineCap),d.setAttribute("stroke-linejoin",p.lineJoin),p.dashArray?d.setAttribute("stroke-dasharray",p.dashArray):d.removeAttribute("stroke-dasharray"),p.dashOffset?d.setAttribute("stroke-dashoffset",p.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),p.fill?(d.setAttribute("fill",p.fillColor||p.color),d.setAttribute("fill-opacity",p.fillOpacity),d.setAttribute("fill-rule",p.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(c,d){this._setPath(c,pointsToPath(c._parts,d))},_updateCircle:function(c){var d=c._point,p=Math.max(Math.round(c._radius),1),g="a"+p+","+(Math.max(Math.round(c._radiusY),1)||p)+" 0 1,0 ",f=c._empty()?"M0 0":"M"+(d.x-p)+","+d.y+g+2*p+",0 "+g+2*-p+",0 ";this._setPath(c,f)},_setPath:function(c,d){c._path.setAttribute("d",d)},_bringToFront:function(c){toFront(c._path)},_bringToBack:function(c){toBack(c._path)}});function svg(c){return fn.svg||fn.vml?new zo(c):null}fn.vml&&zo.include(Bo),Wn.include({getRenderer:function(c){var d=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(c){if("overlayPane"===c||void 0===c)return!1;var d=this._paneRenderers[c];return void 0===d&&(d=this._createRenderer({pane:c}),this._paneRenderers[c]=d),d},_createRenderer:function(c){return this.options.preferCanvas&&canvas(c)||svg(c)}});var jo=yo.extend({initialize:function(c,d){yo.prototype.initialize.call(this,this._boundsToLatLngs(c),d)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))},_boundsToLatLngs:function(c){return[(c=toLatLngBounds(c)).getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});zo.create=Fo,zo.pointsToPath=pointsToPath,vo.geometryToLayer=geometryToLayer,vo.coordsToLatLng=coordsToLatLng,vo.coordsToLatLngs=coordsToLatLngs,vo.latLngToCoords=latLngToCoords,vo.latLngsToCoords=latLngsToCoords,vo.getFeature=getFeature,vo.asFeature=asFeature,Wn.mergeOptions({boxZoom:!0});var No=Gn.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){remove(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(c){if(!c.shiftKey||1!==c.which&&1!==c.button)return!1;this._clearDeferredResetState(),this._resetState(),Sn(),disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(c),on(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=create$1("div","leaflet-zoom-box",this._container),addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var d=new Bounds(this._point,this._startPoint),p=d.getSize();setPosition(this._box,d.min),this._box.style.width=p.x+"px",this._box.style.height=p.y+"px"},_finish:function(){this._moved&&(remove(this._box),removeClass(this._container,"leaflet-crosshair")),Mn(),enableImageDrag(),off(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if((1===c.which||1===c.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(bind(this._resetState,this),0);var d=new LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(c){27===c.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Wn.addInitHook("addHandler","boxZoom",No),Wn.mergeOptions({doubleClickZoom:!0});var Zo=Gn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var d=this._map,p=d.getZoom(),g=d.options.zoomDelta,f=c.originalEvent.shiftKey?p-g:p+g;"center"===d.options.doubleClickZoom?d.setZoom(f):d.setZoomAround(c.containerPoint,f)}});Wn.addInitHook("addHandler","doubleClickZoom",Zo),Wn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Wo=Gn.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new $n(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){removeClass(this._map._container,"leaflet-grab"),removeClass(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 c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=toLatLngBounds(this._map.options.maxBounds);this._offsetLimit=toBounds(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var d=this._lastTime=+new Date,p=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(p),this._times.push(d),this._prunePositions(d)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,d){return c-(c-d)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var c=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;c.x<d.min.x&&(c.x=this._viscousLimit(c.x,d.min.x)),c.y<d.min.y&&(c.y=this._viscousLimit(c.y,d.min.y)),c.x>d.max.x&&(c.x=this._viscousLimit(c.x,d.max.x)),c.y>d.max.y&&(c.y=this._viscousLimit(c.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,d=Math.round(c/2),p=this._initialWorldOffset,g=this._draggable._newPos.x,f=(g-d+p)%c+d-p,_=(g+d+p)%c-d-p,y=Math.abs(f+p)<Math.abs(_+p)?f:_;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=y},_onDragEnd:function(c){var d=this._map,p=d.options,g=!p.inertia||c.noInertia||this._times.length<2;if(d.fire("dragend",c),g)d.fire("moveend");else{this._prunePositions(+new Date);var f=this._lastPos.subtract(this._positions[0]),_=(this._lastTime-this._times[0])/1e3,y=p.easeLinearity,v=f.multiplyBy(y/_),x=v.distanceTo([0,0]),C=Math.min(p.inertiaMaxSpeed,x),L=v.multiplyBy(C/x),M=C/(p.inertiaDeceleration*y),E=L.multiplyBy(-M/2).round();E.x||E.y?(E=d._limitOffset(E,d.options.maxBounds),requestAnimFrame((function(){d.panBy(E,{duration:M,easeLinearity:y,noMoveStart:!0,animate:!0})}))):d.fire("moveend")}}});Wn.addInitHook("addHandler","dragging",Wo),Wn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ro=Gn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(c){this._map=c,this._setPanDelta(c.options.keyboardPanDelta),this._setZoomDelta(c.options.zoomDelta)},addHooks:function(){var c=this._map._container;c.tabIndex<=0&&(c.tabIndex="0"),on(c,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var c=document.body,d=document.documentElement,p=c.scrollTop||d.scrollTop,g=c.scrollLeft||d.scrollLeft;this._map._container.focus(),window.scrollTo(g,p)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(c){var d,p,g=this._panKeys={},f=this.keyCodes;for(d=0,p=f.left.length;d<p;d++)g[f.left[d]]=[-1*c,0];for(d=0,p=f.right.length;d<p;d++)g[f.right[d]]=[c,0];for(d=0,p=f.down.length;d<p;d++)g[f.down[d]]=[0,c];for(d=0,p=f.up.length;d<p;d++)g[f.up[d]]=[0,-1*c]},_setZoomDelta:function(c){var d,p,g=this._zoomKeys={},f=this.keyCodes;for(d=0,p=f.zoomIn.length;d<p;d++)g[f.zoomIn[d]]=c;for(d=0,p=f.zoomOut.length;d<p;d++)g[f.zoomOut[d]]=-c},_addHooks:function(){on(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){off(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(c){if(!(c.altKey||c.ctrlKey||c.metaKey)){var d,p=c.keyCode,g=this._map;if(p in this._panKeys){if(!g._panAnim||!g._panAnim._inProgress)if(d=this._panKeys[p],c.shiftKey&&(d=toPoint(d).multiplyBy(3)),g.options.maxBounds&&(d=g._limitOffset(toPoint(d),g.options.maxBounds)),g.options.worldCopyJump){var f=g.wrapLatLng(g.unproject(g.project(g.getCenter()).add(d)));g.panTo(f)}else g.panBy(d)}else if(p in this._zoomKeys)g.setZoom(g.getZoom()+(c.shiftKey?3:1)*this._zoomKeys[p]);else{if(27!==p||!g._popup||!g._popup.options.closeOnEscapeKey)return;g.closePopup()}stop(c)}}});Wn.addInitHook("addHandler","keyboard",Ro),Wn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Uo=Gn.extend({addHooks:function(){on(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(c){var d=getWheelDelta(c),p=this._map.options.wheelDebounceTime;this._delta+=d,this._lastMousePos=this._map.mouseEventToContainerPoint(c),this._startTime||(this._startTime=+new Date);var g=Math.max(p-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(bind(this._performZoom,this),g),stop(c)},_performZoom:function(){var c=this._map,d=c.getZoom(),p=this._map.options.zoomSnap||0;c._stop();var g=this._delta/(4*this._map.options.wheelPxPerZoomLevel),f=4*Math.log(2/(1+Math.exp(-Math.abs(g))))/Math.LN2,_=p?Math.ceil(f/p)*p:f,y=c._limitZoom(d+(this._delta>0?_:-_))-d;this._delta=0,this._startTime=null,y&&("center"===c.options.scrollWheelZoom?c.setZoom(d+y):c.setZoomAround(this._lastMousePos,d+y))}});Wn.addInitHook("addHandler","scrollWheelZoom",Uo);Wn.mergeOptions({tapHold:fn.touchNative&&fn.safari&&fn.mobile,tapTolerance:15});var Ho=Gn.extend({addHooks:function(){on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),1===c.touches.length){var d=c.touches[0];this._startPos=this._newPos=new Point(d.clientX,d.clientY),this._holdTimeout=setTimeout(bind((function(){this._cancel(),this._isTapValid()&&(on(document,"touchend",preventDefault),on(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))}),this),600),on(document,"touchend touchcancel contextmenu",this._cancel,this),on(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function cancelClickPrevent(){off(document,"touchend",preventDefault),off(document,"touchend touchcancel",cancelClickPrevent)},_cancel:function(){clearTimeout(this._holdTimeout),off(document,"touchend touchcancel contextmenu",this._cancel,this),off(document,"touchmove",this._onMove,this)},_onMove:function(c){var d=c.touches[0];this._newPos=new Point(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,d){var p=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});p._simulated=!0,d.target.dispatchEvent(p)}});Wn.addInitHook("addHandler","tapHold",Ho),Wn.mergeOptions({touchZoom:fn.touch,bounceAtZoomLimits:!0});var Vo=Gn.extend({addHooks:function(){addClass(this._map._container,"leaflet-touch-zoom"),on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){removeClass(this._map._container,"leaflet-touch-zoom"),off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var d=this._map;if(c.touches&&2===c.touches.length&&!d._animatingZoom&&!this._zooming){var p=d.mouseEventToContainerPoint(c.touches[0]),g=d.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),"center"!==d.options.touchZoom&&(this._pinchStartLatLng=d.containerPointToLatLng(p.add(g)._divideBy(2))),this._startDist=p.distanceTo(g),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend touchcancel",this._onTouchEnd,this),preventDefault(c)}},_onTouchMove:function(c){if(c.touches&&2===c.touches.length&&this._zooming){var d=this._map,p=d.mouseEventToContainerPoint(c.touches[0]),g=d.mouseEventToContainerPoint(c.touches[1]),f=p.distanceTo(g)/this._startDist;if(this._zoom=d.getScaleZoom(f,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoom<d.getMinZoom()&&f<1||this._zoom>d.getMaxZoom()&&f>1)&&(this._zoom=d._limitZoom(this._zoom)),"center"===d.options.touchZoom){if(this._center=this._startLatLng,1===f)return}else{var _=p._add(g)._divideBy(2)._subtract(this._centerPoint);if(1===f&&0===_.x&&0===_.y)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(_),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),cancelAnimFrame(this._animRequest);var y=bind(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimFrame(y,this,!0),preventDefault(c)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimFrame(this._animRequest),off(document,"touchmove",this._onTouchMove,this),off(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}});Wn.addInitHook("addHandler","touchZoom",Vo),Wn.BoxZoom=No,Wn.DoubleClickZoom=Zo,Wn.Drag=Wo,Wn.Keyboard=Ro,Wn.ScrollWheelZoom=Uo,Wn.TapHold=Ho,Wn.TouchZoom=Vo;var Yo=Object.freeze({__proto__:null,Bounds:Bounds,Browser:fn,CRS:Si,Canvas:Ao,Circle:fo,CircleMarker:mo,Class:Class,Control:Rn,DivIcon:Eo,DivOverlay:Lo,DomEvent:Nn,DomUtil:Bn,Draggable:$n,Evented:Ci,FeatureGroup:lo,GeoJSON:vo,GridLayer:To,Handler:Gn,Icon:ho,ImageOverlay:wo,LatLng:LatLng,LatLngBounds:LatLngBounds,Layer:ro,LayerGroup:ao,LineUtil:Qn,Map:Wn,Marker:po,Mixin:qn,Path:go,Point:Point,PolyUtil:Jn,Polygon:yo,Polyline:_o,Popup:So,PosAnimation:Zn,Projection:io,Rectangle:jo,Renderer:Io,SVG:zo,SVGOverlay:Co,TileLayer:ko,Tooltip:Mo,Transformation:Transformation,Util:wi,VideoOverlay:bo,bind:bind,bounds:toBounds,canvas:canvas,circle:function circle(c,d,p){return new fo(c,d,p)},circleMarker:function circleMarker(c,d){return new mo(c,d)},control:control,divIcon:divIcon,extend:extend,featureGroup:function(c,d){return new lo(c,d)},geoJSON:geoJSON,geoJson:Po,gridLayer:function gridLayer(c){return new To(c)},icon:function icon(c){return new ho(c)},imageOverlay:function(c,d,p){return new wo(c,d,p)},latLng:toLatLng,latLngBounds:toLatLngBounds,layerGroup:function(c,d){return new ao(c,d)},map:createMap,marker:marker,point:toPoint,polygon:function polygon(c,d){return new yo(c,d)},polyline:function polyline(c,d){return new _o(c,d)},popup:function(c,d){return new So(c,d)},rectangle:function rectangle(c,d){return new jo(c,d)},setOptions:setOptions,stamp:stamp,svg:svg,svgOverlay:function svgOverlay(c,d,p){return new Co(c,d,p)},tileLayer:tileLayer,tooltip:function(c,d){return new Mo(c,d)},transformation:toTransformation,version:"1.9.4",videoOverlay:function videoOverlay(c,d,p){return new bo(c,d,p)}});(c=>{if(document.head.querySelector(`link[href="${c}"]`))return;const d=document.createElement("link");Object.assign(d,{rel:"stylesheet",href:c,onerror:()=>console.warn("Fail to load stylesheet:",c)}),document.head.appendChild(d)})("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");const Go=class extends defaultExport{id="leaflet";version="1.9.4";L=Yo;addMap({target:c,center:d,zoom:p}){const[g,f]=d;this.map=createMap(c).setView([f,g],p);return new window.ResizeObserver((()=>{this.map.invalidateSize()})).observe(c),this.map}getTerraDrawAdapter({draw:c,L:d,map:p}){return c?(this.terraDrawAdapter=new n({lib:d,map:p}),this.getTerraDrawAdapter):{state:"skip"}}setControl({map:c,control:d}){if(!d||0===Object.values(d).filter((c=>c)).length)return{state:"skip"};if(d.fullscreen){const d=document.createElement("link");d.rel="stylesheet",d.href="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css",document.body.append(d);const p=document.createElement("script");p.src="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js",document.body.append(p),p.onload=()=>{c.addControl(new Rn.Fullscreen)}}d.scale&&control.scale().addTo(c)}debugLayer(){return To.GridDebug=To.extend({createTile:function(c){const d=document.createElement("div");return d.style.outline="2px solid",d.style.fontWeight="bold",d.style.fontSize="14pt",d.innerHTML=[c.z,c.x,c.y].join("/"),d}}),new To.GridDebug}setExtra(c){const{map:d,debug:p}=c;if(!p&&!c.eval)return{state:"skip"};!0===p&&d.addLayer(this.debugLayer()),c.eval&&this.evalScript(c.eval,[["map",d],["L",Yo]])}addMarker(c){const d="circle"===c.type?this.svgForAnchor:this.svgForMarker,p=divIcon({html:d.html,className:"marker",iconSize:d.size}),g=marker(Array.from(c.xy).reverse(),{icon:p}).addTo(this.map);return g.getElement().classList.add("marker"),g.getElement().title=c.title,g.getElement()}addTileData({map:c,data:d}){const p=d.filter((c=>"tile"===c.type)),g={},f={};if(0===p.length){tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(c)}else p.forEach(((d,p)=>{const f=tileLayer(d.url),_=d.title?d.title:`Anonymous_${p}`;0===p&&f.addTo(c),g[_]=f})),control.layers(g,f).addTo(c)}addGPXFile({map:c,data:d}){const p=d.find((c=>"gpx"===c.type));if(!p)return{state:"skip"};const g=document.createElement("script");g.src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-gpx/1.7.0/gpx.min.js",document.body.append(g);const f={gpx_options:{joinTrackSegments:!1},polyline_options:{color:"red",weight:3,lineCap:"round"},marker_options:{startIconUrl:null,endIconUrl:null,shadowUrl:"",wptIconUrls:{"":null}},async:!0};g.onload=()=>{new(void 0)(p,f).addTo(c)}}updateCamera(c,d){const p=toLatLng(c.center[1],c.center[0]);d?this.map.flyTo(p,c.zoom):this.map.setView(p,c.zoom)}project([c,d]){return this.map.latLngToLayerPoint([d,c])}unproject([c,d]){const p=this.map.layerPointToLatLng([c,d]);return[p.lng,p.lat]}},converter=c=>({...c,use:Go}),qo=renderWith(converter),Xo=renderByYamlWith(converter),$o=((c=null)=>async()=>{const d=document.currentScript,p=d?.getAttribute("data-target")??URL.parse(d?.src)?.searchParams?.get("target"),g=document.querySelectorAll(p);p&&g&&g.forEach((d=>renderByYamlWith(c)(d)))})(converter);globalThis.mapclay={render:qo,renderByYaml:Xo},c.default=Go,c.render=qo,c.renderByScriptTarget=$o,c.renderByYaml=Xo,Object.defineProperty(c,"__esModule",{value:!0}),$o()}));
diff --git a/dist/renderers/leaflet.mjs b/dist/renderers/leaflet.mjs
new file mode 100644
index 0000000..29c0094
--- /dev/null
+++ b/dist/renderers/leaflet.mjs
@@ -0,0 +1,6 @@
+function t(){return t=Object.assign?Object.assign.bind():function(c){for(var d=1;d<arguments.length;d++){var p=arguments[d];for(var g in p)({}).hasOwnProperty.call(p,g)&&(c[g]=p[g])}return c},t.apply(null,arguments)}function e(c,d=9){const p=Math.pow(10,d);return Math.round(c*p)/p}const i$1=(c,d)=>{const{x:p,y:g}=c,{x:f,y:_}=d,y=f-p,v=_-g;return Math.sqrt(v*v+y*y)};class o{constructor({name:c,callback:d,unregister:p,register:g}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=c,this.register=()=>{this.registered||(this.registered=!0,g(d))},this.unregister=()=>{this.register&&(this.registered=!1,p(d))},this.callback=d}}class r{constructor(c){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof c.minPixelDragDistance?c.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof c.minPixelDragDistanceSelecting?c.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof c.minPixelDragDistanceDrawing?c.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof c.coordinatePrecision?c.coordinatePrecision:9}getButton(c){return-1===c.button?"neither":0===c.button?"left":1===c.button?"middle":2===c.button?"right":"neither"}getMapElementXYPosition(c){const d=this.getMapEventElement(),{left:p,top:g}=d.getBoundingClientRect();return{containerX:c.clientX-p,containerY:c.clientY-g}}getDrawEventFromEvent(c){const d=this.getLngLatFromEvent(c);if(!d)return null;const{lng:p,lat:g}=d,{containerX:f,containerY:_}=this.getMapElementXYPosition(c),y=this.getButton(c),v=Array.from(this._heldKeys);return{lng:e(p,this._coordinatePrecision),lat:e(g,this._coordinatePrecision),containerX:f,containerY:_,button:y,heldKeys:v}}register(c){this._currentModeCallbacks=c,this._listeners=this.getAdapterListeners(),this._listeners.forEach((c=>{c.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;const d=this.getDrawEventFromEvent(c);d&&(this._dragState="pre-dragging",this._lastDrawEvent=d)},register:c=>{this.getMapEventElement().addEventListener("pointerdown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerdown",c)}}),new o({name:"pointermove",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;c.preventDefault();const d=this.getDrawEventFromEvent(c);if(d)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(d),this._lastDrawEvent=d;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const c={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},p={x:d.containerX,y:d.containerY},g=this._currentModeCallbacks.getState(),f=i$1(c,p);let _=!1;if(_="drawing"===g?f<this._minPixelDragDistanceDrawing:"selecting"===g?f<this._minPixelDragDistanceSelecting:f<this._minPixelDragDistance,_)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(d,(c=>{this.setDraggability.bind(this)(c)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(d,(c=>{this.setDraggability.bind(this)(c)}))},register:c=>{this.getMapEventElement().addEventListener("pointermove",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointermove",c)}}),new o({name:"contextmenu",callback:c=>{this._currentModeCallbacks&&c.preventDefault()},register:c=>{this.getMapEventElement().addEventListener("contextmenu",c)},unregister:c=>{this.getMapEventElement().removeEventListener("contextmenu",c)}}),new o({name:"pointerup",callback:c=>{if(!this._currentModeCallbacks)return;if(c.target!==this.getMapEventElement())return;if(!c.isPrimary)return;const d=this.getDrawEventFromEvent(c);d&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(d,(c=>{this.setDraggability.bind(this)(c)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(d),this._dragState="not-dragging",this.setDraggability(!0))},register:c=>{this.getMapEventElement().addEventListener("pointerup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerup",c)}}),new o({name:"keyup",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.delete(c.key),this._currentModeCallbacks.onKeyUp({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keyup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keyup",c)}}),new o({name:"keydown",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.add(c.key),this._currentModeCallbacks.onKeyDown({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keydown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keydown",c)}})]}unregister(){this._listeners.forEach((c=>{c.unregister()})),this.clear()}}class n extends r{constructor(c){super(c),this._lib=void 0,this._map=void 0,this._panes={},this._container=void 0,this._layers={},this._lib=c.lib,this._map=c.map,this._container=this._map.getContainer()}createPaneStyleSheet(c,d){const p=document.createElement("style");return p.innerHTML=`.leaflet-${c}-pane {z-index: ${d+600}`,document.getElementsByTagName("head")[0].appendChild(p),this._map.createPane(c),p}clearPanes(){Object.values(this._panes).forEach((c=>{c&&c.remove()})),this._panes={}}clearLayers(){Object.values(this._layers).forEach((c=>{this._map.removeLayer(c)})),this._layers={}}styleGeoJSONLayer(c){return{pointToLayer:(d,p)=>{if(!d.properties)throw new Error("Feature has no properties");if("string"!=typeof d.properties.mode)throw new Error("Feature mode is not a string");const g=(0,c[d.properties.mode])(d),f=String(g.zIndex);return this._panes[f]||(this._panes[f]=this.createPaneStyleSheet(f,g.zIndex)),this._lib.circleMarker(p,{radius:g.pointWidth,stroke:g.pointOutlineWidth||!1,color:g.pointOutlineColor,weight:g.pointOutlineWidth,fillOpacity:.8,fillColor:g.pointColor,pane:f,interactive:!1})},style:d=>{if(!d||!d.properties)return{};const p=d,g=(0,c[p.properties.mode])(p),f=String(g.zIndex);return this._panes[f]||(this._panes[f]=this.createPaneStyleSheet(f,g.zIndex)),"LineString"===p.geometry.type?{interactive:!1,color:g.lineStringColor,weight:g.lineStringWidth,pane:f}:"Polygon"===p.geometry.type?{interactive:!1,fillOpacity:g.polygonFillOpacity,fillColor:g.polygonFillColor,weight:g.polygonOutlineWidth,stroke:!0,color:g.polygonFillColor,pane:f}:{}}}}getLngLatFromEvent(c){const{containerX:d,containerY:p}=this.getMapElementXYPosition(c),g=this._map.containerPointToLatLng({x:d,y:p});return null===g.lng||isNaN(g.lng)||null===g.lat||isNaN(g.lat)?null:{lng:g.lng,lat:g.lat}}getMapEventElement(){return this._container}setDraggability(c){c?this._map.dragging.enable():this._map.dragging.disable()}project(c,d){const{x:p,y:g}=this._map.latLngToContainerPoint({lng:c,lat:d});return{x:p,y:g}}unproject(c,d){const{lng:p,lat:g}=this._map.containerPointToLatLng({x:c,y:d});return{lng:p,lat:g}}setCursor(c){"unset"===c?this.getMapEventElement().style.removeProperty("cursor"):this.getMapEventElement().style.cursor=c}setDoubleClickToZoom(c){c?this._map.doubleClickZoom.enable():this._map.doubleClickZoom.disable()}render(c,d){c.created.forEach((c=>{this._layers[c.id]=this._lib.geoJSON(c,this.styleGeoJSONLayer(d)),this._map.addLayer(this._layers[c.id])})),c.deletedIds.forEach((c=>{this._map.removeLayer(this._layers[c])})),c.updated.forEach((c=>{this._map.removeLayer(this._layers[c.id]),this._layers[c.id]=this._lib.geoJSON(c,this.styleGeoJSONLayer(d)),this._map.addLayer(this._layers[c.id])}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers(),this.clearPanes())}register(c){super.register(c),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}}const c={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var d=class{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||c[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const p=6378137,g=Math.PI*p,f=[-g,-g,g,g],_=[-180,-85,180,85],y=p*Math.log(Math.tan(Math.PI/2));class m extends d{constructor(c){super({code:c,units:"m",extent:f,global:!0,worldExtent:_,getPointResolution:function(c,d){return c/Math.cosh(d[1]/p)}})}}const v=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],x=[-180,-90,180,90],C=6378137*Math.PI/180;class P extends d{constructor(c,d){super({code:c,units:"degrees",extent:x,axisOrientation:d,global:!0,metersPerUnit:C,worldExtent:x})}}const M=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let E={};function b(c,d,p){const g=c.getCode(),f=d.getCode();g in E||(E[g]={}),E[g][f]=p}function S(c,d){if(void 0!==d)for(let p=0,g=c.length;p<g;++p)d[p]=c[p];else d=c.slice();return d}function w(c){c.getCode(),b(c,c,S)}function F(c){!function(c){c.forEach(w)}(c),c.forEach((function(d){c.forEach((function(c){d!==c&&b(d,c,S)}))}))}var T,k,O,I;F(v),F(M),T=v,k=function(c,d,f){const _=c.length;f=f>1?f:2,void 0===d&&(d=f>2?c.slice():new Array(_));for(let v=0;v<_;v+=f){d[v]=g*c[v]/180;let f=p*Math.log(Math.tan(Math.PI*(+c[v+1]+90)/360));f>y?f=y:f<-y&&(f=-y),d[v+1]=f}return d},O=function(c,d,f){const _=c.length;f=f>1?f:2,void 0===d&&(d=f>2?c.slice():new Array(_));for(let y=0;y<_;y+=f)d[y]=180*c[y]/g,d[y+1]=360*Math.atan(Math.exp(c[y+1]/p))/Math.PI-90;return d},M.forEach((function(c){T.forEach((function(d){b(c,d,k),b(d,c,O)}))})),function(c){c.Commit="commit",c.Provisional="provisional",c.Finish="finish"}(I||(I={}));const D="selected",B="midPoint",j="closingPoint";function A(c){return Boolean(c&&"object"==typeof c&&null!==c&&!Array.isArray(c))}function R(c){if(!function(c){return"number"==typeof c&&!isNaN(new Date(c).valueOf())}(c))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var N;!function(c){c.Drawing="drawing",c.Select="select",c.Static="static",c.Render="render"}(N||(N={}));class X{get state(){return this._state}set state(c){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(c){if("object"!=typeof c)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=c}registerBehaviors(c){}constructor(c){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=N.Drawing,this.mode="base",this._state="unregistered",this._styles=c&&c.styles?t({},c.styles):{},this.pointerDistance=c&&c.pointerDistance||40,this.validate=c&&c.validation,this.projection=c&&c.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(c){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=c.store,this.store.registerOnChange(c.onChange),this.setDoubleClickToZoom=c.setDoubleClickToZoom,this.project=c.project,this.unproject=c.unproject,this.onSelect=c.onSelect,this.onDeselect=c.onDeselect,this.setCursor=c.setCursor,this.onStyleChange=c.onChange,this.onFinish=c.onFinish,this.coordinatePrecision=c.coordinatePrecision,this.registerBehaviors({mode:c.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:c.coordinatePrecision,projection:this.projection})}validateFeature(c){if("unregistered"===this._state)throw new Error("Mode must be registered");const d=function(c,d){let p;if(A(c))if(null==c.id)p="Feature has no id";else if("string"!=typeof c.id&&"number"!=typeof c.id)p="Feature must be string or number as per GeoJSON spec";else if(d(c.id))if(A(c.geometry))if(A(c.properties))if("string"==typeof c.geometry.type&&["Polygon","LineString","Point"].includes(c.geometry.type))if(Array.isArray(c.geometry.coordinates)){if(!c.properties.mode||"string"!=typeof c.properties.mode)throw new Error("Feature does not have a valid mode property")}else p="Feature coordinates is not an array";else p="Feature is not Point, LineString or Polygon";else p="Feature has no properties";else p="Feature has no geometry";else p="Feature must match the id strategy (default is UUID4)";else p="Feature is not object";if(p)throw new Error(p);return!0}(c,this.store.idStrategy.isValidId);return this.validate?this.validate(c,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:I.Provisional}):d}onFinish(c,d){}onDeselect(c){}onSelect(c){}onKeyDown(c){}onKeyUp(c){}onMouseMove(c){}onClick(c){}onDragStart(c,d){}onDrag(c,d){}onDragEnd(c,d){}getHexColorStylingValue(c,d,p){return this.getStylingValue(c,d,p)}getNumericStylingValue(c,d,p){return this.getStylingValue(c,d,p)}getStylingValue(c,d,p){return void 0===c?d:"function"==typeof c?c(p):c}}class U extends X{constructor(...c){super(...c),this.type=N.Select}}function Y(c,d){const i=c=>c*Math.PI/180,p=i(c[1]),g=i(c[0]),f=i(d[1]),_=f-p,y=i(d[0])-g,v=Math.sin(_/2)*Math.sin(_/2)+Math.cos(p)*Math.cos(f)*Math.sin(y/2)*Math.sin(y/2);return 2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v))*6371e3/1e3}const Z=6371008.8;function z(c){return c%360*Math.PI/180}function H(c){return c/(Z/1e3)}function $(c){return c%(2*Math.PI)*180/Math.PI}const W=57.29577951308232,V=.017453292519943295,G=6378137,Q=(c,d)=>({x:0===c?0:c*V*G,y:0===d?0:Math.log(Math.tan(Math.PI/4+d*V/2))*G}),tt=(c,d)=>({lng:0===c?0:W*(c/G),lat:0===d?0:(2*Math.atan(Math.exp(d/G))-Math.PI/2)*W});function et(c,d,p){const g=z(c[0]),f=z(c[1]),_=z(p),y=H(d),v=Math.asin(Math.sin(f)*Math.cos(y)+Math.cos(f)*Math.sin(y)*Math.cos(_));return[$(g+Math.atan2(Math.sin(_)*Math.sin(y)*Math.cos(f),Math.cos(y)-Math.sin(f)*Math.sin(v))),$(v)]}function it(c){const{center:d,radiusKilometers:p,coordinatePrecision:g}=c,f=c.steps?c.steps:64,_=[];for(let c=0;c<f;c++){const y=et(d,p,-360*c/f);_.push([e(y[0],g),e(y[1],g)])}return _.push(_[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[_]},properties:{}}}function ot(c){const d={epsilon:0};let p;if("Polygon"===c.geometry.type)p=c.geometry.coordinates;else{if("LineString"!==c.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");p=[c.geometry.coordinates]}const g=[];for(let c=0;c<p.length;c++)for(let d=0;d<p[c].length-1;d++)for(let g=0;g<p.length;g++)for(let f=0;f<p[g].length-1;f++)s(c,d,g,f);return g.length>0;function r(c){return c<0-d.epsilon||c>1+d.epsilon}function s(c,d,f,_){const y=p[c][d],v=p[c][d+1],x=p[f][_],C=p[f][_+1],L=function(c,d,p,g){if(rt(c,p)||rt(c,g)||rt(d,p)||rt(g,p))return null;const f=c[0],_=c[1],y=d[0],v=d[1],x=p[0],C=p[1],L=g[0],M=g[1],E=(f-y)*(C-M)-(_-v)*(x-L);return 0===E?null:[((f*v-_*y)*(x-L)-(f-y)*(x*M-C*L))/E,((f*v-_*y)*(C-M)-(_-v)*(x*M-C*L))/E]}(y,v,x,C);if(null===L)return;let M,E;M=v[0]!==y[0]?(L[0]-y[0])/(v[0]-y[0]):(L[1]-y[1])/(v[1]-y[1]),E=C[0]!==x[0]?(L[0]-x[0])/(C[0]-x[0]):(L[1]-x[1])/(C[1]-x[1]),r(M)||r(E)||(L.toString(),g.push(L))}}function rt(c,d){return c[0]===d[0]&&c[1]===d[1]}function st(c,d){return 2===c.length&&"number"==typeof c[0]&&"number"==typeof c[1]&&1/0!==c[0]&&1/0!==c[1]&&(g=c[0])>=-180&&g<=180&&(p=c[1])>=-90&&p<=90&&nt(c[0])<=d&&nt(c[1])<=d;var p,g}function nt(c){let d=1,p=0;for(;Math.round(c*d)/d!==c;)d*=10,p++;return p}function at(c,d){return"Polygon"===c.geometry.type&&1===c.geometry.coordinates.length&&c.geometry.coordinates[0].length>=4&&c.geometry.coordinates[0].every((c=>st(c,d)))&&(p=c.geometry.coordinates[0][0])[0]===(g=c.geometry.coordinates[0][c.geometry.coordinates[0].length-1])[0]&&p[1]===g[1];var p,g}function lt(c,d){return at(c,d)&&!ot(c)}class ht extends X{constructor(c){var d;super(c),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const p={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},p,c.cursors):p,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}this.startingRadiusKilometers=null!=(d=null==c?void 0:c.startingRadiusKilometers)?d:1e-5,this.validate=null==c?void 0:c.validation}close(){if(void 0===this.currentCircleId)return;const c=this.currentCircleId;if(this.validate&&c){const d=this.store.getGeometryCopy(c);if(!this.validate({type:"Feature",id:c,geometry:d,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:I.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const d=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[p]=this.store.create([{geometry:d.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=p,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(c),this.close()}onMouseMove(c){this.updateCircle(c)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c])}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d):d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}updateCircle(c){if(1===this.clickCount&&this.center&&this.currentCircleId){const d=Y(this.center,[c.lng,c.lat]);let p;if("web-mercator"===this.projection){const g=function(c,d){const p=1e3*Y(c,d);if(0===p)return 1;const{x:g,y:f}=Q(c[0],c[1]),{x:_,y:y}=Q(d[0],d[1]);return Math.sqrt(Math.pow(_-g,2)+Math.pow(y-f,2))/p}(this.center,[c.lng,c.lat]);p=function(c){const{center:d,radiusKilometers:p,coordinatePrecision:g}=c,f=c.steps?c.steps:64,_=1e3*p,[y,v]=d,{x:x,y:C}=Q(y,v),L=[];for(let c=0;c<f;c++){const d=360*c/f*Math.PI/180,p=_*Math.cos(d),y=_*Math.sin(d),[v,M]=[x+p,C+y],{lng:E,lat:T}=tt(v,M);L.push([e(E,g),e(T,g)])}return L.push(L[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[L]},properties:{}}}({center:this.center,radiusKilometers:d*g,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");p=it({center:this.center,radiusKilometers:d,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:p.geometry,properties:{radiusKilometers:d}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:I.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:p.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:d}])}}}class dt{constructor({store:c,mode:d,project:p,unproject:g,pointerDistance:f,coordinatePrecision:_,projection:y}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=c,this.mode=d,this.project=p,this.unproject=g,this.pointerDistance=f,this.coordinatePrecision=_,this.projection=y}}function ut({unproject:c,point:d,pointerDistance:p}){const g=p/2,{x:f,y:_}=d;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[c(f-g,_-g),c(f+g,_-g),c(f+g,_+g),c(f-g,_+g),c(f-g,_-g)].map((c=>[c.lng,c.lat]))]}}}class gt extends dt{constructor(c){super(c)}create(c){const{containerX:d,containerY:p}=c;return ut({unproject:this.unproject,point:{x:d,y:p},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(c){super(c)}measure(c,d){const{x:p,y:g}=this.project(d[0],d[1]);return i$1({x:p,y:g},{x:c.containerX,y:c.containerY})}}class yt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=c=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode))),this.getSnappableCoordinate=(c,d)=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode&&c.id!==d))),this.config=c,this.pixelDistance=d,this.clickBoundingBox=p}getSnappable(c,d){const p=this.clickBoundingBox.create(c),g=this.store.search(p,d),f={coord:void 0,minDist:1/0};return g.forEach((d=>{let p;if("Polygon"===d.geometry.type)p=d.geometry.coordinates[0];else{if("LineString"!==d.geometry.type)return;p=d.geometry.coordinates}p.forEach((d=>{const p=this.pixelDistance.measure(c,d);p<f.minDist&&p<this.pointerDistance&&(f.coord=d,f.minDist=p)}))})),f.coord}}function mt(c,d,p){const g=z(c[0]),f=z(c[1]),_=z(p),y=H(d),v=Math.asin(Math.sin(f)*Math.cos(y)+Math.cos(f)*Math.sin(y)*Math.cos(_));return[$(g+Math.atan2(Math.sin(_)*Math.sin(y)*Math.cos(f),Math.cos(y)-Math.sin(f)*Math.sin(v))),$(v)]}function Ct(c,d){const p=z(c[0]),g=z(d[0]),f=z(c[1]),_=z(d[1]),y=Math.sin(g-p)*Math.cos(_),v=Math.cos(f)*Math.sin(_)-Math.sin(f)*Math.cos(_)*Math.cos(g-p);return $(Math.atan2(y,v))}function Pt(c,d,p){const g=[],f=c.length;let _,y,v,x=0;for(let f=0;f<c.length&&!(d>=x&&f===c.length-1);f++){if(x>d&&0===g.length){if(_=d-x,!_)return g.push(c[f]),g;y=Ct(c[f],c[f-1])-180,v=mt(c[f],_,y),g.push(v)}if(x>=p)return _=p-x,_?(y=Ct(c[f],c[f-1])-180,v=mt(c[f],_,y),g.push(v),g):(g.push(c[f]),g);if(x>=d&&g.push(c[f]),f===c.length-1)return g;x+=Y(c[f],c[f+1])}if(x<d&&c.length===f)throw new Error("Start position is beyond line");const C=c[c.length-1];return[C,C]}function _t(c){return c*(Math.PI/180)}function xt(c){return c*(180/Math.PI)}class Mt extends dt{constructor(c){super(c),this.config=void 0,this.config=c}generateInsertionCoordinates(c,d,p){const g=[c,d];let f=0;for(let c=0;c<g.length-1;c++)f+=Y(g[0],g[1]);if(f<=p)return g;let _=f/p-1;Number.isInteger(_)||(_=Math.floor(_)+1);const y=[];for(let c=0;c<_;c++){const d=Pt(g,p*c,p*(c+1));y.push(d)}const v=[];for(let c=0;c<y.length;c++)v.push(y[c][1]);return this.limitCoordinates(v)}generateInsertionGeodesicCoordinates(c,d,p){const g=Y(c,d),f=function(c,d,p){const g=[],f=_t(c[1]),_=_t(c[0]),y=_t(d[1]),v=_t(d[0]);p+=1;const x=2*Math.asin(Math.sqrt(Math.sin((y-f)/2)**2+Math.cos(f)*Math.cos(y)*Math.sin((v-_)/2)**2));if(0===x||isNaN(x))return g;for(let c=0;c<=p;c++){const d=c/p,C=Math.sin((1-d)*x)/Math.sin(x),L=Math.sin(d*x)/Math.sin(x),M=C*Math.cos(f)*Math.cos(_)+L*Math.cos(y)*Math.cos(v),E=C*Math.cos(f)*Math.sin(_)+L*Math.cos(y)*Math.sin(v),T=C*Math.sin(f)+L*Math.sin(y);if(isNaN(M)||isNaN(E)||isNaN(T))continue;const k=Math.atan2(T,Math.sqrt(M**2+E**2)),O=Math.atan2(E,M);isNaN(k)||isNaN(O)||g.push([xt(O),xt(k)])}return g.slice(1,-1)}(c,d,Math.floor(g/p));return this.limitCoordinates(f)}limitCoordinates(c){return c.map((c=>[e(c[0],this.config.coordinatePrecision),e(c[1],this.config.coordinatePrecision)]))}}function bt(c,d){return c[0]===d[0]&&c[1]===d[1]}class St extends X{constructor(c){super(c),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const d={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}this.validate=null==c?void 0:c.validation,this.insertCoordinates=null==c?void 0:c.insertCoordinates}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId);c.coordinates.pop(),this.updateGeometries([...c.coordinates],void 0,I.Commit);const d=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(d,{mode:this.mode,action:"draw"})}updateGeometries(c,d,p){if(!this.currentId)return;const g={type:"LineString",coordinates:c};if(this.validate&&!this.validate({type:"Feature",geometry:g},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:p}))return;const f=[{id:this.currentId,geometry:g}];this.closingPointId&&d&&f.push({id:this.closingPointId,geometry:{type:"Point",coordinates:d}}),"commit"===p&&(this.lastCommitedCoordinates=g.coordinates),this.store.updateGeometry(f)}generateInsertCoordinates(c,d){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const p=Y(c,d)/(this.insertCoordinates.value+1);let g=[];return"globe"===this.projection?g=this.insertPoint.generateInsertionGeodesicCoordinates(c,d,p):"web-mercator"===this.projection&&(g=this.insertPoint.generateInsertionCoordinates(c,d,p)),g}createLine(c){const[d]=this.store.create([{geometry:{type:"LineString",coordinates:[c,c]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[c,c],this.currentId=d,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(c){if(!this.currentId)return;const d=this.store.getGeometryCopy(this.currentId).coordinates,[p]=this.store.create([{geometry:{type:"Point",coordinates:[...c]},properties:{mode:this.mode}}]);this.closingPointId=p,this.setCursor(this.cursors.close);const g=[...d,c];this.updateGeometries(g,void 0,I.Commit),this.currentCoordinate++}updateToLine(c,d){if(!this.currentId)return;const p=this.store.getGeometryCopy(this.currentId).coordinates,[g,f]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:p[p.length-2],{x:_,y:y}=this.project(g,f);if(i$1({x:_,y:y},{x:d.x,y:d.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const v=[...p,c];this.updateGeometries(v,p[p.length-1],I.Commit),this.currentCoordinate++}registerBehaviors(c){this.snapping=new yt(c,new pt(c),new gt(c)),this.insertPoint=new Mt(c)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const d=this.store.getGeometryCopy(this.currentId).coordinates;d.pop();const p=this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];if(this.closingPointId){const[p,g]=d[d.length-1],{x:f,y:_}=this.project(p,g);i$1({x:f,y:_},{x:c.containerX,y:c.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let g=[...d,p];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const c=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],d=p;if(!bt(c,d)){const f=this.generateInsertCoordinates(c,d);g=[...this.lastCommitedCoordinates.slice(0,-1),...f,p]}}this.updateGeometries(g,void 0,I.Provisional)}onClick(c){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1;const d=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];0===this.currentCoordinate?this.createLine(d):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(d):this.currentId&&this.updateToLine(d,{x:c.containerX,y:c.containerY})}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel&&this.cleanUp(),c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"LineString"===c.geometry.type&&c.properties.mode===this.mode?(d.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,d.lineStringColor,c),d.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,d.lineStringWidth,c),d.zIndex=10,d):"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode?(d.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,d.pointColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,d.pointWidth,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),d.zIndex=40,d):d}validateFeature(c){return!!super.validateFeature(c)&&"LineString"===c.geometry.type&&c.properties.mode===this.mode&&c.geometry.coordinates.length>=2}}function Et(c,d){return"Point"===c.geometry.type&&st(c.geometry.coordinates,d)}class wt extends X{constructor(c){super(c),this.mode="point",this.cursors=void 0;const d={create:"crosshair"};this.cursors=c&&c.cursors?t({},d,c.cursors):d}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(!this.store)throw new Error("Mode must be registered first");const d={type:"Point",coordinates:[c.lng,c.lat]},p={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:d,properties:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:I.Finish}))return;const[g]=this.store.create([{geometry:d,properties:p}]);this.onFinish(g,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode&&(d.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.pointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,c),d.zIndex=30),d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&Et(c,this.coordinatePrecision)}}class It extends dt{constructor(c,d){super(c),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=c,this.pixelDistance=d}get ids(){return this._startEndPoints.concat()}set ids(c){}create(c,d){if(this.ids.length)throw new Error("Opening and closing points already created");if(c.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:c[0]},properties:{mode:d,[j]:!0}},{geometry:{type:"Point",coordinates:c[c.length-2]},properties:{mode:d,[j]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(c){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:c[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:c[c.length-3]}}])}isClosingPoint(c){const d=this.store.getGeometryCopy(this.ids[0]),p=this.store.getGeometryCopy(this.ids[1]),g=this.pixelDistance.measure(c,d.coordinates),f=this.pixelDistance.measure(c,p.coordinates);return{isClosing:g<this.pointerDistance,isPreviousClosing:f<this.pointerDistance}}}class Ft extends X{constructor(c){super(c),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const d={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId).coordinates[0];if(c.length<5)return;if(!this.updatePolygonGeometry([...c.slice(0,-2),c[0]],I.Finish))return;const d=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(d,{mode:this.mode,action:"draw"})}registerBehaviors(c){this.pixelDistance=new pt(c),this.snapping=new yt(c,this.pixelDistance,new gt(c)),this.closingPoints=new It(c,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,p=this.store.getGeometryCopy(this.currentId).coordinates[0];let g;if(d&&(c.lng=d[0],c.lat=d[1]),1===this.currentCoordinate){const d=1/Math.pow(10,this.coordinatePrecision-1),f=Math.max(1e-6,d);g=[p[0],[c.lng,c.lat],[c.lng,c.lat-f],p[0]]}else if(2===this.currentCoordinate)g=[p[0],p[1],[c.lng,c.lat],p[0]];else{const{isClosing:d,isPreviousClosing:f}=this.closingPoints.isClosingPoint(c);f||d?(this.setCursor(this.cursors.close),g=[...p.slice(0,-2),p[0],p[0]]):g=[...p.slice(0,-2),[c.lng,c.lat],p[0]]}this.updatePolygonGeometry(g,I.Provisional)}updatePolygonGeometry(c,d){if(!this.currentId)return!1;const p={type:"Polygon",coordinates:[c]};return!(this.validate&&!this.validate({type:"Feature",geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d})||(this.store.updateGeometry([{id:this.currentId,geometry:p}]),0))}onClick(c){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1,0===this.currentCoordinate){const d=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(c):void 0;d&&(c.lng=d[0],c.lat=d[1]);const[p]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentId=p,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;d&&(c.lng=d[0],c.lat=d[1]);const p=this.store.getGeometryCopy(this.currentId);if(bt([c.lng,c.lat],p.coordinates[0][0]))return;if(!this.updatePolygonGeometry([p.coordinates[0][0],[c.lng,c.lat],[c.lng,c.lat],p.coordinates[0][0]],I.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;d&&(c.lng=d[0],c.lat=d[1]);const p=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([c.lng,c.lat],p[1]))return;if(!this.updatePolygonGeometry([p[0],p[1],[c.lng,c.lat],[c.lng,c.lat],p[0]],I.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(p,"polygon"),this.currentCoordinate++}else if(this.currentId){const d=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,p=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:g,isPreviousClosing:f}=this.closingPoints.isClosingPoint(c);if(f||g)this.close();else{if(d&&(c.lng=d[0],c.lat=d[1]),bt([c.lng,c.lat],p[this.currentCoordinate-1]))return;const g=function(c=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:c},properties:{}}}([[...p.slice(0,-1),[c.lng,c.lat],p[0]]]);if(!this.updatePolygonGeometry(g.geometry.coordinates[0],I.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(g.geometry.coordinates[0])}}}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const c=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(c){}}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode){if("Polygon"===c.geometry.type)return d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d;if("Point"===c.geometry.type)return d.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),d.zIndex=30,d}return d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&at(c,this.coordinatePrecision)}}class Dt extends X{constructor(c){super(c),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const d={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const d={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}}updateRectangle(c,d){if(1===this.clickCount&&this.center&&this.currentRectangleId){const p=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],g={type:"Polygon",coordinates:[[p,[c.lng,p[1]],[c.lng,c.lat],[p[0],c.lat],p]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:g},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:g}])}}close(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),c&&this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const[d]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=d,this.clickCount++,this.setDrawing()}else this.updateRectangle(c,I.Finish),this.close()}onMouseMove(c){this.updateRectangle(c,I.Provisional)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==c&&this.store.delete([c])}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(d.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,d.polygonFillColor,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,d.polygonOutlineColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,d.polygonOutlineWidth,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d):d}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}}class kt extends X{constructor(c){super({styles:c.styles}),this.type=N.Render,this.mode="render",this.mode=c.modeName}registerBehaviors(c){this.mode=c.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(c){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",c),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,c),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",c),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,c),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",c),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,c),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",c),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,c),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,c),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",c),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,c)}}validateFeature(c){return super.validateFeature(c)&&(Et(c,this.coordinatePrecision)||at(c,this.coordinatePrecision)||function(c,d){return"LineString"===c.geometry.type&&c.geometry.coordinates.length>=2&&c.geometry.coordinates.every((c=>st(c,d)))}(c,this.coordinatePrecision))}}function Ot(c,d){const p=c,g=d,f=z(p[1]),_=z(g[1]);let y=z(g[0]-p[0]);y>Math.PI&&(y-=2*Math.PI),y<-Math.PI&&(y+=2*Math.PI);const v=Math.log(Math.tan(_/2+Math.PI/4)/Math.tan(f/2+Math.PI/4)),x=($(Math.atan2(y,v))+360)%360;return x>180?-(360-x):x}function jt(c,d,p){let g=d;d<0&&(g=-Math.abs(g));const f=g/Z,_=c[0]*Math.PI/180,y=z(c[1]),v=z(p),x=f*Math.cos(v);let C=y+x;Math.abs(C)>Math.PI/2&&(C=C>0?Math.PI-C:-Math.PI-C);const L=Math.log(Math.tan(C/2+Math.PI/4)/Math.tan(y/2+Math.PI/4)),M=Math.abs(L)>1e-11?x/L:Math.cos(y),E=[(180*(_+f*Math.sin(v)/M)/Math.PI+540)%360-180,180*C/Math.PI];return E[0]+=E[0]-c[0]>180?-360:c[0]-E[0]>180?360:0,E}function Lt(c,d,p,g,f){const _=g(c[0],c[1]),y=g(d[0],d[1]),{lng:v,lat:x}=f((_.x+y.x)/2,(_.y+y.y)/2);return[e(v,p),e(x,p)]}function Wt(c,d,p){const g=jt(c,1e3*Y(c,d)/2,Ot(c,d));return[e(g[0],p),e(g[1],p)]}function Bt({featureCoords:c,precision:d,unproject:p,project:g,projection:f}){const _=[];for(let y=0;y<c.length-1;y++){let v;if("web-mercator"===f)v=Lt(c[y],c[y+1],d,g,p);else{if("globe"!==f)throw new Error("Invalid projection");v=Wt(c[y],c[y+1],d)}_.push(v)}return _}class Gt extends dt{constructor(c,d){super(c),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=c,this.selectionPointBehavior=d}get ids(){return this._midPoints.concat()}set ids(c){}insert(c,d){const p=this.store.getGeometryCopy(c),{midPointFeatureId:g,midPointSegment:f}=this.store.getPropertiesCopy(c),_=this.store.getGeometryCopy(g),y="Polygon"===_.type?_.coordinates[0]:_.coordinates;y.splice(f+1,0,p.coordinates),_.coordinates="Polygon"===_.type?[y]:y,this.store.updateGeometry([{id:g,geometry:_}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(y,g,d),this.selectionPointBehavior.create(y,_.type,g)}create(c,d,p){if(!this.store.has(d))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(c,d,p,g,f,_){return Bt({featureCoords:c,precision:p,project:g,unproject:f,projection:_}).map(((c,p)=>({geometry:{type:"Point",coordinates:c},properties:d(p)})))}(c,(c=>({mode:this.mode,[B]:!0,midPointSegment:c,midPointFeatureId:d})),p,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(c){if(0!==this._midPoints.length)return Bt({featureCoords:c,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((c,d)=>({id:this._midPoints[d],geometry:{type:"Point",coordinates:c}})))}}class Nt extends dt{constructor(c){super(c),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(c){}create(c,d,p){this._selectionPoints=this.store.create(function(c,d,p){const g=[],f="Polygon"===d?c.length-1:c.length;for(let d=0;d<f;d++)g.push({geometry:{type:"Point",coordinates:c[d]},properties:p(d)});return g}(c,d,(c=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:p,index:c}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(c){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((d,p)=>({id:d,geometry:{type:"Point",coordinates:c[p]}})))}getOneUpdated(c,d){if(void 0!==this._selectionPoints[c])return{id:this._selectionPoints[c],geometry:{type:"Point",coordinates:d}}}}function Vt(c,d){let p=!1;for(let y=0,v=d.length;y<v;y++){const v=d[y];for(let d=0,y=v.length,x=y-1;d<y;x=d++)(f=v[d])[1]>(g=c)[1]!=(_=v[x])[1]>g[1]&&g[0]<(_[0]-f[0])*(g[1]-f[1])/(_[1]-f[1])+f[0]&&(p=!p)}var g,f,_;return p}const At=(c,d,p)=>{const o=c=>c*c,r=(c,d)=>o(c.x-d.x)+o(c.y-d.y);return Math.sqrt(((c,d,p)=>{const g=r(d,p);if(0===g)return r(c,d);let f=((c.x-d.x)*(p.x-d.x)+(c.y-d.y)*(p.y-d.y))/g;return f=Math.max(0,Math.min(1,f)),r(c,{x:d.x+f*(p.x-d.x),y:d.y+f*(p.y-d.y)})})(c,d,p))};class Rt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=c,this.createClickBoundingBox=d,this.pixelDistance=p}find(c,d){let p,g,f,_,y=1/0,v=1/0,x=1/0;const C=this.createClickBoundingBox.create(c),L=this.store.search(C);for(let C=0;C<L.length;C++){const M=L[C],E=M.geometry;if("Point"===E.type){if(M.properties.selectionPoint||!d&&M.properties[B])continue;const g=this.pixelDistance.measure(c,E.coordinates);M.properties[B]&&g<this.pointerDistance&&g<x?(x=g,f=M):!M.properties[B]&&g<this.pointerDistance&&g<y&&(y=g,p=M)}else if("LineString"===E.type){if(p)continue;for(let d=0;d<E.coordinates.length-1;d++){const p=E.coordinates[d],f=E.coordinates[d+1],_=At({x:c.containerX,y:c.containerY},this.project(p[0],p[1]),this.project(f[0],f[1]));_<this.pointerDistance&&_<v&&(v=_,g=M)}}else if("Polygon"===E.type){if(p||g)continue;Vt([c.lng,c.lat],E.coordinates)&&(_=M)}}return{clickedFeature:p||g||_,clickedMidPoint:f}}}class Tt extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=c,this.featuresAtMouseEvent=d,this.selectionPoints=p,this.midPoints=g}startDragging(c,d){this.draggedFeatureId=d,this.dragPosition=[c.lng,c.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(c,d){const{clickedFeature:p}=this.featuresAtMouseEvent.find(c,!0);return!(!p||p.id!==d)}drag(c,d){if(!this.draggedFeatureId)return;const p=this.store.getGeometryCopy(this.draggedFeatureId),g=[c.lng,c.lat];if("Polygon"===p.type||"LineString"===p.type){let f,_;if("Polygon"===p.type?(f=p.coordinates[0],_=f.length-1):(f=p.coordinates,_=f.length),!this.dragPosition)return!1;for(let c=0;c<_;c++){const d=f[c],p=[this.dragPosition[0]-g[0],this.dragPosition[1]-g[1]],_=e(d[0]-p[0],this.config.coordinatePrecision),y=e(d[1]-p[1],this.config.coordinatePrecision);if(_>180||_<-180||y>90||y<-90)return!1;f[c]=[_,y]}"Polygon"===p.type&&(f[f.length-1]=[f[0][0],f[0][1]]);const y=this.selectionPoints.getUpdated(f)||[],v=this.midPoints.getUpdated(f)||[];if(d&&!d({type:"Feature",id:this.draggedFeatureId,geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:I.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:p},...y,...v]),this.dragPosition=[c.lng,c.lat]}else"Point"===p.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:g}}]),this.dragPosition=[c.lng,c.lat])}}class Xt extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=c,this.pixelDistance=d,this.selectionPoints=p,this.midPoints=g}getClosestCoordinate(c,d){const p={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let g;if("LineString"===d.type)g=d.coordinates;else{if("Polygon"!==d.type)return p;g=d.coordinates[0]}for(let f=0;f<g.length;f++){const _=this.pixelDistance.measure(c,g[f]);if(_<this.pointerDistance&&_<p.dist){const c="Polygon"===d.type&&(f===g.length-1||0===f);p.dist=_,p.index=c?0:f,p.isFirstOrLastPolygonCoord=c}}return p}getDraggableIndex(c,d){const p=this.store.getGeometryCopy(d),g=this.getClosestCoordinate(c,p);return-1===g.index?-1:g.index}drag(c,d,p){if(!this.draggedCoordinate.id)return!1;const g=this.draggedCoordinate.index,f=this.store.getGeometryCopy(this.draggedCoordinate.id),_="LineString"===f.type?f.coordinates:f.coordinates[0],y=[c.lng,c.lat];if(c.lng>180||c.lng<-180||c.lat>90||c.lat<-90)return!1;if("Polygon"!==f.type||g!==_.length-1&&0!==g)_[g]=y;else{const c=_.length-1;_[0]=y,_[c]=y}const v=this.selectionPoints.getOneUpdated(g,y),x=v?[v]:[],C=this.midPoints.getUpdated(_)||[];return!("Point"!==f.type&&!d&&ot({type:"Feature",geometry:f,properties:{}})||p&&!p({type:"Feature",id:this.draggedCoordinate.id,geometry:f,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:I.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:f},...x,...C]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,d){this.draggedCoordinate={id:c,index:d}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(c){let d=0,p=0,g=0;return("Polygon"===c.geometry.type?c.geometry.coordinates[0].slice(0,-1):c.geometry.coordinates).forEach((c=>{d+=c[0],p+=c[1],g++}),!0),[d/g,p/g]}function Yt(c,d){c[0]+=c[0]-d[0]>180?-360:d[0]-c[0]>180?360:0;const p=Z,g=d[1]*Math.PI/180,f=c[1]*Math.PI/180,_=f-g;let y=Math.abs(c[0]-d[0])*Math.PI/180;y>Math.PI&&(y-=2*Math.PI);const v=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(g/2+Math.PI/4)),x=Math.abs(v)>1e-11?_/v:Math.cos(g);return Math.sqrt(_*_+x*x*y*y)*p}function Kt(c){const d=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((c=>{const{x:d,y:p}=Q(c[0],c[1]);return[d,p]}));return"Polygon"===c.geometry.type?function(c){let d=0,p=0,g=0;const f=c.length;for(let _=0;_<f-1;_++){const[f,y]=c[_],[v,x]=c[_+1],C=f*x-v*y;d+=C,p+=(f+v)*C,g+=(y+x)*C}return d/=2,p/=6*d,g/=6*d,{x:p,y:g}}(d):function(c){const d=c.length;let p=0,g=0;for(let f=0;f<d;f++){const[d,_]=c[f];p+=d,g+=_}return{x:p/d,y:g/d}}(d)}class zt extends dt{constructor(c,d,p){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=c,this.selectionPoints=d,this.midPoints=p}reset(){this.lastBearing=void 0}rotate(c,d,p){const g=this.store.getGeometryCopy(d);if("Polygon"!==g.type&&"LineString"!==g.type)return;const f=[c.lng,c.lat];let _;const y={type:"Feature",geometry:g,properties:{}};if("web-mercator"===this.config.projection){if(_=function vt({x:c,y:d},{x:p,y:g}){let f=Math.atan2(g-d,p-c);return f*=180/Math.PI,f>180?f-=360:f<-180&&(f+=360),f}(Kt(y),Q(c.lng,c.lat)),!this.lastBearing)return void(this.lastBearing=_);((c,d)=>{if(0===d||360===d||-360===d)return c;const p=.017453292519943295*d,g=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,d])=>Q(c,d))),f=g.reduce(((c,d)=>({x:c.x+d.x,y:c.y+d.y})),{x:0,y:0});f.x/=g.length,f.y/=g.length;const _=g.map((c=>({x:f.x+(c.x-f.x)*Math.cos(p)-(c.y-f.y)*Math.sin(p),y:f.y+(c.x-f.x)*Math.sin(p)+(c.y-f.y)*Math.cos(p)}))).map((({x:c,y:d})=>[tt(c,d).lng,tt(c,d).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=_:(console.log("rotatedCoordinates linestring",_),c.geometry.coordinates=_)})(y,-(this.lastBearing-_))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(_=Ot(Ut({type:"Feature",geometry:g,properties:{}}),f),!this.lastBearing)return void(this.lastBearing=_+180);!function(c,d){if(0===d||360===d||-360===d)return c;const p=Ut(c);("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const g=Ot(p,c)+d,f=Yt(p,c),_=jt(p,f,g);c[0]=_[0],c[1]=_[1]}))}(y,-(this.lastBearing-(_+180)))}const v="Polygon"===g.type?g.coordinates[0]:g.coordinates;v.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const x=this.midPoints.getUpdated(v)||[],C=this.selectionPoints.getUpdated(v)||[];if(p&&!p({id:d,type:"Feature",geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:I.Provisional}))return!1;this.store.updateGeometry([{id:d,geometry:g},...C,...x]),"web-mercator"===this.projection?this.lastBearing=_:"globe"===this.projection&&(this.lastBearing=_+180)}}class Ht extends dt{constructor(c,d,p){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=c,this.selectionPoints=d,this.midPoints=p}reset(){this.lastDistance=void 0}scale(c,d,p){const g=this.store.getGeometryCopy(d);if("Polygon"!==g.type&&"LineString"!==g.type)return;const f=[c.lng,c.lat],_={type:"Feature",geometry:g,properties:{}};let y;const v=Kt(_);if("web-mercator"===this.config.projection){const d=Q(c.lng,c.lat);y=i$1(v,d)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");y=Y(Ut({type:"Feature",geometry:g,properties:{}}),f)}if(!this.lastDistance)return void(this.lastDistance=y);const x=1-(this.lastDistance-y)/y;if("web-mercator"===this.config.projection){const{lng:c,lat:d}=tt(v.x,v.y);!function(c,d,p){if(1===d)return c;const g=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,d])=>Q(c,d))),f=Q(p[0],p[1]),_=g.map((c=>({x:f.x+(c.x-f.x)*d,y:f.y+(c.y-f.y)*d}))).map((({x:c,y:d})=>[tt(c,d).lng,tt(c,d).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=_:c.geometry.coordinates=_}(_,x,[c,d])}else"globe"===this.config.projection&&function(c,d,p,g="xy"){1===d||("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const f=Yt(p,c),_=Ot(p,c),y=jt(p,f*d,_);"x"!==g&&"xy"!==g||(c[0]=y[0]),"y"!==g&&"xy"!==g||(c[1]=y[1])}))}(_,x,Ut(_));const C="Polygon"===g.type?g.coordinates[0]:g.coordinates;C.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const L=this.midPoints.getUpdated(C)||[],M=this.selectionPoints.getUpdated(C)||[];if(p&&!p({id:d,type:"Feature",geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:I.Provisional}))return!1;this.store.updateGeometry([{id:d,geometry:g},...M,...L]),this.lastDistance=y}}class $t extends dt{constructor(c,d,p,g){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=c,this.pixelDistance=d,this.selectionPoints=p,this.midPoints=g}getClosestCoordinate(c,d){const p={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let g;if("LineString"===d.type)g=d.coordinates;else{if("Polygon"!==d.type)return p;g=d.coordinates[0]}for(let f=0;f<g.length;f++){const _=this.pixelDistance.measure(c,g[f]);if(_<this.pointerDistance&&_<p.dist){const c="Polygon"===d.type&&(f===g.length-1||0===f);p.dist=_,p.index=c?0:f,p.isFirstOrLastPolygonCoord=c}}return p}isValidDragWebMercator(c,d,p){switch(c){case 0:if(d<=0||p>=0)return!1;break;case 1:if(p>=0)return!1;break;case 2:if(d>=0||p>=0)return!1;break;case 3:if(d>=0)return!1;break;case 4:if(d>=0||p<=0)return!1;break;case 5:if(p<=0)return!1;break;case 6:if(d<=0||p<=0)return!1;break;case 7:if(d<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const c=this.getFeature(this.draggedCoordinate.id);if(!c)return null;const d=this.getNormalisedCoordinates(c.geometry);return{boundingBox:this.getBBoxWebMercator(d),feature:c,updatedCoords:d,selectedCoordinate:d[this.draggedCoordinate.index]}}centerWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{feature:p,boundingBox:g,updatedCoords:f,selectedCoordinate:_}=d,y=Kt(p);if(!y)return null;const v=Q(_[0],_[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(g,v),C=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:x,updatedCoords:f,webMercatorCursor:C,webMercatorSelected:v,webMercatorOrigin:y}),f}centerFixedWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{feature:p,boundingBox:g,updatedCoords:f,selectedCoordinate:_}=d,y=Kt(p);if(!y)return null;const v=Q(_[0],_[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(g,v),C=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:x,updatedCoords:f,webMercatorCursor:C,webMercatorSelected:v,webMercatorOrigin:y}),f}scaleFixedWebMercator({closestBBoxIndex:c,webMercatorOrigin:d,webMercatorSelected:p,webMercatorCursor:g,updatedCoords:f}){if(!this.isValidDragWebMercator(c,d.x-g.x,d.y-g.y))return null;let _=i$1(d,g)/i$1(d,p);return _<0&&(_=this.minimumScale),this.performWebMercatorScale(f,d.x,d.y,_,_),f}oppositeFixedWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{boundingBox:p,updatedCoords:g,selectedCoordinate:f}=d,_=Q(f[0],f[1]),{oppositeBboxIndex:y,closestBBoxIndex:v}=this.getIndexesWebMercator(p,_),x={x:p[y][0],y:p[y][1]},C=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:v,updatedCoords:g,webMercatorCursor:C,webMercatorSelected:_,webMercatorOrigin:x}),g}oppositeWebMercatorDrag(c){const d=this.getSelectedFeatureDataWebMercator();if(!d)return null;const{boundingBox:p,updatedCoords:g,selectedCoordinate:f}=d,_=Q(f[0],f[1]),{oppositeBboxIndex:y,closestBBoxIndex:v}=this.getIndexesWebMercator(p,_),x={x:p[y][0],y:p[y][1]},C=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:v,updatedCoords:g,webMercatorCursor:C,webMercatorSelected:_,webMercatorOrigin:x}),g}scaleWebMercator({closestBBoxIndex:c,webMercatorOrigin:d,webMercatorSelected:p,webMercatorCursor:g,updatedCoords:f}){const _=d.x-g.x,y=d.y-g.y;if(!this.isValidDragWebMercator(c,_,y))return null;let v=1;0!==_&&1!==c&&5!==c&&(v=1-(d.x-p.x-_)/_);let x=1;return 0!==y&&3!==c&&7!==c&&(x=1-(d.y-p.y-y)/y),this.validateScale(v,x)?(v<0&&(v=this.minimumScale),x<0&&(x=this.minimumScale),this.performWebMercatorScale(f,d.x,d.y,v,x),f):null}getFeature(c){if(null===this.draggedCoordinate.id)return null;const d=this.store.getGeometryCopy(c);return"Polygon"!==d.type&&"LineString"!==d.type?null:{type:"Feature",geometry:d,properties:{}}}getNormalisedCoordinates(c){return"Polygon"===c.type?c.coordinates[0]:c.coordinates}validateScale(c,d){const p=!isNaN(c)&&d<Number.MAX_SAFE_INTEGER,g=!isNaN(d)&&d<Number.MAX_SAFE_INTEGER;return p&&g}performWebMercatorScale(c,d,p,g,f){c.forEach((c=>{const{x:_,y:y}=Q(c[0],c[1]),v=d+(_-d)*g,x=p+(y-p)*f,{lng:C,lat:L}=tt(v,x);c[0]=C,c[1]=L}))}getBBoxWebMercator(c){const d=[1/0,1/0,-1/0,-1/0];(c=c.map((c=>{const{x:d,y:p}=Q(c[0],c[1]);return[d,p]}))).forEach((([c,p])=>{c<d[0]&&(d[0]=c),p<d[1]&&(d[1]=p),c>d[2]&&(d[2]=c),p>d[3]&&(d[3]=p)}));const[p,g,f,_]=d;return[[p,_],[(p+f)/2,_],[f,_],[f,_+(g-_)/2],[f,g],[(p+f)/2,g],[p,g],[p,_+(g-_)/2]]}getIndexesWebMercator(c,d){let p,g=1/0;for(let f=0;f<c.length;f++){const _=i$1({x:d.x,y:d.y},{x:c[f][0],y:c[f][1]});_<g&&(p=f,g=_)}if(void 0===p)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[p],closestBBoxIndex:p}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,d){this.draggedCoordinate={id:c,index:d}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(c,d){const p=this.store.getGeometryCopy(d),g=this.getClosestCoordinate(c,p);return-1===g.index?-1:g.index}drag(c,d,p){if(!this.draggedCoordinate.id)return!1;const g=this.getFeature(this.draggedCoordinate.id);if(!g)return!1;let f=null;if("center"===d?f=this.centerWebMercatorDrag(c):"opposite"===d?f=this.oppositeWebMercatorDrag(c):"center-fixed"===d?f=this.centerFixedWebMercatorDrag(c):"opposite-fixed"===d&&(f=this.oppositeFixedWebMercatorDrag(c)),!f)return!1;for(let c=0;c<f.length;c++){const d=f[c];if(d[0]=e(d[0],this.coordinatePrecision),d[1]=e(d[1],this.coordinatePrecision),!st(d,this.coordinatePrecision))return!1}const _=this.midPoints.getUpdated(f)||[],y=this.selectionPoints.getUpdated(f)||[],v={type:g.geometry.type,coordinates:"Polygon"===g.geometry.type?[f]:f};return!(p&&!p({id:this.draggedCoordinate.id,type:"Feature",geometry:v,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:I.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:v},...y,..._]),0))}}class Jt extends U{constructor(c){var d;super(c),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=c&&c.flags?c.flags:{};const p={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=c&&c.cursors?t({},p,c.cursors):p,null===(null==c?void 0:c.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const d={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=c&&c.keyEvents?t({},d,c.keyEvents):d}if(this.dragEventThrottle=c&&void 0!==c.dragEventThrottle&&c.dragEventThrottle||5,this.allowManualDeselection=null==(d=null==c?void 0:c.allowManualDeselection)||d,c&&c.flags&&c.flags)for(const d in c.flags){const p=c.flags[d].feature;p&&p.validation&&(this.validations[d]=p.validation)}}selectFeature(c){this.select(c,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(c){this.pixelDistance=new pt(c),this.clickBoundingBox=new gt(c),this.featuresAtMouseEvent=new Rt(c,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(c),this.midPoints=new Gt(c,this.selectionPoints),this.rotateFeature=new zt(c,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(c,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(c,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(c,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(c,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const c=this.selected.filter((c=>this.store.has(c))).map((c=>({id:c,property:D,value:!1})));this.store.updateProperty(c),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(c){if(!this.selectionPoints.ids.length)return;let d,p=1/0;if(this.selectionPoints.ids.forEach((g=>{const f=this.store.getGeometryCopy(g),_=this.pixelDistance.measure(c,f.coordinates);_<this.pointerDistance&&_<p&&(p=_,d=this.store.getPropertiesCopy(g))})),!d)return;const g=d.selectionPointFeatureId,f=d.index,_=this.store.getPropertiesCopy(g),y=this.flags[_.mode],v=this.validations[_.mode];if(!(y&&y.feature&&y.feature.coordinates&&y.feature.coordinates.deletable))return;const x=this.store.getGeometryCopy(g);let C;if("Polygon"===x.type){if(C=x.coordinates[0],C.length<=4)return}else if("LineString"===x.type&&(C=x.coordinates,C.length<=3))return;if(C){if("Polygon"===x.type&&0===f||f===C.length-1?(C.shift(),C.pop(),C.push([C[0][0],C[0][1]])):C.splice(f,1),v&&!v({id:g,type:"Feature",geometry:x,properties:_},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:I.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:g,geometry:x}]),this.selectionPoints.create(C,x.type,g),y&&y.feature&&y.feature.coordinates&&y.feature.coordinates.midpoints&&this.midPoints.create(C,g,this.coordinatePrecision)}}select(c,d=!0){if(this.selected[0]===c)return;const{mode:p}=this.store.getPropertiesCopy(c),g=this.flags[p];if(!g||!g.feature)return;const f=this.selected[0];if(f){if(f===c)return;this.deselect()}d&&this.setCursor(this.cursors.pointerOver),this.selected=[c],this.store.updateProperty([{id:c,property:"selected",value:!0}]),this.onSelect(c);const{type:_,coordinates:y}=this.store.getGeometryCopy(c);if("LineString"!==_&&"Polygon"!==_)return;const v="LineString"===_?y:y[0];v&&g&&g.feature.coordinates&&(this.selectionPoints.create(v,_,c),g.feature.coordinates.midpoints&&this.midPoints.create(v,c,this.coordinatePrecision))}onLeftClick(c){const{clickedFeature:d,clickedMidPoint:p}=this.featuresAtMouseEvent.find(c,this.selected.length>0);if(this.selected.length&&p)this.midPoints.insert(p.id,this.coordinatePrecision);else if(d&&d.id)this.select(d.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(c){"right"!==c.button?"left"===c.button&&this.onLeftClick(c):this.onRightClick(c)}canScale(c){return this.keyEvents.scale&&this.keyEvents.scale.every((d=>c.heldKeys.includes(d)))}canRotate(c){return this.keyEvents.rotate&&this.keyEvents.rotate.every((d=>c.heldKeys.includes(d)))}preventDefaultKeyEvent(c){const d=this.canRotate(c),p=this.canScale(c);(d||p)&&c.preventDefault()}onKeyDown(c){this.preventDefaultKeyEvent(c)}onKeyUp(c){if(this.preventDefaultKeyEvent(c),this.keyEvents.delete&&c.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&c.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(c,d){if(!this.selected.length)return;const p=this.store.getPropertiesCopy(this.selected[0]),g=this.flags[p.mode];if(!(g&&g.feature&&(g.feature.draggable||g.feature.coordinates&&g.feature.coordinates.draggable||g.feature.coordinates&&g.feature.coordinates.resizable)))return;this.dragEventCount=0;const f=this.selected[0],_=this.dragCoordinate.getDraggableIndex(c,f);return g&&g.feature&&g.feature.coordinates&&(g.feature.coordinates.draggable||g.feature.coordinates.resizable)&&-1!==_?(this.setCursor(this.cursors.dragStart),g.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(f,_):this.dragCoordinate.startDragging(f,_),void d(!1)):g&&g.feature&&g.feature.draggable&&this.dragFeature.canDrag(c,f)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(c,f),void d(!1)):void 0}onDrag(c,d){const p=this.selected[0];if(!p)return;const g=this.store.getPropertiesCopy(p),f=this.flags[g.mode],_=!0===(f&&f.feature&&f.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const y=this.validations[g.mode];if(f&&f.feature&&f.feature.rotateable&&this.canRotate(c))return d(!1),void this.rotateFeature.rotate(c,p,y);if(f&&f.feature&&f.feature.scaleable&&this.canScale(c))return d(!1),void this.scaleFeature.scale(c,p,y);if(this.dragCoordinateResizeFeature.isDragging()&&f.feature&&f.feature.coordinates&&f.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return d(!1),void this.dragCoordinateResizeFeature.drag(c,f.feature.coordinates.resizable,y)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(c,_,y):this.dragFeature.isDragging()?this.dragFeature.drag(c,y):d(!0)}onDragEnd(c,d){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),d(!0)}onMouseMove(c){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let d=!1;this.midPoints.ids.forEach((p=>{if(d)return;const g=this.store.getGeometryCopy(p);this.pixelDistance.measure(c,g.coordinates)<this.pointerDistance&&(d=!0)}));let p=!1;if(this.selectionPoints.ids.forEach((g=>{const f=this.store.getGeometryCopy(g);this.pixelDistance.measure(c,f.coordinates)<this.pointerDistance&&(d=!1,p=!0)})),d)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:g}=this.featuresAtMouseEvent.find(c,!0);this.setCursor(this.selected.length>0&&(g&&g.id===this.selected[0]||p)?this.cursors.pointerOver:"unset")}styleFeature(c){const d=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode&&"Point"===c.geometry.type){if(c.properties.selectionPoint)return d.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,d.pointOutlineColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,d.pointWidth,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,c),d.zIndex=30,d;if(c.properties.midPoint)return d.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,d.pointOutlineColor,c),d.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,c),d.zIndex=40,d}else if(c.properties[D]){if("Polygon"===c.geometry.type)return d.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,d.polygonFillColor,c),d.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,d.polygonOutlineWidth,c),d.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,d.polygonOutlineColor,c),d.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,d.polygonFillOpacity,c),d.zIndex=10,d;if("LineString"===c.geometry.type)return d.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,d.lineStringColor,c),d.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,d.lineStringWidth,c),d.zIndex=10,d;if("Point"===c.geometry.type)return d.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,d.pointWidth,c),d.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,d.pointColor,c),d.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,d.pointOutlineColor,c),d.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,d.pointOutlineWidth,c),d.zIndex=10,d}return d}}class Zt extends X{constructor(...c){super(...c),this.type=N.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(c,d,p,g,f){for(;g>p;){if(g-p>600){const _=g-p+1,y=d-p+1,v=Math.log(_),x=.5*Math.exp(2*v/3),C=.5*Math.sqrt(v*x*(_-x)/_)*(y-_/2<0?-1:1);qt(c,d,Math.max(p,Math.floor(d-y*x/_+C)),Math.min(g,Math.floor(d+(_-y)*x/_+C)),f)}const _=c[d];let y=p,v=g;for(Qt(c,p,d),f(c[g],_)>0&&Qt(c,p,g);y<v;){for(Qt(c,y,v),y++,v--;f(c[y],_)<0;)y++;for(;f(c[v],_)>0;)v--}0===f(c[p],_)?Qt(c,p,v):(v++,Qt(c,v,g)),v<=d&&(p=v+1),d<=v&&(g=v-1)}}function Qt(c,d,p){const g=c[d];c[d]=c[p],c[p]=g}function te(c,d){ee(c,0,c.children.length,d,c)}function ee(c,d,p,g,f){f||(f=ce([])),f.minX=1/0,f.minY=1/0,f.maxX=-1/0,f.maxY=-1/0;for(let _=d;_<p;_++){const d=c.children[_];ie$1(f,c.leaf?g(d):d)}return f}function ie$1(c,d){return c.minX=Math.min(c.minX,d.minX),c.minY=Math.min(c.minY,d.minY),c.maxX=Math.max(c.maxX,d.maxX),c.maxY=Math.max(c.maxY,d.maxY),c}function oe(c,d){return c.minX-d.minX}function re(c,d){return c.minY-d.minY}function se(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function ne(c){return c.maxX-c.minX+(c.maxY-c.minY)}function ae(c,d){const p=Math.max(c.minX,d.minX),g=Math.max(c.minY,d.minY),f=Math.min(c.maxX,d.maxX),_=Math.min(c.maxY,d.maxY);return Math.max(0,f-p)*Math.max(0,_-g)}function le(c,d){return c.minX<=d.minX&&c.minY<=d.minY&&d.maxX<=c.maxX&&d.maxY<=c.maxY}function he(c,d){return d.minX<=c.maxX&&d.minY<=c.maxY&&d.maxX>=c.minX&&d.maxY>=c.minY}function ce(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(c,d,p,g,f){const _=[d,p];for(;_.length;){if((p=_.pop())-(d=_.pop())<=g)continue;const y=d+Math.ceil((p-d)/g/2)*g;qt(c,y,d,p,f),_.push(d,y,y,p)}}class ue{constructor(c){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(c){let d=this.data;const p=[];if(!he(c,d))return p;const g=this.toBBox,f=[];for(;d;){for(let _=0;_<d.children.length;_++){const y=d.children[_],v=d.leaf?g(y):y;he(c,v)&&(d.leaf?p.push(y):le(c,v)?this._all(y,p):f.push(y))}d=f.pop()}return p}collides(c){let d=this.data;if(he(c,d)){const p=[];for(;d;){for(let g=0;g<d.children.length;g++){const f=d.children[g],_=d.leaf?this.toBBox(f):f;if(he(c,_)){if(d.leaf||le(c,_))return!0;p.push(f)}}d=p.pop()}}return!1}load(c){if(c.length<this._minEntries){for(let d=0;d<c.length;d++)this.insert(c[d]);return}let d=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===d.height)this._splitRoot(this.data,d);else{if(this.data.height<d.height){const c=this.data;this.data=d,d=c}this._insert(d,this.data.height-d.height-1,!0)}else this.data=d}insert(c){this._insert(c,this.data.height-1)}clear(){this.data=ce([])}remove(c){let d=this.data;const p=this.toBBox(c),g=[],f=[];let _,y,v=!1;for(;d||g.length;){if(d||(d=g.pop(),y=g[g.length-1],_=f.pop(),v=!0),d.leaf){const p=d.children.indexOf(c);-1!==p&&(d.children.splice(p,1),g.push(d),this._condense(g))}v||d.leaf||!le(d,p)?y?(_++,d=y.children[_],v=!1):d=null:(g.push(d),f.push(_),_=0,y=d,d=d.children[0])}}toBBox(c){return c}compareMinX(c,d){return c.minX-d.minX}compareMinY(c,d){return c.minY-d.minY}_all(c,d){const p=[];for(;c;)c.leaf?d.push(...c.children):p.push(...c.children),c=p.pop();return d}_build(c,d,p,g){const f=p-d+1;let _,y=this._maxEntries;if(f<=y)return _=ce(c.slice(d,p+1)),te(_,this.toBBox),_;g||(g=Math.ceil(Math.log(f)/Math.log(y)),y=Math.ceil(f/Math.pow(y,g-1))),_=ce([]),_.leaf=!1,_.height=g;const v=Math.ceil(f/y),x=v*Math.ceil(Math.sqrt(y));de(c,d,p,x,this.compareMinX);for(let f=d;f<=p;f+=x){const d=Math.min(f+x-1,p);de(c,f,d,v,this.compareMinY);for(let p=f;p<=d;p+=v){const f=Math.min(p+v-1,d);_.children.push(this._build(c,p,f,g-1))}}return te(_,this.toBBox),_}_chooseSubtree(c,d,p,g){for(;g.push(d),!d.leaf&&g.length-1!==p;){let p,g=1/0,y=1/0;for(let v=0;v<d.children.length;v++){const x=d.children[v],C=se(x),L=(f=c,_=x,(Math.max(_.maxX,f.maxX)-Math.min(_.minX,f.minX))*(Math.max(_.maxY,f.maxY)-Math.min(_.minY,f.minY))-C);L<y?(y=L,g=C<g?C:g,p=x):L===y&&C<g&&(g=C,p=x)}d=p||d.children[0]}var f,_;return d}_insert(c,d,p){const g=p?c:this.toBBox(c),f=[],_=this._chooseSubtree(g,this.data,d,f);for(_.children.push(c),ie$1(_,g);d>=0&&f[d].children.length>this._maxEntries;)this._split(f,d),d--;this._adjustParentBBoxes(g,f,d)}_split(c,d){const p=c[d],g=p.children.length,f=this._minEntries;this._chooseSplitAxis(p,f,g);const _=this._chooseSplitIndex(p,f,g),y=ce(p.children.splice(_,p.children.length-_));y.height=p.height,y.leaf=p.leaf,te(p,this.toBBox),te(y,this.toBBox),d?c[d-1].children.push(y):this._splitRoot(p,y)}_splitRoot(c,d){this.data=ce([c,d]),this.data.height=c.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(c,d,p){let g,f=1/0,_=1/0;for(let y=d;y<=p-d;y++){const d=ee(c,0,y,this.toBBox),v=ee(c,y,p,this.toBBox),x=ae(d,v),C=se(d)+se(v);x<f?(f=x,g=y,_=C<_?C:_):x===f&&C<_&&(_=C,g=y)}return g||p-d}_chooseSplitAxis(c,d,p){const g=c.leaf?this.compareMinX:oe,f=c.leaf?this.compareMinY:re;this._allDistMargin(c,d,p,g)<this._allDistMargin(c,d,p,f)&&c.children.sort(g)}_allDistMargin(c,d,p,g){c.children.sort(g);const f=this.toBBox,_=ee(c,0,d,f),y=ee(c,p-d,p,f);let v=ne(_)+ne(y);for(let g=d;g<p-d;g++){const d=c.children[g];ie$1(_,c.leaf?f(d):d),v+=ne(_)}for(let g=p-d-1;g>=d;g--){const d=c.children[g];ie$1(y,c.leaf?f(d):d),v+=ne(y)}return v}_adjustParentBBoxes(c,d,p){for(let g=p;g>=0;g--)ie$1(d[g],c)}_condense(c){for(let d,p=c.length-1;p>=0;p--)0===c[p].children.length?p>0?(d=c[p-1].children,d.splice(d.indexOf(c[p]),1)):this.clear():te(c[p],this.toBBox)}}class ge{constructor(c){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(c&&c.maxEntries?c.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(c,d){this.idToNode.set(c.id,d),this.nodeToId.set(d,c.id)}toBBox(c){const d=[],p=[];let g;if("Polygon"===c.geometry.type)g=c.geometry.coordinates[0];else if("LineString"===c.geometry.type)g=c.geometry.coordinates;else{if("Point"!==c.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");g=[c.geometry.coordinates]}for(let c=0;c<g.length;c++)p.push(g[c][1]),d.push(g[c][0]);const f=Math.min(...p),_=Math.max(...p);return{minX:Math.min(...d),minY:f,maxX:Math.max(...d),maxY:_}}insert(c){if(this.idToNode.get(String(c.id)))throw new Error("Feature already exists");const d=this.toBBox(c);this.setMaps(c,d),this.tree.insert(d)}load(c){const d=[],p=new Set;c.forEach((c=>{const g=this.toBBox(c);if(this.setMaps(c,g),p.has(String(c.id)))throw new Error(`Duplicate feature ID found ${c.id}`);p.add(String(c.id)),d.push(g)})),this.tree.load(d)}update(c){this.remove(c.id);const d=this.toBBox(c);this.setMaps(c,d),this.tree.insert(d)}remove(c){const d=this.idToNode.get(c);if(!d)throw new Error(`${c} not inserted into the spatial index`);this.tree.remove(d)}clear(){this.tree.clear()}search(c){return this.tree.search(this.toBBox(c)).map((c=>this.nodeToId.get(c)))}collides(c){return this.tree.collides(this.toBBox(c))}}const q={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){const d=16*Math.random()|0;return("x"==c?d:3&d|8).toString(16)})),isValidId:c=>"string"==typeof c&&36===c.length};class ye{constructor(c){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!c||!1!==c.tracked,this.idStrategy=c&&c.idStrategy?c.idStrategy:q}clone(c){return JSON.parse(JSON.stringify(c))}getId(){return this.idStrategy.getId()}has(c){return Boolean(this.store[c])}load(c,d){if(0===c.length)return;const p=this.clone(c);p.forEach((c=>{null==c.id&&(c.id=this.idStrategy.getId()),this.tracked&&(c.properties.createdAt?R(c.properties.createdAt):c.properties.createdAt=+new Date,c.properties.updatedAt?R(c.properties.updatedAt):c.properties.updatedAt=+new Date)}));const g=[];p.forEach((c=>{const p=c.id;if(d&&!d(c))throw new Error(`Feature ${p} is not valid: ${JSON.stringify(c)}`);if(this.has(p))throw new Error(`Feature already exists with this id: ${p}`);this.store[p]=c,g.push(p)})),this.spatialIndex.load(p),this._onChange(g,"create")}search(c,d){const p=this.spatialIndex.search(c).map((c=>this.store[c]));return this.clone(d?p.filter(d):p)}registerOnChange(c){this._onChange=(d,p)=>{c(d,p)}}getGeometryCopy(c){const d=this.store[c];if(!d)throw new Error(`No feature with this id (${c}), can not get geometry copy`);return this.clone(d.geometry)}getPropertiesCopy(c){const d=this.store[c];if(!d)throw new Error(`No feature with this id (${c}), can not get properties copy`);return this.clone(d.properties)}updateProperty(c){const d=[];c.forEach((({id:c,property:p,value:g})=>{const f=this.store[c];if(!f)throw new Error(`No feature with this (${c}), can not update geometry`);d.push(c),f.properties[p]=g,this.tracked&&(f.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(d,"update")}updateGeometry(c){const d=[];c.forEach((({id:c,geometry:p})=>{d.push(c);const g=this.store[c];if(!g)throw new Error(`No feature with this (${c}), can not update geometry`);g.geometry=this.clone(p),this.spatialIndex.update(g),this.tracked&&(g.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(d,"update")}create(c){const d=[];return c.forEach((({geometry:c,properties:p})=>{let g,f=t({},p);this.tracked&&(g=+new Date,p?(f.createdAt="number"==typeof p.createdAt?p.createdAt:g,f.updatedAt="number"==typeof p.updatedAt?p.updatedAt:g):f={createdAt:g,updatedAt:g});const _=this.getId(),y={id:_,type:"Feature",geometry:c,properties:f};this.store[_]=y,this.spatialIndex.insert(y),d.push(_)})),this._onChange&&this._onChange([...d],"create"),d}delete(c){c.forEach((c=>{if(!this.store[c])throw new Error("No feature with this id, can not delete");delete this.store[c],this.spatialIndex.remove(c)})),this._onChange&&this._onChange([...c],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((c=>this.store[c])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(c){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=c.adapter,this._mode=new Zt;const d=new Set,p=c.modes.reduce(((c,p)=>{if(d.has(p.mode))throw new Error(`There is already a ${p.mode} mode provided`);return d.add(p.mode),c[p.mode]=p,c}),{}),g=Object.keys(p);if(0===g.length)throw new Error("No modes provided");g.forEach((c=>{if(p[c].type===N.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=c}})),this._modes=t({},p,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!c.tracked,idStrategy:c.idStrategy?c.idStrategy:void 0});const s=c=>{const d=[],p=this._store.copyAll().filter((p=>!c.includes(p.id)||(d.push(p),!1)));return{changed:d,unchanged:p}},n=(c,d)=>{this._enabled&&this._eventListeners.finish.forEach((p=>{p(c,d)}))},a=(c,d)=>{if(!this._enabled)return;this._eventListeners.change.forEach((p=>{p(c,d)}));const{changed:p,unchanged:g}=s(c);"create"===d?this._adapter.render({created:p,deletedIds:[],unchanged:g,updated:[]},this.getModeStyles()):"update"===d?this._adapter.render({created:[],deletedIds:[],unchanged:g,updated:p},this.getModeStyles()):"delete"===d?this._adapter.render({created:[],deletedIds:c,unchanged:g,updated:[]},this.getModeStyles()):"styling"===d&&this._adapter.render({created:[],deletedIds:[],unchanged:g,updated:[]},this.getModeStyles())},l=c=>{if(!this._enabled)return;this._eventListeners.select.forEach((d=>{d(c)}));const{changed:d,unchanged:p}=s([c]);this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles())},h=c=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((c=>{c()}));const{changed:d,unchanged:p}=s([c]);d&&this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles())};Object.keys(this._modes).forEach((c=>{this._modes[c].register({mode:c,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const c={};return Object.keys(this._modes).forEach((d=>{c[d]=c=>this._instanceSelectMode&&c.properties[D]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(c):this._modes[d].styleFeature.bind(this._modes[d])(c)})),c}featuresAtLocation({lng:c,lat:d},p){const g=p&&void 0!==p.pointerDistance?p.pointerDistance:30,f=!p||void 0===p.ignoreSelectFeatures||p.ignoreSelectFeatures,_=this._adapter.unproject.bind(this._adapter),y=this._adapter.project.bind(this._adapter),v=y(c,d),x=ut({unproject:_,point:v,pointerDistance:g});return this._store.search(x).filter((p=>{if(f&&(p.properties[B]||p.properties.selectionPoint))return!1;if("Point"===p.geometry.type){const c=p.geometry.coordinates,d=y(c[0],c[1]);return i$1(v,d)<g}if("LineString"===p.geometry.type){const c=p.geometry.coordinates;for(let d=0;d<c.length-1;d++){const p=c[d],f=c[d+1];if(At(v,y(p[0],p[1]),y(f[0],f[1]))<g)return!0}return!1}return!!Vt([c,d],p.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(c,d){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._modes[c].styles=d}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(c){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(c){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[c],this._mode.start()}removeFeatures(c){this.checkEnabled(),this._store.delete(c)}selectFeature(c){this.getSelectMode().selectFeature(c)}deselectFeature(c){this.getSelectMode().deselectFeature(c)}getFeatureId(){return this._store.getId()}hasFeature(c){return this._store.has(c)}addFeatures(c){this.checkEnabled(),0!==c.length&&this._store.load(c,(c=>{if(Boolean(c&&"object"==typeof c&&"properties"in c&&"object"==typeof c.properties&&null!==c.properties&&"mode"in c.properties)){const d=this._modes[c.properties.mode];return!!d&&d.validateFeature.bind(d)(c)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((c=>{c()}))},getState:()=>this._mode.state,onClick:c=>{this._mode.onClick(c)},onMouseMove:c=>{this._mode.onMouseMove(c)},onKeyDown:c=>{this._mode.onKeyDown(c)},onKeyUp:c=>{this._mode.onKeyUp(c)},onDragStart:(c,d)=>{this._mode.onDragStart(c,d)},onDrag:(c,d)=>{this._mode.onDrag(c,d)},onDragEnd:(c,d)=>{this._mode.onDragEnd(c,d)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(c,d){const{lng:p,lat:g}=c;return this.featuresAtLocation({lng:p,lat:g},d)}getFeaturesAtPointerEvent(c,d){const p=this._adapter.getLngLatFromEvent.bind(this._adapter)(c);return null===p?[]:this.featuresAtLocation(p,d)}stop(){this._enabled=!1,this._adapter.unregister()}on(c,d){const p=this._eventListeners[c];p.includes(d)||p.push(d)}off(c,d){const p=this._eventListeners[c];p.includes(d)&&p.splice(p.indexOf(d),1)}}class MapOption{constructor({name:c,desc:d,example:p,exampleDesc:g,isValid:f}){this.name=c,this.desc=d,this.example=p,this.exampleDesc=g,this.isValid=f}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(c){if(this._map)throw Error("map cannot be reassigned");this._map=c}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(c,d){const p=this.constructor.validOptions.find((d=>d.valueOf()===c))?.isValid;if(!p)throw Error(`Cannot find inValid method for option ${c}`);return p(d)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:c=>!!c?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`width: ${c}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`height: ${c}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:c=>{try{const[d,p]=JSON.parse(c);return!isNaN(d)&&!isNaN(p)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:c=>{const d=Number(c);return!isNaN(d)&&d>=0&&d<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:c=>"object"==typeof c}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:c=>"true"===c}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:c=>URL.parse(c)&&c.includes("{x}")&&c.includes("{y}")&&c.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:c=>URL.parse(c)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:c=>URL.parse(c)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:c=>"true"===c}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(c){if(c.XYZ){("string"==typeof c.XYZ?[c.XYZ]:c.XYZ).forEach((d=>{let p,g;if("string"==typeof d)g=new URL(d),p={type:"tile",url:d,title:`${g.host}${g.pathname.split("%7B")[0]}`};else{if("object"!=typeof d)return;g=new URL(d.url),p={type:"tile",url:d.url,title:d.title?d.title:`${g.host}${g.pathname.split("%7B")[0]}`}}c.data.push(p)})),delete c.XYZ}c.WMTS&&(c.data.push({type:"wmts",url:c.aliases[c.WMTS]??c.WMTS}),delete c.WMTS),c.GPX&&(c.data.push({type:"gpx",url:c.GPX}),delete c.GPX),"string"==typeof c.center&&Object.prototype.hasOwnProperty.call(c.aliases,c.center)&&(c.center=c.aliases[c.center]),c.data?.forEach((d=>{Object.prototype.hasOwnProperty.call(c.aliases,d.url)&&(d.title=d.url,d.url=c.aliases[d.url])}))}createView({target:c,width:d,height:p}){c.style.width=d,c.style.height=p,"flex"===window.getComputedStyle(c.parentElement).display&&(c.style.flexBasis=`calc(${d})`)}setDraw=({target:c,terraDrawAdapter:d})=>{const p=c?.id?c.id+"-":"",g={idStrategy:{isValidId:c=>!0,getId:function(){let c=p+window.crypto.randomUUID();return function(){return c=p+window.crypto.randomUUID(),c}}()}};return this.terraDraw=((c,d={})=>new Se({adapter:c,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...d}))(d,g),((c,d,p={})=>{const g=document.createElement("select");c.appendChild(g),g.name="Draw",g.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",g.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',d.start(),d.setMode("render");const f=c.id?`terra-draw-data-${c.id}`:"terra-draw-data",_=window.localStorage.getItem(f);if(_)try{const c=JSON.parse(_);c.forEach((c=>c.properties={mode:"render"})),d.addFeatures(c)}catch(c){console.warn("Fail to drawn features from Local Storage.",_,c),window.localStorage.removeItem(f)}const y=c.querySelector("canvas")??c;g.onchange=()=>{g.children[0].textContent="--STOP--",y.style.removeProperty("cursor");const c=d.getSnapshot();switch(g.value){case"nothing":d.setMode("render"),g.children[0].textContent="Draw Something";break;case"modify":d.setMode("select");break;case"delete":d.setMode("render"),y.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(f),g.value="nothing",g.onchange(),d.clear();break;case"features":window.alert(`${c.length} features\n\n${JSON.stringify(c,null,4)}`);break;default:d.setMode(g.value)}},d.on("change",(()=>{})),d.on("finish",((c,_)=>{if("draw"===_.action){const p=d.getSnapshot().find((d=>d.id===c));p&&(d.removeFeatures([c]),p.properties.mode="render",d.addFeatures([p]))}const y=p.idFilter??(()=>!0),v=d.getSnapshot().filter(y);window.localStorage.setItem(f,JSON.stringify(v)),"point"!==_.mode&&"draw"===_.action&&(g.value="nothing",g.onchange())})),document.onclick=c=>{if("delete"===g.value){const p=d.getFeaturesAtPointerEvent(c,{pointerDistance:40});p.length>0&&(d.removeFeatures([p[0].id]),0===d.getSnapshot().length&&(g.value="nothing",g.onchange()))}}})(c,this.terraDraw,{idFilter:c=>c.id.startsWith(p)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(c){const d=c.filter((c=>"wmts"===c.type)),p=c.filter((c=>"tile"===c.type));return d.length>0||p.length>1}propsForEval(){let c=this,d=[],p=[];for(;c!==Object.prototype;)d=d.concat(Object.getOwnPropertyNames(c)),p=p.concat(Object.entries(c)),c=Object.getPrototypeOf(c);return d}evalScript(c,d=[]){const p=this.propsForEval(),g=d.map((([c,d])=>c)),f=[...p.map((c=>this[c])),...d.map((([c,d])=>d))],_=Function([...p,...g],c).bind(this,...f);try{return _()}catch(c){return console.warn("Fail to run custom script:",c),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(c){return null==c}var K=function extend$1(c,d){var p,g,f,_;if(d)for(p=0,g=(_=Object.keys(d)).length;p<g;p+=1)c[f=_[p]]=d[f];return c},J={isNothing:isNothing,isObject:function isObject(c){return"object"==typeof c&&null!==c},toArray:function toArray(c){return Array.isArray(c)?c:isNothing(c)?[]:[c]},repeat:function repeat(c,d){var p,g="";for(p=0;p<d;p+=1)g+=c;return g},isNegativeZero:function isNegativeZero(c){return 0===c&&Number.NEGATIVE_INFINITY===1/c},extend:K};function formatError(c,d){var p="",g=c.reason||"(unknown reason)";return c.mark?(c.mark.name&&(p+='in "'+c.mark.name+'" '),p+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!d&&c.mark.snippet&&(p+="\n\n"+c.mark.snippet),g+" "+p):g}function YAMLException$1(c,d){Error.call(this),this.name="YAMLException",this.reason=c,this.mark=d,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(c){return this.name+": "+formatError(this,c)};var ct=YAMLException$1;function getLine(c,d,p,g,f){var _="",y="",v=Math.floor(f/2)-1;return g-d>v&&(d=g-v+(_=" ... ").length),p-g>v&&(p=g+v-(y=" ...").length),{str:_+c.slice(d,p).replace(/\t/g,"→")+y,pos:g-d+_.length}}function padStart(c,d){return J.repeat(" ",d-c.length)+c}var ft=function makeSnippet(c,d){if(d=Object.create(d||null),!c.buffer)return null;d.maxLength||(d.maxLength=79),"number"!=typeof d.indent&&(d.indent=1),"number"!=typeof d.linesBefore&&(d.linesBefore=3),"number"!=typeof d.linesAfter&&(d.linesAfter=2);for(var p,g=/\r?\n|\r|\0/g,f=[0],_=[],y=-1;p=g.exec(c.buffer);)_.push(p.index),f.push(p.index+p[0].length),c.position<=p.index&&y<0&&(y=f.length-2);y<0&&(y=f.length-1);var v,x,C="",L=Math.min(c.line+d.linesAfter,_.length).toString().length,M=d.maxLength-(d.indent+L+3);for(v=1;v<=d.linesBefore&&!(y-v<0);v++)x=getLine(c.buffer,f[y-v],_[y-v],c.position-(f[y]-f[y-v]),M),C=J.repeat(" ",d.indent)+padStart((c.line-v+1).toString(),L)+" | "+x.str+"\n"+C;for(x=getLine(c.buffer,f[y],_[y],c.position,M),C+=J.repeat(" ",d.indent)+padStart((c.line+1).toString(),L)+" | "+x.str+"\n",C+=J.repeat("-",d.indent+L+3+x.pos)+"^\n",v=1;v<=d.linesAfter&&!(y+v>=_.length);v++)x=getLine(c.buffer,f[y+v],_[y+v],c.position-(f[y]-f[y+v]),M),C+=J.repeat(" ",d.indent)+padStart((c.line+v+1).toString(),L)+" | "+x.str+"\n";return C.replace(/\n$/,"")},ie=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pe=["scalar","sequence","mapping"];var me=function Type$1(c,d){if(d=d||{},Object.keys(d).forEach((function(d){if(-1===ie.indexOf(d))throw new ct('Unknown option "'+d+'" is met in definition of "'+c+'" YAML type.')})),this.options=d,this.tag=c,this.kind=d.kind||null,this.resolve=d.resolve||function(){return!0},this.construct=d.construct||function(c){return c},this.instanceOf=d.instanceOf||null,this.predicate=d.predicate||null,this.represent=d.represent||null,this.representName=d.representName||null,this.defaultStyle=d.defaultStyle||null,this.multi=d.multi||!1,this.styleAliases=function compileStyleAliases(c){var d={};return null!==c&&Object.keys(c).forEach((function(p){c[p].forEach((function(c){d[String(c)]=p}))})),d}(d.styleAliases||null),-1===pe.indexOf(this.kind))throw new ct('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')};function compileList(c,d){var p=[];return c[d].forEach((function(c){var d=p.length;p.forEach((function(p,g){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(d=g)})),p[d]=c})),p}function Schema$1(c){return this.extend(c)}Schema$1.prototype.extend=function extend(c){var d=[],p=[];if(c instanceof me)p.push(c);else if(Array.isArray(c))p=p.concat(c);else{if(!c||!Array.isArray(c.implicit)&&!Array.isArray(c.explicit))throw new ct("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.implicit&&(d=d.concat(c.implicit)),c.explicit&&(p=p.concat(c.explicit))}d.forEach((function(c){if(!(c instanceof me))throw new ct("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&"scalar"!==c.loadKind)throw new ct("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new ct("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),p.forEach((function(c){if(!(c instanceof me))throw new ct("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var g=Object.create(Schema$1.prototype);return g.implicit=(this.implicit||[]).concat(d),g.explicit=(this.explicit||[]).concat(p),g.compiledImplicit=compileList(g,"implicit"),g.compiledExplicit=compileList(g,"explicit"),g.compiledTypeMap=function compileMap(){var c,d,p={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(c){c.multi?(p.multi[c.kind].push(c),p.multi.fallback.push(c)):p[c.kind][c.tag]=p.fallback[c.tag]=c}for(c=0,d=arguments.length;c<d;c+=1)arguments[c].forEach(collectType);return p}(g.compiledImplicit,g.compiledExplicit),g};var fe=new Schema$1({explicit:[new me("tag:yaml.org,2002:str",{kind:"scalar",construct:function(c){return null!==c?c:""}}),new me("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(c){return null!==c?c:[]}}),new me("tag:yaml.org,2002:map",{kind:"mapping",construct:function(c){return null!==c?c:{}}})]});var _e=new me("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(c){if(null===c)return!0;var d=c.length;return 1===d&&"~"===c||4===d&&("null"===c||"Null"===c||"NULL"===c)},construct:function constructYamlNull(){return null},predicate:function isNull(c){return null===c},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var ve=new me("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(c){if(null===c)return!1;var d=c.length;return 4===d&&("true"===c||"True"===c||"TRUE"===c)||5===d&&("false"===c||"False"===c||"FALSE"===c)},construct:function constructYamlBoolean(c){return"true"===c||"True"===c||"TRUE"===c},predicate:function isBoolean(c){return"[object Boolean]"===Object.prototype.toString.call(c)},represent:{lowercase:function(c){return c?"true":"false"},uppercase:function(c){return c?"TRUE":"FALSE"},camelcase:function(c){return c?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}var xe=new me("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(c){if(null===c)return!1;var d,p=c.length,g=0,f=!1;if(!p)return!1;if("-"!==(d=c[g])&&"+"!==d||(d=c[++g]),"0"===d){if(g+1===p)return!0;if("b"===(d=c[++g])){for(g++;g<p;g++)if("_"!==(d=c[g])){if("0"!==d&&"1"!==d)return!1;f=!0}return f&&"_"!==d}if("x"===d){for(g++;g<p;g++)if("_"!==(d=c[g])){if(!isHexCode(c.charCodeAt(g)))return!1;f=!0}return f&&"_"!==d}if("o"===d){for(g++;g<p;g++)if("_"!==(d=c[g])){if(!isOctCode(c.charCodeAt(g)))return!1;f=!0}return f&&"_"!==d}}if("_"===d)return!1;for(;g<p;g++)if("_"!==(d=c[g])){if(!isDecCode(c.charCodeAt(g)))return!1;f=!0}return!(!f||"_"===d)},construct:function constructYamlInteger(c){var d,p=c,g=1;if(-1!==p.indexOf("_")&&(p=p.replace(/_/g,"")),"-"!==(d=p[0])&&"+"!==d||("-"===d&&(g=-1),d=(p=p.slice(1))[0]),"0"===p)return 0;if("0"===d){if("b"===p[1])return g*parseInt(p.slice(2),2);if("x"===p[1])return g*parseInt(p.slice(2),16);if("o"===p[1])return g*parseInt(p.slice(2),8)}return g*parseInt(p,10)},predicate:function isInteger(c){return"[object Number]"===Object.prototype.toString.call(c)&&c%1==0&&!J.isNegativeZero(c)},represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Pe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var we=/^[-+]?[0-9]+e/;var be=new me("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(c){return null!==c&&!(!Pe.test(c)||"_"===c[c.length-1])},construct:function constructYamlFloat(c){var d,p;return p="-"===(d=c.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(d[0])>=0&&(d=d.slice(1)),".inf"===d?1===p?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===d?NaN:p*parseFloat(d,10)},predicate:function isFloat(c){return"[object Number]"===Object.prototype.toString.call(c)&&(c%1!=0||J.isNegativeZero(c))},represent:function representYamlFloat(c,d){var p;if(isNaN(c))switch(d){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(d){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(d){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(J.isNegativeZero(c))return"-0.0";return p=c.toString(10),we.test(p)?p.replace("e",".e"):p},defaultStyle:"lowercase"}),Ce=fe.extend({implicit:[_e,ve,xe,be]}),Le=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Me=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Ee=new me("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(c){return null!==c&&(null!==Le.exec(c)||null!==Me.exec(c))},construct:function constructYamlTimestamp(c){var d,p,g,f,_,y,v,x,C=0,L=null;if(null===(d=Le.exec(c))&&(d=Me.exec(c)),null===d)throw new Error("Date resolve error");if(p=+d[1],g=+d[2]-1,f=+d[3],!d[4])return new Date(Date.UTC(p,g,f));if(_=+d[4],y=+d[5],v=+d[6],d[7]){for(C=d[7].slice(0,3);C.length<3;)C+="0";C=+C}return d[9]&&(L=6e4*(60*+d[10]+ +(d[11]||0)),"-"===d[9]&&(L=-L)),x=new Date(Date.UTC(p,g,f,_,y,v,C)),L&&x.setTime(x.getTime()-L),x},instanceOf:Date,represent:function representYamlTimestamp(c){return c.toISOString()}});var Te=new me("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(c){return"<<"===c||null===c}}),ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Oe=new me("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(c){if(null===c)return!1;var d,p,g=0,f=c.length,_=ke;for(p=0;p<f;p++)if(!((d=_.indexOf(c.charAt(p)))>64)){if(d<0)return!1;g+=6}return g%8==0},construct:function constructYamlBinary(c){var d,p,g=c.replace(/[\r\n=]/g,""),f=g.length,_=ke,y=0,v=[];for(d=0;d<f;d++)d%4==0&&d&&(v.push(y>>16&255),v.push(y>>8&255),v.push(255&y)),y=y<<6|_.indexOf(g.charAt(d));return 0===(p=f%4*6)?(v.push(y>>16&255),v.push(y>>8&255),v.push(255&y)):18===p?(v.push(y>>10&255),v.push(y>>2&255)):12===p&&v.push(y>>4&255),new Uint8Array(v)},predicate:function isBinary(c){return"[object Uint8Array]"===Object.prototype.toString.call(c)},represent:function representYamlBinary(c){var d,p,g="",f=0,_=c.length,y=ke;for(d=0;d<_;d++)d%3==0&&d&&(g+=y[f>>18&63],g+=y[f>>12&63],g+=y[f>>6&63],g+=y[63&f]),f=(f<<8)+c[d];return 0===(p=_%3)?(g+=y[f>>18&63],g+=y[f>>12&63],g+=y[f>>6&63],g+=y[63&f]):2===p?(g+=y[f>>10&63],g+=y[f>>4&63],g+=y[f<<2&63],g+=y[64]):1===p&&(g+=y[f>>2&63],g+=y[f<<4&63],g+=y[64],g+=y[64]),g}}),Ie=Object.prototype.hasOwnProperty,Ae=Object.prototype.toString;var De=new me("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(c){if(null===c)return!0;var d,p,g,f,_,y=[],v=c;for(d=0,p=v.length;d<p;d+=1){if(g=v[d],_=!1,"[object Object]"!==Ae.call(g))return!1;for(f in g)if(Ie.call(g,f)){if(_)return!1;_=!0}if(!_)return!1;if(-1!==y.indexOf(f))return!1;y.push(f)}return!0},construct:function constructYamlOmap(c){return null!==c?c:[]}}),Be=Object.prototype.toString;var Fe=new me("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(c){if(null===c)return!0;var d,p,g,f,_,y=c;for(_=new Array(y.length),d=0,p=y.length;d<p;d+=1){if(g=y[d],"[object Object]"!==Be.call(g))return!1;if(1!==(f=Object.keys(g)).length)return!1;_[d]=[f[0],g[f[0]]]}return!0},construct:function constructYamlPairs(c){if(null===c)return[];var d,p,g,f,_,y=c;for(_=new Array(y.length),d=0,p=y.length;d<p;d+=1)g=y[d],f=Object.keys(g),_[d]=[f[0],g[f[0]]];return _}}),ze=Object.prototype.hasOwnProperty;var je=new me("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(c){if(null===c)return!0;var d,p=c;for(d in p)if(ze.call(p,d)&&null!==p[d])return!1;return!0},construct:function constructYamlSet(c){return null!==c?c:{}}}),Ne=Ce.extend({implicit:[Ee,Te],explicit:[Oe,De,Fe,je]}),Ze=Object.prototype.hasOwnProperty,We=1,Re=2,He=3,Ue=4,Ve=1,Ge=2,Ye=3,qe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xe=/[\x85\u2028\u2029]/,$e=/[,\[\]\{\}]/,Ke=/^(?:!|!!|![a-z\-]+!)$/i,Je=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(c){return Object.prototype.toString.call(c)}function is_EOL(c){return 10===c||13===c}function is_WHITE_SPACE(c){return 9===c||32===c}function is_WS_OR_EOL(c){return 9===c||32===c||10===c||13===c}function is_FLOW_INDICATOR(c){return 44===c||91===c||93===c||123===c||125===c}function fromHexCode(c){var d;return 48<=c&&c<=57?c-48:97<=(d=32|c)&&d<=102?d-97+10:-1}function escapedHexLen(c){return 120===c?2:117===c?4:85===c?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return 48===c?"\0":97===c?"":98===c?"\b":116===c||9===c?"\t":110===c?"\n":118===c?"\v":102===c?"\f":114===c?"\r":101===c?"":32===c?" ":34===c?'"':47===c?"/":92===c?"\\":78===c?"…":95===c?" ":76===c?"\u2028":80===c?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode(55296+(c-65536>>10),56320+(c-65536&1023))}for(var Qe=new Array(256),ti=new Array(256),ei=0;ei<256;ei++)Qe[ei]=simpleEscapeSequence(ei)?1:0,ti[ei]=simpleEscapeSequence(ei);function State$1(c,d){this.input=c,this.filename=d.filename||null,this.schema=d.schema||Ne,this.onWarning=d.onWarning||null,this.legacy=d.legacy||!1,this.json=d.json||!1,this.listener=d.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(c,d){var p={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return p.snippet=ft(p),new ct(d,p)}function throwError(c,d){throw generateError(c,d)}function throwWarning(c,d){c.onWarning&&c.onWarning.call(null,generateError(c,d))}var ii={YAML:function handleYamlDirective(c,d,p){var g,f,_;null!==c.version&&throwError(c,"duplication of %YAML directive"),1!==p.length&&throwError(c,"YAML directive accepts exactly one argument"),null===(g=/^([0-9]+)\.([0-9]+)$/.exec(p[0]))&&throwError(c,"ill-formed argument of the YAML directive"),f=parseInt(g[1],10),_=parseInt(g[2],10),1!==f&&throwError(c,"unacceptable YAML version of the document"),c.version=p[0],c.checkLineBreaks=_<2,1!==_&&2!==_&&throwWarning(c,"unsupported YAML version of the document")},TAG:function handleTagDirective(c,d,p){var g,f;2!==p.length&&throwError(c,"TAG directive accepts exactly two arguments"),g=p[0],f=p[1],Ke.test(g)||throwError(c,"ill-formed tag handle (first argument) of the TAG directive"),Ze.call(c.tagMap,g)&&throwError(c,'there is a previously declared suffix for "'+g+'" tag handle'),Je.test(f)||throwError(c,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch(d){throwError(c,"tag prefix is malformed: "+f)}c.tagMap[g]=f}};function captureSegment(c,d,p,g){var f,_,y,v;if(d<p){if(v=c.input.slice(d,p),g)for(f=0,_=v.length;f<_;f+=1)9===(y=v.charCodeAt(f))||32<=y&&y<=1114111||throwError(c,"expected valid JSON character");else qe.test(v)&&throwError(c,"the stream contains non-printable characters");c.result+=v}}function mergeMappings(c,d,p,g){var f,_,y,v;for(J.isObject(p)||throwError(c,"cannot merge mappings; the provided source object is unacceptable"),y=0,v=(f=Object.keys(p)).length;y<v;y+=1)_=f[y],Ze.call(d,_)||(d[_]=p[_],g[_]=!0)}function storeMappingPair(c,d,p,g,f,_,y,v,x){var C,L;if(Array.isArray(f))for(C=0,L=(f=Array.prototype.slice.call(f)).length;C<L;C+=1)Array.isArray(f[C])&&throwError(c,"nested arrays are not supported inside keys"),"object"==typeof f&&"[object Object]"===_class(f[C])&&(f[C]="[object Object]");if("object"==typeof f&&"[object Object]"===_class(f)&&(f="[object Object]"),f=String(f),null===d&&(d={}),"tag:yaml.org,2002:merge"===g)if(Array.isArray(_))for(C=0,L=_.length;C<L;C+=1)mergeMappings(c,d,_[C],p);else mergeMappings(c,d,_,p);else c.json||Ze.call(p,f)||!Ze.call(d,f)||(c.line=y||c.line,c.lineStart=v||c.lineStart,c.position=x||c.position,throwError(c,"duplicated mapping key")),"__proto__"===f?Object.defineProperty(d,f,{configurable:!0,enumerable:!0,writable:!0,value:_}):d[f]=_,delete p[f];return d}function readLineBreak(c){var d;10===(d=c.input.charCodeAt(c.position))?c.position++:13===d?(c.position++,10===c.input.charCodeAt(c.position)&&c.position++):throwError(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function skipSeparationSpace(c,d,p){for(var g=0,f=c.input.charCodeAt(c.position);0!==f;){for(;is_WHITE_SPACE(f);)9===f&&-1===c.firstTabInLine&&(c.firstTabInLine=c.position),f=c.input.charCodeAt(++c.position);if(d&&35===f)do{f=c.input.charCodeAt(++c.position)}while(10!==f&&13!==f&&0!==f);if(!is_EOL(f))break;for(readLineBreak(c),f=c.input.charCodeAt(c.position),g++,c.lineIndent=0;32===f;)c.lineIndent++,f=c.input.charCodeAt(++c.position)}return-1!==p&&0!==g&&c.lineIndent<p&&throwWarning(c,"deficient indentation"),g}function testDocumentSeparator(c){var d,p=c.position;return!(45!==(d=c.input.charCodeAt(p))&&46!==d||d!==c.input.charCodeAt(p+1)||d!==c.input.charCodeAt(p+2)||(p+=3,0!==(d=c.input.charCodeAt(p))&&!is_WS_OR_EOL(d)))}function writeFoldedLines(c,d){1===d?c.result+=" ":d>1&&(c.result+=J.repeat("\n",d-1))}function readBlockSequence(c,d){var p,g,f=c.tag,_=c.anchor,y=[],v=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=y),g=c.input.charCodeAt(c.position);0!==g&&(-1!==c.firstTabInLine&&(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),45===g)&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1));)if(v=!0,c.position++,skipSeparationSpace(c,!0,-1)&&c.lineIndent<=d)y.push(null),g=c.input.charCodeAt(c.position);else if(p=c.line,composeNode(c,d,He,!1,!0),y.push(c.result),skipSeparationSpace(c,!0,-1),g=c.input.charCodeAt(c.position),(c.line===p||c.lineIndent>d)&&0!==g)throwError(c,"bad indentation of a sequence entry");else if(c.lineIndent<d)break;return!!v&&(c.tag=f,c.anchor=_,c.kind="sequence",c.result=y,!0)}function readTagProperty(c){var d,p,g,f,_=!1,y=!1;if(33!==(f=c.input.charCodeAt(c.position)))return!1;if(null!==c.tag&&throwError(c,"duplication of a tag property"),60===(f=c.input.charCodeAt(++c.position))?(_=!0,f=c.input.charCodeAt(++c.position)):33===f?(y=!0,p="!!",f=c.input.charCodeAt(++c.position)):p="!",d=c.position,_){do{f=c.input.charCodeAt(++c.position)}while(0!==f&&62!==f);c.position<c.length?(g=c.input.slice(d,c.position),f=c.input.charCodeAt(++c.position)):throwError(c,"unexpected end of the stream within a verbatim tag")}else{for(;0!==f&&!is_WS_OR_EOL(f);)33===f&&(y?throwError(c,"tag suffix cannot contain exclamation marks"):(p=c.input.slice(d-1,c.position+1),Ke.test(p)||throwError(c,"named tag handle cannot contain such characters"),y=!0,d=c.position+1)),f=c.input.charCodeAt(++c.position);g=c.input.slice(d,c.position),$e.test(g)&&throwError(c,"tag suffix cannot contain flow indicator characters")}g&&!Je.test(g)&&throwError(c,"tag name cannot contain such characters: "+g);try{g=decodeURIComponent(g)}catch(d){throwError(c,"tag name is malformed: "+g)}return _?c.tag=g:Ze.call(c.tagMap,p)?c.tag=c.tagMap[p]+g:"!"===p?c.tag="!"+g:"!!"===p?c.tag="tag:yaml.org,2002:"+g:throwError(c,'undeclared tag handle "'+p+'"'),!0}function readAnchorProperty(c){var d,p;if(38!==(p=c.input.charCodeAt(c.position)))return!1;for(null!==c.anchor&&throwError(c,"duplication of an anchor property"),p=c.input.charCodeAt(++c.position),d=c.position;0!==p&&!is_WS_OR_EOL(p)&&!is_FLOW_INDICATOR(p);)p=c.input.charCodeAt(++c.position);return c.position===d&&throwError(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(d,c.position),!0}function composeNode(c,d,p,g,f){var _,y,v,x,C,L,M,E,T,k=1,O=!1,I=!1;if(null!==c.listener&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null,_=y=v=Ue===p||He===p,g&&skipSeparationSpace(c,!0,-1)&&(O=!0,c.lineIndent>d?k=1:c.lineIndent===d?k=0:c.lineIndent<d&&(k=-1)),1===k)for(;readTagProperty(c)||readAnchorProperty(c);)skipSeparationSpace(c,!0,-1)?(O=!0,v=_,c.lineIndent>d?k=1:c.lineIndent===d?k=0:c.lineIndent<d&&(k=-1)):v=!1;if(v&&(v=O||f),1!==k&&Ue!==p||(E=We===p||Re===p?d:d+1,T=c.position-c.lineStart,1===k?v&&(readBlockSequence(c,T)||function readBlockMapping(c,d,p){var g,f,_,y,v,x,C,L=c.tag,M=c.anchor,E={},T=Object.create(null),k=null,O=null,I=null,D=!1,B=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=E),C=c.input.charCodeAt(c.position);0!==C;){if(D||-1===c.firstTabInLine||(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),g=c.input.charCodeAt(c.position+1),_=c.line,63!==C&&58!==C||!is_WS_OR_EOL(g)){if(y=c.line,v=c.lineStart,x=c.position,!composeNode(c,p,Re,!1,!0))break;if(c.line===_){for(C=c.input.charCodeAt(c.position);is_WHITE_SPACE(C);)C=c.input.charCodeAt(++c.position);if(58===C)is_WS_OR_EOL(C=c.input.charCodeAt(++c.position))||throwError(c,"a whitespace character is expected after the key-value separator within a block mapping"),D&&(storeMappingPair(c,E,T,k,O,null,y,v,x),k=O=I=null),B=!0,D=!1,f=!1,k=c.tag,O=c.result;else{if(!B)return c.tag=L,c.anchor=M,!0;throwError(c,"can not read an implicit mapping pair; a colon is missed")}}else{if(!B)return c.tag=L,c.anchor=M,!0;throwError(c,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===C?(D&&(storeMappingPair(c,E,T,k,O,null,y,v,x),k=O=I=null),B=!0,D=!0,f=!0):D?(D=!1,f=!0):throwError(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,C=g;if((c.line===_||c.lineIndent>d)&&(D&&(y=c.line,v=c.lineStart,x=c.position),composeNode(c,d,Ue,!0,f)&&(D?O=c.result:I=c.result),D||(storeMappingPair(c,E,T,k,O,I,y,v,x),k=O=I=null),skipSeparationSpace(c,!0,-1),C=c.input.charCodeAt(c.position)),(c.line===_||c.lineIndent>d)&&0!==C)throwError(c,"bad indentation of a mapping entry");else if(c.lineIndent<d)break}return D&&storeMappingPair(c,E,T,k,O,null,y,v,x),B&&(c.tag=L,c.anchor=M,c.kind="mapping",c.result=E),B}(c,T,E))||function readFlowCollection(c,d){var p,g,f,_,y,v,x,C,L,M,E,T,k=!0,O=c.tag,I=c.anchor,D=Object.create(null);if(91===(T=c.input.charCodeAt(c.position)))y=93,C=!1,_=[];else{if(123!==T)return!1;y=125,C=!0,_={}}for(null!==c.anchor&&(c.anchorMap[c.anchor]=_),T=c.input.charCodeAt(++c.position);0!==T;){if(skipSeparationSpace(c,!0,d),(T=c.input.charCodeAt(c.position))===y)return c.position++,c.tag=O,c.anchor=I,c.kind=C?"mapping":"sequence",c.result=_,!0;k?44===T&&throwError(c,"expected the node content, but found ','"):throwError(c,"missed comma between flow collection entries"),E=null,v=x=!1,63===T&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1))&&(v=x=!0,c.position++,skipSeparationSpace(c,!0,d)),p=c.line,g=c.lineStart,f=c.position,composeNode(c,d,We,!1,!0),M=c.tag,L=c.result,skipSeparationSpace(c,!0,d),T=c.input.charCodeAt(c.position),!x&&c.line!==p||58!==T||(v=!0,T=c.input.charCodeAt(++c.position),skipSeparationSpace(c,!0,d),composeNode(c,d,We,!1,!0),E=c.result),C?storeMappingPair(c,_,D,M,L,E,p,g,f):v?_.push(storeMappingPair(c,null,D,M,L,E,p,g,f)):_.push(L),skipSeparationSpace(c,!0,d),44===(T=c.input.charCodeAt(c.position))?(k=!0,T=c.input.charCodeAt(++c.position)):k=!1}throwError(c,"unexpected end of the stream within a flow collection")}(c,E)?I=!0:(y&&function readBlockScalar(c,d){var p,g,f,_,y=Ve,v=!1,x=!1,C=d,L=0,M=!1;if(124===(_=c.input.charCodeAt(c.position)))g=!1;else{if(62!==_)return!1;g=!0}for(c.kind="scalar",c.result="";0!==_;)if(43===(_=c.input.charCodeAt(++c.position))||45===_)Ve===y?y=43===_?Ye:Ge:throwError(c,"repeat of a chomping mode identifier");else{if(!((f=fromDecimalCode(_))>=0))break;0===f?throwError(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):x?throwError(c,"repeat of an indentation width identifier"):(C=d+f-1,x=!0)}if(is_WHITE_SPACE(_)){do{_=c.input.charCodeAt(++c.position)}while(is_WHITE_SPACE(_));if(35===_)do{_=c.input.charCodeAt(++c.position)}while(!is_EOL(_)&&0!==_)}for(;0!==_;){for(readLineBreak(c),c.lineIndent=0,_=c.input.charCodeAt(c.position);(!x||c.lineIndent<C)&&32===_;)c.lineIndent++,_=c.input.charCodeAt(++c.position);if(!x&&c.lineIndent>C&&(C=c.lineIndent),is_EOL(_))L++;else{if(c.lineIndent<C){y===Ye?c.result+=J.repeat("\n",v?1+L:L):y===Ve&&v&&(c.result+="\n");break}for(g?is_WHITE_SPACE(_)?(M=!0,c.result+=J.repeat("\n",v?1+L:L)):M?(M=!1,c.result+=J.repeat("\n",L+1)):0===L?v&&(c.result+=" "):c.result+=J.repeat("\n",L):c.result+=J.repeat("\n",v?1+L:L),v=!0,x=!0,L=0,p=c.position;!is_EOL(_)&&0!==_;)_=c.input.charCodeAt(++c.position);captureSegment(c,p,c.position,!1)}}return!0}(c,E)||function readSingleQuotedScalar(c,d){var p,g,f;if(39!==(p=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,g=f=c.position;0!==(p=c.input.charCodeAt(c.position));)if(39===p){if(captureSegment(c,g,c.position,!0),39!==(p=c.input.charCodeAt(++c.position)))return!0;g=c.position,c.position++,f=c.position}else is_EOL(p)?(captureSegment(c,g,f,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,d)),g=f=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a single quoted scalar"):(c.position++,f=c.position);throwError(c,"unexpected end of the stream within a single quoted scalar")}(c,E)||function readDoubleQuotedScalar(c,d){var p,g,f,_,y,v;if(34!==(v=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,p=g=c.position;0!==(v=c.input.charCodeAt(c.position));){if(34===v)return captureSegment(c,p,c.position,!0),c.position++,!0;if(92===v){if(captureSegment(c,p,c.position,!0),is_EOL(v=c.input.charCodeAt(++c.position)))skipSeparationSpace(c,!1,d);else if(v<256&&Qe[v])c.result+=ti[v],c.position++;else if((y=escapedHexLen(v))>0){for(f=y,_=0;f>0;f--)(y=fromHexCode(v=c.input.charCodeAt(++c.position)))>=0?_=(_<<4)+y:throwError(c,"expected hexadecimal character");c.result+=charFromCodepoint(_),c.position++}else throwError(c,"unknown escape sequence");p=g=c.position}else is_EOL(v)?(captureSegment(c,p,g,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,d)),p=g=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a double quoted scalar"):(c.position++,g=c.position)}throwError(c,"unexpected end of the stream within a double quoted scalar")}(c,E)?I=!0:!function readAlias(c){var d,p,g;if(42!==(g=c.input.charCodeAt(c.position)))return!1;for(g=c.input.charCodeAt(++c.position),d=c.position;0!==g&&!is_WS_OR_EOL(g)&&!is_FLOW_INDICATOR(g);)g=c.input.charCodeAt(++c.position);return c.position===d&&throwError(c,"name of an alias node must contain at least one character"),p=c.input.slice(d,c.position),Ze.call(c.anchorMap,p)||throwError(c,'unidentified alias "'+p+'"'),c.result=c.anchorMap[p],skipSeparationSpace(c,!0,-1),!0}(c)?function readPlainScalar(c,d,p){var g,f,_,y,v,x,C,L,M=c.kind,E=c.result;if(is_WS_OR_EOL(L=c.input.charCodeAt(c.position))||is_FLOW_INDICATOR(L)||35===L||38===L||42===L||33===L||124===L||62===L||39===L||34===L||37===L||64===L||96===L)return!1;if((63===L||45===L)&&(is_WS_OR_EOL(g=c.input.charCodeAt(c.position+1))||p&&is_FLOW_INDICATOR(g)))return!1;for(c.kind="scalar",c.result="",f=_=c.position,y=!1;0!==L;){if(58===L){if(is_WS_OR_EOL(g=c.input.charCodeAt(c.position+1))||p&&is_FLOW_INDICATOR(g))break}else if(35===L){if(is_WS_OR_EOL(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&testDocumentSeparator(c)||p&&is_FLOW_INDICATOR(L))break;if(is_EOL(L)){if(v=c.line,x=c.lineStart,C=c.lineIndent,skipSeparationSpace(c,!1,-1),c.lineIndent>=d){y=!0,L=c.input.charCodeAt(c.position);continue}c.position=_,c.line=v,c.lineStart=x,c.lineIndent=C;break}}y&&(captureSegment(c,f,_,!1),writeFoldedLines(c,c.line-v),f=_=c.position,y=!1),is_WHITE_SPACE(L)||(_=c.position+1),L=c.input.charCodeAt(++c.position)}return captureSegment(c,f,_,!1),!!c.result||(c.kind=M,c.result=E,!1)}(c,E,We===p)&&(I=!0,null===c.tag&&(c.tag="?")):(I=!0,null===c.tag&&null===c.anchor||throwError(c,"alias node should not have any properties")),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):0===k&&(I=v&&readBlockSequence(c,T))),null===c.tag)null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);else if("?"===c.tag){for(null!==c.result&&"scalar"!==c.kind&&throwError(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"'),x=0,C=c.implicitTypes.length;x<C;x+=1)if((M=c.implicitTypes[x]).resolve(c.result)){c.result=M.construct(c.result),c.tag=M.tag,null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);break}}else if("!"!==c.tag){if(Ze.call(c.typeMap[c.kind||"fallback"],c.tag))M=c.typeMap[c.kind||"fallback"][c.tag];else for(M=null,x=0,C=(L=c.typeMap.multi[c.kind||"fallback"]).length;x<C;x+=1)if(c.tag.slice(0,L[x].tag.length)===L[x].tag){M=L[x];break}M||throwError(c,"unknown tag !<"+c.tag+">"),null!==c.result&&M.kind!==c.kind&&throwError(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+M.kind+'", not "'+c.kind+'"'),M.resolve(c.result,c.tag)?(c.result=M.construct(c.result,c.tag),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):throwError(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return null!==c.listener&&c.listener("close",c),null!==c.tag||null!==c.anchor||I}function readDocument(c){var d,p,g,f,_=c.position,y=!1;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);0!==(f=c.input.charCodeAt(c.position))&&(skipSeparationSpace(c,!0,-1),f=c.input.charCodeAt(c.position),!(c.lineIndent>0||37!==f));){for(y=!0,f=c.input.charCodeAt(++c.position),d=c.position;0!==f&&!is_WS_OR_EOL(f);)f=c.input.charCodeAt(++c.position);for(g=[],(p=c.input.slice(d,c.position)).length<1&&throwError(c,"directive name must not be less than one character in length");0!==f;){for(;is_WHITE_SPACE(f);)f=c.input.charCodeAt(++c.position);if(35===f){do{f=c.input.charCodeAt(++c.position)}while(0!==f&&!is_EOL(f));break}if(is_EOL(f))break;for(d=c.position;0!==f&&!is_WS_OR_EOL(f);)f=c.input.charCodeAt(++c.position);g.push(c.input.slice(d,c.position))}0!==f&&readLineBreak(c),Ze.call(ii,p)?ii[p](c,p,g):throwWarning(c,'unknown document directive "'+p+'"')}skipSeparationSpace(c,!0,-1),0===c.lineIndent&&45===c.input.charCodeAt(c.position)&&45===c.input.charCodeAt(c.position+1)&&45===c.input.charCodeAt(c.position+2)?(c.position+=3,skipSeparationSpace(c,!0,-1)):y&&throwError(c,"directives end mark is expected"),composeNode(c,c.lineIndent-1,Ue,!1,!0),skipSeparationSpace(c,!0,-1),c.checkLineBreaks&&Xe.test(c.input.slice(_,c.position))&&throwWarning(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&testDocumentSeparator(c)?46===c.input.charCodeAt(c.position)&&(c.position+=3,skipSeparationSpace(c,!0,-1)):c.position<c.length-1&&throwError(c,"end of the stream or a document separator is expected")}function loadDocuments(c,d){d=d||{},0!==(c=String(c)).length&&(10!==c.charCodeAt(c.length-1)&&13!==c.charCodeAt(c.length-1)&&(c+="\n"),65279===c.charCodeAt(0)&&(c=c.slice(1)));var p=new State$1(c,d),g=c.indexOf("\0");for(-1!==g&&(p.position=g,throwError(p,"null byte is not allowed in input")),p.input+="\0";32===p.input.charCodeAt(p.position);)p.lineIndent+=1,p.position+=1;for(;p.position<p.length-1;)readDocument(p);return p.documents}var ni=function loadAll$1(c,d,p){null!==d&&"object"==typeof d&&void 0===p&&(p=d,d=null);var g=loadDocuments(c,p);if("function"!=typeof d)return g;for(var f=0,_=g.length;f<_;f+=1)d(g[f])},oi={loadAll:ni,load:function load$1(c,d){var p=loadDocuments(c,d);if(0!==p.length){if(1===p.length)return p[0];throw new ct("expected a single document in the stream, but found more")}}},si=oi.load,ri=oi.loadAll;const ai=new URL("./",import.meta.url),li=Object.freeze({use:{Leaflet:{value:ai+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:ai+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:ai+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=c=>({use:c.use??"Leaflet",width:"100%",...c,aliases:{...li,...c.aliases??{}}}),hi={},setValueByAliases=c=>c.aliases?(Object.entries(c).filter((([c,d])=>"aliases"!==c&&"string"==typeof d&&d.match(/^[A-Z]/))).forEach((([d,p])=>{const g=c.aliases?.[d]?.[p],f="object"!=typeof g||Array.isArray(g)?g:g.value;f&&(c[d]=f,"use"===d&&(c.url=g.url,c.desc=g.desc))})),c):c,applyOtherConfig=async c=>{if(!c.apply)return c;await(async c=>{c&&!hi[c]&&(hi[c]=await fetch(c).then((c=>{if(200!==c.status)throw Error();return c.text()})).then((c=>si(c))).catch((d=>{throw Error(`Fail to fetch applied config ${c}`,d)})))})(c.apply);const d=hi[c.apply];if(!d)throw Error("Fail to fetch remote config "+c.aply);return{...d,...c,aliases:{...d.aliases,...c.aliases??{}}}},prepareRenderer=async c=>{let d;if(c.use)if(c.use.steps)d=c.use;else{const p=(await import(c.use)).default;d=new p}else d=c;return Object.entries(c).forEach((([c,p])=>d[c]=p)),d},healthCheck=c=>{if(!c.steps)throw c.steps=[],Error("not health");return c},renderWithConfig=async c=>{c.results=[];const d=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],p=(c=>{let d=c;return c=>c.reduce(((c,p)=>c.then((async()=>d.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(d=await p(d),d))).then((c=>d.results.push({type:"prepare",func:p.valueOf(),state:c?.state??"success",result:c?.reason??d}))).catch((c=>{d.results.push({type:"prepare",func:p.valueOf(),state:"fail",result:c})})).then((()=>{d.prepareCallback?.(d,d.results)}))),Promise.resolve(d)).then((()=>d))})(c)(d).then((c=>(c=>(c.steps??[]).reduce(((d,p)=>d.then((()=>{if("stop"===c.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(p.depends){const d=c.results.findLast((c=>c.func===p.depends))?.state;if(d.match(/skip|fail/))return{state:"skip"}}return p.valueOf().bind(c)(c)})).then((d=>c.results.push({type:"render",func:p.valueOf(),state:d?.state??"success",result:d?.reason??d}))).catch((d=>c.results.push({type:"render",func:p.valueOf(),state:"fail",result:d}))).then((()=>{c.stepCallback?.(c,c)}))),Promise.resolve()).then((()=>c)))(c))).then((c=>{const d=!c.results||0===c.results.length||!c.results.find((c=>c.state.match(/success/)))||c.results.find((c=>c.state.match(/fail|stop/))),p=d?"unfulfilled":"fulfilled";return c?.target?.setAttribute("data-render",p),c}));return p.valueOf=()=>c.results,p},setValueOf=c=>(c.valueOf=()=>JSON.stringify(c,((c,d)=>c.match(/aliases|target/)?void 0:d)),c),shouldRender=c=>!(c.target instanceof window.HTMLElement&&c.target.classList.contains("mapclay")&&c.valueOf()===c.target.getAttribute("data-mapclay")&&"fulfilled"===c.target.getAttribute("data-render")),renderWith=c=>(d,p)=>{c=c??(c=>c);const g="object"==typeof p?Array.isArray(p)?p.map(c):[p].map(c):null;if(!g)throw Error(`Invalid config files: ${p}`);d.innerHTML="";return g.map(setValueOf).map((c=>{if(shouldRender(c)){const d=document.createElement("div");c.id&&(d.id=c.id.replaceAll(" ","_"),d.title=`ID: ${d.id}`),d.classList.add("mapclay"),c.target=d,d.dataset.render="rendering",d.dataset.mapclay=c.valueOf()}return d.append(c.target),window.CSS.supports(`width: ${c.width}`)&&(c.target.style.width=c.width),window.CSS.supports(`height: ${c.height}`)&&(c.target.style.height=c.height),c})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(c=null)=>async(d,p=null)=>{const g=(c=>{const d=[];return ri(c,(c=>{"object"!=typeof c||Array.isArray(c)?d.length>0&&(d.at(-1).eval=c.toString()):d.push(c??{})})),0===d.length?[{}]:d})(p??d.textContent);return renderWith(c)(d,g)},ci=renderWith(applyDefaultAliases),di=renderByYamlWith(applyDefaultAliases);document.currentScript&&(globalThis.mapclay={render:ci,renderWith:renderWith,renderByYaml:di,renderByYamlWith:renderByYamlWith})
+/* @preserve
+ * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
+ * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */;function extend(c){var d,p,g,f;for(p=1,g=arguments.length;p<g;p++)for(d in f=arguments[p])c[d]=f[d];return c}var ui=Object.create||function(){function F(){}return function(c){return F.prototype=c,new F}}();function bind(c,d){var p=Array.prototype.slice;if(c.bind)return c.bind.apply(c,p.call(arguments,1));var g=p.call(arguments,2);return function(){return c.apply(d,g.length?g.concat(p.call(arguments)):arguments)}}var pi=0;function stamp(c){return"_leaflet_id"in c||(c._leaflet_id=++pi),c._leaflet_id}function throttle(c,d,p){var g,f,_,y;return y=function(){g=!1,f&&(_.apply(p,f),f=!1)},_=function(){g?f=arguments:(c.apply(p,arguments),setTimeout(y,d),g=!0)},_}function wrapNum(c,d,p){var g=d[1],f=d[0],_=g-f;return c===g&&p?c:((c-f)%_+_)%_+f}function falseFn(){return!1}function formatNum(c,d){if(!1===d)return c;var p=Math.pow(10,void 0===d?6:d);return Math.round(c*p)/p}function trim(c){return c.trim?c.trim():c.replace(/^\s+|\s+$/g,"")}function splitWords(c){return trim(c).split(/\s+/)}function setOptions(c,d){for(var p in Object.prototype.hasOwnProperty.call(c,"options")||(c.options=c.options?ui(c.options):{}),d)c.options[p]=d[p];return c.options}function getParamString(c,d,p){var g=[];for(var f in c)g.push(encodeURIComponent(p?f.toUpperCase():f)+"="+encodeURIComponent(c[f]));return(d&&-1!==d.indexOf("?")?"&":"?")+g.join("&")}var gi=/\{ *([\w_ -]+) *\}/g;function template(c,d){return c.replace(gi,(function(c,p){var g=d[p];if(void 0===g)throw new Error("No value provided for variable "+c);return"function"==typeof g&&(g=g(d)),g}))}var mi=Array.isArray||function(c){return"[object Array]"===Object.prototype.toString.call(c)};function indexOf(c,d){for(var p=0;p<c.length;p++)if(c[p]===d)return p;return-1}var fi="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function getPrefixed(c){return window["webkit"+c]||window["moz"+c]||window["ms"+c]}var _i=0;function timeoutDefer(c){var d=+new Date,p=Math.max(0,16-(d-_i));return _i=d+p,window.setTimeout(c,p)}var yi=window.requestAnimationFrame||getPrefixed("RequestAnimationFrame")||timeoutDefer,vi=window.cancelAnimationFrame||getPrefixed("CancelAnimationFrame")||getPrefixed("CancelRequestAnimationFrame")||function(c){window.clearTimeout(c)};function requestAnimFrame(c,d,p){if(!p||yi!==timeoutDefer)return yi.call(window,bind(c,d));c.call(d)}function cancelAnimFrame(c){c&&vi.call(window,c)}var xi={__proto__:null,extend:extend,create:ui,bind:bind,get lastId(){return pi},stamp:stamp,throttle:throttle,wrapNum:wrapNum,falseFn:falseFn,formatNum:formatNum,trim:trim,splitWords:splitWords,setOptions:setOptions,getParamString:getParamString,template:template,isArray:mi,indexOf:indexOf,emptyImageUrl:fi,requestFn:yi,cancelFn:vi,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame};function Class(){}Class.extend=function(c){var NewClass=function(){setOptions(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},d=NewClass.__super__=this.prototype,p=ui(d);for(var g in p.constructor=NewClass,NewClass.prototype=p,this)Object.prototype.hasOwnProperty.call(this,g)&&"prototype"!==g&&"__super__"!==g&&(NewClass[g]=this[g]);return c.statics&&extend(NewClass,c.statics),c.includes&&(!function checkDeprecatedMixinEvents(c){if("undefined"==typeof L||!L||!L.Mixin)return;c=mi(c)?c:[c];for(var d=0;d<c.length;d++)c[d]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(c.includes),extend.apply(null,[p].concat(c.includes))),extend(p,c),delete p.statics,delete p.includes,p.options&&(p.options=d.options?ui(d.options):{},extend(p.options,c.options)),p._initHooks=[],p.callInitHooks=function(){if(!this._initHooksCalled){d.callInitHooks&&d.callInitHooks.call(this),this._initHooksCalled=!0;for(var c=0,g=p._initHooks.length;c<g;c++)p._initHooks[c].call(this)}},NewClass},Class.include=function(c){var d=this.prototype.options;return extend(this.prototype,c),c.options&&(this.prototype.options=d,this.mergeOptions(c.options)),this},Class.mergeOptions=function(c){return extend(this.prototype.options,c),this},Class.addInitHook=function(c){var d=Array.prototype.slice.call(arguments,1),p="function"==typeof c?c:function(){this[c].apply(this,d)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(p),this};var Pi={on:function(c,d,p){if("object"==typeof c)for(var g in c)this._on(g,c[g],d);else for(var f=0,_=(c=splitWords(c)).length;f<_;f++)this._on(c[f],d,p);return this},off:function(c,d,p){if(arguments.length)if("object"==typeof c)for(var g in c)this._off(g,c[g],d);else{c=splitWords(c);for(var f=1===arguments.length,_=0,y=c.length;_<y;_++)f?this._off(c[_]):this._off(c[_],d,p)}else delete this._events;return this},_on:function(c,d,p,g){if("function"==typeof d){if(!1===this._listens(c,d,p)){p===this&&(p=void 0);var f={fn:d,ctx:p};g&&(f.once=!0),this._events=this._events||{},this._events[c]=this._events[c]||[],this._events[c].push(f)}}else console.warn("wrong listener type: "+typeof d)},_off:function(c,d,p){var g,f,_;if(this._events&&(g=this._events[c]))if(1!==arguments.length)if("function"==typeof d){var y=this._listens(c,d,p);if(!1!==y){var v=g[y];this._firingCount&&(v.fn=falseFn,this._events[c]=g=g.slice()),g.splice(y,1)}}else console.warn("wrong listener type: "+typeof d);else{if(this._firingCount)for(f=0,_=g.length;f<_;f++)g[f].fn=falseFn;delete this._events[c]}},fire:function(c,d,p){if(!this.listens(c,p))return this;var g=extend({},d,{type:c,target:this,sourceTarget:d&&d.sourceTarget||this});if(this._events){var f=this._events[c];if(f){this._firingCount=this._firingCount+1||1;for(var _=0,y=f.length;_<y;_++){var v=f[_],x=v.fn;v.once&&this.off(c,x,v.ctx),x.call(v.ctx||this,g)}this._firingCount--}}return p&&this._propagateEvent(g),this},listens:function(c,d,p,g){"string"!=typeof c&&console.warn('"string" type argument expected');var f=d;"function"!=typeof d&&(g=!!d,f=void 0,p=void 0);var _=this._events&&this._events[c];if(_&&_.length&&!1!==this._listens(c,f,p))return!0;if(g)for(var y in this._eventParents)if(this._eventParents[y].listens(c,d,p,g))return!0;return!1},_listens:function(c,d,p){if(!this._events)return!1;var g=this._events[c]||[];if(!d)return!!g.length;p===this&&(p=void 0);for(var f=0,_=g.length;f<_;f++)if(g[f].fn===d&&g[f].ctx===p)return f;return!1},once:function(c,d,p){if("object"==typeof c)for(var g in c)this._on(g,c[g],d,!0);else for(var f=0,_=(c=splitWords(c)).length;f<_;f++)this._on(c[f],d,p,!0);return this},addEventParent:function(c){return this._eventParents=this._eventParents||{},this._eventParents[stamp(c)]=c,this},removeEventParent:function(c){return this._eventParents&&delete this._eventParents[stamp(c)],this},_propagateEvent:function(c){for(var d in this._eventParents)this._eventParents[d].fire(c.type,extend({layer:c.target,propagatedFrom:c.target},c),!0)}};Pi.addEventListener=Pi.on,Pi.removeEventListener=Pi.clearAllEventListeners=Pi.off,Pi.addOneTimeEventListener=Pi.once,Pi.fireEvent=Pi.fire,Pi.hasEventListeners=Pi.listens;var wi=Class.extend(Pi);function Point(c,d,p){this.x=p?Math.round(c):c,this.y=p?Math.round(d):d}var bi=Math.trunc||function(c){return c>0?Math.floor(c):Math.ceil(c)};function toPoint(c,d,p){return c instanceof Point?c:mi(c)?new Point(c[0],c[1]):null==c?c:"object"==typeof c&&"x"in c&&"y"in c?new Point(c.x,c.y):new Point(c,d,p)}function Bounds(c,d){if(c)for(var p=d?[c,d]:c,g=0,f=p.length;g<f;g++)this.extend(p[g])}function toBounds(c,d){return!c||c instanceof Bounds?c:new Bounds(c,d)}function LatLngBounds(c,d){if(c)for(var p=d?[c,d]:c,g=0,f=p.length;g<f;g++)this.extend(p[g])}function toLatLngBounds(c,d){return c instanceof LatLngBounds?c:new LatLngBounds(c,d)}function LatLng(c,d,p){if(isNaN(c)||isNaN(d))throw new Error("Invalid LatLng object: ("+c+", "+d+")");this.lat=+c,this.lng=+d,void 0!==p&&(this.alt=+p)}function toLatLng(c,d,p){return c instanceof LatLng?c:mi(c)&&"object"!=typeof c[0]?3===c.length?new LatLng(c[0],c[1],c[2]):2===c.length?new LatLng(c[0],c[1]):null:null==c?c:"object"==typeof c&&"lat"in c?new LatLng(c.lat,"lng"in c?c.lng:c.lon,c.alt):void 0===d?null:new LatLng(c,d,p)}Point.prototype={clone:function(){return new Point(this.x,this.y)},add:function(c){return this.clone()._add(toPoint(c))},_add:function(c){return this.x+=c.x,this.y+=c.y,this},subtract:function(c){return this.clone()._subtract(toPoint(c))},_subtract:function(c){return this.x-=c.x,this.y-=c.y,this},divideBy:function(c){return this.clone()._divideBy(c)},_divideBy:function(c){return this.x/=c,this.y/=c,this},multiplyBy:function(c){return this.clone()._multiplyBy(c)},_multiplyBy:function(c){return this.x*=c,this.y*=c,this},scaleBy:function(c){return new Point(this.x*c.x,this.y*c.y)},unscaleBy:function(c){return new Point(this.x/c.x,this.y/c.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=bi(this.x),this.y=bi(this.y),this},distanceTo:function(c){var d=(c=toPoint(c)).x-this.x,p=c.y-this.y;return Math.sqrt(d*d+p*p)},equals:function(c){return(c=toPoint(c)).x===this.x&&c.y===this.y},contains:function(c){return c=toPoint(c),Math.abs(c.x)<=Math.abs(this.x)&&Math.abs(c.y)<=Math.abs(this.y)},toString:function(){return"Point("+formatNum(this.x)+", "+formatNum(this.y)+")"}},Bounds.prototype={extend:function(c){var d,p;if(!c)return this;if(c instanceof Point||"number"==typeof c[0]||"x"in c)d=p=toPoint(c);else if(d=(c=toBounds(c)).min,p=c.max,!d||!p)return this;return this.min||this.max?(this.min.x=Math.min(d.x,this.min.x),this.max.x=Math.max(p.x,this.max.x),this.min.y=Math.min(d.y,this.min.y),this.max.y=Math.max(p.y,this.max.y)):(this.min=d.clone(),this.max=p.clone()),this},getCenter:function(c){return toPoint((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,c)},getBottomLeft:function(){return toPoint(this.min.x,this.max.y)},getTopRight:function(){return toPoint(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(c){var d,p;return(c="number"==typeof c[0]||c instanceof Point?toPoint(c):toBounds(c))instanceof Bounds?(d=c.min,p=c.max):d=p=c,d.x>=this.min.x&&p.x<=this.max.x&&d.y>=this.min.y&&p.y<=this.max.y},intersects:function(c){c=toBounds(c);var d=this.min,p=this.max,g=c.min,f=c.max,_=f.x>=d.x&&g.x<=p.x,y=f.y>=d.y&&g.y<=p.y;return _&&y},overlaps:function(c){c=toBounds(c);var d=this.min,p=this.max,g=c.min,f=c.max,_=f.x>d.x&&g.x<p.x,y=f.y>d.y&&g.y<p.y;return _&&y},isValid:function(){return!(!this.min||!this.max)},pad:function(c){var d=this.min,p=this.max,g=Math.abs(d.x-p.x)*c,f=Math.abs(d.y-p.y)*c;return toBounds(toPoint(d.x-g,d.y-f),toPoint(p.x+g,p.y+f))},equals:function(c){return!!c&&(c=toBounds(c),this.min.equals(c.getTopLeft())&&this.max.equals(c.getBottomRight()))}},LatLngBounds.prototype={extend:function(c){var d,p,g=this._southWest,f=this._northEast;if(c instanceof LatLng)d=c,p=c;else{if(!(c instanceof LatLngBounds))return c?this.extend(toLatLng(c)||toLatLngBounds(c)):this;if(d=c._southWest,p=c._northEast,!d||!p)return this}return g||f?(g.lat=Math.min(d.lat,g.lat),g.lng=Math.min(d.lng,g.lng),f.lat=Math.max(p.lat,f.lat),f.lng=Math.max(p.lng,f.lng)):(this._southWest=new LatLng(d.lat,d.lng),this._northEast=new LatLng(p.lat,p.lng)),this},pad:function(c){var d=this._southWest,p=this._northEast,g=Math.abs(d.lat-p.lat)*c,f=Math.abs(d.lng-p.lng)*c;return new LatLngBounds(new LatLng(d.lat-g,d.lng-f),new LatLng(p.lat+g,p.lng+f))},getCenter:function(){return new LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(c){c="number"==typeof c[0]||c instanceof LatLng||"lat"in c?toLatLng(c):toLatLngBounds(c);var d,p,g=this._southWest,f=this._northEast;return c instanceof LatLngBounds?(d=c.getSouthWest(),p=c.getNorthEast()):d=p=c,d.lat>=g.lat&&p.lat<=f.lat&&d.lng>=g.lng&&p.lng<=f.lng},intersects:function(c){c=toLatLngBounds(c);var d=this._southWest,p=this._northEast,g=c.getSouthWest(),f=c.getNorthEast(),_=f.lat>=d.lat&&g.lat<=p.lat,y=f.lng>=d.lng&&g.lng<=p.lng;return _&&y},overlaps:function(c){c=toLatLngBounds(c);var d=this._southWest,p=this._northEast,g=c.getSouthWest(),f=c.getNorthEast(),_=f.lat>d.lat&&g.lat<p.lat,y=f.lng>d.lng&&g.lng<p.lng;return _&&y},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(c,d){return!!c&&(c=toLatLngBounds(c),this._southWest.equals(c.getSouthWest(),d)&&this._northEast.equals(c.getNorthEast(),d))},isValid:function(){return!(!this._southWest||!this._northEast)}},LatLng.prototype={equals:function(c,d){return!!c&&(c=toLatLng(c),Math.max(Math.abs(this.lat-c.lat),Math.abs(this.lng-c.lng))<=(void 0===d?1e-9:d))},toString:function(c){return"LatLng("+formatNum(this.lat,c)+", "+formatNum(this.lng,c)+")"},distanceTo:function(c){return Li.distance(this,toLatLng(c))},wrap:function(){return Li.wrapLatLng(this)},toBounds:function(c){var d=180*c/40075017,p=d/Math.cos(Math.PI/180*this.lat);return toLatLngBounds([this.lat-d,this.lng-p],[this.lat+d,this.lng+p])},clone:function(){return new LatLng(this.lat,this.lng,this.alt)}};var Ci={latLngToPoint:function(c,d){var p=this.projection.project(c),g=this.scale(d);return this.transformation._transform(p,g)},pointToLatLng:function(c,d){var p=this.scale(d),g=this.transformation.untransform(c,p);return this.projection.unproject(g)},project:function(c){return this.projection.project(c)},unproject:function(c){return this.projection.unproject(c)},scale:function(c){return 256*Math.pow(2,c)},zoom:function(c){return Math.log(c/256)/Math.LN2},getProjectedBounds:function(c){if(this.infinite)return null;var d=this.projection.bounds,p=this.scale(c);return new Bounds(this.transformation.transform(d.min,p),this.transformation.transform(d.max,p))},infinite:!1,wrapLatLng:function(c){var d=this.wrapLng?wrapNum(c.lng,this.wrapLng,!0):c.lng;return new LatLng(this.wrapLat?wrapNum(c.lat,this.wrapLat,!0):c.lat,d,c.alt)},wrapLatLngBounds:function(c){var d=c.getCenter(),p=this.wrapLatLng(d),g=d.lat-p.lat,f=d.lng-p.lng;if(0===g&&0===f)return c;var _=c.getSouthWest(),y=c.getNorthEast();return new LatLngBounds(new LatLng(_.lat-g,_.lng-f),new LatLng(y.lat-g,y.lng-f))}},Li=extend({},Ci,{wrapLng:[-180,180],R:6371e3,distance:function(c,d){var p=Math.PI/180,g=c.lat*p,f=d.lat*p,_=Math.sin((d.lat-c.lat)*p/2),y=Math.sin((d.lng-c.lng)*p/2),v=_*_+Math.cos(g)*Math.cos(f)*y*y,x=2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return this.R*x}}),Si=6378137,Mi={R:Si,MAX_LATITUDE:85.0511287798,project:function(c){var d=Math.PI/180,p=this.MAX_LATITUDE,g=Math.max(Math.min(p,c.lat),-p),f=Math.sin(g*d);return new Point(this.R*c.lng*d,this.R*Math.log((1+f)/(1-f))/2)},unproject:function(c){var d=180/Math.PI;return new LatLng((2*Math.atan(Math.exp(c.y/this.R))-Math.PI/2)*d,c.x*d/this.R)},bounds:function(){var c=Si*Math.PI;return new Bounds([-c,-c],[c,c])}()};function Transformation(c,d,p,g){if(mi(c))return this._a=c[0],this._b=c[1],this._c=c[2],void(this._d=c[3]);this._a=c,this._b=d,this._c=p,this._d=g}function toTransformation(c,d,p,g){return new Transformation(c,d,p,g)}Transformation.prototype={transform:function(c,d){return this._transform(c.clone(),d)},_transform:function(c,d){return d=d||1,c.x=d*(this._a*c.x+this._b),c.y=d*(this._c*c.y+this._d),c},untransform:function(c,d){return d=d||1,new Point((c.x/d-this._b)/this._a,(c.y/d-this._d)/this._c)}};var Ei=extend({},Li,{code:"EPSG:3857",projection:Mi,transformation:function(){var c=.5/(Math.PI*Mi.R);return toTransformation(c,.5,-c,.5)}()}),Ti=extend({},Ei,{code:"EPSG:900913"});function svgCreate(c){return document.createElementNS("http://www.w3.org/2000/svg",c)}function pointsToPath(c,d){var p,g,f,_,y,v,x="";for(p=0,f=c.length;p<f;p++){for(g=0,_=(y=c[p]).length;g<_;g++)x+=(g?"L":"M")+(v=y[g]).x+" "+v.y;x+=d?gn.svg?"z":"x":""}return x||"M0 0"}var ki,Oi=document.documentElement.style,Ii="ActiveXObject"in window,Ai=Ii&&!document.addEventListener,Di="msLaunchUri"in navigator&&!("documentMode"in document),Bi=userAgentContains("webkit"),Fi=userAgentContains("android"),zi=userAgentContains("android 2")||userAgentContains("android 3"),ji=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ni=Fi&&userAgentContains("Google")&&ji<537&&!("AudioNode"in window),Zi=!!window.opera,Wi=!Di&&userAgentContains("chrome"),Ri=userAgentContains("gecko")&&!Bi&&!Zi&&!Ii,Hi=!Wi&&userAgentContains("safari"),Ui=userAgentContains("phantom"),Vi="OTransition"in Oi,Gi=0===navigator.platform.indexOf("Win"),Yi=Ii&&"transition"in Oi,qi="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!zi,Xi="MozPerspective"in Oi,$i=!window.L_DISABLE_3D&&(Yi||qi||Xi)&&!Vi&&!Ui,Ki="undefined"!=typeof orientation||userAgentContains("mobile"),Ji=Ki&&Bi,Qi=Ki&&qi,tn=!window.PointerEvent&&window.MSPointerEvent,en=!(!window.PointerEvent&&!tn),nn="ontouchstart"in window||!!window.TouchEvent,sn=!window.L_NO_TOUCH&&(nn||en),rn=Ki&&Zi,an=Ki&&Ri,ln=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,hn=function(){var c=!1;try{var d=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("testPassiveEventSupport",falseFn,d),window.removeEventListener("testPassiveEventSupport",falseFn,d)}catch(c){}return c}(),cn=!!document.createElement("canvas").getContext,dn=!(!document.createElementNS||!svgCreate("svg").createSVGRect),un=!!dn&&((ki=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(ki.firstChild&&ki.firstChild.namespaceURI)),pn=!dn&&function(){try{var c=document.createElement("div");c.innerHTML='<v:shape adj="1"/>';var d=c.firstChild;return d.style.behavior="url(#default#VML)",d&&"object"==typeof d.adj}catch(c){return!1}}();function userAgentContains(c){return navigator.userAgent.toLowerCase().indexOf(c)>=0}var gn={ie:Ii,ielt9:Ai,edge:Di,webkit:Bi,android:Fi,android23:zi,androidStock:Ni,opera:Zi,chrome:Wi,gecko:Ri,safari:Hi,phantom:Ui,opera12:Vi,win:Gi,ie3d:Yi,webkit3d:qi,gecko3d:Xi,any3d:$i,mobile:Ki,mobileWebkit:Ji,mobileWebkit3d:Qi,msPointer:tn,pointer:en,touch:sn,touchNative:nn,mobileOpera:rn,mobileGecko:an,retina:ln,passiveEvents:hn,canvas:cn,svg:dn,vml:pn,inlineSvg:un,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},mn=gn.msPointer?"MSPointerDown":"pointerdown",fn=gn.msPointer?"MSPointerMove":"pointermove",_n=gn.msPointer?"MSPointerUp":"pointerup",yn=gn.msPointer?"MSPointerCancel":"pointercancel",vn={touchstart:mn,touchmove:fn,touchend:_n,touchcancel:yn},xn={touchstart:function _onPointerStart(c,d){d.MSPOINTER_TYPE_TOUCH&&d.pointerType===d.MSPOINTER_TYPE_TOUCH&&preventDefault(d);_handlePointer(c,d)},touchmove:_handlePointer,touchend:_handlePointer,touchcancel:_handlePointer},Pn={},wn=!1;function addPointerListener(c,d,p){return"touchstart"===d&&function _addPointerDocListener(){wn||(document.addEventListener(mn,_globalPointerDown,!0),document.addEventListener(fn,_globalPointerMove,!0),document.addEventListener(_n,_globalPointerUp,!0),document.addEventListener(yn,_globalPointerUp,!0),wn=!0)}(),xn[d]?(p=xn[d].bind(this,p),c.addEventListener(vn[d],p,!1),p):(console.warn("wrong event specified:",d),falseFn)}function _globalPointerDown(c){Pn[c.pointerId]=c}function _globalPointerMove(c){Pn[c.pointerId]&&(Pn[c.pointerId]=c)}function _globalPointerUp(c){delete Pn[c.pointerId]}function _handlePointer(c,d){if(d.pointerType!==(d.MSPOINTER_TYPE_MOUSE||"mouse")){for(var p in d.touches=[],Pn)d.touches.push(Pn[p]);d.changedTouches=[d],c(d)}}var bn=200;var Cn,Ln,Sn,Mn,En,Tn=testProp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kn=testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),On="webkitTransition"===kn||"OTransition"===kn?kn+"End":"transitionend";function get(c){return"string"==typeof c?document.getElementById(c):c}function getStyle(c,d){var p=c.style[d]||c.currentStyle&&c.currentStyle[d];if((!p||"auto"===p)&&document.defaultView){var g=document.defaultView.getComputedStyle(c,null);p=g?g[d]:null}return"auto"===p?null:p}function create$1(c,d,p){var g=document.createElement(c);return g.className=d||"",p&&p.appendChild(g),g}function remove(c){var d=c.parentNode;d&&d.removeChild(c)}function empty(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function toFront(c){var d=c.parentNode;d&&d.lastChild!==c&&d.appendChild(c)}function toBack(c){var d=c.parentNode;d&&d.firstChild!==c&&d.insertBefore(c,d.firstChild)}function hasClass(c,d){if(void 0!==c.classList)return c.classList.contains(d);var p=getClass(c);return p.length>0&&new RegExp("(^|\\s)"+d+"(\\s|$)").test(p)}function addClass(c,d){if(void 0!==c.classList)for(var p=splitWords(d),g=0,f=p.length;g<f;g++)c.classList.add(p[g]);else if(!hasClass(c,d)){var _=getClass(c);setClass(c,(_?_+" ":"")+d)}}function removeClass(c,d){void 0!==c.classList?c.classList.remove(d):setClass(c,trim((" "+getClass(c)+" ").replace(" "+d+" "," ")))}function setClass(c,d){void 0===c.className.baseVal?c.className=d:c.className.baseVal=d}function getClass(c){return c.correspondingElement&&(c=c.correspondingElement),void 0===c.className.baseVal?c.className:c.className.baseVal}function setOpacity(c,d){"opacity"in c.style?c.style.opacity=d:"filter"in c.style&&function _setOpacityIE(c,d){var p=!1,g="DXImageTransform.Microsoft.Alpha";try{p=c.filters.item(g)}catch(c){if(1===d)return}d=Math.round(100*d),p?(p.Enabled=100!==d,p.Opacity=d):c.style.filter+=" progid:"+g+"(opacity="+d+")"}(c,d)}function testProp(c){for(var d=document.documentElement.style,p=0;p<c.length;p++)if(c[p]in d)return c[p];return!1}function setTransform(c,d,p){var g=d||new Point(0,0);c.style[Tn]=(gn.ie3d?"translate("+g.x+"px,"+g.y+"px)":"translate3d("+g.x+"px,"+g.y+"px,0)")+(p?" scale("+p+")":"")}function setPosition(c,d){c._leaflet_pos=d,gn.any3d?setTransform(c,d):(c.style.left=d.x+"px",c.style.top=d.y+"px")}function getPosition(c){return c._leaflet_pos||new Point(0,0)}if("onselectstart"in document)Cn=function(){on(window,"selectstart",preventDefault)},Ln=function(){off(window,"selectstart",preventDefault)};else{var In=testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Cn=function(){if(In){var c=document.documentElement.style;Sn=c[In],c[In]="none"}},Ln=function(){In&&(document.documentElement.style[In]=Sn,Sn=void 0)}}function disableImageDrag(){on(window,"dragstart",preventDefault)}function enableImageDrag(){off(window,"dragstart",preventDefault)}function preventOutline(c){for(;-1===c.tabIndex;)c=c.parentNode;c.style&&(restoreOutline(),Mn=c,En=c.style.outlineStyle,c.style.outlineStyle="none",on(window,"keydown",restoreOutline))}function restoreOutline(){Mn&&(Mn.style.outlineStyle=En,Mn=void 0,En=void 0,off(window,"keydown",restoreOutline))}function getSizedParentNode(c){do{c=c.parentNode}while(!(c.offsetWidth&&c.offsetHeight||c===document.body));return c}function getScale(c){var d=c.getBoundingClientRect();return{x:d.width/c.offsetWidth||1,y:d.height/c.offsetHeight||1,boundingClientRect:d}}var An={__proto__:null,TRANSFORM:Tn,TRANSITION:kn,TRANSITION_END:On,get:get,getStyle:getStyle,create:create$1,remove:remove,empty:empty,toFront:toFront,toBack:toBack,hasClass:hasClass,addClass:addClass,removeClass:removeClass,setClass:setClass,getClass:getClass,setOpacity:setOpacity,testProp:testProp,setTransform:setTransform,setPosition:setPosition,getPosition:getPosition,get disableTextSelection(){return Cn},get enableTextSelection(){return Ln},disableImageDrag:disableImageDrag,enableImageDrag:enableImageDrag,preventOutline:preventOutline,restoreOutline:restoreOutline,getSizedParentNode:getSizedParentNode,getScale:getScale};function on(c,d,p,g){if(d&&"object"==typeof d)for(var f in d)addOne(c,f,d[f],p);else for(var _=0,y=(d=splitWords(d)).length;_<y;_++)addOne(c,d[_],p,g);return this}var Dn="_leaflet_events";function off(c,d,p,g){if(1===arguments.length)batchRemove(c),delete c[Dn];else if(d&&"object"==typeof d)for(var f in d)removeOne(c,f,d[f],p);else if(d=splitWords(d),2===arguments.length)batchRemove(c,(function(c){return-1!==indexOf(d,c)}));else for(var _=0,y=d.length;_<y;_++)removeOne(c,d[_],p,g);return this}function batchRemove(c,d){for(var p in c[Dn]){var g=p.split(/\d/)[0];d&&!d(g)||removeOne(c,g,null,null,p)}}var Bn={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function addOne(c,d,p,g){var f=d+stamp(p)+(g?"_"+stamp(g):"");if(c[Dn]&&c[Dn][f])return this;var handler=function(d){return p.call(g||c,d||window.event)},_=handler;!gn.touchNative&&gn.pointer&&0===d.indexOf("touch")?handler=addPointerListener(c,d,handler):gn.touch&&"dblclick"===d?handler=function addDoubleTapListener(c,d){c.addEventListener("dblclick",d);var p,g=0;function simDblclick(c){if(1===c.detail){if("mouse"!==c.pointerType&&(!c.sourceCapabilities||c.sourceCapabilities.firesTouchEvents)){var f=getPropagationPath(c);if(!f.some((function(c){return c instanceof HTMLLabelElement&&c.attributes.for}))||f.some((function(c){return c instanceof HTMLInputElement||c instanceof HTMLSelectElement}))){var _=Date.now();_-g<=bn?2==++p&&d(function makeDblclick(c){var d,p,g={};for(p in c)d=c[p],g[p]=d&&d.bind?d.bind(c):d;return c=g,g.type="dblclick",g.detail=2,g.isTrusted=!1,g._simulated=!0,g}(c)):p=1,g=_}}}else p=c.detail}return c.addEventListener("click",simDblclick),{dblclick:d,simDblclick:simDblclick}}(c,handler):"addEventListener"in c?"touchstart"===d||"touchmove"===d||"wheel"===d||"mousewheel"===d?c.addEventListener(Bn[d]||d,handler,!!gn.passiveEvents&&{passive:!1}):"mouseenter"===d||"mouseleave"===d?(handler=function(d){d=d||window.event,isExternalTarget(c,d)&&_(d)},c.addEventListener(Bn[d],handler,!1)):c.addEventListener(d,_,!1):c.attachEvent("on"+d,handler),c[Dn]=c[Dn]||{},c[Dn][f]=handler}function removeOne(c,d,p,g,f){f=f||d+stamp(p)+(g?"_"+stamp(g):"");var _=c[Dn]&&c[Dn][f];if(!_)return this;!gn.touchNative&&gn.pointer&&0===d.indexOf("touch")?function removePointerListener(c,d,p){vn[d]?c.removeEventListener(vn[d],p,!1):console.warn("wrong event specified:",d)}(c,d,_):gn.touch&&"dblclick"===d?function removeDoubleTapListener(c,d){c.removeEventListener("dblclick",d.dblclick),c.removeEventListener("click",d.simDblclick)}(c,_):"removeEventListener"in c?c.removeEventListener(Bn[d]||d,_,!1):c.detachEvent("on"+d,_),c[Dn][f]=null}function stopPropagation(c){return c.stopPropagation?c.stopPropagation():c.originalEvent?c.originalEvent._stopped=!0:c.cancelBubble=!0,this}function disableScrollPropagation(c){return addOne(c,"wheel",stopPropagation),this}function disableClickPropagation(c){return on(c,"mousedown touchstart dblclick contextmenu",stopPropagation),c._leaflet_disable_click=!0,this}function preventDefault(c){return c.preventDefault?c.preventDefault():c.returnValue=!1,this}function stop(c){return preventDefault(c),stopPropagation(c),this}function getPropagationPath(c){if(c.composedPath)return c.composedPath();for(var d=[],p=c.target;p;)d.push(p),p=p.parentNode;return d}function getMousePosition(c,d){if(!d)return new Point(c.clientX,c.clientY);var p=getScale(d),g=p.boundingClientRect;return new Point((c.clientX-g.left)/p.x-d.clientLeft,(c.clientY-g.top)/p.y-d.clientTop)}var Fn=gn.linux&&gn.chrome?window.devicePixelRatio:gn.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function getWheelDelta(c){return gn.edge?c.wheelDeltaY/2:c.deltaY&&0===c.deltaMode?-c.deltaY/Fn:c.deltaY&&1===c.deltaMode?20*-c.deltaY:c.deltaY&&2===c.deltaMode?60*-c.deltaY:c.deltaX||c.deltaZ?0:c.wheelDelta?(c.wheelDeltaY||c.wheelDelta)/2:c.detail&&Math.abs(c.detail)<32765?20*-c.detail:c.detail?c.detail/-32765*60:0}function isExternalTarget(c,d){var p=d.relatedTarget;if(!p)return!0;try{for(;p&&p!==c;)p=p.parentNode}catch(c){return!1}return p!==c}var zn={__proto__:null,on:on,off:off,stopPropagation:stopPropagation,disableScrollPropagation:disableScrollPropagation,disableClickPropagation:disableClickPropagation,preventDefault:preventDefault,stop:stop,getPropagationPath:getPropagationPath,getMousePosition:getMousePosition,getWheelDelta:getWheelDelta,isExternalTarget:isExternalTarget,addListener:on,removeListener:off},jn=wi.extend({run:function(c,d,p,g){this.stop(),this._el=c,this._inProgress=!0,this._duration=p||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=getPosition(c),this._offset=d.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=requestAnimFrame(this._animate,this),this._step()},_step:function(c){var d=+new Date-this._startTime,p=1e3*this._duration;d<p?this._runFrame(this._easeOut(d/p),c):(this._runFrame(1),this._complete())},_runFrame:function(c,d){var p=this._startPos.add(this._offset.multiplyBy(c));d&&p._round(),setPosition(this._el,p),this.fire("step")},_complete:function(){cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(c){return 1-Math.pow(1-c,this._easeOutPower)}}),Nn=wi.extend({options:{crs:Ei,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(c,d){d=setOptions(this,d),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(c),this._initLayout(),this._onResize=bind(this._onResize,this),this._initEvents(),d.maxBounds&&this.setMaxBounds(d.maxBounds),void 0!==d.zoom&&(this._zoom=this._limitZoom(d.zoom)),d.center&&void 0!==d.zoom&&this.setView(toLatLng(d.center),d.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=kn&&gn.any3d&&!gn.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),on(this._proxy,On,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(c,d,p){if((d=void 0===d?this._zoom:this._limitZoom(d),c=this._limitCenter(toLatLng(c),d,this.options.maxBounds),p=p||{},this._stop(),this._loaded&&!p.reset&&!0!==p)&&(void 0!==p.animate&&(p.zoom=extend({animate:p.animate},p.zoom),p.pan=extend({animate:p.animate,duration:p.duration},p.pan)),this._zoom!==d?this._tryAnimatedZoom&&this._tryAnimatedZoom(c,d,p.zoom):this._tryAnimatedPan(c,p.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(c,d,p.pan&&p.pan.noMoveStart),this},setZoom:function(c,d){return this._loaded?this.setView(this.getCenter(),c,{zoom:d}):(this._zoom=c,this)},zoomIn:function(c,d){return c=c||(gn.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+c,d)},zoomOut:function(c,d){return c=c||(gn.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-c,d)},setZoomAround:function(c,d,p){var g=this.getZoomScale(d),f=this.getSize().divideBy(2),_=(c instanceof Point?c:this.latLngToContainerPoint(c)).subtract(f).multiplyBy(1-1/g),y=this.containerPointToLatLng(f.add(_));return this.setView(y,d,{zoom:p})},_getBoundsCenterZoom:function(c,d){d=d||{},c=c.getBounds?c.getBounds():toLatLngBounds(c);var p=toPoint(d.paddingTopLeft||d.padding||[0,0]),g=toPoint(d.paddingBottomRight||d.padding||[0,0]),f=this.getBoundsZoom(c,!1,p.add(g));if((f="number"==typeof d.maxZoom?Math.min(d.maxZoom,f):f)===1/0)return{center:c.getCenter(),zoom:f};var _=g.subtract(p).divideBy(2),y=this.project(c.getSouthWest(),f),v=this.project(c.getNorthEast(),f);return{center:this.unproject(y.add(v).divideBy(2).add(_),f),zoom:f}},fitBounds:function(c,d){if(!(c=toLatLngBounds(c)).isValid())throw new Error("Bounds are not valid.");var p=this._getBoundsCenterZoom(c,d);return this.setView(p.center,p.zoom,d)},fitWorld:function(c){return this.fitBounds([[-90,-180],[90,180]],c)},panTo:function(c,d){return this.setView(c,this._zoom,{pan:d})},panBy:function(c,d){if(d=d||{},!(c=toPoint(c).round()).x&&!c.y)return this.fire("moveend");if(!0!==d.animate&&!this.getSize().contains(c))return this._resetView(this.unproject(this.project(this.getCenter()).add(c)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new jn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),d.noMoveStart||this.fire("movestart"),!1!==d.animate){addClass(this._mapPane,"leaflet-pan-anim");var p=this._getMapPanePos().subtract(c).round();this._panAnim.run(this._mapPane,p,d.duration||.25,d.easeLinearity)}else this._rawPanBy(c),this.fire("move").fire("moveend");return this},flyTo:function(c,d,p){if(!1===(p=p||{}).animate||!gn.any3d)return this.setView(c,d,p);this._stop();var g=this.project(this.getCenter()),f=this.project(c),_=this.getSize(),y=this._zoom;c=toLatLng(c),d=void 0===d?y:d;var v=Math.max(_.x,_.y),x=v*this.getZoomScale(y,d),C=f.distanceTo(g)||1,L=1.42,M=L*L;function r(c){var d=(x*x-v*v+(c?-1:1)*M*M*C*C)/(2*(c?x:v)*M*C),p=Math.sqrt(d*d+1)-d;return p<1e-9?-18:Math.log(p)}function sinh(c){return(Math.exp(c)-Math.exp(-c))/2}function cosh(c){return(Math.exp(c)+Math.exp(-c))/2}var E=r(0);function u(c){return v*(cosh(E)*function tanh(c){return sinh(c)/cosh(c)}(E+L*c)-sinh(E))/M}var T=Date.now(),k=(r(1)-E)/L,O=p.duration?1e3*p.duration:1e3*k*.8;return this._moveStart(!0,p.noMoveStart),function frame(){var p=(Date.now()-T)/O,_=function easeOut(c){return 1-Math.pow(1-c,1.5)}(p)*k;p<=1?(this._flyToFrame=requestAnimFrame(frame,this),this._move(this.unproject(g.add(f.subtract(g).multiplyBy(u(_)/C)),y),this.getScaleZoom(v/function w(c){return v*(cosh(E)/cosh(E+L*c))}(_),y),{flyTo:!0})):this._move(c,d)._moveEnd(!0)}.call(this),this},flyToBounds:function(c,d){var p=this._getBoundsCenterZoom(c,d);return this.flyTo(p.center,p.zoom,d)},setMaxBounds:function(c){return c=toLatLngBounds(c),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),c.isValid()?(this.options.maxBounds=c,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(c){var d=this.options.minZoom;return this.options.minZoom=c,this._loaded&&d!==c&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(c):this},setMaxZoom:function(c){var d=this.options.maxZoom;return this.options.maxZoom=c,this._loaded&&d!==c&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(c):this},panInsideBounds:function(c,d){this._enforcingBounds=!0;var p=this.getCenter(),g=this._limitCenter(p,this._zoom,toLatLngBounds(c));return p.equals(g)||this.panTo(g,d),this._enforcingBounds=!1,this},panInside:function(c,d){var p=toPoint((d=d||{}).paddingTopLeft||d.padding||[0,0]),g=toPoint(d.paddingBottomRight||d.padding||[0,0]),f=this.project(this.getCenter()),_=this.project(c),y=this.getPixelBounds(),v=toBounds([y.min.add(p),y.max.subtract(g)]),x=v.getSize();if(!v.contains(_)){this._enforcingBounds=!0;var C=_.subtract(v.getCenter()),L=v.extend(_).getSize().subtract(x);f.x+=C.x<0?-L.x:L.x,f.y+=C.y<0?-L.y:L.y,this.panTo(this.unproject(f),d),this._enforcingBounds=!1}return this},invalidateSize:function(c){if(!this._loaded)return this;c=extend({animate:!1,pan:!0},!0===c?{animate:!0}:c);var d=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var p=this.getSize(),g=d.divideBy(2).round(),f=p.divideBy(2).round(),_=g.subtract(f);return _.x||_.y?(c.animate&&c.pan?this.panBy(_):(c.pan&&this._rawPanBy(_),this.fire("move"),c.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:d,newSize:p})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(c){if(c=this._locateOptions=extend({timeout:1e4,watch:!1},c),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var d=bind(this._handleGeolocationResponse,this),p=bind(this._handleGeolocationError,this);return c.watch?this._locationWatchId=navigator.geolocation.watchPosition(d,p,c):navigator.geolocation.getCurrentPosition(d,p,c),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(c){if(this._container._leaflet_id){var d=c.code,p=c.message||(1===d?"permission denied":2===d?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:d,message:"Geolocation error: "+p+"."})}},_handleGeolocationResponse:function(c){if(this._container._leaflet_id){var d=new LatLng(c.coords.latitude,c.coords.longitude),p=d.toBounds(2*c.coords.accuracy),g=this._locateOptions;if(g.setView){var f=this.getBoundsZoom(p);this.setView(d,g.maxZoom?Math.min(f,g.maxZoom):f)}var _={latlng:d,bounds:p,timestamp:c.timestamp};for(var y in c.coords)"number"==typeof c.coords[y]&&(_[y]=c.coords[y]);this.fire("locationfound",_)}},addHandler:function(c,d){if(!d)return this;var p=this[c]=new d(this);return this._handlers.push(p),this.options[c]&&p.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(c){this._container._leaflet_id=void 0,this._containerId=void 0}var c;for(c in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),remove(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[c].remove();for(c in this._panes)remove(this._panes[c]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(c,d){var p=create$1("div","leaflet-pane"+(c?" leaflet-"+c.replace("Pane","")+"-pane":""),d||this._mapPane);return c&&(this._panes[c]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var c=this.getPixelBounds();return new LatLngBounds(this.unproject(c.getBottomLeft()),this.unproject(c.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(c,d,p){c=toLatLngBounds(c),p=toPoint(p||[0,0]);var g=this.getZoom()||0,f=this.getMinZoom(),_=this.getMaxZoom(),y=c.getNorthWest(),v=c.getSouthEast(),x=this.getSize().subtract(p),C=toBounds(this.project(v,g),this.project(y,g)).getSize(),L=gn.any3d?this.options.zoomSnap:1,M=x.x/C.x,E=x.y/C.y,T=d?Math.max(M,E):Math.min(M,E);return g=this.getScaleZoom(T,g),L&&(g=Math.round(g/(L/100))*(L/100),g=d?Math.ceil(g/L)*L:Math.floor(g/L)*L),Math.max(f,Math.min(_,g))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new Point(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(c,d){var p=this._getTopLeftPoint(c,d);return new Bounds(p,p.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(c){return this.options.crs.getProjectedBounds(void 0===c?this.getZoom():c)},getPane:function(c){return"string"==typeof c?this._panes[c]:c},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(c,d){var p=this.options.crs;return d=void 0===d?this._zoom:d,p.scale(c)/p.scale(d)},getScaleZoom:function(c,d){var p=this.options.crs;d=void 0===d?this._zoom:d;var g=p.zoom(c*p.scale(d));return isNaN(g)?1/0:g},project:function(c,d){return d=void 0===d?this._zoom:d,this.options.crs.latLngToPoint(toLatLng(c),d)},unproject:function(c,d){return d=void 0===d?this._zoom:d,this.options.crs.pointToLatLng(toPoint(c),d)},layerPointToLatLng:function(c){var d=toPoint(c).add(this.getPixelOrigin());return this.unproject(d)},latLngToLayerPoint:function(c){return this.project(toLatLng(c))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(c){return this.options.crs.wrapLatLng(toLatLng(c))},wrapLatLngBounds:function(c){return this.options.crs.wrapLatLngBounds(toLatLngBounds(c))},distance:function(c,d){return this.options.crs.distance(toLatLng(c),toLatLng(d))},containerPointToLayerPoint:function(c){return toPoint(c).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(c){return toPoint(c).add(this._getMapPanePos())},containerPointToLatLng:function(c){var d=this.containerPointToLayerPoint(toPoint(c));return this.layerPointToLatLng(d)},latLngToContainerPoint:function(c){return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(c)))},mouseEventToContainerPoint:function(c){return getMousePosition(c,this._container)},mouseEventToLayerPoint:function(c){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(c))},mouseEventToLatLng:function(c){return this.layerPointToLatLng(this.mouseEventToLayerPoint(c))},_initContainer:function(c){var d=this._container=get(c);if(!d)throw new Error("Map container not found.");if(d._leaflet_id)throw new Error("Map container is already initialized.");on(d,"scroll",this._onScroll,this),this._containerId=stamp(d)},_initLayout:function(){var c=this._container;this._fadeAnimated=this.options.fadeAnimation&&gn.any3d,addClass(c,"leaflet-container"+(gn.touch?" leaflet-touch":"")+(gn.retina?" leaflet-retina":"")+(gn.ielt9?" leaflet-oldie":"")+(gn.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var d=getStyle(c,"position");"absolute"!==d&&"relative"!==d&&"fixed"!==d&&"sticky"!==d&&(c.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var c=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),setPosition(this._mapPane,new Point(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(addClass(c.markerPane,"leaflet-zoom-hide"),addClass(c.shadowPane,"leaflet-zoom-hide"))},_resetView:function(c,d,p){setPosition(this._mapPane,new Point(0,0));var g=!this._loaded;this._loaded=!0,d=this._limitZoom(d),this.fire("viewprereset");var f=this._zoom!==d;this._moveStart(f,p)._move(c,d)._moveEnd(f),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(c,d){return c&&this.fire("zoomstart"),d||this.fire("movestart"),this},_move:function(c,d,p,g){void 0===d&&(d=this._zoom);var f=this._zoom!==d;return this._zoom=d,this._lastCenter=c,this._pixelOrigin=this._getNewPixelOrigin(c),g?p&&p.pinch&&this.fire("zoom",p):((f||p&&p.pinch)&&this.fire("zoom",p),this.fire("move",p)),this},_moveEnd:function(c){return c&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(c){setPosition(this._mapPane,this._getMapPanePos().subtract(c))},_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(c){this._targets={},this._targets[stamp(this._container)]=this;var d=c?off:on;d(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&d(window,"resize",this._onResize,this),gn.any3d&&this.options.transform3DLimit&&(c?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){cancelAnimFrame(this._resizeRequest),this._resizeRequest=requestAnimFrame((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var c=this._getMapPanePos();Math.max(Math.abs(c.x),Math.abs(c.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(c,d){for(var p,g=[],f="mouseout"===d||"mouseover"===d,_=c.target||c.srcElement,y=!1;_;){if((p=this._targets[stamp(_)])&&("click"===d||"preclick"===d)&&this._draggableMoved(p)){y=!0;break}if(p&&p.listens(d,!0)){if(f&&!isExternalTarget(_,c))break;if(g.push(p),f)break}if(_===this._container)break;_=_.parentNode}return g.length||y||f||!this.listens(d,!0)||(g=[this]),g},_isClickDisabled:function(c){for(;c&&c!==this._container;){if(c._leaflet_disable_click)return!0;c=c.parentNode}},_handleDOMEvent:function(c){var d=c.target||c.srcElement;if(!(!this._loaded||d._leaflet_disable_events||"click"===c.type&&this._isClickDisabled(d))){var p=c.type;"mousedown"===p&&preventOutline(d),this._fireDOMEvent(c,p)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(c,d,p){if("click"===c.type){var g=extend({},c);g.type="preclick",this._fireDOMEvent(g,g.type,p)}var f=this._findEventTargets(c,d);if(p){for(var _=[],y=0;y<p.length;y++)p[y].listens(d,!0)&&_.push(p[y]);f=_.concat(f)}if(f.length){"contextmenu"===d&&preventDefault(c);var v=f[0],x={originalEvent:c};if("keypress"!==c.type&&"keydown"!==c.type&&"keyup"!==c.type){var C=v.getLatLng&&(!v._radius||v._radius<=10);x.containerPoint=C?this.latLngToContainerPoint(v.getLatLng()):this.mouseEventToContainerPoint(c),x.layerPoint=this.containerPointToLayerPoint(x.containerPoint),x.latlng=C?v.getLatLng():this.layerPointToLatLng(x.layerPoint)}for(y=0;y<f.length;y++)if(f[y].fire(d,x,!0),x.originalEvent._stopped||!1===f[y].options.bubblingMouseEvents&&-1!==indexOf(this._mouseEvents,d))return}},_draggableMoved:function(c){return(c=c.dragging&&c.dragging.enabled()?c:this).dragging&&c.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var c=0,d=this._handlers.length;c<d;c++)this._handlers[c].disable()},whenReady:function(c,d){return this._loaded?c.call(d||this,{target:this}):this.on("load",c,d),this},_getMapPanePos:function(){return getPosition(this._mapPane)||new Point(0,0)},_moved:function(){var c=this._getMapPanePos();return c&&!c.equals([0,0])},_getTopLeftPoint:function(c,d){return(c&&void 0!==d?this._getNewPixelOrigin(c,d):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(c,d){var p=this.getSize()._divideBy(2);return this.project(c,d)._subtract(p)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(c,d,p){var g=this._getNewPixelOrigin(p,d);return this.project(c,d)._subtract(g)},_latLngBoundsToNewLayerBounds:function(c,d,p){var g=this._getNewPixelOrigin(p,d);return toBounds([this.project(c.getSouthWest(),d)._subtract(g),this.project(c.getNorthWest(),d)._subtract(g),this.project(c.getSouthEast(),d)._subtract(g),this.project(c.getNorthEast(),d)._subtract(g)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(c){return this.latLngToLayerPoint(c).subtract(this._getCenterLayerPoint())},_limitCenter:function(c,d,p){if(!p)return c;var g=this.project(c,d),f=this.getSize().divideBy(2),_=new Bounds(g.subtract(f),g.add(f)),y=this._getBoundsOffset(_,p,d);return Math.abs(y.x)<=1&&Math.abs(y.y)<=1?c:this.unproject(g.add(y),d)},_limitOffset:function(c,d){if(!d)return c;var p=this.getPixelBounds(),g=new Bounds(p.min.add(c),p.max.add(c));return c.add(this._getBoundsOffset(g,d))},_getBoundsOffset:function(c,d,p){var g=toBounds(this.project(d.getNorthEast(),p),this.project(d.getSouthWest(),p)),f=g.min.subtract(c.min),_=g.max.subtract(c.max);return new Point(this._rebound(f.x,-_.x),this._rebound(f.y,-_.y))},_rebound:function(c,d){return c+d>0?Math.round(c-d)/2:Math.max(0,Math.ceil(c))-Math.max(0,Math.floor(d))},_limitZoom:function(c){var d=this.getMinZoom(),p=this.getMaxZoom(),g=gn.any3d?this.options.zoomSnap:1;return g&&(c=Math.round(c/g)*g),Math.max(d,Math.min(p,c))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(c,d){var p=this._getCenterOffset(c)._trunc();return!(!0!==(d&&d.animate)&&!this.getSize().contains(p))&&(this.panBy(p,d),!0)},_createAnimProxy:function(){var c=this._proxy=create$1("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(c),this.on("zoomanim",(function(c){var d=Tn,p=this._proxy.style[d];setTransform(this._proxy,this.project(c.center,c.zoom),this.getZoomScale(c.zoom,1)),p===this._proxy.style[d]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){remove(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var c=this.getCenter(),d=this.getZoom();setTransform(this._proxy,this.project(c,d),this.getZoomScale(d,1))},_catchTransitionEnd:function(c){this._animatingZoom&&c.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(c,d,p){if(this._animatingZoom)return!0;if(p=p||{},!this._zoomAnimated||!1===p.animate||this._nothingToAnimate()||Math.abs(d-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(d),f=this._getCenterOffset(c)._divideBy(1-1/g);return!(!0!==p.animate&&!this.getSize().contains(f))&&(requestAnimFrame((function(){this._moveStart(!0,p.noMoveStart||!1)._animateZoom(c,d,!0)}),this),!0)},_animateZoom:function(c,d,p,g){this._mapPane&&(p&&(this._animatingZoom=!0,this._animateToCenter=c,this._animateToZoom=d,addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:c,zoom:d,noUpdate:g}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(bind(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&removeClass(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))}});function createMap(c,d){return new Nn(c,d)}var Zn=Class.extend({options:{position:"topright"},initialize:function(c){setOptions(this,c)},getPosition:function(){return this.options.position},setPosition:function(c){var d=this._map;return d&&d.removeControl(this),this.options.position=c,d&&d.addControl(this),this},getContainer:function(){return this._container},addTo:function(c){this.remove(),this._map=c;var d=this._container=this.onAdd(c),p=this.getPosition(),g=c._controlCorners[p];return addClass(d,"leaflet-control"),-1!==p.indexOf("bottom")?g.insertBefore(d,g.firstChild):g.appendChild(d),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(remove(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(c){this._map&&c&&c.screenX>0&&c.screenY>0&&this._map.getContainer().focus()}}),control=function(c){return new Zn(c)};Nn.include({addControl:function(c){return c.addTo(this),this},removeControl:function(c){return c.remove(),this},_initControlPos:function(){var c=this._controlCorners={},d="leaflet-",p=this._controlContainer=create$1("div",d+"control-container",this._container);function createCorner(g,f){var _=d+g+" "+d+f;c[g+f]=create$1("div",_,p)}createCorner("top","left"),createCorner("top","right"),createCorner("bottom","left"),createCorner("bottom","right")},_clearControlPos:function(){for(var c in this._controlCorners)remove(this._controlCorners[c]);remove(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Wn=Zn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(c,d,p,g){return p<g?-1:g<p?1:0}},initialize:function(c,d,p){for(var g in setOptions(this,p),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,c)this._addLayer(c[g],g);for(g in d)this._addLayer(d[g],g,!0)},onAdd:function(c){this._initLayout(),this._update(),this._map=c,c.on("zoomend",this._checkDisabledLayers,this);for(var d=0;d<this._layers.length;d++)this._layers[d].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(c){return Zn.prototype.addTo.call(this,c),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(c,d){return this._addLayer(c,d),this._map?this._update():this},addOverlay:function(c,d){return this._addLayer(c,d,!0),this._map?this._update():this},removeLayer:function(c){c.off("add remove",this._onLayerChange,this);var d=this._getLayer(stamp(c));return d&&this._layers.splice(this._layers.indexOf(d),1),this._map?this._update():this},expand:function(){addClass(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var c=this._map.getSize().y-(this._container.offsetTop+50);return c<this._section.clientHeight?(addClass(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=c+"px"):removeClass(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return removeClass(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var c="leaflet-control-layers",d=this._container=create$1("div",c),p=this.options.collapsed;d.setAttribute("aria-haspopup",!0),disableClickPropagation(d),disableScrollPropagation(d);var g=this._section=create$1("section",c+"-list");p&&(this._map.on("click",this.collapse,this),on(d,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var f=this._layersLink=create$1("a",c+"-toggle",d);f.href="#",f.title="Layers",f.setAttribute("role","button"),on(f,{keydown:function(c){13===c.keyCode&&this._expandSafely()},click:function(c){preventDefault(c),this._expandSafely()}},this),p||this.expand(),this._baseLayersList=create$1("div",c+"-base",g),this._separator=create$1("div",c+"-separator",g),this._overlaysList=create$1("div",c+"-overlays",g),d.appendChild(g)},_getLayer:function(c){for(var d=0;d<this._layers.length;d++)if(this._layers[d]&&stamp(this._layers[d].layer)===c)return this._layers[d]},_addLayer:function(c,d,p){this._map&&c.on("add remove",this._onLayerChange,this),this._layers.push({layer:c,name:d,overlay:p}),this.options.sortLayers&&this._layers.sort(bind((function(c,d){return this.options.sortFunction(c.layer,d.layer,c.name,d.name)}),this)),this.options.autoZIndex&&c.setZIndex&&(this._lastZIndex++,c.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;empty(this._baseLayersList),empty(this._overlaysList),this._layerControlInputs=[];var c,d,p,g,f=0;for(p=0;p<this._layers.length;p++)g=this._layers[p],this._addItem(g),d=d||g.overlay,c=c||!g.overlay,f+=g.overlay?0:1;return this.options.hideSingleBase&&(c=c&&f>1,this._baseLayersList.style.display=c?"":"none"),this._separator.style.display=d&&c?"":"none",this},_onLayerChange:function(c){this._handlingClick||this._update();var d=this._getLayer(stamp(c.target)),p=d.overlay?"add"===c.type?"overlayadd":"overlayremove":"add"===c.type?"baselayerchange":null;p&&this._map.fire(p,d)},_createRadioElement:function(c,d){var p='<input type="radio" class="leaflet-control-layers-selector" name="'+c+'"'+(d?' checked="checked"':"")+"/>",g=document.createElement("div");return g.innerHTML=p,g.firstChild},_addItem:function(c){var d,p=document.createElement("label"),g=this._map.hasLayer(c.layer);c.overlay?((d=document.createElement("input")).type="checkbox",d.className="leaflet-control-layers-selector",d.defaultChecked=g):d=this._createRadioElement("leaflet-base-layers_"+stamp(this),g),this._layerControlInputs.push(d),d.layerId=stamp(c.layer),on(d,"click",this._onInputClick,this);var f=document.createElement("span");f.innerHTML=" "+c.name;var _=document.createElement("span");return p.appendChild(_),_.appendChild(d),_.appendChild(f),(c.overlay?this._overlaysList:this._baseLayersList).appendChild(p),this._checkDisabledLayers(),p},_onInputClick:function(){if(!this._preventClick){var c,d,p=this._layerControlInputs,g=[],f=[];this._handlingClick=!0;for(var _=p.length-1;_>=0;_--)c=p[_],d=this._getLayer(c.layerId).layer,c.checked?g.push(d):c.checked||f.push(d);for(_=0;_<f.length;_++)this._map.hasLayer(f[_])&&this._map.removeLayer(f[_]);for(_=0;_<g.length;_++)this._map.hasLayer(g[_])||this._map.addLayer(g[_]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var c,d,p=this._layerControlInputs,g=this._map.getZoom(),f=p.length-1;f>=0;f--)c=p[f],d=this._getLayer(c.layerId).layer,c.disabled=void 0!==d.options.minZoom&&g<d.options.minZoom||void 0!==d.options.maxZoom&&g>d.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var c=this._section;this._preventClick=!0,on(c,"click",preventDefault),this.expand();var d=this;setTimeout((function(){off(c,"click",preventDefault),d._preventClick=!1}))}}),Rn=Zn.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(c){var d="leaflet-control-zoom",p=create$1("div",d+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,d+"-in",p,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,d+"-out",p,this._zoomOut),this._updateDisabled(),c.on("zoomend zoomlevelschange",this._updateDisabled,this),p},onRemove:function(c){c.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(c){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(c.shiftKey?3:1))},_zoomOut:function(c){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(c.shiftKey?3:1))},_createButton:function(c,d,p,g,f){var _=create$1("a",p,g);return _.innerHTML=c,_.href="#",_.title=d,_.setAttribute("role","button"),_.setAttribute("aria-label",d),disableClickPropagation(_),on(_,"click",stop),on(_,"click",f,this),on(_,"click",this._refocusOnMap,this),_},_updateDisabled:function(){var c=this._map,d="leaflet-disabled";removeClass(this._zoomInButton,d),removeClass(this._zoomOutButton,d),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||c._zoom===c.getMinZoom())&&(addClass(this._zoomOutButton,d),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||c._zoom===c.getMaxZoom())&&(addClass(this._zoomInButton,d),this._zoomInButton.setAttribute("aria-disabled","true"))}});Nn.mergeOptions({zoomControl:!0}),Nn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Rn,this.addControl(this.zoomControl))}));var Hn=Zn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(c){var d="leaflet-control-scale",p=create$1("div",d),g=this.options;return this._addScales(g,d+"-line",p),c.on(g.updateWhenIdle?"moveend":"move",this._update,this),c.whenReady(this._update,this),p},onRemove:function(c){c.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(c,d,p){c.metric&&(this._mScale=create$1("div",d,p)),c.imperial&&(this._iScale=create$1("div",d,p))},_update:function(){var c=this._map,d=c.getSize().y/2,p=c.distance(c.containerPointToLatLng([0,d]),c.containerPointToLatLng([this.options.maxWidth,d]));this._updateScales(p)},_updateScales:function(c){this.options.metric&&c&&this._updateMetric(c),this.options.imperial&&c&&this._updateImperial(c)},_updateMetric:function(c){var d=this._getRoundNum(c),p=d<1e3?d+" m":d/1e3+" km";this._updateScale(this._mScale,p,d/c)},_updateImperial:function(c){var d,p,g,f=3.2808399*c;f>5280?(d=f/5280,p=this._getRoundNum(d),this._updateScale(this._iScale,p+" mi",p/d)):(g=this._getRoundNum(f),this._updateScale(this._iScale,g+" ft",g/f))},_updateScale:function(c,d,p){c.style.width=Math.round(this.options.maxWidth*p)+"px",c.innerHTML=d},_getRoundNum:function(c){var d=Math.pow(10,(Math.floor(c)+"").length-1),p=c/d;return d*(p=p>=10?10:p>=5?5:p>=3?3:p>=2?2:1)}}),Un=Zn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(gn.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(c){setOptions(this,c),this._attributions={}},onAdd:function(c){for(var d in c.attributionControl=this,this._container=create$1("div","leaflet-control-attribution"),disableClickPropagation(this._container),c._layers)c._layers[d].getAttribution&&this.addAttribution(c._layers[d].getAttribution());return this._update(),c.on("layeradd",this._addAttribution,this),this._container},onRemove:function(c){c.off("layeradd",this._addAttribution,this)},_addAttribution:function(c){c.layer.getAttribution&&(this.addAttribution(c.layer.getAttribution()),c.layer.once("remove",(function(){this.removeAttribution(c.layer.getAttribution())}),this))},setPrefix:function(c){return this.options.prefix=c,this._update(),this},addAttribution:function(c){return c?(this._attributions[c]||(this._attributions[c]=0),this._attributions[c]++,this._update(),this):this},removeAttribution:function(c){return c?(this._attributions[c]&&(this._attributions[c]--,this._update()),this):this},_update:function(){if(this._map){var c=[];for(var d in this._attributions)this._attributions[d]&&c.push(d);var p=[];this.options.prefix&&p.push(this.options.prefix),c.length&&p.push(c.join(", ")),this._container.innerHTML=p.join(' <span aria-hidden="true">|</span> ')}}});Nn.mergeOptions({attributionControl:!0}),Nn.addInitHook((function(){this.options.attributionControl&&(new Un).addTo(this)}));Zn.Layers=Wn,Zn.Zoom=Rn,Zn.Scale=Hn,Zn.Attribution=Un,control.layers=function(c,d,p){return new Wn(c,d,p)},control.zoom=function(c){return new Rn(c)},control.scale=function(c){return new Hn(c)},control.attribution=function(c){return new Un(c)};var Vn=Class.extend({initialize:function(c){this._map=c},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}});Vn.addTo=function(c,d){return c.addHandler(d,this),this};var Gn={Events:Pi},Yn=gn.touch?"touchstart mousedown":"mousedown",qn=wi.extend({options:{clickTolerance:3},initialize:function(c,d,p,g){setOptions(this,g),this._element=c,this._dragStartTarget=d||c,this._preventOutline=p},enable:function(){this._enabled||(on(this._dragStartTarget,Yn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(qn._dragging===this&&this.finishDrag(!0),off(this._dragStartTarget,Yn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(c){if(this._enabled&&(this._moved=!1,!hasClass(this._element,"leaflet-zoom-anim")))if(c.touches&&1!==c.touches.length)qn._dragging===this&&this.finishDrag();else if(!(qn._dragging||c.shiftKey||1!==c.which&&1!==c.button&&!c.touches||(qn._dragging=this,this._preventOutline&&preventOutline(this._element),disableImageDrag(),Cn(),this._moving))){this.fire("down");var d=c.touches?c.touches[0]:c,p=getSizedParentNode(this._element);this._startPoint=new Point(d.clientX,d.clientY),this._startPos=getPosition(this._element),this._parentScale=getScale(p);var g="mousedown"===c.type;on(document,g?"mousemove":"touchmove",this._onMove,this),on(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(c){if(this._enabled)if(c.touches&&c.touches.length>1)this._moved=!0;else{var d=c.touches&&1===c.touches.length?c.touches[0]:c,p=new Point(d.clientX,d.clientY)._subtract(this._startPoint);(p.x||p.y)&&(Math.abs(p.x)+Math.abs(p.y)<this.options.clickTolerance||(p.x/=this._parentScale.x,p.y/=this._parentScale.y,preventDefault(c),this._moved||(this.fire("dragstart"),this._moved=!0,addClass(document.body,"leaflet-dragging"),this._lastTarget=c.target||c.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(p),this._moving=!0,this._lastEvent=c,this._updatePosition()))}},_updatePosition:function(){var c={originalEvent:this._lastEvent};this.fire("predrag",c),setPosition(this._element,this._newPos),this.fire("drag",c)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(c){removeClass(document.body,"leaflet-dragging"),this._lastTarget&&(removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),off(document,"mousemove touchmove",this._onMove,this),off(document,"mouseup touchend touchcancel",this._onUp,this),enableImageDrag(),Ln();var d=this._moved&&this._moving;this._moving=!1,qn._dragging=!1,d&&this.fire("dragend",{noInertia:c,distance:this._newPos.distanceTo(this._startPos)})}});function clipPolygon(c,d,p){var g,f,_,y,v,x,C,L,M,E=[1,4,2,8];for(f=0,C=c.length;f<C;f++)c[f]._code=_getBitCode(c[f],d);for(y=0;y<4;y++){for(L=E[y],g=[],f=0,_=(C=c.length)-1;f<C;_=f++)v=c[f],x=c[_],v._code&L?x._code&L||((M=_getEdgeIntersection(x,v,L,d,p))._code=_getBitCode(M,d),g.push(M)):(x._code&L&&((M=_getEdgeIntersection(x,v,L,d,p))._code=_getBitCode(M,d),g.push(M)),g.push(v));c=g}return c}function polygonCenter(c,d){var p,g,f,_,y,v,x,C,L;if(!c||0===c.length)throw new Error("latlngs not passed");isFlat(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var M=toLatLng([0,0]),E=toLatLngBounds(c);E.getNorthWest().distanceTo(E.getSouthWest())*E.getNorthEast().distanceTo(E.getNorthWest())<1700&&(M=centroid(c));var T=c.length,k=[];for(p=0;p<T;p++){var O=toLatLng(c[p]);k.push(d.project(toLatLng([O.lat-M.lat,O.lng-M.lng])))}for(v=x=C=0,p=0,g=T-1;p<T;g=p++)f=k[p],_=k[g],y=f.y*_.x-_.y*f.x,x+=(f.x+_.x)*y,C+=(f.y+_.y)*y,v+=3*y;L=0===v?k[0]:[x/v,C/v];var I=d.unproject(toPoint(L));return toLatLng([I.lat+M.lat,I.lng+M.lng])}function centroid(c){for(var d=0,p=0,g=0,f=0;f<c.length;f++){var _=toLatLng(c[f]);d+=_.lat,p+=_.lng,g++}return toLatLng([d/g,p/g])}var Xn,$n={__proto__:null,clipPolygon:clipPolygon,polygonCenter:polygonCenter,centroid:centroid};function simplify(c,d){if(!d||!c.length)return c.slice();var p=d*d;return c=function _reducePoints(c,d){for(var p=[c[0]],g=1,f=0,_=c.length;g<_;g++)_sqDist(c[g],c[f])>d&&(p.push(c[g]),f=g);f<_-1&&p.push(c[_-1]);return p}(c,p),c=function _simplifyDP(c,d){var p=c.length,g=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(p);g[0]=g[p-1]=1,_simplifyDPStep(c,g,d,0,p-1);var f,_=[];for(f=0;f<p;f++)g[f]&&_.push(c[f]);return _}(c,p),c}function pointToSegmentDistance(c,d,p){return Math.sqrt(_sqClosestPointOnSegment(c,d,p,!0))}function _simplifyDPStep(c,d,p,g,f){var _,y,v,x=0;for(y=g+1;y<=f-1;y++)(v=_sqClosestPointOnSegment(c[y],c[g],c[f],!0))>x&&(_=y,x=v);x>p&&(d[_]=1,_simplifyDPStep(c,d,p,g,_),_simplifyDPStep(c,d,p,_,f))}function clipSegment(c,d,p,g,f){var _,y,v,x=g?Xn:_getBitCode(c,p),C=_getBitCode(d,p);for(Xn=C;;){if(!(x|C))return[c,d];if(x&C)return!1;v=_getBitCode(y=_getEdgeIntersection(c,d,_=x||C,p,f),p),_===x?(c=y,x=v):(d=y,C=v)}}function _getEdgeIntersection(c,d,p,g,f){var _,y,v=d.x-c.x,x=d.y-c.y,C=g.min,L=g.max;return 8&p?(_=c.x+v*(L.y-c.y)/x,y=L.y):4&p?(_=c.x+v*(C.y-c.y)/x,y=C.y):2&p?(_=L.x,y=c.y+x*(L.x-c.x)/v):1&p&&(_=C.x,y=c.y+x*(C.x-c.x)/v),new Point(_,y,f)}function _getBitCode(c,d){var p=0;return c.x<d.min.x?p|=1:c.x>d.max.x&&(p|=2),c.y<d.min.y?p|=4:c.y>d.max.y&&(p|=8),p}function _sqDist(c,d){var p=d.x-c.x,g=d.y-c.y;return p*p+g*g}function _sqClosestPointOnSegment(c,d,p,g){var f,_=d.x,y=d.y,v=p.x-_,x=p.y-y,C=v*v+x*x;return C>0&&((f=((c.x-_)*v+(c.y-y)*x)/C)>1?(_=p.x,y=p.y):f>0&&(_+=v*f,y+=x*f)),v=c.x-_,x=c.y-y,g?v*v+x*x:new Point(_,y)}function isFlat(c){return!mi(c[0])||"object"!=typeof c[0][0]&&void 0!==c[0][0]}function _flat(c){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),isFlat(c)}function polylineCenter(c,d){var p,g,f,_,y,v,x,C;if(!c||0===c.length)throw new Error("latlngs not passed");isFlat(c)||(console.warn("latlngs are not flat! Only the first ring will be used"),c=c[0]);var L=toLatLng([0,0]),M=toLatLngBounds(c);M.getNorthWest().distanceTo(M.getSouthWest())*M.getNorthEast().distanceTo(M.getNorthWest())<1700&&(L=centroid(c));var E=c.length,T=[];for(p=0;p<E;p++){var k=toLatLng(c[p]);T.push(d.project(toLatLng([k.lat-L.lat,k.lng-L.lng])))}for(p=0,g=0;p<E-1;p++)g+=T[p].distanceTo(T[p+1])/2;if(0===g)C=T[0];else for(p=0,_=0;p<E-1;p++)if(y=T[p],v=T[p+1],(_+=f=y.distanceTo(v))>g){x=(_-g)/f,C=[v.x-x*(v.x-y.x),v.y-x*(v.y-y.y)];break}var O=d.unproject(toPoint(C));return toLatLng([O.lat+L.lat,O.lng+L.lng])}var Kn={__proto__:null,simplify:simplify,pointToSegmentDistance:pointToSegmentDistance,closestPointOnSegment:function closestPointOnSegment(c,d,p){return _sqClosestPointOnSegment(c,d,p)},clipSegment:clipSegment,_getEdgeIntersection:_getEdgeIntersection,_getBitCode:_getBitCode,_sqClosestPointOnSegment:_sqClosestPointOnSegment,isFlat:isFlat,_flat:_flat,polylineCenter:polylineCenter},Jn={project:function(c){return new Point(c.lng,c.lat)},unproject:function(c){return new LatLng(c.y,c.x)},bounds:new Bounds([-180,-90],[180,90])},Qn={R:6378137,R_MINOR:6356752.314245179,bounds:new Bounds([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(c){var d=Math.PI/180,p=this.R,g=c.lat*d,f=this.R_MINOR/p,_=Math.sqrt(1-f*f),y=_*Math.sin(g),v=Math.tan(Math.PI/4-g/2)/Math.pow((1-y)/(1+y),_/2);return g=-p*Math.log(Math.max(v,1e-10)),new Point(c.lng*d*p,g)},unproject:function(c){for(var d,p=180/Math.PI,g=this.R,f=this.R_MINOR/g,_=Math.sqrt(1-f*f),y=Math.exp(-c.y/g),v=Math.PI/2-2*Math.atan(y),x=0,C=.1;x<15&&Math.abs(C)>1e-7;x++)d=_*Math.sin(v),d=Math.pow((1-d)/(1+d),_/2),v+=C=Math.PI/2-2*Math.atan(y*d)-v;return new LatLng(v*p,c.x*p/g)}},to={__proto__:null,LonLat:Jn,Mercator:Qn,SphericalMercator:Mi},eo=extend({},Li,{code:"EPSG:3395",projection:Qn,transformation:function(){var c=.5/(Math.PI*Qn.R);return toTransformation(c,.5,-c,.5)}()}),io=extend({},Li,{code:"EPSG:4326",projection:Jn,transformation:toTransformation(1/180,1,-1/180,.5)}),no=extend({},Ci,{projection:Jn,transformation:toTransformation(1,0,-1,0),scale:function(c){return Math.pow(2,c)},zoom:function(c){return Math.log(c)/Math.LN2},distance:function(c,d){var p=d.lng-c.lng,g=d.lat-c.lat;return Math.sqrt(p*p+g*g)},infinite:!0});Ci.Earth=Li,Ci.EPSG3395=eo,Ci.EPSG3857=Ei,Ci.EPSG900913=Ti,Ci.EPSG4326=io,Ci.Simple=no;var oo=wi.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(c){return c.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(c){return c&&c.removeLayer(this),this},getPane:function(c){return this._map.getPane(c?this.options[c]||c:this.options.pane)},addInteractiveTarget:function(c){return this._map._targets[stamp(c)]=this,this},removeInteractiveTarget:function(c){return delete this._map._targets[stamp(c)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(c){var d=c.target;if(d.hasLayer(this)){if(this._map=d,this._zoomAnimated=d._zoomAnimated,this.getEvents){var p=this.getEvents();d.on(p,this),this.once("remove",(function(){d.off(p,this)}),this)}this.onAdd(d),this.fire("add"),d.fire("layeradd",{layer:this})}}});Nn.include({addLayer:function(c){if(!c._layerAdd)throw new Error("The provided object is not a Layer.");var d=stamp(c);return this._layers[d]||(this._layers[d]=c,c._mapToAdd=this,c.beforeAdd&&c.beforeAdd(this),this.whenReady(c._layerAdd,c)),this},removeLayer:function(c){var d=stamp(c);return this._layers[d]?(this._loaded&&c.onRemove(this),delete this._layers[d],this._loaded&&(this.fire("layerremove",{layer:c}),c.fire("remove")),c._map=c._mapToAdd=null,this):this},hasLayer:function(c){return stamp(c)in this._layers},eachLayer:function(c,d){for(var p in this._layers)c.call(d,this._layers[p]);return this},_addLayers:function(c){for(var d=0,p=(c=c?mi(c)?c:[c]:[]).length;d<p;d++)this.addLayer(c[d])},_addZoomLimit:function(c){isNaN(c.options.maxZoom)&&isNaN(c.options.minZoom)||(this._zoomBoundLayers[stamp(c)]=c,this._updateZoomLevels())},_removeZoomLimit:function(c){var d=stamp(c);this._zoomBoundLayers[d]&&(delete this._zoomBoundLayers[d],this._updateZoomLevels())},_updateZoomLevels:function(){var c=1/0,d=-1/0,p=this._getZoomSpan();for(var g in this._zoomBoundLayers){var f=this._zoomBoundLayers[g].options;c=void 0===f.minZoom?c:Math.min(c,f.minZoom),d=void 0===f.maxZoom?d:Math.max(d,f.maxZoom)}this._layersMaxZoom=d===-1/0?void 0:d,this._layersMinZoom=c===1/0?void 0:c,p!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var so=oo.extend({initialize:function(c,d){var p,g;if(setOptions(this,d),this._layers={},c)for(p=0,g=c.length;p<g;p++)this.addLayer(c[p])},addLayer:function(c){var d=this.getLayerId(c);return this._layers[d]=c,this._map&&this._map.addLayer(c),this},removeLayer:function(c){var d=c in this._layers?c:this.getLayerId(c);return this._map&&this._layers[d]&&this._map.removeLayer(this._layers[d]),delete this._layers[d],this},hasLayer:function(c){return("number"==typeof c?c:this.getLayerId(c))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(c){var d,p,g=Array.prototype.slice.call(arguments,1);for(d in this._layers)(p=this._layers[d])[c]&&p[c].apply(p,g);return this},onAdd:function(c){this.eachLayer(c.addLayer,c)},onRemove:function(c){this.eachLayer(c.removeLayer,c)},eachLayer:function(c,d){for(var p in this._layers)c.call(d,this._layers[p]);return this},getLayer:function(c){return this._layers[c]},getLayers:function(){var c=[];return this.eachLayer(c.push,c),c},setZIndex:function(c){return this.invoke("setZIndex",c)},getLayerId:function(c){return stamp(c)}}),ro=so.extend({addLayer:function(c){return this.hasLayer(c)?this:(c.addEventParent(this),so.prototype.addLayer.call(this,c),this.fire("layeradd",{layer:c}))},removeLayer:function(c){return this.hasLayer(c)?(c in this._layers&&(c=this._layers[c]),c.removeEventParent(this),so.prototype.removeLayer.call(this,c),this.fire("layerremove",{layer:c})):this},setStyle:function(c){return this.invoke("setStyle",c)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var c=new LatLngBounds;for(var d in this._layers){var p=this._layers[d];c.extend(p.getBounds?p.getBounds():p.getLatLng())}return c}}),ao=Class.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(c){setOptions(this,c)},createIcon:function(c){return this._createIcon("icon",c)},createShadow:function(c){return this._createIcon("shadow",c)},_createIcon:function(c,d){var p=this._getIconUrl(c);if(!p){if("icon"===c)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var g=this._createImg(p,d&&"IMG"===d.tagName?d:null);return this._setIconStyles(g,c),(this.options.crossOrigin||""===this.options.crossOrigin)&&(g.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),g},_setIconStyles:function(c,d){var p=this.options,g=p[d+"Size"];"number"==typeof g&&(g=[g,g]);var f=toPoint(g),_=toPoint("shadow"===d&&p.shadowAnchor||p.iconAnchor||f&&f.divideBy(2,!0));c.className="leaflet-marker-"+d+" "+(p.className||""),_&&(c.style.marginLeft=-_.x+"px",c.style.marginTop=-_.y+"px"),f&&(c.style.width=f.x+"px",c.style.height=f.y+"px")},_createImg:function(c,d){return(d=d||document.createElement("img")).src=c,d},_getIconUrl:function(c){return gn.retina&&this.options[c+"RetinaUrl"]||this.options[c+"Url"]}});var lo=ao.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(c){return"string"!=typeof lo.imagePath&&(lo.imagePath=this._detectIconPath()),(this.options.imagePath||lo.imagePath)+ao.prototype._getIconUrl.call(this,c)},_stripUrl:function(c){var strip=function(c,d,p){var g=d.exec(c);return g&&g[p]};return(c=strip(c,/^url\((['"])?(.+)\1\)$/,2))&&strip(c,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var c=create$1("div","leaflet-default-icon-path",document.body),d=getStyle(c,"background-image")||getStyle(c,"backgroundImage");if(document.body.removeChild(c),d=this._stripUrl(d))return d;var p=document.querySelector('link[href$="leaflet.css"]');return p?p.href.substring(0,p.href.length-11-1):""}}),ho=Vn.extend({initialize:function(c){this._marker=c},addHooks:function(){var c=this._marker._icon;this._draggable||(this._draggable=new qn(c,c,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),addClass(c,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(c){var d=this._marker,p=d._map,g=this._marker.options.autoPanSpeed,f=this._marker.options.autoPanPadding,_=getPosition(d._icon),y=p.getPixelBounds(),v=p.getPixelOrigin(),x=toBounds(y.min._subtract(v).add(f),y.max._subtract(v).subtract(f));if(!x.contains(_)){var C=toPoint((Math.max(x.max.x,_.x)-x.max.x)/(y.max.x-x.max.x)-(Math.min(x.min.x,_.x)-x.min.x)/(y.min.x-x.min.x),(Math.max(x.max.y,_.y)-x.max.y)/(y.max.y-x.max.y)-(Math.min(x.min.y,_.y)-x.min.y)/(y.min.y-x.min.y)).multiplyBy(g);p.panBy(C,{animate:!1}),this._draggable._newPos._add(C),this._draggable._startPos._add(C),setPosition(d._icon,this._draggable._newPos),this._onDrag(c),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,c))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(c){this._marker.options.autoPan&&(cancelAnimFrame(this._panRequest),this._panRequest=requestAnimFrame(this._adjustPan.bind(this,c)))},_onDrag:function(c){var d=this._marker,p=d._shadow,g=getPosition(d._icon),f=d._map.layerPointToLatLng(g);p&&setPosition(p,g),d._latlng=f,c.latlng=f,c.oldLatLng=this._oldLatLng,d.fire("move",c).fire("drag",c)},_onDragEnd:function(c){cancelAnimFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",c)}}),co=oo.extend({options:{icon:new lo,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(c,d){setOptions(this,d),this._latlng=toLatLng(c)},onAdd:function(c){this._zoomAnimated=this._zoomAnimated&&c.options.markerZoomAnimation,this._zoomAnimated&&c.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(c){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&c.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(c){var d=this._latlng;return this._latlng=toLatLng(c),this.update(),this.fire("move",{oldLatLng:d,latlng:this._latlng})},setZIndexOffset:function(c){return this.options.zIndexOffset=c,this.update()},getIcon:function(){return this.options.icon},setIcon:function(c){return this.options.icon=c,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var c=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(c)}return this},_initIcon:function(){var c=this.options,d="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),p=c.icon.createIcon(this._icon),g=!1;p!==this._icon&&(this._icon&&this._removeIcon(),g=!0,c.title&&(p.title=c.title),"IMG"===p.tagName&&(p.alt=c.alt||"")),addClass(p,d),c.keyboard&&(p.tabIndex="0",p.setAttribute("role","button")),this._icon=p,c.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&on(p,"focus",this._panOnFocus,this);var f=c.icon.createShadow(this._shadow),_=!1;f!==this._shadow&&(this._removeShadow(),_=!0),f&&(addClass(f,d),f.alt=""),this._shadow=f,c.opacity<1&&this._updateOpacity(),g&&this.getPane().appendChild(this._icon),this._initInteraction(),f&&_&&this.getPane(c.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&off(this._icon,"focus",this._panOnFocus,this),remove(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&remove(this._shadow),this._shadow=null},_setPos:function(c){this._icon&&setPosition(this._icon,c),this._shadow&&setPosition(this._shadow,c),this._zIndex=c.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(c){this._icon&&(this._icon.style.zIndex=this._zIndex+c)},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center).round();this._setPos(d)},_initInteraction:function(){if(this.options.interactive&&(addClass(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ho)){var c=this.options.draggable;this.dragging&&(c=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ho(this),c&&this.dragging.enable()}},setOpacity:function(c){return this.options.opacity=c,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var c=this.options.opacity;this._icon&&setOpacity(this._icon,c),this._shadow&&setOpacity(this._shadow,c)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var c=this._map;if(c){var d=this.options.icon.options,p=d.iconSize?toPoint(d.iconSize):toPoint(0,0),g=d.iconAnchor?toPoint(d.iconAnchor):toPoint(0,0);c.panInside(this._latlng,{paddingTopLeft:g,paddingBottomRight:p.subtract(g)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function marker(c,d){return new co(c,d)}var uo=oo.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(c){this._renderer=c.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(c){return setOptions(this,c),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&c&&Object.prototype.hasOwnProperty.call(c,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),po=uo.extend({options:{fill:!0,radius:10},initialize:function(c,d){setOptions(this,d),this._latlng=toLatLng(c),this._radius=this.options.radius},setLatLng:function(c){var d=this._latlng;return this._latlng=toLatLng(c),this.redraw(),this.fire("move",{oldLatLng:d,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(c){return this.options.radius=this._radius=c,this.redraw()},getRadius:function(){return this._radius},setStyle:function(c){var d=c&&c.radius||this._radius;return uo.prototype.setStyle.call(this,c),this.setRadius(d),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var c=this._radius,d=this._radiusY||c,p=this._clickTolerance(),g=[c+p,d+p];this._pxBounds=new Bounds(this._point.subtract(g),this._point.add(g))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(c){return c.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var go=po.extend({initialize:function(c,d,p){if("number"==typeof d&&(d=extend({},p,{radius:d})),setOptions(this,d),this._latlng=toLatLng(c),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(c){return this._mRadius=c,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var c=[this._radius,this._radiusY||this._radius];return new LatLngBounds(this._map.layerPointToLatLng(this._point.subtract(c)),this._map.layerPointToLatLng(this._point.add(c)))},setStyle:uo.prototype.setStyle,_project:function(){var c=this._latlng.lng,d=this._latlng.lat,p=this._map,g=p.options.crs;if(g.distance===Li.distance){var f=Math.PI/180,_=this._mRadius/Li.R/f,y=p.project([d+_,c]),v=p.project([d-_,c]),x=y.add(v).divideBy(2),C=p.unproject(x).lat,L=Math.acos((Math.cos(_*f)-Math.sin(d*f)*Math.sin(C*f))/(Math.cos(d*f)*Math.cos(C*f)))/f;(isNaN(L)||0===L)&&(L=_/Math.cos(Math.PI/180*d)),this._point=x.subtract(p.getPixelOrigin()),this._radius=isNaN(L)?0:x.x-p.project([C,c-L]).x,this._radiusY=x.y-y.y}else{var M=g.unproject(g.project(this._latlng).subtract([this._mRadius,0]));this._point=p.latLngToLayerPoint(this._latlng),this._radius=this._point.x-p.latLngToLayerPoint(M).x}this._updateBounds()}});var mo=uo.extend({options:{smoothFactor:1,noClip:!1},initialize:function(c,d){setOptions(this,d),this._setLatLngs(c)},getLatLngs:function(){return this._latlngs},setLatLngs:function(c){return this._setLatLngs(c),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(c){for(var d,p,g=1/0,f=null,_=_sqClosestPointOnSegment,y=0,v=this._parts.length;y<v;y++)for(var x=this._parts[y],C=1,L=x.length;C<L;C++){var M=_(c,d=x[C-1],p=x[C],!0);M<g&&(g=M,f=_(c,d,p))}return f&&(f.distance=Math.sqrt(g)),f},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polylineCenter(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(c,d){return d=d||this._defaultShape(),c=toLatLng(c),d.push(c),this._bounds.extend(c),this.redraw()},_setLatLngs:function(c){this._bounds=new LatLngBounds,this._latlngs=this._convertLatLngs(c)},_defaultShape:function(){return isFlat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(c){for(var d=[],p=isFlat(c),g=0,f=c.length;g<f;g++)p?(d[g]=toLatLng(c[g]),this._bounds.extend(d[g])):d[g]=this._convertLatLngs(c[g]);return d},_project:function(){var c=new Bounds;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,c),this._bounds.isValid()&&c.isValid()&&(this._rawPxBounds=c,this._updateBounds())},_updateBounds:function(){var c=this._clickTolerance(),d=new Point(c,c);this._rawPxBounds&&(this._pxBounds=new Bounds([this._rawPxBounds.min.subtract(d),this._rawPxBounds.max.add(d)]))},_projectLatlngs:function(c,d,p){var g,f,_=c[0]instanceof LatLng,y=c.length;if(_){for(f=[],g=0;g<y;g++)f[g]=this._map.latLngToLayerPoint(c[g]),p.extend(f[g]);d.push(f)}else for(g=0;g<y;g++)this._projectLatlngs(c[g],d,p)},_clipPoints:function(){var c=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(c))if(this.options.noClip)this._parts=this._rings;else{var d,p,g,f,_,y,v,x=this._parts;for(d=0,g=0,f=this._rings.length;d<f;d++)for(p=0,_=(v=this._rings[d]).length;p<_-1;p++)(y=clipSegment(v[p],v[p+1],c,p,!0))&&(x[g]=x[g]||[],x[g].push(y[0]),y[1]===v[p+1]&&p!==_-2||(x[g].push(y[1]),g++))}},_simplifyPoints:function(){for(var c=this._parts,d=this.options.smoothFactor,p=0,g=c.length;p<g;p++)c[p]=simplify(c[p],d)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(c,d){var p,g,f,_,y,v,x=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(p=0,_=this._parts.length;p<_;p++)for(g=0,f=(y=(v=this._parts[p]).length)-1;g<y;f=g++)if((d||0!==g)&&pointToSegmentDistance(c,v[f],v[g])<=x)return!0;return!1}});mo._flat=_flat;var fo=mo.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return polygonCenter(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(c){var d=mo.prototype._convertLatLngs.call(this,c),p=d.length;return p>=2&&d[0]instanceof LatLng&&d[0].equals(d[p-1])&&d.pop(),d},_setLatLngs:function(c){mo.prototype._setLatLngs.call(this,c),isFlat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return isFlat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var c=this._renderer._bounds,d=this.options.weight,p=new Point(d,d);if(c=new Bounds(c.min.subtract(p),c.max.add(p)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(c))if(this.options.noClip)this._parts=this._rings;else for(var g,f=0,_=this._rings.length;f<_;f++)(g=clipPolygon(this._rings[f],c,!0)).length&&this._parts.push(g)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(c){var d,p,g,f,_,y,v,x,C=!1;if(!this._pxBounds||!this._pxBounds.contains(c))return!1;for(f=0,v=this._parts.length;f<v;f++)for(_=0,y=(x=(d=this._parts[f]).length)-1;_<x;y=_++)p=d[_],g=d[y],p.y>c.y!=g.y>c.y&&c.x<(g.x-p.x)*(c.y-p.y)/(g.y-p.y)+p.x&&(C=!C);return C||mo.prototype._containsPoint.call(this,c,!0)}});var _o=ro.extend({initialize:function(c,d){setOptions(this,d),this._layers={},c&&this.addData(c)},addData:function(c){var d,p,g,f=mi(c)?c:c.features;if(f){for(d=0,p=f.length;d<p;d++)((g=f[d]).geometries||g.geometry||g.features||g.coordinates)&&this.addData(g);return this}var _=this.options;if(_.filter&&!_.filter(c))return this;var y=geometryToLayer(c,_);return y?(y.feature=asFeature(c),y.defaultOptions=y.options,this.resetStyle(y),_.onEachFeature&&_.onEachFeature(c,y),this.addLayer(y)):this},resetStyle:function(c){return void 0===c?this.eachLayer(this.resetStyle,this):(c.options=extend({},c.defaultOptions),this._setLayerStyle(c,this.options.style),this)},setStyle:function(c){return this.eachLayer((function(d){this._setLayerStyle(d,c)}),this)},_setLayerStyle:function(c,d){c.setStyle&&("function"==typeof d&&(d=d(c.feature)),c.setStyle(d))}});function geometryToLayer(c,d){var p,g,f,_,y="Feature"===c.type?c.geometry:c,v=y?y.coordinates:null,x=[],C=d&&d.pointToLayer,L=d&&d.coordsToLatLng||coordsToLatLng;if(!v&&!y)return null;switch(y.type){case"Point":return _pointToLayer(C,c,p=L(v),d);case"MultiPoint":for(f=0,_=v.length;f<_;f++)p=L(v[f]),x.push(_pointToLayer(C,c,p,d));return new ro(x);case"LineString":case"MultiLineString":return g=coordsToLatLngs(v,"LineString"===y.type?0:1,L),new mo(g,d);case"Polygon":case"MultiPolygon":return g=coordsToLatLngs(v,"Polygon"===y.type?1:2,L),new fo(g,d);case"GeometryCollection":for(f=0,_=y.geometries.length;f<_;f++){var M=geometryToLayer({geometry:y.geometries[f],type:"Feature",properties:c.properties},d);M&&x.push(M)}return new ro(x);case"FeatureCollection":for(f=0,_=y.features.length;f<_;f++){var E=geometryToLayer(y.features[f],d);E&&x.push(E)}return new ro(x);default:throw new Error("Invalid GeoJSON object.")}}function _pointToLayer(c,d,p,g){return c?c(d,p):new co(p,g&&g.markersInheritOptions&&g)}function coordsToLatLng(c){return new LatLng(c[1],c[0],c[2])}function coordsToLatLngs(c,d,p){for(var g,f=[],_=0,y=c.length;_<y;_++)g=d?coordsToLatLngs(c[_],d-1,p):(p||coordsToLatLng)(c[_]),f.push(g);return f}function latLngToCoords(c,d){return void 0!==(c=toLatLng(c)).alt?[formatNum(c.lng,d),formatNum(c.lat,d),formatNum(c.alt,d)]:[formatNum(c.lng,d),formatNum(c.lat,d)]}function latLngsToCoords(c,d,p,g){for(var f=[],_=0,y=c.length;_<y;_++)f.push(d?latLngsToCoords(c[_],isFlat(c[_])?0:d-1,p,g):latLngToCoords(c[_],g));return!d&&p&&f.length>0&&f.push(f[0].slice()),f}function getFeature(c,d){return c.feature?extend({},c.feature,{geometry:d}):asFeature(d)}function asFeature(c){return"Feature"===c.type||"FeatureCollection"===c.type?c:{type:"Feature",properties:{},geometry:c}}var yo={toGeoJSON:function(c){return getFeature(this,{type:"Point",coordinates:latLngToCoords(this.getLatLng(),c)})}};function geoJSON(c,d){return new _o(c,d)}co.include(yo),go.include(yo),po.include(yo),mo.include({toGeoJSON:function(c){var d=!isFlat(this._latlngs);return getFeature(this,{type:(d?"Multi":"")+"LineString",coordinates:latLngsToCoords(this._latlngs,d?1:0,!1,c)})}}),fo.include({toGeoJSON:function(c){var d=!isFlat(this._latlngs),p=d&&!isFlat(this._latlngs[0]),g=latLngsToCoords(this._latlngs,p?2:d?1:0,!0,c);return d||(g=[g]),getFeature(this,{type:(p?"Multi":"")+"Polygon",coordinates:g})}}),so.include({toMultiPoint:function(c){var d=[];return this.eachLayer((function(p){d.push(p.toGeoJSON(c).geometry.coordinates)})),getFeature(this,{type:"MultiPoint",coordinates:d})},toGeoJSON:function(c){var d=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===d)return this.toMultiPoint(c);var p="GeometryCollection"===d,g=[];return this.eachLayer((function(d){if(d.toGeoJSON){var f=d.toGeoJSON(c);if(p)g.push(f.geometry);else{var _=asFeature(f);"FeatureCollection"===_.type?g.push.apply(g,_.features):g.push(_)}}})),p?getFeature(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});var vo=geoJSON,xo=oo.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(c,d,p){this._url=c,this._bounds=toLatLngBounds(d),setOptions(this,p)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(addClass(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(c){return this.options.opacity=c,this._image&&this._updateOpacity(),this},setStyle:function(c){return c.opacity&&this.setOpacity(c.opacity),this},bringToFront:function(){return this._map&&toFront(this._image),this},bringToBack:function(){return this._map&&toBack(this._image),this},setUrl:function(c){return this._url=c,this._image&&(this._image.src=c),this},setBounds:function(c){return this._bounds=toLatLngBounds(c),this._map&&this._reset(),this},getEvents:function(){var c={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var c="IMG"===this._url.tagName,d=this._image=c?this._url:create$1("img");addClass(d,"leaflet-image-layer"),this._zoomAnimated&&addClass(d,"leaflet-zoom-animated"),this.options.className&&addClass(d,this.options.className),d.onselectstart=falseFn,d.onmousemove=falseFn,d.onload=bind(this.fire,this,"load"),d.onerror=bind(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(d.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),c?this._url=d.src:(d.src=this._url,d.alt=this.options.alt)},_animateZoom:function(c){var d=this._map.getZoomScale(c.zoom),p=this._map._latLngBoundsToNewLayerBounds(this._bounds,c.zoom,c.center).min;setTransform(this._image,p,d)},_reset:function(){var c=this._image,d=new Bounds(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),p=d.getSize();setPosition(c,d.min),c.style.width=p.x+"px",c.style.height=p.y+"px"},_updateOpacity:function(){setOpacity(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var c=this.options.errorOverlayUrl;c&&this._url!==c&&(this._url=c,this._image.src=c)},getCenter:function(){return this._bounds.getCenter()}}),Po=xo.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var c="VIDEO"===this._url.tagName,d=this._image=c?this._url:create$1("video");if(addClass(d,"leaflet-image-layer"),this._zoomAnimated&&addClass(d,"leaflet-zoom-animated"),this.options.className&&addClass(d,this.options.className),d.onselectstart=falseFn,d.onmousemove=falseFn,d.onloadeddata=bind(this.fire,this,"load"),c){for(var p=d.getElementsByTagName("source"),g=[],f=0;f<p.length;f++)g.push(p[f].src);this._url=p.length>0?g:[d.src]}else{mi(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(d.style,"objectFit")&&(d.style.objectFit="fill"),d.autoplay=!!this.options.autoplay,d.loop=!!this.options.loop,d.muted=!!this.options.muted,d.playsInline=!!this.options.playsInline;for(var _=0;_<this._url.length;_++){var y=create$1("source");y.src=this._url[_],d.appendChild(y)}}}});var wo=xo.extend({_initImage:function(){var c=this._image=this._url;addClass(c,"leaflet-image-layer"),this._zoomAnimated&&addClass(c,"leaflet-zoom-animated"),this.options.className&&addClass(c,this.options.className),c.onselectstart=falseFn,c.onmousemove=falseFn}});var bo=oo.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(c,d){c&&(c instanceof LatLng||mi(c))?(this._latlng=toLatLng(c),setOptions(this,d)):(setOptions(this,c),this._source=d),this.options.content&&(this._content=this.options.content)},openOn:function(c){return(c=arguments.length?c:this._source._map).hasLayer(this)||c.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(c){return this._map?this.close():(arguments.length?this._source=c:c=this._source,this._prepareOpen(),this.openOn(c._map)),this},onAdd:function(c){this._zoomAnimated=c._zoomAnimated,this._container||this._initLayout(),c._fadeAnimated&&setOpacity(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),c._fadeAnimated&&setOpacity(this._container,1),this.bringToFront(),this.options.interactive&&(addClass(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(c){c._fadeAnimated?(setOpacity(this._container,0),this._removeTimeout=setTimeout(bind(remove,void 0,this._container),200)):remove(this._container),this.options.interactive&&(removeClass(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(c){return this._latlng=toLatLng(c),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(c){return this._content=c,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var c={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&toFront(this._container),this},bringToBack:function(){return this._map&&toBack(this._container),this},_prepareOpen:function(c){var d=this._source;if(!d._map)return!1;if(d instanceof ro){d=null;var p=this._source._layers;for(var g in p)if(p[g]._map){d=p[g];break}if(!d)return!1;this._source=d}if(!c)if(d.getCenter)c=d.getCenter();else if(d.getLatLng)c=d.getLatLng();else{if(!d.getBounds)throw new Error("Unable to get source layer LatLng.");c=d.getBounds().getCenter()}return this.setLatLng(c),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var c=this._contentNode,d="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof d)c.innerHTML=d;else{for(;c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(d)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var c=this._map.latLngToLayerPoint(this._latlng),d=toPoint(this.options.offset),p=this._getAnchor();this._zoomAnimated?setPosition(this._container,c.add(p)):d=d.add(c).add(p);var g=this._containerBottom=-d.y,f=this._containerLeft=-Math.round(this._containerWidth/2)+d.x;this._container.style.bottom=g+"px",this._container.style.left=f+"px"}},_getAnchor:function(){return[0,0]}});Nn.include({_initOverlay:function(c,d,p,g){var f=d;return f instanceof c||(f=new c(g).setContent(d)),p&&f.setLatLng(p),f}}),oo.include({_initOverlay:function(c,d,p,g){var f=p;return f instanceof c?(setOptions(f,g),f._source=this):(f=d&&!g?d:new c(g,this)).setContent(p),f}});var Co=bo.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(c){return!(c=arguments.length?c:this._source._map).hasLayer(this)&&c._popup&&c._popup.options.autoClose&&c.removeLayer(c._popup),c._popup=this,bo.prototype.openOn.call(this,c)},onAdd:function(c){bo.prototype.onAdd.call(this,c),c.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof uo||this._source.on("preclick",stopPropagation))},onRemove:function(c){bo.prototype.onRemove.call(this,c),c.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof uo||this._source.off("preclick",stopPropagation))},getEvents:function(){var c=bo.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(c.preclick=this.close),this.options.keepInView&&(c.moveend=this._adjustPan),c},_initLayout:function(){var c="leaflet-popup",d=this._container=create$1("div",c+" "+(this.options.className||"")+" leaflet-zoom-animated"),p=this._wrapper=create$1("div",c+"-content-wrapper",d);if(this._contentNode=create$1("div",c+"-content",p),disableClickPropagation(d),disableScrollPropagation(this._contentNode),on(d,"contextmenu",stopPropagation),this._tipContainer=create$1("div",c+"-tip-container",d),this._tip=create$1("div",c+"-tip",this._tipContainer),this.options.closeButton){var g=this._closeButton=create$1("a",c+"-close-button",d);g.setAttribute("role","button"),g.setAttribute("aria-label","Close popup"),g.href="#close",g.innerHTML='<span aria-hidden="true">&#215;</span>',on(g,"click",(function(c){preventDefault(c),this.close()}),this)}},_updateLayout:function(){var c=this._contentNode,d=c.style;d.width="",d.whiteSpace="nowrap";var p=c.offsetWidth;p=Math.min(p,this.options.maxWidth),p=Math.max(p,this.options.minWidth),d.width=p+1+"px",d.whiteSpace="",d.height="";var g=c.offsetHeight,f=this.options.maxHeight,_="leaflet-popup-scrolled";f&&g>f?(d.height=f+"px",addClass(c,_)):removeClass(c,_),this._containerWidth=this._container.offsetWidth},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center),p=this._getAnchor();setPosition(this._container,d.add(p))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var c=this._map,d=parseInt(getStyle(this._container,"marginBottom"),10)||0,p=this._container.offsetHeight+d,g=this._containerWidth,f=new Point(this._containerLeft,-p-this._containerBottom);f._add(getPosition(this._container));var _=c.layerPointToContainerPoint(f),y=toPoint(this.options.autoPanPadding),v=toPoint(this.options.autoPanPaddingTopLeft||y),x=toPoint(this.options.autoPanPaddingBottomRight||y),C=c.getSize(),L=0,M=0;_.x+g+x.x>C.x&&(L=_.x+g-C.x+x.x),_.x-L-v.x<0&&(L=_.x-v.x),_.y+p+x.y>C.y&&(M=_.y+p-C.y+x.y),_.y-M-v.y<0&&(M=_.y-v.y),(L||M)&&(this.options.keepInView&&(this._autopanning=!0),c.fire("autopanstart").panBy([L,M]))}},_getAnchor:function(){return toPoint(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Nn.mergeOptions({closePopupOnClick:!0}),Nn.include({openPopup:function(c,d,p){return this._initOverlay(Co,c,d,p).openOn(this),this},closePopup:function(c){return(c=arguments.length?c:this._popup)&&c.close(),this}}),oo.include({bindPopup:function(c,d){return this._popup=this._initOverlay(Co,this._popup,c,d),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(c){return this._popup&&(this instanceof ro||(this._popup._source=this),this._popup._prepareOpen(c||this._latlng)&&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(c){return this._popup&&this._popup.setContent(c),this},getPopup:function(){return this._popup},_openPopup:function(c){if(this._popup&&this._map){stop(c);var d=c.layer||c.target;this._popup._source!==d||d instanceof uo?(this._popup._source=d,this.openPopup(c.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(c.latlng)}},_movePopup:function(c){this._popup.setLatLng(c.latlng)},_onKeyPress:function(c){13===c.originalEvent.keyCode&&this._openPopup(c)}});var Lo=bo.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(c){bo.prototype.onAdd.call(this,c),this.setOpacity(this.options.opacity),c.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(c){bo.prototype.onRemove.call(this,c),c.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var c=bo.prototype.getEvents.call(this);return this.options.permanent||(c.preclick=this.close),c},_initLayout:function(){var c="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=create$1("div",c),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+stamp(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(c){var d,p,g=this._map,f=this._container,_=g.latLngToContainerPoint(g.getCenter()),y=g.layerPointToContainerPoint(c),v=this.options.direction,x=f.offsetWidth,C=f.offsetHeight,L=toPoint(this.options.offset),M=this._getAnchor();"top"===v?(d=x/2,p=C):"bottom"===v?(d=x/2,p=0):"center"===v?(d=x/2,p=C/2):"right"===v?(d=0,p=C/2):"left"===v?(d=x,p=C/2):y.x<_.x?(v="right",d=0,p=C/2):(v="left",d=x+2*(L.x+M.x),p=C/2),c=c.subtract(toPoint(d,p,!0)).add(L).add(M),removeClass(f,"leaflet-tooltip-right"),removeClass(f,"leaflet-tooltip-left"),removeClass(f,"leaflet-tooltip-top"),removeClass(f,"leaflet-tooltip-bottom"),addClass(f,"leaflet-tooltip-"+v),setPosition(f,c)},_updatePosition:function(){var c=this._map.latLngToLayerPoint(this._latlng);this._setPosition(c)},setOpacity:function(c){this.options.opacity=c,this._container&&setOpacity(this._container,c)},_animateZoom:function(c){var d=this._map._latLngToNewLayerPoint(this._latlng,c.zoom,c.center);this._setPosition(d)},_getAnchor:function(){return toPoint(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Nn.include({openTooltip:function(c,d,p){return this._initOverlay(Lo,c,d,p).openOn(this),this},closeTooltip:function(c){return c.close(),this}}),oo.include({bindTooltip:function(c,d){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Lo,this._tooltip,c,d),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(c){if(c||!this._tooltipHandlersAdded){var d=c?"off":"on",p={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?p.add=this._openTooltip:(p.mouseover=this._openTooltip,p.mouseout=this.closeTooltip,p.click=this._openTooltip,this._map?this._addFocusListeners():p.add=this._addFocusListeners),this._tooltip.options.sticky&&(p.mousemove=this._moveTooltip),this[d](p),this._tooltipHandlersAdded=!c}},openTooltip:function(c){return this._tooltip&&(this instanceof ro||(this._tooltip._source=this),this._tooltip._prepareOpen(c)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(c){return this._tooltip&&this._tooltip.setContent(c),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(c){var d="function"==typeof c.getElement&&c.getElement();d&&(on(d,"focus",(function(){this._tooltip._source=c,this.openTooltip()}),this),on(d,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(c){var d="function"==typeof c.getElement&&c.getElement();d&&d.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(c){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var d=this;this._map.once("moveend",(function(){d._openOnceFlag=!1,d._openTooltip(c)}))}else this._tooltip._source=c.layer||c.target,this.openTooltip(this._tooltip.options.sticky?c.latlng:void 0)},_moveTooltip:function(c){var d,p,g=c.latlng;this._tooltip.options.sticky&&c.originalEvent&&(d=this._map.mouseEventToContainerPoint(c.originalEvent),p=this._map.containerPointToLayerPoint(d),g=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(g)}});var So=ao.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(c){var d=c&&"DIV"===c.tagName?c:document.createElement("div"),p=this.options;if(p.html instanceof Element?(empty(d),d.appendChild(p.html)):d.innerHTML=!1!==p.html?p.html:"",p.bgPos){var g=toPoint(p.bgPos);d.style.backgroundPosition=-g.x+"px "+-g.y+"px"}return this._setIconStyles(d,"icon"),d},createShadow:function(){return null}});function divIcon(c){return new So(c)}ao.Default=lo;var Mo=oo.extend({options:{tileSize:256,opacity:1,updateWhenIdle:gn.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(c){setOptions(this,c)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(c){c._addZoomLimit(this)},onRemove:function(c){this._removeAllTiles(),remove(this._container),c._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(c){return this.options.opacity=c,this._updateOpacity(),this},setZIndex:function(c){return this.options.zIndex=c,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var c=this._clampZoom(this._map.getZoom());c!==this._tileZoom&&(this._tileZoom=c,this._updateLevels()),this._update()}return this},getEvents:function(){var c={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=throttle(this._onMoveEnd,this.options.updateInterval,this)),c.move=this._onMove),this._zoomAnimated&&(c.zoomanim=this._animateZoom),c},createTile:function(){return document.createElement("div")},getTileSize:function(){var c=this.options.tileSize;return c instanceof Point?c:new Point(c,c)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(c){for(var d,p=this.getPane().children,g=-c(-1/0,1/0),f=0,_=p.length;f<_;f++)d=p[f].style.zIndex,p[f]!==this._container&&d&&(g=c(g,+d));isFinite(g)&&(this.options.zIndex=g+c(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!gn.ielt9){setOpacity(this._container,this.options.opacity);var c=+new Date,d=!1,p=!1;for(var g in this._tiles){var f=this._tiles[g];if(f.current&&f.loaded){var _=Math.min(1,(c-f.loaded)/200);setOpacity(f.el,_),_<1?d=!0:(f.active?p=!0:this._onOpaqueTile(f),f.active=!0)}}p&&!this._noPrune&&this._pruneTiles(),d&&(cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this))}},_onOpaqueTile:falseFn,_initContainer:function(){this._container||(this._container=create$1("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var c=this._tileZoom,d=this.options.maxZoom;if(void 0!==c){for(var p in this._levels)p=Number(p),this._levels[p].el.children.length||p===c?(this._levels[p].el.style.zIndex=d-Math.abs(c-p),this._onUpdateLevel(p)):(remove(this._levels[p].el),this._removeTilesAtZoom(p),this._onRemoveLevel(p),delete this._levels[p]);var g=this._levels[c],f=this._map;return g||((g=this._levels[c]={}).el=create$1("div","leaflet-tile-container leaflet-zoom-animated",this._container),g.el.style.zIndex=d,g.origin=f.project(f.unproject(f.getPixelOrigin()),c).round(),g.zoom=c,this._setZoomTransform(g,f.getCenter(),f.getZoom()),g.el.offsetWidth,this._onCreateLevel(g)),this._level=g,g}},_onUpdateLevel:falseFn,_onRemoveLevel:falseFn,_onCreateLevel:falseFn,_pruneTiles:function(){if(this._map){var c,d,p=this._map.getZoom();if(p>this.options.maxZoom||p<this.options.minZoom)this._removeAllTiles();else{for(c in this._tiles)(d=this._tiles[c]).retain=d.current;for(c in this._tiles)if((d=this._tiles[c]).current&&!d.active){var g=d.coords;this._retainParent(g.x,g.y,g.z,g.z-5)||this._retainChildren(g.x,g.y,g.z,g.z+2)}for(c in this._tiles)this._tiles[c].retain||this._removeTile(c)}}},_removeTilesAtZoom:function(c){for(var d in this._tiles)this._tiles[d].coords.z===c&&this._removeTile(d)},_removeAllTiles:function(){for(var c in this._tiles)this._removeTile(c)},_invalidateAll:function(){for(var c in this._levels)remove(this._levels[c].el),this._onRemoveLevel(Number(c)),delete this._levels[c];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(c,d,p,g){var f=Math.floor(c/2),_=Math.floor(d/2),y=p-1,v=new Point(+f,+_);v.z=+y;var x=this._tileCoordsToKey(v),C=this._tiles[x];return C&&C.active?(C.retain=!0,!0):(C&&C.loaded&&(C.retain=!0),y>g&&this._retainParent(f,_,y,g))},_retainChildren:function(c,d,p,g){for(var f=2*c;f<2*c+2;f++)for(var _=2*d;_<2*d+2;_++){var y=new Point(f,_);y.z=p+1;var v=this._tileCoordsToKey(y),x=this._tiles[v];x&&x.active?x.retain=!0:(x&&x.loaded&&(x.retain=!0),p+1<g&&this._retainChildren(f,_,p+1,g))}},_resetView:function(c){var d=c&&(c.pinch||c.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),d,d)},_animateZoom:function(c){this._setView(c.center,c.zoom,!0,c.noUpdate)},_clampZoom:function(c){var d=this.options;return void 0!==d.minNativeZoom&&c<d.minNativeZoom?d.minNativeZoom:void 0!==d.maxNativeZoom&&d.maxNativeZoom<c?d.maxNativeZoom:c},_setView:function(c,d,p,g){var f=Math.round(d);f=void 0!==this.options.maxZoom&&f>this.options.maxZoom||void 0!==this.options.minZoom&&f<this.options.minZoom?void 0:this._clampZoom(f);var _=this.options.updateWhenZooming&&f!==this._tileZoom;g&&!_||(this._tileZoom=f,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==f&&this._update(c),p||this._pruneTiles(),this._noPrune=!!p),this._setZoomTransforms(c,d)},_setZoomTransforms:function(c,d){for(var p in this._levels)this._setZoomTransform(this._levels[p],c,d)},_setZoomTransform:function(c,d,p){var g=this._map.getZoomScale(p,c.zoom),f=c.origin.multiplyBy(g).subtract(this._map._getNewPixelOrigin(d,p)).round();gn.any3d?setTransform(c.el,f,g):setPosition(c.el,f)},_resetGrid:function(){var c=this._map,d=c.options.crs,p=this._tileSize=this.getTileSize(),g=this._tileZoom,f=this._map.getPixelWorldBounds(this._tileZoom);f&&(this._globalTileRange=this._pxBoundsToTileRange(f)),this._wrapX=d.wrapLng&&!this.options.noWrap&&[Math.floor(c.project([0,d.wrapLng[0]],g).x/p.x),Math.ceil(c.project([0,d.wrapLng[1]],g).x/p.y)],this._wrapY=d.wrapLat&&!this.options.noWrap&&[Math.floor(c.project([d.wrapLat[0],0],g).y/p.x),Math.ceil(c.project([d.wrapLat[1],0],g).y/p.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(c){var d=this._map,p=d._animatingZoom?Math.max(d._animateToZoom,d.getZoom()):d.getZoom(),g=d.getZoomScale(p,this._tileZoom),f=d.project(c,this._tileZoom).floor(),_=d.getSize().divideBy(2*g);return new Bounds(f.subtract(_),f.add(_))},_update:function(c){var d=this._map;if(d){var p=this._clampZoom(d.getZoom());if(void 0===c&&(c=d.getCenter()),void 0!==this._tileZoom){var g=this._getTiledPixelBounds(c),f=this._pxBoundsToTileRange(g),_=f.getCenter(),y=[],v=this.options.keepBuffer,x=new Bounds(f.getBottomLeft().subtract([v,-v]),f.getTopRight().add([v,-v]));if(!(isFinite(f.min.x)&&isFinite(f.min.y)&&isFinite(f.max.x)&&isFinite(f.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var C in this._tiles){var L=this._tiles[C].coords;L.z===this._tileZoom&&x.contains(new Point(L.x,L.y))||(this._tiles[C].current=!1)}if(Math.abs(p-this._tileZoom)>1)this._setView(c,p);else{for(var M=f.min.y;M<=f.max.y;M++)for(var E=f.min.x;E<=f.max.x;E++){var T=new Point(E,M);if(T.z=this._tileZoom,this._isValidTile(T)){var k=this._tiles[this._tileCoordsToKey(T)];k?k.current=!0:y.push(T)}}if(y.sort((function(c,d){return c.distanceTo(_)-d.distanceTo(_)})),0!==y.length){this._loading||(this._loading=!0,this.fire("loading"));var O=document.createDocumentFragment();for(E=0;E<y.length;E++)this._addTile(y[E],O);this._level.el.appendChild(O)}}}}},_isValidTile:function(c){var d=this._map.options.crs;if(!d.infinite){var p=this._globalTileRange;if(!d.wrapLng&&(c.x<p.min.x||c.x>p.max.x)||!d.wrapLat&&(c.y<p.min.y||c.y>p.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(c);return toLatLngBounds(this.options.bounds).overlaps(g)},_keyToBounds:function(c){return this._tileCoordsToBounds(this._keyToTileCoords(c))},_tileCoordsToNwSe:function(c){var d=this._map,p=this.getTileSize(),g=c.scaleBy(p),f=g.add(p);return[d.unproject(g,c.z),d.unproject(f,c.z)]},_tileCoordsToBounds:function(c){var d=this._tileCoordsToNwSe(c),p=new LatLngBounds(d[0],d[1]);return this.options.noWrap||(p=this._map.wrapLatLngBounds(p)),p},_tileCoordsToKey:function(c){return c.x+":"+c.y+":"+c.z},_keyToTileCoords:function(c){var d=c.split(":"),p=new Point(+d[0],+d[1]);return p.z=+d[2],p},_removeTile:function(c){var d=this._tiles[c];d&&(remove(d.el),delete this._tiles[c],this.fire("tileunload",{tile:d.el,coords:this._keyToTileCoords(c)}))},_initTile:function(c){addClass(c,"leaflet-tile");var d=this.getTileSize();c.style.width=d.x+"px",c.style.height=d.y+"px",c.onselectstart=falseFn,c.onmousemove=falseFn,gn.ielt9&&this.options.opacity<1&&setOpacity(c,this.options.opacity)},_addTile:function(c,d){var p=this._getTilePos(c),g=this._tileCoordsToKey(c),f=this.createTile(this._wrapCoords(c),bind(this._tileReady,this,c));this._initTile(f),this.createTile.length<2&&requestAnimFrame(bind(this._tileReady,this,c,null,f)),setPosition(f,p),this._tiles[g]={el:f,coords:c,current:!0},d.appendChild(f),this.fire("tileloadstart",{tile:f,coords:c})},_tileReady:function(c,d,p){d&&this.fire("tileerror",{error:d,tile:p,coords:c});var g=this._tileCoordsToKey(c);(p=this._tiles[g])&&(p.loaded=+new Date,this._map._fadeAnimated?(setOpacity(p.el,0),cancelAnimFrame(this._fadeFrame),this._fadeFrame=requestAnimFrame(this._updateOpacity,this)):(p.active=!0,this._pruneTiles()),d||(addClass(p.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:p.el,coords:c})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),gn.ielt9||!this._map._fadeAnimated?requestAnimFrame(this._pruneTiles,this):setTimeout(bind(this._pruneTiles,this),250)))},_getTilePos:function(c){return c.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(c){var d=new Point(this._wrapX?wrapNum(c.x,this._wrapX):c.x,this._wrapY?wrapNum(c.y,this._wrapY):c.y);return d.z=c.z,d},_pxBoundsToTileRange:function(c){var d=this.getTileSize();return new Bounds(c.min.unscaleBy(d).floor(),c.max.unscaleBy(d).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var c in this._tiles)if(!this._tiles[c].loaded)return!1;return!0}});var Eo=Mo.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(c,d){this._url=c,(d=setOptions(this,d)).detectRetina&&gn.retina&&d.maxZoom>0?(d.tileSize=Math.floor(d.tileSize/2),d.zoomReverse?(d.zoomOffset--,d.minZoom=Math.min(d.maxZoom,d.minZoom+1)):(d.zoomOffset++,d.maxZoom=Math.max(d.minZoom,d.maxZoom-1)),d.minZoom=Math.max(0,d.minZoom)):d.zoomReverse?d.minZoom=Math.min(d.maxZoom,d.minZoom):d.maxZoom=Math.max(d.minZoom,d.maxZoom),"string"==typeof d.subdomains&&(d.subdomains=d.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(c,d){return this._url===c&&void 0===d&&(d=!0),this._url=c,d||this.redraw(),this},createTile:function(c,d){var p=document.createElement("img");return on(p,"load",bind(this._tileOnLoad,this,d,p)),on(p,"error",bind(this._tileOnError,this,d,p)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(p.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(p.referrerPolicy=this.options.referrerPolicy),p.alt="",p.src=this.getTileUrl(c),p},getTileUrl:function(c){var d={r:gn.retina?"@2x":"",s:this._getSubdomain(c),x:c.x,y:c.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var p=this._globalTileRange.max.y-c.y;this.options.tms&&(d.y=p),d["-y"]=p}return template(this._url,extend(d,this.options))},_tileOnLoad:function(c,d){gn.ielt9?setTimeout(bind(c,this,null,d),0):c(null,d)},_tileOnError:function(c,d,p){var g=this.options.errorTileUrl;g&&d.getAttribute("src")!==g&&(d.src=g),c(p,d)},_onTileRemove:function(c){c.tile.onload=null},_getZoomForUrl:function(){var c=this._tileZoom,d=this.options.maxZoom;return this.options.zoomReverse&&(c=d-c),c+this.options.zoomOffset},_getSubdomain:function(c){var d=Math.abs(c.x+c.y)%this.options.subdomains.length;return this.options.subdomains[d]},_abortLoading:function(){var c,d;for(c in this._tiles)if(this._tiles[c].coords.z!==this._tileZoom&&((d=this._tiles[c].el).onload=falseFn,d.onerror=falseFn,!d.complete)){d.src=fi;var p=this._tiles[c].coords;remove(d),delete this._tiles[c],this.fire("tileabort",{tile:d,coords:p})}},_removeTile:function(c){var d=this._tiles[c];if(d)return d.el.setAttribute("src",fi),Mo.prototype._removeTile.call(this,c)},_tileReady:function(c,d,p){if(this._map&&(!p||p.getAttribute("src")!==fi))return Mo.prototype._tileReady.call(this,c,d,p)}});function tileLayer(c,d){return new Eo(c,d)}var To=Eo.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(c,d){this._url=c;var p=extend({},this.defaultWmsParams);for(var g in d)g in this.options||(p[g]=d[g]);var f=(d=setOptions(this,d)).detectRetina&&gn.retina?2:1,_=this.getTileSize();p.width=_.x*f,p.height=_.y*f,this.wmsParams=p},onAdd:function(c){this._crs=this.options.crs||c.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var d=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[d]=this._crs.code,Eo.prototype.onAdd.call(this,c)},getTileUrl:function(c){var d=this._tileCoordsToNwSe(c),p=this._crs,g=toBounds(p.project(d[0]),p.project(d[1])),f=g.min,_=g.max,y=(this._wmsVersion>=1.3&&this._crs===io?[f.y,f.x,_.y,_.x]:[f.x,f.y,_.x,_.y]).join(","),v=Eo.prototype.getTileUrl.call(this,c);return v+getParamString(this.wmsParams,v,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+y},setParams:function(c,d){return extend(this.wmsParams,c),d||this.redraw(),this}});Eo.WMS=To,tileLayer.wms=function tileLayerWMS(c,d){return new To(c,d)};var ko=oo.extend({options:{padding:.1},initialize:function(c){setOptions(this,c),stamp(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),addClass(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 c={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(c.zoomanim=this._onAnimZoom),c},_onAnimZoom:function(c){this._updateTransform(c.center,c.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(c,d){var p=this._map.getZoomScale(d,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),f=this._map.project(this._center,d),_=g.multiplyBy(-p).add(f).subtract(this._map._getNewPixelOrigin(c,d));gn.any3d?setTransform(this._container,_,p):setPosition(this._container,_)},_reset:function(){for(var c in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[c]._reset()},_onZoomEnd:function(){for(var c in this._layers)this._layers[c]._project()},_updatePaths:function(){for(var c in this._layers)this._layers[c]._update()},_update:function(){var c=this.options.padding,d=this._map.getSize(),p=this._map.containerPointToLayerPoint(d.multiplyBy(-c)).round();this._bounds=new Bounds(p,p.add(d.multiplyBy(1+2*c)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Oo=ko.extend({options:{tolerance:0},getEvents:function(){var c=ko.prototype.getEvents.call(this);return c.viewprereset=this._onViewPreReset,c},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ko.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var c=this._container=document.createElement("canvas");on(c,"mousemove",this._onMouseMove,this),on(c,"click dblclick mousedown mouseup contextmenu",this._onClick,this),on(c,"mouseout",this._handleMouseOut,this),c._leaflet_disable_events=!0,this._ctx=c.getContext("2d")},_destroyContainer:function(){cancelAnimFrame(this._redrawRequest),delete this._ctx,remove(this._container),off(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var c in this._redrawBounds=null,this._layers)this._layers[c]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ko.prototype._update.call(this);var c=this._bounds,d=this._container,p=c.getSize(),g=gn.retina?2:1;setPosition(d,c.min),d.width=g*p.x,d.height=g*p.y,d.style.width=p.x+"px",d.style.height=p.y+"px",gn.retina&&this._ctx.scale(2,2),this._ctx.translate(-c.min.x,-c.min.y),this.fire("update")}},_reset:function(){ko.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(c){this._updateDashArray(c),this._layers[stamp(c)]=c;var d=c._order={layer:c,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=d),this._drawLast=d,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(c){this._requestRedraw(c)},_removePath:function(c){var d=c._order,p=d.next,g=d.prev;p?p.prev=g:this._drawLast=g,g?g.next=p:this._drawFirst=p,delete c._order,delete this._layers[stamp(c)],this._requestRedraw(c)},_updatePath:function(c){this._extendRedrawBounds(c),c._project(),c._update(),this._requestRedraw(c)},_updateStyle:function(c){this._updateDashArray(c),this._requestRedraw(c)},_updateDashArray:function(c){if("string"==typeof c.options.dashArray){var d,p,g=c.options.dashArray.split(/[, ]+/),f=[];for(p=0;p<g.length;p++){if(d=Number(g[p]),isNaN(d))return;f.push(d)}c.options._dashArray=f}else c.options._dashArray=c.options.dashArray},_requestRedraw:function(c){this._map&&(this._extendRedrawBounds(c),this._redrawRequest=this._redrawRequest||requestAnimFrame(this._redraw,this))},_extendRedrawBounds:function(c){if(c._pxBounds){var d=(c.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Bounds,this._redrawBounds.extend(c._pxBounds.min.subtract([d,d])),this._redrawBounds.extend(c._pxBounds.max.add([d,d]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var c=this._redrawBounds;if(c){var d=c.getSize();this._ctx.clearRect(c.min.x,c.min.y,d.x,d.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var c,d=this._redrawBounds;if(this._ctx.save(),d){var p=d.getSize();this._ctx.beginPath(),this._ctx.rect(d.min.x,d.min.y,p.x,p.y),this._ctx.clip()}this._drawing=!0;for(var g=this._drawFirst;g;g=g.next)c=g.layer,(!d||c._pxBounds&&c._pxBounds.intersects(d))&&c._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(c,d){if(this._drawing){var p,g,f,_,y=c._parts,v=y.length,x=this._ctx;if(v){for(x.beginPath(),p=0;p<v;p++){for(g=0,f=y[p].length;g<f;g++)_=y[p][g],x[g?"lineTo":"moveTo"](_.x,_.y);d&&x.closePath()}this._fillStroke(x,c)}}},_updateCircle:function(c){if(this._drawing&&!c._empty()){var d=c._point,p=this._ctx,g=Math.max(Math.round(c._radius),1),f=(Math.max(Math.round(c._radiusY),1)||g)/g;1!==f&&(p.save(),p.scale(1,f)),p.beginPath(),p.arc(d.x,d.y/f,g,0,2*Math.PI,!1),1!==f&&p.restore(),this._fillStroke(p,c)}},_fillStroke:function(c,d){var p=d.options;p.fill&&(c.globalAlpha=p.fillOpacity,c.fillStyle=p.fillColor||p.color,c.fill(p.fillRule||"evenodd")),p.stroke&&0!==p.weight&&(c.setLineDash&&c.setLineDash(d.options&&d.options._dashArray||[]),c.globalAlpha=p.opacity,c.lineWidth=p.weight,c.strokeStyle=p.color,c.lineCap=p.lineCap,c.lineJoin=p.lineJoin,c.stroke())},_onClick:function(c){for(var d,p,g=this._map.mouseEventToLayerPoint(c),f=this._drawFirst;f;f=f.next)(d=f.layer).options.interactive&&d._containsPoint(g)&&("click"!==c.type&&"preclick"!==c.type||!this._map._draggableMoved(d))&&(p=d);this._fireEvent(!!p&&[p],c)},_onMouseMove:function(c){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var d=this._map.mouseEventToLayerPoint(c);this._handleMouseHover(c,d)}},_handleMouseOut:function(c){var d=this._hoveredLayer;d&&(removeClass(this._container,"leaflet-interactive"),this._fireEvent([d],c,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(c,d){if(!this._mouseHoverThrottled){for(var p,g,f=this._drawFirst;f;f=f.next)(p=f.layer).options.interactive&&p._containsPoint(d)&&(g=p);g!==this._hoveredLayer&&(this._handleMouseOut(c),g&&(addClass(this._container,"leaflet-interactive"),this._fireEvent([g],c,"mouseover"),this._hoveredLayer=g)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],c),this._mouseHoverThrottled=!0,setTimeout(bind((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(c,d,p){this._map._fireDOMEvent(d,p||d.type,c)},_bringToFront:function(c){var d=c._order;if(d){var p=d.next,g=d.prev;p&&(p.prev=g,g?g.next=p:p&&(this._drawFirst=p),d.prev=this._drawLast,this._drawLast.next=d,d.next=null,this._drawLast=d,this._requestRedraw(c))}},_bringToBack:function(c){var d=c._order;if(d){var p=d.next,g=d.prev;g&&(g.next=p,p?p.prev=g:g&&(this._drawLast=g),d.prev=null,d.next=this._drawFirst,this._drawFirst.prev=d,this._drawFirst=d,this._requestRedraw(c))}}});function canvas(c){return gn.canvas?new Oo(c):null}var Io=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(c){return document.createElement("<lvml:"+c+' class="lvml">')}}catch(c){}return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Ao={_initContainer:function(){this._container=create$1("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ko.prototype._update.call(this),this.fire("update"))},_initPath:function(c){var d=c._container=Io("shape");addClass(d,"leaflet-vml-shape "+(this.options.className||"")),d.coordsize="1 1",c._path=Io("path"),d.appendChild(c._path),this._updateStyle(c),this._layers[stamp(c)]=c},_addPath:function(c){var d=c._container;this._container.appendChild(d),c.options.interactive&&c.addInteractiveTarget(d)},_removePath:function(c){var d=c._container;remove(d),c.removeInteractiveTarget(d),delete this._layers[stamp(c)]},_updateStyle:function(c){var d=c._stroke,p=c._fill,g=c.options,f=c._container;f.stroked=!!g.stroke,f.filled=!!g.fill,g.stroke?(d||(d=c._stroke=Io("stroke")),f.appendChild(d),d.weight=g.weight+"px",d.color=g.color,d.opacity=g.opacity,g.dashArray?d.dashStyle=mi(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):d.dashStyle="",d.endcap=g.lineCap.replace("butt","flat"),d.joinstyle=g.lineJoin):d&&(f.removeChild(d),c._stroke=null),g.fill?(p||(p=c._fill=Io("fill")),f.appendChild(p),p.color=g.fillColor||g.color,p.opacity=g.fillOpacity):p&&(f.removeChild(p),c._fill=null)},_updateCircle:function(c){var d=c._point.round(),p=Math.round(c._radius),g=Math.round(c._radiusY||p);this._setPath(c,c._empty()?"M0 0":"AL "+d.x+","+d.y+" "+p+","+g+" 0,23592600")},_setPath:function(c,d){c._path.v=d},_bringToFront:function(c){toFront(c._container)},_bringToBack:function(c){toBack(c._container)}},Do=gn.vml?Io:svgCreate,Bo=ko.extend({_initContainer:function(){this._container=Do("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Do("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){remove(this._container),off(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){ko.prototype._update.call(this);var c=this._bounds,d=c.getSize(),p=this._container;this._svgSize&&this._svgSize.equals(d)||(this._svgSize=d,p.setAttribute("width",d.x),p.setAttribute("height",d.y)),setPosition(p,c.min),p.setAttribute("viewBox",[c.min.x,c.min.y,d.x,d.y].join(" ")),this.fire("update")}},_initPath:function(c){var d=c._path=Do("path");c.options.className&&addClass(d,c.options.className),c.options.interactive&&addClass(d,"leaflet-interactive"),this._updateStyle(c),this._layers[stamp(c)]=c},_addPath:function(c){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(c._path),c.addInteractiveTarget(c._path)},_removePath:function(c){remove(c._path),c.removeInteractiveTarget(c._path),delete this._layers[stamp(c)]},_updatePath:function(c){c._project(),c._update()},_updateStyle:function(c){var d=c._path,p=c.options;d&&(p.stroke?(d.setAttribute("stroke",p.color),d.setAttribute("stroke-opacity",p.opacity),d.setAttribute("stroke-width",p.weight),d.setAttribute("stroke-linecap",p.lineCap),d.setAttribute("stroke-linejoin",p.lineJoin),p.dashArray?d.setAttribute("stroke-dasharray",p.dashArray):d.removeAttribute("stroke-dasharray"),p.dashOffset?d.setAttribute("stroke-dashoffset",p.dashOffset):d.removeAttribute("stroke-dashoffset")):d.setAttribute("stroke","none"),p.fill?(d.setAttribute("fill",p.fillColor||p.color),d.setAttribute("fill-opacity",p.fillOpacity),d.setAttribute("fill-rule",p.fillRule||"evenodd")):d.setAttribute("fill","none"))},_updatePoly:function(c,d){this._setPath(c,pointsToPath(c._parts,d))},_updateCircle:function(c){var d=c._point,p=Math.max(Math.round(c._radius),1),g="a"+p+","+(Math.max(Math.round(c._radiusY),1)||p)+" 0 1,0 ",f=c._empty()?"M0 0":"M"+(d.x-p)+","+d.y+g+2*p+",0 "+g+2*-p+",0 ";this._setPath(c,f)},_setPath:function(c,d){c._path.setAttribute("d",d)},_bringToFront:function(c){toFront(c._path)},_bringToBack:function(c){toBack(c._path)}});function svg(c){return gn.svg||gn.vml?new Bo(c):null}gn.vml&&Bo.include(Ao),Nn.include({getRenderer:function(c){var d=c.options.renderer||this._getPaneRenderer(c.options.pane)||this.options.renderer||this._renderer;return d||(d=this._renderer=this._createRenderer()),this.hasLayer(d)||this.addLayer(d),d},_getPaneRenderer:function(c){if("overlayPane"===c||void 0===c)return!1;var d=this._paneRenderers[c];return void 0===d&&(d=this._createRenderer({pane:c}),this._paneRenderers[c]=d),d},_createRenderer:function(c){return this.options.preferCanvas&&canvas(c)||svg(c)}});var Fo=fo.extend({initialize:function(c,d){fo.prototype.initialize.call(this,this._boundsToLatLngs(c),d)},setBounds:function(c){return this.setLatLngs(this._boundsToLatLngs(c))},_boundsToLatLngs:function(c){return[(c=toLatLngBounds(c)).getSouthWest(),c.getNorthWest(),c.getNorthEast(),c.getSouthEast()]}});Bo.create=Do,Bo.pointsToPath=pointsToPath,_o.geometryToLayer=geometryToLayer,_o.coordsToLatLng=coordsToLatLng,_o.coordsToLatLngs=coordsToLatLngs,_o.latLngToCoords=latLngToCoords,_o.latLngsToCoords=latLngsToCoords,_o.getFeature=getFeature,_o.asFeature=asFeature,Nn.mergeOptions({boxZoom:!0});var zo=Vn.extend({initialize:function(c){this._map=c,this._container=c._container,this._pane=c._panes.overlayPane,this._resetStateTimeout=0,c.on("unload",this._destroy,this)},addHooks:function(){on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){off(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){remove(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(c){if(!c.shiftKey||1!==c.which&&1!==c.button)return!1;this._clearDeferredResetState(),this._resetState(),Cn(),disableImageDrag(),this._startPoint=this._map.mouseEventToContainerPoint(c),on(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(c){this._moved||(this._moved=!0,this._box=create$1("div","leaflet-zoom-box",this._container),addClass(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(c);var d=new Bounds(this._point,this._startPoint),p=d.getSize();setPosition(this._box,d.min),this._box.style.width=p.x+"px",this._box.style.height=p.y+"px"},_finish:function(){this._moved&&(remove(this._box),removeClass(this._container,"leaflet-crosshair")),Ln(),enableImageDrag(),off(document,{contextmenu:stop,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(c){if((1===c.which||1===c.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(bind(this._resetState,this),0);var d=new LatLngBounds(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(d).fire("boxzoomend",{boxZoomBounds:d})}},_onKeyDown:function(c){27===c.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Nn.addInitHook("addHandler","boxZoom",zo),Nn.mergeOptions({doubleClickZoom:!0});var jo=Vn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(c){var d=this._map,p=d.getZoom(),g=d.options.zoomDelta,f=c.originalEvent.shiftKey?p-g:p+g;"center"===d.options.doubleClickZoom?d.setZoom(f):d.setZoomAround(c.containerPoint,f)}});Nn.addInitHook("addHandler","doubleClickZoom",jo),Nn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var No=Vn.extend({addHooks:function(){if(!this._draggable){var c=this._map;this._draggable=new qn(c._mapPane,c._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),c.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),c.on("zoomend",this._onZoomEnd,this),c.whenReady(this._onZoomEnd,this))}addClass(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){removeClass(this._map._container,"leaflet-grab"),removeClass(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 c=this._map;if(c._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var d=toLatLngBounds(this._map.options.maxBounds);this._offsetLimit=toBounds(this._map.latLngToContainerPoint(d.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(d.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;c.fire("movestart").fire("dragstart"),c.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(c){if(this._map.options.inertia){var d=this._lastTime=+new Date,p=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(p),this._times.push(d),this._prunePositions(d)}this._map.fire("move",c).fire("drag",c)},_prunePositions:function(c){for(;this._positions.length>1&&c-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var c=this._map.getSize().divideBy(2),d=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=d.subtract(c).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(c,d){return c-(c-d)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var c=this._draggable._newPos.subtract(this._draggable._startPos),d=this._offsetLimit;c.x<d.min.x&&(c.x=this._viscousLimit(c.x,d.min.x)),c.y<d.min.y&&(c.y=this._viscousLimit(c.y,d.min.y)),c.x>d.max.x&&(c.x=this._viscousLimit(c.x,d.max.x)),c.y>d.max.y&&(c.y=this._viscousLimit(c.y,d.max.y)),this._draggable._newPos=this._draggable._startPos.add(c)}},_onPreDragWrap:function(){var c=this._worldWidth,d=Math.round(c/2),p=this._initialWorldOffset,g=this._draggable._newPos.x,f=(g-d+p)%c+d-p,_=(g+d+p)%c-d-p,y=Math.abs(f+p)<Math.abs(_+p)?f:_;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=y},_onDragEnd:function(c){var d=this._map,p=d.options,g=!p.inertia||c.noInertia||this._times.length<2;if(d.fire("dragend",c),g)d.fire("moveend");else{this._prunePositions(+new Date);var f=this._lastPos.subtract(this._positions[0]),_=(this._lastTime-this._times[0])/1e3,y=p.easeLinearity,v=f.multiplyBy(y/_),x=v.distanceTo([0,0]),C=Math.min(p.inertiaMaxSpeed,x),L=v.multiplyBy(C/x),M=C/(p.inertiaDeceleration*y),E=L.multiplyBy(-M/2).round();E.x||E.y?(E=d._limitOffset(E,d.options.maxBounds),requestAnimFrame((function(){d.panBy(E,{duration:M,easeLinearity:y,noMoveStart:!0,animate:!0})}))):d.fire("moveend")}}});Nn.addInitHook("addHandler","dragging",No),Nn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Zo=Vn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(c){this._map=c,this._setPanDelta(c.options.keyboardPanDelta),this._setZoomDelta(c.options.zoomDelta)},addHooks:function(){var c=this._map._container;c.tabIndex<=0&&(c.tabIndex="0"),on(c,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),off(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var c=document.body,d=document.documentElement,p=c.scrollTop||d.scrollTop,g=c.scrollLeft||d.scrollLeft;this._map._container.focus(),window.scrollTo(g,p)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(c){var d,p,g=this._panKeys={},f=this.keyCodes;for(d=0,p=f.left.length;d<p;d++)g[f.left[d]]=[-1*c,0];for(d=0,p=f.right.length;d<p;d++)g[f.right[d]]=[c,0];for(d=0,p=f.down.length;d<p;d++)g[f.down[d]]=[0,c];for(d=0,p=f.up.length;d<p;d++)g[f.up[d]]=[0,-1*c]},_setZoomDelta:function(c){var d,p,g=this._zoomKeys={},f=this.keyCodes;for(d=0,p=f.zoomIn.length;d<p;d++)g[f.zoomIn[d]]=c;for(d=0,p=f.zoomOut.length;d<p;d++)g[f.zoomOut[d]]=-c},_addHooks:function(){on(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){off(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(c){if(!(c.altKey||c.ctrlKey||c.metaKey)){var d,p=c.keyCode,g=this._map;if(p in this._panKeys){if(!g._panAnim||!g._panAnim._inProgress)if(d=this._panKeys[p],c.shiftKey&&(d=toPoint(d).multiplyBy(3)),g.options.maxBounds&&(d=g._limitOffset(toPoint(d),g.options.maxBounds)),g.options.worldCopyJump){var f=g.wrapLatLng(g.unproject(g.project(g.getCenter()).add(d)));g.panTo(f)}else g.panBy(d)}else if(p in this._zoomKeys)g.setZoom(g.getZoom()+(c.shiftKey?3:1)*this._zoomKeys[p]);else{if(27!==p||!g._popup||!g._popup.options.closeOnEscapeKey)return;g.closePopup()}stop(c)}}});Nn.addInitHook("addHandler","keyboard",Zo),Nn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Wo=Vn.extend({addHooks:function(){on(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(c){var d=getWheelDelta(c),p=this._map.options.wheelDebounceTime;this._delta+=d,this._lastMousePos=this._map.mouseEventToContainerPoint(c),this._startTime||(this._startTime=+new Date);var g=Math.max(p-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(bind(this._performZoom,this),g),stop(c)},_performZoom:function(){var c=this._map,d=c.getZoom(),p=this._map.options.zoomSnap||0;c._stop();var g=this._delta/(4*this._map.options.wheelPxPerZoomLevel),f=4*Math.log(2/(1+Math.exp(-Math.abs(g))))/Math.LN2,_=p?Math.ceil(f/p)*p:f,y=c._limitZoom(d+(this._delta>0?_:-_))-d;this._delta=0,this._startTime=null,y&&("center"===c.options.scrollWheelZoom?c.setZoom(d+y):c.setZoomAround(this._lastMousePos,d+y))}});Nn.addInitHook("addHandler","scrollWheelZoom",Wo);Nn.mergeOptions({tapHold:gn.touchNative&&gn.safari&&gn.mobile,tapTolerance:15});var Ro=Vn.extend({addHooks:function(){on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(c){if(clearTimeout(this._holdTimeout),1===c.touches.length){var d=c.touches[0];this._startPos=this._newPos=new Point(d.clientX,d.clientY),this._holdTimeout=setTimeout(bind((function(){this._cancel(),this._isTapValid()&&(on(document,"touchend",preventDefault),on(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",d))}),this),600),on(document,"touchend touchcancel contextmenu",this._cancel,this),on(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function cancelClickPrevent(){off(document,"touchend",preventDefault),off(document,"touchend touchcancel",cancelClickPrevent)},_cancel:function(){clearTimeout(this._holdTimeout),off(document,"touchend touchcancel contextmenu",this._cancel,this),off(document,"touchmove",this._onMove,this)},_onMove:function(c){var d=c.touches[0];this._newPos=new Point(d.clientX,d.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(c,d){var p=new MouseEvent(c,{bubbles:!0,cancelable:!0,view:window,screenX:d.screenX,screenY:d.screenY,clientX:d.clientX,clientY:d.clientY});p._simulated=!0,d.target.dispatchEvent(p)}});Nn.addInitHook("addHandler","tapHold",Ro),Nn.mergeOptions({touchZoom:gn.touch,bounceAtZoomLimits:!0});var Ho=Vn.extend({addHooks:function(){addClass(this._map._container,"leaflet-touch-zoom"),on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){removeClass(this._map._container,"leaflet-touch-zoom"),off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(c){var d=this._map;if(c.touches&&2===c.touches.length&&!d._animatingZoom&&!this._zooming){var p=d.mouseEventToContainerPoint(c.touches[0]),g=d.mouseEventToContainerPoint(c.touches[1]);this._centerPoint=d.getSize()._divideBy(2),this._startLatLng=d.containerPointToLatLng(this._centerPoint),"center"!==d.options.touchZoom&&(this._pinchStartLatLng=d.containerPointToLatLng(p.add(g)._divideBy(2))),this._startDist=p.distanceTo(g),this._startZoom=d.getZoom(),this._moved=!1,this._zooming=!0,d._stop(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend touchcancel",this._onTouchEnd,this),preventDefault(c)}},_onTouchMove:function(c){if(c.touches&&2===c.touches.length&&this._zooming){var d=this._map,p=d.mouseEventToContainerPoint(c.touches[0]),g=d.mouseEventToContainerPoint(c.touches[1]),f=p.distanceTo(g)/this._startDist;if(this._zoom=d.getScaleZoom(f,this._startZoom),!d.options.bounceAtZoomLimits&&(this._zoom<d.getMinZoom()&&f<1||this._zoom>d.getMaxZoom()&&f>1)&&(this._zoom=d._limitZoom(this._zoom)),"center"===d.options.touchZoom){if(this._center=this._startLatLng,1===f)return}else{var _=p._add(g)._divideBy(2)._subtract(this._centerPoint);if(1===f&&0===_.x&&0===_.y)return;this._center=d.unproject(d.project(this._pinchStartLatLng,this._zoom).subtract(_),this._zoom)}this._moved||(d._moveStart(!0,!1),this._moved=!0),cancelAnimFrame(this._animRequest);var y=bind(d._move,d,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimFrame(y,this,!0),preventDefault(c)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,cancelAnimFrame(this._animRequest),off(document,"touchmove",this._onTouchMove,this),off(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}});Nn.addInitHook("addHandler","touchZoom",Ho),Nn.BoxZoom=zo,Nn.DoubleClickZoom=jo,Nn.Drag=No,Nn.Keyboard=Zo,Nn.ScrollWheelZoom=Wo,Nn.TapHold=Ro,Nn.TouchZoom=Ho;var Uo=Object.freeze({__proto__:null,Bounds:Bounds,Browser:gn,CRS:Ci,Canvas:Oo,Circle:go,CircleMarker:po,Class:Class,Control:Zn,DivIcon:So,DivOverlay:bo,DomEvent:zn,DomUtil:An,Draggable:qn,Evented:wi,FeatureGroup:ro,GeoJSON:_o,GridLayer:Mo,Handler:Vn,Icon:ao,ImageOverlay:xo,LatLng:LatLng,LatLngBounds:LatLngBounds,Layer:oo,LayerGroup:so,LineUtil:Kn,Map:Nn,Marker:co,Mixin:Gn,Path:uo,Point:Point,PolyUtil:$n,Polygon:fo,Polyline:mo,Popup:Co,PosAnimation:jn,Projection:to,Rectangle:Fo,Renderer:ko,SVG:Bo,SVGOverlay:wo,TileLayer:Eo,Tooltip:Lo,Transformation:Transformation,Util:xi,VideoOverlay:Po,bind:bind,bounds:toBounds,canvas:canvas,circle:function circle(c,d,p){return new go(c,d,p)},circleMarker:function circleMarker(c,d){return new po(c,d)},control:control,divIcon:divIcon,extend:extend,featureGroup:function(c,d){return new ro(c,d)},geoJSON:geoJSON,geoJson:vo,gridLayer:function gridLayer(c){return new Mo(c)},icon:function icon(c){return new ao(c)},imageOverlay:function(c,d,p){return new xo(c,d,p)},latLng:toLatLng,latLngBounds:toLatLngBounds,layerGroup:function(c,d){return new so(c,d)},map:createMap,marker:marker,point:toPoint,polygon:function polygon(c,d){return new fo(c,d)},polyline:function polyline(c,d){return new mo(c,d)},popup:function(c,d){return new Co(c,d)},rectangle:function rectangle(c,d){return new Fo(c,d)},setOptions:setOptions,stamp:stamp,svg:svg,svgOverlay:function svgOverlay(c,d,p){return new wo(c,d,p)},tileLayer:tileLayer,tooltip:function(c,d){return new Lo(c,d)},transformation:toTransformation,version:"1.9.4",videoOverlay:function videoOverlay(c,d,p){return new Po(c,d,p)}});(c=>{if(document.head.querySelector(`link[href="${c}"]`))return;const d=document.createElement("link");Object.assign(d,{rel:"stylesheet",href:c,onerror:()=>console.warn("Fail to load stylesheet:",c)}),document.head.appendChild(d)})("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css");const Vo=class extends defaultExport{id="leaflet";version="1.9.4";L=Uo;addMap({target:c,center:d,zoom:p}){const[g,f]=d;this.map=createMap(c).setView([f,g],p);return new window.ResizeObserver((()=>{this.map.invalidateSize()})).observe(c),this.map}getTerraDrawAdapter({draw:c,L:d,map:p}){return c?(this.terraDrawAdapter=new n({lib:d,map:p}),this.getTerraDrawAdapter):{state:"skip"}}setControl({map:c,control:d}){if(!d||0===Object.values(d).filter((c=>c)).length)return{state:"skip"};if(d.fullscreen){const d=document.createElement("link");d.rel="stylesheet",d.href="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css",document.body.append(d);const p=document.createElement("script");p.src="https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js",document.body.append(p),p.onload=()=>{c.addControl(new Zn.Fullscreen)}}d.scale&&control.scale().addTo(c)}debugLayer(){return Mo.GridDebug=Mo.extend({createTile:function(c){const d=document.createElement("div");return d.style.outline="2px solid",d.style.fontWeight="bold",d.style.fontSize="14pt",d.innerHTML=[c.z,c.x,c.y].join("/"),d}}),new Mo.GridDebug}setExtra(c){const{map:d,debug:p}=c;if(!p&&!c.eval)return{state:"skip"};!0===p&&d.addLayer(this.debugLayer()),c.eval&&this.evalScript(c.eval,[["map",d],["L",Uo]])}addMarker(c){const d="circle"===c.type?this.svgForAnchor:this.svgForMarker,p=divIcon({html:d.html,className:"marker",iconSize:d.size}),g=marker(Array.from(c.xy).reverse(),{icon:p}).addTo(this.map);return g.getElement().classList.add("marker"),g.getElement().title=c.title,g.getElement()}addTileData({map:c,data:d}){const p=d.filter((c=>"tile"===c.type)),g={},f={};if(0===p.length){tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(c)}else p.forEach(((d,p)=>{const f=tileLayer(d.url),_=d.title?d.title:`Anonymous_${p}`;0===p&&f.addTo(c),g[_]=f})),control.layers(g,f).addTo(c)}addGPXFile({map:c,data:d}){const p=d.find((c=>"gpx"===c.type));if(!p)return{state:"skip"};const g=document.createElement("script");g.src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-gpx/1.7.0/gpx.min.js",document.body.append(g);const f={gpx_options:{joinTrackSegments:!1},polyline_options:{color:"red",weight:3,lineCap:"round"},marker_options:{startIconUrl:null,endIconUrl:null,shadowUrl:"",wptIconUrls:{"":null}},async:!0};g.onload=()=>{new(void 0)(p,f).addTo(c)}}updateCamera(c,d){const p=toLatLng(c.center[1],c.center[0]);d?this.map.flyTo(p,c.zoom):this.map.setView(p,c.zoom)}project([c,d]){return this.map.latLngToLayerPoint([d,c])}unproject([c,d]){const p=this.map.layerPointToLatLng([c,d]);return[p.lng,p.lat]}},converter=c=>({...c,use:Vo}),Go=renderWith(converter),Yo=renderByYamlWith(converter),qo=((c=null)=>async()=>{const d=document.currentScript,p=d?.getAttribute("data-target")??URL.parse(d?.src)?.searchParams?.get("target"),g=document.querySelectorAll(p);p&&g&&g.forEach((d=>renderByYamlWith(c)(d)))})(converter);globalThis.mapclay={render:Go,renderByYaml:Yo};export{Vo as default,Go as render,qo as renderByScriptTarget,Yo as renderByYaml};
diff --git a/dist/renderers/maplibre.js b/dist/renderers/maplibre.js
new file mode 100644
index 0000000..2643dda
--- /dev/null
+++ b/dist/renderers/maplibre.js
@@ -0,0 +1,7 @@
+!function(u,Xe){"object"==typeof exports&&"undefined"!=typeof module?Xe(exports):"function"==typeof define&&define.amd?define(["exports"],Xe):Xe((u="undefined"!=typeof globalThis?globalThis:u||self).maplibre={})}(this,(function(u){"use strict";var Xe="undefined"!=typeof document?document.currentScript:null;function t(){return t=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var fr=arguments[Xe];for(var Ar in fr)({}).hasOwnProperty.call(fr,Ar)&&(u[Ar]=fr[Ar])}return u},t.apply(null,arguments)}function e(u,Xe=9){const fr=Math.pow(10,Xe);return Math.round(u*fr)/fr}const i$1=(u,Xe)=>{const{x:fr,y:Ar}=u,{x:_r,y:wr}=Xe,Kr=_r-fr,In=wr-Ar;return Math.sqrt(In*In+Kr*Kr)};class o{constructor({name:u,callback:Xe,unregister:fr,register:Ar}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=u,this.register=()=>{this.registered||(this.registered=!0,Ar(Xe))},this.unregister=()=>{this.register&&(this.registered=!1,fr(Xe))},this.callback=Xe}}class r{constructor(u){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof u.minPixelDragDistance?u.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof u.minPixelDragDistanceSelecting?u.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof u.minPixelDragDistanceDrawing?u.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof u.coordinatePrecision?u.coordinatePrecision:9}getButton(u){return-1===u.button?"neither":0===u.button?"left":1===u.button?"middle":2===u.button?"right":"neither"}getMapElementXYPosition(u){const Xe=this.getMapEventElement(),{left:fr,top:Ar}=Xe.getBoundingClientRect();return{containerX:u.clientX-fr,containerY:u.clientY-Ar}}getDrawEventFromEvent(u){const Xe=this.getLngLatFromEvent(u);if(!Xe)return null;const{lng:fr,lat:Ar}=Xe,{containerX:_r,containerY:wr}=this.getMapElementXYPosition(u),Kr=this.getButton(u),In=Array.from(this._heldKeys);return{lng:e(fr,this._coordinatePrecision),lat:e(Ar,this._coordinatePrecision),containerX:_r,containerY:wr,button:Kr,heldKeys:In}}register(u){this._currentModeCallbacks=u,this._listeners=this.getAdapterListeners(),this._listeners.forEach((u=>{u.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:u=>{if(!this._currentModeCallbacks)return;if(!u.isPrimary)return;const Xe=this.getDrawEventFromEvent(u);Xe&&(this._dragState="pre-dragging",this._lastDrawEvent=Xe)},register:u=>{this.getMapEventElement().addEventListener("pointerdown",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointerdown",u)}}),new o({name:"pointermove",callback:u=>{if(!this._currentModeCallbacks)return;if(!u.isPrimary)return;u.preventDefault();const Xe=this.getDrawEventFromEvent(u);if(Xe)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(Xe),this._lastDrawEvent=Xe;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const u={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},fr={x:Xe.containerX,y:Xe.containerY},Ar=this._currentModeCallbacks.getState(),_r=i$1(u,fr);let wr=!1;if(wr="drawing"===Ar?_r<this._minPixelDragDistanceDrawing:"selecting"===Ar?_r<this._minPixelDragDistanceSelecting:_r<this._minPixelDragDistance,wr)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(Xe,(u=>{this.setDraggability.bind(this)(u)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(Xe,(u=>{this.setDraggability.bind(this)(u)}))},register:u=>{this.getMapEventElement().addEventListener("pointermove",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointermove",u)}}),new o({name:"contextmenu",callback:u=>{this._currentModeCallbacks&&u.preventDefault()},register:u=>{this.getMapEventElement().addEventListener("contextmenu",u)},unregister:u=>{this.getMapEventElement().removeEventListener("contextmenu",u)}}),new o({name:"pointerup",callback:u=>{if(!this._currentModeCallbacks)return;if(u.target!==this.getMapEventElement())return;if(!u.isPrimary)return;const Xe=this.getDrawEventFromEvent(u);Xe&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(Xe,(u=>{this.setDraggability.bind(this)(u)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(Xe),this._dragState="not-dragging",this.setDraggability(!0))},register:u=>{this.getMapEventElement().addEventListener("pointerup",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointerup",u)}}),new o({name:"keyup",callback:u=>{this._currentModeCallbacks&&(this._heldKeys.delete(u.key),this._currentModeCallbacks.onKeyUp({key:u.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>u.preventDefault()}))},register:u=>{this.getMapEventElement().addEventListener("keyup",u)},unregister:u=>{this.getMapEventElement().removeEventListener("keyup",u)}}),new o({name:"keydown",callback:u=>{this._currentModeCallbacks&&(this._heldKeys.add(u.key),this._currentModeCallbacks.onKeyDown({key:u.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>u.preventDefault()}))},register:u=>{this.getMapEventElement().addEventListener("keydown",u)},unregister:u=>{this.getMapEventElement().removeEventListener("keydown",u)}})]}unregister(){this._listeners.forEach((u=>{u.unregister()})),this.clear()}}class a extends r{constructor(u){super(u),this._nextRender=void 0,this._map=void 0,this._container=void 0,this._rendered=!1,this.changedIds={deletion:!1,points:!1,linestrings:!1,polygons:!1,styling:!1},this._map=u.map,this._container=this._map.getContainer()}clearLayers(){this._rendered&&(["point","linestring","polygon"].forEach((u=>{const Xe=`td-${u.toLowerCase()}`;this._map.removeLayer(Xe),"polygon"===u&&this._map.removeLayer(Xe+"-outline"),this._map.removeSource(Xe)})),this._rendered=!1,this._nextRender&&(cancelAnimationFrame(this._nextRender),this._nextRender=void 0))}_addGeoJSONSource(u,Xe){this._map.addSource(u,{type:"geojson",data:{type:"FeatureCollection",features:Xe},tolerance:0})}_addFillLayer(u){return this._map.addLayer({id:u,source:u,type:"fill",paint:{"fill-color":["get","polygonFillColor"],"fill-opacity":["get","polygonFillOpacity"]}})}_addFillOutlineLayer(u){return this._map.addLayer({id:u+"-outline",source:u,type:"line",paint:{"line-width":["get","polygonOutlineWidth"],"line-color":["get","polygonOutlineColor"]}})}_addLineLayer(u){return this._map.addLayer({id:u,source:u,type:"line",paint:{"line-width":["get","lineStringWidth"],"line-color":["get","lineStringColor"]}})}_addPointLayer(u){return this._map.addLayer({id:u,source:u,type:"circle",paint:{"circle-stroke-color":["get","pointOutlineColor"],"circle-stroke-width":["get","pointOutlineWidth"],"circle-radius":["get","pointWidth"],"circle-color":["get","pointColor"]}})}_addLayer(u,Xe){"Point"===Xe&&this._addPointLayer(u),"LineString"===Xe&&this._addLineLayer(u),"Polygon"===Xe&&(this._addFillLayer(u),this._addFillOutlineLayer(u))}_addGeoJSONLayer(u,Xe){const fr=`td-${u.toLowerCase()}`;return this._addGeoJSONSource(fr,Xe),this._addLayer(fr,u),fr}_setGeoJSONLayerData(u,Xe){const fr=`td-${u.toLowerCase()}`;return this._map.getSource(fr).setData({type:"FeatureCollection",features:Xe}),fr}updateChangedIds(u){[...u.updated,...u.created].forEach((u=>{"Point"===u.geometry.type?this.changedIds.points=!0:"LineString"===u.geometry.type?this.changedIds.linestrings=!0:"Polygon"===u.geometry.type&&(this.changedIds.polygons=!0)})),u.deletedIds.length>0&&(this.changedIds.deletion=!0),0===u.created.length&&0===u.updated.length&&0===u.deletedIds.length&&(this.changedIds.styling=!0)}getLngLatFromEvent(u){const{left:Xe,top:fr}=this._container.getBoundingClientRect();return this.unproject(u.clientX-Xe,u.clientY-fr)}getMapEventElement(){return this._map.getCanvas()}setDraggability(u){u?(this._map.dragRotate.enable(),this._map.dragPan.enable()):(this._map.dragRotate.disable(),this._map.dragPan.disable())}project(u,Xe){const{x:fr,y:Ar}=this._map.project({lng:u,lat:Xe});return{x:fr,y:Ar}}unproject(u,Xe){const{lng:fr,lat:Ar}=this._map.unproject({x:u,y:Xe});return{lng:fr,lat:Ar}}setCursor(u){const Xe=this._map.getCanvas();"unset"===u?Xe.style.removeProperty("cursor"):Xe.style.cursor=u}setDoubleClickToZoom(u){u?this._map.doubleClickZoom.enable():this._map.doubleClickZoom.disable()}render(u,Xe){this.updateChangedIds(u),this._nextRender&&cancelAnimationFrame(this._nextRender),this._nextRender=requestAnimationFrame((()=>{const fr=[...u.created,...u.updated,...u.unchanged],Ar=[],_r=[],wr=[];for(let u=0;u<fr.length;u++){const Kr=fr[u],{properties:In}=Kr,io=Xe[In.mode](Kr);"Point"===Kr.geometry.type?(In.pointColor=io.pointColor,In.pointOutlineColor=io.pointOutlineColor,In.pointOutlineWidth=io.pointOutlineWidth,In.pointWidth=io.pointWidth,Ar.push(Kr)):"LineString"===Kr.geometry.type?(In.lineStringColor=io.lineStringColor,In.lineStringWidth=io.lineStringWidth,_r.push(Kr)):"Polygon"===Kr.geometry.type&&(In.polygonFillColor=io.polygonFillColor,In.polygonFillOpacity=io.polygonFillOpacity,In.polygonOutlineColor=io.polygonOutlineColor,In.polygonOutlineWidth=io.polygonOutlineWidth,wr.push(Kr))}if(this._rendered){const u=this.changedIds.deletion||this.changedIds.styling,Xe=u||this.changedIds.linestrings,fr=u||this.changedIds.polygons;let Kr;(u||this.changedIds.points)&&(Kr=this._setGeoJSONLayerData("Point",Ar)),Xe&&this._setGeoJSONLayerData("LineString",_r),fr&&this._setGeoJSONLayerData("Polygon",wr),Kr&&this._map.moveLayer(Kr)}else{const u=this._addGeoJSONLayer("Point",Ar);this._addGeoJSONLayer("LineString",_r),this._addGeoJSONLayer("Polygon",wr),this._rendered=!0,u&&this._map.moveLayer(u)}this.changedIds={points:!1,linestrings:!1,polygons:!1,deletion:!1,styling:!1}}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers())}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}register(u){super.register(u),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}}class l extends r{constructor(u){super(u),this.mapboxglAdapter=void 0,this.mapboxglAdapter=new a(u)}register(u){this.mapboxglAdapter.register(u)}unregister(){this.mapboxglAdapter.unregister()}getCoordinatePrecision(){return this.mapboxglAdapter.getCoordinatePrecision()}getLngLatFromEvent(u){return this.mapboxglAdapter.getLngLatFromEvent(u)}getMapEventElement(){return this.mapboxglAdapter.getMapEventElement()}setDraggability(u){this.mapboxglAdapter.setDraggability(u)}project(u,Xe){return this.mapboxglAdapter.project(u,Xe)}unproject(u,Xe){return this.mapboxglAdapter.unproject(u,Xe)}setCursor(u){this.mapboxglAdapter.setCursor(u)}setDoubleClickToZoom(u){this.mapboxglAdapter.setDoubleClickToZoom(u)}render(u,Xe){this.mapboxglAdapter.render(u,Xe)}clear(){this.mapboxglAdapter.clear()}}const fr={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Ar=class{constructor(u){this.code_=u.code,this.units_=u.units,this.extent_=void 0!==u.extent?u.extent:null,this.worldExtent_=void 0!==u.worldExtent?u.worldExtent:null,this.axisOrientation_=void 0!==u.axisOrientation?u.axisOrientation:"enu",this.global_=void 0!==u.global&&u.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=u.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=u.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||fr[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(u){this.global_=u,this.canWrapX_=!(!u||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(u){this.defaultTileGrid_=u}setExtent(u){this.extent_=u,this.canWrapX_=!(!this.global_||!u)}setWorldExtent(u){this.worldExtent_=u}setGetPointResolution(u){this.getPointResolutionFunc_=u}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const _r=6378137,wr=Math.PI*_r,Kr=[-wr,-wr,wr,wr],In=[-180,-85,180,85],io=_r*Math.log(Math.tan(Math.PI/2));class m extends Ar{constructor(u){super({code:u,units:"m",extent:Kr,global:!0,worldExtent:In,getPointResolution:function(u,Xe){return u/Math.cosh(Xe[1]/_r)}})}}const no=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],oo=[-180,-90,180,90],so=6378137*Math.PI/180;class P extends Ar{constructor(u,Xe){super({code:u,units:"degrees",extent:oo,axisOrientation:Xe,global:!0,metersPerUnit:so,worldExtent:oo})}}const ao=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let co={};function b(u,Xe,fr){const Ar=u.getCode(),_r=Xe.getCode();Ar in co||(co[Ar]={}),co[Ar][_r]=fr}function S(u,Xe){if(void 0!==Xe)for(let fr=0,Ar=u.length;fr<Ar;++fr)Xe[fr]=u[fr];else Xe=u.slice();return Xe}function w(u){u.getCode(),b(u,u,S)}function F(u){!function(u){u.forEach(w)}(u),u.forEach((function(Xe){u.forEach((function(u){Xe!==u&&b(Xe,u,S)}))}))}var go,ho,Co,Io;F(no),F(ao),go=no,ho=function(u,Xe,fr){const Ar=u.length;fr=fr>1?fr:2,void 0===Xe&&(Xe=fr>2?u.slice():new Array(Ar));for(let Kr=0;Kr<Ar;Kr+=fr){Xe[Kr]=wr*u[Kr]/180;let fr=_r*Math.log(Math.tan(Math.PI*(+u[Kr+1]+90)/360));fr>io?fr=io:fr<-io&&(fr=-io),Xe[Kr+1]=fr}return Xe},Co=function(u,Xe,fr){const Ar=u.length;fr=fr>1?fr:2,void 0===Xe&&(Xe=fr>2?u.slice():new Array(Ar));for(let Kr=0;Kr<Ar;Kr+=fr)Xe[Kr]=180*u[Kr]/wr,Xe[Kr+1]=360*Math.atan(Math.exp(u[Kr+1]/_r))/Math.PI-90;return Xe},ao.forEach((function(u){go.forEach((function(Xe){b(u,Xe,ho),b(Xe,u,Co)}))})),function(u){u.Commit="commit",u.Provisional="provisional",u.Finish="finish"}(Io||(Io={}));const xo="selected",Mo="midPoint",Po="closingPoint";function A(u){return Boolean(u&&"object"==typeof u&&null!==u&&!Array.isArray(u))}function R(u){if(!function(u){return"number"==typeof u&&!isNaN(new Date(u).valueOf())}(u))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var ss;!function(u){u.Drawing="drawing",u.Select="select",u.Static="static",u.Render="render"}(ss||(ss={}));class X{get state(){return this._state}set state(u){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(u){if("object"!=typeof u)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=u}registerBehaviors(u){}constructor(u){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=ss.Drawing,this.mode="base",this._state="unregistered",this._styles=u&&u.styles?t({},u.styles):{},this.pointerDistance=u&&u.pointerDistance||40,this.validate=u&&u.validation,this.projection=u&&u.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(u){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=u.store,this.store.registerOnChange(u.onChange),this.setDoubleClickToZoom=u.setDoubleClickToZoom,this.project=u.project,this.unproject=u.unproject,this.onSelect=u.onSelect,this.onDeselect=u.onDeselect,this.setCursor=u.setCursor,this.onStyleChange=u.onChange,this.onFinish=u.onFinish,this.coordinatePrecision=u.coordinatePrecision,this.registerBehaviors({mode:u.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:u.coordinatePrecision,projection:this.projection})}validateFeature(u){if("unregistered"===this._state)throw new Error("Mode must be registered");const Xe=function(u,Xe){let fr;if(A(u))if(null==u.id)fr="Feature has no id";else if("string"!=typeof u.id&&"number"!=typeof u.id)fr="Feature must be string or number as per GeoJSON spec";else if(Xe(u.id))if(A(u.geometry))if(A(u.properties))if("string"==typeof u.geometry.type&&["Polygon","LineString","Point"].includes(u.geometry.type))if(Array.isArray(u.geometry.coordinates)){if(!u.properties.mode||"string"!=typeof u.properties.mode)throw new Error("Feature does not have a valid mode property")}else fr="Feature coordinates is not an array";else fr="Feature is not Point, LineString or Polygon";else fr="Feature has no properties";else fr="Feature has no geometry";else fr="Feature must match the id strategy (default is UUID4)";else fr="Feature is not object";if(fr)throw new Error(fr);return!0}(u,this.store.idStrategy.isValidId);return this.validate?this.validate(u,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Io.Provisional}):Xe}onFinish(u,Xe){}onDeselect(u){}onSelect(u){}onKeyDown(u){}onKeyUp(u){}onMouseMove(u){}onClick(u){}onDragStart(u,Xe){}onDrag(u,Xe){}onDragEnd(u,Xe){}getHexColorStylingValue(u,Xe,fr){return this.getStylingValue(u,Xe,fr)}getNumericStylingValue(u,Xe,fr){return this.getStylingValue(u,Xe,fr)}getStylingValue(u,Xe,fr){return void 0===u?Xe:"function"==typeof u?u(fr):u}}class U extends X{constructor(...u){super(...u),this.type=ss.Select}}function Y(u,Xe){const i=u=>u*Math.PI/180,fr=i(u[1]),Ar=i(u[0]),_r=i(Xe[1]),wr=_r-fr,Kr=i(Xe[0])-Ar,In=Math.sin(wr/2)*Math.sin(wr/2)+Math.cos(fr)*Math.cos(_r)*Math.sin(Kr/2)*Math.sin(Kr/2);return 2*Math.atan2(Math.sqrt(In),Math.sqrt(1-In))*6371e3/1e3}const sa=6371008.8;function z(u){return u%360*Math.PI/180}function H(u){return u/(sa/1e3)}function $$1(u){return u%(2*Math.PI)*180/Math.PI}const aa=57.29577951308232,fa=.017453292519943295,ya=6378137,Q=(u,Xe)=>({x:0===u?0:u*fa*ya,y:0===Xe?0:Math.log(Math.tan(Math.PI/4+Xe*fa/2))*ya}),tt=(u,Xe)=>({lng:0===u?0:aa*(u/ya),lat:0===Xe?0:(2*Math.atan(Math.exp(Xe/ya))-Math.PI/2)*aa});function et(u,Xe,fr){const Ar=z(u[0]),_r=z(u[1]),wr=z(fr),Kr=H(Xe),In=Math.asin(Math.sin(_r)*Math.cos(Kr)+Math.cos(_r)*Math.sin(Kr)*Math.cos(wr));return[$$1(Ar+Math.atan2(Math.sin(wr)*Math.sin(Kr)*Math.cos(_r),Math.cos(Kr)-Math.sin(_r)*Math.sin(In))),$$1(In)]}function it(u){const{center:Xe,radiusKilometers:fr,coordinatePrecision:Ar}=u,_r=u.steps?u.steps:64,wr=[];for(let u=0;u<_r;u++){const Kr=et(Xe,fr,-360*u/_r);wr.push([e(Kr[0],Ar),e(Kr[1],Ar)])}return wr.push(wr[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[wr]},properties:{}}}function ot(u){const Xe={epsilon:0};let fr;if("Polygon"===u.geometry.type)fr=u.geometry.coordinates;else{if("LineString"!==u.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");fr=[u.geometry.coordinates]}const Ar=[];for(let u=0;u<fr.length;u++)for(let Xe=0;Xe<fr[u].length-1;Xe++)for(let Ar=0;Ar<fr.length;Ar++)for(let _r=0;_r<fr[Ar].length-1;_r++)s(u,Xe,Ar,_r);return Ar.length>0;function r(u){return u<0-Xe.epsilon||u>1+Xe.epsilon}function s(u,Xe,_r,wr){const Kr=fr[u][Xe],In=fr[u][Xe+1],io=fr[_r][wr],no=fr[_r][wr+1],oo=function(u,Xe,fr,Ar){if(rt(u,fr)||rt(u,Ar)||rt(Xe,fr)||rt(Ar,fr))return null;const _r=u[0],wr=u[1],Kr=Xe[0],In=Xe[1],io=fr[0],no=fr[1],oo=Ar[0],so=Ar[1],ao=(_r-Kr)*(no-so)-(wr-In)*(io-oo);return 0===ao?null:[((_r*In-wr*Kr)*(io-oo)-(_r-Kr)*(io*so-no*oo))/ao,((_r*In-wr*Kr)*(no-so)-(wr-In)*(io*so-no*oo))/ao]}(Kr,In,io,no);if(null===oo)return;let so,ao;so=In[0]!==Kr[0]?(oo[0]-Kr[0])/(In[0]-Kr[0]):(oo[1]-Kr[1])/(In[1]-Kr[1]),ao=no[0]!==io[0]?(oo[0]-io[0])/(no[0]-io[0]):(oo[1]-io[1])/(no[1]-io[1]),r(so)||r(ao)||(oo.toString(),Ar.push(oo))}}function rt(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]}function st(u,Xe){return 2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]&&1/0!==u[0]&&1/0!==u[1]&&(Ar=u[0])>=-180&&Ar<=180&&(fr=u[1])>=-90&&fr<=90&&nt(u[0])<=Xe&&nt(u[1])<=Xe;var fr,Ar}function nt(u){let Xe=1,fr=0;for(;Math.round(u*Xe)/Xe!==u;)Xe*=10,fr++;return fr}function at(u,Xe){return"Polygon"===u.geometry.type&&1===u.geometry.coordinates.length&&u.geometry.coordinates[0].length>=4&&u.geometry.coordinates[0].every((u=>st(u,Xe)))&&(fr=u.geometry.coordinates[0][0])[0]===(Ar=u.geometry.coordinates[0][u.geometry.coordinates[0].length-1])[0]&&fr[1]===Ar[1];var fr,Ar}function lt(u,Xe){return at(u,Xe)&&!ot(u)}class ht extends X{constructor(u){var Xe;super(u),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const fr={start:"crosshair"};if(this.cursors=u&&u.cursors?t({},fr,u.cursors):fr,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}this.startingRadiusKilometers=null!=(Xe=null==u?void 0:u.startingRadiusKilometers)?Xe:1e-5,this.validate=null==u?void 0:u.validation}close(){if(void 0===this.currentCircleId)return;const u=this.currentCircleId;if(this.validate&&u){const Xe=this.store.getGeometryCopy(u);if(!this.validate({type:"Feature",id:u,geometry:Xe,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Io.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(0===this.clickCount){this.center=[u.lng,u.lat];const Xe=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[fr]=this.store.create([{geometry:Xe.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=fr,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(u),this.close()}onMouseMove(u){this.updateCircle(u)}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u])}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Polygon"===u.geometry.type&&u.properties.mode===this.mode?(Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&lt(u,this.coordinatePrecision)}updateCircle(u){if(1===this.clickCount&&this.center&&this.currentCircleId){const Xe=Y(this.center,[u.lng,u.lat]);let fr;if("web-mercator"===this.projection){const Ar=function(u,Xe){const fr=1e3*Y(u,Xe);if(0===fr)return 1;const{x:Ar,y:_r}=Q(u[0],u[1]),{x:wr,y:Kr}=Q(Xe[0],Xe[1]);return Math.sqrt(Math.pow(wr-Ar,2)+Math.pow(Kr-_r,2))/fr}(this.center,[u.lng,u.lat]);fr=function(u){const{center:Xe,radiusKilometers:fr,coordinatePrecision:Ar}=u,_r=u.steps?u.steps:64,wr=1e3*fr,[Kr,In]=Xe,{x:io,y:no}=Q(Kr,In),oo=[];for(let u=0;u<_r;u++){const Xe=360*u/_r*Math.PI/180,fr=wr*Math.cos(Xe),Kr=wr*Math.sin(Xe),[In,so]=[io+fr,no+Kr],{lng:ao,lat:co}=tt(In,so);oo.push([e(ao,Ar),e(co,Ar)])}return oo.push(oo[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[oo]},properties:{}}}({center:this.center,radiusKilometers:Xe*Ar,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");fr=it({center:this.center,radiusKilometers:Xe,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:fr.geometry,properties:{radiusKilometers:Xe}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Io.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:fr.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:Xe}])}}}class dt{constructor({store:u,mode:Xe,project:fr,unproject:Ar,pointerDistance:_r,coordinatePrecision:wr,projection:Kr}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=u,this.mode=Xe,this.project=fr,this.unproject=Ar,this.pointerDistance=_r,this.coordinatePrecision=wr,this.projection=Kr}}function ut({unproject:u,point:Xe,pointerDistance:fr}){const Ar=fr/2,{x:_r,y:wr}=Xe;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[u(_r-Ar,wr-Ar),u(_r+Ar,wr-Ar),u(_r+Ar,wr+Ar),u(_r-Ar,wr+Ar),u(_r-Ar,wr-Ar)].map((u=>[u.lng,u.lat]))]}}}class gt extends dt{constructor(u){super(u)}create(u){const{containerX:Xe,containerY:fr}=u;return ut({unproject:this.unproject,point:{x:Xe,y:fr},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(u){super(u)}measure(u,Xe){const{x:fr,y:Ar}=this.project(Xe[0],Xe[1]);return i$1({x:fr,y:Ar},{x:u.containerX,y:u.containerY})}}class yt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=u=>this.getSnappable(u,(u=>Boolean(u.properties&&u.properties.mode===this.mode))),this.getSnappableCoordinate=(u,Xe)=>this.getSnappable(u,(u=>Boolean(u.properties&&u.properties.mode===this.mode&&u.id!==Xe))),this.config=u,this.pixelDistance=Xe,this.clickBoundingBox=fr}getSnappable(u,Xe){const fr=this.clickBoundingBox.create(u),Ar=this.store.search(fr,Xe),_r={coord:void 0,minDist:1/0};return Ar.forEach((Xe=>{let fr;if("Polygon"===Xe.geometry.type)fr=Xe.geometry.coordinates[0];else{if("LineString"!==Xe.geometry.type)return;fr=Xe.geometry.coordinates}fr.forEach((Xe=>{const fr=this.pixelDistance.measure(u,Xe);fr<_r.minDist&&fr<this.pointerDistance&&(_r.coord=Xe,_r.minDist=fr)}))})),_r.coord}}function mt(u,Xe,fr){const Ar=z(u[0]),_r=z(u[1]),wr=z(fr),Kr=H(Xe),In=Math.asin(Math.sin(_r)*Math.cos(Kr)+Math.cos(_r)*Math.sin(Kr)*Math.cos(wr));return[$$1(Ar+Math.atan2(Math.sin(wr)*Math.sin(Kr)*Math.cos(_r),Math.cos(Kr)-Math.sin(_r)*Math.sin(In))),$$1(In)]}function Ct(u,Xe){const fr=z(u[0]),Ar=z(Xe[0]),_r=z(u[1]),wr=z(Xe[1]),Kr=Math.sin(Ar-fr)*Math.cos(wr),In=Math.cos(_r)*Math.sin(wr)-Math.sin(_r)*Math.cos(wr)*Math.cos(Ar-fr);return $$1(Math.atan2(Kr,In))}function Pt(u,Xe,fr){const Ar=[],_r=u.length;let wr,Kr,In,io=0;for(let _r=0;_r<u.length&&!(Xe>=io&&_r===u.length-1);_r++){if(io>Xe&&0===Ar.length){if(wr=Xe-io,!wr)return Ar.push(u[_r]),Ar;Kr=Ct(u[_r],u[_r-1])-180,In=mt(u[_r],wr,Kr),Ar.push(In)}if(io>=fr)return wr=fr-io,wr?(Kr=Ct(u[_r],u[_r-1])-180,In=mt(u[_r],wr,Kr),Ar.push(In),Ar):(Ar.push(u[_r]),Ar);if(io>=Xe&&Ar.push(u[_r]),_r===u.length-1)return Ar;io+=Y(u[_r],u[_r+1])}if(io<Xe&&u.length===_r)throw new Error("Start position is beyond line");const no=u[u.length-1];return[no,no]}function _t(u){return u*(Math.PI/180)}function xt(u){return u*(180/Math.PI)}class Mt extends dt{constructor(u){super(u),this.config=void 0,this.config=u}generateInsertionCoordinates(u,Xe,fr){const Ar=[u,Xe];let _r=0;for(let u=0;u<Ar.length-1;u++)_r+=Y(Ar[0],Ar[1]);if(_r<=fr)return Ar;let wr=_r/fr-1;Number.isInteger(wr)||(wr=Math.floor(wr)+1);const Kr=[];for(let u=0;u<wr;u++){const Xe=Pt(Ar,fr*u,fr*(u+1));Kr.push(Xe)}const In=[];for(let u=0;u<Kr.length;u++)In.push(Kr[u][1]);return this.limitCoordinates(In)}generateInsertionGeodesicCoordinates(u,Xe,fr){const Ar=Y(u,Xe),_r=function(u,Xe,fr){const Ar=[],_r=_t(u[1]),wr=_t(u[0]),Kr=_t(Xe[1]),In=_t(Xe[0]);fr+=1;const io=2*Math.asin(Math.sqrt(Math.sin((Kr-_r)/2)**2+Math.cos(_r)*Math.cos(Kr)*Math.sin((In-wr)/2)**2));if(0===io||isNaN(io))return Ar;for(let u=0;u<=fr;u++){const Xe=u/fr,no=Math.sin((1-Xe)*io)/Math.sin(io),oo=Math.sin(Xe*io)/Math.sin(io),so=no*Math.cos(_r)*Math.cos(wr)+oo*Math.cos(Kr)*Math.cos(In),ao=no*Math.cos(_r)*Math.sin(wr)+oo*Math.cos(Kr)*Math.sin(In),co=no*Math.sin(_r)+oo*Math.sin(Kr);if(isNaN(so)||isNaN(ao)||isNaN(co))continue;const go=Math.atan2(co,Math.sqrt(so**2+ao**2)),ho=Math.atan2(ao,so);isNaN(go)||isNaN(ho)||Ar.push([xt(ho),xt(go)])}return Ar.slice(1,-1)}(u,Xe,Math.floor(Ar/fr));return this.limitCoordinates(_r)}limitCoordinates(u){return u.map((u=>[e(u[0],this.config.coordinatePrecision),e(u[1],this.config.coordinatePrecision)]))}}function bt(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]}class St extends X{constructor(u){super(u),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const Xe={start:"crosshair",close:"pointer"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,this.snappingEnabled=!(!u||void 0===u.snapping)&&u.snapping,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}this.validate=null==u?void 0:u.validation,this.insertCoordinates=null==u?void 0:u.insertCoordinates}close(){if(void 0===this.currentId)return;const u=this.store.getGeometryCopy(this.currentId);u.coordinates.pop(),this.updateGeometries([...u.coordinates],void 0,Io.Commit);const Xe=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(Xe,{mode:this.mode,action:"draw"})}updateGeometries(u,Xe,fr){if(!this.currentId)return;const Ar={type:"LineString",coordinates:u};if(this.validate&&!this.validate({type:"Feature",geometry:Ar},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:fr}))return;const _r=[{id:this.currentId,geometry:Ar}];this.closingPointId&&Xe&&_r.push({id:this.closingPointId,geometry:{type:"Point",coordinates:Xe}}),"commit"===fr&&(this.lastCommitedCoordinates=Ar.coordinates),this.store.updateGeometry(_r)}generateInsertCoordinates(u,Xe){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const fr=Y(u,Xe)/(this.insertCoordinates.value+1);let Ar=[];return"globe"===this.projection?Ar=this.insertPoint.generateInsertionGeodesicCoordinates(u,Xe,fr):"web-mercator"===this.projection&&(Ar=this.insertPoint.generateInsertionCoordinates(u,Xe,fr)),Ar}createLine(u){const[Xe]=this.store.create([{geometry:{type:"LineString",coordinates:[u,u]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[u,u],this.currentId=Xe,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(u){if(!this.currentId)return;const Xe=this.store.getGeometryCopy(this.currentId).coordinates,[fr]=this.store.create([{geometry:{type:"Point",coordinates:[...u]},properties:{mode:this.mode}}]);this.closingPointId=fr,this.setCursor(this.cursors.close);const Ar=[...Xe,u];this.updateGeometries(Ar,void 0,Io.Commit),this.currentCoordinate++}updateToLine(u,Xe){if(!this.currentId)return;const fr=this.store.getGeometryCopy(this.currentId).coordinates,[Ar,_r]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:fr[fr.length-2],{x:wr,y:Kr}=this.project(Ar,_r);if(i$1({x:wr,y:Kr},{x:Xe.x,y:Xe.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const In=[...fr,u];this.updateGeometries(In,fr[fr.length-1],Io.Commit),this.currentCoordinate++}registerBehaviors(u){this.snapping=new yt(u,new pt(u),new gt(u)),this.insertPoint=new Mt(u)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(u){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const Xe=this.store.getGeometryCopy(this.currentId).coordinates;Xe.pop();const fr=this.snappingEnabled&&this.snapping.getSnappableCoordinate(u,this.currentId)||[u.lng,u.lat];if(this.closingPointId){const[fr,Ar]=Xe[Xe.length-1],{x:_r,y:wr}=this.project(fr,Ar);i$1({x:_r,y:wr},{x:u.containerX,y:u.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let Ar=[...Xe,fr];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const u=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],Xe=fr;if(!bt(u,Xe)){const _r=this.generateInsertCoordinates(u,Xe);Ar=[...this.lastCommitedCoordinates.slice(0,-1),..._r,fr]}}this.updateGeometries(Ar,void 0,Io.Provisional)}onClick(u){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(u),this.mouseMove=!1;const Xe=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(u,this.currentId)||[u.lng,u.lat];0===this.currentCoordinate?this.createLine(Xe):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(Xe):this.currentId&&this.updateToLine(Xe,{x:u.containerX,y:u.containerY})}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel&&this.cleanUp(),u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"LineString"===u.geometry.type&&u.properties.mode===this.mode?(Xe.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,Xe.lineStringColor,u),Xe.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,Xe.lineStringWidth,u),Xe.zIndex=10,Xe):"Feature"===u.type&&"Point"===u.geometry.type&&u.properties.mode===this.mode?(Xe.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,Xe.pointColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,Xe.pointWidth,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,u),Xe.zIndex=40,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&"LineString"===u.geometry.type&&u.properties.mode===this.mode&&u.geometry.coordinates.length>=2}}function Et(u,Xe){return"Point"===u.geometry.type&&st(u.geometry.coordinates,Xe)}class wt extends X{constructor(u){super(u),this.mode="point",this.cursors=void 0;const Xe={create:"crosshair"};this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(!this.store)throw new Error("Mode must be registered first");const Xe={type:"Point",coordinates:[u.lng,u.lat]},fr={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:Xe,properties:fr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Io.Finish}))return;const[Ar]=this.store.create([{geometry:Xe,properties:fr}]);this.onFinish(Ar,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Point"===u.geometry.type&&u.properties.mode===this.mode&&(Xe.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.pointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,u),Xe.zIndex=30),Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&Et(u,this.coordinatePrecision)}}class It extends dt{constructor(u,Xe){super(u),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=u,this.pixelDistance=Xe}get ids(){return this._startEndPoints.concat()}set ids(u){}create(u,Xe){if(this.ids.length)throw new Error("Opening and closing points already created");if(u.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:u[0]},properties:{mode:Xe,[Po]:!0}},{geometry:{type:"Point",coordinates:u[u.length-2]},properties:{mode:Xe,[Po]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(u){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:u[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:u[u.length-3]}}])}isClosingPoint(u){const Xe=this.store.getGeometryCopy(this.ids[0]),fr=this.store.getGeometryCopy(this.ids[1]),Ar=this.pixelDistance.measure(u,Xe.coordinates),_r=this.pixelDistance.measure(u,fr.coordinates);return{isClosing:Ar<this.pointerDistance,isPreviousClosing:_r<this.pointerDistance}}}class Ft extends X{constructor(u){super(u),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const Xe={start:"crosshair",close:"pointer"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,this.snappingEnabled=!(!u||void 0===u.snapping)&&u.snapping,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}}close(){if(void 0===this.currentId)return;const u=this.store.getGeometryCopy(this.currentId).coordinates[0];if(u.length<5)return;if(!this.updatePolygonGeometry([...u.slice(0,-2),u[0]],Io.Finish))return;const Xe=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(Xe,{mode:this.mode,action:"draw"})}registerBehaviors(u){this.pixelDistance=new pt(u),this.snapping=new yt(u,this.pixelDistance,new gt(u)),this.closingPoints=new It(u,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(u){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0,fr=this.store.getGeometryCopy(this.currentId).coordinates[0];let Ar;if(Xe&&(u.lng=Xe[0],u.lat=Xe[1]),1===this.currentCoordinate){const Xe=1/Math.pow(10,this.coordinatePrecision-1),_r=Math.max(1e-6,Xe);Ar=[fr[0],[u.lng,u.lat],[u.lng,u.lat-_r],fr[0]]}else if(2===this.currentCoordinate)Ar=[fr[0],fr[1],[u.lng,u.lat],fr[0]];else{const{isClosing:Xe,isPreviousClosing:_r}=this.closingPoints.isClosingPoint(u);_r||Xe?(this.setCursor(this.cursors.close),Ar=[...fr.slice(0,-2),fr[0],fr[0]]):Ar=[...fr.slice(0,-2),[u.lng,u.lat],fr[0]]}this.updatePolygonGeometry(Ar,Io.Provisional)}updatePolygonGeometry(u,Xe){if(!this.currentId)return!1;const fr={type:"Polygon",coordinates:[u]};return!(this.validate&&!this.validate({type:"Feature",geometry:fr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Xe})||(this.store.updateGeometry([{id:this.currentId,geometry:fr}]),0))}onClick(u){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(u),this.mouseMove=!1,0===this.currentCoordinate){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(u):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const[fr]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat]]]},properties:{mode:this.mode}}]);this.currentId=fr,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const fr=this.store.getGeometryCopy(this.currentId);if(bt([u.lng,u.lat],fr.coordinates[0][0]))return;if(!this.updatePolygonGeometry([fr.coordinates[0][0],[u.lng,u.lat],[u.lng,u.lat],fr.coordinates[0][0]],Io.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const fr=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([u.lng,u.lat],fr[1]))return;if(!this.updatePolygonGeometry([fr[0],fr[1],[u.lng,u.lat],[u.lng,u.lat],fr[0]],Io.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(fr,"polygon"),this.currentCoordinate++}else if(this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0,fr=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:Ar,isPreviousClosing:_r}=this.closingPoints.isClosingPoint(u);if(_r||Ar)this.close();else{if(Xe&&(u.lng=Xe[0],u.lat=Xe[1]),bt([u.lng,u.lat],fr[this.currentCoordinate-1]))return;const Ar=function(u=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:u},properties:{}}}([[...fr.slice(0,-1),[u.lng,u.lat],fr[0]]]);if(!this.updatePolygonGeometry(Ar.geometry.coordinates[0],Io.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(Ar.geometry.coordinates[0])}}}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const u=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(u.properties.mode===this.mode){if("Polygon"===u.geometry.type)return Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe;if("Point"===u.geometry.type)return Xe.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,u),Xe.zIndex=30,Xe}return Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&at(u,this.coordinatePrecision)}}class Dt extends X{constructor(u){super(u),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const Xe={start:"crosshair"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}}updateRectangle(u,Xe){if(1===this.clickCount&&this.center&&this.currentRectangleId){const fr=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],Ar={type:"Polygon",coordinates:[[fr,[u.lng,fr[1]],[u.lng,u.lat],[fr[0],u.lat],fr]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:Ar},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Xe}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:Ar}])}}close(){const u=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),u&&this.onFinish(u,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(0===this.clickCount){this.center=[u.lng,u.lat];const[Xe]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=Xe,this.clickCount++,this.setDrawing()}else this.updateRectangle(u,Io.Finish),this.close()}onMouseMove(u){this.updateRectangle(u,Io.Provisional)}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==u&&this.store.delete([u])}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Polygon"===u.geometry.type&&u.properties.mode===this.mode?(Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&lt(u,this.coordinatePrecision)}}class kt extends X{constructor(u){super({styles:u.styles}),this.type=ss.Render,this.mode="render",this.mode=u.modeName}registerBehaviors(u){this.mode=u.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(u){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",u),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,u),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",u),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,u),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",u),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,u),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",u),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,u),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,u),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",u),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,u)}}validateFeature(u){return super.validateFeature(u)&&(Et(u,this.coordinatePrecision)||at(u,this.coordinatePrecision)||function(u,Xe){return"LineString"===u.geometry.type&&u.geometry.coordinates.length>=2&&u.geometry.coordinates.every((u=>st(u,Xe)))}(u,this.coordinatePrecision))}}function Ot(u,Xe){const fr=u,Ar=Xe,_r=z(fr[1]),wr=z(Ar[1]);let Kr=z(Ar[0]-fr[0]);Kr>Math.PI&&(Kr-=2*Math.PI),Kr<-Math.PI&&(Kr+=2*Math.PI);const In=Math.log(Math.tan(wr/2+Math.PI/4)/Math.tan(_r/2+Math.PI/4)),io=($$1(Math.atan2(Kr,In))+360)%360;return io>180?-(360-io):io}function jt(u,Xe,fr){let Ar=Xe;Xe<0&&(Ar=-Math.abs(Ar));const _r=Ar/sa,wr=u[0]*Math.PI/180,Kr=z(u[1]),In=z(fr),io=_r*Math.cos(In);let no=Kr+io;Math.abs(no)>Math.PI/2&&(no=no>0?Math.PI-no:-Math.PI-no);const oo=Math.log(Math.tan(no/2+Math.PI/4)/Math.tan(Kr/2+Math.PI/4)),so=Math.abs(oo)>1e-11?io/oo:Math.cos(Kr),ao=[(180*(wr+_r*Math.sin(In)/so)/Math.PI+540)%360-180,180*no/Math.PI];return ao[0]+=ao[0]-u[0]>180?-360:u[0]-ao[0]>180?360:0,ao}function Lt(u,Xe,fr,Ar,_r){const wr=Ar(u[0],u[1]),Kr=Ar(Xe[0],Xe[1]),{lng:In,lat:io}=_r((wr.x+Kr.x)/2,(wr.y+Kr.y)/2);return[e(In,fr),e(io,fr)]}function Wt(u,Xe,fr){const Ar=jt(u,1e3*Y(u,Xe)/2,Ot(u,Xe));return[e(Ar[0],fr),e(Ar[1],fr)]}function Bt({featureCoords:u,precision:Xe,unproject:fr,project:Ar,projection:_r}){const wr=[];for(let Kr=0;Kr<u.length-1;Kr++){let In;if("web-mercator"===_r)In=Lt(u[Kr],u[Kr+1],Xe,Ar,fr);else{if("globe"!==_r)throw new Error("Invalid projection");In=Wt(u[Kr],u[Kr+1],Xe)}wr.push(In)}return wr}class Gt extends dt{constructor(u,Xe){super(u),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=u,this.selectionPointBehavior=Xe}get ids(){return this._midPoints.concat()}set ids(u){}insert(u,Xe){const fr=this.store.getGeometryCopy(u),{midPointFeatureId:Ar,midPointSegment:_r}=this.store.getPropertiesCopy(u),wr=this.store.getGeometryCopy(Ar),Kr="Polygon"===wr.type?wr.coordinates[0]:wr.coordinates;Kr.splice(_r+1,0,fr.coordinates),wr.coordinates="Polygon"===wr.type?[Kr]:Kr,this.store.updateGeometry([{id:Ar,geometry:wr}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(Kr,Ar,Xe),this.selectionPointBehavior.create(Kr,wr.type,Ar)}create(u,Xe,fr){if(!this.store.has(Xe))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(u,Xe,fr,Ar,_r,wr){return Bt({featureCoords:u,precision:fr,project:Ar,unproject:_r,projection:wr}).map(((u,fr)=>({geometry:{type:"Point",coordinates:u},properties:Xe(fr)})))}(u,(u=>({mode:this.mode,[Mo]:!0,midPointSegment:u,midPointFeatureId:Xe})),fr,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(u){if(0!==this._midPoints.length)return Bt({featureCoords:u,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((u,Xe)=>({id:this._midPoints[Xe],geometry:{type:"Point",coordinates:u}})))}}class Nt extends dt{constructor(u){super(u),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(u){}create(u,Xe,fr){this._selectionPoints=this.store.create(function(u,Xe,fr){const Ar=[],_r="Polygon"===Xe?u.length-1:u.length;for(let Xe=0;Xe<_r;Xe++)Ar.push({geometry:{type:"Point",coordinates:u[Xe]},properties:fr(Xe)});return Ar}(u,Xe,(u=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:fr,index:u}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(u){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((Xe,fr)=>({id:Xe,geometry:{type:"Point",coordinates:u[fr]}})))}getOneUpdated(u,Xe){if(void 0!==this._selectionPoints[u])return{id:this._selectionPoints[u],geometry:{type:"Point",coordinates:Xe}}}}function Vt(u,Xe){let fr=!1;for(let Kr=0,In=Xe.length;Kr<In;Kr++){const In=Xe[Kr];for(let Xe=0,Kr=In.length,io=Kr-1;Xe<Kr;io=Xe++)(_r=In[Xe])[1]>(Ar=u)[1]!=(wr=In[io])[1]>Ar[1]&&Ar[0]<(wr[0]-_r[0])*(Ar[1]-_r[1])/(wr[1]-_r[1])+_r[0]&&(fr=!fr)}var Ar,_r,wr;return fr}const At=(u,Xe,fr)=>{const o=u=>u*u,r=(u,Xe)=>o(u.x-Xe.x)+o(u.y-Xe.y);return Math.sqrt(((u,Xe,fr)=>{const Ar=r(Xe,fr);if(0===Ar)return r(u,Xe);let _r=((u.x-Xe.x)*(fr.x-Xe.x)+(u.y-Xe.y)*(fr.y-Xe.y))/Ar;return _r=Math.max(0,Math.min(1,_r)),r(u,{x:Xe.x+_r*(fr.x-Xe.x),y:Xe.y+_r*(fr.y-Xe.y)})})(u,Xe,fr))};class Rt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=u,this.createClickBoundingBox=Xe,this.pixelDistance=fr}find(u,Xe){let fr,Ar,_r,wr,Kr=1/0,In=1/0,io=1/0;const no=this.createClickBoundingBox.create(u),oo=this.store.search(no);for(let no=0;no<oo.length;no++){const so=oo[no],ao=so.geometry;if("Point"===ao.type){if(so.properties.selectionPoint||!Xe&&so.properties[Mo])continue;const Ar=this.pixelDistance.measure(u,ao.coordinates);so.properties[Mo]&&Ar<this.pointerDistance&&Ar<io?(io=Ar,_r=so):!so.properties[Mo]&&Ar<this.pointerDistance&&Ar<Kr&&(Kr=Ar,fr=so)}else if("LineString"===ao.type){if(fr)continue;for(let Xe=0;Xe<ao.coordinates.length-1;Xe++){const fr=ao.coordinates[Xe],_r=ao.coordinates[Xe+1],wr=At({x:u.containerX,y:u.containerY},this.project(fr[0],fr[1]),this.project(_r[0],_r[1]));wr<this.pointerDistance&&wr<In&&(In=wr,Ar=so)}}else if("Polygon"===ao.type){if(fr||Ar)continue;Vt([u.lng,u.lat],ao.coordinates)&&(wr=so)}}return{clickedFeature:fr||Ar||wr,clickedMidPoint:_r}}}class Tt extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=u,this.featuresAtMouseEvent=Xe,this.selectionPoints=fr,this.midPoints=Ar}startDragging(u,Xe){this.draggedFeatureId=Xe,this.dragPosition=[u.lng,u.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(u,Xe){const{clickedFeature:fr}=this.featuresAtMouseEvent.find(u,!0);return!(!fr||fr.id!==Xe)}drag(u,Xe){if(!this.draggedFeatureId)return;const fr=this.store.getGeometryCopy(this.draggedFeatureId),Ar=[u.lng,u.lat];if("Polygon"===fr.type||"LineString"===fr.type){let _r,wr;if("Polygon"===fr.type?(_r=fr.coordinates[0],wr=_r.length-1):(_r=fr.coordinates,wr=_r.length),!this.dragPosition)return!1;for(let u=0;u<wr;u++){const Xe=_r[u],fr=[this.dragPosition[0]-Ar[0],this.dragPosition[1]-Ar[1]],wr=e(Xe[0]-fr[0],this.config.coordinatePrecision),Kr=e(Xe[1]-fr[1],this.config.coordinatePrecision);if(wr>180||wr<-180||Kr>90||Kr<-90)return!1;_r[u]=[wr,Kr]}"Polygon"===fr.type&&(_r[_r.length-1]=[_r[0][0],_r[0][1]]);const Kr=this.selectionPoints.getUpdated(_r)||[],In=this.midPoints.getUpdated(_r)||[];if(Xe&&!Xe({type:"Feature",id:this.draggedFeatureId,geometry:fr,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:Io.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:fr},...Kr,...In]),this.dragPosition=[u.lng,u.lat]}else"Point"===fr.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:Ar}}]),this.dragPosition=[u.lng,u.lat])}}class Xt extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=u,this.pixelDistance=Xe,this.selectionPoints=fr,this.midPoints=Ar}getClosestCoordinate(u,Xe){const fr={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let Ar;if("LineString"===Xe.type)Ar=Xe.coordinates;else{if("Polygon"!==Xe.type)return fr;Ar=Xe.coordinates[0]}for(let _r=0;_r<Ar.length;_r++){const wr=this.pixelDistance.measure(u,Ar[_r]);if(wr<this.pointerDistance&&wr<fr.dist){const u="Polygon"===Xe.type&&(_r===Ar.length-1||0===_r);fr.dist=wr,fr.index=u?0:_r,fr.isFirstOrLastPolygonCoord=u}}return fr}getDraggableIndex(u,Xe){const fr=this.store.getGeometryCopy(Xe),Ar=this.getClosestCoordinate(u,fr);return-1===Ar.index?-1:Ar.index}drag(u,Xe,fr){if(!this.draggedCoordinate.id)return!1;const Ar=this.draggedCoordinate.index,_r=this.store.getGeometryCopy(this.draggedCoordinate.id),wr="LineString"===_r.type?_r.coordinates:_r.coordinates[0],Kr=[u.lng,u.lat];if(u.lng>180||u.lng<-180||u.lat>90||u.lat<-90)return!1;if("Polygon"!==_r.type||Ar!==wr.length-1&&0!==Ar)wr[Ar]=Kr;else{const u=wr.length-1;wr[0]=Kr,wr[u]=Kr}const In=this.selectionPoints.getOneUpdated(Ar,Kr),io=In?[In]:[],no=this.midPoints.getUpdated(wr)||[];return!("Point"!==_r.type&&!Xe&&ot({type:"Feature",geometry:_r,properties:{}})||fr&&!fr({type:"Feature",id:this.draggedCoordinate.id,geometry:_r,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:Io.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:_r},...io,...no]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(u,Xe){this.draggedCoordinate={id:u,index:Xe}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(u){let Xe=0,fr=0,Ar=0;return("Polygon"===u.geometry.type?u.geometry.coordinates[0].slice(0,-1):u.geometry.coordinates).forEach((u=>{Xe+=u[0],fr+=u[1],Ar++}),!0),[Xe/Ar,fr/Ar]}function Yt(u,Xe){u[0]+=u[0]-Xe[0]>180?-360:Xe[0]-u[0]>180?360:0;const fr=sa,Ar=Xe[1]*Math.PI/180,_r=u[1]*Math.PI/180,wr=_r-Ar;let Kr=Math.abs(u[0]-Xe[0])*Math.PI/180;Kr>Math.PI&&(Kr-=2*Math.PI);const In=Math.log(Math.tan(_r/2+Math.PI/4)/Math.tan(Ar/2+Math.PI/4)),io=Math.abs(In)>1e-11?wr/In:Math.cos(Ar);return Math.sqrt(wr*wr+io*io*Kr*Kr)*fr}function Kt(u){const Xe=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((u=>{const{x:Xe,y:fr}=Q(u[0],u[1]);return[Xe,fr]}));return"Polygon"===u.geometry.type?function(u){let Xe=0,fr=0,Ar=0;const _r=u.length;for(let wr=0;wr<_r-1;wr++){const[_r,Kr]=u[wr],[In,io]=u[wr+1],no=_r*io-In*Kr;Xe+=no,fr+=(_r+In)*no,Ar+=(Kr+io)*no}return Xe/=2,fr/=6*Xe,Ar/=6*Xe,{x:fr,y:Ar}}(Xe):function(u){const Xe=u.length;let fr=0,Ar=0;for(let _r=0;_r<Xe;_r++){const[Xe,wr]=u[_r];fr+=Xe,Ar+=wr}return{x:fr/Xe,y:Ar/Xe}}(Xe)}class zt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=u,this.selectionPoints=Xe,this.midPoints=fr}reset(){this.lastBearing=void 0}rotate(u,Xe,fr){const Ar=this.store.getGeometryCopy(Xe);if("Polygon"!==Ar.type&&"LineString"!==Ar.type)return;const _r=[u.lng,u.lat];let wr;const Kr={type:"Feature",geometry:Ar,properties:{}};if("web-mercator"===this.config.projection){if(wr=function vt({x:u,y:Xe},{x:fr,y:Ar}){let _r=Math.atan2(Ar-Xe,fr-u);return _r*=180/Math.PI,_r>180?_r-=360:_r<-180&&(_r+=360),_r}(Kt(Kr),Q(u.lng,u.lat)),!this.lastBearing)return void(this.lastBearing=wr);((u,Xe)=>{if(0===Xe||360===Xe||-360===Xe)return u;const fr=.017453292519943295*Xe,Ar=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((([u,Xe])=>Q(u,Xe))),_r=Ar.reduce(((u,Xe)=>({x:u.x+Xe.x,y:u.y+Xe.y})),{x:0,y:0});_r.x/=Ar.length,_r.y/=Ar.length;const wr=Ar.map((u=>({x:_r.x+(u.x-_r.x)*Math.cos(fr)-(u.y-_r.y)*Math.sin(fr),y:_r.y+(u.x-_r.x)*Math.sin(fr)+(u.y-_r.y)*Math.cos(fr)}))).map((({x:u,y:Xe})=>[tt(u,Xe).lng,tt(u,Xe).lat]));"Polygon"===u.geometry.type?u.geometry.coordinates[0]=wr:(console.log("rotatedCoordinates linestring",wr),u.geometry.coordinates=wr)})(Kr,-(this.lastBearing-wr))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(wr=Ot(Ut({type:"Feature",geometry:Ar,properties:{}}),_r),!this.lastBearing)return void(this.lastBearing=wr+180);!function(u,Xe){if(0===Xe||360===Xe||-360===Xe)return u;const fr=Ut(u);("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).forEach((u=>{const Ar=Ot(fr,u)+Xe,_r=Yt(fr,u),wr=jt(fr,_r,Ar);u[0]=wr[0],u[1]=wr[1]}))}(Kr,-(this.lastBearing-(wr+180)))}const In="Polygon"===Ar.type?Ar.coordinates[0]:Ar.coordinates;In.forEach((u=>{u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision)}));const io=this.midPoints.getUpdated(In)||[],no=this.selectionPoints.getUpdated(In)||[];if(fr&&!fr({id:Xe,type:"Feature",geometry:Ar,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:Io.Provisional}))return!1;this.store.updateGeometry([{id:Xe,geometry:Ar},...no,...io]),"web-mercator"===this.projection?this.lastBearing=wr:"globe"===this.projection&&(this.lastBearing=wr+180)}}class Ht extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=u,this.selectionPoints=Xe,this.midPoints=fr}reset(){this.lastDistance=void 0}scale(u,Xe,fr){const Ar=this.store.getGeometryCopy(Xe);if("Polygon"!==Ar.type&&"LineString"!==Ar.type)return;const _r=[u.lng,u.lat],wr={type:"Feature",geometry:Ar,properties:{}};let Kr;const In=Kt(wr);if("web-mercator"===this.config.projection){const Xe=Q(u.lng,u.lat);Kr=i$1(In,Xe)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");Kr=Y(Ut({type:"Feature",geometry:Ar,properties:{}}),_r)}if(!this.lastDistance)return void(this.lastDistance=Kr);const io=1-(this.lastDistance-Kr)/Kr;if("web-mercator"===this.config.projection){const{lng:u,lat:Xe}=tt(In.x,In.y);!function(u,Xe,fr){if(1===Xe)return u;const Ar=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((([u,Xe])=>Q(u,Xe))),_r=Q(fr[0],fr[1]),wr=Ar.map((u=>({x:_r.x+(u.x-_r.x)*Xe,y:_r.y+(u.y-_r.y)*Xe}))).map((({x:u,y:Xe})=>[tt(u,Xe).lng,tt(u,Xe).lat]));"Polygon"===u.geometry.type?u.geometry.coordinates[0]=wr:u.geometry.coordinates=wr}(wr,io,[u,Xe])}else"globe"===this.config.projection&&function(u,Xe,fr,Ar="xy"){1===Xe||("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).forEach((u=>{const _r=Yt(fr,u),wr=Ot(fr,u),Kr=jt(fr,_r*Xe,wr);"x"!==Ar&&"xy"!==Ar||(u[0]=Kr[0]),"y"!==Ar&&"xy"!==Ar||(u[1]=Kr[1])}))}(wr,io,Ut(wr));const no="Polygon"===Ar.type?Ar.coordinates[0]:Ar.coordinates;no.forEach((u=>{u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision)}));const oo=this.midPoints.getUpdated(no)||[],so=this.selectionPoints.getUpdated(no)||[];if(fr&&!fr({id:Xe,type:"Feature",geometry:Ar,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:Io.Provisional}))return!1;this.store.updateGeometry([{id:Xe,geometry:Ar},...so,...oo]),this.lastDistance=Kr}}class $t extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=u,this.pixelDistance=Xe,this.selectionPoints=fr,this.midPoints=Ar}getClosestCoordinate(u,Xe){const fr={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let Ar;if("LineString"===Xe.type)Ar=Xe.coordinates;else{if("Polygon"!==Xe.type)return fr;Ar=Xe.coordinates[0]}for(let _r=0;_r<Ar.length;_r++){const wr=this.pixelDistance.measure(u,Ar[_r]);if(wr<this.pointerDistance&&wr<fr.dist){const u="Polygon"===Xe.type&&(_r===Ar.length-1||0===_r);fr.dist=wr,fr.index=u?0:_r,fr.isFirstOrLastPolygonCoord=u}}return fr}isValidDragWebMercator(u,Xe,fr){switch(u){case 0:if(Xe<=0||fr>=0)return!1;break;case 1:if(fr>=0)return!1;break;case 2:if(Xe>=0||fr>=0)return!1;break;case 3:if(Xe>=0)return!1;break;case 4:if(Xe>=0||fr<=0)return!1;break;case 5:if(fr<=0)return!1;break;case 6:if(Xe<=0||fr<=0)return!1;break;case 7:if(Xe<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const u=this.getFeature(this.draggedCoordinate.id);if(!u)return null;const Xe=this.getNormalisedCoordinates(u.geometry);return{boundingBox:this.getBBoxWebMercator(Xe),feature:u,updatedCoords:Xe,selectedCoordinate:Xe[this.draggedCoordinate.index]}}centerWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{feature:fr,boundingBox:Ar,updatedCoords:_r,selectedCoordinate:wr}=Xe,Kr=Kt(fr);if(!Kr)return null;const In=Q(wr[0],wr[1]),{closestBBoxIndex:io}=this.getIndexesWebMercator(Ar,In),no=Q(u.lng,u.lat);return this.scaleWebMercator({closestBBoxIndex:io,updatedCoords:_r,webMercatorCursor:no,webMercatorSelected:In,webMercatorOrigin:Kr}),_r}centerFixedWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{feature:fr,boundingBox:Ar,updatedCoords:_r,selectedCoordinate:wr}=Xe,Kr=Kt(fr);if(!Kr)return null;const In=Q(wr[0],wr[1]),{closestBBoxIndex:io}=this.getIndexesWebMercator(Ar,In),no=Q(u.lng,u.lat);return this.scaleFixedWebMercator({closestBBoxIndex:io,updatedCoords:_r,webMercatorCursor:no,webMercatorSelected:In,webMercatorOrigin:Kr}),_r}scaleFixedWebMercator({closestBBoxIndex:u,webMercatorOrigin:Xe,webMercatorSelected:fr,webMercatorCursor:Ar,updatedCoords:_r}){if(!this.isValidDragWebMercator(u,Xe.x-Ar.x,Xe.y-Ar.y))return null;let wr=i$1(Xe,Ar)/i$1(Xe,fr);return wr<0&&(wr=this.minimumScale),this.performWebMercatorScale(_r,Xe.x,Xe.y,wr,wr),_r}oppositeFixedWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{boundingBox:fr,updatedCoords:Ar,selectedCoordinate:_r}=Xe,wr=Q(_r[0],_r[1]),{oppositeBboxIndex:Kr,closestBBoxIndex:In}=this.getIndexesWebMercator(fr,wr),io={x:fr[Kr][0],y:fr[Kr][1]},no=Q(u.lng,u.lat);return this.scaleFixedWebMercator({closestBBoxIndex:In,updatedCoords:Ar,webMercatorCursor:no,webMercatorSelected:wr,webMercatorOrigin:io}),Ar}oppositeWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{boundingBox:fr,updatedCoords:Ar,selectedCoordinate:_r}=Xe,wr=Q(_r[0],_r[1]),{oppositeBboxIndex:Kr,closestBBoxIndex:In}=this.getIndexesWebMercator(fr,wr),io={x:fr[Kr][0],y:fr[Kr][1]},no=Q(u.lng,u.lat);return this.scaleWebMercator({closestBBoxIndex:In,updatedCoords:Ar,webMercatorCursor:no,webMercatorSelected:wr,webMercatorOrigin:io}),Ar}scaleWebMercator({closestBBoxIndex:u,webMercatorOrigin:Xe,webMercatorSelected:fr,webMercatorCursor:Ar,updatedCoords:_r}){const wr=Xe.x-Ar.x,Kr=Xe.y-Ar.y;if(!this.isValidDragWebMercator(u,wr,Kr))return null;let In=1;0!==wr&&1!==u&&5!==u&&(In=1-(Xe.x-fr.x-wr)/wr);let io=1;return 0!==Kr&&3!==u&&7!==u&&(io=1-(Xe.y-fr.y-Kr)/Kr),this.validateScale(In,io)?(In<0&&(In=this.minimumScale),io<0&&(io=this.minimumScale),this.performWebMercatorScale(_r,Xe.x,Xe.y,In,io),_r):null}getFeature(u){if(null===this.draggedCoordinate.id)return null;const Xe=this.store.getGeometryCopy(u);return"Polygon"!==Xe.type&&"LineString"!==Xe.type?null:{type:"Feature",geometry:Xe,properties:{}}}getNormalisedCoordinates(u){return"Polygon"===u.type?u.coordinates[0]:u.coordinates}validateScale(u,Xe){const fr=!isNaN(u)&&Xe<Number.MAX_SAFE_INTEGER,Ar=!isNaN(Xe)&&Xe<Number.MAX_SAFE_INTEGER;return fr&&Ar}performWebMercatorScale(u,Xe,fr,Ar,_r){u.forEach((u=>{const{x:wr,y:Kr}=Q(u[0],u[1]),In=Xe+(wr-Xe)*Ar,io=fr+(Kr-fr)*_r,{lng:no,lat:oo}=tt(In,io);u[0]=no,u[1]=oo}))}getBBoxWebMercator(u){const Xe=[1/0,1/0,-1/0,-1/0];(u=u.map((u=>{const{x:Xe,y:fr}=Q(u[0],u[1]);return[Xe,fr]}))).forEach((([u,fr])=>{u<Xe[0]&&(Xe[0]=u),fr<Xe[1]&&(Xe[1]=fr),u>Xe[2]&&(Xe[2]=u),fr>Xe[3]&&(Xe[3]=fr)}));const[fr,Ar,_r,wr]=Xe;return[[fr,wr],[(fr+_r)/2,wr],[_r,wr],[_r,wr+(Ar-wr)/2],[_r,Ar],[(fr+_r)/2,Ar],[fr,Ar],[fr,wr+(Ar-wr)/2]]}getIndexesWebMercator(u,Xe){let fr,Ar=1/0;for(let _r=0;_r<u.length;_r++){const wr=i$1({x:Xe.x,y:Xe.y},{x:u[_r][0],y:u[_r][1]});wr<Ar&&(fr=_r,Ar=wr)}if(void 0===fr)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[fr],closestBBoxIndex:fr}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(u,Xe){this.draggedCoordinate={id:u,index:Xe}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(u,Xe){const fr=this.store.getGeometryCopy(Xe),Ar=this.getClosestCoordinate(u,fr);return-1===Ar.index?-1:Ar.index}drag(u,Xe,fr){if(!this.draggedCoordinate.id)return!1;const Ar=this.getFeature(this.draggedCoordinate.id);if(!Ar)return!1;let _r=null;if("center"===Xe?_r=this.centerWebMercatorDrag(u):"opposite"===Xe?_r=this.oppositeWebMercatorDrag(u):"center-fixed"===Xe?_r=this.centerFixedWebMercatorDrag(u):"opposite-fixed"===Xe&&(_r=this.oppositeFixedWebMercatorDrag(u)),!_r)return!1;for(let u=0;u<_r.length;u++){const Xe=_r[u];if(Xe[0]=e(Xe[0],this.coordinatePrecision),Xe[1]=e(Xe[1],this.coordinatePrecision),!st(Xe,this.coordinatePrecision))return!1}const wr=this.midPoints.getUpdated(_r)||[],Kr=this.selectionPoints.getUpdated(_r)||[],In={type:Ar.geometry.type,coordinates:"Polygon"===Ar.geometry.type?[_r]:_r};return!(fr&&!fr({id:this.draggedCoordinate.id,type:"Feature",geometry:In,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:Io.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:In},...Kr,...wr]),0))}}class Jt extends U{constructor(u){var Xe;super(u),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=u&&u.flags?u.flags:{};const fr={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=u&&u.cursors?t({},fr,u.cursors):fr,null===(null==u?void 0:u.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const Xe={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}if(this.dragEventThrottle=u&&void 0!==u.dragEventThrottle&&u.dragEventThrottle||5,this.allowManualDeselection=null==(Xe=null==u?void 0:u.allowManualDeselection)||Xe,u&&u.flags&&u.flags)for(const Xe in u.flags){const fr=u.flags[Xe].feature;fr&&fr.validation&&(this.validations[Xe]=fr.validation)}}selectFeature(u){this.select(u,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(u){this.pixelDistance=new pt(u),this.clickBoundingBox=new gt(u),this.featuresAtMouseEvent=new Rt(u,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(u),this.midPoints=new Gt(u,this.selectionPoints),this.rotateFeature=new zt(u,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(u,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(u,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(u,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(u,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const u=this.selected.filter((u=>this.store.has(u))).map((u=>({id:u,property:xo,value:!1})));this.store.updateProperty(u),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(u){if(!this.selectionPoints.ids.length)return;let Xe,fr=1/0;if(this.selectionPoints.ids.forEach((Ar=>{const _r=this.store.getGeometryCopy(Ar),wr=this.pixelDistance.measure(u,_r.coordinates);wr<this.pointerDistance&&wr<fr&&(fr=wr,Xe=this.store.getPropertiesCopy(Ar))})),!Xe)return;const Ar=Xe.selectionPointFeatureId,_r=Xe.index,wr=this.store.getPropertiesCopy(Ar),Kr=this.flags[wr.mode],In=this.validations[wr.mode];if(!(Kr&&Kr.feature&&Kr.feature.coordinates&&Kr.feature.coordinates.deletable))return;const io=this.store.getGeometryCopy(Ar);let no;if("Polygon"===io.type){if(no=io.coordinates[0],no.length<=4)return}else if("LineString"===io.type&&(no=io.coordinates,no.length<=3))return;if(no){if("Polygon"===io.type&&0===_r||_r===no.length-1?(no.shift(),no.pop(),no.push([no[0][0],no[0][1]])):no.splice(_r,1),In&&!In({id:Ar,type:"Feature",geometry:io,properties:wr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Io.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:Ar,geometry:io}]),this.selectionPoints.create(no,io.type,Ar),Kr&&Kr.feature&&Kr.feature.coordinates&&Kr.feature.coordinates.midpoints&&this.midPoints.create(no,Ar,this.coordinatePrecision)}}select(u,Xe=!0){if(this.selected[0]===u)return;const{mode:fr}=this.store.getPropertiesCopy(u),Ar=this.flags[fr];if(!Ar||!Ar.feature)return;const _r=this.selected[0];if(_r){if(_r===u)return;this.deselect()}Xe&&this.setCursor(this.cursors.pointerOver),this.selected=[u],this.store.updateProperty([{id:u,property:"selected",value:!0}]),this.onSelect(u);const{type:wr,coordinates:Kr}=this.store.getGeometryCopy(u);if("LineString"!==wr&&"Polygon"!==wr)return;const In="LineString"===wr?Kr:Kr[0];In&&Ar&&Ar.feature.coordinates&&(this.selectionPoints.create(In,wr,u),Ar.feature.coordinates.midpoints&&this.midPoints.create(In,u,this.coordinatePrecision))}onLeftClick(u){const{clickedFeature:Xe,clickedMidPoint:fr}=this.featuresAtMouseEvent.find(u,this.selected.length>0);if(this.selected.length&&fr)this.midPoints.insert(fr.id,this.coordinatePrecision);else if(Xe&&Xe.id)this.select(Xe.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(u){"right"!==u.button?"left"===u.button&&this.onLeftClick(u):this.onRightClick(u)}canScale(u){return this.keyEvents.scale&&this.keyEvents.scale.every((Xe=>u.heldKeys.includes(Xe)))}canRotate(u){return this.keyEvents.rotate&&this.keyEvents.rotate.every((Xe=>u.heldKeys.includes(Xe)))}preventDefaultKeyEvent(u){const Xe=this.canRotate(u),fr=this.canScale(u);(Xe||fr)&&u.preventDefault()}onKeyDown(u){this.preventDefaultKeyEvent(u)}onKeyUp(u){if(this.preventDefaultKeyEvent(u),this.keyEvents.delete&&u.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&u.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(u,Xe){if(!this.selected.length)return;const fr=this.store.getPropertiesCopy(this.selected[0]),Ar=this.flags[fr.mode];if(!(Ar&&Ar.feature&&(Ar.feature.draggable||Ar.feature.coordinates&&Ar.feature.coordinates.draggable||Ar.feature.coordinates&&Ar.feature.coordinates.resizable)))return;this.dragEventCount=0;const _r=this.selected[0],wr=this.dragCoordinate.getDraggableIndex(u,_r);return Ar&&Ar.feature&&Ar.feature.coordinates&&(Ar.feature.coordinates.draggable||Ar.feature.coordinates.resizable)&&-1!==wr?(this.setCursor(this.cursors.dragStart),Ar.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(_r,wr):this.dragCoordinate.startDragging(_r,wr),void Xe(!1)):Ar&&Ar.feature&&Ar.feature.draggable&&this.dragFeature.canDrag(u,_r)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(u,_r),void Xe(!1)):void 0}onDrag(u,Xe){const fr=this.selected[0];if(!fr)return;const Ar=this.store.getPropertiesCopy(fr),_r=this.flags[Ar.mode],wr=!0===(_r&&_r.feature&&_r.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const Kr=this.validations[Ar.mode];if(_r&&_r.feature&&_r.feature.rotateable&&this.canRotate(u))return Xe(!1),void this.rotateFeature.rotate(u,fr,Kr);if(_r&&_r.feature&&_r.feature.scaleable&&this.canScale(u))return Xe(!1),void this.scaleFeature.scale(u,fr,Kr);if(this.dragCoordinateResizeFeature.isDragging()&&_r.feature&&_r.feature.coordinates&&_r.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return Xe(!1),void this.dragCoordinateResizeFeature.drag(u,_r.feature.coordinates.resizable,Kr)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(u,wr,Kr):this.dragFeature.isDragging()?this.dragFeature.drag(u,Kr):Xe(!0)}onDragEnd(u,Xe){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),Xe(!0)}onMouseMove(u){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let Xe=!1;this.midPoints.ids.forEach((fr=>{if(Xe)return;const Ar=this.store.getGeometryCopy(fr);this.pixelDistance.measure(u,Ar.coordinates)<this.pointerDistance&&(Xe=!0)}));let fr=!1;if(this.selectionPoints.ids.forEach((Ar=>{const _r=this.store.getGeometryCopy(Ar);this.pixelDistance.measure(u,_r.coordinates)<this.pointerDistance&&(Xe=!1,fr=!0)})),Xe)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:Ar}=this.featuresAtMouseEvent.find(u,!0);this.setCursor(this.selected.length>0&&(Ar&&Ar.id===this.selected[0]||fr)?this.cursors.pointerOver:"unset")}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(u.properties.mode===this.mode&&"Point"===u.geometry.type){if(u.properties.selectionPoint)return Xe.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,Xe.pointWidth,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,u),Xe.zIndex=30,Xe;if(u.properties.midPoint)return Xe.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,u),Xe.zIndex=40,Xe}else if(u.properties[xo]){if("Polygon"===u.geometry.type)return Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,Xe.polygonFillColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,Xe.polygonOutlineColor,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe;if("LineString"===u.geometry.type)return Xe.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,Xe.lineStringColor,u),Xe.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,Xe.lineStringWidth,u),Xe.zIndex=10,Xe;if("Point"===u.geometry.type)return Xe.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,Xe.pointOutlineWidth,u),Xe.zIndex=10,Xe}return Xe}}class Zt extends X{constructor(...u){super(...u),this.type=ss.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(u,Xe,fr,Ar,_r){for(;Ar>fr;){if(Ar-fr>600){const wr=Ar-fr+1,Kr=Xe-fr+1,In=Math.log(wr),io=.5*Math.exp(2*In/3),no=.5*Math.sqrt(In*io*(wr-io)/wr)*(Kr-wr/2<0?-1:1);qt(u,Xe,Math.max(fr,Math.floor(Xe-Kr*io/wr+no)),Math.min(Ar,Math.floor(Xe+(wr-Kr)*io/wr+no)),_r)}const wr=u[Xe];let Kr=fr,In=Ar;for(Qt(u,fr,Xe),_r(u[Ar],wr)>0&&Qt(u,fr,Ar);Kr<In;){for(Qt(u,Kr,In),Kr++,In--;_r(u[Kr],wr)<0;)Kr++;for(;_r(u[In],wr)>0;)In--}0===_r(u[fr],wr)?Qt(u,fr,In):(In++,Qt(u,In,Ar)),In<=Xe&&(fr=In+1),Xe<=In&&(Ar=In-1)}}function Qt(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function te(u,Xe){ee(u,0,u.children.length,Xe,u)}function ee(u,Xe,fr,Ar,_r){_r||(_r=ce([])),_r.minX=1/0,_r.minY=1/0,_r.maxX=-1/0,_r.maxY=-1/0;for(let wr=Xe;wr<fr;wr++){const Xe=u.children[wr];ie(_r,u.leaf?Ar(Xe):Xe)}return _r}function ie(u,Xe){return u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),u}function oe(u,Xe){return u.minX-Xe.minX}function re(u,Xe){return u.minY-Xe.minY}function se(u){return(u.maxX-u.minX)*(u.maxY-u.minY)}function ne(u){return u.maxX-u.minX+(u.maxY-u.minY)}function ae(u,Xe){const fr=Math.max(u.minX,Xe.minX),Ar=Math.max(u.minY,Xe.minY),_r=Math.min(u.maxX,Xe.maxX),wr=Math.min(u.maxY,Xe.maxY);return Math.max(0,_r-fr)*Math.max(0,wr-Ar)}function le(u,Xe){return u.minX<=Xe.minX&&u.minY<=Xe.minY&&Xe.maxX<=u.maxX&&Xe.maxY<=u.maxY}function he(u,Xe){return Xe.minX<=u.maxX&&Xe.minY<=u.maxY&&Xe.maxX>=u.minX&&Xe.maxY>=u.minY}function ce(u){return{children:u,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(u,Xe,fr,Ar,_r){const wr=[Xe,fr];for(;wr.length;){if((fr=wr.pop())-(Xe=wr.pop())<=Ar)continue;const Kr=Xe+Math.ceil((fr-Xe)/Ar/2)*Ar;qt(u,Kr,Xe,fr,_r),wr.push(Xe,Kr,Kr,fr)}}class ue{constructor(u){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(u){let Xe=this.data;const fr=[];if(!he(u,Xe))return fr;const Ar=this.toBBox,_r=[];for(;Xe;){for(let wr=0;wr<Xe.children.length;wr++){const Kr=Xe.children[wr],In=Xe.leaf?Ar(Kr):Kr;he(u,In)&&(Xe.leaf?fr.push(Kr):le(u,In)?this._all(Kr,fr):_r.push(Kr))}Xe=_r.pop()}return fr}collides(u){let Xe=this.data;if(he(u,Xe)){const fr=[];for(;Xe;){for(let Ar=0;Ar<Xe.children.length;Ar++){const _r=Xe.children[Ar],wr=Xe.leaf?this.toBBox(_r):_r;if(he(u,wr)){if(Xe.leaf||le(u,wr))return!0;fr.push(_r)}}Xe=fr.pop()}}return!1}load(u){if(u.length<this._minEntries){for(let Xe=0;Xe<u.length;Xe++)this.insert(u[Xe]);return}let Xe=this._build(u.slice(),0,u.length-1,0);if(this.data.children.length)if(this.data.height===Xe.height)this._splitRoot(this.data,Xe);else{if(this.data.height<Xe.height){const u=this.data;this.data=Xe,Xe=u}this._insert(Xe,this.data.height-Xe.height-1,!0)}else this.data=Xe}insert(u){this._insert(u,this.data.height-1)}clear(){this.data=ce([])}remove(u){let Xe=this.data;const fr=this.toBBox(u),Ar=[],_r=[];let wr,Kr,In=!1;for(;Xe||Ar.length;){if(Xe||(Xe=Ar.pop(),Kr=Ar[Ar.length-1],wr=_r.pop(),In=!0),Xe.leaf){const fr=Xe.children.indexOf(u);-1!==fr&&(Xe.children.splice(fr,1),Ar.push(Xe),this._condense(Ar))}In||Xe.leaf||!le(Xe,fr)?Kr?(wr++,Xe=Kr.children[wr],In=!1):Xe=null:(Ar.push(Xe),_r.push(wr),wr=0,Kr=Xe,Xe=Xe.children[0])}}toBBox(u){return u}compareMinX(u,Xe){return u.minX-Xe.minX}compareMinY(u,Xe){return u.minY-Xe.minY}_all(u,Xe){const fr=[];for(;u;)u.leaf?Xe.push(...u.children):fr.push(...u.children),u=fr.pop();return Xe}_build(u,Xe,fr,Ar){const _r=fr-Xe+1;let wr,Kr=this._maxEntries;if(_r<=Kr)return wr=ce(u.slice(Xe,fr+1)),te(wr,this.toBBox),wr;Ar||(Ar=Math.ceil(Math.log(_r)/Math.log(Kr)),Kr=Math.ceil(_r/Math.pow(Kr,Ar-1))),wr=ce([]),wr.leaf=!1,wr.height=Ar;const In=Math.ceil(_r/Kr),io=In*Math.ceil(Math.sqrt(Kr));de(u,Xe,fr,io,this.compareMinX);for(let _r=Xe;_r<=fr;_r+=io){const Xe=Math.min(_r+io-1,fr);de(u,_r,Xe,In,this.compareMinY);for(let fr=_r;fr<=Xe;fr+=In){const _r=Math.min(fr+In-1,Xe);wr.children.push(this._build(u,fr,_r,Ar-1))}}return te(wr,this.toBBox),wr}_chooseSubtree(u,Xe,fr,Ar){for(;Ar.push(Xe),!Xe.leaf&&Ar.length-1!==fr;){let fr,Ar=1/0,Kr=1/0;for(let In=0;In<Xe.children.length;In++){const io=Xe.children[In],no=se(io),oo=(_r=u,wr=io,(Math.max(wr.maxX,_r.maxX)-Math.min(wr.minX,_r.minX))*(Math.max(wr.maxY,_r.maxY)-Math.min(wr.minY,_r.minY))-no);oo<Kr?(Kr=oo,Ar=no<Ar?no:Ar,fr=io):oo===Kr&&no<Ar&&(Ar=no,fr=io)}Xe=fr||Xe.children[0]}var _r,wr;return Xe}_insert(u,Xe,fr){const Ar=fr?u:this.toBBox(u),_r=[],wr=this._chooseSubtree(Ar,this.data,Xe,_r);for(wr.children.push(u),ie(wr,Ar);Xe>=0&&_r[Xe].children.length>this._maxEntries;)this._split(_r,Xe),Xe--;this._adjustParentBBoxes(Ar,_r,Xe)}_split(u,Xe){const fr=u[Xe],Ar=fr.children.length,_r=this._minEntries;this._chooseSplitAxis(fr,_r,Ar);const wr=this._chooseSplitIndex(fr,_r,Ar),Kr=ce(fr.children.splice(wr,fr.children.length-wr));Kr.height=fr.height,Kr.leaf=fr.leaf,te(fr,this.toBBox),te(Kr,this.toBBox),Xe?u[Xe-1].children.push(Kr):this._splitRoot(fr,Kr)}_splitRoot(u,Xe){this.data=ce([u,Xe]),this.data.height=u.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(u,Xe,fr){let Ar,_r=1/0,wr=1/0;for(let Kr=Xe;Kr<=fr-Xe;Kr++){const Xe=ee(u,0,Kr,this.toBBox),In=ee(u,Kr,fr,this.toBBox),io=ae(Xe,In),no=se(Xe)+se(In);io<_r?(_r=io,Ar=Kr,wr=no<wr?no:wr):io===_r&&no<wr&&(wr=no,Ar=Kr)}return Ar||fr-Xe}_chooseSplitAxis(u,Xe,fr){const Ar=u.leaf?this.compareMinX:oe,_r=u.leaf?this.compareMinY:re;this._allDistMargin(u,Xe,fr,Ar)<this._allDistMargin(u,Xe,fr,_r)&&u.children.sort(Ar)}_allDistMargin(u,Xe,fr,Ar){u.children.sort(Ar);const _r=this.toBBox,wr=ee(u,0,Xe,_r),Kr=ee(u,fr-Xe,fr,_r);let In=ne(wr)+ne(Kr);for(let Ar=Xe;Ar<fr-Xe;Ar++){const Xe=u.children[Ar];ie(wr,u.leaf?_r(Xe):Xe),In+=ne(wr)}for(let Ar=fr-Xe-1;Ar>=Xe;Ar--){const Xe=u.children[Ar];ie(Kr,u.leaf?_r(Xe):Xe),In+=ne(Kr)}return In}_adjustParentBBoxes(u,Xe,fr){for(let Ar=fr;Ar>=0;Ar--)ie(Xe[Ar],u)}_condense(u){for(let Xe,fr=u.length-1;fr>=0;fr--)0===u[fr].children.length?fr>0?(Xe=u[fr-1].children,Xe.splice(Xe.indexOf(u[fr]),1)):this.clear():te(u[fr],this.toBBox)}}class ge{constructor(u){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(u&&u.maxEntries?u.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(u,Xe){this.idToNode.set(u.id,Xe),this.nodeToId.set(Xe,u.id)}toBBox(u){const Xe=[],fr=[];let Ar;if("Polygon"===u.geometry.type)Ar=u.geometry.coordinates[0];else if("LineString"===u.geometry.type)Ar=u.geometry.coordinates;else{if("Point"!==u.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");Ar=[u.geometry.coordinates]}for(let u=0;u<Ar.length;u++)fr.push(Ar[u][1]),Xe.push(Ar[u][0]);const _r=Math.min(...fr),wr=Math.max(...fr);return{minX:Math.min(...Xe),minY:_r,maxX:Math.max(...Xe),maxY:wr}}insert(u){if(this.idToNode.get(String(u.id)))throw new Error("Feature already exists");const Xe=this.toBBox(u);this.setMaps(u,Xe),this.tree.insert(Xe)}load(u){const Xe=[],fr=new Set;u.forEach((u=>{const Ar=this.toBBox(u);if(this.setMaps(u,Ar),fr.has(String(u.id)))throw new Error(`Duplicate feature ID found ${u.id}`);fr.add(String(u.id)),Xe.push(Ar)})),this.tree.load(Xe)}update(u){this.remove(u.id);const Xe=this.toBBox(u);this.setMaps(u,Xe),this.tree.insert(Xe)}remove(u){const Xe=this.idToNode.get(u);if(!Xe)throw new Error(`${u} not inserted into the spatial index`);this.tree.remove(Xe)}clear(){this.tree.clear()}search(u){return this.tree.search(this.toBBox(u)).map((u=>this.nodeToId.get(u)))}collides(u){return this.tree.collides(this.toBBox(u))}}const ol={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(u){const Xe=16*Math.random()|0;return("x"==u?Xe:3&Xe|8).toString(16)})),isValidId:u=>"string"==typeof u&&36===u.length};class ye{constructor(u){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!u||!1!==u.tracked,this.idStrategy=u&&u.idStrategy?u.idStrategy:ol}clone(u){return JSON.parse(JSON.stringify(u))}getId(){return this.idStrategy.getId()}has(u){return Boolean(this.store[u])}load(u,Xe){if(0===u.length)return;const fr=this.clone(u);fr.forEach((u=>{null==u.id&&(u.id=this.idStrategy.getId()),this.tracked&&(u.properties.createdAt?R(u.properties.createdAt):u.properties.createdAt=+new Date,u.properties.updatedAt?R(u.properties.updatedAt):u.properties.updatedAt=+new Date)}));const Ar=[];fr.forEach((u=>{const fr=u.id;if(Xe&&!Xe(u))throw new Error(`Feature ${fr} is not valid: ${JSON.stringify(u)}`);if(this.has(fr))throw new Error(`Feature already exists with this id: ${fr}`);this.store[fr]=u,Ar.push(fr)})),this.spatialIndex.load(fr),this._onChange(Ar,"create")}search(u,Xe){const fr=this.spatialIndex.search(u).map((u=>this.store[u]));return this.clone(Xe?fr.filter(Xe):fr)}registerOnChange(u){this._onChange=(Xe,fr)=>{u(Xe,fr)}}getGeometryCopy(u){const Xe=this.store[u];if(!Xe)throw new Error(`No feature with this id (${u}), can not get geometry copy`);return this.clone(Xe.geometry)}getPropertiesCopy(u){const Xe=this.store[u];if(!Xe)throw new Error(`No feature with this id (${u}), can not get properties copy`);return this.clone(Xe.properties)}updateProperty(u){const Xe=[];u.forEach((({id:u,property:fr,value:Ar})=>{const _r=this.store[u];if(!_r)throw new Error(`No feature with this (${u}), can not update geometry`);Xe.push(u),_r.properties[fr]=Ar,this.tracked&&(_r.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(Xe,"update")}updateGeometry(u){const Xe=[];u.forEach((({id:u,geometry:fr})=>{Xe.push(u);const Ar=this.store[u];if(!Ar)throw new Error(`No feature with this (${u}), can not update geometry`);Ar.geometry=this.clone(fr),this.spatialIndex.update(Ar),this.tracked&&(Ar.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(Xe,"update")}create(u){const Xe=[];return u.forEach((({geometry:u,properties:fr})=>{let Ar,_r=t({},fr);this.tracked&&(Ar=+new Date,fr?(_r.createdAt="number"==typeof fr.createdAt?fr.createdAt:Ar,_r.updatedAt="number"==typeof fr.updatedAt?fr.updatedAt:Ar):_r={createdAt:Ar,updatedAt:Ar});const wr=this.getId(),Kr={id:wr,type:"Feature",geometry:u,properties:_r};this.store[wr]=Kr,this.spatialIndex.insert(Kr),Xe.push(wr)})),this._onChange&&this._onChange([...Xe],"create"),Xe}delete(u){u.forEach((u=>{if(!this.store[u])throw new Error("No feature with this id, can not delete");delete this.store[u],this.spatialIndex.remove(u)})),this._onChange&&this._onChange([...u],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((u=>this.store[u])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(u){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=u.adapter,this._mode=new Zt;const Xe=new Set,fr=u.modes.reduce(((u,fr)=>{if(Xe.has(fr.mode))throw new Error(`There is already a ${fr.mode} mode provided`);return Xe.add(fr.mode),u[fr.mode]=fr,u}),{}),Ar=Object.keys(fr);if(0===Ar.length)throw new Error("No modes provided");Ar.forEach((u=>{if(fr[u].type===ss.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=u}})),this._modes=t({},fr,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!u.tracked,idStrategy:u.idStrategy?u.idStrategy:void 0});const s=u=>{const Xe=[],fr=this._store.copyAll().filter((fr=>!u.includes(fr.id)||(Xe.push(fr),!1)));return{changed:Xe,unchanged:fr}},n=(u,Xe)=>{this._enabled&&this._eventListeners.finish.forEach((fr=>{fr(u,Xe)}))},a=(u,Xe)=>{if(!this._enabled)return;this._eventListeners.change.forEach((fr=>{fr(u,Xe)}));const{changed:fr,unchanged:Ar}=s(u);"create"===Xe?this._adapter.render({created:fr,deletedIds:[],unchanged:Ar,updated:[]},this.getModeStyles()):"update"===Xe?this._adapter.render({created:[],deletedIds:[],unchanged:Ar,updated:fr},this.getModeStyles()):"delete"===Xe?this._adapter.render({created:[],deletedIds:u,unchanged:Ar,updated:[]},this.getModeStyles()):"styling"===Xe&&this._adapter.render({created:[],deletedIds:[],unchanged:Ar,updated:[]},this.getModeStyles())},l=u=>{if(!this._enabled)return;this._eventListeners.select.forEach((Xe=>{Xe(u)}));const{changed:Xe,unchanged:fr}=s([u]);this._adapter.render({created:[],deletedIds:[],unchanged:fr,updated:Xe},this.getModeStyles())},h=u=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((u=>{u()}));const{changed:Xe,unchanged:fr}=s([u]);Xe&&this._adapter.render({created:[],deletedIds:[],unchanged:fr,updated:Xe},this.getModeStyles())};Object.keys(this._modes).forEach((u=>{this._modes[u].register({mode:u,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const u={};return Object.keys(this._modes).forEach((Xe=>{u[Xe]=u=>this._instanceSelectMode&&u.properties[xo]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(u):this._modes[Xe].styleFeature.bind(this._modes[Xe])(u)})),u}featuresAtLocation({lng:u,lat:Xe},fr){const Ar=fr&&void 0!==fr.pointerDistance?fr.pointerDistance:30,_r=!fr||void 0===fr.ignoreSelectFeatures||fr.ignoreSelectFeatures,wr=this._adapter.unproject.bind(this._adapter),Kr=this._adapter.project.bind(this._adapter),In=Kr(u,Xe),io=ut({unproject:wr,point:In,pointerDistance:Ar});return this._store.search(io).filter((fr=>{if(_r&&(fr.properties[Mo]||fr.properties.selectionPoint))return!1;if("Point"===fr.geometry.type){const u=fr.geometry.coordinates,Xe=Kr(u[0],u[1]);return i$1(In,Xe)<Ar}if("LineString"===fr.geometry.type){const u=fr.geometry.coordinates;for(let Xe=0;Xe<u.length-1;Xe++){const fr=u[Xe],_r=u[Xe+1];if(At(In,Kr(fr[0],fr[1]),Kr(_r[0],_r[1]))<Ar)return!0}return!1}return!!Vt([u,Xe],fr.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(u,Xe){if(this.checkEnabled(),!this._modes[u])throw new Error("No mode with this name present");this._modes[u].styles=Xe}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(u){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(u){if(this.checkEnabled(),!this._modes[u])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[u],this._mode.start()}removeFeatures(u){this.checkEnabled(),this._store.delete(u)}selectFeature(u){this.getSelectMode().selectFeature(u)}deselectFeature(u){this.getSelectMode().deselectFeature(u)}getFeatureId(){return this._store.getId()}hasFeature(u){return this._store.has(u)}addFeatures(u){this.checkEnabled(),0!==u.length&&this._store.load(u,(u=>{if(Boolean(u&&"object"==typeof u&&"properties"in u&&"object"==typeof u.properties&&null!==u.properties&&"mode"in u.properties)){const Xe=this._modes[u.properties.mode];return!!Xe&&Xe.validateFeature.bind(Xe)(u)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((u=>{u()}))},getState:()=>this._mode.state,onClick:u=>{this._mode.onClick(u)},onMouseMove:u=>{this._mode.onMouseMove(u)},onKeyDown:u=>{this._mode.onKeyDown(u)},onKeyUp:u=>{this._mode.onKeyUp(u)},onDragStart:(u,Xe)=>{this._mode.onDragStart(u,Xe)},onDrag:(u,Xe)=>{this._mode.onDrag(u,Xe)},onDragEnd:(u,Xe)=>{this._mode.onDragEnd(u,Xe)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(u,Xe){const{lng:fr,lat:Ar}=u;return this.featuresAtLocation({lng:fr,lat:Ar},Xe)}getFeaturesAtPointerEvent(u,Xe){const fr=this._adapter.getLngLatFromEvent.bind(this._adapter)(u);return null===fr?[]:this.featuresAtLocation(fr,Xe)}stop(){this._enabled=!1,this._adapter.unregister()}on(u,Xe){const fr=this._eventListeners[u];fr.includes(Xe)||fr.push(Xe)}off(u,Xe){const fr=this._eventListeners[u];fr.includes(Xe)&&fr.splice(fr.indexOf(Xe),1)}}class MapOption{constructor({name:u,desc:Xe,example:fr,exampleDesc:Ar,isValid:_r}){this.name=u,this.desc=Xe,this.example=fr,this.exampleDesc=Ar,this.isValid=_r}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(u){if(this._map)throw Error("map cannot be reassigned");this._map=u}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(u,Xe){const fr=this.constructor.validOptions.find((Xe=>Xe.valueOf()===u))?.isValid;if(!fr)throw Error(`Cannot find inValid method for option ${u}`);return fr(Xe)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:u=>!!u?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:u=>window.CSS.supports(`width: ${u}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:u=>window.CSS.supports(`height: ${u}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:u=>{try{const[Xe,fr]=JSON.parse(u);return!isNaN(Xe)&&!isNaN(fr)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:u=>{const Xe=Number(u);return!isNaN(Xe)&&Xe>=0&&Xe<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:u=>"object"==typeof u}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:u=>"true"===u}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:u=>URL.parse(u)&&u.includes("{x}")&&u.includes("{y}")&&u.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:u=>URL.parse(u)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:u=>URL.parse(u)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:u=>"true"===u}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(u){if(u.XYZ){("string"==typeof u.XYZ?[u.XYZ]:u.XYZ).forEach((Xe=>{let fr,Ar;if("string"==typeof Xe)Ar=new URL(Xe),fr={type:"tile",url:Xe,title:`${Ar.host}${Ar.pathname.split("%7B")[0]}`};else{if("object"!=typeof Xe)return;Ar=new URL(Xe.url),fr={type:"tile",url:Xe.url,title:Xe.title?Xe.title:`${Ar.host}${Ar.pathname.split("%7B")[0]}`}}u.data.push(fr)})),delete u.XYZ}u.WMTS&&(u.data.push({type:"wmts",url:u.aliases[u.WMTS]??u.WMTS}),delete u.WMTS),u.GPX&&(u.data.push({type:"gpx",url:u.GPX}),delete u.GPX),"string"==typeof u.center&&Object.prototype.hasOwnProperty.call(u.aliases,u.center)&&(u.center=u.aliases[u.center]),u.data?.forEach((Xe=>{Object.prototype.hasOwnProperty.call(u.aliases,Xe.url)&&(Xe.title=Xe.url,Xe.url=u.aliases[Xe.url])}))}createView({target:u,width:Xe,height:fr}){u.style.width=Xe,u.style.height=fr,"flex"===window.getComputedStyle(u.parentElement).display&&(u.style.flexBasis=`calc(${Xe})`)}setDraw=({target:u,terraDrawAdapter:Xe})=>{const fr=u?.id?u.id+"-":"",Ar={idStrategy:{isValidId:u=>!0,getId:function(){let u=fr+window.crypto.randomUUID();return function(){return u=fr+window.crypto.randomUUID(),u}}()}};return this.terraDraw=((u,Xe={})=>new Se({adapter:u,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...Xe}))(Xe,Ar),((u,Xe,fr={})=>{const Ar=document.createElement("select");u.appendChild(Ar),Ar.name="Draw",Ar.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",Ar.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',Xe.start(),Xe.setMode("render");const _r=u.id?`terra-draw-data-${u.id}`:"terra-draw-data",wr=window.localStorage.getItem(_r);if(wr)try{const u=JSON.parse(wr);u.forEach((u=>u.properties={mode:"render"})),Xe.addFeatures(u)}catch(u){console.warn("Fail to drawn features from Local Storage.",wr,u),window.localStorage.removeItem(_r)}const Kr=u.querySelector("canvas")??u;Ar.onchange=()=>{Ar.children[0].textContent="--STOP--",Kr.style.removeProperty("cursor");const u=Xe.getSnapshot();switch(Ar.value){case"nothing":Xe.setMode("render"),Ar.children[0].textContent="Draw Something";break;case"modify":Xe.setMode("select");break;case"delete":Xe.setMode("render"),Kr.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(_r),Ar.value="nothing",Ar.onchange(),Xe.clear();break;case"features":window.alert(`${u.length} features\n\n${JSON.stringify(u,null,4)}`);break;default:Xe.setMode(Ar.value)}},Xe.on("change",(()=>{})),Xe.on("finish",((u,wr)=>{if("draw"===wr.action){const fr=Xe.getSnapshot().find((Xe=>Xe.id===u));fr&&(Xe.removeFeatures([u]),fr.properties.mode="render",Xe.addFeatures([fr]))}const Kr=fr.idFilter??(()=>!0),In=Xe.getSnapshot().filter(Kr);window.localStorage.setItem(_r,JSON.stringify(In)),"point"!==wr.mode&&"draw"===wr.action&&(Ar.value="nothing",Ar.onchange())})),document.onclick=u=>{if("delete"===Ar.value){const fr=Xe.getFeaturesAtPointerEvent(u,{pointerDistance:40});fr.length>0&&(Xe.removeFeatures([fr[0].id]),0===Xe.getSnapshot().length&&(Ar.value="nothing",Ar.onchange()))}}})(u,this.terraDraw,{idFilter:u=>u.id.startsWith(fr)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(u){const Xe=u.filter((u=>"wmts"===u.type)),fr=u.filter((u=>"tile"===u.type));return Xe.length>0||fr.length>1}propsForEval(){let u=this,Xe=[],fr=[];for(;u!==Object.prototype;)Xe=Xe.concat(Object.getOwnPropertyNames(u)),fr=fr.concat(Object.entries(u)),u=Object.getPrototypeOf(u);return Xe}evalScript(u,Xe=[]){const fr=this.propsForEval(),Ar=Xe.map((([u,Xe])=>u)),_r=[...fr.map((u=>this[u])),...Xe.map((([u,Xe])=>Xe))],wr=Function([...fr,...Ar],u).bind(this,..._r);try{return wr()}catch(u){return console.warn("Fail to run custom script:",u),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(u){return null==u}var sl={isNothing:isNothing,isObject:function isObject(u){return"object"==typeof u&&null!==u},toArray:function toArray(u){return Array.isArray(u)?u:isNothing(u)?[]:[u]},repeat:function repeat(u,Xe){var fr,Ar="";for(fr=0;fr<Xe;fr+=1)Ar+=u;return Ar},isNegativeZero:function isNegativeZero(u){return 0===u&&Number.NEGATIVE_INFINITY===1/u},extend:function extend(u,Xe){var fr,Ar,_r,wr;if(Xe)for(fr=0,Ar=(wr=Object.keys(Xe)).length;fr<Ar;fr+=1)u[_r=wr[fr]]=Xe[_r];return u}};function formatError(u,Xe){var fr="",Ar=u.reason||"(unknown reason)";return u.mark?(u.mark.name&&(fr+='in "'+u.mark.name+'" '),fr+="("+(u.mark.line+1)+":"+(u.mark.column+1)+")",!Xe&&u.mark.snippet&&(fr+="\n\n"+u.mark.snippet),Ar+" "+fr):Ar}function YAMLException$1(u,Xe){Error.call(this),this.name="YAMLException",this.reason=u,this.mark=Xe,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(u){return this.name+": "+formatError(this,u)};var al=YAMLException$1;function getLine(u,Xe,fr,Ar,_r){var wr="",Kr="",In=Math.floor(_r/2)-1;return Ar-Xe>In&&(Xe=Ar-In+(wr=" ... ").length),fr-Ar>In&&(fr=Ar+In-(Kr=" ...").length),{str:wr+u.slice(Xe,fr).replace(/\t/g,"→")+Kr,pos:Ar-Xe+wr.length}}function padStart(u,Xe){return sl.repeat(" ",Xe-u.length)+u}var cl=function makeSnippet(u,Xe){if(Xe=Object.create(Xe||null),!u.buffer)return null;Xe.maxLength||(Xe.maxLength=79),"number"!=typeof Xe.indent&&(Xe.indent=1),"number"!=typeof Xe.linesBefore&&(Xe.linesBefore=3),"number"!=typeof Xe.linesAfter&&(Xe.linesAfter=2);for(var fr,Ar=/\r?\n|\r|\0/g,_r=[0],wr=[],Kr=-1;fr=Ar.exec(u.buffer);)wr.push(fr.index),_r.push(fr.index+fr[0].length),u.position<=fr.index&&Kr<0&&(Kr=_r.length-2);Kr<0&&(Kr=_r.length-1);var In,io,no="",oo=Math.min(u.line+Xe.linesAfter,wr.length).toString().length,so=Xe.maxLength-(Xe.indent+oo+3);for(In=1;In<=Xe.linesBefore&&!(Kr-In<0);In++)io=getLine(u.buffer,_r[Kr-In],wr[Kr-In],u.position-(_r[Kr]-_r[Kr-In]),so),no=sl.repeat(" ",Xe.indent)+padStart((u.line-In+1).toString(),oo)+" | "+io.str+"\n"+no;for(io=getLine(u.buffer,_r[Kr],wr[Kr],u.position,so),no+=sl.repeat(" ",Xe.indent)+padStart((u.line+1).toString(),oo)+" | "+io.str+"\n",no+=sl.repeat("-",Xe.indent+oo+3+io.pos)+"^\n",In=1;In<=Xe.linesAfter&&!(Kr+In>=wr.length);In++)io=getLine(u.buffer,_r[Kr+In],wr[Kr+In],u.position-(_r[Kr]-_r[Kr+In]),so),no+=sl.repeat(" ",Xe.indent)+padStart((u.line+In+1).toString(),oo)+" | "+io.str+"\n";return no.replace(/\n$/,"")},hl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ul=["scalar","sequence","mapping"];var dl=function Type$1(u,Xe){if(Xe=Xe||{},Object.keys(Xe).forEach((function(Xe){if(-1===hl.indexOf(Xe))throw new al('Unknown option "'+Xe+'" is met in definition of "'+u+'" YAML type.')})),this.options=Xe,this.tag=u,this.kind=Xe.kind||null,this.resolve=Xe.resolve||function(){return!0},this.construct=Xe.construct||function(u){return u},this.instanceOf=Xe.instanceOf||null,this.predicate=Xe.predicate||null,this.represent=Xe.represent||null,this.representName=Xe.representName||null,this.defaultStyle=Xe.defaultStyle||null,this.multi=Xe.multi||!1,this.styleAliases=function compileStyleAliases(u){var Xe={};return null!==u&&Object.keys(u).forEach((function(fr){u[fr].forEach((function(u){Xe[String(u)]=fr}))})),Xe}(Xe.styleAliases||null),-1===ul.indexOf(this.kind))throw new al('Unknown kind "'+this.kind+'" is specified for "'+u+'" YAML type.')};function compileList(u,Xe){var fr=[];return u[Xe].forEach((function(u){var Xe=fr.length;fr.forEach((function(fr,Ar){fr.tag===u.tag&&fr.kind===u.kind&&fr.multi===u.multi&&(Xe=Ar)})),fr[Xe]=u})),fr}function Schema$1(u){return this.extend(u)}Schema$1.prototype.extend=function extend(u){var Xe=[],fr=[];if(u instanceof dl)fr.push(u);else if(Array.isArray(u))fr=fr.concat(u);else{if(!u||!Array.isArray(u.implicit)&&!Array.isArray(u.explicit))throw new al("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.implicit&&(Xe=Xe.concat(u.implicit)),u.explicit&&(fr=fr.concat(u.explicit))}Xe.forEach((function(u){if(!(u instanceof dl))throw new al("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&"scalar"!==u.loadKind)throw new al("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new al("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),fr.forEach((function(u){if(!(u instanceof dl))throw new al("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var Ar=Object.create(Schema$1.prototype);return Ar.implicit=(this.implicit||[]).concat(Xe),Ar.explicit=(this.explicit||[]).concat(fr),Ar.compiledImplicit=compileList(Ar,"implicit"),Ar.compiledExplicit=compileList(Ar,"explicit"),Ar.compiledTypeMap=function compileMap(){var u,Xe,fr={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(u){u.multi?(fr.multi[u.kind].push(u),fr.multi.fallback.push(u)):fr[u.kind][u.tag]=fr.fallback[u.tag]=u}for(u=0,Xe=arguments.length;u<Xe;u+=1)arguments[u].forEach(collectType);return fr}(Ar.compiledImplicit,Ar.compiledExplicit),Ar};var pl=new Schema$1({explicit:[new dl("tag:yaml.org,2002:str",{kind:"scalar",construct:function(u){return null!==u?u:""}}),new dl("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(u){return null!==u?u:[]}}),new dl("tag:yaml.org,2002:map",{kind:"mapping",construct:function(u){return null!==u?u:{}}})]});var Cl=new dl("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(u){if(null===u)return!0;var Xe=u.length;return 1===Xe&&"~"===u||4===Xe&&("null"===u||"Null"===u||"NULL"===u)},construct:function constructYamlNull(){return null},predicate:function isNull(u){return null===u},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var fl=new dl("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(u){if(null===u)return!1;var Xe=u.length;return 4===Xe&&("true"===u||"True"===u||"TRUE"===u)||5===Xe&&("false"===u||"False"===u||"FALSE"===u)},construct:function constructYamlBoolean(u){return"true"===u||"True"===u||"TRUE"===u},predicate:function isBoolean(u){return"[object Boolean]"===Object.prototype.toString.call(u)},represent:{lowercase:function(u){return u?"true":"false"},uppercase:function(u){return u?"TRUE":"FALSE"},camelcase:function(u){return u?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(u){return 48<=u&&u<=57||65<=u&&u<=70||97<=u&&u<=102}function isOctCode(u){return 48<=u&&u<=55}function isDecCode(u){return 48<=u&&u<=57}var _l=new dl("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(u){if(null===u)return!1;var Xe,fr=u.length,Ar=0,_r=!1;if(!fr)return!1;if("-"!==(Xe=u[Ar])&&"+"!==Xe||(Xe=u[++Ar]),"0"===Xe){if(Ar+1===fr)return!0;if("b"===(Xe=u[++Ar])){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if("0"!==Xe&&"1"!==Xe)return!1;_r=!0}return _r&&"_"!==Xe}if("x"===Xe){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isHexCode(u.charCodeAt(Ar)))return!1;_r=!0}return _r&&"_"!==Xe}if("o"===Xe){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isOctCode(u.charCodeAt(Ar)))return!1;_r=!0}return _r&&"_"!==Xe}}if("_"===Xe)return!1;for(;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isDecCode(u.charCodeAt(Ar)))return!1;_r=!0}return!(!_r||"_"===Xe)},construct:function constructYamlInteger(u){var Xe,fr=u,Ar=1;if(-1!==fr.indexOf("_")&&(fr=fr.replace(/_/g,"")),"-"!==(Xe=fr[0])&&"+"!==Xe||("-"===Xe&&(Ar=-1),Xe=(fr=fr.slice(1))[0]),"0"===fr)return 0;if("0"===Xe){if("b"===fr[1])return Ar*parseInt(fr.slice(2),2);if("x"===fr[1])return Ar*parseInt(fr.slice(2),16);if("o"===fr[1])return Ar*parseInt(fr.slice(2),8)}return Ar*parseInt(fr,10)},predicate:function isInteger(u){return"[object Number]"===Object.prototype.toString.call(u)&&u%1==0&&!sl.isNegativeZero(u)},represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var xl=/^[-+]?[0-9]+e/;var Sl=new dl("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(u){return null!==u&&!(!vl.test(u)||"_"===u[u.length-1])},construct:function constructYamlFloat(u){var Xe,fr;return fr="-"===(Xe=u.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(Xe[0])>=0&&(Xe=Xe.slice(1)),".inf"===Xe?1===fr?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===Xe?NaN:fr*parseFloat(Xe,10)},predicate:function isFloat(u){return"[object Number]"===Object.prototype.toString.call(u)&&(u%1!=0||sl.isNegativeZero(u))},represent:function representYamlFloat(u,Xe){var fr;if(isNaN(u))switch(Xe){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(Xe){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(Xe){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(sl.isNegativeZero(u))return"-0.0";return fr=u.toString(10),xl.test(fr)?fr.replace("e",".e"):fr},defaultStyle:"lowercase"}),kl=pl.extend({implicit:[Cl,fl,_l,Sl]}),Bl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Zl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Rl=new dl("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(u){return null!==u&&(null!==Bl.exec(u)||null!==Zl.exec(u))},construct:function constructYamlTimestamp(u){var Xe,fr,Ar,_r,wr,Kr,In,io,no=0,oo=null;if(null===(Xe=Bl.exec(u))&&(Xe=Zl.exec(u)),null===Xe)throw new Error("Date resolve error");if(fr=+Xe[1],Ar=+Xe[2]-1,_r=+Xe[3],!Xe[4])return new Date(Date.UTC(fr,Ar,_r));if(wr=+Xe[4],Kr=+Xe[5],In=+Xe[6],Xe[7]){for(no=Xe[7].slice(0,3);no.length<3;)no+="0";no=+no}return Xe[9]&&(oo=6e4*(60*+Xe[10]+ +(Xe[11]||0)),"-"===Xe[9]&&(oo=-oo)),io=new Date(Date.UTC(fr,Ar,_r,wr,Kr,In,no)),oo&&io.setTime(io.getTime()-oo),io},instanceOf:Date,represent:function representYamlTimestamp(u){return u.toISOString()}});var Wl=new dl("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(u){return"<<"===u||null===u}}),Tl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Jl=new dl("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(u){if(null===u)return!1;var Xe,fr,Ar=0,_r=u.length,wr=Tl;for(fr=0;fr<_r;fr++)if(!((Xe=wr.indexOf(u.charAt(fr)))>64)){if(Xe<0)return!1;Ar+=6}return Ar%8==0},construct:function constructYamlBinary(u){var Xe,fr,Ar=u.replace(/[\r\n=]/g,""),_r=Ar.length,wr=Tl,Kr=0,In=[];for(Xe=0;Xe<_r;Xe++)Xe%4==0&&Xe&&(In.push(Kr>>16&255),In.push(Kr>>8&255),In.push(255&Kr)),Kr=Kr<<6|wr.indexOf(Ar.charAt(Xe));return 0===(fr=_r%4*6)?(In.push(Kr>>16&255),In.push(Kr>>8&255),In.push(255&Kr)):18===fr?(In.push(Kr>>10&255),In.push(Kr>>2&255)):12===fr&&In.push(Kr>>4&255),new Uint8Array(In)},predicate:function isBinary(u){return"[object Uint8Array]"===Object.prototype.toString.call(u)},represent:function representYamlBinary(u){var Xe,fr,Ar="",_r=0,wr=u.length,Kr=Tl;for(Xe=0;Xe<wr;Xe++)Xe%3==0&&Xe&&(Ar+=Kr[_r>>18&63],Ar+=Kr[_r>>12&63],Ar+=Kr[_r>>6&63],Ar+=Kr[63&_r]),_r=(_r<<8)+u[Xe];return 0===(fr=wr%3)?(Ar+=Kr[_r>>18&63],Ar+=Kr[_r>>12&63],Ar+=Kr[_r>>6&63],Ar+=Kr[63&_r]):2===fr?(Ar+=Kr[_r>>10&63],Ar+=Kr[_r>>4&63],Ar+=Kr[_r<<2&63],Ar+=Kr[64]):1===fr&&(Ar+=Kr[_r>>2&63],Ar+=Kr[_r<<4&63],Ar+=Kr[64],Ar+=Kr[64]),Ar}}),Kl=Object.prototype.hasOwnProperty,Ll=Object.prototype.toString;var Dl=new dl("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(u){if(null===u)return!0;var Xe,fr,Ar,_r,wr,Kr=[],In=u;for(Xe=0,fr=In.length;Xe<fr;Xe+=1){if(Ar=In[Xe],wr=!1,"[object Object]"!==Ll.call(Ar))return!1;for(_r in Ar)if(Kl.call(Ar,_r)){if(wr)return!1;wr=!0}if(!wr)return!1;if(-1!==Kr.indexOf(_r))return!1;Kr.push(_r)}return!0},construct:function constructYamlOmap(u){return null!==u?u:[]}}),Yl=Object.prototype.toString;var Nl=new dl("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(u){if(null===u)return!0;var Xe,fr,Ar,_r,wr,Kr=u;for(wr=new Array(Kr.length),Xe=0,fr=Kr.length;Xe<fr;Xe+=1){if(Ar=Kr[Xe],"[object Object]"!==Yl.call(Ar))return!1;if(1!==(_r=Object.keys(Ar)).length)return!1;wr[Xe]=[_r[0],Ar[_r[0]]]}return!0},construct:function constructYamlPairs(u){if(null===u)return[];var Xe,fr,Ar,_r,wr,Kr=u;for(wr=new Array(Kr.length),Xe=0,fr=Kr.length;Xe<fr;Xe+=1)Ar=Kr[Xe],_r=Object.keys(Ar),wr[Xe]=[_r[0],Ar[_r[0]]];return wr}}),Ol=Object.prototype.hasOwnProperty;var jl=new dl("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(u){if(null===u)return!0;var Xe,fr=u;for(Xe in fr)if(Ol.call(fr,Xe)&&null!==fr[Xe])return!1;return!0},construct:function constructYamlSet(u){return null!==u?u:{}}}),Ql=kl.extend({implicit:[Rl,Wl],explicit:[Jl,Dl,Nl,jl]}),ql=Object.prototype.hasOwnProperty,$l=1,ec=2,rc=3,nc=4,oc=1,ac=2,dc=3,mc=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ic=/[\x85\u2028\u2029]/,yc=/[,\[\]\{\}]/,Ac=/^(?:!|!!|![a-z\-]+!)$/i,bc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(u){return Object.prototype.toString.call(u)}function is_EOL(u){return 10===u||13===u}function is_WHITE_SPACE(u){return 9===u||32===u}function is_WS_OR_EOL(u){return 9===u||32===u||10===u||13===u}function is_FLOW_INDICATOR(u){return 44===u||91===u||93===u||123===u||125===u}function fromHexCode(u){var Xe;return 48<=u&&u<=57?u-48:97<=(Xe=32|u)&&Xe<=102?Xe-97+10:-1}function escapedHexLen(u){return 120===u?2:117===u?4:85===u?8:0}function fromDecimalCode(u){return 48<=u&&u<=57?u-48:-1}function simpleEscapeSequence(u){return 48===u?"\0":97===u?"":98===u?"\b":116===u||9===u?"\t":110===u?"\n":118===u?"\v":102===u?"\f":114===u?"\r":101===u?"":32===u?" ":34===u?'"':47===u?"/":92===u?"\\":78===u?"…":95===u?" ":76===u?"\u2028":80===u?"\u2029":""}function charFromCodepoint(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(55296+(u-65536>>10),56320+(u-65536&1023))}for(var _c=new Array(256),vc=new Array(256),Pc=0;Pc<256;Pc++)_c[Pc]=simpleEscapeSequence(Pc)?1:0,vc[Pc]=simpleEscapeSequence(Pc);function State$1(u,Xe){this.input=u,this.filename=Xe.filename||null,this.schema=Xe.schema||Ql,this.onWarning=Xe.onWarning||null,this.legacy=Xe.legacy||!1,this.json=Xe.json||!1,this.listener=Xe.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(u,Xe){var fr={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return fr.snippet=cl(fr),new al(Xe,fr)}function throwError(u,Xe){throw generateError(u,Xe)}function throwWarning(u,Xe){u.onWarning&&u.onWarning.call(null,generateError(u,Xe))}var tg={YAML:function handleYamlDirective(u,Xe,fr){var Ar,_r,wr;null!==u.version&&throwError(u,"duplication of %YAML directive"),1!==fr.length&&throwError(u,"YAML directive accepts exactly one argument"),null===(Ar=/^([0-9]+)\.([0-9]+)$/.exec(fr[0]))&&throwError(u,"ill-formed argument of the YAML directive"),_r=parseInt(Ar[1],10),wr=parseInt(Ar[2],10),1!==_r&&throwError(u,"unacceptable YAML version of the document"),u.version=fr[0],u.checkLineBreaks=wr<2,1!==wr&&2!==wr&&throwWarning(u,"unsupported YAML version of the document")},TAG:function handleTagDirective(u,Xe,fr){var Ar,_r;2!==fr.length&&throwError(u,"TAG directive accepts exactly two arguments"),Ar=fr[0],_r=fr[1],Ac.test(Ar)||throwError(u,"ill-formed tag handle (first argument) of the TAG directive"),ql.call(u.tagMap,Ar)&&throwError(u,'there is a previously declared suffix for "'+Ar+'" tag handle'),bc.test(_r)||throwError(u,"ill-formed tag prefix (second argument) of the TAG directive");try{_r=decodeURIComponent(_r)}catch(Xe){throwError(u,"tag prefix is malformed: "+_r)}u.tagMap[Ar]=_r}};function captureSegment(u,Xe,fr,Ar){var _r,wr,Kr,In;if(Xe<fr){if(In=u.input.slice(Xe,fr),Ar)for(_r=0,wr=In.length;_r<wr;_r+=1)9===(Kr=In.charCodeAt(_r))||32<=Kr&&Kr<=1114111||throwError(u,"expected valid JSON character");else mc.test(In)&&throwError(u,"the stream contains non-printable characters");u.result+=In}}function mergeMappings(u,Xe,fr,Ar){var _r,wr,Kr,In;for(sl.isObject(fr)||throwError(u,"cannot merge mappings; the provided source object is unacceptable"),Kr=0,In=(_r=Object.keys(fr)).length;Kr<In;Kr+=1)wr=_r[Kr],ql.call(Xe,wr)||(Xe[wr]=fr[wr],Ar[wr]=!0)}function storeMappingPair(u,Xe,fr,Ar,_r,wr,Kr,In,io){var no,oo;if(Array.isArray(_r))for(no=0,oo=(_r=Array.prototype.slice.call(_r)).length;no<oo;no+=1)Array.isArray(_r[no])&&throwError(u,"nested arrays are not supported inside keys"),"object"==typeof _r&&"[object Object]"===_class(_r[no])&&(_r[no]="[object Object]");if("object"==typeof _r&&"[object Object]"===_class(_r)&&(_r="[object Object]"),_r=String(_r),null===Xe&&(Xe={}),"tag:yaml.org,2002:merge"===Ar)if(Array.isArray(wr))for(no=0,oo=wr.length;no<oo;no+=1)mergeMappings(u,Xe,wr[no],fr);else mergeMappings(u,Xe,wr,fr);else u.json||ql.call(fr,_r)||!ql.call(Xe,_r)||(u.line=Kr||u.line,u.lineStart=In||u.lineStart,u.position=io||u.position,throwError(u,"duplicated mapping key")),"__proto__"===_r?Object.defineProperty(Xe,_r,{configurable:!0,enumerable:!0,writable:!0,value:wr}):Xe[_r]=wr,delete fr[_r];return Xe}function readLineBreak(u){var Xe;10===(Xe=u.input.charCodeAt(u.position))?u.position++:13===Xe?(u.position++,10===u.input.charCodeAt(u.position)&&u.position++):throwError(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function skipSeparationSpace(u,Xe,fr){for(var Ar=0,_r=u.input.charCodeAt(u.position);0!==_r;){for(;is_WHITE_SPACE(_r);)9===_r&&-1===u.firstTabInLine&&(u.firstTabInLine=u.position),_r=u.input.charCodeAt(++u.position);if(Xe&&35===_r)do{_r=u.input.charCodeAt(++u.position)}while(10!==_r&&13!==_r&&0!==_r);if(!is_EOL(_r))break;for(readLineBreak(u),_r=u.input.charCodeAt(u.position),Ar++,u.lineIndent=0;32===_r;)u.lineIndent++,_r=u.input.charCodeAt(++u.position)}return-1!==fr&&0!==Ar&&u.lineIndent<fr&&throwWarning(u,"deficient indentation"),Ar}function testDocumentSeparator(u){var Xe,fr=u.position;return!(45!==(Xe=u.input.charCodeAt(fr))&&46!==Xe||Xe!==u.input.charCodeAt(fr+1)||Xe!==u.input.charCodeAt(fr+2)||(fr+=3,0!==(Xe=u.input.charCodeAt(fr))&&!is_WS_OR_EOL(Xe)))}function writeFoldedLines(u,Xe){1===Xe?u.result+=" ":Xe>1&&(u.result+=sl.repeat("\n",Xe-1))}function readBlockSequence(u,Xe){var fr,Ar,_r=u.tag,wr=u.anchor,Kr=[],In=!1;if(-1!==u.firstTabInLine)return!1;for(null!==u.anchor&&(u.anchorMap[u.anchor]=Kr),Ar=u.input.charCodeAt(u.position);0!==Ar&&(-1!==u.firstTabInLine&&(u.position=u.firstTabInLine,throwError(u,"tab characters must not be used in indentation")),45===Ar)&&is_WS_OR_EOL(u.input.charCodeAt(u.position+1));)if(In=!0,u.position++,skipSeparationSpace(u,!0,-1)&&u.lineIndent<=Xe)Kr.push(null),Ar=u.input.charCodeAt(u.position);else if(fr=u.line,composeNode(u,Xe,rc,!1,!0),Kr.push(u.result),skipSeparationSpace(u,!0,-1),Ar=u.input.charCodeAt(u.position),(u.line===fr||u.lineIndent>Xe)&&0!==Ar)throwError(u,"bad indentation of a sequence entry");else if(u.lineIndent<Xe)break;return!!In&&(u.tag=_r,u.anchor=wr,u.kind="sequence",u.result=Kr,!0)}function readTagProperty(u){var Xe,fr,Ar,_r,wr=!1,Kr=!1;if(33!==(_r=u.input.charCodeAt(u.position)))return!1;if(null!==u.tag&&throwError(u,"duplication of a tag property"),60===(_r=u.input.charCodeAt(++u.position))?(wr=!0,_r=u.input.charCodeAt(++u.position)):33===_r?(Kr=!0,fr="!!",_r=u.input.charCodeAt(++u.position)):fr="!",Xe=u.position,wr){do{_r=u.input.charCodeAt(++u.position)}while(0!==_r&&62!==_r);u.position<u.length?(Ar=u.input.slice(Xe,u.position),_r=u.input.charCodeAt(++u.position)):throwError(u,"unexpected end of the stream within a verbatim tag")}else{for(;0!==_r&&!is_WS_OR_EOL(_r);)33===_r&&(Kr?throwError(u,"tag suffix cannot contain exclamation marks"):(fr=u.input.slice(Xe-1,u.position+1),Ac.test(fr)||throwError(u,"named tag handle cannot contain such characters"),Kr=!0,Xe=u.position+1)),_r=u.input.charCodeAt(++u.position);Ar=u.input.slice(Xe,u.position),yc.test(Ar)&&throwError(u,"tag suffix cannot contain flow indicator characters")}Ar&&!bc.test(Ar)&&throwError(u,"tag name cannot contain such characters: "+Ar);try{Ar=decodeURIComponent(Ar)}catch(Xe){throwError(u,"tag name is malformed: "+Ar)}return wr?u.tag=Ar:ql.call(u.tagMap,fr)?u.tag=u.tagMap[fr]+Ar:"!"===fr?u.tag="!"+Ar:"!!"===fr?u.tag="tag:yaml.org,2002:"+Ar:throwError(u,'undeclared tag handle "'+fr+'"'),!0}function readAnchorProperty(u){var Xe,fr;if(38!==(fr=u.input.charCodeAt(u.position)))return!1;for(null!==u.anchor&&throwError(u,"duplication of an anchor property"),fr=u.input.charCodeAt(++u.position),Xe=u.position;0!==fr&&!is_WS_OR_EOL(fr)&&!is_FLOW_INDICATOR(fr);)fr=u.input.charCodeAt(++u.position);return u.position===Xe&&throwError(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(Xe,u.position),!0}function composeNode(u,Xe,fr,Ar,_r){var wr,Kr,In,io,no,oo,so,ao,co,go=1,ho=!1,Co=!1;if(null!==u.listener&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null,wr=Kr=In=nc===fr||rc===fr,Ar&&skipSeparationSpace(u,!0,-1)&&(ho=!0,u.lineIndent>Xe?go=1:u.lineIndent===Xe?go=0:u.lineIndent<Xe&&(go=-1)),1===go)for(;readTagProperty(u)||readAnchorProperty(u);)skipSeparationSpace(u,!0,-1)?(ho=!0,In=wr,u.lineIndent>Xe?go=1:u.lineIndent===Xe?go=0:u.lineIndent<Xe&&(go=-1)):In=!1;if(In&&(In=ho||_r),1!==go&&nc!==fr||(ao=$l===fr||ec===fr?Xe:Xe+1,co=u.position-u.lineStart,1===go?In&&(readBlockSequence(u,co)||function readBlockMapping(u,Xe,fr){var Ar,_r,wr,Kr,In,io,no,oo=u.tag,so=u.anchor,ao={},co=Object.create(null),go=null,ho=null,Co=null,Io=!1,xo=!1;if(-1!==u.firstTabInLine)return!1;for(null!==u.anchor&&(u.anchorMap[u.anchor]=ao),no=u.input.charCodeAt(u.position);0!==no;){if(Io||-1===u.firstTabInLine||(u.position=u.firstTabInLine,throwError(u,"tab characters must not be used in indentation")),Ar=u.input.charCodeAt(u.position+1),wr=u.line,63!==no&&58!==no||!is_WS_OR_EOL(Ar)){if(Kr=u.line,In=u.lineStart,io=u.position,!composeNode(u,fr,ec,!1,!0))break;if(u.line===wr){for(no=u.input.charCodeAt(u.position);is_WHITE_SPACE(no);)no=u.input.charCodeAt(++u.position);if(58===no)is_WS_OR_EOL(no=u.input.charCodeAt(++u.position))||throwError(u,"a whitespace character is expected after the key-value separator within a block mapping"),Io&&(storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),go=ho=Co=null),xo=!0,Io=!1,_r=!1,go=u.tag,ho=u.result;else{if(!xo)return u.tag=oo,u.anchor=so,!0;throwError(u,"can not read an implicit mapping pair; a colon is missed")}}else{if(!xo)return u.tag=oo,u.anchor=so,!0;throwError(u,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===no?(Io&&(storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),go=ho=Co=null),xo=!0,Io=!0,_r=!0):Io?(Io=!1,_r=!0):throwError(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,no=Ar;if((u.line===wr||u.lineIndent>Xe)&&(Io&&(Kr=u.line,In=u.lineStart,io=u.position),composeNode(u,Xe,nc,!0,_r)&&(Io?ho=u.result:Co=u.result),Io||(storeMappingPair(u,ao,co,go,ho,Co,Kr,In,io),go=ho=Co=null),skipSeparationSpace(u,!0,-1),no=u.input.charCodeAt(u.position)),(u.line===wr||u.lineIndent>Xe)&&0!==no)throwError(u,"bad indentation of a mapping entry");else if(u.lineIndent<Xe)break}return Io&&storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),xo&&(u.tag=oo,u.anchor=so,u.kind="mapping",u.result=ao),xo}(u,co,ao))||function readFlowCollection(u,Xe){var fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go=!0,ho=u.tag,Co=u.anchor,Io=Object.create(null);if(91===(co=u.input.charCodeAt(u.position)))Kr=93,no=!1,wr=[];else{if(123!==co)return!1;Kr=125,no=!0,wr={}}for(null!==u.anchor&&(u.anchorMap[u.anchor]=wr),co=u.input.charCodeAt(++u.position);0!==co;){if(skipSeparationSpace(u,!0,Xe),(co=u.input.charCodeAt(u.position))===Kr)return u.position++,u.tag=ho,u.anchor=Co,u.kind=no?"mapping":"sequence",u.result=wr,!0;go?44===co&&throwError(u,"expected the node content, but found ','"):throwError(u,"missed comma between flow collection entries"),ao=null,In=io=!1,63===co&&is_WS_OR_EOL(u.input.charCodeAt(u.position+1))&&(In=io=!0,u.position++,skipSeparationSpace(u,!0,Xe)),fr=u.line,Ar=u.lineStart,_r=u.position,composeNode(u,Xe,$l,!1,!0),so=u.tag,oo=u.result,skipSeparationSpace(u,!0,Xe),co=u.input.charCodeAt(u.position),!io&&u.line!==fr||58!==co||(In=!0,co=u.input.charCodeAt(++u.position),skipSeparationSpace(u,!0,Xe),composeNode(u,Xe,$l,!1,!0),ao=u.result),no?storeMappingPair(u,wr,Io,so,oo,ao,fr,Ar,_r):In?wr.push(storeMappingPair(u,null,Io,so,oo,ao,fr,Ar,_r)):wr.push(oo),skipSeparationSpace(u,!0,Xe),44===(co=u.input.charCodeAt(u.position))?(go=!0,co=u.input.charCodeAt(++u.position)):go=!1}throwError(u,"unexpected end of the stream within a flow collection")}(u,ao)?Co=!0:(Kr&&function readBlockScalar(u,Xe){var fr,Ar,_r,wr,Kr=oc,In=!1,io=!1,no=Xe,oo=0,so=!1;if(124===(wr=u.input.charCodeAt(u.position)))Ar=!1;else{if(62!==wr)return!1;Ar=!0}for(u.kind="scalar",u.result="";0!==wr;)if(43===(wr=u.input.charCodeAt(++u.position))||45===wr)oc===Kr?Kr=43===wr?dc:ac:throwError(u,"repeat of a chomping mode identifier");else{if(!((_r=fromDecimalCode(wr))>=0))break;0===_r?throwError(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):io?throwError(u,"repeat of an indentation width identifier"):(no=Xe+_r-1,io=!0)}if(is_WHITE_SPACE(wr)){do{wr=u.input.charCodeAt(++u.position)}while(is_WHITE_SPACE(wr));if(35===wr)do{wr=u.input.charCodeAt(++u.position)}while(!is_EOL(wr)&&0!==wr)}for(;0!==wr;){for(readLineBreak(u),u.lineIndent=0,wr=u.input.charCodeAt(u.position);(!io||u.lineIndent<no)&&32===wr;)u.lineIndent++,wr=u.input.charCodeAt(++u.position);if(!io&&u.lineIndent>no&&(no=u.lineIndent),is_EOL(wr))oo++;else{if(u.lineIndent<no){Kr===dc?u.result+=sl.repeat("\n",In?1+oo:oo):Kr===oc&&In&&(u.result+="\n");break}for(Ar?is_WHITE_SPACE(wr)?(so=!0,u.result+=sl.repeat("\n",In?1+oo:oo)):so?(so=!1,u.result+=sl.repeat("\n",oo+1)):0===oo?In&&(u.result+=" "):u.result+=sl.repeat("\n",oo):u.result+=sl.repeat("\n",In?1+oo:oo),In=!0,io=!0,oo=0,fr=u.position;!is_EOL(wr)&&0!==wr;)wr=u.input.charCodeAt(++u.position);captureSegment(u,fr,u.position,!1)}}return!0}(u,ao)||function readSingleQuotedScalar(u,Xe){var fr,Ar,_r;if(39!==(fr=u.input.charCodeAt(u.position)))return!1;for(u.kind="scalar",u.result="",u.position++,Ar=_r=u.position;0!==(fr=u.input.charCodeAt(u.position));)if(39===fr){if(captureSegment(u,Ar,u.position,!0),39!==(fr=u.input.charCodeAt(++u.position)))return!0;Ar=u.position,u.position++,_r=u.position}else is_EOL(fr)?(captureSegment(u,Ar,_r,!0),writeFoldedLines(u,skipSeparationSpace(u,!1,Xe)),Ar=_r=u.position):u.position===u.lineStart&&testDocumentSeparator(u)?throwError(u,"unexpected end of the document within a single quoted scalar"):(u.position++,_r=u.position);throwError(u,"unexpected end of the stream within a single quoted scalar")}(u,ao)||function readDoubleQuotedScalar(u,Xe){var fr,Ar,_r,wr,Kr,In;if(34!==(In=u.input.charCodeAt(u.position)))return!1;for(u.kind="scalar",u.result="",u.position++,fr=Ar=u.position;0!==(In=u.input.charCodeAt(u.position));){if(34===In)return captureSegment(u,fr,u.position,!0),u.position++,!0;if(92===In){if(captureSegment(u,fr,u.position,!0),is_EOL(In=u.input.charCodeAt(++u.position)))skipSeparationSpace(u,!1,Xe);else if(In<256&&_c[In])u.result+=vc[In],u.position++;else if((Kr=escapedHexLen(In))>0){for(_r=Kr,wr=0;_r>0;_r--)(Kr=fromHexCode(In=u.input.charCodeAt(++u.position)))>=0?wr=(wr<<4)+Kr:throwError(u,"expected hexadecimal character");u.result+=charFromCodepoint(wr),u.position++}else throwError(u,"unknown escape sequence");fr=Ar=u.position}else is_EOL(In)?(captureSegment(u,fr,Ar,!0),writeFoldedLines(u,skipSeparationSpace(u,!1,Xe)),fr=Ar=u.position):u.position===u.lineStart&&testDocumentSeparator(u)?throwError(u,"unexpected end of the document within a double quoted scalar"):(u.position++,Ar=u.position)}throwError(u,"unexpected end of the stream within a double quoted scalar")}(u,ao)?Co=!0:!function readAlias(u){var Xe,fr,Ar;if(42!==(Ar=u.input.charCodeAt(u.position)))return!1;for(Ar=u.input.charCodeAt(++u.position),Xe=u.position;0!==Ar&&!is_WS_OR_EOL(Ar)&&!is_FLOW_INDICATOR(Ar);)Ar=u.input.charCodeAt(++u.position);return u.position===Xe&&throwError(u,"name of an alias node must contain at least one character"),fr=u.input.slice(Xe,u.position),ql.call(u.anchorMap,fr)||throwError(u,'unidentified alias "'+fr+'"'),u.result=u.anchorMap[fr],skipSeparationSpace(u,!0,-1),!0}(u)?function readPlainScalar(u,Xe,fr){var Ar,_r,wr,Kr,In,io,no,oo,so=u.kind,ao=u.result;if(is_WS_OR_EOL(oo=u.input.charCodeAt(u.position))||is_FLOW_INDICATOR(oo)||35===oo||38===oo||42===oo||33===oo||124===oo||62===oo||39===oo||34===oo||37===oo||64===oo||96===oo)return!1;if((63===oo||45===oo)&&(is_WS_OR_EOL(Ar=u.input.charCodeAt(u.position+1))||fr&&is_FLOW_INDICATOR(Ar)))return!1;for(u.kind="scalar",u.result="",_r=wr=u.position,Kr=!1;0!==oo;){if(58===oo){if(is_WS_OR_EOL(Ar=u.input.charCodeAt(u.position+1))||fr&&is_FLOW_INDICATOR(Ar))break}else if(35===oo){if(is_WS_OR_EOL(u.input.charCodeAt(u.position-1)))break}else{if(u.position===u.lineStart&&testDocumentSeparator(u)||fr&&is_FLOW_INDICATOR(oo))break;if(is_EOL(oo)){if(In=u.line,io=u.lineStart,no=u.lineIndent,skipSeparationSpace(u,!1,-1),u.lineIndent>=Xe){Kr=!0,oo=u.input.charCodeAt(u.position);continue}u.position=wr,u.line=In,u.lineStart=io,u.lineIndent=no;break}}Kr&&(captureSegment(u,_r,wr,!1),writeFoldedLines(u,u.line-In),_r=wr=u.position,Kr=!1),is_WHITE_SPACE(oo)||(wr=u.position+1),oo=u.input.charCodeAt(++u.position)}return captureSegment(u,_r,wr,!1),!!u.result||(u.kind=so,u.result=ao,!1)}(u,ao,$l===fr)&&(Co=!0,null===u.tag&&(u.tag="?")):(Co=!0,null===u.tag&&null===u.anchor||throwError(u,"alias node should not have any properties")),null!==u.anchor&&(u.anchorMap[u.anchor]=u.result)):0===go&&(Co=In&&readBlockSequence(u,co))),null===u.tag)null!==u.anchor&&(u.anchorMap[u.anchor]=u.result);else if("?"===u.tag){for(null!==u.result&&"scalar"!==u.kind&&throwError(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"'),io=0,no=u.implicitTypes.length;io<no;io+=1)if((so=u.implicitTypes[io]).resolve(u.result)){u.result=so.construct(u.result),u.tag=so.tag,null!==u.anchor&&(u.anchorMap[u.anchor]=u.result);break}}else if("!"!==u.tag){if(ql.call(u.typeMap[u.kind||"fallback"],u.tag))so=u.typeMap[u.kind||"fallback"][u.tag];else for(so=null,io=0,no=(oo=u.typeMap.multi[u.kind||"fallback"]).length;io<no;io+=1)if(u.tag.slice(0,oo[io].tag.length)===oo[io].tag){so=oo[io];break}so||throwError(u,"unknown tag !<"+u.tag+">"),null!==u.result&&so.kind!==u.kind&&throwError(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+so.kind+'", not "'+u.kind+'"'),so.resolve(u.result,u.tag)?(u.result=so.construct(u.result,u.tag),null!==u.anchor&&(u.anchorMap[u.anchor]=u.result)):throwError(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return null!==u.listener&&u.listener("close",u),null!==u.tag||null!==u.anchor||Co}function readDocument(u){var Xe,fr,Ar,_r,wr=u.position,Kr=!1;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);0!==(_r=u.input.charCodeAt(u.position))&&(skipSeparationSpace(u,!0,-1),_r=u.input.charCodeAt(u.position),!(u.lineIndent>0||37!==_r));){for(Kr=!0,_r=u.input.charCodeAt(++u.position),Xe=u.position;0!==_r&&!is_WS_OR_EOL(_r);)_r=u.input.charCodeAt(++u.position);for(Ar=[],(fr=u.input.slice(Xe,u.position)).length<1&&throwError(u,"directive name must not be less than one character in length");0!==_r;){for(;is_WHITE_SPACE(_r);)_r=u.input.charCodeAt(++u.position);if(35===_r){do{_r=u.input.charCodeAt(++u.position)}while(0!==_r&&!is_EOL(_r));break}if(is_EOL(_r))break;for(Xe=u.position;0!==_r&&!is_WS_OR_EOL(_r);)_r=u.input.charCodeAt(++u.position);Ar.push(u.input.slice(Xe,u.position))}0!==_r&&readLineBreak(u),ql.call(tg,fr)?tg[fr](u,fr,Ar):throwWarning(u,'unknown document directive "'+fr+'"')}skipSeparationSpace(u,!0,-1),0===u.lineIndent&&45===u.input.charCodeAt(u.position)&&45===u.input.charCodeAt(u.position+1)&&45===u.input.charCodeAt(u.position+2)?(u.position+=3,skipSeparationSpace(u,!0,-1)):Kr&&throwError(u,"directives end mark is expected"),composeNode(u,u.lineIndent-1,nc,!1,!0),skipSeparationSpace(u,!0,-1),u.checkLineBreaks&&Ic.test(u.input.slice(wr,u.position))&&throwWarning(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&testDocumentSeparator(u)?46===u.input.charCodeAt(u.position)&&(u.position+=3,skipSeparationSpace(u,!0,-1)):u.position<u.length-1&&throwError(u,"end of the stream or a document separator is expected")}function loadDocuments(u,Xe){Xe=Xe||{},0!==(u=String(u)).length&&(10!==u.charCodeAt(u.length-1)&&13!==u.charCodeAt(u.length-1)&&(u+="\n"),65279===u.charCodeAt(0)&&(u=u.slice(1)));var fr=new State$1(u,Xe),Ar=u.indexOf("\0");for(-1!==Ar&&(fr.position=Ar,throwError(fr,"null byte is not allowed in input")),fr.input+="\0";32===fr.input.charCodeAt(fr.position);)fr.lineIndent+=1,fr.position+=1;for(;fr.position<fr.length-1;)readDocument(fr);return fr.documents}var eg={loadAll:function loadAll$1(u,Xe,fr){null!==Xe&&"object"==typeof Xe&&void 0===fr&&(fr=Xe,Xe=null);var Ar=loadDocuments(u,fr);if("function"!=typeof Xe)return Ar;for(var _r=0,wr=Ar.length;_r<wr;_r+=1)Xe(Ar[_r])},load:function load$1(u,Xe){var fr=loadDocuments(u,Xe);if(0!==fr.length){if(1===fr.length)return fr[0];throw new al("expected a single document in the stream, but found more")}}},ig=eg.load,rg=eg.loadAll;const ng=new URL("./","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:Xe&&Xe.src||new URL("maplibre.js",document.baseURI).href),og=Object.freeze({use:{Leaflet:{value:ng+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:ng+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:ng+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=u=>({use:u.use??"Leaflet",width:"100%",...u,aliases:{...og,...u.aliases??{}}}),sg={},setValueByAliases=u=>u.aliases?(Object.entries(u).filter((([u,Xe])=>"aliases"!==u&&"string"==typeof Xe&&Xe.match(/^[A-Z]/))).forEach((([Xe,fr])=>{const Ar=u.aliases?.[Xe]?.[fr],_r="object"!=typeof Ar||Array.isArray(Ar)?Ar:Ar.value;_r&&(u[Xe]=_r,"use"===Xe&&(u.url=Ar.url,u.desc=Ar.desc))})),u):u,applyOtherConfig=async u=>{if(!u.apply)return u;await(async u=>{u&&!sg[u]&&(sg[u]=await fetch(u).then((u=>{if(200!==u.status)throw Error();return u.text()})).then((u=>ig(u))).catch((Xe=>{throw Error(`Fail to fetch applied config ${u}`,Xe)})))})(u.apply);const Xe=sg[u.apply];if(!Xe)throw Error("Fail to fetch remote config "+u.aply);return{...Xe,...u,aliases:{...Xe.aliases,...u.aliases??{}}}},prepareRenderer=async u=>{let Xe;if(u.use)if(u.use.steps)Xe=u.use;else{const fr=(await import(u.use)).default;Xe=new fr}else Xe=u;return Object.entries(u).forEach((([u,fr])=>Xe[u]=fr)),Xe},healthCheck=u=>{if(!u.steps)throw u.steps=[],Error("not health");return u},renderWithConfig=async u=>{u.results=[];const Xe=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],fr=(u=>{let Xe=u;return u=>u.reduce(((u,fr)=>u.then((async()=>Xe.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(Xe=await fr(Xe),Xe))).then((u=>Xe.results.push({type:"prepare",func:fr.valueOf(),state:u?.state??"success",result:u?.reason??Xe}))).catch((u=>{Xe.results.push({type:"prepare",func:fr.valueOf(),state:"fail",result:u})})).then((()=>{Xe.prepareCallback?.(Xe,Xe.results)}))),Promise.resolve(Xe)).then((()=>Xe))})(u)(Xe).then((u=>(u=>(u.steps??[]).reduce(((Xe,fr)=>Xe.then((()=>{if("stop"===u.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(fr.depends){const Xe=u.results.findLast((u=>u.func===fr.depends))?.state;if(Xe.match(/skip|fail/))return{state:"skip"}}return fr.valueOf().bind(u)(u)})).then((Xe=>u.results.push({type:"render",func:fr.valueOf(),state:Xe?.state??"success",result:Xe?.reason??Xe}))).catch((Xe=>u.results.push({type:"render",func:fr.valueOf(),state:"fail",result:Xe}))).then((()=>{u.stepCallback?.(u,u)}))),Promise.resolve()).then((()=>u)))(u))).then((u=>{const Xe=!u.results||0===u.results.length||!u.results.find((u=>u.state.match(/success/)))||u.results.find((u=>u.state.match(/fail|stop/))),fr=Xe?"unfulfilled":"fulfilled";return u?.target?.setAttribute("data-render",fr),u}));return fr.valueOf=()=>u.results,fr},setValueOf=u=>(u.valueOf=()=>JSON.stringify(u,((u,Xe)=>u.match(/aliases|target/)?void 0:Xe)),u),shouldRender=u=>!(u.target instanceof window.HTMLElement&&u.target.classList.contains("mapclay")&&u.valueOf()===u.target.getAttribute("data-mapclay")&&"fulfilled"===u.target.getAttribute("data-render")),renderWith=u=>(Xe,fr)=>{u=u??(u=>u);const Ar="object"==typeof fr?Array.isArray(fr)?fr.map(u):[fr].map(u):null;if(!Ar)throw Error(`Invalid config files: ${fr}`);Xe.innerHTML="";return Ar.map(setValueOf).map((u=>{if(shouldRender(u)){const Xe=document.createElement("div");u.id&&(Xe.id=u.id.replaceAll(" ","_"),Xe.title=`ID: ${Xe.id}`),Xe.classList.add("mapclay"),u.target=Xe,Xe.dataset.render="rendering",Xe.dataset.mapclay=u.valueOf()}return Xe.append(u.target),window.CSS.supports(`width: ${u.width}`)&&(u.target.style.width=u.width),window.CSS.supports(`height: ${u.height}`)&&(u.target.style.height=u.height),u})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(u=null)=>async(Xe,fr=null)=>{const Ar=(u=>{const Xe=[];return rg(u,(u=>{"object"!=typeof u||Array.isArray(u)?Xe.length>0&&(Xe.at(-1).eval=u.toString()):Xe.push(u??{})})),0===Xe.length?[{}]:Xe})(fr??Xe.textContent);return renderWith(u)(Xe,Ar)},ag=renderWith(applyDefaultAliases),lg=renderByYamlWith(applyDefaultAliases);
+/**
+   * MapLibre GL JS
+   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.6.0/LICENSE.txt
+   */
+var cg,gg;function getDefaultExportFromCjs(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}function getAugmentedNamespace(u){if(u.__esModule)return u;var Xe=u.default;if("function"==typeof Xe){var fr=function a(){return this instanceof a?Reflect.construct(Xe,arguments,this.constructor):Xe.apply(this,arguments)};fr.prototype=Xe.prototype}else fr={};return Object.defineProperty(fr,"__esModule",{value:!0}),Object.keys(u).forEach((function(Xe){var Ar=Object.getOwnPropertyDescriptor(u,Xe);Object.defineProperty(fr,Xe,Ar.get?Ar:{enumerable:!0,get:function(){return u[Xe]}})})),fr}function objectConverter(u){return new Function("d","return {"+u.map((function(u,Xe){return JSON.stringify(u)+": d["+Xe+"]"})).join(",")+"}")}function dsv$1(u){var Xe=new RegExp('["'+u+"\n]"),fr=u.charCodeAt(0);function parseRows(u,Xe){var Ar,_r,wr={},Kr={},In=[],io=u.length,no=0,oo=0;function token(){if(no>=io)return Kr;if(_r)return _r=!1,wr;var Xe,Ar=no;if(34===u.charCodeAt(Ar)){for(var In=Ar;In++<io;)if(34===u.charCodeAt(In)){if(34!==u.charCodeAt(In+1))break;++In}return no=In+2,13===(Xe=u.charCodeAt(In+1))?(_r=!0,10===u.charCodeAt(In+2)&&++no):10===Xe&&(_r=!0),u.slice(Ar+1,In).replace(/""/g,'"')}for(;no<io;){var oo=1;if(10===(Xe=u.charCodeAt(no++)))_r=!0;else if(13===Xe)_r=!0,10===u.charCodeAt(no)&&(++no,++oo);else if(Xe!==fr)continue;return u.slice(Ar,no-oo)}return u.slice(Ar)}for(;(Ar=token())!==Kr;){for(var so=[];Ar!==wr&&Ar!==Kr;)so.push(Ar),Ar=token();Xe&&null==(so=Xe(so,oo++))||In.push(so)}return In}function formatRow(Xe){return Xe.map(formatValue).join(u)}function formatValue(u){return null==u?"":Xe.test(u+="")?'"'+u.replace(/\"/g,'""')+'"':u}return{parse:function parse(u,Xe){var fr,Ar,_r=parseRows(u,(function(u,_r){if(fr)return fr(u,_r-1);Ar=u,fr=Xe?function customConverter(u,Xe){var fr=objectConverter(u);return function(Ar,_r){return Xe(fr(Ar),_r,u)}}(u,Xe):objectConverter(u)}));return _r.columns=Ar,_r},parseRows:parseRows,format:function format(Xe,fr){return null==fr&&(fr=function inferColumns(u){var Xe=Object.create(null),fr=[];return u.forEach((function(u){for(var Ar in u)Ar in Xe||fr.push(Xe[Ar]=Ar)})),fr}(Xe)),[fr.map(formatValue).join(u)].concat(Xe.map((function(Xe){return fr.map((function(u){return formatValue(Xe[u])})).join(u)}))).join("\n")},formatRows:function formatRows(u){return u.map(formatRow).join("\n")}}}document.currentScript&&(globalThis.mapclay={render:ag,renderWith:renderWith,renderByYaml:lg,renderByYamlWith:renderByYamlWith}),cg=window,gg=function(){var u={},Xe={};function define(fr,Ar,_r){if(Xe[fr]=_r,"index"===fr){var wr="var sharedModule = {}; ("+Xe.shared+")(sharedModule); ("+Xe.worker+")(sharedModule);",Kr={};return Xe.shared(Kr),Xe.index(u,Kr),"undefined"!=typeof window&&u.setWorkerUrl(window.URL.createObjectURL(new Blob([wr],{type:"text/javascript"}))),u}}return define("shared",0,(function(u){function e(u,Xe,fr,Ar){return new(fr||(fr=Promise))((function(_r,wr){function a(u){try{l(Ar.next(u))}catch(u){wr(u)}}function o(u){try{l(Ar.throw(u))}catch(u){wr(u)}}function l(u){var Xe;u.done?_r(u.value):(Xe=u.value,Xe instanceof fr?Xe:new fr((function(u){u(Xe)}))).then(a,o)}l((Ar=Ar.apply(u,Xe||[])).next())}))}function r(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}"function"==typeof SuppressedError&&SuppressedError;var Xe=i;function i(u,Xe){this.x=u,this.y=Xe}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,Xe){return this.clone()._rotateAround(u,Xe)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var Xe=u.x-this.x,fr=u.y-this.y;return Xe*Xe+fr*fr},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,Xe){return Math.atan2(this.x*Xe-this.y*u,this.x*u+this.y*Xe)},_matMult:function(u){var Xe=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=Xe,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var Xe=Math.cos(u),fr=Math.sin(u),Ar=fr*this.x+Xe*this.y;return this.x=Xe*this.x-fr*this.y,this.y=Ar,this},_rotateAround:function(u,Xe){var fr=Math.cos(u),Ar=Math.sin(u),_r=Xe.y+Ar*(this.x-Xe.x)+fr*(this.y-Xe.y);return this.x=Xe.x+fr*(this.x-Xe.x)-Ar*(this.y-Xe.y),this.y=_r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(u){return u instanceof i?u:Array.isArray(u)?new i(u[0],u[1]):u};var fr=r(Xe),Ar=o;function o(u,Xe,fr,Ar){this.cx=3*u,this.bx=3*(fr-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(Ar-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=fr,this.p2y=Ar}o.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var fr=u,Ar=0;Ar<8;Ar++){var _r=this.sampleCurveX(fr)-u;if(Math.abs(_r)<Xe)return fr;var wr=this.sampleCurveDerivativeX(fr);if(Math.abs(wr)<1e-6)break;fr-=_r/wr}var Kr=0,In=1;for(fr=u,Ar=0;Ar<20&&(_r=this.sampleCurveX(fr),!(Math.abs(_r-u)<Xe));Ar++)u>_r?Kr=fr:In=fr,fr=.5*(In-Kr)+Kr;return fr},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var _r=r(Ar);let wr,Kr;function h(){return null==wr&&(wr="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),wr}function p(){if(null==Kr&&(Kr=!1,h())){const u=5,Xe=new OffscreenCanvas(u,u).getContext("2d",{willReadFrequently:!0});if(Xe){for(let fr=0;fr<u*u;fr++){const Ar=4*fr;Xe.fillStyle=`rgb(${Ar},${Ar+1},${Ar+2})`,Xe.fillRect(fr%u,Math.floor(fr/u),1,1)}const fr=Xe.getImageData(0,0,u,u).data;for(let Xe=0;Xe<u*u*4;Xe++)if(Xe%4!=3&&fr[Xe]!==Xe){Kr=!0;break}}}return Kr||!1}function f(u,Xe,fr,Ar){const wr=new _r(u,Xe,fr,Ar);return u=>wr.solve(u)}const In=f(.25,.1,.25,1);function y(u,Xe,fr){return Math.min(fr,Math.max(Xe,u))}function m(u,Xe,fr){const Ar=fr-Xe,_r=((u-Xe)%Ar+Ar)%Ar+Xe;return _r===Xe?fr:_r}function g(u,...Xe){for(const fr of Xe)for(const Xe in fr)u[Xe]=fr[Xe];return u}let io=1;function v(u,Xe,fr){const Ar={};for(const fr in u)Ar[fr]=Xe.call(this,u[fr],fr,u);return Ar}function b(u,Xe,fr){const Ar={};for(const fr in u)Xe.call(this,u[fr],fr,u)&&(Ar[fr]=u[fr]);return Ar}function w(u){return Array.isArray(u)?u.map(w):"object"==typeof u&&u?v(u,w):u}const no={};function A(u){no[u]||("undefined"!=typeof console&&console.warn(u),no[u]=!0)}function S(u,Xe,fr){return(fr.y-u.y)*(Xe.x-u.x)>(Xe.y-u.y)*(fr.x-u.x)}function k(u){return"undefined"!=typeof WorkerGlobalScope&&void 0!==u&&u instanceof WorkerGlobalScope}let oo=null;function I(u){return"undefined"!=typeof ImageBitmap&&u instanceof ImageBitmap}const so="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function P(u,Xe,fr,Ar,_r){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const wr=new VideoFrame(u,{timestamp:0});try{const Kr=null==wr?void 0:wr.format;if(!Kr||!Kr.startsWith("BGR")&&!Kr.startsWith("RGB"))throw new Error(`Unrecognized format ${Kr}`);const In=Kr.startsWith("BGR"),io=new Uint8ClampedArray(Ar*_r*4);if(yield wr.copyTo(io,function(u,Xe,fr,Ar,_r){const wr=4*Math.max(-Xe,0),Kr=(Math.max(0,fr)-fr)*Ar*4+wr,In=4*Ar,io=Math.max(0,Xe),no=Math.max(0,fr);return{rect:{x:io,y:no,width:Math.min(u.width,Xe+Ar)-io,height:Math.min(u.height,fr+_r)-no},layout:[{offset:Kr,stride:In}]}}(u,Xe,fr,Ar,_r)),In)for(let u=0;u<io.length;u+=4){const Xe=io[u];io[u]=io[u+2],io[u+2]=Xe}return io}finally{wr.close()}}))}let ao,co;const go="AbortError";function E(){return new Error(go)}const ho={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function T(u){return ho.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Co="global-dispatcher";class L extends Error{constructor(u,Xe,fr,Ar){super(`AJAXError: ${Xe} (${u}): ${fr}`),this.status=u,this.statusText=Xe,this.url=fr,this.body=Ar}}const D=()=>k(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,O=function(u,Xe){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const fr=T(u.url);if(fr)return fr(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:Co},Xe)}if(!(/^file:/.test(fr=u.url)||/^file:/.test(D())&&!/^\w+:/.test(fr))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(u,Xe){return e(this,void 0,void 0,(function*(){const fr=new Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,cache:u.cache,referrer:D(),signal:Xe.signal});"json"!==u.type||fr.headers.has("Accept")||fr.headers.set("Accept","application/json");const Ar=yield fetch(fr);if(!Ar.ok){const Xe=yield Ar.blob();throw new L(Ar.status,Ar.statusText,u.url,Xe)}let _r;_r="arrayBuffer"===u.type||"image"===u.type?Ar.arrayBuffer():"json"===u.type?Ar.json():Ar.text();const wr=yield _r;if(Xe.signal.aborted)throw E();return{data:wr,cacheControl:Ar.headers.get("Cache-Control"),expires:Ar.headers.get("Expires")}}))}(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:Co},Xe)}var fr;return function(u,Xe){return new Promise(((fr,Ar)=>{var _r;const wr=new XMLHttpRequest;wr.open(u.method||"GET",u.url,!0),"arrayBuffer"!==u.type&&"image"!==u.type||(wr.responseType="arraybuffer");for(const Xe in u.headers)wr.setRequestHeader(Xe,u.headers[Xe]);"json"===u.type&&(wr.responseType="text",(null===(_r=u.headers)||void 0===_r?void 0:_r.Accept)||wr.setRequestHeader("Accept","application/json")),wr.withCredentials="include"===u.credentials,wr.onerror=()=>{Ar(new Error(wr.statusText))},wr.onload=()=>{if(!Xe.signal.aborted)if((wr.status>=200&&wr.status<300||0===wr.status)&&null!==wr.response){let Xe=wr.response;if("json"===u.type)try{Xe=JSON.parse(wr.response)}catch(u){return void Ar(u)}fr({data:Xe,cacheControl:wr.getResponseHeader("Cache-Control"),expires:wr.getResponseHeader("Expires")})}else{const Xe=new Blob([wr.response],{type:wr.getResponseHeader("Content-Type")});Ar(new L(wr.status,wr.statusText,u.url,Xe))}},Xe.signal.addEventListener("abort",(()=>{wr.abort(),Ar(E())})),wr.send(u.body)}))}(u,Xe)};function j(u){if(!u||u.indexOf("://")<=0||0===u.indexOf("data:image/")||0===u.indexOf("blob:"))return!0;const Xe=new URL(u),fr=window.location;return Xe.protocol===fr.protocol&&Xe.host===fr.host}function R(u,Xe,fr){fr[u]&&-1!==fr[u].indexOf(Xe)||(fr[u]=fr[u]||[],fr[u].push(Xe))}function U(u,Xe,fr){if(fr&&fr[u]){const Ar=fr[u].indexOf(Xe);-1!==Ar&&fr[u].splice(Ar,1)}}class q{constructor(u,Xe={}){g(this,Xe),this.type=u}}class N extends q{constructor(u,Xe={}){super("error",g({error:u},Xe))}}class Z{on(u,Xe){return this._listeners=this._listeners||{},R(u,Xe,this._listeners),this}off(u,Xe){return U(u,Xe,this._listeners),U(u,Xe,this._oneTimeListeners),this}once(u,Xe){return Xe?(this._oneTimeListeners=this._oneTimeListeners||{},R(u,Xe,this._oneTimeListeners),this):new Promise((Xe=>this.once(u,Xe)))}fire(u,Xe){"string"==typeof u&&(u=new q(u,Xe||{}));const fr=u.type;if(this.listens(fr)){u.target=this;const Xe=this._listeners&&this._listeners[fr]?this._listeners[fr].slice():[];for(const fr of Xe)fr.call(this,u);const Ar=this._oneTimeListeners&&this._oneTimeListeners[fr]?this._oneTimeListeners[fr].slice():[];for(const Xe of Ar)U(fr,Xe,this._oneTimeListeners),Xe.call(this,u);const _r=this._eventedParent;_r&&(g(u,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),_r.fire(u))}else u instanceof N&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,Xe){return this._eventedParent=u,this._eventedParentData=Xe,this}}var Io={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const xo=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function X(u,Xe){const fr={};for(const Xe in u)"ref"!==Xe&&(fr[Xe]=u[Xe]);return xo.forEach((u=>{u in Xe&&(fr[u]=Xe[u])})),fr}function H(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let fr=0;fr<u.length;fr++)if(!H(u[fr],Xe[fr]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const fr in u)if(!H(u[fr],Xe[fr]))return!1;return!0}return u===Xe}function Y(u,Xe){u.push(Xe)}function J(u,Xe,fr){Y(fr,{command:"addSource",args:[u,Xe[u]]})}function W(u,Xe,fr){Y(Xe,{command:"removeSource",args:[u]}),fr[u]=!0}function Q(u,Xe,fr,Ar){W(u,fr,Ar),J(u,Xe,fr)}function tt(u,Xe,fr){let Ar;for(Ar in u[fr])if(Object.prototype.hasOwnProperty.call(u[fr],Ar)&&"data"!==Ar&&!H(u[fr][Ar],Xe[fr][Ar]))return!1;for(Ar in Xe[fr])if(Object.prototype.hasOwnProperty.call(Xe[fr],Ar)&&"data"!==Ar&&!H(u[fr][Ar],Xe[fr][Ar]))return!1;return!0}function et(u,Xe,fr,Ar,_r,wr){u=u||{},Xe=Xe||{};for(const Kr in u)Object.prototype.hasOwnProperty.call(u,Kr)&&(H(u[Kr],Xe[Kr])||fr.push({command:wr,args:[Ar,Kr,Xe[Kr],_r]}));for(const Kr in Xe)Object.prototype.hasOwnProperty.call(Xe,Kr)&&!Object.prototype.hasOwnProperty.call(u,Kr)&&(H(u[Kr],Xe[Kr])||fr.push({command:wr,args:[Ar,Kr,Xe[Kr],_r]}))}function rt(u){return u.id}function nt(u,Xe){return u[Xe.id]=Xe,u}class it{constructor(u,Xe,fr,Ar){this.message=(u?`${u}: `:"")+fr,Ar&&(this.identifier=Ar),null!=Xe&&Xe.__line__&&(this.line=Xe.__line__)}}function st(u,...Xe){for(const fr of Xe)for(const Xe in fr)u[Xe]=fr[Xe];return u}class at extends Error{constructor(u,Xe){super(Xe),this.message=Xe,this.key=u}}class ot{constructor(u,Xe=[]){this.parent=u,this.bindings={};for(const[u,fr]of Xe)this.bindings[u]=fr}concat(u){return new ot(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const Mo={kind:"null"},Po={kind:"number"},ss={kind:"string"},sa={kind:"boolean"},aa={kind:"color"},fa={kind:"object"},ya={kind:"value"},ol={kind:"collator"},sl={kind:"formatted"},al={kind:"padding"},cl={kind:"resolvedImage"},hl={kind:"variableAnchorOffsetCollection"};function bt(u,Xe){return{kind:"array",itemType:u,N:Xe}}function wt(u){if("array"===u.kind){const Xe=wt(u.itemType);return"number"==typeof u.N?`array<${Xe}, ${u.N}>`:"value"===u.itemType.kind?"array":`array<${Xe}>`}return u.kind}const ul=[Mo,Po,ss,sa,aa,sl,fa,bt(ya),al,cl,hl];function At(u,Xe){if("error"===Xe.kind)return null;if("array"===u.kind){if("array"===Xe.kind&&(0===Xe.N&&"value"===Xe.itemType.kind||!At(u.itemType,Xe.itemType))&&("number"!=typeof u.N||u.N===Xe.N))return null}else{if(u.kind===Xe.kind)return null;if("value"===u.kind)for(const u of ul)if(!At(u,Xe))return null}return`Expected ${wt(u)} but found ${wt(Xe)} instead.`}function St(u,Xe){return Xe.some((Xe=>Xe.kind===u.kind))}function kt(u,Xe){return Xe.some((Xe=>"null"===Xe?null===u:"array"===Xe?Array.isArray(u):"object"===Xe?u&&!Array.isArray(u)&&"object"==typeof u:Xe===typeof u))}function Mt(u,Xe){return"array"===u.kind&&"array"===Xe.kind?u.itemType.kind===Xe.itemType.kind&&"number"==typeof u.N:u.kind===Xe.kind}const dl=.96422,pl=.82521,Cl=4/29,fl=6/29,_l=3*fl*fl,vl=fl*fl*fl,xl=Math.PI/180,Sl=180/Math.PI;function Tt(u){return(u%=360)<0&&(u+=360),u}function $t([u,Xe,fr,Ar]){let _r,wr;const Kr=Dt((.2225045*(u=Lt(u))+.7168786*(Xe=Lt(Xe))+.0606169*(fr=Lt(fr)))/1);u===Xe&&Xe===fr?_r=wr=Kr:(_r=Dt((.4360747*u+.3850649*Xe+.1430804*fr)/dl),wr=Dt((.0139322*u+.0971045*Xe+.7141733*fr)/pl));const In=116*Kr-16;return[In<0?0:In,500*(_r-Kr),200*(Kr-wr),Ar]}function Lt(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Dt(u){return u>vl?Math.pow(u,1/3):u/_l+Cl}function Ot([u,Xe,fr,Ar]){let _r=(u+16)/116,wr=isNaN(Xe)?_r:_r+Xe/500,Kr=isNaN(fr)?_r:_r-fr/200;return _r=1*Rt(_r),wr=dl*Rt(wr),Kr=pl*Rt(Kr),[jt(3.1338561*wr-1.6168667*_r-.4906146*Kr),jt(-.9787684*wr+1.9161415*_r+.033454*Kr),jt(.0719453*wr-.2289914*_r+1.4052427*Kr),Ar]}function jt(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Rt(u){return u>fl?u*u*u:_l*(u-Cl)}function Ut(u){return parseInt(u.padEnd(2,u),16)/255}function qt(u,Xe){return Nt(Xe?u/100:u,0,1)}function Nt(u,Xe,fr){return Math.min(Math.max(Xe,u),fr)}function Zt(u){return!u.some(Number.isNaN)}const kl={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Kt{constructor(u,Xe,fr,Ar=1,_r=!0){this.r=u,this.g=Xe,this.b=fr,this.a=Ar,_r||(this.r*=Ar,this.g*=Ar,this.b*=Ar,Ar||this.overwriteGetter("rgb",[u,Xe,fr,Ar]))}static parse(u){if(u instanceof Kt)return u;if("string"!=typeof u)return;const Xe=function(u){if("transparent"===(u=u.toLowerCase().trim()))return[0,0,0,0];const Xe=kl[u];if(Xe){const[u,fr,Ar]=Xe;return[u/255,fr/255,Ar/255,1]}if(u.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(u)){const Xe=u.length<6?1:2;let fr=1;return[Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+Xe)||"ff")]}if(u.startsWith("rgb")){const Xe=u.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Xe){const[u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao]=Xe,co=[_r||" ",In||" ",oo].join("");if("  "===co||"  /"===co||",,"===co||",,,"===co){const u=[Ar,Kr,no].join(""),Xe="%%%"===u?100:""===u?255:0;if(Xe){const u=[Nt(+fr/Xe,0,1),Nt(+wr/Xe,0,1),Nt(+io/Xe,0,1),so?qt(+so,ao):1];if(Zt(u))return u}}return}}const fr=u.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fr){const[u,Xe,Ar,_r,wr,Kr,In,io,no]=fr,oo=[Ar||" ",wr||" ",In].join("");if("  "===oo||"  /"===oo||",,"===oo||",,,"===oo){const u=[+Xe,Nt(+_r,0,100),Nt(+Kr,0,100),io?qt(+io,no):1];if(Zt(u))return function([u,Xe,fr,Ar]){function i(Ar){const _r=(Ar+u/30)%12,wr=Xe*Math.min(fr,1-fr);return fr-wr*Math.max(-1,Math.min(_r-3,9-_r,1))}return u=Tt(u),Xe/=100,fr/=100,[i(0),i(8),i(4),Ar]}(u)}}}(u);return Xe?new Kt(...Xe,!1):void 0}get rgb(){const{r:u,g:Xe,b:fr,a:Ar}=this,_r=Ar||1/0;return this.overwriteGetter("rgb",[u/_r,Xe/_r,fr/_r,Ar])}get hcl(){return this.overwriteGetter("hcl",function(u){const[Xe,fr,Ar,_r]=$t(u),wr=Math.sqrt(fr*fr+Ar*Ar);return[Math.round(1e4*wr)?Tt(Math.atan2(Ar,fr)*Sl):NaN,wr,Xe,_r]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$t(this.rgb))}overwriteGetter(u,Xe){return Object.defineProperty(this,u,{value:Xe}),Xe}toString(){const[u,Xe,fr,Ar]=this.rgb;return`rgba(${[u,Xe,fr].map((u=>Math.round(255*u))).join(",")},${Ar})`}}Kt.black=new Kt(0,0,0,1),Kt.white=new Kt(1,1,1,1),Kt.transparent=new Kt(0,0,0,0),Kt.red=new Kt(1,0,0,1);class Xt{constructor(u,Xe,fr){this.sensitivity=u?Xe?"variant":"case":Xe?"accent":"base",this.locale=fr,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,Xe){return this.collator.compare(u,Xe)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ht{constructor(u,Xe,fr,Ar,_r){this.text=u,this.image=Xe,this.scale=fr,this.fontStack=Ar,this.textColor=_r}}class Yt{constructor(u){this.sections=u}static fromString(u){return new Yt([new Ht(u,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((u=>0!==u.text.length||u.image&&0!==u.image.name.length))}static factory(u){return u instanceof Yt?u:Yt.fromString(u)}toString(){return 0===this.sections.length?"":this.sections.map((u=>u.text)).join("")}}class Jt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Jt)return u;if("number"==typeof u)return new Jt([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const Xe of u)if("number"!=typeof Xe)return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new Jt(u)}}toString(){return JSON.stringify(this.values)}}const Bl=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Qt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Qt)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let Xe=0;Xe<u.length;Xe+=2){const fr=u[Xe],Ar=u[Xe+1];if("string"!=typeof fr||!Bl.has(fr))return;if(!Array.isArray(Ar)||2!==Ar.length||"number"!=typeof Ar[0]||"number"!=typeof Ar[1])return}return new Qt(u)}}toString(){return JSON.stringify(this.values)}}class te{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new te({name:u,available:!1}):null}}function ee(u,Xe,fr,Ar){return"number"==typeof u&&u>=0&&u<=255&&"number"==typeof Xe&&Xe>=0&&Xe<=255&&"number"==typeof fr&&fr>=0&&fr<=255?void 0===Ar||"number"==typeof Ar&&Ar>=0&&Ar<=1?null:`Invalid rgba value [${[u,Xe,fr,Ar].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof Ar?[u,Xe,fr,Ar]:[u,Xe,fr]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function re(u){if(null===u||"string"==typeof u||"boolean"==typeof u||"number"==typeof u||u instanceof Kt||u instanceof Xt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te)return!0;if(Array.isArray(u)){for(const Xe of u)if(!re(Xe))return!1;return!0}if("object"==typeof u){for(const Xe in u)if(!re(u[Xe]))return!1;return!0}return!1}function ne(u){if(null===u)return Mo;if("string"==typeof u)return ss;if("boolean"==typeof u)return sa;if("number"==typeof u)return Po;if(u instanceof Kt)return aa;if(u instanceof Xt)return ol;if(u instanceof Yt)return sl;if(u instanceof Jt)return al;if(u instanceof Qt)return hl;if(u instanceof te)return cl;if(Array.isArray(u)){const Xe=u.length;let fr;for(const Xe of u){const u=ne(Xe);if(fr){if(fr===u)continue;fr=ya;break}fr=u}return bt(fr||ya,Xe)}return fa}function ie(u){const Xe=typeof u;return null===u?"":"string"===Xe||"number"===Xe||"boolean"===Xe?String(u):u instanceof Kt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te?u.toString():JSON.stringify(u)}class se{constructor(u,Xe){this.type=u,this.value=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!re(u[1]))return Xe.error("invalid value");const fr=u[1];let Ar=ne(fr);const _r=Xe.expectedType;return"array"!==Ar.kind||0!==Ar.N||!_r||"array"!==_r.kind||"number"==typeof _r.N&&0!==_r.N||(Ar=_r),new se(Ar,fr)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ae{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Zl={string:ss,number:Po,boolean:sa,object:fa};class le{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");let fr,Ar=1;const _r=u[0];if("array"===_r){let _r,wr;if(u.length>2){const fr=u[1];if("string"!=typeof fr||!(fr in Zl)||"object"===fr)return Xe.error('The item type argument of "array" must be one of string, number, boolean',1);_r=Zl[fr],Ar++}else _r=ya;if(u.length>3){if(null!==u[2]&&("number"!=typeof u[2]||u[2]<0||u[2]!==Math.floor(u[2])))return Xe.error('The length argument to "array" must be a positive integer literal',2);wr=u[2],Ar++}fr=bt(_r,wr)}else{if(!Zl[_r])throw new Error(`Types doesn't contain name = ${_r}`);fr=Zl[_r]}const wr=[];for(;Ar<u.length;Ar++){const fr=Xe.parse(u[Ar],Ar,ya);if(!fr)return null;wr.push(fr)}return new le(fr,wr)}evaluate(u){for(let Xe=0;Xe<this.args.length;Xe++){const fr=this.args[Xe].evaluate(u);if(!At(this.type,ne(fr)))return fr;if(Xe===this.args.length-1)throw new ae(`Expected value to be of type ${wt(this.type)}, but found ${wt(ne(fr))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Rl={"to-boolean":sa,"to-color":aa,"to-number":Po,"to-string":ss};class ce{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const fr=u[0];if(!Rl[fr])throw new Error(`Can't parse ${fr} as it is not part of the known types`);if(("to-boolean"===fr||"to-string"===fr)&&2!==u.length)return Xe.error("Expected one argument.");const Ar=Rl[fr],_r=[];for(let fr=1;fr<u.length;fr++){const Ar=Xe.parse(u[fr],fr,ya);if(!Ar)return null;_r.push(Ar)}return new ce(Ar,_r)}evaluate(u){switch(this.type.kind){case"boolean":return Boolean(this.args[0].evaluate(u));case"color":{let Xe,fr;for(const Ar of this.args){if(Xe=Ar.evaluate(u),fr=null,Xe instanceof Kt)return Xe;if("string"==typeof Xe){const fr=u.parseColor(Xe);if(fr)return fr}else if(Array.isArray(Xe)&&(fr=Xe.length<3||Xe.length>4?`Invalid rbga value ${JSON.stringify(Xe)}: expected an array containing either three or four numeric values.`:ee(Xe[0],Xe[1],Xe[2],Xe[3]),!fr))return new Kt(Xe[0]/255,Xe[1]/255,Xe[2]/255,Xe[3])}throw new ae(fr||`Could not parse color from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"padding":{let Xe;for(const fr of this.args){Xe=fr.evaluate(u);const Ar=Jt.parse(Xe);if(Ar)return Ar}throw new ae(`Could not parse padding from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"variableAnchorOffsetCollection":{let Xe;for(const fr of this.args){Xe=fr.evaluate(u);const Ar=Qt.parse(Xe);if(Ar)return Ar}throw new ae(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"number":{let Xe=null;for(const fr of this.args){if(Xe=fr.evaluate(u),null===Xe)return 0;const Ar=Number(Xe);if(!isNaN(Ar))return Ar}throw new ae(`Could not convert ${JSON.stringify(Xe)} to number.`)}case"formatted":return Yt.fromString(ie(this.args[0].evaluate(u)));case"resolvedImage":return te.fromString(ie(this.args[0].evaluate(u)));default:return ie(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Wl=["Unknown","Point","LineString","Polygon"];class pe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Wl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(u){let Xe=this._parseColorCache[u];return Xe||(Xe=this._parseColorCache[u]=Kt.parse(u)),Xe}}class fe{constructor(u,Xe,fr=[],Ar,_r=new ot,wr=[]){this.registry=u,this.path=fr,this.key=fr.map((u=>`[${u}]`)).join(""),this.scope=_r,this.errors=wr,this.expectedType=Ar,this._isConstant=Xe}parse(u,Xe,fr,Ar,_r={}){return Xe?this.concat(Xe,fr,Ar)._parse(u,_r):this._parse(u,_r)}_parse(u,Xe){function r(u,Xe,fr){return"assert"===fr?new le(Xe,[u]):"coerce"===fr?new ce(Xe,[u]):u}if(null!==u&&"string"!=typeof u&&"boolean"!=typeof u&&"number"!=typeof u||(u=["literal",u]),Array.isArray(u)){if(0===u.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const fr=u[0];if("string"!=typeof fr)return this.error(`Expression name must be a string, but found ${typeof fr} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const Ar=this.registry[fr];if(Ar){let fr=Ar.parse(u,this);if(!fr)return null;if(this.expectedType){const u=this.expectedType,Ar=fr.type;if("string"!==u.kind&&"number"!==u.kind&&"boolean"!==u.kind&&"object"!==u.kind&&"array"!==u.kind||"value"!==Ar.kind)if("color"!==u.kind&&"formatted"!==u.kind&&"resolvedImage"!==u.kind||"value"!==Ar.kind&&"string"!==Ar.kind)if("padding"!==u.kind||"value"!==Ar.kind&&"number"!==Ar.kind&&"array"!==Ar.kind)if("variableAnchorOffsetCollection"!==u.kind||"value"!==Ar.kind&&"array"!==Ar.kind){if(this.checkSubtype(u,Ar))return null}else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"assert")}if(!(fr instanceof se)&&"resolvedImage"!==fr.type.kind&&this._isConstant(fr)){const Xe=new pe;try{fr=new se(fr.type,fr.evaluate(Xe))}catch(u){return this.error(u.message),null}}return fr}return this.error(`Unknown expression "${fr}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===u?"'undefined' value invalid. Use null instead.":"object"==typeof u?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,Xe,fr){const Ar="number"==typeof u?this.path.concat(u):this.path,_r=fr?this.scope.concat(fr):this.scope;return new fe(this.registry,this._isConstant,Ar,Xe||null,_r,this.errors)}error(u,...Xe){const fr=`${this.key}${Xe.map((u=>`[${u}]`)).join("")}`;this.errors.push(new at(fr,u))}checkSubtype(u,Xe){const fr=At(u,Xe);return fr&&this.error(fr),fr}}class de{constructor(u,Xe){this.type=Xe.type,this.bindings=[].concat(u),this.result=Xe}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const Xe of this.bindings)u(Xe[1]);u(this.result)}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const fr=[];for(let Ar=1;Ar<u.length-1;Ar+=2){const _r=u[Ar];if("string"!=typeof _r)return Xe.error(`Expected string, but found ${typeof _r} instead.`,Ar);if(/[^a-zA-Z0-9_]/.test(_r))return Xe.error("Variable names must contain only alphanumeric characters or '_'.",Ar);const wr=Xe.parse(u[Ar+1],Ar+1);if(!wr)return null;fr.push([_r,wr])}const Ar=Xe.parse(u[u.length-1],u.length-1,Xe.expectedType,fr);return Ar?new de(fr,Ar):null}outputDefined(){return this.result.outputDefined()}}class ye{constructor(u,Xe){this.type=Xe.type,this.name=u,this.boundExpression=Xe}static parse(u,Xe){if(2!==u.length||"string"!=typeof u[1])return Xe.error("'var' expression requires exactly one string literal argument.");const fr=u[1];return Xe.scope.has(fr)?new ye(fr,Xe.scope.get(fr)):Xe.error(`Unknown variable "${fr}". Make sure "${fr}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class me{constructor(u,Xe,fr){this.type=u,this.index=Xe,this.input=fr}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,Po),Ar=Xe.parse(u[2],2,bt(Xe.expectedType||ya));return fr&&Ar?new me(Ar.type.itemType,fr,Ar):null}evaluate(u){const Xe=this.index.evaluate(u),fr=this.input.evaluate(u);if(Xe<0)throw new ae(`Array index out of bounds: ${Xe} < 0.`);if(Xe>=fr.length)throw new ae(`Array index out of bounds: ${Xe} > ${fr.length-1}.`);if(Xe!==Math.floor(Xe))throw new ae(`Array index must be an integer, but found ${Xe} instead.`);return fr[Xe]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class ge{constructor(u,Xe){this.type=sa,this.needle=u,this.haystack=Xe}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,ya);return fr&&Ar?St(fr.type,[sa,ss,Po,Mo,ya])?new ge(fr,Ar):Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(fr.type)} instead`):null}evaluate(u){const Xe=this.needle.evaluate(u),fr=this.haystack.evaluate(u);if(!fr)return!1;if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);if(!kt(fr,["string","array"]))throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(fr))} instead.`);return fr.indexOf(Xe)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class xe{constructor(u,Xe,fr){this.type=Po,this.needle=u,this.haystack=Xe,this.fromIndex=fr}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,ya);if(!fr||!Ar)return null;if(!St(fr.type,[sa,ss,Po,Mo,ya]))return Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(fr.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Po);return _r?new xe(fr,Ar,_r):null}return new xe(fr,Ar)}evaluate(u){const Xe=this.needle.evaluate(u),fr=this.haystack.evaluate(u);if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);let Ar;if(this.fromIndex&&(Ar=this.fromIndex.evaluate(u)),kt(fr,["string"])){const u=fr.indexOf(Xe,Ar);return-1===u?-1:[...fr.slice(0,u)].length}if(kt(fr,["array"]))return fr.indexOf(Xe,Ar);throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(fr))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class ve{constructor(u,Xe,fr,Ar,_r,wr){this.inputType=u,this.type=Xe,this.input=fr,this.cases=Ar,this.outputs=_r,this.otherwise=wr}static parse(u,Xe){if(u.length<5)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return Xe.error("Expected an even number of arguments.");let fr,Ar;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Ar=Xe.expectedType);const _r={},wr=[];for(let Kr=2;Kr<u.length-1;Kr+=2){let In=u[Kr];const io=u[Kr+1];Array.isArray(In)||(In=[In]);const no=Xe.concat(Kr);if(0===In.length)return no.error("Expected at least one branch label.");for(const u of In){if("number"!=typeof u&&"string"!=typeof u)return no.error("Branch labels must be numbers or strings.");if("number"==typeof u&&Math.abs(u)>Number.MAX_SAFE_INTEGER)return no.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof u&&Math.floor(u)!==u)return no.error("Numeric branch labels must be integer values.");if(fr){if(no.checkSubtype(fr,ne(u)))return null}else fr=ne(u);if(void 0!==_r[String(u)])return no.error("Branch labels must be unique.");_r[String(u)]=wr.length}const oo=Xe.parse(io,Kr,Ar);if(!oo)return null;Ar=Ar||oo.type,wr.push(oo)}const Kr=Xe.parse(u[1],1,ya);if(!Kr)return null;const In=Xe.parse(u[u.length-1],u.length-1,Ar);return In?"value"!==Kr.type.kind&&Xe.concat(1).checkSubtype(fr,Kr.type)?null:new ve(fr,Ar,Kr,_r,wr,In):null}evaluate(u){const Xe=this.input.evaluate(u);return(ne(Xe)===this.inputType&&this.outputs[this.cases[Xe]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))&&this.otherwise.outputDefined()}}class be{constructor(u,Xe,fr){this.type=u,this.branches=Xe,this.otherwise=fr}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return Xe.error("Expected an odd number of arguments.");let fr;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(fr=Xe.expectedType);const Ar=[];for(let _r=1;_r<u.length-1;_r+=2){const wr=Xe.parse(u[_r],_r,sa);if(!wr)return null;const Kr=Xe.parse(u[_r+1],_r+1,fr);if(!Kr)return null;Ar.push([wr,Kr]),fr=fr||Kr.type}const _r=Xe.parse(u[u.length-1],u.length-1,fr);if(!_r)return null;if(!fr)throw new Error("Can't infer output type");return new be(fr,Ar,_r)}evaluate(u){for(const[Xe,fr]of this.branches)if(Xe.evaluate(u))return fr.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[Xe,fr]of this.branches)u(Xe),u(fr);u(this.otherwise)}outputDefined(){return this.branches.every((([u,Xe])=>Xe.outputDefined()))&&this.otherwise.outputDefined()}}class we{constructor(u,Xe,fr,Ar){this.type=u,this.input=Xe,this.beginIndex=fr,this.endIndex=Ar}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,Po);if(!fr||!Ar)return null;if(!St(fr.type,[bt(ya),ss,ya]))return Xe.error(`Expected first argument to be of type array or string, but found ${wt(fr.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Po);return _r?new we(fr.type,fr,Ar,_r):null}return new we(fr.type,fr,Ar)}evaluate(u){const Xe=this.input.evaluate(u),fr=this.beginIndex.evaluate(u);let Ar;if(this.endIndex&&(Ar=this.endIndex.evaluate(u)),kt(Xe,["string"]))return[...Xe].slice(fr,Ar).join("");if(kt(Xe,["array"]))return Xe.slice(fr,Ar);throw new ae(`Expected first argument to be of type array or string, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function _e(u,Xe){const fr=u.length-1;let Ar,_r,wr=0,Kr=fr,In=0;for(;wr<=Kr;)if(In=Math.floor((wr+Kr)/2),Ar=u[In],_r=u[In+1],Ar<=Xe){if(In===fr||Xe<_r)return In;wr=In+1}else{if(!(Ar>Xe))throw new ae("Input is not a number.");Kr=In-1}return 0}class Ae{constructor(u,Xe,fr){this.type=u,this.input=Xe,this.labels=[],this.outputs=[];for(const[u,Xe]of fr)this.labels.push(u),this.outputs.push(Xe)}static parse(u,Xe){if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");const fr=Xe.parse(u[1],1,Po);if(!fr)return null;const Ar=[];let _r=null;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(_r=Xe.expectedType);for(let fr=1;fr<u.length;fr+=2){const wr=1===fr?-1/0:u[fr],Kr=u[fr+1],In=fr,io=fr+1;if("number"!=typeof wr)return Xe.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',In);if(Ar.length&&Ar[Ar.length-1][0]>=wr)return Xe.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',In);const no=Xe.parse(Kr,io,_r);if(!no)return null;_r=_r||no.type,Ar.push([wr,no])}return new Ae(_r,fr,Ar)}evaluate(u){const Xe=this.labels,fr=this.outputs;if(1===Xe.length)return fr[0].evaluate(u);const Ar=this.input.evaluate(u);if(Ar<=Xe[0])return fr[0].evaluate(u);const _r=Xe.length;return Ar>=Xe[_r-1]?fr[_r-1].evaluate(u):fr[_e(Xe,Ar)].evaluate(u)}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}var Tl=Me;function Me(u,Xe,fr,Ar){this.cx=3*u,this.bx=3*(fr-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(Ar-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=fr,this.p2y=Ar}Me.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var fr=u,Ar=0;Ar<8;Ar++){var _r=this.sampleCurveX(fr)-u;if(Math.abs(_r)<Xe)return fr;var wr=this.sampleCurveDerivativeX(fr);if(Math.abs(wr)<1e-6)break;fr-=_r/wr}var Kr=0,In=1;for(fr=u,Ar=0;Ar<20&&(_r=this.sampleCurveX(fr),!(Math.abs(_r-u)<Xe));Ar++)u>_r?Kr=fr:In=fr,fr=.5*(In-Kr)+Kr;return fr},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var Jl=function Se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}(Tl);function ze(u,Xe,fr){return u+fr*(Xe-u)}function Pe(u,Xe,fr){return u.map(((u,Ar)=>ze(u,Xe[Ar],fr)))}const Kl={number:ze,color:function(u,Xe,fr,Ar="rgb"){switch(Ar){case"rgb":{const[Ar,_r,wr,Kr]=Pe(u.rgb,Xe.rgb,fr);return new Kt(Ar,_r,wr,Kr,!1)}case"hcl":{const[Ar,_r,wr,Kr]=u.hcl,[In,io,no,oo]=Xe.hcl;let so,ao;if(isNaN(Ar)||isNaN(In))isNaN(Ar)?isNaN(In)?so=NaN:(so=In,1!==wr&&0!==wr||(ao=io)):(so=Ar,1!==no&&0!==no||(ao=_r));else{let u=In-Ar;In>Ar&&u>180?u-=360:In<Ar&&Ar-In>180&&(u+=360),so=Ar+fr*u}const[co,go,ho,Co]=function([u,Xe,fr,Ar]){return u=isNaN(u)?0:u*xl,Ot([fr,Math.cos(u)*Xe,Math.sin(u)*Xe,Ar])}([so,null!=ao?ao:ze(_r,io,fr),ze(wr,no,fr),ze(Kr,oo,fr)]);return new Kt(co,go,ho,Co,!1)}case"lab":{const[Ar,_r,wr,Kr]=Ot(Pe(u.lab,Xe.lab,fr));return new Kt(Ar,_r,wr,Kr,!1)}}},array:Pe,padding:function(u,Xe,fr){return new Jt(Pe(u.values,Xe.values,fr))},variableAnchorOffsetCollection:function(u,Xe,fr){const Ar=u.values,_r=Xe.values;if(Ar.length!==_r.length)throw new ae(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${Xe.toString()}`);const wr=[];for(let u=0;u<Ar.length;u+=2){if(Ar[u]!==_r[u])throw new ae(`Cannot interpolate values containing mismatched anchors. from[${u}]: ${Ar[u]}, to[${u}]: ${_r[u]}`);wr.push(Ar[u]);const[Xe,Kr]=Ar[u+1],[In,io]=_r[u+1];wr.push([ze(Xe,In,fr),ze(Kr,io,fr)])}return new Qt(wr)}};class Be{constructor(u,Xe,fr,Ar,_r){this.type=u,this.operator=Xe,this.interpolation=fr,this.input=Ar,this.labels=[],this.outputs=[];for(const[u,Xe]of _r)this.labels.push(u),this.outputs.push(Xe)}static interpolationFactor(u,Xe,fr,Ar){let _r=0;if("exponential"===u.name)_r=Ve(Xe,u.base,fr,Ar);else if("linear"===u.name)_r=Ve(Xe,1,fr,Ar);else if("cubic-bezier"===u.name){const wr=u.controlPoints;_r=new Jl(wr[0],wr[1],wr[2],wr[3]).solve(Ve(Xe,1,fr,Ar))}return _r}static parse(u,Xe){let[fr,Ar,_r,...wr]=u;if(!Array.isArray(Ar)||0===Ar.length)return Xe.error("Expected an interpolation type expression.",1);if("linear"===Ar[0])Ar={name:"linear"};else if("exponential"===Ar[0]){const u=Ar[1];if("number"!=typeof u)return Xe.error("Exponential interpolation requires a numeric base.",1,1);Ar={name:"exponential",base:u}}else{if("cubic-bezier"!==Ar[0])return Xe.error(`Unknown interpolation type ${String(Ar[0])}`,1,0);{const u=Ar.slice(1);if(4!==u.length||u.some((u=>"number"!=typeof u||u<0||u>1)))return Xe.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ar={name:"cubic-bezier",controlPoints:u}}}if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");if(_r=Xe.parse(_r,2,Po),!_r)return null;const Kr=[];let In=null;"interpolate-hcl"===fr||"interpolate-lab"===fr?In=aa:Xe.expectedType&&"value"!==Xe.expectedType.kind&&(In=Xe.expectedType);for(let u=0;u<wr.length;u+=2){const fr=wr[u],Ar=wr[u+1],_r=u+3,io=u+4;if("number"!=typeof fr)return Xe.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',_r);if(Kr.length&&Kr[Kr.length-1][0]>=fr)return Xe.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',_r);const no=Xe.parse(Ar,io,In);if(!no)return null;In=In||no.type,Kr.push([fr,no])}return Mt(In,Po)||Mt(In,aa)||Mt(In,al)||Mt(In,hl)||Mt(In,bt(Po))?new Be(In,fr,Ar,_r,Kr):Xe.error(`Type ${wt(In)} is not interpolatable.`)}evaluate(u){const Xe=this.labels,fr=this.outputs;if(1===Xe.length)return fr[0].evaluate(u);const Ar=this.input.evaluate(u);if(Ar<=Xe[0])return fr[0].evaluate(u);const _r=Xe.length;if(Ar>=Xe[_r-1])return fr[_r-1].evaluate(u);const wr=_e(Xe,Ar),Kr=Be.interpolationFactor(this.interpolation,Ar,Xe[wr],Xe[wr+1]),In=fr[wr].evaluate(u),io=fr[wr+1].evaluate(u);switch(this.operator){case"interpolate":return Kl[this.type.kind](In,io,Kr);case"interpolate-hcl":return Kl.color(In,io,Kr,"hcl");case"interpolate-lab":return Kl.color(In,io,Kr,"lab")}}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Ve(u,Xe,fr,Ar){const _r=Ar-fr,wr=u-fr;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}class Ee{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expectected at least one argument.");let fr=null;const Ar=Xe.expectedType;Ar&&"value"!==Ar.kind&&(fr=Ar);const _r=[];for(const Ar of u.slice(1)){const u=Xe.parse(Ar,1+_r.length,fr,void 0,{typeAnnotation:"omit"});if(!u)return null;fr=fr||u.type,_r.push(u)}if(!fr)throw new Error("No output type");const wr=Ar&&_r.some((u=>At(Ar,u.type)));return new Ee(wr?ya:fr,_r)}evaluate(u){let Xe,fr=null,Ar=0;for(const _r of this.args)if(Ar++,fr=_r.evaluate(u),fr&&fr instanceof te&&!fr.available&&(Xe||(Xe=fr.name),fr=null,Ar===this.args.length&&(fr=Xe)),null!==fr)break;return fr}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}function Fe(u,Xe){return"=="===u||"!="===u?"boolean"===Xe.kind||"string"===Xe.kind||"number"===Xe.kind||"null"===Xe.kind||"value"===Xe.kind:"string"===Xe.kind||"number"===Xe.kind||"value"===Xe.kind}function Te(u,Xe,fr,Ar){return 0===Ar.compare(Xe,fr)}function $e(u,Xe,fr){const Ar="=="!==u&&"!="!==u;return class i{constructor(u,Xe,fr){this.type=sa,this.lhs=u,this.rhs=Xe,this.collator=fr,this.hasUntypedArgument="value"===u.type.kind||"value"===Xe.type.kind}static parse(u,Xe){if(3!==u.length&&4!==u.length)return Xe.error("Expected two or three arguments.");const fr=u[0];let _r=Xe.parse(u[1],1,ya);if(!_r)return null;if(!Fe(fr,_r.type))return Xe.concat(1).error(`"${fr}" comparisons are not supported for type '${wt(_r.type)}'.`);let wr=Xe.parse(u[2],2,ya);if(!wr)return null;if(!Fe(fr,wr.type))return Xe.concat(2).error(`"${fr}" comparisons are not supported for type '${wt(wr.type)}'.`);if(_r.type.kind!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error(`Cannot compare types '${wt(_r.type)}' and '${wt(wr.type)}'.`);Ar&&("value"===_r.type.kind&&"value"!==wr.type.kind?_r=new le(wr.type,[_r]):"value"!==_r.type.kind&&"value"===wr.type.kind&&(wr=new le(_r.type,[wr])));let Kr=null;if(4===u.length){if("string"!==_r.type.kind&&"string"!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error("Cannot use collator to compare non-string types.");if(Kr=Xe.parse(u[3],3,ol),!Kr)return null}return new i(_r,wr,Kr)}evaluate(_r){const wr=this.lhs.evaluate(_r),Kr=this.rhs.evaluate(_r);if(Ar&&this.hasUntypedArgument){const Xe=ne(wr),fr=ne(Kr);if(Xe.kind!==fr.kind||"string"!==Xe.kind&&"number"!==Xe.kind)throw new ae(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${Xe.kind}, ${fr.kind}) instead.`)}if(this.collator&&!Ar&&this.hasUntypedArgument){const u=ne(wr),fr=ne(Kr);if("string"!==u.kind||"string"!==fr.kind)return Xe(_r,wr,Kr)}return this.collator?fr(_r,wr,Kr,this.collator.evaluate(_r)):Xe(_r,wr,Kr)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const Ll=$e("==",(function(u,Xe,fr){return Xe===fr}),Te),Dl=$e("!=",(function(u,Xe,fr){return Xe!==fr}),(function(u,Xe,fr,Ar){return!Te(0,Xe,fr,Ar)})),Yl=$e("<",(function(u,Xe,fr){return Xe<fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)<0})),Nl=$e(">",(function(u,Xe,fr){return Xe>fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)>0})),Ol=$e("<=",(function(u,Xe,fr){return Xe<=fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)<=0})),jl=$e(">=",(function(u,Xe,fr){return Xe>=fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)>=0}));class qe{constructor(u,Xe,fr){this.type=ol,this.locale=fr,this.caseSensitive=u,this.diacriticSensitive=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected one argument.");const fr=u[1];if("object"!=typeof fr||Array.isArray(fr))return Xe.error("Collator options argument must be an object.");const Ar=Xe.parse(void 0!==fr["case-sensitive"]&&fr["case-sensitive"],1,sa);if(!Ar)return null;const _r=Xe.parse(void 0!==fr["diacritic-sensitive"]&&fr["diacritic-sensitive"],1,sa);if(!_r)return null;let wr=null;return fr.locale&&(wr=Xe.parse(fr.locale,1,ss),!wr)?null:new qe(Ar,_r,wr)}evaluate(u){return new Xt(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class Ne{constructor(u,Xe,fr,Ar,_r){this.type=ss,this.number=u,this.locale=Xe,this.currency=fr,this.minFractionDigits=Ar,this.maxFractionDigits=_r}static parse(u,Xe){if(3!==u.length)return Xe.error("Expected two arguments.");const fr=Xe.parse(u[1],1,Po);if(!fr)return null;const Ar=u[2];if("object"!=typeof Ar||Array.isArray(Ar))return Xe.error("NumberFormat options argument must be an object.");let _r=null;if(Ar.locale&&(_r=Xe.parse(Ar.locale,1,ss),!_r))return null;let wr=null;if(Ar.currency&&(wr=Xe.parse(Ar.currency,1,ss),!wr))return null;let Kr=null;if(Ar["min-fraction-digits"]&&(Kr=Xe.parse(Ar["min-fraction-digits"],1,Po),!Kr))return null;let In=null;return Ar["max-fraction-digits"]&&(In=Xe.parse(Ar["max-fraction-digits"],1,Po),!In)?null:new Ne(fr,_r,wr,Kr,In)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class Ze{constructor(u){this.type=sl,this.sections=u}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const fr=u[1];if(!Array.isArray(fr)&&"object"==typeof fr)return Xe.error("First argument must be an image or text section.");const Ar=[];let _r=!1;for(let fr=1;fr<=u.length-1;++fr){const wr=u[fr];if(_r&&"object"==typeof wr&&!Array.isArray(wr)){_r=!1;let u=null;if(wr["font-scale"]&&(u=Xe.parse(wr["font-scale"],1,Po),!u))return null;let fr=null;if(wr["text-font"]&&(fr=Xe.parse(wr["text-font"],1,bt(ss)),!fr))return null;let Kr=null;if(wr["text-color"]&&(Kr=Xe.parse(wr["text-color"],1,aa),!Kr))return null;const In=Ar[Ar.length-1];In.scale=u,In.font=fr,In.textColor=Kr}else{const wr=Xe.parse(u[fr],1,ya);if(!wr)return null;const Kr=wr.type.kind;if("string"!==Kr&&"value"!==Kr&&"null"!==Kr&&"resolvedImage"!==Kr)return Xe.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");_r=!0,Ar.push({content:wr,scale:null,font:null,textColor:null})}}return new Ze(Ar)}evaluate(u){return new Yt(this.sections.map((Xe=>{const fr=Xe.content.evaluate(u);return ne(fr)===cl?new Ht("",fr,null,null,null):new Ht(ie(fr),null,Xe.scale?Xe.scale.evaluate(u):null,Xe.font?Xe.font.evaluate(u).join(","):null,Xe.textColor?Xe.textColor.evaluate(u):null)})))}eachChild(u){for(const Xe of this.sections)u(Xe.content),Xe.scale&&u(Xe.scale),Xe.font&&u(Xe.font),Xe.textColor&&u(Xe.textColor)}outputDefined(){return!1}}class Ge{constructor(u){this.type=cl,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected two arguments.");const fr=Xe.parse(u[1],1,ss);return fr?new Ge(fr):Xe.error("No image name provided.")}evaluate(u){const Xe=this.input.evaluate(u),fr=te.fromString(Xe);return fr&&u.availableImages&&(fr.available=u.availableImages.indexOf(Xe)>-1),fr}eachChild(u){u(this.input)}outputDefined(){return!1}}class Ke{constructor(u){this.type=Po,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error(`Expected 1 argument, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1);return fr?"array"!==fr.type.kind&&"string"!==fr.type.kind&&"value"!==fr.type.kind?Xe.error(`Expected argument of type string or array, but found ${wt(fr.type)} instead.`):new Ke(fr):null}evaluate(u){const Xe=this.input.evaluate(u);if("string"==typeof Xe)return[...Xe].length;if(Array.isArray(Xe))return Xe.length;throw new ae(`Expected value to be of type string or array, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const Ql=8192;function He(u,Xe){const fr=(180+u[0])/360,Ar=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_r=Math.pow(2,Xe.z);return[Math.round(fr*_r*Ql),Math.round(Ar*_r*Ql)]}function Ye(u,Xe){const fr=Math.pow(2,Xe.z);return[(_r=(u[0]/Ql+Xe.x)/fr,360*_r-180),(Ar=(u[1]/Ql+Xe.y)/fr,360/Math.PI*Math.atan(Math.exp((180-360*Ar)*Math.PI/180))-90)];var Ar,_r}function Je(u,Xe){u[0]=Math.min(u[0],Xe[0]),u[1]=Math.min(u[1],Xe[1]),u[2]=Math.max(u[2],Xe[0]),u[3]=Math.max(u[3],Xe[1])}function We(u,Xe){return!(u[0]<=Xe[0]||u[2]>=Xe[2]||u[1]<=Xe[1]||u[3]>=Xe[3])}function Qe(u,Xe,fr){const Ar=u[0]-Xe[0],_r=u[1]-Xe[1],wr=u[0]-fr[0],Kr=u[1]-fr[1];return Ar*Kr-wr*_r==0&&Ar*wr<=0&&_r*Kr<=0}function tr(u,Xe,fr,Ar){return 0!=(_r=[Ar[0]-fr[0],Ar[1]-fr[1]])[0]*(wr=[Xe[0]-u[0],Xe[1]-u[1]])[1]-_r[1]*wr[0]&&!(!ar(u,Xe,fr,Ar)||!ar(fr,Ar,u,Xe));var _r,wr}function er(u,Xe,fr){for(const Ar of fr)for(let fr=0;fr<Ar.length-1;++fr)if(tr(u,Xe,Ar[fr],Ar[fr+1]))return!0;return!1}function rr(u,Xe,fr=!1){let Ar=!1;for(const In of Xe)for(let Xe=0;Xe<In.length-1;Xe++){if(Qe(u,In[Xe],In[Xe+1]))return fr;(wr=In[Xe])[1]>(_r=u)[1]!=(Kr=In[Xe+1])[1]>_r[1]&&_r[0]<(Kr[0]-wr[0])*(_r[1]-wr[1])/(Kr[1]-wr[1])+wr[0]&&(Ar=!Ar)}var _r,wr,Kr;return Ar}function nr(u,Xe){for(const fr of Xe)if(rr(u,fr))return!0;return!1}function ir(u,Xe){for(const fr of u)if(!rr(fr,Xe))return!1;for(let fr=0;fr<u.length-1;++fr)if(er(u[fr],u[fr+1],Xe))return!1;return!0}function sr(u,Xe){for(const fr of Xe)if(ir(u,fr))return!0;return!1}function ar(u,Xe,fr,Ar){const _r=Ar[0]-fr[0],wr=Ar[1]-fr[1],Kr=(u[0]-fr[0])*wr-_r*(u[1]-fr[1]),In=(Xe[0]-fr[0])*wr-_r*(Xe[1]-fr[1]);return Kr>0&&In<0||Kr<0&&In>0}function or(u,Xe,fr){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=[];for(let Ar=0;Ar<u[_r].length;Ar++){const Kr=He(u[_r][Ar],fr);Je(Xe,Kr),wr.push(Kr)}Ar.push(wr)}return Ar}function lr(u,Xe,fr){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=or(u[_r],Xe,fr);Ar.push(wr)}return Ar}function ur(u,Xe,fr,Ar){if(u[0]<fr[0]||u[0]>fr[2]){const Xe=.5*Ar;let _r=u[0]-fr[0]>Xe?-Ar:fr[0]-u[0]>Xe?Ar:0;0===_r&&(_r=u[0]-fr[2]>Xe?-Ar:fr[2]-u[0]>Xe?Ar:0),u[0]+=_r}Je(Xe,u)}function cr(u,Xe,fr,Ar){const _r=Math.pow(2,Ar.z)*Ql,wr=[Ar.x*Ql,Ar.y*Ql],Kr=[];for(const Ar of u)for(const u of Ar){const Ar=[u.x+wr[0],u.y+wr[1]];ur(Ar,Xe,fr,_r),Kr.push(Ar)}return Kr}function hr(u,Xe,fr,Ar){const _r=Math.pow(2,Ar.z)*Ql,wr=[Ar.x*Ql,Ar.y*Ql],Kr=[];for(const fr of u){const u=[];for(const Ar of fr){const fr=[Ar.x+wr[0],Ar.y+wr[1]];Je(Xe,fr),u.push(fr)}Kr.push(u)}if(Xe[2]-Xe[0]<=_r/2){(In=Xe)[0]=In[1]=1/0,In[2]=In[3]=-1/0;for(const u of Kr)for(const Ar of u)ur(Ar,Xe,fr,_r)}var In;return Kr}class pr{constructor(u,Xe){this.type=sa,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type){const u=[];for(const fr of Xe.features){const{type:Xe,coordinates:Ar}=fr.geometry;"Polygon"===Xe&&u.push(Ar),"MultiPolygon"===Xe&&u.push(...Ar)}if(u.length)return new pr(Xe,{type:"MultiPolygon",coordinates:u})}else if("Feature"===Xe.type){const u=Xe.geometry.type;if("Polygon"===u||"MultiPolygon"===u)return new pr(Xe,Xe.geometry)}else if("Polygon"===Xe.type||"MultiPolygon"===Xe.type)return new pr(Xe,Xe)}return Xe.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const fr=[1/0,1/0,-1/0,-1/0],Ar=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,Ar,_r),Kr=cr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!rr(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,Ar,_r),Kr=cr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!nr(u,wr))return!1}return!0}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const fr=[1/0,1/0,-1/0,-1/0],Ar=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,Ar,_r),Kr=hr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!ir(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,Ar,_r),Kr=hr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!sr(u,wr))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let ql=class{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:fr}=this,Ar=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(fr(Ar,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=Ar}_down(u){const{data:Xe,compare:fr}=this,Ar=this.length>>1,_r=Xe[u];for(;u<Ar;){let Ar=1+(u<<1);const wr=Ar+1;if(wr<this.length&&fr(Xe[wr],Xe[Ar])<0&&(Ar=wr),fr(Xe[Ar],_r)>=0)break;Xe[u]=Xe[Ar],u=Ar}Xe[u]=_r}};function dr(u,Xe,fr,Ar,_r){yr(u,Xe,fr,Ar||u.length-1,_r||gr)}function yr(u,Xe,fr,Ar,_r){for(;Ar>fr;){if(Ar-fr>600){var wr=Ar-fr+1,Kr=Xe-fr+1,In=Math.log(wr),io=.5*Math.exp(2*In/3),no=.5*Math.sqrt(In*io*(wr-io)/wr)*(Kr-wr/2<0?-1:1);yr(u,Xe,Math.max(fr,Math.floor(Xe-Kr*io/wr+no)),Math.min(Ar,Math.floor(Xe+(wr-Kr)*io/wr+no)),_r)}var oo=u[Xe],so=fr,ao=Ar;for(mr(u,fr,Xe),_r(u[Ar],oo)>0&&mr(u,fr,Ar);so<ao;){for(mr(u,so,ao),so++,ao--;_r(u[so],oo)<0;)so++;for(;_r(u[ao],oo)>0;)ao--}0===_r(u[fr],oo)?mr(u,fr,ao):mr(u,++ao,Ar),ao<=Xe&&(fr=ao+1),Xe<=ao&&(Ar=ao-1)}}function mr(u,Xe,fr){var Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function gr(u,Xe){return u<Xe?-1:u>Xe?1:0}function xr(u,Xe){if(u.length<=1)return[u];const fr=[];let Ar,_r;for(const Xe of u){const u=br(Xe);0!==u&&(Xe.area=Math.abs(u),void 0===_r&&(_r=u<0),_r===u<0?(Ar&&fr.push(Ar),Ar=[Xe]):Ar.push(Xe))}if(Ar&&fr.push(Ar),Xe>1)for(let u=0;u<fr.length;u++)fr[u].length<=Xe||(dr(fr[u],Xe,1,fr[u].length-1,vr),fr[u]=fr[u].slice(0,Xe));return fr}function vr(u,Xe){return Xe.area-u.area}function br(u){let Xe=0;for(let fr,Ar,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++)fr=u[_r],Ar=u[Kr],Xe+=(Ar.x-fr.x)*(fr.y+Ar.y);return Xe}const $l=1/298.257223563,ec=$l*(2-$l),rc=Math.PI/180;class Sr{constructor(u){const Xe=6378.137*rc*1e3,fr=Math.cos(u*rc),Ar=1/(1-ec*(1-fr*fr)),_r=Math.sqrt(Ar);this.kx=Xe*_r*fr,this.ky=Xe*_r*Ar*(1-ec)}distance(u,Xe){const fr=this.wrap(u[0]-Xe[0])*this.kx,Ar=(u[1]-Xe[1])*this.ky;return Math.sqrt(fr*fr+Ar*Ar)}pointOnLine(u,Xe){let fr,Ar,_r,wr,Kr=1/0;for(let In=0;In<u.length-1;In++){let io=u[In][0],no=u[In][1],oo=this.wrap(u[In+1][0]-io)*this.kx,so=(u[In+1][1]-no)*this.ky,ao=0;0===oo&&0===so||(ao=(this.wrap(Xe[0]-io)*this.kx*oo+(Xe[1]-no)*this.ky*so)/(oo*oo+so*so),ao>1?(io=u[In+1][0],no=u[In+1][1]):ao>0&&(io+=oo/this.kx*ao,no+=so/this.ky*ao)),oo=this.wrap(Xe[0]-io)*this.kx,so=(Xe[1]-no)*this.ky;const co=oo*oo+so*so;co<Kr&&(Kr=co,fr=io,Ar=no,_r=In,wr=ao)}return{point:[fr,Ar],index:_r,t:Math.max(0,Math.min(1,wr))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function kr(u,Xe){return Xe[0]-u[0]}function Mr(u){return u[1]-u[0]+1}function Ir(u,Xe){return u[1]>=u[0]&&u[1]<Xe}function zr(u,Xe){if(u[0]>u[1])return[null,null];const fr=Mr(u);if(Xe){if(2===fr)return[u,null];const Xe=Math.floor(fr/2);return[[u[0],u[0]+Xe],[u[0]+Xe,u[1]]]}if(1===fr)return[u,null];const Ar=Math.floor(fr/2)-1;return[[u[0],u[0]+Ar],[u[0]+Ar+1,u[1]]]}function Pr(u,Xe){if(!Ir(Xe,u.length))return[1/0,1/0,-1/0,-1/0];const fr=[1/0,1/0,-1/0,-1/0];for(let Ar=Xe[0];Ar<=Xe[1];++Ar)Je(fr,u[Ar]);return fr}function Cr(u){const Xe=[1/0,1/0,-1/0,-1/0];for(const fr of u)for(const u of fr)Je(Xe,u);return Xe}function Br(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Vr(u,Xe,fr){if(!Br(u)||!Br(Xe))return NaN;let Ar=0,_r=0;return u[2]<Xe[0]&&(Ar=Xe[0]-u[2]),u[0]>Xe[2]&&(Ar=u[0]-Xe[2]),u[1]>Xe[3]&&(_r=u[1]-Xe[3]),u[3]<Xe[1]&&(_r=Xe[1]-u[3]),fr.distance([0,0],[Ar,_r])}function Er(u,Xe,fr){const Ar=fr.pointOnLine(Xe,u);return fr.distance(u,Ar.point)}function Fr(u,Xe,fr,Ar,_r){const wr=Math.min(Er(u,[fr,Ar],_r),Er(Xe,[fr,Ar],_r)),Kr=Math.min(Er(fr,[u,Xe],_r),Er(Ar,[u,Xe],_r));return Math.min(wr,Kr)}function Tr(u,Xe,fr,Ar,_r){if(!Ir(Xe,u.length)||!Ir(Ar,fr.length))return 1/0;let wr=1/0;for(let Kr=Xe[0];Kr<Xe[1];++Kr){const Xe=u[Kr],In=u[Kr+1];for(let u=Ar[0];u<Ar[1];++u){const Ar=fr[u],Kr=fr[u+1];if(tr(Xe,In,Ar,Kr))return 0;wr=Math.min(wr,Fr(Xe,In,Ar,Kr,_r))}}return wr}function $r(u,Xe,fr,Ar,_r){if(!Ir(Xe,u.length)||!Ir(Ar,fr.length))return NaN;let wr=1/0;for(let Kr=Xe[0];Kr<=Xe[1];++Kr)for(let Xe=Ar[0];Xe<=Ar[1];++Xe)if(wr=Math.min(wr,_r.distance(u[Kr],fr[Xe])),0===wr)return wr;return wr}function Lr(u,Xe,fr){if(rr(u,Xe,!0))return 0;let Ar=1/0;for(const _r of Xe){const Xe=_r[0],wr=_r[_r.length-1];if(Xe!==wr&&(Ar=Math.min(Ar,Er(u,[wr,Xe],fr)),0===Ar))return Ar;const Kr=fr.pointOnLine(_r,u);if(Ar=Math.min(Ar,fr.distance(u,Kr.point)),0===Ar)return Ar}return Ar}function Dr(u,Xe,fr,Ar){if(!Ir(Xe,u.length))return NaN;for(let Ar=Xe[0];Ar<=Xe[1];++Ar)if(rr(u[Ar],fr,!0))return 0;let _r=1/0;for(let wr=Xe[0];wr<Xe[1];++wr){const Xe=u[wr],Kr=u[wr+1];for(const u of fr)for(let fr=0,wr=u.length,In=wr-1;fr<wr;In=fr++){const wr=u[In],io=u[fr];if(tr(Xe,Kr,wr,io))return 0;_r=Math.min(_r,Fr(Xe,Kr,wr,io,Ar))}}return _r}function Or(u,Xe){for(const fr of u)for(const u of fr)if(rr(u,Xe,!0))return!0;return!1}function jr(u,Xe,fr,Ar=1/0){const _r=Cr(u),wr=Cr(Xe);if(Ar!==1/0&&Vr(_r,wr,fr)>=Ar)return Ar;if(We(_r,wr)){if(Or(u,Xe))return 0}else if(Or(Xe,u))return 0;let Kr=1/0;for(const Ar of u)for(let u=0,_r=Ar.length,wr=_r-1;u<_r;wr=u++){const _r=Ar[wr],In=Ar[u];for(const u of Xe)for(let Xe=0,Ar=u.length,wr=Ar-1;Xe<Ar;wr=Xe++){const Ar=u[wr],io=u[Xe];if(tr(_r,In,Ar,io))return 0;Kr=Math.min(Kr,Fr(_r,In,Ar,io,fr))}}return Kr}function Rr(u,Xe,fr,Ar,_r,wr){if(!wr)return;const Kr=Vr(Pr(Ar,wr),_r,fr);Kr<Xe&&u.push([Kr,wr,[0,0]])}function Ur(u,Xe,fr,Ar,_r,wr,Kr){if(!wr||!Kr)return;const In=Vr(Pr(Ar,wr),Pr(_r,Kr),fr);In<Xe&&u.push([In,wr,Kr])}function qr(u,Xe,fr,Ar,_r=1/0){let wr=Math.min(Ar.distance(u[0],fr[0][0]),_r);if(0===wr)return wr;const Kr=new ql([[0,[0,u.length-1],[0,0]]],kr),In=Cr(fr);for(;Kr.length>0;){const _r=Kr.pop();if(_r[0]>=wr)continue;const io=_r[1],no=Xe?50:100;if(Mr(io)<=no){if(!Ir(io,u.length))return NaN;if(Xe){const Xe=Dr(u,io,fr,Ar);if(isNaN(Xe)||0===Xe)return Xe;wr=Math.min(wr,Xe)}else for(let Xe=io[0];Xe<=io[1];++Xe){const _r=Lr(u[Xe],fr,Ar);if(wr=Math.min(wr,_r),0===wr)return 0}}else{const fr=zr(io,Xe);Rr(Kr,wr,Ar,u,In,fr[0]),Rr(Kr,wr,Ar,u,In,fr[1])}}return wr}function Nr(u,Xe,fr,Ar,_r,wr=1/0){let Kr=Math.min(wr,_r.distance(u[0],fr[0]));if(0===Kr)return Kr;const In=new ql([[0,[0,u.length-1],[0,fr.length-1]]],kr);for(;In.length>0;){const wr=In.pop();if(wr[0]>=Kr)continue;const io=wr[1],no=wr[2],oo=Xe?50:100,so=Ar?50:100;if(Mr(io)<=oo&&Mr(no)<=so){if(!Ir(io,u.length)&&Ir(no,fr.length))return NaN;let wr;if(Xe&&Ar)wr=Tr(u,io,fr,no,_r),Kr=Math.min(Kr,wr);else if(Xe&&!Ar){const Xe=u.slice(io[0],io[1]+1);for(let u=no[0];u<=no[1];++u)if(wr=Er(fr[u],Xe,_r),Kr=Math.min(Kr,wr),0===Kr)return Kr}else if(!Xe&&Ar){const Xe=fr.slice(no[0],no[1]+1);for(let fr=io[0];fr<=io[1];++fr)if(wr=Er(u[fr],Xe,_r),Kr=Math.min(Kr,wr),0===Kr)return Kr}else wr=$r(u,io,fr,no,_r),Kr=Math.min(Kr,wr)}else{const wr=zr(io,Xe),oo=zr(no,Ar);Ur(In,Kr,_r,u,fr,wr[0],oo[0]),Ur(In,Kr,_r,u,fr,wr[0],oo[1]),Ur(In,Kr,_r,u,fr,wr[1],oo[0]),Ur(In,Kr,_r,u,fr,wr[1],oo[1])}}return Kr}function Zr(u){return"MultiPolygon"===u.type?u.coordinates.map((u=>({type:"Polygon",coordinates:u}))):"MultiLineString"===u.type?u.coordinates.map((u=>({type:"LineString",coordinates:u}))):"MultiPoint"===u.type?u.coordinates.map((u=>({type:"Point",coordinates:u}))):[u]}class Gr{constructor(u,Xe){this.type=Po,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type)return new Gr(Xe,Xe.features.map((u=>Zr(u.geometry))).flat());if("Feature"===Xe.type)return new Gr(Xe,Zr(Xe.geometry));if("type"in Xe&&"coordinates"in Xe)return new Gr(Xe,Zr(Xe))}return Xe.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const fr=u.geometry(),Ar=fr.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===fr.length)return NaN;const _r=new Sr(Ar[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(Ar,!1,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(Ar,!1,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(Ar,!1,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const fr=u.geometry(),Ar=fr.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===fr.length)return NaN;const _r=new Sr(Ar[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(Ar,!0,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(Ar,!0,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(Ar,!0,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("Polygon"===u.geometryType())return function(u,Xe){const fr=u.geometry();if(0===fr.length||0===fr[0].length)return NaN;const Ar=xr(fr,0).map((Xe=>Xe.map((Xe=>Xe.map((Xe=>Ye([Xe.x,Xe.y],u.canonical))))))),_r=new Sr(Ar[0][0][0][1]);let wr=1/0;for(const u of Xe)for(const Xe of Ar){switch(u.type){case"Point":wr=Math.min(wr,qr([u.coordinates],!1,Xe,_r,wr));break;case"LineString":wr=Math.min(wr,qr(u.coordinates,!0,Xe,_r,wr));break;case"Polygon":wr=Math.min(wr,jr(Xe,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const nc={"==":Ll,"!=":Dl,">":Nl,"<":Yl,">=":jl,"<=":Ol,array:le,at:me,boolean:le,case:be,coalesce:Ee,collator:qe,format:Ze,image:Ge,in:ge,"index-of":xe,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:Ke,let:de,literal:se,match:ve,number:le,"number-format":Ne,object:le,slice:we,step:Ae,string:le,"to-boolean":ce,"to-color":ce,"to-number":ce,"to-string":ce,var:ye,within:pr,distance:Gr};class Xr{constructor(u,Xe,fr,Ar){this.name=u,this.type=Xe,this._evaluate=fr,this.args=Ar}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,Xe){const fr=u[0],Ar=Xr.definitions[fr];if(!Ar)return Xe.error(`Unknown expression "${fr}". If you wanted a literal array, use ["literal", [...]].`,0);const _r=Array.isArray(Ar)?Ar[0]:Ar.type,wr=Array.isArray(Ar)?[[Ar[1],Ar[2]]]:Ar.overloads,Kr=wr.filter((([Xe])=>!Array.isArray(Xe)||Xe.length===u.length-1));let In=null;for(const[Ar,wr]of Kr){In=new fe(Xe.registry,Qr,Xe.path,null,Xe.scope);const Kr=[];let io=!1;for(let Xe=1;Xe<u.length;Xe++){const fr=u[Xe],_r=Array.isArray(Ar)?Ar[Xe-1]:Ar.type,wr=In.parse(fr,1+Kr.length,_r);if(!wr){io=!0;break}Kr.push(wr)}if(!io)if(Array.isArray(Ar)&&Ar.length!==Kr.length)In.error(`Expected ${Ar.length} arguments, but found ${Kr.length} instead.`);else{for(let u=0;u<Kr.length;u++){const Xe=Array.isArray(Ar)?Ar[u]:Ar.type,fr=Kr[u];In.concat(u+1).checkSubtype(Xe,fr.type)}if(0===In.errors.length)return new Xr(fr,_r,wr,Kr)}}if(1===Kr.length)Xe.errors.push(...In.errors);else{const fr=(Kr.length?Kr:wr).map((([u])=>{return Xe=u,Array.isArray(Xe)?`(${Xe.map(wt).join(", ")})`:`(${wt(Xe.type)}...)`;var Xe})).join(" | "),Ar=[];for(let fr=1;fr<u.length;fr++){const _r=Xe.parse(u[fr],1+Ar.length);if(!_r)return null;Ar.push(wt(_r.type))}Xe.error(`Expected arguments of type ${fr}, but found (${Ar.join(", ")}) instead.`)}return null}static register(u,Xe){Xr.definitions=Xe;for(const fr in Xe)u[fr]=Xr}}function Hr(u,[Xe,fr,Ar,_r]){Xe=Xe.evaluate(u),fr=fr.evaluate(u),Ar=Ar.evaluate(u);const wr=_r?_r.evaluate(u):1,Kr=ee(Xe,fr,Ar,wr);if(Kr)throw new ae(Kr);return new Kt(Xe/255,fr/255,Ar/255,wr,!1)}function Yr(u,Xe){return u in Xe}function Jr(u,Xe){const fr=Xe[u];return void 0===fr?null:fr}function Wr(u){return{type:u}}function Qr(u){if(u instanceof ye)return Qr(u.boundExpression);if(u instanceof Xr&&"error"===u.name)return!1;if(u instanceof qe)return!1;if(u instanceof pr)return!1;if(u instanceof Gr)return!1;const Xe=u instanceof ce||u instanceof le;let fr=!0;return u.eachChild((u=>{fr=Xe?fr&&Qr(u):fr&&u instanceof se})),!!fr&&tn(u)&&rn(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function tn(u){if(u instanceof Xr){if("get"===u.name&&1===u.args.length)return!1;if("feature-state"===u.name)return!1;if("has"===u.name&&1===u.args.length)return!1;if("properties"===u.name||"geometry-type"===u.name||"id"===u.name)return!1;if(/^filter-/.test(u.name))return!1}if(u instanceof pr)return!1;if(u instanceof Gr)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!tn(u)&&(Xe=!1)})),Xe}function en(u){if(u instanceof Xr&&"feature-state"===u.name)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!en(u)&&(Xe=!1)})),Xe}function rn(u,Xe){if(u instanceof Xr&&Xe.indexOf(u.name)>=0)return!1;let fr=!0;return u.eachChild((u=>{fr&&!rn(u,Xe)&&(fr=!1)})),fr}function nn(u){return{result:"success",value:u}}function sn(u){return{result:"error",value:u}}function an(u){return"data-driven"===u["property-type"]||"cross-faded-data-driven"===u["property-type"]}function on(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function ln(u){return!!u.expression&&u.expression.interpolated}function un(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":null===u?"null":typeof u}function cn(u){return"object"==typeof u&&null!==u&&!Array.isArray(u)}function hn(u){return u}function pn(u,Xe){const fr="color"===Xe.type,Ar=u.stops&&"object"==typeof u.stops[0][0],_r=Ar||!(Ar||void 0!==u.property),wr=u.type||(ln(Xe)?"exponential":"interval");if(fr||"padding"===Xe.type){const Ar=fr?Kt.parse:Jt.parse;(u=st({},u)).stops&&(u.stops=u.stops.map((u=>[u[0],Ar(u[1])]))),u.default=Ar(u.default?u.default:Xe.default)}if(u.colorSpace&&"rgb"!==(Kr=u.colorSpace)&&"hcl"!==Kr&&"lab"!==Kr)throw new Error(`Unknown color space: "${u.colorSpace}"`);var Kr;let In,io,no;if("exponential"===wr)In=mn;else if("interval"===wr)In=yn;else if("categorical"===wr){In=dn,io=Object.create(null);for(const Xe of u.stops)io[Xe[0]]=Xe[1];no=typeof u.stops[0][0]}else{if("identity"!==wr)throw new Error(`Unknown function type "${wr}"`);In=gn}if(Ar){const fr={},Ar=[];for(let Xe=0;Xe<u.stops.length;Xe++){const _r=u.stops[Xe],wr=_r[0].zoom;void 0===fr[wr]&&(fr[wr]={zoom:wr,type:u.type,property:u.property,default:u.default,stops:[]},Ar.push(wr)),fr[wr].stops.push([_r[0].value,_r[1]])}const _r=[];for(const u of Ar)_r.push([fr[u].zoom,pn(fr[u],Xe)]);const wr={name:"linear"};return{kind:"composite",interpolationType:wr,interpolationFactor:Be.interpolationFactor.bind(void 0,wr),zoomStops:_r.map((u=>u[0])),evaluate:({zoom:fr},Ar)=>mn({stops:_r,base:u.base},Xe,fr).evaluate(fr,Ar)}}if(_r){const fr="exponential"===wr?{name:"exponential",base:void 0!==u.base?u.base:1}:null;return{kind:"camera",interpolationType:fr,interpolationFactor:Be.interpolationFactor.bind(void 0,fr),zoomStops:u.stops.map((u=>u[0])),evaluate:({zoom:fr})=>In(u,Xe,fr,io,no)}}return{kind:"source",evaluate(fr,Ar){const _r=Ar&&Ar.properties?Ar.properties[u.property]:void 0;return void 0===_r?fn(u.default,Xe.default):In(u,Xe,_r,io,no)}}}function fn(u,Xe,fr){return void 0!==u?u:void 0!==Xe?Xe:void 0!==fr?fr:void 0}function dn(u,Xe,fr,Ar,_r){return fn(typeof fr===_r?Ar[fr]:void 0,u.default,Xe.default)}function yn(u,Xe,fr){if("number"!==un(fr))return fn(u.default,Xe.default);const Ar=u.stops.length;if(1===Ar)return u.stops[0][1];if(fr<=u.stops[0][0])return u.stops[0][1];if(fr>=u.stops[Ar-1][0])return u.stops[Ar-1][1];const _r=_e(u.stops.map((u=>u[0])),fr);return u.stops[_r][1]}function mn(u,Xe,fr){const Ar=void 0!==u.base?u.base:1;if("number"!==un(fr))return fn(u.default,Xe.default);const _r=u.stops.length;if(1===_r)return u.stops[0][1];if(fr<=u.stops[0][0])return u.stops[0][1];if(fr>=u.stops[_r-1][0])return u.stops[_r-1][1];const wr=_e(u.stops.map((u=>u[0])),fr),Kr=function(u,Xe,fr,Ar){const _r=Ar-fr,wr=u-fr;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}(fr,Ar,u.stops[wr][0],u.stops[wr+1][0]),In=u.stops[wr][1],io=u.stops[wr+1][1],no=Kl[Xe.type]||hn;return"function"==typeof In.evaluate?{evaluate(...Xe){const fr=In.evaluate.apply(void 0,Xe),Ar=io.evaluate.apply(void 0,Xe);if(void 0!==fr&&void 0!==Ar)return no(fr,Ar,Kr,u.colorSpace)}}:no(In,io,Kr,u.colorSpace)}function gn(u,Xe,fr){switch(Xe.type){case"color":fr=Kt.parse(fr);break;case"formatted":fr=Yt.fromString(fr.toString());break;case"resolvedImage":fr=te.fromString(fr.toString());break;case"padding":fr=Jt.parse(fr);break;default:un(fr)===Xe.type||"enum"===Xe.type&&Xe.values[fr]||(fr=void 0)}return fn(fr,u.default,Xe.default)}Xr.register(nc,{error:[{kind:"error"},[ss],(u,[Xe])=>{throw new ae(Xe.evaluate(u))}],typeof:[ss,[ya],(u,[Xe])=>wt(ne(Xe.evaluate(u)))],"to-rgba":[bt(Po,4),[aa],(u,[Xe])=>{const[fr,Ar,_r,wr]=Xe.evaluate(u).rgb;return[255*fr,255*Ar,255*_r,wr]}],rgb:[aa,[Po,Po,Po],Hr],rgba:[aa,[Po,Po,Po,Po],Hr],has:{type:sa,overloads:[[[ss],(u,[Xe])=>Yr(Xe.evaluate(u),u.properties())],[[ss,fa],(u,[Xe,fr])=>Yr(Xe.evaluate(u),fr.evaluate(u))]]},get:{type:ya,overloads:[[[ss],(u,[Xe])=>Jr(Xe.evaluate(u),u.properties())],[[ss,fa],(u,[Xe,fr])=>Jr(Xe.evaluate(u),fr.evaluate(u))]]},"feature-state":[ya,[ss],(u,[Xe])=>Jr(Xe.evaluate(u),u.featureState||{})],properties:[fa,[],u=>u.properties()],"geometry-type":[ss,[],u=>u.geometryType()],id:[ya,[],u=>u.id()],zoom:[Po,[],u=>u.globals.zoom],"heatmap-density":[Po,[],u=>u.globals.heatmapDensity||0],"line-progress":[Po,[],u=>u.globals.lineProgress||0],accumulated:[ya,[],u=>void 0===u.globals.accumulated?null:u.globals.accumulated],"+":[Po,Wr(Po),(u,Xe)=>{let fr=0;for(const Ar of Xe)fr+=Ar.evaluate(u);return fr}],"*":[Po,Wr(Po),(u,Xe)=>{let fr=1;for(const Ar of Xe)fr*=Ar.evaluate(u);return fr}],"-":{type:Po,overloads:[[[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)-fr.evaluate(u)],[[Po],(u,[Xe])=>-Xe.evaluate(u)]]},"/":[Po,[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)/fr.evaluate(u)],"%":[Po,[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)%fr.evaluate(u)],ln2:[Po,[],()=>Math.LN2],pi:[Po,[],()=>Math.PI],e:[Po,[],()=>Math.E],"^":[Po,[Po,Po],(u,[Xe,fr])=>Math.pow(Xe.evaluate(u),fr.evaluate(u))],sqrt:[Po,[Po],(u,[Xe])=>Math.sqrt(Xe.evaluate(u))],log10:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN10],ln:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))],log2:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN2],sin:[Po,[Po],(u,[Xe])=>Math.sin(Xe.evaluate(u))],cos:[Po,[Po],(u,[Xe])=>Math.cos(Xe.evaluate(u))],tan:[Po,[Po],(u,[Xe])=>Math.tan(Xe.evaluate(u))],asin:[Po,[Po],(u,[Xe])=>Math.asin(Xe.evaluate(u))],acos:[Po,[Po],(u,[Xe])=>Math.acos(Xe.evaluate(u))],atan:[Po,[Po],(u,[Xe])=>Math.atan(Xe.evaluate(u))],min:[Po,Wr(Po),(u,Xe)=>Math.min(...Xe.map((Xe=>Xe.evaluate(u))))],max:[Po,Wr(Po),(u,Xe)=>Math.max(...Xe.map((Xe=>Xe.evaluate(u))))],abs:[Po,[Po],(u,[Xe])=>Math.abs(Xe.evaluate(u))],round:[Po,[Po],(u,[Xe])=>{const fr=Xe.evaluate(u);return fr<0?-Math.round(-fr):Math.round(fr)}],floor:[Po,[Po],(u,[Xe])=>Math.floor(Xe.evaluate(u))],ceil:[Po,[Po],(u,[Xe])=>Math.ceil(Xe.evaluate(u))],"filter-==":[sa,[ss,ya],(u,[Xe,fr])=>u.properties()[Xe.value]===fr.value],"filter-id-==":[sa,[ya],(u,[Xe])=>u.id()===Xe.value],"filter-type-==":[sa,[ss],(u,[Xe])=>u.geometryType()===Xe.value],"filter-<":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar<_r}],"filter-id-<":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr<Ar}],"filter->":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar>_r}],"filter-id->":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr>Ar}],"filter-<=":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar<=_r}],"filter-id-<=":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr<=Ar}],"filter->=":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar>=_r}],"filter-id->=":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr>=Ar}],"filter-has":[sa,[ya],(u,[Xe])=>Xe.value in u.properties()],"filter-has-id":[sa,[],u=>null!==u.id()&&void 0!==u.id()],"filter-type-in":[sa,[bt(ss)],(u,[Xe])=>Xe.value.indexOf(u.geometryType())>=0],"filter-id-in":[sa,[bt(ya)],(u,[Xe])=>Xe.value.indexOf(u.id())>=0],"filter-in-small":[sa,[ss,bt(ya)],(u,[Xe,fr])=>fr.value.indexOf(u.properties()[Xe.value])>=0],"filter-in-large":[sa,[ss,bt(ya)],(u,[Xe,fr])=>function(u,Xe,fr,Ar){for(;fr<=Ar;){const _r=fr+Ar>>1;if(Xe[_r]===u)return!0;Xe[_r]>u?Ar=_r-1:fr=_r+1}return!1}(u.properties()[Xe.value],fr.value,0,fr.value.length-1)],all:{type:sa,overloads:[[[sa,sa],(u,[Xe,fr])=>Xe.evaluate(u)&&fr.evaluate(u)],[Wr(sa),(u,Xe)=>{for(const fr of Xe)if(!fr.evaluate(u))return!1;return!0}]]},any:{type:sa,overloads:[[[sa,sa],(u,[Xe,fr])=>Xe.evaluate(u)||fr.evaluate(u)],[Wr(sa),(u,Xe)=>{for(const fr of Xe)if(fr.evaluate(u))return!0;return!1}]]},"!":[sa,[sa],(u,[Xe])=>!Xe.evaluate(u)],"is-supported-script":[sa,[ss],(u,[Xe])=>{const fr=u.globals&&u.globals.isSupportedScript;return!fr||fr(Xe.evaluate(u))}],upcase:[ss,[ss],(u,[Xe])=>Xe.evaluate(u).toUpperCase()],downcase:[ss,[ss],(u,[Xe])=>Xe.evaluate(u).toLowerCase()],concat:[ss,Wr(ya),(u,Xe)=>Xe.map((Xe=>ie(Xe.evaluate(u)))).join("")],"resolved-locale":[ss,[ol],(u,[Xe])=>Xe.evaluate(u).resolvedLocale()]});class xn{constructor(u,Xe){var fr;this.expression=u,this._warningHistory={},this._evaluator=new pe,this._defaultValue=Xe?"color"===(fr=Xe).type&&cn(fr.default)?new Kt(0,0,0,0):"color"===fr.type?Kt.parse(fr.default)||null:"padding"===fr.type?Jt.parse(fr.default)||null:"variableAnchorOffsetCollection"===fr.type?Qt.parse(fr.default)||null:void 0===fr.default?null:fr.default:null,this._enumValues=Xe&&"enum"===Xe.type?Xe.values:null}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._evaluator.globals=u,this._evaluator.feature=Xe,this._evaluator.featureState=fr,this._evaluator.canonical=Ar,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr,this.expression.evaluate(this._evaluator)}evaluate(u,Xe,fr,Ar,_r,wr){this._evaluator.globals=u,this._evaluator.feature=Xe||null,this._evaluator.featureState=fr||null,this._evaluator.canonical=Ar,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr||null;try{const u=this.expression.evaluate(this._evaluator);if(null==u||"number"==typeof u&&u!=u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new ae(`Expected value to be one of ${Object.keys(this._enumValues).map((u=>JSON.stringify(u))).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,"undefined"!=typeof console&&console.warn(u.message)),this._defaultValue}}}function vn(u){return Array.isArray(u)&&u.length>0&&"string"==typeof u[0]&&u[0]in nc}function bn(u,Xe){const fr=new fe(nc,Qr,[],Xe?function(u){const Xe={color:aa,string:ss,number:Po,enum:ss,boolean:sa,formatted:sl,padding:al,resolvedImage:cl,variableAnchorOffsetCollection:hl};return"array"===u.type?bt(Xe[u.value]||ya,u.length):Xe[u.type]}(Xe):void 0),Ar=fr.parse(u,void 0,void 0,void 0,Xe&&"string"===Xe.type?{typeAnnotation:"coerce"}:void 0);return Ar?nn(new xn(Ar,Xe)):sn(fr.errors)}class wn{constructor(u,Xe){this.kind=u,this._styleExpression=Xe,this.isStateDependent="constant"!==u&&!en(Xe.expression)}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr)}evaluate(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluate(u,Xe,fr,Ar,_r,wr)}}class _n{constructor(u,Xe,fr,Ar){this.kind=u,this.zoomStops=fr,this._styleExpression=Xe,this.isStateDependent="camera"!==u&&!en(Xe.expression),this.interpolationType=Ar}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr)}evaluate(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluate(u,Xe,fr,Ar,_r,wr)}interpolationFactor(u,Xe,fr){return this.interpolationType?Be.interpolationFactor(this.interpolationType,u,Xe,fr):0}}function An(u,Xe){const fr=bn(u,Xe);if("error"===fr.result)return fr;const Ar=fr.value.expression,_r=tn(Ar);if(!_r&&!an(Xe))return sn([new at("","data expressions not supported")]);const wr=rn(Ar,["zoom"]);if(!wr&&!on(Xe))return sn([new at("","zoom expressions not supported")]);const Kr=kn(Ar);return Kr||wr?Kr instanceof at?sn([Kr]):Kr instanceof Be&&!ln(Xe)?sn([new at("",'"interpolate" expressions cannot be used with this property')]):nn(Kr?new _n(_r?"camera":"composite",fr.value,Kr.labels,Kr instanceof Be?Kr.interpolation:void 0):new wn(_r?"constant":"source",fr.value)):sn([new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Sn{constructor(u,Xe){this._parameters=u,this._specification=Xe,st(this,pn(this._parameters,this._specification))}static deserialize(u){return new Sn(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function kn(u){let Xe=null;if(u instanceof de)Xe=kn(u.result);else if(u instanceof Ee){for(const fr of u.args)if(Xe=kn(fr),Xe)break}else(u instanceof Ae||u instanceof Be)&&u.input instanceof Xr&&"zoom"===u.input.name&&(Xe=u);return Xe instanceof at||u.eachChild((u=>{const fr=kn(u);fr instanceof at?Xe=fr:!Xe&&fr?Xe=new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Xe&&fr&&Xe!==fr&&(Xe=new at("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),Xe}function Mn(u){if(!0===u||!1===u)return!0;if(!Array.isArray(u)||0===u.length)return!1;switch(u[0]){case"has":return u.length>=2&&"$id"!==u[1]&&"$type"!==u[1];case"in":return u.length>=3&&("string"!=typeof u[1]||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==u.length||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const Xe of u.slice(1))if(!Mn(Xe)&&"boolean"!=typeof Xe)return!1;return!0;default:return!0}}const oc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zn(u){if(null==u)return{filter:()=>!0,needGeometry:!1};Mn(u)||(u=Bn(u));const Xe=bn(u,oc);if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return{filter:(u,fr,Ar)=>Xe.value.evaluate(u,fr,{},Ar),needGeometry:Cn(u)}}function Pn(u,Xe){return u<Xe?-1:u>Xe?1:0}function Cn(u){if(!Array.isArray(u))return!1;if("within"===u[0]||"distance"===u[0])return!0;for(let Xe=1;Xe<u.length;Xe++)if(Cn(u[Xe]))return!0;return!1}function Bn(u){if(!u)return!0;const Xe=u[0];return u.length<=1?"any"!==Xe:"=="===Xe?Vn(u[1],u[2],"=="):"!="===Xe?Tn(Vn(u[1],u[2],"==")):"<"===Xe||">"===Xe||"<="===Xe||">="===Xe?Vn(u[1],u[2],Xe):"any"===Xe?(fr=u.slice(1),["any"].concat(fr.map(Bn))):"all"===Xe?["all"].concat(u.slice(1).map(Bn)):"none"===Xe?["all"].concat(u.slice(1).map(Bn).map(Tn)):"in"===Xe?En(u[1],u.slice(2)):"!in"===Xe?Tn(En(u[1],u.slice(2))):"has"===Xe?Fn(u[1]):"!has"!==Xe||Tn(Fn(u[1]));var fr}function Vn(u,Xe,fr){switch(u){case"$type":return[`filter-type-${fr}`,Xe];case"$id":return[`filter-id-${fr}`,Xe];default:return[`filter-${fr}`,u,Xe]}}function En(u,Xe){if(0===Xe.length)return!1;switch(u){case"$type":return["filter-type-in",["literal",Xe]];case"$id":return["filter-id-in",["literal",Xe]];default:return Xe.length>200&&!Xe.some((u=>typeof u!=typeof Xe[0]))?["filter-in-large",u,["literal",Xe.sort(Pn)]]:["filter-in-small",u,["literal",Xe]]}}function Fn(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Tn(u){return["!",u]}function $n(u){const Xe=typeof u;if("number"===Xe||"boolean"===Xe||"string"===Xe||null==u)return JSON.stringify(u);if(Array.isArray(u)){let Xe="[";for(const fr of u)Xe+=`${$n(fr)},`;return`${Xe}]`}const fr=Object.keys(u).sort();let Ar="{";for(let Xe=0;Xe<fr.length;Xe++)Ar+=`${JSON.stringify(fr[Xe])}:${$n(u[fr[Xe]])},`;return`${Ar}}`}function Ln(u){let Xe="";for(const fr of xo)Xe+=`/${$n(u[fr])}`;return Xe}function Dn(u){const Xe=u.value;return Xe?[new it(u.key,Xe,"constants have been deprecated as of v8")]:[]}function On(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function jn(u){if(Array.isArray(u))return u.map(jn);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const Xe={};for(const fr in u)Xe[fr]=jn(u[fr]);return Xe}return On(u)}function Rn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec||{},_r=u.objectElementValidators||{},wr=u.style,Kr=u.styleSpec,In=u.validateSpec;let io=[];const no=un(fr);if("object"!==no)return[new it(Xe,fr,`object expected, ${no} found`)];for(const u in fr){const no=u.split(".")[0],oo=Ar[no]||Ar["*"];let so;if(_r[no])so=_r[no];else if(Ar[no])so=In;else if(_r["*"])so=_r["*"];else{if(!Ar["*"]){io.push(new it(Xe,fr[u],`unknown property "${u}"`));continue}so=In}io=io.concat(so({key:(Xe?`${Xe}.`:Xe)+u,value:fr[u],valueSpec:oo,style:wr,styleSpec:Kr,object:fr,objectKey:u,validateSpec:In},fr))}for(const u in Ar)_r[u]||Ar[u].required&&void 0===Ar[u].default&&void 0===fr[u]&&io.push(new it(Xe,fr,`missing required property "${u}"`));return io}function Un(u){const Xe=u.value,fr=u.valueSpec,Ar=u.style,_r=u.styleSpec,wr=u.key,Kr=u.arrayElementValidator||u.validateSpec;if("array"!==un(Xe))return[new it(wr,Xe,`array expected, ${un(Xe)} found`)];if(fr.length&&Xe.length!==fr.length)return[new it(wr,Xe,`array length ${fr.length} expected, length ${Xe.length} found`)];if(fr["min-length"]&&Xe.length<fr["min-length"])return[new it(wr,Xe,`array length at least ${fr["min-length"]} expected, length ${Xe.length} found`)];let In={type:fr.value,values:fr.values};_r.$version<7&&(In.function=fr.function),"object"===un(fr.value)&&(In=fr.value);let io=[];for(let fr=0;fr<Xe.length;fr++)io=io.concat(Kr({array:Xe,arrayIndex:fr,value:Xe[fr],valueSpec:In,validateSpec:u.validateSpec,style:Ar,styleSpec:_r,key:`${wr}[${fr}]`}));return io}function qn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec;let _r=un(fr);return"number"===_r&&fr!=fr&&(_r="NaN"),"number"!==_r?[new it(Xe,fr,`number expected, ${_r} found`)]:"minimum"in Ar&&fr<Ar.minimum?[new it(Xe,fr,`${fr} is less than the minimum value ${Ar.minimum}`)]:"maximum"in Ar&&fr>Ar.maximum?[new it(Xe,fr,`${fr} is greater than the maximum value ${Ar.maximum}`)]:[]}function Nn(u){const Xe=u.valueSpec,fr=On(u.value.type);let Ar,_r,wr,Kr={};const In="categorical"!==fr&&void 0===u.value.property,io=!In,no="array"===un(u.value.stops)&&"array"===un(u.value.stops[0])&&"object"===un(u.value.stops[0][0]),oo=Rn({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(u){if("identity"===fr)return[new it(u.key,u.value,'identity function may not have a "stops" property')];let Xe=[];const Ar=u.value;return Xe=Xe.concat(Un({key:u.key,value:Ar,valueSpec:u.valueSpec,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,arrayElementValidator:h})),"array"===un(Ar)&&0===Ar.length&&Xe.push(new it(u.key,Ar,"array must have at least one stop")),Xe},default:function(u){return u.validateSpec({key:u.key,value:u.value,valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec})}}});return"identity"===fr&&In&&oo.push(new it(u.key,u.value,'missing required property "property"')),"identity"===fr||u.value.stops||oo.push(new it(u.key,u.value,'missing required property "stops"')),"exponential"===fr&&u.valueSpec.expression&&!ln(u.valueSpec)&&oo.push(new it(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(io&&!an(u.valueSpec)?oo.push(new it(u.key,u.value,"property functions not supported")):In&&!on(u.valueSpec)&&oo.push(new it(u.key,u.value,"zoom functions not supported"))),"categorical"!==fr&&!no||void 0!==u.value.property||oo.push(new it(u.key,u.value,'"property" property is required')),oo;function h(u){let fr=[];const Ar=u.value,In=u.key;if("array"!==un(Ar))return[new it(In,Ar,`array expected, ${un(Ar)} found`)];if(2!==Ar.length)return[new it(In,Ar,`array length 2 expected, length ${Ar.length} found`)];if(no){if("object"!==un(Ar[0]))return[new it(In,Ar,`object expected, ${un(Ar[0])} found`)];if(void 0===Ar[0].zoom)return[new it(In,Ar,"object stop key must have zoom")];if(void 0===Ar[0].value)return[new it(In,Ar,"object stop key must have value")];if(wr&&wr>On(Ar[0].zoom))return[new it(In,Ar[0].zoom,"stop zoom values must appear in ascending order")];On(Ar[0].zoom)!==wr&&(wr=On(Ar[0].zoom),_r=void 0,Kr={}),fr=fr.concat(Rn({key:`${In}[0]`,value:Ar[0],valueSpec:{zoom:{}},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{zoom:qn,value:p}}))}else fr=fr.concat(p({key:`${In}[0]`,value:Ar[0],valueSpec:{},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec},Ar));return vn(jn(Ar[1]))?fr.concat([new it(`${In}[1]`,Ar[1],"expressions are not allowed in function stops.")]):fr.concat(u.validateSpec({key:`${In}[1]`,value:Ar[1],valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec}))}function p(u,wr){const In=un(u.value),io=On(u.value),no=null!==u.value?u.value:wr;if(Ar){if(In!==Ar)return[new it(u.key,no,`${In} stop domain type must match previous stop domain type ${Ar}`)]}else Ar=In;if("number"!==In&&"string"!==In&&"boolean"!==In)return[new it(u.key,no,"stop domain value must be a number, string, or boolean")];if("number"!==In&&"categorical"!==fr){let Ar=`number expected, ${In} found`;return an(Xe)&&void 0===fr&&(Ar+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new it(u.key,no,Ar)]}return"categorical"!==fr||"number"!==In||isFinite(io)&&Math.floor(io)===io?"categorical"!==fr&&"number"===In&&void 0!==_r&&io<_r?[new it(u.key,no,"stop domain values must appear in ascending order")]:(_r=io,"categorical"===fr&&io in Kr?[new it(u.key,no,"stop domain values must be unique")]:(Kr[io]=!0,[])):[new it(u.key,no,`integer expected, found ${io}`)]}}function Zn(u){const Xe=("property"===u.expressionContext?An:bn)(jn(u.value),u.valueSpec);if("error"===Xe.result)return Xe.value.map((Xe=>new it(`${u.key}${Xe.key}`,u.value,Xe.message)));const fr=Xe.value.expression||Xe.value._styleExpression.expression;if("property"===u.expressionContext&&"text-font"===u.propertyKey&&!fr.outputDefined())return[new it(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===u.expressionContext&&"layout"===u.propertyType&&!en(fr))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===u.expressionContext&&!en(fr))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&0===u.expressionContext.indexOf("cluster")){if(!rn(fr,["zoom","feature-state"]))return[new it(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===u.expressionContext&&!tn(fr))return[new it(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec,_r=[];return Array.isArray(Ar.values)?-1===Ar.values.indexOf(On(fr))&&_r.push(new it(Xe,fr,`expected one of [${Ar.values.join(", ")}], ${JSON.stringify(fr)} found`)):-1===Object.keys(Ar.values).indexOf(On(fr))&&_r.push(new it(Xe,fr,`expected one of [${Object.keys(Ar.values).join(", ")}], ${JSON.stringify(fr)} found`)),_r}function Kn(u){return Mn(jn(u.value))?Zn(st({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xn(u)}function Xn(u){const Xe=u.value,fr=u.key;if("array"!==un(Xe))return[new it(fr,Xe,`array expected, ${un(Xe)} found`)];const Ar=u.styleSpec;let _r,wr=[];if(Xe.length<1)return[new it(fr,Xe,"filter array must have at least 1 element")];switch(wr=wr.concat(Gn({key:`${fr}[0]`,value:Xe[0],valueSpec:Ar.filter_operator,style:u.style,styleSpec:u.styleSpec})),On(Xe[0])){case"<":case"<=":case">":case">=":Xe.length>=2&&"$type"===On(Xe[1])&&wr.push(new it(fr,Xe,`"$type" cannot be use with operator "${Xe[0]}"`));case"==":case"!=":3!==Xe.length&&wr.push(new it(fr,Xe,`filter array for operator "${Xe[0]}" must have 3 elements`));case"in":case"!in":Xe.length>=2&&(_r=un(Xe[1]),"string"!==_r&&wr.push(new it(`${fr}[1]`,Xe[1],`string expected, ${_r} found`)));for(let Kr=2;Kr<Xe.length;Kr++)_r=un(Xe[Kr]),"$type"===On(Xe[1])?wr=wr.concat(Gn({key:`${fr}[${Kr}]`,value:Xe[Kr],valueSpec:Ar.geometry_type,style:u.style,styleSpec:u.styleSpec})):"string"!==_r&&"number"!==_r&&"boolean"!==_r&&wr.push(new it(`${fr}[${Kr}]`,Xe[Kr],`string, number, or boolean expected, ${_r} found`));break;case"any":case"all":case"none":for(let Ar=1;Ar<Xe.length;Ar++)wr=wr.concat(Xn({key:`${fr}[${Ar}]`,value:Xe[Ar],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":_r=un(Xe[1]),2!==Xe.length?wr.push(new it(fr,Xe,`filter array for "${Xe[0]}" operator must have 2 elements`)):"string"!==_r&&wr.push(new it(`${fr}[1]`,Xe[1],`string expected, ${_r} found`))}return wr}function Hn(u,Xe){const fr=u.key,Ar=u.validateSpec,_r=u.style,wr=u.styleSpec,Kr=u.value,In=u.objectKey,io=wr[`${Xe}_${u.layerType}`];if(!io)return[];const no=In.match(/^(.*)-transition$/);if("paint"===Xe&&no&&io[no[1]]&&io[no[1]].transition)return Ar({key:fr,value:Kr,valueSpec:wr.transition,style:_r,styleSpec:wr});const oo=u.valueSpec||io[In];if(!oo)return[new it(fr,Kr,`unknown property "${In}"`)];let so;if("string"===un(Kr)&&an(oo)&&!oo.tokens&&(so=/^{([^}]+)}$/.exec(Kr)))return[new it(fr,Kr,`"${In}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(so[1])} }\`.`)];const ao=[];return"symbol"===u.layerType&&("text-field"===In&&_r&&!_r.glyphs&&ao.push(new it(fr,Kr,'use of "text-field" requires a style "glyphs" property')),"text-font"===In&&cn(jn(Kr))&&"identity"===On(Kr.type)&&ao.push(new it(fr,Kr,'"text-font" does not support identity functions'))),ao.concat(Ar({key:u.key,value:Kr,valueSpec:oo,style:_r,styleSpec:wr,expressionContext:"property",propertyType:Xe,propertyKey:In}))}function Yn(u){return Hn(u,"paint")}function Jn(u){return Hn(u,"layout")}function Wn(u){let Xe=[];const fr=u.value,Ar=u.key,_r=u.style,wr=u.styleSpec;fr.type||fr.ref||Xe.push(new it(Ar,fr,'either "type" or "ref" is required'));let Kr=On(fr.type);const In=On(fr.ref);if(fr.id){const wr=On(fr.id);for(let Kr=0;Kr<u.arrayIndex;Kr++){const u=_r.layers[Kr];On(u.id)===wr&&Xe.push(new it(Ar,fr.id,`duplicate layer id "${fr.id}", previously used at line ${u.id.__line__}`))}}if("ref"in fr){let u;["type","source","source-layer","filter","layout"].forEach((u=>{u in fr&&Xe.push(new it(Ar,fr[u],`"${u}" is prohibited for ref layers`))})),_r.layers.forEach((Xe=>{On(Xe.id)===In&&(u=Xe)})),u?u.ref?Xe.push(new it(Ar,fr.ref,"ref cannot reference another ref layer")):Kr=On(u.type):Xe.push(new it(Ar,fr.ref,`ref layer "${In}" not found`))}else if("background"!==Kr)if(fr.source){const u=_r.sources&&_r.sources[fr.source],wr=u&&On(u.type);u?"vector"===wr&&"raster"===Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a raster source`)):"raster-dem"!==wr&&"hillshade"===Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a raster-dem source`)):"raster"===wr&&"raster"!==Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a vector source`)):"vector"!==wr||fr["source-layer"]?"raster-dem"===wr&&"hillshade"!==Kr?Xe.push(new it(Ar,fr.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==Kr||!fr.paint||!fr.paint["line-gradient"]||"geojson"===wr&&u.lineMetrics||Xe.push(new it(Ar,fr,`layer "${fr.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Xe.push(new it(Ar,fr,`layer "${fr.id}" must specify a "source-layer"`)):Xe.push(new it(Ar,fr.source,`source "${fr.source}" not found`))}else Xe.push(new it(Ar,fr,'missing required property "source"'));return Xe=Xe.concat(Rn({key:Ar,value:fr,valueSpec:wr.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${Ar}.type`,value:fr.type,valueSpec:wr.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:fr,objectKey:"type"}),filter:Kn,layout:u=>Rn({layer:fr,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Jn(st({layerType:Kr},u))}}),paint:u=>Rn({layer:fr,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Yn(st({layerType:Kr},u))}})}})),Xe}function Qn(u){const Xe=u.value,fr=u.key,Ar=un(Xe);return"string"!==Ar?[new it(fr,Xe,`string expected, ${Ar} found`)]:[]}const ac={promoteId:function({key:u,value:Xe}){if("string"===un(Xe))return Qn({key:u,value:Xe});{const fr=[];for(const Ar in Xe)fr.push(...Qn({key:`${u}.${Ar}`,value:Xe[Ar]}));return fr}}};function ei(u){const Xe=u.value,fr=u.key,Ar=u.styleSpec,_r=u.style,wr=u.validateSpec;if(!Xe.type)return[new it(fr,Xe,'"type" is required')];const Kr=On(Xe.type);let In;switch(Kr){case"vector":case"raster":return In=Rn({key:fr,value:Xe,valueSpec:Ar[`source_${Kr.replace("-","_")}`],style:u.style,styleSpec:Ar,objectElementValidators:ac,validateSpec:wr}),In;case"raster-dem":return In=function(u){var Xe;const fr=null!==(Xe=u.sourceName)&&void 0!==Xe?Xe:"",Ar=u.value,_r=u.styleSpec,wr=_r.source_raster_dem,Kr=u.style;let In=[];const io=un(Ar);if(void 0===Ar)return In;if("object"!==io)return In.push(new it("source_raster_dem",Ar,`object expected, ${io} found`)),In;const no="custom"===On(Ar.encoding),oo=["redFactor","greenFactor","blueFactor","baseShift"],so=u.value.encoding?`"${u.value.encoding}"`:"Default";for(const Xe in Ar)!no&&oo.includes(Xe)?In.push(new it(Xe,Ar[Xe],`In "${fr}": "${Xe}" is only valid when "encoding" is set to "custom". ${so} encoding found`)):wr[Xe]?In=In.concat(u.validateSpec({key:Xe,value:Ar[Xe],valueSpec:wr[Xe],validateSpec:u.validateSpec,style:Kr,styleSpec:_r})):In.push(new it(Xe,Ar[Xe],`unknown property "${Xe}"`));return In}({sourceName:fr,value:Xe,style:u.style,styleSpec:Ar,validateSpec:wr}),In;case"geojson":if(In=Rn({key:fr,value:Xe,valueSpec:Ar.source_geojson,style:_r,styleSpec:Ar,validateSpec:wr,objectElementValidators:ac}),Xe.cluster)for(const u in Xe.clusterProperties){const[Ar,_r]=Xe.clusterProperties[u],Kr="string"==typeof Ar?[Ar,["accumulated"],["get",u]]:Ar;In.push(...Zn({key:`${fr}.${u}.map`,value:_r,validateSpec:wr,expressionContext:"cluster-map"})),In.push(...Zn({key:`${fr}.${u}.reduce`,value:Kr,validateSpec:wr,expressionContext:"cluster-reduce"}))}return In;case"video":return Rn({key:fr,value:Xe,valueSpec:Ar.source_video,style:_r,validateSpec:wr,styleSpec:Ar});case"image":return Rn({key:fr,value:Xe,valueSpec:Ar.source_image,style:_r,validateSpec:wr,styleSpec:Ar});case"canvas":return[new it(fr,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Gn({key:`${fr}.type`,value:Xe.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_r,validateSpec:wr,styleSpec:Ar})}}function ri(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.light,_r=u.style;let wr=[];const Kr=un(Xe);if(void 0===Xe)return wr;if("object"!==Kr)return wr=wr.concat([new it("light",Xe,`object expected, ${Kr} found`)]),wr;for(const Kr in Xe){const In=Kr.match(/^(.*)-transition$/);wr=wr.concat(In&&Ar[In[1]]&&Ar[In[1]].transition?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:fr.transition,validateSpec:u.validateSpec,style:_r,styleSpec:fr}):Ar[Kr]?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:Ar[Kr],validateSpec:u.validateSpec,style:_r,styleSpec:fr}):[new it(Kr,Xe[Kr],`unknown property "${Kr}"`)])}return wr}function ni(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.sky,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("sky",Xe,`object expected, ${wr} found`)];let Kr=[];for(const wr in Xe)Kr=Kr.concat(Ar[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:Ar[wr],style:_r,styleSpec:fr}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Kr}function ii(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.terrain,_r=u.style;let wr=[];const Kr=un(Xe);if(void 0===Xe)return wr;if("object"!==Kr)return wr=wr.concat([new it("terrain",Xe,`object expected, ${Kr} found`)]),wr;for(const Kr in Xe)wr=wr.concat(Ar[Kr]?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:Ar[Kr],validateSpec:u.validateSpec,style:_r,styleSpec:fr}):[new it(Kr,Xe[Kr],`unknown property "${Kr}"`)]);return wr}function si(u){let Xe=[];const fr=u.value,Ar=u.key;if(Array.isArray(fr)){const _r=[],wr=[];for(const Kr in fr)fr[Kr].id&&_r.includes(fr[Kr].id)&&Xe.push(new it(Ar,fr,`all the sprites' ids must be unique, but ${fr[Kr].id} is duplicated`)),_r.push(fr[Kr].id),fr[Kr].url&&wr.includes(fr[Kr].url)&&Xe.push(new it(Ar,fr,`all the sprites' URLs must be unique, but ${fr[Kr].url} is duplicated`)),wr.push(fr[Kr].url),Xe=Xe.concat(Rn({key:`${Ar}[${Kr}]`,value:fr[Kr],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return Xe}return Qn({key:Ar,value:fr})}const dc={"*":()=>[],array:Un,boolean:function(u){const Xe=u.value,fr=u.key,Ar=un(Xe);return"boolean"!==Ar?[new it(fr,Xe,`boolean expected, ${Ar} found`)]:[]},number:qn,color:function(u){const Xe=u.key,fr=u.value,Ar=un(fr);return"string"!==Ar?[new it(Xe,fr,`color expected, ${Ar} found`)]:Kt.parse(String(fr))?[]:[new it(Xe,fr,`color expected, "${fr}" found`)]},constants:Dn,enum:Gn,filter:Kn,function:Nn,layer:Wn,object:Rn,source:ei,light:ri,sky:ni,terrain:ii,projection:function(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.projection,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("projection",Xe,`object expected, ${wr} found`)];let Kr=[];for(const wr in Xe)Kr=Kr.concat(Ar[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:Ar[wr],style:_r,styleSpec:fr}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Kr},string:Qn,formatted:function(u){return 0===Qn(u).length?[]:Zn(u)},resolvedImage:function(u){return 0===Qn(u).length?[]:Zn(u)},padding:function(u){const Xe=u.key,fr=u.value;if("array"===un(fr)){if(fr.length<1||fr.length>4)return[new it(Xe,fr,`padding requires 1 to 4 values; ${fr.length} values found`)];const Ar={type:"number"};let _r=[];for(let wr=0;wr<fr.length;wr++)_r=_r.concat(u.validateSpec({key:`${Xe}[${wr}]`,value:fr[wr],validateSpec:u.validateSpec,valueSpec:Ar}));return _r}return qn({key:Xe,value:fr,valueSpec:{}})},variableAnchorOffsetCollection:function(u){const Xe=u.key,fr=u.value,Ar=un(fr),_r=u.styleSpec;if("array"!==Ar||fr.length<1||fr.length%2!=0)return[new it(Xe,fr,"variableAnchorOffsetCollection requires a non-empty array of even length")];let wr=[];for(let Ar=0;Ar<fr.length;Ar+=2)wr=wr.concat(Gn({key:`${Xe}[${Ar}]`,value:fr[Ar],valueSpec:_r.layout_symbol["text-anchor"]})),wr=wr.concat(Un({key:`${Xe}[${Ar+1}]`,value:fr[Ar+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:_r}));return wr},sprite:si};function oi(u){const Xe=u.value,fr=u.valueSpec,Ar=u.styleSpec;return u.validateSpec=oi,fr.expression&&cn(On(Xe))?Nn(u):fr.expression&&vn(jn(Xe))?Zn(u):fr.type&&dc[fr.type]?dc[fr.type](u):Rn(st({},u,{valueSpec:fr.type?Ar[fr.type]:fr}))}function li(u){const Xe=u.value,fr=u.key,Ar=Qn(u);return Ar.length||(-1===Xe.indexOf("{fontstack}")&&Ar.push(new it(fr,Xe,'"glyphs" url must include a "{fontstack}" token')),-1===Xe.indexOf("{range}")&&Ar.push(new it(fr,Xe,'"glyphs" url must include a "{range}" token'))),Ar}function ui(u,Xe=Io){let fr=[];return fr=fr.concat(oi({key:"",value:u,valueSpec:Xe.$root,styleSpec:Xe,style:u,validateSpec:oi,objectElementValidators:{glyphs:li,"*":()=>[]}})),u.constants&&(fr=fr.concat(Dn({key:"constants",value:u.constants,style:u,styleSpec:Xe,validateSpec:oi}))),hi(fr)}function ci(u){return function(Xe){return u({...Xe,validateSpec:oi})}}function hi(u){return[].concat(u).sort(((u,Xe)=>u.line-Xe.line))}function pi(u){return function(...Xe){return hi(u.apply(this,Xe))}}ui.source=pi(ci(ei)),ui.sprite=pi(ci(si)),ui.glyphs=pi(ci(li)),ui.light=pi(ci(ri)),ui.sky=pi(ci(ni)),ui.terrain=pi(ci(ii)),ui.layer=pi(ci(Wn)),ui.filter=pi(ci(Kn)),ui.paintProperty=pi(ci(Yn)),ui.layoutProperty=pi(ci(Jn));const mc=ui,Ic=mc.light,yc=mc.sky,Ac=mc.paintProperty,bc=mc.layoutProperty;function xi(u,Xe){let fr=!1;if(Xe&&Xe.length)for(const Ar of Xe)u.fire(new N(new Error(Ar.message))),fr=!0;return fr}class vi{constructor(u,Xe,fr){const Ar=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const _r=new Int32Array(this.arrayBuffer);u=_r[0],this.d=(Xe=_r[1])+2*(fr=_r[2]);for(let u=0;u<this.d*this.d;u++){const Xe=_r[3+u],fr=_r[3+u+1];Ar.push(Xe===fr?null:_r.subarray(Xe,fr))}const wr=_r[3+Ar.length+1];this.keys=_r.subarray(_r[3+Ar.length],wr),this.bboxes=_r.subarray(wr),this.insert=this._insertReadonly}else{this.d=Xe+2*fr;for(let u=0;u<this.d*this.d;u++)Ar.push([]);this.keys=[],this.bboxes=[]}this.n=Xe,this.extent=u,this.padding=fr,this.scale=Xe/u,this.uid=0;const _r=fr/Xe*u;this.min=-_r,this.max=u+_r}insert(u,Xe,fr,Ar,_r){this._forEachCell(Xe,fr,Ar,_r,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(Xe),this.bboxes.push(fr),this.bboxes.push(Ar),this.bboxes.push(_r)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,Xe,fr,Ar,_r,wr){this.cells[_r].push(wr)}query(u,Xe,fr,Ar,_r){const wr=this.min,Kr=this.max;if(u<=wr&&Xe<=wr&&Kr<=fr&&Kr<=Ar&&!_r)return Array.prototype.slice.call(this.keys);{const wr=[];return this._forEachCell(u,Xe,fr,Ar,this._queryCell,wr,{},_r),wr}}_queryCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this.cells[_r];if(null!==io){const _r=this.keys,no=this.bboxes;for(let oo=0;oo<io.length;oo++){const so=io[oo];if(void 0===Kr[so]){const io=4*so;(In?In(no[io+0],no[io+1],no[io+2],no[io+3]):u<=no[io+2]&&Xe<=no[io+3]&&fr>=no[io+0]&&Ar>=no[io+1])?(Kr[so]=!0,wr.push(_r[so])):Kr[so]=!1}}}}_forEachCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this._convertToCellCoord(u),no=this._convertToCellCoord(Xe),oo=this._convertToCellCoord(fr),so=this._convertToCellCoord(Ar);for(let ao=io;ao<=oo;ao++)for(let io=no;io<=so;io++){const no=this.d*io+ao;if((!In||In(this._convertFromCellCoord(ao),this._convertFromCellCoord(io),this._convertFromCellCoord(ao+1),this._convertFromCellCoord(io+1)))&&_r.call(this,u,Xe,fr,Ar,no,wr,Kr,In))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,Xe=3+this.cells.length+1+1;let fr=0;for(let u=0;u<this.cells.length;u++)fr+=this.cells[u].length;const Ar=new Int32Array(Xe+fr+this.keys.length+this.bboxes.length);Ar[0]=this.extent,Ar[1]=this.n,Ar[2]=this.padding;let _r=Xe;for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];Ar[3+Xe]=_r,Ar.set(fr,_r),_r+=fr.length}return Ar[3+u.length]=_r,Ar.set(this.keys,_r),_r+=this.keys.length,Ar[3+u.length+1]=_r,Ar.set(this.bboxes,_r),_r+=this.bboxes.length,Ar.buffer}static serialize(u,Xe){const fr=u.toArrayBuffer();return Xe&&Xe.push(fr),{buffer:fr}}static deserialize(u){return new vi(u.buffer)}}const _c={};function wi(u,Xe,fr={}){if(_c[u])throw new Error(`${u} is already registered.`);Object.defineProperty(Xe,"_classRegistryKey",{value:u,writeable:!1}),_c[u]={klass:Xe,omit:fr.omit||[],shallow:fr.shallow||[]}}wi("Object",Object),wi("TransferableGridIndex",vi),wi("Color",Kt),wi("Error",Error),wi("AJAXError",L),wi("ResolvedImage",te),wi("StylePropertyFunction",Sn),wi("StyleExpression",xn,{omit:["_evaluator"]}),wi("ZoomDependentExpression",_n),wi("ZoomConstantExpression",wn),wi("CompoundExpression",Xr,{omit:["_evaluate"]});for(const u in nc)nc[u]._classRegistryKey||wi(`Expression_${u}`,nc[u]);function _i(u){return u&&"undefined"!=typeof ArrayBuffer&&(u instanceof ArrayBuffer||u.constructor&&"ArrayBuffer"===u.constructor.name)}function Ai(u){return u.$name||u.constructor._classRegistryKey}function Si(u){return!function(u){if(null===u||"object"!=typeof u)return!1;const Xe=Ai(u);return!(!Xe||"Object"===Xe)}(u)&&(null==u||"boolean"==typeof u||"number"==typeof u||"string"==typeof u||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||_i(u)||I(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function ki(u,Xe){if(Si(u))return(_i(u)||I(u))&&Xe&&Xe.push(u),ArrayBuffer.isView(u)&&Xe&&Xe.push(u.buffer),u instanceof ImageData&&Xe&&Xe.push(u.data.buffer),u;if(Array.isArray(u)){const fr=[];for(const Ar of u)fr.push(ki(Ar,Xe));return fr}if("object"!=typeof u)throw new Error("can't serialize object of type "+typeof u);const fr=Ai(u);if(!fr)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!_c[fr])throw new Error(`${fr} is not registered.`);const{klass:Ar}=_c[fr],_r=Ar.serialize?Ar.serialize(u,Xe):{};if(Ar.serialize){if(Xe&&_r===Xe[Xe.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const Ar in u){if(!u.hasOwnProperty(Ar))continue;if(_c[fr].omit.indexOf(Ar)>=0)continue;const wr=u[Ar];_r[Ar]=_c[fr].shallow.indexOf(Ar)>=0?wr:ki(wr,Xe)}u instanceof Error&&(_r.message=u.message)}if(_r.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==fr&&(_r.$name=fr),_r}function Mi(u){if(Si(u))return u;if(Array.isArray(u))return u.map(Mi);if("object"!=typeof u)throw new Error("can't deserialize object of type "+typeof u);const Xe=Ai(u)||"Object";if(!_c[Xe])throw new Error(`can't deserialize unregistered class ${Xe}`);const{klass:fr}=_c[Xe];if(!fr)throw new Error(`can't deserialize unregistered class ${Xe}`);if(fr.deserialize)return fr.deserialize(u);const Ar=Object.create(fr.prototype);for(const fr of Object.keys(u)){if("$name"===fr)continue;const _r=u[fr];Ar[fr]=_c[Xe].shallow.indexOf(fr)>=0?_r:Mi(_r)}return Ar}class Ii{constructor(){this.first=!0}update(u,Xe){const fr=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=fr,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=fr,!0):(this.lastFloorZoom>fr?(this.lastIntegerZoom=fr+1,this.lastIntegerZoomTime=Xe):this.lastFloorZoom<fr&&(this.lastIntegerZoom=fr,this.lastIntegerZoomTime=Xe),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=fr,!0))}}const vc={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Pi(u){for(const Xe of u)if(Ti(Xe.charCodeAt(0)))return!0;return!1}function Ci(u){for(const Xe of u)if(!Ei(Xe.charCodeAt(0)))return!1;return!0}function Bi(u){const Xe=u.map((u=>{try{return new RegExp(`\\p{sc=${u}}`,"u").source}catch(u){return null}})).filter((u=>u));return new RegExp(Xe.join("|"),"u")}const Pc=Bi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ei(u){return!Pc.test(String.fromCodePoint(u))}const tg=Bi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ti(u){return!(746!==u&&747!==u&&(u<4352||!(vc["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||vc["CJK Compatibility"](u)||vc["CJK Strokes"](u)||!(!vc["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||12336===u)||vc["Enclosed CJK Letters and Months"](u)||vc["Ideographic Description Characters"](u)||vc.Kanbun(u)||vc.Katakana(u)&&12540!==u||!(!vc["Halfwidth and Fullwidth Forms"](u)||65288===u||65289===u||65293===u||u>=65306&&u<=65310||65339===u||65341===u||65343===u||u>=65371&&u<=65503||65507===u||u>=65512&&u<=65519)||!(!vc["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||vc["Vertical Forms"](u)||vc["Yijing Hexagram Symbols"](u)||/\p{sc=Cans}/u.test(String.fromCodePoint(u))||/\p{sc=Hang}/u.test(String.fromCodePoint(u))||tg.test(String.fromCodePoint(u)))))}function $i(u){return!(Ti(u)||function(u){return!!(vc["Latin-1 Supplement"](u)&&(167===u||169===u||174===u||177===u||188===u||189===u||190===u||215===u||247===u)||vc["General Punctuation"](u)&&(8214===u||8224===u||8225===u||8240===u||8241===u||8251===u||8252===u||8258===u||8263===u||8264===u||8265===u||8273===u)||vc["Letterlike Symbols"](u)||vc["Number Forms"](u)||vc["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||9003===u||u>=9085&&u<=9114||u>=9150&&u<=9165||9167===u||u>=9169&&u<=9179||u>=9186&&u<=9215)||vc["Control Pictures"](u)&&9251!==u||vc["Optical Character Recognition"](u)||vc["Enclosed Alphanumerics"](u)||vc["Geometric Shapes"](u)||vc["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||vc["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||vc["CJK Symbols and Punctuation"](u)||vc.Katakana(u)||vc["Private Use Area"](u)||vc["CJK Compatibility Forms"](u)||vc["Small Form Variants"](u)||vc["Halfwidth and Fullwidth Forms"](u)||8734===u||8756===u||8757===u||u>=9984&&u<=10087||u>=10102&&u<=10131||65532===u||65533===u)}(u))}const eg=Bi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Di(u){return eg.test(String.fromCodePoint(u))}function Oi(u,Xe){return!(!Xe&&Di(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||vc.Khmer(u))}function ji(u){for(const Xe of u)if(Di(Xe.charCodeAt(0)))return!0;return!1}const ig=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ui{constructor(u,Xe){this.zoom=u,Xe?(this.now=Xe.now,this.fadeDuration=Xe.fadeDuration,this.zoomHistory=Xe.zoomHistory,this.transition=Xe.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ii,this.transition={})}isSupportedScript(u){return function(u,Xe){for(const fr of u)if(!Oi(fr.charCodeAt(0),Xe))return!1;return!0}(u,"loaded"===ig.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,Xe=u-Math.floor(u),fr=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:Xe+(1-Xe)*fr}:{fromScale:.5,toScale:1,t:1-(1-fr)*Xe}}}class qi{constructor(u,Xe){this.property=u,this.value=Xe,this.expression=function(u,Xe){if(cn(u))return new Sn(u,Xe);if(vn(u)){const fr=An(u,Xe);if("error"===fr.result)throw new Error(fr.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return fr.value}{let fr=u;return"color"===Xe.type&&"string"==typeof u?fr=Kt.parse(u):"padding"!==Xe.type||"number"!=typeof u&&!Array.isArray(u)?"variableAnchorOffsetCollection"===Xe.type&&Array.isArray(u)&&(fr=Qt.parse(u)):fr=Jt.parse(u),{kind:"constant",evaluate:()=>fr}}}(void 0===Xe?u.specification.default:Xe,u.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(u,Xe,fr){return this.property.possiblyEvaluate(this,u,Xe,fr)}}class Ni{constructor(u){this.property=u,this.value=new qi(u,void 0)}transitioned(u,Xe){return new Gi(this.property,this.value,Xe,g({},u.transition,this.transition),u.now)}untransitioned(){return new Gi(this.property,this.value,null,{},0)}}class Zi{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return w(this._values[u].value.value)}setValue(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].value=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}getTransition(u){return w(this._values[u].transition)}setTransition(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].transition=w(Xe)||void 0}serialize(){const u={};for(const Xe of Object.keys(this._values)){const fr=this.getValue(Xe);void 0!==fr&&(u[Xe]=fr);const Ar=this.getTransition(Xe);void 0!==Ar&&(u[`${Xe}-transition`]=Ar)}return u}transitioned(u,Xe){const fr=new Ki(this._properties);for(const Ar of Object.keys(this._values))fr._values[Ar]=this._values[Ar].transitioned(u,Xe._values[Ar]);return fr}untransitioned(){const u=new Ki(this._properties);for(const Xe of Object.keys(this._values))u._values[Xe]=this._values[Xe].untransitioned();return u}}class Gi{constructor(u,Xe,fr,Ar,_r){this.property=u,this.value=Xe,this.begin=_r+Ar.delay||0,this.end=this.begin+Ar.duration||0,u.specification.transition&&(Ar.delay||Ar.duration)&&(this.prior=fr)}possiblyEvaluate(u,Xe,fr){const Ar=u.now||0,_r=this.value.possiblyEvaluate(u,Xe,fr),wr=this.prior;if(wr){if(Ar>this.end)return this.prior=null,_r;if(this.value.isDataDriven())return this.prior=null,_r;if(Ar<this.begin)return wr.possiblyEvaluate(u,Xe,fr);{const Kr=(Ar-this.begin)/(this.end-this.begin);return this.property.interpolate(wr.possiblyEvaluate(u,Xe,fr),_r,function(u){if(u<=0)return 0;if(u>=1)return 1;const Xe=u*u,fr=Xe*u;return 4*(u<.5?fr:3*(u-Xe)+fr-.75)}(Kr))}}return _r}}class Ki{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,Xe,fr){const Ar=new Yi(this._properties);for(const _r of Object.keys(this._values))Ar._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,fr);return Ar}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class Xi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return void 0!==this._values[u].value}getValue(u){return w(this._values[u].value)}setValue(u,Xe){this._values[u]=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}serialize(){const u={};for(const Xe of Object.keys(this._values)){const fr=this.getValue(Xe);void 0!==fr&&(u[Xe]=fr)}return u}possiblyEvaluate(u,Xe,fr){const Ar=new Yi(this._properties);for(const _r of Object.keys(this._values))Ar._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,fr);return Ar}}class Hi{constructor(u,Xe,fr){this.property=u,this.value=Xe,this.parameters=fr}isConstant(){return"constant"===this.value.kind}constantOr(u){return"constant"===this.value.kind?this.value.value:u}evaluate(u,Xe,fr,Ar){return this.property.evaluate(this.value,this.parameters,u,Xe,fr,Ar)}}class Yi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class Ji{constructor(u){this.specification=u}possiblyEvaluate(u,Xe){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(Xe)}interpolate(u,Xe,fr){const Ar=Kl[this.specification.type];return Ar?Ar(u,Xe,fr):u}}class Wi{constructor(u,Xe){this.specification=u,this.overrides=Xe}possiblyEvaluate(u,Xe,fr,Ar){return new Hi(this,"constant"===u.expression.kind||"camera"===u.expression.kind?{kind:"constant",value:u.expression.evaluate(Xe,null,{},fr,Ar)}:u.expression,Xe)}interpolate(u,Xe,fr){if("constant"!==u.value.kind||"constant"!==Xe.value.kind)return u;if(void 0===u.value.value||void 0===Xe.value.value)return new Hi(this,{kind:"constant",value:void 0},u.parameters);const Ar=Kl[this.specification.type];if(Ar){const _r=Ar(u.value.value,Xe.value.value,fr);return new Hi(this,{kind:"constant",value:_r},u.parameters)}return u}evaluate(u,Xe,fr,Ar,_r,wr){return"constant"===u.kind?u.value:u.evaluate(Xe,fr,Ar,_r,wr)}}class Qi extends Wi{possiblyEvaluate(u,Xe,fr,Ar){if(void 0===u.value)return new Hi(this,{kind:"constant",value:void 0},Xe);if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},fr,Ar),wr="resolvedImage"===u.property.specification.type&&"string"!=typeof _r?_r.name:_r,Kr=this._calculate(wr,wr,wr,Xe);return new Hi(this,{kind:"constant",value:Kr},Xe)}if("camera"===u.expression.kind){const fr=this._calculate(u.expression.evaluate({zoom:Xe.zoom-1}),u.expression.evaluate({zoom:Xe.zoom}),u.expression.evaluate({zoom:Xe.zoom+1}),Xe);return new Hi(this,{kind:"constant",value:fr},Xe)}return new Hi(this,u.expression,Xe)}evaluate(u,Xe,fr,Ar,_r,wr){if("source"===u.kind){const Kr=u.evaluate(Xe,fr,Ar,_r,wr);return this._calculate(Kr,Kr,Kr,Xe)}return"composite"===u.kind?this._calculate(u.evaluate({zoom:Math.floor(Xe.zoom)-1},fr,Ar),u.evaluate({zoom:Math.floor(Xe.zoom)},fr,Ar),u.evaluate({zoom:Math.floor(Xe.zoom)+1},fr,Ar),Xe):u.value}_calculate(u,Xe,fr,Ar){return Ar.zoom>Ar.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:fr,to:Xe}}interpolate(u){return u}}class ts{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,fr,Ar){if(void 0!==u.value){if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},fr,Ar);return this._calculate(_r,_r,_r,Xe)}return this._calculate(u.expression.evaluate(new Ui(Math.floor(Xe.zoom-1),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom+1),Xe)),Xe)}}_calculate(u,Xe,fr,Ar){return Ar.zoom>Ar.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:fr,to:Xe}}interpolate(u){return u}}class es{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,fr,Ar){return!!u.expression.evaluate(Xe,null,{},fr,Ar)}interpolate(){return!1}}class rs{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const Xe in u){const fr=u[Xe];fr.specification.overridable&&this.overridableProperties.push(Xe);const Ar=this.defaultPropertyValues[Xe]=new qi(fr,void 0),_r=this.defaultTransitionablePropertyValues[Xe]=new Ni(fr);this.defaultTransitioningPropertyValues[Xe]=_r.untransitioned(),this.defaultPossiblyEvaluatedValues[Xe]=Ar.possiblyEvaluate({})}}}wi("DataDrivenProperty",Wi),wi("DataConstantProperty",Ji),wi("CrossFadedDataDrivenProperty",Qi),wi("CrossFadedProperty",ts),wi("ColorRampProperty",es);const rg="-transition";class is extends Z{constructor(u,Xe){if(super(),this.id=u.id,this.type=u.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==u.type&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,"background"!==u.type&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),Xe.layout&&(this._unevaluatedLayout=new Xi(Xe.layout)),Xe.paint)){this._transitionablePaint=new Zi(Xe.paint);for(const Xe in u.paint)this.setPaintProperty(Xe,u.paint[Xe],{validate:!1});for(const Xe in u.layout)this.setLayoutProperty(Xe,u.layout[Xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Yi(Xe.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return"visibility"===u?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,Xe,fr={}){null!=Xe&&this._validate(bc,`layers.${this.id}.layout.${u}`,u,Xe,fr)||("visibility"!==u?this._unevaluatedLayout.setValue(u,Xe):this.visibility=Xe)}getPaintProperty(u){return u.endsWith(rg)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,Xe,fr={}){if(null!=Xe&&this._validate(Ac,`layers.${this.id}.paint.${u}`,u,Xe,fr))return!1;if(u.endsWith(rg))return this._transitionablePaint.setTransition(u.slice(0,-11),Xe||void 0),!1;{const fr=this._transitionablePaint._values[u],Ar="cross-faded-data-driven"===fr.property.specification["property-type"],_r=fr.value.isDataDriven(),wr=fr.value;this._transitionablePaint.setValue(u,Xe),this._handleSpecialPaintPropertyUpdate(u);const Kr=this._transitionablePaint._values[u].value;return Kr.isDataDriven()||_r||Ar||this._handleOverridablePaintPropertyUpdate(u,wr,Kr)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,Xe,fr){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||"none"===this.visibility}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,Xe){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,Xe)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,Xe)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),b(u,((u,Xe)=>!(void 0===u||"layout"===Xe&&!Object.keys(u).length||"paint"===Xe&&!Object.keys(u).length)))}_validate(u,Xe,fr,Ar,_r={}){return(!_r||!1!==_r.validate)&&xi(this,u.call(mc,{key:Xe,layerType:this.type,objectKey:fr,value:Ar,styleSpec:Io,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const Xe=this.paint.get(u);if(Xe instanceof Hi&&an(Xe.property.specification)&&("source"===Xe.value.kind||"composite"===Xe.value.kind)&&Xe.value.isStateDependent)return!0}return!1}}const ng={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class as{constructor(u,Xe){this._structArray=u,this._pos1=Xe*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class os{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,Xe){return u._trim(),Xe&&(u.isTransferred=!0,Xe.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const Xe=Object.create(this.prototype);return Xe.arrayBuffer=u.arrayBuffer,Xe.length=u.length,Xe.capacity=u.arrayBuffer.byteLength/Xe.bytesPerElement,Xe._refreshViews(),Xe}_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(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const Xe=this.uint8;this._refreshViews(),Xe&&this.uint8.set(Xe)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ls(u,Xe=1){let fr=0,Ar=0;return{members:u.map((u=>{const _r=ng[u.type].BYTES_PER_ELEMENT,wr=fr=us(fr,Math.max(Xe,_r)),Kr=u.components||1;return Ar=Math.max(Ar,_r),fr+=_r*Kr,{name:u.name,type:u.type,components:Kr,offset:wr}})),size:us(fr,Math.max(Ar,Xe)),alignment:Xe}}function us(u,Xe){return Math.ceil(u/Xe)*Xe}class cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.int16[Ar+0]=Xe,this.int16[Ar+1]=fr,u}}cs.prototype.bytesPerElement=4,wi("StructArrayLayout2i4",cs);class hs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.int16[_r+0]=Xe,this.int16[_r+1]=fr,this.int16[_r+2]=Ar,u}}hs.prototype.bytesPerElement=6,wi("StructArrayLayout3i6",hs);class ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,fr,Ar)}emplace(u,Xe,fr,Ar,_r){const wr=4*u;return this.int16[wr+0]=Xe,this.int16[wr+1]=fr,this.int16[wr+2]=Ar,this.int16[wr+3]=_r,u}}ps.prototype.bytesPerElement=8,wi("StructArrayLayout4i8",ps);class fs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=6*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.int16[In+2]=Ar,this.int16[In+3]=_r,this.int16[In+4]=wr,this.int16[In+5]=Kr,u}}fs.prototype.bytesPerElement=12,wi("StructArrayLayout2i4i12",fs);class ds extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=4*u,io=8*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.uint8[io+4]=Ar,this.uint8[io+5]=_r,this.uint8[io+6]=wr,this.uint8[io+7]=Kr,u}}ds.prototype.bytesPerElement=8,wi("StructArrayLayout2i4ub8",ds);class ys extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.float32[Ar+0]=Xe,this.float32[Ar+1]=fr,u}}ys.prototype.bytesPerElement=8,wi("StructArrayLayout2f8",ys);class ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=this.length;return this.resize(oo+1),this.emplace(oo,u,Xe,fr,Ar,_r,wr,Kr,In,io,no)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=10*u;return this.uint16[so+0]=Xe,this.uint16[so+1]=fr,this.uint16[so+2]=Ar,this.uint16[so+3]=_r,this.uint16[so+4]=wr,this.uint16[so+5]=Kr,this.uint16[so+6]=In,this.uint16[so+7]=io,this.uint16[so+8]=no,this.uint16[so+9]=oo,u}}ms.prototype.bytesPerElement=20,wi("StructArrayLayout10ui20",ms);class gs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so){const ao=this.length;return this.resize(ao+1),this.emplace(ao,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=12*u;return this.int16[co+0]=Xe,this.int16[co+1]=fr,this.int16[co+2]=Ar,this.int16[co+3]=_r,this.uint16[co+4]=wr,this.uint16[co+5]=Kr,this.uint16[co+6]=In,this.uint16[co+7]=io,this.int16[co+8]=no,this.int16[co+9]=oo,this.int16[co+10]=so,this.int16[co+11]=ao,u}}gs.prototype.bytesPerElement=24,wi("StructArrayLayout4i4ui4i24",gs);class xs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.float32[_r+0]=Xe,this.float32[_r+1]=fr,this.float32[_r+2]=Ar,u}}xs.prototype.bytesPerElement=12,wi("StructArrayLayout3f12",xs);class vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint32[1*u+0]=Xe,u}}vs.prototype.bytesPerElement=4,wi("StructArrayLayout1ul4",vs);class bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=this.length;return this.resize(no+1),this.emplace(no,u,Xe,fr,Ar,_r,wr,Kr,In,io)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=10*u,so=5*u;return this.int16[oo+0]=Xe,this.int16[oo+1]=fr,this.int16[oo+2]=Ar,this.int16[oo+3]=_r,this.int16[oo+4]=wr,this.int16[oo+5]=Kr,this.uint32[so+3]=In,this.uint16[oo+8]=io,this.uint16[oo+9]=no,u}}bs.prototype.bytesPerElement=20,wi("StructArrayLayout6i1ul2ui20",bs);class ws extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=6*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.int16[In+2]=Ar,this.int16[In+3]=_r,this.int16[In+4]=wr,this.int16[In+5]=Kr,u}}ws.prototype.bytesPerElement=12,wi("StructArrayLayout2i2i2i12",ws);class _s extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,fr,Ar,_r)}emplace(u,Xe,fr,Ar,_r,wr){const Kr=4*u,In=8*u;return this.float32[Kr+0]=Xe,this.float32[Kr+1]=fr,this.float32[Kr+2]=Ar,this.int16[In+6]=_r,this.int16[In+7]=wr,u}}_s.prototype.bytesPerElement=16,wi("StructArrayLayout2f1f2i16",_s);class As extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=16*u,io=4*u,no=8*u;return this.uint8[In+0]=Xe,this.uint8[In+1]=fr,this.float32[io+1]=Ar,this.float32[io+2]=_r,this.int16[no+6]=wr,this.int16[no+7]=Kr,u}}As.prototype.bytesPerElement=16,wi("StructArrayLayout2ub2f2i16",As);class Ss extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.uint16[_r+0]=Xe,this.uint16[_r+1]=fr,this.uint16[_r+2]=Ar,u}}Ss.prototype.bytesPerElement=6,wi("StructArrayLayout3ui6",Ss);class ks extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co){const Io=this.length;return this.resize(Io+1),this.emplace(Io,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io){const xo=24*u,Mo=12*u,Po=48*u;return this.int16[xo+0]=Xe,this.int16[xo+1]=fr,this.uint16[xo+2]=Ar,this.uint16[xo+3]=_r,this.uint32[Mo+2]=wr,this.uint32[Mo+3]=Kr,this.uint32[Mo+4]=In,this.uint16[xo+10]=io,this.uint16[xo+11]=no,this.uint16[xo+12]=oo,this.float32[Mo+7]=so,this.float32[Mo+8]=ao,this.uint8[Po+36]=co,this.uint8[Po+37]=go,this.uint8[Po+38]=ho,this.uint32[Mo+10]=Co,this.int16[xo+22]=Io,u}}ks.prototype.bytesPerElement=48,wi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ks);class Ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl){const al=this.length;return this.resize(al+1),this.emplace(al,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl,al){const cl=32*u,hl=16*u;return this.int16[cl+0]=Xe,this.int16[cl+1]=fr,this.int16[cl+2]=Ar,this.int16[cl+3]=_r,this.int16[cl+4]=wr,this.int16[cl+5]=Kr,this.int16[cl+6]=In,this.int16[cl+7]=io,this.uint16[cl+8]=no,this.uint16[cl+9]=oo,this.uint16[cl+10]=so,this.uint16[cl+11]=ao,this.uint16[cl+12]=co,this.uint16[cl+13]=go,this.uint16[cl+14]=ho,this.uint16[cl+15]=Co,this.uint16[cl+16]=Io,this.uint16[cl+17]=xo,this.uint16[cl+18]=Mo,this.uint16[cl+19]=Po,this.uint16[cl+20]=ss,this.uint16[cl+21]=sa,this.uint16[cl+22]=aa,this.uint32[hl+12]=fa,this.float32[hl+13]=ya,this.float32[hl+14]=ol,this.uint16[cl+30]=sl,this.uint16[cl+31]=al,u}}Ms.prototype.bytesPerElement=64,wi("StructArrayLayout8i15ui1ul2f2ui64",Ms);class Is extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.float32[1*u+0]=Xe,u}}Is.prototype.bytesPerElement=4,wi("StructArrayLayout1f4",Is);class zs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.uint16[6*u+0]=Xe,this.float32[_r+1]=fr,this.float32[_r+2]=Ar,u}}zs.prototype.bytesPerElement=12,wi("StructArrayLayout1ui2f12",zs);class Ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=4*u;return this.uint32[2*u+0]=Xe,this.uint16[_r+2]=fr,this.uint16[_r+3]=Ar,u}}Ps.prototype.bytesPerElement=8,wi("StructArrayLayout1ul2ui8",Ps);class Cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.uint16[Ar+0]=Xe,this.uint16[Ar+1]=fr,u}}Cs.prototype.bytesPerElement=4,wi("StructArrayLayout2ui4",Cs);class Bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint16[1*u+0]=Xe,u}}Bs.prototype.bytesPerElement=2,wi("StructArrayLayout1ui2",Bs);class Vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,fr,Ar)}emplace(u,Xe,fr,Ar,_r){const wr=4*u;return this.float32[wr+0]=Xe,this.float32[wr+1]=fr,this.float32[wr+2]=Ar,this.float32[wr+3]=_r,u}}Vs.prototype.bytesPerElement=16,wi("StructArrayLayout4f16",Vs);class Es extends as{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new fr(this.anchorPointX,this.anchorPointY)}}Es.prototype.size=20;class Fs extends bs{get(u){return new Es(this,u)}}wi("CollisionBoxArray",Fs);class Ts extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ts.prototype.size=48;class $s extends ks{get(u){return new Ts(this,u)}}wi("PlacedSymbolArray",$s);class Ls extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(u){this._structArray.uint32[this._pos4+12]=u}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ls.prototype.size=64;class Ds extends Ms{get(u){return new Ls(this,u)}}wi("SymbolInstanceArray",Ds);class Os extends Is{getoffsetX(u){return this.float32[1*u+0]}}wi("GlyphOffsetArray",Os);class js extends hs{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}wi("SymbolLineVertexArray",js);class Rs extends as{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Rs.prototype.size=12;class Us extends zs{get(u){return new Rs(this,u)}}wi("TextAnchorOffsetArray",Us);class qs extends as{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]}}qs.prototype.size=8;class Ns extends Ps{get(u){return new qs(this,u)}}wi("FeatureIndexArray",Ns);class Zs extends cs{}class Gs extends cs{}class Ks extends cs{}class Xs extends fs{}class Hs extends ds{}class Ys extends ys{}class Js extends ms{}class Ws extends gs{}class Qs extends xs{}class ta extends vs{}class ea extends ws{}class ra extends As{}class na extends Ss{}class ia extends Cs{}const og=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:sg}=og;class oa{constructor(u=[]){this.segments=u}prepareSegment(u,Xe,fr,Ar){let _r=this.segments[this.segments.length-1];return u>oa.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${oa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}`),(!_r||_r.vertexLength+u>oa.MAX_VERTEX_ARRAY_LENGTH||_r.sortKey!==Ar)&&(_r={vertexOffset:Xe.length,primitiveOffset:fr.length,vertexLength:0,primitiveLength:0},void 0!==Ar&&(_r.sortKey=Ar),this.segments.push(_r)),_r}get(){return this.segments}destroy(){for(const u of this.segments)for(const Xe in u.vaos)u.vaos[Xe].destroy()}static simpleSegment(u,Xe,fr,Ar){return new oa([{vertexOffset:u,primitiveOffset:Xe,vertexLength:fr,primitiveLength:Ar,vaos:{},sortKey:0}])}}function la(u,Xe){return 256*(u=y(Math.floor(u),0,255))+y(Math.floor(Xe),0,255)}oa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,wi("SegmentVector",oa);const ag=ls([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var lg={exports:{}},cg={exports:{}};cg.exports=function(u,Xe){var fr,Ar,_r,wr,Kr,In,io,no;for(Ar=u.length-(fr=3&u.length),_r=Xe,Kr=3432918353,In=461845907,no=0;no<Ar;)io=255&u.charCodeAt(no)|(255&u.charCodeAt(++no))<<8|(255&u.charCodeAt(++no))<<16|(255&u.charCodeAt(++no))<<24,++no,_r=27492+(65535&(wr=5*(65535&(_r=(_r^=io=(65535&(io=(io=(65535&io)*Kr+(((io>>>16)*Kr&65535)<<16)&4294967295)<<15|io>>>17))*In+(((io>>>16)*In&65535)<<16)&4294967295)<<13|_r>>>19))+((5*(_r>>>16)&65535)<<16)&4294967295))+((58964+(wr>>>16)&65535)<<16);switch(io=0,fr){case 3:io^=(255&u.charCodeAt(no+2))<<16;case 2:io^=(255&u.charCodeAt(no+1))<<8;case 1:_r^=io=(65535&(io=(io=(65535&(io^=255&u.charCodeAt(no)))*Kr+(((io>>>16)*Kr&65535)<<16)&4294967295)<<15|io>>>17))*In+(((io>>>16)*In&65535)<<16)&4294967295}return _r^=u.length,_r=2246822507*(65535&(_r^=_r>>>16))+((2246822507*(_r>>>16)&65535)<<16)&4294967295,_r=3266489909*(65535&(_r^=_r>>>13))+((3266489909*(_r>>>16)&65535)<<16)&4294967295,(_r^=_r>>>16)>>>0};var gg=cg.exports,hg={exports:{}};hg.exports=function(u,Xe){for(var fr,Ar=u.length,_r=Xe^Ar,wr=0;Ar>=4;)fr=1540483477*(65535&(fr=255&u.charCodeAt(wr)|(255&u.charCodeAt(++wr))<<8|(255&u.charCodeAt(++wr))<<16|(255&u.charCodeAt(++wr))<<24))+((1540483477*(fr>>>16)&65535)<<16),_r=1540483477*(65535&_r)+((1540483477*(_r>>>16)&65535)<<16)^(fr=1540483477*(65535&(fr^=fr>>>24))+((1540483477*(fr>>>16)&65535)<<16)),Ar-=4,++wr;switch(Ar){case 3:_r^=(255&u.charCodeAt(wr+2))<<16;case 2:_r^=(255&u.charCodeAt(wr+1))<<8;case 1:_r=1540483477*(65535&(_r^=255&u.charCodeAt(wr)))+((1540483477*(_r>>>16)&65535)<<16)}return _r=1540483477*(65535&(_r^=_r>>>13))+((1540483477*(_r>>>16)&65535)<<16),(_r^=_r>>>15)>>>0};var ug=gg,dg=hg.exports;lg.exports=ug,lg.exports.murmur3=ug,lg.exports.murmur2=dg;var pg=r(lg.exports);class ga{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,Xe,fr,Ar){this.ids.push(xa(u)),this.positions.push(Xe,fr,Ar)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const Xe=xa(u);let fr=0,Ar=this.ids.length-1;for(;fr<Ar;){const u=fr+Ar>>1;this.ids[u]>=Xe?Ar=u:fr=u+1}const _r=[];for(;this.ids[fr]===Xe;)_r.push({index:this.positions[3*fr],start:this.positions[3*fr+1],end:this.positions[3*fr+2]}),fr++;return _r}static serialize(u,Xe){const fr=new Float64Array(u.ids),Ar=new Uint32Array(u.positions);return va(fr,Ar,0,fr.length-1),Xe&&Xe.push(fr.buffer,Ar.buffer),{ids:fr,positions:Ar}}static deserialize(u){const Xe=new ga;return Xe.ids=u.ids,Xe.positions=u.positions,Xe.indexed=!0,Xe}}function xa(u){const Xe=+u;return!isNaN(Xe)&&Xe<=Number.MAX_SAFE_INTEGER?Xe:pg(String(u))}function va(u,Xe,fr,Ar){for(;fr<Ar;){const _r=u[fr+Ar>>1];let wr=fr-1,Kr=Ar+1;for(;;){do{wr++}while(u[wr]<_r);do{Kr--}while(u[Kr]>_r);if(wr>=Kr)break;ba(u,wr,Kr),ba(Xe,3*wr,3*Kr),ba(Xe,3*wr+1,3*Kr+1),ba(Xe,3*wr+2,3*Kr+2)}Kr-fr<Ar-Kr?(va(u,Xe,fr,Kr),fr=Kr+1):(va(u,Xe,Kr+1,Ar),Ar=Kr)}}function ba(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}wi("FeaturePositionMap",ga);class wa{constructor(u,Xe){this.gl=u.gl,this.location=Xe}}class _a extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class Aa extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class Sa extends wa{constructor(u,Xe){super(u,Xe),this.current=Kt.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const mg=new Float32Array(16);function Ma(u){return[la(255*u.r,255*u.g),la(255*u.b,255*u.a)]}class Ia{constructor(u,Xe,fr){this.value=u,this.uniformNames=Xe.map((u=>`u_${u}`)),this.type=fr}setUniform(u,Xe,fr){u.set(fr.constantOr(this.value))}getBinding(u,Xe,fr){return"color"===this.type?new Sa(u,Xe):new _a(u,Xe)}}class za{constructor(u,Xe){this.uniformNames=Xe.map((u=>`u_${u}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,Xe){this.pixelRatioFrom=Xe.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=Xe.tlbr,this.patternTo=u.tlbr}setUniform(u,Xe,fr,Ar){const _r="u_pattern_to"===Ar?this.patternTo:"u_pattern_from"===Ar?this.patternFrom:"u_pixel_ratio_to"===Ar?this.pixelRatioTo:"u_pixel_ratio_from"===Ar?this.pixelRatioFrom:null;_r&&u.set(_r)}getBinding(u,Xe,fr){return"u_pattern"===fr.substr(0,9)?new Aa(u,Xe):new _a(u,Xe)}}class Pa{constructor(u,Xe,fr,Ar){this.expression=u,this.type=fr,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===fr?2:1,offset:0}))),this.paintVertexArray=new Ar}populatePaintArray(u,Xe,fr,Ar,_r){const wr=this.paintVertexArray.length,Kr=this.expression.evaluate(new Ui(0),Xe,{},Ar,[],_r);this.paintVertexArray.resize(u),this._setPaintValue(wr,u,Kr)}updatePaintArray(u,Xe,fr,Ar){const _r=this.expression.evaluate({zoom:0},fr,Ar);this._setPaintValue(u,Xe,_r)}_setPaintValue(u,Xe,fr){if("color"===this.type){const Ar=Ma(fr);for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,Ar[0],Ar[1])}else{for(let Ar=u;Ar<Xe;Ar++)this.paintVertexArray.emplace(Ar,fr);this.maxValue=Math.max(this.maxValue,Math.abs(fr))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ca{constructor(u,Xe,fr,Ar,_r,wr){this.expression=u,this.uniformNames=Xe.map((u=>`u_${u}_t`)),this.type=fr,this.useIntegerZoom=Ar,this.zoom=_r,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===fr?4:2,offset:0}))),this.paintVertexArray=new wr}populatePaintArray(u,Xe,fr,Ar,_r){const wr=this.expression.evaluate(new Ui(this.zoom),Xe,{},Ar,[],_r),Kr=this.expression.evaluate(new Ui(this.zoom+1),Xe,{},Ar,[],_r),In=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(In,u,wr,Kr)}updatePaintArray(u,Xe,fr,Ar){const _r=this.expression.evaluate({zoom:this.zoom},fr,Ar),wr=this.expression.evaluate({zoom:this.zoom+1},fr,Ar);this._setPaintValue(u,Xe,_r,wr)}_setPaintValue(u,Xe,fr,Ar){if("color"===this.type){const _r=Ma(fr),wr=Ma(Ar);for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,_r[0],_r[1],wr[0],wr[1])}else{for(let _r=u;_r<Xe;_r++)this.paintVertexArray.emplace(_r,fr,Ar);this.maxValue=Math.max(this.maxValue,Math.abs(fr),Math.abs(Ar))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,Xe){const fr=this.useIntegerZoom?Math.floor(Xe.zoom):Xe.zoom,Ar=y(this.expression.interpolationFactor(fr,this.zoom,this.zoom+1),0,1);u.set(Ar)}getBinding(u,Xe,fr){return new _a(u,Xe)}}class Ba{constructor(u,Xe,fr,Ar,_r,wr){this.expression=u,this.type=Xe,this.useIntegerZoom=fr,this.zoom=Ar,this.layerId=wr,this.zoomInPaintVertexArray=new _r,this.zoomOutPaintVertexArray=new _r}populatePaintArray(u,Xe,fr){const Ar=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(Ar,u,Xe.patterns&&Xe.patterns[this.layerId],fr)}updatePaintArray(u,Xe,fr,Ar,_r){this._setPaintValues(u,Xe,fr.patterns&&fr.patterns[this.layerId],_r)}_setPaintValues(u,Xe,fr,Ar){if(!Ar||!fr)return;const{min:_r,mid:wr,max:Kr}=fr,In=Ar[_r],io=Ar[wr],no=Ar[Kr];if(In&&io&&no)for(let fr=u;fr<Xe;fr++)this.zoomInPaintVertexArray.emplace(fr,io.tl[0],io.tl[1],io.br[0],io.br[1],In.tl[0],In.tl[1],In.br[0],In.br[1],io.pixelRatio,In.pixelRatio),this.zoomOutPaintVertexArray.emplace(fr,io.tl[0],io.tl[1],io.br[0],io.br[1],no.tl[0],no.tl[1],no.br[0],no.br[1],io.pixelRatio,no.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,ag.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,ag.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Va{constructor(u,Xe,fr){this.binders={},this._buffers=[];const Ar=[];for(const _r in u.paint._values){if(!fr(_r))continue;const wr=u.paint.get(_r);if(!(wr instanceof Hi&&an(wr.property.specification)))continue;const Kr=Fa(_r,u.type),In=wr.value,io=wr.property.specification.type,no=wr.property.useIntegerZoom,oo=wr.property.specification["property-type"],so="cross-faded"===oo||"cross-faded-data-driven"===oo;if("constant"===In.kind)this.binders[_r]=so?new za(In.value,Kr):new Ia(In.value,Kr,io),Ar.push(`/u_${_r}`);else if("source"===In.kind||so){const fr=Ta(_r,io,"source");this.binders[_r]=so?new Ba(In,io,no,Xe,fr,u.id):new Pa(In,Kr,io,fr),Ar.push(`/a_${_r}`)}else{const u=Ta(_r,io,"composite");this.binders[_r]=new Ca(In,Kr,io,no,Xe,u),Ar.push(`/z_${_r}`)}}this.cacheKey=Ar.sort().join("")}getMaxValue(u){const Xe=this.binders[u];return Xe instanceof Pa||Xe instanceof Ca?Xe.maxValue:0}populatePaintArrays(u,Xe,fr,Ar,_r){for(const wr in this.binders){const Kr=this.binders[wr];(Kr instanceof Pa||Kr instanceof Ca||Kr instanceof Ba)&&Kr.populatePaintArray(u,Xe,fr,Ar,_r)}}setConstantPatternPositions(u,Xe){for(const fr in this.binders){const Ar=this.binders[fr];Ar instanceof za&&Ar.setConstantPatternPositions(u,Xe)}}updatePaintArrays(u,Xe,fr,Ar,_r){let wr=!1;for(const Kr in u){const In=Xe.getPositions(Kr);for(const Xe of In){const In=fr.feature(Xe.index);for(const fr in this.binders){const io=this.binders[fr];if((io instanceof Pa||io instanceof Ca||io instanceof Ba)&&!0===io.expression.isStateDependent){const no=Ar.paint.get(fr);io.expression=no.value,io.updatePaintArray(Xe.start,Xe.end,In,u[Kr],_r),wr=!0}}}}return wr}defines(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];(fr instanceof Ia||fr instanceof za)&&u.push(...fr.uniformNames.map((u=>`#define HAS_UNIFORM_${u}`)))}return u}getBinderAttributes(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(fr instanceof Pa||fr instanceof Ca)for(let Xe=0;Xe<fr.paintVertexAttributes.length;Xe++)u.push(fr.paintVertexAttributes[Xe].name);else if(fr instanceof Ba)for(let Xe=0;Xe<ag.members.length;Xe++)u.push(ag.members[Xe].name)}return u}getBinderUniforms(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(fr instanceof Ia||fr instanceof za||fr instanceof Ca)for(const Xe of fr.uniformNames)u.push(Xe)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,Xe){const fr=[];for(const Ar in this.binders){const _r=this.binders[Ar];if(_r instanceof Ia||_r instanceof za||_r instanceof Ca)for(const wr of _r.uniformNames)if(Xe[wr]){const Kr=_r.getBinding(u,Xe[wr],wr);fr.push({name:wr,property:Ar,binding:Kr})}}return fr}setUniforms(u,Xe,fr,Ar){for(const{name:u,property:_r,binding:wr}of Xe)this.binders[_r].setUniform(wr,Ar,fr.get(_r),u)}updatePaintBuffers(u){this._buffers=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(u&&fr instanceof Ba){const Xe=2===u.fromScale?fr.zoomInPaintVertexBuffer:fr.zoomOutPaintVertexBuffer;Xe&&this._buffers.push(Xe)}else(fr instanceof Pa||fr instanceof Ca)&&fr.paintVertexBuffer&&this._buffers.push(fr.paintVertexBuffer)}}upload(u){for(const Xe in this.binders){const fr=this.binders[Xe];(fr instanceof Pa||fr instanceof Ca||fr instanceof Ba)&&fr.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const Xe=this.binders[u];(Xe instanceof Pa||Xe instanceof Ca||Xe instanceof Ba)&&Xe.destroy()}}}class Ea{constructor(u,Xe,fr=()=>!0){this.programConfigurations={};for(const Ar of u)this.programConfigurations[Ar.id]=new Va(Ar,Xe,fr);this.needsUpload=!1,this._featureMap=new ga,this._bufferOffset=0}populatePaintArrays(u,Xe,fr,Ar,_r,wr){for(const fr in this.programConfigurations)this.programConfigurations[fr].populatePaintArrays(u,Xe,Ar,_r,wr);void 0!==Xe.id&&this._featureMap.add(Xe.id,fr,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,Xe,fr,Ar){for(const _r of fr)this.needsUpload=this.programConfigurations[_r.id].updatePaintArrays(u,this._featureMap,Xe,_r,Ar)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const Xe in this.programConfigurations)this.programConfigurations[Xe].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function Fa(u,Xe){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${Xe}-`,"").replace(/-/g,"_")]}function Ta(u,Xe,fr){const Ar={color:{source:ys,composite:Vs},number:{source:Is,composite:ys}},_r=function(u){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[u]}(u);return _r&&_r[fr]||Ar[Xe][fr]}wi("ConstantBinder",Ia),wi("CrossFadedConstantBinder",za),wi("SourceExpressionBinder",Pa),wi("CrossFadedCompositeBinder",Ba),wi("CompositeExpressionBinder",Ca),wi("ProgramConfiguration",Va,{omit:["_buffers"]}),wi("ProgramConfigurationSet",Ea);const Cg=8192,Ig=Math.pow(2,14)-1,fg=-Ig-1;function Oa(u){const Xe=Cg/u.extent,fr=u.loadGeometry();for(let u=0;u<fr.length;u++){const Ar=fr[u];for(let u=0;u<Ar.length;u++){const fr=Ar[u],_r=Math.round(fr.x*Xe),wr=Math.round(fr.y*Xe);fr.x=y(_r,fg,Ig),fr.y=y(wr,fg,Ig),(_r<fr.x||_r>fr.x+1||wr<fr.y||wr>fr.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return fr}function ja(u,Xe){return{type:u.type,id:u.id,properties:u.properties,geometry:Xe?Oa(u):[]}}function Ra(u,Xe,fr,Ar,_r){u.emplaceBack(2*Xe+(Ar+1)/2,2*fr+(_r+1)/2)}class Ua{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Gs,this.indexArray=new na,this.segments=new oa,this.programConfigurations=new Ea(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){const Ar=this.layers[0],_r=[];let wr=null,Kr=!1;"circle"===Ar.type&&(wr=Ar.layout.get("circle-sort-key"),Kr=!wr.isConstant());for(const{feature:Xe,id:Ar,index:In,sourceLayerIndex:io}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,fr))continue;const oo=Kr?wr.evaluate(no,{},fr):void 0,so={id:Ar,properties:Xe.properties,type:Xe.type,sourceLayerIndex:io,index:In,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:oo};_r.push(so)}Kr&&_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of _r){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar,In=u[wr].feature;this.addFeature(Ar,_r,wr,fr),Xe.featureIndex.insert(In,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,sg),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,Xe,fr,Ar){for(const fr of Xe)for(const Xe of fr){const fr=Xe.x,Ar=Xe.y;if(fr<0||fr>=Cg||Ar<0||Ar>=Cg)continue;const _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,u.sortKey),wr=_r.vertexLength;Ra(this.layoutVertexArray,fr,Ar,-1,-1),Ra(this.layoutVertexArray,fr,Ar,1,-1),Ra(this.layoutVertexArray,fr,Ar,1,1),Ra(this.layoutVertexArray,fr,Ar,-1,1),this.indexArray.emplaceBack(wr,wr+1,wr+2),this.indexArray.emplaceBack(wr,wr+3,wr+2),_r.vertexLength+=4,_r.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,{},Ar)}}function qa(u,Xe){for(let fr=0;fr<u.length;fr++)if(Wa(Xe,u[fr]))return!0;for(let fr=0;fr<Xe.length;fr++)if(Wa(u,Xe[fr]))return!0;return!!Ka(u,Xe)}function Na(u,Xe,fr){return!!Wa(u,Xe)||!!Ha(Xe,u,fr)}function Za(u,Xe){if(1===u.length)return Ja(Xe,u[0]);for(let fr=0;fr<Xe.length;fr++){const Ar=Xe[fr];for(let Xe=0;Xe<Ar.length;Xe++)if(Wa(u,Ar[Xe]))return!0}for(let fr=0;fr<u.length;fr++)if(Ja(Xe,u[fr]))return!0;for(let fr=0;fr<Xe.length;fr++)if(Ka(u,Xe[fr]))return!0;return!1}function Ga(u,Xe,fr){if(u.length>1){if(Ka(u,Xe))return!0;for(let Ar=0;Ar<Xe.length;Ar++)if(Ha(Xe[Ar],u,fr))return!0}for(let Ar=0;Ar<u.length;Ar++)if(Ha(u[Ar],Xe,fr))return!0;return!1}function Ka(u,Xe){if(0===u.length||0===Xe.length)return!1;for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1];for(let u=0;u<Xe.length-1;u++)if(Xa(Ar,_r,Xe[u],Xe[u+1]))return!0}return!1}function Xa(u,Xe,fr,Ar){return S(u,fr,Ar)!==S(Xe,fr,Ar)&&S(u,Xe,fr)!==S(u,Xe,Ar)}function Ha(u,Xe,fr){const Ar=fr*fr;if(1===Xe.length)return u.distSqr(Xe[0])<Ar;for(let fr=1;fr<Xe.length;fr++)if(Ya(u,Xe[fr-1],Xe[fr])<Ar)return!0;return!1}function Ya(u,Xe,fr){const Ar=Xe.distSqr(fr);if(0===Ar)return u.distSqr(Xe);const _r=((u.x-Xe.x)*(fr.x-Xe.x)+(u.y-Xe.y)*(fr.y-Xe.y))/Ar;return u.distSqr(_r<0?Xe:_r>1?fr:fr.sub(Xe)._mult(_r)._add(Xe))}function Ja(u,Xe){let fr,Ar,_r,wr=!1;for(let Kr=0;Kr<u.length;Kr++){fr=u[Kr];for(let u=0,Kr=fr.length-1;u<fr.length;Kr=u++)Ar=fr[u],_r=fr[Kr],Ar.y>Xe.y!=_r.y>Xe.y&&Xe.x<(_r.x-Ar.x)*(Xe.y-Ar.y)/(_r.y-Ar.y)+Ar.x&&(wr=!wr)}return wr}function Wa(u,Xe){let fr=!1;for(let Ar=0,_r=u.length-1;Ar<u.length;_r=Ar++){const wr=u[Ar],Kr=u[_r];wr.y>Xe.y!=Kr.y>Xe.y&&Xe.x<(Kr.x-wr.x)*(Xe.y-wr.y)/(Kr.y-wr.y)+wr.x&&(fr=!fr)}return fr}function Qa(u,Xe,fr){const Ar=fr[0],_r=fr[2];if(u.x<Ar.x&&Xe.x<Ar.x||u.x>_r.x&&Xe.x>_r.x||u.y<Ar.y&&Xe.y<Ar.y||u.y>_r.y&&Xe.y>_r.y)return!1;const wr=S(u,Xe,fr[0]);return wr!==S(u,Xe,fr[1])||wr!==S(u,Xe,fr[2])||wr!==S(u,Xe,fr[3])}function to(u,Xe,fr){const Ar=Xe.paint.get(u).value;return"constant"===Ar.kind?Ar.value:fr.programConfigurations.get(Xe.id).getMaxValue(u)}function eo(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function ro(u,Xe,Ar,_r,wr){if(!Xe[0]&&!Xe[1])return u;const Kr=fr.convert(Xe)._mult(wr);"viewport"===Ar&&Kr._rotate(-_r);const In=[];for(let Xe=0;Xe<u.length;Xe++)In.push(u[Xe].sub(Kr));return In}let yg,Ag;wi("CircleBucket",Ua,{omit:["layers"]});var bg={get paint(){return Ag=Ag||new rs({"circle-radius":new Wi(Io.paint_circle["circle-radius"]),"circle-color":new Wi(Io.paint_circle["circle-color"]),"circle-blur":new Wi(Io.paint_circle["circle-blur"]),"circle-opacity":new Wi(Io.paint_circle["circle-opacity"]),"circle-translate":new Ji(Io.paint_circle["circle-translate"]),"circle-translate-anchor":new Ji(Io.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ji(Io.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ji(Io.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wi(Io.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wi(Io.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wi(Io.paint_circle["circle-stroke-opacity"])})},get layout(){return yg=yg||new rs({"circle-sort-key":new Wi(Io.layout_circle["circle-sort-key"])})}},_g=1e-6,vg="undefined"!=typeof Float32Array?Float32Array:Array;function lo(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function uo(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3],In=Xe[4],io=Xe[5],no=Xe[6],oo=Xe[7],so=Xe[8],ao=Xe[9],co=Xe[10],go=Xe[11],ho=Xe[12],Co=Xe[13],Io=Xe[14],xo=Xe[15],Mo=fr[0],Po=fr[1],ss=fr[2],sa=fr[3];return u[0]=Mo*Ar+Po*In+ss*so+sa*ho,u[1]=Mo*_r+Po*io+ss*ao+sa*Co,u[2]=Mo*wr+Po*no+ss*co+sa*Io,u[3]=Mo*Kr+Po*oo+ss*go+sa*xo,u[4]=(Mo=fr[4])*Ar+(Po=fr[5])*In+(ss=fr[6])*so+(sa=fr[7])*ho,u[5]=Mo*_r+Po*io+ss*ao+sa*Co,u[6]=Mo*wr+Po*no+ss*co+sa*Io,u[7]=Mo*Kr+Po*oo+ss*go+sa*xo,u[8]=(Mo=fr[8])*Ar+(Po=fr[9])*In+(ss=fr[10])*so+(sa=fr[11])*ho,u[9]=Mo*_r+Po*io+ss*ao+sa*Co,u[10]=Mo*wr+Po*no+ss*co+sa*Io,u[11]=Mo*Kr+Po*oo+ss*go+sa*xo,u[12]=(Mo=fr[12])*Ar+(Po=fr[13])*In+(ss=fr[14])*so+(sa=fr[15])*ho,u[13]=Mo*_r+Po*io+ss*ao+sa*Co,u[14]=Mo*wr+Po*no+ss*co+sa*Io,u[15]=Mo*Kr+Po*oo+ss*go+sa*xo,u}Math.hypot||(Math.hypot=function(){for(var u=0,Xe=arguments.length;Xe--;)u+=arguments[Xe]*arguments[Xe];return Math.sqrt(u)});var xg,wg=uo;function po(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3];return u[0]=fr[0]*Ar+fr[4]*_r+fr[8]*wr+fr[12]*Kr,u[1]=fr[1]*Ar+fr[5]*_r+fr[9]*wr+fr[13]*Kr,u[2]=fr[2]*Ar+fr[6]*_r+fr[10]*wr+fr[14]*Kr,u[3]=fr[3]*Ar+fr[7]*_r+fr[11]*wr+fr[15]*Kr,u}xg=new vg(4),vg!=Float32Array&&(xg[0]=0,xg[1]=0,xg[2]=0,xg[3]=0);class fo extends is{constructor(u){super(u,bg)}createBucket(u){return new Ua(u)}queryRadius(u){const Xe=u;return to("circle-radius",this,Xe)+to("circle-stroke-width",this,Xe)+eo(this.paint.get("circle-translate"))}queryIntersectsFeature(u,Xe,fr,Ar,_r,wr,Kr,In){const io=ro(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),wr.angle,Kr),no=this.paint.get("circle-radius").evaluate(Xe,fr)+this.paint.get("circle-stroke-width").evaluate(Xe,fr),oo="map"===this.paint.get("circle-pitch-alignment"),so=oo?io:function(u,Xe){return u.map((u=>yo(u,Xe)))}(io,In),ao=oo?no*Kr:no;for(const u of Ar)for(const Xe of u){const u=oo?Xe:yo(Xe,In);let fr=ao;const Ar=po([],[Xe.x,Xe.y,0,1],In);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?fr*=Ar[3]/wr.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(fr*=wr.cameraToCenterDistance/Ar[3]),Na(so,u,fr))return!0}return!1}}function yo(u,Xe){const Ar=po([],[u.x,u.y,0,1],Xe);return new fr(Ar[0]/Ar[3],Ar[1]/Ar[3])}class mo extends Ua{}let Sg;wi("HeatmapBucket",mo,{omit:["layers"]});var kg={get paint(){return Sg=Sg||new rs({"heatmap-radius":new Wi(Io.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wi(Io.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ji(Io.paint_heatmap["heatmap-intensity"]),"heatmap-color":new es(Io.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ji(Io.paint_heatmap["heatmap-opacity"])})}};function vo(u,{width:Xe,height:fr},Ar,_r){if(_r){if(_r instanceof Uint8ClampedArray)_r=new Uint8Array(_r.buffer);else if(_r.length!==Xe*fr*Ar)throw new RangeError(`mismatched image size. expected: ${_r.length} but got: ${Xe*fr*Ar}`)}else _r=new Uint8Array(Xe*fr*Ar);return u.width=Xe,u.height=fr,u.data=_r,u}function bo(u,{width:Xe,height:fr},Ar){if(Xe===u.width&&fr===u.height)return;const _r=vo({},{width:Xe,height:fr},Ar);wo(u,_r,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,Xe),height:Math.min(u.height,fr)},Ar),u.width=Xe,u.height=fr,u.data=_r.data}function wo(u,Xe,fr,Ar,_r,wr){if(0===_r.width||0===_r.height)return Xe;if(_r.width>u.width||_r.height>u.height||fr.x>u.width-_r.width||fr.y>u.height-_r.height)throw new RangeError("out of range source coordinates for image copy");if(_r.width>Xe.width||_r.height>Xe.height||Ar.x>Xe.width-_r.width||Ar.y>Xe.height-_r.height)throw new RangeError("out of range destination coordinates for image copy");const Kr=u.data,In=Xe.data;if(Kr===In)throw new Error("srcData equals dstData, so image is already copied");for(let io=0;io<_r.height;io++){const no=((fr.y+io)*u.width+fr.x)*wr,oo=((Ar.y+io)*Xe.width+Ar.x)*wr;for(let u=0;u<_r.width*wr;u++)In[oo+u]=Kr[no+u]}return Xe}class _o{constructor(u,Xe){vo(this,u,1,Xe)}resize(u){bo(this,u,1)}clone(){return new _o({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,fr,Ar,_r){wo(u,Xe,fr,Ar,_r,1)}}class Ao{constructor(u,Xe){vo(this,u,4,Xe)}resize(u){bo(this,u,4)}replace(u,Xe){Xe?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,fr,Ar,_r){wo(u,Xe,fr,Ar,_r,4)}}function So(u){const Xe={},fr=u.resolution||256,Ar=u.clips?u.clips.length:1,_r=u.image||new Ao({width:fr,height:Ar});if(Math.log(fr)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${fr}`);const s=(fr,Ar,wr)=>{Xe[u.evaluationKey]=wr;const Kr=u.expression.evaluate(Xe);_r.data[fr+Ar+0]=Math.floor(255*Kr.r/Kr.a),_r.data[fr+Ar+1]=Math.floor(255*Kr.g/Kr.a),_r.data[fr+Ar+2]=Math.floor(255*Kr.b/Kr.a),_r.data[fr+Ar+3]=Math.floor(255*Kr.a)};if(u.clips)for(let Xe=0,_r=0;Xe<Ar;++Xe,_r+=4*fr)for(let Ar=0,wr=0;Ar<fr;Ar++,wr+=4){const Kr=Ar/(fr-1),{start:In,end:io}=u.clips[Xe];s(_r,wr,In*(1-Kr)+io*Kr)}else for(let u=0,Xe=0;u<fr;u++,Xe+=4)s(0,Xe,u/(fr-1));return _r}wi("AlphaImage",_o),wi("RGBAImage",Ao);class ko extends is{createBucket(u){return new mo(u)}constructor(u){super(u,kg),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){"heatmap-color"===u&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=So({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}let Bg;var Zg={get paint(){return Bg=Bg||new rs({"hillshade-illumination-direction":new Ji(Io.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ji(Io.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ji(Io.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ji(Io.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ji(Io.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ji(Io.paint_hillshade["hillshade-accent-color"])})}};class zo extends is{constructor(u){super(u,Zg)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}const Gg=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:Rg}=Gg;function Bo(u,Xe,fr=2){const Ar=Xe&&Xe.length,_r=Ar?Xe[0]*fr:u.length;let wr=Vo(u,0,_r,fr,!0);const Kr=[];if(!wr||wr.next===wr.prev)return Kr;let In,io,no;if(Ar&&(wr=function(u,Xe,fr,Ar){const _r=[];for(let fr=0,wr=Xe.length;fr<wr;fr++){const Kr=Vo(u,Xe[fr]*Ar,fr<wr-1?Xe[fr+1]*Ar:u.length,Ar,!1);Kr===Kr.next&&(Kr.steiner=!0),_r.push(qo(Kr))}_r.sort(Oo);for(let u=0;u<_r.length;u++)fr=jo(_r[u],fr);return fr}(u,Xe,wr,fr)),u.length>80*fr){In=1/0,io=1/0;let Xe=-1/0,Ar=-1/0;for(let wr=fr;wr<_r;wr+=fr){const fr=u[wr],_r=u[wr+1];fr<In&&(In=fr),_r<io&&(io=_r),fr>Xe&&(Xe=fr),_r>Ar&&(Ar=_r)}no=Math.max(Xe-In,Ar-io),no=0!==no?32767/no:0}return Fo(wr,Kr,fr,In,io,no,0),Kr}function Vo(u,Xe,fr,Ar,_r){let wr;if(_r===function(u,Xe,fr,Ar){let _r=0;for(let wr=Xe,Kr=fr-Ar;wr<fr;wr+=Ar)_r+=(u[Kr]-u[wr])*(u[wr+1]+u[Kr+1]),Kr=wr;return _r}(u,Xe,fr,Ar)>0)for(let _r=Xe;_r<fr;_r+=Ar)wr=Qo(_r/Ar|0,u[_r],u[_r+1],wr);else for(let _r=fr-Ar;_r>=Xe;_r-=Ar)wr=Qo(_r/Ar|0,u[_r],u[_r+1],wr);return wr&&Ko(wr,wr.next)&&(tl(wr),wr=wr.next),wr}function Eo(u,Xe){if(!u)return u;Xe||(Xe=u);let fr,Ar=u;do{if(fr=!1,Ar.steiner||!Ko(Ar,Ar.next)&&0!==Go(Ar.prev,Ar,Ar.next))Ar=Ar.next;else{if(tl(Ar),Ar=Xe=Ar.prev,Ar===Ar.next)break;fr=!0}}while(fr||Ar!==Xe);return Xe}function Fo(u,Xe,fr,Ar,_r,wr,Kr){if(!u)return;!Kr&&wr&&function(u,Xe,fr,Ar){let _r=u;do{0===_r.z&&(_r.z=Uo(_r.x,_r.y,Xe,fr,Ar)),_r.prevZ=_r.prev,_r.nextZ=_r.next,_r=_r.next}while(_r!==u);_r.prevZ.nextZ=null,_r.prevZ=null,function(u){let Xe,fr=1;do{let Ar,_r=u;u=null;let wr=null;for(Xe=0;_r;){Xe++;let Kr=_r,In=0;for(let u=0;u<fr&&(In++,Kr=Kr.nextZ,Kr);u++);let io=fr;for(;In>0||io>0&&Kr;)0!==In&&(0===io||!Kr||_r.z<=Kr.z)?(Ar=_r,_r=_r.nextZ,In--):(Ar=Kr,Kr=Kr.nextZ,io--),wr?wr.nextZ=Ar:u=Ar,Ar.prevZ=wr,wr=Ar;_r=Kr}wr.nextZ=null,fr*=2}while(Xe>1)}(_r)}(u,Ar,_r,wr);let In=u;for(;u.prev!==u.next;){const io=u.prev,no=u.next;if(wr?$o(u,Ar,_r,wr):To(u))Xe.push(io.i,u.i,no.i),tl(u),u=no.next,In=no.next;else if((u=no)===In){Kr?1===Kr?Fo(u=Lo(Eo(u),Xe),Xe,fr,Ar,_r,wr,2):2===Kr&&Do(u,Xe,fr,Ar,_r,wr):Fo(Eo(u),Xe,fr,Ar,_r,wr,1);break}}}function To(u){const Xe=u.prev,fr=u,Ar=u.next;if(Go(Xe,fr,Ar)>=0)return!1;const _r=Xe.x,wr=fr.x,Kr=Ar.x,In=Xe.y,io=fr.y,no=Ar.y,oo=_r<wr?_r<Kr?_r:Kr:wr<Kr?wr:Kr,so=In<io?In<no?In:no:io<no?io:no,ao=_r>wr?_r>Kr?_r:Kr:wr>Kr?wr:Kr,co=In>io?In>no?In:no:io>no?io:no;let go=Ar.next;for(;go!==Xe;){if(go.x>=oo&&go.x<=ao&&go.y>=so&&go.y<=co&&No(_r,In,wr,io,Kr,no,go.x,go.y)&&Go(go.prev,go,go.next)>=0)return!1;go=go.next}return!0}function $o(u,Xe,fr,Ar){const _r=u.prev,wr=u,Kr=u.next;if(Go(_r,wr,Kr)>=0)return!1;const In=_r.x,io=wr.x,no=Kr.x,oo=_r.y,so=wr.y,ao=Kr.y,co=In<io?In<no?In:no:io<no?io:no,go=oo<so?oo<ao?oo:ao:so<ao?so:ao,ho=In>io?In>no?In:no:io>no?io:no,Co=oo>so?oo>ao?oo:ao:so>ao?so:ao,Io=Uo(co,go,Xe,fr,Ar),xo=Uo(ho,Co,Xe,fr,Ar);let Mo=u.prevZ,Po=u.nextZ;for(;Mo&&Mo.z>=Io&&Po&&Po.z<=xo;){if(Mo.x>=co&&Mo.x<=ho&&Mo.y>=go&&Mo.y<=Co&&Mo!==_r&&Mo!==Kr&&No(In,oo,io,so,no,ao,Mo.x,Mo.y)&&Go(Mo.prev,Mo,Mo.next)>=0)return!1;if(Mo=Mo.prevZ,Po.x>=co&&Po.x<=ho&&Po.y>=go&&Po.y<=Co&&Po!==_r&&Po!==Kr&&No(In,oo,io,so,no,ao,Po.x,Po.y)&&Go(Po.prev,Po,Po.next)>=0)return!1;Po=Po.nextZ}for(;Mo&&Mo.z>=Io;){if(Mo.x>=co&&Mo.x<=ho&&Mo.y>=go&&Mo.y<=Co&&Mo!==_r&&Mo!==Kr&&No(In,oo,io,so,no,ao,Mo.x,Mo.y)&&Go(Mo.prev,Mo,Mo.next)>=0)return!1;Mo=Mo.prevZ}for(;Po&&Po.z<=xo;){if(Po.x>=co&&Po.x<=ho&&Po.y>=go&&Po.y<=Co&&Po!==_r&&Po!==Kr&&No(In,oo,io,so,no,ao,Po.x,Po.y)&&Go(Po.prev,Po,Po.next)>=0)return!1;Po=Po.nextZ}return!0}function Lo(u,Xe){let fr=u;do{const Ar=fr.prev,_r=fr.next.next;!Ko(Ar,_r)&&Xo(Ar,fr,fr.next,_r)&&Jo(Ar,_r)&&Jo(_r,Ar)&&(Xe.push(Ar.i,fr.i,_r.i),tl(fr),tl(fr.next),fr=u=_r),fr=fr.next}while(fr!==u);return Eo(fr)}function Do(u,Xe,fr,Ar,_r,wr){let Kr=u;do{let u=Kr.next.next;for(;u!==Kr.prev;){if(Kr.i!==u.i&&Zo(Kr,u)){let In=Wo(Kr,u);return Kr=Eo(Kr,Kr.next),In=Eo(In,In.next),Fo(Kr,Xe,fr,Ar,_r,wr,0),void Fo(In,Xe,fr,Ar,_r,wr,0)}u=u.next}Kr=Kr.next}while(Kr!==u)}function Oo(u,Xe){return u.x-Xe.x}function jo(u,Xe){const fr=function(u,Xe){let fr=Xe;const Ar=u.x,_r=u.y;let wr,Kr=-1/0;do{if(_r<=fr.y&&_r>=fr.next.y&&fr.next.y!==fr.y){const u=fr.x+(_r-fr.y)*(fr.next.x-fr.x)/(fr.next.y-fr.y);if(u<=Ar&&u>Kr&&(Kr=u,wr=fr.x<fr.next.x?fr:fr.next,u===Ar))return wr}fr=fr.next}while(fr!==Xe);if(!wr)return null;const In=wr,io=wr.x,no=wr.y;let oo=1/0;fr=wr;do{if(Ar>=fr.x&&fr.x>=io&&Ar!==fr.x&&No(_r<no?Ar:Kr,_r,io,no,_r<no?Kr:Ar,_r,fr.x,fr.y)){const Xe=Math.abs(_r-fr.y)/(Ar-fr.x);Jo(fr,u)&&(Xe<oo||Xe===oo&&(fr.x>wr.x||fr.x===wr.x&&Ro(wr,fr)))&&(wr=fr,oo=Xe)}fr=fr.next}while(fr!==In);return wr}(u,Xe);if(!fr)return Xe;const Ar=Wo(fr,u);return Eo(Ar,Ar.next),Eo(fr,fr.next)}function Ro(u,Xe){return Go(u.prev,u,Xe.prev)<0&&Go(Xe.next,u,u.next)<0}function Uo(u,Xe,fr,Ar,_r){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-fr)*_r|0)|u<<8))|u<<4))|u<<2))|u<<1))|(Xe=1431655765&((Xe=858993459&((Xe=252645135&((Xe=16711935&((Xe=(Xe-Ar)*_r|0)|Xe<<8))|Xe<<4))|Xe<<2))|Xe<<1))<<1}function qo(u){let Xe=u,fr=u;do{(Xe.x<fr.x||Xe.x===fr.x&&Xe.y<fr.y)&&(fr=Xe),Xe=Xe.next}while(Xe!==u);return fr}function No(u,Xe,fr,Ar,_r,wr,Kr,In){return(_r-Kr)*(Xe-In)>=(u-Kr)*(wr-In)&&(u-Kr)*(Ar-In)>=(fr-Kr)*(Xe-In)&&(fr-Kr)*(wr-In)>=(_r-Kr)*(Ar-In)}function Zo(u,Xe){return u.next.i!==Xe.i&&u.prev.i!==Xe.i&&!function(u,Xe){let fr=u;do{if(fr.i!==u.i&&fr.next.i!==u.i&&fr.i!==Xe.i&&fr.next.i!==Xe.i&&Xo(fr,fr.next,u,Xe))return!0;fr=fr.next}while(fr!==u);return!1}(u,Xe)&&(Jo(u,Xe)&&Jo(Xe,u)&&function(u,Xe){let fr=u,Ar=!1;const _r=(u.x+Xe.x)/2,wr=(u.y+Xe.y)/2;do{fr.y>wr!=fr.next.y>wr&&fr.next.y!==fr.y&&_r<(fr.next.x-fr.x)*(wr-fr.y)/(fr.next.y-fr.y)+fr.x&&(Ar=!Ar),fr=fr.next}while(fr!==u);return Ar}(u,Xe)&&(Go(u.prev,u,Xe.prev)||Go(u,Xe.prev,Xe))||Ko(u,Xe)&&Go(u.prev,u,u.next)>0&&Go(Xe.prev,Xe,Xe.next)>0)}function Go(u,Xe,fr){return(Xe.y-u.y)*(fr.x-Xe.x)-(Xe.x-u.x)*(fr.y-Xe.y)}function Ko(u,Xe){return u.x===Xe.x&&u.y===Xe.y}function Xo(u,Xe,fr,Ar){const _r=Yo(Go(u,Xe,fr)),wr=Yo(Go(u,Xe,Ar)),Kr=Yo(Go(fr,Ar,u)),In=Yo(Go(fr,Ar,Xe));return _r!==wr&&Kr!==In||!(0!==_r||!Ho(u,fr,Xe))||!(0!==wr||!Ho(u,Ar,Xe))||!(0!==Kr||!Ho(fr,u,Ar))||!(0!==In||!Ho(fr,Xe,Ar))}function Ho(u,Xe,fr){return Xe.x<=Math.max(u.x,fr.x)&&Xe.x>=Math.min(u.x,fr.x)&&Xe.y<=Math.max(u.y,fr.y)&&Xe.y>=Math.min(u.y,fr.y)}function Yo(u){return u>0?1:u<0?-1:0}function Jo(u,Xe){return Go(u.prev,u,u.next)<0?Go(u,Xe,u.next)>=0&&Go(u,u.prev,Xe)>=0:Go(u,Xe,u.prev)<0||Go(u,u.next,Xe)<0}function Wo(u,Xe){const fr=el(u.i,u.x,u.y),Ar=el(Xe.i,Xe.x,Xe.y),_r=u.next,wr=Xe.prev;return u.next=Xe,Xe.prev=u,fr.next=_r,_r.prev=fr,Ar.next=fr,fr.prev=Ar,wr.next=Ar,Ar.prev=wr,Ar}function Qo(u,Xe,fr,Ar){const _r=el(u,Xe,fr);return Ar?(_r.next=Ar.next,_r.prev=Ar,Ar.next.prev=_r,Ar.next=_r):(_r.prev=_r,_r.next=_r),_r}function tl(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function el(u,Xe,fr){return{i:u,x:Xe,y:fr,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function rl(u,Xe,fr){const Ar=fr.patternDependencies;let _r=!1;for(const fr of Xe){const Xe=fr.paint.get(`${u}-pattern`);Xe.isConstant()||(_r=!0);const wr=Xe.constantOr(null);wr&&(_r=!0,Ar[wr.to]=!0,Ar[wr.from]=!0)}return _r}function nl(u,Xe,fr,Ar,_r){const wr=_r.patternDependencies;for(const Kr of Xe){const Xe=Kr.paint.get(`${u}-pattern`).value;if("constant"!==Xe.kind){let u=Xe.evaluate({zoom:Ar-1},fr,{},_r.availableImages),In=Xe.evaluate({zoom:Ar},fr,{},_r.availableImages),io=Xe.evaluate({zoom:Ar+1},fr,{},_r.availableImages);u=u&&u.name?u.name:u,In=In&&In.name?In.name:In,io=io&&io.name?io.name:io,wr[u]=!0,wr[In]=!0,wr[io]=!0,fr.patterns[Kr.id]={min:u,mid:In,max:io}}}return fr}class il{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ks,this.indexArray=new na,this.indexArray2=new ia,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.segments2=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.hasPattern=rl("fill",this.layers,Xe);const Ar=this.layers[0].layout.get("fill-sort-key"),_r=!Ar.isConstant(),wr=[];for(const{feature:Kr,id:In,index:io,sourceLayerIndex:no}of u){const u=this.layers[0]._featureFilter.needGeometry,oo=ja(Kr,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),oo,fr))continue;const so=_r?Ar.evaluate(oo,{},fr,Xe.availableImages):void 0,ao={id:In,properties:Kr.properties,type:Kr.type,sourceLayerIndex:no,index:io,geometry:u?oo.geometry:Oa(Kr),patterns:{},sortKey:so};wr.push(ao)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of wr){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar;if(this.hasPattern){const u=nl("fill",this.layers,Ar,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(Ar,_r,wr,fr,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}addFeatures(u,Xe,fr){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Rg),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,Xe,fr,Ar,_r){for(const u of xr(Xe,500)){let Xe=0;for(const fr of u)Xe+=fr.length;const fr=this.segments.prepareSegment(Xe,this.layoutVertexArray,this.indexArray),Ar=fr.vertexLength,_r=[],wr=[];for(const Xe of u){if(0===Xe.length)continue;Xe!==u[0]&&wr.push(_r.length/2);const fr=this.segments2.prepareSegment(Xe.length,this.layoutVertexArray,this.indexArray2),Ar=fr.vertexLength;this.layoutVertexArray.emplaceBack(Xe[0].x,Xe[0].y),this.indexArray2.emplaceBack(Ar+Xe.length-1,Ar),_r.push(Xe[0].x),_r.push(Xe[0].y);for(let u=1;u<Xe.length;u++)this.layoutVertexArray.emplaceBack(Xe[u].x,Xe[u].y),this.indexArray2.emplaceBack(Ar+u-1,Ar+u),_r.push(Xe[u].x),_r.push(Xe[u].y);fr.vertexLength+=Xe.length,fr.primitiveLength+=Xe.length}const Kr=Bo(_r,wr);for(let u=0;u<Kr.length;u+=3)this.indexArray.emplaceBack(Ar+Kr[u],Ar+Kr[u+1],Ar+Kr[u+2]);fr.vertexLength+=Xe,fr.primitiveLength+=Kr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}}let Vg,Wg;wi("FillBucket",il,{omit:["layers","patternFeatures"]});var Tg={get paint(){return Wg=Wg||new rs({"fill-antialias":new Ji(Io.paint_fill["fill-antialias"]),"fill-opacity":new Wi(Io.paint_fill["fill-opacity"]),"fill-color":new Wi(Io.paint_fill["fill-color"]),"fill-outline-color":new Wi(Io.paint_fill["fill-outline-color"]),"fill-translate":new Ji(Io.paint_fill["fill-translate"]),"fill-translate-anchor":new Ji(Io.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qi(Io.paint_fill["fill-pattern"])})},get layout(){return Vg=Vg||new rs({"fill-sort-key":new Wi(Io.layout_fill["fill-sort-key"])})}};class ll extends is{constructor(u){super(u,Tg)}recalculate(u,Xe){super.recalculate(u,Xe);const fr=this.paint._values["fill-outline-color"];"constant"===fr.value.kind&&void 0===fr.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new il(u)}queryRadius(){return eo(this.paint.get("fill-translate"))}queryIntersectsFeature(u,Xe,fr,Ar,_r,wr,Kr){return Za(ro(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),wr.angle,Kr),Ar)}isTileClipped(){return!0}}const Mg=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Pg=ls([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Jg}=Mg;var zg={},Fg=Xe,Eg=yl;function yl(u,Xe,fr,Ar,_r){this.properties={},this.extent=fr,this.type=0,this._pbf=u,this._geometry=-1,this._keys=Ar,this._values=_r,u.readFields(ml,this,Xe)}function ml(u,Xe,fr){1==u?Xe.id=fr.readVarint():2==u?function(u,Xe){for(var fr=u.readVarint()+u.pos;u.pos<fr;){var Ar=Xe._keys[u.readVarint()],_r=Xe._values[u.readVarint()];Xe.properties[Ar]=_r}}(fr,Xe):3==u?Xe.type=fr.readVarint():4==u&&(Xe._geometry=fr.pos)}function gl(u){for(var Xe,fr,Ar=0,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++)Ar+=((fr=u[Kr]).x-(Xe=u[_r]).x)*(Xe.y+fr.y);return Ar}yl.types=["Unknown","Point","LineString","Polygon"],yl.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe,fr=u.readVarint()+u.pos,Ar=1,_r=0,wr=0,Kr=0,In=[];u.pos<fr;){if(_r<=0){var io=u.readVarint();Ar=7&io,_r=io>>3}if(_r--,1===Ar||2===Ar)wr+=u.readSVarint(),Kr+=u.readSVarint(),1===Ar&&(Xe&&In.push(Xe),Xe=[]),Xe.push(new Fg(wr,Kr));else{if(7!==Ar)throw new Error("unknown command "+Ar);Xe&&Xe.push(Xe[0].clone())}}return Xe&&In.push(Xe),In},yl.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe=u.readVarint()+u.pos,fr=1,Ar=0,_r=0,wr=0,Kr=1/0,In=-1/0,io=1/0,no=-1/0;u.pos<Xe;){if(Ar<=0){var oo=u.readVarint();fr=7&oo,Ar=oo>>3}if(Ar--,1===fr||2===fr)(_r+=u.readSVarint())<Kr&&(Kr=_r),_r>In&&(In=_r),(wr+=u.readSVarint())<io&&(io=wr),wr>no&&(no=wr);else if(7!==fr)throw new Error("unknown command "+fr)}return[Kr,io,In,no]},yl.prototype.toGeoJSON=function(u,Xe,fr){var Ar,_r,wr=this.extent*Math.pow(2,fr),Kr=this.extent*u,In=this.extent*Xe,io=this.loadGeometry(),no=yl.types[this.type];function c(u){for(var Xe=0;Xe<u.length;Xe++){var fr=u[Xe];u[Xe]=[360*(fr.x+Kr)/wr-180,360/Math.PI*Math.atan(Math.exp((180-360*(fr.y+In)/wr)*Math.PI/180))-90]}}switch(this.type){case 1:var oo=[];for(Ar=0;Ar<io.length;Ar++)oo[Ar]=io[Ar][0];c(io=oo);break;case 2:for(Ar=0;Ar<io.length;Ar++)c(io[Ar]);break;case 3:for(io=function(u){var Xe=u.length;if(Xe<=1)return[u];for(var fr,Ar,_r=[],wr=0;wr<Xe;wr++){var Kr=gl(u[wr]);0!==Kr&&(void 0===Ar&&(Ar=Kr<0),Ar===Kr<0?(fr&&_r.push(fr),fr=[u[wr]]):fr.push(u[wr]))}return fr&&_r.push(fr),_r}(io),Ar=0;Ar<io.length;Ar++)for(_r=0;_r<io[Ar].length;_r++)c(io[Ar][_r])}1===io.length?io=io[0]:no="Multi"+no;var so={type:"Feature",geometry:{type:no,coordinates:io},properties:this.properties};return"id"in this&&(so.id=this.id),so};var Xg=Eg,Hg=bl;function bl(u,Xe){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(wl,this,Xe),this.length=this._features.length}function wl(u,Xe,fr){15===u?Xe.version=fr.readVarint():1===u?Xe.name=fr.readString():5===u?Xe.extent=fr.readVarint():2===u?Xe._features.push(fr.pos):3===u?Xe._keys.push(fr.readString()):4===u&&Xe._values.push(function(u){for(var Xe=null,fr=u.readVarint()+u.pos;u.pos<fr;){var Ar=u.readVarint()>>3;Xe=1===Ar?u.readString():2===Ar?u.readFloat():3===Ar?u.readDouble():4===Ar?u.readVarint64():5===Ar?u.readVarint():6===Ar?u.readSVarint():7===Ar?u.readBoolean():null}return Xe}(fr))}bl.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var Xe=this._pbf.readVarint()+this._pbf.pos;return new Xg(this._pbf,Xe,this.extent,this._keys,this._values)};var Kg=Hg;function Al(u,Xe,fr){if(3===u){var Ar=new Kg(fr,fr.readVarint()+fr.pos);Ar.length&&(Xe[Ar.name]=Ar)}}zg.VectorTile=function(u,Xe){this.layers=u.readFields(Al,{},Xe)},zg.VectorTileFeature=Eg,zg.VectorTileLayer=Hg;const Lg=zg.VectorTileFeature.types,Dg=Math.pow(2,13);function Ml(u,Xe,fr,Ar,_r,wr,Kr,In){u.emplaceBack(Xe,fr,2*Math.floor(Ar*Dg)+Kr,_r*Dg*2,wr*Dg*2,Math.round(In))}class Il{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Xs,this.centroidVertexArray=new Zs,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.features=[],this.hasPattern=rl("fill-extrusion",this.layers,Xe);for(const{feature:Ar,id:_r,index:wr,sourceLayerIndex:Kr}of u){const u=this.layers[0]._featureFilter.needGeometry,In=ja(Ar,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),In,fr))continue;const io={id:_r,sourceLayerIndex:Kr,index:wr,geometry:u?In.geometry:Oa(Ar),properties:Ar.properties,type:Ar.type,patterns:{}};this.hasPattern?this.features.push(nl("fill-extrusion",this.layers,io,this.zoom,Xe)):this.addFeature(io,io.geometry,wr,fr,{}),Xe.featureIndex.insert(Ar,io.geometry,wr,Kr,this.index,!0)}}addFeatures(u,Xe,fr){for(const u of this.features){const{geometry:Ar}=u;this.addFeature(u,Ar,u.index,Xe,fr)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Jg),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,Pg.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,Xe,fr,Ar,_r){for(const fr of xr(Xe,500)){const Xe={x:0,y:0,vertexCount:0};let Ar=0;for(const u of fr)Ar+=u.length;let _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const u of fr){if(0===u.length)continue;if(Pl(u))continue;let fr=0;for(let Ar=0;Ar<u.length;Ar++){const wr=u[Ar];if(Ar>=1){const Kr=u[Ar-1];if(!zl(wr,Kr)){_r.vertexLength+4>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const u=wr.sub(Kr)._perp()._unit(),Ar=Kr.dist(wr);fr+Ar>32768&&(fr=0),Ml(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,0,fr),Ml(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,1,fr),Xe.x+=2*wr.x,Xe.y+=2*wr.y,Xe.vertexCount+=2,fr+=Ar,Ml(this.layoutVertexArray,Kr.x,Kr.y,u.x,u.y,0,0,fr),Ml(this.layoutVertexArray,Kr.x,Kr.y,u.x,u.y,0,1,fr),Xe.x+=2*Kr.x,Xe.y+=2*Kr.y,Xe.vertexCount+=2;const In=_r.vertexLength;this.indexArray.emplaceBack(In,In+2,In+1),this.indexArray.emplaceBack(In+1,In+2,In+3),_r.vertexLength+=4,_r.primitiveLength+=2}}}}if(_r.vertexLength+Ar>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(Ar,this.layoutVertexArray,this.indexArray)),"Polygon"!==Lg[u.type])continue;const wr=[],Kr=[],In=_r.vertexLength;for(const u of fr)if(0!==u.length){u!==fr[0]&&Kr.push(wr.length/2);for(let fr=0;fr<u.length;fr++){const Ar=u[fr];Ml(this.layoutVertexArray,Ar.x,Ar.y,0,0,1,1,0),Xe.x+=Ar.x,Xe.y+=Ar.y,Xe.vertexCount+=1,wr.push(Ar.x),wr.push(Ar.y)}}const io=Bo(wr,Kr);for(let u=0;u<io.length;u+=3)this.indexArray.emplaceBack(In+io[u],In+io[u+2],In+io[u+1]);_r.primitiveLength+=io.length/3,_r.vertexLength+=Ar;for(let u=0;u<Xe.vertexCount;u++){const u=Math.floor(Xe.x/Xe.vertexCount),fr=Math.floor(Xe.y/Xe.vertexCount);this.centroidVertexArray.emplaceBack(u,fr)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}}function zl(u,Xe){return u.x===Xe.x&&(u.x<0||u.x>Cg)||u.y===Xe.y&&(u.y<0||u.y>Cg)}function Pl(u){return u.every((u=>u.x<0))||u.every((u=>u.x>Cg))||u.every((u=>u.y<0))||u.every((u=>u.y>Cg))}let Yg;wi("FillExtrusionBucket",Il,{omit:["layers","features"]});var Ng={get paint(){return Yg=Yg||new rs({"fill-extrusion-opacity":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qi(Io["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Vl extends is{constructor(u){super(u,Ng)}createBucket(u){return new Il(u)}queryRadius(){return eo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(u,Xe,Ar,_r,wr,Kr,In,io){const no=ro(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Kr.angle,In),oo=this.paint.get("fill-extrusion-height").evaluate(Xe,Ar),so=this.paint.get("fill-extrusion-base").evaluate(Xe,Ar),ao=function(u,Xe){const Ar=[];for(const _r of u){const u=[_r.x,_r.y,0,1];po(u,u,Xe),Ar.push(new fr(u[0]/u[3],u[1]/u[3]))}return Ar}(no,io),co=function(u,Xe,Ar,_r){const wr=[],Kr=[],In=_r[8]*Xe,io=_r[9]*Xe,no=_r[10]*Xe,oo=_r[11]*Xe,so=_r[8]*Ar,ao=_r[9]*Ar,co=_r[10]*Ar,go=_r[11]*Ar;for(const Xe of u){const u=[],Ar=[];for(const wr of Xe){const Xe=wr.x,Kr=wr.y,ho=_r[0]*Xe+_r[4]*Kr+_r[12],Co=_r[1]*Xe+_r[5]*Kr+_r[13],Io=_r[2]*Xe+_r[6]*Kr+_r[14],xo=_r[3]*Xe+_r[7]*Kr+_r[15],Mo=Io+no,Po=xo+oo,ss=ho+so,sa=Co+ao,aa=Io+co,fa=xo+go,ya=new fr((ho+In)/Po,(Co+io)/Po);ya.z=Mo/Po,u.push(ya);const ol=new fr(ss/fa,sa/fa);ol.z=aa/fa,Ar.push(ol)}wr.push(u),Kr.push(Ar)}return[wr,Kr]}(_r,so,oo,io);return function(u,Xe,fr){let Ar=1/0;Za(fr,Xe)&&(Ar=Fl(fr,Xe[0]));for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r],Kr=u[_r];for(let u=0;u<wr.length-1;u++){const Xe=wr[u],_r=[Xe,wr[u+1],Kr[u+1],Kr[u],Xe];qa(fr,_r)&&(Ar=Math.min(Ar,Fl(fr,_r)))}}return Ar!==1/0&&Ar}(co[0],co[1],ao)}}function El(u,Xe){return u.x*Xe.x+u.y*Xe.y}function Fl(u,Xe){if(1===u.length){let fr=0;const Ar=Xe[fr++];let _r;for(;!_r||Ar.equals(_r);)if(_r=Xe[fr++],!_r)return 1/0;for(;fr<Xe.length;fr++){const wr=Xe[fr],Kr=u[0],In=_r.sub(Ar),io=wr.sub(Ar),no=Kr.sub(Ar),oo=El(In,In),so=El(In,io),ao=El(io,io),co=El(no,In),go=El(no,io),ho=oo*ao-so*so,Co=(ao*co-so*go)/ho,Io=(oo*go-so*co)/ho,xo=Ar.z*(1-Co-Io)+_r.z*Co+wr.z*Io;if(isFinite(xo))return xo}return 1/0}{let u=1/0;for(const fr of Xe)u=Math.min(u,fr.z);return u}}const Og=ls([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:jg}=Og,Ug=ls([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Qg}=Ug,qg=zg.VectorTileFeature.types,$g=Math.cos(Math.PI/180*37.5),nh=Math.pow(2,14)/.5;class Ul{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((u=>{this.gradients[u.id]={}})),this.layoutVertexArray=new Hs,this.layoutVertexArray2=new Ys,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.hasPattern=rl("line",this.layers,Xe);const Ar=this.layers[0].layout.get("line-sort-key"),_r=!Ar.isConstant(),wr=[];for(const{feature:Xe,id:Kr,index:In,sourceLayerIndex:io}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,fr))continue;const oo=_r?Ar.evaluate(no,{},fr):void 0,so={id:Kr,properties:Xe.properties,type:Xe.type,sourceLayerIndex:io,index:In,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:oo};wr.push(so)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of wr){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar;if(this.hasPattern){const u=nl("line",this.layers,Ar,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(Ar,_r,wr,fr,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}addFeatures(u,Xe,fr){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,Qg)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,jg),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,Xe,fr,Ar,_r){const wr=this.layers[0].layout,Kr=wr.get("line-join").evaluate(u,{}),In=wr.get("line-cap"),io=wr.get("line-miter-limit"),no=wr.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const fr of Xe)this.addLine(fr,u,Kr,In,io,no);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}addLine(u,Xe,fr,Ar,_r,wr){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Xe=0;Xe<u.length-1;Xe++)this.totalDistance+=u[Xe].dist(u[Xe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const Kr="Polygon"===qg[Xe.type];let In=u.length;for(;In>=2&&u[In-1].equals(u[In-2]);)In--;let io=0;for(;io<In-1&&u[io].equals(u[io+1]);)io++;if(In<(Kr?3:2))return;"bevel"===fr&&(_r=1.05);const no=this.overscaling<=16?15*Cg/(512*this.overscaling):0,oo=this.segments.prepareSegment(10*In,this.layoutVertexArray,this.indexArray);let so,ao,co,go,ho;this.e1=this.e2=-1,Kr&&(so=u[In-2],ho=u[io].sub(so)._unit()._perp());for(let Xe=io;Xe<In;Xe++){if(co=Xe===In-1?Kr?u[io+1]:void 0:u[Xe+1],co&&u[Xe].equals(co))continue;ho&&(go=ho),so&&(ao=so),so=u[Xe],ho=co?co.sub(so)._unit()._perp():go,go=go||ho;let Co=go.add(ho);0===Co.x&&0===Co.y||Co._unit();const Io=go.x*ho.x+go.y*ho.y,xo=Co.x*ho.x+Co.y*ho.y,Mo=0!==xo?1/xo:1/0,Po=2*Math.sqrt(2-2*xo),ss=xo<$g&&ao&&co,sa=go.x*ho.y-go.y*ho.x>0;if(ss&&Xe>io){const u=so.dist(ao);if(u>2*no){const Xe=so.sub(so.sub(ao)._mult(no/u)._round());this.updateDistance(ao,Xe),this.addCurrentVertex(Xe,go,0,0,oo),ao=Xe}}const aa=ao&&co;let fa=aa?fr:Kr?"butt":Ar;if(aa&&"round"===fa&&(Mo<wr?fa="miter":Mo<=2&&(fa="fakeround")),"miter"===fa&&Mo>_r&&(fa="bevel"),"bevel"===fa&&(Mo>2&&(fa="flipbevel"),Mo<_r&&(fa="miter")),ao&&this.updateDistance(ao,so),"miter"===fa)Co._mult(Mo),this.addCurrentVertex(so,Co,0,0,oo);else if("flipbevel"===fa){if(Mo>100)Co=ho.mult(-1);else{const u=Mo*go.add(ho).mag()/go.sub(ho).mag();Co._perp()._mult(u*(sa?-1:1))}this.addCurrentVertex(so,Co,0,0,oo),this.addCurrentVertex(so,Co.mult(-1),0,0,oo)}else if("bevel"===fa||"fakeround"===fa){const u=-Math.sqrt(Mo*Mo-1),Xe=sa?u:0,fr=sa?0:u;if(ao&&this.addCurrentVertex(so,go,Xe,fr,oo),"fakeround"===fa){const u=Math.round(180*Po/Math.PI/20);for(let Xe=1;Xe<u;Xe++){let fr=Xe/u;if(.5!==fr){const u=fr-.5;fr+=fr*u*(fr-1)*((1.0904+Io*(Io*(3.55645-1.43519*Io)-3.2452))*u*u+(.848013+Io*(.215638*Io-1.06021)))}const Ar=ho.sub(go)._mult(fr)._add(go)._unit()._mult(sa?-1:1);this.addHalfVertex(so,Ar.x,Ar.y,!1,sa,0,oo)}}co&&this.addCurrentVertex(so,ho,-Xe,-fr,oo)}else if("butt"===fa)this.addCurrentVertex(so,Co,0,0,oo);else if("square"===fa){const u=ao?1:-1;this.addCurrentVertex(so,Co,u,u,oo)}else"round"===fa&&(ao&&(this.addCurrentVertex(so,go,0,0,oo),this.addCurrentVertex(so,go,1,1,oo,!0)),co&&(this.addCurrentVertex(so,ho,-1,-1,oo,!0),this.addCurrentVertex(so,ho,0,0,oo)));if(ss&&Xe<In-1){const u=so.dist(co);if(u>2*no){const Xe=so.add(co.sub(so)._mult(no/u)._round());this.updateDistance(so,Xe),this.addCurrentVertex(Xe,ho,0,0,oo),so=Xe}}}}addCurrentVertex(u,Xe,fr,Ar,_r,wr=!1){const Kr=Xe.y*Ar-Xe.x,In=-Xe.y-Xe.x*Ar;this.addHalfVertex(u,Xe.x+Xe.y*fr,Xe.y-Xe.x*fr,wr,!1,fr,_r),this.addHalfVertex(u,Kr,In,wr,!0,-Ar,_r),this.distance>nh/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,Xe,fr,Ar,_r,wr))}addHalfVertex({x:u,y:Xe},fr,Ar,_r,wr,Kr,In){const io=.5*(this.lineClips?this.scaledDistance*(nh-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(_r?1:0),(Xe<<1)+(wr?1:0),Math.round(63*fr)+128,Math.round(63*Ar)+128,1+(0===Kr?0:Kr<0?-1:1)|(63&io)<<2,io>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const no=In.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,no),In.primitiveLength++),wr?this.e2=no:this.e1=no}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,Xe){this.distance+=u.dist(Xe),this.updateScaledDistance()}}let dh,mh;wi("LineBucket",Ul,{omit:["layers","patternFeatures"]});var yh={get paint(){return mh=mh||new rs({"line-opacity":new Wi(Io.paint_line["line-opacity"]),"line-color":new Wi(Io.paint_line["line-color"]),"line-translate":new Ji(Io.paint_line["line-translate"]),"line-translate-anchor":new Ji(Io.paint_line["line-translate-anchor"]),"line-width":new Wi(Io.paint_line["line-width"]),"line-gap-width":new Wi(Io.paint_line["line-gap-width"]),"line-offset":new Wi(Io.paint_line["line-offset"]),"line-blur":new Wi(Io.paint_line["line-blur"]),"line-dasharray":new ts(Io.paint_line["line-dasharray"]),"line-pattern":new Qi(Io.paint_line["line-pattern"]),"line-gradient":new es(Io.paint_line["line-gradient"])})},get layout(){return dh=dh||new rs({"line-cap":new Ji(Io.layout_line["line-cap"]),"line-join":new Wi(Io.layout_line["line-join"]),"line-miter-limit":new Ji(Io.layout_line["line-miter-limit"]),"line-round-limit":new Ji(Io.layout_line["line-round-limit"]),"line-sort-key":new Wi(Io.layout_line["line-sort-key"])})}};class Gl extends Wi{possiblyEvaluate(u,Xe){return Xe=new Ui(Math.floor(Xe.zoom),{now:Xe.now,fadeDuration:Xe.fadeDuration,zoomHistory:Xe.zoomHistory,transition:Xe.transition}),super.possiblyEvaluate(u,Xe)}evaluate(u,Xe,fr,Ar){return Xe=g({},Xe,{zoom:Math.floor(Xe.zoom)}),super.evaluate(u,Xe,fr,Ar)}}let Sh;class Xl extends is{constructor(u){super(u,yh),this.gradientVersion=0,Sh||(Sh=new Gl(yh.paint.properties["line-width"].specification),Sh.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if("line-gradient"===u){const u=this.gradientExpression();this.stepInterpolant=!!function(u){return void 0!==u._styleExpression}(u)&&u._styleExpression.expression instanceof Ae,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,Xe){super.recalculate(u,Xe),this.paint._values["line-floorwidth"]=Sh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Ul(u)}queryRadius(u){const Xe=u,fr=Hl(to("line-width",this,Xe),to("line-gap-width",this,Xe)),Ar=to("line-offset",this,Xe);return fr/2+Math.abs(Ar)+eo(this.paint.get("line-translate"))}queryIntersectsFeature(u,Xe,Ar,_r,wr,Kr,In){const io=ro(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Kr.angle,In),no=In/2*Hl(this.paint.get("line-width").evaluate(Xe,Ar),this.paint.get("line-gap-width").evaluate(Xe,Ar)),oo=this.paint.get("line-offset").evaluate(Xe,Ar);return oo&&(_r=function(u,Xe){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=u[_r],Kr=[];for(let u=0;u<wr.length;u++){const Ar=wr[u-1],_r=wr[u],In=wr[u+1],io=0===u?new fr(0,0):_r.sub(Ar)._unit()._perp(),no=u===wr.length-1?new fr(0,0):In.sub(_r)._unit()._perp(),oo=io._add(no)._unit(),so=oo.x*no.x+oo.y*no.y;0!==so&&oo._mult(1/so),Kr.push(oo._mult(Xe)._add(_r))}Ar.push(Kr)}return Ar}(_r,oo*In)),function(u,Xe,fr){for(let Ar=0;Ar<Xe.length;Ar++){const _r=Xe[Ar];if(u.length>=3)for(let Xe=0;Xe<_r.length;Xe++)if(Wa(u,_r[Xe]))return!0;if(Ga(u,_r,fr))return!0}return!1}(io,_r,no)}isTileClipped(){return!0}}function Hl(u,Xe){return Xe>0?Xe+2*u:u}const Bh=ls([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Zh=ls([{name:"a_projected_pos",components:3,type:"Float32"}],4);ls([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Gh=ls([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ls([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Rh=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vh=ls([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function eu(u,Xe,fr){return u.sections.forEach((u=>{u.text=function(u,Xe,fr){const Ar=Xe.layout.get("text-transform").evaluate(fr,{});return"uppercase"===Ar?u=u.toLocaleUpperCase():"lowercase"===Ar&&(u=u.toLocaleLowerCase()),ig.applyArabicShaping&&(u=ig.applyArabicShaping(u)),u}(u.text,Xe,fr)})),u}ls([{name:"triangle",components:3,type:"Uint16"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ls([{type:"Float32",name:"offsetX"}]),ls([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ls([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Wh={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Th=24,Jh=ou,su=function(u,Xe,fr,Ar,_r){var wr,Kr,In=8*_r-Ar-1,io=(1<<In)-1,no=io>>1,oo=-7,so=_r-1,ao=u[Xe+so];for(so+=-1,wr=ao&(1<<-oo)-1,ao>>=-oo,oo+=In;oo>0;wr=256*wr+u[Xe+so],so+=-1,oo-=8);for(Kr=wr&(1<<-oo)-1,wr>>=-oo,oo+=Ar;oo>0;Kr=256*Kr+u[Xe+so],so+=-1,oo-=8);if(0===wr)wr=1-no;else{if(wr===io)return Kr?NaN:1/0*(ao?-1:1);Kr+=Math.pow(2,Ar),wr-=no}return(ao?-1:1)*Kr*Math.pow(2,wr-Ar)},au=function(u,Xe,fr,Ar,_r,wr){var Kr,In,io,no=8*wr-_r-1,oo=(1<<no)-1,so=oo>>1,ao=23===_r?Math.pow(2,-24)-Math.pow(2,-77):0,co=0,go=Xe<0||0===Xe&&1/Xe<0?1:0;for(Xe=Math.abs(Xe),isNaN(Xe)||Xe===1/0?(In=isNaN(Xe)?1:0,Kr=oo):(Kr=Math.floor(Math.log(Xe)/Math.LN2),Xe*(io=Math.pow(2,-Kr))<1&&(Kr--,io*=2),(Xe+=Kr+so>=1?ao/io:ao*Math.pow(2,1-so))*io>=2&&(Kr++,io/=2),Kr+so>=oo?(In=0,Kr=oo):Kr+so>=1?(In=(Xe*io-1)*Math.pow(2,_r),Kr+=so):(In=Xe*Math.pow(2,so-1)*Math.pow(2,_r),Kr=0));_r>=8;u[fr+co]=255&In,co+=1,In/=256,_r-=8);for(Kr=Kr<<_r|In,no+=_r;no>0;u[fr+co]=255&Kr,co+=1,Kr/=256,no-=8);u[fr+co-1]|=128*go};function ou(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}ou.Varint=0,ou.Fixed64=1,ou.Bytes=2,ou.Fixed32=5;var Fh=4294967296,Eh=1/Fh,Xh="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function hu(u){return u.type===ou.Bytes?u.readVarint()+u.pos:u.pos+1}function pu(u,Xe,fr){return fr?4294967296*Xe+(u>>>0):4294967296*(Xe>>>0)+(u>>>0)}function fu(u,Xe,fr){var Ar=Xe<=16383?1:Xe<=2097151?2:Xe<=268435455?3:Math.floor(Math.log(Xe)/(7*Math.LN2));fr.realloc(Ar);for(var _r=fr.pos-1;_r>=u;_r--)fr.buf[_r+Ar]=fr.buf[_r]}function du(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeVarint(u[fr])}function yu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSVarint(u[fr])}function mu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFloat(u[fr])}function gu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeDouble(u[fr])}function xu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeBoolean(u[fr])}function vu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFixed32(u[fr])}function bu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSFixed32(u[fr])}function wu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFixed64(u[fr])}function _u(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSFixed64(u[fr])}function Au(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+16777216*u[Xe+3]}function Su(u,Xe,fr){u[fr]=Xe,u[fr+1]=Xe>>>8,u[fr+2]=Xe>>>16,u[fr+3]=Xe>>>24}function ku(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+(u[Xe+3]<<24)}ou.prototype={destroy:function(){this.buf=null},readFields:function(u,Xe,fr){for(fr=fr||this.length;this.pos<fr;){var Ar=this.readVarint(),_r=Ar>>3,wr=this.pos;this.type=7&Ar,u(_r,Xe,this),this.pos===wr&&this.skip(Ar)}return Xe},readMessage:function(u,Xe){return this.readFields(u,Xe,this.readVarint()+this.pos)},readFixed32:function(){var u=Au(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=ku(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Au(this.buf,this.pos)+Au(this.buf,this.pos+4)*Fh;return this.pos+=8,u},readSFixed64:function(){var u=Au(this.buf,this.pos)+ku(this.buf,this.pos+4)*Fh;return this.pos+=8,u},readFloat:function(){var u=su(this.buf,this.pos,0,23,4);return this.pos+=4,u},readDouble:function(){var u=su(this.buf,this.pos,0,52,8);return this.pos+=8,u},readVarint:function(u){var Xe,fr,Ar=this.buf;return Xe=127&(fr=Ar[this.pos++]),fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<7,fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<14,fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<21,fr<128?Xe:function(u,Xe,fr){var Ar,_r,wr=fr.buf;if(Ar=(112&(_r=wr[fr.pos++]))>>4,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<3,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<10,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<17,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<24,_r<128)return pu(u,Ar,Xe);if(Ar|=(1&(_r=wr[fr.pos++]))<<31,_r<128)return pu(u,Ar,Xe);throw new Error("Expected varint not more than 10 bytes")}(Xe|=(15&(fr=Ar[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var u=this.readVarint()+this.pos,Xe=this.pos;return this.pos=u,u-Xe>=12&&Xh?function(u,Xe,fr){return Xh.decode(u.subarray(Xe,fr))}(this.buf,Xe,u):function(u,Xe,fr){for(var Ar="",_r=Xe;_r<fr;){var wr,Kr,In,io=u[_r],no=null,oo=io>239?4:io>223?3:io>191?2:1;if(_r+oo>fr)break;1===oo?io<128&&(no=io):2===oo?128==(192&(wr=u[_r+1]))&&(no=(31&io)<<6|63&wr)<=127&&(no=null):3===oo?(Kr=u[_r+2],128==(192&(wr=u[_r+1]))&&128==(192&Kr)&&((no=(15&io)<<12|(63&wr)<<6|63&Kr)<=2047||no>=55296&&no<=57343)&&(no=null)):4===oo&&(Kr=u[_r+2],In=u[_r+3],128==(192&(wr=u[_r+1]))&&128==(192&Kr)&&128==(192&In)&&((no=(15&io)<<18|(63&wr)<<12|(63&Kr)<<6|63&In)<=65535||no>=1114112)&&(no=null)),null===no?(no=65533,oo=1):no>65535&&(no-=65536,Ar+=String.fromCharCode(no>>>10&1023|55296),no=56320|1023&no),Ar+=String.fromCharCode(no),_r+=oo}return Ar}(this.buf,Xe,u)},readBytes:function(){var u=this.readVarint()+this.pos,Xe=this.buf.subarray(this.pos,u);return this.pos=u,Xe},readPackedVarint:function(u,Xe){if(this.type!==ou.Bytes)return u.push(this.readVarint(Xe));var fr=hu(this);for(u=u||[];this.pos<fr;)u.push(this.readVarint(Xe));return u},readPackedSVarint:function(u){if(this.type!==ou.Bytes)return u.push(this.readSVarint());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSVarint());return u},readPackedBoolean:function(u){if(this.type!==ou.Bytes)return u.push(this.readBoolean());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readBoolean());return u},readPackedFloat:function(u){if(this.type!==ou.Bytes)return u.push(this.readFloat());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFloat());return u},readPackedDouble:function(u){if(this.type!==ou.Bytes)return u.push(this.readDouble());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readDouble());return u},readPackedFixed32:function(u){if(this.type!==ou.Bytes)return u.push(this.readFixed32());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed32());return u},readPackedSFixed32:function(u){if(this.type!==ou.Bytes)return u.push(this.readSFixed32());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed32());return u},readPackedFixed64:function(u){if(this.type!==ou.Bytes)return u.push(this.readFixed64());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed64());return u},readPackedSFixed64:function(u){if(this.type!==ou.Bytes)return u.push(this.readSFixed64());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed64());return u},skip:function(u){var Xe=7&u;if(Xe===ou.Varint)for(;this.buf[this.pos++]>127;);else if(Xe===ou.Bytes)this.pos=this.readVarint()+this.pos;else if(Xe===ou.Fixed32)this.pos+=4;else{if(Xe!==ou.Fixed64)throw new Error("Unimplemented type: "+Xe);this.pos+=8}},writeTag:function(u,Xe){this.writeVarint(u<<3|Xe)},realloc:function(u){for(var Xe=this.length||16;Xe<this.pos+u;)Xe*=2;if(Xe!==this.length){var fr=new Uint8Array(Xe);fr.set(this.buf),this.buf=fr,this.length=Xe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(u){this.realloc(4),Su(this.buf,u,this.pos),this.pos+=4},writeSFixed32:function(u){this.realloc(4),Su(this.buf,u,this.pos),this.pos+=4},writeFixed64:function(u){this.realloc(8),Su(this.buf,-1&u,this.pos),Su(this.buf,Math.floor(u*Eh),this.pos+4),this.pos+=8},writeSFixed64:function(u){this.realloc(8),Su(this.buf,-1&u,this.pos),Su(this.buf,Math.floor(u*Eh),this.pos+4),this.pos+=8},writeVarint:function(u){(u=+u||0)>268435455||u<0?function(u,Xe){var fr,Ar;if(u>=0?(fr=u%4294967296|0,Ar=u/4294967296|0):(Ar=~(-u/4294967296),4294967295^(fr=~(-u%4294967296))?fr=fr+1|0:(fr=0,Ar=Ar+1|0)),u>=0x10000000000000000||u<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");Xe.realloc(10),function(u,Xe,fr){fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,fr.buf[fr.pos]=127&(u>>>=7)}(fr,0,Xe),function(u,Xe){var fr=(7&u)<<4;Xe.buf[Xe.pos++]|=fr|((u>>>=3)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u)))))}(Ar,Xe)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(Boolean(u))},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var Xe=this.pos;this.pos=function(u,Xe,fr){for(var Ar,_r,wr=0;wr<Xe.length;wr++){if((Ar=Xe.charCodeAt(wr))>55295&&Ar<57344){if(!_r){Ar>56319||wr+1===Xe.length?(u[fr++]=239,u[fr++]=191,u[fr++]=189):_r=Ar;continue}if(Ar<56320){u[fr++]=239,u[fr++]=191,u[fr++]=189,_r=Ar;continue}Ar=_r-55296<<10|Ar-56320|65536,_r=null}else _r&&(u[fr++]=239,u[fr++]=191,u[fr++]=189,_r=null);Ar<128?u[fr++]=Ar:(Ar<2048?u[fr++]=Ar>>6|192:(Ar<65536?u[fr++]=Ar>>12|224:(u[fr++]=Ar>>18|240,u[fr++]=Ar>>12&63|128),u[fr++]=Ar>>6&63|128),u[fr++]=63&Ar|128)}return fr}(this.buf,u,this.pos);var fr=this.pos-Xe;fr>=128&&fu(Xe,fr,this),this.pos=Xe-1,this.writeVarint(fr),this.pos+=fr},writeFloat:function(u){this.realloc(4),au(this.buf,u,this.pos,0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),au(this.buf,u,this.pos,0,52,8),this.pos+=8},writeBytes:function(u){var Xe=u.length;this.writeVarint(Xe),this.realloc(Xe);for(var fr=0;fr<Xe;fr++)this.buf[this.pos++]=u[fr]},writeRawMessage:function(u,Xe){this.pos++;var fr=this.pos;u(Xe,this);var Ar=this.pos-fr;Ar>=128&&fu(fr,Ar,this),this.pos=fr-1,this.writeVarint(Ar),this.pos+=Ar},writeMessage:function(u,Xe,fr){this.writeTag(u,ou.Bytes),this.writeRawMessage(Xe,fr)},writePackedVarint:function(u,Xe){Xe.length&&this.writeMessage(u,du,Xe)},writePackedSVarint:function(u,Xe){Xe.length&&this.writeMessage(u,yu,Xe)},writePackedBoolean:function(u,Xe){Xe.length&&this.writeMessage(u,xu,Xe)},writePackedFloat:function(u,Xe){Xe.length&&this.writeMessage(u,mu,Xe)},writePackedDouble:function(u,Xe){Xe.length&&this.writeMessage(u,gu,Xe)},writePackedFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,vu,Xe)},writePackedSFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,bu,Xe)},writePackedFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,wu,Xe)},writePackedSFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,_u,Xe)},writeBytesField:function(u,Xe){this.writeTag(u,ou.Bytes),this.writeBytes(Xe)},writeFixed32Field:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeFixed32(Xe)},writeSFixed32Field:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeSFixed32(Xe)},writeFixed64Field:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeFixed64(Xe)},writeSFixed64Field:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeSFixed64(Xe)},writeVarintField:function(u,Xe){this.writeTag(u,ou.Varint),this.writeVarint(Xe)},writeSVarintField:function(u,Xe){this.writeTag(u,ou.Varint),this.writeSVarint(Xe)},writeStringField:function(u,Xe){this.writeTag(u,ou.Bytes),this.writeString(Xe)},writeFloatField:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeFloat(Xe)},writeDoubleField:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeDouble(Xe)},writeBooleanField:function(u,Xe){this.writeVarintField(u,Boolean(Xe))}};var Hh=r(Jh);const Kh=3;function zu(u,Xe,fr){1===u&&fr.readMessage(Pu,Xe)}function Pu(u,Xe,fr){if(3===u){const{id:u,bitmap:Ar,width:_r,height:wr,left:Kr,top:In,advance:io}=fr.readMessage(Cu,{});Xe.push({id:u,bitmap:new _o({width:_r+2*Kh,height:wr+2*Kh},Ar),metrics:{width:_r,height:wr,left:Kr,top:In,advance:io}})}}function Cu(u,Xe,fr){1===u?Xe.id=fr.readVarint():2===u?Xe.bitmap=fr.readBytes():3===u?Xe.width=fr.readVarint():4===u?Xe.height=fr.readVarint():5===u?Xe.left=fr.readSVarint():6===u?Xe.top=fr.readSVarint():7===u&&(Xe.advance=fr.readVarint())}const Lh=Kh;function Vu(u){let Xe=0,fr=0;for(const Ar of u)Xe+=Ar.w*Ar.h,fr=Math.max(fr,Ar.w);u.sort(((u,Xe)=>Xe.h-u.h));const Ar=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(Xe/.95)),fr),h:1/0}];let _r=0,wr=0;for(const Xe of u)for(let u=Ar.length-1;u>=0;u--){const fr=Ar[u];if(!(Xe.w>fr.w||Xe.h>fr.h)){if(Xe.x=fr.x,Xe.y=fr.y,wr=Math.max(wr,Xe.y+Xe.h),_r=Math.max(_r,Xe.x+Xe.w),Xe.w===fr.w&&Xe.h===fr.h){const Xe=Ar.pop();u<Ar.length&&(Ar[u]=Xe)}else Xe.h===fr.h?(fr.x+=Xe.w,fr.w-=Xe.w):Xe.w===fr.w?(fr.y+=Xe.h,fr.h-=Xe.h):(Ar.push({x:fr.x+Xe.w,y:fr.y,w:fr.w-Xe.w,h:Xe.h}),fr.y+=Xe.h,fr.h-=Xe.h);break}}return{w:_r,h:wr,fill:Xe/(_r*wr)||0}}const Dh=1;class Fu{constructor(u,{pixelRatio:Xe,version:fr,stretchX:Ar,stretchY:_r,content:wr,textFitWidth:Kr,textFitHeight:In}){this.paddedRect=u,this.pixelRatio=Xe,this.stretchX=Ar,this.stretchY=_r,this.content=wr,this.version=fr,this.textFitWidth=Kr,this.textFitHeight=In}get tl(){return[this.paddedRect.x+Dh,this.paddedRect.y+Dh]}get br(){return[this.paddedRect.x+this.paddedRect.w-Dh,this.paddedRect.y+this.paddedRect.h-Dh]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Dh)/this.pixelRatio,(this.paddedRect.h-2*Dh)/this.pixelRatio]}}class Tu{constructor(u,Xe){const fr={},Ar={};this.haveRenderCallbacks=[];const _r=[];this.addImages(u,fr,_r),this.addImages(Xe,Ar,_r);const{w:wr,h:Kr}=Vu(_r),In=new Ao({width:wr||1,height:Kr||1});for(const Xe in u){const Ar=u[Xe],_r=fr[Xe].paddedRect;Ao.copy(Ar.data,In,{x:0,y:0},{x:_r.x+Dh,y:_r.y+Dh},Ar.data)}for(const u in Xe){const fr=Xe[u],_r=Ar[u].paddedRect,wr=_r.x+Dh,Kr=_r.y+Dh,io=fr.data.width,no=fr.data.height;Ao.copy(fr.data,In,{x:0,y:0},{x:wr,y:Kr},fr.data),Ao.copy(fr.data,In,{x:0,y:no-1},{x:wr,y:Kr-1},{width:io,height:1}),Ao.copy(fr.data,In,{x:0,y:0},{x:wr,y:Kr+no},{width:io,height:1}),Ao.copy(fr.data,In,{x:io-1,y:0},{x:wr-1,y:Kr},{width:1,height:no}),Ao.copy(fr.data,In,{x:0,y:0},{x:wr+io,y:Kr},{width:1,height:no})}this.image=In,this.iconPositions=fr,this.patternPositions=Ar}addImages(u,Xe,fr){for(const Ar in u){const _r=u[Ar],wr={x:0,y:0,w:_r.data.width+2*Dh,h:_r.data.height+2*Dh};fr.push(wr),Xe[Ar]=new Fu(wr,_r),_r.hasRenderCallback&&this.haveRenderCallbacks.push(Ar)}}patchUpdatedImages(u,Xe){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const fr in u.updatedImages)this.patchUpdatedImage(this.iconPositions[fr],u.getImage(fr),Xe),this.patchUpdatedImage(this.patternPositions[fr],u.getImage(fr),Xe)}patchUpdatedImage(u,Xe,fr){if(!u||!Xe)return;if(u.version===Xe.version)return;u.version=Xe.version;const[Ar,_r]=u.tl;fr.update(Xe.data,void 0,{x:Ar,y:_r})}}var Yh;wi("ImagePosition",Fu),wi("ImageAtlas",Tu),u.ah=void 0,(Yh=u.ah||(u.ah={}))[Yh.none=0]="none",Yh[Yh.horizontal=1]="horizontal",Yh[Yh.vertical=2]="vertical",Yh[Yh.horizontalOnly=3]="horizontalOnly";const Nh=-17;class Du{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,Xe){const fr=new Du;return fr.scale=u||1,fr.fontStack=Xe,fr}static forImage(u){const Xe=new Du;return Xe.imageName=u,Xe}}class Ou{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,Xe){const fr=new Ou;for(let Ar=0;Ar<u.sections.length;Ar++){const _r=u.sections[Ar];_r.image?fr.addImageSection(_r):fr.addTextSection(_r,Xe)}return fr}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=function(u){let Xe="";for(let fr=0;fr<u.length;fr++){const Ar=u.charCodeAt(fr+1)||null,_r=u.charCodeAt(fr-1)||null;Xe+=Ar&&$i(Ar)&&!Wh[u[fr+1]]||_r&&$i(_r)&&!Wh[u[fr-1]]||!Wh[u[fr]]?u[fr]:Wh[u[fr]]}return Xe}(this.text)}trim(){let u=0;for(let Xe=0;Xe<this.text.length&&Oh[this.text.charCodeAt(Xe)];Xe++)u++;let Xe=this.text.length;for(let fr=this.text.length-1;fr>=0&&fr>=u&&Oh[this.text.charCodeAt(fr)];fr--)Xe--;this.text=this.text.substring(u,Xe),this.sectionIndex=this.sectionIndex.slice(u,Xe)}substring(u,Xe){const fr=new Ou;return fr.text=this.text.substring(u,Xe),fr.sectionIndex=this.sectionIndex.slice(u,Xe),fr.sections=this.sections,fr}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((u,Xe)=>Math.max(u,this.sections[Xe].scale)),0)}addTextSection(u,Xe){this.text+=u.text,this.sections.push(Du.forText(u.scale,u.fontStack||Xe));const fr=this.sections.length-1;for(let Xe=0;Xe<u.text.length;++Xe)this.sectionIndex.push(fr)}addImageSection(u){const Xe=u.image?u.image.name:"";if(0===Xe.length)return void A("Can't add FormattedSection with an empty image.");const fr=this.getNextImageSectionCharCode();fr?(this.text+=String.fromCharCode(fr),this.sections.push(Du.forImage(Xe)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function ju(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=Ou.fromFeature(Xe,wr);let Io;ao===u.ah.vertical&&Co.verticalizePunctuation();const{processBidirectionalText:xo,processStyledBidirectionalText:Mo}=ig;if(xo&&1===Co.sections.length){Io=[];const u=xo(Co.toString(),Hu(Co,oo,Kr,fr,_r,go));for(const Xe of u){const u=new Ou;u.text=Xe,u.sections=Co.sections;for(let fr=0;fr<Xe.length;fr++)u.sectionIndex.push(0);Io.push(u)}}else if(Mo){Io=[];const u=Mo(Co.text,Co.sectionIndex,Hu(Co,oo,Kr,fr,_r,go));for(const Xe of u){const u=new Ou;u.text=Xe[0],u.sectionIndex=Xe[1],u.sections=Co.sections,Io.push(u)}}else Io=function(u,Xe){const fr=[],Ar=u.text;let _r=0;for(const Ar of Xe)fr.push(u.substring(_r,Ar)),_r=Ar;return _r<Ar.length&&fr.push(u.substring(_r,Ar.length)),fr}(Co,Hu(Co,oo,Kr,fr,_r,go));const Po=[],ss={positionedLines:Po,text:Co.toString(),top:so[1],bottom:so[1],left:so[0],right:so[0],writingMode:ao,iconsInText:!1,verticalizable:!1};return function(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){let co=0,go=Nh,ho=0,Co=0;const Io="right"===io?1:"left"===io?0:.5;let xo=0;for(const In of wr){In.trim();const wr=In.getMaxScale(),io=(wr-1)*Th,Po={positionedGlyphs:[],lineOffset:0};Xe.positionedLines[xo]=Po;const ss=Po.positionedGlyphs;let sa=0;if(!In.length()){go+=Kr,++xo;continue}for(let Kr=0;Kr<In.length();Kr++){const ho=In.getSection(Kr),Co=In.getSectionIndex(Kr),Io=In.getCharCode(Kr);let xo=0,Po=null,aa=null,fa=null,ya=Th;const ol=!(no===u.ah.horizontal||!so&&!Ti(Io)||so&&(Oh[Io]||(Mo=Io,/\p{sc=Arab}/u.test(String.fromCodePoint(Mo)))));if(ho.imageName){const u=_r[ho.imageName];if(!u)continue;fa=ho.imageName,Xe.iconsInText=Xe.iconsInText||!0,aa=u.paddedRect;const fr=u.displaySize;ho.scale=ho.scale*Th/ao,Po={width:fr[0],height:fr[1],left:Dh,top:-Lh,advance:ol?fr[1]:fr[0]},xo=io+(Th-fr[1]*ho.scale),ya=Po.advance;const Ar=ol?fr[0]*ho.scale-Th*wr:fr[1]*ho.scale-Th*wr;Ar>0&&Ar>sa&&(sa=Ar)}else{const u=Ar[ho.fontStack],Xe=u&&u[Io];if(Xe&&Xe.rect)aa=Xe.rect,Po=Xe.metrics;else{const u=fr[ho.fontStack],Xe=u&&u[Io];if(!Xe)continue;Po=Xe.metrics}xo=(wr-ho.scale)*Th}ol?(Xe.verticalizable=!0,ss.push({glyph:Io,imageName:fa,x:co,y:go+xo,vertical:ol,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:Co,metrics:Po,rect:aa}),co+=ya*ho.scale+oo):(ss.push({glyph:Io,imageName:fa,x:co,y:go+xo,vertical:ol,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:Co,metrics:Po,rect:aa}),co+=Po.advance*ho.scale+oo)}0!==ss.length&&(ho=Math.max(co-oo,ho),Ju(ss,0,ss.length-1,Io,sa)),co=0;const aa=Kr*wr+sa;Po.lineOffset=Math.max(sa,io),go+=aa,Co=Math.max(aa,Co),++xo}var Mo;const Po=go-Nh,{horizontalAlign:ss,verticalAlign:sa}=Yu(In);(function(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=(Xe-fr)*_r;let oo=0;oo=wr!==Kr?-In*Ar-Nh:(-Ar*io+.5)*Kr;for(const Xe of u)for(const u of Xe.positionedGlyphs)u.x+=no,u.y+=oo})(Xe.positionedLines,Io,ss,sa,ho,Co,Kr,Po,wr.length),Xe.top+=-sa*Po,Xe.bottom=Xe.top+Po,Xe.left+=-ss*ho,Xe.right=Xe.left+ho}(ss,fr,Ar,_r,Io,In,io,no,ao,oo,co,ho),!function(u){for(const Xe of u)if(0!==Xe.positionedGlyphs.length)return!1;return!0}(Po)&&ss}const Oh={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},jh={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Uh={40:!0};function Nu(u,Xe,fr,Ar,_r,wr){if(Xe.imageName){const u=Ar[Xe.imageName];return u?u.displaySize[0]*Xe.scale*Th/wr+_r:0}{const Ar=fr[Xe.fontStack],wr=Ar&&Ar[u];return wr?wr.metrics.advance*Xe.scale+_r:0}}function Zu(u,Xe,fr,Ar){const _r=Math.pow(u-Xe,2);return Ar?u<Xe?_r/2:2*_r:_r+Math.abs(fr)*fr}function Gu(u,Xe,fr){let Ar=0;return 10===u&&(Ar-=1e4),fr&&(Ar+=150),40!==u&&65288!==u||(Ar+=50),41!==Xe&&65289!==Xe||(Ar+=50),Ar}function Ku(u,Xe,fr,Ar,_r,wr){let Kr=null,In=Zu(Xe,fr,_r,wr);for(const u of Ar){const Ar=Zu(Xe-u.x,fr,_r,wr)+u.badness;Ar<=In&&(Kr=u,In=Ar)}return{index:u,x:Xe,priorBreak:Kr,badness:In}}function Xu(u){return u?Xu(u.priorBreak).concat(u.index):[]}function Hu(u,Xe,fr,Ar,_r,wr){if(!u)return[];const Kr=[],In=function(u,Xe,fr,Ar,_r,wr){let Kr=0;for(let fr=0;fr<u.length();fr++){const In=u.getSection(fr);Kr+=Nu(u.getCharCode(fr),In,Ar,_r,Xe,wr)}return Kr/Math.max(1,Math.ceil(Kr/fr))}(u,Xe,fr,Ar,_r,wr),io=u.text.indexOf("​")>=0;let no=0;for(let fr=0;fr<u.length();fr++){const so=u.getSection(fr),ao=u.getCharCode(fr);if(Oh[ao]||(no+=Nu(ao,so,Ar,_r,Xe,wr)),fr<u.length()-1){const Xe=!((oo=ao)<11904)&&(!!vc["CJK Compatibility Forms"](oo)||!!vc["CJK Compatibility"](oo)||!!vc["CJK Strokes"](oo)||!!vc["CJK Symbols and Punctuation"](oo)||!!vc["Enclosed CJK Letters and Months"](oo)||!!vc["Halfwidth and Fullwidth Forms"](oo)||!!vc["Ideographic Description Characters"](oo)||!!vc["Vertical Forms"](oo)||tg.test(String.fromCodePoint(oo)));(jh[ao]||Xe||so.imageName||fr!==u.length()-2&&Uh[u.getCharCode(fr+1)])&&Kr.push(Ku(fr+1,no,In,Kr,Gu(ao,u.getCharCode(fr+1),Xe&&io),!1))}}var oo;return Xu(Ku(u.length(),no,In,Kr,0,!0))}function Yu(u){let Xe=.5,fr=.5;switch(u){case"right":case"top-right":case"bottom-right":Xe=1;break;case"left":case"top-left":case"bottom-left":Xe=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":fr=1;break;case"top":case"top-right":case"top-left":fr=0}return{horizontalAlign:Xe,verticalAlign:fr}}function Ju(u,Xe,fr,Ar,_r){if(!Ar&&!_r)return;const wr=u[fr],Kr=(u[fr].x+wr.metrics.advance*wr.scale)*Ar;for(let Ar=Xe;Ar<=fr;Ar++)u[Ar].x-=Kr,u[Ar].y+=_r}function Wu(u,Xe,fr){const{horizontalAlign:Ar,verticalAlign:_r}=Yu(fr),wr=Xe[0]-u.displaySize[0]*Ar,Kr=Xe[1]-u.displaySize[1]*_r;return{image:u,top:Kr,bottom:Kr+u.displaySize[1],left:wr,right:wr+u.displaySize[0]}}function Qu(u){var Xe,fr;let Ar=u.left,_r=u.top,wr=u.right-Ar,Kr=u.bottom-_r;const In=null!==(Xe=u.image.textFitWidth)&&void 0!==Xe?Xe:"stretchOrShrink",io=null!==(fr=u.image.textFitHeight)&&void 0!==fr?fr:"stretchOrShrink",no=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if("proportional"===io){if("stretchOnly"===In&&wr/Kr<no||"proportional"===In){const u=Math.ceil(Kr*no);Ar*=u/wr,wr=u}}else if("proportional"===In&&"stretchOnly"===io&&0!==no&&wr/Kr>no){const u=Math.ceil(wr/no);_r*=u/Kr,Kr=u}return{x1:Ar,y1:_r,x2:Ar+wr,y2:_r+Kr}}function tc(u,Xe,fr,Ar,_r,wr){const Kr=u.image;let In;if(Kr.content){const u=Kr.content,Xe=Kr.pixelRatio||1;In=[u[0]/Xe,u[1]/Xe,Kr.displaySize[0]-u[2]/Xe,Kr.displaySize[1]-u[3]/Xe]}const io=Xe.left*wr,no=Xe.right*wr;let oo,so,ao,co;"width"===fr||"both"===fr?(co=_r[0]+io-Ar[3],so=_r[0]+no+Ar[1]):(co=_r[0]+(io+no-Kr.displaySize[0])/2,so=co+Kr.displaySize[0]);const go=Xe.top*wr,ho=Xe.bottom*wr;return"height"===fr||"both"===fr?(oo=_r[1]+go-Ar[0],ao=_r[1]+ho+Ar[2]):(oo=_r[1]+(go+ho-Kr.displaySize[1])/2,ao=oo+Kr.displaySize[1]),{image:Kr,top:oo,right:so,bottom:ao,left:co,collisionPadding:In}}const Qh=255,qh=128,$h=Qh*qh;function ic(u,Xe){const{expression:fr}=Xe;if("constant"===fr.kind)return{kind:"constant",layoutSize:fr.evaluate(new Ui(u+1))};if("source"===fr.kind)return{kind:"source"};{const{zoomStops:Xe,interpolationType:Ar}=fr;let _r=0;for(;_r<Xe.length&&Xe[_r]<=u;)_r++;_r=Math.max(0,_r-1);let wr=_r;for(;wr<Xe.length&&Xe[wr]<u+1;)wr++;wr=Math.min(Xe.length-1,wr);const Kr=Xe[_r],In=Xe[wr];return"composite"===fr.kind?{kind:"composite",minZoom:Kr,maxZoom:In,interpolationType:Ar}:{kind:"camera",minZoom:Kr,maxZoom:In,minSize:fr.evaluate(new Ui(Kr)),maxSize:fr.evaluate(new Ui(In)),interpolationType:Ar}}}function sc(u,Xe,fr){let Ar="never";const _r=u.get(Xe);return _r?Ar=_r:u.get(fr)&&(Ar="always"),Ar}const tu=zg.VectorTileFeature.types,iu=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function lc(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=In?Math.min($h,Math.round(In[0])):0,go=In?Math.min($h,Math.round(In[1])):0;u.emplaceBack(Xe,fr,Math.round(32*Ar),Math.round(32*_r),wr,Kr,(co<<1)+(io?1:0),go,16*no,16*oo,256*so,256*ao)}function uc(u,Xe,fr){u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr)}function cc(u){for(const Xe of u.sections)if(ji(Xe.text))return!0;return!1}class hc{constructor(u){this.layoutVertexArray=new Ws,this.indexArray=new na,this.programConfigurations=u,this.segments=new oa,this.dynamicLayoutVertexArray=new Qs,this.opacityVertexArray=new ta,this.hasVisibleVertices=!1,this.placedSymbolArray=new $s}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(u,Xe,fr,Ar){this.isEmpty()||(fr&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Bh.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,Xe),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,Zh.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,iu,!0),this.opacityVertexBuffer.itemSize=1),(fr||Ar)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}wi("SymbolBuffers",hc);class pc{constructor(u,Xe,fr){this.layoutVertexArray=new u,this.layoutAttributes=Xe,this.indexArray=new fr,this.segments=new oa,this.collisionVertexArray=new ra}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,Gh.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}wi("CollisionBuffers",pc);class fc{constructor(Xe){this.collisionBoxArray=Xe.collisionBoxArray,this.zoom=Xe.zoom,this.overscaling=Xe.overscaling,this.layers=Xe.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=Xe.index,this.pixelRatio=Xe.pixelRatio,this.sourceLayerIndex=Xe.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=lo([]),this.placementViewportMatrix=lo([]);const fr=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ic(this.zoom,fr["text-size"]),this.iconSizeData=ic(this.zoom,fr["icon-size"]);const Ar=this.layers[0].layout,_r=Ar.get("symbol-sort-key"),wr=Ar.get("symbol-z-order");this.canOverlap="never"!==sc(Ar,"text-overlap","text-allow-overlap")||"never"!==sc(Ar,"icon-overlap","icon-allow-overlap")||Ar.get("text-ignore-placement")||Ar.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==wr&&!_r.isConstant(),this.sortFeaturesByY=("viewport-y"===wr||"auto"===wr&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===Ar.get("symbol-placement")&&(this.writingModes=Ar.get("text-writing-mode").map((Xe=>u.ah[Xe]))),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id)),this.sourceID=Xe.sourceID}createArrays(){this.text=new hc(new Ea(this.layers,this.zoom,(u=>/^text/.test(u)))),this.icon=new hc(new Ea(this.layers,this.zoom,(u=>/^icon/.test(u)))),this.glyphOffsetArray=new Os,this.lineVertexArray=new js,this.symbolInstances=new Ds,this.textAnchorOffsets=new Us}calculateGlyphDependencies(u,Xe,fr,Ar,_r){for(let wr=0;wr<u.length;wr++)if(Xe[u.charCodeAt(wr)]=!0,(fr||Ar)&&_r){const fr=Wh[u.charAt(wr)];fr&&(Xe[fr.charCodeAt(0)]=!0)}}populate(Xe,fr,Ar){const _r=this.layers[0],wr=_r.layout,Kr=wr.get("text-font"),In=wr.get("text-field"),io=wr.get("icon-image"),no=("constant"!==In.value.kind||In.value.value instanceof Yt&&!In.value.value.isEmpty()||In.value.value.toString().length>0)&&("constant"!==Kr.value.kind||Kr.value.value.length>0),oo="constant"!==io.value.kind||!!io.value.value||Object.keys(io.parameters).length>0,so=wr.get("symbol-sort-key");if(this.features=[],!no&&!oo)return;const ao=fr.iconDependencies,co=fr.glyphDependencies,go=fr.availableImages,ho=new Ui(this.zoom);for(const{feature:fr,id:In,index:io,sourceLayerIndex:Co}of Xe){const Xe=_r._featureFilter.needGeometry,Io=ja(fr,Xe);if(!_r._featureFilter.filter(ho,Io,Ar))continue;let xo,Mo;if(Xe||(Io.geometry=Oa(fr)),no){const u=_r.getValueAndResolveTokens("text-field",Io,Ar,go),Xe=Yt.factory(u),fr=this.hasRTLText=this.hasRTLText||cc(Xe);(!fr||"unavailable"===ig.getRTLTextPluginStatus()||fr&&ig.isParsed())&&(xo=eu(Xe,_r,Io))}if(oo){const u=_r.getValueAndResolveTokens("icon-image",Io,Ar,go);Mo=u instanceof te?u:te.fromString(u)}if(!xo&&!Mo)continue;const Po=this.sortFeaturesByKey?so.evaluate(Io,{},Ar):void 0;if(this.features.push({id:In,text:xo,icon:Mo,index:io,sourceLayerIndex:Co,geometry:Io.geometry,properties:fr.properties,type:tu[fr.type],sortKey:Po}),Mo&&(ao[Mo.name]=!0),xo){const Xe=Kr.evaluate(Io,{},Ar).join(","),fr="viewport"!==wr.get("text-rotation-alignment")&&"point"!==wr.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(u.ah.vertical)>=0;for(const u of xo.sections)if(u.image)ao[u.image.name]=!0;else{const Ar=Pi(xo.toString()),_r=u.fontStack||Xe,wr=co[_r]=co[_r]||{};this.calculateGlyphDependencies(u.text,wr,fr,this.allowVerticalPlacement,Ar)}}}"line"===wr.get("symbol-placement")&&(this.features=function(u){const Xe={},fr={},Ar=[];let _r=0;function s(Xe){Ar.push(u[Xe]),_r++}function a(u,Xe,_r){const wr=fr[u];return delete fr[u],fr[Xe]=wr,Ar[wr].geometry[0].pop(),Ar[wr].geometry[0]=Ar[wr].geometry[0].concat(_r[0]),wr}function o(u,fr,_r){const wr=Xe[fr];return delete Xe[fr],Xe[u]=wr,Ar[wr].geometry[0].shift(),Ar[wr].geometry[0]=_r[0].concat(Ar[wr].geometry[0]),wr}function l(u,Xe,fr){const Ar=fr?Xe[0][Xe[0].length-1]:Xe[0][0];return`${u}:${Ar.x}:${Ar.y}`}for(let wr=0;wr<u.length;wr++){const Kr=u[wr],In=Kr.geometry,io=Kr.text?Kr.text.toString():null;if(!io){s(wr);continue}const no=l(io,In),oo=l(io,In,!0);if(no in fr&&oo in Xe&&fr[no]!==Xe[oo]){const u=o(no,oo,In),_r=a(no,oo,Ar[u].geometry);delete Xe[no],delete fr[oo],fr[l(io,Ar[_r].geometry,!0)]=_r,Ar[u].geometry=null}else no in fr?a(no,oo,In):oo in Xe?o(no,oo,In):(s(wr),Xe[no]=_r-1,fr[oo]=_r-1)}return Ar.filter((u=>u.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((u,Xe)=>u.sortKey-Xe.sortKey))}update(u,Xe,fr){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,Xe,this.layers,fr),this.icon.programConfigurations.updatePaintArrays(u,Xe,this.layers,fr))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(u,Xe){const fr=this.lineVertexArray.length;if(void 0!==u.segment){let fr=u.dist(Xe[u.segment+1]),Ar=u.dist(Xe[u.segment]);const _r={};for(let Ar=u.segment+1;Ar<Xe.length;Ar++)_r[Ar]={x:Xe[Ar].x,y:Xe[Ar].y,tileUnitDistanceFromAnchor:fr},Ar<Xe.length-1&&(fr+=Xe[Ar+1].dist(Xe[Ar]));for(let fr=u.segment||0;fr>=0;fr--)_r[fr]={x:Xe[fr].x,y:Xe[fr].y,tileUnitDistanceFromAnchor:Ar},fr>0&&(Ar+=Xe[fr-1].dist(Xe[fr]));for(let u=0;u<Xe.length;u++){const Xe=_r[u];this.lineVertexArray.emplaceBack(Xe.x,Xe.y,Xe.tileUnitDistanceFromAnchor)}}return{lineStartIndex:fr,lineLength:this.lineVertexArray.length-fr}}addSymbols(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=Xe.indexArray,go=Xe.layoutVertexArray,ho=Xe.segments.prepareSegment(4*fr.length,go,co,this.canOverlap?Kr.sortKey:void 0),Co=this.glyphOffsetArray.length,Io=ho.vertexLength,xo=this.allowVerticalPlacement&&In===u.ah.vertical?Math.PI/2:0,Mo=Kr.text&&Kr.text.sections;for(let u=0;u<fr.length;u++){const{tl:_r,tr:wr,bl:In,br:no,tex:oo,pixelOffsetTL:so,pixelOffsetBR:Co,minFontScaleX:Io,minFontScaleY:Po,glyphOffset:ss,isSDF:sa,sectionIndex:aa}=fr[u],fa=ho.vertexLength,ya=ss[1];lc(go,io.x,io.y,_r.x,ya+_r.y,oo.x,oo.y,Ar,sa,so.x,so.y,Io,Po),lc(go,io.x,io.y,wr.x,ya+wr.y,oo.x+oo.w,oo.y,Ar,sa,Co.x,so.y,Io,Po),lc(go,io.x,io.y,In.x,ya+In.y,oo.x,oo.y+oo.h,Ar,sa,so.x,Co.y,Io,Po),lc(go,io.x,io.y,no.x,ya+no.y,oo.x+oo.w,oo.y+oo.h,Ar,sa,Co.x,Co.y,Io,Po),uc(Xe.dynamicLayoutVertexArray,io,xo),co.emplaceBack(fa,fa+1,fa+2),co.emplaceBack(fa+1,fa+2,fa+3),ho.vertexLength+=4,ho.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ss[0]),u!==fr.length-1&&aa===fr[u+1].sectionIndex||Xe.programConfigurations.populatePaintArrays(go.length,Kr,Kr.index,{},ao,Mo&&Mo[aa])}Xe.placedSymbolArray.emplaceBack(io.x,io.y,Co,this.glyphOffsetArray.length-Co,Io,no,oo,io.segment,Ar?Ar[0]:0,Ar?Ar[1]:0,_r[0],_r[1],In,0,!1,0,so)}_addCollisionDebugVertex(u,Xe,fr,Ar,_r,wr){return Xe.emplaceBack(0,0),u.emplaceBack(fr.x,fr.y,Ar,_r,Math.round(wr.x),Math.round(wr.y))}addCollisionDebugVertices(u,Xe,Ar,_r,wr,Kr,In){const io=wr.segments.prepareSegment(4,wr.layoutVertexArray,wr.indexArray),no=io.vertexLength,oo=wr.layoutVertexArray,so=wr.collisionVertexArray,ao=In.anchorX,co=In.anchorY;this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(u,Xe)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(Ar,Xe)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(Ar,_r)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(u,_r)),io.vertexLength+=4;const go=wr.indexArray;go.emplaceBack(no,no+1),go.emplaceBack(no+1,no+2),go.emplaceBack(no+2,no+3),go.emplaceBack(no+3,no),io.primitiveLength+=4}addDebugCollisionBoxes(u,Xe,fr,Ar){for(let _r=u;_r<Xe;_r++){const u=this.collisionBoxArray.get(_r);this.addCollisionDebugVertices(u.x1,u.y1,u.x2,u.y2,Ar?this.textCollisionBox:this.iconCollisionBox,u.anchorPoint,fr)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new pc(ea,Rh.members,ia),this.iconCollisionBox=new pc(ea,Rh.members,ia);for(let u=0;u<this.symbolInstances.length;u++){const Xe=this.symbolInstances.get(u);this.addDebugCollisionBoxes(Xe.textBoxStartIndex,Xe.textBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.verticalTextBoxStartIndex,Xe.verticalTextBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.iconBoxStartIndex,Xe.iconBoxEndIndex,Xe,!1),this.addDebugCollisionBoxes(Xe.verticalIconBoxStartIndex,Xe.verticalIconBoxEndIndex,Xe,!1)}}_deserializeCollisionBoxesForSymbol(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no={};for(let Ar=Xe;Ar<fr;Ar++){const Xe=u.get(Ar);no.textBox={x1:Xe.x1,y1:Xe.y1,x2:Xe.x2,y2:Xe.y2,anchorPointX:Xe.anchorPointX,anchorPointY:Xe.anchorPointY},no.textFeatureIndex=Xe.featureIndex;break}for(let Xe=Ar;Xe<_r;Xe++){const fr=u.get(Xe);no.verticalTextBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.verticalTextFeatureIndex=fr.featureIndex;break}for(let Xe=wr;Xe<Kr;Xe++){const fr=u.get(Xe);no.iconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.iconFeatureIndex=fr.featureIndex;break}for(let Xe=In;Xe<io;Xe++){const fr=u.get(Xe);no.verticalIconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.verticalIconFeatureIndex=fr.featureIndex;break}return no}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let Xe=0;Xe<this.symbolInstances.length;Xe++){const fr=this.symbolInstances.get(Xe);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,fr.textBoxStartIndex,fr.textBoxEndIndex,fr.verticalTextBoxStartIndex,fr.verticalTextBoxEndIndex,fr.iconBoxStartIndex,fr.iconBoxEndIndex,fr.verticalIconBoxStartIndex,fr.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(u,Xe){const fr=u.placedSymbolArray.get(Xe),Ar=fr.vertexStartIndex+4*fr.numGlyphs;for(let Xe=fr.vertexStartIndex;Xe<Ar;Xe+=4)u.indexArray.emplaceBack(Xe,Xe+1,Xe+2),u.indexArray.emplaceBack(Xe+1,Xe+2,Xe+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const Xe=Math.sin(u),fr=Math.cos(u),Ar=[],_r=[],wr=[];for(let u=0;u<this.symbolInstances.length;++u){wr.push(u);const Kr=this.symbolInstances.get(u);Ar.push(0|Math.round(Xe*Kr.anchorX+fr*Kr.anchorY)),_r.push(Kr.featureIndex)}return wr.sort(((u,Xe)=>Ar[u]-Ar[Xe]||_r[Xe]-_r[u])),wr}addToSortKeyRanges(u,Xe){const fr=this.sortKeyRanges[this.sortKeyRanges.length-1];fr&&fr.sortKey===Xe?fr.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:Xe,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const u of this.symbolInstanceIndexes){const Xe=this.symbolInstances.get(u);this.featureSortOrder.push(Xe.featureIndex),[Xe.rightJustifiedTextSymbolIndex,Xe.centerJustifiedTextSymbolIndex,Xe.leftJustifiedTextSymbolIndex].forEach(((u,Xe,fr)=>{u>=0&&fr.indexOf(u)===Xe&&this.addIndicesForPlacedSymbol(this.text,u)})),Xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Xe.verticalPlacedTextSymbolIndex),Xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.placedIconSymbolIndex),Xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let ru,nu;wi("SymbolBucket",fc,{omit:["layers","collisionBoxArray","features","compareText"]}),fc.MAX_GLYPHS=65535,fc.addDynamicAttributes=uc;var lu={get paint(){return nu=nu||new rs({"icon-opacity":new Wi(Io.paint_symbol["icon-opacity"]),"icon-color":new Wi(Io.paint_symbol["icon-color"]),"icon-halo-color":new Wi(Io.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wi(Io.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wi(Io.paint_symbol["icon-halo-blur"]),"icon-translate":new Ji(Io.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ji(Io.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wi(Io.paint_symbol["text-opacity"]),"text-color":new Wi(Io.paint_symbol["text-color"],{runtimeType:aa,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Wi(Io.paint_symbol["text-halo-color"]),"text-halo-width":new Wi(Io.paint_symbol["text-halo-width"]),"text-halo-blur":new Wi(Io.paint_symbol["text-halo-blur"]),"text-translate":new Ji(Io.paint_symbol["text-translate"]),"text-translate-anchor":new Ji(Io.paint_symbol["text-translate-anchor"])})},get layout(){return ru=ru||new rs({"symbol-placement":new Ji(Io.layout_symbol["symbol-placement"]),"symbol-spacing":new Ji(Io.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ji(Io.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wi(Io.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ji(Io.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ji(Io.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ji(Io.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ji(Io.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ji(Io.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ji(Io.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wi(Io.layout_symbol["icon-size"]),"icon-text-fit":new Ji(Io.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ji(Io.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wi(Io.layout_symbol["icon-image"]),"icon-rotate":new Wi(Io.layout_symbol["icon-rotate"]),"icon-padding":new Wi(Io.layout_symbol["icon-padding"]),"icon-keep-upright":new Ji(Io.layout_symbol["icon-keep-upright"]),"icon-offset":new Wi(Io.layout_symbol["icon-offset"]),"icon-anchor":new Wi(Io.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ji(Io.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ji(Io.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ji(Io.layout_symbol["text-rotation-alignment"]),"text-field":new Wi(Io.layout_symbol["text-field"]),"text-font":new Wi(Io.layout_symbol["text-font"]),"text-size":new Wi(Io.layout_symbol["text-size"]),"text-max-width":new Wi(Io.layout_symbol["text-max-width"]),"text-line-height":new Ji(Io.layout_symbol["text-line-height"]),"text-letter-spacing":new Wi(Io.layout_symbol["text-letter-spacing"]),"text-justify":new Wi(Io.layout_symbol["text-justify"]),"text-radial-offset":new Wi(Io.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ji(Io.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wi(Io.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wi(Io.layout_symbol["text-anchor"]),"text-max-angle":new Ji(Io.layout_symbol["text-max-angle"]),"text-writing-mode":new Ji(Io.layout_symbol["text-writing-mode"]),"text-rotate":new Wi(Io.layout_symbol["text-rotate"]),"text-padding":new Ji(Io.layout_symbol["text-padding"]),"text-keep-upright":new Ji(Io.layout_symbol["text-keep-upright"]),"text-transform":new Wi(Io.layout_symbol["text-transform"]),"text-offset":new Wi(Io.layout_symbol["text-offset"]),"text-allow-overlap":new Ji(Io.layout_symbol["text-allow-overlap"]),"text-overlap":new Ji(Io.layout_symbol["text-overlap"]),"text-ignore-placement":new Ji(Io.layout_symbol["text-ignore-placement"]),"text-optional":new Ji(Io.layout_symbol["text-optional"])})}};class gc{constructor(u){if(void 0===u.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:Mo,this.defaultValue=u}evaluate(u){if(u.formattedSection){const Xe=this.defaultValue.property.overrides;if(Xe&&Xe.hasOverride(u.formattedSection))return Xe.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}wi("FormatSectionOverride",gc,{omit:["defaultValue"]});class xc extends is{constructor(u){super(u,lu)}recalculate(u,Xe){if(super.recalculate(u,Xe),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const u=this.layout.get("text-writing-mode");if(u){const Xe=[];for(const fr of u)Xe.indexOf(fr)<0&&Xe.push(fr);this.layout._values["text-writing-mode"]=Xe}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,Xe,fr,Ar){const _r=this.layout.get(u).evaluate(Xe,{},fr,Ar),wr=this._unevaluatedLayout._values[u];return wr.isDataDriven()||vn(wr.value)||!_r?_r:function(u,Xe){return Xe.replace(/{([^{}]+)}/g,((Xe,fr)=>u&&fr in u?String(u[fr]):""))}(Xe.properties,_r)}createBucket(u){return new fc(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of lu.paint.overridableProperties){if(!xc.hasPaintOverride(this.layout,u))continue;const Xe=this.paint.get(u),fr=new gc(Xe),Ar=new xn(fr,Xe.property.specification);let _r=null;_r="constant"===Xe.value.kind||"source"===Xe.value.kind?new wn("source",Ar):new _n("composite",Ar,Xe.value.zoomStops),this.paint._values[u]=new Hi(Xe.property,_r,Xe.parameters)}}_handleOverridablePaintPropertyUpdate(u,Xe,fr){return!(!this.layout||Xe.isDataDriven()||fr.isDataDriven())&&xc.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,Xe){const fr=u.get("text-field"),Ar=lu.paint.properties[Xe];let _r=!1;const s=u=>{for(const Xe of u)if(Ar.overrides&&Ar.overrides.hasOverride(Xe))return void(_r=!0)};if("constant"===fr.value.kind&&fr.value.value instanceof Yt)s(fr.value.value.sections);else if("source"===fr.value.kind){const t=u=>{_r||(u instanceof se&&ne(u.value)===sl?s(u.value.sections):u instanceof Ze?s(u.sections):u.eachChild(t))},u=fr.value;u._styleExpression&&t(u._styleExpression.expression)}return _r}}let cu;var uu={get paint(){return cu=cu||new rs({"background-color":new Ji(Io.paint_background["background-color"]),"background-pattern":new ts(Io.paint_background["background-pattern"]),"background-opacity":new Ji(Io.paint_background["background-opacity"])})}};class wc extends is{constructor(u){super(u,uu)}}let Iu;var Bu={get paint(){return Iu=Iu||new rs({"raster-opacity":new Ji(Io.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ji(Io.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ji(Io.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ji(Io.paint_raster["raster-brightness-max"]),"raster-saturation":new Ji(Io.paint_raster["raster-saturation"]),"raster-contrast":new Ji(Io.paint_raster["raster-contrast"]),"raster-resampling":new Ji(Io.paint_raster["raster-resampling"]),"raster-fade-duration":new Ji(Io.paint_raster["raster-fade-duration"])})}};class Sc extends is{constructor(u){super(u,Bu)}}class kc extends is{constructor(u){super(u,{}),this.onAdd=u=>{this.implementation.onAdd&&this.implementation.onAdd(u,u.painter.context.gl)},this.onRemove=u=>{this.implementation.onRemove&&this.implementation.onRemove(u,u.painter.context.gl)},this.implementation=u}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Mc{constructor(u){this._methodToThrottle=u,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const Ru=6371008.8;class zc{constructor(u,Xe){if(isNaN(u)||isNaN(Xe))throw new Error(`Invalid LngLat object: (${u}, ${Xe})`);if(this.lng=+u,this.lat=+Xe,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zc(m(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const Xe=Math.PI/180,fr=this.lat*Xe,Ar=u.lat*Xe,_r=Math.sin(fr)*Math.sin(Ar)+Math.cos(fr)*Math.cos(Ar)*Math.cos((u.lng-this.lng)*Xe);return Ru*Math.acos(Math.min(_r,1))}static convert(u){if(u instanceof zc)return u;if(Array.isArray(u)&&(2===u.length||3===u.length))return new zc(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&"object"==typeof u&&null!==u)return new zc(Number("lng"in u?u.lng:u.lon),Number(u.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const Mu=2*Math.PI*Ru;function Cc(u){return Mu*Math.cos(u*Math.PI/180)}function Bc(u){return(180+u)/360}function Vc(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function Ec(u,Xe){return u/Cc(Xe)}function Fc(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Tc{constructor(u,Xe,fr=0){this.x=+u,this.y=+Xe,this.z=+fr}static fromLngLat(u,Xe=0){const fr=zc.convert(u);return new Tc(Bc(fr.lng),Vc(fr.lat),Ec(Xe,fr.lat))}toLngLat(){return new zc(360*this.x-180,Fc(this.y))}toAltitude(){return this.z*Cc(Fc(this.y))}meterInMercatorCoordinateUnits(){return 1/Mu*(u=Fc(this.y),1/Math.cos(u*Math.PI/180));var u}}function $c(u,Xe,fr){var Ar=2*Math.PI*6378137/256/Math.pow(2,fr);return[u*Ar-2*Math.PI*6378137/2,Xe*Ar-2*Math.PI*6378137/2]}class Lc{constructor(u,Xe,fr){if(!function(u,Xe,fr){return!(u<0||u>25||fr<0||fr>=Math.pow(2,u)||Xe<0||Xe>=Math.pow(2,u))}(u,Xe,fr))throw new Error(`x=${Xe}, y=${fr}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=Xe,this.y=fr,this.key=jc(0,u,u,Xe,fr)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,Xe,fr){const Ar=(wr=this.y,Kr=this.z,In=$c(256*(_r=this.x),256*(wr=Math.pow(2,Kr)-wr-1),Kr),io=$c(256*(_r+1),256*(wr+1),Kr),In[0]+","+In[1]+","+io[0]+","+io[1]);var _r,wr,Kr,In,io;const no=function(u,Xe,fr){let Ar,_r="";for(let wr=u;wr>0;wr--)Ar=1<<wr-1,_r+=(Xe&Ar?1:0)+(fr&Ar?2:0);return _r}(this.z,this.x,this.y);return u[(this.x+this.y)%u.length].replace(/{prefix}/g,(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"===fr?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,Xe>1?"@2x":"").replace(/{quadkey}/g,no).replace(/{bbox-epsg-3857}/g,Ar)}isChildOf(u){const Xe=this.z-u.z;return Xe>0&&u.x===this.x>>Xe&&u.y===this.y>>Xe}getTilePoint(u){const Xe=Math.pow(2,this.z);return new fr((u.x*Xe-this.x)*Cg,(u.y*Xe-this.y)*Cg)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Dc{constructor(u,Xe){this.wrap=u,this.canonical=Xe,this.key=jc(u,Xe.z,Xe.z,Xe.x,Xe.y)}}class Oc{constructor(u,Xe,fr,Ar,_r){if(u<fr)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${fr}`);this.overscaledZ=u,this.wrap=Xe,this.canonical=new Lc(fr,+Ar,+_r),this.key=jc(Xe,u,fr,Ar,_r)}clone(){return new Oc(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Xe=this.canonical.z-u;return u>this.canonical.z?new Oc(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Oc(u,this.wrap,u,this.canonical.x>>Xe,this.canonical.y>>Xe)}calculateScaledKey(u,Xe){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const fr=this.canonical.z-u;return u>this.canonical.z?jc(this.wrap*+Xe,u,this.canonical.z,this.canonical.x,this.canonical.y):jc(this.wrap*+Xe,u,u,this.canonical.x>>fr,this.canonical.y>>fr)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const Xe=this.canonical.z-u.canonical.z;return 0===u.overscaledZ||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>Xe&&u.canonical.y===this.canonical.y>>Xe}children(u){if(this.overscaledZ>=u)return[new Oc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const Xe=this.canonical.z+1,fr=2*this.canonical.x,Ar=2*this.canonical.y;return[new Oc(Xe,this.wrap,Xe,fr,Ar),new Oc(Xe,this.wrap,Xe,fr+1,Ar),new Oc(Xe,this.wrap,Xe,fr,Ar+1),new Oc(Xe,this.wrap,Xe,fr+1,Ar+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new Oc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new Oc(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Dc(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new Tc(u.x-this.wrap,u.y))}}function jc(u,Xe,fr,Ar,_r){(u*=2)<0&&(u=-1*u-1);const wr=1<<fr;return(wr*wr*u+wr*_r+Ar).toString(36)+fr.toString(36)+Xe.toString(36)}wi("CanonicalTileID",Lc),wi("OverscaledTileID",Oc,{omit:["posMatrix"]});class Rc{constructor(u,Xe,fr,Ar=1,_r=1,wr=1,Kr=0){if(this.uid=u,Xe.height!==Xe.width)throw new RangeError("DEM tiles must be square");if(fr&&!["mapbox","terrarium","custom"].includes(fr))return void A(`"${fr}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=Xe.height;const In=this.dim=Xe.height-2;switch(this.data=new Uint32Array(Xe.data.buffer),fr){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=Ar,this.greenFactor=_r,this.blueFactor=wr,this.baseShift=Kr;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=0;u<In;u++)this.data[this._idx(-1,u)]=this.data[this._idx(0,u)],this.data[this._idx(In,u)]=this.data[this._idx(In-1,u)],this.data[this._idx(u,-1)]=this.data[this._idx(u,0)],this.data[this._idx(u,In)]=this.data[this._idx(u,In-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(In,-1)]=this.data[this._idx(In-1,0)],this.data[this._idx(-1,In)]=this.data[this._idx(0,In-1)],this.data[this._idx(In,In)]=this.data[this._idx(In-1,In-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let u=0;u<In;u++)for(let Xe=0;Xe<In;Xe++){const fr=this.get(u,Xe);fr>this.max&&(this.max=fr),fr<this.min&&(this.min=fr)}}get(u,Xe){const fr=new Uint8Array(this.data.buffer),Ar=4*this._idx(u,Xe);return this.unpack(fr[Ar],fr[Ar+1],fr[Ar+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,Xe){if(u<-1||u>=this.dim+1||Xe<-1||Xe>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(Xe+1)*this.stride+(u+1)}unpack(u,Xe,fr){return u*this.redFactor+Xe*this.greenFactor+fr*this.blueFactor-this.baseShift}getPixels(){return new Ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,Xe,fr){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let Ar=Xe*this.dim,_r=Xe*this.dim+this.dim,wr=fr*this.dim,Kr=fr*this.dim+this.dim;switch(Xe){case-1:Ar=_r-1;break;case 1:_r=Ar+1}switch(fr){case-1:wr=Kr-1;break;case 1:Kr=wr+1}const In=-Xe*this.dim,io=-fr*this.dim;for(let Xe=wr;Xe<Kr;Xe++)for(let fr=Ar;fr<_r;fr++)this.data[this._idx(fr,Xe)]=u.data[this._idx(fr+In,Xe+io)]}}wi("DEMData",Rc);class Uc{constructor(u){this._stringToNumber={},this._numberToString=[];for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];this._stringToNumber[fr]=Xe,this._numberToString[Xe]=fr}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class qc{constructor(u,Xe,fr,Ar,_r){this.type="Feature",this._vectorTileFeature=u,u._z=Xe,u._x=fr,u._y=Ar,this.properties=u.properties,this.id=_r}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const Xe in this)"_geometry"!==Xe&&"_vectorTileFeature"!==Xe&&(u[Xe]=this[Xe]);return u}}class Nc{constructor(u,Xe){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new vi(Cg,16,0),this.grid3D=new vi(Cg,16,0),this.featureIndexArray=new Ns,this.promoteId=Xe}insert(u,Xe,fr,Ar,_r,wr){const Kr=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(fr,Ar,_r);const In=wr?this.grid3D:this.grid;for(let u=0;u<Xe.length;u++){const fr=Xe[u],Ar=[1/0,1/0,-1/0,-1/0];for(let u=0;u<fr.length;u++){const Xe=fr[u];Ar[0]=Math.min(Ar[0],Xe.x),Ar[1]=Math.min(Ar[1],Xe.y),Ar[2]=Math.max(Ar[2],Xe.x),Ar[3]=Math.max(Ar[3],Xe.y)}Ar[0]<Cg&&Ar[1]<Cg&&Ar[2]>=0&&Ar[3]>=0&&In.insert(Kr,Ar[0],Ar[1],Ar[2],Ar[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new zg.VectorTile(new Hh(this.rawTileData)).layers,this.sourceLayerCoder=new Uc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,Xe,Ar,_r){this.loadVTLayers();const wr=u.params||{},Kr=Cg/u.tileSize/u.scale,In=zn(wr.filter),io=u.queryGeometry,no=u.queryPadding*Kr,oo=Gc(io),so=this.grid.query(oo.minX-no,oo.minY-no,oo.maxX+no,oo.maxY+no),ao=Gc(u.cameraQueryGeometry),co=this.grid3D.query(ao.minX-no,ao.minY-no,ao.maxX+no,ao.maxY+no,((Xe,Ar,_r,wr)=>function(u,Xe,Ar,_r,wr){for(const fr of u)if(Xe<=fr.x&&Ar<=fr.y&&_r>=fr.x&&wr>=fr.y)return!0;const Kr=[new fr(Xe,Ar),new fr(Xe,wr),new fr(_r,wr),new fr(_r,Ar)];if(u.length>2)for(const Xe of Kr)if(Wa(u,Xe))return!0;for(let Xe=0;Xe<u.length-1;Xe++)if(Qa(u[Xe],u[Xe+1],Kr))return!0;return!1}(u.cameraQueryGeometry,Xe-no,Ar-no,_r+no,wr+no)));for(const u of co)so.push(u);so.sort(Kc);const go={};let ho;for(let fr=0;fr<so.length;fr++){const no=so[fr];if(no===ho)continue;ho=no;const oo=this.featureIndexArray.get(no);let ao=null;this.loadMatchingFeature(go,oo.bucketIndex,oo.sourceLayerIndex,oo.featureIndex,In,wr.layers,wr.availableImages,Xe,Ar,_r,((Xe,fr,Ar)=>(ao||(ao=Oa(Xe)),fr.queryIntersectsFeature(io,Xe,Ar,ao,this.z,u.transform,Kr,u.pixelPosMatrix))))}return go}loadMatchingFeature(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=this.bucketLayerIDs[Xe];if(wr&&!function(u,Xe){for(let fr=0;fr<u.length;fr++)if(Xe.indexOf(u[fr])>=0)return!0;return!1}(wr,so))return;const ao=this.sourceLayerCoder.decode(fr),co=this.vtLayers[ao].feature(Ar);if(_r.needGeometry){const u=ja(co,!0);if(!_r.filter(new Ui(this.tileID.overscaledZ),u,this.tileID.canonical))return}else if(!_r.filter(new Ui(this.tileID.overscaledZ),co))return;const go=this.getId(co,ao);for(let Xe=0;Xe<so.length;Xe++){const fr=so[Xe];if(wr&&wr.indexOf(fr)<0)continue;const _r=In[fr];if(!_r)continue;let ao={};go&&no&&(ao=no.getState(_r.sourceLayer||"_geojsonTileLayer",go));const ho=g({},io[fr]);ho.paint=Zc(ho.paint,_r.paint,co,ao,Kr),ho.layout=Zc(ho.layout,_r.layout,co,ao,Kr);const Co=!oo||oo(co,_r,ao);if(!Co)continue;const Io=new qc(co,this.z,this.x,this.y,go);Io.layer=ho;let xo=u[fr];void 0===xo&&(xo=u[fr]=[]),xo.push({featureIndex:Ar,feature:Io,intersectionZ:Co})}}lookupSymbolFeatures(u,Xe,fr,Ar,_r,wr,Kr,In){const io={};this.loadVTLayers();const no=zn(_r);for(const _r of u)this.loadMatchingFeature(io,fr,Ar,_r,no,wr,Kr,In,Xe);return io}hasLayer(u){for(const Xe of this.bucketLayerIDs)for(const fr of Xe)if(u===fr)return!0;return!1}getId(u,Xe){let fr=u.id;return this.promoteId&&(fr=u.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[Xe]],"boolean"==typeof fr&&(fr=Number(fr))),fr}}function Zc(u,Xe,fr,Ar,_r){return v(u,((u,wr)=>{const Kr=Xe instanceof Yi?Xe.get(wr):null;return Kr&&Kr.evaluate?Kr.evaluate(fr,Ar,_r):Kr}))}function Gc(u){let Xe=1/0,fr=1/0,Ar=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),fr=Math.min(fr,wr.y),Ar=Math.max(Ar,wr.x),_r=Math.max(_r,wr.y);return{minX:Xe,minY:fr,maxX:Ar,maxY:_r}}function Kc(u,Xe){return Xe-u}function Xc(u,Xe,Ar,_r,wr){const Kr=[];for(let In=0;In<u.length;In++){const io=u[In];let no;for(let u=0;u<io.length-1;u++){let In=io[u],oo=io[u+1];In.x<Xe&&oo.x<Xe||(In.x<Xe?In=new fr(Xe,In.y+(Xe-In.x)/(oo.x-In.x)*(oo.y-In.y))._round():oo.x<Xe&&(oo=new fr(Xe,In.y+(Xe-In.x)/(oo.x-In.x)*(oo.y-In.y))._round()),In.y<Ar&&oo.y<Ar||(In.y<Ar?In=new fr(In.x+(Ar-In.y)/(oo.y-In.y)*(oo.x-In.x),Ar)._round():oo.y<Ar&&(oo=new fr(In.x+(Ar-In.y)/(oo.y-In.y)*(oo.x-In.x),Ar)._round()),In.x>=_r&&oo.x>=_r||(In.x>=_r?In=new fr(_r,In.y+(_r-In.x)/(oo.x-In.x)*(oo.y-In.y))._round():oo.x>=_r&&(oo=new fr(_r,In.y+(_r-In.x)/(oo.x-In.x)*(oo.y-In.y))._round()),In.y>=wr&&oo.y>=wr||(In.y>=wr?In=new fr(In.x+(wr-In.y)/(oo.y-In.y)*(oo.x-In.x),wr)._round():oo.y>=wr&&(oo=new fr(In.x+(wr-In.y)/(oo.y-In.y)*(oo.x-In.x),wr)._round()),no&&In.equals(no[no.length-1])||(no=[In],Kr.push(no)),no.push(oo)))))}}return Kr}wi("FeatureIndex",Nc,{omit:["rawTileData","sourceLayerCoder"]});class Hc extends fr{constructor(u,Xe,fr,Ar){super(u,Xe),this.angle=fr,void 0!==Ar&&(this.segment=Ar)}clone(){return new Hc(this.x,this.y,this.angle,this.segment)}}function Yc(u,Xe,fr,Ar,_r){if(void 0===Xe.segment||0===fr)return!0;let wr=Xe,Kr=Xe.segment+1,In=0;for(;In>-fr/2;){if(Kr--,Kr<0)return!1;In-=u[Kr].dist(wr),wr=u[Kr]}In+=u[Kr].dist(u[Kr+1]),Kr++;const io=[];let no=0;for(;In<fr/2;){const Xe=u[Kr],fr=u[Kr+1];if(!fr)return!1;let wr=u[Kr-1].angleTo(Xe)-Xe.angleTo(fr);for(wr=Math.abs((wr+3*Math.PI)%(2*Math.PI)-Math.PI),io.push({distance:In,angleDelta:wr}),no+=wr;In-io[0].distance>Ar;)no-=io.shift().angleDelta;if(no>_r)return!1;Kr++,In+=Xe.dist(fr)}return!0}function Jc(u){let Xe=0;for(let fr=0;fr<u.length-1;fr++)Xe+=u[fr].dist(u[fr+1]);return Xe}function Wc(u,Xe,fr){return u?.6*Xe*fr:0}function Qc(u,Xe){return Math.max(u?u.right-u.left:0,Xe?Xe.right-Xe.left:0)}function th(u,Xe,fr,Ar,_r,wr){const Kr=Wc(fr,_r,wr),In=Qc(fr,Ar)*wr;let io=0;const no=Jc(u)/2;for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1],wr=Ar.dist(_r);if(io+wr>no){const oo=(no-io)/wr,so=Kl.number(Ar.x,_r.x,oo),ao=Kl.number(Ar.y,_r.y,oo),co=new Hc(so,ao,_r.angleTo(Ar),fr);return co._round(),!Kr||Yc(u,co,In,Kr,Xe)?co:void 0}io+=wr}}function eh(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=Wc(Ar,wr,Kr),oo=Qc(Ar,_r),so=oo*Kr,ao=0===u[0].x||u[0].x===io||0===u[0].y||u[0].y===io;return Xe-so<Xe/4&&(Xe=so+Xe/4),rh(u,ao?Xe/2*In%Xe:(oo/2+2*wr)*Kr*In%Xe,Xe,no,fr,so,ao,!1,io)}function rh(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=wr/2,oo=Jc(u);let so=0,ao=Xe-fr,co=[];for(let Xe=0;Xe<u.length-1;Xe++){const Kr=u[Xe],In=u[Xe+1],go=Kr.dist(In),ho=In.angleTo(Kr);for(;ao+fr<so+go;){ao+=fr;const Co=(ao-so)/go,Io=Kl.number(Kr.x,In.x,Co),xo=Kl.number(Kr.y,In.y,Co);if(Io>=0&&Io<io&&xo>=0&&xo<io&&ao-no>=0&&ao+no<=oo){const fr=new Hc(Io,xo,ho,Xe);fr._round(),Ar&&!Yc(u,fr,wr,Ar,_r)||co.push(fr)}}so+=go}return In||co.length||Kr||(co=rh(u,so/2,fr,Ar,_r,wr,Kr,!0,io)),co}wi("Anchor",Hc);const Eu=Dh;function ih(u,Xe,Ar,_r){const wr=[],Kr=u.image,In=Kr.pixelRatio,io=Kr.paddedRect.w-2*Eu,no=Kr.paddedRect.h-2*Eu;let oo={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const so=Kr.stretchX||[[0,io]],ao=Kr.stretchY||[[0,no]],f=(u,Xe)=>u+Xe[1]-Xe[0],co=so.reduce(f,0),go=ao.reduce(f,0),ho=io-co,Co=no-go;let Io=0,xo=co,Mo=0,Po=go,ss=0,sa=ho,aa=0,fa=Co;if(Kr.content&&_r){const Xe=Kr.content,fr=Xe[2]-Xe[0],Ar=Xe[3]-Xe[1];(Kr.textFitWidth||Kr.textFitHeight)&&(oo=Qu(u)),Io=sh(so,0,Xe[0]),Mo=sh(ao,0,Xe[1]),xo=sh(so,Xe[0],Xe[2]),Po=sh(ao,Xe[1],Xe[3]),ss=Xe[0]-Io,aa=Xe[1]-Mo,sa=fr-xo,fa=Ar-Po}const ya=oo.x1,ol=oo.y1,sl=oo.x2-ya,al=oo.y2-ol,C=(u,_r,wr,io)=>{const no=oh(u.stretch-Io,xo,sl,ya),oo=lh(u.fixed-ss,sa,u.stretch,co),so=oh(_r.stretch-Mo,Po,al,ol),ao=lh(_r.fixed-aa,fa,_r.stretch,go),ho=oh(wr.stretch-Io,xo,sl,ya),Co=lh(wr.fixed-ss,sa,wr.stretch,co),cl=oh(io.stretch-Mo,Po,al,ol),hl=lh(io.fixed-aa,fa,io.stretch,go),ul=new fr(no,so),dl=new fr(ho,so),pl=new fr(ho,cl),Cl=new fr(no,cl),fl=new fr(oo/In,ao/In),_l=new fr(Co/In,hl/In),vl=Xe*Math.PI/180;if(vl){const u=Math.sin(vl),Xe=Math.cos(vl),fr=[Xe,-u,u,Xe];ul._matMult(fr),dl._matMult(fr),Cl._matMult(fr),pl._matMult(fr)}const xl=u.stretch+u.fixed,Sl=_r.stretch+_r.fixed;return{tl:ul,tr:dl,bl:Cl,br:pl,tex:{x:Kr.paddedRect.x+Eu+xl,y:Kr.paddedRect.y+Eu+Sl,w:wr.stretch+wr.fixed-xl,h:io.stretch+io.fixed-Sl},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fl,pixelOffsetBR:_l,minFontScaleX:sa/In/sl,minFontScaleY:fa/In/al,isSDF:Ar}};if(_r&&(Kr.stretchX||Kr.stretchY)){const u=ah(so,ho,co),Xe=ah(ao,Co,go);for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1];for(let u=0;u<Xe.length-1;u++)wr.push(C(Ar,Xe[u],_r,Xe[u+1]))}}else wr.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:io+1},{fixed:0,stretch:no+1}));return wr}function sh(u,Xe,fr){let Ar=0;for(const _r of u)Ar+=Math.max(Xe,Math.min(fr,_r[1]))-Math.max(Xe,Math.min(fr,_r[0]));return Ar}function ah(u,Xe,fr){const Ar=[{fixed:-Eu,stretch:0}];for(const[Xe,fr]of u){const u=Ar[Ar.length-1];Ar.push({fixed:Xe-u.stretch,stretch:u.stretch}),Ar.push({fixed:Xe-u.stretch,stretch:u.stretch+(fr-Xe)})}return Ar.push({fixed:Xe+Eu,stretch:fr}),Ar}function oh(u,Xe,fr,Ar){return u/Xe*fr+Ar}function lh(u,Xe,fr,Ar){return u-Xe*fr/Ar}class uh{constructor(u,Xe,Ar,_r,wr,Kr,In,io,no,oo){var so;if(this.boxStartIndex=u.length,no){let u=Kr.top,Xe=Kr.bottom;const fr=Kr.collisionPadding;fr&&(u-=fr[1],Xe+=fr[3]);let Ar=Xe-u;Ar>0&&(Ar=Math.max(10,Ar),this.circleDiameter=Ar)}else{const no=(null===(so=Kr.image)||void 0===so?void 0:so.content)&&(Kr.image.textFitWidth||Kr.image.textFitHeight)?Qu(Kr):{x1:Kr.left,y1:Kr.top,x2:Kr.right,y2:Kr.bottom};no.y1=no.y1*In-io[0],no.y2=no.y2*In+io[2],no.x1=no.x1*In-io[3],no.x2=no.x2*In+io[1];const ao=Kr.collisionPadding;if(ao&&(no.x1-=ao[0]*In,no.y1-=ao[1]*In,no.x2+=ao[2]*In,no.y2+=ao[3]*In),oo){const u=new fr(no.x1,no.y1),Xe=new fr(no.x2,no.y1),Ar=new fr(no.x1,no.y2),_r=new fr(no.x2,no.y2),wr=oo*Math.PI/180;u._rotate(wr),Xe._rotate(wr),Ar._rotate(wr),_r._rotate(wr),no.x1=Math.min(u.x,Xe.x,Ar.x,_r.x),no.x2=Math.max(u.x,Xe.x,Ar.x,_r.x),no.y1=Math.min(u.y,Xe.y,Ar.y,_r.y),no.y2=Math.max(u.y,Xe.y,Ar.y,_r.y)}u.emplaceBack(Xe.x,Xe.y,no.x1,no.y1,no.x2,no.y2,Ar,_r,wr)}this.boxEndIndex=u.length}}class ch{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:fr}=this,Ar=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(fr(Ar,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=Ar}_down(u){const{data:Xe,compare:fr}=this,Ar=this.length>>1,_r=Xe[u];for(;u<Ar;){let Ar=1+(u<<1);const wr=Ar+1;if(wr<this.length&&fr(Xe[wr],Xe[Ar])<0&&(Ar=wr),fr(Xe[Ar],_r)>=0)break;Xe[u]=Xe[Ar],u=Ar}Xe[u]=_r}}function hh(u,Xe=1,Ar=!1){let _r=1/0,wr=1/0,Kr=-1/0,In=-1/0;const io=u[0];for(let u=0;u<io.length;u++){const Xe=io[u];(!u||Xe.x<_r)&&(_r=Xe.x),(!u||Xe.y<wr)&&(wr=Xe.y),(!u||Xe.x>Kr)&&(Kr=Xe.x),(!u||Xe.y>In)&&(In=Xe.y)}const no=Math.min(Kr-_r,In-wr);let oo=no/2;const so=new ch([],ph);if(0===no)return new fr(_r,wr);for(let Xe=_r;Xe<Kr;Xe+=no)for(let fr=wr;fr<In;fr+=no)so.push(new fh(Xe+oo,fr+oo,oo,u));let ao=function(u){let Xe=0,fr=0,Ar=0;const _r=u[0];for(let u=0,wr=_r.length,Kr=wr-1;u<wr;Kr=u++){const wr=_r[u],In=_r[Kr],io=wr.x*In.y-In.x*wr.y;fr+=(wr.x+In.x)*io,Ar+=(wr.y+In.y)*io,Xe+=3*io}return new fh(fr/Xe,Ar/Xe,0,u)}(u),co=so.length;for(;so.length;){const fr=so.pop();(fr.d>ao.d||!ao.d)&&(ao=fr,Ar&&console.log("found best %d after %d probes",Math.round(1e4*fr.d)/1e4,co)),fr.max-ao.d<=Xe||(oo=fr.h/2,so.push(new fh(fr.p.x-oo,fr.p.y-oo,oo,u)),so.push(new fh(fr.p.x+oo,fr.p.y-oo,oo,u)),so.push(new fh(fr.p.x-oo,fr.p.y+oo,oo,u)),so.push(new fh(fr.p.x+oo,fr.p.y+oo,oo,u)),co+=4)}return Ar&&(console.log(`num probes: ${co}`),console.log(`best distance: ${ao.d}`)),ao.p}function ph(u,Xe){return Xe.max-u.max}function fh(u,Xe,Ar,_r){this.p=new fr(u,Xe),this.h=Ar,this.d=function(u,Xe){let fr=!1,Ar=1/0;for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r];for(let Xe=0,_r=wr.length,Kr=_r-1;Xe<_r;Kr=Xe++){const _r=wr[Xe],In=wr[Kr];_r.y>u.y!=In.y>u.y&&u.x<(In.x-_r.x)*(u.y-_r.y)/(In.y-_r.y)+_r.x&&(fr=!fr),Ar=Math.min(Ar,Ya(u,_r,In))}}return(fr?1:-1)*Math.sqrt(Ar)}(this.p,_r),this.max=this.d+this.h*Math.SQRT2}var Lu;u.aq=void 0,(Lu=u.aq||(u.aq={}))[Lu.center=1]="center",Lu[Lu.left=2]="left",Lu[Lu.right=3]="right",Lu[Lu.top=4]="top",Lu[Lu.bottom=5]="bottom",Lu[Lu["top-left"]=6]="top-left",Lu[Lu["top-right"]=7]="top-right",Lu[Lu["bottom-left"]=8]="bottom-left",Lu[Lu["bottom-right"]=9]="bottom-right";const Uu=7,qu=Number.POSITIVE_INFINITY;function gh(u,Xe){return Xe[1]!==qu?function(u,Xe,fr){let Ar=0,_r=0;switch(Xe=Math.abs(Xe),fr=Math.abs(fr),u){case"top-right":case"top-left":case"top":_r=fr-Uu;break;case"bottom-right":case"bottom-left":case"bottom":_r=-fr+Uu}switch(u){case"top-right":case"bottom-right":case"right":Ar=-Xe;break;case"top-left":case"bottom-left":case"left":Ar=Xe}return[Ar,_r]}(u,Xe[0],Xe[1]):function(u,Xe){let fr=0,Ar=0;Xe<0&&(Xe=0);const _r=Xe/Math.SQRT2;switch(u){case"top-right":case"top-left":Ar=_r-Uu;break;case"bottom-right":case"bottom-left":Ar=-_r+Uu;break;case"bottom":Ar=-Xe+Uu;break;case"top":Ar=Xe-Uu}switch(u){case"top-right":case"bottom-right":fr=-_r;break;case"top-left":case"bottom-left":fr=_r;break;case"left":fr=Xe;break;case"right":fr=-Xe}return[fr,Ar]}(u,Xe[0])}function xh(u,Xe,fr){var Ar;const _r=u.layout,wr=null===(Ar=_r.get("text-variable-anchor-offset"))||void 0===Ar?void 0:Ar.evaluate(Xe,{},fr);if(wr){const u=wr.values,Xe=[];for(let fr=0;fr<u.length;fr+=2){const Ar=Xe[fr]=u[fr],_r=u[fr+1].map((u=>u*Th));Ar.startsWith("top")?_r[1]-=Uu:Ar.startsWith("bottom")&&(_r[1]+=Uu),Xe[fr+1]=_r}return new Qt(Xe)}const Kr=_r.get("text-variable-anchor");if(Kr){let Ar;Ar=void 0!==u._unevaluatedLayout.getValue("text-radial-offset")?[_r.get("text-radial-offset").evaluate(Xe,{},fr)*Th,qu]:_r.get("text-offset").evaluate(Xe,{},fr).map((u=>u*Th));const wr=[];for(const u of Kr)wr.push(u,gh(u,Ar));return new Qt(wr)}return null}function vh(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function bh(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so){let ao=Kr.textMaxSize.evaluate(fr,{});void 0===ao&&(ao=In);const co=Xe.layers[0].layout,go=co.get("icon-offset").evaluate(fr,{},so),ho=_h(Ar.horizontal),Co=In/24,Io=Xe.tilePixelRatio*Co,xo=Xe.tilePixelRatio*ao/24,Mo=Xe.tilePixelRatio*io,Po=Xe.tilePixelRatio*co.get("symbol-spacing"),ss=co.get("text-padding")*Xe.tilePixelRatio,sa=function(u,Xe,fr,Ar=1){const _r=u.get("icon-padding").evaluate(Xe,{},fr),wr=_r&&_r.values;return[wr[0]*Ar,wr[1]*Ar,wr[2]*Ar,wr[3]*Ar]}(co,fr,so,Xe.tilePixelRatio),aa=co.get("text-max-angle")/180*Math.PI,fa="viewport"!==co.get("text-rotation-alignment")&&"point"!==co.get("symbol-placement"),ya="map"===co.get("icon-rotation-alignment")&&"point"!==co.get("symbol-placement"),ol=co.get("symbol-placement"),sl=Po/2,al=co.get("icon-text-fit");let cl;_r&&"none"!==al&&(Xe.allowVerticalPlacement&&Ar.vertical&&(cl=tc(_r,Ar.vertical,al,co.get("icon-text-fit-padding"),go,Co)),ho&&(_r=tc(_r,ho,al,co.get("icon-text-fit-padding"),go,Co)));const B=(io,ao)=>{ao.x<0||ao.x>=Cg||ao.y<0||ao.y>=Cg||function(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya){const ol=Xe.addToLineVertexArray(fr,Ar);let sl,al,cl,hl,ul=0,dl=0,pl=0,Cl=0,fl=-1,_l=-1;const vl={};let xl=pg("");if(Xe.allowVerticalPlacement&&_r.vertical){const u=io.layout.get("text-rotate").evaluate(ss,{},fa)+90;cl=new uh(no,fr,oo,so,ao,_r.vertical,co,go,ho,u),In&&(hl=new uh(no,fr,oo,so,ao,In,Io,xo,ho,u))}if(wr){const Ar=io.layout.get("icon-rotate").evaluate(ss,{}),_r="none"!==io.layout.get("icon-text-fit"),Kr=ih(wr,Ar,aa,_r),co=In?ih(In,Ar,aa,_r):void 0;al=new uh(no,fr,oo,so,ao,wr,Io,xo,!1,Ar),ul=4*Kr.length;const go=Xe.iconSizeData;let ho=null;"source"===go.kind?(ho=[qh*io.layout.get("icon-size").evaluate(ss,{})],ho[0]>$h&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Qh}. Reduce your "icon-size".`)):"composite"===go.kind&&(ho=[qh*sa.compositeIconSizes[0].evaluate(ss,{},fa),qh*sa.compositeIconSizes[1].evaluate(ss,{},fa)],(ho[0]>$h||ho[1]>$h)&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Qh}. Reduce your "icon-size".`)),Xe.addSymbols(Xe.icon,Kr,ho,Po,Mo,ss,u.ah.none,fr,ol.lineStartIndex,ol.lineLength,-1,fa),fl=Xe.icon.placedSymbolArray.length-1,co&&(dl=4*co.length,Xe.addSymbols(Xe.icon,co,ho,Po,Mo,ss,u.ah.vertical,fr,ol.lineStartIndex,ol.lineLength,-1,fa),_l=Xe.icon.placedSymbolArray.length-1)}const Sl=Object.keys(_r.horizontal);for(const Ar of Sl){const wr=_r.horizontal[Ar];if(!sl){xl=pg(wr.text);const u=io.layout.get("text-rotate").evaluate(ss,{},fa);sl=new uh(no,fr,oo,so,ao,wr,co,go,ho,u)}const In=1===wr.positionedLines.length;if(pl+=wh(Xe,fr,wr,Kr,io,ho,ss,Co,ol,_r.vertical?u.ah.horizontal:u.ah.horizontalOnly,In?Sl:[Ar],vl,fl,sa,fa),In)break}_r.vertical&&(Cl+=wh(Xe,fr,_r.vertical,Kr,io,ho,ss,Co,ol,u.ah.vertical,["vertical"],vl,_l,sa,fa));const kl=sl?sl.boxStartIndex:Xe.collisionBoxArray.length,Bl=sl?sl.boxEndIndex:Xe.collisionBoxArray.length,Zl=cl?cl.boxStartIndex:Xe.collisionBoxArray.length,Rl=cl?cl.boxEndIndex:Xe.collisionBoxArray.length,Wl=al?al.boxStartIndex:Xe.collisionBoxArray.length,Tl=al?al.boxEndIndex:Xe.collisionBoxArray.length,Jl=hl?hl.boxStartIndex:Xe.collisionBoxArray.length,Kl=hl?hl.boxEndIndex:Xe.collisionBoxArray.length;let Ll=-1;const Y=(u,Xe)=>u&&u.circleDiameter?Math.max(u.circleDiameter,Xe):Xe;Ll=Y(sl,Ll),Ll=Y(cl,Ll),Ll=Y(al,Ll),Ll=Y(hl,Ll);const Dl=Ll>-1?1:0;Dl&&(Ll*=ya/Th),Xe.glyphOffsetArray.length>=fc.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==ss.sortKey&&Xe.addToSortKeyRanges(Xe.symbolInstances.length,ss.sortKey);const Yl=xh(io,ss,fa),[Nl,Ol]=function(Xe,fr){const Ar=Xe.length,_r=null==fr?void 0:fr.values;if((null==_r?void 0:_r.length)>0)for(let fr=0;fr<_r.length;fr+=2){const Ar=_r[fr+1];Xe.emplaceBack(u.aq[_r[fr]],Ar[0],Ar[1])}return[Ar,Xe.length]}(Xe.textAnchorOffsets,Yl);Xe.symbolInstances.emplaceBack(fr.x,fr.y,vl.right>=0?vl.right:-1,vl.center>=0?vl.center:-1,vl.left>=0?vl.left:-1,vl.vertical||-1,fl,_l,xl,kl,Bl,Zl,Rl,Wl,Tl,Jl,Kl,oo,pl,Cl,ul,dl,Dl,0,co,Ll,Nl,Ol)}(Xe,ao,io,Ar,_r,wr,cl,Xe.layers[0],Xe.collisionBoxArray,fr.index,fr.sourceLayerIndex,Xe.index,Io,[ss,ss,ss,ss],fa,no,Mo,sa,ya,go,fr,Kr,oo,so,In)};if("line"===ol)for(const u of Xc(fr.geometry,0,0,Cg,Cg)){const fr=eh(u,Po,aa,Ar.vertical||ho,_r,24,xo,Xe.overscaling,Cg);for(const Ar of fr)ho&&Ah(Xe,ho.text,sl,Ar)||B(u,Ar)}else if("line-center"===ol){for(const u of fr.geometry)if(u.length>1){const Xe=th(u,aa,Ar.vertical||ho,_r,24,xo);Xe&&B(u,Xe)}}else if("Polygon"===fr.type)for(const u of xr(fr.geometry,0)){const Xe=hh(u,16);B(u[0],new Hc(Xe.x,Xe.y,0))}else if("LineString"===fr.type)for(const u of fr.geometry)B(u,new Hc(u[0].x,u[0].y,0));else if("Point"===fr.type)for(const u of fr.geometry)for(const Xe of u)B([Xe],new Hc(Xe.x,Xe.y,0))}function wh(u,Xe,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=function(u,Xe,Ar,_r,wr,Kr,In,io){const no=_r.layout.get("text-rotate").evaluate(Kr,{})*Math.PI/180,oo=[];for(const u of Xe.positionedLines)for(const _r of u.positionedGlyphs){if(!_r.rect)continue;const Kr=_r.rect||{};let so=Lh+1,ao=!0,co=1,go=0;const ho=(wr||io)&&_r.vertical,Co=_r.metrics.advance*_r.scale/2;if(io&&Xe.verticalizable&&(go=u.lineOffset/2-(_r.imageName?-(Th-_r.metrics.width*_r.scale)/2:(_r.scale-1)*Th)),_r.imageName){const u=In[_r.imageName];ao=u.sdf,co=u.pixelRatio,so=Dh/co}const Io=wr?[_r.x+Co,_r.y]:[0,0];let xo=wr?[0,0]:[_r.x+Co+Ar[0],_r.y+Ar[1]-go],Mo=[0,0];ho&&(Mo=xo,xo=[0,0]);const Po=_r.metrics.isDoubleResolution?2:1,ss=(_r.metrics.left-so)*_r.scale-Co+xo[0],sa=(-_r.metrics.top-so)*_r.scale+xo[1],aa=ss+Kr.w/Po*_r.scale/co,fa=sa+Kr.h/Po*_r.scale/co,ya=new fr(ss,sa),ol=new fr(aa,sa),sl=new fr(ss,fa),al=new fr(aa,fa);if(ho){const u=new fr(-Co,Co-Nh),Xe=-Math.PI/2,Ar=Th/2-Co,wr=new fr(5-Nh-Ar,-(_r.imageName?Ar:0)),Kr=new fr(...Mo);ya._rotateAround(Xe,u)._add(wr)._add(Kr),ol._rotateAround(Xe,u)._add(wr)._add(Kr),sl._rotateAround(Xe,u)._add(wr)._add(Kr),al._rotateAround(Xe,u)._add(wr)._add(Kr)}if(no){const u=Math.sin(no),Xe=Math.cos(no),fr=[Xe,-u,u,Xe];ya._matMult(fr),ol._matMult(fr),sl._matMult(fr),al._matMult(fr)}const cl=new fr(0,0),hl=new fr(0,0);oo.push({tl:ya,tr:ol,bl:sl,br:al,tex:Kr,writingMode:Xe.writingMode,glyphOffset:Io,sectionIndex:_r.sectionIndex,isSDF:ao,pixelOffsetTL:cl,pixelOffsetBR:hl,minFontScaleX:0,minFontScaleY:0})}return oo}(0,Ar,io,wr,Kr,In,_r,u.allowVerticalPlacement),Io=u.textSizeData;let xo=null;"source"===Io.kind?(xo=[qh*wr.layout.get("text-size").evaluate(In,{})],xo[0]>$h&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Qh}. Reduce your "text-size".`)):"composite"===Io.kind&&(xo=[qh*go.compositeTextSizes[0].evaluate(In,{},ho),qh*go.compositeTextSizes[1].evaluate(In,{},ho)],(xo[0]>$h||xo[1]>$h)&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Qh}. Reduce your "text-size".`)),u.addSymbols(u.text,Co,xo,io,Kr,In,oo,Xe,no.lineStartIndex,no.lineLength,co,ho);for(const Xe of so)ao[Xe]=u.text.placedSymbolArray.length-1;return 4*Co.length}function _h(u){for(const Xe in u)return u[Xe];return null}function Ah(u,Xe,fr,Ar){const _r=u.compareText;if(Xe in _r){const u=_r[Xe];for(let Xe=u.length-1;Xe>=0;Xe--)if(Ar.dist(u[Xe])<fr)return!0}else _r[Xe]=[];return _r[Xe].push(Ar),!1}const $u=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class kh{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[Xe,fr]=new Uint8Array(u,0,2);if(219!==Xe)throw new Error("Data does not appear to be in a KDBush format.");const Ar=fr>>4;if(1!==Ar)throw new Error(`Got v${Ar} data when expected v1.`);const _r=$u[15&fr];if(!_r)throw new Error("Unrecognized array type.");const[wr]=new Uint16Array(u,2,1),[Kr]=new Uint32Array(u,4,1);return new kh(Kr,wr,_r,u)}constructor(u,Xe=64,fr=Float64Array,Ar){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+Xe,2),65535),this.ArrayType=fr,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const _r=$u.indexOf(this.ArrayType),wr=2*u*this.ArrayType.BYTES_PER_ELEMENT,Kr=u*this.IndexArrayType.BYTES_PER_ELEMENT,In=(8-Kr%8)%8;if(_r<0)throw new Error(`Unexpected typed array class: ${fr}.`);Ar&&Ar instanceof ArrayBuffer?(this.data=Ar,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Kr+In,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+wr+Kr+In),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Kr+In,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+_r]),new Uint16Array(this.data,2,1)[0]=Xe,new Uint32Array(this.data,4,1)[0]=u)}add(u,Xe){const fr=this._pos>>1;return this.ids[fr]=fr,this.coords[this._pos++]=u,this.coords[this._pos++]=Xe,fr}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return Mh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,Xe,fr,Ar){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_r,coords:wr,nodeSize:Kr}=this,In=[0,_r.length-1,0],io=[];for(;In.length;){const no=In.pop()||0,oo=In.pop()||0,so=In.pop()||0;if(oo-so<=Kr){for(let Kr=so;Kr<=oo;Kr++){const In=wr[2*Kr],no=wr[2*Kr+1];In>=u&&In<=fr&&no>=Xe&&no<=Ar&&io.push(_r[Kr])}continue}const ao=so+oo>>1,co=wr[2*ao],go=wr[2*ao+1];co>=u&&co<=fr&&go>=Xe&&go<=Ar&&io.push(_r[ao]),(0===no?u<=co:Xe<=go)&&(In.push(so),In.push(ao-1),In.push(1-no)),(0===no?fr>=co:Ar>=go)&&(In.push(ao+1),In.push(oo),In.push(1-no))}return io}within(u,Xe,fr){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Ar,coords:_r,nodeSize:wr}=this,Kr=[0,Ar.length-1,0],In=[],io=fr*fr;for(;Kr.length;){const no=Kr.pop()||0,oo=Kr.pop()||0,so=Kr.pop()||0;if(oo-so<=wr){for(let fr=so;fr<=oo;fr++)Ch(_r[2*fr],_r[2*fr+1],u,Xe)<=io&&In.push(Ar[fr]);continue}const ao=so+oo>>1,co=_r[2*ao],go=_r[2*ao+1];Ch(co,go,u,Xe)<=io&&In.push(Ar[ao]),(0===no?u-fr<=co:Xe-fr<=go)&&(Kr.push(so),Kr.push(ao-1),Kr.push(1-no)),(0===no?u+fr>=co:Xe+fr>=go)&&(Kr.push(ao+1),Kr.push(oo),Kr.push(1-no))}return In}}function Mh(u,Xe,fr,Ar,_r,wr){if(_r-Ar<=fr)return;const Kr=Ar+_r>>1;Ih(u,Xe,Kr,Ar,_r,wr),Mh(u,Xe,fr,Ar,Kr-1,1-wr),Mh(u,Xe,fr,Kr+1,_r,1-wr)}function Ih(u,Xe,fr,Ar,_r,wr){for(;_r>Ar;){if(_r-Ar>600){const Kr=_r-Ar+1,In=fr-Ar+1,io=Math.log(Kr),no=.5*Math.exp(2*io/3),oo=.5*Math.sqrt(io*no*(Kr-no)/Kr)*(In-Kr/2<0?-1:1);Ih(u,Xe,fr,Math.max(Ar,Math.floor(fr-In*no/Kr+oo)),Math.min(_r,Math.floor(fr+(Kr-In)*no/Kr+oo)),wr)}const Kr=Xe[2*fr+wr];let In=Ar,io=_r;for(zh(u,Xe,Ar,fr),Xe[2*_r+wr]>Kr&&zh(u,Xe,Ar,_r);In<io;){for(zh(u,Xe,In,io),In++,io--;Xe[2*In+wr]<Kr;)In++;for(;Xe[2*io+wr]>Kr;)io--}Xe[2*Ar+wr]===Kr?zh(u,Xe,Ar,io):(io++,zh(u,Xe,io,_r)),io<=fr&&(Ar=io+1),fr<=io&&(_r=io-1)}}function zh(u,Xe,fr,Ar){Ph(u,fr,Ar),Ph(Xe,2*fr,2*Ar),Ph(Xe,2*fr+1,2*Ar+1)}function Ph(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function Ch(u,Xe,fr,Ar){const _r=u-fr,wr=Xe-Ar;return _r*_r+wr*wr}var td;u.bf=void 0,(td=u.bf||(u.bf={})).create="create",td.load="load",td.fullLoad="fullLoad";let ed=null,id=[];const rd=1e3/60,nd="loadTime",od="fullLoadTime",sd={mark(u){performance.mark(u)},frame(u){const Xe=u;null!=ed&&id.push(Xe-ed),ed=Xe},clearMetrics(){ed=null,id=[],performance.clearMeasures(nd),performance.clearMeasures(od);for(const Xe in u.bf)performance.clearMarks(u.bf[Xe])},getPerformanceMetrics(){performance.measure(nd,u.bf.create,u.bf.load),performance.measure(od,u.bf.create,u.bf.fullLoad);const Xe=performance.getEntriesByName(nd)[0].duration,fr=performance.getEntriesByName(od)[0].duration,Ar=id.length,_r=1/(id.reduce(((u,Xe)=>u+Xe),0)/Ar/1e3),wr=id.filter((u=>u>rd)).reduce(((u,Xe)=>u+(Xe-rd)/rd),0);return{loadTime:Xe,fullLoadTime:fr,fps:_r,percentDroppedFrames:wr/(Ar+wr)*100,totalFrames:Ar}}};u.$=class extends ps{},u.A=vg,u.B=yc,u.C=function(u){if(null==oo){const Xe=u.navigator?u.navigator.userAgent:null;oo=!!u.safari||!(!Xe||!(/\b(iPad|iPhone|iPod)\b/.test(Xe)||Xe.match("Safari")&&!Xe.match("Chrome")))}return oo},u.D=Ji,u.E=Z,u.F=class{constructor(u,Xe){this.target=u,this.mapId=Xe,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Mc((()=>this.process())),this.subscription=function(u,Xe,fr){return u.addEventListener(Xe,fr,!1),{unsubscribe:()=>{u.removeEventListener(Xe,fr,!1)}}}(this.target,"message",(u=>this.receive(u))),this.globalScope=k(self)?u:window}registerMessageHandler(u,Xe){this.messageHandlers[u]=Xe}sendAsync(u,Xe){return new Promise(((fr,Ar)=>{const _r=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_r]={resolve:fr,reject:Ar},Xe&&Xe.signal.addEventListener("abort",(()=>{delete this.resolveRejects[_r];const Xe={id:_r,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Xe)}),{once:!0});const wr=[],Kr=Object.assign(Object.assign({},u),{id:_r,sourceMapId:this.mapId,origin:location.origin,data:ki(u.data,wr)});this.target.postMessage(Kr,{transfer:wr})}))}receive(u){const Xe=u.data,fr=Xe.id;if(!("file://"!==Xe.origin&&"file://"!==location.origin&&"resource://android"!==Xe.origin&&"resource://android"!==location.origin&&Xe.origin!==location.origin||Xe.targetMapId&&this.mapId!==Xe.targetMapId)){if("<cancel>"===Xe.type){delete this.tasks[fr];const u=this.abortControllers[fr];return delete this.abortControllers[fr],void(u&&u.abort())}if(k(self)||Xe.mustQueue)return this.tasks[fr]=Xe,this.taskQueue.push(fr),void this.invoker.trigger();this.processTask(fr,Xe)}}process(){if(0===this.taskQueue.length)return;const u=this.taskQueue.shift(),Xe=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),Xe&&this.processTask(u,Xe)}processTask(u,Xe){return e(this,void 0,void 0,(function*(){if("<response>"===Xe.type){const fr=this.resolveRejects[u];if(delete this.resolveRejects[u],!fr)return;return void(Xe.error?fr.reject(Mi(Xe.error)):fr.resolve(Mi(Xe.data)))}if(!this.messageHandlers[Xe.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${Xe.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const fr=Mi(Xe.data),Ar=new AbortController;this.abortControllers[u]=Ar;try{const _r=yield this.messageHandlers[Xe.type](Xe.sourceMapId,fr,Ar);this.completeTask(u,null,_r)}catch(fr){this.completeTask(u,fr)}}))}completeTask(u,Xe,fr){const Ar=[];delete this.abortControllers[u];const _r={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:Xe?ki(Xe):null,data:ki(fr,Ar)};this.target.postMessage(_r,{transfer:Ar})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},u.G=Co,u.H=function(){var u=new vg(16);return vg!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},u.I=Fu,u.J=function(u,Xe,fr){var Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho=fr[0],Co=fr[1],Io=fr[2];return Xe===u?(u[12]=Xe[0]*ho+Xe[4]*Co+Xe[8]*Io+Xe[12],u[13]=Xe[1]*ho+Xe[5]*Co+Xe[9]*Io+Xe[13],u[14]=Xe[2]*ho+Xe[6]*Co+Xe[10]*Io+Xe[14],u[15]=Xe[3]*ho+Xe[7]*Co+Xe[11]*Io+Xe[15]):(_r=Xe[1],wr=Xe[2],Kr=Xe[3],In=Xe[4],io=Xe[5],no=Xe[6],oo=Xe[7],so=Xe[8],ao=Xe[9],co=Xe[10],go=Xe[11],u[0]=Ar=Xe[0],u[1]=_r,u[2]=wr,u[3]=Kr,u[4]=In,u[5]=io,u[6]=no,u[7]=oo,u[8]=so,u[9]=ao,u[10]=co,u[11]=go,u[12]=Ar*ho+In*Co+so*Io+Xe[12],u[13]=_r*ho+io*Co+ao*Io+Xe[13],u[14]=wr*ho+no*Co+co*Io+Xe[14],u[15]=Kr*ho+oo*Co+go*Io+Xe[15]),u},u.K=function(u,Xe,fr){var Ar=fr[0],_r=fr[1],wr=fr[2];return u[0]=Xe[0]*Ar,u[1]=Xe[1]*Ar,u[2]=Xe[2]*Ar,u[3]=Xe[3]*Ar,u[4]=Xe[4]*_r,u[5]=Xe[5]*_r,u[6]=Xe[6]*_r,u[7]=Xe[7]*_r,u[8]=Xe[8]*wr,u[9]=Xe[9]*wr,u[10]=Xe[10]*wr,u[11]=Xe[11]*wr,u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.L=uo,u.M=function(u,Xe){const fr={};for(let Ar=0;Ar<Xe.length;Ar++){const _r=Xe[Ar];_r in u&&(fr[_r]=u[_r])}return fr},u.N=zc,u.O=Bc,u.P=fr,u.Q=Vc,u.R=Ao,u.S=Oc,u.T=Zi,u.U=h,u.V=p,u.W=P,u.X=Cg,u.Y=ls,u.Z=Tc,u._=e,u.a=ho,u.a$=function(u,Xe){return u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[4]=Xe[4],u[5]=Xe[5],u[6]=Xe[6],u[7]=Xe[7],u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.a0=oa,u.a1=Lc,u.a2=it,u.a3=u=>{const Xe=window.document.createElement("video");return Xe.muted=!0,new Promise((fr=>{Xe.onloadstart=()=>{fr(Xe)};for(const fr of u){const u=window.document.createElement("source");j(fr)||(Xe.crossOrigin="Anonymous"),u.src=fr,Xe.appendChild(u)}}))},u.a4=function(){return io++},u.a5=Fs,u.a6=fc,u.a7=zn,u.a8=ja,u.a9=qc,u.aA=function(u){if("custom"===u.type)return new kc(u);switch(u.type){case"background":return new wc(u);case"circle":return new fo(u);case"fill":return new ll(u);case"fill-extrusion":return new Vl(u);case"heatmap":return new ko(u);case"hillshade":return new zo(u);case"line":return new Xl(u);case"raster":return new Sc(u);case"symbol":return new xc(u)}},u.aB=w,u.aC=function(u,Xe){if(!u)return[{command:"setStyle",args:[Xe]}];let fr=[];try{if(!H(u.version,Xe.version))return[{command:"setStyle",args:[Xe]}];H(u.center,Xe.center)||fr.push({command:"setCenter",args:[Xe.center]}),H(u.zoom,Xe.zoom)||fr.push({command:"setZoom",args:[Xe.zoom]}),H(u.bearing,Xe.bearing)||fr.push({command:"setBearing",args:[Xe.bearing]}),H(u.pitch,Xe.pitch)||fr.push({command:"setPitch",args:[Xe.pitch]}),H(u.sprite,Xe.sprite)||fr.push({command:"setSprite",args:[Xe.sprite]}),H(u.glyphs,Xe.glyphs)||fr.push({command:"setGlyphs",args:[Xe.glyphs]}),H(u.transition,Xe.transition)||fr.push({command:"setTransition",args:[Xe.transition]}),H(u.light,Xe.light)||fr.push({command:"setLight",args:[Xe.light]}),H(u.terrain,Xe.terrain)||fr.push({command:"setTerrain",args:[Xe.terrain]}),H(u.sky,Xe.sky)||fr.push({command:"setSky",args:[Xe.sky]}),H(u.projection,Xe.projection)||fr.push({command:"setProjection",args:[Xe.projection]});const Ar={},_r=[];!function(u,Xe,fr,Ar){let _r;for(_r in Xe=Xe||{},u=u||{})Object.prototype.hasOwnProperty.call(u,_r)&&(Object.prototype.hasOwnProperty.call(Xe,_r)||W(_r,fr,Ar));for(_r in Xe)Object.prototype.hasOwnProperty.call(Xe,_r)&&(Object.prototype.hasOwnProperty.call(u,_r)?H(u[_r],Xe[_r])||("geojson"===u[_r].type&&"geojson"===Xe[_r].type&&tt(u,Xe,_r)?Y(fr,{command:"setGeoJSONSourceData",args:[_r,Xe[_r].data]}):Q(_r,Xe,fr,Ar)):J(_r,Xe,fr))}(u.sources,Xe.sources,_r,Ar);const wr=[];u.layers&&u.layers.forEach((u=>{"source"in u&&Ar[u.source]?fr.push({command:"removeLayer",args:[u.id]}):wr.push(u)})),fr=fr.concat(_r),function(u,Xe,fr){Xe=Xe||[];const Ar=(u=u||[]).map(rt),_r=Xe.map(rt),wr=u.reduce(nt,{}),Kr=Xe.reduce(nt,{}),In=Ar.slice(),io=Object.create(null);let no,oo,so,ao,co;for(let u=0,Xe=0;u<Ar.length;u++)no=Ar[u],Object.prototype.hasOwnProperty.call(Kr,no)?Xe++:(Y(fr,{command:"removeLayer",args:[no]}),In.splice(In.indexOf(no,Xe),1));for(let u=0,Xe=0;u<_r.length;u++)no=_r[_r.length-1-u],In[In.length-1-u]!==no&&(Object.prototype.hasOwnProperty.call(wr,no)?(Y(fr,{command:"removeLayer",args:[no]}),In.splice(In.lastIndexOf(no,In.length-Xe),1)):Xe++,ao=In[In.length-u],Y(fr,{command:"addLayer",args:[Kr[no],ao]}),In.splice(In.length-u,0,no),io[no]=!0);for(let u=0;u<_r.length;u++)if(no=_r[u],oo=wr[no],so=Kr[no],!io[no]&&!H(oo,so))if(H(oo.source,so.source)&&H(oo["source-layer"],so["source-layer"])&&H(oo.type,so.type)){for(co in et(oo.layout,so.layout,fr,no,null,"setLayoutProperty"),et(oo.paint,so.paint,fr,no,null,"setPaintProperty"),H(oo.filter,so.filter)||Y(fr,{command:"setFilter",args:[no,so.filter]}),H(oo.minzoom,so.minzoom)&&H(oo.maxzoom,so.maxzoom)||Y(fr,{command:"setLayerZoomRange",args:[no,so.minzoom,so.maxzoom]}),oo)Object.prototype.hasOwnProperty.call(oo,co)&&"layout"!==co&&"paint"!==co&&"filter"!==co&&"metadata"!==co&&"minzoom"!==co&&"maxzoom"!==co&&(0===co.indexOf("paint.")?et(oo[co],so[co],fr,no,co.slice(6),"setPaintProperty"):H(oo[co],so[co])||Y(fr,{command:"setLayerProperty",args:[no,co,so[co]]}));for(co in so)Object.prototype.hasOwnProperty.call(so,co)&&!Object.prototype.hasOwnProperty.call(oo,co)&&"layout"!==co&&"paint"!==co&&"filter"!==co&&"metadata"!==co&&"minzoom"!==co&&"maxzoom"!==co&&(0===co.indexOf("paint.")?et(oo[co],so[co],fr,no,co.slice(6),"setPaintProperty"):H(oo[co],so[co])||Y(fr,{command:"setLayerProperty",args:[no,co,so[co]]}))}else Y(fr,{command:"removeLayer",args:[no]}),ao=In[In.lastIndexOf(no)+1],Y(fr,{command:"addLayer",args:[so,ao]})}(wr,Xe.layers,fr)}catch(u){console.warn("Unable to compute style diff:",u),fr=[{command:"setStyle",args:[Xe]}]}return fr},u.aD=function(u){const Xe=[],fr=u.id;return void 0===fr&&Xe.push({message:`layers.${fr}: missing required property "id"`}),void 0===u.render&&Xe.push({message:`layers.${fr}: missing required method "render"`}),u.renderingMode&&"2d"!==u.renderingMode&&"3d"!==u.renderingMode&&Xe.push({message:`layers.${fr}: property "renderingMode" must be either "2d" or "3d"`}),Xe},u.aE=function t(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let fr=0;fr<u.length;fr++)if(!t(u[fr],Xe[fr]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const fr in u)if(!t(u[fr],Xe[fr]))return!1;return!0}return u===Xe},u.aF=v,u.aG=b,u.aH=class extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},u.aI=_a,u.aJ=class extends wa{constructor(u,Xe){super(u,Xe),this.current=mg}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let Xe=1;Xe<16;Xe++)if(u[Xe]!==this.current[Xe]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},u.aK=Aa,u.aL=Sa,u.aM=Kt,u.aN=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},u.aO=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},u.aP=function(u,Xe,fr,Ar,_r,wr,Kr){var In=1/(Xe-fr),io=1/(Ar-_r),no=1/(wr-Kr);return u[0]=-2*In,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*io,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*no,u[11]=0,u[12]=(Xe+fr)*In,u[13]=(_r+Ar)*io,u[14]=(Kr+wr)*no,u[15]=1,u},u.aQ=wg,u.aR=class extends _s{},u.aS=Vh,u.aT=class extends Ss{},u.aU=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},u.aV=So,u.aW=Zs,u.aX=na,u.aY=class extends Bs{},u.aZ=function(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]&&u[2]===Xe[2]&&u[3]===Xe[3]&&u[4]===Xe[4]&&u[5]===Xe[5]&&u[6]===Xe[6]&&u[7]===Xe[7]&&u[8]===Xe[8]&&u[9]===Xe[9]&&u[10]===Xe[10]&&u[11]===Xe[11]&&u[12]===Xe[12]&&u[13]===Xe[13]&&u[14]===Xe[14]&&u[15]===Xe[15]},u.a_=function(u,Xe){var fr=u[0],Ar=u[1],_r=u[2],wr=u[3],Kr=u[4],In=u[5],io=u[6],no=u[7],oo=u[8],so=u[9],ao=u[10],co=u[11],go=u[12],ho=u[13],Co=u[14],Io=u[15],xo=Xe[0],Mo=Xe[1],Po=Xe[2],ss=Xe[3],sa=Xe[4],aa=Xe[5],fa=Xe[6],ya=Xe[7],ol=Xe[8],sl=Xe[9],al=Xe[10],cl=Xe[11],hl=Xe[12],ul=Xe[13],dl=Xe[14],pl=Xe[15];return Math.abs(fr-xo)<=_g*Math.max(1,Math.abs(fr),Math.abs(xo))&&Math.abs(Ar-Mo)<=_g*Math.max(1,Math.abs(Ar),Math.abs(Mo))&&Math.abs(_r-Po)<=_g*Math.max(1,Math.abs(_r),Math.abs(Po))&&Math.abs(wr-ss)<=_g*Math.max(1,Math.abs(wr),Math.abs(ss))&&Math.abs(Kr-sa)<=_g*Math.max(1,Math.abs(Kr),Math.abs(sa))&&Math.abs(In-aa)<=_g*Math.max(1,Math.abs(In),Math.abs(aa))&&Math.abs(io-fa)<=_g*Math.max(1,Math.abs(io),Math.abs(fa))&&Math.abs(no-ya)<=_g*Math.max(1,Math.abs(no),Math.abs(ya))&&Math.abs(oo-ol)<=_g*Math.max(1,Math.abs(oo),Math.abs(ol))&&Math.abs(so-sl)<=_g*Math.max(1,Math.abs(so),Math.abs(sl))&&Math.abs(ao-al)<=_g*Math.max(1,Math.abs(ao),Math.abs(al))&&Math.abs(co-cl)<=_g*Math.max(1,Math.abs(co),Math.abs(cl))&&Math.abs(go-hl)<=_g*Math.max(1,Math.abs(go),Math.abs(hl))&&Math.abs(ho-ul)<=_g*Math.max(1,Math.abs(ho),Math.abs(ul))&&Math.abs(Co-dl)<=_g*Math.max(1,Math.abs(Co),Math.abs(dl))&&Math.abs(Io-pl)<=_g*Math.max(1,Math.abs(Io),Math.abs(pl))},u.aa=function(u){const Xe={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((u,fr,Ar,_r)=>{const wr=Ar||_r;return Xe[fr]=!wr||wr.toLowerCase(),""})),Xe["max-age"]){const u=parseInt(Xe["max-age"],10);isNaN(u)?delete Xe["max-age"]:Xe["max-age"]=u}return Xe},u.ab=function(u,Xe){const fr=[];for(const Ar in u)Ar in Xe||fr.push(Ar);return fr},u.ac=y,u.ad=function(u,Xe,fr){var Ar=Math.sin(fr),_r=Math.cos(fr),wr=Xe[0],Kr=Xe[1],In=Xe[2],io=Xe[3],no=Xe[4],oo=Xe[5],so=Xe[6],ao=Xe[7];return Xe!==u&&(u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[0]=wr*_r+no*Ar,u[1]=Kr*_r+oo*Ar,u[2]=In*_r+so*Ar,u[3]=io*_r+ao*Ar,u[4]=no*_r-wr*Ar,u[5]=oo*_r-Kr*Ar,u[6]=so*_r-In*Ar,u[7]=ao*_r-io*Ar,u},u.ae=function(u){var Xe=new vg(16);return Xe[0]=u[0],Xe[1]=u[1],Xe[2]=u[2],Xe[3]=u[3],Xe[4]=u[4],Xe[5]=u[5],Xe[6]=u[6],Xe[7]=u[7],Xe[8]=u[8],Xe[9]=u[9],Xe[10]=u[10],Xe[11]=u[11],Xe[12]=u[12],Xe[13]=u[13],Xe[14]=u[14],Xe[15]=u[15],Xe},u.af=po,u.ag=function(u,Xe){let fr=0,Ar=0;if("constant"===u.kind)Ar=u.layoutSize;else if("source"!==u.kind){const{interpolationType:_r,minZoom:wr,maxZoom:Kr}=u,In=_r?y(Be.interpolationFactor(_r,Xe,wr,Kr),0,1):0;"camera"===u.kind?Ar=Kl.number(u.minSize,u.maxSize,In):fr=In}return{uSizeT:fr,uSize:Ar}},u.ai=function(u,{uSize:Xe,uSizeT:fr},{lowerSize:Ar,upperSize:_r}){return"source"===u.kind?Ar/qh:"composite"===u.kind?Kl.number(Ar/qh,_r/qh,fr):Xe},u.aj=uc,u.ak=function(u,Xe,Ar,_r){const wr=Xe.y-u.y,Kr=Xe.x-u.x,In=_r.y-Ar.y,io=_r.x-Ar.x,no=In*Kr-io*wr;if(0===no)return null;const oo=(io*(u.y-Ar.y)-In*(u.x-Ar.x))/no;return new fr(u.x+oo*Kr,u.y+oo*wr)},u.al=Xc,u.am=qa,u.an=lo,u.ao=function(u){let Xe=1/0,fr=1/0,Ar=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),fr=Math.min(fr,wr.y),Ar=Math.max(Ar,wr.x),_r=Math.max(_r,wr.y);return[Xe,fr,Ar,_r]},u.ap=Th,u.ar=sc,u.as=function(u,Xe){var fr=Xe[0],Ar=Xe[1],_r=Xe[2],wr=Xe[3],Kr=Xe[4],In=Xe[5],io=Xe[6],no=Xe[7],oo=Xe[8],so=Xe[9],ao=Xe[10],co=Xe[11],go=Xe[12],ho=Xe[13],Co=Xe[14],Io=Xe[15],xo=fr*In-Ar*Kr,Mo=fr*io-_r*Kr,Po=fr*no-wr*Kr,ss=Ar*io-_r*In,sa=Ar*no-wr*In,aa=_r*no-wr*io,fa=oo*ho-so*go,ya=oo*Co-ao*go,ol=oo*Io-co*go,sl=so*Co-ao*ho,al=so*Io-co*ho,cl=ao*Io-co*Co,hl=xo*cl-Mo*al+Po*sl+ss*ol-sa*ya+aa*fa;return hl?(u[0]=(In*cl-io*al+no*sl)*(hl=1/hl),u[1]=(_r*al-Ar*cl-wr*sl)*hl,u[2]=(ho*aa-Co*sa+Io*ss)*hl,u[3]=(ao*sa-so*aa-co*ss)*hl,u[4]=(io*ol-Kr*cl-no*ya)*hl,u[5]=(fr*cl-_r*ol+wr*ya)*hl,u[6]=(Co*Po-go*aa-Io*Mo)*hl,u[7]=(oo*aa-ao*Po+co*Mo)*hl,u[8]=(Kr*al-In*ol+no*fa)*hl,u[9]=(Ar*ol-fr*al-wr*fa)*hl,u[10]=(go*sa-ho*Po+Io*xo)*hl,u[11]=(so*Po-oo*sa-co*xo)*hl,u[12]=(In*ya-Kr*sl-io*fa)*hl,u[13]=(fr*sl-Ar*ya+_r*fa)*hl,u[14]=(ho*Mo-go*ss-Co*xo)*hl,u[15]=(oo*ss-so*Mo+ao*xo)*hl,u):null},u.at=vh,u.au=Yu,u.av=kh,u.aw=function(){const u={},Xe=Io.$version;for(const fr in Io.$root){const Ar=Io.$root[fr];if(Ar.required){let _r=null;_r="version"===fr?Xe:"array"===Ar.type?[]:{},null!=_r&&(u[fr]=_r)}}return u},u.ax=Ii,u.ay=D,u.az=function(u){u=u.slice();const Xe=Object.create(null);for(let fr=0;fr<u.length;fr++)Xe[u[fr].id]=u[fr];for(let fr=0;fr<u.length;fr++)"ref"in u[fr]&&(u[fr]=X(u[fr],Xe[u[fr].ref]));return u},u.b=I,u.b0=function(u,Xe,fr){return u[0]=Xe[0]*fr[0],u[1]=Xe[1]*fr[1],u[2]=Xe[2]*fr[2],u[3]=Xe[3]*fr[3],u},u.b1=function(u,Xe){return u[0]*Xe[0]+u[1]*Xe[1]+u[2]*Xe[2]+u[3]*Xe[3]},u.b2=m,u.b3=Dc,u.b4=Ec,u.b5=function(u,Xe,fr,Ar,_r){var wr,Kr=1/Math.tan(Xe/2);return u[0]=Kr/fr,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Kr,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,null!=_r&&_r!==1/0?(u[10]=(_r+Ar)*(wr=1/(Ar-_r)),u[14]=2*_r*Ar*wr):(u[10]=-1,u[14]=-2*Ar),u},u.b6=function(u,Xe,fr){var Ar=Math.sin(fr),_r=Math.cos(fr),wr=Xe[4],Kr=Xe[5],In=Xe[6],io=Xe[7],no=Xe[8],oo=Xe[9],so=Xe[10],ao=Xe[11];return Xe!==u&&(u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[4]=wr*_r+no*Ar,u[5]=Kr*_r+oo*Ar,u[6]=In*_r+so*Ar,u[7]=io*_r+ao*Ar,u[8]=no*_r-wr*Ar,u[9]=oo*_r-Kr*Ar,u[10]=so*_r-In*Ar,u[11]=ao*_r-io*Ar,u},u.b7=f,u.b8=In,u.b9=function(u){return u*Math.PI/180},u.bA=function(u){return u.message===go},u.bB=bn,u.bC=ig,u.ba=function(u,Xe){const{x:fr,y:Ar}=Tc.fromLngLat(Xe);return!(u<0||u>25||Ar<0||Ar>=1||fr<0||fr>=1)},u.bb=function(u,Xe){return u[0]=Xe[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Xe[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=Xe[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},u.bc=class extends hs{},u.bd=Ru,u.be=sd,u.bg=L,u.bh=function(u,Xe){ho.REGISTERED_PROTOCOLS[u]=Xe},u.bi=function(u){delete ho.REGISTERED_PROTOCOLS[u]},u.bj=function(u,Xe){const fr={};for(let Ar=0;Ar<u.length;Ar++){const _r=Xe&&Xe[u[Ar].id]||Ln(u[Ar]);Xe&&(Xe[u[Ar].id]=_r);let wr=fr[_r];wr||(wr=fr[_r]=[]),wr.push(u[Ar])}const Ar=[];for(const u in fr)Ar.push(fr[u]);return Ar},u.bk=wi,u.bl=Uc,u.bm=Nc,u.bn=Tu,u.bo=function(Xe){Xe.bucket.createArrays(),Xe.bucket.tilePixelRatio=Cg/(512*Xe.bucket.overscaling),Xe.bucket.compareText={},Xe.bucket.iconsNeedLinear=!1;const fr=Xe.bucket.layers[0],Ar=fr.layout,_r=fr._unevaluatedLayout._values,wr={layoutIconSize:_r["icon-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),layoutTextSize:_r["text-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),textMaxSize:_r["text-size"].possiblyEvaluate(new Ui(18))};if("composite"===Xe.bucket.textSizeData.kind){const{minZoom:u,maxZoom:fr}=Xe.bucket.textSizeData;wr.compositeTextSizes=[_r["text-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["text-size"].possiblyEvaluate(new Ui(fr),Xe.canonical)]}if("composite"===Xe.bucket.iconSizeData.kind){const{minZoom:u,maxZoom:fr}=Xe.bucket.iconSizeData;wr.compositeIconSizes=[_r["icon-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["icon-size"].possiblyEvaluate(new Ui(fr),Xe.canonical)]}const Kr=Ar.get("text-line-height")*Th,In="viewport"!==Ar.get("text-rotation-alignment")&&"point"!==Ar.get("symbol-placement"),io=Ar.get("text-keep-upright"),no=Ar.get("text-size");for(const _r of Xe.bucket.features){const oo=Ar.get("text-font").evaluate(_r,{},Xe.canonical).join(","),so=no.evaluate(_r,{},Xe.canonical),ao=wr.layoutTextSize.evaluate(_r,{},Xe.canonical),co=wr.layoutIconSize.evaluate(_r,{},Xe.canonical),go={horizontal:{},vertical:void 0},ho=_r.text;let Co,Io=[0,0];if(ho){const wr=ho.toString(),no=Ar.get("text-letter-spacing").evaluate(_r,{},Xe.canonical)*Th,co=Ci(wr)?no:0,Co=Ar.get("text-anchor").evaluate(_r,{},Xe.canonical),xo=xh(fr,_r,Xe.canonical);if(!xo){const u=Ar.get("text-radial-offset").evaluate(_r,{},Xe.canonical);Io=u?gh(Co,[u*Th,qu]):Ar.get("text-offset").evaluate(_r,{},Xe.canonical).map((u=>u*Th))}let Mo=In?"center":Ar.get("text-justify").evaluate(_r,{},Xe.canonical);const Po="point"===Ar.get("symbol-placement")?Ar.get("text-max-width").evaluate(_r,{},Xe.canonical)*Th:1/0,w=()=>{Xe.bucket.allowVerticalPlacement&&Pi(wr)&&(go.vertical=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,"left",co,Io,u.ah.vertical,!0,ao,so))};if(!In&&xo){const fr=new Set;if("auto"===Mo)for(let u=0;u<xo.values.length;u+=2)fr.add(vh(xo.values[u]));else fr.add(Mo);let Ar=!1;for(const _r of fr)if(!go.horizontal[_r])if(Ar)go.horizontal[_r]=go.horizontal[0];else{const fr=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,"center",_r,co,Io,u.ah.horizontal,!1,ao,so);fr&&(go.horizontal[_r]=fr,Ar=1===fr.positionedLines.length)}w()}else{"auto"===Mo&&(Mo=vh(Co));const fr=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,Mo,co,Io,u.ah.horizontal,!1,ao,so);fr&&(go.horizontal[Mo]=fr),w(),Pi(wr)&&In&&io&&(go.vertical=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,Mo,co,Io,u.ah.vertical,!1,ao,so))}}let xo=!1;if(_r.icon&&_r.icon.name){const u=Xe.imageMap[_r.icon.name];u&&(Co=Wu(Xe.imagePositions[_r.icon.name],Ar.get("icon-offset").evaluate(_r,{},Xe.canonical),Ar.get("icon-anchor").evaluate(_r,{},Xe.canonical)),xo=!!u.sdf,void 0===Xe.bucket.sdfIcons?Xe.bucket.sdfIcons=xo:Xe.bucket.sdfIcons!==xo&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(u.pixelRatio!==Xe.bucket.pixelRatio||0!==Ar.get("icon-rotate").constantOr(1))&&(Xe.bucket.iconsNeedLinear=!0))}const Mo=_h(go.horizontal)||go.vertical;Xe.bucket.iconsInText=!!Mo&&Mo.iconsInText,(Mo||Co)&&bh(Xe.bucket,_r,go,Co,Xe.imageMap,wr,ao,co,Io,xo,Xe.canonical)}Xe.showCollisionBoxes&&Xe.bucket.generateCollisionDebugBuffers()},u.bp=Ul,u.bq=il,u.br=Il,u.bs=zg,u.bt=Hh,u.bu=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return 0===u.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},u.bv=function(u,Xe,fr,Ar,_r){return e(this,void 0,void 0,(function*(){if(p())try{return yield P(u,Xe,fr,Ar,_r)}catch(u){}return function(u,Xe,fr,Ar,_r){const wr=u.width,Kr=u.height;ao&&co||(ao=new OffscreenCanvas(wr,Kr),co=ao.getContext("2d",{willReadFrequently:!0})),ao.width=wr,ao.height=Kr,co.drawImage(u,0,0,wr,Kr);const In=co.getImageData(Xe,fr,Ar,_r);return co.clearRect(0,0,wr,Kr),In.data}(u,Xe,fr,Ar,_r)}))},u.bw=Rc,u.bx=r,u.by=Xe,u.bz=Jh,u.c=E,u.d=u=>e(void 0,void 0,void 0,(function*(){if(0===u.byteLength)return createImageBitmap(new ImageData(1,1));const Xe=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(Xe)}catch(u){throw new Error(`Could not load image because of ${u.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),u.e=g,u.f=u=>new Promise(((Xe,fr)=>{const Ar=new Image;Ar.onload=()=>{Xe(Ar),URL.revokeObjectURL(Ar.src),Ar.onload=null,window.requestAnimationFrame((()=>{Ar.src=so}))},Ar.onerror=()=>fr(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 _r=new Blob([new Uint8Array(u)],{type:"image/png"});Ar.src=u.byteLength?URL.createObjectURL(_r):so})),u.g=T,u.h=(u,Xe)=>O(g(u,{type:"json"}),Xe),u.i=k,u.j=N,u.k=q,u.l=(u,Xe)=>O(g(u,{type:"arrayBuffer"}),Xe),u.m=O,u.n=function(u){return new Hh(u).readFields(zu,[])},u.o=_o,u.p=Vu,u.q=rs,u.r=Ic,u.s=j,u.t=xi,u.u=mc,u.v=Io,u.w=A,u.x=function([u,Xe,fr]){return Xe+=90,Xe*=Math.PI/180,fr*=Math.PI/180,{x:u*Math.cos(Xe)*Math.sin(fr),y:u*Math.sin(Xe)*Math.sin(fr),z:u*Math.cos(fr)}},u.y=Kl,u.z=Ui})),define("worker",0,(function(u){class t{constructor(u){this.keyCache={},u&&this.replace(u)}replace(u){this._layerConfigs={},this._layers={},this.update(u,[])}update(Xe,fr){for(const fr of Xe){this._layerConfigs[fr.id]=fr;const Xe=this._layers[fr.id]=u.aA(fr);Xe._featureFilter=u.a7(Xe.filter),this.keyCache[fr.id]&&delete this.keyCache[fr.id]}for(const u of fr)delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u];this.familiesBySource={};const Ar=u.bj(Object.values(this._layerConfigs),this.keyCache);for(const u of Ar){const Xe=u.map((u=>this._layers[u.id])),fr=Xe[0];if("none"===fr.visibility)continue;const Ar=fr.source||"";let _r=this.familiesBySource[Ar];_r||(_r=this.familiesBySource[Ar]={});const wr=fr.sourceLayer||"_geojsonTileLayer";let Kr=_r[wr];Kr||(Kr=_r[wr]=[]),Kr.push(Xe)}}}class o{constructor(Xe){const fr={},Ar=[];for(const u in Xe){const _r=Xe[u],wr=fr[u]={};for(const u in _r){const Xe=_r[+u];if(!Xe||0===Xe.bitmap.width||0===Xe.bitmap.height)continue;const fr={x:0,y:0,w:Xe.bitmap.width+2,h:Xe.bitmap.height+2};Ar.push(fr),wr[u]={rect:fr,metrics:Xe.metrics}}}const{w:_r,h:wr}=u.p(Ar),Kr=new u.o({width:_r||1,height:wr||1});for(const Ar in Xe){const _r=Xe[Ar];for(const Xe in _r){const wr=_r[+Xe];if(!wr||0===wr.bitmap.width||0===wr.bitmap.height)continue;const In=fr[Ar][Xe].rect;u.o.copy(wr.bitmap,Kr,{x:0,y:0},{x:In.x+1,y:In.y+1},wr.bitmap)}}this.image=Kr,this.positions=fr}}u.bk("GlyphAtlas",o);class i{constructor(Xe){this.tileID=new u.S(Xe.tileID.overscaledZ,Xe.tileID.wrap,Xe.tileID.canonical.z,Xe.tileID.canonical.x,Xe.tileID.canonical.y),this.uid=Xe.uid,this.zoom=Xe.zoom,this.pixelRatio=Xe.pixelRatio,this.tileSize=Xe.tileSize,this.source=Xe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Xe.showCollisionBoxes,this.collectResourceTiming=!!Xe.collectResourceTiming,this.returnDependencies=!!Xe.returnDependencies,this.promoteId=Xe.promoteId,this.inFlightDependencies=[]}parse(Xe,fr,Ar,_r){return u._(this,void 0,void 0,(function*(){this.status="parsing",this.data=Xe,this.collisionBoxArray=new u.a5;const wr=new u.bl(Object.keys(Xe.layers).sort()),Kr=new u.bm(this.tileID,this.promoteId);Kr.bucketLayerIDs=[];const In={},io={featureIndex:Kr,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ar},no=fr.familiesBySource[this.source];for(const fr in no){const _r=Xe.layers[fr];if(!_r)continue;1===_r.version&&u.w(`Vector tile source "${this.source}" layer "${fr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const oo=wr.encode(fr),so=[];for(let u=0;u<_r.length;u++){const Xe=_r.feature(u),Ar=Kr.getId(Xe,fr);so.push({feature:Xe,id:Ar,index:u,sourceLayerIndex:oo})}for(const Xe of no[fr]){const fr=Xe[0];fr.source!==this.source&&u.w(`layer.source = ${fr.source} does not equal this.source = ${this.source}`),fr.minzoom&&this.zoom<Math.floor(fr.minzoom)||fr.maxzoom&&this.zoom>=fr.maxzoom||"none"!==fr.visibility&&(s(Xe,this.zoom,Ar),(In[fr.id]=fr.createBucket({index:Kr.bucketLayerIDs.length,layers:Xe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:oo,sourceID:this.source})).populate(so,io,this.tileID.canonical),Kr.bucketLayerIDs.push(Xe.map((u=>u.id))))}}const oo=u.aF(io.glyphDependencies,(u=>Object.keys(u).map(Number)));this.inFlightDependencies.forEach((u=>null==u?void 0:u.abort())),this.inFlightDependencies=[];let so=Promise.resolve({});if(Object.keys(oo).length){const u=new AbortController;this.inFlightDependencies.push(u),so=_r.sendAsync({type:"GG",data:{stacks:oo,source:this.source,tileID:this.tileID,type:"glyphs"}},u)}const ao=Object.keys(io.iconDependencies);let co=Promise.resolve({});if(ao.length){const u=new AbortController;this.inFlightDependencies.push(u),co=_r.sendAsync({type:"GI",data:{icons:ao,source:this.source,tileID:this.tileID,type:"icons"}},u)}const go=Object.keys(io.patternDependencies);let ho=Promise.resolve({});if(go.length){const u=new AbortController;this.inFlightDependencies.push(u),ho=_r.sendAsync({type:"GI",data:{icons:go,source:this.source,tileID:this.tileID,type:"patterns"}},u)}const[Co,Io,xo]=yield Promise.all([so,co,ho]),Mo=new o(Co),Po=new u.bn(Io,xo);for(const Xe in In){const fr=In[Xe];fr instanceof u.a6?(s(fr.layers,this.zoom,Ar),u.bo({bucket:fr,glyphMap:Co,glyphPositions:Mo.positions,imageMap:Io,imagePositions:Po.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):fr.hasPattern&&(fr instanceof u.bp||fr instanceof u.bq||fr instanceof u.br)&&(s(fr.layers,this.zoom,Ar),fr.addFeatures(io,this.tileID.canonical,Po.patternPositions))}return this.status="done",{buckets:Object.values(In).filter((u=>!u.isEmpty())),featureIndex:Kr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Mo.image,imageAtlas:Po,glyphMap:this.returnDependencies?Co:null,iconMap:this.returnDependencies?Io:null,glyphPositions:this.returnDependencies?Mo.positions:null}}))}}function s(Xe,fr,Ar){const _r=new u.z(fr);for(const u of Xe)u.recalculate(_r,Ar)}class r{constructor(u,Xe,fr){this.actor=u,this.layerIndex=Xe,this.availableImages=fr,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Xe,fr){return u._(this,void 0,void 0,(function*(){const Ar=yield u.l(Xe.request,fr);try{return{vectorTile:new u.bs.VectorTile(new u.bt(Ar.data)),rawData:Ar.data,cacheControl:Ar.cacheControl,expires:Ar.expires}}catch(u){const fr=new Uint8Array(Ar.data);let _r=`Unable to parse the tile at ${Xe.request.url}, `;throw _r+=31===fr[0]&&139===fr[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${u.message}`,new Error(_r)}}))}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const fr=Xe.uid,Ar=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bu(Xe.request),_r=new i(Xe);this.loading[fr]=_r;const wr=new AbortController;_r.abort=wr;try{const Kr=yield this.loadVectorTile(Xe,wr);if(delete this.loading[fr],!Kr)return null;const In=Kr.rawData,io={};Kr.expires&&(io.expires=Kr.expires),Kr.cacheControl&&(io.cacheControl=Kr.cacheControl);const no={};if(Ar){const u=Ar.finish();u&&(no.resourceTiming=JSON.parse(JSON.stringify(u)))}_r.vectorTile=Kr.vectorTile;const oo=_r.parse(Kr.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[fr]=_r,this.fetching[fr]={rawTileData:In,cacheControl:io,resourceTiming:no};try{const Xe=yield oo;return u.e({rawTileData:In.slice(0)},Xe,io,no)}finally{delete this.fetching[fr]}}catch(u){throw delete this.loading[fr],_r.status="done",this.loaded[fr]=_r,u}}))}reloadTile(Xe){return u._(this,void 0,void 0,(function*(){const fr=Xe.uid;if(!this.loaded||!this.loaded[fr])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Ar=this.loaded[fr];if(Ar.showCollisionBoxes=Xe.showCollisionBoxes,"parsing"===Ar.status){const Xe=yield Ar.parse(Ar.vectorTile,this.layerIndex,this.availableImages,this.actor);let _r;if(this.fetching[fr]){const{rawTileData:Ar,cacheControl:wr,resourceTiming:Kr}=this.fetching[fr];delete this.fetching[fr],_r=u.e({rawTileData:Ar.slice(0)},Xe,wr,Kr)}else _r=Xe;return _r}if("done"===Ar.status&&Ar.vectorTile)return Ar.parse(Ar.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(Xe){return u._(this,void 0,void 0,(function*(){const u=this.loading,fr=Xe.uid;u&&u[fr]&&u[fr].abort&&(u[fr].abort.abort(),delete u[fr])}))}removeTile(Xe){return u._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[Xe.uid]&&delete this.loaded[Xe.uid]}))}}class n{constructor(){this.loaded={}}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const{uid:fr,encoding:Ar,rawImageData:_r,redFactor:wr,greenFactor:Kr,blueFactor:In,baseShift:io}=Xe,no=_r.width+2,oo=_r.height+2,so=u.b(_r)?new u.R({width:no,height:oo},yield u.bv(_r,-1,-1,no,oo)):_r,ao=new u.bw(fr,so,Ar,wr,Kr,In,io);return this.loaded=this.loaded||{},this.loaded[fr]=ao,ao}))}removeTile(u){const Xe=this.loaded,fr=u.uid;Xe&&Xe[fr]&&delete Xe[fr]}}function a(u,Xe){if(0!==u.length){l(u[0],Xe);for(var fr=1;fr<u.length;fr++)l(u[fr],!Xe)}}function l(u,Xe){for(var fr=0,Ar=0,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++){var In=(u[_r][0]-u[Kr][0])*(u[Kr][1]+u[_r][1]),io=fr+In;Ar+=Math.abs(fr)>=Math.abs(In)?fr-io+In:In-io+fr,fr=io}fr+Ar>=0!=!!Xe&&u.reverse()}var Xe=u.bx((function e(u,Xe){var fr,Ar=u&&u.type;if("FeatureCollection"===Ar)for(fr=0;fr<u.features.length;fr++)e(u.features[fr],Xe);else if("GeometryCollection"===Ar)for(fr=0;fr<u.geometries.length;fr++)e(u.geometries[fr],Xe);else if("Feature"===Ar)e(u.geometry,Xe);else if("Polygon"===Ar)a(u.coordinates,Xe);else if("MultiPolygon"===Ar)for(fr=0;fr<u.coordinates.length;fr++)a(u.coordinates[fr],Xe);return u}));const fr=u.bs.VectorTileFeature.prototype.toGeoJSON;var Ar={exports:{}},_r=u.by,wr=u.bs.VectorTileFeature,Kr=p;function p(u,Xe){this.options=Xe||{},this.features=u,this.length=u.length}function m(u,Xe){this.id="number"==typeof u.id?u.id:void 0,this.type=u.type,this.rawGeometry=1===u.type?[u.geometry]:u.geometry,this.properties=u.tags,this.extent=Xe||4096}p.prototype.feature=function(u){return new m(this.features[u],this.options.extent)},m.prototype.loadGeometry=function(){var u=this.rawGeometry;this.geometry=[];for(var Xe=0;Xe<u.length;Xe++){for(var fr=u[Xe],Ar=[],wr=0;wr<fr.length;wr++)Ar.push(new _r(fr[wr][0],fr[wr][1]));this.geometry.push(Ar)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var u=this.geometry,Xe=1/0,fr=-1/0,Ar=1/0,_r=-1/0,wr=0;wr<u.length;wr++)for(var Kr=u[wr],In=0;In<Kr.length;In++){var io=Kr[In];Xe=Math.min(Xe,io.x),fr=Math.max(fr,io.x),Ar=Math.min(Ar,io.y),_r=Math.max(_r,io.y)}return[Xe,Ar,fr,_r]},m.prototype.toGeoJSON=wr.prototype.toGeoJSON;var In=u.bz,io=Kr;function w(u){var Xe=new In;return function(u,Xe){for(var fr in u.layers)Xe.writeMessage(3,x,u.layers[fr])}(u,Xe),Xe.finish()}function x(u,Xe){var fr;Xe.writeVarintField(15,u.version||1),Xe.writeStringField(1,u.name||""),Xe.writeVarintField(5,u.extent||4096);var Ar={keys:[],values:[],keycache:{},valuecache:{}};for(fr=0;fr<u.length;fr++)Ar.feature=u.feature(fr),Xe.writeMessage(2,b,Ar);var _r=Ar.keys;for(fr=0;fr<_r.length;fr++)Xe.writeStringField(3,_r[fr]);var wr=Ar.values;for(fr=0;fr<wr.length;fr++)Xe.writeMessage(4,P,wr[fr])}function b(u,Xe){var fr=u.feature;void 0!==fr.id&&Xe.writeVarintField(1,fr.id),Xe.writeMessage(2,S,u),Xe.writeVarintField(3,fr.type),Xe.writeMessage(4,I,fr)}function S(u,Xe){var fr=u.feature,Ar=u.keys,_r=u.values,wr=u.keycache,Kr=u.valuecache;for(var In in fr.properties){var io=fr.properties[In],no=wr[In];if(null!==io){void 0===no&&(Ar.push(In),wr[In]=no=Ar.length-1),Xe.writeVarint(no);var oo=typeof io;"string"!==oo&&"boolean"!==oo&&"number"!==oo&&(io=JSON.stringify(io));var so=oo+":"+io,ao=Kr[so];void 0===ao&&(_r.push(io),Kr[so]=ao=_r.length-1),Xe.writeVarint(ao)}}}function _(u,Xe){return(Xe<<3)+(7&u)}function M(u){return u<<1^u>>31}function I(u,Xe){for(var fr=u.loadGeometry(),Ar=u.type,_r=0,wr=0,Kr=fr.length,In=0;In<Kr;In++){var io=fr[In],no=1;1===Ar&&(no=io.length),Xe.writeVarint(_(1,no));for(var oo=3===Ar?io.length-1:io.length,so=0;so<oo;so++){1===so&&1!==Ar&&Xe.writeVarint(_(2,oo-1));var ao=io[so].x-_r,co=io[so].y-wr;Xe.writeVarint(M(ao)),Xe.writeVarint(M(co)),_r+=ao,wr+=co}3===Ar&&Xe.writeVarint(_(7,1))}}function P(u,Xe){var fr=typeof u;"string"===fr?Xe.writeStringField(1,u):"boolean"===fr?Xe.writeBooleanField(7,u):"number"===fr&&(u%1!=0?Xe.writeDoubleField(3,u):u<0?Xe.writeSVarintField(6,u):Xe.writeVarintField(5,u))}Ar.exports=w,Ar.exports.fromVectorTileJs=w,Ar.exports.fromGeojsonVt=function(u,Xe){Xe=Xe||{};var fr={};for(var Ar in u)fr[Ar]=new io(u[Ar].features,Xe),fr[Ar].name=Ar,fr[Ar].version=Xe.version,fr[Ar].extent=Xe.extent;return w({layers:fr})},Ar.exports.GeoJSONWrapper=io;var no=u.bx(Ar.exports);const oo={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:u=>u},so=Math.fround||(ao=new Float32Array(1),u=>(ao[0]=+u,ao[0]));var ao;const co=3,go=5,ho=6;class z{constructor(u){this.options=Object.assign(Object.create(oo),u),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(u){const{log:Xe,minZoom:fr,maxZoom:Ar}=this.options;Xe&&console.time("total time");const _r=`prepare ${u.length} points`;Xe&&console.time(_r),this.points=u;const wr=[];for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];if(!fr.geometry)continue;const[Ar,_r]=fr.geometry.coordinates,Kr=so(G(Ar)),In=so(j(_r));wr.push(Kr,In,1/0,Xe,-1,1),this.options.reduce&&wr.push(0)}let Kr=this.trees[Ar+1]=this._createTree(wr);Xe&&console.timeEnd(_r);for(let u=Ar;u>=fr;u--){const fr=+Date.now();Kr=this.trees[u]=this._createTree(this._cluster(Kr,u)),Xe&&console.log("z%d: %d clusters in %dms",u,Kr.numItems,+Date.now()-fr)}return Xe&&console.timeEnd("total time"),this}getClusters(u,Xe){let fr=((u[0]+180)%360+360)%360-180;const Ar=Math.max(-90,Math.min(90,u[1]));let _r=180===u[2]?180:((u[2]+180)%360+360)%360-180;const wr=Math.max(-90,Math.min(90,u[3]));if(u[2]-u[0]>=360)fr=-180,_r=180;else if(fr>_r){const u=this.getClusters([fr,Ar,180,wr],Xe),Kr=this.getClusters([-180,Ar,_r,wr],Xe);return u.concat(Kr)}const Kr=this.trees[this._limitZoom(Xe)],In=Kr.range(G(fr),j(wr),G(_r),j(Ar)),io=Kr.data,no=[];for(const u of In){const Xe=this.stride*u;no.push(io[Xe+go]>1?A(io,Xe,this.clusterProps):this.points[io[Xe+co]])}return no}getChildren(u){const Xe=this._getOriginId(u),fr=this._getOriginZoom(u),Ar="No cluster with the specified id.",_r=this.trees[fr];if(!_r)throw new Error(Ar);const wr=_r.data;if(Xe*this.stride>=wr.length)throw new Error(Ar);const Kr=this.options.radius/(this.options.extent*Math.pow(2,fr-1)),In=_r.within(wr[Xe*this.stride],wr[Xe*this.stride+1],Kr),io=[];for(const Xe of In){const fr=Xe*this.stride;wr[fr+4]===u&&io.push(wr[fr+go]>1?A(wr,fr,this.clusterProps):this.points[wr[fr+co]])}if(0===io.length)throw new Error(Ar);return io}getLeaves(u,Xe,fr){const Ar=[];return this._appendLeaves(Ar,u,Xe=Xe||10,fr=fr||0,0),Ar}getTile(u,Xe,fr){const Ar=this.trees[this._limitZoom(u)],_r=Math.pow(2,u),{extent:wr,radius:Kr}=this.options,In=Kr/wr,io=(fr-In)/_r,no=(fr+1+In)/_r,oo={features:[]};return this._addTileFeatures(Ar.range((Xe-In)/_r,io,(Xe+1+In)/_r,no),Ar.data,Xe,fr,_r,oo),0===Xe&&this._addTileFeatures(Ar.range(1-In/_r,io,1,no),Ar.data,_r,fr,_r,oo),Xe===_r-1&&this._addTileFeatures(Ar.range(0,io,In/_r,no),Ar.data,-1,fr,_r,oo),oo.features.length?oo:null}getClusterExpansionZoom(u){let Xe=this._getOriginZoom(u)-1;for(;Xe<=this.options.maxZoom;){const fr=this.getChildren(u);if(Xe++,1!==fr.length)break;u=fr[0].properties.cluster_id}return Xe}_appendLeaves(u,Xe,fr,Ar,_r){const wr=this.getChildren(Xe);for(const Xe of wr){const wr=Xe.properties;if(wr&&wr.cluster?_r+wr.point_count<=Ar?_r+=wr.point_count:_r=this._appendLeaves(u,wr.cluster_id,fr,Ar,_r):_r<Ar?_r++:u.push(Xe),u.length===fr)break}return _r}_createTree(Xe){const fr=new u.av(Xe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let u=0;u<Xe.length;u+=this.stride)fr.add(Xe[u],Xe[u+1]);return fr.finish(),fr.data=Xe,fr}_addTileFeatures(u,Xe,fr,Ar,_r,wr){for(const Kr of u){const u=Kr*this.stride,In=Xe[u+go]>1;let io,no,oo;if(In)io=E(Xe,u,this.clusterProps),no=Xe[u],oo=Xe[u+1];else{const fr=this.points[Xe[u+co]];io=fr.properties;const[Ar,_r]=fr.geometry.coordinates;no=G(Ar),oo=j(_r)}const so={type:1,geometry:[[Math.round(this.options.extent*(no*_r-fr)),Math.round(this.options.extent*(oo*_r-Ar))]],tags:io};let ao;ao=In||this.options.generateId?Xe[u+co]:this.points[Xe[u+co]].id,void 0!==ao&&(so.id=ao),wr.features.push(so)}}_limitZoom(u){return Math.max(this.options.minZoom,Math.min(Math.floor(+u),this.options.maxZoom+1))}_cluster(u,Xe){const{radius:fr,extent:Ar,reduce:_r,minPoints:wr}=this.options,Kr=fr/(Ar*Math.pow(2,Xe)),In=u.data,io=[],no=this.stride;for(let fr=0;fr<In.length;fr+=no){if(In[fr+2]<=Xe)continue;In[fr+2]=Xe;const Ar=In[fr],oo=In[fr+1],so=u.within(In[fr],In[fr+1],Kr),ao=In[fr+go];let co=ao;for(const u of so){const fr=u*no;In[fr+2]>Xe&&(co+=In[fr+go])}if(co>ao&&co>=wr){let u,wr=Ar*ao,Kr=oo*ao,ho=-1;const Co=(fr/no<<5)+(Xe+1)+this.points.length;for(const Ar of so){const io=Ar*no;if(In[io+2]<=Xe)continue;In[io+2]=Xe;const oo=In[io+go];wr+=In[io]*oo,Kr+=In[io+1]*oo,In[io+4]=Co,_r&&(u||(u=this._map(In,fr,!0),ho=this.clusterProps.length,this.clusterProps.push(u)),_r(u,this._map(In,io)))}In[fr+4]=Co,io.push(wr/co,Kr/co,1/0,Co,-1,co),_r&&io.push(ho)}else{for(let u=0;u<no;u++)io.push(In[fr+u]);if(co>1)for(const u of so){const fr=u*no;if(!(In[fr+2]<=Xe)){In[fr+2]=Xe;for(let u=0;u<no;u++)io.push(In[fr+u])}}}}return io}_getOriginId(u){return u-this.points.length>>5}_getOriginZoom(u){return(u-this.points.length)%32}_map(u,Xe,fr){if(u[Xe+go]>1){const Ar=this.clusterProps[u[Xe+ho]];return fr?Object.assign({},Ar):Ar}const Ar=this.points[u[Xe+co]].properties,_r=this.options.map(Ar);return fr&&_r===Ar?Object.assign({},_r):_r}}function A(u,Xe,fr){return{type:"Feature",id:u[Xe+co],properties:E(u,Xe,fr),geometry:{type:"Point",coordinates:[(Ar=u[Xe],360*(Ar-.5)),R(u[Xe+1])]}};var Ar}function E(u,Xe,fr){const Ar=u[Xe+go],_r=Ar>=1e4?`${Math.round(Ar/1e3)}k`:Ar>=1e3?Math.round(Ar/100)/10+"k":Ar,wr=u[Xe+ho],Kr=-1===wr?{}:Object.assign({},fr[wr]);return Object.assign(Kr,{cluster:!0,cluster_id:u[Xe+co],point_count:Ar,point_count_abbreviated:_r})}function G(u){return u/360+.5}function j(u){const Xe=Math.sin(u*Math.PI/180),fr=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return fr<0?0:fr>1?1:fr}function R(u){const Xe=(180-360*u)*Math.PI/180;return 360*Math.atan(Math.exp(Xe))/Math.PI-90}function Z(u,Xe,fr,Ar){let _r=Ar;const wr=Xe+(fr-Xe>>1);let Kr,In=fr-Xe;const io=u[Xe],no=u[Xe+1],oo=u[fr],so=u[fr+1];for(let Ar=Xe+3;Ar<fr;Ar+=3){const Xe=N(u[Ar],u[Ar+1],io,no,oo,so);if(Xe>_r)Kr=Ar,_r=Xe;else if(Xe===_r){const u=Math.abs(Ar-wr);u<In&&(Kr=Ar,In=u)}}_r>Ar&&(Kr-Xe>3&&Z(u,Xe,Kr,Ar),u[Kr+2]=_r,fr-Kr>3&&Z(u,Kr,fr,Ar))}function N(u,Xe,fr,Ar,_r,wr){let Kr=_r-fr,In=wr-Ar;if(0!==Kr||0!==In){const io=((u-fr)*Kr+(Xe-Ar)*In)/(Kr*Kr+In*In);io>1?(fr=_r,Ar=wr):io>0&&(fr+=Kr*io,Ar+=In*io)}return Kr=u-fr,In=Xe-Ar,Kr*Kr+In*In}function J(u,Xe,fr,Ar){const _r={id:null==u?null:u,type:Xe,geometry:fr,tags:Ar,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===Xe||"MultiPoint"===Xe||"LineString"===Xe)W(_r,fr);else if("Polygon"===Xe)W(_r,fr[0]);else if("MultiLineString"===Xe)for(const u of fr)W(_r,u);else if("MultiPolygon"===Xe)for(const u of fr)W(_r,u[0]);return _r}function W(u,Xe){for(let fr=0;fr<Xe.length;fr+=3)u.minX=Math.min(u.minX,Xe[fr]),u.minY=Math.min(u.minY,Xe[fr+1]),u.maxX=Math.max(u.maxX,Xe[fr]),u.maxY=Math.max(u.maxY,Xe[fr+1])}function Y(u,Xe,fr,Ar){if(!Xe.geometry)return;const _r=Xe.geometry.coordinates;if(_r&&0===_r.length)return;const wr=Xe.geometry.type,Kr=Math.pow(fr.tolerance/((1<<fr.maxZoom)*fr.extent),2);let In=[],io=Xe.id;if(fr.promoteId?io=Xe.properties[fr.promoteId]:fr.generateId&&(io=Ar||0),"Point"===wr)V(_r,In);else if("MultiPoint"===wr)for(const u of _r)V(u,In);else if("LineString"===wr)X(_r,In,Kr,!1);else if("MultiLineString"===wr){if(fr.lineMetrics){for(const fr of _r)In=[],X(fr,In,Kr,!1),u.push(J(io,"LineString",In,Xe.properties));return}q(_r,In,Kr,!1)}else if("Polygon"===wr)q(_r,In,Kr,!0);else{if("MultiPolygon"!==wr){if("GeometryCollection"===wr){for(const _r of Xe.geometry.geometries)Y(u,{id:io,geometry:_r,properties:Xe.properties},fr,Ar);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const u of _r){const Xe=[];q(u,Xe,Kr,!0),In.push(Xe)}}u.push(J(io,wr,In,Xe.properties))}function V(u,Xe){Xe.push(B(u[0]),H(u[1]),0)}function X(u,Xe,fr,Ar){let _r,wr,Kr=0;for(let fr=0;fr<u.length;fr++){const In=B(u[fr][0]),io=H(u[fr][1]);Xe.push(In,io,0),fr>0&&(Kr+=Ar?(_r*io-In*wr)/2:Math.sqrt(Math.pow(In-_r,2)+Math.pow(io-wr,2))),_r=In,wr=io}const In=Xe.length-3;Xe[2]=1,Z(Xe,0,In,fr),Xe[In+2]=1,Xe.size=Math.abs(Kr),Xe.start=0,Xe.end=Xe.size}function q(u,Xe,fr,Ar){for(let _r=0;_r<u.length;_r++){const wr=[];X(u[_r],wr,fr,Ar),Xe.push(wr)}}function B(u){return u/360+.5}function H(u){const Xe=Math.sin(u*Math.PI/180),fr=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return fr<0?0:fr>1?1:fr}function U(u,Xe,fr,Ar,_r,wr,Kr,In){if(Ar/=Xe,wr>=(fr/=Xe)&&Kr<Ar)return u;if(Kr<fr||wr>=Ar)return null;const io=[];for(const Xe of u){const u=Xe.geometry;let wr=Xe.type;const Kr=0===_r?Xe.minX:Xe.minY,no=0===_r?Xe.maxX:Xe.maxY;if(Kr>=fr&&no<Ar){io.push(Xe);continue}if(no<fr||Kr>=Ar)continue;let oo=[];if("Point"===wr||"MultiPoint"===wr)$(u,oo,fr,Ar,_r);else if("LineString"===wr)K(u,oo,fr,Ar,_r,!1,In.lineMetrics);else if("MultiLineString"===wr)ee(u,oo,fr,Ar,_r,!1);else if("Polygon"===wr)ee(u,oo,fr,Ar,_r,!0);else if("MultiPolygon"===wr)for(const Xe of u){const u=[];ee(Xe,u,fr,Ar,_r,!0),u.length&&oo.push(u)}if(oo.length){if(In.lineMetrics&&"LineString"===wr){for(const u of oo)io.push(J(Xe.id,wr,u,Xe.tags));continue}"LineString"!==wr&&"MultiLineString"!==wr||(1===oo.length?(wr="LineString",oo=oo[0]):wr="MultiLineString"),"Point"!==wr&&"MultiPoint"!==wr||(wr=3===oo.length?"Point":"MultiPoint"),io.push(J(Xe.id,wr,oo,Xe.tags))}}return io.length?io:null}function $(u,Xe,fr,Ar,_r){for(let wr=0;wr<u.length;wr+=3){const Kr=u[wr+_r];Kr>=fr&&Kr<=Ar&&te(Xe,u[wr],u[wr+1],u[wr+2])}}function K(u,Xe,fr,Ar,_r,wr,Kr){let In=Q(u);const io=0===_r?oe:ie;let no,oo,so=u.start;for(let ao=0;ao<u.length-3;ao+=3){const co=u[ao],go=u[ao+1],ho=u[ao+2],Co=u[ao+3],Io=u[ao+4],xo=0===_r?co:go,Mo=0===_r?Co:Io;let Po=!1;Kr&&(no=Math.sqrt(Math.pow(co-Co,2)+Math.pow(go-Io,2))),xo<fr?Mo>fr&&(oo=io(In,co,go,Co,Io,fr),Kr&&(In.start=so+no*oo)):xo>Ar?Mo<Ar&&(oo=io(In,co,go,Co,Io,Ar),Kr&&(In.start=so+no*oo)):te(In,co,go,ho),Mo<fr&&xo>=fr&&(oo=io(In,co,go,Co,Io,fr),Po=!0),Mo>Ar&&xo<=Ar&&(oo=io(In,co,go,Co,Io,Ar),Po=!0),!wr&&Po&&(Kr&&(In.end=so+no*oo),Xe.push(In),In=Q(u)),Kr&&(so+=no)}let ao=u.length-3;const co=u[ao],go=u[ao+1],ho=0===_r?co:go;ho>=fr&&ho<=Ar&&te(In,co,go,u[ao+2]),ao=In.length-3,wr&&ao>=3&&(In[ao]!==In[0]||In[ao+1]!==In[1])&&te(In,In[0],In[1],In[2]),In.length&&Xe.push(In)}function Q(u){const Xe=[];return Xe.size=u.size,Xe.start=u.start,Xe.end=u.end,Xe}function ee(u,Xe,fr,Ar,_r,wr){for(const Kr of u)K(Kr,Xe,fr,Ar,_r,wr,!1)}function te(u,Xe,fr,Ar){u.push(Xe,fr,Ar)}function oe(u,Xe,fr,Ar,_r,wr){const Kr=(wr-Xe)/(Ar-Xe);return te(u,wr,fr+(_r-fr)*Kr,1),Kr}function ie(u,Xe,fr,Ar,_r,wr){const Kr=(wr-fr)/(_r-fr);return te(u,Xe+(Ar-Xe)*Kr,wr,1),Kr}function se(u,Xe){const fr=[];for(let Ar=0;Ar<u.length;Ar++){const _r=u[Ar],wr=_r.type;let Kr;if("Point"===wr||"MultiPoint"===wr||"LineString"===wr)Kr=re(_r.geometry,Xe);else if("MultiLineString"===wr||"Polygon"===wr){Kr=[];for(const u of _r.geometry)Kr.push(re(u,Xe))}else if("MultiPolygon"===wr){Kr=[];for(const u of _r.geometry){const fr=[];for(const Ar of u)fr.push(re(Ar,Xe));Kr.push(fr)}}fr.push(J(_r.id,wr,Kr,_r.tags))}return fr}function re(u,Xe){const fr=[];fr.size=u.size,void 0!==u.start&&(fr.start=u.start,fr.end=u.end);for(let Ar=0;Ar<u.length;Ar+=3)fr.push(u[Ar]+Xe,u[Ar+1],u[Ar+2]);return fr}function ne(u,Xe){if(u.transformed)return u;const fr=1<<u.z,Ar=u.x,_r=u.y;for(const wr of u.features){const u=wr.geometry,Kr=wr.type;if(wr.geometry=[],1===Kr)for(let Kr=0;Kr<u.length;Kr+=2)wr.geometry.push(ae(u[Kr],u[Kr+1],Xe,fr,Ar,_r));else for(let Kr=0;Kr<u.length;Kr++){const In=[];for(let wr=0;wr<u[Kr].length;wr+=2)In.push(ae(u[Kr][wr],u[Kr][wr+1],Xe,fr,Ar,_r));wr.geometry.push(In)}}return u.transformed=!0,u}function ae(u,Xe,fr,Ar,_r,wr){return[Math.round(fr*(u*Ar-_r)),Math.round(fr*(Xe*Ar-wr))]}function le(u,Xe,fr,Ar,_r){const wr=Xe===_r.maxZoom?0:_r.tolerance/((1<<Xe)*_r.extent),Kr={features:[],numPoints:0,numSimplified:0,numFeatures:u.length,source:null,x:fr,y:Ar,z:Xe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Xe of u)ce(Kr,Xe,wr,_r);return Kr}function ce(u,Xe,fr,Ar){const _r=Xe.geometry,wr=Xe.type,Kr=[];if(u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),"Point"===wr||"MultiPoint"===wr)for(let Xe=0;Xe<_r.length;Xe+=3)Kr.push(_r[Xe],_r[Xe+1]),u.numPoints++,u.numSimplified++;else if("LineString"===wr)ue(Kr,_r,u,fr,!1,!1);else if("MultiLineString"===wr||"Polygon"===wr)for(let Xe=0;Xe<_r.length;Xe++)ue(Kr,_r[Xe],u,fr,"Polygon"===wr,0===Xe);else if("MultiPolygon"===wr)for(let Xe=0;Xe<_r.length;Xe++){const Ar=_r[Xe];for(let Xe=0;Xe<Ar.length;Xe++)ue(Kr,Ar[Xe],u,fr,!0,0===Xe)}if(Kr.length){let fr=Xe.tags||null;if("LineString"===wr&&Ar.lineMetrics){fr={};for(const u in Xe.tags)fr[u]=Xe.tags[u];fr.mapbox_clip_start=_r.start/_r.size,fr.mapbox_clip_end=_r.end/_r.size}const In={geometry:Kr,type:"Polygon"===wr||"MultiPolygon"===wr?3:"LineString"===wr||"MultiLineString"===wr?2:1,tags:fr};null!==Xe.id&&(In.id=Xe.id),u.features.push(In)}}function ue(u,Xe,fr,Ar,_r,wr){const Kr=Ar*Ar;if(Ar>0&&Xe.size<(_r?Kr:Ar))return void(fr.numPoints+=Xe.length/3);const In=[];for(let u=0;u<Xe.length;u+=3)(0===Ar||Xe[u+2]>Kr)&&(fr.numSimplified++,In.push(Xe[u],Xe[u+1])),fr.numPoints++;_r&&function(u,Xe){let fr=0;for(let Xe=0,Ar=u.length,_r=Ar-2;Xe<Ar;_r=Xe,Xe+=2)fr+=(u[Xe]-u[_r])*(u[Xe+1]+u[_r+1]);if(fr>0===Xe)for(let Xe=0,fr=u.length;Xe<fr/2;Xe+=2){const Ar=u[Xe],_r=u[Xe+1];u[Xe]=u[fr-2-Xe],u[Xe+1]=u[fr-1-Xe],u[fr-2-Xe]=Ar,u[fr-1-Xe]=_r}}(In,wr),u.push(In)}const Co={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class de{constructor(u,Xe){const fr=(Xe=this.options=function(u,Xe){for(const fr in Xe)u[fr]=Xe[fr];return u}(Object.create(Co),Xe)).debug;if(fr&&console.time("preprocess data"),Xe.maxZoom<0||Xe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Xe.promoteId&&Xe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ar=function(u,Xe){const fr=[];if("FeatureCollection"===u.type)for(let Ar=0;Ar<u.features.length;Ar++)Y(fr,u.features[Ar],Xe,Ar);else Y(fr,"Feature"===u.type?u:{geometry:u},Xe);return fr}(u,Xe);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Xe.indexMaxZoom,Xe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ar=function(u,Xe){const fr=Xe.buffer/Xe.extent;let Ar=u;const _r=U(u,1,-1-fr,fr,0,-1,2,Xe),wr=U(u,1,1-fr,2+fr,0,-1,2,Xe);return(_r||wr)&&(Ar=U(u,1,-fr,1+fr,0,-1,2,Xe)||[],_r&&(Ar=se(_r,1).concat(Ar)),wr&&(Ar=Ar.concat(se(wr,-1)))),Ar}(Ar,Xe),Ar.length&&this.splitTile(Ar,0,0,0),fr&&(Ar.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(u,Xe,fr,Ar,_r,wr,Kr){const In=[u,Xe,fr,Ar],io=this.options,no=io.debug;for(;In.length;){Ar=In.pop(),fr=In.pop(),Xe=In.pop(),u=In.pop();const oo=1<<Xe,so=fe(Xe,fr,Ar);let ao=this.tiles[so];if(!ao&&(no>1&&console.time("creation"),ao=this.tiles[so]=le(u,Xe,fr,Ar,io),this.tileCoords.push({z:Xe,x:fr,y:Ar}),no)){no>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Xe,fr,Ar,ao.numFeatures,ao.numPoints,ao.numSimplified),console.timeEnd("creation"));const u=`z${Xe}`;this.stats[u]=(this.stats[u]||0)+1,this.total++}if(ao.source=u,null==_r){if(Xe===io.indexMaxZoom||ao.numPoints<=io.indexMaxPoints)continue}else{if(Xe===io.maxZoom||Xe===_r)continue;if(null!=_r){const u=_r-Xe;if(fr!==wr>>u||Ar!==Kr>>u)continue}}if(ao.source=null,0===u.length)continue;no>1&&console.time("clipping");const co=.5*io.buffer/io.extent,go=.5-co,ho=.5+co,Co=1+co;let Io=null,xo=null,Mo=null,Po=null,ss=U(u,oo,fr-co,fr+ho,0,ao.minX,ao.maxX,io),sa=U(u,oo,fr+go,fr+Co,0,ao.minX,ao.maxX,io);u=null,ss&&(Io=U(ss,oo,Ar-co,Ar+ho,1,ao.minY,ao.maxY,io),xo=U(ss,oo,Ar+go,Ar+Co,1,ao.minY,ao.maxY,io),ss=null),sa&&(Mo=U(sa,oo,Ar-co,Ar+ho,1,ao.minY,ao.maxY,io),Po=U(sa,oo,Ar+go,Ar+Co,1,ao.minY,ao.maxY,io),sa=null),no>1&&console.timeEnd("clipping"),In.push(Io||[],Xe+1,2*fr,2*Ar),In.push(xo||[],Xe+1,2*fr,2*Ar+1),In.push(Mo||[],Xe+1,2*fr+1,2*Ar),In.push(Po||[],Xe+1,2*fr+1,2*Ar+1)}}getTile(u,Xe,fr){u=+u,Xe=+Xe,fr=+fr;const Ar=this.options,{extent:_r,debug:wr}=Ar;if(u<0||u>24)return null;const Kr=1<<u,In=fe(u,Xe=Xe+Kr&Kr-1,fr);if(this.tiles[In])return ne(this.tiles[In],_r);wr>1&&console.log("drilling down to z%d-%d-%d",u,Xe,fr);let io,no=u,oo=Xe,so=fr;for(;!io&&no>0;)no--,oo>>=1,so>>=1,io=this.tiles[fe(no,oo,so)];return io&&io.source?(wr>1&&(console.log("found parent tile z%d-%d-%d",no,oo,so),console.time("drilling down")),this.splitTile(io.source,no,oo,so,u,Xe,fr),wr>1&&console.timeEnd("drilling down"),this.tiles[In]?ne(this.tiles[In],_r):null):null}}function fe(u,Xe,fr){return 32*((1<<u)*fr+Xe)+u}function ge(u,Xe){return Xe?u.properties[Xe]:u.id}function pe(u,Xe){if(null==u)return!0;if("Feature"===u.type)return null!=ge(u,Xe);if("FeatureCollection"===u.type){const fr=new Set;for(const Ar of u.features){const u=ge(Ar,Xe);if(null==u)return!1;if(fr.has(u))return!1;fr.add(u)}return!0}return!1}function me(u,Xe){const fr=new Map;if(null==u);else if("Feature"===u.type)fr.set(ge(u,Xe),u);else for(const Ar of u.features)fr.set(ge(Ar,Xe),Ar);return fr}class ye extends r{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Xe,Ar){return u._(this,void 0,void 0,(function*(){const Ar=Xe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const _r=this._geoJSONIndex.getTile(Ar.z,Ar.x,Ar.y);if(!_r)return null;const wr=new class{constructor(Xe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.X,this.length=Xe.length,this._features=Xe}feature(Xe){return new class{constructor(Xe){this._feature=Xe,this.extent=u.X,this.type=Xe.type,this.properties=Xe.tags,"id"in Xe&&!isNaN(Xe.id)&&(this.id=parseInt(Xe.id,10))}loadGeometry(){if(1===this._feature.type){const Xe=[];for(const fr of this._feature.geometry)Xe.push([new u.P(fr[0],fr[1])]);return Xe}{const Xe=[];for(const fr of this._feature.geometry){const Ar=[];for(const Xe of fr)Ar.push(new u.P(Xe[0],Xe[1]));Xe.push(Ar)}return Xe}}toGeoJSON(u,Xe,Ar){return fr.call(this,u,Xe,Ar)}}(this._features[Xe])}}(_r.features);let Kr=no(wr);return 0===Kr.byteOffset&&Kr.byteLength===Kr.buffer.byteLength||(Kr=new Uint8Array(Kr)),{vectorTile:wr,rawData:Kr.buffer}}))}loadData(Xe){return u._(this,void 0,void 0,(function*(){var fr;null===(fr=this._pendingRequest)||void 0===fr||fr.abort();const Ar=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bu(Xe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Xe,this._pendingRequest),this._geoJSONIndex=Xe.cluster?new z(function({superclusterOptions:Xe,clusterProperties:fr}){if(!fr||!Xe)return Xe;const Ar={},_r={},wr={accumulated:null,zoom:0},Kr={properties:null},In=Object.keys(fr);for(const Xe of In){const[wr,Kr]=fr[Xe],In=u.bB(Kr),io=u.bB("string"==typeof wr?[wr,["accumulated"],["get",Xe]]:wr);Ar[Xe]=In.value,_r[Xe]=io.value}return Xe.map=u=>{Kr.properties=u;const Xe={};for(const u of In)Xe[u]=Ar[u].evaluate(wr,Kr);return Xe},Xe.reduce=(u,Xe)=>{Kr.properties=Xe;for(const Xe of In)wr.accumulated=u[Xe],u[Xe]=_r[Xe].evaluate(wr,Kr)},Xe}(Xe)).load((yield this._pendingData).features):(_r=yield this._pendingData,new de(_r,Xe.geojsonVtOptions)),this.loaded={};const fr={};if(Ar){const u=Ar.finish();u&&(fr.resourceTiming={},fr.resourceTiming[Xe.source]=JSON.parse(JSON.stringify(u)))}return fr}catch(Xe){if(delete this._pendingRequest,u.bA(Xe))return{abandoned:!0};throw Xe}var _r}))}getData(){return u._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(u){const Xe=this.loaded;return Xe&&Xe[u.uid]?super.reloadTile(u):this.loadTile(u)}loadAndProcessGeoJSON(fr,Ar){return u._(this,void 0,void 0,(function*(){let _r=yield this.loadGeoJSON(fr,Ar);if(delete this._pendingRequest,"object"!=typeof _r)throw new Error(`Input data given to '${fr.source}' is not a valid GeoJSON object.`);if(Xe(_r,!0),fr.filter){const Xe=u.bB(fr.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));const Ar=_r.features.filter((u=>Xe.value.evaluate({zoom:0},u)));_r={type:"FeatureCollection",features:Ar}}return _r}))}loadGeoJSON(Xe,fr){return u._(this,void 0,void 0,(function*(){const{promoteId:Ar}=Xe;if(Xe.request){const _r=yield u.h(Xe.request,fr);return this._dataUpdateable=pe(_r.data,Ar)?me(_r.data,Ar):void 0,_r.data}if("string"==typeof Xe.data)try{const u=JSON.parse(Xe.data);return this._dataUpdateable=pe(u,Ar)?me(u,Ar):void 0,u}catch(u){throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`)}if(!Xe.dataDiff)throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Xe.source}`);return function(u,Xe,fr){var Ar,_r,wr,Kr;if(Xe.removeAll&&u.clear(),Xe.remove)for(const fr of Xe.remove)u.delete(fr);if(Xe.add)for(const Ar of Xe.add){const Xe=ge(Ar,fr);null!=Xe&&u.set(Xe,Ar)}if(Xe.update)for(const fr of Xe.update){let Xe=u.get(fr.id);if(null==Xe)continue;const In=!fr.removeAllProperties&&((null===(Ar=fr.removeProperties)||void 0===Ar?void 0:Ar.length)>0||(null===(_r=fr.addOrUpdateProperties)||void 0===_r?void 0:_r.length)>0);if((fr.newGeometry||fr.removeAllProperties||In)&&(Xe=Object.assign({},Xe),u.set(fr.id,Xe),In&&(Xe.properties=Object.assign({},Xe.properties))),fr.newGeometry&&(Xe.geometry=fr.newGeometry),fr.removeAllProperties)Xe.properties={};else if((null===(wr=fr.removeProperties)||void 0===wr?void 0:wr.length)>0)for(const u of fr.removeProperties)Object.prototype.hasOwnProperty.call(Xe.properties,u)&&delete Xe.properties[u];if((null===(Kr=fr.addOrUpdateProperties)||void 0===Kr?void 0:Kr.length)>0)for(const{key:u,value:Ar}of fr.addOrUpdateProperties)Xe.properties[u]=Ar}}(this._dataUpdateable,Xe.dataDiff,Ar),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(Xe){return u._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(u){return this._geoJSONIndex.getClusterExpansionZoom(u.clusterId)}getClusterChildren(u){return this._geoJSONIndex.getChildren(u.clusterId)}getClusterLeaves(u){return this._geoJSONIndex.getLeaves(u.clusterId,u.limit,u.offset)}}class ve{constructor(Xe){this.self=Xe,this.actor=new u.F(Xe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(u,Xe)=>{if(this.externalWorkerSourceTypes[u])throw new Error(`Worker source with name "${u}" already registered.`);this.externalWorkerSourceTypes[u]=Xe},this.self.addProtocol=u.bh,this.self.removeProtocol=u.bi,this.self.registerRTLTextPlugin=Xe=>{if(u.bC.isParsed())throw new Error("RTL text plugin already registered.");u.bC.setMethods(Xe)},this.actor.registerMessageHandler("LDT",((u,Xe)=>this._getDEMWorkerSource(u,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RDT",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Xe,fr.source).removeTile(fr)})))),this.actor.registerMessageHandler("GCEZ",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterExpansionZoom(fr)})))),this.actor.registerMessageHandler("GCC",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterChildren(fr)})))),this.actor.registerMessageHandler("GCL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterLeaves(fr)})))),this.actor.registerMessageHandler("LD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadData(Xe))),this.actor.registerMessageHandler("GD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).getData())),this.actor.registerMessageHandler("LT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).reloadTile(Xe))),this.actor.registerMessageHandler("AT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).abortTile(Xe))),this.actor.registerMessageHandler("RMT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).removeTile(Xe))),this.actor.registerMessageHandler("RS",((Xe,fr)=>u._(this,void 0,void 0,(function*(){if(!this.workerSources[Xe]||!this.workerSources[Xe][fr.type]||!this.workerSources[Xe][fr.type][fr.source])return;const u=this.workerSources[Xe][fr.type][fr.source];delete this.workerSources[Xe][fr.type][fr.source],void 0!==u.removeSource&&u.removeSource(fr)})))),this.actor.registerMessageHandler("RM",(Xe=>u._(this,void 0,void 0,(function*(){delete this.layerIndexes[Xe],delete this.availableImages[Xe],delete this.workerSources[Xe],delete this.demWorkerSources[Xe]})))),this.actor.registerMessageHandler("SR",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this.referrer=fr})))),this.actor.registerMessageHandler("SRPS",((u,Xe)=>this._syncRTLPluginState(u,Xe))),this.actor.registerMessageHandler("IS",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this.self.importScripts(fr)})))),this.actor.registerMessageHandler("SI",((u,Xe)=>this._setImages(u,Xe))),this.actor.registerMessageHandler("UL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).update(fr.layers,fr.removedIds)})))),this.actor.registerMessageHandler("SL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).replace(fr)}))))}_setImages(Xe,fr){return u._(this,void 0,void 0,(function*(){this.availableImages[Xe]=fr;for(const u in this.workerSources[Xe]){const Ar=this.workerSources[Xe][u];for(const u in Ar)Ar[u].availableImages=fr}}))}_syncRTLPluginState(Xe,fr){return u._(this,void 0,void 0,(function*(){if(u.bC.isParsed())return u.bC.getState();if("loading"!==fr.pluginStatus)return u.bC.setState(fr),fr;const Xe=fr.pluginURL;if(this.self.importScripts(Xe),u.bC.isParsed()){const fr={pluginStatus:"loaded",pluginURL:Xe};return u.bC.setState(fr),fr}throw u.bC.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Xe}`)}))}_getAvailableImages(u){let Xe=this.availableImages[u];return Xe||(Xe=[]),Xe}_getLayerIndex(u){let Xe=this.layerIndexes[u];return Xe||(Xe=this.layerIndexes[u]=new t),Xe}_getWorkerSource(u,Xe,fr){if(this.workerSources[u]||(this.workerSources[u]={}),this.workerSources[u][Xe]||(this.workerSources[u][Xe]={}),!this.workerSources[u][Xe][fr]){const Ar={sendAsync:(Xe,fr)=>(Xe.targetMapId=u,this.actor.sendAsync(Xe,fr))};switch(Xe){case"vector":this.workerSources[u][Xe][fr]=new r(Ar,this._getLayerIndex(u),this._getAvailableImages(u));break;case"geojson":this.workerSources[u][Xe][fr]=new ye(Ar,this._getLayerIndex(u),this._getAvailableImages(u));break;default:this.workerSources[u][Xe][fr]=new this.externalWorkerSourceTypes[Xe](Ar,this._getLayerIndex(u),this._getAvailableImages(u))}}return this.workerSources[u][Xe][fr]}_getDEMWorkerSource(u,Xe){return this.demWorkerSources[u]||(this.demWorkerSources[u]={}),this.demWorkerSources[u][Xe]||(this.demWorkerSources[u][Xe]=new n),this.demWorkerSources[u][Xe]}}return u.i(self)&&(self.worker=new ve(self)),ve})),define("index",0,(function(u,Xe){var fr="4.6.0";let Ar,_r;const wr={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:u=>new Promise(((fr,Ar)=>{const _r=requestAnimationFrame(fr);u.signal.addEventListener("abort",(()=>{cancelAnimationFrame(_r),Ar(Xe.c())}))})),getImageData(u,Xe=0){return this.getImageCanvasContext(u).getImageData(-Xe,-Xe,u.width+2*Xe,u.height+2*Xe)},getImageCanvasContext(u){const Xe=window.document.createElement("canvas"),fr=Xe.getContext("2d",{willReadFrequently:!0});if(!fr)throw new Error("failed to create canvas 2d context");return Xe.width=u.width,Xe.height=u.height,fr.drawImage(u,0,0,u.width,u.height),fr},resolveURL:u=>(Ar||(Ar=document.createElement("a")),Ar.href=u,Ar.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==_r&&(_r=matchMedia("(prefers-reduced-motion: reduce)")),_r.matches)}};class r{static testProp(u){if(!r.docStyle)return u[0];for(let Xe=0;Xe<u.length;Xe++)if(u[Xe]in r.docStyle)return u[Xe];return u[0]}static create(u,Xe,fr){const Ar=window.document.createElement(u);return void 0!==Xe&&(Ar.className=Xe),fr&&fr.appendChild(Ar),Ar}static createNS(u,Xe){return window.document.createElementNS(u,Xe)}static disableDrag(){r.docStyle&&r.selectProp&&(r.userSelect=r.docStyle[r.selectProp],r.docStyle[r.selectProp]="none")}static enableDrag(){r.docStyle&&r.selectProp&&(r.docStyle[r.selectProp]=r.userSelect)}static setTransform(u,Xe){u.style[r.transformProp]=Xe}static addEventListener(u,Xe,fr,Ar={}){u.addEventListener(Xe,fr,"passive"in Ar?Ar:Ar.capture)}static removeEventListener(u,Xe,fr,Ar={}){u.removeEventListener(Xe,fr,"passive"in Ar?Ar:Ar.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",r.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",r.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",r.suppressClickInternal,!0)}),0)}static getScale(u){const Xe=u.getBoundingClientRect();return{x:Xe.width/u.offsetWidth||1,y:Xe.height/u.offsetHeight||1,boundingClientRect:Xe}}static getPoint(u,fr,Ar){const _r=fr.boundingClientRect;return new Xe.P((Ar.clientX-_r.left)/fr.x-u.clientLeft,(Ar.clientY-_r.top)/fr.y-u.clientTop)}static mousePos(u,Xe){const fr=r.getScale(u);return r.getPoint(u,fr,Xe)}static touchPos(u,Xe){const fr=[],Ar=r.getScale(u);for(let _r=0;_r<Xe.length;_r++)fr.push(r.getPoint(u,Ar,Xe[_r]));return fr}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}r.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,r.selectProp=r.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),r.transformProp=r.testProp(["transform","WebkitTransform"]);const Kr={supported:!1,testSupport:function(u){!no&&io&&(oo?d(u):In=u)}};let In,io,no=!1,oo=!1;function d(u){const Xe=u.createTexture();u.bindTexture(u.TEXTURE_2D,Xe);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,io),u.isContextLost())return;Kr.supported=!0}catch(u){}u.deleteTexture(Xe),no=!0}var so;"undefined"!=typeof document&&(io=document.createElement("img"),io.onload=()=>{In&&d(In),In=null,oo=!0},io.onerror=()=>{no=!0,In=null},io.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(u){let fr,Ar,_r,wr;u.resetRequestQueue=()=>{fr=[],Ar=0,_r=0,wr={}},u.addThrottleControl=u=>{const Xe=_r++;return wr[Xe]=u,Xe},u.removeThrottleControl=u=>{delete wr[u],l()},u.getImage=(u,Ar,_r=!0)=>new Promise(((wr,In)=>{Kr.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),Xe.e(u,{type:"image"}),fr.push({abortController:Ar,requestParameters:u,supportImageRefresh:_r,state:"queued",onError:u=>{In(u)},onSuccess:u=>{wr(u)}}),l()}));const r=u=>Xe._(this,void 0,void 0,(function*(){u.state="running";const{requestParameters:fr,supportImageRefresh:_r,onError:wr,onSuccess:Kr,abortController:In}=u,io=!1===_r&&!Xe.i(self)&&!Xe.g(fr.url)&&(!fr.headers||Object.keys(fr.headers).reduce(((u,Xe)=>u&&"accept"===Xe),!0));Ar++;const no=io?h(fr,In):Xe.m(fr,In);try{const fr=yield no;delete u.abortController,u.state="completed",fr.data instanceof HTMLImageElement||Xe.b(fr.data)?Kr(fr):fr.data&&Kr({data:yield(oo=fr.data,"function"==typeof createImageBitmap?Xe.d(oo):Xe.f(oo)),cacheControl:fr.cacheControl,expires:fr.expires})}catch(Xe){delete u.abortController,wr(Xe)}finally{Ar--,l()}var oo})),l=()=>{const u=(()=>{for(const u of Object.keys(wr))if(wr[u]())return!0;return!1})()?Xe.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Xe.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Xe=Ar;Xe<u&&fr.length>0;Xe++){const u=fr.shift();u.abortController.signal.aborted?Xe--:r(u)}},h=(u,fr)=>new Promise(((Ar,_r)=>{const wr=new Image,Kr=u.url,In=u.credentials;In&&"include"===In?wr.crossOrigin="use-credentials":(In&&"same-origin"===In||!Xe.s(Kr))&&(wr.crossOrigin="anonymous"),fr.signal.addEventListener("abort",(()=>{wr.src="",_r(Xe.c())})),wr.fetchPriority="high",wr.onload=()=>{wr.onerror=wr.onload=null,Ar({data:wr})},wr.onerror=()=>{wr.onerror=wr.onload=null,fr.signal.aborted||_r(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."))},wr.src=Kr}))}(so||(so={})),so.resetRequestQueue();class p{constructor(u){this._transformRequestFn=u}transformRequest(u,Xe){return this._transformRequestFn&&this._transformRequestFn(u,Xe)||{url:u}}setTransformRequest(u){this._transformRequestFn=u}}function m(u){var fr=new Xe.A(3);return fr[0]=u[0],fr[1]=u[1],fr[2]=u[2],fr}var ao,g=function(u,Xe,fr){return u[0]=Xe[0]-fr[0],u[1]=Xe[1]-fr[1],u[2]=Xe[2]-fr[2],u};ao=new Xe.A(3),Xe.A!=Float32Array&&(ao[0]=0,ao[1]=0,ao[2]=0);var v=function(u){var Xe=u[0],fr=u[1];return Xe*Xe+fr*fr};function x(u){const Xe=[];if("string"==typeof u)Xe.push({id:"default",url:u});else if(u&&u.length>0){const fr=[];for(const{id:Ar,url:_r}of u){const u=`${Ar}${_r}`;-1===fr.indexOf(u)&&(fr.push(u),Xe.push({id:Ar,url:_r}))}}return Xe}function y(u,Xe,fr){const Ar=u.split("?");return Ar[0]+=`${Xe}${fr}`,Ar.join("?")}!function(){var u=new Xe.A(2);Xe.A!=Float32Array&&(u[0]=0,u[1]=0)}();class b{constructor(u,Xe,fr,Ar){this.context=u,this.format=fr,this.texture=u.gl.createTexture(),this.update(Xe,Ar)}update(u,fr,Ar){const{width:_r,height:wr}=u,Kr=!(this.size&&this.size[0]===_r&&this.size[1]===wr||Ar),{context:In}=this,{gl:io}=In;if(this.useMipmap=Boolean(fr&&fr.useMipmap),io.bindTexture(io.TEXTURE_2D,this.texture),In.pixelStoreUnpackFlipY.set(!1),In.pixelStoreUnpack.set(1),In.pixelStoreUnpackPremultiplyAlpha.set(this.format===io.RGBA&&(!fr||!1!==fr.premultiply)),Kr)this.size=[_r,wr],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?io.texImage2D(io.TEXTURE_2D,0,this.format,this.format,io.UNSIGNED_BYTE,u):io.texImage2D(io.TEXTURE_2D,0,this.format,_r,wr,0,this.format,io.UNSIGNED_BYTE,u.data);else{const{x:fr,y:Kr}=Ar||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?io.texSubImage2D(io.TEXTURE_2D,0,fr,Kr,io.RGBA,io.UNSIGNED_BYTE,u):io.texSubImage2D(io.TEXTURE_2D,0,fr,Kr,_r,wr,io.RGBA,io.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&io.generateMipmap(io.TEXTURE_2D)}bind(u,Xe,fr){const{context:Ar}=this,{gl:_r}=Ar;_r.bindTexture(_r.TEXTURE_2D,this.texture),fr!==_r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(fr=_r.LINEAR),u!==this.filter&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MAG_FILTER,u),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MIN_FILTER,fr||u),this.filter=u),Xe!==this.wrap&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_S,Xe),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_T,Xe),this.wrap=Xe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function w(u){const{userImage:Xe}=u;return!!(Xe&&Xe.render&&Xe.render())&&(u.data.replace(new Uint8Array(Xe.data.buffer)),!0)}class T extends Xe.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new Xe.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:u,promiseResolve:Xe}of this.requestors)Xe(this._getImagesForIds(u));this.requestors=[]}}getImage(u){const fr=this.images[u];if(fr&&!fr.data&&fr.spriteData){const u=fr.spriteData;fr.data=new Xe.R({width:u.width,height:u.height},u.context.getImageData(u.x,u.y,u.width,u.height).data),fr.spriteData=null}return fr}addImage(u,Xe){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,Xe)&&(this.images[u]=Xe)}_validate(u,fr){let Ar=!0;const _r=fr.data||fr.spriteData;return this._validateStretch(fr.stretchX,_r&&_r.width)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchX" value`))),Ar=!1),this._validateStretch(fr.stretchY,_r&&_r.height)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchY" value`))),Ar=!1),this._validateContent(fr.content,fr)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "content" value`))),Ar=!1),Ar}_validateStretch(u,Xe){if(!u)return!0;let fr=0;for(const Ar of u){if(Ar[0]<fr||Ar[1]<Ar[0]||Xe<Ar[1])return!1;fr=Ar[1]}return!0}_validateContent(u,Xe){if(!u)return!0;if(4!==u.length)return!1;const fr=Xe.spriteData,Ar=fr&&fr.width||Xe.data.width,_r=fr&&fr.height||Xe.data.height;return!(u[0]<0||Ar<u[0]||u[1]<0||_r<u[1]||u[2]<0||Ar<u[2]||u[3]<0||_r<u[3]||u[2]<u[0]||u[3]<u[1])}updateImage(u,Xe,fr=!0){const Ar=this.getImage(u);if(fr&&(Ar.data.width!==Xe.data.width||Ar.data.height!==Xe.data.height))throw new Error(`size mismatch between old image (${Ar.data.width}x${Ar.data.height}) and new image (${Xe.data.width}x${Xe.data.height}).`);Xe.version=Ar.version+1,this.images[u]=Xe,this.updatedImages[u]=!0}removeImage(u){const Xe=this.images[u];delete this.images[u],delete this.patterns[u],Xe.userImage&&Xe.userImage.onRemove&&Xe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u){return new Promise(((Xe,fr)=>{let Ar=!0;if(!this.isLoaded())for(const Xe of u)this.images[Xe]||(Ar=!1);this.isLoaded()||Ar?Xe(this._getImagesForIds(u)):this.requestors.push({ids:u,promiseResolve:Xe})}))}_getImagesForIds(u){const fr={};for(const Ar of u){let u=this.getImage(Ar);u||(this.fire(new Xe.k("styleimagemissing",{id:Ar})),u=this.getImage(Ar)),u?fr[Ar]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:Boolean(u.userImage&&u.userImage.render)}:Xe.w(`Image "${Ar}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return fr}getPixelSize(){const{width:u,height:Xe}=this.atlasImage;return{width:u,height:Xe}}getPattern(u){const fr=this.patterns[u],Ar=this.getImage(u);if(!Ar)return null;if(fr&&fr.position.version===Ar.version)return fr.position;if(fr)fr.position.version=Ar.version;else{const fr={w:Ar.data.width+2,h:Ar.data.height+2,x:0,y:0},_r=new Xe.I(fr,Ar);this.patterns[u]={bin:fr,position:_r}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const Xe=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new b(u,this.atlasImage,Xe.RGBA),this.atlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const Xe in this.patterns)u.push(this.patterns[Xe].bin);const{w:fr,h:Ar}=Xe.p(u),_r=this.atlasImage;_r.resize({width:fr||1,height:Ar||1});for(const u in this.patterns){const{bin:fr}=this.patterns[u],Ar=fr.x+1,wr=fr.y+1,Kr=this.getImage(u).data,In=Kr.width,io=Kr.height;Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar,y:wr},{width:In,height:io}),Xe.R.copy(Kr,_r,{x:0,y:io-1},{x:Ar,y:wr-1},{width:In,height:1}),Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar,y:wr+io},{width:In,height:1}),Xe.R.copy(Kr,_r,{x:In-1,y:0},{x:Ar-1,y:wr},{width:1,height:io}),Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar+In,y:wr},{width:1,height:io})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const fr of u){if(this.callbackDispatchedThisFrame[fr])continue;this.callbackDispatchedThisFrame[fr]=!0;const u=this.getImage(fr);u||Xe.w(`Image with ID: "${fr}" was not found`),w(u)&&this.updateImage(fr,u)}}}const co=1e20;function E(u,Xe,fr,Ar,_r,wr,Kr,In,io){for(let no=Xe;no<Xe+Ar;no++)P(u,fr*wr+no,wr,_r,Kr,In,io);for(let no=fr;no<fr+_r;no++)P(u,no*wr+Xe,1,Ar,Kr,In,io)}function P(u,Xe,fr,Ar,_r,wr,Kr){wr[0]=0,Kr[0]=-co,Kr[1]=co,_r[0]=u[Xe];for(let In=1,io=0,no=0;In<Ar;In++){_r[In]=u[Xe+In*fr];const Ar=In*In;do{const u=wr[io];no=(_r[In]-_r[u]+Ar-u*u)/(In-u)/2}while(no<=Kr[io]&&--io>-1);io++,wr[io]=In,Kr[io]=no,Kr[io+1]=co}for(let In=0,io=0;In<Ar;In++){for(;Kr[io+1]<In;)io++;const Ar=wr[io],no=In-Ar;u[Xe+In*fr]=_r[Ar]+no*no}}class C{constructor(u,Xe){this.requestManager=u,this.localIdeographFontFamily=Xe,this.entries={}}setURL(u){this.url=u}getGlyphs(u){return Xe._(this,void 0,void 0,(function*(){const Xe=[];for(const fr in u)for(const Ar of u[fr])Xe.push(this._getAndCacheGlyphsPromise(fr,Ar));const fr=yield Promise.all(Xe),Ar={};for(const{stack:u,id:Xe,glyph:_r}of fr)Ar[u]||(Ar[u]={}),Ar[u][Xe]=_r&&{id:_r.id,bitmap:_r.bitmap.clone(),metrics:_r.metrics};return Ar}))}_getAndCacheGlyphsPromise(u,fr){return Xe._(this,void 0,void 0,(function*(){let Xe=this.entries[u];Xe||(Xe=this.entries[u]={glyphs:{},requests:{},ranges:{}});let Ar=Xe.glyphs[fr];if(void 0!==Ar)return{stack:u,id:fr,glyph:Ar};if(Ar=this._tinySDF(Xe,u,fr),Ar)return Xe.glyphs[fr]=Ar,{stack:u,id:fr,glyph:Ar};const _r=Math.floor(fr/256);if(256*_r>65535)throw new Error("glyphs > 65535 not supported");if(Xe.ranges[_r])return{stack:u,id:fr,glyph:Ar};if(!this.url)throw new Error("glyphsUrl is not set");if(!Xe.requests[_r]){const fr=C.loadGlyphRange(u,_r,this.url,this.requestManager);Xe.requests[_r]=fr}const wr=yield Xe.requests[_r];for(const u in wr)this._doesCharSupportLocalGlyph(+u)||(Xe.glyphs[+u]=wr[+u]);return Xe.ranges[_r]=!0,{stack:u,id:fr,glyph:wr[fr]||null}}))}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(u))}_tinySDF(u,fr,Ar){const _r=this.localIdeographFontFamily;if(!_r)return;if(!this._doesCharSupportLocalGlyph(Ar))return;let wr=u.tinySDF;if(!wr){let Xe="400";/bold/i.test(fr)?Xe="900":/medium/i.test(fr)?Xe="500":/light/i.test(fr)&&(Xe="200"),wr=u.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:_r,fontWeight:Xe})}const Kr=wr.draw(String.fromCharCode(Ar));return{id:Ar,bitmap:new Xe.o({width:Kr.width||60,height:Kr.height||60},Kr.data),metrics:{width:Kr.glyphWidth/2||24,height:Kr.glyphHeight/2||24,left:Kr.glyphLeft/2+.5||0,top:Kr.glyphTop/2-27.5||-8,advance:Kr.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(u,fr,Ar,_r){return Xe._(this,void 0,void 0,(function*(){const wr=256*fr,Kr=wr+255,In=_r.transformRequest(Ar.replace("{fontstack}",u).replace("{range}",`${wr}-${Kr}`),"Glyphs"),io=yield Xe.l(In,new AbortController);if(!io||!io.data)throw new Error(`Could not load glyph range. range: ${fr}, ${wr}-${Kr}`);const no={};for(const u of Xe.n(io.data))no[u.id]=u;return no}))},C.TinySDF=class{constructor({fontSize:u=24,buffer:Xe=3,radius:fr=8,cutoff:Ar=.25,fontFamily:_r="sans-serif",fontWeight:wr="normal",fontStyle:Kr="normal"}={}){this.buffer=Xe,this.cutoff=Ar,this.radius=fr;const In=this.size=u+4*Xe,io=this._createCanvas(In),no=this.ctx=io.getContext("2d",{willReadFrequently:!0});no.font=`${Kr} ${wr} ${u}px ${_r}`,no.textBaseline="alphabetic",no.textAlign="left",no.fillStyle="black",this.gridOuter=new Float64Array(In*In),this.gridInner=new Float64Array(In*In),this.f=new Float64Array(In),this.z=new Float64Array(In+1),this.v=new Uint16Array(In)}_createCanvas(u){const Xe=document.createElement("canvas");return Xe.width=Xe.height=u,Xe}draw(u){const{width:Xe,actualBoundingBoxAscent:fr,actualBoundingBoxDescent:Ar,actualBoundingBoxLeft:_r,actualBoundingBoxRight:wr}=this.ctx.measureText(u),Kr=Math.ceil(fr),In=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(wr-_r))),io=Math.min(this.size-this.buffer,Kr+Math.ceil(Ar)),no=In+2*this.buffer,oo=io+2*this.buffer,so=Math.max(no*oo,0),ao=new Uint8ClampedArray(so),go={data:ao,width:no,height:oo,glyphWidth:In,glyphHeight:io,glyphTop:Kr,glyphLeft:0,glyphAdvance:Xe};if(0===In||0===io)return go;const{ctx:ho,buffer:Co,gridInner:Io,gridOuter:xo}=this;ho.clearRect(Co,Co,In,io),ho.fillText(u,Co,Co+Kr);const Mo=ho.getImageData(Co,Co,In,io);xo.fill(co,0,so),Io.fill(0,0,so);for(let u=0;u<io;u++)for(let Xe=0;Xe<In;Xe++){const fr=Mo.data[4*(u*In+Xe)+3]/255;if(0===fr)continue;const Ar=(u+Co)*no+Xe+Co;if(1===fr)xo[Ar]=0,Io[Ar]=co;else{const u=.5-fr;xo[Ar]=u>0?u*u:0,Io[Ar]=u<0?u*u:0}}E(xo,0,0,no,oo,no,this.f,this.v,this.z),E(Io,Co,Co,In,io,no,this.f,this.v,this.z);for(let u=0;u<so;u++){const Xe=Math.sqrt(xo[u])-Math.sqrt(Io[u]);ao[u]=Math.round(255-255*(Xe/this.radius+this.cutoff))}return go}};class S{constructor(){this.specification=Xe.v.light.position}possiblyEvaluate(u,fr){return Xe.x(u.expression.evaluate(fr))}interpolate(u,fr,Ar){return{x:Xe.y.number(u.x,fr.x,Ar),y:Xe.y.number(u.y,fr.y,Ar),z:Xe.y.number(u.z,fr.z,Ar)}}}let go;class D extends Xe.E{constructor(u){super(),go=go||new Xe.q({anchor:new Xe.D(Xe.v.light.anchor),position:new S,color:new Xe.D(Xe.v.light.color),intensity:new Xe.D(Xe.v.light.intensity)}),this._transitionable=new Xe.T(go),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,fr={}){if(!this._validate(Xe.r,u,fr))for(const Xe in u){const fr=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),fr):this._transitionable.setValue(Xe,fr)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,fr,Ar){return(!Ar||!1!==Ar.validate)&&Xe.t(this,u.call(Xe.u,{value:fr,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v}))}}const ho=new Xe.q({"sky-color":new Xe.D(Xe.v.sky["sky-color"]),"horizon-color":new Xe.D(Xe.v.sky["horizon-color"]),"fog-color":new Xe.D(Xe.v.sky["fog-color"]),"fog-ground-blend":new Xe.D(Xe.v.sky["fog-ground-blend"]),"horizon-fog-blend":new Xe.D(Xe.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new Xe.D(Xe.v.sky["sky-horizon-blend"]),"atmosphere-blend":new Xe.D(Xe.v.sky["atmosphere-blend"])});class A extends Xe.E{constructor(u){super(),this._transitionable=new Xe.T(ho),this.setSky(u),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Xe.z(0))}setSky(u,fr={}){if(!this._validate(Xe.B,u,fr)){u||(u={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent"});for(const Xe in u){const fr=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),fr):this._transitionable.setValue(Xe,fr)}}}getSky(){return this._transitionable.serialize()}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,fr,Ar={}){return!1!==(null==Ar?void 0:Ar.validate)&&Xe.t(this,u.call(Xe.u,Xe.e({value:fr,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v})))}calculateFogBlendOpacity(u){return u<60?0:u<70?(u-60)/10:1}}class R{constructor(u,Xe){this.width=u,this.height=Xe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,Xe){const fr=u.join(",")+String(Xe);return this.dashEntry[fr]||(this.dashEntry[fr]=this.addDash(u,Xe)),this.dashEntry[fr]}getDashRanges(u,Xe,fr){const Ar=[];let _r=u.length%2==1?-u[u.length-1]*fr:0,wr=u[0]*fr,Kr=!0;Ar.push({left:_r,right:wr,isDash:Kr,zeroLength:0===u[0]});let In=u[0];for(let Xe=1;Xe<u.length;Xe++){Kr=!Kr;const io=u[Xe];_r=In*fr,In+=io,wr=In*fr,Ar.push({left:_r,right:wr,isDash:Kr,zeroLength:0===io})}return Ar}addRoundDash(u,Xe,fr){const Ar=Xe/2;for(let Xe=-fr;Xe<=fr;Xe++){const _r=this.width*(this.nextRow+fr+Xe);let wr=0,Kr=u[wr];for(let In=0;In<this.width;In++){In/Kr.right>1&&(Kr=u[++wr]);const io=Math.abs(In-Kr.left),no=Math.abs(In-Kr.right),oo=Math.min(io,no);let so;const ao=Xe/fr*(Ar+1);if(Kr.isDash){const u=Ar-Math.abs(ao);so=Math.sqrt(oo*oo+u*u)}else so=Ar-Math.sqrt(oo*oo+ao*ao);this.data[_r+In]=Math.max(0,Math.min(255,so+128))}}}addRegularDash(u){for(let Xe=u.length-1;Xe>=0;--Xe){const fr=u[Xe],Ar=u[Xe+1];fr.zeroLength?u.splice(Xe,1):Ar&&Ar.isDash===fr.isDash&&(Ar.left=fr.left,u.splice(Xe,1))}const Xe=u[0],fr=u[u.length-1];Xe.isDash===fr.isDash&&(Xe.left=fr.left-this.width,fr.right=Xe.right+this.width);const Ar=this.width*this.nextRow;let _r=0,wr=u[_r];for(let Xe=0;Xe<this.width;Xe++){Xe/wr.right>1&&(wr=u[++_r]);const fr=Math.abs(Xe-wr.left),Kr=Math.abs(Xe-wr.right),In=Math.min(fr,Kr);this.data[Ar+Xe]=Math.max(0,Math.min(255,(wr.isDash?In:-In)+128))}}addDash(u,fr){const Ar=fr?7:0,_r=2*Ar+1;if(this.nextRow+_r>this.height)return Xe.w("LineAtlas out of space"),null;let wr=0;for(let Xe=0;Xe<u.length;Xe++)wr+=u[Xe];if(0!==wr){const Xe=this.width/wr,_r=this.getDashRanges(u,this.width,Xe);fr?this.addRoundDash(_r,Xe,Ar):this.addRegularDash(_r)}const Kr={y:(this.nextRow+Ar+.5)/this.height,height:2*Ar/this.height,width:wr};return this.nextRow+=_r,this.dirty=!0,Kr}bind(u){const Xe=u.gl;this.texture?(Xe.bindTexture(Xe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Xe.texSubImage2D(Xe.TEXTURE_2D,0,0,0,this.width,this.height,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))):(this.texture=Xe.createTexture(),Xe.bindTexture(Xe.TEXTURE_2D,this.texture),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_S,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_T,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MIN_FILTER,Xe.LINEAR),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MAG_FILTER,Xe.LINEAR),Xe.texImage2D(Xe.TEXTURE_2D,0,Xe.ALPHA,this.width,this.height,0,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))}}const Co="maplibre_preloaded_worker_pool";class L{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<L.workerCount;)this.workers.push(new Worker(Xe.a.WORKER_URL));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],0===this.numActive()&&(this.workers.forEach((u=>{u.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Co]}numActive(){return Object.keys(this.active).length}}const Io=Math.floor(wr.hardwareConcurrency/2);let xo,Mo;function N(){return xo||(xo=new L),xo}L.workerCount=Xe.C(globalThis)?Math.max(Math.min(Io,3),1):1;class j{constructor(u,fr){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=fr;const Ar=this.workerPool.acquire(fr);for(let u=0;u<Ar.length;u++){const _r=new Xe.F(Ar[u],fr);_r.name=`Worker ${u}`,this.actors.push(_r)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,Xe){const fr=[];for(const Ar of this.actors)fr.push(Ar.sendAsync({type:u,data:Xe}));return Promise.all(fr)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(u=!0){this.actors.forEach((u=>{u.remove()})),this.actors=[],u&&this.workerPool.release(this.id)}registerMessageHandler(u,Xe){for(const fr of this.actors)fr.registerMessageHandler(u,Xe)}}function U(){return Mo||(Mo=new j(N(),Xe.G),Mo.registerMessageHandler("GR",((u,fr,Ar)=>Xe.m(fr,Ar)))),Mo}function Z(u,fr){const Ar=Xe.H();return Xe.J(Ar,Ar,[1,1,0]),Xe.K(Ar,Ar,[.5*u.width,.5*u.height,1]),Xe.L(Ar,Ar,u.calculatePosMatrix(fr.toUnwrapped()))}function q(u,Xe,fr,Ar,_r,wr){const Kr=function(u,Xe,fr){if(u)for(const Ar of u){const u=Xe[Ar];if(u&&u.source===fr&&"fill-extrusion"===u.type)return!0}else for(const u in Xe){const Ar=Xe[u];if(Ar.source===fr&&"fill-extrusion"===Ar.type)return!0}return!1}(_r&&_r.layers,Xe,u.id),In=wr.maxPitchScaleFactor(),io=u.tilesIn(Ar,In,Kr);io.sort(V);const no=[];for(const Ar of io)no.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(Xe,fr,u._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,_r,wr,In,Z(u.transform,Ar.tileID))});const oo=function(u){const Xe={},fr={};for(const Ar of u){const u=Ar.queryResults,_r=Ar.wrappedTileID,wr=fr[_r]=fr[_r]||{};for(const fr in u){const Ar=u[fr],_r=wr[fr]=wr[fr]||{},Kr=Xe[fr]=Xe[fr]||[];for(const u of Ar)_r[u.featureIndex]||(_r[u.featureIndex]=!0,Kr.push(u))}}return Xe}(no);for(const Xe in oo)oo[Xe].forEach((Xe=>{const fr=Xe.feature,Ar=u.getFeatureState(fr.layer["source-layer"],fr.id);fr.source=fr.layer.source,fr.layer["source-layer"]&&(fr.sourceLayer=fr.layer["source-layer"]),fr.state=Ar}));return oo}function V(u,Xe){const fr=u.tileID,Ar=Xe.tileID;return fr.overscaledZ-Ar.overscaledZ||fr.canonical.y-Ar.canonical.y||fr.wrap-Ar.wrap||fr.canonical.x-Ar.canonical.x}function G(u,fr,Ar){return Xe._(this,void 0,void 0,(function*(){let _r=u;if(u.url?_r=(yield Xe.h(fr.transformRequest(u.url,"Source"),Ar)).data:yield wr.frameAsync(Ar),!_r)return null;const Kr=Xe.M(Xe.e(_r,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in _r&&_r.vector_layers&&(Kr.vectorLayerIds=_r.vector_layers.map((u=>u.id))),Kr}))}class H{constructor(u,Xe){u&&(Xe?this.setSouthWest(u).setNorthEast(Xe):Array.isArray(u)&&(4===u.length?this.setSouthWest([u[0],u[1]]).setNorthEast([u[2],u[3]]):this.setSouthWest(u[0]).setNorthEast(u[1])))}setNorthEast(u){return this._ne=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}setSouthWest(u){return this._sw=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}extend(u){const fr=this._sw,Ar=this._ne;let _r,wr;if(u instanceof Xe.N)_r=u,wr=u;else{if(!(u instanceof H))return Array.isArray(u)?4===u.length||u.every(Array.isArray)?this.extend(H.convert(u)):this.extend(Xe.N.convert(u)):u&&("lng"in u||"lon"in u)&&"lat"in u?this.extend(Xe.N.convert(u)):this;if(_r=u._sw,wr=u._ne,!_r||!wr)return this}return fr||Ar?(fr.lng=Math.min(_r.lng,fr.lng),fr.lat=Math.min(_r.lat,fr.lat),Ar.lng=Math.max(wr.lng,Ar.lng),Ar.lat=Math.max(wr.lat,Ar.lat)):(this._sw=new Xe.N(_r.lng,_r.lat),this._ne=new Xe.N(wr.lng,wr.lat)),this}getCenter(){return new Xe.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Xe.N(this.getWest(),this.getNorth())}getSouthEast(){return new Xe.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(u){const{lng:fr,lat:Ar}=Xe.N.convert(u);let _r=this._sw.lng<=fr&&fr<=this._ne.lng;return this._sw.lng>this._ne.lng&&(_r=this._sw.lng>=fr&&fr>=this._ne.lng),this._sw.lat<=Ar&&Ar<=this._ne.lat&&_r}static convert(u){return u instanceof H?u:u?new H(u):u}static fromLngLat(u,fr=0){const Ar=360*fr/40075017,_r=Ar/Math.cos(Math.PI/180*u.lat);return new H(new Xe.N(u.lng-_r,u.lat-Ar),new Xe.N(u.lng+_r,u.lat+Ar))}}class W{constructor(u,Xe,fr){this.bounds=H.convert(this.validateBounds(u)),this.minzoom=Xe||0,this.maxzoom=fr||24}validateBounds(u){return Array.isArray(u)&&4===u.length?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const fr=Math.pow(2,u.z),Ar=Math.floor(Xe.O(this.bounds.getWest())*fr),_r=Math.floor(Xe.Q(this.bounds.getNorth())*fr),wr=Math.ceil(Xe.O(this.bounds.getEast())*fr),Kr=Math.ceil(Xe.Q(this.bounds.getSouth())*fr);return u.x>=Ar&&u.x<wr&&u.y>=_r&&u.y<Kr}}class $ extends Xe.E{constructor(u,fr,Ar,_r){if(super(),this.id=u,this.dispatcher=Ar,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,Xe.e(this,Xe.M(fr,["url","scheme","tileSize","promoteId"])),this._options=Xe.e({type:"vector"},fr),this._collectResourceTiming=fr.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(_r)}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.abort(),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return Xe.e({},this._options)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),fr={request:this.map._requestManager.transformRequest(Xe,"Tile"),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};fr.request.collectResourceTiming=this._collectResourceTiming;let Ar="RT";if(u.actor&&"expired"!==u.state){if("loading"===u.state)return new Promise(((Xe,fr)=>{u.reloadPromise={resolve:Xe,reject:fr}}))}else u.actor=this.dispatcher.getActor(),Ar="LT";u.abortController=new AbortController;try{const Xe=yield u.actor.sendAsync({type:Ar,data:fr},u.abortController);if(delete u.abortController,u.aborted)return;this._afterTileLoadWorkerResponse(u,Xe)}catch(Xe){if(delete u.abortController,u.aborted)return;if(Xe&&404!==Xe.status)throw Xe;this._afterTileLoadWorkerResponse(u,null)}}))}_afterTileLoadWorkerResponse(u,Xe){if(Xe&&Xe.resourceTiming&&(u.resourceTiming=Xe.resourceTiming),Xe&&this.map._refreshExpiredTiles&&u.setExpiryData(Xe),u.loadVectorData(Xe,this.map.painter),u.reloadPromise){const Xe=u.reloadPromise;u.reloadPromise=null,this.loadTile(u).then(Xe.resolve).catch(Xe.reject)}}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.actor&&(yield u.actor.sendAsync({type:"AT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),u.actor&&(yield u.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class X extends Xe.E{constructor(u,fr,Ar,_r){super(),this.id=u,this.dispatcher=Ar,this.setEventedParent(_r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=Xe.e({type:"raster"},fr),Xe.e(this,Xe.M(fr,["url","scheme","tileSize"]))}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}onAdd(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(u){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}serialize(){return Xe.e({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.abortController=new AbortController;try{const fr=yield so.getImage(this.map._requestManager.transformRequest(Xe,"Tile"),u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(fr&&fr.data){this.map._refreshExpiredTiles&&fr.cacheControl&&fr.expires&&u.setExpiryData({cacheControl:fr.cacheControl,expires:fr.expires});const Xe=this.map.painter.context,Ar=Xe.gl,_r=fr.data;u.texture=this.map.painter.getTileTexture(_r.width),u.texture?u.texture.update(_r,{useMipmap:!0}):(u.texture=new b(Xe,_r,Ar.RGBA,{useMipmap:!0}),u.texture.bind(Ar.LINEAR,Ar.CLAMP_TO_EDGE,Ar.LINEAR_MIPMAP_NEAREST)),u.state="loaded"}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController)}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.texture&&this.map.painter.saveTileTexture(u.texture)}))}hasTransition(){return!1}}class K extends X{constructor(u,fr,Ar,_r){super(u,fr,Ar,_r),this.type="raster-dem",this.maxzoom=22,this._options=Xe.e({type:"raster-dem"},fr),this.encoding=fr.encoding||"mapbox",this.redFactor=fr.redFactor,this.greenFactor=fr.greenFactor,this.blueFactor=fr.blueFactor,this.baseShift=fr.baseShift}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const fr=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Ar=this.map._requestManager.transformRequest(fr,"Tile");u.neighboringTiles=this._getNeighboringTiles(u.tileID),u.abortController=new AbortController;try{const fr=yield so.getImage(Ar,u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(fr&&fr.data){const Ar=fr.data;this.map._refreshExpiredTiles&&fr.cacheControl&&fr.expires&&u.setExpiryData({cacheControl:fr.cacheControl,expires:fr.expires});const _r=Xe.b(Ar)&&Xe.U()?Ar:yield this.readImageNow(Ar),wr={type:this.type,uid:u.uid,source:this.id,rawImageData:_r,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!u.actor||"expired"===u.state){u.actor=this.dispatcher.getActor();const Xe=yield u.actor.sendAsync({type:"LDT",data:wr});u.dem=Xe,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded"}}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}readImageNow(u){return Xe._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&Xe.V()){const fr=u.width+2,Ar=u.height+2;try{return new Xe.R({width:fr,height:Ar},yield Xe.W(u,-1,-1,fr,Ar))}catch(u){}}return wr.getImageData(u,1)}))}_getNeighboringTiles(u){const fr=u.canonical,Ar=Math.pow(2,fr.z),_r=(fr.x-1+Ar)%Ar,wr=0===fr.x?u.wrap-1:u.wrap,Kr=(fr.x+1+Ar)%Ar,In=fr.x+1===Ar?u.wrap+1:u.wrap,io={};return io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y).key]={backfilled:!1},fr.y>0&&(io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y-1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,u.wrap,fr.z,fr.x,fr.y-1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y-1).key]={backfilled:!1}),fr.y+1<Ar&&(io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y+1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,u.wrap,fr.z,fr.x,fr.y+1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y+1).key]={backfilled:!1}),io}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&(yield u.actor.sendAsync({type:"RDT",data:{type:this.type,uid:u.uid,source:this.id}}))}))}}class J extends Xe.E{constructor(u,fr,Ar,_r){super(),this.id=u,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Ar.getActor(),this.setEventedParent(_r),this._data=fr.data,this._options=Xe.e({},fr),this._collectResourceTiming=fr.collectResourceTiming,void 0!==fr.maxzoom&&(this.maxzoom=fr.maxzoom),fr.type&&(this.type=fr.type),fr.attribution&&(this.attribution=fr.attribution),this.promoteId=fr.promoteId;const wr=Xe.X/this.tileSize;this.workerOptions=Xe.e({source:this.id,cluster:fr.cluster||!1,geojsonVtOptions:{buffer:(void 0!==fr.buffer?fr.buffer:128)*wr,tolerance:(void 0!==fr.tolerance?fr.tolerance:.375)*wr,extent:Xe.X,maxZoom:this.maxzoom,lineMetrics:fr.lineMetrics||!1,generateId:fr.generateId||!1},superclusterOptions:{maxZoom:void 0!==fr.clusterMaxZoom?fr.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,fr.clusterMinPoints||2),extent:Xe.X,radius:(fr.clusterRadius||50)*wr,log:!1,generateId:fr.generateId||!1},clusterProperties:fr.clusterProperties,filter:fr.filter},fr.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}load(){return Xe._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData(),this}updateData(u){return this._updateWorkerData(u),this}getData(){return Xe._(this,void 0,void 0,(function*(){const u=Xe.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:u})}))}setClusterOptions(u){return this.workerOptions.cluster=u.cluster,u&&(void 0!==u.clusterRadius&&(this.workerOptions.superclusterOptions.radius=u.clusterRadius),void 0!==u.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=u.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(u){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:u,source:this.id}})}getClusterChildren(u){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:u,source:this.id}})}getClusterLeaves(u,Xe,fr){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:u,limit:Xe,offset:fr}})}_updateWorkerData(u){return Xe._(this,void 0,void 0,(function*(){const fr=Xe.e({type:this.type},this.workerOptions);u?fr.dataDiff=u:"string"==typeof this._data?(fr.request=this.map._requestManager.transformRequest(wr.resolveURL(this._data),"Source"),fr.request.collectResourceTiming=this._collectResourceTiming):fr.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new Xe.k("dataloading",{dataType:"source"}));try{const u=yield this.actor.sendAsync({type:"LD",data:fr});if(this._pendingLoads--,this._removed||u.abandoned)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));let Ar=null;u.resourceTiming&&u.resourceTiming[this.id]&&(Ar=u.resourceTiming[this.id].slice(0));const _r={dataType:"source"};this._collectResourceTiming&&Ar&&Ar.length>0&&Xe.e(_r,{resourceTiming:Ar}),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"metadata"}))),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"content"})))}catch(u){if(this._pendingLoads--,this._removed)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));this.fire(new Xe.j(u))}}))}loaded(){return 0===this._pendingLoads}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.actor?"RT":"LT";u.actor=this.actor;const fr={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.abortController=new AbortController;const Ar=yield this.actor.sendAsync({type:Xe,data:fr},u.abortController);delete u.abortController,u.unloadVectorData(),u.aborted||u.loadVectorData(Ar,this.map.painter,"RT"===Xe)}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.aborted=!0}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return Xe.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Po=Xe.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Q extends Xe.E{constructor(u,Xe,fr,Ar){super(),this.id=u,this.dispatcher=fr,this.coordinates=Xe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ar),this.options=Xe}load(u){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const Xe=yield so.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,Xe&&Xe.data&&(this.image=Xe.data,u&&(this.coordinates=u),this._finishLoading())}catch(u){this._request=null,this._loaded=!0,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}updateImage(u){return u.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=u.url,this.load(u.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(u){this.coordinates=u;const fr=u.map(Xe.Z.fromLngLat);this.tileID=function(u){let fr=1/0,Ar=1/0,_r=-1/0,wr=-1/0;for(const Xe of u)fr=Math.min(fr,Xe.x),Ar=Math.min(Ar,Xe.y),_r=Math.max(_r,Xe.x),wr=Math.max(wr,Xe.y);const Kr=Math.max(_r-fr,wr-Ar),In=Math.max(0,Math.floor(-Math.log(Kr)/Math.LN2)),io=Math.pow(2,In);return new Xe.a1(In,Math.floor((fr+_r)/2*io),Math.floor((Ar+wr)/2*io))}(fr),this.minzoom=this.maxzoom=this.tileID.z;const Ar=fr.map((u=>this.tileID.getTilePoint(u)._round()));return this._boundsArray=new Xe.$,this._boundsArray.emplaceBack(Ar[0].x,Ar[0].y,0,0),this._boundsArray.emplaceBack(Ar[1].x,Ar[1].y,Xe.X,0),this._boundsArray.emplaceBack(Ar[3].x,Ar[3].y,0,Xe.X),this._boundsArray.emplaceBack(Ar[2].x,Ar[2].y,Xe.X,Xe.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const u=this.map.painter.context,fr=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new b(u,this.image,fr.RGBA),this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE));let Ar=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,Ar=!0)}Ar&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(u){return Xe._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={}):u.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class tt extends Q{constructor(u,Xe,fr,Ar){super(u,Xe,fr,Ar),this.roundZoom=!0,this.type="video",this.options=Xe}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1;const u=this.options;this.urls=[];for(const Xe of u.urls)this.urls.push(this.map._requestManager.transformRequest(Xe,"Source").url);try{const u=yield Xe.a3(this.urls);if(this._loaded=!0,!u)return;this.video=u,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(u){this.fire(new Xe.j(u))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(u){if(this.video){const fr=this.video.seekable;u<fr.start(0)||u>fr.end(0)?this.fire(new Xe.j(new Xe.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${fr.start(0)} and ${fr.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const u=this.map.painter.context,fr=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE),fr.texSubImage2D(fr.TEXTURE_2D,0,0,0,fr.RGBA,fr.UNSIGNED_BYTE,this.video)):(this.texture=new b(u,this.video,fr.RGBA),this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE));let Ar=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,Ar=!0)}Ar&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class et extends Q{constructor(u,fr,Ar,_r){super(u,fr,Ar,_r),fr.coordinates?Array.isArray(fr.coordinates)&&4===fr.coordinates.length&&!fr.coordinates.some((u=>!Array.isArray(u)||2!==u.length||u.some((u=>"number"!=typeof u))))||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "coordinates"'))),fr.animate&&"boolean"!=typeof fr.animate&&this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),fr.canvas?"string"==typeof fr.canvas||fr.canvas instanceof HTMLCanvasElement||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "canvas"'))),this.options=fr,this.animate=void 0===fr.animate||fr.animate}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new Xe.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const fr=this.map.painter.context,Ar=fr.gl;this.boundsBuffer||(this.boundsBuffer=fr.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new b(fr,this.canvas,Ar.RGBA,{premultiply:!0});let _r=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,_r=!0)}_r&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const ss={},at=u=>{switch(u){case"geojson":return J;case"image":return Q;case"raster":return X;case"raster-dem":return K;case"vector":return $;case"video":return tt;case"canvas":return et}return ss[u]},sa="RTLPluginLoaded";class ot extends Xe.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=U()}_syncState(u){return this.status=u,this.dispatcher.broadcast("SRPS",{pluginStatus:u,pluginURL:this.url}).catch((u=>{throw this.status="error",u}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(u){return Xe._(this,arguments,void 0,(function*(u,Xe=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=wr.resolveURL(u),!this.url)throw new Error(`requested url ${u} is invalid`);if("unavailable"===this.status){if(!Xe)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return Xe._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new Xe.k(sa))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let aa=null;function nt(){return aa||(aa=new ot),aa}class lt{constructor(u,fr){this.timeAdded=0,this.fadeEndTime=0,this.tileID=u,this.uid=Xe.a4(),this.uses=0,this.tileSize=fr,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(u){const Xe=u+this.timeAdded;Xe<this.fadeEndTime||(this.fadeEndTime=Xe)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(u,fr,Ar){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(u,Xe){const fr={};if(!Xe)return fr;for(const Ar of u){const u=Ar.layerIds.map((u=>Xe.getLayer(u))).filter(Boolean);if(0!==u.length){Ar.layers=u,Ar.stateDependentLayerIds&&(Ar.stateDependentLayers=Ar.stateDependentLayerIds.map((Xe=>u.filter((u=>u.id===Xe))[0])));for(const Xe of u)fr[Xe.id]=Ar}}return fr}(u.buckets,fr.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const fr=this.buckets[u];if(fr instanceof Xe.a6){if(this.hasSymbolBuckets=!0,!Ar)break;fr.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const fr=this.buckets[u];if(fr instanceof Xe.a6&&fr.hasRTLText){this.hasRTLText=!0,nt().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const Xe=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,fr.style.getLayer(u).queryRadius(Xe))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new Xe.a5}unloadVectorData(){for(const u in this.buckets)this.buckets[u].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(u){return this.buckets[u.id]}upload(u){for(const Xe in this.buckets){const fr=this.buckets[Xe];fr.uploadPending()&&fr.upload(u)}const Xe=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new b(u,this.imageAtlas.image,Xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new b(u,this.glyphAtlasImage,Xe.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Ar,cameraQueryGeometry:_r,scale:wr,tileSize:this.tileSize,pixelPosMatrix:no,transform:In,params:Kr,queryPadding:this.queryPadding*io},u,Xe,fr):{}}querySourceFeatures(u,fr){const Ar=this.latestFeatureIndex;if(!Ar||!Ar.rawTileData)return;const _r=Ar.loadVTLayers(),wr=fr&&fr.sourceLayer?fr.sourceLayer:"",Kr=_r._geojsonTileLayer||_r[wr];if(!Kr)return;const In=Xe.a7(fr&&fr.filter),{z:io,x:no,y:oo}=this.tileID.canonical,so={z:io,x:no,y:oo};for(let fr=0;fr<Kr.length;fr++){const _r=Kr.feature(fr);if(In.needGeometry){const u=Xe.a8(_r,!0);if(!In.filter(new Xe.z(this.tileID.overscaledZ),u,this.tileID.canonical))continue}else if(!In.filter(new Xe.z(this.tileID.overscaledZ),_r))continue;const ao=Ar.getId(_r,wr),co=new Xe.a9(_r,io,no,oo,ao);co.tile=so,u.push(co)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const fr=this.expirationTime;if(u.cacheControl){const fr=Xe.aa(u.cacheControl);fr["max-age"]&&(this.expirationTime=Date.now()+1e3*fr["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const u=Date.now();let Xe=!1;if(this.expirationTime>u)Xe=!1;else if(fr)if(this.expirationTime<fr)Xe=!0;else{const Ar=this.expirationTime-fr;Ar?this.expirationTime=u+Math.max(Ar,3e4):Xe=!0}else Xe=!0;Xe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(u,Xe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(u).length)return;const fr=this.latestFeatureIndex.loadVTLayers();for(const Ar in this.buckets){if(!Xe.style.hasLayer(Ar))continue;const _r=this.buckets[Ar],wr=_r.layers[0].sourceLayer||"_geojsonTileLayer",Kr=fr[wr],In=u[wr];if(!Kr||!In||0===Object.keys(In).length)continue;_r.update(In,Kr,this.imageAtlas&&this.imageAtlas.patternPositions||{});const io=Xe&&Xe.style&&Xe.style.getLayer(Ar);io&&(this.queryPadding=Math.max(this.queryPadding,io.queryRadius(_r)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<wr.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=wr.now()+u}setDependencies(u,Xe){const fr={};for(const u of Xe)fr[u]=!0;this.dependencies[u]=fr}hasDependency(u,Xe){for(const fr of u){const u=this.dependencies[fr];if(u)for(const fr of Xe)if(u[fr])return!0}return!1}}class ht{constructor(u,Xe){this.max=u,this.onRemove=Xe,this.reset()}reset(){for(const u in this.data)for(const Xe of this.data[u])Xe.timeout&&clearTimeout(Xe.timeout),this.onRemove(Xe.value);return this.data={},this.order=[],this}add(u,Xe,fr){const Ar=u.wrapped().key;void 0===this.data[Ar]&&(this.data[Ar]=[]);const _r={value:Xe,timeout:void 0};if(void 0!==fr&&(_r.timeout=setTimeout((()=>{this.remove(u,_r)}),fr)),this.data[Ar].push(_r),this.order.push(Ar),this.order.length>this.max){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const Xe=this.data[u].shift();return Xe.timeout&&clearTimeout(Xe.timeout),0===this.data[u].length&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),Xe.value}getByKey(u){const Xe=this.data[u];return Xe?Xe[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,Xe){if(!this.has(u))return this;const fr=u.wrapped().key,Ar=void 0===Xe?0:this.data[fr].indexOf(Xe),_r=this.data[fr][Ar];return this.data[fr].splice(Ar,1),_r.timeout&&clearTimeout(_r.timeout),0===this.data[fr].length&&delete this.data[fr],this.onRemove(_r.value),this.order.splice(this.order.indexOf(fr),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}filter(u){const Xe=[];for(const fr in this.data)for(const Ar of this.data[fr])u(Ar.value)||Xe.push(Ar);for(const u of Xe)this.remove(u.value.tileID,u)}}class ct{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,fr,Ar){const _r=String(fr);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][_r]=this.stateChanges[u][_r]||{},Xe.e(this.stateChanges[u][_r],Ar),null===this.deletedStates[u]){this.deletedStates[u]={};for(const Xe in this.state[u])Xe!==_r&&(this.deletedStates[u][Xe]=null)}else if(this.deletedStates[u]&&null===this.deletedStates[u][_r]){this.deletedStates[u][_r]={};for(const Xe in this.state[u][_r])Ar[Xe]||(this.deletedStates[u][_r][Xe]=null)}else for(const Xe in Ar)this.deletedStates[u]&&this.deletedStates[u][_r]&&null===this.deletedStates[u][_r][Xe]&&delete this.deletedStates[u][_r][Xe]}removeFeatureState(u,Xe,fr){if(null===this.deletedStates[u])return;const Ar=String(Xe);if(this.deletedStates[u]=this.deletedStates[u]||{},fr&&void 0!==Xe)null!==this.deletedStates[u][Ar]&&(this.deletedStates[u][Ar]=this.deletedStates[u][Ar]||{},this.deletedStates[u][Ar][fr]=null);else if(void 0!==Xe)if(this.stateChanges[u]&&this.stateChanges[u][Ar])for(fr in this.deletedStates[u][Ar]={},this.stateChanges[u][Ar])this.deletedStates[u][Ar][fr]=null;else this.deletedStates[u][Ar]=null;else this.deletedStates[u]=null}getState(u,fr){const Ar=String(fr),_r=Xe.e({},(this.state[u]||{})[Ar],(this.stateChanges[u]||{})[Ar]);if(null===this.deletedStates[u])return{};if(this.deletedStates[u]){const Xe=this.deletedStates[u][fr];if(null===Xe)return{};for(const u in Xe)delete _r[u]}return _r}initializeTileState(u,Xe){u.setFeatureState(this.state,Xe)}coalesceChanges(u,fr){const Ar={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const fr={};for(const Ar in this.stateChanges[u])this.state[u][Ar]||(this.state[u][Ar]={}),Xe.e(this.state[u][Ar],this.stateChanges[u][Ar]),fr[Ar]=this.state[u][Ar];Ar[u]=fr}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const fr={};if(null===this.deletedStates[u])for(const Xe in this.state[u])fr[Xe]={},this.state[u][Xe]={};else for(const Xe in this.deletedStates[u]){if(null===this.deletedStates[u][Xe])this.state[u][Xe]={};else for(const fr of Object.keys(this.deletedStates[u][Xe]))delete this.state[u][Xe][fr];fr[Xe]=this.state[u][Xe]}Ar[u]=Ar[u]||{},Xe.e(Ar[u],fr)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(Ar).length)for(const Xe in u)u[Xe].setFeatureState(Ar,fr)}}class ut extends Xe.E{constructor(u,Xe,fr){super(),this.id=u,this.dispatcher=fr,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,Xe,fr,Ar)=>{const _r=new(at(Xe.type))(u,Xe,fr,Ar);if(_r.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${_r.id}`);return _r})(u,Xe,fr,this),this._tiles={},this._cache=new ht(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ct,this._didEmitContent=!1,this._updated=!1}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._maxTileCacheZoomLevels=u?u._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const u in this._tiles){const Xe=this._tiles[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,fr,Ar){return Xe._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(u),this._tileLoaded(u,fr,Ar)}catch(fr){u.state="errored",404!==fr.status?this._source.fire(new Xe.j(fr,{tile:u})):this.update(this.transform,this.terrain)}}))}_unloadTile(u){this._source.unloadTile&&this._source.unloadTile(u)}_abortTile(u){this._source.abortTile&&this._source.abortTile(u),this._source.fire(new Xe.k("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const Xe in this._tiles){const fr=this._tiles[Xe];fr.upload(u),fr.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((u=>u.tileID)).sort(dt).map((u=>u.key))}getRenderableIds(u){const fr=[];for(const Xe in this._tiles)this._isIdRenderable(Xe,u)&&fr.push(this._tiles[Xe]);return u?fr.sort(((u,fr)=>{const Ar=u.tileID,_r=fr.tileID,wr=new Xe.P(Ar.canonical.x,Ar.canonical.y)._rotate(this.transform.angle),Kr=new Xe.P(_r.canonical.x,_r.canonical.y)._rotate(this.transform.angle);return Ar.overscaledZ-_r.overscaledZ||Kr.y-wr.y||Kr.x-wr.x})).map((u=>u.tileID.key)):fr.map((u=>u.tileID)).sort(dt).map((u=>u.key))}hasRenderableParent(u){const Xe=this.findLoadedParent(u,0);return!!Xe&&this._isIdRenderable(Xe.tileID.key)}_isIdRenderable(u,Xe){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(Xe||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)"errored"!==this._tiles[u].state&&this._reloadTile(u,"reloading")}}_reloadTile(u,fr){return Xe._(this,void 0,void 0,(function*(){const Xe=this._tiles[u];Xe&&("loading"!==Xe.state&&(Xe.state=fr),yield this._loadTile(Xe,u,fr))}))}_tileLoaded(u,fr,Ar){u.timeAdded=wr.now(),"expired"===Ar&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(fr,u),"raster-dem"===this.getSource().type&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new Xe.k("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const Xe=this.getRenderableIds();for(let fr=0;fr<Xe.length;fr++){const Ar=Xe[fr];if(u.neighboringTiles&&u.neighboringTiles[Ar]){const Xe=this.getTileByID(Ar);i(u,Xe),i(Xe,u)}}function i(u,Xe){u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0;let fr=Xe.tileID.canonical.x-u.tileID.canonical.x;const Ar=Xe.tileID.canonical.y-u.tileID.canonical.y,_r=Math.pow(2,u.tileID.canonical.z),wr=Xe.tileID.key;0===fr&&0===Ar||Math.abs(Ar)>1||(Math.abs(fr)>1&&(1===Math.abs(fr+_r)?fr+=_r:1===Math.abs(fr-_r)&&(fr-=_r)),Xe.dem&&u.dem&&(u.dem.backfillBorder(Xe.dem,fr,Ar),u.neighboringTiles&&u.neighboringTiles[wr]&&(u.neighboringTiles[wr].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,Xe,fr,Ar){for(const _r in this._tiles){let wr=this._tiles[_r];if(Ar[_r]||!wr.hasData()||wr.tileID.overscaledZ<=Xe||wr.tileID.overscaledZ>fr)continue;let Kr=wr.tileID;for(;wr&&wr.tileID.overscaledZ>Xe+1;){const u=wr.tileID.scaledTo(wr.tileID.overscaledZ-1);wr=this._tiles[u.key],wr&&wr.hasData()&&(Kr=u)}let In=Kr;for(;In.overscaledZ>Xe;)if(In=In.scaledTo(In.overscaledZ-1),u[In.key]){Ar[Kr.key]=Kr;break}}}findLoadedParent(u,Xe){if(u.key in this._loadedParentTiles){const fr=this._loadedParentTiles[u.key];return fr&&fr.tileID.overscaledZ>=Xe?fr:null}for(let fr=u.overscaledZ-1;fr>=Xe;fr--){const Xe=u.scaledTo(fr),Ar=this._getLoadedTile(Xe);if(Ar)return Ar}}findLoadedSibling(u){return this._getLoadedTile(u)}_getLoadedTile(u){const Xe=this._tiles[u.key];return Xe&&Xe.hasData()?Xe:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const fr=Math.ceil(u.width/this._source.tileSize)+1,Ar=Math.ceil(u.height/this._source.tileSize)+1,_r=Math.floor(fr*Ar*(null===this._maxTileCacheZoomLevels?Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),wr="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,_r):_r;this._cache.setMaxSize(wr)}handleWrapJump(u){const Xe=Math.round((u-(void 0===this._prevLng?u:this._prevLng))/360);if(this._prevLng=u,Xe){const u={};for(const fr in this._tiles){const Ar=this._tiles[fr];Ar.tileID=Ar.tileID.unwrapTo(Ar.tileID.wrap+Xe),u[Ar.tileID.key]=Ar}this._tiles=u;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(u,Xe,fr,Ar,_r,Kr){const In={},io={},no=Object.keys(u),oo=wr.now();for(const fr of no){const Ar=u[fr],_r=this._tiles[fr];if(!_r||0!==_r.fadeEndTime&&_r.fadeEndTime<=oo)continue;const wr=this.findLoadedParent(Ar,Xe),Kr=this.findLoadedSibling(Ar),no=wr||Kr||null;no&&(this._addTile(no.tileID),In[no.tileID.key]=no.tileID),io[fr]=Ar}this._retainLoadedChildren(io,Ar,fr,u);for(const Xe in In)u[Xe]||(this._coveredTiles[Xe]=!0,u[Xe]=In[Xe]);if(Kr){const Xe={},fr={};for(const u of _r)this._tiles[u.key].hasData()?Xe[u.key]=u:fr[u.key]=u;for(const Ar in fr){const _r=fr[Ar].children(this._source.maxzoom);this._tiles[_r[0].key]&&this._tiles[_r[1].key]&&this._tiles[_r[2].key]&&this._tiles[_r[3].key]&&(Xe[_r[0].key]=u[_r[0].key]=_r[0],Xe[_r[1].key]=u[_r[1].key]=_r[1],Xe[_r[2].key]=u[_r[2].key]=_r[2],Xe[_r[3].key]=u[_r[3].key]=_r[3],delete fr[Ar])}for(const Ar in fr){const _r=fr[Ar],wr=this.findLoadedParent(_r,this._source.minzoom),Kr=this.findLoadedSibling(_r),In=wr||Kr||null;if(In){Xe[In.tileID.key]=u[In.tileID.key]=In.tileID;for(const u in Xe)Xe[u].isChildOf(In.tileID)&&delete Xe[u]}}for(const u in this._tiles)Xe[u]||(this._coveredTiles[u]=!0)}}update(u,fr){if(!this._sourceLoaded||this._paused)return;let Ar;this.transform=u,this.terrain=fr,this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Ar=u.getVisibleUnwrappedCoordinates(this._source.tileID).map((u=>new Xe.S(u.canonical.z,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y))):(Ar=u.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:fr}),this._source.hasTile&&(Ar=Ar.filter((u=>this._source.hasTile(u))))):Ar=[];const _r=u.coveringZoomLevel(this._source),wr=Math.max(_r-ut.maxOverzooming,this._source.minzoom),Kr=Math.max(_r+ut.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const u={};for(const Xe of Ar)if(Xe.canonical.z>this._source.minzoom){const fr=Xe.scaledTo(Xe.canonical.z-1);u[fr.key]=fr;const Ar=Xe.scaledTo(Math.max(this._source.minzoom,Math.min(Xe.canonical.z,5)));u[Ar.key]=Ar}Ar=Ar.concat(Object.values(u))}const In=0===Ar.length&&!this._updated&&this._didEmitContent;this._updated=!0,In&&this.fire(new Xe.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const io=this._updateRetainedTiles(Ar,_r);_t(this._source.type)&&this._updateCoveredAndRetainedTiles(io,wr,Kr,_r,Ar,fr);for(const u in io)this._tiles[u].clearFadeHold();const no=Xe.ab(this._tiles,io);for(const u of no){const Xe=this._tiles[u];Xe.hasSymbolBuckets&&!Xe.holdingForFade()?Xe.setHoldDuration(this.map._fadeDuration):Xe.hasSymbolBuckets&&!Xe.symbolFadeFinished()||this._removeTile(u)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,Xe){var fr;const Ar={},_r={},wr=Math.max(Xe-ut.maxOverzooming,this._source.minzoom),Kr=Math.max(Xe+ut.maxUnderzooming,this._source.minzoom),In={};for(const fr of u){const u=this._addTile(fr);Ar[fr.key]=fr,u.hasData()||Xe<this._source.maxzoom&&(In[fr.key]=fr)}this._retainLoadedChildren(In,Xe,Kr,Ar);for(const Kr of u){let u=this._tiles[Kr.key];if(u.hasData())continue;if(Xe+1>this._source.maxzoom){const u=Kr.children(this._source.maxzoom)[0],Xe=this.getTile(u);if(Xe&&Xe.hasData()){Ar[u.key]=u;continue}}else{const u=Kr.children(this._source.maxzoom);if(Ar[u[0].key]&&Ar[u[1].key]&&Ar[u[2].key]&&Ar[u[3].key])continue}let In=u.wasRequested();for(let Xe=Kr.overscaledZ-1;Xe>=wr;--Xe){const wr=Kr.scaledTo(Xe);if(_r[wr.key])break;if(_r[wr.key]=!0,u=this.getTile(wr),!u&&In&&(u=this._addTile(wr)),u){const Xe=u.hasData();if((Xe||!(null===(fr=this.map)||void 0===fr?void 0:fr.cancelPendingTileRequestsWhileZooming)||In)&&(Ar[wr.key]=wr),In=u.wasRequested(),Xe)break}}}return Ar}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const Xe=[];let fr,Ar=this._tiles[u].tileID;for(;Ar.overscaledZ>0;){if(Ar.key in this._loadedParentTiles){fr=this._loadedParentTiles[Ar.key];break}Xe.push(Ar.key);const u=Ar.scaledTo(Ar.overscaledZ-1);if(fr=this._getLoadedTile(u),fr)break;Ar=u}for(const u of Xe)this._loadedParentTiles[u]=fr}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const u in this._tiles){const Xe=this._tiles[u].tileID,fr=this._getLoadedTile(Xe);this._loadedSiblingTiles[Xe.key]=fr}}_addTile(u){let fr=this._tiles[u.key];if(fr)return fr;fr=this._cache.getAndRemove(u),fr&&(this._setTileReloadTimer(u.key,fr),fr.tileID=u,this._state.initializeTileState(fr,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,fr)));const Ar=fr;return fr||(fr=new lt(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(fr,u.key,fr.state)),fr.uses++,this._tiles[u.key]=fr,Ar||this._source.fire(new Xe.k("dataloading",{tile:fr,coord:fr.tileID,dataType:"source"})),fr}_setTileReloadTimer(u,Xe){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const fr=Xe.getExpiryTimeout();fr&&(this._timers[u]=setTimeout((()=>{this._reloadTile(u,"expired"),delete this._timers[u]}),fr))}_removeTile(u){const Xe=this._tiles[u];Xe&&(Xe.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),Xe.uses>0||(Xe.hasData()&&"reloading"!==Xe.state?this._cache.add(Xe.tileID,Xe,Xe.getExpiryTimeout()):(Xe.aborted=!0,this._abortTile(Xe),this._unloadTile(Xe))))}_dataHandler(u){const Xe=u.sourceDataType;"source"===u.dataType&&"metadata"===Xe&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===u.dataType&&"content"===Xe&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,fr,Ar){const _r=[],wr=this.transform;if(!wr)return _r;const Kr=Ar?wr.getCameraQueryGeometry(u):u,In=u.map((u=>wr.pointCoordinate(u,this.terrain))),io=Kr.map((u=>wr.pointCoordinate(u,this.terrain))),no=this.getIds();let oo=1/0,so=1/0,ao=-1/0,co=-1/0;for(const u of io)oo=Math.min(oo,u.x),so=Math.min(so,u.y),ao=Math.max(ao,u.x),co=Math.max(co,u.y);for(let u=0;u<no.length;u++){const Ar=this._tiles[no[u]];if(Ar.holdingForFade())continue;const Kr=Ar.tileID,go=Math.pow(2,wr.zoom-Ar.tileID.overscaledZ),ho=fr*Ar.queryPadding*Xe.X/Ar.tileSize/go,Co=[Kr.getTilePoint(new Xe.Z(oo,so)),Kr.getTilePoint(new Xe.Z(ao,co))];if(Co[0].x-ho<Xe.X&&Co[0].y-ho<Xe.X&&Co[1].x+ho>=0&&Co[1].y+ho>=0){const u=In.map((u=>Kr.getTilePoint(u))),Xe=io.map((u=>Kr.getTilePoint(u)));_r.push({tile:Ar,tileID:Kr,queryGeometry:u,cameraQueryGeometry:Xe,scale:go})}}return _r}getVisibleCoordinates(u){const Xe=this.getRenderableIds(u).map((u=>this._tiles[u].tileID));for(const u of Xe)u.posMatrix=this.transform.calculatePosMatrix(u.toUnwrapped());return Xe}hasTransition(){if(this._source.hasTransition())return!0;if(_t(this._source.type)){const u=wr.now();for(const Xe in this._tiles)if(this._tiles[Xe].fadeEndTime>=u)return!0}return!1}setFeatureState(u,Xe,fr){this._state.updateState(u=u||"_geojsonTileLayer",Xe,fr)}removeFeatureState(u,Xe,fr){this._state.removeFeatureState(u=u||"_geojsonTileLayer",Xe,fr)}getFeatureState(u,Xe){return this._state.getState(u=u||"_geojsonTileLayer",Xe)}setDependencies(u,Xe,fr){const Ar=this._tiles[u];Ar&&Ar.setDependencies(Xe,fr)}reloadTilesForDependencies(u,Xe){for(const fr in this._tiles)this._tiles[fr].hasDependency(u,Xe)&&this._reloadTile(fr,"reloading");this._cache.filter((fr=>!fr.hasDependency(u,Xe)))}}function dt(u,Xe){const fr=Math.abs(2*u.wrap)-+(u.wrap<0),Ar=Math.abs(2*Xe.wrap)-+(Xe.wrap<0);return u.overscaledZ-Xe.overscaledZ||Ar-fr||Xe.canonical.y-u.canonical.y||Xe.canonical.x-u.canonical.x}function _t(u){return"raster"===u||"image"===u||"video"===u}ut.maxOverzooming=10,ut.maxUnderzooming=3;class pt{constructor(u,Xe){this.reset(u,Xe)}reset(u,Xe){this.points=u||[],this._distances=[0];for(let u=1;u<this.points.length;u++)this._distances[u]=this._distances[u-1]+this.points[u].dist(this.points[u-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Xe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(1===this.points.length)return this.points[0];u=Xe.ac(u,0,1);let fr=1,Ar=this._distances[fr];const _r=u*this.paddedLength+this.padding;for(;Ar<_r&&fr<this._distances.length;)Ar=this._distances[++fr];const wr=fr-1,Kr=this._distances[wr],In=Ar-Kr,io=In>0?(_r-Kr)/In:0;return this.points[wr].mult(1-io).add(this.points[fr].mult(io))}}function mt(u,Xe){let fr=!0;return"always"===u||"never"!==u&&"never"!==Xe||(fr=!1),fr}class ft{constructor(u,Xe,fr){const Ar=this.boxCells=[],_r=this.circleCells=[];this.xCellCount=Math.ceil(u/fr),this.yCellCount=Math.ceil(Xe/fr);for(let u=0;u<this.xCellCount*this.yCellCount;u++)Ar.push([]),_r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=Xe,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/Xe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,Xe,fr,Ar,_r){this._forEachCell(Xe,fr,Ar,_r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(Xe),this.bboxes.push(fr),this.bboxes.push(Ar),this.bboxes.push(_r)}insertCircle(u,Xe,fr,Ar){this._forEachCell(Xe-Ar,fr-Ar,Xe+Ar,fr+Ar,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(Xe),this.circles.push(fr),this.circles.push(Ar)}_insertBoxCell(u,Xe,fr,Ar,_r,wr){this.boxCells[_r].push(wr)}_insertCircleCell(u,Xe,fr,Ar,_r,wr){this.circleCells[_r].push(wr)}_query(u,Xe,fr,Ar,_r,wr,Kr){if(fr<0||u>this.width||Ar<0||Xe>this.height)return[];const In=[];if(u<=0&&Xe<=0&&this.width<=fr&&this.height<=Ar){if(_r)return[{key:null,x1:u,y1:Xe,x2:fr,y2:Ar}];for(let u=0;u<this.boxKeys.length;u++)In.push({key:this.boxKeys[u],x1:this.bboxes[4*u],y1:this.bboxes[4*u+1],x2:this.bboxes[4*u+2],y2:this.bboxes[4*u+3]});for(let u=0;u<this.circleKeys.length;u++){const Xe=this.circles[3*u],fr=this.circles[3*u+1],Ar=this.circles[3*u+2];In.push({key:this.circleKeys[u],x1:Xe-Ar,y1:fr-Ar,x2:Xe+Ar,y2:fr+Ar})}}else this._forEachCell(u,Xe,fr,Ar,this._queryCell,In,{hitTest:_r,overlapMode:wr,seenUids:{box:{},circle:{}}},Kr);return In}query(u,Xe,fr,Ar){return this._query(u,Xe,fr,Ar,!1,null)}hitTest(u,Xe,fr,Ar,_r,wr){return this._query(u,Xe,fr,Ar,!0,_r,wr).length>0}hitTestCircle(u,Xe,fr,Ar,_r){const wr=u-fr,Kr=u+fr,In=Xe-fr,io=Xe+fr;if(Kr<0||wr>this.width||io<0||In>this.height)return!1;const no=[];return this._forEachCell(wr,In,Kr,io,this._queryCellCircle,no,{hitTest:!0,overlapMode:Ar,circle:{x:u,y:Xe,radius:fr},seenUids:{box:{},circle:{}}},_r),no.length>0}_queryCell(u,Xe,fr,Ar,_r,wr,Kr,In){const{seenUids:io,hitTest:no,overlapMode:oo}=Kr,so=this.boxCells[_r];if(null!==so){const _r=this.bboxes;for(const Kr of so)if(!io.box[Kr]){io.box[Kr]=!0;const so=4*Kr,ao=this.boxKeys[Kr];if(u<=_r[so+2]&&Xe<=_r[so+3]&&fr>=_r[so+0]&&Ar>=_r[so+1]&&(!In||In(ao))&&(!no||!mt(oo,ao.overlapMode))&&(wr.push({key:ao,x1:_r[so],y1:_r[so+1],x2:_r[so+2],y2:_r[so+3]}),no))return!0}}const ao=this.circleCells[_r];if(null!==ao){const _r=this.circles;for(const Kr of ao)if(!io.circle[Kr]){io.circle[Kr]=!0;const so=3*Kr,ao=this.circleKeys[Kr];if(this._circleAndRectCollide(_r[so],_r[so+1],_r[so+2],u,Xe,fr,Ar)&&(!In||In(ao))&&(!no||!mt(oo,ao.overlapMode))){const u=_r[so],Xe=_r[so+1],fr=_r[so+2];if(wr.push({key:ao,x1:u-fr,y1:Xe-fr,x2:u+fr,y2:Xe+fr}),no)return!0}}}return!1}_queryCellCircle(u,Xe,fr,Ar,_r,wr,Kr,In){const{circle:io,seenUids:no,overlapMode:oo}=Kr,so=this.boxCells[_r];if(null!==so){const u=this.bboxes;for(const Xe of so)if(!no.box[Xe]){no.box[Xe]=!0;const fr=4*Xe,Ar=this.boxKeys[Xe];if(this._circleAndRectCollide(io.x,io.y,io.radius,u[fr+0],u[fr+1],u[fr+2],u[fr+3])&&(!In||In(Ar))&&!mt(oo,Ar.overlapMode))return wr.push(!0),!0}}const ao=this.circleCells[_r];if(null!==ao){const u=this.circles;for(const Xe of ao)if(!no.circle[Xe]){no.circle[Xe]=!0;const fr=3*Xe,Ar=this.circleKeys[Xe];if(this._circlesCollide(u[fr],u[fr+1],u[fr+2],io.x,io.y,io.radius)&&(!In||In(Ar))&&!mt(oo,Ar.overlapMode))return wr.push(!0),!0}}}_forEachCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this._convertToXCellCoord(u),no=this._convertToYCellCoord(Xe),oo=this._convertToXCellCoord(fr),so=this._convertToYCellCoord(Ar);for(let ao=io;ao<=oo;ao++)for(let io=no;io<=so;io++)if(_r.call(this,u,Xe,fr,Ar,this.xCellCount*io+ao,wr,Kr,In))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,Xe,fr,Ar,_r,wr){const Kr=Ar-u,In=_r-Xe,io=fr+wr;return io*io>Kr*Kr+In*In}_circleAndRectCollide(u,Xe,fr,Ar,_r,wr,Kr){const In=(wr-Ar)/2,io=Math.abs(u-(Ar+In));if(io>In+fr)return!1;const no=(Kr-_r)/2,oo=Math.abs(Xe-(_r+no));if(oo>no+fr)return!1;if(io<=In||oo<=no)return!0;const so=io-In,ao=oo-no;return so*so+ao*ao<=fr*fr}}function gt(u,fr,Ar,_r,wr){const Kr=Xe.H();return fr?(Xe.K(Kr,Kr,[1/wr,1/wr,1]),Ar||Xe.ad(Kr,Kr,_r.angle)):Xe.L(Kr,_r.labelPlaneMatrix,u),Kr}function vt(u,fr,Ar,_r,wr){if(fr){const fr=Xe.ae(u);return Xe.K(fr,fr,[wr,wr,1]),Ar||Xe.ad(fr,fr,-_r.angle),fr}return _r.glCoordMatrix}function xt(u,fr,Ar){let _r;Ar?(_r=[u.x,u.y,Ar(u.x,u.y),1],Xe.af(_r,_r,fr)):(_r=[u.x,u.y,0,1],function(u,Xe,fr){const Ar=Xe[0],_r=Xe[1];u[0]=fr[0]*Ar+fr[4]*_r+fr[12],u[1]=fr[1]*Ar+fr[5]*_r+fr[13],u[3]=fr[3]*Ar+fr[7]*_r+fr[15]}(_r,_r,fr));const wr=_r[3];return{point:new Xe.P(_r[0]/wr,_r[1]/wr),signedDistanceFromCamera:wr,isOccluded:!1}}function yt(u,Xe){return.5+u/Xe*.5}function bt(u,Xe){return u.x>=-Xe[0]&&u.x<=Xe[0]&&u.y>=-Xe[1]&&u.y<=Xe[1]}function wt(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=_r?u.textSizeData:u.iconSizeData,Io=Xe.ag(Co,Ar.transform.zoom),xo=[256/Ar.width*2+1,256/Ar.height*2+1],Mo=_r?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;Mo.clear();const Po=u.lineVertexArray,ss=_r?u.text.placedSymbolArray:u.icon.placedSymbolArray,sa=Ar.transform.width/Ar.transform.height;let aa=!1;for(let _r=0;_r<ss.length;_r++){const fa=ss.get(_r);if(fa.hidden||fa.writingMode===Xe.ah.vertical&&!aa){Rt(fa.numGlyphs,Mo);continue}aa=!1;const ya=xt(new Xe.P(fa.anchorX,fa.anchorY),fr,ho);if(!bt(ya.point,xo)){Rt(fa.numGlyphs,Mo);continue}const ol=yt(Ar.transform.cameraToCenterDistance,ya.signedDistanceFromCamera),sl=Xe.ai(Co,Io,fa),al=In?sl/ol:sl*ol,cl={getElevation:ho,labelPlaneMatrix:wr,lineVertexArray:Po,pitchWithMap:In,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:oo,tileAnchorPoint:new Xe.P(fa.anchorX,fa.anchorY),unwrappedTileID:so,width:ao,height:co,translation:go},hl=Et(cl,fa,al,!1,io,fr,Kr,u.glyphOffsetArray,Mo,sa,no);aa=hl.useVertical,(hl.notEnoughRoom||aa||hl.needsFlipping&&Et(cl,fa,al,!0,io,fr,Kr,u.glyphOffsetArray,Mo,sa,no).notEnoughRoom)&&Rt(fa.numGlyphs,Mo)}_r?u.text.dynamicLayoutVertexBuffer.updateData(Mo):u.icon.dynamicLayoutVertexBuffer.updateData(Mo)}function Tt(u,Xe,fr,Ar,_r,wr,Kr,In){const io=wr.glyphStartIndex+wr.numGlyphs,no=wr.lineStartIndex,oo=wr.lineStartIndex+wr.lineLength,so=Xe.getoffsetX(wr.glyphStartIndex),ao=Xe.getoffsetX(io-1),co=Mt(u*so,fr,Ar,_r,wr.segment,no,oo,In,Kr);if(!co)return null;const go=Mt(u*ao,fr,Ar,_r,wr.segment,no,oo,In,Kr);return go?In.projectionCache.anyProjectionOccluded?null:{first:co,last:go}:null}function It(u,fr,Ar,_r){return u===Xe.ah.horizontal&&Math.abs(Ar.y-fr.y)>Math.abs(Ar.x-fr.x)*_r?{useVertical:!0}:(u===Xe.ah.vertical?fr.y<Ar.y:fr.x>Ar.x)?{needsFlipping:!0}:null}function Et(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so){const ao=Ar/24,co=fr.lineOffsetX*ao,go=fr.lineOffsetY*ao;let ho;if(fr.numGlyphs>1){const Xe=fr.glyphStartIndex+fr.numGlyphs,Ar=fr.lineStartIndex,Kr=fr.lineStartIndex+fr.lineLength,no=Tt(ao,io,co,go,_r,fr,so,u);if(!no)return{notEnoughRoom:!0};const Co=xt(no.first.point,In,u.getElevation).point,Io=xt(no.last.point,In,u.getElevation).point;if(wr&&!_r){const u=It(fr.writingMode,Co,Io,oo);if(u)return u}ho=[no.first];for(let wr=fr.glyphStartIndex+1;wr<Xe-1;wr++)ho.push(Mt(ao*io.getoffsetX(wr),co,go,_r,fr.segment,Ar,Kr,u,so));ho.push(no.last)}else{if(wr&&!_r){const Ar=xt(u.tileAnchorPoint,Kr,u.getElevation).point,_r=fr.lineStartIndex+fr.segment+1,wr=new Xe.P(u.lineVertexArray.getx(_r),u.lineVertexArray.gety(_r)),In=xt(wr,Kr,u.getElevation),io=In.signedDistanceFromCamera>0?In.point:function(u,Xe,fr,Ar,_r,wr){return Pt(u,Xe,fr,1,_r,wr)}(u.tileAnchorPoint,wr,Ar,0,Kr,u),no=It(fr.writingMode,Ar,io,oo);if(no)return no}const Ar=Mt(ao*io.getoffsetX(fr.glyphStartIndex),co,go,_r,fr.segment,fr.lineStartIndex,fr.lineStartIndex+fr.lineLength,u,so);if(!Ar||u.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ho=[Ar]}for(const u of ho)Xe.aj(no,u.point,u.angle);return{}}function Pt(u,Xe,fr,Ar,_r,wr){const Kr=u.add(u.sub(Xe)._unit()),In=void 0!==_r?xt(Kr,_r,wr.getElevation).point:St(Kr.x,Kr.y,wr).point,io=fr.sub(In);return fr.add(io._mult(Ar/io.mag()))}function Ct(u,fr,Ar){const _r=fr.projectionCache;if(_r.projections[u])return _r.projections[u];const wr=new Xe.P(fr.lineVertexArray.getx(u),fr.lineVertexArray.gety(u)),Kr=St(wr.x,wr.y,fr);if(Kr.signedDistanceFromCamera>0)return _r.projections[u]=Kr.point,_r.anyProjectionOccluded=_r.anyProjectionOccluded||Kr.isOccluded,Kr.point;const In=u-Ar.direction;return function(u,Xe,fr,Ar,_r){return Pt(u,Xe,fr,Ar,void 0,_r)}(0===Ar.distanceFromAnchor?fr.tileAnchorPoint:new Xe.P(fr.lineVertexArray.getx(In),fr.lineVertexArray.gety(In)),wr,Ar.previousVertex,Ar.absOffsetX-Ar.distanceFromAnchor+1,fr)}function St(u,fr,Ar){const _r=u+Ar.translation[0],wr=fr+Ar.translation[1];let Kr;return!Ar.pitchWithMap&&Ar.projection.useSpecialProjectionForSymbols?(Kr=Ar.projection.projectTileCoordinates(_r,wr,Ar.unwrappedTileID,Ar.getElevation),Kr.point.x=(.5*Kr.point.x+.5)*Ar.width,Kr.point.y=(.5*-Kr.point.y+.5)*Ar.height):(Kr=xt(new Xe.P(_r,wr),Ar.labelPlaneMatrix,Ar.getElevation),Kr.isOccluded=!1),Kr}function zt(u,Xe,fr){return u._unit()._perp()._mult(Xe*fr)}function Dt(u,fr,Ar,_r,wr,Kr,In,io,no){if(io.projectionCache.offsets[u])return io.projectionCache.offsets[u];const oo=Ar.add(fr);if(u+no.direction<_r||u+no.direction>=wr)return io.projectionCache.offsets[u]=oo,oo;const so=Ct(u+no.direction,io,no),ao=zt(so.sub(Ar),In,no.direction),co=Ar.add(ao),go=so.add(ao);return io.projectionCache.offsets[u]=Xe.ak(Kr,oo,co,go)||oo,io.projectionCache.offsets[u]}function Mt(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=Ar?u-Xe:u+Xe;let oo=no>0?1:-1,so=0;Ar&&(oo*=-1,so=Math.PI),oo<0&&(so+=Math.PI);let ao,co=oo>0?wr+_r:wr+_r+1;In.projectionCache.cachedAnchorPoint?ao=In.projectionCache.cachedAnchorPoint:(ao=St(In.tileAnchorPoint.x,In.tileAnchorPoint.y,In).point,In.projectionCache.cachedAnchorPoint=ao);let go,ho,Co=ao,Io=ao,xo=0,Mo=0;const Po=Math.abs(no),ss=[];let sa;for(;xo+Mo<=Po;){if(co+=oo,co<wr||co>=Kr)return null;xo+=Mo,Io=Co,ho=go;const u={absOffsetX:Po,direction:oo,distanceFromAnchor:xo,previousVertex:Io};if(Co=Ct(co,In,u),0===fr)ss.push(Io),sa=Co.sub(Io);else{let Xe;const Ar=Co.sub(Io);Xe=0===Ar.mag()?zt(Ct(co+oo,In,u).sub(Co),fr,oo):zt(Ar,fr,oo),ho||(ho=Io.add(Xe)),go=Dt(co,Xe,Co,wr,Kr,ho,fr,In,u),ss.push(ho),sa=go.sub(ho)}Mo=sa.mag()}const aa=sa._mult((Po-xo)/Mo)._add(ho||Io),fa=so+Math.atan2(Co.y-Io.y,Co.x-Io.x);return ss.push(aa),{point:aa,angle:io?fa:0,path:ss}}const fa=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Rt(u,Xe){for(let fr=0;fr<u;fr++){const u=Xe.length;Xe.resize(u+4),Xe.float32.set(fa,3*u)}}const ya=100;class Lt{constructor(u,Xe,fr=new ft(u.width+200,u.height+200,25),Ar=new ft(u.width+200,u.height+200,25)){this.transform=u,this.mapProjection=Xe,this.grid=fr,this.ignoredGrid=Ar,this.pitchFactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+ya,this.screenBottomBoundary=u.height+ya,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=u.anchorPointX+In[0],ao=u.anchorPointY+In[1],co=this.projectAndGetPerspectiveRatio(Ar,so,ao,_r,no),go=this._projectCollisionBox(u,fr,Ar,_r,wr,Kr,In,co,no,oo),[ho,Co,Io,xo]=go.box;return this.mapProjection.useSpecialProjectionForSymbols&&(wr?go.allPointsOccluded:this.mapProjection.isOccluded(so,ao,_r))||co.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(ho,Co,Io,xo)||"always"!==Xe&&this.grid.hitTest(ho,Co,Io,xo,Xe,io)?{box:[ho,Co,Io,xo],placeable:!1,offscreen:!1}:{box:[ho,Co,Io,xo],placeable:!0,offscreen:this.isOffscreen(ho,Co,Io,xo)}}placeCollisionCircles(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co){const Io=[],xo=new Xe.P(fr.anchorX,fr.anchorY),Mo=this.getPerspectiveRatio(Kr,xo.x,xo.y,In,Co),Po=(so?wr/Mo:wr*Mo)/Xe.ap,ss={getElevation:Co,labelPlaneMatrix:io,lineVertexArray:Ar,pitchWithMap:so,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:xo,unwrappedTileID:In,width:this.transform.width,height:this.transform.height,translation:ho},sa=Tt(Po,_r,fr.lineOffsetX*Po,fr.lineOffsetY*Po,!1,fr,!1,ss);let aa=!1,fa=!1,ol=!0;if(sa){const fr=.5*co*Mo+go,Ar=new Xe.P(-100,-100),_r=new Xe.P(this.screenRightBoundary,this.screenBottomBoundary),wr=new pt,Kr=sa.first,In=sa.last;let io=[];for(let u=Kr.path.length-1;u>=1;u--)io.push(Kr.path[u]);for(let u=1;u<In.path.length;u++)io.push(In.path[u]);const so=2.5*fr;if(no){const u=this.projectPathToScreenSpace(io,ss,no);io=u.some((u=>u.signedDistanceFromCamera<=0))?[]:u.map((u=>u.point))}let ho=[];if(io.length>0){const u=io[0].clone(),fr=io[0].clone();for(let Xe=1;Xe<io.length;Xe++)u.x=Math.min(u.x,io[Xe].x),u.y=Math.min(u.y,io[Xe].y),fr.x=Math.max(fr.x,io[Xe].x),fr.y=Math.max(fr.y,io[Xe].y);ho=u.x>=Ar.x&&fr.x<=_r.x&&u.y>=Ar.y&&fr.y<=_r.y?[io]:fr.x<Ar.x||u.x>_r.x||fr.y<Ar.y||u.y>_r.y?[]:Xe.al([io],Ar.x,Ar.y,_r.x,_r.y)}for(const Xe of ho){wr.reset(Xe,.25*fr);let Ar=0;Ar=wr.length<=.5*fr?1:Math.ceil(wr.paddedLength/so)+1;for(let Xe=0;Xe<Ar;Xe++){const _r=Xe/Math.max(Ar-1,1),Kr=wr.lerp(_r),In=Kr.x+ya,io=Kr.y+ya;Io.push(In,io,fr,0);const no=In-fr,so=io-fr,co=In+fr,go=io+fr;if(ol=ol&&this.isOffscreen(no,so,co,go),fa=fa||this.isInsideGrid(no,so,co,go),"always"!==u&&this.grid.hitTestCircle(In,io,fr,u,ao)&&(aa=!0,!oo))return{circles:[],offscreen:!1,collisionDetected:aa}}}}return{circles:!oo&&aa||!fa||Mo<this.perspectiveRatioCutoff?[]:Io,offscreen:ol,collisionDetected:aa}}projectPathToScreenSpace(u,Xe,fr){return u.map((u=>xt(u,fr,Xe.getElevation)))}queryRenderedSymbols(u){if(0===u.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const fr=[];let Ar=1/0,_r=1/0,wr=-1/0,Kr=-1/0;for(const In of u){const u=new Xe.P(In.x+ya,In.y+ya);Ar=Math.min(Ar,u.x),_r=Math.min(_r,u.y),wr=Math.max(wr,u.x),Kr=Math.max(Kr,u.y),fr.push(u)}const In=this.grid.query(Ar,_r,wr,Kr).concat(this.ignoredGrid.query(Ar,_r,wr,Kr)),io={},no={};for(const u of In){const Ar=u.key;if(void 0===io[Ar.bucketInstanceId]&&(io[Ar.bucketInstanceId]={}),io[Ar.bucketInstanceId][Ar.featureIndex])continue;const _r=[new Xe.P(u.x1,u.y1),new Xe.P(u.x2,u.y1),new Xe.P(u.x2,u.y2),new Xe.P(u.x1,u.y2)];Xe.am(fr,_r)&&(io[Ar.bucketInstanceId][Ar.featureIndex]=!0,void 0===no[Ar.bucketInstanceId]&&(no[Ar.bucketInstanceId]=[]),no[Ar.bucketInstanceId].push(Ar.featureIndex))}return no}insertCollisionBox(u,Xe,fr,Ar,_r,wr){(fr?this.ignoredGrid:this.grid).insert({bucketInstanceId:Ar,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,Xe,fr,Ar,_r,wr){const Kr=fr?this.ignoredGrid:this.grid,In={bucketInstanceId:Ar,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe};for(let Xe=0;Xe<u.length;Xe+=4)Kr.insertCircle(In,u[Xe],u[Xe+1],u[Xe+2])}projectAndGetPerspectiveRatio(u,fr,Ar,_r,wr){const Kr=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fr,Ar,_r,wr):xt(new Xe.P(fr,Ar),u,wr);return{point:new Xe.P((Kr.point.x+1)/2*this.transform.width+ya,(1-Kr.point.y)/2*this.transform.height+ya),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Kr.signedDistanceFromCamera*.5,isOccluded:Kr.isOccluded,signedDistanceFromCamera:Kr.signedDistanceFromCamera}}getPerspectiveRatio(u,fr,Ar,_r,wr){const Kr=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fr,Ar,_r,wr):xt(new Xe.P(fr,Ar),u,wr);return.5+this.transform.cameraToCenterDistance/Kr.signedDistanceFromCamera*.5}isOffscreen(u,Xe,fr,Ar){return fr<ya||u>=this.screenRightBoundary||Ar<ya||Xe>this.screenBottomBoundary}isInsideGrid(u,Xe,fr,Ar){return fr>=0&&u<this.gridRightBoundary&&Ar>=0&&Xe<this.gridBottomBoundary}getViewportMatrix(){const u=Xe.an([]);return Xe.J(u,u,[-100,-100,0]),u}_projectCollisionBox(u,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=fr*io.perspectiveRatio;let ao=new Xe.P(1,0),co=new Xe.P(0,1);const go=new Xe.P(u.anchorPointX+In[0],u.anchorPointY+In[1]);if(Kr&&!wr){const u=this.projectAndGetPerspectiveRatio(Ar,go.x+1,go.y,_r,no).point.sub(io.point).unit(),fr=Math.atan(u.y/u.x)+(u.x<0?Math.PI:0),wr=Math.sin(fr),Kr=Math.cos(fr);ao=new Xe.P(Kr,wr),co=new Xe.P(-wr,Kr)}else if(!Kr&&wr){const u=-this.transform.angle,fr=Math.sin(u),Ar=Math.cos(u);ao=new Xe.P(Ar,fr),co=new Xe.P(-fr,Ar)}let ho=io.point,Co=so;if(wr){ho=go;const u=this.transform.zoom-Math.floor(this.transform.zoom);Co=Math.pow(2,-u),Co*=this.mapProjection.getPitchedTextCorrection(this.transform,go,_r),oo||(Co*=Xe.ac(.5+io.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}oo&&(ho=ho.add(ao.mult(oo.x*Co)).add(co.mult(oo.y*Co)));const Io=u.x1*Co,xo=u.x2*Co,Mo=(Io+xo)/2,Po=u.y1*Co,ss=u.y2*Co,sa=(Po+ss)/2,aa=[{offsetX:Io,offsetY:Po},{offsetX:Mo,offsetY:Po},{offsetX:xo,offsetY:Po},{offsetX:xo,offsetY:sa},{offsetX:xo,offsetY:ss},{offsetX:Mo,offsetY:ss},{offsetX:Io,offsetY:ss},{offsetX:Io,offsetY:sa}];let fa=[];for(const{offsetX:u,offsetY:fr}of aa)fa.push(new Xe.P(ho.x+ao.x*u+co.x*fr,ho.y+ao.y*u+co.y*fr));let ya=!1;if(wr){const u=fa.map((u=>this.projectAndGetPerspectiveRatio(Ar,u.x,u.y,_r,no)));ya=u.some((u=>!u.isOccluded)),fa=u.map((u=>u.point))}else ya=!0;return{box:Xe.ao(fa),allPointsOccluded:!ya}}}function Ft(u,fr,Ar){return fr*(Xe.X/(u.tileSize*Math.pow(2,Ar-u.tileID.overscaledZ)))}class Bt{constructor(u,Xe,fr,Ar){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?Xe:-Xe))):Ar&&fr?1:0,this.placed=fr}isHidden(){return 0===this.opacity&&!this.placed}}class Ot{constructor(u,Xe,fr,Ar,_r){this.text=new Bt(u?u.text:null,Xe,fr,_r),this.icon=new Bt(u?u.icon:null,Xe,Ar,_r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Nt{constructor(u,Xe,fr){this.text=u,this.icon=Xe,this.skipFade=fr}}class jt{constructor(){this.invProjMatrix=Xe.H(),this.viewportMatrix=Xe.H(),this.circles=[]}}class Ut{constructor(u,Xe,fr,Ar,_r){this.bucketInstanceId=u,this.featureIndex=Xe,this.sourceLayerIndex=fr,this.bucketIndex=Ar,this.tileID=_r}}class Zt{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const Xe=++this.maxGroupID;this.collisionGroups[u]={ID:Xe,predicate:u=>u.collisionGroupID===Xe}}return this.collisionGroups[u]}}function qt(u,fr,Ar,_r,wr){const{horizontalAlign:Kr,verticalAlign:In}=Xe.au(u);return new Xe.P(-(Kr-.5)*fr+_r[0]*wr,-(In-.5)*Ar+_r[1]*wr)}class Vt{constructor(u,Xe,fr,Ar,_r,wr){this.transform=u.clone(),this.terrain=fr,this.collisionIndex=new Lt(this.transform,Xe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Ar,this.retainedQueryData={},this.collisionGroups=new Zt(_r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=wr,wr&&(wr.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(u){const Xe=this.terrain;return Xe?(fr,Ar)=>Xe.getElevation(u,fr,Ar):null}getBucketParts(u,fr,Ar,_r){const wr=Ar.getBucket(fr),Kr=Ar.latestFeatureIndex;if(!wr||!Kr||fr.id!==wr.layerIds[0])return;const In=Ar.collisionBoxArray,io=wr.layers[0].layout,no=wr.layers[0].paint,oo=Math.pow(2,this.transform.zoom-Ar.tileID.overscaledZ),so=Ar.tileSize/Xe.X,ao=Ar.tileID.toUnwrapped(),co=this.transform.calculatePosMatrix(ao),go="map"===io.get("text-pitch-alignment"),ho="map"===io.get("text-rotation-alignment"),Co=Ft(Ar,1,this.transform.zoom),Io=this.collisionIndex.mapProjection.translatePosition(this.transform,Ar,no.get("text-translate"),no.get("text-translate-anchor")),xo=this.collisionIndex.mapProjection.translatePosition(this.transform,Ar,no.get("icon-translate"),no.get("icon-translate-anchor")),Mo=gt(co,go,ho,this.transform,Co);let Po=null;if(go){const u=vt(co,go,ho,this.transform,Co);Po=Xe.L([],this.transform.labelPlaneMatrix,u)}this.retainedQueryData[wr.bucketInstanceId]=new Ut(wr.bucketInstanceId,Kr,wr.sourceLayerIndex,wr.index,Ar.tileID);const ss={bucket:wr,layout:io,translationText:Io,translationIcon:xo,posMatrix:co,unwrappedTileID:ao,textLabelPlaneMatrix:Mo,labelToScreenMatrix:Po,scale:oo,textPixelRatio:so,holdingForFade:Ar.holdingForFade(),collisionBoxArray:In,partiallyEvaluatedTextSize:Xe.ag(wr.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(wr.sourceID)};if(_r)for(const Xe of wr.sortKeyRanges){const{sortKey:fr,symbolInstanceStart:Ar,symbolInstanceEnd:_r}=Xe;u.push({sortKey:fr,symbolInstanceStart:Ar,symbolInstanceEnd:_r,parameters:ss})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:wr.symbolInstances.length,parameters:ss})}attemptAnchorPlacement(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo){const Po=Xe.aq[u.textAnchor],ss=[u.textOffset0,u.textOffset1],sa=qt(Po,Ar,_r,ss,wr),aa=this.collisionIndex.placeCollisionBox(fr,ao,io,no,oo,In,Kr,Co,so.predicate,Mo,sa);if((!xo||this.collisionIndex.placeCollisionBox(xo,ao,io,no,oo,In,Kr,Io,so.predicate,Mo,sa).placeable)&&aa.placeable){let u;if(this.prevPlacement&&this.prevPlacement.variableOffsets[co.crossTileID]&&this.prevPlacement.placements[co.crossTileID]&&this.prevPlacement.placements[co.crossTileID].text&&(u=this.prevPlacement.variableOffsets[co.crossTileID].anchor),0===co.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[co.crossTileID]={textOffset:ss,width:Ar,height:_r,anchor:Po,textBoxScale:wr,prevAnchor:u},this.markUsedJustification(go,Po,co,ho),go.allowVerticalPlacement&&(this.markUsedOrientation(go,ho,co),this.placedOrientations[co.crossTileID]=ho),{shift:sa,placedGlyphBoxes:aa}}}placeLayerBucketPart(u,fr,Ar){const{bucket:_r,layout:wr,translationText:Kr,translationIcon:In,posMatrix:io,unwrappedTileID:no,textLabelPlaneMatrix:oo,labelToScreenMatrix:so,textPixelRatio:ao,holdingForFade:co,collisionBoxArray:go,partiallyEvaluatedTextSize:ho,collisionGroup:Co}=u.parameters,Io=wr.get("text-optional"),xo=wr.get("icon-optional"),Mo=Xe.ar(wr,"text-overlap","text-allow-overlap"),Po="always"===Mo,ss=Xe.ar(wr,"icon-overlap","icon-allow-overlap"),sa="always"===ss,aa="map"===wr.get("text-rotation-alignment"),fa="map"===wr.get("text-pitch-alignment"),ya="none"!==wr.get("icon-text-fit"),ol="viewport-y"===wr.get("symbol-z-order"),sl=Po&&(sa||!_r.hasIconData()||xo),al=sa&&(Po||!_r.hasTextData()||Io);!_r.collisionArrays&&go&&_r.deserializeCollisionBoxes(go);const cl=this._getTerrainElevationFunc(this.retainedQueryData[_r.bucketInstanceId].tileID),D=(u,go,sa)=>{var ol,hl;if(fr[u.crossTileID])return;if(co)return void(this.placements[u.crossTileID]=new Nt(!1,!1,!1));let ul=!1,dl=!1,pl=!0,Cl=null,fl={box:null,placeable:!1,offscreen:null},_l={box:null,placeable:!1,offscreen:null},vl=null,xl=null,Sl=null,kl=0,Bl=0,Zl=0;go.textFeatureIndex?kl=go.textFeatureIndex:u.useRuntimeCollisionCircles&&(kl=u.featureIndex),go.verticalTextFeatureIndex&&(Bl=go.verticalTextFeatureIndex);const Rl=go.textBox;if(Rl){const i=fr=>{let Ar=Xe.ah.horizontal;if(_r.allowVerticalPlacement&&!fr&&this.prevPlacement){const Xe=this.prevPlacement.placedOrientations[u.crossTileID];Xe&&(this.placedOrientations[u.crossTileID]=Xe,Ar=Xe,this.markUsedOrientation(_r,Ar,u))}return Ar},o=(fr,Ar)=>{if(_r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&go.verticalTextBox){for(const u of _r.writingModes)if(u===Xe.ah.vertical?(fl=Ar(),_l=fl):fl=fr(),fl&&fl.placeable)break}else fl=fr()},fr=u.textAnchorOffsetStartIndex,wr=u.textAnchorOffsetEndIndex;if(wr===fr){const a=(Xe,fr)=>{const Ar=this.collisionIndex.placeCollisionBox(Xe,Mo,ao,io,no,fa,aa,Kr,Co.predicate,cl);return Ar&&Ar.placeable&&(this.markUsedOrientation(_r,fr,u),this.placedOrientations[u.crossTileID]=fr),Ar};o((()=>a(Rl,Xe.ah.horizontal)),(()=>{const fr=go.verticalTextBox;return _r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&fr?a(fr,Xe.ah.vertical):{box:null,offscreen:null}})),i(fl&&fl.placeable)}else{let oo=Xe.aq[null===(hl=null===(ol=this.prevPlacement)||void 0===ol?void 0:ol.variableOffsets[u.crossTileID])||void 0===hl?void 0:hl.anchor];const m=(so,co,go)=>{const ho=so.x2-so.x1,Io=so.y2-so.y1,xo=u.textBoxScale,Po=ya&&"never"===ss?co:null;let sa=null,ol="never"===Mo?1:2,sl="never";oo&&ol++;for(let Xe=0;Xe<ol;Xe++){for(let Xe=fr;Xe<wr;Xe++){const fr=_r.textAnchorOffsets.get(Xe);if(oo&&fr.textAnchor!==oo)continue;const Ar=this.attemptAnchorPlacement(fr,so,ho,Io,xo,aa,fa,ao,io,no,Co,sl,u,_r,go,Kr,In,Po,cl);if(Ar&&(sa=Ar.placedGlyphBoxes,sa&&sa.placeable))return ul=!0,Cl=Ar.shift,sa}oo?oo=null:sl=Mo}return Ar&&!sa&&(sa={box:this.collisionIndex.placeCollisionBox(Rl,"always",ao,io,no,fa,aa,Kr,Co.predicate,cl,new Xe.P(0,0)).box,offscreen:!1,placeable:!1}),sa};o((()=>m(Rl,go.iconBox,Xe.ah.horizontal)),(()=>{const fr=go.verticalTextBox;return _r.allowVerticalPlacement&&(!fl||!fl.placeable)&&u.numVerticalGlyphVertices>0&&fr?m(fr,go.verticalIconBox,Xe.ah.vertical):{box:null,occluded:!0,offscreen:null}})),fl&&(ul=fl.placeable,pl=fl.offscreen);const so=i(fl&&fl.placeable);if(!ul&&this.prevPlacement){const Xe=this.prevPlacement.variableOffsets[u.crossTileID];Xe&&(this.variableOffsets[u.crossTileID]=Xe,this.markUsedJustification(_r,Xe.anchor,u,so))}}}if(vl=fl,ul=vl&&vl.placeable,pl=vl&&vl.offscreen,u.useRuntimeCollisionCircles){const fr=_r.text.placedSymbolArray.get(u.centerJustifiedTextSymbolIndex),In=Xe.ai(_r.textSizeData,ho,fr),ao=wr.get("text-padding");xl=this.collisionIndex.placeCollisionCircles(Mo,fr,_r.lineVertexArray,_r.glyphOffsetArray,In,io,no,oo,so,Ar,fa,Co.predicate,u.collisionCircleDiameter,ao,Kr,cl),xl.circles.length&&xl.collisionDetected&&!Ar&&Xe.w("Collisions detected, but collision boxes are not shown"),ul=Po||xl.circles.length>0&&!xl.collisionDetected,pl=pl&&xl.offscreen}if(go.iconFeatureIndex&&(Zl=go.iconFeatureIndex),go.iconBox){const t=u=>this.collisionIndex.placeCollisionBox(u,ss,ao,io,no,fa,aa,In,Co.predicate,cl,ya&&Cl?Cl:void 0);_l&&_l.placeable&&go.verticalIconBox?(Sl=t(go.verticalIconBox),dl=Sl.placeable):(Sl=t(go.iconBox),dl=Sl.placeable),pl=pl&&Sl.offscreen}const Wl=Io||0===u.numHorizontalGlyphVertices&&0===u.numVerticalGlyphVertices,Tl=xo||0===u.numIconVertices;Wl||Tl?Tl?Wl||(dl=dl&&ul):ul=dl&&ul:dl=ul=dl&&ul;const Jl=dl&&Sl.placeable;if(ul&&vl.placeable&&this.collisionIndex.insertCollisionBox(vl.box,Mo,wr.get("text-ignore-placement"),_r.bucketInstanceId,_l&&_l.placeable&&Bl?Bl:kl,Co.ID),Jl&&this.collisionIndex.insertCollisionBox(Sl.box,ss,wr.get("icon-ignore-placement"),_r.bucketInstanceId,Zl,Co.ID),xl&&ul&&this.collisionIndex.insertCollisionCircles(xl.circles,Mo,wr.get("text-ignore-placement"),_r.bucketInstanceId,kl,Co.ID),Ar&&this.storeCollisionData(_r.bucketInstanceId,sa,go,vl,Sl,xl),0===u.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===_r.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[u.crossTileID]=new Nt(ul||sl,dl||al,pl||_r.justReloaded),fr[u.crossTileID]=!0};if(ol){if(0!==u.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const Xe=_r.getSortedSymbolIndexes(this.transform.angle);for(let u=Xe.length-1;u>=0;--u){const fr=Xe[u];D(_r.symbolInstances.get(fr),_r.collisionArrays[fr],fr)}}else for(let Xe=u.symbolInstanceStart;Xe<u.symbolInstanceEnd;Xe++)D(_r.symbolInstances.get(Xe),_r.collisionArrays[Xe],Xe);if(Ar&&_r.bucketInstanceId in this.collisionCircleArrays){const u=this.collisionCircleArrays[_r.bucketInstanceId];Xe.as(u.invProjMatrix,io),u.viewportMatrix=this.collisionIndex.getViewportMatrix()}_r.justReloaded=!1}storeCollisionData(u,Xe,fr,Ar,_r,wr){if(fr.textBox||fr.iconBox){let wr,Kr;this.collisionBoxArrays.has(u)?wr=this.collisionBoxArrays.get(u):(wr=new Map,this.collisionBoxArrays.set(u,wr)),wr.has(Xe)?Kr=wr.get(Xe):(Kr={text:null,icon:null},wr.set(Xe,Kr)),fr.textBox&&(Kr.text=Ar.box),fr.iconBox&&(Kr.icon=_r.box)}if(wr){let Xe=this.collisionCircleArrays[u];void 0===Xe&&(Xe=this.collisionCircleArrays[u]=new jt);for(let u=0;u<wr.circles.length;u+=4)Xe.circles.push(wr.circles[u+0]),Xe.circles.push(wr.circles[u+1]),Xe.circles.push(wr.circles[u+2]),Xe.circles.push(wr.collisionDetected?1:0)}}markUsedJustification(u,fr,Ar,_r){let wr;wr=_r===Xe.ah.vertical?Ar.verticalPlacedTextSymbolIndex:{left:Ar.leftJustifiedTextSymbolIndex,center:Ar.centerJustifiedTextSymbolIndex,right:Ar.rightJustifiedTextSymbolIndex}[Xe.at(fr)];const Kr=[Ar.leftJustifiedTextSymbolIndex,Ar.centerJustifiedTextSymbolIndex,Ar.rightJustifiedTextSymbolIndex,Ar.verticalPlacedTextSymbolIndex];for(const Xe of Kr)Xe>=0&&(u.text.placedSymbolArray.get(Xe).crossTileID=wr>=0&&Xe!==wr?0:Ar.crossTileID)}markUsedOrientation(u,fr,Ar){const _r=fr===Xe.ah.horizontal||fr===Xe.ah.horizontalOnly?fr:0,wr=fr===Xe.ah.vertical?fr:0,Kr=[Ar.leftJustifiedTextSymbolIndex,Ar.centerJustifiedTextSymbolIndex,Ar.rightJustifiedTextSymbolIndex];for(const Xe of Kr)u.text.placedSymbolArray.get(Xe).placedOrientation=_r;Ar.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(Ar.verticalPlacedTextSymbolIndex).placedOrientation=wr)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const Xe=this.prevPlacement;let fr=!1;this.prevZoomAdjustment=Xe?Xe.zoomAdjustment(this.transform.zoom):0;const Ar=Xe?Xe.symbolFadeChange(u):1,_r=Xe?Xe.opacities:{},wr=Xe?Xe.variableOffsets:{},Kr=Xe?Xe.placedOrientations:{};for(const u in this.placements){const Xe=this.placements[u],wr=_r[u];wr?(this.opacities[u]=new Ot(wr,Ar,Xe.text,Xe.icon),fr=fr||Xe.text!==wr.text.placed||Xe.icon!==wr.icon.placed):(this.opacities[u]=new Ot(null,Ar,Xe.text,Xe.icon,Xe.skipFade),fr=fr||Xe.text||Xe.icon)}for(const u in _r){const Xe=_r[u];if(!this.opacities[u]){const _r=new Ot(Xe,Ar,!1,!1);_r.isHidden()||(this.opacities[u]=_r,fr=fr||Xe.text.placed||Xe.icon.placed)}}for(const u in wr)this.variableOffsets[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.variableOffsets[u]=wr[u]);for(const u in Kr)this.placedOrientations[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.placedOrientations[u]=Kr[u]);if(Xe&&void 0===Xe.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");fr?this.lastPlacementChangeTime=u:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=Xe?Xe.lastPlacementChangeTime:u)}updateLayerOpacities(u,Xe){const fr={};for(const Ar of Xe){const Xe=Ar.getBucket(u);Xe&&Ar.latestFeatureIndex&&u.id===Xe.layerIds[0]&&this.updateBucketOpacities(Xe,Ar.tileID,fr,Ar.collisionBoxArray)}}updateBucketOpacities(u,fr,Ar,_r){u.hasTextData()&&(u.text.opacityVertexArray.clear(),u.text.hasVisibleVertices=!1),u.hasIconData()&&(u.icon.opacityVertexArray.clear(),u.icon.hasVisibleVertices=!1),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const wr=u.layers[0],Kr=wr.layout,In=new Ot(null,0,!1,!1,!0),io=Kr.get("text-allow-overlap"),no=Kr.get("icon-allow-overlap"),oo=wr._unevaluatedLayout.hasValue("text-variable-anchor")||wr._unevaluatedLayout.hasValue("text-variable-anchor-offset"),so="map"===Kr.get("text-rotation-alignment"),ao="map"===Kr.get("text-pitch-alignment"),co="none"!==Kr.get("icon-text-fit"),go=new Ot(null,0,io&&(no||!u.hasIconData()||Kr.get("icon-optional")),no&&(io||!u.hasTextData()||Kr.get("text-optional")),!0);!u.collisionArrays&&_r&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(_r);const m=(u,Xe,fr)=>{for(let Ar=0;Ar<Xe/4;Ar++)u.opacityVertexArray.emplaceBack(fr);u.hasVisibleVertices=u.hasVisibleVertices||fr!==pl},ho=this.collisionBoxArrays.get(u.bucketInstanceId);for(let fr=0;fr<u.symbolInstances.length;fr++){const _r=u.symbolInstances.get(fr),{numHorizontalGlyphVertices:wr,numVerticalGlyphVertices:Kr,crossTileID:io}=_r;let no=this.opacities[io];Ar[io]?no=In:no||(no=go,this.opacities[io]=no),Ar[io]=!0;const Co=_r.numIconVertices>0,Io=this.placedOrientations[_r.crossTileID],xo=Io===Xe.ah.vertical,Mo=Io===Xe.ah.horizontal||Io===Xe.ah.horizontalOnly;if(wr>0||Kr>0){const Xe=Qt(no.text);m(u.text,wr,xo?pl:Xe),m(u.text,Kr,Mo?pl:Xe);const fr=no.text.isHidden();[_r.rightJustifiedTextSymbolIndex,_r.centerJustifiedTextSymbolIndex,_r.leftJustifiedTextSymbolIndex].forEach((Xe=>{Xe>=0&&(u.text.placedSymbolArray.get(Xe).hidden=fr||xo?1:0)})),_r.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(_r.verticalPlacedTextSymbolIndex).hidden=fr||Mo?1:0);const Ar=this.variableOffsets[_r.crossTileID];Ar&&this.markUsedJustification(u,Ar.anchor,_r,Io);const In=this.placedOrientations[_r.crossTileID];In&&(this.markUsedJustification(u,"left",_r,In),this.markUsedOrientation(u,In,_r))}if(Co){const Xe=Qt(no.icon),fr=!(co&&_r.verticalPlacedIconSymbolIndex&&xo);_r.placedIconSymbolIndex>=0&&(m(u.icon,_r.numIconVertices,fr?Xe:pl),u.icon.placedSymbolArray.get(_r.placedIconSymbolIndex).hidden=no.icon.isHidden()),_r.verticalPlacedIconSymbolIndex>=0&&(m(u.icon,_r.numVerticalIconVertices,fr?pl:Xe),u.icon.placedSymbolArray.get(_r.verticalPlacedIconSymbolIndex).hidden=no.icon.isHidden())}const Po=ho&&ho.has(fr)?ho.get(fr):{text:null,icon:null};if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const Ar=u.collisionArrays[fr];if(Ar){let fr=new Xe.P(0,0);if(Ar.textBox||Ar.verticalTextBox){let Xe=!0;if(oo){const u=this.variableOffsets[io];u?(fr=qt(u.anchor,u.width,u.height,u.textOffset,u.textBoxScale),so&&fr._rotate(ao?this.transform.angle:-this.transform.angle)):Xe=!1}if(Ar.textBox||Ar.verticalTextBox){let _r;Ar.textBox&&(_r=xo),Ar.verticalTextBox&&(_r=Mo),Gt(u.textCollisionBox.collisionVertexArray,no.text.placed,!Xe||_r,Po.text,fr.x,fr.y)}}if(Ar.iconBox||Ar.verticalIconBox){const Xe=Boolean(!Mo&&Ar.verticalIconBox);let _r;Ar.iconBox&&(_r=Xe),Ar.verticalIconBox&&(_r=!Xe),Gt(u.iconCollisionBox.collisionVertexArray,no.icon.placed,_r,Po.icon,co?fr.x:0,co?fr.y:0)}}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const Xe=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=Xe.invProjMatrix,u.placementViewportMatrix=Xe.viewportMatrix,u.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return 0===this.fadeDuration?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,Xe){const fr=this.zoomAtLastRecencyCheck===Xe?1-this.zoomAdjustment(Xe):1;return this.zoomAtLastRecencyCheck=Xe,this.commitTime+this.fadeDuration*fr>u}setStale(){this.stale=!0}}function Gt(u,Xe,fr,Ar,_r,wr){Ar&&0!==Ar.length||(Ar=[0,0,0,0]);const Kr=Ar[0]-ya,In=Ar[1]-ya,io=Ar[2]-ya,no=Ar[3]-ya;u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,Kr,In),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,io,In),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,io,no),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,Kr,no)}const ol=Math.pow(2,25),sl=Math.pow(2,24),al=Math.pow(2,17),cl=Math.pow(2,16),hl=Math.pow(2,9),ul=Math.pow(2,8),dl=Math.pow(2,1);function Qt(u){if(0===u.opacity&&!u.placed)return 0;if(1===u.opacity&&u.placed)return 4294967295;const Xe=u.placed?1:0,fr=Math.floor(127*u.opacity);return fr*ol+Xe*sl+fr*al+Xe*cl+fr*hl+Xe*ul+fr*dl+Xe}const pl=0;function ee(){return{isOccluded:(u,Xe,fr)=>!1,getPitchedTextCorrection:(u,Xe,fr)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(u,Xe,fr,Ar){throw new Error("Not implemented.")},translatePosition:(u,Xe,fr,Ar)=>function(u,Xe,fr,Ar,_r=!1){if(!fr[0]&&!fr[1])return[0,0];const wr=_r?"map"===Ar?u.angle:0:"viewport"===Ar?-u.angle:0;if(wr){const u=Math.sin(wr),Xe=Math.cos(wr);fr=[fr[0]*Xe-fr[1]*u,fr[0]*u+fr[1]*Xe]}return[_r?fr[0]:Ft(Xe,fr[0],u.zoom),_r?fr[1]:Ft(Xe,fr[1],u.zoom)]}(u,Xe,fr,Ar),getCircleRadiusCorrection:u=>1}}class ie{constructor(u){this._sortAcrossTiles="viewport-y"!==u.layout.get("symbol-z-order")&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,Xe,fr,Ar,_r){const wr=this._bucketParts;for(;this._currentTileIndex<u.length;)if(Xe.getBucketParts(wr,Ar,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,_r())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey)));this._currentPartIndex<wr.length;)if(Xe.placeLayerBucketPart(wr[this._currentPartIndex],this._seenCrossTileIDs,fr),this._currentPartIndex++,_r())return!0;return!1}}class ae{constructor(u,Xe,fr,Ar,_r,wr,Kr,In){this.placement=new Vt(u,ee(),Xe,wr,Kr,In),this._currentPlacementIndex=fr.length-1,this._forceFullPlacement=Ar,this._showCollisionBoxes=_r,this._done=!1}isDone(){return this._done}continuePlacement(u,Xe,fr){const Ar=wr.now(),s=()=>!this._forceFullPlacement&&wr.now()-Ar>2;for(;this._currentPlacementIndex>=0;){const Ar=Xe[u[this._currentPlacementIndex]],_r=this.placement.collisionIndex.transform.zoom;if("symbol"===Ar.type&&(!Ar.minzoom||Ar.minzoom<=_r)&&(!Ar.maxzoom||Ar.maxzoom>_r)){if(this._inProgressLayer||(this._inProgressLayer=new ie(Ar)),this._inProgressLayer.continuePlacement(fr[Ar.source],this.placement,this._showCollisionBoxes,Ar,s))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Cl=512/Xe.X/2;class oe{constructor(u,fr,Ar){this.tileID=u,this.bucketInstanceId=Ar,this._symbolsByKey={};const _r=new Map;for(let u=0;u<fr.length;u++){const Xe=fr.get(u),Ar=Xe.key,wr=_r.get(Ar);wr?wr.push(Xe):_r.set(Ar,[Xe])}for(const[u,fr]of _r){const Ar={positions:fr.map((u=>({x:Math.floor(u.anchorX*Cl),y:Math.floor(u.anchorY*Cl)}))),crossTileIDs:fr.map((u=>u.crossTileID))};if(Ar.positions.length>128){const u=new Xe.av(Ar.positions.length,16,Uint16Array);for(const{x:Xe,y:fr}of Ar.positions)u.add(Xe,fr);u.finish(),delete Ar.positions,Ar.index=u}this._symbolsByKey[u]=Ar}}getScaledCoordinates(u,fr){const{x:Ar,y:_r,z:wr}=this.tileID.canonical,{x:Kr,y:In,z:io}=fr.canonical,no=Cl/Math.pow(2,io-wr),oo=(In*Xe.X+u.anchorY)*no,so=_r*Xe.X*Cl;return{x:Math.floor((Kr*Xe.X+u.anchorX)*no-Ar*Xe.X*Cl),y:Math.floor(oo-so)}}findMatches(u,Xe,fr){const Ar=this.tileID.canonical.z<Xe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Xe.canonical.z);for(let _r=0;_r<u.length;_r++){const wr=u.get(_r);if(wr.crossTileID)continue;const Kr=this._symbolsByKey[wr.key];if(!Kr)continue;const In=this.getScaledCoordinates(wr,Xe);if(Kr.index){const u=Kr.index.range(In.x-Ar,In.y-Ar,In.x+Ar,In.y+Ar).sort();for(const Xe of u){const u=Kr.crossTileIDs[Xe];if(!fr[u]){fr[u]=!0,wr.crossTileID=u;break}}}else if(Kr.positions)for(let u=0;u<Kr.positions.length;u++){const Xe=Kr.positions[u],_r=Kr.crossTileIDs[u];if(Math.abs(Xe.x-In.x)<=Ar&&Math.abs(Xe.y-In.y)<=Ar&&!fr[_r]){fr[_r]=!0,wr.crossTileID=_r;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:u})=>u))}}class re{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ne{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const Xe=Math.round((u-this.lng)/360);if(0!==Xe)for(const u in this.indexes){const fr=this.indexes[u],Ar={};for(const u in fr){const _r=fr[u];_r.tileID=_r.tileID.unwrapTo(_r.tileID.wrap+Xe),Ar[_r.tileID.key]=_r}this.indexes[u]=Ar}this.lng=u}addBucket(u,Xe,fr){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===Xe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let u=0;u<Xe.symbolInstances.length;u++)Xe.symbolInstances.get(u).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const Ar=this.usedCrossTileIDs[u.overscaledZ];for(const fr in this.indexes){const _r=this.indexes[fr];if(Number(fr)>u.overscaledZ)for(const fr in _r){const wr=_r[fr];wr.tileID.isChildOf(u)&&wr.findMatches(Xe.symbolInstances,u,Ar)}else{const wr=_r[u.scaledTo(Number(fr)).key];wr&&wr.findMatches(Xe.symbolInstances,u,Ar)}}for(let u=0;u<Xe.symbolInstances.length;u++){const _r=Xe.symbolInstances.get(u);_r.crossTileID||(_r.crossTileID=fr.generate(),Ar[_r.crossTileID]=!0)}return void 0===this.indexes[u.overscaledZ]&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new oe(u,Xe.symbolInstances,Xe.bucketInstanceId),!0}removeBucketCrossTileIDs(u,Xe){for(const fr of Xe.getCrossTileIDsLists())for(const Xe of fr)delete this.usedCrossTileIDs[u][Xe]}removeStaleBuckets(u){let Xe=!1;for(const fr in this.indexes){const Ar=this.indexes[fr];for(const _r in Ar)u[Ar[_r].bucketInstanceId]||(this.removeBucketCrossTileIDs(fr,Ar[_r]),delete Ar[_r],Xe=!0)}return Xe}}class le{constructor(){this.layerIndexes={},this.crossTileIDs=new re,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,Xe,fr){let Ar=this.layerIndexes[u.id];void 0===Ar&&(Ar=this.layerIndexes[u.id]=new ne);let _r=!1;const wr={};Ar.handleWrapJump(fr);for(const fr of Xe){const Xe=fr.getBucket(u);Xe&&u.id===Xe.layerIds[0]&&(Xe.bucketInstanceId||(Xe.bucketInstanceId=++this.maxBucketInstanceId),Ar.addBucket(fr.tileID,Xe,this.crossTileIDs)&&(_r=!0),wr[Xe.bucketInstanceId]=!0)}return Ar.removeStaleBuckets(wr)&&(_r=!0),_r}pruneUnusedLayers(u){const Xe={};u.forEach((u=>{Xe[u]=!0}));for(const u in this.layerIndexes)Xe[u]||delete this.layerIndexes[u]}}const he=(u,fr)=>Xe.t(u,fr&&fr.filter((u=>"source.canvas"!==u.identifier))),fl=Xe.aw();class ue extends Xe.E{constructor(u,fr={}){super(),this._rtlPluginLoaded=()=>{for(const u in this.sourceCaches){const Xe=this.sourceCaches[u].getSource().type;"vector"!==Xe&&"geojson"!==Xe||this.sourceCaches[u].reload()}},this.map=u,this.dispatcher=new j(N(),u._getMapId()),this.dispatcher.registerMessageHandler("GG",((u,Xe)=>this.getGlyphs(u,Xe))),this.dispatcher.registerMessageHandler("GI",((u,Xe)=>this.getImages(u,Xe))),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new C(u._requestManager,fr.localIdeographFontFamily),this.lineAtlas=new R(256,512),this.crossTileSymbolIndex=new le,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new Xe.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",Xe.ay()),nt().on(sa,this._rtlPluginLoaded),this.on("data",(u=>{if("source"!==u.dataType||"metadata"!==u.sourceDataType)return;const Xe=this.sourceCaches[u.sourceId];if(!Xe)return;const fr=Xe.getSource();if(fr&&fr.vectorLayerIds)for(const u in this._layers){const Xe=this._layers[u];Xe.source===fr.id&&this._validateLayer(Xe)}}))}loadURL(u,fr={},Ar){this.fire(new Xe.k("dataloading",{dataType:"style"})),fr.validate="boolean"!=typeof fr.validate||fr.validate;const _r=this.map._requestManager.transformRequest(u,"Style");this._loadStyleRequest=new AbortController;const wr=this._loadStyleRequest;Xe.h(_r,this._loadStyleRequest).then((u=>{this._loadStyleRequest=null,this._load(u.data,fr,Ar)})).catch((u=>{this._loadStyleRequest=null,u&&!wr.signal.aborted&&this.fire(new Xe.j(u))}))}loadJSON(u,fr={},Ar){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,fr.validate=!1!==fr.validate,this._load(u,fr,Ar)})).catch((()=>{}))}loadEmpty(){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._load(fl,{validate:!1})}_load(u,fr,Ar){var _r;const wr=fr.transformStyle?fr.transformStyle(Ar,u):u;if(!fr.validate||!he(this,Xe.u(wr))){this._loaded=!0,this.stylesheet=wr;for(const u in wr.sources)this.addSource(u,wr.sources[u],{validate:!1});wr.sprite?this._loadSprite(wr.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(wr.glyphs),this._createLayers(),this.light=new D(this.stylesheet.light),this.sky=new A(this.stylesheet.sky),this.map.setTerrain(null!==(_r=this.stylesheet.terrain)&&void 0!==_r?_r:null),this.fire(new Xe.k("data",{dataType:"style"})),this.fire(new Xe.k("style.load"))}}_createLayers(){const u=Xe.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",u),this._order=u.map((u=>u.id)),this._layers={},this._serializedLayers=null;for(const fr of u){const u=Xe.aA(fr);u.setEventedParent(this,{layer:{id:fr.id}}),this._layers[fr.id]=u}}_loadSprite(u,fr=!1,Ar=void 0){let _r;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(u,fr,Ar,_r){return Xe._(this,void 0,void 0,(function*(){const Kr=x(u),In=Ar>1?"@2x":"",io={},no={};for(const{id:u,url:Ar}of Kr){const wr=fr.transformRequest(y(Ar,In,".json"),"SpriteJSON");io[u]=Xe.h(wr,_r);const Kr=fr.transformRequest(y(Ar,In,".png"),"SpriteImage");no[u]=so.getImage(Kr,_r)}return yield Promise.all([...Object.values(io),...Object.values(no)]),function(u,fr){return Xe._(this,void 0,void 0,(function*(){const Xe={};for(const Ar in u){Xe[Ar]={};const _r=wr.getImageCanvasContext((yield fr[Ar]).data),Kr=(yield u[Ar]).data;for(const u in Kr){const{width:fr,height:wr,x:In,y:io,sdf:no,pixelRatio:oo,stretchX:so,stretchY:ao,content:co,textFitWidth:go,textFitHeight:ho}=Kr[u];Xe[Ar][u]={data:null,pixelRatio:oo,sdf:no,stretchX:so,stretchY:ao,content:co,textFitWidth:go,textFitHeight:ho,spriteData:{width:fr,height:wr,x:In,y:io,context:_r}}}}return Xe}))}(io,no)}))}(u,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((u=>{if(this._spriteRequest=null,u)for(const Xe in u){this._spritesImagesIds[Xe]=[];const Ar=this._spritesImagesIds[Xe]?this._spritesImagesIds[Xe].filter((Xe=>!(Xe in u))):[];for(const u of Ar)this.imageManager.removeImage(u),this._changedImages[u]=!0;for(const Ar in u[Xe]){const _r="default"===Xe?Ar:`${Xe}:${Ar}`;this._spritesImagesIds[Xe].push(_r),_r in this.imageManager.images?this.imageManager.updateImage(_r,u[Xe][Ar],!1):this.imageManager.addImage(_r,u[Xe][Ar]),fr&&(this._changedImages[_r]=!0)}}})).catch((u=>{this._spriteRequest=null,_r=u,this.fire(new Xe.j(_r))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),fr&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"})),Ar&&Ar(_r)}))}_unloadSprite(){for(const u of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(u),this._changedImages[u]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}_validateLayer(u){const fr=this.sourceCaches[u.source];if(!fr)return;const Ar=u.sourceLayer;if(!Ar)return;const _r=fr.getSource();("geojson"===_r.type||_r.vectorLayerIds&&-1===_r.vectorLayerIds.indexOf(Ar))&&this.fire(new Xe.j(new Error(`Source layer "${Ar}" does not exist on source "${_r.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(u,fr=!1){const Ar=this._serializedAllLayers();if(!u||0===u.length)return Object.values(fr?Xe.aB(Ar):Ar);const _r=[];for(const wr of u)if(Ar[wr]){const u=fr?Xe.aB(Ar[wr]):Ar[wr];_r.push(u)}return _r}_serializedAllLayers(){let u=this._serializedLayers;if(u)return u;u=this._serializedLayers={};const Xe=Object.keys(this._layers);for(const fr of Xe){const Xe=this._layers[fr];"custom"!==Xe.type&&(u[fr]=Xe.serialize())}return u}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.sky&&this.sky.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const fr=this._changed;if(fr){const Xe=Object.keys(this._updatedLayers),fr=Object.keys(this._removedLayers);(Xe.length||fr.length)&&this._updateWorkerLayers(Xe,fr);for(const u in this._updatedSources){const Xe=this._updatedSources[u];if("reload"===Xe)this._reloadSource(u);else{if("clear"!==Xe)throw new Error(`Invalid action ${Xe}`);this._clearSource(u)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Xe in this._updatedPaintProps)this._layers[Xe].updateTransitions(u);this.light.updateTransitions(u),this.sky.updateTransitions(u),this._resetUpdates()}const Ar={};for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Ar[u]=Xe.used,Xe.used=!1}for(const Xe of this._order){const fr=this._layers[Xe];fr.recalculate(u,this._availableImages),!fr.isHidden(u.zoom)&&fr.source&&(this.sourceCaches[fr.source].used=!0)}for(const u in Ar){const fr=this.sourceCaches[u];!!Ar[u]!=!!fr.used&&fr.fire(new Xe.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(u),this.sky.recalculate(u),this.z=u.zoom,fr&&this.fire(new Xe.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(u,Xe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(u,!1),removedIds:Xe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(u,fr={}){var Ar;this._checkLoaded();const _r=this.serialize();if(u=fr.transformStyle?fr.transformStyle(_r,u):u,(null===(Ar=fr.validate)||void 0===Ar||Ar)&&he(this,Xe.u(u)))return!1;(u=Xe.aB(u)).layers=Xe.az(u.layers);const wr=Xe.aC(_r,u),Kr=this._getOperationsToPerform(wr);if(Kr.unimplemented.length>0)throw new Error(`Unimplemented: ${Kr.unimplemented.join(", ")}.`);if(0===Kr.operations.length)return!1;for(const u of Kr.operations)u();return this.stylesheet=u,this._serializedLayers=null,!0}_getOperationsToPerform(u){const Xe=[],fr=[];for(const Ar of u)switch(Ar.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":Xe.push((()=>this.addLayer.apply(this,Ar.args)));break;case"removeLayer":Xe.push((()=>this.removeLayer.apply(this,Ar.args)));break;case"setPaintProperty":Xe.push((()=>this.setPaintProperty.apply(this,Ar.args)));break;case"setLayoutProperty":Xe.push((()=>this.setLayoutProperty.apply(this,Ar.args)));break;case"setFilter":Xe.push((()=>this.setFilter.apply(this,Ar.args)));break;case"addSource":Xe.push((()=>this.addSource.apply(this,Ar.args)));break;case"removeSource":Xe.push((()=>this.removeSource.apply(this,Ar.args)));break;case"setLayerZoomRange":Xe.push((()=>this.setLayerZoomRange.apply(this,Ar.args)));break;case"setLight":Xe.push((()=>this.setLight.apply(this,Ar.args)));break;case"setGeoJSONSourceData":Xe.push((()=>this.setGeoJSONSourceData.apply(this,Ar.args)));break;case"setGlyphs":Xe.push((()=>this.setGlyphs.apply(this,Ar.args)));break;case"setSprite":Xe.push((()=>this.setSprite.apply(this,Ar.args)));break;case"setSky":Xe.push((()=>this.setSky.apply(this,Ar.args)));break;case"setTerrain":Xe.push((()=>this.map.setTerrain.apply(this,Ar.args)));break;case"setTransition":Xe.push((()=>{}));break;default:fr.push(Ar.command)}return{operations:Xe,unimplemented:fr}}addImage(u,fr){if(this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,fr),this._afterImageUpdated(u)}updateImage(u,Xe){this.imageManager.updateImage(u,Xe)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(u,fr,Ar={}){if(this._checkLoaded(),void 0!==this.sourceCaches[u])throw new Error(`Source "${u}" already exists.`);if(!fr.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(fr).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(fr.type)>=0&&this._validate(Xe.u.source,`sources.${u}`,fr,null,Ar))return;this.map&&this.map._collectResourceTiming&&(fr.collectResourceTiming=!0);const _r=this.sourceCaches[u]=new ut(u,fr,this.dispatcher);_r.style=this,_r.setEventedParent(this,(()=>({isSourceLoaded:_r.loaded(),source:_r.serialize(),sourceId:u}))),_r.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error("There is no source with this ID");for(const fr in this._layers)if(this._layers[fr].source===u)return this.fire(new Xe.j(new Error(`Source "${u}" cannot be removed while layer "${fr}" is using it.`)));const fr=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],fr.fire(new Xe.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),fr.setEventedParent(null),fr.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,Xe){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error(`There is no source with this ID=${u}`);const fr=this.sourceCaches[u].getSource();if("geojson"!==fr.type)throw new Error(`geojsonSource.type is ${fr.type}, which is !== 'geojson`);fr.setData(Xe),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,fr,Ar={}){this._checkLoaded();const _r=u.id;if(this.getLayer(_r))return void this.fire(new Xe.j(new Error(`Layer "${_r}" already exists on this map.`)));let wr;if("custom"===u.type){if(he(this,Xe.aD(u)))return;wr=Xe.aA(u)}else{if("source"in u&&"object"==typeof u.source&&(this.addSource(_r,u.source),u=Xe.aB(u),u=Xe.e(u,{source:_r})),this._validate(Xe.u.layer,`layers.${_r}`,u,{arrayIndex:-1},Ar))return;wr=Xe.aA(u),this._validateLayer(wr),wr.setEventedParent(this,{layer:{id:_r}})}const Kr=fr?this._order.indexOf(fr):this._order.length;if(fr&&-1===Kr)this.fire(new Xe.j(new Error(`Cannot add layer "${_r}" before non-existing layer "${fr}".`)));else{if(this._order.splice(Kr,0,_r),this._layerOrderChanged=!0,this._layers[_r]=wr,this._removedLayers[_r]&&wr.source&&"custom"!==wr.type){const u=this._removedLayers[_r];delete this._removedLayers[_r],u.type!==wr.type?this._updatedSources[wr.source]="clear":(this._updatedSources[wr.source]="reload",this.sourceCaches[wr.source].pause())}this._updateLayer(wr),wr.onAdd&&wr.onAdd(this.map)}}moveLayer(u,fr){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===fr)return;const Ar=this._order.indexOf(u);this._order.splice(Ar,1);const _r=fr?this._order.indexOf(fr):this._order.length;fr&&-1===_r?this.fire(new Xe.j(new Error(`Cannot move layer "${u}" before non-existing layer "${fr}".`))):(this._order.splice(_r,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const fr=this._layers[u];if(!fr)return void this.fire(new Xe.j(new Error(`Cannot remove non-existing layer "${u}".`)));fr.setEventedParent(null);const Ar=this._order.indexOf(u);this._order.splice(Ar,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=fr,delete this._layers[u],this._serializedLayers&&delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],fr.onRemove&&fr.onRemove(this.map)}getLayer(u){return this._layers[u]}getLayersOrder(){return[...this._order]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,fr,Ar){this._checkLoaded();const _r=this.getLayer(u);_r?_r.minzoom===fr&&_r.maxzoom===Ar||(null!=fr&&(_r.minzoom=fr),null!=Ar&&(_r.maxzoom=Ar),this._updateLayer(_r)):this.fire(new Xe.j(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,fr,Ar={}){this._checkLoaded();const _r=this.getLayer(u);if(_r){if(!Xe.aE(_r.filter,fr))return null==fr?(_r.filter=void 0,void this._updateLayer(_r)):void(this._validate(Xe.u.filter,`layers.${_r.id}.filter`,fr,null,Ar)||(_r.filter=Xe.aB(fr),this._updateLayer(_r)))}else this.fire(new Xe.j(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return Xe.aB(this.getLayer(u).filter)}setLayoutProperty(u,fr,Ar,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getLayoutProperty(fr),Ar)||(wr.setLayoutProperty(fr,Ar,_r),this._updateLayer(wr)):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,fr){const Ar=this.getLayer(u);if(Ar)return Ar.getLayoutProperty(fr);this.fire(new Xe.j(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,fr,Ar,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getPaintProperty(fr),Ar)||(wr.setPaintProperty(fr,Ar,_r)&&this._updateLayer(wr),this._changed=!0,this._updatedPaintProps[u]=!0,this._serializedLayers=null):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,Xe){return this.getLayer(u).getPaintProperty(Xe)}setFeatureState(u,fr){this._checkLoaded();const Ar=u.source,_r=u.sourceLayer,wr=this.sourceCaches[Ar];if(void 0===wr)return void this.fire(new Xe.j(new Error(`The source '${Ar}' does not exist in the map's style.`)));const Kr=wr.getSource().type;"geojson"===Kr&&_r?this.fire(new Xe.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==Kr||_r?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),wr.setFeatureState(_r,u.id,fr)):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,fr){this._checkLoaded();const Ar=u.source,_r=this.sourceCaches[Ar];if(void 0===_r)return void this.fire(new Xe.j(new Error(`The source '${Ar}' does not exist in the map's style.`)));const wr=_r.getSource().type,Kr="vector"===wr?u.sourceLayer:void 0;"vector"!==wr||Kr?fr&&"string"!=typeof u.id&&"number"!=typeof u.id?this.fire(new Xe.j(new Error("A feature id is required to remove its specific state property."))):_r.removeFeatureState(Kr,u.id,fr):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const fr=u.source,Ar=u.sourceLayer,_r=this.sourceCaches[fr];if(void 0!==_r)return"vector"!==_r.getSource().type||Ar?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),_r.getFeatureState(Ar,u.id)):void this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new Xe.j(new Error(`The source '${fr}' does not exist in the map's style.`)))}getTransition(){return Xe.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const u=Xe.aF(this.sourceCaches,(u=>u.serialize())),fr=this._serializeByIds(this._order,!0),Ar=this.map.getTerrain()||void 0,_r=this.stylesheet;return Xe.aG({version:_r.version,name:_r.name,metadata:_r.metadata,light:_r.light,sky:_r.sky,center:_r.center,zoom:_r.zoom,bearing:_r.bearing,pitch:_r.pitch,sprite:_r.sprite,glyphs:_r.glyphs,transition:_r.transition,sources:u,layers:fr,terrain:Ar},(u=>void 0!==u))}_updateLayer(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&"raster"!==this.sourceCaches[u.source].getSource().type&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(u){const e=u=>"fill-extrusion"===this._layers[u].type,Xe={},fr=[];for(let Ar=this._order.length-1;Ar>=0;Ar--){const _r=this._order[Ar];if(e(_r)){Xe[_r]=Ar;for(const Xe of u){const u=Xe[_r];if(u)for(const Xe of u)fr.push(Xe)}}}fr.sort(((u,Xe)=>Xe.intersectionZ-u.intersectionZ));const Ar=[];for(let _r=this._order.length-1;_r>=0;_r--){const wr=this._order[_r];if(e(wr))for(let u=fr.length-1;u>=0;u--){const wr=fr[u].feature;if(Xe[wr.layer.id]<_r)break;Ar.push(wr),fr.pop()}else for(const Xe of u){const u=Xe[wr];if(u)for(const Xe of u)Ar.push(Xe.feature)}}return Ar}queryRenderedFeatures(u,fr,Ar){fr&&fr.filter&&this._validate(Xe.u.filter,"queryRenderedFeatures.filter",fr.filter,null,fr);const _r={};if(fr&&fr.layers){if(!Array.isArray(fr.layers))return this.fire(new Xe.j(new Error("parameters.layers must be an Array."))),[];for(const u of fr.layers){const fr=this._layers[u];if(!fr)return this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be queried for features.`))),[];_r[fr.source]=!0}}const wr=[];fr.availableImages=this._availableImages;const Kr=this._serializedAllLayers();for(const Xe in this.sourceCaches)fr.layers&&!_r[Xe]||wr.push(q(this.sourceCaches[Xe],this._layers,Kr,u,fr,Ar));return this.placement&&wr.push(function(u,Xe,fr,Ar,_r,wr,Kr){const In={},io=wr.queryRenderedSymbols(Ar),no=[];for(const u of Object.keys(io).map(Number))no.push(Kr[u]);no.sort(V);for(const fr of no){const Ar=fr.featureIndex.lookupSymbolFeatures(io[fr.bucketInstanceId],Xe,fr.bucketIndex,fr.sourceLayerIndex,_r.filter,_r.layers,_r.availableImages,u);for(const u in Ar){const Xe=In[u]=In[u]||[],_r=Ar[u];_r.sort(((u,Xe)=>{const Ar=fr.featureSortOrder;if(Ar){const fr=Ar.indexOf(u.featureIndex);return Ar.indexOf(Xe.featureIndex)-fr}return Xe.featureIndex-u.featureIndex}));for(const u of _r)Xe.push(u)}}for(const Xe in In)In[Xe].forEach((Ar=>{const _r=Ar.feature,wr=fr[u[Xe].source].getFeatureState(_r.layer["source-layer"],_r.id);_r.source=_r.layer.source,_r.layer["source-layer"]&&(_r.sourceLayer=_r.layer["source-layer"]),_r.state=wr}));return In}(this._layers,Kr,this.sourceCaches,u,fr,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(wr)}querySourceFeatures(u,fr){fr&&fr.filter&&this._validate(Xe.u.filter,"querySourceFeatures.filter",fr.filter,null,fr);const Ar=this.sourceCaches[u];return Ar?function(u,Xe){const fr=u.getRenderableIds().map((Xe=>u.getTileByID(Xe))),Ar=[],_r={};for(let u=0;u<fr.length;u++){const wr=fr[u],Kr=wr.tileID.canonical.key;_r[Kr]||(_r[Kr]=!0,wr.querySourceFeatures(Ar,Xe))}return Ar}(Ar,fr):[]}getLight(){return this.light.getLight()}setLight(u,fr={}){this._checkLoaded();const Ar=this.light.getLight();let _r=!1;for(const fr in u)if(!Xe.aE(u[fr],Ar[fr])){_r=!0;break}if(!_r)return;const Kr={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,fr),this.light.updateTransitions(Kr)}getSky(){var u;return null===(u=this.stylesheet)||void 0===u?void 0:u.sky}setSky(u,fr={}){const Ar=this.getSky();let _r=!1;if(!u&&!Ar)return;if(u&&!Ar)_r=!0;else if(!u&&Ar)_r=!0;else for(const fr in u)if(!Xe.aE(u[fr],Ar[fr])){_r=!0;break}if(!_r)return;const Kr={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=u,this.sky.setSky(u,fr),this.sky.updateTransitions(Kr)}_validate(u,fr,Ar,_r,wr={}){return(!wr||!1!==wr.validate)&&he(this,u.call(Xe.u,Xe.e({key:fr,style:this.serialize(),value:Ar,styleSpec:Xe.v},_r)))}_remove(u=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),nt().off(sa,this._rtlPluginLoaded);for(const u in this._layers)this._layers[u].setEventedParent(null);for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Xe.setEventedParent(null),Xe.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),u&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(u)}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].update(u,this.map.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,Xe,fr,Ar,_r=!1){let Kr=!1,In=!1;const io={};for(const Xe of this._order){const fr=this._layers[Xe];if("symbol"!==fr.type)continue;if(!io[fr.source]){const u=this.sourceCaches[fr.source];io[fr.source]=u.getRenderableIds(!0).map((Xe=>u.getTileByID(Xe))).sort(((u,Xe)=>Xe.tileID.overscaledZ-u.tileID.overscaledZ||(u.tileID.isLessThan(Xe.tileID)?-1:1)))}const Ar=this.crossTileSymbolIndex.addLayer(fr,io[fr.source],u.center.lng);Kr=Kr||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((_r=_r||this._layerOrderChanged||0===fr)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(wr.now(),u.zoom))&&(this.pauseablePlacement=new ae(u,this.map.terrain,this._order,_r,Xe,fr,Ar,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,io),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(wr.now()),In=!0),Kr&&this.pauseablePlacement.placement.setStale()),In||Kr)for(const u of this._order){const Xe=this._layers[u];"symbol"===Xe.type&&this.placement.updateLayerOpacities(Xe,io[Xe.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(wr.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,fr){return Xe._(this,void 0,void 0,(function*(){const u=yield this.imageManager.getImages(fr.icons);this._updateTilesForChangedImages();const Xe=this.sourceCaches[fr.source];return Xe&&Xe.setDependencies(fr.tileID.key,fr.type,fr.icons),u}))}getGlyphs(u,fr){return Xe._(this,void 0,void 0,(function*(){const u=yield this.glyphManager.getGlyphs(fr.stacks),Xe=this.sourceCaches[fr.source];return Xe&&Xe.setDependencies(fr.tileID.key,fr.type,[""]),u}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(u,fr={}){this._checkLoaded(),u&&this._validate(Xe.u.glyphs,"glyphs",u,null,fr)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=u,this.glyphManager.entries={},this.glyphManager.setURL(u))}addSprite(u,fr,Ar={},_r){this._checkLoaded();const wr=[{id:u,url:fr}],Kr=[...x(this.stylesheet.sprite),...wr];this._validate(Xe.u.sprite,"sprite",Kr,null,Ar)||(this.stylesheet.sprite=Kr,this._loadSprite(wr,!0,_r))}removeSprite(u){this._checkLoaded();const fr=x(this.stylesheet.sprite);if(fr.find((Xe=>Xe.id===u))){if(this._spritesImagesIds[u])for(const Xe of this._spritesImagesIds[u])this.imageManager.removeImage(Xe),this._changedImages[Xe]=!0;fr.splice(fr.findIndex((Xe=>Xe.id===u)),1),this.stylesheet.sprite=fr.length>0?fr:void 0,delete this._spritesImagesIds[u],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}else this.fire(new Xe.j(new Error(`Sprite "${u}" doesn't exists on this map.`)))}getSprite(){return x(this.stylesheet.sprite)}setSprite(u,fr={},Ar){this._checkLoaded(),u&&this._validate(Xe.u.sprite,"sprite",u,null,fr)||(this.stylesheet.sprite=u,u?this._loadSprite(u,!0,Ar):(this._unloadSprite(),Ar&&Ar(null)))}}var _l=Xe.Y([{name:"a_pos",type:"Int16",components:2}]);const vl={prelude:pe("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:pe("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:pe("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:pe("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:pe("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:pe("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),heatmapTexture:pe("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:pe("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:pe("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:pe("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:pe("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:pe("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:pe("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:pe("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:pe("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:pe("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:pe("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:pe("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:pe("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:pe("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:pe("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:pe("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:pe("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:pe("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:pe("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:pe("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:pe("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function pe(u,Xe){const fr=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Ar=Xe.match(/attribute ([\w]+) ([\w]+)/g),_r=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),wr=Xe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Kr=wr?wr.concat(_r):_r,In={};return{fragmentSource:u=u.replace(fr,((u,Xe,fr,Ar,_r)=>(In[_r]=!0,"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nvarying ${fr} ${Ar} ${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`))),vertexSource:Xe=Xe.replace(fr,((u,Xe,fr,Ar,_r)=>{const wr="float"===Ar?"vec2":"vec4",Kr=_r.match(/color/)?"color":wr;return In[_r]?"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${fr} ${wr} a_${_r};\nvarying ${fr} ${Ar} ${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:"vec4"===Kr?`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${_r} = a_${_r};\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${_r} = unpack_mix_${Kr}(a_${_r}, u_${_r}_t);\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${fr} ${wr} a_${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:"vec4"===Kr?`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = a_${_r};\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = unpack_mix_${Kr}(a_${_r}, u_${_r}_t);\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`})),staticAttributes:Ar,staticUniforms:Kr}}class me{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,Xe,fr,Ar,_r,wr,Kr,In,io){this.context=u;let no=this.boundPaintVertexBuffers.length!==Ar.length;for(let u=0;!no&&u<Ar.length;u++)this.boundPaintVertexBuffers[u]!==Ar[u]&&(no=!0);!this.vao||this.boundProgram!==Xe||this.boundLayoutVertexBuffer!==fr||no||this.boundIndexBuffer!==_r||this.boundVertexOffset!==wr||this.boundDynamicVertexBuffer!==Kr||this.boundDynamicVertexBuffer2!==In||this.boundDynamicVertexBuffer3!==io?this.freshBind(Xe,fr,Ar,_r,wr,Kr,In,io):(u.bindVertexArray.set(this.vao),Kr&&Kr.bind(),_r&&_r.dynamicDraw&&_r.bind(),In&&In.bind(),io&&io.bind())}freshBind(u,Xe,fr,Ar,_r,wr,Kr,In){const io=u.numAttributes,no=this.context,oo=no.gl;this.vao&&this.destroy(),this.vao=no.createVertexArray(),no.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=Xe,this.boundPaintVertexBuffers=fr,this.boundIndexBuffer=Ar,this.boundVertexOffset=_r,this.boundDynamicVertexBuffer=wr,this.boundDynamicVertexBuffer2=Kr,this.boundDynamicVertexBuffer3=In,Xe.enableAttributes(oo,u);for(const Xe of fr)Xe.enableAttributes(oo,u);wr&&wr.enableAttributes(oo,u),Kr&&Kr.enableAttributes(oo,u),In&&In.enableAttributes(oo,u),Xe.bind(),Xe.setVertexAttribPointers(oo,u,_r);for(const Xe of fr)Xe.bind(),Xe.setVertexAttribPointers(oo,u,_r);wr&&(wr.bind(),wr.setVertexAttribPointers(oo,u,_r)),Ar&&Ar.bind(),Kr&&(Kr.bind(),Kr.setVertexAttribPointers(oo,u,_r)),In&&(In.bind(),In.setVertexAttribPointers(oo,u,_r)),no.currentNumAttributes=io}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const fe=(u,fr,Ar,_r,wr)=>({u_matrix:u,u_texture:0,u_ele_delta:fr,u_fog_matrix:Ar,u_fog_color:_r?_r.properties.get("fog-color"):Xe.aM.white,u_fog_ground_blend:_r?_r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:_r?_r.calculateFogBlendOpacity(wr):0,u_horizon_color:_r?_r.properties.get("horizon-color"):Xe.aM.white,u_horizon_fog_blend:_r?_r.properties.get("horizon-fog-blend"):1});function ge(u){const Xe=[];for(let fr=0;fr<u.length;fr++){if(null===u[fr])continue;const Ar=u[fr].split(" ");Xe.push(Ar.pop())}return Xe}class ve{constructor(u,fr,Ar,_r,wr,Kr){const In=u.gl;this.program=In.createProgram();const io=ge(fr.staticAttributes),no=Ar?Ar.getBinderAttributes():[],oo=io.concat(no),so=vl.prelude.staticUniforms?ge(vl.prelude.staticUniforms):[],ao=fr.staticUniforms?ge(fr.staticUniforms):[],co=Ar?Ar.getBinderUniforms():[],go=so.concat(ao).concat(co),ho=[];for(const u of go)ho.indexOf(u)<0&&ho.push(u);const Co=Ar?Ar.defines():[];wr&&Co.push("#define OVERDRAW_INSPECTOR;"),Kr&&Co.push("#define TERRAIN3D;");const Io=Co.concat(vl.prelude.fragmentSource,fr.fragmentSource).join("\n"),xo=Co.concat(vl.prelude.vertexSource,fr.vertexSource).join("\n"),Mo=In.createShader(In.FRAGMENT_SHADER);if(In.isContextLost())return void(this.failedToCreate=!0);if(In.shaderSource(Mo,Io),In.compileShader(Mo),!In.getShaderParameter(Mo,In.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${In.getShaderInfoLog(Mo)}`);In.attachShader(this.program,Mo);const Po=In.createShader(In.VERTEX_SHADER);if(In.isContextLost())return void(this.failedToCreate=!0);if(In.shaderSource(Po,xo),In.compileShader(Po),!In.getShaderParameter(Po,In.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${In.getShaderInfoLog(Po)}`);In.attachShader(this.program,Po),this.attributes={};const ss={};this.numAttributes=oo.length;for(let u=0;u<this.numAttributes;u++)oo[u]&&(In.bindAttribLocation(this.program,u,oo[u]),this.attributes[oo[u]]=u);if(In.linkProgram(this.program),!In.getProgramParameter(this.program,In.LINK_STATUS))throw new Error(`Program failed to link: ${In.getProgramInfoLog(this.program)}`);In.deleteShader(Po),In.deleteShader(Mo);for(let u=0;u<ho.length;u++){const Xe=ho[u];if(Xe&&!ss[Xe]){const u=In.getUniformLocation(this.program,Xe);u&&(ss[Xe]=u)}}this.fixedUniforms=_r(u,ss),this.terrainUniforms=((u,fr)=>({u_depth:new Xe.aH(u,fr.u_depth),u_terrain:new Xe.aH(u,fr.u_terrain),u_terrain_dim:new Xe.aI(u,fr.u_terrain_dim),u_terrain_matrix:new Xe.aJ(u,fr.u_terrain_matrix),u_terrain_unpack:new Xe.aK(u,fr.u_terrain_unpack),u_terrain_exaggeration:new Xe.aI(u,fr.u_terrain_exaggeration)}))(u,ss),this.binderUniforms=Ar?Ar.getUniforms(u,ss):[]}draw(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io){const xo=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(fr),u.setStencilMode(Ar),u.setColorMode(_r),u.setCullFace(wr),In){u.activeTexture.set(xo.TEXTURE2),xo.bindTexture(xo.TEXTURE_2D,In.depthTexture),u.activeTexture.set(xo.TEXTURE3),xo.bindTexture(xo.TEXTURE_2D,In.texture);for(const u in this.terrainUniforms)this.terrainUniforms[u].set(In[u])}for(const u in this.fixedUniforms)this.fixedUniforms[u].set(Kr[u]);go&&go.setUniforms(u,this.binderUniforms,ao,{zoom:co});let Mo=0;switch(Xe){case xo.LINES:Mo=2;break;case xo.TRIANGLES:Mo=3;break;case xo.LINE_STRIP:Mo=1}for(const fr of so.get()){const Ar=fr.vaos||(fr.vaos={});(Ar[io]||(Ar[io]=new me)).bind(u,this,no,go?go.getPaintVertexBuffers():[],oo,fr.vertexOffset,ho,Co,Io),xo.drawElements(Xe,fr.primitiveLength*Mo,xo.UNSIGNED_SHORT,fr.primitiveOffset*Mo*2)}}}function xe(u,Xe,fr){const Ar=1/Ft(fr,1,Xe.transform.tileZoom),_r=Math.pow(2,fr.tileID.overscaledZ),wr=fr.tileSize*Math.pow(2,Xe.transform.tileZoom)/_r,Kr=wr*(fr.tileID.canonical.x+fr.tileID.wrap*_r),In=wr*fr.tileID.canonical.y;return{u_image:0,u_texsize:fr.imageAtlasTexture.size,u_scale:[Ar,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[Kr>>16,In>>16],u_pixel_coord_lower:[65535&Kr,65535&In]}}const ye=(u,fr,Ar,_r)=>{const wr=fr.style.light,Kr=wr.properties.get("position"),In=[Kr.x,Kr.y,Kr.z],io=function(){var u=new Xe.A(9);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}();"viewport"===wr.properties.get("anchor")&&function(u,Xe){var fr=Math.sin(Xe),Ar=Math.cos(Xe);u[0]=Ar,u[1]=fr,u[2]=0,u[3]=-fr,u[4]=Ar,u[5]=0,u[6]=0,u[7]=0,u[8]=1}(io,-fr.transform.angle),function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2];u[0]=Ar*fr[0]+_r*fr[3]+wr*fr[6],u[1]=Ar*fr[1]+_r*fr[4]+wr*fr[7],u[2]=Ar*fr[2]+_r*fr[5]+wr*fr[8]}(In,In,io);const no=wr.properties.get("color");return{u_matrix:u,u_lightpos:In,u_lightintensity:wr.properties.get("intensity"),u_lightcolor:[no.r,no.g,no.b],u_vertical_gradient:+Ar,u_opacity:_r}},be=(u,fr,Ar,_r,wr,Kr,In)=>Xe.e(ye(u,fr,Ar,_r),xe(Kr,fr,In),{u_height_factor:-Math.pow(2,wr.overscaledZ)/In.tileSize/8}),we=u=>({u_matrix:u}),Te=(u,fr,Ar,_r)=>Xe.e(we(u),xe(Ar,fr,_r)),Ie=(u,Xe)=>({u_matrix:u,u_world:Xe}),Ee=(u,fr,Ar,_r,wr)=>Xe.e(Te(u,fr,Ar,_r),{u_world:wr}),Pe=(u,Xe,fr,Ar)=>{const _r=u.transform;let wr,Kr;if("map"===Ar.paint.get("circle-pitch-alignment")){const u=Ft(fr,1,_r.zoom);wr=!0,Kr=[u,u]}else wr=!1,Kr=_r.pixelsToGLUnits;return{u_camera_to_center_distance:_r.cameraToCenterDistance,u_scale_with_map:+("map"===Ar.paint.get("circle-pitch-scale")),u_matrix:u.translatePosMatrix(Xe.posMatrix,fr,Ar.paint.get("circle-translate"),Ar.paint.get("circle-translate-anchor")),u_pitch_with_map:+wr,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:Kr}},Ce=(u,Xe,fr)=>({u_matrix:u,u_inv_matrix:Xe,u_camera_to_center_distance:fr.cameraToCenterDistance,u_viewport_size:[fr.width,fr.height]}),Se=(u,Xe,fr=1)=>({u_matrix:u,u_color:Xe,u_overlay:0,u_overlay_scale:fr}),ze=u=>({u_matrix:u}),De=(u,Xe,fr,Ar)=>({u_matrix:u,u_extrude_scale:Ft(Xe,1,fr),u_intensity:Ar});function Me(u,fr){const Ar=Math.pow(2,fr.canonical.z),_r=fr.canonical.y;return[new Xe.Z(0,_r/Ar).toLngLat().lat,new Xe.Z(0,(_r+1)/Ar).toLngLat().lat]}const Ae=(u,Xe,fr,Ar)=>{const _r=u.transform;return{u_matrix:Be(u,Xe,fr,Ar),u_ratio:1/Ft(Xe,1,_r.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/_r.pixelsToGLUnits[0],1/_r.pixelsToGLUnits[1]]}},Re=(u,fr,Ar,_r,wr)=>Xe.e(Ae(u,fr,Ar,wr),{u_image:0,u_image_height:_r}),ke=(u,Xe,fr,Ar,_r)=>{const wr=u.transform,Kr=Fe(Xe,wr);return{u_matrix:Be(u,Xe,fr,_r),u_texsize:Xe.imageAtlasTexture.size,u_ratio:1/Ft(Xe,1,wr.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[Kr,Ar.fromScale,Ar.toScale],u_fade:Ar.t,u_units_to_pixels:[1/wr.pixelsToGLUnits[0],1/wr.pixelsToGLUnits[1]]}},Le=(u,fr,Ar,_r,wr,Kr)=>{const In=u.lineAtlas,io=Fe(fr,u.transform),no="round"===Ar.layout.get("line-cap"),oo=In.getDash(_r.from,no),so=In.getDash(_r.to,no),ao=oo.width*wr.fromScale,co=so.width*wr.toScale;return Xe.e(Ae(u,fr,Ar,Kr),{u_patternscale_a:[io/ao,-oo.height/2],u_patternscale_b:[io/co,-so.height/2],u_sdfgamma:In.width/(256*Math.min(ao,co)*u.pixelRatio)/2,u_image:0,u_tex_y_a:oo.y,u_tex_y_b:so.y,u_mix:wr.t})};function Fe(u,Xe){return 1/Ft(u,1,Xe.tileZoom)}function Be(u,Xe,fr,Ar){return u.translatePosMatrix(Ar?Ar.posMatrix:Xe.tileID.posMatrix,Xe,fr.paint.get("line-translate"),fr.paint.get("line-translate-anchor"))}const Oe=(u,Xe,fr,Ar,_r)=>{return{u_matrix:u,u_tl_parent:Xe,u_scale_parent:fr,u_buffer_scale:1,u_fade_t:Ar.mix,u_opacity:Ar.opacity*_r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:_r.paint.get("raster-brightness-min"),u_brightness_high:_r.paint.get("raster-brightness-max"),u_saturation_factor:(Kr=_r.paint.get("raster-saturation"),Kr>0?1-1/(1.001-Kr):-Kr),u_contrast_factor:(wr=_r.paint.get("raster-contrast"),wr>0?1/(1-wr):1+wr),u_spin_weights:Ne(_r.paint.get("raster-hue-rotate"))};var wr,Kr};function Ne(u){u*=Math.PI/180;const Xe=Math.sin(u),fr=Math.cos(u);return[(2*fr+1)/3,(-Math.sqrt(3)*Xe-fr+1)/3,(Math.sqrt(3)*Xe-fr+1)/3]}const je=(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co)=>{const go=Kr.transform;return{u_is_size_zoom_constant:+("constant"===u||"source"===u),u_is_size_feature_constant:+("constant"===u||"camera"===u),u_size_t:Xe?Xe.uSizeT:0,u_size:Xe?Xe.uSize:0,u_camera_to_center_distance:go.cameraToCenterDistance,u_pitch:go.pitch/360*2*Math.PI,u_rotate_symbol:+fr,u_aspect_ratio:go.width/go.height,u_fade_change:Kr.options.fadeDuration?Kr.symbolFadeChange:1,u_matrix:In,u_label_plane_matrix:io,u_coord_matrix:no,u_is_text:+so,u_pitch_with_map:+Ar,u_is_along_line:_r,u_is_variable_anchor:wr,u_texsize:ao,u_texture:0,u_translation:oo,u_pitched_scale:co}},Ue=(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho)=>{const Co=In.transform;return Xe.e(je(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,ho),{u_gamma_scale:_r?Math.cos(Co._pitch)*Co.cameraToCenterDistance:1,u_device_pixel_ratio:In.pixelRatio,u_is_halo:+go})},Ze=(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go)=>Xe.e(Ue(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,!0,ao,!0,go),{u_texsize_icon:co,u_texture_icon:1}),qe=(u,Xe,fr)=>({u_matrix:u,u_opacity:Xe,u_color:fr}),Ve=(u,fr,Ar,_r,wr,Kr)=>Xe.e(function(u,Xe,fr,Ar){const _r=fr.imageManager.getPattern(u.from.toString()),wr=fr.imageManager.getPattern(u.to.toString()),{width:Kr,height:In}=fr.imageManager.getPixelSize(),io=Math.pow(2,Ar.tileID.overscaledZ),no=Ar.tileSize*Math.pow(2,fr.transform.tileZoom)/io,oo=no*(Ar.tileID.canonical.x+Ar.tileID.wrap*io),so=no*Ar.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:_r.tl,u_pattern_br_a:_r.br,u_pattern_tl_b:wr.tl,u_pattern_br_b:wr.br,u_texsize:[Kr,In],u_mix:Xe.t,u_pattern_size_a:_r.displaySize,u_pattern_size_b:wr.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/Ft(Ar,1,fr.transform.tileZoom),u_pixel_coord_upper:[oo>>16,so>>16],u_pixel_coord_lower:[65535&oo,65535&so]}}(_r,Kr,Ar,wr),{u_matrix:u,u_opacity:fr}),xl={fillExtrusion:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_lightpos:new Xe.aN(u,fr.u_lightpos),u_lightintensity:new Xe.aI(u,fr.u_lightintensity),u_lightcolor:new Xe.aN(u,fr.u_lightcolor),u_vertical_gradient:new Xe.aI(u,fr.u_vertical_gradient),u_opacity:new Xe.aI(u,fr.u_opacity)}),fillExtrusionPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_lightpos:new Xe.aN(u,fr.u_lightpos),u_lightintensity:new Xe.aI(u,fr.u_lightintensity),u_lightcolor:new Xe.aN(u,fr.u_lightcolor),u_vertical_gradient:new Xe.aI(u,fr.u_vertical_gradient),u_height_factor:new Xe.aI(u,fr.u_height_factor),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade),u_opacity:new Xe.aI(u,fr.u_opacity)}),fill:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix)}),fillPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),fillOutline:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world)}),fillOutlinePattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),circle:(u,fr)=>({u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_scale_with_map:new Xe.aH(u,fr.u_scale_with_map),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_extrude_scale:new Xe.aO(u,fr.u_extrude_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_matrix:new Xe.aJ(u,fr.u_matrix)}),collisionBox:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_pixel_extrude_scale:new Xe.aO(u,fr.u_pixel_extrude_scale)}),collisionCircle:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_inv_matrix:new Xe.aJ(u,fr.u_inv_matrix),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_viewport_size:new Xe.aO(u,fr.u_viewport_size)}),debug:(u,fr)=>({u_color:new Xe.aL(u,fr.u_color),u_matrix:new Xe.aJ(u,fr.u_matrix),u_overlay:new Xe.aH(u,fr.u_overlay),u_overlay_scale:new Xe.aI(u,fr.u_overlay_scale)}),clippingMask:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix)}),heatmap:(u,fr)=>({u_extrude_scale:new Xe.aI(u,fr.u_extrude_scale),u_intensity:new Xe.aI(u,fr.u_intensity),u_matrix:new Xe.aJ(u,fr.u_matrix)}),heatmapTexture:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world),u_image:new Xe.aH(u,fr.u_image),u_color_ramp:new Xe.aH(u,fr.u_color_ramp),u_opacity:new Xe.aI(u,fr.u_opacity)}),hillshade:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_latrange:new Xe.aO(u,fr.u_latrange),u_light:new Xe.aO(u,fr.u_light),u_shadow:new Xe.aL(u,fr.u_shadow),u_highlight:new Xe.aL(u,fr.u_highlight),u_accent:new Xe.aL(u,fr.u_accent)}),hillshadePrepare:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_dimension:new Xe.aO(u,fr.u_dimension),u_zoom:new Xe.aI(u,fr.u_zoom),u_unpack:new Xe.aK(u,fr.u_unpack)}),line:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels)}),lineGradient:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_image:new Xe.aH(u,fr.u_image),u_image_height:new Xe.aI(u,fr.u_image_height)}),linePattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texsize:new Xe.aO(u,fr.u_texsize),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_image:new Xe.aH(u,fr.u_image),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),lineSDF:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_patternscale_a:new Xe.aO(u,fr.u_patternscale_a),u_patternscale_b:new Xe.aO(u,fr.u_patternscale_b),u_sdfgamma:new Xe.aI(u,fr.u_sdfgamma),u_image:new Xe.aH(u,fr.u_image),u_tex_y_a:new Xe.aI(u,fr.u_tex_y_a),u_tex_y_b:new Xe.aI(u,fr.u_tex_y_b),u_mix:new Xe.aI(u,fr.u_mix)}),raster:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_tl_parent:new Xe.aO(u,fr.u_tl_parent),u_scale_parent:new Xe.aI(u,fr.u_scale_parent),u_buffer_scale:new Xe.aI(u,fr.u_buffer_scale),u_fade_t:new Xe.aI(u,fr.u_fade_t),u_opacity:new Xe.aI(u,fr.u_opacity),u_image0:new Xe.aH(u,fr.u_image0),u_image1:new Xe.aH(u,fr.u_image1),u_brightness_low:new Xe.aI(u,fr.u_brightness_low),u_brightness_high:new Xe.aI(u,fr.u_brightness_high),u_saturation_factor:new Xe.aI(u,fr.u_saturation_factor),u_contrast_factor:new Xe.aI(u,fr.u_contrast_factor),u_spin_weights:new Xe.aN(u,fr.u_spin_weights)}),symbolIcon:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texture:new Xe.aH(u,fr.u_texture),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),symbolSDF:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texture:new Xe.aH(u,fr.u_texture),u_gamma_scale:new Xe.aI(u,fr.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,fr.u_is_halo),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),symbolTextAndIcon:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texsize_icon:new Xe.aO(u,fr.u_texsize_icon),u_texture:new Xe.aH(u,fr.u_texture),u_texture_icon:new Xe.aH(u,fr.u_texture_icon),u_gamma_scale:new Xe.aI(u,fr.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,fr.u_is_halo),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),background:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_opacity:new Xe.aI(u,fr.u_opacity),u_color:new Xe.aL(u,fr.u_color)}),backgroundPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_opacity:new Xe.aI(u,fr.u_opacity),u_image:new Xe.aH(u,fr.u_image),u_pattern_tl_a:new Xe.aO(u,fr.u_pattern_tl_a),u_pattern_br_a:new Xe.aO(u,fr.u_pattern_br_a),u_pattern_tl_b:new Xe.aO(u,fr.u_pattern_tl_b),u_pattern_br_b:new Xe.aO(u,fr.u_pattern_br_b),u_texsize:new Xe.aO(u,fr.u_texsize),u_mix:new Xe.aI(u,fr.u_mix),u_pattern_size_a:new Xe.aO(u,fr.u_pattern_size_a),u_pattern_size_b:new Xe.aO(u,fr.u_pattern_size_b),u_scale_a:new Xe.aI(u,fr.u_scale_a),u_scale_b:new Xe.aI(u,fr.u_scale_b),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_tile_units_to_pixels:new Xe.aI(u,fr.u_tile_units_to_pixels)}),terrain:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texture:new Xe.aH(u,fr.u_texture),u_ele_delta:new Xe.aI(u,fr.u_ele_delta),u_fog_matrix:new Xe.aJ(u,fr.u_fog_matrix),u_fog_color:new Xe.aL(u,fr.u_fog_color),u_fog_ground_blend:new Xe.aI(u,fr.u_fog_ground_blend),u_fog_ground_blend_opacity:new Xe.aI(u,fr.u_fog_ground_blend_opacity),u_horizon_color:new Xe.aL(u,fr.u_horizon_color),u_horizon_fog_blend:new Xe.aI(u,fr.u_horizon_fog_blend)}),terrainDepth:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ele_delta:new Xe.aI(u,fr.u_ele_delta)}),terrainCoords:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texture:new Xe.aH(u,fr.u_texture),u_terrain_coords_id:new Xe.aI(u,fr.u_terrain_coords_id),u_ele_delta:new Xe.aI(u,fr.u_ele_delta)}),sky:(u,fr)=>({u_sky_color:new Xe.aL(u,fr.u_sky_color),u_horizon_color:new Xe.aL(u,fr.u_horizon_color),u_horizon:new Xe.aI(u,fr.u_horizon),u_sky_horizon_blend:new Xe.aI(u,fr.u_sky_horizon_blend)})};class He{constructor(u,Xe,fr){this.context=u;const Ar=u.gl;this.buffer=Ar.createBuffer(),this.dynamicDraw=Boolean(fr),this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),Ar.bufferData(Ar.ELEMENT_ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?Ar.DYNAMIC_DRAW:Ar.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const Xe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),Xe.bufferSubData(Xe.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class $e{constructor(u,Xe,fr,Ar){this.length=Xe.length,this.attributes=fr,this.itemSize=Xe.bytesPerElement,this.dynamicDraw=Ar,this.context=u;const _r=u.gl;this.buffer=_r.createBuffer(),u.bindVertexBuffer.set(this.buffer),_r.bufferData(_r.ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?_r.DYNAMIC_DRAW:_r.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const Xe=this.context.gl;this.bind(),Xe.bufferSubData(Xe.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,Xe){for(let fr=0;fr<this.attributes.length;fr++){const Ar=Xe.attributes[this.attributes[fr].name];void 0!==Ar&&u.enableVertexAttribArray(Ar)}}setVertexAttribPointers(u,Xe,fr){for(let Ar=0;Ar<this.attributes.length;Ar++){const _r=this.attributes[Ar],wr=Xe.attributes[_r.name];void 0!==wr&&u.vertexAttribPointer(wr,_r.components,u[Sl[_r.type]],!1,this.itemSize,_r.offset+this.itemSize*(fr||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const kl=new WeakMap;function Ke(u){var Xe;if(kl.has(u))return kl.get(u);{const fr=null===(Xe=u.getParameter(u.VERSION))||void 0===Xe?void 0:Xe.startsWith("WebGL 2.0");return kl.set(u,fr),fr}}class Je{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Ye extends Je{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class Qe extends Je{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class ti extends Je{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class ei extends Je{getDefault(){return[!0,!0,!0,!0]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ii extends Je{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class ai extends Je{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class si extends Je{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const Xe=this.current;(u.func!==Xe.func||u.ref!==Xe.ref||u.mask!==Xe.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class oi extends Je{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class ri extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.STENCIL_TEST):Xe.disable(Xe.STENCIL_TEST),this.current=u,this.dirty=!1}}class ni extends Je{getDefault(){return[0,1]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class li extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.DEPTH_TEST):Xe.disable(Xe.DEPTH_TEST),this.current=u,this.dirty=!1}}class hi extends Je{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class ci extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.BLEND):Xe.disable(Xe.BLEND),this.current=u,this.dirty=!1}}class ui extends Je{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class di extends Je{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class _i extends Je{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class pi extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.CULL_FACE):Xe.disable(Xe.CULL_FACE),this.current=u,this.dirty=!1}}class mi extends Je{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class fi extends Je{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class gi extends Je{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class vi extends Je{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class xi extends Je{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class yi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindFramebuffer(Xe.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class bi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindRenderbuffer(Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class wi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindTexture(Xe.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ti extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindBuffer(Xe.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ii extends Je{getDefault(){return null}set(u){const Xe=this.gl;Xe.bindBuffer(Xe.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ei extends Je{getDefault(){return null}set(u){var Xe;if(u===this.current&&!this.dirty)return;const fr=this.gl;Ke(fr)?fr.bindVertexArray(u):null===(Xe=fr.getExtension("OES_vertex_array_object"))||void 0===Xe||Xe.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Pi extends Je{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Ci extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Si extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class zi extends Je{constructor(u,Xe){super(u),this.context=u,this.parent=Xe}getDefault(){return null}}class Di extends zi{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferTexture2D(Xe.FRAMEBUFFER,Xe.COLOR_ATTACHMENT0,Xe.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Mi extends zi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ai extends zi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_STENCIL_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ri{constructor(u,Xe,fr,Ar,_r){this.context=u,this.width=Xe,this.height=fr;const wr=u.gl,Kr=this.framebuffer=wr.createFramebuffer();if(this.colorAttachment=new Di(u,Kr),Ar)this.depthAttachment=_r?new Ai(u,Kr):new Mi(u,Kr);else if(_r)throw new Error("Stencil cannot be set without depth");if(wr.checkFramebufferStatus(wr.FRAMEBUFFER)!==wr.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,Xe=this.colorAttachment.get();if(Xe&&u.deleteTexture(Xe),this.depthAttachment){const Xe=this.depthAttachment.get();Xe&&u.deleteRenderbuffer(Xe)}u.deleteFramebuffer(this.framebuffer)}}class ki{constructor(u,Xe,fr){this.blendFunction=u,this.blendColor=Xe,this.mask=fr}}ki.Replace=[1,0],ki.disabled=new ki(ki.Replace,Xe.aM.transparent,[!1,!1,!1,!1]),ki.unblended=new ki(ki.Replace,Xe.aM.transparent,[!0,!0,!0,!0]),ki.alphaBlended=new ki([1,771],Xe.aM.transparent,[!0,!0,!0,!0]);class Li{constructor(u){var Xe,fr;if(this.gl=u,this.clearColor=new Ye(this),this.clearDepth=new Qe(this),this.clearStencil=new ti(this),this.colorMask=new ei(this),this.depthMask=new ii(this),this.stencilMask=new ai(this),this.stencilFunc=new si(this),this.stencilOp=new oi(this),this.stencilTest=new ri(this),this.depthRange=new ni(this),this.depthTest=new li(this),this.depthFunc=new hi(this),this.blend=new ci(this),this.blendFunc=new ui(this),this.blendColor=new di(this),this.blendEquation=new _i(this),this.cullFace=new pi(this),this.cullFaceSide=new mi(this),this.frontFace=new fi(this),this.program=new gi(this),this.activeTexture=new vi(this),this.viewport=new xi(this),this.bindFramebuffer=new yi(this),this.bindRenderbuffer=new bi(this),this.bindTexture=new wi(this),this.bindVertexBuffer=new Ti(this),this.bindElementBuffer=new Ii(this),this.bindVertexArray=new Ei(this),this.pixelStoreUnpack=new Pi(this),this.pixelStoreUnpackPremultiplyAlpha=new Ci(this),this.pixelStoreUnpackFlipY=new Si(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),Ke(u)){this.HALF_FLOAT=u.HALF_FLOAT;const Ar=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(Xe=u.RGBA16F)&&void 0!==Xe?Xe:null==Ar?void 0:Ar.RGBA16F_EXT,this.RGB16F=null!==(fr=u.RGB16F)&&void 0!==fr?fr:null==Ar?void 0:Ar.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const Xe=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==Xe?void 0:Xe.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,Xe){return new He(this,u,Xe)}createVertexBuffer(u,Xe,fr){return new $e(this,u,Xe,fr)}createRenderbuffer(u,Xe,fr){const Ar=this.gl,_r=Ar.createRenderbuffer();return this.bindRenderbuffer.set(_r),Ar.renderbufferStorage(Ar.RENDERBUFFER,u,Xe,fr),this.bindRenderbuffer.set(null),_r}createFramebuffer(u,Xe,fr,Ar){return new Ri(this,u,Xe,fr,Ar)}clear({color:u,depth:Xe,stencil:fr}){const Ar=this.gl;let _r=0;u&&(_r|=Ar.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),void 0!==Xe&&(_r|=Ar.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Xe),this.depthMask.set(!0)),void 0!==fr&&(_r|=Ar.STENCIL_BUFFER_BIT,this.clearStencil.set(fr),this.stencilMask.set(255)),Ar.clear(_r)}setCullFace(u){!1===u.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){Xe.aE(u.blendFunction,ki.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return Ke(this.gl)?this.gl.createVertexArray():null===(u=this.gl.getExtension("OES_vertex_array_object"))||void 0===u?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var Xe;return Ke(this.gl)?this.gl.deleteVertexArray(u):null===(Xe=this.gl.getExtension("OES_vertex_array_object"))||void 0===Xe?void 0:Xe.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Fi{constructor(u,Xe,fr){this.func=u,this.mask=Xe,this.range=fr}}Fi.ReadOnly=!1,Fi.ReadWrite=!0,Fi.disabled=new Fi(519,Fi.ReadOnly,[0,1]);const Bl=7680;class Oi{constructor(u,Xe,fr,Ar,_r,wr){this.test=u,this.ref=Xe,this.mask=fr,this.fail=Ar,this.depthFail=_r,this.pass=wr}}Oi.disabled=new Oi({func:519,mask:0},0,0,Bl,Bl,Bl);class Ni{constructor(u,Xe,fr){this.enable=u,this.mode=Xe,this.frontFace=fr}}let Zl;function Ui(u,fr,Ar,_r,wr){const Kr=u.context,In=Kr.gl,io=u.useProgram("collisionBox"),no=[];let oo=0,so=0;for(let co=0;co<_r.length;co++){const go=_r[co],ho=fr.getTile(go).getBucket(Ar);if(!ho)continue;const Co=wr?ho.textCollisionBox:ho.iconCollisionBox,Io=ho.collisionCircleArray;if(Io.length>0){const fr=Xe.H();Xe.aQ(fr,ho.placementInvProjMatrix,u.transform.glCoordMatrix),Xe.aQ(fr,fr,ho.placementViewportMatrix),no.push({circleArray:Io,circleOffset:so,transform:go.posMatrix,invTransform:fr,coord:go}),oo+=Io.length/4,so=oo}Co&&io.draw(Kr,In.LINES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,{u_matrix:go.posMatrix,u_pixel_extrude_scale:[1/(ao=u.transform).width,1/ao.height]},u.style.map.terrain&&u.style.map.terrain.getTerrainData(go),Ar.id,Co.layoutVertexBuffer,Co.indexBuffer,Co.segments,null,u.transform.zoom,null,null,Co.collisionVertexBuffer)}var ao;if(!wr||!no.length)return;const co=u.useProgram("collisionCircle"),go=new Xe.aR;go.resize(4*oo),go._trim();let ho=0;for(const u of no)for(let Xe=0;Xe<u.circleArray.length/4;Xe++){const fr=4*Xe,Ar=u.circleArray[fr+0],_r=u.circleArray[fr+1],wr=u.circleArray[fr+2],Kr=u.circleArray[fr+3];go.emplace(ho++,Ar,_r,wr,Kr,0),go.emplace(ho++,Ar,_r,wr,Kr,1),go.emplace(ho++,Ar,_r,wr,Kr,2),go.emplace(ho++,Ar,_r,wr,Kr,3)}(!Zl||Zl.length<2*oo)&&(Zl=function(u){const fr=2*u,Ar=new Xe.aT;Ar.resize(fr),Ar._trim();for(let u=0;u<fr;u++){const Xe=6*u;Ar.uint16[Xe+0]=4*u+0,Ar.uint16[Xe+1]=4*u+1,Ar.uint16[Xe+2]=4*u+2,Ar.uint16[Xe+3]=4*u+2,Ar.uint16[Xe+4]=4*u+3,Ar.uint16[Xe+5]=4*u+0}return Ar}(oo));const Co=Kr.createIndexBuffer(Zl,!0),Io=Kr.createVertexBuffer(go,Xe.aS.members,!0);for(const fr of no){const _r=Ce(fr.transform,fr.invTransform,u.transform);co.draw(Kr,In.TRIANGLES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,_r,u.style.map.terrain&&u.style.map.terrain.getTerrainData(fr.coord),Ar.id,Io,Co,Xe.a0.simpleSegment(0,2*fr.circleOffset,fr.circleArray.length,fr.circleArray.length/2),null,u.transform.zoom,null,null,null)}Io.destroy(),Co.destroy()}Ni.disabled=new Ni(!1,1029,2305),Ni.backCCW=new Ni(!0,1029,2305);const Rl=Xe.an(new Float32Array(16));function qi(u,fr,Ar,_r,wr,Kr){const{horizontalAlign:In,verticalAlign:io}=Xe.au(u);return new Xe.P((-(In-.5)*fr/wr+_r[0])*Kr,(-(io-.5)*Ar/wr+_r[1])*Kr)}function Vi(u,fr,Ar,_r,wr,Kr){const In=fr.tileAnchorPoint.add(new Xe.P(fr.translation[0],fr.translation[1]));if(fr.pitchWithMap){let u=_r.mult(Kr);return Ar||(u=u.rotate(-wr)),xt(In.add(u),fr.labelPlaneMatrix,fr.getElevation).point}if(Ar){const Xe=St(fr.tileAnchorPoint.x+1,fr.tileAnchorPoint.y,fr).point.sub(u),Ar=Math.atan(Xe.y/Xe.x)+(Xe.x<0?Math.PI:0);return u.add(_r.rotate(Ar))}return u.add(_r)}function Gi(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go){const ho=u.text.placedSymbolArray,Co=u.text.dynamicLayoutVertexArray,Io=u.icon.dynamicLayoutVertexArray,xo={};Co.clear();for(let Io=0;Io<ho.length;Io++){const Mo=ho.get(Io),Po=Mo.hidden||!Mo.crossTileID||u.allowVerticalPlacement&&!Mo.placedOrientation?null:_r[Mo.crossTileID];if(Po){const _r=new Xe.P(Mo.anchorX,Mo.anchorY),ho={getElevation:go,width:wr.width,height:wr.height,labelPlaneMatrix:Kr,lineVertexArray:null,pitchWithMap:Ar,projection:so,projectionCache:null,tileAnchorPoint:_r,translation:ao,unwrappedTileID:co},Io=Ar?xt(_r,In,go):St(_r.x,_r.y,ho),ss=yt(wr.cameraToCenterDistance,Io.signedDistanceFromCamera);let sa=Xe.ai(u.textSizeData,no,Mo)*ss/Xe.ap;Ar&&(sa*=u.tilePixelRatio/io);const{width:aa,height:fa,anchor:ya,textOffset:ol,textBoxScale:sl}=Po,al=qi(ya,aa,fa,ol,sl,sa),cl=so.getPitchedTextCorrection(wr,_r.add(new Xe.P(ao[0],ao[1])),co),hl=Vi(Io.point,ho,fr,al,wr.angle,cl),ul=u.allowVerticalPlacement&&Mo.placedOrientation===Xe.ah.vertical?Math.PI/2:0;for(let u=0;u<Mo.numGlyphs;u++)Xe.aj(Co,hl,ul);oo&&Mo.associatedIconIndex>=0&&(xo[Mo.associatedIconIndex]={shiftedAnchor:hl,angle:ul})}else Rt(Mo.numGlyphs,Co)}if(oo){Io.clear();const fr=u.icon.placedSymbolArray;for(let u=0;u<fr.length;u++){const Ar=fr.get(u);if(Ar.hidden)Rt(Ar.numGlyphs,Io);else{const fr=xo[u];if(fr)for(let u=0;u<Ar.numGlyphs;u++)Xe.aj(Io,fr.shiftedAnchor,fr.angle);else Rt(Ar.numGlyphs,Io)}}u.icon.dynamicLayoutVertexBuffer.updateData(Io)}u.text.dynamicLayoutVertexBuffer.updateData(Co)}function Hi(u,Xe,fr){return fr.iconsInText&&Xe?"symbolTextAndIcon":u?"symbolSDF":"symbolIcon"}function Wi(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=u.context,go=co.gl,ho=u.transform,Co=ee(),Io="map"===io,xo="map"===no,Mo="viewport"!==io&&"point"!==Ar.layout.get("symbol-placement"),Po=Io&&!xo&&!Mo,ss=!xo&&Mo,sa=!Ar.layout.get("symbol-sort-key").isConstant();let aa=!1;const fa=u.depthModeForSublayer(0,Fi.ReadOnly),ya=Ar._unevaluatedLayout.hasValue("text-variable-anchor")||Ar._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ol=[],sl=Co.getCircleRadiusCorrection(ho);for(const io of _r){const _r=fr.getTile(io),no=_r.getBucket(Ar);if(!no)continue;const so=wr?no.text:no.icon;if(!so||!so.segments.get().length||!so.hasVisibleVertices)continue;const ao=so.programConfigurations.get(Ar.id),co=wr||no.sdfIcons,fa=wr?no.textSizeData:no.iconSizeData,al=xo||0!==ho.pitch,cl=u.useProgram(Hi(co,wr,no),ao),hl=Xe.ag(fa,ho.zoom),ul=u.style.map.terrain&&u.style.map.terrain.getTerrainData(io);let dl,pl,Cl,fl,_l=[0,0],vl=null;if(wr)pl=_r.glyphAtlasTexture,Cl=go.LINEAR,dl=_r.glyphAtlasTexture.size,no.iconsInText&&(_l=_r.imageAtlasTexture.size,vl=_r.imageAtlasTexture,fl=al||u.options.rotating||u.options.zooming||"composite"===fa.kind||"camera"===fa.kind?go.LINEAR:go.NEAREST);else{const Xe=1!==Ar.layout.get("icon-size").constantOr(0)||no.iconsNeedLinear;pl=_r.imageAtlasTexture,Cl=co||u.options.rotating||u.options.zooming||Xe||al?go.LINEAR:go.NEAREST,dl=_r.imageAtlasTexture.size}const xl=Ft(_r,1,u.transform.zoom),Sl=ss?io.posMatrix:Rl,kl=gt(Sl,xo,Io,u.transform,xl),Bl=vt(Sl,xo,Io,u.transform,xl),Zl=vt(io.posMatrix,xo,Io,u.transform,xl),Wl=Co.translatePosition(u.transform,_r,Kr,In),Tl=ya&&no.hasTextData(),Jl="none"!==Ar.layout.get("icon-text-fit")&&Tl&&no.hasIconData();if(Mo){const Xe=u.style.map.terrain?(Xe,fr)=>u.style.map.terrain.getElevation(io,Xe,fr):null,fr="map"===Ar.layout.get("text-rotation-alignment");wt(no,io.posMatrix,u,wr,kl,Zl,xo,oo,fr,Co,io.toUnwrapped(),ho.width,ho.height,Wl,Xe)}const Kl=io.posMatrix,Ll=wr&&ya||Jl,Dl=Mo||Ll?Rl:kl,Yl=Bl,Nl=co&&0!==Ar.paint.get(wr?"text-halo-width":"icon-halo-width").constantOr(1);let Ol;Ol=co?no.iconsInText?Ze(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,dl,_l,sl):Ue(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,wr,dl,!0,sl):je(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,wr,dl,sl);const jl={program:cl,buffers:so,uniformValues:Ol,atlasTexture:pl,atlasTextureIcon:vl,atlasInterpolation:Cl,atlasInterpolationIcon:fl,isSDF:co,hasHalo:Nl};if(sa&&no.canOverlap){aa=!0;const u=so.segments.get();for(const fr of u)ol.push({segments:new Xe.a0([fr]),sortKey:fr.sortKey,state:jl,terrainData:ul})}else ol.push({segments:so.segments,sortKey:0,state:jl,terrainData:ul})}aa&&ol.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of ol){const fr=Xe.state;if(co.activeTexture.set(go.TEXTURE0),fr.atlasTexture.bind(fr.atlasInterpolation,go.CLAMP_TO_EDGE),fr.atlasTextureIcon&&(co.activeTexture.set(go.TEXTURE1),fr.atlasTextureIcon&&fr.atlasTextureIcon.bind(fr.atlasInterpolationIcon,go.CLAMP_TO_EDGE)),fr.isSDF){const _r=fr.uniformValues;fr.hasHalo&&(_r.u_is_halo=1,$i(fr.buffers,Xe.segments,Ar,u,fr.program,fa,so,ao,_r,Xe.terrainData)),_r.u_is_halo=0}$i(fr.buffers,Xe.segments,Ar,u,fr.program,fa,so,ao,fr.uniformValues,Xe.terrainData)}}function $i(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=Ar.context;_r.draw(oo,oo.gl.TRIANGLES,wr,Kr,In,Ni.disabled,io,no,fr.id,u.layoutVertexBuffer,u.indexBuffer,Xe,fr.paint,Ar.transform.zoom,u.programConfigurations.get(fr.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function Xi(u,Xe,fr,Ar,_r){if(!fr||!Ar||!Ar.imageAtlas)return;const wr=Ar.imageAtlas.patternPositions;let Kr=wr[fr.to.toString()],In=wr[fr.from.toString()];if(!Kr&&In&&(Kr=In),!In&&Kr&&(In=Kr),!Kr||!In){const u=_r.getPaintProperty(Xe);Kr=wr[u],In=wr[u]}Kr&&In&&u.setConstantPatternPositions(Kr,In)}function Ki(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context.gl,io="fill-pattern",no=fr.paint.get(io),oo=no&&no.constantOr(1),so=fr.getCrossfadeParameters();let ao,co,go,ho,Co;Kr?(co=oo&&!fr.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ao=In.LINES):(co=oo?"fillPattern":"fill",ao=In.TRIANGLES);const Io=no.constantOr(null);for(const no of Ar){const Ar=Xe.getTile(no);if(oo&&!Ar.patternsLoaded())continue;const xo=Ar.getBucket(fr);if(!xo)continue;const Mo=xo.programConfigurations.get(fr.id),Po=u.useProgram(co,Mo),ss=u.style.map.terrain&&u.style.map.terrain.getTerrainData(no);oo&&(u.context.activeTexture.set(In.TEXTURE0),Ar.imageAtlasTexture.bind(In.LINEAR,In.CLAMP_TO_EDGE),Mo.updatePaintBuffers(so)),Xi(Mo,io,Io,Ar,fr);const sa=ss?no:null,aa=u.translatePosMatrix(sa?sa.posMatrix:no.posMatrix,Ar,fr.paint.get("fill-translate"),fr.paint.get("fill-translate-anchor"));if(Kr){ho=xo.indexBuffer2,Co=xo.segments2;const Xe=[In.drawingBufferWidth,In.drawingBufferHeight];go="fillOutlinePattern"===co&&oo?Ee(aa,u,so,Ar,Xe):Ie(aa,Xe)}else ho=xo.indexBuffer,Co=xo.segments,go=oo?Te(aa,u,so,Ar):we(aa);Po.draw(u.context,ao,_r,u.stencilModeForClipping(no),wr,Ni.disabled,go,ss,fr.id,xo.layoutVertexBuffer,ho,Co,fr.paint,u.transform.zoom,Mo)}}function Ji(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no="fill-extrusion-pattern",oo=fr.paint.get(no),so=oo.constantOr(1),ao=fr.getCrossfadeParameters(),co=fr.paint.get("fill-extrusion-opacity"),go=oo.constantOr(null);for(const oo of Ar){const Ar=Xe.getTile(oo),ho=Ar.getBucket(fr);if(!ho)continue;const Co=u.style.map.terrain&&u.style.map.terrain.getTerrainData(oo),Io=ho.programConfigurations.get(fr.id),xo=u.useProgram(so?"fillExtrusionPattern":"fillExtrusion",Io);so&&(u.context.activeTexture.set(io.TEXTURE0),Ar.imageAtlasTexture.bind(io.LINEAR,io.CLAMP_TO_EDGE),Io.updatePaintBuffers(ao)),Xi(Io,no,go,Ar,fr);const Mo=u.translatePosMatrix(oo.posMatrix,Ar,fr.paint.get("fill-extrusion-translate"),fr.paint.get("fill-extrusion-translate-anchor")),Po=fr.paint.get("fill-extrusion-vertical-gradient"),ss=so?be(Mo,u,Po,co,oo,ao,Ar):ye(Mo,u,Po,co);xo.draw(In,In.gl.TRIANGLES,_r,wr,Kr,Ni.backCCW,ss,Co,fr.id,ho.layoutVertexBuffer,ho.indexBuffer,ho.segments,fr.paint,u.transform.zoom,Io,u.style.map.terrain&&ho.centroidVertexBuffer)}}function Yi(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no=fr.fbo;if(!no)return;const oo=u.useProgram("hillshade"),so=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);In.activeTexture.set(io.TEXTURE0),io.bindTexture(io.TEXTURE_2D,no.colorAttachment.get()),oo.draw(In,io.TRIANGLES,_r,wr,Kr,Ni.disabled,((u,Xe,fr,Ar)=>{const _r=fr.paint.get("hillshade-shadow-color"),wr=fr.paint.get("hillshade-highlight-color"),Kr=fr.paint.get("hillshade-accent-color");let In=fr.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===fr.paint.get("hillshade-illumination-anchor")&&(In-=u.transform.angle);const io=!u.options.moving;return{u_matrix:Ar?Ar.posMatrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped(),io),u_image:0,u_latrange:Me(0,Xe.tileID),u_light:[fr.paint.get("hillshade-exaggeration"),In],u_shadow:_r,u_highlight:wr,u_accent:Kr}})(u,fr,Ar,so?Xe:null),so,Ar.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function Qi(u,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no=fr.dem;if(no&&no.data){const oo=no.dim,so=no.stride,ao=no.getPixels();if(In.activeTexture.set(io.TEXTURE1),In.pixelStoreUnpackPremultiplyAlpha.set(!1),fr.demTexture=fr.demTexture||u.getTileTexture(so),fr.demTexture){const u=fr.demTexture;u.update(ao,{premultiply:!1}),u.bind(io.NEAREST,io.CLAMP_TO_EDGE)}else fr.demTexture=new b(In,ao,io.RGBA,{premultiply:!1}),fr.demTexture.bind(io.NEAREST,io.CLAMP_TO_EDGE);In.activeTexture.set(io.TEXTURE0);let co=fr.fbo;if(!co){const u=new b(In,{width:oo,height:oo,data:null},io.RGBA);u.bind(io.LINEAR,io.CLAMP_TO_EDGE),co=fr.fbo=In.createFramebuffer(oo,oo,!0,!1),co.colorAttachment.set(u.texture)}In.bindFramebuffer.set(co.framebuffer),In.viewport.set([0,0,oo,oo]),u.useProgram("hillshadePrepare").draw(In,io.TRIANGLES,_r,wr,Kr,Ni.disabled,((u,fr)=>{const Ar=fr.stride,_r=Xe.H();return Xe.aP(_r,0,Xe.X,-Xe.X,0,0,1),Xe.J(_r,_r,[0,-Xe.X,0]),{u_matrix:_r,u_image:1,u_dimension:[Ar,Ar],u_zoom:u.overscaledZ,u_unpack:fr.getUnpackVector()}})(fr.tileID,no),null,Ar.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),fr.needsHillshadePrepare=!1}}function ta(u,fr,Ar,_r,Kr,In){const io=_r.paint.get("raster-fade-duration");if(!In&&io>0){const _r=wr.now(),In=(_r-u.timeAdded)/io,no=fr?(_r-fr.timeAdded)/io:-1,oo=Ar.getSource(),so=Kr.coveringZoomLevel({tileSize:oo.tileSize,roundZoom:oo.roundZoom}),ao=!fr||Math.abs(fr.tileID.overscaledZ-so)>Math.abs(u.tileID.overscaledZ-so),co=ao&&u.refreshedUponExpiration?1:Xe.ac(ao?In:1-no,0,1);return u.refreshedUponExpiration&&In>=1&&(u.refreshedUponExpiration=!1),fr?{opacity:1,mix:1-co}:{opacity:co,mix:0}}return{opacity:1,mix:0}}const Wl=new Xe.aM(1,0,0,1),Tl=new Xe.aM(0,1,0,1),Jl=new Xe.aM(0,0,1,1),Kl=new Xe.aM(1,0,1,1),Ll=new Xe.aM(0,1,1,1);function ra(u,Xe,fr,Ar){la(u,0,Xe+fr/2,u.transform.width,fr,Ar)}function na(u,Xe,fr,Ar){la(u,Xe-fr/2,0,fr,u.transform.height,Ar)}function la(u,Xe,fr,Ar,_r,wr){const Kr=u.context,In=Kr.gl;In.enable(In.SCISSOR_TEST),In.scissor(Xe*u.pixelRatio,fr*u.pixelRatio,Ar*u.pixelRatio,_r*u.pixelRatio),Kr.clear({color:wr}),In.disable(In.SCISSOR_TEST)}function ha(u,fr,Ar){const _r=u.context,wr=_r.gl,Kr=Ar.posMatrix,In=u.useProgram("debug"),io=Fi.disabled,no=Oi.disabled,oo=u.colorModeForRenderPass(),so="$debug",ao=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Ar);_r.activeTexture.set(wr.TEXTURE0);const co=fr.getTileByID(Ar.key).latestRawTileData,go=Math.floor((co&&co.byteLength||0)/1024),ho=fr.getTile(Ar).tileSize,Co=512/Math.min(ho,512)*(Ar.overscaledZ/u.transform.zoom)*.5;let Io=Ar.canonical.toString();Ar.overscaledZ!==Ar.canonical.z&&(Io+=` => ${Ar.overscaledZ}`),function(u,Xe){u.initDebugOverlayCanvas();const fr=u.debugOverlayCanvas,Ar=u.context.gl,_r=u.debugOverlayCanvas.getContext("2d");_r.clearRect(0,0,fr.width,fr.height),_r.shadowColor="white",_r.shadowBlur=2,_r.lineWidth=1.5,_r.strokeStyle="white",_r.textBaseline="top",_r.font="bold 36px Open Sans, sans-serif",_r.fillText(Xe,5,5),_r.strokeText(Xe,5,5),u.debugOverlayTexture.update(fr),u.debugOverlayTexture.bind(Ar.LINEAR,Ar.CLAMP_TO_EDGE)}(u,`${Io} ${go}kB`),In.draw(_r,wr.TRIANGLES,io,no,ki.alphaBlended,Ni.disabled,Se(Kr,Xe.aM.transparent,Co),null,so,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),In.draw(_r,wr.LINE_STRIP,io,no,oo,Ni.disabled,Se(Kr,Xe.aM.red),ao,so,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function ca(u,Xe,fr){const Ar=u.context,_r=Ar.gl,wr=u.colorModeForRenderPass(),Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D),In=u.useProgram("terrain"),io=Xe.getTerrainMesh();Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height]);for(const no of fr){const fr=u.renderToTexture.getTexture(no),oo=Xe.getTerrainData(no.tileID);Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,fr.texture);const so=u.transform.calculatePosMatrix(no.tileID.toUnwrapped()),ao=Xe.getMeshFrameDelta(u.transform.zoom),co=u.transform.calculateFogMatrix(no.tileID.toUnwrapped()),go=fe(so,ao,co,u.style.sky,u.transform.pitch);In.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,go,oo,"terrain",io.vertexBuffer,io.indexBuffer,io.segments)}}class ua{constructor(u,Xe,fr){this.vertexBuffer=u,this.indexBuffer=Xe,this.segments=fr}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class da{constructor(u,fr){this.context=new Li(u),this.transform=fr,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:Xe.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ut.maxUnderzooming+ut.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new le}resize(u,Xe,fr){if(this.width=Math.floor(u*fr),this.height=Math.floor(Xe*fr),this.pixelRatio=fr,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const u=this.context,fr=new Xe.aW;fr.emplaceBack(0,0),fr.emplaceBack(Xe.X,0),fr.emplaceBack(0,Xe.X),fr.emplaceBack(Xe.X,Xe.X),this.tileExtentBuffer=u.createVertexBuffer(fr,_l.members),this.tileExtentSegments=Xe.a0.simpleSegment(0,0,4,2);const Ar=new Xe.aW;Ar.emplaceBack(0,0),Ar.emplaceBack(Xe.X,0),Ar.emplaceBack(0,Xe.X),Ar.emplaceBack(Xe.X,Xe.X),this.debugBuffer=u.createVertexBuffer(Ar,_l.members),this.debugSegments=Xe.a0.simpleSegment(0,0,4,5);const _r=new Xe.$;_r.emplaceBack(0,0,0,0),_r.emplaceBack(Xe.X,0,Xe.X,0),_r.emplaceBack(0,Xe.X,0,Xe.X),_r.emplaceBack(Xe.X,Xe.X,Xe.X,Xe.X),this.rasterBoundsBuffer=u.createVertexBuffer(_r,Po.members),this.rasterBoundsSegments=Xe.a0.simpleSegment(0,0,4,2);const wr=new Xe.aW;wr.emplaceBack(0,0),wr.emplaceBack(1,0),wr.emplaceBack(0,1),wr.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(wr,_l.members),this.viewportSegments=Xe.a0.simpleSegment(0,0,4,2);const Kr=new Xe.aY;Kr.emplaceBack(0),Kr.emplaceBack(1),Kr.emplaceBack(3),Kr.emplaceBack(2),Kr.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(Kr);const In=new Xe.aX;In.emplaceBack(0,1,2),In.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(In);const io=this.context.gl;this.stencilClearMode=new Oi({func:io.ALWAYS,mask:0},0,255,io.ZERO,io.ZERO,io.ZERO)}clearStencil(){const u=this.context,fr=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const Ar=Xe.H();Xe.aP(Ar,0,this.width,this.height,0,0,1),Xe.K(Ar,Ar,[fr.drawingBufferWidth,fr.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,fr.TRIANGLES,Fi.disabled,this.stencilClearMode,ki.disabled,Ni.disabled,ze(Ar),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,Xe){if(this.currentStencilSource===u.source||!u.isTileClipped()||!Xe||!Xe.length)return;this.currentStencilSource=u.source;const fr=this.context,Ar=fr.gl;this.nextStencilID+Xe.length>256&&this.clearStencil(),fr.setColorMode(ki.disabled),fr.setDepthMode(Fi.disabled);const _r=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const u of Xe){const Xe=this._tileClippingMaskIDs[u.key]=this.nextStencilID++,wr=this.style.map.terrain&&this.style.map.terrain.getTerrainData(u);_r.draw(fr,Ar.TRIANGLES,Fi.disabled,new Oi({func:Ar.ALWAYS,mask:0},Xe,255,Ar.KEEP,Ar.KEEP,Ar.REPLACE),ki.disabled,Ni.disabled,ze(u.posMatrix),wr,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,Xe=this.context.gl;return new Oi({func:Xe.NOTEQUAL,mask:255},u,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilModeForClipping(u){const Xe=this.context.gl;return new Oi({func:Xe.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilConfigForOverlap(u){const Xe=this.context.gl,fr=u.sort(((u,Xe)=>Xe.overscaledZ-u.overscaledZ)),Ar=fr[fr.length-1].overscaledZ,_r=fr[0].overscaledZ-Ar+1;if(_r>1){this.currentStencilSource=void 0,this.nextStencilID+_r>256&&this.clearStencil();const u={};for(let fr=0;fr<_r;fr++)u[fr+Ar]=new Oi({func:Xe.GEQUAL,mask:255},fr+this.nextStencilID,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE);return this.nextStencilID+=_r,[u,fr]}return[{[Ar]:Oi.disabled},fr]}colorModeForRenderPass(){const u=this.context.gl;if(this._showOverdrawInspector){const fr=1/8;return new ki([u.CONSTANT_COLOR,u.ONE],new Xe.aM(fr,fr,fr,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?ki.unblended:ki.alphaBlended}depthModeForSublayer(u,Xe,fr){if(!this.opaquePassEnabledForLayer())return Fi.disabled;const Ar=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Fi(fr||this.context.gl.LEQUAL,Xe,[Ar,Ar])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,fr){this.style=u,this.options=fr,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(wr.now()),this.imageManager.beginFrame();const Ar=this.style._order,_r=this.style.sourceCaches,Kr={},In={},io={};for(const u in _r){const Xe=_r[u];Xe.used&&Xe.prepare(this.context),Kr[u]=Xe.getVisibleCoordinates(),In[u]=Kr[u].slice().reverse(),io[u]=Xe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let u=0;u<Ar.length;u++)if(this.style._layers[Ar[u]].is3D()){this.opaquePassCutoff=u;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const u of Ar){const Xe=this.style._layers[u];if(!Xe.hasOffscreenPass()||Xe.isHidden(this.transform.zoom))continue;const fr=In[Xe.source];("custom"===Xe.type||fr.length)&&this.renderLayer(this,_r[Xe.source],Xe,fr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:fr.showOverdrawInspector?Xe.aM.black:Xe.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(u,fr){const Ar=u.context,_r=Ar.gl,wr=((u,Xe,fr)=>({u_sky_color:u.properties.get("sky-color"),u_horizon_color:u.properties.get("horizon-color"),u_horizon:(Xe.height/2+Xe.getHorizon())*fr,u_sky_horizon_blend:u.properties.get("sky-horizon-blend")*Xe.height/2*fr}))(fr,u.style.map.transform,u.pixelRatio),Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=Oi.disabled,io=u.colorModeForRenderPass(),no=u.useProgram("sky");if(!fr.mesh){const u=new Xe.aW;u.emplaceBack(-1,-1),u.emplaceBack(1,-1),u.emplaceBack(1,1),u.emplaceBack(-1,1);const _r=new Xe.aX;_r.emplaceBack(0,1,2),_r.emplaceBack(0,2,3),fr.mesh=new ua(Ar.createVertexBuffer(u,_l.members),Ar.createIndexBuffer(_r),Xe.a0.simpleSegment(0,0,u.length,_r.length))}no.draw(Ar,_r.TRIANGLES,Kr,In,io,Ni.disabled,wr,void 0,"sky",fr.mesh.vertexBuffer,fr.mesh.indexBuffer,fr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=fr.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Ar.length-1;this.currentLayer>=0;this.currentLayer--){const u=this.style._layers[Ar[this.currentLayer]],Xe=_r[u.source],fr=Kr[u.source];this._renderTileClippingMasks(u,fr),this.renderLayer(this,Xe,u,fr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Ar.length;this.currentLayer++){const u=this.style._layers[Ar[this.currentLayer]],Xe=_r[u.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(u))continue;const fr=("symbol"===u.type?io:In)[u.source];this._renderTileClippingMasks(u,Kr[u.source]),this.renderLayer(this,Xe,u,fr)}if(this.options.showTileBoundaries){const u=function(u,Xe){let fr=null;const Ar=Object.values(u._layers).flatMap((fr=>fr.source&&!fr.isHidden(Xe)?[u.sourceCaches[fr.source]]:[])),_r=Ar.filter((u=>"vector"===u.getSource().type)),wr=Ar.filter((u=>"vector"!==u.getSource().type)),r=u=>{(!fr||fr.getSource().maxzoom<u.getSource().maxzoom)&&(fr=u)};return _r.forEach((u=>r(u))),fr||wr.forEach((u=>r(u))),fr}(this.style,this.transform.zoom);u&&function(u,Xe,fr){for(let Ar=0;Ar<fr.length;Ar++)ha(u,Xe,fr[Ar])}(this,u,u.getVisibleCoordinates())}this.options.showPadding&&function(u){const Xe=u.transform.padding;ra(u,u.transform.height-(Xe.top||0),3,Wl),ra(u,Xe.bottom||0,3,Tl),na(u,Xe.left||0,3,Jl),na(u,u.transform.width-(Xe.right||0),3,Kl);const fr=u.transform.centerPoint;!function(u,Xe,fr,Ar){la(u,Xe-1,fr-10,2,20,Ar),la(u,Xe-10,fr-1,20,2,Ar)}(u,fr.x,u.transform.height-fr.y,Ll)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const fr=this.terrainFacilitator.matrix,Ar=this.transform.modelViewProjectionMatrix;let _r=this.terrainFacilitator.dirty;_r||(_r=u?!Xe.aZ(fr,Ar):!Xe.a_(fr,Ar)),_r||(_r=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),_r&&(Xe.a$(fr,Ar),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(u,fr){const Ar=u.context,_r=Ar.gl,wr=ki.unblended,Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=fr.getTerrainMesh(),io=fr.sourceCache.getRenderableTiles(),no=u.useProgram("terrainDepth");Ar.bindFramebuffer.set(fr.getFramebuffer("depth").framebuffer),Ar.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),Ar.clear({color:Xe.aM.transparent,depth:1});for(const Xe of io){const io=fr.getTerrainData(Xe.tileID),oo={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_ele_delta:fr.getMeshFrameDelta(u.transform.zoom)};no.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,oo,io,"terrain",In.vertexBuffer,In.indexBuffer,In.segments)}Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain),function(u,fr){const Ar=u.context,_r=Ar.gl,wr=ki.unblended,Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=fr.getTerrainMesh(),io=fr.getCoordsTexture(),no=fr.sourceCache.getRenderableTiles(),oo=u.useProgram("terrainCoords");Ar.bindFramebuffer.set(fr.getFramebuffer("coords").framebuffer),Ar.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),Ar.clear({color:Xe.aM.transparent,depth:1}),fr.coordsIndex=[];for(const Xe of no){const no=fr.getTerrainData(Xe.tileID);Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,io.texture);const so={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-fr.coordsIndex.length)/255,u_texture:0,u_ele_delta:fr.getMeshFrameDelta(u.transform.zoom)};oo.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,so,no,"terrain",In.vertexBuffer,In.indexBuffer,In.segments),fr.coordsIndex.push(Xe.tileID.key)}Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain))}renderLayer(u,fr,Ar,_r){if(!Ar.isHidden(this.transform.zoom)&&("background"===Ar.type||"custom"===Ar.type||(_r||[]).length))switch(this.id=Ar.id,Ar.type){case"symbol":!function(u,fr,Ar,_r,wr){if("translucent"!==u.renderPass)return;const Kr=Oi.disabled,In=u.colorModeForRenderPass();(Ar._unevaluatedLayout.hasValue("text-variable-anchor")||Ar._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(u,fr,Ar,_r,wr,Kr,In,io,no){const oo=fr.transform,so=ee(),ao="map"===wr,co="map"===Kr;for(const wr of u){const u=_r.getTile(wr),Kr=u.getBucket(Ar);if(!Kr||!Kr.text||!Kr.text.segments.get().length)continue;const go=Xe.ag(Kr.textSizeData,oo.zoom),ho=Ft(u,1,fr.transform.zoom),Co=gt(wr.posMatrix,co,ao,fr.transform,ho),Io="none"!==Ar.layout.get("icon-text-fit")&&Kr.hasIconData();if(go){const Xe=Math.pow(2,oo.zoom-u.tileID.overscaledZ),Ar=fr.style.map.terrain?(u,Xe)=>fr.style.map.terrain.getElevation(wr,u,Xe):null,_r=so.translatePosition(oo,u,In,io);Gi(Kr,ao,co,no,oo,Co,wr.posMatrix,Xe,go,Io,so,_r,wr.toUnwrapped(),Ar)}}}(_r,u,Ar,fr,Ar.layout.get("text-rotation-alignment"),Ar.layout.get("text-pitch-alignment"),Ar.paint.get("text-translate"),Ar.paint.get("text-translate-anchor"),wr),0!==Ar.paint.get("icon-opacity").constantOr(1)&&Wi(u,fr,Ar,_r,!1,Ar.paint.get("icon-translate"),Ar.paint.get("icon-translate-anchor"),Ar.layout.get("icon-rotation-alignment"),Ar.layout.get("icon-pitch-alignment"),Ar.layout.get("icon-keep-upright"),Kr,In),0!==Ar.paint.get("text-opacity").constantOr(1)&&Wi(u,fr,Ar,_r,!0,Ar.paint.get("text-translate"),Ar.paint.get("text-translate-anchor"),Ar.layout.get("text-rotation-alignment"),Ar.layout.get("text-pitch-alignment"),Ar.layout.get("text-keep-upright"),Kr,In),fr.map.showCollisionBoxes&&(Ui(u,fr,Ar,_r,!0),Ui(u,fr,Ar,_r,!1))}(u,fr,Ar,_r,this.style.placement.variableOffsets);break;case"circle":!function(u,fr,Ar,_r){if("translucent"!==u.renderPass)return;const wr=Ar.paint.get("circle-opacity"),Kr=Ar.paint.get("circle-stroke-width"),In=Ar.paint.get("circle-stroke-opacity"),io=!Ar.layout.get("circle-sort-key").isConstant();if(0===wr.constantOr(1)&&(0===Kr.constantOr(1)||0===In.constantOr(1)))return;const no=u.context,oo=no.gl,so=u.depthModeForSublayer(0,Fi.ReadOnly),ao=Oi.disabled,co=u.colorModeForRenderPass(),go=[];for(let wr=0;wr<_r.length;wr++){const Kr=_r[wr],In=fr.getTile(Kr),no=In.getBucket(Ar);if(!no)continue;const oo=no.programConfigurations.get(Ar.id),so=u.useProgram("circle",oo),ao=no.layoutVertexBuffer,co=no.indexBuffer,ho=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Kr),Co={programConfiguration:oo,program:so,layoutVertexBuffer:ao,indexBuffer:co,uniformValues:Pe(u,Kr,In,Ar),terrainData:ho};if(io){const u=no.segments.get();for(const fr of u)go.push({segments:new Xe.a0([fr]),sortKey:fr.sortKey,state:Co})}else go.push({segments:no.segments,sortKey:0,state:Co})}io&&go.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of go){const{programConfiguration:fr,program:_r,layoutVertexBuffer:wr,indexBuffer:Kr,uniformValues:In,terrainData:io}=Xe.state;_r.draw(no,oo.TRIANGLES,so,ao,co,Ni.disabled,In,io,Ar.id,wr,Kr,Xe.segments,Ar.paint,u.transform.zoom,fr)}}(u,fr,Ar,_r);break;case"heatmap":!function(u,fr,Ar,_r){if(0!==Ar.paint.get("heatmap-opacity"))if("offscreen"===u.renderPass){const wr=u.context,Kr=wr.gl,In=Oi.disabled,io=new ki([Kr.ONE,Kr.ONE],Xe.aM.transparent,[!0,!0,!0,!0]);!function(u,Xe,fr){const Ar=u.gl;u.activeTexture.set(Ar.TEXTURE1),u.viewport.set([0,0,Xe.width/4,Xe.height/4]);let _r=fr.heatmapFbo;if(_r)Ar.bindTexture(Ar.TEXTURE_2D,_r.colorAttachment.get()),u.bindFramebuffer.set(_r.framebuffer);else{const wr=Ar.createTexture();Ar.bindTexture(Ar.TEXTURE_2D,wr),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_WRAP_S,Ar.CLAMP_TO_EDGE),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_WRAP_T,Ar.CLAMP_TO_EDGE),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_MIN_FILTER,Ar.LINEAR),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_MAG_FILTER,Ar.LINEAR),_r=fr.heatmapFbo=u.createFramebuffer(Xe.width/4,Xe.height/4,!1,!1),function(u,Xe,fr,Ar){var _r,wr;const Kr=u.gl,In=null!==(_r=u.HALF_FLOAT)&&void 0!==_r?_r:Kr.UNSIGNED_BYTE,io=null!==(wr=u.RGBA16F)&&void 0!==wr?wr:Kr.RGBA;Kr.texImage2D(Kr.TEXTURE_2D,0,io,Xe.width/4,Xe.height/4,0,Kr.RGBA,In,null),Ar.colorAttachment.set(fr)}(u,Xe,wr,_r)}}(wr,u,Ar),wr.clear({color:Xe.aM.transparent});for(let Xe=0;Xe<_r.length;Xe++){const no=_r[Xe];if(fr.hasRenderableParent(no))continue;const oo=fr.getTile(no),so=oo.getBucket(Ar);if(!so)continue;const ao=so.programConfigurations.get(Ar.id),co=u.useProgram("heatmap",ao),{zoom:go}=u.transform;co.draw(wr,Kr.TRIANGLES,Fi.disabled,In,io,Ni.disabled,De(no.posMatrix,oo,go,Ar.paint.get("heatmap-intensity")),null,Ar.id,so.layoutVertexBuffer,so.indexBuffer,so.segments,Ar.paint,u.transform.zoom,ao)}wr.viewport.set([0,0,u.width,u.height])}else"translucent"===u.renderPass&&(u.context.setColorMode(u.colorModeForRenderPass()),function(u,fr){const Ar=u.context,_r=Ar.gl,wr=fr.heatmapFbo;if(!wr)return;Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,wr.colorAttachment.get()),Ar.activeTexture.set(_r.TEXTURE1);let Kr=fr.colorRampTexture;Kr||(Kr=fr.colorRampTexture=new b(Ar,fr.colorRamp,_r.RGBA)),Kr.bind(_r.LINEAR,_r.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(Ar,_r.TRIANGLES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,((u,fr)=>{const Ar=Xe.H();Xe.aP(Ar,0,u.width,u.height,0,0,1);const _r=u.context.gl;return{u_matrix:Ar,u_world:[_r.drawingBufferWidth,_r.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:fr.paint.get("heatmap-opacity")}})(u,fr),null,fr.id,u.viewportBuffer,u.quadTriangleIndexBuffer,u.viewportSegments,fr.paint,u.transform.zoom)}(u,Ar))}(u,fr,Ar,_r);break;case"line":!function(u,fr,Ar,_r){if("translucent"!==u.renderPass)return;const wr=Ar.paint.get("line-opacity"),Kr=Ar.paint.get("line-width");if(0===wr.constantOr(1)||0===Kr.constantOr(1))return;const In=u.depthModeForSublayer(0,Fi.ReadOnly),io=u.colorModeForRenderPass(),no=Ar.paint.get("line-dasharray"),oo=Ar.paint.get("line-pattern"),so=oo.constantOr(1),ao=Ar.paint.get("line-gradient"),co=Ar.getCrossfadeParameters(),go=so?"linePattern":no?"lineSDF":ao?"lineGradient":"line",ho=u.context,Co=ho.gl;let Io=!0;for(const wr of _r){const _r=fr.getTile(wr);if(so&&!_r.patternsLoaded())continue;const Kr=_r.getBucket(Ar);if(!Kr)continue;const xo=Kr.programConfigurations.get(Ar.id),Mo=u.context.program.get(),Po=u.useProgram(go,xo),ss=Io||Po.program!==Mo,sa=u.style.map.terrain&&u.style.map.terrain.getTerrainData(wr),aa=oo.constantOr(null);if(aa&&_r.imageAtlas){const u=_r.imageAtlas,Xe=u.patternPositions[aa.to.toString()],fr=u.patternPositions[aa.from.toString()];Xe&&fr&&xo.setConstantPatternPositions(Xe,fr)}const fa=sa?wr:null,ya=so?ke(u,_r,Ar,co,fa):no?Le(u,_r,Ar,no,co,fa):ao?Re(u,_r,Ar,Kr.lineClipsArray.length,fa):Ae(u,_r,Ar,fa);if(so)ho.activeTexture.set(Co.TEXTURE0),_r.imageAtlasTexture.bind(Co.LINEAR,Co.CLAMP_TO_EDGE),xo.updatePaintBuffers(co);else if(no&&(ss||u.lineAtlas.dirty))ho.activeTexture.set(Co.TEXTURE0),u.lineAtlas.bind(ho);else if(ao){const _r=Kr.gradients[Ar.id];let In=_r.texture;if(Ar.gradientVersion!==_r.version){let io=256;if(Ar.stepInterpolant){const Ar=fr.getSource().maxzoom,_r=wr.canonical.z===Ar?Math.ceil(1<<u.transform.maxZoom-wr.canonical.z):1;io=Xe.ac(Xe.aU(Kr.maxLineLength/Xe.X*1024*_r),256,ho.maxTextureSize)}_r.gradient=Xe.aV({expression:Ar.gradientExpression(),evaluationKey:"lineProgress",resolution:io,image:_r.gradient||void 0,clips:Kr.lineClipsArray}),_r.texture?_r.texture.update(_r.gradient):_r.texture=new b(ho,_r.gradient,Co.RGBA),_r.version=Ar.gradientVersion,In=_r.texture}ho.activeTexture.set(Co.TEXTURE0),In.bind(Ar.stepInterpolant?Co.NEAREST:Co.LINEAR,Co.CLAMP_TO_EDGE)}Po.draw(ho,Co.TRIANGLES,In,u.stencilModeForClipping(wr),io,Ni.disabled,ya,sa,Ar.id,Kr.layoutVertexBuffer,Kr.indexBuffer,Kr.segments,Ar.paint,u.transform.zoom,xo,Kr.layoutVertexBuffer2),Io=!1}}(u,fr,Ar,_r);break;case"fill":!function(u,fr,Ar,_r){const wr=Ar.paint.get("fill-color"),Kr=Ar.paint.get("fill-opacity");if(0===Kr.constantOr(1))return;const In=u.colorModeForRenderPass(),io=Ar.paint.get("fill-pattern"),no=u.opaquePassEnabledForLayer()&&!io.constantOr(1)&&1===wr.constantOr(Xe.aM.transparent).a&&1===Kr.constantOr(0)?"opaque":"translucent";if(u.renderPass===no){const Xe=u.depthModeForSublayer(1,"opaque"===u.renderPass?Fi.ReadWrite:Fi.ReadOnly);Ki(u,fr,Ar,_r,Xe,In,!1)}if("translucent"===u.renderPass&&Ar.paint.get("fill-antialias")){const Xe=u.depthModeForSublayer(Ar.getPaintProperty("fill-outline-color")?2:0,Fi.ReadOnly);Ki(u,fr,Ar,_r,Xe,In,!0)}}(u,fr,Ar,_r);break;case"fill-extrusion":!function(u,Xe,fr,Ar){const _r=fr.paint.get("fill-extrusion-opacity");if(0!==_r&&"translucent"===u.renderPass){const wr=new Fi(u.context.gl.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D);if(1!==_r||fr.paint.get("fill-extrusion-pattern").constantOr(1))Ji(u,Xe,fr,Ar,wr,Oi.disabled,ki.disabled),Ji(u,Xe,fr,Ar,wr,u.stencilModeFor3D(),u.colorModeForRenderPass());else{const _r=u.colorModeForRenderPass();Ji(u,Xe,fr,Ar,wr,Oi.disabled,_r)}}}(u,fr,Ar,_r);break;case"hillshade":!function(u,Xe,fr,Ar){if("offscreen"!==u.renderPass&&"translucent"!==u.renderPass)return;const _r=u.context,wr=u.depthModeForSublayer(0,Fi.ReadOnly),Kr=u.colorModeForRenderPass(),[In,io]="translucent"===u.renderPass?u.stencilConfigForOverlap(Ar):[{},Ar];for(const Ar of io){const _r=Xe.getTile(Ar);void 0!==_r.needsHillshadePrepare&&_r.needsHillshadePrepare&&"offscreen"===u.renderPass?Qi(u,_r,fr,wr,Oi.disabled,Kr):"translucent"===u.renderPass&&Yi(u,Ar,_r,fr,wr,In[Ar.overscaledZ],Kr)}_r.viewport.set([0,0,u.width,u.height])}(u,fr,Ar,_r);break;case"raster":!function(u,Xe,fr,Ar){if("translucent"!==u.renderPass)return;if(0===fr.paint.get("raster-opacity"))return;if(!Ar.length)return;const _r=u.context,wr=_r.gl,Kr=Xe.getSource(),In=u.useProgram("raster"),io=u.colorModeForRenderPass(),[no,oo]=Kr instanceof Q?[{},Ar]:u.stencilConfigForOverlap(Ar),so=oo[oo.length-1].overscaledZ,ao=!u.options.moving;for(const Ar of oo){const oo=u.depthModeForSublayer(Ar.overscaledZ-so,1===fr.paint.get("raster-opacity")?Fi.ReadWrite:Fi.ReadOnly,wr.LESS),co=Xe.getTile(Ar);co.registerFadeDuration(fr.paint.get("raster-fade-duration"));const go=Xe.findLoadedParent(Ar,0),ho=Xe.findLoadedSibling(Ar),Co=ta(co,go||ho||null,Xe,fr,u.transform,u.style.map.terrain);let Io,xo;const Mo="nearest"===fr.paint.get("raster-resampling")?wr.NEAREST:wr.LINEAR;_r.activeTexture.set(wr.TEXTURE0),co.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),_r.activeTexture.set(wr.TEXTURE1),go?(go.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),Io=Math.pow(2,go.tileID.overscaledZ-co.tileID.overscaledZ),xo=[co.tileID.canonical.x*Io%1,co.tileID.canonical.y*Io%1]):co.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),co.texture.useMipmap&&_r.extTextureFilterAnisotropic&&u.transform.pitch>20&&wr.texParameterf(wr.TEXTURE_2D,_r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,_r.extTextureFilterAnisotropicMax);const Po=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Ar),ss=Po?Ar:null,sa=ss?ss.posMatrix:u.transform.calculatePosMatrix(Ar.toUnwrapped(),ao),aa=Oe(sa,xo||[0,0],Io||1,Co,fr);Kr instanceof Q?In.draw(_r,wr.TRIANGLES,oo,Oi.disabled,io,Ni.disabled,aa,Po,fr.id,Kr.boundsBuffer,u.quadTriangleIndexBuffer,Kr.boundsSegments):In.draw(_r,wr.TRIANGLES,oo,no[Ar.overscaledZ],io,Ni.disabled,aa,Po,fr.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}}(u,fr,Ar,_r);break;case"background":!function(u,Xe,fr,Ar){const _r=fr.paint.get("background-color"),wr=fr.paint.get("background-opacity");if(0===wr)return;const Kr=u.context,In=Kr.gl,io=u.transform,no=io.tileSize,oo=fr.paint.get("background-pattern");if(u.isPatternMissing(oo))return;const so=!oo&&1===_r.a&&1===wr&&u.opaquePassEnabledForLayer()?"opaque":"translucent";if(u.renderPass!==so)return;const ao=Oi.disabled,co=u.depthModeForSublayer(0,"opaque"===so?Fi.ReadWrite:Fi.ReadOnly),go=u.colorModeForRenderPass(),ho=u.useProgram(oo?"backgroundPattern":"background"),Co=Ar||io.coveringTiles({tileSize:no,terrain:u.style.map.terrain});oo&&(Kr.activeTexture.set(In.TEXTURE0),u.imageManager.bind(u.context));const Io=fr.getCrossfadeParameters();for(const Xe of Co){const io=Ar?Xe.posMatrix:u.transform.calculatePosMatrix(Xe.toUnwrapped()),so=oo?Ve(io,wr,u,oo,{tileID:Xe,tileSize:no},Io):qe(io,wr,_r),Co=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);ho.draw(Kr,In.TRIANGLES,co,ao,go,Ni.disabled,so,Co,fr.id,u.tileExtentBuffer,u.quadTriangleIndexBuffer,u.tileExtentSegments)}}(u,0,Ar,_r);break;case"custom":!function(u,Xe,fr){const Ar=u.context,_r=fr.implementation;if("offscreen"===u.renderPass){const Xe=_r.prerender;Xe&&(u.setCustomLayerDefaults(),Ar.setColorMode(u.colorModeForRenderPass()),Xe.call(_r,Ar.gl,u.transform.customLayerMatrix()),Ar.setDirty(),u.setBaseState())}else if("translucent"===u.renderPass){u.setCustomLayerDefaults(),Ar.setColorMode(u.colorModeForRenderPass()),Ar.setStencilMode(Oi.disabled);const Xe="3d"===_r.renderingMode?new Fi(u.context.gl.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D):u.depthModeForSublayer(0,Fi.ReadOnly);Ar.setDepthMode(Xe),_r.render(Ar.gl,u.transform.customLayerMatrix(),{farZ:u.transform.farZ,nearZ:u.transform.nearZ,fov:u.transform._fov,modelViewProjectionMatrix:u.transform.modelViewProjectionMatrix,projectionMatrix:u.transform.projectionMatrix}),Ar.setDirty(),u.setBaseState(),Ar.bindFramebuffer.set(null)}}(u,0,Ar)}}translatePosMatrix(u,fr,Ar,_r,wr){if(!Ar[0]&&!Ar[1])return u;const Kr=wr?"map"===_r?this.transform.angle:0:"viewport"===_r?-this.transform.angle:0;if(Kr){const u=Math.sin(Kr),Xe=Math.cos(Kr);Ar=[Ar[0]*Xe-Ar[1]*u,Ar[0]*u+Ar[1]*Xe]}const In=[wr?Ar[0]:Ft(fr,Ar[0],this.transform.zoom),wr?Ar[1]:Ft(fr,Ar[1],this.transform.zoom),0],io=new Float32Array(16);return Xe.J(io,u,In),io}saveTileTexture(u){const Xe=this._tileTextures[u.size[0]];Xe?Xe.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const Xe=this._tileTextures[u];return Xe&&Xe.length>0?Xe.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const Xe=this.imageManager.getPattern(u.from.toString()),fr=this.imageManager.getPattern(u.to.toString());return!Xe||!fr}useProgram(u,Xe){this.cache=this.cache||{};const fr=u+(Xe?Xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[fr]||(this.cache[fr]=new ve(this.context,vl[u],Xe,xl[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[fr]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new b(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:Xe}=this.context.gl;return this.width!==u||this.height!==Xe}}class _a{constructor(u,Xe){this.points=u,this.planes=Xe}static fromInvProjectionMatrix(u,fr,Ar){const _r=Math.pow(2,Ar),wr=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((Ar=>{const wr=1/(Ar=Xe.af([],Ar,u))[3]/fr*_r;return Xe.b0(Ar,Ar,[wr,wr,1/Ar[3],wr])})),Kr=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((u=>{const Xe=function(u,Xe){var fr=Xe[0],Ar=Xe[1],_r=Xe[2],wr=fr*fr+Ar*Ar+_r*_r;return wr>0&&(wr=1/Math.sqrt(wr)),u[0]=Xe[0]*wr,u[1]=Xe[1]*wr,u[2]=Xe[2]*wr,u}([],function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=fr[0],In=fr[1],io=fr[2];return u[0]=_r*io-wr*In,u[1]=wr*Kr-Ar*io,u[2]=Ar*In-_r*Kr,u}([],g([],wr[u[0]],wr[u[1]]),g([],wr[u[2]],wr[u[1]]))),fr=-((Ar=Xe)[0]*(_r=wr[u[1]])[0]+Ar[1]*_r[1]+Ar[2]*_r[2]);var Ar,_r;return Xe.concat(fr)}));return new _a(wr,Kr)}}class pa{constructor(u,Xe){this.min=u,this.max=Xe,this.center=function(u,Xe){return u[0]=.5*Xe[0],u[1]=.5*Xe[1],u[2]=.5*Xe[2],u}([],function(u,Xe,fr){return u[0]=Xe[0]+fr[0],u[1]=Xe[1]+fr[1],u[2]=Xe[2]+fr[2],u}([],this.min,this.max))}quadrant(u){const Xe=[u%2==0,u<2],fr=m(this.min),Ar=m(this.max);for(let u=0;u<Xe.length;u++)fr[u]=Xe[u]?this.min[u]:this.center[u],Ar[u]=Xe[u]?this.center[u]:this.max[u];return Ar[2]=this.max[2],new pa(fr,Ar)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const fr=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let Ar=!0;for(let _r=0;_r<u.planes.length;_r++){const wr=u.planes[_r];let Kr=0;for(let u=0;u<fr.length;u++)Xe.b1(wr,fr[u])>=0&&Kr++;if(0===Kr)return 0;Kr!==fr.length&&(Ar=!1)}if(Ar)return 2;for(let Xe=0;Xe<3;Xe++){let fr=Number.MAX_VALUE,Ar=-Number.MAX_VALUE;for(let _r=0;_r<u.points.length;_r++){const wr=u.points[_r][Xe]-this.min[Xe];fr=Math.min(fr,wr),Ar=Math.max(Ar,wr)}if(Ar<0||fr>this.max[Xe]-this.min[Xe])return 0}return 1}}class ma{constructor(u=0,Xe=0,fr=0,Ar=0){if(isNaN(u)||u<0||isNaN(Xe)||Xe<0||isNaN(fr)||fr<0||isNaN(Ar)||Ar<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=Xe,this.left=fr,this.right=Ar}interpolate(u,fr,Ar){return null!=fr.top&&null!=u.top&&(this.top=Xe.y.number(u.top,fr.top,Ar)),null!=fr.bottom&&null!=u.bottom&&(this.bottom=Xe.y.number(u.bottom,fr.bottom,Ar)),null!=fr.left&&null!=u.left&&(this.left=Xe.y.number(u.left,fr.left,Ar)),null!=fr.right&&null!=u.right&&(this.right=Xe.y.number(u.right,fr.right,Ar)),this}getCenter(u,fr){const Ar=Xe.ac((this.left+u-this.right)/2,0,u),_r=Xe.ac((this.top+fr-this.bottom)/2,0,fr);return new Xe.P(Ar,_r)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new ma(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Dl=85.051129;class ga{constructor(u,fr,Ar,_r,wr){this.tileSize=512,this._renderWorldCopies=void 0===wr||!!wr,this._minZoom=u||0,this._maxZoom=fr||22,this._minPitch=null==Ar?0:Ar,this._maxPitch=null==_r?60:_r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new Xe.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ma,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new ga(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){void 0===u?u=!0:null===u&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new Xe.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const fr=-Xe.b2(u,-180,180)*Math.PI/180;this.angle!==fr&&(this._unmodified=!1,this.angle=fr,this._calcMatrices(),this.rotationMatrix=function(){var u=new Xe.A(4);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}(),function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3],In=Math.sin(fr),io=Math.cos(fr);u[0]=Ar*io+wr*In,u[1]=_r*io+Kr*In,u[2]=Ar*-In+wr*io,u[3]=_r*-In+Kr*io}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const fr=Xe.ac(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==fr&&(this._unmodified=!1,this._pitch=fr,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const Xe=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==Xe&&(this._unmodified=!1,this._zoom=Xe,this.tileZoom=Math.max(0,Math.floor(Xe)),this.scale=this.zoomScale(Xe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,Xe,fr){this._unmodified=!1,this._edgeInsets.interpolate(u,Xe,fr),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const Xe=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,Xe)}getVisibleUnwrappedCoordinates(u){const fr=[new Xe.b3(0,u)];if(this._renderWorldCopies){const Ar=this.pointCoordinate(new Xe.P(0,0)),_r=this.pointCoordinate(new Xe.P(this.width,0)),wr=this.pointCoordinate(new Xe.P(this.width,this.height)),Kr=this.pointCoordinate(new Xe.P(0,this.height)),In=Math.floor(Math.min(Ar.x,_r.x,wr.x,Kr.x)),io=Math.floor(Math.max(Ar.x,_r.x,wr.x,Kr.x)),no=1;for(let Ar=In-no;Ar<=io+no;Ar++)0!==Ar&&fr.push(new Xe.b3(Ar,u))}return fr}coveringTiles(u){var fr,Ar;let _r=this.coveringZoomLevel(u);const wr=_r;if(void 0!==u.minzoom&&_r<u.minzoom)return[];void 0!==u.maxzoom&&_r>u.maxzoom&&(_r=u.maxzoom);const Kr=this.pointCoordinate(this.getCameraPoint()),In=Xe.Z.fromLngLat(this.center),io=Math.pow(2,_r),no=[io*Kr.x,io*Kr.y,0],oo=[io*In.x,io*In.y,0],so=_a.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,_r);let ao=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ao=_r);const co=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,p=u=>({aabb:new pa([u*io,0,0],[(u+1)*io,io,0]),zoom:0,x:0,y:0,wrap:u,fullyVisible:!1}),go=[],ho=[],Co=_r,Io=u.reparseOverscaled?wr:_r;if(this._renderWorldCopies)for(let u=1;u<=3;u++)go.push(p(-u)),go.push(p(u));for(go.push(p(0));go.length>0;){const _r=go.pop(),wr=_r.x,Kr=_r.y;let In=_r.fullyVisible;if(!In){const u=_r.aabb.intersects(so);if(0===u)continue;In=2===u}const io=u.terrain?no:oo,xo=_r.aabb.distanceX(io),Mo=_r.aabb.distanceY(io),Po=Math.max(Math.abs(xo),Math.abs(Mo));if(_r.zoom===Co||Po>co+(1<<Co-_r.zoom)-2&&_r.zoom>=ao){const u=Co-_r.zoom,fr=no[0]-.5-(wr<<u),Ar=no[1]-.5-(Kr<<u);ho.push({tileID:new Xe.S(_r.zoom===Co?Io:_r.zoom,_r.wrap,_r.zoom,wr,Kr),distanceSq:v([oo[0]-.5-wr,oo[1]-.5-Kr]),tileDistanceToCamera:Math.sqrt(fr*fr+Ar*Ar)})}else for(let io=0;io<4;io++){const no=(wr<<1)+io%2,oo=(Kr<<1)+(io>>1),so=_r.zoom+1;let ao=_r.aabb.quadrant(io);if(u.terrain){const wr=new Xe.S(so,_r.wrap,so,no,oo),Kr=u.terrain.getMinMaxElevation(wr),In=null!==(fr=Kr.minElevation)&&void 0!==fr?fr:this.elevation,io=null!==(Ar=Kr.maxElevation)&&void 0!==Ar?Ar:this.elevation;ao=new pa([ao.min[0],ao.min[1],In],[ao.max[0],ao.max[1],io])}go.push({aabb:ao,zoom:so,x:no,y:oo,wrap:_r.wrap,fullyVisible:In})}}return ho.sort(((u,Xe)=>u.distanceSq-Xe.distanceSq)).map((u=>u.tileID))}resize(u,Xe){this.width=u,this.height=Xe,this.pixelsToGLUnits=[2/u,-2/Xe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const fr=Xe.ac(u.lat,-85.051129,Dl);return new Xe.P(Xe.O(u.lng)*this.worldSize,Xe.Q(fr)*this.worldSize)}unproject(u){return new Xe.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const fr=this.elevation,Ar=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,_r=this.pointLocation(this.centerPoint,u),wr=u.getElevationForLngLatZoom(_r,this.tileZoom);if(!(this.elevation-wr))return;const Kr=Ar+fr-wr,In=Math.cos(this._pitch)*this.cameraToCenterDistance/Kr/Xe.b4(1,_r.lat),io=this.scaleZoom(In/this.tileSize);this._elevation=wr,this._center=_r,this.zoom=io}setLocationAtPoint(u,fr){const Ar=this.pointCoordinate(fr),_r=this.pointCoordinate(this.centerPoint),wr=this.locationCoordinate(u),Kr=new Xe.Z(wr.x-(Ar.x-_r.x),wr.y-(Ar.y-_r.y));this.center=this.coordinateLocation(Kr),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,Xe){return Xe?this.coordinatePoint(this.locationCoordinate(u),Xe.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,Xe){return this.coordinateLocation(this.pointCoordinate(u,Xe))}locationCoordinate(u){return Xe.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,fr){if(fr){const Xe=fr.pointCoordinate(u);if(null!=Xe)return Xe}const Ar=[u.x,u.y,0,1],_r=[u.x,u.y,1,1];Xe.af(Ar,Ar,this.pixelMatrixInverse),Xe.af(_r,_r,this.pixelMatrixInverse);const wr=Ar[3],Kr=_r[3],In=Ar[1]/wr,io=_r[1]/Kr,no=Ar[2]/wr,oo=_r[2]/Kr,so=no===oo?0:(0-no)/(oo-no);return new Xe.Z(Xe.y.number(Ar[0]/wr,_r[0]/Kr,so)/this.worldSize,Xe.y.number(In,io,so)/this.worldSize)}coordinatePoint(u,fr=0,Ar=this.pixelMatrix){const _r=[u.x*this.worldSize,u.y*this.worldSize,fr,1];return Xe.af(_r,_r,Ar),new Xe.P(_r[0]/_r[3],_r[1]/_r[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return(new H).extend(this.pointLocation(new Xe.P(0,u))).extend(this.pointLocation(new Xe.P(this.width,u))).extend(this.pointLocation(new Xe.P(this.width,this.height))).extend(this.pointLocation(new Xe.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new H([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Dl])}calculateTileMatrix(u){const fr=u.canonical,Ar=this.worldSize/this.zoomScale(fr.z),_r=fr.x+Math.pow(2,fr.z)*u.wrap,wr=Xe.an(new Float64Array(16));return Xe.J(wr,wr,[_r*Ar,fr.y*Ar,0]),Xe.K(wr,wr,[Ar/Xe.X,Ar/Xe.X,1]),wr}calculatePosMatrix(u,fr=!1){const Ar=u.key,_r=fr?this._alignedPosMatrixCache:this._posMatrixCache;if(_r[Ar])return _r[Ar];const wr=this.calculateTileMatrix(u);return Xe.L(wr,fr?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,wr),_r[Ar]=new Float32Array(wr),_r[Ar]}calculateFogMatrix(u){const fr=u.key,Ar=this._fogMatrixCache;if(Ar[fr])return Ar[fr];const _r=this.calculateTileMatrix(u);return Xe.L(_r,this.fogMatrix,_r),Ar[fr]=new Float32Array(_r),Ar[fr]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,fr){fr=Xe.ac(+fr,this.minZoom,this.maxZoom);const Ar={center:new Xe.N(u.lng,u.lat),zoom:fr};let _r=this.lngRange;if(!this._renderWorldCopies&&null===_r){const u=180-1e-10;_r=[-u,u]}const wr=this.tileSize*this.zoomScale(Ar.zoom);let Kr=0,In=wr,io=0,no=wr,oo=0,so=0;const{x:ao,y:co}=this.size;if(this.latRange){const u=this.latRange;Kr=Xe.Q(u[1])*wr,In=Xe.Q(u[0])*wr,In-Kr<co&&(oo=co/(In-Kr))}_r&&(io=Xe.b2(Xe.O(_r[0])*wr,0,wr),no=Xe.b2(Xe.O(_r[1])*wr,0,wr),no<io&&(no+=wr),no-io<ao&&(so=ao/(no-io)));const{x:go,y:ho}=this.project.call({worldSize:wr},u);let Co,Io;const xo=Math.max(so||0,oo||0);if(xo){const u=new Xe.P(so?(no+io)/2:go,oo?(In+Kr)/2:ho);return Ar.center=this.unproject.call({worldSize:wr},u).wrap(),Ar.zoom+=this.scaleZoom(xo),Ar}if(this.latRange){const u=co/2;ho-u<Kr&&(Io=Kr+u),ho+u>In&&(Io=In-u)}if(_r){const u=(io+no)/2;let fr=go;this._renderWorldCopies&&(fr=Xe.b2(go,u-wr/2,u+wr/2));const Ar=ao/2;fr-Ar<io&&(Co=io+Ar),fr+Ar>no&&(Co=no-Ar)}if(void 0!==Co||void 0!==Io){const u=new Xe.P(null!=Co?Co:go,null!=Io?Io:ho);Ar.center=this.unproject.call({worldSize:wr},u).wrap()}return Ar}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:Xe,zoom:fr}=this.getConstrained(this.center,this.zoom);this.center=Xe,this.zoom=fr,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,fr=this.point.x,Ar=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=Xe.b4(1,this.center.lat)*this.worldSize;let _r=Xe.an(new Float64Array(16));Xe.K(_r,_r,[this.width/2,-this.height/2,1]),Xe.J(_r,_r,[1,-1,0]),this.labelPlaneMatrix=_r,_r=Xe.an(new Float64Array(16)),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[-1,-1,0]),Xe.K(_r,_r,[2/this.width,2/this.height,1]),this.glCoordMatrix=_r;const wr=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Kr=Math.min(this.elevation,this.minElevationForCurrentTile),In=wr-Kr*this._pixelPerMeter/Math.cos(this._pitch),io=Kr<0?In:wr,no=Math.PI/2+this._pitch,oo=this._fov*(.5+u.y/this.height),so=Math.sin(oo)*io/Math.sin(Xe.ac(Math.PI-no-oo,.01,Math.PI-.01)),ao=this.getHorizon(),co=2*Math.atan(ao/this.cameraToCenterDistance)*(.5+u.y/(2*ao)),go=Math.sin(co)*io/Math.sin(Xe.ac(Math.PI-no-co,.01,Math.PI-.01)),ho=Math.min(so,go);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ho+io),this.nearZ=this.height/50,_r=new Float64Array(16),Xe.b5(_r,this._fov,this.width/this.height,this.nearZ,this.farZ),_r[8]=2*-u.x/this.width,_r[9]=2*u.y/this.height,this.projectionMatrix=Xe.ae(_r),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[0,0,-this.cameraToCenterDistance]),Xe.b6(_r,_r,this._pitch),Xe.ad(_r,_r,this.angle),Xe.J(_r,_r,[-fr,-Ar,0]),this.mercatorMatrix=Xe.K([],_r,[this.worldSize,this.worldSize,this.worldSize]),Xe.K(_r,_r,[1,1,this._pixelPerMeter]),this.pixelMatrix=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r),Xe.J(_r,_r,[0,0,-this.elevation]),this.modelViewProjectionMatrix=_r,this.invModelViewProjectionMatrix=Xe.as([],_r),this.fogMatrix=new Float64Array(16),Xe.b5(this.fogMatrix,this._fov,this.width/this.height,wr,this.farZ),this.fogMatrix[8]=2*-u.x/this.width,this.fogMatrix[9]=2*u.y/this.height,Xe.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),Xe.b6(this.fogMatrix,this.fogMatrix,this._pitch),Xe.ad(this.fogMatrix,this.fogMatrix,this.angle),Xe.J(this.fogMatrix,this.fogMatrix,[-fr,-Ar,0]),Xe.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r);const Co=this.width%2/2,Io=this.height%2/2,xo=Math.cos(this.angle),Mo=Math.sin(this.angle),Po=fr-Math.round(fr)+xo*Co+Mo*Io,ss=Ar-Math.round(Ar)+xo*Io+Mo*Co,sa=new Float64Array(_r);if(Xe.J(sa,sa,[Po>.5?Po-1:Po,ss>.5?ss-1:ss,0]),this.alignedModelViewProjectionMatrix=sa,_r=Xe.as(new Float64Array(16),this.pixelMatrix),!_r)throw new Error("failed to invert matrix");this.pixelMatrixInverse=_r,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new Xe.P(0,0)),fr=[u.x*this.worldSize,u.y*this.worldSize,0,1];return Xe.af(fr,fr,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new Xe.P(0,u))}getCameraQueryGeometry(u){const fr=this.getCameraPoint();if(1===u.length)return[u[0],fr];{let Ar=fr.x,_r=fr.y,wr=fr.x,Kr=fr.y;for(const Xe of u)Ar=Math.min(Ar,Xe.x),_r=Math.min(_r,Xe.y),wr=Math.max(wr,Xe.x),Kr=Math.max(Kr,Xe.y);return[new Xe.P(Ar,_r),new Xe.P(wr,_r),new Xe.P(wr,Kr),new Xe.P(Ar,Kr),new Xe.P(Ar,_r)]}}lngLatToCameraDepth(u,fr){const Ar=this.locationCoordinate(u),_r=[Ar.x*this.worldSize,Ar.y*this.worldSize,fr,1];return Xe.af(_r,_r,this.modelViewProjectionMatrix),_r[2]/_r[3]}}function va(u,Xe){let fr,Ar=!1,_r=null,wr=null;const r=()=>{_r=null,Ar&&(u.apply(wr,fr),_r=setTimeout(r,Xe),Ar=!1)};return(...u)=>(Ar=!0,wr=this,fr=u,_r||r(),_r)}class xa{constructor(u){this._getCurrentHash=()=>{const u=window.location.hash.replace("#","");if(this._hashName){let Xe;return u.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(Xe=u)})),(Xe&&Xe[1]||"").split("/")}return u.split("/")},this._onHashChange=()=>{const u=this._getCurrentHash();if(u.length>=3&&!u.some((u=>isNaN(u)))){const Xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(u[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:Xe,pitch:+(u[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const u=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,u)},this._removeHash=()=>{const u=this._getCurrentHash();if(0===u.length)return;const Xe=u.join("/");let fr=Xe;fr.split("&").length>0&&(fr=fr.split("&")[0]),this._hashName&&(fr=`${this._hashName}=${Xe}`);let Ar=window.location.hash.replace(fr,"");Ar.startsWith("#&")?Ar=Ar.slice(0,1)+Ar.slice(2):"#"===Ar&&(Ar="");let _r=window.location.href.replace(/(#.+)?$/,Ar);_r=_r.replace("&&","&"),window.history.replaceState(window.history.state,null,_r)},this._updateHash=va(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const Xe=this._map.getCenter(),fr=Math.round(100*this._map.getZoom())/100,Ar=Math.ceil((fr*Math.LN2+Math.log(512/360/.5))/Math.LN10),_r=Math.pow(10,Ar),wr=Math.round(Xe.lng*_r)/_r,Kr=Math.round(Xe.lat*_r)/_r,In=this._map.getBearing(),io=this._map.getPitch();let no="";if(no+=u?`/${wr}/${Kr}/${fr}`:`${fr}/${Kr}/${wr}`,(In||io)&&(no+="/"+Math.round(10*In)/10),io&&(no+=`/${Math.round(io)}`),this._hashName){const u=this._hashName;let Xe=!1;const fr=window.location.hash.slice(1).split("&").map((fr=>{const Ar=fr.split("=")[0];return Ar===u?(Xe=!0,`${Ar}=${no}`):fr})).filter((u=>u));return Xe||fr.push(`${u}=${no}`),`#${fr.join("&")}`}return`#${no}`}}const Yl={linearity:.3,easing:Xe.b7(0,0,.3,1)},Nl=Xe.e({deceleration:2500,maxSpeed:1400},Yl),Ol=Xe.e({deceleration:20,maxSpeed:1400},Yl),jl=Xe.e({deceleration:1e3,maxSpeed:360},Yl),Ql=Xe.e({deceleration:1e3,maxSpeed:90},Yl);class Ea{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:wr.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,Xe=wr.now();for(;u.length>0&&Xe-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const fr={zoom:0,bearing:0,pitch:0,pan:new Xe.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:u}of this._inertiaBuffer)fr.zoom+=u.zoomDelta||0,fr.bearing+=u.bearingDelta||0,fr.pitch+=u.pitchDelta||0,u.panDelta&&fr.pan._add(u.panDelta),u.around&&(fr.around=u.around),u.pinchAround&&(fr.pinchAround=u.pinchAround);const Ar=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,_r={};if(fr.pan.mag()){const wr=Ca(fr.pan.mag(),Ar,Xe.e({},Nl,u||{}));_r.offset=fr.pan.mult(wr.amount/fr.pan.mag()),_r.center=this._map.transform.center,Pa(_r,wr)}if(fr.zoom){const u=Ca(fr.zoom,Ar,Ol);_r.zoom=this._map.transform.zoom+u.amount,Pa(_r,u)}if(fr.bearing){const u=Ca(fr.bearing,Ar,jl);_r.bearing=this._map.transform.bearing+Xe.ac(u.amount,-179,179),Pa(_r,u)}if(fr.pitch){const u=Ca(fr.pitch,Ar,Ql);_r.pitch=this._map.transform.pitch+u.amount,Pa(_r,u)}if(_r.zoom||_r.bearing){const u=void 0===fr.pinchAround?fr.around:fr.pinchAround;_r.around=u?this._map.unproject(u):this._map.getCenter()}return this.clear(),Xe.e(_r,{noMoveStart:!0})}}function Pa(u,Xe){(!u.duration||u.duration<Xe.duration)&&(u.duration=Xe.duration,u.easing=Xe.easing)}function Ca(u,fr,Ar){const{maxSpeed:_r,linearity:wr,deceleration:Kr}=Ar,In=Xe.ac(u*wr/(fr/1e3),-_r,_r),io=Math.abs(In)/(Kr*wr);return{easing:Ar.easing,duration:1e3*io,amount:In*(io/2)}}class Sa extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,fr,Ar,_r={}){const wr=r.mousePos(fr.getCanvas(),Ar),Kr=fr.unproject(wr);super(u,Xe.e({point:wr,lngLat:Kr,originalEvent:Ar},_r)),this._defaultPrevented=!1,this.target=fr}}class za extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,fr,Ar){const _r="touchend"===u?Ar.changedTouches:Ar.touches,wr=r.touchPos(fr.getCanvasContainer(),_r),Kr=wr.map((u=>fr.unproject(u))),In=wr.reduce(((u,Xe,fr,Ar)=>u.add(Xe.div(Ar.length))),new Xe.P(0,0));super(u,{points:wr,point:In,lngLats:Kr,lngLat:fr.unproject(In),originalEvent:Ar}),this._defaultPrevented=!1}}class Da extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Xe,fr){super(u,{originalEvent:fr}),this._defaultPrevented=!1}}class Ma{constructor(u,Xe){this._map=u,this._clickTolerance=Xe.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new Da(u.type,this._map,u))}mousedown(u,Xe){return this._mousedownPos=Xe,this._firePreventable(new Sa(u.type,this._map,u))}mouseup(u){this._map.fire(new Sa(u.type,this._map,u))}click(u,Xe){this._mousedownPos&&this._mousedownPos.dist(Xe)>=this._clickTolerance||this._map.fire(new Sa(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Sa(u.type,this._map,u))}mouseover(u){this._map.fire(new Sa(u.type,this._map,u))}mouseout(u){this._map.fire(new Sa(u.type,this._map,u))}touchstart(u){return this._firePreventable(new za(u.type,this._map,u))}touchmove(u){this._map.fire(new za(u.type,this._map,u))}touchend(u){this._map.fire(new za(u.type,this._map,u))}touchcancel(u){this._map.fire(new za(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Aa{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Sa(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Sa("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Sa(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ra{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this._map.terrain)}}class ka{constructor(u,Xe){this._map=u,this._tr=new Ra(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=Xe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,Xe){this.isEnabled()&&u.shiftKey&&0===u.button&&(r.disableDrag(),this._startPos=this._lastPos=Xe,this._active=!0)}mousemoveWindow(u,Xe){if(!this._active)return;const fr=Xe;if(this._lastPos.equals(fr)||!this._box&&fr.dist(this._startPos)<this._clickTolerance)return;const Ar=this._startPos;this._lastPos=fr,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const _r=Math.min(Ar.x,fr.x),wr=Math.max(Ar.x,fr.x),Kr=Math.min(Ar.y,fr.y),In=Math.max(Ar.y,fr.y);r.setTransform(this._box,`translate(${_r}px,${Kr}px)`),this._box.style.width=wr-_r+"px",this._box.style.height=In-Kr+"px"}mouseupWindow(u,fr){if(!this._active)return;if(0!==u.button)return;const Ar=this._startPos,_r=fr;if(this.reset(),r.suppressClick(),Ar.x!==_r.x||Ar.y!==_r.y)return this._map.fire(new Xe.k("boxzoomend",{originalEvent:u})),{cameraAnimation:u=>u.fitScreenCoordinates(Ar,_r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&27===u.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,fr){return this._map.fire(new Xe.k(u,{originalEvent:fr}))}}function La(u,Xe){if(u.length!==Xe.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${Xe.length}`);const fr={};for(let Ar=0;Ar<u.length;Ar++)fr[u[Ar].identifier]=Xe[Ar];return fr}class Fa{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,fr,Ar){(this.centroid||Ar.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=u.timeStamp),Ar.length===this.numTouches&&(this.centroid=function(u){const fr=new Xe.P(0,0);for(const Xe of u)fr._add(Xe);return fr.div(u.length)}(fr),this.touches=La(Ar,fr)))}touchmove(u,Xe,fr){if(this.aborted||!this.centroid)return;const Ar=La(fr,Xe);for(const u in this.touches){const Xe=Ar[u];(!Xe||Xe.dist(this.touches[u])>30)&&(this.aborted=!0)}}touchend(u,Xe,fr){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),0===fr.length){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class Ba{constructor(u){this.singleTap=new Fa(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,Xe,fr){this.singleTap.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){this.singleTap.touchmove(u,Xe,fr)}touchend(u,Xe,fr){const Ar=this.singleTap.touchend(u,Xe,fr);if(Ar){const Xe=u.timeStamp-this.lastTime<500,fr=!this.lastTap||this.lastTap.dist(Ar)<30;if(Xe&&fr||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=Ar,this.count===this.numTaps)return this.reset(),Ar}}}class Oa{constructor(u){this._tr=new Ra(u),this._zoomIn=new Ba({numTouches:1,numTaps:2}),this._zoomOut=new Ba({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,Xe,fr){this._zoomIn.touchstart(u,Xe,fr),this._zoomOut.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){this._zoomIn.touchmove(u,Xe,fr),this._zoomOut.touchmove(u,Xe,fr)}touchend(u,Xe,fr){const Ar=this._zoomIn.touchend(u,Xe,fr),_r=this._zoomOut.touchend(u,Xe,fr),wr=this._tr;return Ar?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom+1,around:wr.unproject(Ar)},{originalEvent:u})}):_r?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom-1,around:wr.unproject(_r)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Na{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const Xe=this._moveFunction(...u);if(Xe.bearingDelta||Xe.pitchDelta||Xe.around||Xe.panDelta)return this._active=!0,Xe}dragStart(u,Xe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=Xe.length?Xe[0]:Xe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,Xe){if(!this.isEnabled())return;const fr=this._lastPoint;if(!fr)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const Ar=Xe.length?Xe[0]:Xe;return!this._moved&&Ar.dist(fr)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Ar,this._move(fr,Ar))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&r.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ql={0:1,2:2};class Ua{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const Xe=r.mouseButton(u);this._eventButton=Xe}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(u,Xe){const fr=ql[Xe];return void 0===u.buttons||(u.buttons&fr)!==fr}(u,this._eventButton)}isValidEndEvent(u){return r.mouseButton(u)===this._eventButton}}class Za{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return 1===u.targetTouches.length}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){this._firstTouch=u.targetTouches[0].identifier}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const qa=u=>{u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=u=>{u.preventDefault()}},Va=({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:fr=.8})=>{const Ar=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Na({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*fr}),moveStateManager:Ar,enable:u,assignEvents:qa})},Ga=({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:fr=-.5})=>{const Ar=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Na({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*fr}),moveStateManager:Ar,enable:u,assignEvents:qa})};class Ha{constructor(u,Xe){this._clickTolerance=u.clickTolerance||1,this._map=Xe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new Xe.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,Xe,fr){return this._calculateTransform(u,Xe,fr)}touchmove(u,Xe,fr){if(this._active){if(!this._shouldBePrevented(fr.length))return u.preventDefault(),this._calculateTransform(u,Xe,fr);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,Xe,fr){this._calculateTransform(u,Xe,fr),this._active&&this._shouldBePrevented(fr.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,fr,Ar){Ar.length>0&&(this._active=!0);const _r=La(Ar,fr),wr=new Xe.P(0,0),Kr=new Xe.P(0,0);let In=0;for(const u in _r){const Xe=_r[u],fr=this._touches[u];fr&&(wr._add(Xe),Kr._add(Xe.sub(fr)),In++,_r[u]=Xe)}if(this._touches=_r,this._shouldBePrevented(In)||!Kr.mag())return;const io=Kr.div(In);return this._sum._add(io),this._sum.mag()<this._clickTolerance?void 0:{around:wr.div(In),panDelta:io}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wa{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,Xe,fr){this._firstTwoTouches||fr.length<2||(this._firstTwoTouches=[fr[0].identifier,fr[1].identifier],this._start([Xe[0],Xe[1]]))}touchmove(u,Xe,fr){if(!this._firstTwoTouches)return;u.preventDefault();const[Ar,_r]=this._firstTwoTouches,wr=$a(fr,Xe,Ar),Kr=$a(fr,Xe,_r);if(!wr||!Kr)return;const In=this._aroundCenter?null:wr.add(Kr).div(2);return this._move([wr,Kr],In,u)}touchend(u,Xe,fr){if(!this._firstTwoTouches)return;const[Ar,_r]=this._firstTwoTouches,wr=$a(fr,Xe,Ar),Kr=$a(fr,Xe,_r);wr&&Kr||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function $a(u,Xe,fr){for(let Ar=0;Ar<u.length;Ar++)if(u[Ar].identifier===fr)return Xe[Ar]}function Xa(u,Xe){return Math.log(u/Xe)/Math.LN2}class Ka extends Wa{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,Xe){const fr=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Xa(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Xa(this._distance,fr),pinchAround:Xe}}}function Ja(u,Xe){return 180*u.angleWith(Xe)/Math.PI}class Ya extends Wa{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,Xe,fr){const Ar=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ja(this._vector,Ar),pinchAround:Xe}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const Xe=25/(Math.PI*this._minDiameter)*360,fr=Ja(u,this._startVector);return Math.abs(fr)<Xe}}function Qa(u){return Math.abs(u.y)>Math.abs(u.x)}class ts extends Wa{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,Xe,fr){super.touchstart(u,Xe,fr),this._currentTouchCount=fr.length}_start(u){this._lastPoints=u,Qa(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,Xe,fr){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Ar=u[0].sub(this._lastPoints[0]),_r=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Ar,_r,fr.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(Ar.y+_r.y)/2*-.5}):void 0}gestureBeginsVertically(u,Xe,fr){if(void 0!==this._valid)return this._valid;const Ar=u.mag()>=2,_r=Xe.mag()>=2;if(!Ar&&!_r)return;if(!Ar||!_r)return void 0===this._firstMove&&(this._firstMove=fr),fr-this._firstMove<100&&void 0;const wr=u.y>0==Xe.y>0;return Qa(u)&&Qa(Xe)&&wr}}const $l={panStep:100,bearingStep:15,pitchStep:10};class is{constructor(u){this._tr=new Ra(u);const Xe=$l;this._panStep=Xe.panStep,this._bearingStep=Xe.bearingStep,this._pitchStep=Xe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let Xe=0,fr=0,Ar=0,_r=0,wr=0;switch(u.keyCode){case 61:case 107:case 171:case 187:Xe=1;break;case 189:case 109:case 173:Xe=-1;break;case 37:u.shiftKey?fr=-1:(u.preventDefault(),_r=-1);break;case 39:u.shiftKey?fr=1:(u.preventDefault(),_r=1);break;case 38:u.shiftKey?Ar=1:(u.preventDefault(),wr=-1);break;case 40:u.shiftKey?Ar=-1:(u.preventDefault(),wr=1);break;default:return}return this._rotationDisabled&&(fr=0,Ar=0),{cameraAnimation:Kr=>{const In=this._tr;Kr.easeTo({duration:300,easeId:"keyboardHandler",easing:as,zoom:Xe?Math.round(In.zoom)+Xe*(u.shiftKey?2:1):In.zoom,bearing:In.bearing+fr*this._bearingStep,pitch:In.pitch+Ar*this._pitchStep,offset:[-_r*this._panStep,-wr*this._panStep],center:In.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function as(u){return u*(2-u)}const ec=4.000244140625;class os{constructor(u,Xe){this._onTimeout=u=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)},this._map=u,this._tr=new Ra(u),this._triggerRenderFrame=Xe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let Xe=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const fr=wr.now(),Ar=fr-(this._lastWheelEventTime||0);this._lastWheelEventTime=fr,0!==Xe&&Xe%ec==0?this._type="wheel":0!==Xe&&Math.abs(Xe)<4?this._type="trackpad":Ar>400?(this._type=null,this._lastValue=Xe,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(Ar*Xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Xe+=this._lastValue)),u.shiftKey&&Xe&&(Xe/=4),this._type&&(this._lastWheelEvent=u,this._delta-=Xe,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const fr=r.mousePos(this._map.getCanvas(),u),Ar=this._tr;this._around=fr.y>Ar.transform.height/2-Ar.transform.getHorizon()?Xe.N.convert(this._aroundCenter?Ar.center:Ar.unproject(fr)):Xe.N.convert(Ar.center),this._aroundPoint=Ar.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const u=this._tr.transform;if(0!==this._delta){const Xe="wheel"===this._type&&Math.abs(this._delta)>ec?this._wheelZoomRate:this._defaultZoomRate;let fr=2/(1+Math.exp(-Math.abs(this._delta*Xe)));this._delta<0&&0!==fr&&(fr=1/fr);const Ar="number"==typeof this._targetZoom?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Ar*fr))),"wheel"===this._type&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const fr="number"==typeof this._targetZoom?this._targetZoom:u.zoom,Ar=this._startZoom,_r=this._easing;let Kr,In=!1;const io=wr.now()-this._lastWheelEventTime;if("wheel"===this._type&&Ar&&_r&&io){const u=Math.min(io/200,1),wr=_r(u);Kr=Xe.y.number(Ar,fr,wr),u<1?this._frameId||(this._frameId=!0):In=!0}else Kr=fr,In=!0;return this._active=!0,In&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!In,zoomDelta:Kr-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let fr=Xe.b8;if(this._prevEase){const u=this._prevEase,Ar=(wr.now()-u.start)/u.duration,_r=u.easing(Ar+.01)-u.easing(Ar),Kr=.27/Math.sqrt(_r*_r+1e-4)*.01,In=Math.sqrt(.0729-Kr*Kr);fr=Xe.b7(Kr,In,.25,1)}return this._prevEase={start:wr.now(),duration:u,easing:fr},fr}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class rs{constructor(u,Xe){this._clickZoom=u,this._tapZoom=Xe}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ns{constructor(u){this._tr=new Ra(u),this.reset()}reset(){this._active=!1}dblclick(u,Xe){return u.preventDefault(),{cameraAnimation:fr=>{fr.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(Xe)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ls{constructor(){this._tap=new Ba({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,Xe,fr){if(!this._swipePoint)if(this._tapTime){const Ar=Xe[0],_r=u.timeStamp-this._tapTime<500,wr=this._tapPoint.dist(Ar)<30;_r&&wr?fr.length>0&&(this._swipePoint=Ar,this._swipeTouch=fr[0].identifier):this.reset()}else this._tap.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){if(this._tapTime){if(this._swipePoint){if(fr[0].identifier!==this._swipeTouch)return;const Ar=Xe[0],_r=Ar.y-this._swipePoint.y;return this._swipePoint=Ar,u.preventDefault(),this._active=!0,{zoomDelta:_r/128}}}else this._tap.touchmove(u,Xe,fr)}touchend(u,Xe,fr){if(this._tapTime)this._swipePoint&&0===fr.length&&this.reset();else{const Ar=this._tap.touchend(u,Xe,fr);Ar&&(this._tapTime=u.timeStamp,this._tapPoint=Ar)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hs{constructor(u,Xe,fr){this._el=u,this._mousePan=Xe,this._touchPan=fr}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class cs{constructor(u,Xe,fr){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=Xe,this._mousePitch=fr}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class us{constructor(u,Xe,fr,Ar){this._el=u,this._touchZoom=Xe,this._touchRotate=fr,this._tapDragZoom=Ar,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ds{constructor(u,Xe){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=u,this._options=Xe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",u);let Xe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(Xe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const fr=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Ar=document.createElement("div");Ar.className="maplibregl-desktop-message",Ar.textContent=Xe,this._container.appendChild(Ar);const _r=document.createElement("div");_r.className="maplibregl-mobile-message",_r.textContent=fr,this._container.appendChild(_r),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,fr){this._enabled&&(this._map.fire(new Xe.k("cooperativegestureprevented",{gestureType:u,originalEvent:fr})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const _s=u=>u.zoom||u.drag||u.pitch||u.rotate;class ps extends Xe.k{}function ms(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class fs{constructor(u,Xe){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,Xe)=>{if("blur"===u.type)return void this.stop(!0);this._updatingCamera=!0;const fr="renderFrame"===u.type?void 0:u,Ar={needsRenderFrame:!1},_r={},wr={},Kr=u.touches,In=Kr?this._getMapTouches(Kr):void 0,io=In?r.touchPos(this._map.getCanvas(),In):r.mousePos(this._map.getCanvas(),u);for(const{handlerName:Kr,handler:no,allowed:oo}of this._handlers){if(!no.isEnabled())continue;let so;this._blockedByActive(wr,oo,Kr)?no.reset():no[Xe||u.type]&&(so=no[Xe||u.type](u,io,In),this.mergeHandlerResult(Ar,_r,so,Kr,fr),so&&so.needsRenderFrame&&this._triggerRenderFrame()),(so||no.isActive())&&(wr[Kr]=no)}const no={};for(const u in this._previousActiveHandlers)wr[u]||(no[u]=fr);this._previousActiveHandlers=wr,(Object.keys(no).length||ms(Ar))&&(this._changes.push([Ar,_r,no]),this._triggerRenderFrame()),(Object.keys(wr).length||ms(Ar))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:oo}=Ar;oo&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],oo(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ea(u),this._bearingSnap=Xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Xe);const fr=this._el;this._listeners=[[fr,"touchstart",{passive:!0}],[fr,"touchmove",{passive:!1}],[fr,"touchend",void 0],[fr,"touchcancel",void 0],[fr,"mousedown",void 0],[fr,"mousemove",void 0],[fr,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[fr,"mouseover",void 0],[fr,"mouseout",void 0],[fr,"dblclick",void 0],[fr,"click",void 0],[fr,"keydown",{capture:!1}],[fr,"keyup",void 0],[fr,"wheel",{passive:!1}],[fr,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,Xe,fr]of this._listeners)r.addEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,fr)}destroy(){for(const[u,Xe,fr]of this._listeners)r.removeEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,fr)}_addDefaultHandlers(u){const Xe=this._map,fr=Xe.getCanvasContainer();this._add("mapEvent",new Ma(Xe,u));const Ar=Xe.boxZoom=new ka(Xe,u);this._add("boxZoom",Ar),u.interactive&&u.boxZoom&&Ar.enable();const _r=Xe.cooperativeGestures=new ds(Xe,u.cooperativeGestures);this._add("cooperativeGestures",_r),u.cooperativeGestures&&_r.enable();const wr=new Oa(Xe),Kr=new ns(Xe);Xe.doubleClickZoom=new rs(Kr,wr),this._add("tapZoom",wr),this._add("clickZoom",Kr),u.interactive&&u.doubleClickZoom&&Xe.doubleClickZoom.enable();const In=new ls;this._add("tapDragZoom",In);const io=Xe.touchPitch=new ts(Xe);this._add("touchPitch",io),u.interactive&&u.touchPitch&&Xe.touchPitch.enable(u.touchPitch);const no=Va(u),oo=Ga(u);Xe.dragRotate=new cs(u,no,oo),this._add("mouseRotate",no,["mousePitch"]),this._add("mousePitch",oo,["mouseRotate"]),u.interactive&&u.dragRotate&&Xe.dragRotate.enable();const so=(({enable:u,clickTolerance:Xe})=>{const fr=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&!u.ctrlKey});return new Na({clickTolerance:Xe,move:(u,Xe)=>({around:Xe,panDelta:Xe.sub(u)}),activateOnStart:!0,moveStateManager:fr,enable:u,assignEvents:qa})})(u),ao=new Ha(u,Xe);Xe.dragPan=new hs(fr,so,ao),this._add("mousePan",so),this._add("touchPan",ao,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&Xe.dragPan.enable(u.dragPan);const co=new Ya,go=new Ka;Xe.touchZoomRotate=new us(fr,go,co,In),this._add("touchRotate",co,["touchPan","touchZoom"]),this._add("touchZoom",go,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&Xe.touchZoomRotate.enable(u.touchZoomRotate);const ho=Xe.scrollZoom=new os(Xe,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ho,["mousePan"]),u.interactive&&u.scrollZoom&&Xe.scrollZoom.enable(u.scrollZoom);const Co=Xe.keyboard=new is(Xe);this._add("keyboard",Co),u.interactive&&u.keyboard&&Xe.keyboard.enable(),this._add("blockableMapEvent",new Aa(Xe))}_add(u,Xe,fr){this._handlers.push({handlerName:u,handler:Xe,allowed:fr}),this._handlersById[u]=Xe}stop(u){if(!this._updatingCamera){for(const{handler:u}of this._handlers)u.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(_s(this._eventsInProgress))||this.isZooming()}_blockedByActive(u,Xe,fr){for(const Ar in u)if(Ar!==fr&&(!Xe||Xe.indexOf(Ar)<0))return!0;return!1}_getMapTouches(u){const Xe=[];for(const fr of u)this._el.contains(fr.target)&&Xe.push(fr);return Xe}mergeHandlerResult(u,fr,Ar,_r,wr){if(!Ar)return;Xe.e(u,Ar);const Kr={handlerName:_r,originalEvent:Ar.originalEvent||wr};void 0!==Ar.zoomDelta&&(fr.zoom=Kr),void 0!==Ar.panDelta&&(fr.drag=Kr),void 0!==Ar.pitchDelta&&(fr.pitch=Kr),void 0!==Ar.bearingDelta&&(fr.rotate=Kr)}_applyChanges(){const u={},fr={},Ar={};for(const[_r,wr,Kr]of this._changes)_r.panDelta&&(u.panDelta=(u.panDelta||new Xe.P(0,0))._add(_r.panDelta)),_r.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+_r.zoomDelta),_r.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+_r.bearingDelta),_r.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+_r.pitchDelta),void 0!==_r.around&&(u.around=_r.around),void 0!==_r.pinchAround&&(u.pinchAround=_r.pinchAround),_r.noInertia&&(u.noInertia=_r.noInertia),Xe.e(fr,wr),Xe.e(Ar,Kr);this._updateMapTransform(u,fr,Ar),this._changes=[]}_updateMapTransform(u,Xe,fr){const Ar=this._map,_r=Ar._getTransformForUpdate(),wr=Ar.terrain;if(!(ms(u)||wr&&this._terrainMovement))return this._fireEvents(Xe,fr,!0);let{panDelta:Kr,zoomDelta:In,bearingDelta:io,pitchDelta:no,around:oo,pinchAround:so}=u;void 0!==so&&(oo=so),Ar._stop(!0),oo=oo||Ar.transform.centerPoint;const ao=_r.pointLocation(Kr?oo.sub(Kr):oo);io&&(_r.bearing+=io),no&&(_r.pitch+=no),In&&(_r.zoom+=In),wr?this._terrainMovement||!Xe.drag&&!Xe.zoom?Xe.drag&&this._terrainMovement?_r.center=_r.pointLocation(_r.centerPoint.sub(Kr)):_r.setLocationAtPoint(ao,oo):(this._terrainMovement=!0,this._map._elevationFreeze=!0,_r.setLocationAtPoint(ao,oo)):_r.setLocationAtPoint(ao,oo),Ar._applyUpdatedTransform(_r),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(Xe,fr,!0)}_fireEvents(u,fr,Ar){const _r=_s(this._eventsInProgress),Kr=_s(u),In={};for(const Xe in u){const{originalEvent:fr}=u[Xe];this._eventsInProgress[Xe]||(In[`${Xe}start`]=fr),this._eventsInProgress[Xe]=u[Xe]}!_r&&Kr&&this._fireEvent("movestart",Kr.originalEvent);for(const u in In)this._fireEvent(u,In[u]);Kr&&this._fireEvent("move",Kr.originalEvent);for(const Xe in u){const{originalEvent:fr}=u[Xe];this._fireEvent(Xe,fr)}const io={};let no;for(const u in this._eventsInProgress){const{handlerName:Xe,originalEvent:Ar}=this._eventsInProgress[u];this._handlersById[Xe].isActive()||(delete this._eventsInProgress[u],no=fr[Xe]||Ar,io[`${u}end`]=no)}for(const u in io)this._fireEvent(u,io[u]);const oo=_s(this._eventsInProgress),so=(_r||Kr)&&!oo;if(so&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const u=this._map._getTransformForUpdate();u.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(u)}if(Ar&&so){this._updatingCamera=!0;const u=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=u=>0!==u&&-this._bearingSnap<u&&u<this._bearingSnap;!u||!u.essential&&wr.prefersReducedMotion?(this._map.fire(new Xe.k("moveend",{originalEvent:no})),i(this._map.getBearing())&&this._map.resetNorth()):(i(u.bearing||this._map.getBearing())&&(u.bearing=0),u.freezeElevation=!0,this._map.easeTo(u,{originalEvent:no})),this._updatingCamera=!1}}_fireEvent(u,fr){this._map.fire(new Xe.k(u,fr?{originalEvent:fr}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((u=>{delete this._frameId,this.handleEvent(new ps("renderFrame",{timeStamp:u})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class gs extends Xe.E{constructor(u,Xe){super(),this._renderFrameCallback=()=>{const u=Math.min((wr.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=Xe.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new Xe.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,Xe){return this.jumpTo({center:u},Xe)}panBy(u,fr,Ar){return u=Xe.P.convert(u).mult(-1),this.panTo(this.transform.center,Xe.e({offset:u},fr),Ar)}panTo(u,fr,Ar){return this.easeTo(Xe.e({center:u},fr),Ar)}getZoom(){return this.transform.zoom}setZoom(u,Xe){return this.jumpTo({zoom:u},Xe),this}zoomTo(u,fr,Ar){return this.easeTo(Xe.e({zoom:u},fr),Ar)}zoomIn(u,Xe){return this.zoomTo(this.getZoom()+1,u,Xe),this}zoomOut(u,Xe){return this.zoomTo(this.getZoom()-1,u,Xe),this}getBearing(){return this.transform.bearing}setBearing(u,Xe){return this.jumpTo({bearing:u},Xe),this}getPadding(){return this.transform.padding}setPadding(u,Xe){return this.jumpTo({padding:u},Xe),this}rotateTo(u,fr,Ar){return this.easeTo(Xe.e({bearing:u},fr),Ar)}resetNorth(u,fr){return this.rotateTo(0,Xe.e({duration:1e3},u),fr),this}resetNorthPitch(u,fr){return this.easeTo(Xe.e({bearing:0,pitch:0,duration:1e3},u),fr),this}snapToNorth(u,Xe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,Xe):this}getPitch(){return this.transform.pitch}setPitch(u,Xe){return this.jumpTo({pitch:u},Xe),this}cameraForBounds(u,Xe){u=H.convert(u);const fr=Xe&&Xe.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),fr,Xe)}_cameraForBoxAndBearing(u,fr,Ar,_r){const wr={top:0,bottom:0,right:0,left:0};if("number"==typeof(_r=Xe.e({padding:wr,offset:[0,0],maxZoom:this.transform.maxZoom},_r)).padding){const u=_r.padding;_r.padding={top:u,bottom:u,right:u,left:u}}_r.padding=Xe.e(wr,_r.padding);const Kr=this.transform,In=Kr.padding,io=new H(u,fr),no=Kr.project(io.getNorthWest()),oo=Kr.project(io.getNorthEast()),so=Kr.project(io.getSouthEast()),ao=Kr.project(io.getSouthWest()),co=Xe.b9(-Ar),go=no.rotate(co),ho=oo.rotate(co),Co=so.rotate(co),Io=ao.rotate(co),xo=new Xe.P(Math.max(go.x,ho.x,Io.x,Co.x),Math.max(go.y,ho.y,Io.y,Co.y)),Mo=new Xe.P(Math.min(go.x,ho.x,Io.x,Co.x),Math.min(go.y,ho.y,Io.y,Co.y)),Po=xo.sub(Mo),ss=(Kr.width-(In.left+In.right+_r.padding.left+_r.padding.right))/Po.x,sa=(Kr.height-(In.top+In.bottom+_r.padding.top+_r.padding.bottom))/Po.y;if(sa<0||ss<0)return void Xe.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const aa=Math.min(Kr.scaleZoom(Kr.scale*Math.min(ss,sa)),_r.maxZoom),fa=Xe.P.convert(_r.offset),ya=new Xe.P((_r.padding.left-_r.padding.right)/2,(_r.padding.top-_r.padding.bottom)/2).rotate(Xe.b9(Ar)),ol=fa.add(ya).mult(Kr.scale/Kr.zoomScale(aa));return{center:Kr.unproject(no.add(so).div(2).sub(ol)),zoom:aa,bearing:Ar}}fitBounds(u,Xe,fr){return this._fitInternal(this.cameraForBounds(u,Xe),Xe,fr)}fitScreenCoordinates(u,fr,Ar,_r,wr){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(Xe.P.convert(u)),this.transform.pointLocation(Xe.P.convert(fr)),Ar,_r),_r,wr)}_fitInternal(u,fr,Ar){return u?(delete(fr=Xe.e(u,fr)).padding,fr.linear?this.easeTo(fr,Ar):this.flyTo(fr,Ar)):this}jumpTo(u,fr){this.stop();const Ar=this._getTransformForUpdate();let _r=!1,wr=!1,Kr=!1;return"zoom"in u&&Ar.zoom!==+u.zoom&&(_r=!0,Ar.zoom=+u.zoom),void 0!==u.center&&(Ar.center=Xe.N.convert(u.center)),"bearing"in u&&Ar.bearing!==+u.bearing&&(wr=!0,Ar.bearing=+u.bearing),"pitch"in u&&Ar.pitch!==+u.pitch&&(Kr=!0,Ar.pitch=+u.pitch),null==u.padding||Ar.isPaddingEqual(u.padding)||(Ar.padding=u.padding),this._applyUpdatedTransform(Ar),this.fire(new Xe.k("movestart",fr)).fire(new Xe.k("move",fr)),_r&&this.fire(new Xe.k("zoomstart",fr)).fire(new Xe.k("zoom",fr)).fire(new Xe.k("zoomend",fr)),wr&&this.fire(new Xe.k("rotatestart",fr)).fire(new Xe.k("rotate",fr)).fire(new Xe.k("rotateend",fr)),Kr&&this.fire(new Xe.k("pitchstart",fr)).fire(new Xe.k("pitch",fr)).fire(new Xe.k("pitchend",fr)),this.fire(new Xe.k("moveend",fr))}calculateCameraOptionsFromTo(u,fr,Ar,_r=0){const wr=Xe.Z.fromLngLat(u,fr),Kr=Xe.Z.fromLngLat(Ar,_r),In=Kr.x-wr.x,io=Kr.y-wr.y,no=Kr.z-wr.z,oo=Math.hypot(In,io,no);if(0===oo)throw new Error("Can't calculate camera options with same From and To");const so=Math.hypot(In,io),ao=this.transform.scaleZoom(this.transform.cameraToCenterDistance/oo/this.transform.tileSize),co=180*Math.atan2(In,-io)/Math.PI;let go=180*Math.acos(so/oo)/Math.PI;return go=no<0?90-go:90+go,{center:Kr.toLngLat(),zoom:ao,pitch:go,bearing:co}}easeTo(u,fr){var Ar;this._stop(!1,u.easeId),(!1===(u=Xe.e({offset:[0,0],duration:500,easing:Xe.b8},u)).animate||!u.essential&&wr.prefersReducedMotion)&&(u.duration=0);const _r=this._getTransformForUpdate(),Kr=_r.zoom,In=_r.bearing,io=_r.pitch,no=_r.padding,oo="bearing"in u?this._normalizeBearing(u.bearing,In):In,so="pitch"in u?+u.pitch:io,ao="padding"in u?u.padding:_r.padding,co=Xe.P.convert(u.offset);let go=_r.centerPoint.add(co);const ho=_r.pointLocation(go),{center:Co,zoom:Io}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(Ar=u.zoom)&&void 0!==Ar?Ar:Kr);this._normalizeCenter(Co,_r);const xo=_r.project(ho),Mo=_r.project(Co).sub(xo),Po=_r.zoomScale(Io-Kr);let ss,sa;u.around&&(ss=Xe.N.convert(u.around),sa=_r.locationPoint(ss));const aa={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Io!==Kr,this._rotating=this._rotating||In!==oo,this._pitching=this._pitching||so!==io,this._padding=!_r.isPaddingEqual(ao),this._easeId=u.easeId,this._prepareEase(fr,u.noMoveStart,aa),this.terrain&&this._prepareElevation(Co),this._ease((Ar=>{if(this._zooming&&(_r.zoom=Xe.y.number(Kr,Io,Ar)),this._rotating&&(_r.bearing=Xe.y.number(In,oo,Ar)),this._pitching&&(_r.pitch=Xe.y.number(io,so,Ar)),this._padding&&(_r.interpolatePadding(no,ao,Ar),go=_r.centerPoint.add(co)),this.terrain&&!u.freezeElevation&&this._updateElevation(Ar),ss)_r.setLocationAtPoint(ss,sa);else{const u=_r.zoomScale(_r.zoom-Kr),Xe=Io>Kr?Math.min(2,Po):Math.max(.5,Po),fr=Math.pow(Xe,1-Ar),wr=_r.unproject(xo.add(Mo.mult(Ar*fr)).mult(u));_r.setLocationAtPoint(_r.renderWorldCopies?wr.wrap():wr,go)}this._applyUpdatedTransform(_r),this._fireMoveEvents(fr)}),(Xe=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(fr,Xe)}),u),this}_prepareEase(u,fr,Ar={}){this._moving=!0,fr||Ar.moving||this.fire(new Xe.k("movestart",u)),this._zooming&&!Ar.zooming&&this.fire(new Xe.k("zoomstart",u)),this._rotating&&!Ar.rotating&&this.fire(new Xe.k("rotatestart",u)),this._pitching&&!Ar.pitching&&this.fire(new Xe.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const fr=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&fr!==this._elevationTarget){const Xe=this._elevationTarget-this._elevationStart;this._elevationStart+=u*(Xe-(fr-(Xe*u+this._elevationStart))/(1-u)),this._elevationTarget=fr}this.transform.elevation=Xe.y.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const Xe=u.getCameraPosition(),fr=this.terrain.getElevationForLngLatZoom(Xe.lngLat,u.zoom);if(Xe.altitude<fr){const Ar=this.calculateCameraOptionsFromTo(Xe.lngLat,fr,u.center,u.elevation);return{pitch:Ar.pitch,zoom:Ar.zoom}}return{}}_applyUpdatedTransform(u){const Xe=[];if(this.terrain&&Xe.push((u=>this._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&Xe.push((u=>this.transformCameraUpdate(u))),!Xe.length)return;const fr=u.clone();for(const u of Xe){const Xe=fr.clone(),{center:Ar,zoom:_r,pitch:wr,bearing:Kr,elevation:In}=u(Xe);Ar&&(Xe.center=Ar),void 0!==_r&&(Xe.zoom=_r),void 0!==wr&&(Xe.pitch=wr),void 0!==Kr&&(Xe.bearing=Kr),void 0!==In&&(Xe.elevation=In),fr.apply(Xe)}this.transform.apply(fr)}_fireMoveEvents(u){this.fire(new Xe.k("move",u)),this._zooming&&this.fire(new Xe.k("zoom",u)),this._rotating&&this.fire(new Xe.k("rotate",u)),this._pitching&&this.fire(new Xe.k("pitch",u))}_afterEase(u,fr){if(this._easeId&&fr&&this._easeId===fr)return;delete this._easeId;const Ar=this._zooming,_r=this._rotating,wr=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ar&&this.fire(new Xe.k("zoomend",u)),_r&&this.fire(new Xe.k("rotateend",u)),wr&&this.fire(new Xe.k("pitchend",u)),this.fire(new Xe.k("moveend",u))}flyTo(u,fr){var Ar;if(!u.essential&&wr.prefersReducedMotion){const Ar=Xe.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ar,fr)}this.stop(),u=Xe.e({offset:[0,0],speed:1.2,curve:1.42,easing:Xe.b8},u);const _r=this._getTransformForUpdate(),Kr=_r.zoom,In=_r.bearing,io=_r.pitch,no=_r.padding,oo="bearing"in u?this._normalizeBearing(u.bearing,In):In,so="pitch"in u?+u.pitch:io,ao="padding"in u?u.padding:_r.padding,co=Xe.P.convert(u.offset);let go=_r.centerPoint.add(co);const ho=_r.pointLocation(go),{center:Co,zoom:Io}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(Ar=u.zoom)&&void 0!==Ar?Ar:Kr);this._normalizeCenter(Co,_r);const xo=_r.zoomScale(Io-Kr),Mo=_r.project(ho),Po=_r.project(Co).sub(Mo);let ss=u.curve;const sa=Math.max(_r.width,_r.height),aa=sa/xo,fa=Po.mag();if("minZoom"in u){const fr=Xe.ac(Math.min(u.minZoom,Kr,Io),_r.minZoom,_r.maxZoom),Ar=sa/_r.zoomScale(fr-Kr);ss=Math.sqrt(Ar/fa*2)}const ya=ss*ss;function P(u){const Xe=(aa*aa-sa*sa+(u?-1:1)*ya*ya*fa*fa)/(2*(u?aa:sa)*ya*fa);return Math.log(Math.sqrt(Xe*Xe+1)-Xe)}function C(u){return(Math.exp(u)-Math.exp(-u))/2}function S(u){return(Math.exp(u)+Math.exp(-u))/2}const ol=P(!1);let D=function(u){return S(ol)/S(ol+ss*u)},M=function(u){return sa*((S(ol)*(C(Xe=ol+ss*u)/S(Xe))-C(ol))/ya)/fa;var Xe},sl=(P(!0)-ol)/ss;if(Math.abs(fa)<1e-6||!isFinite(sl)){if(Math.abs(sa-aa)<1e-6)return this.easeTo(u,fr);const Xe=aa<sa?-1:1;sl=Math.abs(Math.log(aa/sa))/ss,M=()=>0,D=u=>Math.exp(Xe*ss*u)}return u.duration="duration"in u?+u.duration:1e3*sl/("screenSpeed"in u?+u.screenSpeed/ss:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=In!==oo,this._pitching=so!==io,this._padding=!_r.isPaddingEqual(ao),this._prepareEase(fr,!1),this.terrain&&this._prepareElevation(Co),this._ease((Ar=>{const wr=Ar*sl,ho=1/D(wr);_r.zoom=1===Ar?Io:Kr+_r.scaleZoom(ho),this._rotating&&(_r.bearing=Xe.y.number(In,oo,Ar)),this._pitching&&(_r.pitch=Xe.y.number(io,so,Ar)),this._padding&&(_r.interpolatePadding(no,ao,Ar),go=_r.centerPoint.add(co)),this.terrain&&!u.freezeElevation&&this._updateElevation(Ar);const xo=1===Ar?Co:_r.unproject(Mo.add(Po.mult(M(wr))).mult(ho));_r.setLocationAtPoint(_r.renderWorldCopies?xo.wrap():xo,go),this._applyUpdatedTransform(_r),this._fireMoveEvents(fr)}),(()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(fr)}),u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,Xe){var fr;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,Xe)}return u||null===(fr=this.handlers)||void 0===fr||fr.stop(!1),this}_ease(u,Xe,fr){!1===fr.animate||0===fr.duration?(u(1),Xe()):(this._easeStart=wr.now(),this._easeOptions=fr,this._onEaseFrame=u,this._onEaseEnd=Xe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,fr){u=Xe.b2(u,-180,180);const Ar=Math.abs(u-fr);return Math.abs(u-360-fr)<Ar&&(u-=360),Math.abs(u+360-fr)<Ar&&(u+=360),u}_normalizeCenter(u,Xe){if(!Xe.renderWorldCopies||Xe.lngRange)return;const fr=u.lng-Xe.center.lng;u.lng+=fr>180?-360:fr<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(Xe.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const rc={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class xs{constructor(u=rc){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=u=>{!u||"metadata"!==u.sourceDataType&&"visibility"!==u.sourceDataType&&"style"!==u.dataType&&"terrain"!==u.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,Xe){const fr=this._map._getUIString(`AttributionControl.${Xe}`);u.title=fr,u.setAttribute("aria-label",fr)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map((u=>"string"!=typeof u?"":u))):"string"==typeof this.options.customAttribution&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const Xe=this._map.style.sourceCaches;for(const fr in Xe){const Ar=Xe[fr];if(Ar.used||Ar.usedForTerrain){const Xe=Ar.getSource();Xe.attribution&&u.indexOf(Xe.attribution)<0&&u.push(Xe.attribution)}}u=u.filter((u=>String(u).trim())),u.sort(((u,Xe)=>u.length-Xe.length)),u=u.filter(((Xe,fr)=>{for(let Ar=fr+1;Ar<u.length;Ar++)if(u[Ar].indexOf(Xe)>=0)return!1;return!0}));const fr=u.join(" | ");fr!==this._attribHTML&&(this._attribHTML=fr,u.length?(this._innerContainer.innerHTML=fr,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ys{constructor(u={}){this._updateCompact=()=>{const u=this._container.children;if(u.length){const Xe=u[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&Xe.classList.add("maplibregl-compact"):Xe.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const Xe=r.create("a","maplibregl-ctrl-logo");return Xe.target="_blank",Xe.rel="noopener nofollow",Xe.href="https://maplibre.org/",Xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(Xe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class bs{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const Xe=++this._id;return this._queue.push({callback:u,id:Xe,cancelled:!1}),Xe}remove(u){const Xe=this._currentlyRunning,fr=Xe?this._queue.concat(Xe):this._queue;for(const Xe of fr)if(Xe.id===u)return void(Xe.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const Xe=this._currentlyRunning=this._queue;this._queue=[];for(const fr of Xe)if(!fr.cancelled&&(fr.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nc=Xe.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ts extends Xe.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,fr){this.sourceCache.update(u,fr),this._renderableTilesKeys=[];const Ar={};for(const _r of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:fr}))Ar[_r.key]=!0,this._renderableTilesKeys.push(_r.key),this._tiles[_r.key]||(_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),this._tiles[_r.key]=new lt(_r,this.tileSize));for(const u in this._tiles)Ar[u]||delete this._tiles[u]}freeRtt(u){for(const Xe in this._tiles){const fr=this._tiles[Xe];(!u||fr.tileID.equals(u)||fr.tileID.isChildOf(u)||u.isChildOf(fr.tileID))&&(fr.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((u=>this.getTileByID(u)))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const fr={};for(const Ar of this._renderableTilesKeys){const _r=this._tiles[Ar].tileID;if(_r.canonical.equals(u.canonical)){const _r=u.clone();_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),fr[Ar]=_r}else if(_r.canonical.isChildOf(u.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Kr=_r.canonical.z-u.canonical.z,In=_r.canonical.x-(_r.canonical.x>>Kr<<Kr),io=_r.canonical.y-(_r.canonical.y>>Kr<<Kr),no=Xe.X>>Kr;Xe.aP(wr.posMatrix,0,no,0,no,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[-In*no,-io*no,0]),fr[Ar]=wr}else if(u.canonical.isChildOf(_r.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Kr=u.canonical.z-_r.canonical.z,In=u.canonical.x-(u.canonical.x>>Kr<<Kr),io=u.canonical.y-(u.canonical.y>>Kr<<Kr),no=Xe.X>>Kr;Xe.aP(wr.posMatrix,0,Xe.X,0,Xe.X,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[In*no,io*no,0]),Xe.K(wr.posMatrix,wr.posMatrix,[1/2**Kr,1/2**Kr,0]),fr[Ar]=wr}}return fr}getSourceTile(u,Xe){const fr=this.sourceCache._source;let Ar=u.overscaledZ-this.deltaZoom;if(Ar>fr.maxzoom&&(Ar=fr.maxzoom),Ar<fr.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(Ar).key);let _r=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!_r||!_r.dem)&&Xe)for(;Ar>=fr.minzoom&&(!_r||!_r.dem);)_r=this.sourceCache.getTileByID(u.scaledTo(Ar--).key);return _r}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter((Xe=>Xe.timeAdded>=u))}}class Is{constructor(u,Xe,fr){this.painter=u,this.sourceCache=new Ts(Xe),this.options=fr,this.exaggeration="number"==typeof fr.exaggeration?fr.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,fr,Ar,_r=Xe.X){var wr;if(!(fr>=0&&fr<_r&&Ar>=0&&Ar<_r))return 0;const Kr=this.getTerrainData(u),In=null===(wr=Kr.tile)||void 0===wr?void 0:wr.dem;if(!In)return 0;const io=function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1];return u[0]=fr[0]*Ar+fr[4]*_r+fr[12],u[1]=fr[1]*Ar+fr[5]*_r+fr[13],u}([],[fr/_r*Xe.X,Ar/_r*Xe.X],Kr.u_terrain_matrix),no=[io[0]*In.dim,io[1]*In.dim],oo=Math.floor(no[0]),so=Math.floor(no[1]),ao=no[0]-oo,co=no[1]-so;return In.get(oo,so)*(1-ao)*(1-co)+In.get(oo+1,so)*ao*(1-co)+In.get(oo,so+1)*(1-ao)*co+In.get(oo+1,so+1)*ao*co}getElevationForLngLatZoom(u,fr){if(!Xe.ba(fr,u.wrap()))return 0;const{tileID:Ar,mercatorX:_r,mercatorY:wr}=this._getOverscaledTileIDFromLngLatZoom(u,fr);return this.getElevation(Ar,_r%Xe.X,wr%Xe.X,Xe.X)}getElevation(u,fr,Ar,_r=Xe.X){return this.getDEMElevation(u,fr,Ar,_r)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const u=this.painter.context,fr=new Xe.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new b(u,fr,u.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new b(u,new Xe.R({width:1,height:1}),u.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=Xe.an([])}const fr=this.sourceCache.getSourceTile(u,!0);if(fr&&fr.dem&&(!fr.demTexture||fr.needsTerrainPrepare)){const u=this.painter.context;fr.demTexture=this.painter.getTileTexture(fr.dem.stride),fr.demTexture?fr.demTexture.update(fr.dem.getPixels(),{premultiply:!1}):fr.demTexture=new b(u,fr.dem.getPixels(),u.gl.RGBA,{premultiply:!1}),fr.demTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),fr.needsTerrainPrepare=!1}const Ar=fr&&fr+fr.tileID.key+u.key;if(Ar&&!this._demMatrixCache[Ar]){const Ar=this.sourceCache.sourceCache._source.maxzoom;let _r=u.canonical.z-fr.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=Ar?_r=u.canonical.z-Ar:Xe.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const wr=u.canonical.x-(u.canonical.x>>_r<<_r),Kr=u.canonical.y-(u.canonical.y>>_r<<_r),In=Xe.bb(new Float64Array(16),[1/(Xe.X<<_r),1/(Xe.X<<_r),0]);Xe.J(In,In,[wr*Xe.X,Kr*Xe.X,0]),this._demMatrixCache[u.key]={matrix:In,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:fr&&fr.dem&&fr.dem.dim||1,u_terrain_matrix:Ar?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:fr&&fr.dem&&fr.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(fr&&fr.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:fr}}getFramebuffer(u){const Xe=this.painter,fr=Xe.width/devicePixelRatio,Ar=Xe.height/devicePixelRatio;return!this._fbo||this._fbo.width===fr&&this._fbo.height===Ar||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new b(Xe.context,{width:fr,height:Ar,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new b(Xe.context,{width:fr,height:Ar,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=Xe.context.createFramebuffer(fr,Ar,!0,!1),this._fbo.depthAttachment.set(Xe.context.createRenderbuffer(Xe.context.gl.DEPTH_COMPONENT16,fr,Ar))),this._fbo.colorAttachment.set("coords"===u?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const fr=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let u=0,Xe=0;u<this._coordsTextureSize;u++)for(let Ar=0;Ar<this._coordsTextureSize;Ar++,Xe+=4)fr[Xe+0]=255&Ar,fr[Xe+1]=255&u,fr[Xe+2]=Ar>>8<<4|u>>8,fr[Xe+3]=0;const Ar=new Xe.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(fr.buffer)),_r=new b(u,Ar,u.gl.RGBA,{premultiply:!1});return _r.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=_r,_r}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const fr=new Uint8Array(4),Ar=this.painter.context,_r=Ar.gl,wr=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),Kr=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),In=Math.round(this.painter.height/devicePixelRatio);Ar.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),_r.readPixels(wr,In-Kr-1,1,1,_r.RGBA,_r.UNSIGNED_BYTE,fr),Ar.bindFramebuffer.set(null);const io=fr[0]+(fr[2]>>4<<8),no=fr[1]+((15&fr[2])<<8),oo=this.coordsIndex[255-fr[3]],so=oo&&this.sourceCache.getTileByID(oo);if(!so)return null;const ao=this._coordsTextureSize,co=(1<<so.tileID.canonical.z)*ao;return new Xe.Z((so.tileID.canonical.x*ao+io)/co+so.tileID.wrap,(so.tileID.canonical.y*ao+no)/co,this.getElevation(so.tileID,io,no,ao))}depthAtPoint(u){const Xe=new Uint8Array(4),fr=this.painter.context,Ar=fr.gl;return fr.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Ar.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,Ar.RGBA,Ar.UNSIGNED_BYTE,Xe),fr.bindFramebuffer.set(null),(Xe[0]/16777216+Xe[1]/65536+Xe[2]/256+Xe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,fr=new Xe.bc,Ar=new Xe.aX,_r=this.meshSize,wr=Xe.X/_r,Kr=_r*_r;for(let u=0;u<=_r;u++)for(let Xe=0;Xe<=_r;Xe++)fr.emplaceBack(Xe*wr,u*wr,0);for(let u=0;u<Kr;u+=_r+1)for(let Xe=0;Xe<_r;Xe++)Ar.emplaceBack(Xe+u,_r+Xe+u+1,_r+Xe+u+2),Ar.emplaceBack(Xe+u,_r+Xe+u+2,Xe+u+1);const In=fr.length,io=In+2*(_r+1);for(const u of[0,1])for(let Ar=0;Ar<=_r;Ar++)for(const _r of[0,1])fr.emplaceBack(Ar*wr,u*Xe.X,_r);for(let u=0;u<2*_r;u+=2)Ar.emplaceBack(io+u,io+u+1,io+u+3),Ar.emplaceBack(io+u,io+u+3,io+u+2),Ar.emplaceBack(In+u,In+u+3,In+u+1),Ar.emplaceBack(In+u,In+u+2,In+u+3);const no=fr.length,oo=no+2*(_r+1);for(const u of[0,1])for(let Ar=0;Ar<=_r;Ar++)for(const _r of[0,1])fr.emplaceBack(u*Xe.X,Ar*wr,_r);for(let u=0;u<2*_r;u+=2)Ar.emplaceBack(no+u,no+u+1,no+u+3),Ar.emplaceBack(no+u,no+u+3,no+u+2),Ar.emplaceBack(oo+u,oo+u+3,oo+u+1),Ar.emplaceBack(oo+u,oo+u+2,oo+u+3);return this._mesh=new ua(u.createVertexBuffer(fr,nc.members),u.createIndexBuffer(Ar),Xe.a0.simpleSegment(0,0,fr.length,Ar.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*Xe.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,Xe){var fr;const{tileID:Ar}=this._getOverscaledTileIDFromLngLatZoom(u,Xe);return null!==(fr=this.getMinMaxElevation(Ar).minElevation)&&void 0!==fr?fr:0}getMinMaxElevation(u){const Xe=this.getTerrainData(u).tile,fr={minElevation:null,maxElevation:null};return Xe&&Xe.dem&&(fr.minElevation=Xe.dem.min*this.exaggeration,fr.maxElevation=Xe.dem.max*this.exaggeration),fr}_getOverscaledTileIDFromLngLatZoom(u,fr){const Ar=Xe.Z.fromLngLat(u.wrap()),_r=(1<<fr)*Xe.X,wr=Ar.x*_r,Kr=Ar.y*_r,In=Math.floor(wr/Xe.X),io=Math.floor(Kr/Xe.X);return{tileID:new Xe.S(fr,0,fr,In,io),mercatorX:wr,mercatorY:Kr}}}class Es{constructor(u,Xe,fr){this._context=u,this._size=Xe,this._tileSize=fr,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const Xe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),fr=new b(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return fr.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),Xe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),Xe.colorAttachment.set(fr.texture),{id:u,fbo:Xe,texture:fr,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((Xe=>u.id!==Xe)),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const u of this._recentlyUsed)if(!this._objects[u].inUse)return this._objects[u];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some((u=>!u.inUse))}}const oc={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Cs{constructor(u,Xe){this.painter=u,this.terrain=Xe,this.pool=new Es(u.context,30,Xe.sourceCache.tileSize*Xe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,Xe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter((fr=>!u._layers[fr].isHidden(Xe))),this._coordsDescendingInv={};for(const Xe in u.sourceCaches){this._coordsDescendingInv[Xe]={};const fr=u.sourceCaches[Xe].getVisibleCoordinates();for(const u of fr){const fr=this.terrain.sourceCache.getTerrainCoords(u);for(const u in fr)this._coordsDescendingInv[Xe][u]||(this._coordsDescendingInv[Xe][u]=[]),this._coordsDescendingInv[Xe][u].push(fr[u])}}this._coordsDescendingInvStr={};for(const Xe of u._order){const fr=u._layers[Xe],Ar=fr.source;if(oc[fr.type]&&!this._coordsDescendingInvStr[Ar]){this._coordsDescendingInvStr[Ar]={};for(const u in this._coordsDescendingInv[Ar])this._coordsDescendingInvStr[Ar][u]=this._coordsDescendingInv[Ar][u].map((u=>u.key)).sort().join()}}for(const u of this._renderableTiles)for(const Xe in this._coordsDescendingInvStr){const fr=this._coordsDescendingInvStr[Xe][u.tileID.key];fr&&fr!==u.rttCoords[Xe]&&(u.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const fr=u.type,Ar=this.painter,_r=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(oc[fr]&&(this._prevType&&oc[this._prevType]||this._stacks.push([]),this._prevType=fr,this._stacks[this._stacks.length-1].push(u.id),!_r))return!0;if(oc[this._prevType]||oc[fr]&&_r){this._prevType=fr;const u=this._stacks.length-1,_r=this._stacks[u]||[];for(const fr of this._renderableTiles){if(this.pool.isFull()&&(ca(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fr),fr.rtt[u]){const Xe=this.pool.getObjectForId(fr.rtt[u].id);if(Xe.stamp===fr.rtt[u].stamp){this.pool.useObject(Xe);continue}}const wr=this.pool.getOrCreateFreeObject();this.pool.useObject(wr),this.pool.stampObject(wr),fr.rtt[u]={id:wr.id,stamp:wr.stamp},Ar.context.bindFramebuffer.set(wr.fbo.framebuffer),Ar.context.clear({color:Xe.aM.transparent,stencil:0}),Ar.currentStencilSource=void 0;for(let u=0;u<_r.length;u++){const Xe=Ar.style._layers[_r[u]],Kr=Xe.source?this._coordsDescendingInv[Xe.source][fr.tileID.key]:[fr.tileID];Ar.context.viewport.set([0,0,wr.fbo.width,wr.fbo.height]),Ar._renderTileClippingMasks(Xe,Kr),Ar.renderLayer(Ar,Ar.style.sourceCaches[Xe.source],Xe,Kr),Xe.source&&(fr.rttCoords[Xe.source]=this._coordsDescendingInvStr[Xe.source][fr.tileID.key])}}return ca(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),oc[fr]}return!1}}const ac={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},dc=fr,mc={hash:!1,interactive:!0,bearingSnap:7,attributionControl:rc,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ms=u=>{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},Ic={showCompass:!0,showZoom:!0,visualizePitch:!1};class Rs{constructor(u,fr,Ar=!1){this.mousedown=u=>{this.startMouse(Xe.e({},u,{ctrlKey:!0,preventDefault:()=>u.preventDefault()}),r.mousePos(this.element,u)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=u=>{this.moveMouse(u,r.mousePos(this.element,u))},this.mouseup=u=>{this.mouseRotate.dragEnd(u),this.mousePitch&&this.mousePitch.dragEnd(u),this.offTemp()},this.touchstart=u=>{1!==u.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.startTouch(u,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=u=>{1!==u.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.moveTouch(u,this._lastPos))},this.touchend=u=>{0===u.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const _r=u.dragRotate._mouseRotate.getClickTolerance(),wr=u.dragRotate._mousePitch.getClickTolerance();this.element=fr,this.mouseRotate=Va({clickTolerance:_r,enable:!0}),this.touchRotate=(({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:fr=.8})=>{const Ar=new Za;return new Na({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*fr}),moveStateManager:Ar,enable:u,assignEvents:Ms})})({clickTolerance:_r,enable:!0}),this.map=u,Ar&&(this.mousePitch=Ga({clickTolerance:wr,enable:!0}),this.touchPitch=(({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:fr=-.5})=>{const Ar=new Za;return new Na({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*fr}),moveStateManager:Ar,enable:u,assignEvents:Ms})})({clickTolerance:wr,enable:!0})),r.addEventListener(fr,"mousedown",this.mousedown),r.addEventListener(fr,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(fr,"touchcancel",this.reset)}startMouse(u,Xe){this.mouseRotate.dragStart(u,Xe),this.mousePitch&&this.mousePitch.dragStart(u,Xe),r.disableDrag()}startTouch(u,Xe){this.touchRotate.dragStart(u,Xe),this.touchPitch&&this.touchPitch.dragStart(u,Xe),r.disableDrag()}moveMouse(u,Xe){const fr=this.map,{bearingDelta:Ar}=this.mouseRotate.dragMove(u,Xe)||{};if(Ar&&fr.setBearing(fr.getBearing()+Ar),this.mousePitch){const{pitchDelta:Ar}=this.mousePitch.dragMove(u,Xe)||{};Ar&&fr.setPitch(fr.getPitch()+Ar)}}moveTouch(u,Xe){const fr=this.map,{bearingDelta:Ar}=this.touchRotate.dragMove(u,Xe)||{};if(Ar&&fr.setBearing(fr.getBearing()+Ar),this.touchPitch){const{pitchDelta:Ar}=this.touchPitch.dragMove(u,Xe)||{};Ar&&fr.setPitch(fr.getPitch()+Ar)}}off(){const u=this.element;r.removeEventListener(u,"mousedown",this.mousedown),r.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let yc;function Ls(u,fr,Ar){const _r=new Xe.N(u.lng,u.lat);if(u=new Xe.N(u.lng,u.lat),fr){const _r=new Xe.N(u.lng-360,u.lat),wr=new Xe.N(u.lng+360,u.lat),Kr=Ar.locationPoint(u).distSqr(fr);Ar.locationPoint(_r).distSqr(fr)<Kr?u=_r:Ar.locationPoint(wr).distSqr(fr)<Kr&&(u=wr)}for(;Math.abs(u.lng-Ar.center.lng)>180;){const Xe=Ar.locationPoint(u);if(Xe.x>=0&&Xe.y>=0&&Xe.x<=Ar.width&&Xe.y<=Ar.height)break;u.lng>Ar.center.lng?u.lng-=360:u.lng+=360}return u.lng!==_r.lng&&Ar.locationPoint(u).y>Ar.height/2-Ar.getHorizon()?u:_r}const Ac={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Bs(u,Xe,fr){const Ar=u.classList;for(const u in Ac)Ar.remove(`maplibregl-${fr}-anchor-${u}`);Ar.add(`maplibregl-${fr}-anchor-${Xe}`)}class Os extends Xe.E{constructor(u){if(super(),this._onKeyPress=u=>{const Xe=u.code,fr=u.charCode||u.keyCode;"Space"!==Xe&&"Enter"!==Xe&&32!==fr&&13!==fr||this.togglePopup()},this._onMapClick=u=>{const Xe=u.originalEvent.target,fr=this._element;this._popup&&(Xe===fr||fr.contains(Xe))&&this.togglePopup()},this._update=u=>{var Xe;if(!this._map)return;const fr=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==u?void 0:u.type)||"render"===(null==u?void 0:u.type)&&!fr)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Ls(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ar="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?Ar=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(Ar=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?_r="rotateX(0deg)":"map"===this._pitchAlignment&&(_r=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||u&&"moveend"!==u.type||(this._pos=this._pos.round()),r.setTransform(this._element,`${Ac[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_r} ${Ar}`),wr.frameAsync(new AbortController).then((()=>{this._updateOpacity(u&&"moveend"===u.type)})).catch((()=>{}))},this._onMove=u=>{if(!this._isDragging){const Xe=this._clickTolerance||this._map._clickTolerance;this._isDragging=u.point.dist(this._pointerdownPos)>=Xe}this._isDragging&&(this._pos=u.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Xe.k("dragstart"))),this.fire(new Xe.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new Xe.k("dragend")),this._state="inactive"},this._addDragHandler=u=>{this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&"auto"!==u.pitchAlignment?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(null==u?void 0:u.opacity,null==u?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=Xe.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const fr=r.createNS("http://www.w3.org/2000/svg","svg"),Ar=41,_r=27;fr.setAttributeNS(null,"display","block"),fr.setAttributeNS(null,"height",`${Ar}px`),fr.setAttributeNS(null,"width",`${_r}px`),fr.setAttributeNS(null,"viewBox",`0 0 ${_r} ${Ar}`);const wr=r.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"stroke","none"),wr.setAttributeNS(null,"stroke-width","1"),wr.setAttributeNS(null,"fill","none"),wr.setAttributeNS(null,"fill-rule","evenodd");const Kr=r.createNS("http://www.w3.org/2000/svg","g");Kr.setAttributeNS(null,"fill-rule","nonzero");const In=r.createNS("http://www.w3.org/2000/svg","g");In.setAttributeNS(null,"transform","translate(3.0, 29.0)"),In.setAttributeNS(null,"fill","#000000");const io=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const u of io){const Xe=r.createNS("http://www.w3.org/2000/svg","ellipse");Xe.setAttributeNS(null,"opacity","0.04"),Xe.setAttributeNS(null,"cx","10.5"),Xe.setAttributeNS(null,"cy","5.80029008"),Xe.setAttributeNS(null,"rx",u.rx),Xe.setAttributeNS(null,"ry",u.ry),In.appendChild(Xe)}const no=r.createNS("http://www.w3.org/2000/svg","g");no.setAttributeNS(null,"fill",this._color);const oo=r.createNS("http://www.w3.org/2000/svg","path");oo.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),no.appendChild(oo);const so=r.createNS("http://www.w3.org/2000/svg","g");so.setAttributeNS(null,"opacity","0.25"),so.setAttributeNS(null,"fill","#000000");const ao=r.createNS("http://www.w3.org/2000/svg","path");ao.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),so.appendChild(ao);const co=r.createNS("http://www.w3.org/2000/svg","g");co.setAttributeNS(null,"transform","translate(6.0, 7.0)"),co.setAttributeNS(null,"fill","#FFFFFF");const go=r.createNS("http://www.w3.org/2000/svg","g");go.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ho=r.createNS("http://www.w3.org/2000/svg","circle");ho.setAttributeNS(null,"fill","#000000"),ho.setAttributeNS(null,"opacity","0.25"),ho.setAttributeNS(null,"cx","5.5"),ho.setAttributeNS(null,"cy","5.5"),ho.setAttributeNS(null,"r","5.4999962");const Co=r.createNS("http://www.w3.org/2000/svg","circle");Co.setAttributeNS(null,"fill","#FFFFFF"),Co.setAttributeNS(null,"cx","5.5"),Co.setAttributeNS(null,"cy","5.5"),Co.setAttributeNS(null,"r","5.4999962"),go.appendChild(ho),go.appendChild(Co),Kr.appendChild(In),Kr.appendChild(no),Kr.appendChild(so),Kr.appendChild(co),Kr.appendChild(go),fr.appendChild(Kr),fr.setAttributeNS(null,"height",Ar*this._scale+"px"),fr.setAttributeNS(null,"width",_r*this._scale+"px"),this._element.appendChild(fr),this._offset=Xe.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(u=>{u.preventDefault()})),this._element.addEventListener("mousedown",(u=>{u.preventDefault()})),Bs(this._element,this._anchor,"marker"),u&&u.className)for(const Xe of u.className.split(" "))this._element.classList.add(Xe);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const Xe=38.1,fr=13.5,Ar=Math.abs(fr)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Xe],"bottom-left":[Ar,-1*(Xe-fr+Ar)],"bottom-right":[-Ar,-1*(Xe-fr+Ar)],left:[fr,-1*(Xe-fr)],right:[-fr,-1*(Xe-fr)]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var fr,Ar;if(!(null===(fr=this._map)||void 0===fr?void 0:fr.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const _r=this._map,wr=_r.terrain.depthAtPoint(this._pos),Kr=_r.terrain.getElevationForLngLatZoom(this._lngLat,_r.transform.tileZoom);if(_r.transform.lngLatToCameraDepth(this._lngLat,Kr)-wr<.006)return void(this._element.style.opacity=this._opacity);const In=-this._offset.y/_r.transform._pixelPerMeter,io=Math.sin(_r.getPitch()*Math.PI/180)*In,no=_r.terrain.depthAtPoint(new Xe.P(this._pos.x,this._pos.y-this._offset.y)),oo=_r.transform.lngLatToCameraDepth(this._lngLat,Kr+io)-no>.006;(null===(Ar=this._popup)||void 0===Ar?void 0:Ar.isOpen())&&oo&&this._popup.remove(),this._element.style.opacity=oo?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=Xe.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&"auto"!==u?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,Xe){return void 0===u&&void 0===Xe&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==u&&(this._opacity=u),void 0!==Xe&&(this._opacityWhenCovered=Xe),this._map&&this._updateOpacity(!0),this}}const bc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let _c=0,vc=!1;const Pc={maxWidth:100,unit:"metric"};function qs(u,Xe,fr){const Ar=fr&&fr.maxWidth||100,_r=u._container.clientHeight/2,wr=u.unproject([0,_r]),Kr=u.unproject([Ar,_r]),In=wr.distanceTo(Kr);if(fr&&"imperial"===fr.unit){const fr=3.2808*In;fr>5280?Vs(Xe,Ar,fr/5280,u._getUIString("ScaleControl.Miles")):Vs(Xe,Ar,fr,u._getUIString("ScaleControl.Feet"))}else fr&&"nautical"===fr.unit?Vs(Xe,Ar,In/1852,u._getUIString("ScaleControl.NauticalMiles")):In>=1e3?Vs(Xe,Ar,In/1e3,u._getUIString("ScaleControl.Kilometers")):Vs(Xe,Ar,In,u._getUIString("ScaleControl.Meters"))}function Vs(u,Xe,fr,Ar){const _r=function(u){const Xe=Math.pow(10,`${Math.floor(u)}`.length-1);let fr=u/Xe;return fr=fr>=10?10:fr>=5?5:fr>=3?3:fr>=2?2:fr>=1?1:function(u){const Xe=Math.pow(10,Math.ceil(-Math.log(u)/Math.LN10));return Math.round(u*Xe)/Xe}(fr),Xe*fr}(fr);u.style.width=Xe*(_r/fr)+"px",u.innerHTML=`${_r}&nbsp;${Ar}`}const tg={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},eg=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ws(u){if(u){if("number"==typeof u){const fr=Math.round(Math.abs(u)/Math.SQRT2);return{center:new Xe.P(0,0),top:new Xe.P(0,u),"top-left":new Xe.P(fr,fr),"top-right":new Xe.P(-fr,fr),bottom:new Xe.P(0,-u),"bottom-left":new Xe.P(fr,-fr),"bottom-right":new Xe.P(-fr,-fr),left:new Xe.P(u,0),right:new Xe.P(-u,0)}}if(u instanceof Xe.P||Array.isArray(u)){const fr=Xe.P.convert(u);return{center:fr,top:fr,"top-left":fr,"top-right":fr,bottom:fr,"bottom-left":fr,"bottom-right":fr,left:fr,right:fr}}return{center:Xe.P.convert(u.center||[0,0]),top:Xe.P.convert(u.top||[0,0]),"top-left":Xe.P.convert(u["top-left"]||[0,0]),"top-right":Xe.P.convert(u["top-right"]||[0,0]),bottom:Xe.P.convert(u.bottom||[0,0]),"bottom-left":Xe.P.convert(u["bottom-left"]||[0,0]),"bottom-right":Xe.P.convert(u["bottom-right"]||[0,0]),left:Xe.P.convert(u.left||[0,0]),right:Xe.P.convert(u.right||[0,0])}}return Ws(new Xe.P(0,0))}const ig=fr;u.AJAXError=Xe.bg,u.Evented=Xe.E,u.LngLat=Xe.N,u.MercatorCoordinate=Xe.Z,u.Point=Xe.P,u.addProtocol=Xe.bh,u.config=Xe.a,u.removeProtocol=Xe.bi,u.AttributionControl=xs,u.BoxZoomHandler=ka,u.CanvasSource=et,u.CooperativeGesturesHandler=ds,u.DoubleClickZoomHandler=rs,u.DragPanHandler=hs,u.DragRotateHandler=cs,u.EdgeInsets=ma,u.FullscreenControl=class extends Xe.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var u;let Xe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null===(u=null==Xe?void 0:Xe.shadowRoot)||void 0===u?void 0:u.fullscreenElement;)Xe=Xe.shadowRoot.fullscreenElement;Xe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:Xe.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new Xe.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new Xe.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},u.GeoJSONSource=J,u.GeolocateControl=class extends Xe.E{constructor(u){super(),this._onSuccess=u=>{if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new Xe.k("outofmaxbounds",u)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=u,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(u),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("geolocate",u)),this._finish()}},this._updateCamera=u=>{const fr=new Xe.N(u.coords.longitude,u.coords.latitude),Ar=u.coords.accuracy,_r=this._map.getBearing(),wr=Xe.e({bearing:_r},this.options.fitBoundsOptions),Kr=H.fromLngLat(fr,Ar);this._map.fitBounds(Kr,wr,{geolocateSource:!0})},this._updateMarker=u=>{if(u){const fr=new Xe.N(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(fr).addTo(this._map),this._userLocationDotMarker.setLngLat(fr).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=u=>{if(this._map){if(this.options.trackUserLocation)if(1===u.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===u.code&&vc)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("error",u)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=u=>{if(this._map){if(!1===u){Xe.w("Geolocation support is not available so the GeolocateControl will be disabled.");const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}else{const u=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Os({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Os({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(u=>{u.geolocateSource||"ACTIVE_LOCK"!==this._watchState||u.originalEvent&&"resize"===u.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Xe.k("trackuserlocationend")),this.fire(new Xe.k("userlocationlostfocus")))}))}},this.options=Xe.e({},bc,u)}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return Xe._(this,arguments,void 0,(function*(u=!1){if(void 0!==yc&&!u)return yc;if(void 0===window.navigator.permissions)return yc=!!window.navigator.geolocation,yc;try{const u=yield window.navigator.permissions.query({name:"geolocation"});yc="denied"!==u.state}catch(u){yc=!!window.navigator.geolocation}return yc}))}().then((u=>this._finishSetupUI(u))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_c=0,vc=!1}_isOutOfMapMaxBounds(u){const Xe=this._map.getMaxBounds(),fr=u.coords;return Xe&&(fr.longitude<Xe.getWest()||fr.longitude>Xe.getEast()||fr.latitude<Xe.getSouth()||fr.latitude>Xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),Xe=u.getSouthEast(),fr=u.getNorthEast(),Ar=Xe.distanceTo(fr),_r=Math.ceil(this._accuracy/(Ar/this._map._container.clientHeight)*2);this._circleElement.style.width=`${_r}px`,this._circleElement.style.height=`${_r}px`}trigger(){if(!this._setup)return Xe.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new Xe.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":_c--,vc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new Xe.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new Xe.k("trackuserlocationstart")),this.fire(new Xe.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_c++,_c>1?(u={maximumAge:6e5,timeout:0},vc=!0):(u=this.options.positionOptions,vc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},u.Hash=xa,u.ImageSource=Q,u.KeyboardHandler=is,u.LngLatBounds=H,u.LogoControl=ys,u.Map=class extends gs{constructor(u){Xe.be.mark(Xe.bf.create);const fr=Object.assign(Object.assign({},mc),u);if(null!=fr.minZoom&&null!=fr.maxZoom&&fr.minZoom>fr.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=fr.minPitch&&null!=fr.maxPitch&&fr.minPitch>fr.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=fr.minPitch&&fr.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=fr.maxPitch&&fr.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ga(fr.minZoom,fr.maxZoom,fr.minPitch,fr.maxPitch,fr.renderWorldCopies),{bearingSnap:fr.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new bs,this._controls=[],this._mapId=Xe.a4(),this._contextLost=u=>{u.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new Xe.k("webglcontextlost",{originalEvent:u}))},this._contextRestored=u=>{this._setupPainter(),this.resize(),this._update(),this.fire(new Xe.k("webglcontextrestored",{originalEvent:u}))},this._onMapScroll=u=>{if(u.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fr.interactive,this._maxTileCacheSize=fr.maxTileCacheSize,this._maxTileCacheZoomLevels=fr.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===fr.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===fr.preserveDrawingBuffer,this._antialias=!0===fr.antialias,this._trackResize=!0===fr.trackResize,this._bearingSnap=fr.bearingSnap,this._refreshExpiredTiles=!0===fr.refreshExpiredTiles,this._fadeDuration=fr.fadeDuration,this._crossSourceCollisions=!0===fr.crossSourceCollisions,this._collectResourceTiming=!0===fr.collectResourceTiming,this._locale=Object.assign(Object.assign({},ac),fr.locale),this._clickTolerance=fr.clickTolerance,this._overridePixelRatio=fr.pixelRatio,this._maxCanvasSize=fr.maxCanvasSize,this.transformCameraUpdate=fr.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===fr.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=so.addThrottleControl((()=>this.isMoving())),this._requestManager=new p(fr.transformRequest),"string"==typeof fr.container){if(this._container=document.getElementById(fr.container),!this._container)throw new Error(`Container '${fr.container}' not found.`)}else{if(!(fr.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=fr.container}if(fr.maxBounds&&this.setMaxBounds(fr.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let u=!1;const Xe=va((u=>{this._trackResize&&!this._removed&&this.resize(u)._update()}),50);this._resizeObserver=new ResizeObserver((fr=>{u?Xe(fr):u=!0})),this._resizeObserver.observe(this._container)}this.handlers=new fs(this,fr),this._hash=fr.hash&&new xa("string"==typeof fr.hash&&fr.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:fr.center,zoom:fr.zoom,bearing:fr.bearing,pitch:fr.pitch}),fr.bounds&&(this.resize(),this.fitBounds(fr.bounds,Xe.e({},fr.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=fr.localIdeographFontFamily,this._validateStyle=fr.validateStyle,fr.style&&this.setStyle(fr.style,{localIdeographFontFamily:fr.localIdeographFontFamily}),fr.attributionControl&&this.addControl(new xs("boolean"==typeof fr.attributionControl?void 0:fr.attributionControl)),fr.maplibreLogo&&this.addControl(new ys,fr.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(u=>{this._update("style"===u.dataType),this.fire(new Xe.k(`${u.dataType}data`,u))})),this.on("dataloading",(u=>{this.fire(new Xe.k(`${u.dataType}dataloading`,u))})),this.on("dataabort",(u=>{this.fire(new Xe.k("sourcedataabort",u))}))}_getMapId(){return this._mapId}addControl(u,fr){if(void 0===fr&&(fr=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new Xe.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const Ar=u.onAdd(this);this._controls.push(u);const _r=this._controlPositions[fr];return-1!==fr.indexOf("bottom")?_r.insertBefore(Ar,_r.firstChild):_r.appendChild(Ar),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new Xe.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const fr=this._controls.indexOf(u);return fr>-1&&this._controls.splice(fr,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,Xe,fr,Ar){return null==Ar&&this.terrain&&(Ar=this.terrain.getElevationForLngLatZoom(fr,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,Xe,fr,Ar)}resize(u){var fr;const Ar=this._containerDimensions(),_r=Ar[0],wr=Ar[1],Kr=this._getClampedPixelRatio(_r,wr);if(this._resizeCanvas(_r,wr,Kr),this.painter.resize(_r,wr,Kr),this.painter.overLimit()){const u=this.painter.context.gl;this._maxCanvasSize=[u.drawingBufferWidth,u.drawingBufferHeight];const Xe=this._getClampedPixelRatio(_r,wr);this._resizeCanvas(_r,wr,Xe),this.painter.resize(_r,wr,Xe)}this.transform.resize(_r,wr),null===(fr=this._requestedCameraState)||void 0===fr||fr.resize(_r,wr);const In=!this._moving;return In&&(this.stop(),this.fire(new Xe.k("movestart",u)).fire(new Xe.k("move",u))),this.fire(new Xe.k("resize",u)),In&&this.fire(new Xe.k("moveend",u)),this}_getClampedPixelRatio(u,Xe){const{0:fr,1:Ar}=this._maxCanvasSize,_r=this.getPixelRatio(),wr=u*_r,Kr=Xe*_r;return Math.min(wr>fr?fr/wr:1,Kr>Ar?Ar/Kr:1)*_r}getPixelRatio(){var u;return null!==(u=this._overridePixelRatio)&&void 0!==u?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(H.convert(u)),this._update()}setMinZoom(u){if((u=null==u?-2:u)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()<u&&this.setZoom(u),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(u){if((u=null==u?22:u)>=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=null==u?0:u)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()<u&&this.setPitch(u),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(u){if((u=null==u?60:u)>85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}project(u){return this.transform.locationPoint(Xe.N.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||(null===(u=this.handlers)||void 0===u?void 0:u.isMoving())}isZooming(){var u;return this._zooming||(null===(u=this.handlers)||void 0===u?void 0:u.isZooming())}isRotating(){var u;return this._rotating||(null===(u=this.handlers)||void 0===u?void 0:u.isRotating())}_createDelegatedListener(u,Xe,fr){if("mouseenter"===u||"mouseover"===u){let Ar=!1;const s=_r=>{const wr=this.getLayer(Xe)?this.queryRenderedFeatures(_r.point,{layers:[Xe]}):[];wr.length?Ar||(Ar=!0,fr.call(this,new Sa(u,this,_r.originalEvent,{features:wr}))):Ar=!1};return{layer:Xe,listener:fr,delegates:{mousemove:s,mouseout:()=>{Ar=!1}}}}if("mouseleave"===u||"mouseout"===u){let Ar=!1;const s=_r=>{(this.getLayer(Xe)?this.queryRenderedFeatures(_r.point,{layers:[Xe]}):[]).length?Ar=!0:Ar&&(Ar=!1,fr.call(this,new Sa(u,this,_r.originalEvent)))},o=Xe=>{Ar&&(Ar=!1,fr.call(this,new Sa(u,this,Xe.originalEvent)))};return{layer:Xe,listener:fr,delegates:{mousemove:s,mouseout:o}}}{const a=u=>{const Ar=this.getLayer(Xe)?this.queryRenderedFeatures(u.point,{layers:[Xe]}):[];Ar.length&&(u.features=Ar,fr.call(this,u),delete u.features)};return{layer:Xe,listener:fr,delegates:{[u]:a}}}}on(u,Xe,fr){if(void 0===fr)return super.on(u,Xe);const Ar=this._createDelegatedListener(u,Xe,fr);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(Ar);for(const u in Ar.delegates)this.on(u,Ar.delegates[u]);return this}once(u,Xe,fr){if(void 0===fr)return super.once(u,Xe);const Ar=this._createDelegatedListener(u,Xe,fr);for(const u in Ar.delegates)this.once(u,Ar.delegates[u]);return this}off(u,Xe,fr){return void 0===fr?super.off(u,Xe):(this._delegatedListeners&&this._delegatedListeners[u]&&(()=>{const Ar=this._delegatedListeners[u];for(let u=0;u<Ar.length;u++){const _r=Ar[u];if(_r.layer===Xe&&_r.listener===fr){for(const u in _r.delegates)this.off(u,_r.delegates[u]);return Ar.splice(u,1),this}}})(),this)}queryRenderedFeatures(u,fr){if(!this.style)return[];let Ar;const _r=u instanceof Xe.P||Array.isArray(u),wr=_r?u:[[0,0],[this.transform.width,this.transform.height]];if(fr=fr||(_r?{}:u)||{},wr instanceof Xe.P||"number"==typeof wr[0])Ar=[Xe.P.convert(wr)];else{const u=Xe.P.convert(wr[0]),fr=Xe.P.convert(wr[1]);Ar=[u,new Xe.P(fr.x,u.y),fr,new Xe.P(u.x,fr.y),u]}return this.style.queryRenderedFeatures(Ar,fr,this.transform)}querySourceFeatures(u,Xe){return this.style.querySourceFeatures(u,Xe)}setStyle(u,fr){return!1!==(fr=Xe.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},fr)).diff&&fr.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,fr),this):(this._localIdeographFontFamily=fr.localIdeographFontFamily,this._updateStyle(u,fr))}setTransformRequest(u){return this._requestManager.setTransformRequest(u),this}_getUIString(u){const Xe=this._locale[u];if(null==Xe)throw new Error(`Missing UI string '${u}'`);return Xe}_updateStyle(u,Xe){if(Xe.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(u,Xe)));const fr=this.style&&Xe.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new ue(this,Xe||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof u?this.style.loadURL(u,Xe,fr):this.style.loadJSON(u,Xe,fr),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ue(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,fr){if("string"==typeof u){const Ar=this._requestManager.transformRequest(u,"Style");Xe.h(Ar,new AbortController).then((u=>{this._updateDiff(u.data,fr)})).catch((u=>{u&&this.fire(new Xe.j(u))}))}else"object"==typeof u&&this._updateDiff(u,fr)}_updateDiff(u,fr){try{this.style.setState(u,fr)&&this._update(!0)}catch(Ar){Xe.w(`Unable to perform style diff: ${Ar.message||Ar.error||Ar}.  Rebuilding the style from scratch.`),this._updateStyle(u,fr)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():Xe.w("There is no style added to the map.")}addSource(u,Xe){return this._lazyInitEmptyStyle(),this.style.addSource(u,Xe),this._update(!0)}isSourceLoaded(u){const fr=this.style&&this.style.sourceCaches[u];if(void 0!==fr)return fr.loaded();this.fire(new Xe.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const fr=this.style.sourceCaches[u.source];if(!fr)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);null===this.terrain&&fr.reload();for(const fr in this.style._layers){const Ar=this.style._layers[fr];"hillshade"===Ar.type&&Ar.source===u.source&&Xe.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Is(this.painter,fr,u),this.painter.renderToTexture=new Cs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=Xe=>{"style"===Xe.dataType?this.terrain.sourceCache.freeRtt():"source"===Xe.dataType&&Xe.tile&&(Xe.sourceId!==u.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(Xe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new Xe.k("terrain",{terrain:u})),this}getTerrain(){var u,Xe;return null!==(Xe=null===(u=this.terrain)||void 0===u?void 0:u.options)&&void 0!==Xe?Xe:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const Xe in u){const fr=u[Xe]._tiles;for(const u in fr){const Xe=fr[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}}return!0}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,fr,Ar={}){const{pixelRatio:_r=1,sdf:Kr=!1,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so}=Ar;if(this._lazyInitEmptyStyle(),!(fr instanceof HTMLImageElement||Xe.b(fr))){if(void 0===fr.width||void 0===fr.height)return this.fire(new Xe.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Ar,height:wr,data:ao}=fr,co=fr;return this.style.addImage(u,{data:new Xe.R({width:Ar,height:wr},new Uint8Array(ao)),pixelRatio:_r,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so,sdf:Kr,version:0,userImage:co}),co.onAdd&&co.onAdd(this,u),this}}{const{width:Ar,height:ao,data:co}=wr.getImageData(fr);this.style.addImage(u,{data:new Xe.R({width:Ar,height:ao},co),pixelRatio:_r,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so,sdf:Kr,version:0})}}updateImage(u,fr){const Ar=this.style.getImage(u);if(!Ar)return this.fire(new Xe.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _r=fr instanceof HTMLImageElement||Xe.b(fr)?wr.getImageData(fr):fr,{width:Kr,height:In,data:io}=_r;if(void 0===Kr||void 0===In)return this.fire(new Xe.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Kr!==Ar.data.width||In!==Ar.data.height)return this.fire(new Xe.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const no=!(fr instanceof HTMLImageElement||Xe.b(fr));return Ar.data.replace(io,no),this.style.updateImage(u,Ar),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new Xe.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u){return so.getImage(this._requestManager.transformRequest(u,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(u,Xe){return this._lazyInitEmptyStyle(),this.style.addLayer(u,Xe),this._update(!0)}moveLayer(u,Xe){return this.style.moveLayer(u,Xe),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,Xe,fr){return this.style.setLayerZoomRange(u,Xe,fr),this._update(!0)}setFilter(u,Xe,fr={}){return this.style.setFilter(u,Xe,fr),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,Xe,fr,Ar={}){return this.style.setPaintProperty(u,Xe,fr,Ar),this._update(!0)}getPaintProperty(u,Xe){return this.style.getPaintProperty(u,Xe)}setLayoutProperty(u,Xe,fr,Ar={}){return this.style.setLayoutProperty(u,Xe,fr,Ar),this._update(!0)}getLayoutProperty(u,Xe){return this.style.getLayoutProperty(u,Xe)}setGlyphs(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,Xe),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,Xe,fr={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,Xe,fr,(u=>{u||this._update(!0)})),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,Xe,(u=>{u||this._update(!0)})),this}setLight(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,Xe),this._update(!0)}getLight(){return this.style.getLight()}setSky(u){return this._lazyInitEmptyStyle(),this.style.setSky(u),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(u,Xe){return this.style.setFeatureState(u,Xe),this._update()}removeFeatureState(u,Xe){return this.style.removeFeatureState(u,Xe),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,Xe=0;return this._container&&(u=this._container.clientWidth||400,Xe=this._container.clientHeight||300),[u,Xe]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const Xe=this._canvasContainer=r.create("div","maplibregl-canvas-container",u);this._interactive&&Xe.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",Xe),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const fr=this._containerDimensions(),Ar=this._getClampedPixelRatio(fr[0],fr[1]);this._resizeCanvas(fr[0],fr[1],Ar);const _r=this._controlContainer=r.create("div","maplibregl-control-container",u),wr=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((u=>{wr[u]=r.create("div",`maplibregl-ctrl-${u} `,_r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(u,Xe,fr){this._canvas.width=Math.floor(fr*u),this._canvas.height=Math.floor(fr*Xe),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${Xe}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let Xe=null;this._canvas.addEventListener("webglcontextcreationerror",(fr=>{Xe={requestedAttributes:u},fr&&(Xe.statusMessage=fr.statusMessage,Xe.type=fr.type)}),{once:!0});const fr=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!fr){const u="Failed to initialize WebGL";throw Xe?(Xe.message=u,new Error(JSON.stringify(Xe))):new Error(u)}this.painter=new da(fr,this.transform),Kr.testSupport(fr)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const fr=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let Ar=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const u=this.transform.zoom,_r=wr.now();this.style.zoomHistory.update(u,_r);const Kr=new Xe.z(u,{now:_r,fadeDuration:fr,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),In=Kr.crossFadingFactor();1===In&&In===this._crossFadingFactor||(Ar=!0,this._crossFadingFactor=In),this.style.update(Kr)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,fr,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:fr,showPadding:this.showPadding}),this.fire(new Xe.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Xe.be.mark(Xe.bf.load),this.fire(new Xe.k("load"))),this.style&&(this.style.hasTransitions()||Ar)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const _r=this._sourcesDirty||this._styleDirty||this._placementDirty;return _r||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new Xe.k("idle")),!this._loaded||this._fullyLoaded||_r||(this._fullyLoaded=!0,Xe.be.mark(Xe.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const u of this._controls)u.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),so.removeThrottleControl(this._imageQueueHandle),null===(u=this._resizeObserver)||void 0===u||u.disconnect();const fr=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==fr?void 0:fr.loseContext)&&fr.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),Xe.be.clearMetrics(),this._removed=!0,this.fire(new Xe.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((u=>{Xe.be.frame(u),this._frameRequest=null,this._render(u)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return dc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Sa,u.MapTouchEvent=za,u.MapWheelEvent=Da,u.Marker=Os,u.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const u=this._map.getZoom(),Xe=u===this._map.getMaxZoom(),fr=u===this._map.getMinZoom();this._zoomInButton.disabled=Xe,this._zoomOutButton.disabled=fr,this._zoomInButton.setAttribute("aria-disabled",Xe.toString()),this._zoomOutButton.setAttribute("aria-disabled",fr.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,Xe)=>{const fr=this._map._getUIString(`NavigationControl.${Xe}`);u.title=fr,u.setAttribute("aria-label",fr)},this.options=Xe.e({},Ic,u),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(u=>this._map.zoomIn({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(u=>this._map.zoomOut({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})})),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Rs(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(u,Xe){const fr=r.create("button",u,this._container);return fr.type="button",fr.addEventListener("click",Xe),fr}},u.Popup=class extends Xe.E{constructor(u){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new Xe.k("close"))),this),this._onMouseUp=u=>{this._update(u.point)},this._onMouseMove=u=>{this._update(u.point)},this._onDrag=u=>{this._update(u.point)},this._update=u=>{var Xe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const u of this.options.className.split(" "))this._container.classList.add(u);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Ls(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._trackPointer&&!u)return;const fr=this._flatPos=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&u?u:this._map.transform.locationPoint(this._lngLat));let Ar=this.options.anchor;const _r=Ws(this.options.offset);if(!Ar){const u=this._container.offsetWidth,Xe=this._container.offsetHeight;let wr;wr=fr.y+_r.bottom.y<Xe?["top"]:fr.y>this._map.transform.height-Xe?["bottom"]:[],fr.x<u/2?wr.push("left"):fr.x>this._map.transform.width-u/2&&wr.push("right"),Ar=0===wr.length?"bottom":wr.join("-")}let wr=fr.add(_r[Ar]);this.options.subpixelPositioning||(wr=wr.round()),r.setTransform(this._container,`${Ac[Ar]} translate(${wr.x}px,${wr.y}px)`),Bs(this._container,Ar,"popup")},this._onClose=()=>{this.remove()},this.options=Xe.e(Object.create(tg),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new Xe.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const Xe=document.createDocumentFragment(),fr=document.createElement("body");let Ar;for(fr.innerHTML=u;Ar=fr.firstChild,Ar;)Xe.appendChild(Ar);return this.setDOMContent(Xe)}getMaxWidth(){var u;return null===(u=this._container)||void 0===u?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(eg);u&&u.focus()}},u.RasterDEMTileSource=K,u.RasterTileSource=X,u.ScaleControl=class{constructor(u){this._onMove=()=>{qs(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,qs(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Pc),u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=os,u.Style=ue,u.TerrainControl=class{constructor(u){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=u}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=ts,u.TwoFingersTouchRotateHandler=Ya,u.TwoFingersTouchZoomHandler=Ka,u.TwoFingersTouchZoomRotateHandler=us,u.VectorTileSource=$,u.VideoSource=tt,u.addSourceType=(u,fr)=>Xe._(void 0,void 0,void 0,(function*(){if(at(u))throw new Error(`A source type called "${u}" already exists.`);((u,Xe)=>{ss[u]=Xe})(u,fr)})),u.clearPrewarmedResources=function(){const u=xo;u&&(u.isPreloaded()&&1===u.numActive()?(u.release(Co),xo=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return Xe.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return nt().getRTLTextPluginStatus()},u.getVersion=function(){return ig},u.getWorkerCount=function(){return L.workerCount},u.getWorkerUrl=function(){return Xe.a.WORKER_URL},u.importScriptInWorkers=function(u){return U().broadcast("IS",u)},u.prewarm=function(){N().acquire(Co)},u.setMaxParallelImageRequests=function(u){Xe.a.MAX_PARALLEL_IMAGE_REQUESTS=u},u.setRTLTextPlugin=function(u,Xe){return nt().setRTLTextPlugin(u,Xe)},u.setWorkerCount=function(u){L.workerCount=u},u.setWorkerUrl=function(u){Xe.a.WORKER_URL=u}})),u},"object"==typeof u&&"undefined"!=typeof module?module.exports=gg():"function"==typeof define&&define.amd?define(gg):(cg="undefined"!=typeof globalThis?globalThis:cg||self).maplibregl=gg();var hg=dsv$1(","),ug=hg.parse,dg=hg.parseRows,pg=hg.format,mg=hg.formatRows,Cg=dsv$1("\t"),Ig=Cg.parse,fg=Cg.parseRows,yg=Cg.format,Ag=Cg.formatRows,bg=getAugmentedNamespace(Object.freeze({__proto__:null,csvFormat:pg,csvFormatRows:mg,csvParse:ug,csvParseRows:dg,dsvFormat:dsv$1,tsvFormat:yg,tsvFormatRows:Ag,tsvParse:Ig,tsvParseRows:fg})),_g={exports:{}};function format(u,Xe){var fr=coordToDMS(u,Xe);return fr.whole+"° "+(fr.minutes?fr.minutes+"' ":"")+(fr.seconds?fr.seconds+'" ':"")+fr.dir}function coordToDMS(u,Xe){var fr=({lat:["N","S"],lon:["E","W"]}[Xe]||"")[u>=0?0:1],Ar=Math.abs(u),_r=Math.floor(Ar),wr=60*(Ar-_r),Kr=Math.floor(wr);return{whole:_r,minutes:Kr,seconds:Math.floor(60*(wr-Kr)),dir:fr}}function search(u,Xe){if(Xe||(Xe="NSEW"),"string"!=typeof u)return null;var fr=(u=u.toUpperCase()).match(/^[\s\,]*([NSEW])?\s*([\-|—|―]?[0-9.]+)[°º˚]?\s*(?:([0-9.]+)['’′‘]\s*)?(?:([0-9.]+)(?:''|"|”|″)\s*)?([NSEW])?/);if(!fr)return null;var Ar,_r=fr[0];if(fr[1]&&fr[5]?(Ar=fr[1],_r=_r.slice(0,-1)):Ar=fr[1]||fr[5],Ar&&-1===Xe.indexOf(Ar))return null;var wr=fr[2]?parseFloat(fr[2]):0,Kr=fr[3]?parseFloat(fr[3])/60:0,In=fr[4]?parseFloat(fr[4])/3600:0,io=wr<0?-1:1;return"S"!==Ar&&"W"!==Ar||(io*=-1),{val:(Math.abs(wr)+Kr+In)*io,dim:Ar,matched:_r,remain:u.slice(_r.length)}}_g.exports=function element(u,Xe){var fr=search(u,Xe);return null===fr?null:fr.val},_g.exports.pair=function pair(u,Xe){var fr=search(u=u.trim(),Xe);if(!fr)return null;var Ar=search(u=fr.remain.trim(),Xe);if(!Ar||Ar.remain)return null;return fr.dim?function swapdim(u,Xe,fr){if("N"===fr||"S"===fr)return[u,Xe];if("W"===fr||"E"===fr)return[Xe,u]}(fr.val,Ar.val,fr.dim):[fr.val,Ar.val]},_g.exports.format=format,_g.exports.formatPair=function formatPair(u){return format(u.lat,"lat")+" "+format(u.lon,"lon")},_g.exports.coordToDMS=coordToDMS;var vg=_g.exports,xg=bg,wg=vg,Sg=/(Lat)(itude)?/gi,kg=/(L)(on|ng)(gitude)?/i;function guessHeader(u,Xe){var fr,Ar,_r;for(var wr in u)(Ar=wr.match(Xe))&&(!fr||Ar[0].length/wr.length>_r)&&(_r=Ar[0].length/wr.length,fr=wr);return fr}function guessLatHeader(u){return guessHeader(u,Sg)}function guessLonHeader(u){return guessHeader(u,kg)}function keyCount(u){return"object"==typeof u?Object.keys(u).length:0}function autoDelimiter(u){var Xe=[];return[",",";","\t","|"].forEach((function(fr){var Ar=xg.dsvFormat(fr).parse(u);if(Ar.length>=1){for(var _r=keyCount(Ar[0]),wr=0;wr<Ar.length;wr++)if(keyCount(Ar[wr])!==_r)return;Xe.push({delimiter:fr,arity:Object.keys(Ar[0]).length})}})),Xe.length?Xe.sort((function(u,Xe){return Xe.arity-u.arity}))[0].delimiter:null}var Bg={isLon:function isLon(u){return!!u.match(kg)},isLat:function isLat(u){return!!u.match(Sg)},guessLatHeader:guessLatHeader,guessLonHeader:guessLonHeader,csv:xg.csvParse,tsv:xg.tsvParse,dsv:xg,auto:function auto(u){var Xe=autoDelimiter(u);return Xe?function deleteColumns(u){return delete u.columns,u}(xg.dsvFormat(Xe).parse(u)):null},csv2geojson:function csv2geojson(u,Xe,fr){fr||(fr=Xe,Xe={}),Xe.delimiter=Xe.delimiter||",";var Ar=Xe.latfield||"",_r=Xe.lonfield||"",wr=Xe.crs||"",Kr=[],In={type:"FeatureCollection",features:Kr};if(""!==wr&&(In.crs={type:"name",properties:{name:wr}}),"auto"!==Xe.delimiter||"string"!=typeof u||(Xe.delimiter=autoDelimiter(u),Xe.delimiter)){var io=Xe.numericFields?Xe.numericFields.split(","):null,no="string"==typeof u?xg.dsvFormat(Xe.delimiter).parse(u,(function(u){if(io)for(var Xe in u)io.includes(Xe)&&(u[Xe]=+u[Xe]);return u})):u;if(no.length){var oo,so=[];if(Ar||(Ar=guessLatHeader(no[0])),_r||(_r=guessLonHeader(no[0])),!Ar||!_r){for(oo=0;oo<no.length;oo++)Kr.push({type:"Feature",properties:no[oo],geometry:null});fr(so.length?so:null,In)}else{for(oo=0;oo<no.length;oo++)if(void 0!==no[oo][_r]&&void 0!==no[oo][Ar]){var ao,co,go,ho=no[oo][_r],Co=no[oo][Ar];(go=wg(ho,"EW"))&&(ho=go),(go=wg(Co,"NS"))&&(Co=go),ao=parseFloat(ho),co=parseFloat(Co),isNaN(ao)||isNaN(co)?so.push({message:"A row contained an invalid value for latitude or longitude",row:no[oo],index:oo}):(Xe.includeLatLon||(delete no[oo][_r],delete no[oo][Ar]),Kr.push({type:"Feature",properties:no[oo],geometry:{type:"Point",coordinates:[parseFloat(ao),parseFloat(co)]}}))}fr(so.length?so:null,In)}}else fr(null,In)}else fr({type:"Error",message:"Could not autodetect delimiter"})},toLine:function toLine(u){for(var Xe=u.features,fr={type:"Feature",geometry:{type:"LineString",coordinates:[]}},Ar=0;Ar<Xe.length;Ar++)fr.geometry.coordinates.push(Xe[Ar].geometry.coordinates);return fr.properties=Xe.reduce((function(u,Xe){for(var fr in Xe.properties)u[fr]||(u[fr]=[]),u[fr].push(Xe.properties[fr]);return u}),{}),{type:"FeatureCollection",features:[fr]}},toPolygon:function toPolygon(u){for(var Xe=u.features,fr={type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}},Ar=0;Ar<Xe.length;Ar++)fr.geometry.coordinates[0].push(Xe[Ar].geometry.coordinates);return fr.properties=Xe.reduce((function(u,Xe){for(var fr in Xe.properties)u[fr]||(u[fr]=[]),u[fr].push(Xe.properties[fr]);return u}),{}),{type:"FeatureCollection",features:[fr]}}};function identity(u){return u}function feature(u,Xe){var fr=Xe.id,Ar=Xe.bbox,_r=null==Xe.properties?{}:Xe.properties,wr=function object(u,Xe){var fr=function transform(u){if(null==u)return identity;var Xe,fr,Ar=u.scale[0],_r=u.scale[1],wr=u.translate[0],Kr=u.translate[1];return function(u,In){In||(Xe=fr=0);var io=2,no=u.length,oo=new Array(no);for(oo[0]=(Xe+=u[0])*Ar+wr,oo[1]=(fr+=u[1])*_r+Kr;io<no;)oo[io]=u[io],++io;return oo}}(u.transform),Ar=u.arcs;function arc(u,Xe){Xe.length&&Xe.pop();for(var _r=Ar[u<0?~u:u],wr=0,Kr=_r.length;wr<Kr;++wr)Xe.push(fr(_r[wr],wr));u<0&&function reverse(u,Xe){for(var fr,Ar=u.length,_r=Ar-Xe;_r<--Ar;)fr=u[_r],u[_r++]=u[Ar],u[Ar]=fr}(Xe,Kr)}function point(u){return fr(u)}function line(u){for(var Xe=[],fr=0,Ar=u.length;fr<Ar;++fr)arc(u[fr],Xe);return Xe.length<2&&Xe.push(Xe[0]),Xe}function ring(u){for(var Xe=line(u);Xe.length<4;)Xe.push(Xe[0]);return Xe}function polygon(u){return u.map(ring)}function geometry(u){var Xe,fr=u.type;switch(fr){case"GeometryCollection":return{type:fr,geometries:u.geometries.map(geometry)};case"Point":Xe=point(u.coordinates);break;case"MultiPoint":Xe=u.coordinates.map(point);break;case"LineString":Xe=line(u.arcs);break;case"MultiLineString":Xe=u.arcs.map(line);break;case"Polygon":Xe=polygon(u.arcs);break;case"MultiPolygon":Xe=u.arcs.map(polygon);break;default:return null}return{type:fr,coordinates:Xe}}return geometry(Xe)}(u,Xe);return null==fr&&null==Ar?{type:"Feature",properties:_r,geometry:wr}:null==Ar?{type:"Feature",id:fr,properties:_r,geometry:wr}:{type:"Feature",id:fr,bbox:Ar,properties:_r,geometry:wr}}function $(u,Xe){return Array.from(u.getElementsByTagName(Xe))}function normalizeId(u){return"#"===u[0]?u:`#${u}`}function nodeVal(u){return u?.normalize(),u&&u.textContent||""}function get1(u,Xe,fr){const Ar=u.getElementsByTagName(Xe),_r=Ar.length?Ar[0]:null;return _r&&fr&&fr(_r),_r}function get(u,Xe,fr){const Ar={};if(!u)return Ar;const _r=u.getElementsByTagName(Xe),wr=_r.length?_r[0]:null;return wr&&fr?fr(wr,Ar):Ar}function val1(u,Xe,fr){const Ar=nodeVal(get1(u,Xe));return Ar&&fr&&fr(Ar)||{}}function $num(u,Xe,fr){const Ar=parseFloat(nodeVal(get1(u,Xe)));if(!isNaN(Ar))return Ar&&fr&&fr(Ar)||{}}function num1(u,Xe,fr){const Ar=parseFloat(nodeVal(get1(u,Xe)));if(!isNaN(Ar))return fr&&fr(Ar),Ar}function getMulti(u,Xe){const fr={};for(const Ar of Xe)val1(u,Ar,(u=>{fr[Ar]=u}));return fr}function isElement(u){return 1===u?.nodeType}function getLineStyle(u){return get(u,"line",(u=>Object.assign({},val1(u,"color",(u=>({stroke:`#${u}`}))),$num(u,"opacity",(u=>({"stroke-opacity":u}))),$num(u,"width",(u=>({"stroke-width":96*u/25.4}))))))}function getExtensions(u){let Xe=[];if(null===u)return Xe;for(const fr of Array.from(u.childNodes)){if(!isElement(fr))continue;const u=abbreviateName(fr.nodeName);if("gpxtpx:TrackPointExtension"===u)Xe=Xe.concat(getExtensions(fr));else{const Ar=nodeVal(fr);Xe.push([u,parseNumeric(Ar)])}}return Xe}function abbreviateName(u){return["heart","gpxtpx:hr","hr"].includes(u)?"heart":u}function parseNumeric(u){const Xe=parseFloat(u);return isNaN(Xe)?u:Xe}function coordPair$1(u){const Xe=[parseFloat(u.getAttribute("lon")||""),parseFloat(u.getAttribute("lat")||"")];if(isNaN(Xe[0])||isNaN(Xe[1]))return null;num1(u,"ele",(u=>{Xe.push(u)}));const fr=get1(u,"time");return{coordinates:Xe,time:fr?nodeVal(fr):null,extendedValues:getExtensions(get1(u,"extensions"))}}function extractProperties(u){const Xe=getMulti(u,["name","cmt","desc","type","time","keywords"]),fr=Array.from(u.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const Ar of fr)Ar.parentNode?.parentNode===u&&(Xe[Ar.tagName.replace(":","_")]=nodeVal(Ar));const Ar=$(u,"link");return Ar.length&&(Xe.links=Ar.map((u=>Object.assign({href:u.getAttribute("href")},getMulti(u,["text","type"]))))),Xe}function getPoints$1(u,Xe){const fr=$(u,Xe),Ar=[],_r=[],wr={};for(let u=0;u<fr.length;u++){const Xe=coordPair$1(fr[u]);if(Xe){Ar.push(Xe.coordinates),Xe.time&&_r.push(Xe.time);for(const[Ar,_r]of Xe.extendedValues){const Xe="heart"===Ar?Ar:Ar.replace("gpxtpx:","")+"s";wr[Xe]||(wr[Xe]=Array(fr.length).fill(null)),wr[Xe][u]=_r}}}if(!(Ar.length<2))return{line:Ar,times:_r,extendedValues:wr}}function getRoute(u){const Xe=getPoints$1(u,"rtept");if(Xe)return{type:"Feature",properties:Object.assign({_gpxType:"rte"},extractProperties(u),getLineStyle(get1(u,"extensions"))),geometry:{type:"LineString",coordinates:Xe.line}}}function getTrack(u){const Xe=$(u,"trkseg"),fr=[],Ar=[],_r=[];for(const u of Xe){const Xe=getPoints$1(u,"trkpt");Xe&&(_r.push(Xe),Xe.times&&Xe.times.length&&Ar.push(Xe.times))}if(0===_r.length)return null;const wr=_r.length>1,Kr=Object.assign({_gpxType:"trk"},extractProperties(u),getLineStyle(get1(u,"extensions")),Ar.length?{coordinateProperties:{times:wr?Ar:Ar[0]}}:{});for(const u of _r){fr.push(u.line),Kr.coordinateProperties||(Kr.coordinateProperties={});const Xe=Kr.coordinateProperties,Ar=Object.entries(u.extendedValues);for(let u=0;u<Ar.length;u++){const[fr,Kr]=Ar[u];wr?(Xe[fr]||(Xe[fr]=_r.map((u=>new Array(u.line.length).fill(null)))),Xe[fr][u]=Kr):Xe[fr]=Kr}}return{type:"Feature",properties:Kr,geometry:wr?{type:"MultiLineString",coordinates:fr}:{type:"LineString",coordinates:fr[0]}}}function getPoint(u){const Xe=Object.assign(extractProperties(u),getMulti(u,["sym"])),fr=coordPair$1(u);return fr?{type:"Feature",properties:Xe,geometry:{type:"Point",coordinates:fr.coordinates}}:null}function*gpxGen(u){for(const Xe of $(u,"trk")){const u=getTrack(Xe);u&&(yield u)}for(const Xe of $(u,"rte")){const u=getRoute(Xe);u&&(yield u)}for(const Xe of $(u,"wpt")){const u=getPoint(Xe);u&&(yield u)}}const Zg="http://www.garmin.com/xmlschemas/ActivityExtension/v2",Gg=[["heartRate","heartRates"],["Cadence","cadences"],["Speed","speeds"],["Watts","watts"]],Rg=[["TotalTimeSeconds","totalTimeSeconds"],["DistanceMeters","distanceMeters"],["MaximumSpeed","maxSpeed"],["AverageHeartRateBpm","avgHeartRate"],["MaximumHeartRateBpm","maxHeartRate"],["AvgSpeed","avgSpeed"],["AvgWatts","avgWatts"],["MaxWatts","maxWatts"]];function getProperties(u,Xe){const fr=[];for(const[Ar,_r]of Xe){let Xe=get1(u,Ar);if(!Xe){const fr=u.getElementsByTagNameNS(Zg,Ar);fr.length&&(Xe=fr[0])}const wr=parseFloat(nodeVal(Xe));isNaN(wr)||fr.push([_r,wr])}return fr}function coordPair(u){const Xe=[num1(u,"LongitudeDegrees"),num1(u,"LatitudeDegrees")];if(void 0===Xe[0]||isNaN(Xe[0])||void 0===Xe[1]||isNaN(Xe[1]))return null;const fr=get1(u,"HeartRateBpm"),Ar=nodeVal(get1(u,"Time"));return get1(u,"AltitudeMeters",(u=>{const fr=parseFloat(nodeVal(u));isNaN(fr)||Xe.push(fr)})),{coordinates:Xe,time:Ar||null,heartRate:fr?parseFloat(nodeVal(fr)):null,extensions:getProperties(u,Gg)}}function getPoints(u){const Xe=$(u,"Trackpoint"),fr=[],Ar=[],_r=[];if(Xe.length<2)return null;const wr={},Kr={extendedProperties:wr};for(let u=0;u<Xe.length;u++){const Kr=coordPair(Xe[u]);if(null===Kr)continue;fr.push(Kr.coordinates);const{time:In,heartRate:io,extensions:no}=Kr;In&&Ar.push(In),io&&_r.push(io);for(const[fr,Ar]of no)wr[fr]||(wr[fr]=Array(Xe.length).fill(null)),wr[fr][u]=Ar}return fr.length<2?null:Object.assign(Kr,{line:fr,times:Ar,heartRates:_r})}function getLap(u){const Xe=$(u,"Track"),fr=[],Ar=[],_r=[],wr=[];let Kr;const In=Object.assign(Object.fromEntries(getProperties(u,Rg)),get(u,"Name",(u=>({name:nodeVal(u)}))));for(const u of Xe)Kr=getPoints(u),Kr&&(fr.push(Kr.line),Kr.times.length&&Ar.push(Kr.times),Kr.heartRates.length&&_r.push(Kr.heartRates),wr.push(Kr.extendedProperties));for(let u=0;u<wr.length;u++){const Ar=wr[u];for(const _r in Ar)1===Xe.length?Kr&&(In[_r]=Kr.extendedProperties[_r]):(In[_r]||(In[_r]=fr.map((u=>Array(u.length).fill(null)))),In[_r][u]=Ar[_r])}return 0===fr.length?null:((Ar.length||_r.length)&&(In.coordinateProperties=Object.assign(Ar.length?{times:1===fr.length?Ar[0]:Ar}:{},_r.length?{heart:1===fr.length?_r[0]:_r}:{})),{type:"Feature",properties:In,geometry:1===fr.length?{type:"LineString",coordinates:fr[0]}:{type:"MultiLineString",coordinates:fr}})}function*tcxGen(u){for(const Xe of $(u,"Lap")){const u=getLap(Xe);u&&(yield u)}for(const Xe of $(u,"Courses")){const u=getLap(Xe);u&&(yield u)}}function fixColor(u,Xe){const fr={},Ar="stroke"==Xe||"fill"===Xe?Xe:Xe+"-color";return"#"===u[0]&&(u=u.substring(1)),6===u.length||3===u.length?fr[Ar]="#"+u:8===u.length&&(fr[Xe+"-opacity"]=parseInt(u.substring(0,2),16)/255,fr[Ar]="#"+u.substring(6,8)+u.substring(4,6)+u.substring(2,4)),fr}function numericProperty(u,Xe,fr){const Ar={};return num1(u,Xe,(u=>{Ar[fr]=u})),Ar}function getColor(u,Xe){return get(u,"color",(u=>fixColor(nodeVal(u),Xe)))}function extractIconHref(u){return get(u,"Icon",((u,Xe)=>(val1(u,"href",(u=>{Xe.icon=u})),Xe)))}function extractStyle(u){return Object.assign({},function extractPoly(u){return get(u,"PolyStyle",((u,Xe)=>Object.assign(Xe,get(u,"color",(u=>fixColor(nodeVal(u),"fill"))),val1(u,"fill",(u=>{if("0"===u)return{"fill-opacity":0}})),val1(u,"outline",(u=>{if("0"===u)return{"stroke-opacity":0}})))))}(u),function extractLine(u){return get(u,"LineStyle",(u=>Object.assign(getColor(u,"stroke"),numericProperty(u,"width","stroke-width"))))}(u),function extractLabel(u){return get(u,"LabelStyle",(u=>Object.assign(getColor(u,"label"),numericProperty(u,"scale","label-scale"))))}(u),function extractIcon(u){return get(u,"IconStyle",(u=>Object.assign(getColor(u,"icon"),numericProperty(u,"scale","icon-scale"),numericProperty(u,"heading","icon-heading"),get(u,"hotSpot",(u=>{const Xe=parseFloat(u.getAttribute("x")||""),fr=parseFloat(u.getAttribute("y")||""),Ar=u.getAttribute("xunits")||"",_r=u.getAttribute("yunits")||"";return isNaN(Xe)||isNaN(fr)?{}:{"icon-offset":[Xe,fr],"icon-offset-units":[Ar,_r]}})),extractIconHref(u))))}(u))}const toNumber=u=>Number(u),Vg={string:u=>u,int:toNumber,uint:toNumber,short:toNumber,ushort:toNumber,float:toNumber,double:toNumber,bool:u=>Boolean(u)};function extractExtendedData(u,Xe){return get(u,"ExtendedData",((u,fr)=>{for(const Xe of $(u,"Data"))fr[Xe.getAttribute("name")||""]=nodeVal(get1(Xe,"value"));for(const Ar of $(u,"SimpleData")){const u=Ar.getAttribute("name")||"",_r=Xe[u]||Vg.string;fr[u]=_r(nodeVal(Ar))}return fr}))}function getMaybeHTMLDescription(u){const Xe=get1(u,"description");for(const u of Array.from(Xe?.childNodes||[]))if(4===u.nodeType)return{description:{"@type":"html",value:nodeVal(u)}};return{}}function extractTimeSpan(u){return get(u,"TimeSpan",(u=>({timespan:{begin:nodeVal(get1(u,"begin")),end:nodeVal(get1(u,"end"))}})))}function extractTimeStamp(u){return get(u,"TimeStamp",(u=>({timestamp:nodeVal(get1(u,"when"))})))}function extractCascadedStyle(u,Xe){return val1(u,"styleUrl",(u=>(u=normalizeId(u),Xe[u]?Object.assign({styleUrl:u},Xe[u]):{styleUrl:u})))}const Wg=/\s*/g,Tg=/^\s*|\s*$/g,Mg=/\s+/;function coord1(u){return u.replace(Wg,"").split(",").map(parseFloat).filter((u=>!isNaN(u))).slice(0,3)}function coord(u){return u.replace(Tg,"").split(Mg).map(coord1).filter((u=>u.length>=2))}function gxCoords(u){let Xe=$(u,"coord");0===Xe.length&&(Xe=function $ns(u,Xe,fr){return Array.from(u.getElementsByTagNameNS(fr,Xe))}(u,"coord","*"));const fr=Xe.map((u=>nodeVal(u).split(" ").map(parseFloat)));return 0===fr.length?null:{geometry:fr.length>2?{type:"LineString",coordinates:fr}:{type:"Point",coordinates:fr[0]},times:$(u,"when").map((u=>nodeVal(u)))}}function fixRing(u){if(0===u.length)return u;const Xe=u[0],fr=u[u.length-1];let Ar=!0;for(let u=0;u<Math.max(Xe.length,fr.length);u++)if(Xe[u]!==fr[u]){Ar=!1;break}return Ar?u:u.concat([u[0]])}function getCoordinates(u){return nodeVal(get1(u,"coordinates"))}function getGeometry(u){let Xe=[],fr=[];for(let Ar=0;Ar<u.childNodes.length;Ar++){const _r=u.childNodes.item(Ar);if(isElement(_r))switch(_r.tagName){case"MultiGeometry":case"MultiTrack":case"gx:MultiTrack":{const u=getGeometry(_r);Xe=Xe.concat(u.geometries),fr=fr.concat(u.coordTimes);break}case"Point":{const u=coord1(getCoordinates(_r));u.length>=2&&Xe.push({type:"Point",coordinates:u});break}case"LinearRing":case"LineString":{const u=coord(getCoordinates(_r));u.length>=2&&Xe.push({type:"LineString",coordinates:u});break}case"Polygon":{const u=[];for(const Xe of $(_r,"LinearRing")){const fr=fixRing(coord(getCoordinates(Xe)));fr.length>=4&&u.push(fr)}u.length&&Xe.push({type:"Polygon",coordinates:u});break}case"Track":case"gx:Track":{const u=gxCoords(_r);if(!u)break;const{times:Ar,geometry:wr}=u;Xe.push(wr),Ar.length&&fr.push(Ar);break}}}return{geometries:Xe,coordTimes:fr}}function getPlacemark(u,Xe,fr,Ar){const{coordTimes:_r,geometries:wr}=getGeometry(u),Kr=function geometryListToGeometry(u){return 0===u.length?null:1===u.length?u[0]:{type:"GeometryCollection",geometries:u}}(wr);if(!Kr&&Ar.skipNullGeometry)return null;const In={type:"Feature",geometry:Kr,properties:Object.assign(getMulti(u,["name","address","visibility","open","phoneNumber","description"]),getMaybeHTMLDescription(u),extractCascadedStyle(u,Xe),extractStyle(u),extractExtendedData(u,fr),extractTimeSpan(u),extractTimeStamp(u),_r.length?{coordinateProperties:{times:1===_r.length?_r[0]:_r}}:{})};void 0!==In.properties?.visibility&&(In.properties.visibility="0"!==In.properties.visibility);const io=u.getAttribute("id");return null!==io&&""!==io&&(In.id=io),In}function getGroundOverlayBox(u){if(get1(u,"gx:LatLonQuad")){return{geometry:{type:"Polygon",coordinates:[fixRing(coord(getCoordinates(u)))]}}}return function getLatLonBox(u){const Xe=get1(u,"LatLonBox");if(Xe){const u=num1(Xe,"north"),fr=num1(Xe,"west"),Ar=num1(Xe,"east"),_r=num1(Xe,"south"),wr=num1(Xe,"rotation");if("number"==typeof u&&"number"==typeof _r&&"number"==typeof fr&&"number"==typeof Ar){const Xe=[fr,_r,Ar,u];let Kr=[[[fr,u],[Ar,u],[Ar,_r],[fr,_r],[fr,u]]];return"number"==typeof wr&&(Kr=function rotateBox(u,Xe,fr){const Ar=[(u[0]+u[2])/2,(u[1]+u[3])/2];return[Xe[0].map((u=>{const Xe=u[1]-Ar[1],_r=u[0]-Ar[0],wr=Math.sqrt(Math.pow(Xe,2)+Math.pow(_r,2)),Kr=Math.atan2(Xe,_r)+fr*Pg;return[Ar[0]+Math.cos(Kr)*wr,Ar[1]+Math.sin(Kr)*wr]}))]}(Xe,Kr,wr)),{bbox:Xe,geometry:{type:"Polygon",coordinates:Kr}}}}return null}(u)}const Pg=Math.PI/180;function getGroundOverlay(u,Xe,fr,Ar){const _r=getGroundOverlayBox(u),wr=_r?.geometry||null;if(!wr&&Ar.skipNullGeometry)return null;const Kr={type:"Feature",geometry:wr,properties:Object.assign({"@geometry-type":"groundoverlay"},getMulti(u,["name","address","visibility","open","phoneNumber","description"]),getMaybeHTMLDescription(u),extractCascadedStyle(u,Xe),extractStyle(u),extractIconHref(u),extractExtendedData(u,fr),extractTimeSpan(u),extractTimeStamp(u))};_r?.bbox&&(Kr.bbox=_r.bbox),void 0!==Kr.properties?.visibility&&(Kr.properties.visibility="0"!==Kr.properties.visibility);const In=u.getAttribute("id");return null!==In&&""!==In&&(Kr.id=In),Kr}function getStyleId(u){let Xe=u.getAttribute("id");const fr=u.parentNode;return!Xe&&isElement(fr)&&"CascadingStyle"===fr.localName&&(Xe=fr.getAttribute("kml:id")||fr.getAttribute("id")),normalizeId(Xe||"")}function buildStyleMap(u){const Xe={};for(const fr of $(u,"Style"))Xe[getStyleId(fr)]=extractStyle(fr);for(const fr of $(u,"StyleMap")){const u=normalizeId(fr.getAttribute("id")||"");val1(fr,"styleUrl",(fr=>{fr=normalizeId(fr),Xe[fr]&&(Xe[u]=Xe[fr])}))}return Xe}function buildSchema(u){const Xe={};for(const fr of $(u,"SimpleField"))Xe[fr.getAttribute("name")||""]=Vg[fr.getAttribute("type")||""]||Vg.string;return Xe}const Jg=["name","visibility","open","address","description","phoneNumber","visibility"];function*kmlGen(u,Xe={skipNullGeometry:!1}){const fr=buildStyleMap(u),Ar=buildSchema(u);for(const _r of $(u,"Placemark")){const u=getPlacemark(_r,fr,Ar,Xe);u&&(yield u)}for(const _r of $(u,"GroundOverlay")){const u=getGroundOverlay(_r,fr,Ar,Xe);u&&(yield u)}}var zg=Object.freeze({__proto__:null,gpx:function gpx(u){return{type:"FeatureCollection",features:Array.from(gpxGen(u))}},gpxGen:gpxGen,kml:function kml(u,Xe={skipNullGeometry:!1}){return{type:"FeatureCollection",features:Array.from(kmlGen(u,Xe))}},kmlGen:kmlGen,kmlWithFolders:function kmlWithFolders(u,Xe={skipNullGeometry:!1}){const fr=buildStyleMap(u),Ar=buildSchema(u),_r={type:"root",children:[]};return function traverse(u,Xe,_r){if(isElement(u))switch(u.tagName){case"GroundOverlay":{const wr=getGroundOverlay(u,fr,Ar,_r);wr&&Xe.children.push(wr);break}case"Placemark":{const wr=getPlacemark(u,fr,Ar,_r);wr&&Xe.children.push(wr);break}case"Folder":{const fr=function getFolder(u){const Xe={};for(const fr of Array.from(u.childNodes))isElement(fr)&&Jg.includes(fr.tagName)&&(Xe[fr.tagName]=nodeVal(fr));return{type:"folder",meta:Xe,children:[]}}(u);Xe.children.push(fr),Xe=fr;break}}if(u.childNodes)for(let fr=0;fr<u.childNodes.length;fr++)traverse(u.childNodes[fr],Xe,_r)}(u,_r,Xe),_r},tcx:function tcx(u){return{type:"FeatureCollection",features:Array.from(tcxGen(u))}},tcxGen:tcxGen}),Fg={exports:{}};!function(u){var Xe={};function py2_round(u){return Math.floor(Math.abs(u)+.5)*(u>=0?1:-1)}function encode(u,Xe,fr){var Ar=2*((u=py2_round(u*fr))-(Xe=py2_round(Xe*fr)));Ar<0&&(Ar=-Ar-1);for(var _r="";Ar>=32;)_r+=String.fromCharCode(63+(32|31&Ar)),Ar/=32;return _r+=String.fromCharCode(63+(0|Ar))}function flipped(u){for(var Xe=[],fr=0;fr<u.length;fr++){var Ar=u[fr].slice();Xe.push([Ar[1],Ar[0]])}return Xe}Xe.decode=function(u,Xe){for(var fr,Ar=0,_r=0,wr=0,Kr=[],In=0,io=0,no=null,oo=Math.pow(10,Number.isInteger(Xe)?Xe:5);Ar<u.length;){no=null,In=1,io=0;do{io+=(31&(no=u.charCodeAt(Ar++)-63))*In,In*=32}while(no>=32);fr=1&io?(-io-1)/2:io/2,In=1,io=0;do{io+=(31&(no=u.charCodeAt(Ar++)-63))*In,In*=32}while(no>=32);_r+=fr,wr+=1&io?(-io-1)/2:io/2,Kr.push([_r/oo,wr/oo])}return Kr},Xe.encode=function(u,Xe){if(!u.length)return"";for(var fr=Math.pow(10,Number.isInteger(Xe)?Xe:5),Ar=encode(u[0][0],0,fr)+encode(u[0][1],0,fr),_r=1;_r<u.length;_r++){var wr=u[_r],Kr=u[_r-1];Ar+=encode(wr[0],Kr[0],fr),Ar+=encode(wr[1],Kr[1],fr)}return Ar},Xe.fromGeoJSON=function(u,fr){if(u&&"Feature"===u.type&&(u=u.geometry),!u||"LineString"!==u.type)throw new Error("Input must be a GeoJSON LineString");return Xe.encode(flipped(u.coordinates),fr)},Xe.toGeoJSON=function(u,fr){return{type:"LineString",coordinates:flipped(Xe.decode(u,fr))}},u.exports&&(u.exports=Xe)}(Fg);var Eg=Fg.exports,Xg=(()=>{const first=u=>u[0],last=u=>u[u.length-1],coordsToKey=u=>u.join(","),addToMap=(u,Xe,fr)=>{let Ar=u[Xe];Ar?Ar.push(fr):u[Xe]=[fr]},removeFromMap=(u,Xe,fr)=>{let Ar=u[Xe],_r=null;Ar&&(_r=Ar.indexOf(fr))>=0&&Ar.splice(_r,1)},getFirstFromMap=(u,Xe)=>{let fr=u[Xe];return fr&&fr.length>0?fr[0]:null},isRing=u=>u.length>3&&coordsToKey(first(u))===coordsToKey(last(u)),ringDirection=(u,Xe,fr)=>{Xe=Xe||0,fr=fr||1;let Ar=u.reduce(((fr,Ar,_r)=>u[fr][Xe]>Ar[Xe]?fr:_r),0),_r=Ar<=0?u.length-2:Ar-1,wr=Ar>=u.length-1?1:Ar+1,Kr=u[_r][Xe],In=u[Ar][Xe],io=u[wr][Xe],no=u[_r][fr],oo=u[Ar][fr];return(In-Kr)*(u[wr][fr]-no)-(io-Kr)*(oo-no)<0?"clockwise":"counterclockwise"},strToFloat=u=>u instanceof Array?u.map(strToFloat):parseFloat(u);class RefElements extends Map{constructor(){super(),this.binders=[]}add(u,Xe){this.has(u)||this.set(u,Xe)}addBinder(u){this.binders.push(u)}bindAll(){this.binders.forEach((u=>u.bind()))}}return{purgeProps:(u,Xe)=>{if(u){let fr=Object.assign({},u);if(Xe)for(let u of Xe)delete fr[u];return fr}return{}},mergeProps:(u,Xe)=>(u=u||{},Xe=Xe||{},Object.assign(u,Xe)),first:first,last:last,coordsToKey:coordsToKey,addToMap:addToMap,removeFromMap:removeFromMap,getFirstFromMap:getFirstFromMap,isRing:isRing,ringDirection:ringDirection,ptInsidePolygon:(u,Xe,fr,Ar)=>{fr=fr||0,Ar=Ar||1;let _r=!1;for(let wr=0,Kr=Xe.length-1;wr<Xe.length;Kr=wr++)(Xe[wr][fr]<=u[fr]&&u[fr]<Xe[Kr][fr]||Xe[Kr][fr]<=u[fr]&&u[fr]<Xe[wr][fr])&&u[Ar]<(Xe[Kr][Ar]-Xe[wr][Ar])*(u[fr]-Xe[wr][fr])/(Xe[Kr][fr]-Xe[wr][fr])+Xe[wr][Ar]&&(_r=!_r);return _r},strToFloat:strToFloat,RefElements:RefElements,LateBinder:class LateBinder{constructor(u,Xe,fr,Ar){this.container=u,this.valueFunc=Xe,this.ctx=fr,this.args=Ar}bind(){let u=this.valueFunc.apply(this.ctx,this.args);if(this.container instanceof Array){let Xe=this.container.indexOf(this);if(Xe>=0){let fr=[Xe,1];u&&fr.push(u),[].splice.apply(this.container,fr)}}else if("object"==typeof this.container){let Xe=Object.keys(this.container).find((u=>this.container[u]===this));Xe&&(u?this.container[Xe]=u:delete this.container[Xe])}}},WayCollection:class WayCollection extends Array{constructor(){super(),this.firstMap={},this.lastMap={}}addWay(u){(u=u.toCoordsArray()).length>0&&(this.push(u),addToMap(this.firstMap,coordsToKey(first(u)),u),addToMap(this.lastMap,coordsToKey(last(u)),u))}toStrings(){let u=[],Xe=null;for(;Xe=this.shift();){removeFromMap(this.firstMap,coordsToKey(first(Xe)),Xe),removeFromMap(this.lastMap,coordsToKey(last(Xe)),Xe);let fr=Xe,Ar=null;do{let u=coordsToKey(last(fr)),Xe=!1;Ar=getFirstFromMap(this.firstMap,u),Ar||(Ar=getFirstFromMap(this.lastMap,u),Xe=!0),Ar&&(this.splice(this.indexOf(Ar),1),removeFromMap(this.firstMap,coordsToKey(first(Ar)),Ar),removeFromMap(this.lastMap,coordsToKey(last(Ar)),Ar),Xe&&(Ar.length>fr.length&&([fr,Ar]=[Ar,fr]),Ar.reverse()),fr=fr.concat(Ar.slice(1)))}while(Ar);u.push(strToFloat(fr))}return u}toRings(u){let Xe=this.toStrings(),fr=[],Ar=null;for(;Ar=Xe.shift();)isRing(Ar)&&(ringDirection(Ar)!==u&&Ar.reverse(),fr.push(Ar));return fr}}}})(),Hg={building:{},highway:{whitelist:["services","rest_area","escape","elevator"]},natural:{blacklist:["coastline","cliff","ridge","arete","tree_row"]},landuse:{},waterway:{whitelist:["riverbank","dock","boatyard","dam"]},amenity:{},leisure:{},barrier:{whitelist:["city_wall","ditch","hedge","retaining_wall","wall","spikes"]},railway:{whitelist:["station","turntable","roundhouse","platform"]},area:{},boundary:{},man_made:{blacklist:["cutline","embankment","pipeline"]},power:{whitelist:["plant","substation","generator","transformer"]},place:{},shop:{},aeroway:{blacklist:["taxiway"]},tourism:{},historic:{},public_transport:{},office:{},"building:part":{},military:{},ruins:{},"area:highway":{},craft:{},golf:{},indoor:{}},Kg=(()=>{const{first:u,last:Xe,coordsToKey:fr,addToMap:Ar,removeFromMap:_r,getFirstFromMap:wr,isRing:Kr,ringDirection:In,ptInsidePolygon:io,strToFloat:no,LateBinder:oo,WayCollection:so}=Xg,ao=Hg;class OsmObject{constructor(u,Xe,fr){this.type=u,this.id=Xe,this.refElems=fr,this.tags={},this.props={id:this.getCompositeId()},this.refCount=0,this.hasTag=!1,fr&&fr.add(this.getCompositeId(),this)}addTags(u){this.tags=Object.assign(this.tags,u),this.hasTag=!!u}addTag(u,Xe){this.tags[u]=Xe,this.hasTag=!!u}addProp(u,Xe){this.props[u]=Xe}addProps(u){this.props=Object.assign(this.props,u)}getCompositeId(){return`${this.type}/${this.id}`}getProps(){return Object.assign(this.props,this.tags)}toFeatureArray(){return[]}}class Node extends OsmObject{constructor(u,Xe){super("node",u,Xe),this.latLng=null}setLatLng(u){this.latLng=u}toFeatureArray(){return this.latLng?[{type:"Feature",id:this.getCompositeId(),properties:this.getProps(),geometry:{type:"Point",coordinates:no([this.latLng.lon,this.latLng.lat])}}]:[]}getLatLng(){return this.latLng}}class Way extends OsmObject{constructor(u,Xe){super("way",u,Xe),this.latLngArray=[],this.isPolygon=!1}addLatLng(u){this.latLngArray.push(u)}setLatLngArray(u){this.latLngArray=u}addNodeRef(u){let Xe=new oo(this.latLngArray,(function(u){let Xe=this.refElems.get(`node/${u}`);if(Xe)return Xe.refCount++,Xe.getLatLng()}),this,[u]);this.latLngArray.push(Xe),this.refElems.addBinder(Xe)}analyzeGeometryType(u,Xe){let fr=ao[u];fr&&(this.isPolygon=!0,fr.whitelist?this.isPolygon=fr.whitelist.indexOf(Xe)>=0:fr.blacklist&&(this.isPolygon=!(fr.blacklist.indexOf(Xe)>=0)))}addTags(u){super.addTags(u);for(let[Xe,fr]of Object.entries(u))this.analyzeGeometryType(Xe,fr)}addTag(u,Xe){super.addTag(u,Xe),this.analyzeGeometryType(u,Xe)}toCoordsArray(){return this.latLngArray.map((u=>[u.lon,u.lat]))}toFeatureArray(){let u=this.toCoordsArray();if(u.length>1){u=no(u);let Xe={type:"Feature",id:this.getCompositeId(),properties:this.getProps(),geometry:{type:"LineString",coordinates:u}};return this.isPolygon&&Kr(u)?("counterclockwise"!==In(u)&&u.reverse(),Xe.geometry={type:"Polygon",coordinates:[u]},[Xe]):[Xe]}return[]}}return{Node:Node,Way:Way,Relation:class Relation extends OsmObject{constructor(u,Xe){super("relation",u,Xe),this.relations=[],this.nodes=[],this.bounds=null}setBounds(u){this.bounds=u}addMember(u){switch(u.type){case"relation":let Xe=new oo(this.relations,(function(u){let Xe=this.refElems.get(`relation/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);this.relations.push(Xe),this.refElems.addBinder(Xe);break;case"way":u.role||(u.role="");let fr=this[u.role];if(fr||(fr=this[u.role]=[]),u.geometry){let Xe=new Way(u.ref,this.refElems);Xe.setLatLngArray(u.geometry),Xe.refCount++,fr.push(Xe)}else if(u.nodes){let Xe=new Way(u.ref,this.refElems);for(let fr of u.nodes)Xe.addNodeRef(fr);Xe.refCount++,fr.push(Xe)}else{let Xe=new oo(fr,(function(u){let Xe=this.refElems.get(`way/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);fr.push(Xe),this.refElems.addBinder(Xe)}break;case"node":let Ar=null;if(u.lat&&u.lon){Ar=new Node(u.ref,this.refElems),Ar.setLatLng({lon:u.lon,lat:u.lat}),u.tags&&Ar.addTags(u.tags);for(let[Xe,fr]of Object.entries(u))["id","type","lat","lon"].indexOf(Xe)<0&&Ar.addProp(Xe,fr);Ar.refCount++,this.nodes.push(Ar)}else{let Xe=new oo(this.nodes,(function(u){let Xe=this.refElems.get(`node/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);this.nodes.push(Xe),this.refElems.addBinder(Xe)}}}toFeatureArray(){let Xe=[],fr=[],Ar=[];const _r=["outer","inner",""];for(let u of this.relations)if(u)for(let Xe of _r){let fr=u[Xe];if(fr){let u=this[Xe];u?[].splice.apply(u,[u.length,0].concat(fr)):this[Xe]=fr}}for(let u of _r){let Xe=this[u];if(Xe){this[u]=new so;for(let fr of Xe)this[u].addWay(fr)}}let wr=null,Kr={type:"Feature",id:this.getCompositeId(),bbox:this.bounds,properties:this.getProps()};this.bounds||delete Kr.bbox,this.outer?(wr=((Xe,fr)=>{let Ar=Xe?Xe.toRings("counterclockwise"):[],_r=fr?fr.toRings("clockwise"):[];if(Ar.length>0){let Xe=[],fr=null;for(fr of Ar)Xe.push([fr]);for(;fr=_r.shift();)for(let _r in Ar)if(io(u(fr),Ar[_r])){Xe[_r].push(fr);break}return 1===Xe.length?{type:"Polygon",coordinates:Xe[0]}:{type:"MultiPolygon",coordinates:Xe}}return null})(this.outer,this.inner),wr&&(Kr.geometry=wr,Xe.push(Kr))):this[""]&&(wr=(u=>{let Xe=u?u.toStrings():[];return Xe.length>0?1===Xe.length?{type:"LineString",coordinates:Xe[0]}:{type:"MultiLineString",coordinates:Xe}:null})(this[""]),wr&&(Kr.geometry=wr,fr.push(Kr)));for(let u of this.nodes)Ar=Ar.concat(u.toFeatureArray());return Xe.concat(fr).concat(Ar)}}}})(),Lg=(()=>{function conditioned(u){return null!=u.match(/^(.+?)\[(.+?)\]>$/g)}function parseEvent(u){let Xe=/^(.+?)\[(.+?)\]>$/g.exec(u);return Xe?{evt:Xe[1]+">",exp:Xe[2]}:{evt:u}}return class{constructor(u){u&&(this.queryParent=!!u.queryParent,this.progressive=u.progressive,this.queryParent&&(this.parentMap=new WeakMap)),this.evtListeners={}}parse(u,Xe,fr){fr=fr?fr+".":"";let Ar=/<([^ >\/]+)(.*?)>/gm,_r=null,wr=[];for(;_r=Ar.exec(u);){let Kr=_r[1],In={$tag:Kr},io=fr+Kr,no=_r[2].trim(),oo=!1;(no.endsWith("/")||Kr.startsWith("?")||Kr.startsWith("!"))&&(oo=!0);let so=/([^ ]+?)="(.+?)"/g,ao=/([^ ]+?)='(.+?)'/g,co=null,go=!1;for(;co=so.exec(no);)go=!0,In[co[1]]=co[2];if(!go)for(;co=ao.exec(no);)go=!0,In[co[1]]=co[2];if(go||""===no||(In.text=no),this.progressive&&this.emit(`<${io}>`,In,Xe),!oo){let Xe=new RegExp(`([^]+?)</${Kr}>`,"g");Xe.lastIndex=Ar.lastIndex;let fr=Xe.exec(u);if(fr&&fr[1]){Ar.lastIndex=Xe.lastIndex;let u=this.parse(fr[1],In,io);u.length>0?In.$innerNodes=u:In.$innerText=fr[1]}}this.queryParent&&Xe&&this.parentMap.set(In,Xe),this.progressive&&this.emit(`</${io}>`,In,Xe),wr.push(In)}return wr}getParent(u){return this.queryParent?this.parentMap.get(u):null}#t(u,Xe){let fr=this.evtListeners[u];fr?fr.push(Xe):this.evtListeners[u]=[Xe]}addListener(u,Xe){conditioned(u)&&(u=parseEvent(u),Xe.condition=function genConditionFunc(u){let Xe="return "+u.replace(/(\$.+?)(?=[=!.])/g,"node.$&")+";";return new Function("node",Xe)}(u.exp),u=u.evt),this.#t(u,Xe)}#e(u,Xe){let fr=this.evtListeners[u],Ar=null;fr&&(Ar=fr.indexOf(Xe))>=0&&fr.splice(Ar,1)}removeListener(u,Xe){conditioned(u)&&(u=(u=parseEvent(u)).evt),this.#e(u,Xe)}emit(u,...Xe){let fr=this.evtListeners[u];if(fr)for(let u of fr)u.condition?!0===u.condition.apply(null,Xe)&&u.apply(null,Xe):u.apply(null,Xe)}on(u,Xe){this.addListener(u,Xe)}off(u,Xe){this.removeListener(u,Xe)}}})();const{Node:Dg,Way:Yg,Relation:Ng}=Kg,{purgeProps:Og,RefElements:jg}=Xg,Ug=Lg;var lib=(u,Xe)=>{let fr=!1,Ar=!1,_r=!0;(u=>{if(u){fr=!(!u.completeFeature&&!u.allFeatures),Ar=!!u.renderTagged;let Xe=u.suppressWay||u.excludeWay;void 0===Xe||Xe||(_r=!1)}})(Xe);let wr=(u=>u.elements?"json":u.indexOf("<osm")>=0?"xml":u.trim().startsWith("{")?"json-raw":"invalid")(u),Kr=new jg,In=[];"json-raw"===wr&&(wr=(u=JSON.parse(u)).elements?"json":"invalid"),"json"===wr?(u=>{for(let Xe of u.elements)switch(Xe.type){case"node":let u=new Dg(Xe.id,Kr);Xe.tags&&u.addTags(Xe.tags),u.addProps(Og(Xe,["id","type","tags","lat","lon"])),u.setLatLng(Xe);break;case"way":let fr=new Yg(Xe.id,Kr);if(Xe.tags&&fr.addTags(Xe.tags),fr.addProps(Og(Xe,["id","type","tags","nodes","geometry"])),Xe.nodes)for(let u of Xe.nodes)fr.addNodeRef(u);else Xe.geometry&&fr.setLatLngArray(Xe.geometry);break;case"relation":let Ar=new Ng(Xe.id,Kr);if(Xe.bounds&&Ar.setBounds([parseFloat(Xe.bounds.minlon),parseFloat(Xe.bounds.minlat),parseFloat(Xe.bounds.maxlon),parseFloat(Xe.bounds.maxlat)]),Xe.tags&&Ar.addTags(Xe.tags),Ar.addProps(Og(Xe,["id","type","tags","bounds","members"])),Xe.members)for(let u of Xe.members)Ar.addMember(u)}})(u):"xml"===wr&&(u=>{const Xe=new Ug({progressive:!0});Xe.on("</osm.node>",(u=>{let Xe=new Dg(u.id,Kr);for(let[fr,Ar]of Object.entries(u))!fr.startsWith("$")&&["id","lon","lat"].indexOf(fr)<0&&Xe.addProp(fr,Ar);if(Xe.setLatLng(u),u.$innerNodes)for(let fr of u.$innerNodes)"tag"===fr.$tag&&Xe.addTag(fr.k,fr.v)})),Xe.on("</osm.way>",(u=>{let Xe=new Yg(u.id,Kr);for(let[fr,Ar]of Object.entries(u))!fr.startsWith("$")&&["id"].indexOf(fr)<0&&Xe.addProp(fr,Ar);if(u.$innerNodes)for(let fr of u.$innerNodes)"nd"===fr.$tag?fr.lon&&fr.lat?Xe.addLatLng(fr):fr.ref&&Xe.addNodeRef(fr.ref):"tag"===fr.$tag&&Xe.addTag(fr.k,fr.v)})),Xe.on("<osm.relation>",(u=>{new Ng(u.id,Kr)})),Xe.on("</osm.relation.member>",((u,Xe)=>{let fr=Kr.get(`relation/${Xe.id}`),Ar={type:u.type,role:u.role?u.role:"",ref:u.ref};if(u.lat&&u.lon){Ar.lat=u.lat,Ar.lon=u.lon,Ar.tags={};for(let[Xe,fr]of Object.entries(u))!Xe.startsWith("$")&&["type","lat","lon"].indexOf(Xe)<0&&(Ar[Xe]=fr)}if(u.$innerNodes){let Xe=[],fr=[];for(let Ar of u.$innerNodes)Ar.lat&&Ar.lon?Xe.push(Ar):fr.push(Ar.ref);Xe.length>0?Ar.geometry=Xe:fr.length>0&&(Ar.nodes=fr)}fr.addMember(Ar)})),Xe.on("</osm.relation.bounds>",((u,Xe)=>{Kr.get(`relation/${Xe.id}`).setBounds([parseFloat(u.minlon),parseFloat(u.minlat),parseFloat(u.maxlon),parseFloat(u.maxlat)])})),Xe.on("</osm.relation.tag>",((u,Xe)=>{Kr.get(`relation/${Xe.id}`).addTag(u.k,u.v)})),Xe.parse(u)})(u),Kr.bindAll();for(let u of Kr.values())if(u.refCount<=0||u.hasTag&&Ar&&!(u instanceof Yg&&_r)){let Xe=u.toFeatureArray();if(u instanceof Ng&&!fr&&Xe.length>0)return Xe[0].geometry;In=In.concat(Xe)}return{type:"FeatureCollection",features:In}},Qg=getDefaultExportFromCjs(lib);const qg=["topojson","osm","kml","gpx","tcx","csv","tsv","polyline"];class Converter{constructor(u,Xe,fr={}){this.blankGeoJSON=()=>({type:"FeatureCollection",features:[]}),this._rawData=Xe,this._format=u,this._options=fr;const Ar={topojson:this.loadTopoJson,osm:this.loadOsm,kml:this.loadXml,gpx:this.loadXml,tcx:this.loadXml,csv:this.loadCsv,tsv:this.loadCsv,polyline:this.loadPolyline};this._conversionFn=Ar[u]}async convert(){return this._conversionFn?this._conversionFn():new Promise(((u,Xe)=>Xe(`No converter exists for ${this._format}`)))}async loadXml(){return zg[this._format]((new DOMParser).parseFromString(this._rawData,"text/xml"))}async loadCsv(){let u=this._options.csvOptions||{};"tsv"===this._format&&(u.delimiter="\t");return await new Promise(((Xe,fr)=>{Bg.csv2geojson(this._rawData,u,((u,Ar)=>{u?fr(u):Xe(Ar)}))}))}async loadTopoJson(){let u={};try{u=JSON.parse(this._rawData)}catch(u){throw"Invalid TopoJson"}let Xe=this.blankGeoJSON();return"Topology"===u.type&&void 0!==u.objects&&(Xe={type:"FeatureCollection",features:Xe.features=Object.keys(u.objects).map((Xe=>function topojsonFeature(u,Xe){return"string"==typeof Xe&&(Xe=u.objects[Xe]),"GeometryCollection"===Xe.type?{type:"FeatureCollection",features:Xe.geometries.map((function(Xe){return feature(u,Xe)}))}:feature(u,Xe)}(u,Xe))).reduce(((u,Xe)=>[...u,...Xe.features]),[])}),Xe}async loadOsm(){return Qg(this._rawData)}async loadPolyline(){let u=this._options.polylineOptions||{};return await new Promise(((Xe,fr)=>{try{const fr=Eg.toGeoJSON(this._rawData,u.precision);let Ar=fr;"point"===u.type?1===fr.coordinates.length?Ar={type:"Point",coordinates:fr.coordinates[0]}:console.warn("Cannot convert polyline to "+u.type):"polygon"===u.type&&(fr.coordinates[0][0]===fr.coordinates[fr.coordinates.length-1][0]&&fr.coordinates[0][1]===fr.coordinates[fr.coordinates.length-1][1]?Ar={type:"Polygon",coordinates:[fr.coordinates]}:console.warn("Cannot convert polyline to "+u.type)),Xe({type:"FeatureCollection",features:[{type:"Feature",geometry:Ar,properties:u.properties||{}}]})}catch(u){fr(u)}}))}}var $g=null;try{var nh="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");$g=nh.Worker}catch(e){}function createBase64WorkerFactory$2(u,Xe,fr){var Ar=function decodeBase64$1(u,Xe){return Buffer.from(u,"base64").toString("utf8")}(u),_r=Ar.indexOf("\n",10)+1,wr=Ar.substring(_r)+"";return function WorkerFactory(u){return new $g(wr,Object.assign({},u,{eval:!0}))}}function createURL(u,Xe,fr){var Ar=function decodeBase64(u,Xe){return atob(u)}(u),_r=Ar.indexOf("\n",10)+1,wr=Ar.substring(_r)+"",Kr=new Blob([wr],{type:"application/javascript"});return URL.createObjectURL(Kr)}var dh="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var mh=function createBase64WorkerFactory(u,Xe,fr){return function isNodeJS(){return dh}()?createBase64WorkerFactory$2(u):function createBase64WorkerFactory$1(u,Xe,fr){var Ar;return function WorkerFactory(Xe){return Ar=Ar||createURL(u),new Worker(Ar,Xe)}}(u)}("L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AgICAgdHlwZTogJ0Vycm9yJywKCSAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQ291bGQgbm90IGF1dG9kZXRlY3QgZGVsaW1pdGVyJwoJICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICByZXR1cm47CgkgICAgICAgIH0KCSAgICB9CgoJICAgIHZhciBudW1lcmljRmllbGRzID0gb3B0aW9ucy5udW1lcmljRmllbGRzID8gb3B0aW9ucy5udW1lcmljRmllbGRzLnNwbGl0KCcsJykgOiBudWxsOwoKCSAgICB2YXIgcGFyc2VkID0gKHR5cGVvZiB4ID09ICdzdHJpbmcnKSA/CgkgICAgICAgIGRzdi5kc3ZGb3JtYXQob3B0aW9ucy5kZWxpbWl0ZXIpLnBhcnNlKHgsIGZ1bmN0aW9uIChkKSB7CgkgICAgICAgICAgICBpZiAobnVtZXJpY0ZpZWxkcykgewoJICAgICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBkKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChudW1lcmljRmllbGRzLmluY2x1ZGVzKGtleSkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGRba2V5XSA9ICtkW2tleV07CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICByZXR1cm4gZDsKCSAgICAgICAgfSkgOiB4OwoKCSAgICBpZiAoIXBhcnNlZC5sZW5ndGgpIHsKCSAgICAgICAgY2FsbGJhY2sobnVsbCwgZmVhdHVyZWNvbGxlY3Rpb24pOwoJICAgICAgICByZXR1cm47CgkgICAgfQoKCSAgICB2YXIgZXJyb3JzID0gW107CgkgICAgdmFyIGk7CgoKCSAgICBpZiAoIWxhdGZpZWxkKSBsYXRmaWVsZCA9IGd1ZXNzTGF0SGVhZGVyKHBhcnNlZFswXSk7CgkgICAgaWYgKCFsb25maWVsZCkgbG9uZmllbGQgPSBndWVzc0xvbkhlYWRlcihwYXJzZWRbMF0pOwoJICAgIHZhciBub0dlb21ldHJ5ID0gKCFsYXRmaWVsZCB8fCAhbG9uZmllbGQpOwoKCSAgICBpZiAobm9HZW9tZXRyeSkgewoJICAgICAgICBmb3IgKGkgPSAwOyBpIDwgcGFyc2VkLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgICAgICBmZWF0dXJlcy5wdXNoKHsKCSAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgICAgICAgICAgcHJvcGVydGllczogcGFyc2VkW2ldLAoJICAgICAgICAgICAgICAgIGdlb21ldHJ5OiBudWxsCgkgICAgICAgICAgICB9KTsKCSAgICAgICAgfQoJICAgICAgICBjYWxsYmFjayhlcnJvcnMubGVuZ3RoID8gZXJyb3JzIDogbnVsbCwgZmVhdHVyZWNvbGxlY3Rpb24pOwoJICAgICAgICByZXR1cm47CgkgICAgfQoKCSAgICBmb3IgKGkgPSAwOyBpIDwgcGFyc2VkLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIGlmIChwYXJzZWRbaV1bbG9uZmllbGRdICE9PSB1bmRlZmluZWQgJiYKCSAgICAgICAgICAgIHBhcnNlZFtpXVtsYXRmaWVsZF0gIT09IHVuZGVmaW5lZCkgewoKCSAgICAgICAgICAgIHZhciBsb25rID0gcGFyc2VkW2ldW2xvbmZpZWxkXSwKCSAgICAgICAgICAgICAgICBsYXRrID0gcGFyc2VkW2ldW2xhdGZpZWxkXSwKCSAgICAgICAgICAgICAgICBsb25mLCBsYXRmLAoJICAgICAgICAgICAgICAgIGE7CgoJICAgICAgICAgICAgYSA9IHNleGFnZXNpbWFsKGxvbmssICdFVycpOwoJICAgICAgICAgICAgaWYgKGEpIGxvbmsgPSBhOwoJICAgICAgICAgICAgYSA9IHNleGFnZXNpbWFsKGxhdGssICdOUycpOwoJICAgICAgICAgICAgaWYgKGEpIGxhdGsgPSBhOwoKCSAgICAgICAgICAgIGxvbmYgPSBwYXJzZUZsb2F0KGxvbmspOwoJICAgICAgICAgICAgbGF0ZiA9IHBhcnNlRmxvYXQobGF0ayk7CgoJICAgICAgICAgICAgaWYgKGlzTmFOKGxvbmYpIHx8CgkgICAgICAgICAgICAgICAgaXNOYU4obGF0ZikpIHsKCSAgICAgICAgICAgICAgICBlcnJvcnMucHVzaCh7CgkgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdBIHJvdyBjb250YWluZWQgYW4gaW52YWxpZCB2YWx1ZSBmb3IgbGF0aXR1ZGUgb3IgbG9uZ2l0dWRlJywKCSAgICAgICAgICAgICAgICAgICAgcm93OiBwYXJzZWRbaV0sCgkgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpCgkgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgIGlmICghb3B0aW9ucy5pbmNsdWRlTGF0TG9uKSB7CgkgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBwYXJzZWRbaV1bbG9uZmllbGRdOwoJICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyc2VkW2ldW2xhdGZpZWxkXTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGZlYXR1cmVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHBhcnNlZFtpXSwKCSAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdQb2ludCcsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogWwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRmxvYXQobG9uZiksCgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChsYXRmKQoJICAgICAgICAgICAgICAgICAgICAgICAgXQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICB9CgkgICAg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VjdGlvbicsCgkgICAgICAgIGZlYXR1cmVzOiBbbGluZV0KCSAgICB9OwoJfQoKCWZ1bmN0aW9uIHRvUG9seWdvbihnaikgewoJICAgIHZhciBmZWF0dXJlcyA9IGdqLmZlYXR1cmVzOwoJICAgIHZhciBwb2x5ID0gewoJICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICB0eXBlOiAnUG9seWdvbicsCgkgICAgICAgICAgICBjb29yZGluYXRlczogW1tdXQoJICAgICAgICB9CgkgICAgfTsKCSAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZlYXR1cmVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIHBvbHkuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbMF0ucHVzaChmZWF0dXJlc1tpXS5nZW9tZXRyeS5jb29yZGluYXRlcyk7CgkgICAgfQoJICAgIHBvbHkucHJvcGVydGllcyA9IGZlYXR1cmVzLnJlZHVjZShmdW5jdGlvbiAoYWdncmVnYXRlZFByb3BlcnRpZXMsIG5ld0ZlYXR1cmUpIHsKCSAgICAgICAgZm9yICh2YXIga2V5IGluIG5ld0ZlYXR1cmUucHJvcGVydGllcykgewoJICAgICAgICAgICAgaWYgKCFhZ2dyZWdhdGVkUHJvcGVydGllc1trZXldKSB7CgkgICAgICAgICAgICAgICAgYWdncmVnYXRlZFByb3BlcnRpZXNba2V5XSA9IFtdOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgYWdncmVnYXRlZFByb3BlcnRpZXNba2V5XS5wdXNoKG5ld0ZlYXR1cmUucHJvcGVydGllc1trZXldKTsKCSAgICAgICAgfQoJICAgICAgICByZXR1cm4gYWdncmVnYXRlZFByb3BlcnRpZXM7CgkgICAgfSwge30pOwoJICAgIHJldHVybiB7CgkgICAgICAgIHR5cGU6ICdGZWF0dXJlQ29sbGVjdGlvbicsCgkgICAgICAgIGZlYXR1cmVzOiBbcG9seV0KCSAgICB9OwoJf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WduKHsgX2dweFR5cGU6ICJ0cmsiIH0sIGV4dHJhY3RQcm9wZXJ0aWVzKG5vZGUpLCBnZXRMaW5lU3R5bGUoZ2V0MShub2RlLCAiZXh0ZW5zaW9ucyIpKSwgdGltZXMubGVuZ3RoCgkgICAgICAgID8gewoJICAgICAgICAgICAgY29vcmRpbmF0ZVByb3BlcnRpZXM6IHsKCSAgICAgICAgICAgICAgICB0aW1lczogbXVsdGkgPyB0aW1lcyA6IHRpbWVzWzBdLAoJICAgICAgICAgICAgfSwKCSAgICAgICAgfQoJICAgICAgICA6IHt9KTsKCSAgICBmb3IgKGNvbnN0IGxpbmUgb2YgZXh0cmFjdGVkTGluZXMpIHsKCSAgICAgICAgdHJhY2sucHVzaChsaW5lLmxpbmUpOwoJICAgICAgICBpZiAoIXByb3BlcnRpZXMuY29vcmRpbmF0ZVByb3BlcnRpZXMpIHsKCSAgICAgICAgICAgIHByb3BlcnRpZXMuY29vcmRpbmF0ZVByb3BlcnRpZXMgPSB7fTsKCSAgICAgICAgfQoJICAgICAgICBjb25zdCBwcm9wcyA9IHByb3BlcnRpZXMuY29vcmRpbmF0ZVByb3BlcnRpZXM7CgkgICAgICAgIGNvbnN0IGVudHJpZXMgPSBPYmplY3QuZW50cmllcyhsaW5lLmV4dGVuZGVkVmFsdWVzKTsKCSAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBlbnRyaWVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgICAgICBjb25zdCBbbmFtZSwgdmFsXSA9IGVudHJpZXNbaV07CgkgICAgICAgICAgICBpZiAobXVsdGkpIHsKCSAgICAgICAgICAgICAgICBpZiAoIXByb3BzW25hbWVdKSB7CgkgICAgICAgICAgICAgICAgICAgIHByb3BzW25hbWVdID0gZXh0cmFjdGVkTGluZXMubWFwKChsaW5lKSA9PiBuZXcgQXJyYXkobGluZS5saW5lLmxlbmd0aCkuZmlsbChudWxsKSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIHByb3BzW25hbWVdW2ldID0gdmFsOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgcHJvcHNbbmFtZV0gPSB2YWw7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCSAgICB9CgkgICAgcmV0dXJuIHsKCSAgICAgICAgdHlwZTogIkZlYXR1cmUiLAoJICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wZXJ0aWVzLAoJICAgICAgICBnZW9tZXRyeTogbXVsdGkKCSAgICAgICAgICAgID8gewoJICAgICAgICAgICAgICAgIHR5cGU6ICJNdWx0aUxpbmVTdHJpbmciLAoJICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiB0cmFjaywKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIDogewoJICAgICAgICAgICAgICAgIHR5cGU6ICJMaW5lU3RyaW5nIiwKCSAgICAgICAgICAgICAgICBjb29yZGluYXRlczogdHJhY2tbMF0sCgkgICAgICAgICAgICB9LAoJICAgIH07Cgl9CgkvKioKCSAqIEV4dHJhY3QgYSBwb2ludCwgaWYgcG9zc2libGUsIGZyb20gYSBnaXZlbiBub2RlLAoJICogd2hpY2ggaXMgdXN1YWxseSBhIHdwdCBvciB0cmtwdAoJICovCglmdW5jdGlvbiBnZXRQb2ludChub2RlKSB7CgkgICAgY29uc3QgcHJvcGVydGllcyA9IE9iamVjdC5hc3NpZ24oZXh0cmFjdFByb3BlcnRpZXMobm9kZSksIGdldE11bHRpKG5vZGUsIFsic3ltIl0pKTsKCSAgICBjb25zdCBwYWlyID0gY29vcmRQYWlyJDEobm9kZSk7CgkgICAgaWYgKCFwYWlyKQoJICAgICAgICByZXR1cm4gbnVsbDsKCSAgICByZXR1cm4gewoJICAgICAgICB0eXBlOiAiRmVhdHVyZSIsCgkgICAgICAgIHByb3BlcnRpZXMsCgkgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICB0eXBlOiAiUG9pbnQiLAoJICAgICAg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ICAgICAgIGlmIChsaW5lLmhlYXJ0UmF0ZXMubGVuZ3RoKQoJICAgICAgICAgICAgICAgIGhlYXJ0UmF0ZXMucHVzaChsaW5lLmhlYXJ0UmF0ZXMpOwoJICAgICAgICAgICAgYWxsRXh0ZW5kZWRQcm9wZXJ0aWVzLnB1c2gobGluZS5leHRlbmRlZFByb3BlcnRpZXMpOwoJICAgICAgICB9CgkgICAgfQoJICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYWxsRXh0ZW5kZWRQcm9wZXJ0aWVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIGNvbnN0IGV4dGVuZGVkUHJvcGVydGllcyA9IGFsbEV4dGVuZGVkUHJvcGVydGllc1tpXTsKCSAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBleHRlbmRlZFByb3BlcnRpZXMpIHsKCSAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGggPT09IDEpIHsKCSAgICAgICAgICAgICAgICBpZiAobGluZSkgewoJICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzW3Byb3BlcnR5XSA9IGxpbmUuZXh0ZW5kZWRQcm9wZXJ0aWVzW3Byb3BlcnR5XTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICBlbHNlIHsKCSAgICAgICAgICAgICAgICBpZiAoIXByb3BlcnRpZXNbcHJvcGVydHldKSB7CgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXNbcHJvcGVydHldID0gdHJhY2subWFwKCh0cmFjaykgPT4gQXJyYXkodHJhY2subGVuZ3RoKS5maWxsKG51bGwpKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgcHJvcGVydGllc1twcm9wZXJ0eV1baV0gPSBleHRlbmRlZFByb3BlcnRpZXNbcHJvcGVydHldOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfQoJICAgIGlmICh0cmFjay5sZW5ndGggPT09IDApCgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIGlmICh0aW1lcy5sZW5ndGggfHwgaGVhcnRSYXRlcy5sZW5ndGgpIHsKCSAgICAgICAgcHJvcGVydGllcy5jb29yZGluYXRlUHJvcGVydGllcyA9IE9iamVjdC5hc3NpZ24odGltZXMubGVuZ3RoCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICB0aW1lczogdHJhY2subGVuZ3RoID09PSAxID8gdGltZXNbMF0gOiB0aW1lcywKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIDoge30sIGhlYXJ0UmF0ZXMubGVuZ3RoCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICBoZWFydDogdHJhY2subGVuZ3RoID09PSAxID8gaGVhcnRSYXRlc1swXSA6IGhlYXJ0UmF0ZXMsCgkgICAgICAgICAgICB9CgkgICAgICAgICAgICA6IHt9KTsKCSAgICB9CgkgICAgcmV0dXJuIHsKCSAgICAgICAgdHlwZTogIkZlYXR1cmUiLAoJICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wZXJ0aWVzLAoJICAgICAgICBnZW9tZXRyeTogdHJhY2subGVuZ3RoID09PSAxCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICB0eXBlOiAiTGluZVN0cmluZyIsCgkgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXM6IHRyYWNrWzBdLAoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgOiB7CgkgICAgICAgICAgICAgICAgdHlwZTogIk11bHRpTGluZVN0cmluZyIsCgkgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXM6IHRyYWNrLAoJICAgICAgICAgICAgfSwKCSAgICB9OwoJfQoJLyoqCgkgKiBJbmNyZW1lbnRhbGx5IGNvbnZlcnQgYSBUQ1ggZG9jdW1lbnQgdG8gR2VvSlNPTi4gVGhlCgkgKiBmaXJzdCBhcmd1bWVudCwgYGRvY2AsIG11c3QgYmUgYSBUQ1gKCSAqIGRvY3VtZW50IGF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ICByZXR1cm4gcHJvcGVydGllczsKCSAgICB9KTsKCX0KCWZ1bmN0aW9uIGV4dHJhY3RJY29uKG5vZGUpIHsKCSAgICByZXR1cm4gZ2V0KG5vZGUsICJJY29uU3R5bGUiLCAoaWNvblN0eWxlKSA9PiB7CgkgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKGdldENvbG9yKGljb25TdHlsZSwgImljb24iKSwgbnVtZXJpY1Byb3BlcnR5KGljb25TdHlsZSwgInNjYWxlIiwgImljb24tc2NhbGUiKSwgbnVtZXJpY1Byb3BlcnR5KGljb25TdHlsZSwgImhlYWRpbmciLCAiaWNvbi1oZWFkaW5nIiksIGdldChpY29uU3R5bGUsICJob3RTcG90IiwgKGhvdHNwb3QpID0+IHsKCSAgICAgICAgICAgIGNvbnN0IGxlZnQgPSBwYXJzZUZsb2F0KGhvdHNwb3QuZ2V0QXR0cmlidXRlKCJ4IikgfHwgIiIpOwoJICAgICAgICAgICAgY29uc3QgdG9wID0gcGFyc2VGbG9hdChob3RzcG90LmdldEF0dHJpYnV0ZSgieSIpIHx8ICIiKTsKCSAgICAgICAgICAgIGNvbnN0IHh1bml0cyA9IGhvdHNwb3QuZ2V0QXR0cmlidXRlKCJ4dW5pdHMiKSB8fCAiIjsKCSAgICAgICAgICAgIGNvbnN0IHl1bml0cyA9IGhvdHNwb3QuZ2V0QXR0cmlidXRlKCJ5dW5pdHMiKSB8fCAiIjsKCSAgICAgICAgICAgIGlmICghaXNOYU4obGVmdCkgJiYgIWlzTmFOKHRvcCkpCgkgICAgICAgICAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICAgICAgImljb24tb2Zmc2V0IjogW2xlZnQsIHRvcF0sCgkgICAgICAgICAgICAgICAgICAgICJpY29uLW9mZnNldC11bml0cyI6IFt4dW5pdHMsIHl1bml0c10sCgkgICAgICAgICAgICAgICAgfTsKCSAgICAgICAgICAgIHJldHVybiB7fTsKCSAgICAgICAgfSksIGV4dHJhY3RJY29uSHJlZihp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gICAgICAgICAgY29uc3QgbmFtZSA9IHNpbXBsZURhdGEuZ2V0QXR0cmlidXRlKCJuYW1lIikgfHwgIiI7CgkgICAgICAgICAgICBjb25zdCB0eXBlQ29udmVydGVyID0gc2NoZW1hW25hbWVdIHx8IHR5cGVDb252ZXJ0ZXJzLnN0cmluZzsKCSAgICAgICAgICAgIHByb3BlcnRpZXNbbmFtZV0gPSB0eXBlQ29udmVydGVyKG5vZGVWYWwoc2ltcGxlRGF0YSkpOwoJICAgICAgICB9CgkgICAgICAgIHJldHVybiBwcm9wZXJ0aWVzOwoJICAgIH0pOwoJfQoJZnVuY3Rpb24gZ2V0TWF5YmVIVE1MRGVzY3JpcHRpb24obm9kZSkgewoJICAgIGNvbnN0IGRlc2NyaXB0aW9uTm9kZSA9IGdldDEobm9kZSwgImRlc2NyaXB0aW9uIik7CgkgICAgZm9yIChjb25zdCBjIG9mIEFycmF5LmZyb20oZGVzY3JpcHRpb25Ob2RlPy5jaGlsZE5vZGVzIHx8IFtdKSkgewoJICAgICAgICBpZiAoYy5ub2RlVHlwZSA9PT0gNCkgewoJICAgICAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbjogewoJICAgICAgICAgICAgICAgICAgICAiQHR5cGUiOiAiaHRtbCIsCgkgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBub2RlVmFsKGMpLAoJICAgICAgICAgICAgICAgIH0sCgkgICAgICAgICAgICB9OwoJICAgICAgICB9CgkgICAgfQoJICAgIHJldHVybiB7fTsKCX0KCWZ1bmN0aW9uIGV4dHJhY3RUaW1lU3Bhbihub2RlKSB7CgkgICAgcmV0dXJuIGdldChub2RlLCAiVGltZVNwYW4iLCAodGltZVNwYW4pID0+IHsKCSAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgIHRpbWVzcGFuOiB7CgkgICAgICAgICAgICAgICAgYmVnaW46IG5vZGVWYWwoZ2V0MSh0aW1lU3BhbiwgImJlZ2luIikpLAoJIC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CA+IDIKCSAgICAgICAgICAgID8gewoJICAgICAgICAgICAgICAgIHR5cGU6ICJMaW5lU3RyaW5nIiwKCSAgICAgICAgICAgICAgICBjb29yZGluYXRlcywKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIDogewoJICAgICAgICAgICAgICAgIHR5cGU6ICJQb2ludCIsCgkgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXM6IGNvb3JkaW5hdGVzWzBdLAoJICAgICAgICAgICAgfSwKCSAgICAgICAgdGltZXM6ICQobm9kZSwgIndoZW4iKS5tYXAoKGVsZW0pID0+IG5vZGVWYWwoZWxlbSkpLAoJICAgIH07Cgl9CglmdW5jdGlvbiBmaXhSaW5nKHJpbmcpIHsKCSAgICBpZiAocmluZy5sZW5ndGggPT09IDApCgkgICAgICAgIHJldHVybiByaW5nOwoJICAgIGNvbnN0IGZpcnN0ID0gcmluZ1swXTsKCSAgICBjb25zdCBsYXN0ID0gcmluZ1tyaW5nLmxlbmd0aCAtIDFdOwoJICAgIGxldCBlcXVhbCA9IHRydWU7CgkgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBNYXRoLm1heChmaXJzdC5sZW5ndGgsIGxhc3QubGVuZ3RoKTsgaSsrKSB7CgkgICAgICAgIGlmIChmaXJzdFtpXSAhPT0gbGFzdFtpXSkgewoJICAgICAgICAgICAgZXF1YWwgPSBmYWxzZTsKCSAgICAgICAgICAgIGJyZWFrOwoJICAgICAgICB9CgkgICAgfQoJICAgIGlmICghZXF1YWwpIHsKCSAgICAgICAgcmV0dXJuIHJpbmcuY29uY2F0KFtyaW5nWzBdXSk7CgkgICAgfQoJICAgIHJldHVybiByaW5nOwoJfQoJZnVuY3Rpb24gZ2V0Q29vcmRpbmF0ZXMobm9kZSkgewoJICAgIHJldHVybiBub2RlVmFsKGdldDEobm9kZSwgImNvb3JkaW5hdGVzIikpOwoJfQoJZnVuY3Rpb24gZ2V0R2VvbWV0cnkobm9kZSkgewoJICAgIGxldCBnZW9tZXRyaWVzID0gW107CgkgICAgbGV0IGNvb3JkVGltZXMgPSBbXTsKCSAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5vZGUuY2hpbGROb2Rlcy5sZW5ndGg7IGkrKykgewoJICAgICAgICBjb25zdCBjaGlsZCA9IG5vZGUuY2hpbGROb2Rlcy5pdGVtKGkpOwoJICAgICAgICBpZiAoaXNFbGVtZW50KGNoaWxkKSkgewoJICAgICAgICAgICAgc3dpdGNoIChjaGlsZC50YWdOYW1lKSB7CgkgICAgICAgICAgICAgICAgY2FzZSAiTXVsdGlHZW9tZXRyeSI6CgkgICAgICAgICAgICAgICAgY2FzZSAiTXVsdGlUcmFjayI6CgkgICAgICAgICAgICAgICAgY2FzZSAiZ3g6TXVsdGlUcmFjayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGRHZW9tZXRyaWVzID0gZ2V0R2VvbWV0cnkoY2hpbGQpOwoJICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzID0gZ2VvbWV0cmllcy5jb25jYXQoY2hpbGRHZW9tZXRyaWVzLmdlb21ldHJpZXMpOwoJICAgICAgICAgICAgICAgICAgICBjb29yZFRpbWVzID0gY29vcmRUaW1lcy5jb25jYXQoY2hpbGRHZW9tZXRyaWVzLmNvb3JkVGltZXMpOwoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgY2FzZSAiUG9pbnQiOiB7CgkgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvb3JkaW5hdGVzID0gY29vcmQxKGdldENvb3JkaW5hdGVzKGNoaWxkKSk7CgkgICAgICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlcy5sZW5ndGggPj0gMikgewoJICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cmllcy5wdXNoKHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAiUG9pbnQiLAoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzLAoJICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIkxpbmVhclJpbmciOgoJICAgICAgICAgICAgICAgIGNhc2UgIkxpbmVTdHJpbmciOiB7CgkgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvb3JkaW5hdGVzID0gY29vcmQoZ2V0Q29vcmRpbmF0ZXMoY2hpbGQpKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGNvb3JkaW5hdGVzLmxlbmd0aCA+PSAyKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJMaW5lU3RyaW5nIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcywKCSAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBjYXNlICJQb2x5Z29uIjogewoJICAgICAgICAgICAgICAgICAgICBjb25zdCBjb29yZHMgPSBbXTsKCSAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBsaW5lYXJSaW5nIG9mICQoY2hpbGQsICJMaW5lYXJSaW5nIikpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJpbmcgPSBmaXhSaW5nKGNvb3JkKGdldENvb3JkaW5hdGVzKGxpbmVhclJpbmcpKSk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmluZy5sZW5ndGggPj0gNCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3Jkcy5wdXNoKHJpbmcpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGlmIChjb29yZHMubGVuZ3RoKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJQb2x5Z29uIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogY29vcmRzLAoJICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIlRyYWNrIjoKCSAgICAgICAgICAgICAgICBjYXNlICJneDpUcmFjayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgZ3ggPSBneENvb3JkcyhjaGlsZCk7CgkgICAgICAgICAgICAgICAgICAgIGlmICghZ3gpCgkgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgeyB0aW1lcywgZ2VvbWV0cnkgfSA9IGd4OwoJICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goZ2VvbWV0cnkpOwoJICAgICAgICAgICAgICAgICAgICBpZiAodGltZXMubGVuZ3RoKQoJICAgICAgICAgICAgICAgICAgICAgICAgY29vcmRUaW1lcy5wdXNoKHRpbWVzKTsKCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfQoJICAgIHJldHVybiB7CgkgICAgICAgIGdlb21ldHJpZXMsCgkgICAgICAgIGNvb3JkVGltZXMsCgkgICAgfTsKCX0KCglmdW5jdGlvbiBnZW9tZXRyeUxpc3RUb0dlb21ldHJ5KGdlb21ldHJpZXMpIHsKCSAgICByZXR1cm4gZ2VvbWV0cmllcy5sZW5ndGggPT09IDAKCSAg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GVtYSksIGV4dHJhY3RUaW1lU3Bhbihub2RlKSwgZXh0cmFjdFRpbWVTdGFtcChub2RlKSwgY29vcmRUaW1lcy5sZW5ndGgKCSAgICAgICAgICAgID8gewoJICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVQcm9wZXJ0aWVzOiB7CgkgICAgICAgICAgICAgICAgICAgIHRpbWVzOiBjb29yZFRpbWVzLmxlbmd0aCA9PT0gMSA/IGNvb3JkVGltZXNbMF0gOiBjb29yZFRpbWVzLAoJICAgICAgICAgICAgICAgIH0sCgkgICAgICAgICAgICB9CgkgICAgICAgICAgICA6IHt9KSwKCSAgICB9OwoJICAgIGlmIChmZWF0dXJlLnByb3BlcnRpZXM/LnZpc2liaWxpdHkgIT09IHVuZGVmaW5lZCkgewoJICAgICAgICBmZWF0dXJlLnByb3BlcnRpZXMudmlzaWJpbGl0eSA9IGZlYXR1cmUucHJvcGVydGllcy52aXNpYmlsaXR5ICE9PSAiMCI7CgkgICAgfQoJICAgIGNvbnN0IGlkID0gbm9kZS5nZXRBdHRyaWJ1dGUoImlkIik7CgkgICAgaWYgKGlkICE9PSBudWxsICYmIGlkICE9PSAiIikKCSAgICAgICAgZmVhdHVyZS5pZCA9IGlkOwoJICAgIHJldHVybiBmZWF0dXJlOwoJfQoKCWZ1bmN0aW9uIGdldEdyb3VuZE92ZXJsYXlCb3gobm9kZSkgewoJICAgIGNvbnN0IGxhdExvblF1YWQgPSBnZXQxKG5vZGUsICJneDpMYXRMb25RdWFkIik7CgkgICAgaWYgKGxhdExvblF1YWQpIHsKCSAgICAgICAgY29uc3QgcmluZyA9IGZpeFJpbmcoY29vcmQoZ2V0Q29vcmRpbmF0ZXMobm9kZSkpKTsKCSAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgdHlwZTogIlBvbHlnb24iLAoJICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBbcmluZ10sCgkgICAgICAgICAgICB9LAoJICAgICAgICB9OwoJICAgIH0KCSAgICByZXR1cm4gZ2V0TGF0TG9uQm94KG5vZGUpOwoJfQoJY29uc3QgREVHUkVFU19UT19SQURJQU5TID0gTWF0aC5QSSAvIDE4MDsKCWZ1bmN0aW9uIHJvdGF0ZUJveChiYm94LCBjb29yZGluYXRlcywgcm90YXRpb24pIHsKCSAgICBjb25zdCBjZW50ZXIgPSBbKGJib3hbMF0gKyBiYm94WzJdKSAvIDIsIChiYm94WzFdICsgYmJveFszXSkgLyAyXTsKCSAgICByZXR1cm4gWwoJICAgICAgICBjb29yZGluYXRlc1swXS5tYXAoKGNvb3JkaW5hdGUpID0+IHsKCSAgICAgICAgICAgIGNvbnN0IGR5ID0gY29vcmRpbmF0ZVsxXSAtIGNlbnRlclsxXTsKCSAgICAgICAgICAgIGNvbnN0IGR4ID0gY29vcmRpbmF0ZVswXSAtIGNlbnRlclswXTsKCSAgICAgICAgICAgIGNvbnN0IGRpc3RhbmNlID0gTWF0aC5zcXJ0KE1hdGgucG93KGR5LCAyKSArIE1hdGgucG93KGR4LCAyKSk7CgkgICAgICAgICAgICBjb25zdCBhbmdsZSA9IE1hdGguYXRhbjIoZHksIGR4KSArIHJvdGF0aW9uICogREVHUkVFU19UT19SQURJQU5TOwoJICAgICAgICAgICAgcmV0dXJuIFsKCSAgICAgICAgICAgICAgICBjZW50ZXJbMF0gKyBNYXRoLmNvcyhhbmdsZSkgKiBkaXN0YW5jZSwKCSAgICAgICAgICAgICAgICBjZW50ZXJbMV0gKyBNYXRoLnNpbihhbmdsZSkgKiBkaXN0YW5jZSwKCSAgICAgICAgICAgIF07CgkgICAgICAgIH0pLAoJICAgIF07Cgl9CglmdW5jdGlvbiBnZXRMYXRMb25Cb3gobm9kZSkgewoJICAgIGNvbnN0IGxhdExvbkJveCA9IGdldDEobm9kZSwgIkxhdExvbkJveCIpOwoJICAgIGlmIChsYXRMb25Cb3gpIHsKCSAgICAgICAgY29uc3Qgbm9ydGggPSBudW0xKGxhdExvbkJveCwgIm5vcnRoIik7CgkgICAgICAgIGNvbnN0IHdlc3QgPSBudW0xKGxhdExvbkJveCwgIndlc3QiKTsKCSAgICAgICAgY29uc3QgZWFzdCA9IG51bTEobGF0TG9uQm94LCAiZWFzdCIpOwoJICAgICAgICBjb25zdCBzb3V0aCA9IG51bTEobGF0TG9uQm94LCAic291dGgiKTsKCSAgICAgICAgY29uc3Qgcm90YXRpb24gPSBudW0xKGxhdExvbkJveCwgInJvdGF0aW9uIik7CgkgICAgICAgIGlmICh0eXBlb2Ygbm9ydGggPT09ICJudW1iZXIiICYmCgkgICAgICAgICAgICB0eXBlb2Ygc291dGggPT09ICJudW1iZXIiICYmCgkgICAgICAgICAgICB0eXBlb2Ygd2VzdCA9PT0gIm51bWJlciIgJiYKCSAgICAgICAgICAgIHR5cGVvZiBlYXN0ID09PSAibnVtYmVyIikgewoJICAgICAgICAgICAgY29uc3QgYmJveCA9IFt3ZXN0LCBzb3V0aCwgZWFzdCwgbm9ydGhdOwoJICAgICAgICAgICAgbGV0IGNvb3JkaW5hdGVzID0gWwoJICAgICAgICAgICAgICAgIFsKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIG5vcnRoXSwKCSAgICAgICAgICAgICAgICAgICAgW2Vhc3QsIG5vcnRoXSwKCSAgICAgICAgICAgICAgICAgICAgW2Vhc3QsIHNvdXRoXSwKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIHNvdXRoXSwKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIG5vcnRoXSwgLy8gdG9wIGxlZnQgKGFnYWluKQoJICAgICAgICAgICAgICAgIF0sCgkgICAgICAgICAgICBdOwoJICAgICAgICAgICAgaWYgKHR5cGVvZiByb3RhdGlvbiA9PT0gIm51bWJlciIpIHsKCSAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA9IHJvdGF0ZUJveChiYm94LCBjb29yZGluYXRlcywgcm90YXRpb24pOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICBiYm94LAoJICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJQb2x5Z29uIiwKCSAgICAgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMsCgkgICAgICAgICAgICAgICAgfSwKCSAgICAgICAgICAgIH07CgkgICAgICAgIH0KCSAgICB9CgkgICAgcmV0dXJuIG51bGw7Cgl9CglmdW5jdGlvbiBnZXRHcm91bmRPdmVybGF5KG5vZGUsIHN0eWxlTWFwLCBzY2hlbWEsIG9wdGlvbnMpIHsKCSAgICBjb25zdCBib3ggPSBnZXRHcm91bmRPdmVybGF5Qm94KG5vZGUpOwoJICAgIGNvbnN0IGdlb21ldHJ5ID0gYm94Py5nZW9tZXRyeSB8fCBudWxsOwoJICAgIGlmICghZ2VvbWV0cnkgJiYgb3B0aW9ucy5za2lwTnVsbEdlb21ldHJ5KSB7CgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIH0KCSAgICBjb25zdCBmZWF0dXJlID0gewoJICAgICAgICB0eXBlOiAiRmVhdHVyZSIsCgkgICAgICAgIGdlb21ldHJ5LAoJICAgICAgICBwcm9wZXJ0aWVzOiBPYmplY3QuYXNzaWduKAoJICAgICAgICAvKioKCSAgICAgICAgICogUmVsYXRlZCB0bwoJICAgICAgICAgKiBodHRwczovL2dpc3QuZ2l0aHViLmNvbS90bWN3LzAzN2ExY2I2NjYwZDc0YTM5MmU5ZGE3NDQ2NTQwZjQ2CgkgICAgICAgICAqLwoJICAgICAgICB7ICJAZ2VvbWV0cnktdHlwZSI6ICJncm91bmRvdmVybGF5IiB9LCBnZXRNdWx0aShub2RlLCBbCgkgICAgICAgICAgICAibmFtZSIsCgkgICAgICAgICAgICAiYWRkcmVzcyIsCgkgICAgICAgICAgICAidmlzaWJpbGl0eSIsCgkgICAgICAgICAgICAib3BlbiIsCgkgICAgICAgICAgICAicGhvbmVOdW1iZXIiLAoJICAgICAgIC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eXBlIikgfHwgIiJdIHx8CgkgICAgICAgICAgICAgICAgdHlwZUNvbnZlcnRlcnNbInN0cmluZyJdOwoJICAgIH0KCSAgICByZXR1cm4gc2NoZW1hOwoJfQoJY29uc3QgRk9MREVSX1BST1BTID0gWwoJICAgICJuYW1lIiwKCSAgICAidmlzaWJpbGl0eSIsCgkgICAgIm9wZW4iLAoJICAgICJhZGRyZXNzIiwKCSAgICAiZGVzY3JpcHRpb24iLAoJICAgICJwaG9uZU51bWJlciIsCgkgICAgInZpc2liaWxpdHkiLAoJXTsKCWZ1bmN0aW9uIGdldEZvbGRlcihub2RlKSB7CgkgICAgY29uc3QgbWV0YSA9IHt9OwoJICAgIGZvciAoY29uc3QgY2hpbGQgb2YgQXJyYXkuZnJvbShub2RlLmNoaWxkTm9kZXMpKSB7CgkgICAgICAgIGlmIChpc0VsZW1lbnQoY2hpbGQpICYmIEZPTERFUl9QUk9QUy5pbmNsdWRlcyhjaGlsZC50YWdOYW1lKSkgewoJICAgICAgICAgICAgbWV0YVtjaGlsZC50YWdOYW1lXSA9IG5vZGVWYWwoY2hpbGQpOwoJICAgICAgICB9CgkgICAgfQoJICAgIHJldHVybiB7CgkgICAgICAgIHR5cGU6ICJmb2xkZXIiLAoJICAgICAgICBtZXRhLAoJICAgICAgICBjaGlsZHJlbjogW10sCgkgICAgfTsKCX0KCS8qKgoJICogWWllbGQgYSBuZXN0ZWQgdHJlZSB3aXRoIEtNTCBmb2xkZXIgc3RydWN0dXJlCgkgKgoJICogVGhpcyBnZW5lcmF0ZXMgYSB0cmVlIHdpdGggdGhlIGdpdmVuIHN0cnVjdHVyZToKCSAqCgkgKiBgYGBqcwoJICogewoJICogICAidHlwZSI6ICJyb290IiwKCSAqICAgImNoaWxkcmVuIjogWwoJICogICAgIHsKCSAqICAgICAgICJ0eXBlIjogImZvbGRlciIsCgkgKiAgICAgICAibWV0YSI6IHsKCSAqICAgICAgICAgIm5hbWUiOiAiVGVzdCIKCSAqICAgICAgIH0sCgkg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ludGVyLCBvcHRpb25zKSB7CgkgICAgICAgIGlmIChpc0VsZW1lbnQobm9kZSkpIHsKCSAgICAgICAgICAgIHN3aXRjaCAobm9kZS50YWdOYW1lKSB7CgkgICAgICAgICAgICAgICAgY2FzZSAiR3JvdW5kT3ZlcmxheSI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgcGxhY2VtYXJrID0gZ2V0R3JvdW5kT3ZlcmxheShub2RlLCBzdHlsZU1hcCwgc2NoZW1hLCBvcHRpb25zKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKHBsYWNlbWFyaykgewoJICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlci5jaGlsZHJlbi5wdXNoKHBsYWNlbWFyayk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIlBsYWNlbWFyayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgcGxhY2VtYXJrID0gZ2V0UGxhY2VtYXJrKG5vZGUsIHN0eWxlTWFwLCBzY2hlbWEsIG9wdGlvbnMpOwoJICAgICAgICAgICAgICAgICAgICBpZiAocGxhY2VtYXJrKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyLmNoaWxkcmVuLnB1c2gocGxhY2VtYXJrKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgY2FzZSAiRm9sZGVyIjogewoJICAgICAgICAgICAgICAgICAgICBjb25zdCBmb2xkZXIgPSBnZXRGb2xkZXIobm9kZSk7CgkgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIuY2hpbGRyZW4ucHVzaChmb2xkZXIpOwoJICAgICAgICAgICAgICAgICAgICBwb2ludGVyID0gZm9sZGVyOwoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAg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ZS5kZWNvZGUoc3RyLCBwcmVjaXNpb24pOwoJCSAgICByZXR1cm4gewoJCSAgICAgICAgdHlwZTogJ0xpbmVTdHJpbmcnLAoJCSAgICAgICAgY29vcmRpbmF0ZXM6IGZsaXBwZWQoY29vcmRzKQoJCSAgICB9OwoJCX07CgoJCWlmIChtb2R1bGUuZXhwb3J0cykgewoJCSAgICBtb2R1bGUuZXhwb3J0cyA9IHBvbHlsaW5lOwoJCX0gCgl9IChwb2x5bGluZSkpOwoKCXZhciBwb2x5bGluZUV4cG9ydHMgPSBwb2x5bGluZS5leHBvcnRzOwoKCXZhciB1dGlscyA9ICgoKSA9PiB7CgoJICAgIGNvbnN0IHB1cmdlUHJvcHMgPSAob2JqLCBibGFja2xpc3QpID0+IHsKCSAgICAgICAgaWYgKG9iaikgewoJICAgICAgICAgICAgbGV0IHJzID0gT2JqZWN0LmFzc2lnbih7fSwgb2JqKTsKCSAgICAgICAgICAgIGlmIChibGFja2xpc3QpIHsKCSAgICAgICAgICAgICAgICBmb3IgKGxldCBwcm9wIG9mIGJsYWNrbGlzdCkgewoJICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnNbcHJvcF07CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIHJzOwoJICAgICAgICB9CgkgICAgICAgIHJldHVybiB7fTsKCSAgICB9OwoKCSAgICBjb25zdCBtZXJnZVByb3BzID0gKG9iajEsIG9iajIpID0+IHsKCSAgICAgICAgb2JqMSA9IG9iajEgPyBvYmoxIDoge307CgkgICAgICAgIG9iajIgPSBvYmoyID8gb2JqMiA6IHt9OwoJICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihvYmoxLCBvYmoyKTsKCSAgICB9OwoKCSAgICBjb25zdCBmaXJzdCA9IGEgPT4gYVswXTsKCSAgICBjb25zdCBsYXN0ID0gYSA9PiBhW2EubGVuZ3RoIC0gMV07CgkgICAgY29uc3QgY29vcmRzVG9LZXkgPSBhID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gKHYpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MucHVzaCh2KTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBbXS5zcGxpY2UuYXBwbHkodGhpcy5jb250YWluZXIsIGFyZ3MpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHRoaXMuY29udGFpbmVyID09PSAnb2JqZWN0JykgewoJICAgICAgICAgICAgICAgIGxldCBrID0gT2JqZWN0LmtleXModGhpcy5jb250YWluZXIpLmZpbmQodiA9PiB0aGlzLmNvbnRhaW5lclt2XSA9PT0gdGhpcyk7CgkgICAgICAgICAgICAgICAgaWYgKGspIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKHYpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyW2tdID0gdjsKCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmNvbnRhaW5lcltrXTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoJICAgIH0KCgkgICAgY2xhc3MgV2F5Q29sbGVjdGlvbiBleHRlbmRzIEFycmF5IHsKCSAgICAgICAgY29uc3RydWN0b3IoKSB7CgkgICAgICAgICAgICBzdXBlcigpOwoJICAgICAgICAgICAgdGhpcy5maXJzdE1hcCA9IHt9OwoJICAgICAgICAgICAgdGhpcy5sYXN0TWFwID0ge307CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFdheSh3YXkpIHsKCSAgICAgICAgICAgIHdheSA9IHdheS50b0Nvb3Jkc0FycmF5KCk7CgkgICAgICAgICAgICBpZiAod2F5Lmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICB0aGlzLnB1c2god2F5KTsKCSAgICAgICAgICAgICAgICBhZGRUb01hcCh0aGlzLmZpcnN0TWFwLCBjb29yZHNUb0tleShmaXJzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICBhZGRUb01hcCh0aGlzLmxhc3RNYXAsIGNvb3Jkc1RvS2V5KGxhc3Qod2F5KSksIHdheSk7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIHRvU3RyaW5ncygpIHsKCSAgICAgICAgICAgIGxldCBzdHJpbmdzID0gW10sIHdheSA9IG51bGw7CgkgICAgICAgICAgICB3aGlsZSAod2F5ID0gdGhpcy5zaGlmdCgpKSB7CgkgICAgICAgICAgICAgICAgcmVtb3ZlRnJvbU1hcCh0aGlzLmZpcnN0TWFwLCBjb29yZHNUb0tleShmaXJzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICByZW1vdmVGcm9tTWFwKHRoaXMubGFzdE1hcCwgY29vcmRzVG9LZXkobGFzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICBsZXQgY3VycmVudCA9IHdheSwgbmV4dCA9IG51bGw7CgkgICAgICAgICAgICAgICAgZG8gewoJICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gY29vcmRzVG9LZXkobGFzdChjdXJyZW50KSksIHNob3VsZFJldmVyc2UgPSBmYWxzZTsKCgkgICAgICAgICAgICAgICAgICAgIG5leHQgPSBnZXRGaXJzdEZyb21NYXAodGhpcy5maXJzdE1hcCwga2V5KTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKCFuZXh0KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gZ2V0Rmlyc3RGcm9tTWFwKHRoaXMubGFzdE1hcCwga2V5KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHNob3VsZFJldmVyc2UgPSB0cnVlOwoJICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UodGhpcy5pbmRleE9mKG5leHQpLCAxKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUZyb21NYXAodGhpcy5maXJzdE1hcCwgY29vcmRzVG9LZXkoZmlyc3QobmV4dCkpLCBuZXh0KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUZyb21NYXAodGhpcy5sYXN0TWFwLCBjb29yZHNUb0tleShsYXN0KG5leHQpKSwgbmV4dCk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2hvdWxkUmV2ZXJzZSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFsd2F5cyByZXZlcnNlIHNob3J0ZXIgb25lIHRvIHNhdmUgdGltZQoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Lmxlbmd0aCA+IGN1cnJlbnQubGVuZ3RoKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtjdXJyZW50LCBuZXh0XSA9IFtuZXh0LCBjdXJyZW50XTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dC5yZXZlcnNlKCk7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQuY29uY2F0KG5leHQuc2xpY2UoMSkpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfSB3aGlsZSAobmV4dCk7CgkgICAgICAgICAgICAgICAgc3RyaW5ncy5wdXNoKHN0clRvRmxvYXQoY3VycmVudCkpOwoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIHJldHVybiBzdHJpbmdzOwoJICAgICAgICB9CgoJICAgICAgICB0b1JpbmdzKGRpcmVjdGlvbikgewoJICAgICAgICAgICAgbGV0IHN0cmluZ3MgPSB0aGlzLnRvU3RyaW5ncygpOwoJICAgICAgICAgICAgbGV0IHJpbmdzID0gW10sIHN0cmluZyA9IG51bGw7CgkgICAgICAgICAgICB3aGlsZSAoc3RyaW5nID0gc3RyaW5ncy5zaGlmdCgpKSB7CgkgICAgICAgICAgICAgICAgaWYgKGlzUmluZyhzdHJpbmcpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChyaW5nRGlyZWN0aW9uKHN0cmluZykgIT09IGRpcmVjdGlvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nLnJldmVyc2UoKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICByaW5ncy5wdXNoKHN0cmluZyk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIHJpbmdzOwoJICAgICAgICB9CgkgICAgfQoKCSAgICByZXR1cm4gewoJICAgICAgICBwdXJnZVByb3BzLCBtZXJnZVByb3BzLAoJICAgICAgICBmaXJzdCwgbGFzdCwgY29vcmRzVG9LZXksCgkgICAgICAgIGFkZFRvTWFwLCByZW1vdmVGcm9tTWFwLCBnZXRGaXJzdEZyb21NYXAsCgkgICAgICAgIGlzUmluZywgcmluZ0RpcmVjdGlvbiwgcHRJbnNpZGVQb2x5Z29uLCBzdHJUb0Zsb2F0LAoJICAgICAgICBSZWZFbGVtZW50cywgTGF0ZUJpbmRlciwgV2F5Q29sbGVjdGlvbgoJICAgIH07Cgl9KSgpOwoKCXZhciBidWlsZGluZyA9IHsKCX07Cgl2YXIgaGlnaHdheSA9IHsKCQl3aGl0ZWxpc3Q6IFsKCQkJInNlcnZpY2VzIiwKCQkJInJlc3RfYXJlYSIsCgkJCSJlc2NhcGUiLAoJCQkiZWxldmF0b3IiCgkJXQoJfTsKCXZhciBuYXR1cmFsID0gewoJCWJsYWNrbGlzdDogWwoJCQkiY29hc3RsaW5lIiwKCQkJImNsaWZmIiwKCQkJInJpZGdlIiwKCQkJImFyZXRlIiwKCQkJInRyZWVfcm93IgoJCV0KCX07Cgl2YXIgbGFuZHVzZSA9IHs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G9GbG9hdCwKCSAgICAgICAgTGF0ZUJpbmRlciwgV2F5Q29sbGVjdGlvbiB9ID0gdXRpbHMsCgkgICAgICAgIHBvbHlnb25UYWdzID0gcmVxdWlyZSQkMTsKCgkgICAgY2xhc3MgT3NtT2JqZWN0IHsKCSAgICAgICAgY29uc3RydWN0b3IodHlwZSwgaWQsIHJlZkVsZW1zKSB7CgkgICAgICAgICAgICB0aGlzLnR5cGUgPSB0eXBlOwoJICAgICAgICAgICAgdGhpcy5pZCA9IGlkOwoJICAgICAgICAgICAgdGhpcy5yZWZFbGVtcyA9IHJlZkVsZW1zOwoJICAgICAgICAgICAgdGhpcy50YWdzID0ge307CgkgICAgICAgICAgICB0aGlzLnByb3BzID0geyBpZDogdGhpcy5nZXRDb21wb3NpdGVJZCgpIH07CgkgICAgICAgICAgICB0aGlzLnJlZkNvdW50ID0gMDsKCSAgICAgICAgICAgIHRoaXMuaGFzVGFnID0gZmFsc2U7CgkgICAgICAgICAgICBpZiAocmVmRWxlbXMpIHsKCSAgICAgICAgICAgICAgICByZWZFbGVtcy5hZGQodGhpcy5nZXRDb21wb3NpdGVJZCgpLCB0aGlzKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoKCSAgICAgICAgYWRkVGFncyh0YWdzKSB7CgkgICAgICAgICAgICB0aGlzLnRhZ3MgPSBPYmplY3QuYXNzaWduKHRoaXMudGFncywgdGFncyk7CgkgICAgICAgICAgICB0aGlzLmhhc1RhZyA9IHRhZ3MgPyB0cnVlIDogZmFsc2U7CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFRhZyhrLCB2KSB7CgkgICAgICAgICAgICB0aGlzLnRhZ3Nba10gPSB2OwoJICAgICAgICAgICAgdGhpcy5oYXNUYWcgPSBrID8gdHJ1ZSA6IGZhbHNlOwoJICAgICAgICB9CgoJICAgICAgICBhZGRQcm9wKGssIHYpIHsKCSAgICAgICAgICAgIHRoaXMucHJvcHNba10gPSB2OwoJICAgICAgICB9CgoJICAgICAgICBhZGRQcm9wcyhwcm9wcykgewoJICAgICAgICAgICAgdGhpcy5wcm9wcyA9IE9iamVjdC5hc3NpZ24odGhpcy5wcm9wcywgcHJvcHMpOwoJICAgICAgICB9CgoJICAgICAgICBnZXRDb21wb3NpdGVJZCgpIHsKCSAgICAgICAgICAgIHJldHVybiBgJHt0aGlzLnR5cGV9LyR7dGhpcy5pZH1gOwoJICAgICAgICB9CgoJICAgICAgICBnZXRQcm9wcygpIHsKCSAgICAgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKHRoaXMucHJvcHMsIHRoaXMudGFncyk7CgkgICAgICAgIH0KCgkgICAgICAgIHRvRmVhdHVyZUFycmF5KCkgewoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgkgICAgfQoKCSAgICBjbGFzcyBOb2RlIGV4dGVuZHMgT3NtT2JqZWN0IHsKCSAgICAgICAgY29uc3RydWN0b3IoaWQsIHJlZkVsZW1zKSB7CgkgICAgICAgICAgICBzdXBlcignbm9kZScsIGlkLCByZWZFbGVtcyk7CgkgICAgICAgICAgICB0aGlzLmxhdExuZyA9IG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgIHNldExhdExuZyhsYXRMbmcpIHsKCSAgICAgICAgICAgIHRoaXMubGF0TG5nID0gbGF0TG5nOwoJICAgICAgICB9CgoJICAgICAgICB0b0ZlYXR1cmVBcnJheSgpIHsKCSAgICAgICAgICAgIGlmICh0aGlzLmxhdExuZykgewoJICAgICAgICAgICAgICAgIHJldHVybiBbewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgICAgICAgICAgICAgIGlkOiB0aGlzLmdldENvbXBvc2l0ZUlkKCksCgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHRoaXMuZ2V0UHJvcHMoKSwKCSAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdQb2ludCcsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogc3RyVG9GbG9hdChbdGhpcy5sYXRMbmcubG9uLCB0aGlzLmxhdExuZy5sYXRdKQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfV07CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgoJICAgICAgICBnZXRMYXRMbmcoKSB7CgkgICAgICAgICAgICByZXR1cm4gdGhpcy5sYXRMbmc7CgkgICAgICAgIH0KCSAgICB9CgoJICAgIGNsYXNzIFdheSBleHRlbmRzIE9zbU9iamVjdCB7CgkgICAgICAgIGNvbnN0cnVjdG9yKGlkLCByZWZFbGVtcykgewoJICAgICAgICAgICAgc3VwZXIoJ3dheScsIGlkLCByZWZFbGVtcyk7CgkgICAgICAgICAgICB0aGlzLmxhdExuZ0FycmF5ID0gW107CgkgICAgICAgICAgICB0aGlzLmlzUG9seWdvbiA9IGZhbHNlOwoJICAgICAgICB9CgoJICAgICAgICBhZGRMYXRMbmcobGF0TG5nKSB7CgkgICAgICAgICAgICB0aGlzLmxhdExuZ0FycmF5LnB1c2gobGF0TG5nKTsKCSAgICAgICAgfQoKCSAgICAgICAgc2V0TGF0TG5nQXJyYXkobGF0TG5nQXJyYXkpIHsKCSAgICAgICAgICAgIHRoaXMubGF0TG5nQXJyYXkgPSBsYXRMbmdBcnJheTsKCSAgICAgICAgfQoKCSAgICAgICAgYWRkTm9kZVJlZihyZWYpIHsKCSAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih0aGlzLmxhdExuZ0FycmF5LCBmdW5jdGlvbiAoaWQpIHsKCSAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IHRoaXMucmVmRWxlbXMuZ2V0KGBub2RlLyR7aWR9YCk7CgkgICAgICAgICAgICAgICAgaWYgKG5vZGUpIHsKCSAgICAgICAgICAgICAgICAgICAgbm9kZS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5nZXRMYXRMbmcoKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9LCB0aGlzLCBbcmVmXSk7CgoJICAgICAgICAgICAgdGhpcy5sYXRMbmdBcnJheS5wdXNoKGJpbmRlcik7CgkgICAgICAgICAgICB0aGlzLnJlZkVsZW1zLmFkZEJpbmRlcihiaW5kZXIpOwoJICAgICAgICB9CgoJICAgICAgICBhbmFseXplR2VvbWV0cnlUeXBlKGssIHYpIHsKCSAgICAgICAgICAgIGxldCBvID0gcG9seWdvblRhZ3Nba107CgkgICAgICAgICAgICBpZiAobykgewoJICAgICAgICAgICAgICAgIHRoaXMuaXNQb2x5Z29uID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICBpZiAoby53aGl0ZWxpc3QpIHsKCSAgICAgICAgICAgICAgICAgICAgdGhpcy5pc1BvbHlnb24gPSBvLndoaXRlbGlzdC5pbmRleE9mKHYpID49IDAgPyB0cnVlIDogZmFsc2U7CgkgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChvLmJsYWNrbGlzdCkgewoJICAgICAgICAgICAgICAgICAgICB0aGlzLmlzUG9seWdvbiA9IG8uYmxhY2tsaXN0LmluZGV4T2YodikgPj0gMCA/IGZhbHNlIDogdHJ1ZTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFRhZ3ModGFncykgewoJICAgICAgICAgICAgc3VwZXIuYWRkVGFncyh0YWdzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyh0YWdzKSkgewoJICAgICAgICAgICAgICAgIHRoaXMuYW5hbHl6ZUdlb21ldHJ5VHlwZShrLCB2KTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoKCSAgICAgICAgYWRkVGFnKGssIHYpIHsKCSAgICAgICAgICAgIHN1cGVyLmFkZFRhZyhrLCB2KTsKCSAgICAgICAgICAgIHRoaXMuYW5hbHl6ZUdlb21ldHJ5VHlwZShrLCB2KTsKCSAgICAgICAgfQoKCSAgICAgICAgdG9Db29yZHNBcnJheSgpIHsKCSAgICAgICAgICAgIHJldHVybiB0aGlzLmxhdExuZ0FycmF5Lm1hcChsYXRMbmcgPT4gW2xhdExuZy5sb24sIGxhdExuZy5sYXRdKTsKCSAgICAgICAgfQoKCSAgICAgICAgdG9GZWF0dXJlQXJyYXkoKSB7CgkgICAgICAgICAgICBsZXQgY29vcmRzQXJyYXkgPSB0aGlzLnRvQ29vcmRzQXJyYXkoKTsKCSAgICAgICAgICAgIGlmIChjb29yZHNBcnJheS5sZW5ndGggPiAxKSB7CgkgICAgICAgICAgICAgICAgY29vcmRzQXJyYXkgPSBzdHJUb0Zsb2F0KGNvb3Jkc0FycmF5KTsKCSAgICAgICAgICAgICAgICBsZXQgZmVhdHVyZSA9IHsKCSAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0ZlYXR1cmUnLAoJICAgICAgICAgICAgICAgICAgICBpZDogdGhpcy5nZXRDb21wb3NpdGVJZCgpLAoJICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzOiB0aGlzLmdldFByb3BzKCksCgkgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTGluZVN0cmluZycsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogY29vcmRzQXJyYXkKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH07CgoJICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzUG9seWdvbiAmJiBpc1JpbmcoY29vcmRzQXJyYXkpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChyaW5nRGlyZWN0aW9uKGNvb3Jkc0FycmF5KSAhPT0gJ2NvdW50ZXJjbG9ja3dpc2UnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZHNBcnJheS5yZXZlcnNlKCk7CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIGZlYXR1cmUuZ2VvbWV0cnkgPSB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnUG9seWdvbicsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogW2Nvb3Jkc0FycmF5XQoJICAgICAgICAgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtmZWF0dXJlXTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIHJldHVybiBbZmVhdHVyZV07CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgkgICAgfQoKCSAgICBjbGFzcyBSZWxhdGlvbiBleHRlbmRzIE9zbU9iamVjdCB7CgkgICAgICAgIGNvbnN0cnVjdG9yKGlkLCByZWZFbGVtcykgewoJICAgICAgICAgICAgc3VwZXIoJ3JlbGF0aW9uJywgaWQsIHJlZkVsZW1zKTsKCSAgICAgICAgICAgIHRoaXMucmVsYXRpb25zID0gW107CgkgICAgICAgICAgICB0aGlzLm5vZGVzID0gW107CgkgICAgICAgICAgICB0aGlzLmJvdW5kcyA9IG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgIHNldEJvdW5kcyhib3VuZHMpIHsKCSAgICAgICAgICAgIHRoaXMuYm91bmRzID0gYm91bmRzOwoJICAgICAgICB9CgoJICAgICAgICBhZGRNZW1iZXIobWVtYmVyKSB7CgkgICAgICAgICAgICBzd2l0Y2ggKG1lbWJlci50eXBlKSB7CgkgICAgICAgICAgICAgICAgLy8gc3VwZXIgcmVsYXRpb24sIG5lZWQgdG8gZG8gY29tYmluYXRpb24KCSAgICAgICAgICAgICAgICBjYXNlICdyZWxhdGlvbic6CgkgICAgICAgICAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih0aGlzLnJlbGF0aW9ucywgZnVuY3Rpb24gKGlkKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVsYXRpb24gPSB0aGlzLnJlZkVsZW1zLmdldChgcmVsYXRpb24vJHtpZH1gKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWxhdGlvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlbGF0aW9uOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLCBbbWVtYmVyLnJlZl0pOwoJICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aW9ucy5wdXNoKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucmVmRWxlbXMuYWRkQmluZGVyKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoKCSAgICAgICAgICAgICAgICBjYXNlICd3YXknOgoJICAgICAgICAgICAgICAgICAgICBpZiAoIW1lbWJlci5yb2xlKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBtZW1iZXIucm9sZSA9ICcnOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGxldCB3YXlzID0gdGhpc1ttZW1iZXIucm9sZV07CgkgICAgICAgICAgICAgICAgICAgIGlmICghd2F5cykgewoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5cyA9IHRoaXNbbWVtYmVyLnJvbGVdID0gW107CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgaWYgKG1lbWJlci5nZW9tZXRyeSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdheSA9IG5ldyBXYXkobWVtYmVyLnJlZiwgdGhpcy5yZWZFbGVtcyk7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXkuc2V0TGF0TG5nQXJyYXkobWVtYmVyLmdlb21ldHJ5KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHdheS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5cy5wdXNoKHdheSk7CgkgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWVtYmVyLm5vZGVzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2F5ID0gbmV3IFdheShtZW1iZXIucmVmLCB0aGlzLnJlZkVsZW1zKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IG5pZCBvZiBtZW1iZXIubm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXkuYWRkTm9kZVJlZihuaWQpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXlzLnB1c2god2F5KTsKCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih3YXlzLCBmdW5jdGlvbiAoaWQpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2F5ID0gdGhpcy5yZWZFbGVtcy5nZXQoYHdheS8ke2lkfWApOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3YXkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB3YXk7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGhpcywgW21lbWJlci5yZWZdKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHdheXMucHVzaChiaW5kZXIpOwoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZFbGVtcy5hZGRCaW5kZXIoYmluZGVyKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCgkgICAgICAgICAgICAgICAgY2FzZSAnbm9kZSc6CgkgICAgICAgICAgICAgICAgICAgIGxldCBub2RlID0gbnVsbDsKCSAgICAgICAgICAgICAgICAgICAgaWYgKG1lbWJlci5sYXQgJiYgbWVtYmVyLmxvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSA9IG5ldyBOb2RlKG1lbWJlci5yZWYsIHRoaXMucmVmRWxlbXMpOwoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5zZXRMYXRMbmcoeyBsb246IG1lbWJlci5sb24sIGxhdDogbWVtYmVyLmxhdCB9KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtZW1iZXIudGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuYWRkVGFncyhtZW1iZXIudGFncyk7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBbaywgdl0gb2YgT2JqZWN0LmVudHJpZXMobWVtYmVyKSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChbJ2lkJywgJ3R5cGUnLCAnbGF0JywgJ2xvbiddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuYWRkUHJvcChrLCB2KTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2Rlcy5wdXNoKG5vZGUpOwoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJpbmRlciA9IG5ldyBMYXRlQmluZGVyKHRoaXMubm9kZXMsIGZ1bmN0aW9uIChpZCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5yZWZFbGVtcy5nZXQoYG5vZGUvJHtpZH1gKTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobm9kZSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlLnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRoaXMsIFttZW1iZXIucmVmXSk7CgkgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGVzLnB1c2goYmluZGVyKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVmRWxlbXMuYWRkQmluZGVyKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIHRvRmVhdHVyZUFycmF5KCkgewoJICAgICAgICAgICAgY29uc3QgY29uc3RydWN0U3RyaW5nR2VvbWV0cnkgPSAod3MpID0+IHsKCSAgICAgICAgICAgICAgICBsZXQgc3RyaW5ncyA9IHdzID8gd3MudG9TdHJpbmdzKCkgOiBbXTsKCSAgICAgICAgICAgICAgICBpZiAoc3RyaW5ncy5sZW5ndGggPiAwKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdzLmxlbmd0aCA9PT0gMSkgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdMaW5lU3RyaW5nJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBzdHJpbmdzWzBdCgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTXVsdGlMaW5lU3RyaW5nJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBzdHJpbmdzCgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGNvbnN0IGNvbnN0cnVjdFBvbHlnb25HZW9tZXRyeSA9IChvd3MsIGl3cykgPT4gewoJICAgICAgICAgICAgICAgIGxldCBvdXRlclJpbmdzID0gb3dzID8gb3dzLnRvUmluZ3MoJ2NvdW50ZXJjbG9ja3dpc2UnKSA6IFtdLAoJICAgICAgICAgICAgICAgICAgICBpbm5lclJpbmdzID0gaXdzID8gaXdzLnRvUmluZ3MoJ2Nsb2Nrd2lzZScpIDogW107CgoJICAgICAgICAgICAgICAgIGlmIChvdXRlclJpbmdzLmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICAgICAgbGV0IGNvbXBvc2l0UG9seW9ucyA9IFtdOwoKCSAgICAgICAgICAgICAgICAgICAgbGV0IHJpbmcgPSBudWxsOwoJICAgICAgICAgICAgICAgICAgICBmb3IgKHJpbmcgb2Ygb3V0ZXJSaW5ncykKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvc2l0UG9seW9ucy5wdXNoKFtyaW5nXSk7CgoJICAgICAgICAgICAgICAgICAgICAvLyBsaW5rIGlubmVyIHBvbHlnb25zIHRvIG91dGVyIGNvbnRhaW5lcnMKCSAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHJpbmcgPSBpbm5lclJpbmdzLnNoaWZ0KCkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGlkeCBpbiBvdXRlclJpbmdzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0SW5zaWRlUG9seWdvbihmaXJzdChyaW5nKSwgb3V0ZXJSaW5nc1tpZHhdKSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb3NpdFBvbHlvbnNbaWR4XS5wdXNoKHJpbmcpOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIC8vIGNvbnN0cnVjdCB0aGUgUG9seWdvbi9NdWx0aVBvbHlnb24gZ2VvbWV0cnkKCSAgICAgICAgICAgICAgICAgICAgaWYgKGNvbXBvc2l0UG9seW9ucy5sZW5ndGggPT09IDEpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BvbHlnb24nLAoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBjb21wb3NpdFBvbHlvbnNbMF0KCSAgICAgICAgICAgICAgICAgICAgICAgIH07CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTXVsdGlQb2x5Z29uJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBjb21wb3NpdFBvbHlvbnMKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGxldCBwb2x5Z29uRmVhdHVyZXMgPSBbXSwgc3RyaW5nRmVhdHVyZXMgPSBbXSwgcG9pbnRGZWF0dXJlcyA9IFtdOwoJICAgICAgICAgICAgY29uc3Qgd2F5c0ZpZWxkTmFtZXMgPSBbJ291dGVyJywgJ2lubmVyJywgJyddOwoJICAgICAgICAgICAgLy8gbmVlZCB0byBkbyBjb21iaW5hdGlvbiB3aGVuIHRoZXJlJ3JlIG5lc3RlZCByZWxhdGlvbnMKCSAgICAgICAgICAgIGZvciAobGV0IHJlbGF0aW9uIG9mIHRoaXMucmVsYXRpb25zKSB7CgkgICAgICAgICAgICAgICAgaWYgKHJlbGF0aW9uKSB7CgkgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGZpZWxkTmFtZSBvZiB3YXlzRmllbGROYW1lcykgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdheXMgPSByZWxhdGlvbltmaWVsZE5hbWVdOwoJICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdheXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGhpc1dheXMgPSB0aGlzW2ZpZWxkTmFtZV07CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXNXYXlzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdLnNwbGljZS5hcHBseSh0aGlzV2F5cywgW3RoaXNXYXlzLmxlbmd0aCwgMF0uY29uY2F0KHdheXMpKTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2ZpZWxkTmFtZV0gPSB3YXlzOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCgkgICAgICAgICAgICBmb3IgKGxldCBmaWVsZE5hbWUgb2Ygd2F5c0ZpZWxkTmFtZXMpIHsKCSAgICAgICAgICAgICAgICBsZXQgd2F5cyA9IHRoaXNbZmllbGROYW1lXTsKCSAgICAgICAgICAgICAgICBpZiAod2F5cykgewoJICAgICAgICAgICAgICAgICAgICB0aGlzW2ZpZWxkTmFtZV0gPSBuZXcgV2F5Q29sbGVjdGlvbigpOwoJICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCB3YXkgb2Ygd2F5cykgewoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tmaWVsZE5hbWVdLmFkZFdheSh3YXkpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIGxldCBnZW9tZXRyeSA9IG51bGw7CgoJICAgICAgICAgICAgbGV0IGZlYXR1cmUgPSB7CgkgICAgICAgICAgICAgICAgdHlwZTogJ0ZlYXR1cmUnLAoJICAgICAgICAgICAgICAgIGlkOiB0aGlzLmdldENvbXBvc2l0ZUlkKCksCgkgICAgICAgICAgICAgICAgYmJveDogdGhpcy5ib3VuZHMsCgkgICAgICAgICAgICAgICAgcHJvcGVydGllczogdGhpcy5nZXRQcm9wcygpCgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGlmICghdGhpcy5ib3VuZHMpIHsKCSAgICAgICAgICAgICAgICBkZWxldGUgZmVhdHVyZS5iYm94OwoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIGlmICh0aGlzLm91dGVyKSB7CgkgICAgICAgICAgICAgICAgZ2VvbWV0cnkgPSBjb25zdHJ1Y3RQb2x5Z29uR2VvbWV0cnkodGhpcy5vdXRlciwgdGhpcy5pbm5lcik7CgkgICAgICAgICAgICAgICAgaWYgKGdlb21ldHJ5KSB7CgkgICAgICAgICAgICAgICAgICAgIGZlYXR1cmUuZ2VvbWV0cnkgPSBnZW9tZXRyeTsKCSAgICAgICAgICAgICAgICAgICAgcG9seWdvbkZlYXR1cmVzLnB1c2goZmVhdHVyZSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSBpZiAodGhpc1snJ10pIHsKCSAgICAgICAgICAgICAgICBnZW9tZXRyeSA9IGNvbnN0cnVjdFN0cmluZ0dlb21ldHJ5KHRoaXNbJyddKTs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ICBsZXQgYm9keSA9ICdyZXR1cm4gJyArIGNvbmQucmVwbGFjZSgvKFwkLis/KSg/PVs9IS5dKS9nLCAnbm9kZS4kJicpICsgJzsnOwoJICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKCdub2RlJywgYm9keSk7CgkgICAgfQoKCSAgICByZXR1cm4gY2xhc3MgewoJICAgICAgICBjb25zdHJ1Y3RvcihvcHRzKSB7CgkgICAgICAgICAgICBpZiAob3B0cykgewoJICAgICAgICAgICAgICAgIHRoaXMucXVlcnlQYXJlbnQgPSBvcHRzLnF1ZXJ5UGFyZW50ID8gdHJ1ZSA6IGZhbHNlOwoJICAgICAgICAgICAgICAgIHRoaXMucHJvZ3Jlc3NpdmUgPSBvcHRzLnByb2dyZXNzaXZlOwoJICAgICAgICAgICAgICAgIGlmICh0aGlzLnF1ZXJ5UGFyZW50KSB7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50TWFwID0gbmV3IFdlYWtNYXAoKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICB0aGlzLmV2dExpc3RlbmVycyA9IHt9OwoJICAgICAgICB9CgoJICAgICAgICBwYXJzZSh4bWwsIHBhcmVudCwgZGlyKSB7CgkgICAgICAgICAgICBkaXIgPSBkaXIgPyBkaXIgKyAnLicgOiAnJzsKCSAgICAgICAgICAgIGxldCBub2RlUmVnRXggPSAvPChbXiA+XC9dKykoLio/KT4vbWcsIG5vZGVNYXRjaCA9IG51bGwsIG5vZGVzID0gW107CgkgICAgICAgICAgICB3aGlsZSAobm9kZU1hdGNoID0gbm9kZVJlZ0V4LmV4ZWMoeG1sKSkgewoJICAgICAgICAgICAgICAgIGxldCB0YWcgPSBub2RlTWF0Y2hbMV0sIG5vZGUgPSB7ICR0YWc6IHRhZyB9LCBmdWxsVGFnID0gZGlyICsgdGFnOwoKCSAgICAgICAgICAgICAgICBsZXQgYXR0clRleHQgPSBub2RlTWF0Y2hbMl0udHJpbSgpLCBjbG9zZWQgPSBmYWxzZTsKCSAgICAgICAgICAgICAgICBpZiAoYXR0clRleHQuZW5kc1dpdGgoJy8nKSB8fCB0YWcuc3RhcnRzV2l0aCgnPycpIHx8IHRhZy5zdGFydHNXaXRoKCchJykpIHsKCSAgICAgICAgICAgICAgICAgICAgY2xvc2VkID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGxldCBhdHRSZWdFeDEgPSAvKFteIF0rPyk9IiguKz8pIi9nLCBhdHRSZWdFeDIgPSAvKFteIF0rPyk9JyguKz8pJy9nOwoJICAgICAgICAgICAgICAgIGxldCBhdHRNYXRjaCA9IG51bGwsIGhhc0F0dHJzID0gZmFsc2U7CgkgICAgICAgICAgICAgICAgd2hpbGUgKGF0dE1hdGNoID0gYXR0UmVnRXgxLmV4ZWMoYXR0clRleHQpKSB7CgkgICAgICAgICAgICAgICAgICAgIGhhc0F0dHJzID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICAgICAgbm9kZVthdHRNYXRjaFsxXV0gPSBhdHRNYXRjaFsyXTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgaWYgKCFoYXNBdHRycykKCSAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGF0dE1hdGNoID0gYXR0UmVnRXgyLmV4ZWMoYXR0clRleHQpKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBoYXNBdHRycyA9IHRydWU7CgkgICAgICAgICAgICAgICAgICAgICAgICBub2RlW2F0dE1hdGNoWzFdXSA9IGF0dE1hdGNoWzJdOwoJICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGlmICghaGFzQXR0cnMgJiYgYXR0clRleHQgIT09ICcnKSB7CgkgICAgICAgICAgICAgICAgICAgIG5vZGUudGV4dCA9IGF0dHJUZXh0OwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBpZiAodGhpcy5wcm9ncmVzc2l2ZSkgewoJICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoYDwke2Z1bGxUYWd9PmAsIG5vZGUsIHBhcmVudCk7CgkgICAgICAgICAgICAgICAgfQoKCSAgICAgICAgICAgICAgICBpZiAoIWNsb3NlZCkgewoJICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJSZWdFeCA9IG5ldyBSZWdFeHAoYChbXl0rPyk8XC8ke3RhZ30+YCwgJ2cnKTsKCSAgICAgICAgICAgICAgICAgICAgaW5uZXJSZWdFeC5sYXN0SW5kZXggPSBub2RlUmVnRXgubGFzdEluZGV4OwoJICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJNYXRjaCA9IGlubmVyUmVnRXguZXhlYyh4bWwpOwoJICAgICAgICAgICAgICAgICAgICBpZiAoaW5uZXJNYXRjaCAmJiBpbm5lck1hdGNoWzFdKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBub2RlUmVnRXgubGFzdEluZGV4ID0gaW5uZXJSZWdFeC5sYXN0SW5kZXg7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJOb2RlcyA9IHRoaXMucGFyc2UoaW5uZXJNYXRjaFsxXSwgbm9kZSwgZnVsbFRhZyk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5uZXJOb2Rlcy5sZW5ndGggPiAwKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS4kaW5uZXJOb2RlcyA9IGlubmVyTm9kZXM7CgkgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuJGlubmVyVGV4dCA9IGlubmVyTWF0Y2hbMV07CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgaWYgKHRoaXMucXVlcnlQYXJlbnQgJiYgcGFyZW50KSB7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50TWFwLnNldChub2RlLCBwYXJlbnQpOwoJICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgaWYgKHRoaXMucHJvZ3Jlc3NpdmUpIHsKCSAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KGA8LyR7ZnVsbFRhZ30+YCwgbm9kZSwgcGFyZW50KTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIG5vZGVzLnB1c2gobm9kZSk7CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIG5vZGVzOwoJICAgICAgICB9CgoJICAgICAgICBnZXRQYXJlbnQobm9kZSkgewoJICAgICAgICAgICAgaWYgKHRoaXMucXVlcnlQYXJlbnQpIHsKCSAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJlbnRNYXAuZ2V0KG5vZGUpOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgICNhZGRMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGxldCBmdW5jcyA9IHRoaXMuZXZ0TGlzdGVuZXJzW2V2dF07CgkgICAgICAgICAgICBpZiAoZnVuY3MpIHsKCSAgICAgICAgICAgICAgICBmdW5jcy5wdXNoKGZ1bmMpOwoJICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICB0aGlzLmV2dExpc3RlbmVyc1tldnRdID0gW2Z1bmNdOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgoJICAgICAgICAvLyBzdXBwb3J0IGphdmFzY3JpcHQgY29uZGl0aW9uIGZvciB0aGUgbGFzdCB0YWcKCSAgICAgICAgYWRkTGlzdGVuZXIoZXZ0LCBmdW5jKSB7CgkgICAgICAgICAgICBpZiAoY29uZGl0aW9uZWQoZXZ0KSkgewoJICAgICAgICAgICAgICAgIC8vIGZ1bmMucHJvdG90eXBlID0gZXZ0OwoJICAgICAgICAgICAgICAgIGV2dCA9IHBhcnNlRXZlbnQoZXZ0KTsKCSAgICAgICAgICAgICAgICBmdW5jLmNvbmRpdGlvbiA9IGdlbkNvbmRpdGlvbkZ1bmMoZXZ0LmV4cCk7CgkgICAgICAgICAgICAgICAgZXZ0ID0gZXZ0LmV2dDsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIHRoaXMuI2FkZExpc3RlbmVyKGV2dCwgZnVuYyk7CgkgICAgICAgIH0KCgkgICAgICAgICNyZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGxldCBmdW5jcyA9IHRoaXMuZXZ0TGlzdGVuZXJzW2V2dF07CgkgICAgICAgICAgICBsZXQgaWR4ID0gbnVsbDsKCSAgICAgICAgICAgIGlmIChmdW5jcyAmJiAoaWR4ID0gZnVuY3MuaW5kZXhPZihmdW5jKSkgPj0gMCkgewoJICAgICAgICAgICAgICAgIGZ1bmNzLnNwbGljZShpZHgsIDEpOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgoJICAgICAgICByZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGlmIChjb25kaXRpb25lZChldnQpKSB7CgkgICAgICAgICAgICAgICAgZXZ0ID0gcGFyc2VFdmVudChldnQpOwoJICAgICAgICAgICAgICAgIGV2dCA9IGV2dC5ldnQ7CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICB0aGlzLiNyZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpOwoJICAgICAgICB9CgoJICAgICAgICBlbWl0KGV2dCwgLi4uYXJncykgewoJICAgICAgICAgICAgbGV0IGZ1bmNzID0gdGhpcy5ldnRMaXN0ZW5lcnNbZXZ0XTsKCSAgICAgICAgICAgIGlmIChmdW5jcykgewoJICAgICAgICAgICAgICAgIGZvciAobGV0IGZ1bmMgb2YgZnVuY3MpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGZ1bmMuY29uZGl0aW9uKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZnVuYy5jb25kaXRpb24uYXBwbHkobnVsbCwgYXJncykgPT09IHRydWUpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jLmFwcGx5KG51bGwsIGFyZ3MpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgZnVuYy5hcHBseShudWxsLCBhcmdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoKCSAgICAgICAgb24oZXZ0LCBmdW5jKSB7CgkgICAgICAgICAgICB0aGlzLmFkZExpc3RlbmVyKGV2dCwgZnVuYyk7CgkgICAgICAgIH0KCgkgICAgICAgIG9mZihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIHRoaXMucmVtb3ZlTGlzdGVuZXIoZXZ0LCBmdW5jKTsKCSAgICAgICAgfQoJICAgIH07Cgl9KSgpOwoKCWNvbnN0IHsgTm9kZSwgV2F5LCBSZWxhdGlvbiB9ID0gb3Ntb2JqcywKCSAgICB7IHB1cmdlUHJvcHMsIFJlZkVsZW1lbnRzIH0gPSB1dGlscywKCSAgICBYbWxQYXJzZXIgPSB4bWxwYXJzZXI7CgoJdmFyIGxpYiA9IChvc20sIG9wdHMpID0+IHsKCSAgICBsZXQgY29tcGxldGVGZWF0dXJlID0gZmFsc2UsIHJlbmRlclRhZ2dlZCA9IGZhbHNlLCBleGNsdWRlV2F5ID0gdHJ1ZTsKCgkgICAgY29uc3QgcGFyc2VPcHRzID0gb3B0cyA9PiB7CgkgICAgICAgIGlmIChvcHRzKSB7CgkgICAgICAgICAgICBjb21wbGV0ZUZlYXR1cmUgPSBvcHRzLmNvbXBsZXRlRmVhdHVyZSB8fCBvcHRzLmFsbEZlYXR1cmVzID8gdHJ1ZSA6IGZhbHNlOwoJICAgICAgICAgICAg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ZSA9IG5ldyBOb2RlKGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0udGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5hZGRUYWdzKGVsZW0udGFncyk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgbm9kZS5hZGRQcm9wcyhwdXJnZVByb3BzKGVsZW0sIFsnaWQnLCAndHlwZScsICd0YWdzJywgJ2xhdCcsICdsb24nXSkpOwoJICAgICAgICAgICAgICAgICAgICBub2RlLnNldExhdExuZyhlbGVtKTsKCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgoJICAgICAgICAgICAgICAgIGNhc2UgJ3dheSc6CgkgICAgICAgICAgICAgICAgICAgIGxldCB3YXkgPSBuZXcgV2F5KGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0udGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZFRhZ3MoZWxlbS50YWdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB3YXkuYWRkUHJvcHMocHVyZ2VQcm9wcyhlbGVtLCBbJ2lkJywgJ3R5cGUnLCAndGFncycsICdub2RlcycsICdnZW9tZXRyeSddKSk7CgkgICAgICAgICAgICAgICAgICAgIGlmIChlbGVtLm5vZGVzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuIG9mIGVsZW0ubm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXkuYWRkTm9kZVJlZihuKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChlbGVtLmdlb21ldHJ5KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXkuc2V0TGF0TG5nQXJyYXkoZWxlbS5nZW9tZXRyeSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgoJICAgICAgICAgICAgICAgIGNhc2UgJ3JlbGF0aW9uJzoKCSAgICAgICAgICAgICAgICAgICAgbGV0IHJlbGF0aW9uID0gbmV3IFJlbGF0aW9uKGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0uYm91bmRzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICByZWxhdGlvbi5zZXRCb3VuZHMoW3BhcnNlRmxvYXQoZWxlbS5ib3VuZHMubWlubG9uKSwgcGFyc2VGbG9hdChlbGVtLmJvdW5kcy5taW5sYXQpLCBwYXJzZUZsb2F0KGVsZW0uYm91bmRzLm1heGxvbiksIHBhcnNlRmxvYXQoZWxlbS5ib3VuZHMubWF4bGF0KV0pOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGlmIChlbGVtLnRhZ3MpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLmFkZFRhZ3MoZWxlbS50YWdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICByZWxhdGlvbi5hZGRQcm9wcyhwdXJnZVByb3BzKGVsZW0sIFsnaWQnLCAndHlwZScsICd0YWdzJywgJ2JvdW5kcycsICdtZW1iZXJzJ10pKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0ubWVtYmVycykgewoJICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgbWVtYmVyIG9mIGVsZW0ubWVtYmVycykgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLmFkZE1lbWJlcihtZW1iZXIpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfTsKCgkgICAgY29uc3QgYW5hbHl6ZUZlYXR1cmVzRnJvbVhtbCA9IG9zbSA9PiB7CgkgICAgICAgIGNvbnN0IHhtbFBhcnNlciA9IG5ldyBYbWxQYXJzZXIoeyBwcm9ncmVzc2l2ZTogdHJ1ZSB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5vbignPC9vc20ubm9kZT4nLCBub2RlID0+IHsKCSAgICAgICAgICAgIGxldCBuZCA9IG5ldyBOb2RlKG5vZGUuaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyhub2RlKSkKCSAgICAgICAgICAgICAgICBpZiAoIWsuc3RhcnRzV2l0aCgnJCcpICYmIFsnaWQnLCAnbG9uJywgJ2xhdCddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgIG5kLmFkZFByb3Aoaywgdik7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgbmQuc2V0TGF0TG5nKG5vZGUpOwoJICAgICAgICAgICAgaWYgKG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmQgb2Ygbm9kZS4kaW5uZXJOb2RlcykgewoJICAgICAgICAgICAgICAgICAgICBpZiAoaW5kLiR0YWcgPT09ICd0YWcnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBuZC5hZGRUYWcoaW5kLmssIGluZC52KTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgoJICAgICAgICB4bWxQYXJzZXIub24oJzwvb3NtLndheT4nLCBub2RlID0+IHsKCSAgICAgICAgICAgIGxldCB3YXkgPSBuZXcgV2F5KG5vZGUuaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyhub2RlKSkgewoJICAgICAgICAgICAgICAgIGlmICghay5zdGFydHNXaXRoKCckJykgJiYgWydpZCddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgIHdheS5hZGRQcm9wKGssIHYpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGlmIChub2RlLiRpbm5lck5vZGVzKSB7CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kIG9mIG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGluZC4kdGFnID09PSAnbmQnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kLmxvbiAmJiBpbmQubGF0KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZExhdExuZyhpbmQpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbmQucmVmKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZE5vZGVSZWYoaW5kLnJlZik7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5kLiR0YWcgPT09ICd0YWcnKQoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZFRhZyhpbmQuaywgaW5kLnYpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgoJICAgICAgICB4bWxQYXJzZXIub24oJzxvc20ucmVsYXRpb24+Jywgbm9kZSA9PiB7CgkgICAgICAgICAgICBuZXcgUmVsYXRpb24obm9kZS5pZCwgcmVmRWxlbWVudHMpOwoJICAgICAgICB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5vbignPC9vc20ucmVsYXRpb24ubWVtYmVyPicsIChub2RlLCBwYXJlbnQpID0+IHsKCSAgICAgICAgICAgIGxldCByZWxhdGlvbiA9IHJlZkVsZW1lbnRzLmdldChgcmVsYXRpb24vJHtwYXJlbnQuaWR9YCk7CgkgICAgICAgICAgICBsZXQgbWVtYmVyID0gewoJICAgICAgICAgICAgICAgIHR5cGU6IG5vZGUudHlwZSwKCSAgICAgICAgICAgICAgICByb2xlOiBub2RlLnJvbGUgPyBub2RlLnJvbGUgOiAnJywKCSAgICAgICAgICAgICAgICByZWY6IG5vZGUucmVmCgkgICAgICAgICAgICB9OwoJICAgICAgICAgICAgaWYgKG5vZGUubGF0ICYmIG5vZGUubG9uKSB7CgkgICAgICAgICAgICAgICAgbWVtYmVyLmxhdCA9IG5vZGUubGF0LCBtZW1iZXIubG9uID0gbm9kZS5sb24sIG1lbWJlci50YWdzID0ge307CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgW2ssIHZdIG9mIE9iamVjdC5lbnRyaWVzKG5vZGUpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmICghay5zdGFydHNXaXRoKCckJykgJiYgWyd0eXBlJywgJ2xhdCcsICdsb24nXS5pbmRleE9mKGspIDwgMCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgbWVtYmVyW2tdID0gdjsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGlmIChub2RlLiRpbm5lck5vZGVzKSB7CgkgICAgICAgICAgICAgICAgbGV0IGdlb21ldHJ5ID0gW107CgkgICAgICAgICAgICAgICAgbGV0IG5vZGVzID0gW107CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kIG9mIG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGluZC5sYXQgJiYgaW5kLmxvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkucHVzaChpbmQpOwoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChpbmQucmVmKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBpZiAoZ2VvbWV0cnkubGVuZ3RoID4gMCkgewoJICAgICAgICAgICAgICAgICAgICBtZW1iZXIuZ2VvbWV0cnkgPSBnZW9tZXRyeTsKCSAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5vZGVzLmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICAgICAgbWVtYmVyLm5vZGVzID0gbm9kZXM7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmVsYXRpb24uYWRkTWVtYmVyKG1lbWJlcik7CgkgICAgICAgIH0pOwoKCSAgICAgICAgeG1sUGFyc2VyLm9uKCc8L29zbS5yZWxhdGlvbi5ib3VuZHM+JywgKG5vZGUsIHBhcmVudCkgPT4gewoJICAgICAgICAgICAgcmVmRWxlbWVudHMuZ2V0KGByZWxhdGlvbi8ke3BhcmVudC5pZH1gKS5zZXRCb3VuZHMoW3BhcnNlRmxvYXQobm9kZS5taW5sb24pLCBwYXJzZUZsb2F0KG5vZGUubWlubGF0KSwgcGFyc2VGbG9hdChub2RlLm1heGxvbiksIHBhcnNlRmxvYXQobm9kZS5tYXhsYXQpXSk7CgkgICAgICAgIH0pOwoKCSAgICAgICAgeG1sUGFyc2VyLm9uKCc8L29zbS5yZWxhdGlvbi50YWc+JywgKG5vZGUsIHBhcmVudCkgPT4gewoJICAgICAgICAgICAgcmVmRWxlbWVudHMuZ2V0KGByZWxhdGlvbi8ke3BhcmVudC5pZH1gKS5hZGRUYWcobm9kZS5rLCBub2RlLnYpOwoJICAgICAgICB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5wYXJzZShvc20pOwoJICAgIH07CgoJICAgIGlmIChmb3JtYXQgPT09ICdqc29uLXJhdycpIHsKCSAgICAgICAgb3NtID0gSlNPTi5wYXJzZShvc20pOwoJICAgICAgICBpZiAob3NtLmVsZW1lbnRzKSB7CgkgICAgICAgICAgICBmb3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20yZ2VvanNvbih0aGlzLl9yYXdEYXRhKTsKCSAgICB9CgkgICAgLyoqCgkgICAgICogTG9hZHMgYW5kIHBhcnNlcyBQb2x5bGluZSBkYXRhIGludG8gYSBHZW9KU09OIEZlYXR1cmVDb2xsZWN0aW9uLgoJICAgICAqIEByZXR1cm5zIEEgUHJvbWlzZSB0aGF0IHJlc29sdmVzIHdpdGggdGhlIEdlb0pTT04gRmVhdHVyZUNvbGxlY3Rpb24uCgkgICAgICovCgkgICAgYXN5bmMgbG9hZFBvbHlsaW5lKCkgewoJICAgICAgICBsZXQgb3B0aW9ucyA9IHRoaXMuX29wdGlvbnMucG9seWxpbmVPcHRpb25zIHx8IHt9OwoJICAgICAgICAvLyBVc2UgdGhlIEBtYXBib3gvcG9seWxpbmUgbGlicmFyeSB0byBjb252ZXJ0IHRoZSBwb2x5bGluZSB0byBHZW9KU09OCgkgICAgICAgIGNvbnN0IGdlb2pzb24gPSBhd2FpdCBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CgkgICAgICAgICAgICB0cnkgewoJICAgICAgICAgICAgICAgIGNvbnN0IGxpbmVTdHJpbmcgPSBwb2x5bGluZUV4cG9ydHMudG9HZW9KU09OKHRoaXMuX3Jhd0RhdGEsIG9wdGlvbnMucHJlY2lzaW9uKTsKCSAgICAgICAgICAgICAgICBsZXQgZ2VvbWV0cnkgPSBsaW5lU3RyaW5nOwoJICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnR5cGUgPT09ICdwb2ludCcpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVTdHJpbmcuY29vcmRpbmF0ZXMubGVuZ3RoID09PSAxKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIGl0IGEgcG9pbnQKCSAgICAgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5ID0gewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogJ1BvaW50JywKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29vcmRpbmF0ZXMnOiBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzWzBdCgkgICAgICAgICAgICAgICAgICAgICAgICB9OwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdDYW5ub3QgY29udmVydCBwb2x5bGluZSB0byAnICsgb3B0aW9ucy50eXBlKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBlbHNlIGlmIChvcHRpb25zLnR5cGUgPT09ICdwb2x5Z29uJykgewoJICAgICAgICAgICAgICAgICAgICBpZiAobGluZVN0cmluZy5jb29yZGluYXRlc1swXVswXSA9PT0gbGluZVN0cmluZy5jb29yZGluYXRlc1tsaW5lU3RyaW5nLmNvb3JkaW5hdGVzLmxlbmd0aCAtIDFdWzBdICYmCgkgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzWzBdWzFdID09PSBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzW2xpbmVTdHJpbmcuY29vcmRpbmF0ZXMubGVuZ3RoIC0gMV1bMV0pIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1ha2UgaXQgYSBwb2x5Z29uCgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeSA9IHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6ICdQb2x5Z29uJywKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29vcmRpbmF0ZXMnOiBbbGluZVN0cmluZy5jb29yZGluYXRlc10KCSAgICAgICAgICAgICAgICAgICAgICAgIH07CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ0Nhbm5vdCBjb252ZXJ0IHBvbHlsaW5lIHRvICcgKyBvcHRpb25zLnR5cGUpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIHJlc29sdmUoewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAiRmVhdHVyZUNvbGxlY3Rpb24iLAoJICAgICAgICAgICAgICAgICAgICBmZWF0dXJlczogW3sKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJGZWF0dXJlIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZ2VvbWV0cnkiOiBnZW9tZXRyeSwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAicHJvcGVydGllcyI6IG9wdGlvbnMucHJvcGVydGllcyB8fCB7fQoJICAgICAgICAgICAgICAgICAgICAgICAgfV0KCSAgICAgICAgICAgICAgICB9KTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKCSAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgkgICAgICAgIHJldHVybiBnZW9qc29uOwoJICAgIH0KCX0KCgljb25zdCBsaWJyYXJpZXMgPSB7CgkgICAgJ0NvbnZlcnRlcic6IENvbnZlcnRlcgoJfTsKCWxldCBzdWJDbGFzczsKCXNlbGYuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGUgPT4gewoJICAgIGNvbnN0IGRhdGEgPSAoZS5kYXRhIHx8IGUpOwoJICAgIGNvbnN0IHBvc3QgPSAoaWQsIGVyciwgcmVzLCB0eXBlKSA9PiB7CgkgICAgICAgIHBvc3RNZXNzYWdlKHsKCSAgICAgICAgICAgIHR5cGU6IHR5cGUgPyB0eXBlIDogKGVyciA/ICdlcnJvcicgOiAncmVzcG9uc2UnKSwKCSAgICAgICAgICAgIGlkOiBpZCwKCSAgICAgICAgICAgIG1lc3NhZ2U6IHJlcywKCSAgICAgICAgICAgIGVycm9yOiBlcnIKCSAgICAgICAgfSk7CgkgICAgfTsKCSAgICBjb25zdCBjb21tYW5kcyA9IHsKCSAgICAgICAgJ2luaXQnOiAobXNnKSA9PiB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kLCBtZXNzYWdlIH0gPSBtc2c7CgkgICAgICAgICAgICBzdWJDbGFzcyA9IG5ldyBsaWJyYXJpZXNbY29tbWFuZF0obWVzc2FnZVswXSwgbWVzc2FnZVsxXSk7CgkgICAgICAgICAgICAvLyByZXR1cm4gdGhlIGNsYXNzJyBtZXRob2RzCgkgICAgICAgICAgICBjb25zdCBmbnMgPSBbCgkgICAgICAgICAgICAgICAgLi4uT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMobGlicmFyaWVzW2NvbW1hbmRdLnByb3RvdHlwZSksCgkgICAgICAgICAgICAgICAgLi4uT2JqZWN0LmtleXMoc3ViQ2xhc3MpCgkgICAgICAgICAgICBdLm1hcChrZXkgPT4gW2tleSwgdHlwZW9mIGxpYnJhcmllc1tjb21tYW5kXS5wcm90b3R5cGVba2V5XV0pCgkgICAgICAgICAgICAgICAgLnJlZHVjZSgoYSwgYykgPT4gKHsgLi4uYSwgLi4ueyBbY1swXV06IGNbMV0gfSB9KSwge30pOwoJICAgICAgICAgICAgcG9zdChpZCwgdW5kZWZpbmVkLCBmbnMsICdpbml0X3Jlc3BvbnNlJyk7CgkgICAgICAgIH0sCgkgICAgICAgICdnZXQnOiBmdW5jdGlvbiAobXNnKSB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kIH0gPSBtc2c7CgkgICAgICAgICAgICBpZiAoc3ViQ2xhc3MgJiYgc3ViQ2xhc3NbY29tbWFuZF0pIHsKCSAgICAgICAgICAgICAgICBwb3N0KGlkLCB1bmRlZmluZWQsIHN1YkNsYXNzW2NvbW1hbmRdKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgIHBvc3QoaWQsIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfSwKCSAgICAgICAgJ2V4ZWMnOiBmdW5jdGlvbiAobXNnKSB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kLCBtZXNzYWdlIH0gPSBtc2c7CgkgICAgICAgICAgICBpZiAoc3ViQ2xhc3MgJiYgc3ViQ2xhc3NbY29tbWFuZF0gJiYgdHlwZW9mIHN1YkNsYXNzW2NvbW1hbmRdID09PSAnZnVuY3Rpb24nKSB7CgkgICAgICAgICAgICAgICAgY29uc3QgY21kID0gc3ViQ2xhc3NbY29tbWFuZF0KCSAgICAgICAgICAgICAgICAgICAgLmFwcGx5KHN1YkNsYXNzLCBtZXNzYWdlKTsKCSAgICAgICAgICAgICAgICBpZiAoISFjbWQgJiYgdHlwZW9mIGNtZC50aGVuID09PSAnZnVuY3Rpb24nKSB7CgkgICAgICAgICAgICAgICAgICAgIC8vIEl0J3MgYSBwcm9taXNlLCBzbyB3YWl0IGZvciBpdAoJICAgICAgICAgICAgICAgICAgICBjbWQKCSAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKHJlcyA9PiBwb3N0KGlkLCB1bmRlZmluZWQsIHJlcykpCgkgICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZSA9PiBwb3N0KGlkLCBlKSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAvLyBOb3QgYSBwcm9taXNlLCBqdXN0IHJldHVybiBpdAoJICAgICAgICAgICAgICAgICAgICBwb3N0KGlkLCB1bmRlZmluZWQsIGNtZCk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgLy8gRXJyb3IKCSAgICAgICAgICAgICAgICBwb3N0KGlkLCBuZXcgRXJyb3IoYGNvbW1hbmQgIiR7Y29tbWFuZH0iIG5vdCBmb3VuZGApKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoJICAgIH07CgkgICAgaWYgKGNvbW1hbmRzW2RhdGEudHlwZV0pIHsKCSAgICAgICAgY29tbWFuZHNbZGF0YS50eXBlXShkYXRhKTsKCSAgICB9Cgl9KTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPXdvcmtlci5qcy5tYXAKCg==");const randomString=()=>Math.random().toString(36).substring(2);class Actor{constructor(u,Xe){this.initId=randomString()+"-"+u,this.worker=new mh,this.handlers=new Map,this.worker.onmessage=Xe=>{const fr=Xe.data,Ar=this.handlers.get(fr.id),_r=this;if(Ar){if("response"===fr.type&&Ar.resolve(fr.message),"error"===fr.type){const Xe=fr.error||new Error(`Unknown error with ${u}`);Ar.reject(Xe)}"init_response"===fr.type&&(this._=Object.keys(fr.message).map((u=>{const Xe="function"==typeof fr.message[u];return[u,function(){return Xe?_r.exec(u)(...arguments):_r.get(u)}]})).reduce(((u,Xe)=>({...u,[Xe[0]]:Xe[1]})),{}),Ar.resolve(this._))}},this.worker.postMessage({type:"init",id:this.initId,command:u,message:Xe})}onLoad(){return new Promise((u=>{void 0===this._?this.handlers.set(this.initId,{resolve:u,reject:u}):u(this._)}))}exec(u){const Xe=this;return function(...fr){return new Promise(((Ar,_r)=>{const wr=randomString()+"-"+u;Xe.handlers.set(wr,{resolve:Ar,reject:_r}),Xe.worker.postMessage({type:"exec",id:wr,command:u,message:[...fr]})}))}}get(u){return new Promise(((Xe,fr)=>{const Ar=randomString()+"-"+u;this.handlers.set(Ar,{resolve:Xe,reject:fr}),this.worker.postMessage({type:"get",id:Ar,command:u,message:[]})}))}}const yh="test://http://example.com"!==new URL("test://http://example.com").href;async function processData(u,Xe,fr){const Ar=await fetch(u,fr?{signal:fr.signal}:void 0);let _r={};const wr=new URL(u,window.location.href);if(wr.hash.length){const u=wr.hash,Xe=decodeURIComponent(u.slice(1));try{_r=JSON.parse(Xe)}catch(u){console.warn("Error parsing or reading URL:",u)}}if(200==Ar.status){const u=await Ar.text();let fr;if(["kml","tcx","gpx"].includes(Xe)||!(()=>{let u=!1;try{u="function"==typeof window.Worker}catch(Xe){u=!1}return u})()){fr=new Converter(Xe,u,_r).convert()}else{fr=new Actor("Converter",[Xe,u,_r]).exec("convert")()}return await fr}throw new Error(`Data fetch error: ${Ar.statusText}`)}const processUrl=u=>{const Xe=u.split("://")[0],fr=u.replace(new RegExp(`^${Xe}://`),""),Ar=yh?(u=>{const Xe=new RegExp("^(https?)(//)");return u.replace(Xe,"$1:$2")})(fr):fr;return{prefix:Xe,url:Ar}},VectorTextProtocol=(u,Xe)=>Xe instanceof AbortController?(async(u,Xe)=>{const{prefix:fr,url:Ar}=processUrl(u.url);if(!Ar)throw new Error("Invalid URL: "+u.url);try{return{data:await processData(Ar,fr,Xe)}}catch(u){throw new Error(u||"Unknown Error")}})(u,Xe):((u,Xe)=>{const fr=new AbortController,{prefix:Ar,url:_r}=processUrl(u.url);return _r&&processData(_r,Ar,fr).then((u=>Xe(null,u))).catch((u=>Xe(u))),{cancel:()=>{fr.abort()}}})(u,Xe);(u=>{if(document.head.querySelector(`link[href="${u}"]`))return;const Xe=document.createElement("link");Object.assign(Xe,{rel:"stylesheet",href:u,onerror:()=>console.warn("Fail to load stylesheet:",u)}),document.head.appendChild(Xe)})("https://unpkg.com/maplibre-gl@4.5.2/dist/maplibre-gl.css");const Sh=class extends defaultExport{id="maplibre";pitch=0;bearing=0;style="https://demotiles.maplibre.org/style.json";link=!1;maplibregl=window.maplibregl;static validOptions=this.validOptions.concat([new MapOption({name:"pitch",desc:"Pitch toward the horizon measured in degrees",example:"60",exampleDesc:"Look a little upward",isValid:u=>u<=90&&u>=0}),new MapOption({name:"bearing",desc:"The compass direction that is 'up'",example:"-30",exampleDesc:"Rotate map a little",isValid:u=>u<=180&&u>=-180}),new MapOption({name:"link",desc:"Syn map's position with the hash fragment of the page's URL",example:"true",exampleDesc:"Add hash for page URL",isValid:u=>"true"===u}),new MapOption({name:"style",desc:"URL of style document, read https://maplibre.org/maplibre-style-spec/",example:"https://tile.openstreetmap.jp/styles/openmaptiles/style.json",exampleDesc:"Style form OSM japan!!!",isValid:u=>URL.parse(u)})]);async addMap({maplibregl:u,target:Xe,style:fr,data:Ar,center:_r,zoom:wr,pitch:Kr,bearing:In,link:io}){const no=Ar.filter((u=>"tile"===u.type)),oo=0!==no.length?{version:8,sources:{},layers:[]}:fr;return this.map=new u.Map({container:Xe,style:oo,center:_r,zoom:wr,pitch:Kr,bearing:In,hash:io}),new Promise(((u,Xe)=>{this.map.on("load",(()=>{u(this.map)}))}))}getTerraDrawAdapter({maplibregl:u,map:Xe,draw:fr}){return fr?(this.terraDrawAdapter=new l({map:Xe,maplibregl:u}),this.terraDrawAdapter):{state:"skip"}}setControl({maplibregl:u,map:Xe,control:fr}){if(!fr||0===Object.values(fr).filter((u=>u)).length)return{state:"skip"};if(!0===fr.fullscreen&&Xe.addControl(new u.FullscreenControl),!0===fr.scale){const fr=new u.ScaleControl({unit:"metric"});Xe.addControl(fr)}}setExtra(u){const{map:Xe,debug:fr}=u;if(!fr&&!u.eval)return{state:"skip"};!0===fr&&(Xe.showTileBoundaries=!0),u.eval&&this.evalScript(u.eval,[["map",Xe]])}addMarker(u){const Xe=(new this.maplibregl.Marker).setLngLat(u.xy).addTo(this.map);return Xe.getElement().classList.add("marker"),Xe.getElement().title=u.title,Xe.getElement()}addTileData({map:u,data:Xe}){const fr=Xe.filter((u=>"tile"===u.type));if(0===fr.length)return{state:"skip"};const Ar=u.getStyle();fr.forEach(((u,Xe)=>{const fr=u.name?u.name:Xe.toString();Ar.sources[fr]={type:"raster",tiles:[u.url],tileSize:256},Ar.layers.push({id:fr,type:"raster",source:fr})})),u.setStyle(Ar)}async addGPXFile({maplibregl:u,map:Xe,data:fr}){const Ar=fr.find((u=>"gpx"===u.type));if(!Ar)return{state:"skip"};var _r;_r=u,qg.forEach((u=>{_r.addProtocol(u,VectorTextProtocol)}));const wr="gpx",Kr={type:"geojson",data:"gpx://"+Ar};if(Xe.addSource(wr,Kr),Xe.addLayer({id:"id_"+wr,type:"line",source:wr,paint:{"line-color":"red","line-width":3}}),!Object.prototype.hasOwnProperty.call(this,"center")){const fr=(await Xe.getSource(wr).getData()).features[0].geometry.coordinates,Ar=fr.reduce(((u,Xe)=>u.extend(Xe)),new u.LngLatBounds(fr[0],fr[0]));Xe.fitBounds(Ar,{padding:20})}}updateCamera(u,Xe){Xe?this.map.flyTo({center:u.center,zoom:u.zoom}):(this.map.setCenter(u.center),this.map.setZoom(u.zoom))}project([u,Xe]){return this.map.project([u,Xe])}unproject([u,Xe]){const{lng:fr,lat:Ar}=this.map.unproject([u,Xe]);return[fr,Ar]}},converter=u=>({...u,use:Sh}),Bh=renderWith(converter),Zh=renderByYamlWith(converter),Gh=((u=null)=>async()=>{const Xe=document.currentScript,fr=Xe?.getAttribute("data-target")??URL.parse(Xe?.src)?.searchParams?.get("target"),Ar=document.querySelectorAll(fr);fr&&Ar&&Ar.forEach((Xe=>renderByYamlWith(u)(Xe)))})(converter);globalThis.mapclay={render:Bh,renderByYaml:Zh},u.default=Sh,u.render=Bh,u.renderByScriptTarget=Gh,u.renderByYaml=Zh,Object.defineProperty(u,"__esModule",{value:!0}),Gh()}));
diff --git a/dist/renderers/maplibre.mjs b/dist/renderers/maplibre.mjs
new file mode 100644
index 0000000..c3f7424
--- /dev/null
+++ b/dist/renderers/maplibre.mjs
@@ -0,0 +1,7 @@
+function t(){return t=Object.assign?Object.assign.bind():function(u){for(var Xe=1;Xe<arguments.length;Xe++){var fr=arguments[Xe];for(var Ar in fr)({}).hasOwnProperty.call(fr,Ar)&&(u[Ar]=fr[Ar])}return u},t.apply(null,arguments)}function e(u,Xe=9){const fr=Math.pow(10,Xe);return Math.round(u*fr)/fr}const i$1=(u,Xe)=>{const{x:fr,y:Ar}=u,{x:_r,y:wr}=Xe,Kr=_r-fr,In=wr-Ar;return Math.sqrt(In*In+Kr*Kr)};class o{constructor({name:u,callback:Xe,unregister:fr,register:Ar}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=u,this.register=()=>{this.registered||(this.registered=!0,Ar(Xe))},this.unregister=()=>{this.register&&(this.registered=!1,fr(Xe))},this.callback=Xe}}class r{constructor(u){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof u.minPixelDragDistance?u.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof u.minPixelDragDistanceSelecting?u.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof u.minPixelDragDistanceDrawing?u.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof u.coordinatePrecision?u.coordinatePrecision:9}getButton(u){return-1===u.button?"neither":0===u.button?"left":1===u.button?"middle":2===u.button?"right":"neither"}getMapElementXYPosition(u){const Xe=this.getMapEventElement(),{left:fr,top:Ar}=Xe.getBoundingClientRect();return{containerX:u.clientX-fr,containerY:u.clientY-Ar}}getDrawEventFromEvent(u){const Xe=this.getLngLatFromEvent(u);if(!Xe)return null;const{lng:fr,lat:Ar}=Xe,{containerX:_r,containerY:wr}=this.getMapElementXYPosition(u),Kr=this.getButton(u),In=Array.from(this._heldKeys);return{lng:e(fr,this._coordinatePrecision),lat:e(Ar,this._coordinatePrecision),containerX:_r,containerY:wr,button:Kr,heldKeys:In}}register(u){this._currentModeCallbacks=u,this._listeners=this.getAdapterListeners(),this._listeners.forEach((u=>{u.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:u=>{if(!this._currentModeCallbacks)return;if(!u.isPrimary)return;const Xe=this.getDrawEventFromEvent(u);Xe&&(this._dragState="pre-dragging",this._lastDrawEvent=Xe)},register:u=>{this.getMapEventElement().addEventListener("pointerdown",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointerdown",u)}}),new o({name:"pointermove",callback:u=>{if(!this._currentModeCallbacks)return;if(!u.isPrimary)return;u.preventDefault();const Xe=this.getDrawEventFromEvent(u);if(Xe)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(Xe),this._lastDrawEvent=Xe;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const u={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},fr={x:Xe.containerX,y:Xe.containerY},Ar=this._currentModeCallbacks.getState(),_r=i$1(u,fr);let wr=!1;if(wr="drawing"===Ar?_r<this._minPixelDragDistanceDrawing:"selecting"===Ar?_r<this._minPixelDragDistanceSelecting:_r<this._minPixelDragDistance,wr)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(Xe,(u=>{this.setDraggability.bind(this)(u)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(Xe,(u=>{this.setDraggability.bind(this)(u)}))},register:u=>{this.getMapEventElement().addEventListener("pointermove",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointermove",u)}}),new o({name:"contextmenu",callback:u=>{this._currentModeCallbacks&&u.preventDefault()},register:u=>{this.getMapEventElement().addEventListener("contextmenu",u)},unregister:u=>{this.getMapEventElement().removeEventListener("contextmenu",u)}}),new o({name:"pointerup",callback:u=>{if(!this._currentModeCallbacks)return;if(u.target!==this.getMapEventElement())return;if(!u.isPrimary)return;const Xe=this.getDrawEventFromEvent(u);Xe&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(Xe,(u=>{this.setDraggability.bind(this)(u)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(Xe),this._dragState="not-dragging",this.setDraggability(!0))},register:u=>{this.getMapEventElement().addEventListener("pointerup",u)},unregister:u=>{this.getMapEventElement().removeEventListener("pointerup",u)}}),new o({name:"keyup",callback:u=>{this._currentModeCallbacks&&(this._heldKeys.delete(u.key),this._currentModeCallbacks.onKeyUp({key:u.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>u.preventDefault()}))},register:u=>{this.getMapEventElement().addEventListener("keyup",u)},unregister:u=>{this.getMapEventElement().removeEventListener("keyup",u)}}),new o({name:"keydown",callback:u=>{this._currentModeCallbacks&&(this._heldKeys.add(u.key),this._currentModeCallbacks.onKeyDown({key:u.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>u.preventDefault()}))},register:u=>{this.getMapEventElement().addEventListener("keydown",u)},unregister:u=>{this.getMapEventElement().removeEventListener("keydown",u)}})]}unregister(){this._listeners.forEach((u=>{u.unregister()})),this.clear()}}class a extends r{constructor(u){super(u),this._nextRender=void 0,this._map=void 0,this._container=void 0,this._rendered=!1,this.changedIds={deletion:!1,points:!1,linestrings:!1,polygons:!1,styling:!1},this._map=u.map,this._container=this._map.getContainer()}clearLayers(){this._rendered&&(["point","linestring","polygon"].forEach((u=>{const Xe=`td-${u.toLowerCase()}`;this._map.removeLayer(Xe),"polygon"===u&&this._map.removeLayer(Xe+"-outline"),this._map.removeSource(Xe)})),this._rendered=!1,this._nextRender&&(cancelAnimationFrame(this._nextRender),this._nextRender=void 0))}_addGeoJSONSource(u,Xe){this._map.addSource(u,{type:"geojson",data:{type:"FeatureCollection",features:Xe},tolerance:0})}_addFillLayer(u){return this._map.addLayer({id:u,source:u,type:"fill",paint:{"fill-color":["get","polygonFillColor"],"fill-opacity":["get","polygonFillOpacity"]}})}_addFillOutlineLayer(u){return this._map.addLayer({id:u+"-outline",source:u,type:"line",paint:{"line-width":["get","polygonOutlineWidth"],"line-color":["get","polygonOutlineColor"]}})}_addLineLayer(u){return this._map.addLayer({id:u,source:u,type:"line",paint:{"line-width":["get","lineStringWidth"],"line-color":["get","lineStringColor"]}})}_addPointLayer(u){return this._map.addLayer({id:u,source:u,type:"circle",paint:{"circle-stroke-color":["get","pointOutlineColor"],"circle-stroke-width":["get","pointOutlineWidth"],"circle-radius":["get","pointWidth"],"circle-color":["get","pointColor"]}})}_addLayer(u,Xe){"Point"===Xe&&this._addPointLayer(u),"LineString"===Xe&&this._addLineLayer(u),"Polygon"===Xe&&(this._addFillLayer(u),this._addFillOutlineLayer(u))}_addGeoJSONLayer(u,Xe){const fr=`td-${u.toLowerCase()}`;return this._addGeoJSONSource(fr,Xe),this._addLayer(fr,u),fr}_setGeoJSONLayerData(u,Xe){const fr=`td-${u.toLowerCase()}`;return this._map.getSource(fr).setData({type:"FeatureCollection",features:Xe}),fr}updateChangedIds(u){[...u.updated,...u.created].forEach((u=>{"Point"===u.geometry.type?this.changedIds.points=!0:"LineString"===u.geometry.type?this.changedIds.linestrings=!0:"Polygon"===u.geometry.type&&(this.changedIds.polygons=!0)})),u.deletedIds.length>0&&(this.changedIds.deletion=!0),0===u.created.length&&0===u.updated.length&&0===u.deletedIds.length&&(this.changedIds.styling=!0)}getLngLatFromEvent(u){const{left:Xe,top:fr}=this._container.getBoundingClientRect();return this.unproject(u.clientX-Xe,u.clientY-fr)}getMapEventElement(){return this._map.getCanvas()}setDraggability(u){u?(this._map.dragRotate.enable(),this._map.dragPan.enable()):(this._map.dragRotate.disable(),this._map.dragPan.disable())}project(u,Xe){const{x:fr,y:Ar}=this._map.project({lng:u,lat:Xe});return{x:fr,y:Ar}}unproject(u,Xe){const{lng:fr,lat:Ar}=this._map.unproject({x:u,y:Xe});return{lng:fr,lat:Ar}}setCursor(u){const Xe=this._map.getCanvas();"unset"===u?Xe.style.removeProperty("cursor"):Xe.style.cursor=u}setDoubleClickToZoom(u){u?this._map.doubleClickZoom.enable():this._map.doubleClickZoom.disable()}render(u,Xe){this.updateChangedIds(u),this._nextRender&&cancelAnimationFrame(this._nextRender),this._nextRender=requestAnimationFrame((()=>{const fr=[...u.created,...u.updated,...u.unchanged],Ar=[],_r=[],wr=[];for(let u=0;u<fr.length;u++){const Kr=fr[u],{properties:In}=Kr,io=Xe[In.mode](Kr);"Point"===Kr.geometry.type?(In.pointColor=io.pointColor,In.pointOutlineColor=io.pointOutlineColor,In.pointOutlineWidth=io.pointOutlineWidth,In.pointWidth=io.pointWidth,Ar.push(Kr)):"LineString"===Kr.geometry.type?(In.lineStringColor=io.lineStringColor,In.lineStringWidth=io.lineStringWidth,_r.push(Kr)):"Polygon"===Kr.geometry.type&&(In.polygonFillColor=io.polygonFillColor,In.polygonFillOpacity=io.polygonFillOpacity,In.polygonOutlineColor=io.polygonOutlineColor,In.polygonOutlineWidth=io.polygonOutlineWidth,wr.push(Kr))}if(this._rendered){const u=this.changedIds.deletion||this.changedIds.styling,Xe=u||this.changedIds.linestrings,fr=u||this.changedIds.polygons;let Kr;(u||this.changedIds.points)&&(Kr=this._setGeoJSONLayerData("Point",Ar)),Xe&&this._setGeoJSONLayerData("LineString",_r),fr&&this._setGeoJSONLayerData("Polygon",wr),Kr&&this._map.moveLayer(Kr)}else{const u=this._addGeoJSONLayer("Point",Ar);this._addGeoJSONLayer("LineString",_r),this._addGeoJSONLayer("Polygon",wr),this._rendered=!0,u&&this._map.moveLayer(u)}this.changedIds={points:!1,linestrings:!1,polygons:!1,deletion:!1,styling:!1}}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers())}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}register(u){super.register(u),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}}class l extends r{constructor(u){super(u),this.mapboxglAdapter=void 0,this.mapboxglAdapter=new a(u)}register(u){this.mapboxglAdapter.register(u)}unregister(){this.mapboxglAdapter.unregister()}getCoordinatePrecision(){return this.mapboxglAdapter.getCoordinatePrecision()}getLngLatFromEvent(u){return this.mapboxglAdapter.getLngLatFromEvent(u)}getMapEventElement(){return this.mapboxglAdapter.getMapEventElement()}setDraggability(u){this.mapboxglAdapter.setDraggability(u)}project(u,Xe){return this.mapboxglAdapter.project(u,Xe)}unproject(u,Xe){return this.mapboxglAdapter.unproject(u,Xe)}setCursor(u){this.mapboxglAdapter.setCursor(u)}setDoubleClickToZoom(u){this.mapboxglAdapter.setDoubleClickToZoom(u)}render(u,Xe){this.mapboxglAdapter.render(u,Xe)}clear(){this.mapboxglAdapter.clear()}}const u={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Xe=class{constructor(u){this.code_=u.code,this.units_=u.units,this.extent_=void 0!==u.extent?u.extent:null,this.worldExtent_=void 0!==u.worldExtent?u.worldExtent:null,this.axisOrientation_=void 0!==u.axisOrientation?u.axisOrientation:"enu",this.global_=void 0!==u.global&&u.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=u.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=u.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||u[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(u){this.global_=u,this.canWrapX_=!(!u||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(u){this.defaultTileGrid_=u}setExtent(u){this.extent_=u,this.canWrapX_=!(!this.global_||!u)}setWorldExtent(u){this.worldExtent_=u}setGetPointResolution(u){this.getPointResolutionFunc_=u}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const fr=6378137,Ar=Math.PI*fr,_r=[-Ar,-Ar,Ar,Ar],wr=[-180,-85,180,85],Kr=fr*Math.log(Math.tan(Math.PI/2));class m extends Xe{constructor(u){super({code:u,units:"m",extent:_r,global:!0,worldExtent:wr,getPointResolution:function(u,Xe){return u/Math.cosh(Xe[1]/fr)}})}}const In=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],io=[-180,-90,180,90],no=6378137*Math.PI/180;class P extends Xe{constructor(u,Xe){super({code:u,units:"degrees",extent:io,axisOrientation:Xe,global:!0,metersPerUnit:no,worldExtent:io})}}const oo=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let so={};function b(u,Xe,fr){const Ar=u.getCode(),_r=Xe.getCode();Ar in so||(so[Ar]={}),so[Ar][_r]=fr}function S(u,Xe){if(void 0!==Xe)for(let fr=0,Ar=u.length;fr<Ar;++fr)Xe[fr]=u[fr];else Xe=u.slice();return Xe}function w(u){u.getCode(),b(u,u,S)}function F(u){!function(u){u.forEach(w)}(u),u.forEach((function(Xe){u.forEach((function(u){Xe!==u&&b(Xe,u,S)}))}))}var ao,co,go,ho;F(In),F(oo),ao=In,co=function(u,Xe,_r){const wr=u.length;_r=_r>1?_r:2,void 0===Xe&&(Xe=_r>2?u.slice():new Array(wr));for(let In=0;In<wr;In+=_r){Xe[In]=Ar*u[In]/180;let _r=fr*Math.log(Math.tan(Math.PI*(+u[In+1]+90)/360));_r>Kr?_r=Kr:_r<-Kr&&(_r=-Kr),Xe[In+1]=_r}return Xe},go=function(u,Xe,_r){const wr=u.length;_r=_r>1?_r:2,void 0===Xe&&(Xe=_r>2?u.slice():new Array(wr));for(let Kr=0;Kr<wr;Kr+=_r)Xe[Kr]=180*u[Kr]/Ar,Xe[Kr+1]=360*Math.atan(Math.exp(u[Kr+1]/fr))/Math.PI-90;return Xe},oo.forEach((function(u){ao.forEach((function(Xe){b(u,Xe,co),b(Xe,u,go)}))})),function(u){u.Commit="commit",u.Provisional="provisional",u.Finish="finish"}(ho||(ho={}));const Co="selected",Io="midPoint",xo="closingPoint";function A(u){return Boolean(u&&"object"==typeof u&&null!==u&&!Array.isArray(u))}function R(u){if(!function(u){return"number"==typeof u&&!isNaN(new Date(u).valueOf())}(u))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var Mo;!function(u){u.Drawing="drawing",u.Select="select",u.Static="static",u.Render="render"}(Mo||(Mo={}));class X{get state(){return this._state}set state(u){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(u){if("object"!=typeof u)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=u}registerBehaviors(u){}constructor(u){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=Mo.Drawing,this.mode="base",this._state="unregistered",this._styles=u&&u.styles?t({},u.styles):{},this.pointerDistance=u&&u.pointerDistance||40,this.validate=u&&u.validation,this.projection=u&&u.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(u){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=u.store,this.store.registerOnChange(u.onChange),this.setDoubleClickToZoom=u.setDoubleClickToZoom,this.project=u.project,this.unproject=u.unproject,this.onSelect=u.onSelect,this.onDeselect=u.onDeselect,this.setCursor=u.setCursor,this.onStyleChange=u.onChange,this.onFinish=u.onFinish,this.coordinatePrecision=u.coordinatePrecision,this.registerBehaviors({mode:u.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:u.coordinatePrecision,projection:this.projection})}validateFeature(u){if("unregistered"===this._state)throw new Error("Mode must be registered");const Xe=function(u,Xe){let fr;if(A(u))if(null==u.id)fr="Feature has no id";else if("string"!=typeof u.id&&"number"!=typeof u.id)fr="Feature must be string or number as per GeoJSON spec";else if(Xe(u.id))if(A(u.geometry))if(A(u.properties))if("string"==typeof u.geometry.type&&["Polygon","LineString","Point"].includes(u.geometry.type))if(Array.isArray(u.geometry.coordinates)){if(!u.properties.mode||"string"!=typeof u.properties.mode)throw new Error("Feature does not have a valid mode property")}else fr="Feature coordinates is not an array";else fr="Feature is not Point, LineString or Polygon";else fr="Feature has no properties";else fr="Feature has no geometry";else fr="Feature must match the id strategy (default is UUID4)";else fr="Feature is not object";if(fr)throw new Error(fr);return!0}(u,this.store.idStrategy.isValidId);return this.validate?this.validate(u,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:ho.Provisional}):Xe}onFinish(u,Xe){}onDeselect(u){}onSelect(u){}onKeyDown(u){}onKeyUp(u){}onMouseMove(u){}onClick(u){}onDragStart(u,Xe){}onDrag(u,Xe){}onDragEnd(u,Xe){}getHexColorStylingValue(u,Xe,fr){return this.getStylingValue(u,Xe,fr)}getNumericStylingValue(u,Xe,fr){return this.getStylingValue(u,Xe,fr)}getStylingValue(u,Xe,fr){return void 0===u?Xe:"function"==typeof u?u(fr):u}}class U extends X{constructor(...u){super(...u),this.type=Mo.Select}}function Y(u,Xe){const i=u=>u*Math.PI/180,fr=i(u[1]),Ar=i(u[0]),_r=i(Xe[1]),wr=_r-fr,Kr=i(Xe[0])-Ar,In=Math.sin(wr/2)*Math.sin(wr/2)+Math.cos(fr)*Math.cos(_r)*Math.sin(Kr/2)*Math.sin(Kr/2);return 2*Math.atan2(Math.sqrt(In),Math.sqrt(1-In))*6371e3/1e3}const Po=6371008.8;function z(u){return u%360*Math.PI/180}function H(u){return u/(Po/1e3)}function $$1(u){return u%(2*Math.PI)*180/Math.PI}const ss=57.29577951308232,sa=.017453292519943295,aa=6378137,Q=(u,Xe)=>({x:0===u?0:u*sa*aa,y:0===Xe?0:Math.log(Math.tan(Math.PI/4+Xe*sa/2))*aa}),tt=(u,Xe)=>({lng:0===u?0:ss*(u/aa),lat:0===Xe?0:(2*Math.atan(Math.exp(Xe/aa))-Math.PI/2)*ss});function et(u,Xe,fr){const Ar=z(u[0]),_r=z(u[1]),wr=z(fr),Kr=H(Xe),In=Math.asin(Math.sin(_r)*Math.cos(Kr)+Math.cos(_r)*Math.sin(Kr)*Math.cos(wr));return[$$1(Ar+Math.atan2(Math.sin(wr)*Math.sin(Kr)*Math.cos(_r),Math.cos(Kr)-Math.sin(_r)*Math.sin(In))),$$1(In)]}function it(u){const{center:Xe,radiusKilometers:fr,coordinatePrecision:Ar}=u,_r=u.steps?u.steps:64,wr=[];for(let u=0;u<_r;u++){const Kr=et(Xe,fr,-360*u/_r);wr.push([e(Kr[0],Ar),e(Kr[1],Ar)])}return wr.push(wr[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[wr]},properties:{}}}function ot(u){const Xe={epsilon:0};let fr;if("Polygon"===u.geometry.type)fr=u.geometry.coordinates;else{if("LineString"!==u.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");fr=[u.geometry.coordinates]}const Ar=[];for(let u=0;u<fr.length;u++)for(let Xe=0;Xe<fr[u].length-1;Xe++)for(let Ar=0;Ar<fr.length;Ar++)for(let _r=0;_r<fr[Ar].length-1;_r++)s(u,Xe,Ar,_r);return Ar.length>0;function r(u){return u<0-Xe.epsilon||u>1+Xe.epsilon}function s(u,Xe,_r,wr){const Kr=fr[u][Xe],In=fr[u][Xe+1],io=fr[_r][wr],no=fr[_r][wr+1],oo=function(u,Xe,fr,Ar){if(rt(u,fr)||rt(u,Ar)||rt(Xe,fr)||rt(Ar,fr))return null;const _r=u[0],wr=u[1],Kr=Xe[0],In=Xe[1],io=fr[0],no=fr[1],oo=Ar[0],so=Ar[1],ao=(_r-Kr)*(no-so)-(wr-In)*(io-oo);return 0===ao?null:[((_r*In-wr*Kr)*(io-oo)-(_r-Kr)*(io*so-no*oo))/ao,((_r*In-wr*Kr)*(no-so)-(wr-In)*(io*so-no*oo))/ao]}(Kr,In,io,no);if(null===oo)return;let so,ao;so=In[0]!==Kr[0]?(oo[0]-Kr[0])/(In[0]-Kr[0]):(oo[1]-Kr[1])/(In[1]-Kr[1]),ao=no[0]!==io[0]?(oo[0]-io[0])/(no[0]-io[0]):(oo[1]-io[1])/(no[1]-io[1]),r(so)||r(ao)||(oo.toString(),Ar.push(oo))}}function rt(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]}function st(u,Xe){return 2===u.length&&"number"==typeof u[0]&&"number"==typeof u[1]&&1/0!==u[0]&&1/0!==u[1]&&(Ar=u[0])>=-180&&Ar<=180&&(fr=u[1])>=-90&&fr<=90&&nt(u[0])<=Xe&&nt(u[1])<=Xe;var fr,Ar}function nt(u){let Xe=1,fr=0;for(;Math.round(u*Xe)/Xe!==u;)Xe*=10,fr++;return fr}function at(u,Xe){return"Polygon"===u.geometry.type&&1===u.geometry.coordinates.length&&u.geometry.coordinates[0].length>=4&&u.geometry.coordinates[0].every((u=>st(u,Xe)))&&(fr=u.geometry.coordinates[0][0])[0]===(Ar=u.geometry.coordinates[0][u.geometry.coordinates[0].length-1])[0]&&fr[1]===Ar[1];var fr,Ar}function lt(u,Xe){return at(u,Xe)&&!ot(u)}class ht extends X{constructor(u){var Xe;super(u),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const fr={start:"crosshair"};if(this.cursors=u&&u.cursors?t({},fr,u.cursors):fr,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}this.startingRadiusKilometers=null!=(Xe=null==u?void 0:u.startingRadiusKilometers)?Xe:1e-5,this.validate=null==u?void 0:u.validation}close(){if(void 0===this.currentCircleId)return;const u=this.currentCircleId;if(this.validate&&u){const Xe=this.store.getGeometryCopy(u);if(!this.validate({type:"Feature",id:u,geometry:Xe,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:ho.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(0===this.clickCount){this.center=[u.lng,u.lat];const Xe=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[fr]=this.store.create([{geometry:Xe.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=fr,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(u),this.close()}onMouseMove(u){this.updateCircle(u)}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u])}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Polygon"===u.geometry.type&&u.properties.mode===this.mode?(Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&lt(u,this.coordinatePrecision)}updateCircle(u){if(1===this.clickCount&&this.center&&this.currentCircleId){const Xe=Y(this.center,[u.lng,u.lat]);let fr;if("web-mercator"===this.projection){const Ar=function(u,Xe){const fr=1e3*Y(u,Xe);if(0===fr)return 1;const{x:Ar,y:_r}=Q(u[0],u[1]),{x:wr,y:Kr}=Q(Xe[0],Xe[1]);return Math.sqrt(Math.pow(wr-Ar,2)+Math.pow(Kr-_r,2))/fr}(this.center,[u.lng,u.lat]);fr=function(u){const{center:Xe,radiusKilometers:fr,coordinatePrecision:Ar}=u,_r=u.steps?u.steps:64,wr=1e3*fr,[Kr,In]=Xe,{x:io,y:no}=Q(Kr,In),oo=[];for(let u=0;u<_r;u++){const Xe=360*u/_r*Math.PI/180,fr=wr*Math.cos(Xe),Kr=wr*Math.sin(Xe),[In,so]=[io+fr,no+Kr],{lng:ao,lat:co}=tt(In,so);oo.push([e(ao,Ar),e(co,Ar)])}return oo.push(oo[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[oo]},properties:{}}}({center:this.center,radiusKilometers:Xe*Ar,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");fr=it({center:this.center,radiusKilometers:Xe,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:fr.geometry,properties:{radiusKilometers:Xe}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:ho.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:fr.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:Xe}])}}}class dt{constructor({store:u,mode:Xe,project:fr,unproject:Ar,pointerDistance:_r,coordinatePrecision:wr,projection:Kr}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=u,this.mode=Xe,this.project=fr,this.unproject=Ar,this.pointerDistance=_r,this.coordinatePrecision=wr,this.projection=Kr}}function ut({unproject:u,point:Xe,pointerDistance:fr}){const Ar=fr/2,{x:_r,y:wr}=Xe;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[u(_r-Ar,wr-Ar),u(_r+Ar,wr-Ar),u(_r+Ar,wr+Ar),u(_r-Ar,wr+Ar),u(_r-Ar,wr-Ar)].map((u=>[u.lng,u.lat]))]}}}class gt extends dt{constructor(u){super(u)}create(u){const{containerX:Xe,containerY:fr}=u;return ut({unproject:this.unproject,point:{x:Xe,y:fr},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(u){super(u)}measure(u,Xe){const{x:fr,y:Ar}=this.project(Xe[0],Xe[1]);return i$1({x:fr,y:Ar},{x:u.containerX,y:u.containerY})}}class yt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=u=>this.getSnappable(u,(u=>Boolean(u.properties&&u.properties.mode===this.mode))),this.getSnappableCoordinate=(u,Xe)=>this.getSnappable(u,(u=>Boolean(u.properties&&u.properties.mode===this.mode&&u.id!==Xe))),this.config=u,this.pixelDistance=Xe,this.clickBoundingBox=fr}getSnappable(u,Xe){const fr=this.clickBoundingBox.create(u),Ar=this.store.search(fr,Xe),_r={coord:void 0,minDist:1/0};return Ar.forEach((Xe=>{let fr;if("Polygon"===Xe.geometry.type)fr=Xe.geometry.coordinates[0];else{if("LineString"!==Xe.geometry.type)return;fr=Xe.geometry.coordinates}fr.forEach((Xe=>{const fr=this.pixelDistance.measure(u,Xe);fr<_r.minDist&&fr<this.pointerDistance&&(_r.coord=Xe,_r.minDist=fr)}))})),_r.coord}}function mt(u,Xe,fr){const Ar=z(u[0]),_r=z(u[1]),wr=z(fr),Kr=H(Xe),In=Math.asin(Math.sin(_r)*Math.cos(Kr)+Math.cos(_r)*Math.sin(Kr)*Math.cos(wr));return[$$1(Ar+Math.atan2(Math.sin(wr)*Math.sin(Kr)*Math.cos(_r),Math.cos(Kr)-Math.sin(_r)*Math.sin(In))),$$1(In)]}function Ct(u,Xe){const fr=z(u[0]),Ar=z(Xe[0]),_r=z(u[1]),wr=z(Xe[1]),Kr=Math.sin(Ar-fr)*Math.cos(wr),In=Math.cos(_r)*Math.sin(wr)-Math.sin(_r)*Math.cos(wr)*Math.cos(Ar-fr);return $$1(Math.atan2(Kr,In))}function Pt(u,Xe,fr){const Ar=[],_r=u.length;let wr,Kr,In,io=0;for(let _r=0;_r<u.length&&!(Xe>=io&&_r===u.length-1);_r++){if(io>Xe&&0===Ar.length){if(wr=Xe-io,!wr)return Ar.push(u[_r]),Ar;Kr=Ct(u[_r],u[_r-1])-180,In=mt(u[_r],wr,Kr),Ar.push(In)}if(io>=fr)return wr=fr-io,wr?(Kr=Ct(u[_r],u[_r-1])-180,In=mt(u[_r],wr,Kr),Ar.push(In),Ar):(Ar.push(u[_r]),Ar);if(io>=Xe&&Ar.push(u[_r]),_r===u.length-1)return Ar;io+=Y(u[_r],u[_r+1])}if(io<Xe&&u.length===_r)throw new Error("Start position is beyond line");const no=u[u.length-1];return[no,no]}function _t(u){return u*(Math.PI/180)}function xt(u){return u*(180/Math.PI)}class Mt extends dt{constructor(u){super(u),this.config=void 0,this.config=u}generateInsertionCoordinates(u,Xe,fr){const Ar=[u,Xe];let _r=0;for(let u=0;u<Ar.length-1;u++)_r+=Y(Ar[0],Ar[1]);if(_r<=fr)return Ar;let wr=_r/fr-1;Number.isInteger(wr)||(wr=Math.floor(wr)+1);const Kr=[];for(let u=0;u<wr;u++){const Xe=Pt(Ar,fr*u,fr*(u+1));Kr.push(Xe)}const In=[];for(let u=0;u<Kr.length;u++)In.push(Kr[u][1]);return this.limitCoordinates(In)}generateInsertionGeodesicCoordinates(u,Xe,fr){const Ar=Y(u,Xe),_r=function(u,Xe,fr){const Ar=[],_r=_t(u[1]),wr=_t(u[0]),Kr=_t(Xe[1]),In=_t(Xe[0]);fr+=1;const io=2*Math.asin(Math.sqrt(Math.sin((Kr-_r)/2)**2+Math.cos(_r)*Math.cos(Kr)*Math.sin((In-wr)/2)**2));if(0===io||isNaN(io))return Ar;for(let u=0;u<=fr;u++){const Xe=u/fr,no=Math.sin((1-Xe)*io)/Math.sin(io),oo=Math.sin(Xe*io)/Math.sin(io),so=no*Math.cos(_r)*Math.cos(wr)+oo*Math.cos(Kr)*Math.cos(In),ao=no*Math.cos(_r)*Math.sin(wr)+oo*Math.cos(Kr)*Math.sin(In),co=no*Math.sin(_r)+oo*Math.sin(Kr);if(isNaN(so)||isNaN(ao)||isNaN(co))continue;const go=Math.atan2(co,Math.sqrt(so**2+ao**2)),ho=Math.atan2(ao,so);isNaN(go)||isNaN(ho)||Ar.push([xt(ho),xt(go)])}return Ar.slice(1,-1)}(u,Xe,Math.floor(Ar/fr));return this.limitCoordinates(_r)}limitCoordinates(u){return u.map((u=>[e(u[0],this.config.coordinatePrecision),e(u[1],this.config.coordinatePrecision)]))}}function bt(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]}class St extends X{constructor(u){super(u),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const Xe={start:"crosshair",close:"pointer"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,this.snappingEnabled=!(!u||void 0===u.snapping)&&u.snapping,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}this.validate=null==u?void 0:u.validation,this.insertCoordinates=null==u?void 0:u.insertCoordinates}close(){if(void 0===this.currentId)return;const u=this.store.getGeometryCopy(this.currentId);u.coordinates.pop(),this.updateGeometries([...u.coordinates],void 0,ho.Commit);const Xe=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(Xe,{mode:this.mode,action:"draw"})}updateGeometries(u,Xe,fr){if(!this.currentId)return;const Ar={type:"LineString",coordinates:u};if(this.validate&&!this.validate({type:"Feature",geometry:Ar},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:fr}))return;const _r=[{id:this.currentId,geometry:Ar}];this.closingPointId&&Xe&&_r.push({id:this.closingPointId,geometry:{type:"Point",coordinates:Xe}}),"commit"===fr&&(this.lastCommitedCoordinates=Ar.coordinates),this.store.updateGeometry(_r)}generateInsertCoordinates(u,Xe){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const fr=Y(u,Xe)/(this.insertCoordinates.value+1);let Ar=[];return"globe"===this.projection?Ar=this.insertPoint.generateInsertionGeodesicCoordinates(u,Xe,fr):"web-mercator"===this.projection&&(Ar=this.insertPoint.generateInsertionCoordinates(u,Xe,fr)),Ar}createLine(u){const[Xe]=this.store.create([{geometry:{type:"LineString",coordinates:[u,u]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[u,u],this.currentId=Xe,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(u){if(!this.currentId)return;const Xe=this.store.getGeometryCopy(this.currentId).coordinates,[fr]=this.store.create([{geometry:{type:"Point",coordinates:[...u]},properties:{mode:this.mode}}]);this.closingPointId=fr,this.setCursor(this.cursors.close);const Ar=[...Xe,u];this.updateGeometries(Ar,void 0,ho.Commit),this.currentCoordinate++}updateToLine(u,Xe){if(!this.currentId)return;const fr=this.store.getGeometryCopy(this.currentId).coordinates,[Ar,_r]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:fr[fr.length-2],{x:wr,y:Kr}=this.project(Ar,_r);if(i$1({x:wr,y:Kr},{x:Xe.x,y:Xe.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const In=[...fr,u];this.updateGeometries(In,fr[fr.length-1],ho.Commit),this.currentCoordinate++}registerBehaviors(u){this.snapping=new yt(u,new pt(u),new gt(u)),this.insertPoint=new Mt(u)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(u){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const Xe=this.store.getGeometryCopy(this.currentId).coordinates;Xe.pop();const fr=this.snappingEnabled&&this.snapping.getSnappableCoordinate(u,this.currentId)||[u.lng,u.lat];if(this.closingPointId){const[fr,Ar]=Xe[Xe.length-1],{x:_r,y:wr}=this.project(fr,Ar);i$1({x:_r,y:wr},{x:u.containerX,y:u.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let Ar=[...Xe,fr];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const u=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],Xe=fr;if(!bt(u,Xe)){const _r=this.generateInsertCoordinates(u,Xe);Ar=[...this.lastCommitedCoordinates.slice(0,-1),..._r,fr]}}this.updateGeometries(Ar,void 0,ho.Provisional)}onClick(u){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(u),this.mouseMove=!1;const Xe=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(u,this.currentId)||[u.lng,u.lat];0===this.currentCoordinate?this.createLine(Xe):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(Xe):this.currentId&&this.updateToLine(Xe,{x:u.containerX,y:u.containerY})}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel&&this.cleanUp(),u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"LineString"===u.geometry.type&&u.properties.mode===this.mode?(Xe.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,Xe.lineStringColor,u),Xe.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,Xe.lineStringWidth,u),Xe.zIndex=10,Xe):"Feature"===u.type&&"Point"===u.geometry.type&&u.properties.mode===this.mode?(Xe.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,Xe.pointColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,Xe.pointWidth,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,u),Xe.zIndex=40,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&"LineString"===u.geometry.type&&u.properties.mode===this.mode&&u.geometry.coordinates.length>=2}}function Et(u,Xe){return"Point"===u.geometry.type&&st(u.geometry.coordinates,Xe)}class wt extends X{constructor(u){super(u),this.mode="point",this.cursors=void 0;const Xe={create:"crosshair"};this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(!this.store)throw new Error("Mode must be registered first");const Xe={type:"Point",coordinates:[u.lng,u.lat]},fr={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:Xe,properties:fr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:ho.Finish}))return;const[Ar]=this.store.create([{geometry:Xe,properties:fr}]);this.onFinish(Ar,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Point"===u.geometry.type&&u.properties.mode===this.mode&&(Xe.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.pointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,u),Xe.zIndex=30),Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&Et(u,this.coordinatePrecision)}}class It extends dt{constructor(u,Xe){super(u),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=u,this.pixelDistance=Xe}get ids(){return this._startEndPoints.concat()}set ids(u){}create(u,Xe){if(this.ids.length)throw new Error("Opening and closing points already created");if(u.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:u[0]},properties:{mode:Xe,[xo]:!0}},{geometry:{type:"Point",coordinates:u[u.length-2]},properties:{mode:Xe,[xo]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(u){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:u[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:u[u.length-3]}}])}isClosingPoint(u){const Xe=this.store.getGeometryCopy(this.ids[0]),fr=this.store.getGeometryCopy(this.ids[1]),Ar=this.pixelDistance.measure(u,Xe.coordinates),_r=this.pixelDistance.measure(u,fr.coordinates);return{isClosing:Ar<this.pointerDistance,isPreviousClosing:_r<this.pointerDistance}}}class Ft extends X{constructor(u){super(u),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const Xe={start:"crosshair",close:"pointer"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,this.snappingEnabled=!(!u||void 0===u.snapping)&&u.snapping,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}}close(){if(void 0===this.currentId)return;const u=this.store.getGeometryCopy(this.currentId).coordinates[0];if(u.length<5)return;if(!this.updatePolygonGeometry([...u.slice(0,-2),u[0]],ho.Finish))return;const Xe=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(Xe,{mode:this.mode,action:"draw"})}registerBehaviors(u){this.pixelDistance=new pt(u),this.snapping=new yt(u,this.pixelDistance,new gt(u)),this.closingPoints=new It(u,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(u){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0,fr=this.store.getGeometryCopy(this.currentId).coordinates[0];let Ar;if(Xe&&(u.lng=Xe[0],u.lat=Xe[1]),1===this.currentCoordinate){const Xe=1/Math.pow(10,this.coordinatePrecision-1),_r=Math.max(1e-6,Xe);Ar=[fr[0],[u.lng,u.lat],[u.lng,u.lat-_r],fr[0]]}else if(2===this.currentCoordinate)Ar=[fr[0],fr[1],[u.lng,u.lat],fr[0]];else{const{isClosing:Xe,isPreviousClosing:_r}=this.closingPoints.isClosingPoint(u);_r||Xe?(this.setCursor(this.cursors.close),Ar=[...fr.slice(0,-2),fr[0],fr[0]]):Ar=[...fr.slice(0,-2),[u.lng,u.lat],fr[0]]}this.updatePolygonGeometry(Ar,ho.Provisional)}updatePolygonGeometry(u,Xe){if(!this.currentId)return!1;const fr={type:"Polygon",coordinates:[u]};return!(this.validate&&!this.validate({type:"Feature",geometry:fr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Xe})||(this.store.updateGeometry([{id:this.currentId,geometry:fr}]),0))}onClick(u){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(u),this.mouseMove=!1,0===this.currentCoordinate){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(u):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const[fr]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat]]]},properties:{mode:this.mode}}]);this.currentId=fr,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const fr=this.store.getGeometryCopy(this.currentId);if(bt([u.lng,u.lat],fr.coordinates[0][0]))return;if(!this.updatePolygonGeometry([fr.coordinates[0][0],[u.lng,u.lat],[u.lng,u.lat],fr.coordinates[0][0]],ho.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0;Xe&&(u.lng=Xe[0],u.lat=Xe[1]);const fr=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([u.lng,u.lat],fr[1]))return;if(!this.updatePolygonGeometry([fr[0],fr[1],[u.lng,u.lat],[u.lng,u.lat],fr[0]],ho.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(fr,"polygon"),this.currentCoordinate++}else if(this.currentId){const Xe=this.snappingEnabled?this.snapping.getSnappableCoordinate(u,this.currentId):void 0,fr=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:Ar,isPreviousClosing:_r}=this.closingPoints.isClosingPoint(u);if(_r||Ar)this.close();else{if(Xe&&(u.lng=Xe[0],u.lat=Xe[1]),bt([u.lng,u.lat],fr[this.currentCoordinate-1]))return;const Ar=function(u=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:u},properties:{}}}([[...fr.slice(0,-1),[u.lng,u.lat],fr[0]]]);if(!this.updatePolygonGeometry(Ar.geometry.coordinates[0],ho.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(Ar.geometry.coordinates[0])}}}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const u=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==u&&this.store.delete([u]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(u){}}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(u.properties.mode===this.mode){if("Polygon"===u.geometry.type)return Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe;if("Point"===u.geometry.type)return Xe.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,u),Xe.zIndex=30,Xe}return Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&at(u,this.coordinatePrecision)}}class Dt extends X{constructor(u){super(u),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const Xe={start:"crosshair"};if(this.cursors=u&&u.cursors?t({},Xe,u.cursors):Xe,null===(null==u?void 0:u.keyEvents))this.keyEvents={cancel:null,finish:null};else{const Xe={cancel:"Escape",finish:"Enter"};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}}updateRectangle(u,Xe){if(1===this.clickCount&&this.center&&this.currentRectangleId){const fr=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],Ar={type:"Polygon",coordinates:[[fr,[u.lng,fr[1]],[u.lng,u.lat],[fr[0],u.lat],fr]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:Ar},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:Xe}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:Ar}])}}close(){const u=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),u&&this.onFinish(u,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(u){if(0===this.clickCount){this.center=[u.lng,u.lat];const[Xe]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat],[u.lng,u.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=Xe,this.clickCount++,this.setDrawing()}else this.updateRectangle(u,ho.Finish),this.close()}onMouseMove(u){this.updateRectangle(u,ho.Provisional)}onKeyDown(){}onKeyUp(u){u.key===this.keyEvents.cancel?this.cleanUp():u.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const u=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==u&&this.store.delete([u])}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===u.type&&"Polygon"===u.geometry.type&&u.properties.mode===this.mode?(Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,Xe.polygonFillColor,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,Xe.polygonOutlineColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe):Xe}validateFeature(u){return!!super.validateFeature(u)&&u.properties.mode===this.mode&&lt(u,this.coordinatePrecision)}}class kt extends X{constructor(u){super({styles:u.styles}),this.type=Mo.Render,this.mode="render",this.mode=u.modeName}registerBehaviors(u){this.mode=u.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(u){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",u),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,u),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",u),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,u),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",u),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,u),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",u),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,u),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,u),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",u),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,u)}}validateFeature(u){return super.validateFeature(u)&&(Et(u,this.coordinatePrecision)||at(u,this.coordinatePrecision)||function(u,Xe){return"LineString"===u.geometry.type&&u.geometry.coordinates.length>=2&&u.geometry.coordinates.every((u=>st(u,Xe)))}(u,this.coordinatePrecision))}}function Ot(u,Xe){const fr=u,Ar=Xe,_r=z(fr[1]),wr=z(Ar[1]);let Kr=z(Ar[0]-fr[0]);Kr>Math.PI&&(Kr-=2*Math.PI),Kr<-Math.PI&&(Kr+=2*Math.PI);const In=Math.log(Math.tan(wr/2+Math.PI/4)/Math.tan(_r/2+Math.PI/4)),io=($$1(Math.atan2(Kr,In))+360)%360;return io>180?-(360-io):io}function jt(u,Xe,fr){let Ar=Xe;Xe<0&&(Ar=-Math.abs(Ar));const _r=Ar/Po,wr=u[0]*Math.PI/180,Kr=z(u[1]),In=z(fr),io=_r*Math.cos(In);let no=Kr+io;Math.abs(no)>Math.PI/2&&(no=no>0?Math.PI-no:-Math.PI-no);const oo=Math.log(Math.tan(no/2+Math.PI/4)/Math.tan(Kr/2+Math.PI/4)),so=Math.abs(oo)>1e-11?io/oo:Math.cos(Kr),ao=[(180*(wr+_r*Math.sin(In)/so)/Math.PI+540)%360-180,180*no/Math.PI];return ao[0]+=ao[0]-u[0]>180?-360:u[0]-ao[0]>180?360:0,ao}function Lt(u,Xe,fr,Ar,_r){const wr=Ar(u[0],u[1]),Kr=Ar(Xe[0],Xe[1]),{lng:In,lat:io}=_r((wr.x+Kr.x)/2,(wr.y+Kr.y)/2);return[e(In,fr),e(io,fr)]}function Wt(u,Xe,fr){const Ar=jt(u,1e3*Y(u,Xe)/2,Ot(u,Xe));return[e(Ar[0],fr),e(Ar[1],fr)]}function Bt({featureCoords:u,precision:Xe,unproject:fr,project:Ar,projection:_r}){const wr=[];for(let Kr=0;Kr<u.length-1;Kr++){let In;if("web-mercator"===_r)In=Lt(u[Kr],u[Kr+1],Xe,Ar,fr);else{if("globe"!==_r)throw new Error("Invalid projection");In=Wt(u[Kr],u[Kr+1],Xe)}wr.push(In)}return wr}class Gt extends dt{constructor(u,Xe){super(u),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=u,this.selectionPointBehavior=Xe}get ids(){return this._midPoints.concat()}set ids(u){}insert(u,Xe){const fr=this.store.getGeometryCopy(u),{midPointFeatureId:Ar,midPointSegment:_r}=this.store.getPropertiesCopy(u),wr=this.store.getGeometryCopy(Ar),Kr="Polygon"===wr.type?wr.coordinates[0]:wr.coordinates;Kr.splice(_r+1,0,fr.coordinates),wr.coordinates="Polygon"===wr.type?[Kr]:Kr,this.store.updateGeometry([{id:Ar,geometry:wr}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(Kr,Ar,Xe),this.selectionPointBehavior.create(Kr,wr.type,Ar)}create(u,Xe,fr){if(!this.store.has(Xe))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(u,Xe,fr,Ar,_r,wr){return Bt({featureCoords:u,precision:fr,project:Ar,unproject:_r,projection:wr}).map(((u,fr)=>({geometry:{type:"Point",coordinates:u},properties:Xe(fr)})))}(u,(u=>({mode:this.mode,[Io]:!0,midPointSegment:u,midPointFeatureId:Xe})),fr,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(u){if(0!==this._midPoints.length)return Bt({featureCoords:u,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((u,Xe)=>({id:this._midPoints[Xe],geometry:{type:"Point",coordinates:u}})))}}class Nt extends dt{constructor(u){super(u),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(u){}create(u,Xe,fr){this._selectionPoints=this.store.create(function(u,Xe,fr){const Ar=[],_r="Polygon"===Xe?u.length-1:u.length;for(let Xe=0;Xe<_r;Xe++)Ar.push({geometry:{type:"Point",coordinates:u[Xe]},properties:fr(Xe)});return Ar}(u,Xe,(u=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:fr,index:u}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(u){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((Xe,fr)=>({id:Xe,geometry:{type:"Point",coordinates:u[fr]}})))}getOneUpdated(u,Xe){if(void 0!==this._selectionPoints[u])return{id:this._selectionPoints[u],geometry:{type:"Point",coordinates:Xe}}}}function Vt(u,Xe){let fr=!1;for(let Kr=0,In=Xe.length;Kr<In;Kr++){const In=Xe[Kr];for(let Xe=0,Kr=In.length,io=Kr-1;Xe<Kr;io=Xe++)(_r=In[Xe])[1]>(Ar=u)[1]!=(wr=In[io])[1]>Ar[1]&&Ar[0]<(wr[0]-_r[0])*(Ar[1]-_r[1])/(wr[1]-_r[1])+_r[0]&&(fr=!fr)}var Ar,_r,wr;return fr}const At=(u,Xe,fr)=>{const o=u=>u*u,r=(u,Xe)=>o(u.x-Xe.x)+o(u.y-Xe.y);return Math.sqrt(((u,Xe,fr)=>{const Ar=r(Xe,fr);if(0===Ar)return r(u,Xe);let _r=((u.x-Xe.x)*(fr.x-Xe.x)+(u.y-Xe.y)*(fr.y-Xe.y))/Ar;return _r=Math.max(0,Math.min(1,_r)),r(u,{x:Xe.x+_r*(fr.x-Xe.x),y:Xe.y+_r*(fr.y-Xe.y)})})(u,Xe,fr))};class Rt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=u,this.createClickBoundingBox=Xe,this.pixelDistance=fr}find(u,Xe){let fr,Ar,_r,wr,Kr=1/0,In=1/0,io=1/0;const no=this.createClickBoundingBox.create(u),oo=this.store.search(no);for(let no=0;no<oo.length;no++){const so=oo[no],ao=so.geometry;if("Point"===ao.type){if(so.properties.selectionPoint||!Xe&&so.properties[Io])continue;const Ar=this.pixelDistance.measure(u,ao.coordinates);so.properties[Io]&&Ar<this.pointerDistance&&Ar<io?(io=Ar,_r=so):!so.properties[Io]&&Ar<this.pointerDistance&&Ar<Kr&&(Kr=Ar,fr=so)}else if("LineString"===ao.type){if(fr)continue;for(let Xe=0;Xe<ao.coordinates.length-1;Xe++){const fr=ao.coordinates[Xe],_r=ao.coordinates[Xe+1],wr=At({x:u.containerX,y:u.containerY},this.project(fr[0],fr[1]),this.project(_r[0],_r[1]));wr<this.pointerDistance&&wr<In&&(In=wr,Ar=so)}}else if("Polygon"===ao.type){if(fr||Ar)continue;Vt([u.lng,u.lat],ao.coordinates)&&(wr=so)}}return{clickedFeature:fr||Ar||wr,clickedMidPoint:_r}}}class Tt extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=u,this.featuresAtMouseEvent=Xe,this.selectionPoints=fr,this.midPoints=Ar}startDragging(u,Xe){this.draggedFeatureId=Xe,this.dragPosition=[u.lng,u.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(u,Xe){const{clickedFeature:fr}=this.featuresAtMouseEvent.find(u,!0);return!(!fr||fr.id!==Xe)}drag(u,Xe){if(!this.draggedFeatureId)return;const fr=this.store.getGeometryCopy(this.draggedFeatureId),Ar=[u.lng,u.lat];if("Polygon"===fr.type||"LineString"===fr.type){let _r,wr;if("Polygon"===fr.type?(_r=fr.coordinates[0],wr=_r.length-1):(_r=fr.coordinates,wr=_r.length),!this.dragPosition)return!1;for(let u=0;u<wr;u++){const Xe=_r[u],fr=[this.dragPosition[0]-Ar[0],this.dragPosition[1]-Ar[1]],wr=e(Xe[0]-fr[0],this.config.coordinatePrecision),Kr=e(Xe[1]-fr[1],this.config.coordinatePrecision);if(wr>180||wr<-180||Kr>90||Kr<-90)return!1;_r[u]=[wr,Kr]}"Polygon"===fr.type&&(_r[_r.length-1]=[_r[0][0],_r[0][1]]);const Kr=this.selectionPoints.getUpdated(_r)||[],In=this.midPoints.getUpdated(_r)||[];if(Xe&&!Xe({type:"Feature",id:this.draggedFeatureId,geometry:fr,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:ho.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:fr},...Kr,...In]),this.dragPosition=[u.lng,u.lat]}else"Point"===fr.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:Ar}}]),this.dragPosition=[u.lng,u.lat])}}class Xt extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=u,this.pixelDistance=Xe,this.selectionPoints=fr,this.midPoints=Ar}getClosestCoordinate(u,Xe){const fr={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let Ar;if("LineString"===Xe.type)Ar=Xe.coordinates;else{if("Polygon"!==Xe.type)return fr;Ar=Xe.coordinates[0]}for(let _r=0;_r<Ar.length;_r++){const wr=this.pixelDistance.measure(u,Ar[_r]);if(wr<this.pointerDistance&&wr<fr.dist){const u="Polygon"===Xe.type&&(_r===Ar.length-1||0===_r);fr.dist=wr,fr.index=u?0:_r,fr.isFirstOrLastPolygonCoord=u}}return fr}getDraggableIndex(u,Xe){const fr=this.store.getGeometryCopy(Xe),Ar=this.getClosestCoordinate(u,fr);return-1===Ar.index?-1:Ar.index}drag(u,Xe,fr){if(!this.draggedCoordinate.id)return!1;const Ar=this.draggedCoordinate.index,_r=this.store.getGeometryCopy(this.draggedCoordinate.id),wr="LineString"===_r.type?_r.coordinates:_r.coordinates[0],Kr=[u.lng,u.lat];if(u.lng>180||u.lng<-180||u.lat>90||u.lat<-90)return!1;if("Polygon"!==_r.type||Ar!==wr.length-1&&0!==Ar)wr[Ar]=Kr;else{const u=wr.length-1;wr[0]=Kr,wr[u]=Kr}const In=this.selectionPoints.getOneUpdated(Ar,Kr),io=In?[In]:[],no=this.midPoints.getUpdated(wr)||[];return!("Point"!==_r.type&&!Xe&&ot({type:"Feature",geometry:_r,properties:{}})||fr&&!fr({type:"Feature",id:this.draggedCoordinate.id,geometry:_r,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:ho.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:_r},...io,...no]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(u,Xe){this.draggedCoordinate={id:u,index:Xe}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(u){let Xe=0,fr=0,Ar=0;return("Polygon"===u.geometry.type?u.geometry.coordinates[0].slice(0,-1):u.geometry.coordinates).forEach((u=>{Xe+=u[0],fr+=u[1],Ar++}),!0),[Xe/Ar,fr/Ar]}function Yt(u,Xe){u[0]+=u[0]-Xe[0]>180?-360:Xe[0]-u[0]>180?360:0;const fr=Po,Ar=Xe[1]*Math.PI/180,_r=u[1]*Math.PI/180,wr=_r-Ar;let Kr=Math.abs(u[0]-Xe[0])*Math.PI/180;Kr>Math.PI&&(Kr-=2*Math.PI);const In=Math.log(Math.tan(_r/2+Math.PI/4)/Math.tan(Ar/2+Math.PI/4)),io=Math.abs(In)>1e-11?wr/In:Math.cos(Ar);return Math.sqrt(wr*wr+io*io*Kr*Kr)*fr}function Kt(u){const Xe=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((u=>{const{x:Xe,y:fr}=Q(u[0],u[1]);return[Xe,fr]}));return"Polygon"===u.geometry.type?function(u){let Xe=0,fr=0,Ar=0;const _r=u.length;for(let wr=0;wr<_r-1;wr++){const[_r,Kr]=u[wr],[In,io]=u[wr+1],no=_r*io-In*Kr;Xe+=no,fr+=(_r+In)*no,Ar+=(Kr+io)*no}return Xe/=2,fr/=6*Xe,Ar/=6*Xe,{x:fr,y:Ar}}(Xe):function(u){const Xe=u.length;let fr=0,Ar=0;for(let _r=0;_r<Xe;_r++){const[Xe,wr]=u[_r];fr+=Xe,Ar+=wr}return{x:fr/Xe,y:Ar/Xe}}(Xe)}class zt extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=u,this.selectionPoints=Xe,this.midPoints=fr}reset(){this.lastBearing=void 0}rotate(u,Xe,fr){const Ar=this.store.getGeometryCopy(Xe);if("Polygon"!==Ar.type&&"LineString"!==Ar.type)return;const _r=[u.lng,u.lat];let wr;const Kr={type:"Feature",geometry:Ar,properties:{}};if("web-mercator"===this.config.projection){if(wr=function vt({x:u,y:Xe},{x:fr,y:Ar}){let _r=Math.atan2(Ar-Xe,fr-u);return _r*=180/Math.PI,_r>180?_r-=360:_r<-180&&(_r+=360),_r}(Kt(Kr),Q(u.lng,u.lat)),!this.lastBearing)return void(this.lastBearing=wr);((u,Xe)=>{if(0===Xe||360===Xe||-360===Xe)return u;const fr=.017453292519943295*Xe,Ar=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((([u,Xe])=>Q(u,Xe))),_r=Ar.reduce(((u,Xe)=>({x:u.x+Xe.x,y:u.y+Xe.y})),{x:0,y:0});_r.x/=Ar.length,_r.y/=Ar.length;const wr=Ar.map((u=>({x:_r.x+(u.x-_r.x)*Math.cos(fr)-(u.y-_r.y)*Math.sin(fr),y:_r.y+(u.x-_r.x)*Math.sin(fr)+(u.y-_r.y)*Math.cos(fr)}))).map((({x:u,y:Xe})=>[tt(u,Xe).lng,tt(u,Xe).lat]));"Polygon"===u.geometry.type?u.geometry.coordinates[0]=wr:(console.log("rotatedCoordinates linestring",wr),u.geometry.coordinates=wr)})(Kr,-(this.lastBearing-wr))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(wr=Ot(Ut({type:"Feature",geometry:Ar,properties:{}}),_r),!this.lastBearing)return void(this.lastBearing=wr+180);!function(u,Xe){if(0===Xe||360===Xe||-360===Xe)return u;const fr=Ut(u);("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).forEach((u=>{const Ar=Ot(fr,u)+Xe,_r=Yt(fr,u),wr=jt(fr,_r,Ar);u[0]=wr[0],u[1]=wr[1]}))}(Kr,-(this.lastBearing-(wr+180)))}const In="Polygon"===Ar.type?Ar.coordinates[0]:Ar.coordinates;In.forEach((u=>{u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision)}));const io=this.midPoints.getUpdated(In)||[],no=this.selectionPoints.getUpdated(In)||[];if(fr&&!fr({id:Xe,type:"Feature",geometry:Ar,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:ho.Provisional}))return!1;this.store.updateGeometry([{id:Xe,geometry:Ar},...no,...io]),"web-mercator"===this.projection?this.lastBearing=wr:"globe"===this.projection&&(this.lastBearing=wr+180)}}class Ht extends dt{constructor(u,Xe,fr){super(u),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=u,this.selectionPoints=Xe,this.midPoints=fr}reset(){this.lastDistance=void 0}scale(u,Xe,fr){const Ar=this.store.getGeometryCopy(Xe);if("Polygon"!==Ar.type&&"LineString"!==Ar.type)return;const _r=[u.lng,u.lat],wr={type:"Feature",geometry:Ar,properties:{}};let Kr;const In=Kt(wr);if("web-mercator"===this.config.projection){const Xe=Q(u.lng,u.lat);Kr=i$1(In,Xe)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");Kr=Y(Ut({type:"Feature",geometry:Ar,properties:{}}),_r)}if(!this.lastDistance)return void(this.lastDistance=Kr);const io=1-(this.lastDistance-Kr)/Kr;if("web-mercator"===this.config.projection){const{lng:u,lat:Xe}=tt(In.x,In.y);!function(u,Xe,fr){if(1===Xe)return u;const Ar=("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).map((([u,Xe])=>Q(u,Xe))),_r=Q(fr[0],fr[1]),wr=Ar.map((u=>({x:_r.x+(u.x-_r.x)*Xe,y:_r.y+(u.y-_r.y)*Xe}))).map((({x:u,y:Xe})=>[tt(u,Xe).lng,tt(u,Xe).lat]));"Polygon"===u.geometry.type?u.geometry.coordinates[0]=wr:u.geometry.coordinates=wr}(wr,io,[u,Xe])}else"globe"===this.config.projection&&function(u,Xe,fr,Ar="xy"){1===Xe||("Polygon"===u.geometry.type?u.geometry.coordinates[0]:u.geometry.coordinates).forEach((u=>{const _r=Yt(fr,u),wr=Ot(fr,u),Kr=jt(fr,_r*Xe,wr);"x"!==Ar&&"xy"!==Ar||(u[0]=Kr[0]),"y"!==Ar&&"xy"!==Ar||(u[1]=Kr[1])}))}(wr,io,Ut(wr));const no="Polygon"===Ar.type?Ar.coordinates[0]:Ar.coordinates;no.forEach((u=>{u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision)}));const oo=this.midPoints.getUpdated(no)||[],so=this.selectionPoints.getUpdated(no)||[];if(fr&&!fr({id:Xe,type:"Feature",geometry:Ar,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:ho.Provisional}))return!1;this.store.updateGeometry([{id:Xe,geometry:Ar},...so,...oo]),this.lastDistance=Kr}}class $t extends dt{constructor(u,Xe,fr,Ar){super(u),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=u,this.pixelDistance=Xe,this.selectionPoints=fr,this.midPoints=Ar}getClosestCoordinate(u,Xe){const fr={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let Ar;if("LineString"===Xe.type)Ar=Xe.coordinates;else{if("Polygon"!==Xe.type)return fr;Ar=Xe.coordinates[0]}for(let _r=0;_r<Ar.length;_r++){const wr=this.pixelDistance.measure(u,Ar[_r]);if(wr<this.pointerDistance&&wr<fr.dist){const u="Polygon"===Xe.type&&(_r===Ar.length-1||0===_r);fr.dist=wr,fr.index=u?0:_r,fr.isFirstOrLastPolygonCoord=u}}return fr}isValidDragWebMercator(u,Xe,fr){switch(u){case 0:if(Xe<=0||fr>=0)return!1;break;case 1:if(fr>=0)return!1;break;case 2:if(Xe>=0||fr>=0)return!1;break;case 3:if(Xe>=0)return!1;break;case 4:if(Xe>=0||fr<=0)return!1;break;case 5:if(fr<=0)return!1;break;case 6:if(Xe<=0||fr<=0)return!1;break;case 7:if(Xe<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const u=this.getFeature(this.draggedCoordinate.id);if(!u)return null;const Xe=this.getNormalisedCoordinates(u.geometry);return{boundingBox:this.getBBoxWebMercator(Xe),feature:u,updatedCoords:Xe,selectedCoordinate:Xe[this.draggedCoordinate.index]}}centerWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{feature:fr,boundingBox:Ar,updatedCoords:_r,selectedCoordinate:wr}=Xe,Kr=Kt(fr);if(!Kr)return null;const In=Q(wr[0],wr[1]),{closestBBoxIndex:io}=this.getIndexesWebMercator(Ar,In),no=Q(u.lng,u.lat);return this.scaleWebMercator({closestBBoxIndex:io,updatedCoords:_r,webMercatorCursor:no,webMercatorSelected:In,webMercatorOrigin:Kr}),_r}centerFixedWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{feature:fr,boundingBox:Ar,updatedCoords:_r,selectedCoordinate:wr}=Xe,Kr=Kt(fr);if(!Kr)return null;const In=Q(wr[0],wr[1]),{closestBBoxIndex:io}=this.getIndexesWebMercator(Ar,In),no=Q(u.lng,u.lat);return this.scaleFixedWebMercator({closestBBoxIndex:io,updatedCoords:_r,webMercatorCursor:no,webMercatorSelected:In,webMercatorOrigin:Kr}),_r}scaleFixedWebMercator({closestBBoxIndex:u,webMercatorOrigin:Xe,webMercatorSelected:fr,webMercatorCursor:Ar,updatedCoords:_r}){if(!this.isValidDragWebMercator(u,Xe.x-Ar.x,Xe.y-Ar.y))return null;let wr=i$1(Xe,Ar)/i$1(Xe,fr);return wr<0&&(wr=this.minimumScale),this.performWebMercatorScale(_r,Xe.x,Xe.y,wr,wr),_r}oppositeFixedWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{boundingBox:fr,updatedCoords:Ar,selectedCoordinate:_r}=Xe,wr=Q(_r[0],_r[1]),{oppositeBboxIndex:Kr,closestBBoxIndex:In}=this.getIndexesWebMercator(fr,wr),io={x:fr[Kr][0],y:fr[Kr][1]},no=Q(u.lng,u.lat);return this.scaleFixedWebMercator({closestBBoxIndex:In,updatedCoords:Ar,webMercatorCursor:no,webMercatorSelected:wr,webMercatorOrigin:io}),Ar}oppositeWebMercatorDrag(u){const Xe=this.getSelectedFeatureDataWebMercator();if(!Xe)return null;const{boundingBox:fr,updatedCoords:Ar,selectedCoordinate:_r}=Xe,wr=Q(_r[0],_r[1]),{oppositeBboxIndex:Kr,closestBBoxIndex:In}=this.getIndexesWebMercator(fr,wr),io={x:fr[Kr][0],y:fr[Kr][1]},no=Q(u.lng,u.lat);return this.scaleWebMercator({closestBBoxIndex:In,updatedCoords:Ar,webMercatorCursor:no,webMercatorSelected:wr,webMercatorOrigin:io}),Ar}scaleWebMercator({closestBBoxIndex:u,webMercatorOrigin:Xe,webMercatorSelected:fr,webMercatorCursor:Ar,updatedCoords:_r}){const wr=Xe.x-Ar.x,Kr=Xe.y-Ar.y;if(!this.isValidDragWebMercator(u,wr,Kr))return null;let In=1;0!==wr&&1!==u&&5!==u&&(In=1-(Xe.x-fr.x-wr)/wr);let io=1;return 0!==Kr&&3!==u&&7!==u&&(io=1-(Xe.y-fr.y-Kr)/Kr),this.validateScale(In,io)?(In<0&&(In=this.minimumScale),io<0&&(io=this.minimumScale),this.performWebMercatorScale(_r,Xe.x,Xe.y,In,io),_r):null}getFeature(u){if(null===this.draggedCoordinate.id)return null;const Xe=this.store.getGeometryCopy(u);return"Polygon"!==Xe.type&&"LineString"!==Xe.type?null:{type:"Feature",geometry:Xe,properties:{}}}getNormalisedCoordinates(u){return"Polygon"===u.type?u.coordinates[0]:u.coordinates}validateScale(u,Xe){const fr=!isNaN(u)&&Xe<Number.MAX_SAFE_INTEGER,Ar=!isNaN(Xe)&&Xe<Number.MAX_SAFE_INTEGER;return fr&&Ar}performWebMercatorScale(u,Xe,fr,Ar,_r){u.forEach((u=>{const{x:wr,y:Kr}=Q(u[0],u[1]),In=Xe+(wr-Xe)*Ar,io=fr+(Kr-fr)*_r,{lng:no,lat:oo}=tt(In,io);u[0]=no,u[1]=oo}))}getBBoxWebMercator(u){const Xe=[1/0,1/0,-1/0,-1/0];(u=u.map((u=>{const{x:Xe,y:fr}=Q(u[0],u[1]);return[Xe,fr]}))).forEach((([u,fr])=>{u<Xe[0]&&(Xe[0]=u),fr<Xe[1]&&(Xe[1]=fr),u>Xe[2]&&(Xe[2]=u),fr>Xe[3]&&(Xe[3]=fr)}));const[fr,Ar,_r,wr]=Xe;return[[fr,wr],[(fr+_r)/2,wr],[_r,wr],[_r,wr+(Ar-wr)/2],[_r,Ar],[(fr+_r)/2,Ar],[fr,Ar],[fr,wr+(Ar-wr)/2]]}getIndexesWebMercator(u,Xe){let fr,Ar=1/0;for(let _r=0;_r<u.length;_r++){const wr=i$1({x:Xe.x,y:Xe.y},{x:u[_r][0],y:u[_r][1]});wr<Ar&&(fr=_r,Ar=wr)}if(void 0===fr)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[fr],closestBBoxIndex:fr}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(u,Xe){this.draggedCoordinate={id:u,index:Xe}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(u,Xe){const fr=this.store.getGeometryCopy(Xe),Ar=this.getClosestCoordinate(u,fr);return-1===Ar.index?-1:Ar.index}drag(u,Xe,fr){if(!this.draggedCoordinate.id)return!1;const Ar=this.getFeature(this.draggedCoordinate.id);if(!Ar)return!1;let _r=null;if("center"===Xe?_r=this.centerWebMercatorDrag(u):"opposite"===Xe?_r=this.oppositeWebMercatorDrag(u):"center-fixed"===Xe?_r=this.centerFixedWebMercatorDrag(u):"opposite-fixed"===Xe&&(_r=this.oppositeFixedWebMercatorDrag(u)),!_r)return!1;for(let u=0;u<_r.length;u++){const Xe=_r[u];if(Xe[0]=e(Xe[0],this.coordinatePrecision),Xe[1]=e(Xe[1],this.coordinatePrecision),!st(Xe,this.coordinatePrecision))return!1}const wr=this.midPoints.getUpdated(_r)||[],Kr=this.selectionPoints.getUpdated(_r)||[],In={type:Ar.geometry.type,coordinates:"Polygon"===Ar.geometry.type?[_r]:_r};return!(fr&&!fr({id:this.draggedCoordinate.id,type:"Feature",geometry:In,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:ho.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:In},...Kr,...wr]),0))}}class Jt extends U{constructor(u){var Xe;super(u),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=u&&u.flags?u.flags:{};const fr={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=u&&u.cursors?t({},fr,u.cursors):fr,null===(null==u?void 0:u.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const Xe={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=u&&u.keyEvents?t({},Xe,u.keyEvents):Xe}if(this.dragEventThrottle=u&&void 0!==u.dragEventThrottle&&u.dragEventThrottle||5,this.allowManualDeselection=null==(Xe=null==u?void 0:u.allowManualDeselection)||Xe,u&&u.flags&&u.flags)for(const Xe in u.flags){const fr=u.flags[Xe].feature;fr&&fr.validation&&(this.validations[Xe]=fr.validation)}}selectFeature(u){this.select(u,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(u){this.pixelDistance=new pt(u),this.clickBoundingBox=new gt(u),this.featuresAtMouseEvent=new Rt(u,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(u),this.midPoints=new Gt(u,this.selectionPoints),this.rotateFeature=new zt(u,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(u,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(u,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(u,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(u,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const u=this.selected.filter((u=>this.store.has(u))).map((u=>({id:u,property:Co,value:!1})));this.store.updateProperty(u),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(u){if(!this.selectionPoints.ids.length)return;let Xe,fr=1/0;if(this.selectionPoints.ids.forEach((Ar=>{const _r=this.store.getGeometryCopy(Ar),wr=this.pixelDistance.measure(u,_r.coordinates);wr<this.pointerDistance&&wr<fr&&(fr=wr,Xe=this.store.getPropertiesCopy(Ar))})),!Xe)return;const Ar=Xe.selectionPointFeatureId,_r=Xe.index,wr=this.store.getPropertiesCopy(Ar),Kr=this.flags[wr.mode],In=this.validations[wr.mode];if(!(Kr&&Kr.feature&&Kr.feature.coordinates&&Kr.feature.coordinates.deletable))return;const io=this.store.getGeometryCopy(Ar);let no;if("Polygon"===io.type){if(no=io.coordinates[0],no.length<=4)return}else if("LineString"===io.type&&(no=io.coordinates,no.length<=3))return;if(no){if("Polygon"===io.type&&0===_r||_r===no.length-1?(no.shift(),no.pop(),no.push([no[0][0],no[0][1]])):no.splice(_r,1),In&&!In({id:Ar,type:"Feature",geometry:io,properties:wr},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:ho.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:Ar,geometry:io}]),this.selectionPoints.create(no,io.type,Ar),Kr&&Kr.feature&&Kr.feature.coordinates&&Kr.feature.coordinates.midpoints&&this.midPoints.create(no,Ar,this.coordinatePrecision)}}select(u,Xe=!0){if(this.selected[0]===u)return;const{mode:fr}=this.store.getPropertiesCopy(u),Ar=this.flags[fr];if(!Ar||!Ar.feature)return;const _r=this.selected[0];if(_r){if(_r===u)return;this.deselect()}Xe&&this.setCursor(this.cursors.pointerOver),this.selected=[u],this.store.updateProperty([{id:u,property:"selected",value:!0}]),this.onSelect(u);const{type:wr,coordinates:Kr}=this.store.getGeometryCopy(u);if("LineString"!==wr&&"Polygon"!==wr)return;const In="LineString"===wr?Kr:Kr[0];In&&Ar&&Ar.feature.coordinates&&(this.selectionPoints.create(In,wr,u),Ar.feature.coordinates.midpoints&&this.midPoints.create(In,u,this.coordinatePrecision))}onLeftClick(u){const{clickedFeature:Xe,clickedMidPoint:fr}=this.featuresAtMouseEvent.find(u,this.selected.length>0);if(this.selected.length&&fr)this.midPoints.insert(fr.id,this.coordinatePrecision);else if(Xe&&Xe.id)this.select(Xe.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(u){"right"!==u.button?"left"===u.button&&this.onLeftClick(u):this.onRightClick(u)}canScale(u){return this.keyEvents.scale&&this.keyEvents.scale.every((Xe=>u.heldKeys.includes(Xe)))}canRotate(u){return this.keyEvents.rotate&&this.keyEvents.rotate.every((Xe=>u.heldKeys.includes(Xe)))}preventDefaultKeyEvent(u){const Xe=this.canRotate(u),fr=this.canScale(u);(Xe||fr)&&u.preventDefault()}onKeyDown(u){this.preventDefaultKeyEvent(u)}onKeyUp(u){if(this.preventDefaultKeyEvent(u),this.keyEvents.delete&&u.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&u.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(u,Xe){if(!this.selected.length)return;const fr=this.store.getPropertiesCopy(this.selected[0]),Ar=this.flags[fr.mode];if(!(Ar&&Ar.feature&&(Ar.feature.draggable||Ar.feature.coordinates&&Ar.feature.coordinates.draggable||Ar.feature.coordinates&&Ar.feature.coordinates.resizable)))return;this.dragEventCount=0;const _r=this.selected[0],wr=this.dragCoordinate.getDraggableIndex(u,_r);return Ar&&Ar.feature&&Ar.feature.coordinates&&(Ar.feature.coordinates.draggable||Ar.feature.coordinates.resizable)&&-1!==wr?(this.setCursor(this.cursors.dragStart),Ar.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(_r,wr):this.dragCoordinate.startDragging(_r,wr),void Xe(!1)):Ar&&Ar.feature&&Ar.feature.draggable&&this.dragFeature.canDrag(u,_r)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(u,_r),void Xe(!1)):void 0}onDrag(u,Xe){const fr=this.selected[0];if(!fr)return;const Ar=this.store.getPropertiesCopy(fr),_r=this.flags[Ar.mode],wr=!0===(_r&&_r.feature&&_r.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const Kr=this.validations[Ar.mode];if(_r&&_r.feature&&_r.feature.rotateable&&this.canRotate(u))return Xe(!1),void this.rotateFeature.rotate(u,fr,Kr);if(_r&&_r.feature&&_r.feature.scaleable&&this.canScale(u))return Xe(!1),void this.scaleFeature.scale(u,fr,Kr);if(this.dragCoordinateResizeFeature.isDragging()&&_r.feature&&_r.feature.coordinates&&_r.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return Xe(!1),void this.dragCoordinateResizeFeature.drag(u,_r.feature.coordinates.resizable,Kr)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(u,wr,Kr):this.dragFeature.isDragging()?this.dragFeature.drag(u,Kr):Xe(!0)}onDragEnd(u,Xe){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),Xe(!0)}onMouseMove(u){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let Xe=!1;this.midPoints.ids.forEach((fr=>{if(Xe)return;const Ar=this.store.getGeometryCopy(fr);this.pixelDistance.measure(u,Ar.coordinates)<this.pointerDistance&&(Xe=!0)}));let fr=!1;if(this.selectionPoints.ids.forEach((Ar=>{const _r=this.store.getGeometryCopy(Ar);this.pixelDistance.measure(u,_r.coordinates)<this.pointerDistance&&(Xe=!1,fr=!0)})),Xe)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:Ar}=this.featuresAtMouseEvent.find(u,!0);this.setCursor(this.selected.length>0&&(Ar&&Ar.id===this.selected[0]||fr)?this.cursors.pointerOver:"unset")}styleFeature(u){const Xe=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(u.properties.mode===this.mode&&"Point"===u.geometry.type){if(u.properties.selectionPoint)return Xe.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,Xe.pointWidth,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,u),Xe.zIndex=30,Xe;if(u.properties.midPoint)return Xe.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,u),Xe.zIndex=40,Xe}else if(u.properties[Co]){if("Polygon"===u.geometry.type)return Xe.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,Xe.polygonFillColor,u),Xe.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,Xe.polygonOutlineWidth,u),Xe.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,Xe.polygonOutlineColor,u),Xe.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,Xe.polygonFillOpacity,u),Xe.zIndex=10,Xe;if("LineString"===u.geometry.type)return Xe.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,Xe.lineStringColor,u),Xe.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,Xe.lineStringWidth,u),Xe.zIndex=10,Xe;if("Point"===u.geometry.type)return Xe.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,Xe.pointWidth,u),Xe.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,Xe.pointColor,u),Xe.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,Xe.pointOutlineColor,u),Xe.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,Xe.pointOutlineWidth,u),Xe.zIndex=10,Xe}return Xe}}class Zt extends X{constructor(...u){super(...u),this.type=Mo.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(u,Xe,fr,Ar,_r){for(;Ar>fr;){if(Ar-fr>600){const wr=Ar-fr+1,Kr=Xe-fr+1,In=Math.log(wr),io=.5*Math.exp(2*In/3),no=.5*Math.sqrt(In*io*(wr-io)/wr)*(Kr-wr/2<0?-1:1);qt(u,Xe,Math.max(fr,Math.floor(Xe-Kr*io/wr+no)),Math.min(Ar,Math.floor(Xe+(wr-Kr)*io/wr+no)),_r)}const wr=u[Xe];let Kr=fr,In=Ar;for(Qt(u,fr,Xe),_r(u[Ar],wr)>0&&Qt(u,fr,Ar);Kr<In;){for(Qt(u,Kr,In),Kr++,In--;_r(u[Kr],wr)<0;)Kr++;for(;_r(u[In],wr)>0;)In--}0===_r(u[fr],wr)?Qt(u,fr,In):(In++,Qt(u,In,Ar)),In<=Xe&&(fr=In+1),Xe<=In&&(Ar=In-1)}}function Qt(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function te(u,Xe){ee(u,0,u.children.length,Xe,u)}function ee(u,Xe,fr,Ar,_r){_r||(_r=ce([])),_r.minX=1/0,_r.minY=1/0,_r.maxX=-1/0,_r.maxY=-1/0;for(let wr=Xe;wr<fr;wr++){const Xe=u.children[wr];ie(_r,u.leaf?Ar(Xe):Xe)}return _r}function ie(u,Xe){return u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),u}function oe(u,Xe){return u.minX-Xe.minX}function re(u,Xe){return u.minY-Xe.minY}function se(u){return(u.maxX-u.minX)*(u.maxY-u.minY)}function ne(u){return u.maxX-u.minX+(u.maxY-u.minY)}function ae(u,Xe){const fr=Math.max(u.minX,Xe.minX),Ar=Math.max(u.minY,Xe.minY),_r=Math.min(u.maxX,Xe.maxX),wr=Math.min(u.maxY,Xe.maxY);return Math.max(0,_r-fr)*Math.max(0,wr-Ar)}function le(u,Xe){return u.minX<=Xe.minX&&u.minY<=Xe.minY&&Xe.maxX<=u.maxX&&Xe.maxY<=u.maxY}function he(u,Xe){return Xe.minX<=u.maxX&&Xe.minY<=u.maxY&&Xe.maxX>=u.minX&&Xe.maxY>=u.minY}function ce(u){return{children:u,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(u,Xe,fr,Ar,_r){const wr=[Xe,fr];for(;wr.length;){if((fr=wr.pop())-(Xe=wr.pop())<=Ar)continue;const Kr=Xe+Math.ceil((fr-Xe)/Ar/2)*Ar;qt(u,Kr,Xe,fr,_r),wr.push(Xe,Kr,Kr,fr)}}class ue{constructor(u){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,u),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(u){let Xe=this.data;const fr=[];if(!he(u,Xe))return fr;const Ar=this.toBBox,_r=[];for(;Xe;){for(let wr=0;wr<Xe.children.length;wr++){const Kr=Xe.children[wr],In=Xe.leaf?Ar(Kr):Kr;he(u,In)&&(Xe.leaf?fr.push(Kr):le(u,In)?this._all(Kr,fr):_r.push(Kr))}Xe=_r.pop()}return fr}collides(u){let Xe=this.data;if(he(u,Xe)){const fr=[];for(;Xe;){for(let Ar=0;Ar<Xe.children.length;Ar++){const _r=Xe.children[Ar],wr=Xe.leaf?this.toBBox(_r):_r;if(he(u,wr)){if(Xe.leaf||le(u,wr))return!0;fr.push(_r)}}Xe=fr.pop()}}return!1}load(u){if(u.length<this._minEntries){for(let Xe=0;Xe<u.length;Xe++)this.insert(u[Xe]);return}let Xe=this._build(u.slice(),0,u.length-1,0);if(this.data.children.length)if(this.data.height===Xe.height)this._splitRoot(this.data,Xe);else{if(this.data.height<Xe.height){const u=this.data;this.data=Xe,Xe=u}this._insert(Xe,this.data.height-Xe.height-1,!0)}else this.data=Xe}insert(u){this._insert(u,this.data.height-1)}clear(){this.data=ce([])}remove(u){let Xe=this.data;const fr=this.toBBox(u),Ar=[],_r=[];let wr,Kr,In=!1;for(;Xe||Ar.length;){if(Xe||(Xe=Ar.pop(),Kr=Ar[Ar.length-1],wr=_r.pop(),In=!0),Xe.leaf){const fr=Xe.children.indexOf(u);-1!==fr&&(Xe.children.splice(fr,1),Ar.push(Xe),this._condense(Ar))}In||Xe.leaf||!le(Xe,fr)?Kr?(wr++,Xe=Kr.children[wr],In=!1):Xe=null:(Ar.push(Xe),_r.push(wr),wr=0,Kr=Xe,Xe=Xe.children[0])}}toBBox(u){return u}compareMinX(u,Xe){return u.minX-Xe.minX}compareMinY(u,Xe){return u.minY-Xe.minY}_all(u,Xe){const fr=[];for(;u;)u.leaf?Xe.push(...u.children):fr.push(...u.children),u=fr.pop();return Xe}_build(u,Xe,fr,Ar){const _r=fr-Xe+1;let wr,Kr=this._maxEntries;if(_r<=Kr)return wr=ce(u.slice(Xe,fr+1)),te(wr,this.toBBox),wr;Ar||(Ar=Math.ceil(Math.log(_r)/Math.log(Kr)),Kr=Math.ceil(_r/Math.pow(Kr,Ar-1))),wr=ce([]),wr.leaf=!1,wr.height=Ar;const In=Math.ceil(_r/Kr),io=In*Math.ceil(Math.sqrt(Kr));de(u,Xe,fr,io,this.compareMinX);for(let _r=Xe;_r<=fr;_r+=io){const Xe=Math.min(_r+io-1,fr);de(u,_r,Xe,In,this.compareMinY);for(let fr=_r;fr<=Xe;fr+=In){const _r=Math.min(fr+In-1,Xe);wr.children.push(this._build(u,fr,_r,Ar-1))}}return te(wr,this.toBBox),wr}_chooseSubtree(u,Xe,fr,Ar){for(;Ar.push(Xe),!Xe.leaf&&Ar.length-1!==fr;){let fr,Ar=1/0,Kr=1/0;for(let In=0;In<Xe.children.length;In++){const io=Xe.children[In],no=se(io),oo=(_r=u,wr=io,(Math.max(wr.maxX,_r.maxX)-Math.min(wr.minX,_r.minX))*(Math.max(wr.maxY,_r.maxY)-Math.min(wr.minY,_r.minY))-no);oo<Kr?(Kr=oo,Ar=no<Ar?no:Ar,fr=io):oo===Kr&&no<Ar&&(Ar=no,fr=io)}Xe=fr||Xe.children[0]}var _r,wr;return Xe}_insert(u,Xe,fr){const Ar=fr?u:this.toBBox(u),_r=[],wr=this._chooseSubtree(Ar,this.data,Xe,_r);for(wr.children.push(u),ie(wr,Ar);Xe>=0&&_r[Xe].children.length>this._maxEntries;)this._split(_r,Xe),Xe--;this._adjustParentBBoxes(Ar,_r,Xe)}_split(u,Xe){const fr=u[Xe],Ar=fr.children.length,_r=this._minEntries;this._chooseSplitAxis(fr,_r,Ar);const wr=this._chooseSplitIndex(fr,_r,Ar),Kr=ce(fr.children.splice(wr,fr.children.length-wr));Kr.height=fr.height,Kr.leaf=fr.leaf,te(fr,this.toBBox),te(Kr,this.toBBox),Xe?u[Xe-1].children.push(Kr):this._splitRoot(fr,Kr)}_splitRoot(u,Xe){this.data=ce([u,Xe]),this.data.height=u.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(u,Xe,fr){let Ar,_r=1/0,wr=1/0;for(let Kr=Xe;Kr<=fr-Xe;Kr++){const Xe=ee(u,0,Kr,this.toBBox),In=ee(u,Kr,fr,this.toBBox),io=ae(Xe,In),no=se(Xe)+se(In);io<_r?(_r=io,Ar=Kr,wr=no<wr?no:wr):io===_r&&no<wr&&(wr=no,Ar=Kr)}return Ar||fr-Xe}_chooseSplitAxis(u,Xe,fr){const Ar=u.leaf?this.compareMinX:oe,_r=u.leaf?this.compareMinY:re;this._allDistMargin(u,Xe,fr,Ar)<this._allDistMargin(u,Xe,fr,_r)&&u.children.sort(Ar)}_allDistMargin(u,Xe,fr,Ar){u.children.sort(Ar);const _r=this.toBBox,wr=ee(u,0,Xe,_r),Kr=ee(u,fr-Xe,fr,_r);let In=ne(wr)+ne(Kr);for(let Ar=Xe;Ar<fr-Xe;Ar++){const Xe=u.children[Ar];ie(wr,u.leaf?_r(Xe):Xe),In+=ne(wr)}for(let Ar=fr-Xe-1;Ar>=Xe;Ar--){const Xe=u.children[Ar];ie(Kr,u.leaf?_r(Xe):Xe),In+=ne(Kr)}return In}_adjustParentBBoxes(u,Xe,fr){for(let Ar=fr;Ar>=0;Ar--)ie(Xe[Ar],u)}_condense(u){for(let Xe,fr=u.length-1;fr>=0;fr--)0===u[fr].children.length?fr>0?(Xe=u[fr-1].children,Xe.splice(Xe.indexOf(u[fr]),1)):this.clear():te(u[fr],this.toBBox)}}class ge{constructor(u){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(u&&u.maxEntries?u.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(u,Xe){this.idToNode.set(u.id,Xe),this.nodeToId.set(Xe,u.id)}toBBox(u){const Xe=[],fr=[];let Ar;if("Polygon"===u.geometry.type)Ar=u.geometry.coordinates[0];else if("LineString"===u.geometry.type)Ar=u.geometry.coordinates;else{if("Point"!==u.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");Ar=[u.geometry.coordinates]}for(let u=0;u<Ar.length;u++)fr.push(Ar[u][1]),Xe.push(Ar[u][0]);const _r=Math.min(...fr),wr=Math.max(...fr);return{minX:Math.min(...Xe),minY:_r,maxX:Math.max(...Xe),maxY:wr}}insert(u){if(this.idToNode.get(String(u.id)))throw new Error("Feature already exists");const Xe=this.toBBox(u);this.setMaps(u,Xe),this.tree.insert(Xe)}load(u){const Xe=[],fr=new Set;u.forEach((u=>{const Ar=this.toBBox(u);if(this.setMaps(u,Ar),fr.has(String(u.id)))throw new Error(`Duplicate feature ID found ${u.id}`);fr.add(String(u.id)),Xe.push(Ar)})),this.tree.load(Xe)}update(u){this.remove(u.id);const Xe=this.toBBox(u);this.setMaps(u,Xe),this.tree.insert(Xe)}remove(u){const Xe=this.idToNode.get(u);if(!Xe)throw new Error(`${u} not inserted into the spatial index`);this.tree.remove(Xe)}clear(){this.tree.clear()}search(u){return this.tree.search(this.toBBox(u)).map((u=>this.nodeToId.get(u)))}collides(u){return this.tree.collides(this.toBBox(u))}}const fa={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(u){const Xe=16*Math.random()|0;return("x"==u?Xe:3&Xe|8).toString(16)})),isValidId:u=>"string"==typeof u&&36===u.length};class ye{constructor(u){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!u||!1!==u.tracked,this.idStrategy=u&&u.idStrategy?u.idStrategy:fa}clone(u){return JSON.parse(JSON.stringify(u))}getId(){return this.idStrategy.getId()}has(u){return Boolean(this.store[u])}load(u,Xe){if(0===u.length)return;const fr=this.clone(u);fr.forEach((u=>{null==u.id&&(u.id=this.idStrategy.getId()),this.tracked&&(u.properties.createdAt?R(u.properties.createdAt):u.properties.createdAt=+new Date,u.properties.updatedAt?R(u.properties.updatedAt):u.properties.updatedAt=+new Date)}));const Ar=[];fr.forEach((u=>{const fr=u.id;if(Xe&&!Xe(u))throw new Error(`Feature ${fr} is not valid: ${JSON.stringify(u)}`);if(this.has(fr))throw new Error(`Feature already exists with this id: ${fr}`);this.store[fr]=u,Ar.push(fr)})),this.spatialIndex.load(fr),this._onChange(Ar,"create")}search(u,Xe){const fr=this.spatialIndex.search(u).map((u=>this.store[u]));return this.clone(Xe?fr.filter(Xe):fr)}registerOnChange(u){this._onChange=(Xe,fr)=>{u(Xe,fr)}}getGeometryCopy(u){const Xe=this.store[u];if(!Xe)throw new Error(`No feature with this id (${u}), can not get geometry copy`);return this.clone(Xe.geometry)}getPropertiesCopy(u){const Xe=this.store[u];if(!Xe)throw new Error(`No feature with this id (${u}), can not get properties copy`);return this.clone(Xe.properties)}updateProperty(u){const Xe=[];u.forEach((({id:u,property:fr,value:Ar})=>{const _r=this.store[u];if(!_r)throw new Error(`No feature with this (${u}), can not update geometry`);Xe.push(u),_r.properties[fr]=Ar,this.tracked&&(_r.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(Xe,"update")}updateGeometry(u){const Xe=[];u.forEach((({id:u,geometry:fr})=>{Xe.push(u);const Ar=this.store[u];if(!Ar)throw new Error(`No feature with this (${u}), can not update geometry`);Ar.geometry=this.clone(fr),this.spatialIndex.update(Ar),this.tracked&&(Ar.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(Xe,"update")}create(u){const Xe=[];return u.forEach((({geometry:u,properties:fr})=>{let Ar,_r=t({},fr);this.tracked&&(Ar=+new Date,fr?(_r.createdAt="number"==typeof fr.createdAt?fr.createdAt:Ar,_r.updatedAt="number"==typeof fr.updatedAt?fr.updatedAt:Ar):_r={createdAt:Ar,updatedAt:Ar});const wr=this.getId(),Kr={id:wr,type:"Feature",geometry:u,properties:_r};this.store[wr]=Kr,this.spatialIndex.insert(Kr),Xe.push(wr)})),this._onChange&&this._onChange([...Xe],"create"),Xe}delete(u){u.forEach((u=>{if(!this.store[u])throw new Error("No feature with this id, can not delete");delete this.store[u],this.spatialIndex.remove(u)})),this._onChange&&this._onChange([...u],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((u=>this.store[u])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(u){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=u.adapter,this._mode=new Zt;const Xe=new Set,fr=u.modes.reduce(((u,fr)=>{if(Xe.has(fr.mode))throw new Error(`There is already a ${fr.mode} mode provided`);return Xe.add(fr.mode),u[fr.mode]=fr,u}),{}),Ar=Object.keys(fr);if(0===Ar.length)throw new Error("No modes provided");Ar.forEach((u=>{if(fr[u].type===Mo.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=u}})),this._modes=t({},fr,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!u.tracked,idStrategy:u.idStrategy?u.idStrategy:void 0});const s=u=>{const Xe=[],fr=this._store.copyAll().filter((fr=>!u.includes(fr.id)||(Xe.push(fr),!1)));return{changed:Xe,unchanged:fr}},n=(u,Xe)=>{this._enabled&&this._eventListeners.finish.forEach((fr=>{fr(u,Xe)}))},a=(u,Xe)=>{if(!this._enabled)return;this._eventListeners.change.forEach((fr=>{fr(u,Xe)}));const{changed:fr,unchanged:Ar}=s(u);"create"===Xe?this._adapter.render({created:fr,deletedIds:[],unchanged:Ar,updated:[]},this.getModeStyles()):"update"===Xe?this._adapter.render({created:[],deletedIds:[],unchanged:Ar,updated:fr},this.getModeStyles()):"delete"===Xe?this._adapter.render({created:[],deletedIds:u,unchanged:Ar,updated:[]},this.getModeStyles()):"styling"===Xe&&this._adapter.render({created:[],deletedIds:[],unchanged:Ar,updated:[]},this.getModeStyles())},l=u=>{if(!this._enabled)return;this._eventListeners.select.forEach((Xe=>{Xe(u)}));const{changed:Xe,unchanged:fr}=s([u]);this._adapter.render({created:[],deletedIds:[],unchanged:fr,updated:Xe},this.getModeStyles())},h=u=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((u=>{u()}));const{changed:Xe,unchanged:fr}=s([u]);Xe&&this._adapter.render({created:[],deletedIds:[],unchanged:fr,updated:Xe},this.getModeStyles())};Object.keys(this._modes).forEach((u=>{this._modes[u].register({mode:u,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const u={};return Object.keys(this._modes).forEach((Xe=>{u[Xe]=u=>this._instanceSelectMode&&u.properties[Co]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(u):this._modes[Xe].styleFeature.bind(this._modes[Xe])(u)})),u}featuresAtLocation({lng:u,lat:Xe},fr){const Ar=fr&&void 0!==fr.pointerDistance?fr.pointerDistance:30,_r=!fr||void 0===fr.ignoreSelectFeatures||fr.ignoreSelectFeatures,wr=this._adapter.unproject.bind(this._adapter),Kr=this._adapter.project.bind(this._adapter),In=Kr(u,Xe),io=ut({unproject:wr,point:In,pointerDistance:Ar});return this._store.search(io).filter((fr=>{if(_r&&(fr.properties[Io]||fr.properties.selectionPoint))return!1;if("Point"===fr.geometry.type){const u=fr.geometry.coordinates,Xe=Kr(u[0],u[1]);return i$1(In,Xe)<Ar}if("LineString"===fr.geometry.type){const u=fr.geometry.coordinates;for(let Xe=0;Xe<u.length-1;Xe++){const fr=u[Xe],_r=u[Xe+1];if(At(In,Kr(fr[0],fr[1]),Kr(_r[0],_r[1]))<Ar)return!0}return!1}return!!Vt([u,Xe],fr.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(u,Xe){if(this.checkEnabled(),!this._modes[u])throw new Error("No mode with this name present");this._modes[u].styles=Xe}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(u){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(u){if(this.checkEnabled(),!this._modes[u])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[u],this._mode.start()}removeFeatures(u){this.checkEnabled(),this._store.delete(u)}selectFeature(u){this.getSelectMode().selectFeature(u)}deselectFeature(u){this.getSelectMode().deselectFeature(u)}getFeatureId(){return this._store.getId()}hasFeature(u){return this._store.has(u)}addFeatures(u){this.checkEnabled(),0!==u.length&&this._store.load(u,(u=>{if(Boolean(u&&"object"==typeof u&&"properties"in u&&"object"==typeof u.properties&&null!==u.properties&&"mode"in u.properties)){const Xe=this._modes[u.properties.mode];return!!Xe&&Xe.validateFeature.bind(Xe)(u)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((u=>{u()}))},getState:()=>this._mode.state,onClick:u=>{this._mode.onClick(u)},onMouseMove:u=>{this._mode.onMouseMove(u)},onKeyDown:u=>{this._mode.onKeyDown(u)},onKeyUp:u=>{this._mode.onKeyUp(u)},onDragStart:(u,Xe)=>{this._mode.onDragStart(u,Xe)},onDrag:(u,Xe)=>{this._mode.onDrag(u,Xe)},onDragEnd:(u,Xe)=>{this._mode.onDragEnd(u,Xe)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(u,Xe){const{lng:fr,lat:Ar}=u;return this.featuresAtLocation({lng:fr,lat:Ar},Xe)}getFeaturesAtPointerEvent(u,Xe){const fr=this._adapter.getLngLatFromEvent.bind(this._adapter)(u);return null===fr?[]:this.featuresAtLocation(fr,Xe)}stop(){this._enabled=!1,this._adapter.unregister()}on(u,Xe){const fr=this._eventListeners[u];fr.includes(Xe)||fr.push(Xe)}off(u,Xe){const fr=this._eventListeners[u];fr.includes(Xe)&&fr.splice(fr.indexOf(Xe),1)}}class MapOption{constructor({name:u,desc:Xe,example:fr,exampleDesc:Ar,isValid:_r}){this.name=u,this.desc=Xe,this.example=fr,this.exampleDesc=Ar,this.isValid=_r}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(u){if(this._map)throw Error("map cannot be reassigned");this._map=u}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(u,Xe){const fr=this.constructor.validOptions.find((Xe=>Xe.valueOf()===u))?.isValid;if(!fr)throw Error(`Cannot find inValid method for option ${u}`);return fr(Xe)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:u=>!!u?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:u=>window.CSS.supports(`width: ${u}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:u=>window.CSS.supports(`height: ${u}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:u=>{try{const[Xe,fr]=JSON.parse(u);return!isNaN(Xe)&&!isNaN(fr)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:u=>{const Xe=Number(u);return!isNaN(Xe)&&Xe>=0&&Xe<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:u=>"object"==typeof u}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:u=>"true"===u}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:u=>URL.parse(u)&&u.includes("{x}")&&u.includes("{y}")&&u.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:u=>URL.parse(u)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:u=>URL.parse(u)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:u=>"true"===u}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(u){if(u.XYZ){("string"==typeof u.XYZ?[u.XYZ]:u.XYZ).forEach((Xe=>{let fr,Ar;if("string"==typeof Xe)Ar=new URL(Xe),fr={type:"tile",url:Xe,title:`${Ar.host}${Ar.pathname.split("%7B")[0]}`};else{if("object"!=typeof Xe)return;Ar=new URL(Xe.url),fr={type:"tile",url:Xe.url,title:Xe.title?Xe.title:`${Ar.host}${Ar.pathname.split("%7B")[0]}`}}u.data.push(fr)})),delete u.XYZ}u.WMTS&&(u.data.push({type:"wmts",url:u.aliases[u.WMTS]??u.WMTS}),delete u.WMTS),u.GPX&&(u.data.push({type:"gpx",url:u.GPX}),delete u.GPX),"string"==typeof u.center&&Object.prototype.hasOwnProperty.call(u.aliases,u.center)&&(u.center=u.aliases[u.center]),u.data?.forEach((Xe=>{Object.prototype.hasOwnProperty.call(u.aliases,Xe.url)&&(Xe.title=Xe.url,Xe.url=u.aliases[Xe.url])}))}createView({target:u,width:Xe,height:fr}){u.style.width=Xe,u.style.height=fr,"flex"===window.getComputedStyle(u.parentElement).display&&(u.style.flexBasis=`calc(${Xe})`)}setDraw=({target:u,terraDrawAdapter:Xe})=>{const fr=u?.id?u.id+"-":"",Ar={idStrategy:{isValidId:u=>!0,getId:function(){let u=fr+window.crypto.randomUUID();return function(){return u=fr+window.crypto.randomUUID(),u}}()}};return this.terraDraw=((u,Xe={})=>new Se({adapter:u,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...Xe}))(Xe,Ar),((u,Xe,fr={})=>{const Ar=document.createElement("select");u.appendChild(Ar),Ar.name="Draw",Ar.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",Ar.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',Xe.start(),Xe.setMode("render");const _r=u.id?`terra-draw-data-${u.id}`:"terra-draw-data",wr=window.localStorage.getItem(_r);if(wr)try{const u=JSON.parse(wr);u.forEach((u=>u.properties={mode:"render"})),Xe.addFeatures(u)}catch(u){console.warn("Fail to drawn features from Local Storage.",wr,u),window.localStorage.removeItem(_r)}const Kr=u.querySelector("canvas")??u;Ar.onchange=()=>{Ar.children[0].textContent="--STOP--",Kr.style.removeProperty("cursor");const u=Xe.getSnapshot();switch(Ar.value){case"nothing":Xe.setMode("render"),Ar.children[0].textContent="Draw Something";break;case"modify":Xe.setMode("select");break;case"delete":Xe.setMode("render"),Kr.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(_r),Ar.value="nothing",Ar.onchange(),Xe.clear();break;case"features":window.alert(`${u.length} features\n\n${JSON.stringify(u,null,4)}`);break;default:Xe.setMode(Ar.value)}},Xe.on("change",(()=>{})),Xe.on("finish",((u,wr)=>{if("draw"===wr.action){const fr=Xe.getSnapshot().find((Xe=>Xe.id===u));fr&&(Xe.removeFeatures([u]),fr.properties.mode="render",Xe.addFeatures([fr]))}const Kr=fr.idFilter??(()=>!0),In=Xe.getSnapshot().filter(Kr);window.localStorage.setItem(_r,JSON.stringify(In)),"point"!==wr.mode&&"draw"===wr.action&&(Ar.value="nothing",Ar.onchange())})),document.onclick=u=>{if("delete"===Ar.value){const fr=Xe.getFeaturesAtPointerEvent(u,{pointerDistance:40});fr.length>0&&(Xe.removeFeatures([fr[0].id]),0===Xe.getSnapshot().length&&(Ar.value="nothing",Ar.onchange()))}}})(u,this.terraDraw,{idFilter:u=>u.id.startsWith(fr)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(u){const Xe=u.filter((u=>"wmts"===u.type)),fr=u.filter((u=>"tile"===u.type));return Xe.length>0||fr.length>1}propsForEval(){let u=this,Xe=[],fr=[];for(;u!==Object.prototype;)Xe=Xe.concat(Object.getOwnPropertyNames(u)),fr=fr.concat(Object.entries(u)),u=Object.getPrototypeOf(u);return Xe}evalScript(u,Xe=[]){const fr=this.propsForEval(),Ar=Xe.map((([u,Xe])=>u)),_r=[...fr.map((u=>this[u])),...Xe.map((([u,Xe])=>Xe))],wr=Function([...fr,...Ar],u).bind(this,..._r);try{return wr()}catch(u){return console.warn("Fail to run custom script:",u),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(u){return null==u}var ya={isNothing:isNothing,isObject:function isObject(u){return"object"==typeof u&&null!==u},toArray:function toArray(u){return Array.isArray(u)?u:isNothing(u)?[]:[u]},repeat:function repeat(u,Xe){var fr,Ar="";for(fr=0;fr<Xe;fr+=1)Ar+=u;return Ar},isNegativeZero:function isNegativeZero(u){return 0===u&&Number.NEGATIVE_INFINITY===1/u},extend:function extend(u,Xe){var fr,Ar,_r,wr;if(Xe)for(fr=0,Ar=(wr=Object.keys(Xe)).length;fr<Ar;fr+=1)u[_r=wr[fr]]=Xe[_r];return u}};function formatError(u,Xe){var fr="",Ar=u.reason||"(unknown reason)";return u.mark?(u.mark.name&&(fr+='in "'+u.mark.name+'" '),fr+="("+(u.mark.line+1)+":"+(u.mark.column+1)+")",!Xe&&u.mark.snippet&&(fr+="\n\n"+u.mark.snippet),Ar+" "+fr):Ar}function YAMLException$1(u,Xe){Error.call(this),this.name="YAMLException",this.reason=u,this.mark=Xe,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(u){return this.name+": "+formatError(this,u)};var ol=YAMLException$1;function getLine(u,Xe,fr,Ar,_r){var wr="",Kr="",In=Math.floor(_r/2)-1;return Ar-Xe>In&&(Xe=Ar-In+(wr=" ... ").length),fr-Ar>In&&(fr=Ar+In-(Kr=" ...").length),{str:wr+u.slice(Xe,fr).replace(/\t/g,"→")+Kr,pos:Ar-Xe+wr.length}}function padStart(u,Xe){return ya.repeat(" ",Xe-u.length)+u}var sl=function makeSnippet(u,Xe){if(Xe=Object.create(Xe||null),!u.buffer)return null;Xe.maxLength||(Xe.maxLength=79),"number"!=typeof Xe.indent&&(Xe.indent=1),"number"!=typeof Xe.linesBefore&&(Xe.linesBefore=3),"number"!=typeof Xe.linesAfter&&(Xe.linesAfter=2);for(var fr,Ar=/\r?\n|\r|\0/g,_r=[0],wr=[],Kr=-1;fr=Ar.exec(u.buffer);)wr.push(fr.index),_r.push(fr.index+fr[0].length),u.position<=fr.index&&Kr<0&&(Kr=_r.length-2);Kr<0&&(Kr=_r.length-1);var In,io,no="",oo=Math.min(u.line+Xe.linesAfter,wr.length).toString().length,so=Xe.maxLength-(Xe.indent+oo+3);for(In=1;In<=Xe.linesBefore&&!(Kr-In<0);In++)io=getLine(u.buffer,_r[Kr-In],wr[Kr-In],u.position-(_r[Kr]-_r[Kr-In]),so),no=ya.repeat(" ",Xe.indent)+padStart((u.line-In+1).toString(),oo)+" | "+io.str+"\n"+no;for(io=getLine(u.buffer,_r[Kr],wr[Kr],u.position,so),no+=ya.repeat(" ",Xe.indent)+padStart((u.line+1).toString(),oo)+" | "+io.str+"\n",no+=ya.repeat("-",Xe.indent+oo+3+io.pos)+"^\n",In=1;In<=Xe.linesAfter&&!(Kr+In>=wr.length);In++)io=getLine(u.buffer,_r[Kr+In],wr[Kr+In],u.position-(_r[Kr]-_r[Kr+In]),so),no+=ya.repeat(" ",Xe.indent)+padStart((u.line+In+1).toString(),oo)+" | "+io.str+"\n";return no.replace(/\n$/,"")},al=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],cl=["scalar","sequence","mapping"];var hl=function Type$1(u,Xe){if(Xe=Xe||{},Object.keys(Xe).forEach((function(Xe){if(-1===al.indexOf(Xe))throw new ol('Unknown option "'+Xe+'" is met in definition of "'+u+'" YAML type.')})),this.options=Xe,this.tag=u,this.kind=Xe.kind||null,this.resolve=Xe.resolve||function(){return!0},this.construct=Xe.construct||function(u){return u},this.instanceOf=Xe.instanceOf||null,this.predicate=Xe.predicate||null,this.represent=Xe.represent||null,this.representName=Xe.representName||null,this.defaultStyle=Xe.defaultStyle||null,this.multi=Xe.multi||!1,this.styleAliases=function compileStyleAliases(u){var Xe={};return null!==u&&Object.keys(u).forEach((function(fr){u[fr].forEach((function(u){Xe[String(u)]=fr}))})),Xe}(Xe.styleAliases||null),-1===cl.indexOf(this.kind))throw new ol('Unknown kind "'+this.kind+'" is specified for "'+u+'" YAML type.')};function compileList(u,Xe){var fr=[];return u[Xe].forEach((function(u){var Xe=fr.length;fr.forEach((function(fr,Ar){fr.tag===u.tag&&fr.kind===u.kind&&fr.multi===u.multi&&(Xe=Ar)})),fr[Xe]=u})),fr}function Schema$1(u){return this.extend(u)}Schema$1.prototype.extend=function extend(u){var Xe=[],fr=[];if(u instanceof hl)fr.push(u);else if(Array.isArray(u))fr=fr.concat(u);else{if(!u||!Array.isArray(u.implicit)&&!Array.isArray(u.explicit))throw new ol("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");u.implicit&&(Xe=Xe.concat(u.implicit)),u.explicit&&(fr=fr.concat(u.explicit))}Xe.forEach((function(u){if(!(u instanceof hl))throw new ol("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&"scalar"!==u.loadKind)throw new ol("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new ol("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),fr.forEach((function(u){if(!(u instanceof hl))throw new ol("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var Ar=Object.create(Schema$1.prototype);return Ar.implicit=(this.implicit||[]).concat(Xe),Ar.explicit=(this.explicit||[]).concat(fr),Ar.compiledImplicit=compileList(Ar,"implicit"),Ar.compiledExplicit=compileList(Ar,"explicit"),Ar.compiledTypeMap=function compileMap(){var u,Xe,fr={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(u){u.multi?(fr.multi[u.kind].push(u),fr.multi.fallback.push(u)):fr[u.kind][u.tag]=fr.fallback[u.tag]=u}for(u=0,Xe=arguments.length;u<Xe;u+=1)arguments[u].forEach(collectType);return fr}(Ar.compiledImplicit,Ar.compiledExplicit),Ar};var ul=new Schema$1({explicit:[new hl("tag:yaml.org,2002:str",{kind:"scalar",construct:function(u){return null!==u?u:""}}),new hl("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(u){return null!==u?u:[]}}),new hl("tag:yaml.org,2002:map",{kind:"mapping",construct:function(u){return null!==u?u:{}}})]});var dl=new hl("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(u){if(null===u)return!0;var Xe=u.length;return 1===Xe&&"~"===u||4===Xe&&("null"===u||"Null"===u||"NULL"===u)},construct:function constructYamlNull(){return null},predicate:function isNull(u){return null===u},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var pl=new hl("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(u){if(null===u)return!1;var Xe=u.length;return 4===Xe&&("true"===u||"True"===u||"TRUE"===u)||5===Xe&&("false"===u||"False"===u||"FALSE"===u)},construct:function constructYamlBoolean(u){return"true"===u||"True"===u||"TRUE"===u},predicate:function isBoolean(u){return"[object Boolean]"===Object.prototype.toString.call(u)},represent:{lowercase:function(u){return u?"true":"false"},uppercase:function(u){return u?"TRUE":"FALSE"},camelcase:function(u){return u?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(u){return 48<=u&&u<=57||65<=u&&u<=70||97<=u&&u<=102}function isOctCode(u){return 48<=u&&u<=55}function isDecCode(u){return 48<=u&&u<=57}var Cl=new hl("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(u){if(null===u)return!1;var Xe,fr=u.length,Ar=0,_r=!1;if(!fr)return!1;if("-"!==(Xe=u[Ar])&&"+"!==Xe||(Xe=u[++Ar]),"0"===Xe){if(Ar+1===fr)return!0;if("b"===(Xe=u[++Ar])){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if("0"!==Xe&&"1"!==Xe)return!1;_r=!0}return _r&&"_"!==Xe}if("x"===Xe){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isHexCode(u.charCodeAt(Ar)))return!1;_r=!0}return _r&&"_"!==Xe}if("o"===Xe){for(Ar++;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isOctCode(u.charCodeAt(Ar)))return!1;_r=!0}return _r&&"_"!==Xe}}if("_"===Xe)return!1;for(;Ar<fr;Ar++)if("_"!==(Xe=u[Ar])){if(!isDecCode(u.charCodeAt(Ar)))return!1;_r=!0}return!(!_r||"_"===Xe)},construct:function constructYamlInteger(u){var Xe,fr=u,Ar=1;if(-1!==fr.indexOf("_")&&(fr=fr.replace(/_/g,"")),"-"!==(Xe=fr[0])&&"+"!==Xe||("-"===Xe&&(Ar=-1),Xe=(fr=fr.slice(1))[0]),"0"===fr)return 0;if("0"===Xe){if("b"===fr[1])return Ar*parseInt(fr.slice(2),2);if("x"===fr[1])return Ar*parseInt(fr.slice(2),16);if("o"===fr[1])return Ar*parseInt(fr.slice(2),8)}return Ar*parseInt(fr,10)},predicate:function isInteger(u){return"[object Number]"===Object.prototype.toString.call(u)&&u%1==0&&!ya.isNegativeZero(u)},represent:{binary:function(u){return u>=0?"0b"+u.toString(2):"-0b"+u.toString(2).slice(1)},octal:function(u){return u>=0?"0o"+u.toString(8):"-0o"+u.toString(8).slice(1)},decimal:function(u){return u.toString(10)},hexadecimal:function(u){return u>=0?"0x"+u.toString(16).toUpperCase():"-0x"+u.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),fl=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var _l=/^[-+]?[0-9]+e/;var vl=new hl("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(u){return null!==u&&!(!fl.test(u)||"_"===u[u.length-1])},construct:function constructYamlFloat(u){var Xe,fr;return fr="-"===(Xe=u.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(Xe[0])>=0&&(Xe=Xe.slice(1)),".inf"===Xe?1===fr?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===Xe?NaN:fr*parseFloat(Xe,10)},predicate:function isFloat(u){return"[object Number]"===Object.prototype.toString.call(u)&&(u%1!=0||ya.isNegativeZero(u))},represent:function representYamlFloat(u,Xe){var fr;if(isNaN(u))switch(Xe){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===u)switch(Xe){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===u)switch(Xe){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ya.isNegativeZero(u))return"-0.0";return fr=u.toString(10),_l.test(fr)?fr.replace("e",".e"):fr},defaultStyle:"lowercase"}),xl=ul.extend({implicit:[dl,pl,Cl,vl]}),Sl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kl=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Bl=new hl("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(u){return null!==u&&(null!==Sl.exec(u)||null!==kl.exec(u))},construct:function constructYamlTimestamp(u){var Xe,fr,Ar,_r,wr,Kr,In,io,no=0,oo=null;if(null===(Xe=Sl.exec(u))&&(Xe=kl.exec(u)),null===Xe)throw new Error("Date resolve error");if(fr=+Xe[1],Ar=+Xe[2]-1,_r=+Xe[3],!Xe[4])return new Date(Date.UTC(fr,Ar,_r));if(wr=+Xe[4],Kr=+Xe[5],In=+Xe[6],Xe[7]){for(no=Xe[7].slice(0,3);no.length<3;)no+="0";no=+no}return Xe[9]&&(oo=6e4*(60*+Xe[10]+ +(Xe[11]||0)),"-"===Xe[9]&&(oo=-oo)),io=new Date(Date.UTC(fr,Ar,_r,wr,Kr,In,no)),oo&&io.setTime(io.getTime()-oo),io},instanceOf:Date,represent:function representYamlTimestamp(u){return u.toISOString()}});var Zl=new hl("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(u){return"<<"===u||null===u}}),Rl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Wl=new hl("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(u){if(null===u)return!1;var Xe,fr,Ar=0,_r=u.length,wr=Rl;for(fr=0;fr<_r;fr++)if(!((Xe=wr.indexOf(u.charAt(fr)))>64)){if(Xe<0)return!1;Ar+=6}return Ar%8==0},construct:function constructYamlBinary(u){var Xe,fr,Ar=u.replace(/[\r\n=]/g,""),_r=Ar.length,wr=Rl,Kr=0,In=[];for(Xe=0;Xe<_r;Xe++)Xe%4==0&&Xe&&(In.push(Kr>>16&255),In.push(Kr>>8&255),In.push(255&Kr)),Kr=Kr<<6|wr.indexOf(Ar.charAt(Xe));return 0===(fr=_r%4*6)?(In.push(Kr>>16&255),In.push(Kr>>8&255),In.push(255&Kr)):18===fr?(In.push(Kr>>10&255),In.push(Kr>>2&255)):12===fr&&In.push(Kr>>4&255),new Uint8Array(In)},predicate:function isBinary(u){return"[object Uint8Array]"===Object.prototype.toString.call(u)},represent:function representYamlBinary(u){var Xe,fr,Ar="",_r=0,wr=u.length,Kr=Rl;for(Xe=0;Xe<wr;Xe++)Xe%3==0&&Xe&&(Ar+=Kr[_r>>18&63],Ar+=Kr[_r>>12&63],Ar+=Kr[_r>>6&63],Ar+=Kr[63&_r]),_r=(_r<<8)+u[Xe];return 0===(fr=wr%3)?(Ar+=Kr[_r>>18&63],Ar+=Kr[_r>>12&63],Ar+=Kr[_r>>6&63],Ar+=Kr[63&_r]):2===fr?(Ar+=Kr[_r>>10&63],Ar+=Kr[_r>>4&63],Ar+=Kr[_r<<2&63],Ar+=Kr[64]):1===fr&&(Ar+=Kr[_r>>2&63],Ar+=Kr[_r<<4&63],Ar+=Kr[64],Ar+=Kr[64]),Ar}}),Tl=Object.prototype.hasOwnProperty,Jl=Object.prototype.toString;var Kl=new hl("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(u){if(null===u)return!0;var Xe,fr,Ar,_r,wr,Kr=[],In=u;for(Xe=0,fr=In.length;Xe<fr;Xe+=1){if(Ar=In[Xe],wr=!1,"[object Object]"!==Jl.call(Ar))return!1;for(_r in Ar)if(Tl.call(Ar,_r)){if(wr)return!1;wr=!0}if(!wr)return!1;if(-1!==Kr.indexOf(_r))return!1;Kr.push(_r)}return!0},construct:function constructYamlOmap(u){return null!==u?u:[]}}),Ll=Object.prototype.toString;var Dl=new hl("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(u){if(null===u)return!0;var Xe,fr,Ar,_r,wr,Kr=u;for(wr=new Array(Kr.length),Xe=0,fr=Kr.length;Xe<fr;Xe+=1){if(Ar=Kr[Xe],"[object Object]"!==Ll.call(Ar))return!1;if(1!==(_r=Object.keys(Ar)).length)return!1;wr[Xe]=[_r[0],Ar[_r[0]]]}return!0},construct:function constructYamlPairs(u){if(null===u)return[];var Xe,fr,Ar,_r,wr,Kr=u;for(wr=new Array(Kr.length),Xe=0,fr=Kr.length;Xe<fr;Xe+=1)Ar=Kr[Xe],_r=Object.keys(Ar),wr[Xe]=[_r[0],Ar[_r[0]]];return wr}}),Yl=Object.prototype.hasOwnProperty;var Nl=new hl("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(u){if(null===u)return!0;var Xe,fr=u;for(Xe in fr)if(Yl.call(fr,Xe)&&null!==fr[Xe])return!1;return!0},construct:function constructYamlSet(u){return null!==u?u:{}}}),Ol=xl.extend({implicit:[Bl,Zl],explicit:[Wl,Kl,Dl,Nl]}),jl=Object.prototype.hasOwnProperty,Ql=1,ql=2,$l=3,ec=4,rc=1,nc=2,oc=3,ac=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,dc=/[\x85\u2028\u2029]/,mc=/[,\[\]\{\}]/,Ic=/^(?:!|!!|![a-z\-]+!)$/i,yc=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(u){return Object.prototype.toString.call(u)}function is_EOL(u){return 10===u||13===u}function is_WHITE_SPACE(u){return 9===u||32===u}function is_WS_OR_EOL(u){return 9===u||32===u||10===u||13===u}function is_FLOW_INDICATOR(u){return 44===u||91===u||93===u||123===u||125===u}function fromHexCode(u){var Xe;return 48<=u&&u<=57?u-48:97<=(Xe=32|u)&&Xe<=102?Xe-97+10:-1}function escapedHexLen(u){return 120===u?2:117===u?4:85===u?8:0}function fromDecimalCode(u){return 48<=u&&u<=57?u-48:-1}function simpleEscapeSequence(u){return 48===u?"\0":97===u?"":98===u?"\b":116===u||9===u?"\t":110===u?"\n":118===u?"\v":102===u?"\f":114===u?"\r":101===u?"":32===u?" ":34===u?'"':47===u?"/":92===u?"\\":78===u?"…":95===u?" ":76===u?"\u2028":80===u?"\u2029":""}function charFromCodepoint(u){return u<=65535?String.fromCharCode(u):String.fromCharCode(55296+(u-65536>>10),56320+(u-65536&1023))}for(var Ac=new Array(256),bc=new Array(256),_c=0;_c<256;_c++)Ac[_c]=simpleEscapeSequence(_c)?1:0,bc[_c]=simpleEscapeSequence(_c);function State$1(u,Xe){this.input=u,this.filename=Xe.filename||null,this.schema=Xe.schema||Ol,this.onWarning=Xe.onWarning||null,this.legacy=Xe.legacy||!1,this.json=Xe.json||!1,this.listener=Xe.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(u,Xe){var fr={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return fr.snippet=sl(fr),new ol(Xe,fr)}function throwError(u,Xe){throw generateError(u,Xe)}function throwWarning(u,Xe){u.onWarning&&u.onWarning.call(null,generateError(u,Xe))}var vc={YAML:function handleYamlDirective(u,Xe,fr){var Ar,_r,wr;null!==u.version&&throwError(u,"duplication of %YAML directive"),1!==fr.length&&throwError(u,"YAML directive accepts exactly one argument"),null===(Ar=/^([0-9]+)\.([0-9]+)$/.exec(fr[0]))&&throwError(u,"ill-formed argument of the YAML directive"),_r=parseInt(Ar[1],10),wr=parseInt(Ar[2],10),1!==_r&&throwError(u,"unacceptable YAML version of the document"),u.version=fr[0],u.checkLineBreaks=wr<2,1!==wr&&2!==wr&&throwWarning(u,"unsupported YAML version of the document")},TAG:function handleTagDirective(u,Xe,fr){var Ar,_r;2!==fr.length&&throwError(u,"TAG directive accepts exactly two arguments"),Ar=fr[0],_r=fr[1],Ic.test(Ar)||throwError(u,"ill-formed tag handle (first argument) of the TAG directive"),jl.call(u.tagMap,Ar)&&throwError(u,'there is a previously declared suffix for "'+Ar+'" tag handle'),yc.test(_r)||throwError(u,"ill-formed tag prefix (second argument) of the TAG directive");try{_r=decodeURIComponent(_r)}catch(Xe){throwError(u,"tag prefix is malformed: "+_r)}u.tagMap[Ar]=_r}};function captureSegment(u,Xe,fr,Ar){var _r,wr,Kr,In;if(Xe<fr){if(In=u.input.slice(Xe,fr),Ar)for(_r=0,wr=In.length;_r<wr;_r+=1)9===(Kr=In.charCodeAt(_r))||32<=Kr&&Kr<=1114111||throwError(u,"expected valid JSON character");else ac.test(In)&&throwError(u,"the stream contains non-printable characters");u.result+=In}}function mergeMappings(u,Xe,fr,Ar){var _r,wr,Kr,In;for(ya.isObject(fr)||throwError(u,"cannot merge mappings; the provided source object is unacceptable"),Kr=0,In=(_r=Object.keys(fr)).length;Kr<In;Kr+=1)wr=_r[Kr],jl.call(Xe,wr)||(Xe[wr]=fr[wr],Ar[wr]=!0)}function storeMappingPair(u,Xe,fr,Ar,_r,wr,Kr,In,io){var no,oo;if(Array.isArray(_r))for(no=0,oo=(_r=Array.prototype.slice.call(_r)).length;no<oo;no+=1)Array.isArray(_r[no])&&throwError(u,"nested arrays are not supported inside keys"),"object"==typeof _r&&"[object Object]"===_class(_r[no])&&(_r[no]="[object Object]");if("object"==typeof _r&&"[object Object]"===_class(_r)&&(_r="[object Object]"),_r=String(_r),null===Xe&&(Xe={}),"tag:yaml.org,2002:merge"===Ar)if(Array.isArray(wr))for(no=0,oo=wr.length;no<oo;no+=1)mergeMappings(u,Xe,wr[no],fr);else mergeMappings(u,Xe,wr,fr);else u.json||jl.call(fr,_r)||!jl.call(Xe,_r)||(u.line=Kr||u.line,u.lineStart=In||u.lineStart,u.position=io||u.position,throwError(u,"duplicated mapping key")),"__proto__"===_r?Object.defineProperty(Xe,_r,{configurable:!0,enumerable:!0,writable:!0,value:wr}):Xe[_r]=wr,delete fr[_r];return Xe}function readLineBreak(u){var Xe;10===(Xe=u.input.charCodeAt(u.position))?u.position++:13===Xe?(u.position++,10===u.input.charCodeAt(u.position)&&u.position++):throwError(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function skipSeparationSpace(u,Xe,fr){for(var Ar=0,_r=u.input.charCodeAt(u.position);0!==_r;){for(;is_WHITE_SPACE(_r);)9===_r&&-1===u.firstTabInLine&&(u.firstTabInLine=u.position),_r=u.input.charCodeAt(++u.position);if(Xe&&35===_r)do{_r=u.input.charCodeAt(++u.position)}while(10!==_r&&13!==_r&&0!==_r);if(!is_EOL(_r))break;for(readLineBreak(u),_r=u.input.charCodeAt(u.position),Ar++,u.lineIndent=0;32===_r;)u.lineIndent++,_r=u.input.charCodeAt(++u.position)}return-1!==fr&&0!==Ar&&u.lineIndent<fr&&throwWarning(u,"deficient indentation"),Ar}function testDocumentSeparator(u){var Xe,fr=u.position;return!(45!==(Xe=u.input.charCodeAt(fr))&&46!==Xe||Xe!==u.input.charCodeAt(fr+1)||Xe!==u.input.charCodeAt(fr+2)||(fr+=3,0!==(Xe=u.input.charCodeAt(fr))&&!is_WS_OR_EOL(Xe)))}function writeFoldedLines(u,Xe){1===Xe?u.result+=" ":Xe>1&&(u.result+=ya.repeat("\n",Xe-1))}function readBlockSequence(u,Xe){var fr,Ar,_r=u.tag,wr=u.anchor,Kr=[],In=!1;if(-1!==u.firstTabInLine)return!1;for(null!==u.anchor&&(u.anchorMap[u.anchor]=Kr),Ar=u.input.charCodeAt(u.position);0!==Ar&&(-1!==u.firstTabInLine&&(u.position=u.firstTabInLine,throwError(u,"tab characters must not be used in indentation")),45===Ar)&&is_WS_OR_EOL(u.input.charCodeAt(u.position+1));)if(In=!0,u.position++,skipSeparationSpace(u,!0,-1)&&u.lineIndent<=Xe)Kr.push(null),Ar=u.input.charCodeAt(u.position);else if(fr=u.line,composeNode(u,Xe,$l,!1,!0),Kr.push(u.result),skipSeparationSpace(u,!0,-1),Ar=u.input.charCodeAt(u.position),(u.line===fr||u.lineIndent>Xe)&&0!==Ar)throwError(u,"bad indentation of a sequence entry");else if(u.lineIndent<Xe)break;return!!In&&(u.tag=_r,u.anchor=wr,u.kind="sequence",u.result=Kr,!0)}function readTagProperty(u){var Xe,fr,Ar,_r,wr=!1,Kr=!1;if(33!==(_r=u.input.charCodeAt(u.position)))return!1;if(null!==u.tag&&throwError(u,"duplication of a tag property"),60===(_r=u.input.charCodeAt(++u.position))?(wr=!0,_r=u.input.charCodeAt(++u.position)):33===_r?(Kr=!0,fr="!!",_r=u.input.charCodeAt(++u.position)):fr="!",Xe=u.position,wr){do{_r=u.input.charCodeAt(++u.position)}while(0!==_r&&62!==_r);u.position<u.length?(Ar=u.input.slice(Xe,u.position),_r=u.input.charCodeAt(++u.position)):throwError(u,"unexpected end of the stream within a verbatim tag")}else{for(;0!==_r&&!is_WS_OR_EOL(_r);)33===_r&&(Kr?throwError(u,"tag suffix cannot contain exclamation marks"):(fr=u.input.slice(Xe-1,u.position+1),Ic.test(fr)||throwError(u,"named tag handle cannot contain such characters"),Kr=!0,Xe=u.position+1)),_r=u.input.charCodeAt(++u.position);Ar=u.input.slice(Xe,u.position),mc.test(Ar)&&throwError(u,"tag suffix cannot contain flow indicator characters")}Ar&&!yc.test(Ar)&&throwError(u,"tag name cannot contain such characters: "+Ar);try{Ar=decodeURIComponent(Ar)}catch(Xe){throwError(u,"tag name is malformed: "+Ar)}return wr?u.tag=Ar:jl.call(u.tagMap,fr)?u.tag=u.tagMap[fr]+Ar:"!"===fr?u.tag="!"+Ar:"!!"===fr?u.tag="tag:yaml.org,2002:"+Ar:throwError(u,'undeclared tag handle "'+fr+'"'),!0}function readAnchorProperty(u){var Xe,fr;if(38!==(fr=u.input.charCodeAt(u.position)))return!1;for(null!==u.anchor&&throwError(u,"duplication of an anchor property"),fr=u.input.charCodeAt(++u.position),Xe=u.position;0!==fr&&!is_WS_OR_EOL(fr)&&!is_FLOW_INDICATOR(fr);)fr=u.input.charCodeAt(++u.position);return u.position===Xe&&throwError(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(Xe,u.position),!0}function composeNode(u,Xe,fr,Ar,_r){var wr,Kr,In,io,no,oo,so,ao,co,go=1,ho=!1,Co=!1;if(null!==u.listener&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null,wr=Kr=In=ec===fr||$l===fr,Ar&&skipSeparationSpace(u,!0,-1)&&(ho=!0,u.lineIndent>Xe?go=1:u.lineIndent===Xe?go=0:u.lineIndent<Xe&&(go=-1)),1===go)for(;readTagProperty(u)||readAnchorProperty(u);)skipSeparationSpace(u,!0,-1)?(ho=!0,In=wr,u.lineIndent>Xe?go=1:u.lineIndent===Xe?go=0:u.lineIndent<Xe&&(go=-1)):In=!1;if(In&&(In=ho||_r),1!==go&&ec!==fr||(ao=Ql===fr||ql===fr?Xe:Xe+1,co=u.position-u.lineStart,1===go?In&&(readBlockSequence(u,co)||function readBlockMapping(u,Xe,fr){var Ar,_r,wr,Kr,In,io,no,oo=u.tag,so=u.anchor,ao={},co=Object.create(null),go=null,ho=null,Co=null,Io=!1,xo=!1;if(-1!==u.firstTabInLine)return!1;for(null!==u.anchor&&(u.anchorMap[u.anchor]=ao),no=u.input.charCodeAt(u.position);0!==no;){if(Io||-1===u.firstTabInLine||(u.position=u.firstTabInLine,throwError(u,"tab characters must not be used in indentation")),Ar=u.input.charCodeAt(u.position+1),wr=u.line,63!==no&&58!==no||!is_WS_OR_EOL(Ar)){if(Kr=u.line,In=u.lineStart,io=u.position,!composeNode(u,fr,ql,!1,!0))break;if(u.line===wr){for(no=u.input.charCodeAt(u.position);is_WHITE_SPACE(no);)no=u.input.charCodeAt(++u.position);if(58===no)is_WS_OR_EOL(no=u.input.charCodeAt(++u.position))||throwError(u,"a whitespace character is expected after the key-value separator within a block mapping"),Io&&(storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),go=ho=Co=null),xo=!0,Io=!1,_r=!1,go=u.tag,ho=u.result;else{if(!xo)return u.tag=oo,u.anchor=so,!0;throwError(u,"can not read an implicit mapping pair; a colon is missed")}}else{if(!xo)return u.tag=oo,u.anchor=so,!0;throwError(u,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===no?(Io&&(storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),go=ho=Co=null),xo=!0,Io=!0,_r=!0):Io?(Io=!1,_r=!0):throwError(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,no=Ar;if((u.line===wr||u.lineIndent>Xe)&&(Io&&(Kr=u.line,In=u.lineStart,io=u.position),composeNode(u,Xe,ec,!0,_r)&&(Io?ho=u.result:Co=u.result),Io||(storeMappingPair(u,ao,co,go,ho,Co,Kr,In,io),go=ho=Co=null),skipSeparationSpace(u,!0,-1),no=u.input.charCodeAt(u.position)),(u.line===wr||u.lineIndent>Xe)&&0!==no)throwError(u,"bad indentation of a mapping entry");else if(u.lineIndent<Xe)break}return Io&&storeMappingPair(u,ao,co,go,ho,null,Kr,In,io),xo&&(u.tag=oo,u.anchor=so,u.kind="mapping",u.result=ao),xo}(u,co,ao))||function readFlowCollection(u,Xe){var fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go=!0,ho=u.tag,Co=u.anchor,Io=Object.create(null);if(91===(co=u.input.charCodeAt(u.position)))Kr=93,no=!1,wr=[];else{if(123!==co)return!1;Kr=125,no=!0,wr={}}for(null!==u.anchor&&(u.anchorMap[u.anchor]=wr),co=u.input.charCodeAt(++u.position);0!==co;){if(skipSeparationSpace(u,!0,Xe),(co=u.input.charCodeAt(u.position))===Kr)return u.position++,u.tag=ho,u.anchor=Co,u.kind=no?"mapping":"sequence",u.result=wr,!0;go?44===co&&throwError(u,"expected the node content, but found ','"):throwError(u,"missed comma between flow collection entries"),ao=null,In=io=!1,63===co&&is_WS_OR_EOL(u.input.charCodeAt(u.position+1))&&(In=io=!0,u.position++,skipSeparationSpace(u,!0,Xe)),fr=u.line,Ar=u.lineStart,_r=u.position,composeNode(u,Xe,Ql,!1,!0),so=u.tag,oo=u.result,skipSeparationSpace(u,!0,Xe),co=u.input.charCodeAt(u.position),!io&&u.line!==fr||58!==co||(In=!0,co=u.input.charCodeAt(++u.position),skipSeparationSpace(u,!0,Xe),composeNode(u,Xe,Ql,!1,!0),ao=u.result),no?storeMappingPair(u,wr,Io,so,oo,ao,fr,Ar,_r):In?wr.push(storeMappingPair(u,null,Io,so,oo,ao,fr,Ar,_r)):wr.push(oo),skipSeparationSpace(u,!0,Xe),44===(co=u.input.charCodeAt(u.position))?(go=!0,co=u.input.charCodeAt(++u.position)):go=!1}throwError(u,"unexpected end of the stream within a flow collection")}(u,ao)?Co=!0:(Kr&&function readBlockScalar(u,Xe){var fr,Ar,_r,wr,Kr=rc,In=!1,io=!1,no=Xe,oo=0,so=!1;if(124===(wr=u.input.charCodeAt(u.position)))Ar=!1;else{if(62!==wr)return!1;Ar=!0}for(u.kind="scalar",u.result="";0!==wr;)if(43===(wr=u.input.charCodeAt(++u.position))||45===wr)rc===Kr?Kr=43===wr?oc:nc:throwError(u,"repeat of a chomping mode identifier");else{if(!((_r=fromDecimalCode(wr))>=0))break;0===_r?throwError(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):io?throwError(u,"repeat of an indentation width identifier"):(no=Xe+_r-1,io=!0)}if(is_WHITE_SPACE(wr)){do{wr=u.input.charCodeAt(++u.position)}while(is_WHITE_SPACE(wr));if(35===wr)do{wr=u.input.charCodeAt(++u.position)}while(!is_EOL(wr)&&0!==wr)}for(;0!==wr;){for(readLineBreak(u),u.lineIndent=0,wr=u.input.charCodeAt(u.position);(!io||u.lineIndent<no)&&32===wr;)u.lineIndent++,wr=u.input.charCodeAt(++u.position);if(!io&&u.lineIndent>no&&(no=u.lineIndent),is_EOL(wr))oo++;else{if(u.lineIndent<no){Kr===oc?u.result+=ya.repeat("\n",In?1+oo:oo):Kr===rc&&In&&(u.result+="\n");break}for(Ar?is_WHITE_SPACE(wr)?(so=!0,u.result+=ya.repeat("\n",In?1+oo:oo)):so?(so=!1,u.result+=ya.repeat("\n",oo+1)):0===oo?In&&(u.result+=" "):u.result+=ya.repeat("\n",oo):u.result+=ya.repeat("\n",In?1+oo:oo),In=!0,io=!0,oo=0,fr=u.position;!is_EOL(wr)&&0!==wr;)wr=u.input.charCodeAt(++u.position);captureSegment(u,fr,u.position,!1)}}return!0}(u,ao)||function readSingleQuotedScalar(u,Xe){var fr,Ar,_r;if(39!==(fr=u.input.charCodeAt(u.position)))return!1;for(u.kind="scalar",u.result="",u.position++,Ar=_r=u.position;0!==(fr=u.input.charCodeAt(u.position));)if(39===fr){if(captureSegment(u,Ar,u.position,!0),39!==(fr=u.input.charCodeAt(++u.position)))return!0;Ar=u.position,u.position++,_r=u.position}else is_EOL(fr)?(captureSegment(u,Ar,_r,!0),writeFoldedLines(u,skipSeparationSpace(u,!1,Xe)),Ar=_r=u.position):u.position===u.lineStart&&testDocumentSeparator(u)?throwError(u,"unexpected end of the document within a single quoted scalar"):(u.position++,_r=u.position);throwError(u,"unexpected end of the stream within a single quoted scalar")}(u,ao)||function readDoubleQuotedScalar(u,Xe){var fr,Ar,_r,wr,Kr,In;if(34!==(In=u.input.charCodeAt(u.position)))return!1;for(u.kind="scalar",u.result="",u.position++,fr=Ar=u.position;0!==(In=u.input.charCodeAt(u.position));){if(34===In)return captureSegment(u,fr,u.position,!0),u.position++,!0;if(92===In){if(captureSegment(u,fr,u.position,!0),is_EOL(In=u.input.charCodeAt(++u.position)))skipSeparationSpace(u,!1,Xe);else if(In<256&&Ac[In])u.result+=bc[In],u.position++;else if((Kr=escapedHexLen(In))>0){for(_r=Kr,wr=0;_r>0;_r--)(Kr=fromHexCode(In=u.input.charCodeAt(++u.position)))>=0?wr=(wr<<4)+Kr:throwError(u,"expected hexadecimal character");u.result+=charFromCodepoint(wr),u.position++}else throwError(u,"unknown escape sequence");fr=Ar=u.position}else is_EOL(In)?(captureSegment(u,fr,Ar,!0),writeFoldedLines(u,skipSeparationSpace(u,!1,Xe)),fr=Ar=u.position):u.position===u.lineStart&&testDocumentSeparator(u)?throwError(u,"unexpected end of the document within a double quoted scalar"):(u.position++,Ar=u.position)}throwError(u,"unexpected end of the stream within a double quoted scalar")}(u,ao)?Co=!0:!function readAlias(u){var Xe,fr,Ar;if(42!==(Ar=u.input.charCodeAt(u.position)))return!1;for(Ar=u.input.charCodeAt(++u.position),Xe=u.position;0!==Ar&&!is_WS_OR_EOL(Ar)&&!is_FLOW_INDICATOR(Ar);)Ar=u.input.charCodeAt(++u.position);return u.position===Xe&&throwError(u,"name of an alias node must contain at least one character"),fr=u.input.slice(Xe,u.position),jl.call(u.anchorMap,fr)||throwError(u,'unidentified alias "'+fr+'"'),u.result=u.anchorMap[fr],skipSeparationSpace(u,!0,-1),!0}(u)?function readPlainScalar(u,Xe,fr){var Ar,_r,wr,Kr,In,io,no,oo,so=u.kind,ao=u.result;if(is_WS_OR_EOL(oo=u.input.charCodeAt(u.position))||is_FLOW_INDICATOR(oo)||35===oo||38===oo||42===oo||33===oo||124===oo||62===oo||39===oo||34===oo||37===oo||64===oo||96===oo)return!1;if((63===oo||45===oo)&&(is_WS_OR_EOL(Ar=u.input.charCodeAt(u.position+1))||fr&&is_FLOW_INDICATOR(Ar)))return!1;for(u.kind="scalar",u.result="",_r=wr=u.position,Kr=!1;0!==oo;){if(58===oo){if(is_WS_OR_EOL(Ar=u.input.charCodeAt(u.position+1))||fr&&is_FLOW_INDICATOR(Ar))break}else if(35===oo){if(is_WS_OR_EOL(u.input.charCodeAt(u.position-1)))break}else{if(u.position===u.lineStart&&testDocumentSeparator(u)||fr&&is_FLOW_INDICATOR(oo))break;if(is_EOL(oo)){if(In=u.line,io=u.lineStart,no=u.lineIndent,skipSeparationSpace(u,!1,-1),u.lineIndent>=Xe){Kr=!0,oo=u.input.charCodeAt(u.position);continue}u.position=wr,u.line=In,u.lineStart=io,u.lineIndent=no;break}}Kr&&(captureSegment(u,_r,wr,!1),writeFoldedLines(u,u.line-In),_r=wr=u.position,Kr=!1),is_WHITE_SPACE(oo)||(wr=u.position+1),oo=u.input.charCodeAt(++u.position)}return captureSegment(u,_r,wr,!1),!!u.result||(u.kind=so,u.result=ao,!1)}(u,ao,Ql===fr)&&(Co=!0,null===u.tag&&(u.tag="?")):(Co=!0,null===u.tag&&null===u.anchor||throwError(u,"alias node should not have any properties")),null!==u.anchor&&(u.anchorMap[u.anchor]=u.result)):0===go&&(Co=In&&readBlockSequence(u,co))),null===u.tag)null!==u.anchor&&(u.anchorMap[u.anchor]=u.result);else if("?"===u.tag){for(null!==u.result&&"scalar"!==u.kind&&throwError(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"'),io=0,no=u.implicitTypes.length;io<no;io+=1)if((so=u.implicitTypes[io]).resolve(u.result)){u.result=so.construct(u.result),u.tag=so.tag,null!==u.anchor&&(u.anchorMap[u.anchor]=u.result);break}}else if("!"!==u.tag){if(jl.call(u.typeMap[u.kind||"fallback"],u.tag))so=u.typeMap[u.kind||"fallback"][u.tag];else for(so=null,io=0,no=(oo=u.typeMap.multi[u.kind||"fallback"]).length;io<no;io+=1)if(u.tag.slice(0,oo[io].tag.length)===oo[io].tag){so=oo[io];break}so||throwError(u,"unknown tag !<"+u.tag+">"),null!==u.result&&so.kind!==u.kind&&throwError(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+so.kind+'", not "'+u.kind+'"'),so.resolve(u.result,u.tag)?(u.result=so.construct(u.result,u.tag),null!==u.anchor&&(u.anchorMap[u.anchor]=u.result)):throwError(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return null!==u.listener&&u.listener("close",u),null!==u.tag||null!==u.anchor||Co}function readDocument(u){var Xe,fr,Ar,_r,wr=u.position,Kr=!1;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);0!==(_r=u.input.charCodeAt(u.position))&&(skipSeparationSpace(u,!0,-1),_r=u.input.charCodeAt(u.position),!(u.lineIndent>0||37!==_r));){for(Kr=!0,_r=u.input.charCodeAt(++u.position),Xe=u.position;0!==_r&&!is_WS_OR_EOL(_r);)_r=u.input.charCodeAt(++u.position);for(Ar=[],(fr=u.input.slice(Xe,u.position)).length<1&&throwError(u,"directive name must not be less than one character in length");0!==_r;){for(;is_WHITE_SPACE(_r);)_r=u.input.charCodeAt(++u.position);if(35===_r){do{_r=u.input.charCodeAt(++u.position)}while(0!==_r&&!is_EOL(_r));break}if(is_EOL(_r))break;for(Xe=u.position;0!==_r&&!is_WS_OR_EOL(_r);)_r=u.input.charCodeAt(++u.position);Ar.push(u.input.slice(Xe,u.position))}0!==_r&&readLineBreak(u),jl.call(vc,fr)?vc[fr](u,fr,Ar):throwWarning(u,'unknown document directive "'+fr+'"')}skipSeparationSpace(u,!0,-1),0===u.lineIndent&&45===u.input.charCodeAt(u.position)&&45===u.input.charCodeAt(u.position+1)&&45===u.input.charCodeAt(u.position+2)?(u.position+=3,skipSeparationSpace(u,!0,-1)):Kr&&throwError(u,"directives end mark is expected"),composeNode(u,u.lineIndent-1,ec,!1,!0),skipSeparationSpace(u,!0,-1),u.checkLineBreaks&&dc.test(u.input.slice(wr,u.position))&&throwWarning(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&testDocumentSeparator(u)?46===u.input.charCodeAt(u.position)&&(u.position+=3,skipSeparationSpace(u,!0,-1)):u.position<u.length-1&&throwError(u,"end of the stream or a document separator is expected")}function loadDocuments(u,Xe){Xe=Xe||{},0!==(u=String(u)).length&&(10!==u.charCodeAt(u.length-1)&&13!==u.charCodeAt(u.length-1)&&(u+="\n"),65279===u.charCodeAt(0)&&(u=u.slice(1)));var fr=new State$1(u,Xe),Ar=u.indexOf("\0");for(-1!==Ar&&(fr.position=Ar,throwError(fr,"null byte is not allowed in input")),fr.input+="\0";32===fr.input.charCodeAt(fr.position);)fr.lineIndent+=1,fr.position+=1;for(;fr.position<fr.length-1;)readDocument(fr);return fr.documents}var Pc={loadAll:function loadAll$1(u,Xe,fr){null!==Xe&&"object"==typeof Xe&&void 0===fr&&(fr=Xe,Xe=null);var Ar=loadDocuments(u,fr);if("function"!=typeof Xe)return Ar;for(var _r=0,wr=Ar.length;_r<wr;_r+=1)Xe(Ar[_r])},load:function load$1(u,Xe){var fr=loadDocuments(u,Xe);if(0!==fr.length){if(1===fr.length)return fr[0];throw new ol("expected a single document in the stream, but found more")}}},tg=Pc.load,eg=Pc.loadAll;const ig=new URL("./",import.meta.url),rg=Object.freeze({use:{Leaflet:{value:ig+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:ig+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:ig+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=u=>({use:u.use??"Leaflet",width:"100%",...u,aliases:{...rg,...u.aliases??{}}}),ng={},setValueByAliases=u=>u.aliases?(Object.entries(u).filter((([u,Xe])=>"aliases"!==u&&"string"==typeof Xe&&Xe.match(/^[A-Z]/))).forEach((([Xe,fr])=>{const Ar=u.aliases?.[Xe]?.[fr],_r="object"!=typeof Ar||Array.isArray(Ar)?Ar:Ar.value;_r&&(u[Xe]=_r,"use"===Xe&&(u.url=Ar.url,u.desc=Ar.desc))})),u):u,applyOtherConfig=async u=>{if(!u.apply)return u;await(async u=>{u&&!ng[u]&&(ng[u]=await fetch(u).then((u=>{if(200!==u.status)throw Error();return u.text()})).then((u=>tg(u))).catch((Xe=>{throw Error(`Fail to fetch applied config ${u}`,Xe)})))})(u.apply);const Xe=ng[u.apply];if(!Xe)throw Error("Fail to fetch remote config "+u.aply);return{...Xe,...u,aliases:{...Xe.aliases,...u.aliases??{}}}},prepareRenderer=async u=>{let Xe;if(u.use)if(u.use.steps)Xe=u.use;else{const fr=(await import(u.use)).default;Xe=new fr}else Xe=u;return Object.entries(u).forEach((([u,fr])=>Xe[u]=fr)),Xe},healthCheck=u=>{if(!u.steps)throw u.steps=[],Error("not health");return u},renderWithConfig=async u=>{u.results=[];const Xe=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],fr=(u=>{let Xe=u;return u=>u.reduce(((u,fr)=>u.then((async()=>Xe.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(Xe=await fr(Xe),Xe))).then((u=>Xe.results.push({type:"prepare",func:fr.valueOf(),state:u?.state??"success",result:u?.reason??Xe}))).catch((u=>{Xe.results.push({type:"prepare",func:fr.valueOf(),state:"fail",result:u})})).then((()=>{Xe.prepareCallback?.(Xe,Xe.results)}))),Promise.resolve(Xe)).then((()=>Xe))})(u)(Xe).then((u=>(u=>(u.steps??[]).reduce(((Xe,fr)=>Xe.then((()=>{if("stop"===u.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(fr.depends){const Xe=u.results.findLast((u=>u.func===fr.depends))?.state;if(Xe.match(/skip|fail/))return{state:"skip"}}return fr.valueOf().bind(u)(u)})).then((Xe=>u.results.push({type:"render",func:fr.valueOf(),state:Xe?.state??"success",result:Xe?.reason??Xe}))).catch((Xe=>u.results.push({type:"render",func:fr.valueOf(),state:"fail",result:Xe}))).then((()=>{u.stepCallback?.(u,u)}))),Promise.resolve()).then((()=>u)))(u))).then((u=>{const Xe=!u.results||0===u.results.length||!u.results.find((u=>u.state.match(/success/)))||u.results.find((u=>u.state.match(/fail|stop/))),fr=Xe?"unfulfilled":"fulfilled";return u?.target?.setAttribute("data-render",fr),u}));return fr.valueOf=()=>u.results,fr},setValueOf=u=>(u.valueOf=()=>JSON.stringify(u,((u,Xe)=>u.match(/aliases|target/)?void 0:Xe)),u),shouldRender=u=>!(u.target instanceof window.HTMLElement&&u.target.classList.contains("mapclay")&&u.valueOf()===u.target.getAttribute("data-mapclay")&&"fulfilled"===u.target.getAttribute("data-render")),renderWith=u=>(Xe,fr)=>{u=u??(u=>u);const Ar="object"==typeof fr?Array.isArray(fr)?fr.map(u):[fr].map(u):null;if(!Ar)throw Error(`Invalid config files: ${fr}`);Xe.innerHTML="";return Ar.map(setValueOf).map((u=>{if(shouldRender(u)){const Xe=document.createElement("div");u.id&&(Xe.id=u.id.replaceAll(" ","_"),Xe.title=`ID: ${Xe.id}`),Xe.classList.add("mapclay"),u.target=Xe,Xe.dataset.render="rendering",Xe.dataset.mapclay=u.valueOf()}return Xe.append(u.target),window.CSS.supports(`width: ${u.width}`)&&(u.target.style.width=u.width),window.CSS.supports(`height: ${u.height}`)&&(u.target.style.height=u.height),u})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(u=null)=>async(Xe,fr=null)=>{const Ar=(u=>{const Xe=[];return eg(u,(u=>{"object"!=typeof u||Array.isArray(u)?Xe.length>0&&(Xe.at(-1).eval=u.toString()):Xe.push(u??{})})),0===Xe.length?[{}]:Xe})(fr??Xe.textContent);return renderWith(u)(Xe,Ar)},og=renderWith(applyDefaultAliases),sg=renderByYamlWith(applyDefaultAliases);
+/**
+ * MapLibre GL JS
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.6.0/LICENSE.txt
+ */
+var ag,lg;function getDefaultExportFromCjs(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}function getAugmentedNamespace(u){if(u.__esModule)return u;var Xe=u.default;if("function"==typeof Xe){var fr=function a(){return this instanceof a?Reflect.construct(Xe,arguments,this.constructor):Xe.apply(this,arguments)};fr.prototype=Xe.prototype}else fr={};return Object.defineProperty(fr,"__esModule",{value:!0}),Object.keys(u).forEach((function(Xe){var Ar=Object.getOwnPropertyDescriptor(u,Xe);Object.defineProperty(fr,Xe,Ar.get?Ar:{enumerable:!0,get:function(){return u[Xe]}})})),fr}function objectConverter(u){return new Function("d","return {"+u.map((function(u,Xe){return JSON.stringify(u)+": d["+Xe+"]"})).join(",")+"}")}function dsv$1(u){var Xe=new RegExp('["'+u+"\n]"),fr=u.charCodeAt(0);function parseRows(u,Xe){var Ar,_r,wr={},Kr={},In=[],io=u.length,no=0,oo=0;function token(){if(no>=io)return Kr;if(_r)return _r=!1,wr;var Xe,Ar=no;if(34===u.charCodeAt(Ar)){for(var In=Ar;In++<io;)if(34===u.charCodeAt(In)){if(34!==u.charCodeAt(In+1))break;++In}return no=In+2,13===(Xe=u.charCodeAt(In+1))?(_r=!0,10===u.charCodeAt(In+2)&&++no):10===Xe&&(_r=!0),u.slice(Ar+1,In).replace(/""/g,'"')}for(;no<io;){var oo=1;if(10===(Xe=u.charCodeAt(no++)))_r=!0;else if(13===Xe)_r=!0,10===u.charCodeAt(no)&&(++no,++oo);else if(Xe!==fr)continue;return u.slice(Ar,no-oo)}return u.slice(Ar)}for(;(Ar=token())!==Kr;){for(var so=[];Ar!==wr&&Ar!==Kr;)so.push(Ar),Ar=token();Xe&&null==(so=Xe(so,oo++))||In.push(so)}return In}function formatRow(Xe){return Xe.map(formatValue).join(u)}function formatValue(u){return null==u?"":Xe.test(u+="")?'"'+u.replace(/\"/g,'""')+'"':u}return{parse:function parse(u,Xe){var fr,Ar,_r=parseRows(u,(function(u,_r){if(fr)return fr(u,_r-1);Ar=u,fr=Xe?function customConverter(u,Xe){var fr=objectConverter(u);return function(Ar,_r){return Xe(fr(Ar),_r,u)}}(u,Xe):objectConverter(u)}));return _r.columns=Ar,_r},parseRows:parseRows,format:function format(Xe,fr){return null==fr&&(fr=function inferColumns(u){var Xe=Object.create(null),fr=[];return u.forEach((function(u){for(var Ar in u)Ar in Xe||fr.push(Xe[Ar]=Ar)})),fr}(Xe)),[fr.map(formatValue).join(u)].concat(Xe.map((function(Xe){return fr.map((function(u){return formatValue(Xe[u])})).join(u)}))).join("\n")},formatRows:function formatRows(u){return u.map(formatRow).join("\n")}}}document.currentScript&&(globalThis.mapclay={render:og,renderWith:renderWith,renderByYaml:sg,renderByYamlWith:renderByYamlWith}),ag=window,lg=function(){var u={},Xe={};function define(fr,Ar,_r){if(Xe[fr]=_r,"index"===fr){var wr="var sharedModule = {}; ("+Xe.shared+")(sharedModule); ("+Xe.worker+")(sharedModule);",Kr={};return Xe.shared(Kr),Xe.index(u,Kr),"undefined"!=typeof window&&u.setWorkerUrl(window.URL.createObjectURL(new Blob([wr],{type:"text/javascript"}))),u}}return define("shared",0,(function(u){function e(u,Xe,fr,Ar){return new(fr||(fr=Promise))((function(_r,wr){function a(u){try{l(Ar.next(u))}catch(u){wr(u)}}function o(u){try{l(Ar.throw(u))}catch(u){wr(u)}}function l(u){var Xe;u.done?_r(u.value):(Xe=u.value,Xe instanceof fr?Xe:new fr((function(u){u(Xe)}))).then(a,o)}l((Ar=Ar.apply(u,Xe||[])).next())}))}function r(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}"function"==typeof SuppressedError&&SuppressedError;var Xe=i;function i(u,Xe){this.x=u,this.y=Xe}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,Xe){return this.clone()._rotateAround(u,Xe)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var Xe=u.x-this.x,fr=u.y-this.y;return Xe*Xe+fr*fr},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,Xe){return Math.atan2(this.x*Xe-this.y*u,this.x*u+this.y*Xe)},_matMult:function(u){var Xe=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=Xe,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var Xe=Math.cos(u),fr=Math.sin(u),Ar=fr*this.x+Xe*this.y;return this.x=Xe*this.x-fr*this.y,this.y=Ar,this},_rotateAround:function(u,Xe){var fr=Math.cos(u),Ar=Math.sin(u),_r=Xe.y+Ar*(this.x-Xe.x)+fr*(this.y-Xe.y);return this.x=Xe.x+fr*(this.x-Xe.x)-Ar*(this.y-Xe.y),this.y=_r,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(u){return u instanceof i?u:Array.isArray(u)?new i(u[0],u[1]):u};var fr=r(Xe),Ar=o;function o(u,Xe,fr,Ar){this.cx=3*u,this.bx=3*(fr-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(Ar-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=fr,this.p2y=Ar}o.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var fr=u,Ar=0;Ar<8;Ar++){var _r=this.sampleCurveX(fr)-u;if(Math.abs(_r)<Xe)return fr;var wr=this.sampleCurveDerivativeX(fr);if(Math.abs(wr)<1e-6)break;fr-=_r/wr}var Kr=0,In=1;for(fr=u,Ar=0;Ar<20&&(_r=this.sampleCurveX(fr),!(Math.abs(_r-u)<Xe));Ar++)u>_r?Kr=fr:In=fr,fr=.5*(In-Kr)+Kr;return fr},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var _r=r(Ar);let wr,Kr;function h(){return null==wr&&(wr="undefined"!=typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),wr}function p(){if(null==Kr&&(Kr=!1,h())){const u=5,Xe=new OffscreenCanvas(u,u).getContext("2d",{willReadFrequently:!0});if(Xe){for(let fr=0;fr<u*u;fr++){const Ar=4*fr;Xe.fillStyle=`rgb(${Ar},${Ar+1},${Ar+2})`,Xe.fillRect(fr%u,Math.floor(fr/u),1,1)}const fr=Xe.getImageData(0,0,u,u).data;for(let Xe=0;Xe<u*u*4;Xe++)if(Xe%4!=3&&fr[Xe]!==Xe){Kr=!0;break}}}return Kr||!1}function f(u,Xe,fr,Ar){const wr=new _r(u,Xe,fr,Ar);return u=>wr.solve(u)}const In=f(.25,.1,.25,1);function y(u,Xe,fr){return Math.min(fr,Math.max(Xe,u))}function m(u,Xe,fr){const Ar=fr-Xe,_r=((u-Xe)%Ar+Ar)%Ar+Xe;return _r===Xe?fr:_r}function g(u,...Xe){for(const fr of Xe)for(const Xe in fr)u[Xe]=fr[Xe];return u}let io=1;function v(u,Xe,fr){const Ar={};for(const fr in u)Ar[fr]=Xe.call(this,u[fr],fr,u);return Ar}function b(u,Xe,fr){const Ar={};for(const fr in u)Xe.call(this,u[fr],fr,u)&&(Ar[fr]=u[fr]);return Ar}function w(u){return Array.isArray(u)?u.map(w):"object"==typeof u&&u?v(u,w):u}const no={};function A(u){no[u]||("undefined"!=typeof console&&console.warn(u),no[u]=!0)}function S(u,Xe,fr){return(fr.y-u.y)*(Xe.x-u.x)>(Xe.y-u.y)*(fr.x-u.x)}function k(u){return"undefined"!=typeof WorkerGlobalScope&&void 0!==u&&u instanceof WorkerGlobalScope}let oo=null;function I(u){return"undefined"!=typeof ImageBitmap&&u instanceof ImageBitmap}const so="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function P(u,Xe,fr,Ar,_r){return e(this,void 0,void 0,(function*(){if("undefined"==typeof VideoFrame)throw new Error("VideoFrame not supported");const wr=new VideoFrame(u,{timestamp:0});try{const Kr=null==wr?void 0:wr.format;if(!Kr||!Kr.startsWith("BGR")&&!Kr.startsWith("RGB"))throw new Error(`Unrecognized format ${Kr}`);const In=Kr.startsWith("BGR"),io=new Uint8ClampedArray(Ar*_r*4);if(yield wr.copyTo(io,function(u,Xe,fr,Ar,_r){const wr=4*Math.max(-Xe,0),Kr=(Math.max(0,fr)-fr)*Ar*4+wr,In=4*Ar,io=Math.max(0,Xe),no=Math.max(0,fr);return{rect:{x:io,y:no,width:Math.min(u.width,Xe+Ar)-io,height:Math.min(u.height,fr+_r)-no},layout:[{offset:Kr,stride:In}]}}(u,Xe,fr,Ar,_r)),In)for(let u=0;u<io.length;u+=4){const Xe=io[u];io[u]=io[u+2],io[u+2]=Xe}return io}finally{wr.close()}}))}let ao,co;const go="AbortError";function E(){return new Error(go)}const ho={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function T(u){return ho.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Co="global-dispatcher";class L extends Error{constructor(u,Xe,fr,Ar){super(`AJAXError: ${Xe} (${u}): ${fr}`),this.status=u,this.statusText=Xe,this.url=fr,this.body=Ar}}const D=()=>k(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,O=function(u,Xe){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const fr=T(u.url);if(fr)return fr(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:Co},Xe)}if(!(/^file:/.test(fr=u.url)||/^file:/.test(D())&&!/^\w+:/.test(fr))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(u,Xe){return e(this,void 0,void 0,(function*(){const fr=new Request(u.url,{method:u.method||"GET",body:u.body,credentials:u.credentials,headers:u.headers,cache:u.cache,referrer:D(),signal:Xe.signal});"json"!==u.type||fr.headers.has("Accept")||fr.headers.set("Accept","application/json");const Ar=yield fetch(fr);if(!Ar.ok){const Xe=yield Ar.blob();throw new L(Ar.status,Ar.statusText,u.url,Xe)}let _r;_r="arrayBuffer"===u.type||"image"===u.type?Ar.arrayBuffer():"json"===u.type?Ar.json():Ar.text();const wr=yield _r;if(Xe.signal.aborted)throw E();return{data:wr,cacheControl:Ar.headers.get("Cache-Control"),expires:Ar.headers.get("Expires")}}))}(u,Xe);if(k(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:Co},Xe)}var fr;return function(u,Xe){return new Promise(((fr,Ar)=>{var _r;const wr=new XMLHttpRequest;wr.open(u.method||"GET",u.url,!0),"arrayBuffer"!==u.type&&"image"!==u.type||(wr.responseType="arraybuffer");for(const Xe in u.headers)wr.setRequestHeader(Xe,u.headers[Xe]);"json"===u.type&&(wr.responseType="text",(null===(_r=u.headers)||void 0===_r?void 0:_r.Accept)||wr.setRequestHeader("Accept","application/json")),wr.withCredentials="include"===u.credentials,wr.onerror=()=>{Ar(new Error(wr.statusText))},wr.onload=()=>{if(!Xe.signal.aborted)if((wr.status>=200&&wr.status<300||0===wr.status)&&null!==wr.response){let Xe=wr.response;if("json"===u.type)try{Xe=JSON.parse(wr.response)}catch(u){return void Ar(u)}fr({data:Xe,cacheControl:wr.getResponseHeader("Cache-Control"),expires:wr.getResponseHeader("Expires")})}else{const Xe=new Blob([wr.response],{type:wr.getResponseHeader("Content-Type")});Ar(new L(wr.status,wr.statusText,u.url,Xe))}},Xe.signal.addEventListener("abort",(()=>{wr.abort(),Ar(E())})),wr.send(u.body)}))}(u,Xe)};function j(u){if(!u||u.indexOf("://")<=0||0===u.indexOf("data:image/")||0===u.indexOf("blob:"))return!0;const Xe=new URL(u),fr=window.location;return Xe.protocol===fr.protocol&&Xe.host===fr.host}function R(u,Xe,fr){fr[u]&&-1!==fr[u].indexOf(Xe)||(fr[u]=fr[u]||[],fr[u].push(Xe))}function U(u,Xe,fr){if(fr&&fr[u]){const Ar=fr[u].indexOf(Xe);-1!==Ar&&fr[u].splice(Ar,1)}}class q{constructor(u,Xe={}){g(this,Xe),this.type=u}}class N extends q{constructor(u,Xe={}){super("error",g({error:u},Xe))}}class Z{on(u,Xe){return this._listeners=this._listeners||{},R(u,Xe,this._listeners),this}off(u,Xe){return U(u,Xe,this._listeners),U(u,Xe,this._oneTimeListeners),this}once(u,Xe){return Xe?(this._oneTimeListeners=this._oneTimeListeners||{},R(u,Xe,this._oneTimeListeners),this):new Promise((Xe=>this.once(u,Xe)))}fire(u,Xe){"string"==typeof u&&(u=new q(u,Xe||{}));const fr=u.type;if(this.listens(fr)){u.target=this;const Xe=this._listeners&&this._listeners[fr]?this._listeners[fr].slice():[];for(const fr of Xe)fr.call(this,u);const Ar=this._oneTimeListeners&&this._oneTimeListeners[fr]?this._oneTimeListeners[fr].slice():[];for(const Xe of Ar)U(fr,Xe,this._oneTimeListeners),Xe.call(this,u);const _r=this._eventedParent;_r&&(g(u,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),_r.fire(u))}else u instanceof N&&console.error(u.error);return this}listens(u){return this._listeners&&this._listeners[u]&&this._listeners[u].length>0||this._oneTimeListeners&&this._oneTimeListeners[u]&&this._oneTimeListeners[u].length>0||this._eventedParent&&this._eventedParent.listens(u)}setEventedParent(u,Xe){return this._eventedParent=u,this._eventedParentData=Xe,this}}var Io={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const xo=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function X(u,Xe){const fr={};for(const Xe in u)"ref"!==Xe&&(fr[Xe]=u[Xe]);return xo.forEach((u=>{u in Xe&&(fr[u]=Xe[u])})),fr}function H(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let fr=0;fr<u.length;fr++)if(!H(u[fr],Xe[fr]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const fr in u)if(!H(u[fr],Xe[fr]))return!1;return!0}return u===Xe}function Y(u,Xe){u.push(Xe)}function J(u,Xe,fr){Y(fr,{command:"addSource",args:[u,Xe[u]]})}function W(u,Xe,fr){Y(Xe,{command:"removeSource",args:[u]}),fr[u]=!0}function Q(u,Xe,fr,Ar){W(u,fr,Ar),J(u,Xe,fr)}function tt(u,Xe,fr){let Ar;for(Ar in u[fr])if(Object.prototype.hasOwnProperty.call(u[fr],Ar)&&"data"!==Ar&&!H(u[fr][Ar],Xe[fr][Ar]))return!1;for(Ar in Xe[fr])if(Object.prototype.hasOwnProperty.call(Xe[fr],Ar)&&"data"!==Ar&&!H(u[fr][Ar],Xe[fr][Ar]))return!1;return!0}function et(u,Xe,fr,Ar,_r,wr){u=u||{},Xe=Xe||{};for(const Kr in u)Object.prototype.hasOwnProperty.call(u,Kr)&&(H(u[Kr],Xe[Kr])||fr.push({command:wr,args:[Ar,Kr,Xe[Kr],_r]}));for(const Kr in Xe)Object.prototype.hasOwnProperty.call(Xe,Kr)&&!Object.prototype.hasOwnProperty.call(u,Kr)&&(H(u[Kr],Xe[Kr])||fr.push({command:wr,args:[Ar,Kr,Xe[Kr],_r]}))}function rt(u){return u.id}function nt(u,Xe){return u[Xe.id]=Xe,u}class it{constructor(u,Xe,fr,Ar){this.message=(u?`${u}: `:"")+fr,Ar&&(this.identifier=Ar),null!=Xe&&Xe.__line__&&(this.line=Xe.__line__)}}function st(u,...Xe){for(const fr of Xe)for(const Xe in fr)u[Xe]=fr[Xe];return u}class at extends Error{constructor(u,Xe){super(Xe),this.message=Xe,this.key=u}}class ot{constructor(u,Xe=[]){this.parent=u,this.bindings={};for(const[u,fr]of Xe)this.bindings[u]=fr}concat(u){return new ot(this,u)}get(u){if(this.bindings[u])return this.bindings[u];if(this.parent)return this.parent.get(u);throw new Error(`${u} not found in scope.`)}has(u){return!!this.bindings[u]||!!this.parent&&this.parent.has(u)}}const Mo={kind:"null"},Po={kind:"number"},ss={kind:"string"},sa={kind:"boolean"},aa={kind:"color"},fa={kind:"object"},ya={kind:"value"},ol={kind:"collator"},sl={kind:"formatted"},al={kind:"padding"},cl={kind:"resolvedImage"},hl={kind:"variableAnchorOffsetCollection"};function bt(u,Xe){return{kind:"array",itemType:u,N:Xe}}function wt(u){if("array"===u.kind){const Xe=wt(u.itemType);return"number"==typeof u.N?`array<${Xe}, ${u.N}>`:"value"===u.itemType.kind?"array":`array<${Xe}>`}return u.kind}const ul=[Mo,Po,ss,sa,aa,sl,fa,bt(ya),al,cl,hl];function At(u,Xe){if("error"===Xe.kind)return null;if("array"===u.kind){if("array"===Xe.kind&&(0===Xe.N&&"value"===Xe.itemType.kind||!At(u.itemType,Xe.itemType))&&("number"!=typeof u.N||u.N===Xe.N))return null}else{if(u.kind===Xe.kind)return null;if("value"===u.kind)for(const u of ul)if(!At(u,Xe))return null}return`Expected ${wt(u)} but found ${wt(Xe)} instead.`}function St(u,Xe){return Xe.some((Xe=>Xe.kind===u.kind))}function kt(u,Xe){return Xe.some((Xe=>"null"===Xe?null===u:"array"===Xe?Array.isArray(u):"object"===Xe?u&&!Array.isArray(u)&&"object"==typeof u:Xe===typeof u))}function Mt(u,Xe){return"array"===u.kind&&"array"===Xe.kind?u.itemType.kind===Xe.itemType.kind&&"number"==typeof u.N:u.kind===Xe.kind}const dl=.96422,pl=.82521,Cl=4/29,fl=6/29,_l=3*fl*fl,vl=fl*fl*fl,xl=Math.PI/180,Sl=180/Math.PI;function Tt(u){return(u%=360)<0&&(u+=360),u}function $t([u,Xe,fr,Ar]){let _r,wr;const Kr=Dt((.2225045*(u=Lt(u))+.7168786*(Xe=Lt(Xe))+.0606169*(fr=Lt(fr)))/1);u===Xe&&Xe===fr?_r=wr=Kr:(_r=Dt((.4360747*u+.3850649*Xe+.1430804*fr)/dl),wr=Dt((.0139322*u+.0971045*Xe+.7141733*fr)/pl));const In=116*Kr-16;return[In<0?0:In,500*(_r-Kr),200*(Kr-wr),Ar]}function Lt(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Dt(u){return u>vl?Math.pow(u,1/3):u/_l+Cl}function Ot([u,Xe,fr,Ar]){let _r=(u+16)/116,wr=isNaN(Xe)?_r:_r+Xe/500,Kr=isNaN(fr)?_r:_r-fr/200;return _r=1*Rt(_r),wr=dl*Rt(wr),Kr=pl*Rt(Kr),[jt(3.1338561*wr-1.6168667*_r-.4906146*Kr),jt(-.9787684*wr+1.9161415*_r+.033454*Kr),jt(.0719453*wr-.2289914*_r+1.4052427*Kr),Ar]}function jt(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Rt(u){return u>fl?u*u*u:_l*(u-Cl)}function Ut(u){return parseInt(u.padEnd(2,u),16)/255}function qt(u,Xe){return Nt(Xe?u/100:u,0,1)}function Nt(u,Xe,fr){return Math.min(Math.max(Xe,u),fr)}function Zt(u){return!u.some(Number.isNaN)}const kl={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class Kt{constructor(u,Xe,fr,Ar=1,_r=!0){this.r=u,this.g=Xe,this.b=fr,this.a=Ar,_r||(this.r*=Ar,this.g*=Ar,this.b*=Ar,Ar||this.overwriteGetter("rgb",[u,Xe,fr,Ar]))}static parse(u){if(u instanceof Kt)return u;if("string"!=typeof u)return;const Xe=function(u){if("transparent"===(u=u.toLowerCase().trim()))return[0,0,0,0];const Xe=kl[u];if(Xe){const[u,fr,Ar]=Xe;return[u/255,fr/255,Ar/255,1]}if(u.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(u)){const Xe=u.length<6?1:2;let fr=1;return[Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+=Xe)),Ut(u.slice(fr,fr+Xe)||"ff")]}if(u.startsWith("rgb")){const Xe=u.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Xe){const[u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao]=Xe,co=[_r||" ",In||" ",oo].join("");if("  "===co||"  /"===co||",,"===co||",,,"===co){const u=[Ar,Kr,no].join(""),Xe="%%%"===u?100:""===u?255:0;if(Xe){const u=[Nt(+fr/Xe,0,1),Nt(+wr/Xe,0,1),Nt(+io/Xe,0,1),so?qt(+so,ao):1];if(Zt(u))return u}}return}}const fr=u.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(fr){const[u,Xe,Ar,_r,wr,Kr,In,io,no]=fr,oo=[Ar||" ",wr||" ",In].join("");if("  "===oo||"  /"===oo||",,"===oo||",,,"===oo){const u=[+Xe,Nt(+_r,0,100),Nt(+Kr,0,100),io?qt(+io,no):1];if(Zt(u))return function([u,Xe,fr,Ar]){function i(Ar){const _r=(Ar+u/30)%12,wr=Xe*Math.min(fr,1-fr);return fr-wr*Math.max(-1,Math.min(_r-3,9-_r,1))}return u=Tt(u),Xe/=100,fr/=100,[i(0),i(8),i(4),Ar]}(u)}}}(u);return Xe?new Kt(...Xe,!1):void 0}get rgb(){const{r:u,g:Xe,b:fr,a:Ar}=this,_r=Ar||1/0;return this.overwriteGetter("rgb",[u/_r,Xe/_r,fr/_r,Ar])}get hcl(){return this.overwriteGetter("hcl",function(u){const[Xe,fr,Ar,_r]=$t(u),wr=Math.sqrt(fr*fr+Ar*Ar);return[Math.round(1e4*wr)?Tt(Math.atan2(Ar,fr)*Sl):NaN,wr,Xe,_r]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$t(this.rgb))}overwriteGetter(u,Xe){return Object.defineProperty(this,u,{value:Xe}),Xe}toString(){const[u,Xe,fr,Ar]=this.rgb;return`rgba(${[u,Xe,fr].map((u=>Math.round(255*u))).join(",")},${Ar})`}}Kt.black=new Kt(0,0,0,1),Kt.white=new Kt(1,1,1,1),Kt.transparent=new Kt(0,0,0,0),Kt.red=new Kt(1,0,0,1);class Xt{constructor(u,Xe,fr){this.sensitivity=u?Xe?"variant":"case":Xe?"accent":"base",this.locale=fr,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(u,Xe){return this.collator.compare(u,Xe)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Ht{constructor(u,Xe,fr,Ar,_r){this.text=u,this.image=Xe,this.scale=fr,this.fontStack=Ar,this.textColor=_r}}class Yt{constructor(u){this.sections=u}static fromString(u){return new Yt([new Ht(u,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some((u=>0!==u.text.length||u.image&&0!==u.image.name.length))}static factory(u){return u instanceof Yt?u:Yt.fromString(u)}toString(){return 0===this.sections.length?"":this.sections.map((u=>u.text)).join("")}}class Jt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Jt)return u;if("number"==typeof u)return new Jt([u,u,u,u]);if(Array.isArray(u)&&!(u.length<1||u.length>4)){for(const Xe of u)if("number"!=typeof Xe)return;switch(u.length){case 1:u=[u[0],u[0],u[0],u[0]];break;case 2:u=[u[0],u[1],u[0],u[1]];break;case 3:u=[u[0],u[1],u[2],u[1]]}return new Jt(u)}}toString(){return JSON.stringify(this.values)}}const Bl=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Qt{constructor(u){this.values=u.slice()}static parse(u){if(u instanceof Qt)return u;if(Array.isArray(u)&&!(u.length<1)&&u.length%2==0){for(let Xe=0;Xe<u.length;Xe+=2){const fr=u[Xe],Ar=u[Xe+1];if("string"!=typeof fr||!Bl.has(fr))return;if(!Array.isArray(Ar)||2!==Ar.length||"number"!=typeof Ar[0]||"number"!=typeof Ar[1])return}return new Qt(u)}}toString(){return JSON.stringify(this.values)}}class te{constructor(u){this.name=u.name,this.available=u.available}toString(){return this.name}static fromString(u){return u?new te({name:u,available:!1}):null}}function ee(u,Xe,fr,Ar){return"number"==typeof u&&u>=0&&u<=255&&"number"==typeof Xe&&Xe>=0&&Xe<=255&&"number"==typeof fr&&fr>=0&&fr<=255?void 0===Ar||"number"==typeof Ar&&Ar>=0&&Ar<=1?null:`Invalid rgba value [${[u,Xe,fr,Ar].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof Ar?[u,Xe,fr,Ar]:[u,Xe,fr]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function re(u){if(null===u||"string"==typeof u||"boolean"==typeof u||"number"==typeof u||u instanceof Kt||u instanceof Xt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te)return!0;if(Array.isArray(u)){for(const Xe of u)if(!re(Xe))return!1;return!0}if("object"==typeof u){for(const Xe in u)if(!re(u[Xe]))return!1;return!0}return!1}function ne(u){if(null===u)return Mo;if("string"==typeof u)return ss;if("boolean"==typeof u)return sa;if("number"==typeof u)return Po;if(u instanceof Kt)return aa;if(u instanceof Xt)return ol;if(u instanceof Yt)return sl;if(u instanceof Jt)return al;if(u instanceof Qt)return hl;if(u instanceof te)return cl;if(Array.isArray(u)){const Xe=u.length;let fr;for(const Xe of u){const u=ne(Xe);if(fr){if(fr===u)continue;fr=ya;break}fr=u}return bt(fr||ya,Xe)}return fa}function ie(u){const Xe=typeof u;return null===u?"":"string"===Xe||"number"===Xe||"boolean"===Xe?String(u):u instanceof Kt||u instanceof Yt||u instanceof Jt||u instanceof Qt||u instanceof te?u.toString():JSON.stringify(u)}class se{constructor(u,Xe){this.type=u,this.value=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'literal' expression requires exactly one argument, but found ${u.length-1} instead.`);if(!re(u[1]))return Xe.error("invalid value");const fr=u[1];let Ar=ne(fr);const _r=Xe.expectedType;return"array"!==Ar.kind||0!==Ar.N||!_r||"array"!==_r.kind||"number"==typeof _r.N&&0!==_r.N||(Ar=_r),new se(Ar,fr)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ae{constructor(u){this.name="ExpressionEvaluationError",this.message=u}toJSON(){return this.message}}const Zl={string:ss,number:Po,boolean:sa,object:fa};class le{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");let fr,Ar=1;const _r=u[0];if("array"===_r){let _r,wr;if(u.length>2){const fr=u[1];if("string"!=typeof fr||!(fr in Zl)||"object"===fr)return Xe.error('The item type argument of "array" must be one of string, number, boolean',1);_r=Zl[fr],Ar++}else _r=ya;if(u.length>3){if(null!==u[2]&&("number"!=typeof u[2]||u[2]<0||u[2]!==Math.floor(u[2])))return Xe.error('The length argument to "array" must be a positive integer literal',2);wr=u[2],Ar++}fr=bt(_r,wr)}else{if(!Zl[_r])throw new Error(`Types doesn't contain name = ${_r}`);fr=Zl[_r]}const wr=[];for(;Ar<u.length;Ar++){const fr=Xe.parse(u[Ar],Ar,ya);if(!fr)return null;wr.push(fr)}return new le(fr,wr)}evaluate(u){for(let Xe=0;Xe<this.args.length;Xe++){const fr=this.args[Xe].evaluate(u);if(!At(this.type,ne(fr)))return fr;if(Xe===this.args.length-1)throw new ae(`Expected value to be of type ${wt(this.type)}, but found ${wt(ne(fr))} instead.`)}throw new Error}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Rl={"to-boolean":sa,"to-color":aa,"to-number":Po,"to-string":ss};class ce{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const fr=u[0];if(!Rl[fr])throw new Error(`Can't parse ${fr} as it is not part of the known types`);if(("to-boolean"===fr||"to-string"===fr)&&2!==u.length)return Xe.error("Expected one argument.");const Ar=Rl[fr],_r=[];for(let fr=1;fr<u.length;fr++){const Ar=Xe.parse(u[fr],fr,ya);if(!Ar)return null;_r.push(Ar)}return new ce(Ar,_r)}evaluate(u){switch(this.type.kind){case"boolean":return Boolean(this.args[0].evaluate(u));case"color":{let Xe,fr;for(const Ar of this.args){if(Xe=Ar.evaluate(u),fr=null,Xe instanceof Kt)return Xe;if("string"==typeof Xe){const fr=u.parseColor(Xe);if(fr)return fr}else if(Array.isArray(Xe)&&(fr=Xe.length<3||Xe.length>4?`Invalid rbga value ${JSON.stringify(Xe)}: expected an array containing either three or four numeric values.`:ee(Xe[0],Xe[1],Xe[2],Xe[3]),!fr))return new Kt(Xe[0]/255,Xe[1]/255,Xe[2]/255,Xe[3])}throw new ae(fr||`Could not parse color from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"padding":{let Xe;for(const fr of this.args){Xe=fr.evaluate(u);const Ar=Jt.parse(Xe);if(Ar)return Ar}throw new ae(`Could not parse padding from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"variableAnchorOffsetCollection":{let Xe;for(const fr of this.args){Xe=fr.evaluate(u);const Ar=Qt.parse(Xe);if(Ar)return Ar}throw new ae(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof Xe?Xe:JSON.stringify(Xe)}'`)}case"number":{let Xe=null;for(const fr of this.args){if(Xe=fr.evaluate(u),null===Xe)return 0;const Ar=Number(Xe);if(!isNaN(Ar))return Ar}throw new ae(`Could not convert ${JSON.stringify(Xe)} to number.`)}case"formatted":return Yt.fromString(ie(this.args[0].evaluate(u)));case"resolvedImage":return te.fromString(ie(this.args[0].evaluate(u)));default:return ie(this.args[0].evaluate(u))}}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}const Wl=["Unknown","Point","LineString","Polygon"];class pe{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?Wl[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(u){let Xe=this._parseColorCache[u];return Xe||(Xe=this._parseColorCache[u]=Kt.parse(u)),Xe}}class fe{constructor(u,Xe,fr=[],Ar,_r=new ot,wr=[]){this.registry=u,this.path=fr,this.key=fr.map((u=>`[${u}]`)).join(""),this.scope=_r,this.errors=wr,this.expectedType=Ar,this._isConstant=Xe}parse(u,Xe,fr,Ar,_r={}){return Xe?this.concat(Xe,fr,Ar)._parse(u,_r):this._parse(u,_r)}_parse(u,Xe){function r(u,Xe,fr){return"assert"===fr?new le(Xe,[u]):"coerce"===fr?new ce(Xe,[u]):u}if(null!==u&&"string"!=typeof u&&"boolean"!=typeof u&&"number"!=typeof u||(u=["literal",u]),Array.isArray(u)){if(0===u.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const fr=u[0];if("string"!=typeof fr)return this.error(`Expression name must be a string, but found ${typeof fr} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const Ar=this.registry[fr];if(Ar){let fr=Ar.parse(u,this);if(!fr)return null;if(this.expectedType){const u=this.expectedType,Ar=fr.type;if("string"!==u.kind&&"number"!==u.kind&&"boolean"!==u.kind&&"object"!==u.kind&&"array"!==u.kind||"value"!==Ar.kind)if("color"!==u.kind&&"formatted"!==u.kind&&"resolvedImage"!==u.kind||"value"!==Ar.kind&&"string"!==Ar.kind)if("padding"!==u.kind||"value"!==Ar.kind&&"number"!==Ar.kind&&"array"!==Ar.kind)if("variableAnchorOffsetCollection"!==u.kind||"value"!==Ar.kind&&"array"!==Ar.kind){if(this.checkSubtype(u,Ar))return null}else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"coerce");else fr=r(fr,u,Xe.typeAnnotation||"assert")}if(!(fr instanceof se)&&"resolvedImage"!==fr.type.kind&&this._isConstant(fr)){const Xe=new pe;try{fr=new se(fr.type,fr.evaluate(Xe))}catch(u){return this.error(u.message),null}}return fr}return this.error(`Unknown expression "${fr}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===u?"'undefined' value invalid. Use null instead.":"object"==typeof u?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof u} instead.`)}concat(u,Xe,fr){const Ar="number"==typeof u?this.path.concat(u):this.path,_r=fr?this.scope.concat(fr):this.scope;return new fe(this.registry,this._isConstant,Ar,Xe||null,_r,this.errors)}error(u,...Xe){const fr=`${this.key}${Xe.map((u=>`[${u}]`)).join("")}`;this.errors.push(new at(fr,u))}checkSubtype(u,Xe){const fr=At(u,Xe);return fr&&this.error(fr),fr}}class de{constructor(u,Xe){this.type=Xe.type,this.bindings=[].concat(u),this.result=Xe}evaluate(u){return this.result.evaluate(u)}eachChild(u){for(const Xe of this.bindings)u(Xe[1]);u(this.result)}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found ${u.length-1} instead.`);const fr=[];for(let Ar=1;Ar<u.length-1;Ar+=2){const _r=u[Ar];if("string"!=typeof _r)return Xe.error(`Expected string, but found ${typeof _r} instead.`,Ar);if(/[^a-zA-Z0-9_]/.test(_r))return Xe.error("Variable names must contain only alphanumeric characters or '_'.",Ar);const wr=Xe.parse(u[Ar+1],Ar+1);if(!wr)return null;fr.push([_r,wr])}const Ar=Xe.parse(u[u.length-1],u.length-1,Xe.expectedType,fr);return Ar?new de(fr,Ar):null}outputDefined(){return this.result.outputDefined()}}class ye{constructor(u,Xe){this.type=Xe.type,this.name=u,this.boundExpression=Xe}static parse(u,Xe){if(2!==u.length||"string"!=typeof u[1])return Xe.error("'var' expression requires exactly one string literal argument.");const fr=u[1];return Xe.scope.has(fr)?new ye(fr,Xe.scope.get(fr)):Xe.error(`Unknown variable "${fr}". Make sure "${fr}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(u){return this.boundExpression.evaluate(u)}eachChild(){}outputDefined(){return!1}}class me{constructor(u,Xe,fr){this.type=u,this.index=Xe,this.input=fr}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,Po),Ar=Xe.parse(u[2],2,bt(Xe.expectedType||ya));return fr&&Ar?new me(Ar.type.itemType,fr,Ar):null}evaluate(u){const Xe=this.index.evaluate(u),fr=this.input.evaluate(u);if(Xe<0)throw new ae(`Array index out of bounds: ${Xe} < 0.`);if(Xe>=fr.length)throw new ae(`Array index out of bounds: ${Xe} > ${fr.length-1}.`);if(Xe!==Math.floor(Xe))throw new ae(`Array index must be an integer, but found ${Xe} instead.`);return fr[Xe]}eachChild(u){u(this.index),u(this.input)}outputDefined(){return!1}}class ge{constructor(u,Xe){this.type=sa,this.needle=u,this.haystack=Xe}static parse(u,Xe){if(3!==u.length)return Xe.error(`Expected 2 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,ya);return fr&&Ar?St(fr.type,[sa,ss,Po,Mo,ya])?new ge(fr,Ar):Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(fr.type)} instead`):null}evaluate(u){const Xe=this.needle.evaluate(u),fr=this.haystack.evaluate(u);if(!fr)return!1;if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);if(!kt(fr,["string","array"]))throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(fr))} instead.`);return fr.indexOf(Xe)>=0}eachChild(u){u(this.needle),u(this.haystack)}outputDefined(){return!0}}class xe{constructor(u,Xe,fr){this.type=Po,this.needle=u,this.haystack=Xe,this.fromIndex=fr}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,ya);if(!fr||!Ar)return null;if(!St(fr.type,[sa,ss,Po,Mo,ya]))return Xe.error(`Expected first argument to be of type boolean, string, number or null, but found ${wt(fr.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Po);return _r?new xe(fr,Ar,_r):null}return new xe(fr,Ar)}evaluate(u){const Xe=this.needle.evaluate(u),fr=this.haystack.evaluate(u);if(!kt(Xe,["boolean","string","number","null"]))throw new ae(`Expected first argument to be of type boolean, string, number or null, but found ${wt(ne(Xe))} instead.`);let Ar;if(this.fromIndex&&(Ar=this.fromIndex.evaluate(u)),kt(fr,["string"])){const u=fr.indexOf(Xe,Ar);return-1===u?-1:[...fr.slice(0,u)].length}if(kt(fr,["array"]))return fr.indexOf(Xe,Ar);throw new ae(`Expected second argument to be of type array or string, but found ${wt(ne(fr))} instead.`)}eachChild(u){u(this.needle),u(this.haystack),this.fromIndex&&u(this.fromIndex)}outputDefined(){return!1}}class ve{constructor(u,Xe,fr,Ar,_r,wr){this.inputType=u,this.type=Xe,this.input=fr,this.cases=Ar,this.outputs=_r,this.otherwise=wr}static parse(u,Xe){if(u.length<5)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if(u.length%2!=1)return Xe.error("Expected an even number of arguments.");let fr,Ar;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(Ar=Xe.expectedType);const _r={},wr=[];for(let Kr=2;Kr<u.length-1;Kr+=2){let In=u[Kr];const io=u[Kr+1];Array.isArray(In)||(In=[In]);const no=Xe.concat(Kr);if(0===In.length)return no.error("Expected at least one branch label.");for(const u of In){if("number"!=typeof u&&"string"!=typeof u)return no.error("Branch labels must be numbers or strings.");if("number"==typeof u&&Math.abs(u)>Number.MAX_SAFE_INTEGER)return no.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof u&&Math.floor(u)!==u)return no.error("Numeric branch labels must be integer values.");if(fr){if(no.checkSubtype(fr,ne(u)))return null}else fr=ne(u);if(void 0!==_r[String(u)])return no.error("Branch labels must be unique.");_r[String(u)]=wr.length}const oo=Xe.parse(io,Kr,Ar);if(!oo)return null;Ar=Ar||oo.type,wr.push(oo)}const Kr=Xe.parse(u[1],1,ya);if(!Kr)return null;const In=Xe.parse(u[u.length-1],u.length-1,Ar);return In?"value"!==Kr.type.kind&&Xe.concat(1).checkSubtype(fr,Kr.type)?null:new ve(fr,Ar,Kr,_r,wr,In):null}evaluate(u){const Xe=this.input.evaluate(u);return(ne(Xe)===this.inputType&&this.outputs[this.cases[Xe]]||this.otherwise).evaluate(u)}eachChild(u){u(this.input),this.outputs.forEach(u),u(this.otherwise)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))&&this.otherwise.outputDefined()}}class be{constructor(u,Xe,fr){this.type=u,this.branches=Xe,this.otherwise=fr}static parse(u,Xe){if(u.length<4)return Xe.error(`Expected at least 3 arguments, but found only ${u.length-1}.`);if(u.length%2!=0)return Xe.error("Expected an odd number of arguments.");let fr;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(fr=Xe.expectedType);const Ar=[];for(let _r=1;_r<u.length-1;_r+=2){const wr=Xe.parse(u[_r],_r,sa);if(!wr)return null;const Kr=Xe.parse(u[_r+1],_r+1,fr);if(!Kr)return null;Ar.push([wr,Kr]),fr=fr||Kr.type}const _r=Xe.parse(u[u.length-1],u.length-1,fr);if(!_r)return null;if(!fr)throw new Error("Can't infer output type");return new be(fr,Ar,_r)}evaluate(u){for(const[Xe,fr]of this.branches)if(Xe.evaluate(u))return fr.evaluate(u);return this.otherwise.evaluate(u)}eachChild(u){for(const[Xe,fr]of this.branches)u(Xe),u(fr);u(this.otherwise)}outputDefined(){return this.branches.every((([u,Xe])=>Xe.outputDefined()))&&this.otherwise.outputDefined()}}class we{constructor(u,Xe,fr,Ar){this.type=u,this.input=Xe,this.beginIndex=fr,this.endIndex=Ar}static parse(u,Xe){if(u.length<=2||u.length>=5)return Xe.error(`Expected 3 or 4 arguments, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1,ya),Ar=Xe.parse(u[2],2,Po);if(!fr||!Ar)return null;if(!St(fr.type,[bt(ya),ss,ya]))return Xe.error(`Expected first argument to be of type array or string, but found ${wt(fr.type)} instead`);if(4===u.length){const _r=Xe.parse(u[3],3,Po);return _r?new we(fr.type,fr,Ar,_r):null}return new we(fr.type,fr,Ar)}evaluate(u){const Xe=this.input.evaluate(u),fr=this.beginIndex.evaluate(u);let Ar;if(this.endIndex&&(Ar=this.endIndex.evaluate(u)),kt(Xe,["string"]))return[...Xe].slice(fr,Ar).join("");if(kt(Xe,["array"]))return Xe.slice(fr,Ar);throw new ae(`Expected first argument to be of type array or string, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input),u(this.beginIndex),this.endIndex&&u(this.endIndex)}outputDefined(){return!1}}function _e(u,Xe){const fr=u.length-1;let Ar,_r,wr=0,Kr=fr,In=0;for(;wr<=Kr;)if(In=Math.floor((wr+Kr)/2),Ar=u[In],_r=u[In+1],Ar<=Xe){if(In===fr||Xe<_r)return In;wr=In+1}else{if(!(Ar>Xe))throw new ae("Input is not a number.");Kr=In-1}return 0}class Ae{constructor(u,Xe,fr){this.type=u,this.input=Xe,this.labels=[],this.outputs=[];for(const[u,Xe]of fr)this.labels.push(u),this.outputs.push(Xe)}static parse(u,Xe){if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");const fr=Xe.parse(u[1],1,Po);if(!fr)return null;const Ar=[];let _r=null;Xe.expectedType&&"value"!==Xe.expectedType.kind&&(_r=Xe.expectedType);for(let fr=1;fr<u.length;fr+=2){const wr=1===fr?-1/0:u[fr],Kr=u[fr+1],In=fr,io=fr+1;if("number"!=typeof wr)return Xe.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',In);if(Ar.length&&Ar[Ar.length-1][0]>=wr)return Xe.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',In);const no=Xe.parse(Kr,io,_r);if(!no)return null;_r=_r||no.type,Ar.push([wr,no])}return new Ae(_r,fr,Ar)}evaluate(u){const Xe=this.labels,fr=this.outputs;if(1===Xe.length)return fr[0].evaluate(u);const Ar=this.input.evaluate(u);if(Ar<=Xe[0])return fr[0].evaluate(u);const _r=Xe.length;return Ar>=Xe[_r-1]?fr[_r-1].evaluate(u):fr[_e(Xe,Ar)].evaluate(u)}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}var Tl=Me;function Me(u,Xe,fr,Ar){this.cx=3*u,this.bx=3*(fr-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Xe,this.by=3*(Ar-Xe)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=Xe,this.p2x=fr,this.p2y=Ar}Me.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,Xe){if(void 0===Xe&&(Xe=1e-6),u<0)return 0;if(u>1)return 1;for(var fr=u,Ar=0;Ar<8;Ar++){var _r=this.sampleCurveX(fr)-u;if(Math.abs(_r)<Xe)return fr;var wr=this.sampleCurveDerivativeX(fr);if(Math.abs(wr)<1e-6)break;fr-=_r/wr}var Kr=0,In=1;for(fr=u,Ar=0;Ar<20&&(_r=this.sampleCurveX(fr),!(Math.abs(_r-u)<Xe));Ar++)u>_r?Kr=fr:In=fr,fr=.5*(In-Kr)+Kr;return fr},solve:function(u,Xe){return this.sampleCurveY(this.solveCurveX(u,Xe))}};var Jl=function Se(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}(Tl);function ze(u,Xe,fr){return u+fr*(Xe-u)}function Pe(u,Xe,fr){return u.map(((u,Ar)=>ze(u,Xe[Ar],fr)))}const Kl={number:ze,color:function(u,Xe,fr,Ar="rgb"){switch(Ar){case"rgb":{const[Ar,_r,wr,Kr]=Pe(u.rgb,Xe.rgb,fr);return new Kt(Ar,_r,wr,Kr,!1)}case"hcl":{const[Ar,_r,wr,Kr]=u.hcl,[In,io,no,oo]=Xe.hcl;let so,ao;if(isNaN(Ar)||isNaN(In))isNaN(Ar)?isNaN(In)?so=NaN:(so=In,1!==wr&&0!==wr||(ao=io)):(so=Ar,1!==no&&0!==no||(ao=_r));else{let u=In-Ar;In>Ar&&u>180?u-=360:In<Ar&&Ar-In>180&&(u+=360),so=Ar+fr*u}const[co,go,ho,Co]=function([u,Xe,fr,Ar]){return u=isNaN(u)?0:u*xl,Ot([fr,Math.cos(u)*Xe,Math.sin(u)*Xe,Ar])}([so,null!=ao?ao:ze(_r,io,fr),ze(wr,no,fr),ze(Kr,oo,fr)]);return new Kt(co,go,ho,Co,!1)}case"lab":{const[Ar,_r,wr,Kr]=Ot(Pe(u.lab,Xe.lab,fr));return new Kt(Ar,_r,wr,Kr,!1)}}},array:Pe,padding:function(u,Xe,fr){return new Jt(Pe(u.values,Xe.values,fr))},variableAnchorOffsetCollection:function(u,Xe,fr){const Ar=u.values,_r=Xe.values;if(Ar.length!==_r.length)throw new ae(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${Xe.toString()}`);const wr=[];for(let u=0;u<Ar.length;u+=2){if(Ar[u]!==_r[u])throw new ae(`Cannot interpolate values containing mismatched anchors. from[${u}]: ${Ar[u]}, to[${u}]: ${_r[u]}`);wr.push(Ar[u]);const[Xe,Kr]=Ar[u+1],[In,io]=_r[u+1];wr.push([ze(Xe,In,fr),ze(Kr,io,fr)])}return new Qt(wr)}};class Be{constructor(u,Xe,fr,Ar,_r){this.type=u,this.operator=Xe,this.interpolation=fr,this.input=Ar,this.labels=[],this.outputs=[];for(const[u,Xe]of _r)this.labels.push(u),this.outputs.push(Xe)}static interpolationFactor(u,Xe,fr,Ar){let _r=0;if("exponential"===u.name)_r=Ve(Xe,u.base,fr,Ar);else if("linear"===u.name)_r=Ve(Xe,1,fr,Ar);else if("cubic-bezier"===u.name){const wr=u.controlPoints;_r=new Jl(wr[0],wr[1],wr[2],wr[3]).solve(Ve(Xe,1,fr,Ar))}return _r}static parse(u,Xe){let[fr,Ar,_r,...wr]=u;if(!Array.isArray(Ar)||0===Ar.length)return Xe.error("Expected an interpolation type expression.",1);if("linear"===Ar[0])Ar={name:"linear"};else if("exponential"===Ar[0]){const u=Ar[1];if("number"!=typeof u)return Xe.error("Exponential interpolation requires a numeric base.",1,1);Ar={name:"exponential",base:u}}else{if("cubic-bezier"!==Ar[0])return Xe.error(`Unknown interpolation type ${String(Ar[0])}`,1,0);{const u=Ar.slice(1);if(4!==u.length||u.some((u=>"number"!=typeof u||u<0||u>1)))return Xe.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);Ar={name:"cubic-bezier",controlPoints:u}}}if(u.length-1<4)return Xe.error(`Expected at least 4 arguments, but found only ${u.length-1}.`);if((u.length-1)%2!=0)return Xe.error("Expected an even number of arguments.");if(_r=Xe.parse(_r,2,Po),!_r)return null;const Kr=[];let In=null;"interpolate-hcl"===fr||"interpolate-lab"===fr?In=aa:Xe.expectedType&&"value"!==Xe.expectedType.kind&&(In=Xe.expectedType);for(let u=0;u<wr.length;u+=2){const fr=wr[u],Ar=wr[u+1],_r=u+3,io=u+4;if("number"!=typeof fr)return Xe.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',_r);if(Kr.length&&Kr[Kr.length-1][0]>=fr)return Xe.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',_r);const no=Xe.parse(Ar,io,In);if(!no)return null;In=In||no.type,Kr.push([fr,no])}return Mt(In,Po)||Mt(In,aa)||Mt(In,al)||Mt(In,hl)||Mt(In,bt(Po))?new Be(In,fr,Ar,_r,Kr):Xe.error(`Type ${wt(In)} is not interpolatable.`)}evaluate(u){const Xe=this.labels,fr=this.outputs;if(1===Xe.length)return fr[0].evaluate(u);const Ar=this.input.evaluate(u);if(Ar<=Xe[0])return fr[0].evaluate(u);const _r=Xe.length;if(Ar>=Xe[_r-1])return fr[_r-1].evaluate(u);const wr=_e(Xe,Ar),Kr=Be.interpolationFactor(this.interpolation,Ar,Xe[wr],Xe[wr+1]),In=fr[wr].evaluate(u),io=fr[wr+1].evaluate(u);switch(this.operator){case"interpolate":return Kl[this.type.kind](In,io,Kr);case"interpolate-hcl":return Kl.color(In,io,Kr,"hcl");case"interpolate-lab":return Kl.color(In,io,Kr,"lab")}}eachChild(u){u(this.input);for(const Xe of this.outputs)u(Xe)}outputDefined(){return this.outputs.every((u=>u.outputDefined()))}}function Ve(u,Xe,fr,Ar){const _r=Ar-fr,wr=u-fr;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}class Ee{constructor(u,Xe){this.type=u,this.args=Xe}static parse(u,Xe){if(u.length<2)return Xe.error("Expectected at least one argument.");let fr=null;const Ar=Xe.expectedType;Ar&&"value"!==Ar.kind&&(fr=Ar);const _r=[];for(const Ar of u.slice(1)){const u=Xe.parse(Ar,1+_r.length,fr,void 0,{typeAnnotation:"omit"});if(!u)return null;fr=fr||u.type,_r.push(u)}if(!fr)throw new Error("No output type");const wr=Ar&&_r.some((u=>At(Ar,u.type)));return new Ee(wr?ya:fr,_r)}evaluate(u){let Xe,fr=null,Ar=0;for(const _r of this.args)if(Ar++,fr=_r.evaluate(u),fr&&fr instanceof te&&!fr.available&&(Xe||(Xe=fr.name),fr=null,Ar===this.args.length&&(fr=Xe)),null!==fr)break;return fr}eachChild(u){this.args.forEach(u)}outputDefined(){return this.args.every((u=>u.outputDefined()))}}function Fe(u,Xe){return"=="===u||"!="===u?"boolean"===Xe.kind||"string"===Xe.kind||"number"===Xe.kind||"null"===Xe.kind||"value"===Xe.kind:"string"===Xe.kind||"number"===Xe.kind||"value"===Xe.kind}function Te(u,Xe,fr,Ar){return 0===Ar.compare(Xe,fr)}function $e(u,Xe,fr){const Ar="=="!==u&&"!="!==u;return class i{constructor(u,Xe,fr){this.type=sa,this.lhs=u,this.rhs=Xe,this.collator=fr,this.hasUntypedArgument="value"===u.type.kind||"value"===Xe.type.kind}static parse(u,Xe){if(3!==u.length&&4!==u.length)return Xe.error("Expected two or three arguments.");const fr=u[0];let _r=Xe.parse(u[1],1,ya);if(!_r)return null;if(!Fe(fr,_r.type))return Xe.concat(1).error(`"${fr}" comparisons are not supported for type '${wt(_r.type)}'.`);let wr=Xe.parse(u[2],2,ya);if(!wr)return null;if(!Fe(fr,wr.type))return Xe.concat(2).error(`"${fr}" comparisons are not supported for type '${wt(wr.type)}'.`);if(_r.type.kind!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error(`Cannot compare types '${wt(_r.type)}' and '${wt(wr.type)}'.`);Ar&&("value"===_r.type.kind&&"value"!==wr.type.kind?_r=new le(wr.type,[_r]):"value"!==_r.type.kind&&"value"===wr.type.kind&&(wr=new le(_r.type,[wr])));let Kr=null;if(4===u.length){if("string"!==_r.type.kind&&"string"!==wr.type.kind&&"value"!==_r.type.kind&&"value"!==wr.type.kind)return Xe.error("Cannot use collator to compare non-string types.");if(Kr=Xe.parse(u[3],3,ol),!Kr)return null}return new i(_r,wr,Kr)}evaluate(_r){const wr=this.lhs.evaluate(_r),Kr=this.rhs.evaluate(_r);if(Ar&&this.hasUntypedArgument){const Xe=ne(wr),fr=ne(Kr);if(Xe.kind!==fr.kind||"string"!==Xe.kind&&"number"!==Xe.kind)throw new ae(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${Xe.kind}, ${fr.kind}) instead.`)}if(this.collator&&!Ar&&this.hasUntypedArgument){const u=ne(wr),fr=ne(Kr);if("string"!==u.kind||"string"!==fr.kind)return Xe(_r,wr,Kr)}return this.collator?fr(_r,wr,Kr,this.collator.evaluate(_r)):Xe(_r,wr,Kr)}eachChild(u){u(this.lhs),u(this.rhs),this.collator&&u(this.collator)}outputDefined(){return!0}}}const Ll=$e("==",(function(u,Xe,fr){return Xe===fr}),Te),Dl=$e("!=",(function(u,Xe,fr){return Xe!==fr}),(function(u,Xe,fr,Ar){return!Te(0,Xe,fr,Ar)})),Yl=$e("<",(function(u,Xe,fr){return Xe<fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)<0})),Nl=$e(">",(function(u,Xe,fr){return Xe>fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)>0})),Ol=$e("<=",(function(u,Xe,fr){return Xe<=fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)<=0})),jl=$e(">=",(function(u,Xe,fr){return Xe>=fr}),(function(u,Xe,fr,Ar){return Ar.compare(Xe,fr)>=0}));class qe{constructor(u,Xe,fr){this.type=ol,this.locale=fr,this.caseSensitive=u,this.diacriticSensitive=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected one argument.");const fr=u[1];if("object"!=typeof fr||Array.isArray(fr))return Xe.error("Collator options argument must be an object.");const Ar=Xe.parse(void 0!==fr["case-sensitive"]&&fr["case-sensitive"],1,sa);if(!Ar)return null;const _r=Xe.parse(void 0!==fr["diacritic-sensitive"]&&fr["diacritic-sensitive"],1,sa);if(!_r)return null;let wr=null;return fr.locale&&(wr=Xe.parse(fr.locale,1,ss),!wr)?null:new qe(Ar,_r,wr)}evaluate(u){return new Xt(this.caseSensitive.evaluate(u),this.diacriticSensitive.evaluate(u),this.locale?this.locale.evaluate(u):null)}eachChild(u){u(this.caseSensitive),u(this.diacriticSensitive),this.locale&&u(this.locale)}outputDefined(){return!1}}class Ne{constructor(u,Xe,fr,Ar,_r){this.type=ss,this.number=u,this.locale=Xe,this.currency=fr,this.minFractionDigits=Ar,this.maxFractionDigits=_r}static parse(u,Xe){if(3!==u.length)return Xe.error("Expected two arguments.");const fr=Xe.parse(u[1],1,Po);if(!fr)return null;const Ar=u[2];if("object"!=typeof Ar||Array.isArray(Ar))return Xe.error("NumberFormat options argument must be an object.");let _r=null;if(Ar.locale&&(_r=Xe.parse(Ar.locale,1,ss),!_r))return null;let wr=null;if(Ar.currency&&(wr=Xe.parse(Ar.currency,1,ss),!wr))return null;let Kr=null;if(Ar["min-fraction-digits"]&&(Kr=Xe.parse(Ar["min-fraction-digits"],1,Po),!Kr))return null;let In=null;return Ar["max-fraction-digits"]&&(In=Xe.parse(Ar["max-fraction-digits"],1,Po),!In)?null:new Ne(fr,_r,wr,Kr,In)}evaluate(u){return new Intl.NumberFormat(this.locale?this.locale.evaluate(u):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(u):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(u):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(u):void 0}).format(this.number.evaluate(u))}eachChild(u){u(this.number),this.locale&&u(this.locale),this.currency&&u(this.currency),this.minFractionDigits&&u(this.minFractionDigits),this.maxFractionDigits&&u(this.maxFractionDigits)}outputDefined(){return!1}}class Ze{constructor(u){this.type=sl,this.sections=u}static parse(u,Xe){if(u.length<2)return Xe.error("Expected at least one argument.");const fr=u[1];if(!Array.isArray(fr)&&"object"==typeof fr)return Xe.error("First argument must be an image or text section.");const Ar=[];let _r=!1;for(let fr=1;fr<=u.length-1;++fr){const wr=u[fr];if(_r&&"object"==typeof wr&&!Array.isArray(wr)){_r=!1;let u=null;if(wr["font-scale"]&&(u=Xe.parse(wr["font-scale"],1,Po),!u))return null;let fr=null;if(wr["text-font"]&&(fr=Xe.parse(wr["text-font"],1,bt(ss)),!fr))return null;let Kr=null;if(wr["text-color"]&&(Kr=Xe.parse(wr["text-color"],1,aa),!Kr))return null;const In=Ar[Ar.length-1];In.scale=u,In.font=fr,In.textColor=Kr}else{const wr=Xe.parse(u[fr],1,ya);if(!wr)return null;const Kr=wr.type.kind;if("string"!==Kr&&"value"!==Kr&&"null"!==Kr&&"resolvedImage"!==Kr)return Xe.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");_r=!0,Ar.push({content:wr,scale:null,font:null,textColor:null})}}return new Ze(Ar)}evaluate(u){return new Yt(this.sections.map((Xe=>{const fr=Xe.content.evaluate(u);return ne(fr)===cl?new Ht("",fr,null,null,null):new Ht(ie(fr),null,Xe.scale?Xe.scale.evaluate(u):null,Xe.font?Xe.font.evaluate(u).join(","):null,Xe.textColor?Xe.textColor.evaluate(u):null)})))}eachChild(u){for(const Xe of this.sections)u(Xe.content),Xe.scale&&u(Xe.scale),Xe.font&&u(Xe.font),Xe.textColor&&u(Xe.textColor)}outputDefined(){return!1}}class Ge{constructor(u){this.type=cl,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error("Expected two arguments.");const fr=Xe.parse(u[1],1,ss);return fr?new Ge(fr):Xe.error("No image name provided.")}evaluate(u){const Xe=this.input.evaluate(u),fr=te.fromString(Xe);return fr&&u.availableImages&&(fr.available=u.availableImages.indexOf(Xe)>-1),fr}eachChild(u){u(this.input)}outputDefined(){return!1}}class Ke{constructor(u){this.type=Po,this.input=u}static parse(u,Xe){if(2!==u.length)return Xe.error(`Expected 1 argument, but found ${u.length-1} instead.`);const fr=Xe.parse(u[1],1);return fr?"array"!==fr.type.kind&&"string"!==fr.type.kind&&"value"!==fr.type.kind?Xe.error(`Expected argument of type string or array, but found ${wt(fr.type)} instead.`):new Ke(fr):null}evaluate(u){const Xe=this.input.evaluate(u);if("string"==typeof Xe)return[...Xe].length;if(Array.isArray(Xe))return Xe.length;throw new ae(`Expected value to be of type string or array, but found ${wt(ne(Xe))} instead.`)}eachChild(u){u(this.input)}outputDefined(){return!1}}const Ql=8192;function He(u,Xe){const fr=(180+u[0])/360,Ar=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_r=Math.pow(2,Xe.z);return[Math.round(fr*_r*Ql),Math.round(Ar*_r*Ql)]}function Ye(u,Xe){const fr=Math.pow(2,Xe.z);return[(_r=(u[0]/Ql+Xe.x)/fr,360*_r-180),(Ar=(u[1]/Ql+Xe.y)/fr,360/Math.PI*Math.atan(Math.exp((180-360*Ar)*Math.PI/180))-90)];var Ar,_r}function Je(u,Xe){u[0]=Math.min(u[0],Xe[0]),u[1]=Math.min(u[1],Xe[1]),u[2]=Math.max(u[2],Xe[0]),u[3]=Math.max(u[3],Xe[1])}function We(u,Xe){return!(u[0]<=Xe[0]||u[2]>=Xe[2]||u[1]<=Xe[1]||u[3]>=Xe[3])}function Qe(u,Xe,fr){const Ar=u[0]-Xe[0],_r=u[1]-Xe[1],wr=u[0]-fr[0],Kr=u[1]-fr[1];return Ar*Kr-wr*_r==0&&Ar*wr<=0&&_r*Kr<=0}function tr(u,Xe,fr,Ar){return 0!=(_r=[Ar[0]-fr[0],Ar[1]-fr[1]])[0]*(wr=[Xe[0]-u[0],Xe[1]-u[1]])[1]-_r[1]*wr[0]&&!(!ar(u,Xe,fr,Ar)||!ar(fr,Ar,u,Xe));var _r,wr}function er(u,Xe,fr){for(const Ar of fr)for(let fr=0;fr<Ar.length-1;++fr)if(tr(u,Xe,Ar[fr],Ar[fr+1]))return!0;return!1}function rr(u,Xe,fr=!1){let Ar=!1;for(const In of Xe)for(let Xe=0;Xe<In.length-1;Xe++){if(Qe(u,In[Xe],In[Xe+1]))return fr;(wr=In[Xe])[1]>(_r=u)[1]!=(Kr=In[Xe+1])[1]>_r[1]&&_r[0]<(Kr[0]-wr[0])*(_r[1]-wr[1])/(Kr[1]-wr[1])+wr[0]&&(Ar=!Ar)}var _r,wr,Kr;return Ar}function nr(u,Xe){for(const fr of Xe)if(rr(u,fr))return!0;return!1}function ir(u,Xe){for(const fr of u)if(!rr(fr,Xe))return!1;for(let fr=0;fr<u.length-1;++fr)if(er(u[fr],u[fr+1],Xe))return!1;return!0}function sr(u,Xe){for(const fr of Xe)if(ir(u,fr))return!0;return!1}function ar(u,Xe,fr,Ar){const _r=Ar[0]-fr[0],wr=Ar[1]-fr[1],Kr=(u[0]-fr[0])*wr-_r*(u[1]-fr[1]),In=(Xe[0]-fr[0])*wr-_r*(Xe[1]-fr[1]);return Kr>0&&In<0||Kr<0&&In>0}function or(u,Xe,fr){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=[];for(let Ar=0;Ar<u[_r].length;Ar++){const Kr=He(u[_r][Ar],fr);Je(Xe,Kr),wr.push(Kr)}Ar.push(wr)}return Ar}function lr(u,Xe,fr){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=or(u[_r],Xe,fr);Ar.push(wr)}return Ar}function ur(u,Xe,fr,Ar){if(u[0]<fr[0]||u[0]>fr[2]){const Xe=.5*Ar;let _r=u[0]-fr[0]>Xe?-Ar:fr[0]-u[0]>Xe?Ar:0;0===_r&&(_r=u[0]-fr[2]>Xe?-Ar:fr[2]-u[0]>Xe?Ar:0),u[0]+=_r}Je(Xe,u)}function cr(u,Xe,fr,Ar){const _r=Math.pow(2,Ar.z)*Ql,wr=[Ar.x*Ql,Ar.y*Ql],Kr=[];for(const Ar of u)for(const u of Ar){const Ar=[u.x+wr[0],u.y+wr[1]];ur(Ar,Xe,fr,_r),Kr.push(Ar)}return Kr}function hr(u,Xe,fr,Ar){const _r=Math.pow(2,Ar.z)*Ql,wr=[Ar.x*Ql,Ar.y*Ql],Kr=[];for(const fr of u){const u=[];for(const Ar of fr){const fr=[Ar.x+wr[0],Ar.y+wr[1]];Je(Xe,fr),u.push(fr)}Kr.push(u)}if(Xe[2]-Xe[0]<=_r/2){(In=Xe)[0]=In[1]=1/0,In[2]=In[3]=-1/0;for(const u of Kr)for(const Ar of u)ur(Ar,Xe,fr,_r)}var In;return Kr}class pr{constructor(u,Xe){this.type=sa,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'within' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type){const u=[];for(const fr of Xe.features){const{type:Xe,coordinates:Ar}=fr.geometry;"Polygon"===Xe&&u.push(Ar),"MultiPolygon"===Xe&&u.push(...Ar)}if(u.length)return new pr(Xe,{type:"MultiPolygon",coordinates:u})}else if("Feature"===Xe.type){const u=Xe.geometry.type;if("Polygon"===u||"MultiPolygon"===u)return new pr(Xe,Xe.geometry)}else if("Polygon"===Xe.type||"MultiPolygon"===Xe.type)return new pr(Xe,Xe)}return Xe.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const fr=[1/0,1/0,-1/0,-1/0],Ar=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,Ar,_r),Kr=cr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!rr(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,Ar,_r),Kr=cr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!nr(u,wr))return!1}return!0}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const fr=[1/0,1/0,-1/0,-1/0],Ar=[1/0,1/0,-1/0,-1/0],_r=u.canonicalID();if("Polygon"===Xe.type){const wr=or(Xe.coordinates,Ar,_r),Kr=hr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!ir(u,wr))return!1}if("MultiPolygon"===Xe.type){const wr=lr(Xe.coordinates,Ar,_r),Kr=hr(u.geometry(),fr,Ar,_r);if(!We(fr,Ar))return!1;for(const u of Kr)if(!sr(u,wr))return!1}return!0}(u,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let ql=class{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:fr}=this,Ar=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(fr(Ar,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=Ar}_down(u){const{data:Xe,compare:fr}=this,Ar=this.length>>1,_r=Xe[u];for(;u<Ar;){let Ar=1+(u<<1);const wr=Ar+1;if(wr<this.length&&fr(Xe[wr],Xe[Ar])<0&&(Ar=wr),fr(Xe[Ar],_r)>=0)break;Xe[u]=Xe[Ar],u=Ar}Xe[u]=_r}};function dr(u,Xe,fr,Ar,_r){yr(u,Xe,fr,Ar||u.length-1,_r||gr)}function yr(u,Xe,fr,Ar,_r){for(;Ar>fr;){if(Ar-fr>600){var wr=Ar-fr+1,Kr=Xe-fr+1,In=Math.log(wr),io=.5*Math.exp(2*In/3),no=.5*Math.sqrt(In*io*(wr-io)/wr)*(Kr-wr/2<0?-1:1);yr(u,Xe,Math.max(fr,Math.floor(Xe-Kr*io/wr+no)),Math.min(Ar,Math.floor(Xe+(wr-Kr)*io/wr+no)),_r)}var oo=u[Xe],so=fr,ao=Ar;for(mr(u,fr,Xe),_r(u[Ar],oo)>0&&mr(u,fr,Ar);so<ao;){for(mr(u,so,ao),so++,ao--;_r(u[so],oo)<0;)so++;for(;_r(u[ao],oo)>0;)ao--}0===_r(u[fr],oo)?mr(u,fr,ao):mr(u,++ao,Ar),ao<=Xe&&(fr=ao+1),Xe<=ao&&(Ar=ao-1)}}function mr(u,Xe,fr){var Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function gr(u,Xe){return u<Xe?-1:u>Xe?1:0}function xr(u,Xe){if(u.length<=1)return[u];const fr=[];let Ar,_r;for(const Xe of u){const u=br(Xe);0!==u&&(Xe.area=Math.abs(u),void 0===_r&&(_r=u<0),_r===u<0?(Ar&&fr.push(Ar),Ar=[Xe]):Ar.push(Xe))}if(Ar&&fr.push(Ar),Xe>1)for(let u=0;u<fr.length;u++)fr[u].length<=Xe||(dr(fr[u],Xe,1,fr[u].length-1,vr),fr[u]=fr[u].slice(0,Xe));return fr}function vr(u,Xe){return Xe.area-u.area}function br(u){let Xe=0;for(let fr,Ar,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++)fr=u[_r],Ar=u[Kr],Xe+=(Ar.x-fr.x)*(fr.y+Ar.y);return Xe}const $l=1/298.257223563,ec=$l*(2-$l),rc=Math.PI/180;class Sr{constructor(u){const Xe=6378.137*rc*1e3,fr=Math.cos(u*rc),Ar=1/(1-ec*(1-fr*fr)),_r=Math.sqrt(Ar);this.kx=Xe*_r*fr,this.ky=Xe*_r*Ar*(1-ec)}distance(u,Xe){const fr=this.wrap(u[0]-Xe[0])*this.kx,Ar=(u[1]-Xe[1])*this.ky;return Math.sqrt(fr*fr+Ar*Ar)}pointOnLine(u,Xe){let fr,Ar,_r,wr,Kr=1/0;for(let In=0;In<u.length-1;In++){let io=u[In][0],no=u[In][1],oo=this.wrap(u[In+1][0]-io)*this.kx,so=(u[In+1][1]-no)*this.ky,ao=0;0===oo&&0===so||(ao=(this.wrap(Xe[0]-io)*this.kx*oo+(Xe[1]-no)*this.ky*so)/(oo*oo+so*so),ao>1?(io=u[In+1][0],no=u[In+1][1]):ao>0&&(io+=oo/this.kx*ao,no+=so/this.ky*ao)),oo=this.wrap(Xe[0]-io)*this.kx,so=(Xe[1]-no)*this.ky;const co=oo*oo+so*so;co<Kr&&(Kr=co,fr=io,Ar=no,_r=In,wr=ao)}return{point:[fr,Ar],index:_r,t:Math.max(0,Math.min(1,wr))}}wrap(u){for(;u<-180;)u+=360;for(;u>180;)u-=360;return u}}function kr(u,Xe){return Xe[0]-u[0]}function Mr(u){return u[1]-u[0]+1}function Ir(u,Xe){return u[1]>=u[0]&&u[1]<Xe}function zr(u,Xe){if(u[0]>u[1])return[null,null];const fr=Mr(u);if(Xe){if(2===fr)return[u,null];const Xe=Math.floor(fr/2);return[[u[0],u[0]+Xe],[u[0]+Xe,u[1]]]}if(1===fr)return[u,null];const Ar=Math.floor(fr/2)-1;return[[u[0],u[0]+Ar],[u[0]+Ar+1,u[1]]]}function Pr(u,Xe){if(!Ir(Xe,u.length))return[1/0,1/0,-1/0,-1/0];const fr=[1/0,1/0,-1/0,-1/0];for(let Ar=Xe[0];Ar<=Xe[1];++Ar)Je(fr,u[Ar]);return fr}function Cr(u){const Xe=[1/0,1/0,-1/0,-1/0];for(const fr of u)for(const u of fr)Je(Xe,u);return Xe}function Br(u){return u[0]!==-1/0&&u[1]!==-1/0&&u[2]!==1/0&&u[3]!==1/0}function Vr(u,Xe,fr){if(!Br(u)||!Br(Xe))return NaN;let Ar=0,_r=0;return u[2]<Xe[0]&&(Ar=Xe[0]-u[2]),u[0]>Xe[2]&&(Ar=u[0]-Xe[2]),u[1]>Xe[3]&&(_r=u[1]-Xe[3]),u[3]<Xe[1]&&(_r=Xe[1]-u[3]),fr.distance([0,0],[Ar,_r])}function Er(u,Xe,fr){const Ar=fr.pointOnLine(Xe,u);return fr.distance(u,Ar.point)}function Fr(u,Xe,fr,Ar,_r){const wr=Math.min(Er(u,[fr,Ar],_r),Er(Xe,[fr,Ar],_r)),Kr=Math.min(Er(fr,[u,Xe],_r),Er(Ar,[u,Xe],_r));return Math.min(wr,Kr)}function Tr(u,Xe,fr,Ar,_r){if(!Ir(Xe,u.length)||!Ir(Ar,fr.length))return 1/0;let wr=1/0;for(let Kr=Xe[0];Kr<Xe[1];++Kr){const Xe=u[Kr],In=u[Kr+1];for(let u=Ar[0];u<Ar[1];++u){const Ar=fr[u],Kr=fr[u+1];if(tr(Xe,In,Ar,Kr))return 0;wr=Math.min(wr,Fr(Xe,In,Ar,Kr,_r))}}return wr}function $r(u,Xe,fr,Ar,_r){if(!Ir(Xe,u.length)||!Ir(Ar,fr.length))return NaN;let wr=1/0;for(let Kr=Xe[0];Kr<=Xe[1];++Kr)for(let Xe=Ar[0];Xe<=Ar[1];++Xe)if(wr=Math.min(wr,_r.distance(u[Kr],fr[Xe])),0===wr)return wr;return wr}function Lr(u,Xe,fr){if(rr(u,Xe,!0))return 0;let Ar=1/0;for(const _r of Xe){const Xe=_r[0],wr=_r[_r.length-1];if(Xe!==wr&&(Ar=Math.min(Ar,Er(u,[wr,Xe],fr)),0===Ar))return Ar;const Kr=fr.pointOnLine(_r,u);if(Ar=Math.min(Ar,fr.distance(u,Kr.point)),0===Ar)return Ar}return Ar}function Dr(u,Xe,fr,Ar){if(!Ir(Xe,u.length))return NaN;for(let Ar=Xe[0];Ar<=Xe[1];++Ar)if(rr(u[Ar],fr,!0))return 0;let _r=1/0;for(let wr=Xe[0];wr<Xe[1];++wr){const Xe=u[wr],Kr=u[wr+1];for(const u of fr)for(let fr=0,wr=u.length,In=wr-1;fr<wr;In=fr++){const wr=u[In],io=u[fr];if(tr(Xe,Kr,wr,io))return 0;_r=Math.min(_r,Fr(Xe,Kr,wr,io,Ar))}}return _r}function Or(u,Xe){for(const fr of u)for(const u of fr)if(rr(u,Xe,!0))return!0;return!1}function jr(u,Xe,fr,Ar=1/0){const _r=Cr(u),wr=Cr(Xe);if(Ar!==1/0&&Vr(_r,wr,fr)>=Ar)return Ar;if(We(_r,wr)){if(Or(u,Xe))return 0}else if(Or(Xe,u))return 0;let Kr=1/0;for(const Ar of u)for(let u=0,_r=Ar.length,wr=_r-1;u<_r;wr=u++){const _r=Ar[wr],In=Ar[u];for(const u of Xe)for(let Xe=0,Ar=u.length,wr=Ar-1;Xe<Ar;wr=Xe++){const Ar=u[wr],io=u[Xe];if(tr(_r,In,Ar,io))return 0;Kr=Math.min(Kr,Fr(_r,In,Ar,io,fr))}}return Kr}function Rr(u,Xe,fr,Ar,_r,wr){if(!wr)return;const Kr=Vr(Pr(Ar,wr),_r,fr);Kr<Xe&&u.push([Kr,wr,[0,0]])}function Ur(u,Xe,fr,Ar,_r,wr,Kr){if(!wr||!Kr)return;const In=Vr(Pr(Ar,wr),Pr(_r,Kr),fr);In<Xe&&u.push([In,wr,Kr])}function qr(u,Xe,fr,Ar,_r=1/0){let wr=Math.min(Ar.distance(u[0],fr[0][0]),_r);if(0===wr)return wr;const Kr=new ql([[0,[0,u.length-1],[0,0]]],kr),In=Cr(fr);for(;Kr.length>0;){const _r=Kr.pop();if(_r[0]>=wr)continue;const io=_r[1],no=Xe?50:100;if(Mr(io)<=no){if(!Ir(io,u.length))return NaN;if(Xe){const Xe=Dr(u,io,fr,Ar);if(isNaN(Xe)||0===Xe)return Xe;wr=Math.min(wr,Xe)}else for(let Xe=io[0];Xe<=io[1];++Xe){const _r=Lr(u[Xe],fr,Ar);if(wr=Math.min(wr,_r),0===wr)return 0}}else{const fr=zr(io,Xe);Rr(Kr,wr,Ar,u,In,fr[0]),Rr(Kr,wr,Ar,u,In,fr[1])}}return wr}function Nr(u,Xe,fr,Ar,_r,wr=1/0){let Kr=Math.min(wr,_r.distance(u[0],fr[0]));if(0===Kr)return Kr;const In=new ql([[0,[0,u.length-1],[0,fr.length-1]]],kr);for(;In.length>0;){const wr=In.pop();if(wr[0]>=Kr)continue;const io=wr[1],no=wr[2],oo=Xe?50:100,so=Ar?50:100;if(Mr(io)<=oo&&Mr(no)<=so){if(!Ir(io,u.length)&&Ir(no,fr.length))return NaN;let wr;if(Xe&&Ar)wr=Tr(u,io,fr,no,_r),Kr=Math.min(Kr,wr);else if(Xe&&!Ar){const Xe=u.slice(io[0],io[1]+1);for(let u=no[0];u<=no[1];++u)if(wr=Er(fr[u],Xe,_r),Kr=Math.min(Kr,wr),0===Kr)return Kr}else if(!Xe&&Ar){const Xe=fr.slice(no[0],no[1]+1);for(let fr=io[0];fr<=io[1];++fr)if(wr=Er(u[fr],Xe,_r),Kr=Math.min(Kr,wr),0===Kr)return Kr}else wr=$r(u,io,fr,no,_r),Kr=Math.min(Kr,wr)}else{const wr=zr(io,Xe),oo=zr(no,Ar);Ur(In,Kr,_r,u,fr,wr[0],oo[0]),Ur(In,Kr,_r,u,fr,wr[0],oo[1]),Ur(In,Kr,_r,u,fr,wr[1],oo[0]),Ur(In,Kr,_r,u,fr,wr[1],oo[1])}}return Kr}function Zr(u){return"MultiPolygon"===u.type?u.coordinates.map((u=>({type:"Polygon",coordinates:u}))):"MultiLineString"===u.type?u.coordinates.map((u=>({type:"LineString",coordinates:u}))):"MultiPoint"===u.type?u.coordinates.map((u=>({type:"Point",coordinates:u}))):[u]}class Gr{constructor(u,Xe){this.type=Po,this.geojson=u,this.geometries=Xe}static parse(u,Xe){if(2!==u.length)return Xe.error(`'distance' expression requires exactly one argument, but found ${u.length-1} instead.`);if(re(u[1])){const Xe=u[1];if("FeatureCollection"===Xe.type)return new Gr(Xe,Xe.features.map((u=>Zr(u.geometry))).flat());if("Feature"===Xe.type)return new Gr(Xe,Zr(Xe.geometry));if("type"in Xe&&"coordinates"in Xe)return new Gr(Xe,Zr(Xe))}return Xe.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(u){if(null!=u.geometry()&&null!=u.canonicalID()){if("Point"===u.geometryType())return function(u,Xe){const fr=u.geometry(),Ar=fr.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===fr.length)return NaN;const _r=new Sr(Ar[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(Ar,!1,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(Ar,!1,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(Ar,!1,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("LineString"===u.geometryType())return function(u,Xe){const fr=u.geometry(),Ar=fr.flat().map((Xe=>Ye([Xe.x,Xe.y],u.canonical)));if(0===fr.length)return NaN;const _r=new Sr(Ar[0][1]);let wr=1/0;for(const u of Xe){switch(u.type){case"Point":wr=Math.min(wr,Nr(Ar,!0,[u.coordinates],!1,_r,wr));break;case"LineString":wr=Math.min(wr,Nr(Ar,!0,u.coordinates,!0,_r,wr));break;case"Polygon":wr=Math.min(wr,qr(Ar,!0,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries);if("Polygon"===u.geometryType())return function(u,Xe){const fr=u.geometry();if(0===fr.length||0===fr[0].length)return NaN;const Ar=xr(fr,0).map((Xe=>Xe.map((Xe=>Xe.map((Xe=>Ye([Xe.x,Xe.y],u.canonical))))))),_r=new Sr(Ar[0][0][0][1]);let wr=1/0;for(const u of Xe)for(const Xe of Ar){switch(u.type){case"Point":wr=Math.min(wr,qr([u.coordinates],!1,Xe,_r,wr));break;case"LineString":wr=Math.min(wr,qr(u.coordinates,!0,Xe,_r,wr));break;case"Polygon":wr=Math.min(wr,jr(Xe,u.coordinates,_r,wr))}if(0===wr)return wr}return wr}(u,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const nc={"==":Ll,"!=":Dl,">":Nl,"<":Yl,">=":jl,"<=":Ol,array:le,at:me,boolean:le,case:be,coalesce:Ee,collator:qe,format:Ze,image:Ge,in:ge,"index-of":xe,interpolate:Be,"interpolate-hcl":Be,"interpolate-lab":Be,length:Ke,let:de,literal:se,match:ve,number:le,"number-format":Ne,object:le,slice:we,step:Ae,string:le,"to-boolean":ce,"to-color":ce,"to-number":ce,"to-string":ce,var:ye,within:pr,distance:Gr};class Xr{constructor(u,Xe,fr,Ar){this.name=u,this.type=Xe,this._evaluate=fr,this.args=Ar}evaluate(u){return this._evaluate(u,this.args)}eachChild(u){this.args.forEach(u)}outputDefined(){return!1}static parse(u,Xe){const fr=u[0],Ar=Xr.definitions[fr];if(!Ar)return Xe.error(`Unknown expression "${fr}". If you wanted a literal array, use ["literal", [...]].`,0);const _r=Array.isArray(Ar)?Ar[0]:Ar.type,wr=Array.isArray(Ar)?[[Ar[1],Ar[2]]]:Ar.overloads,Kr=wr.filter((([Xe])=>!Array.isArray(Xe)||Xe.length===u.length-1));let In=null;for(const[Ar,wr]of Kr){In=new fe(Xe.registry,Qr,Xe.path,null,Xe.scope);const Kr=[];let io=!1;for(let Xe=1;Xe<u.length;Xe++){const fr=u[Xe],_r=Array.isArray(Ar)?Ar[Xe-1]:Ar.type,wr=In.parse(fr,1+Kr.length,_r);if(!wr){io=!0;break}Kr.push(wr)}if(!io)if(Array.isArray(Ar)&&Ar.length!==Kr.length)In.error(`Expected ${Ar.length} arguments, but found ${Kr.length} instead.`);else{for(let u=0;u<Kr.length;u++){const Xe=Array.isArray(Ar)?Ar[u]:Ar.type,fr=Kr[u];In.concat(u+1).checkSubtype(Xe,fr.type)}if(0===In.errors.length)return new Xr(fr,_r,wr,Kr)}}if(1===Kr.length)Xe.errors.push(...In.errors);else{const fr=(Kr.length?Kr:wr).map((([u])=>{return Xe=u,Array.isArray(Xe)?`(${Xe.map(wt).join(", ")})`:`(${wt(Xe.type)}...)`;var Xe})).join(" | "),Ar=[];for(let fr=1;fr<u.length;fr++){const _r=Xe.parse(u[fr],1+Ar.length);if(!_r)return null;Ar.push(wt(_r.type))}Xe.error(`Expected arguments of type ${fr}, but found (${Ar.join(", ")}) instead.`)}return null}static register(u,Xe){Xr.definitions=Xe;for(const fr in Xe)u[fr]=Xr}}function Hr(u,[Xe,fr,Ar,_r]){Xe=Xe.evaluate(u),fr=fr.evaluate(u),Ar=Ar.evaluate(u);const wr=_r?_r.evaluate(u):1,Kr=ee(Xe,fr,Ar,wr);if(Kr)throw new ae(Kr);return new Kt(Xe/255,fr/255,Ar/255,wr,!1)}function Yr(u,Xe){return u in Xe}function Jr(u,Xe){const fr=Xe[u];return void 0===fr?null:fr}function Wr(u){return{type:u}}function Qr(u){if(u instanceof ye)return Qr(u.boundExpression);if(u instanceof Xr&&"error"===u.name)return!1;if(u instanceof qe)return!1;if(u instanceof pr)return!1;if(u instanceof Gr)return!1;const Xe=u instanceof ce||u instanceof le;let fr=!0;return u.eachChild((u=>{fr=Xe?fr&&Qr(u):fr&&u instanceof se})),!!fr&&tn(u)&&rn(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function tn(u){if(u instanceof Xr){if("get"===u.name&&1===u.args.length)return!1;if("feature-state"===u.name)return!1;if("has"===u.name&&1===u.args.length)return!1;if("properties"===u.name||"geometry-type"===u.name||"id"===u.name)return!1;if(/^filter-/.test(u.name))return!1}if(u instanceof pr)return!1;if(u instanceof Gr)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!tn(u)&&(Xe=!1)})),Xe}function en(u){if(u instanceof Xr&&"feature-state"===u.name)return!1;let Xe=!0;return u.eachChild((u=>{Xe&&!en(u)&&(Xe=!1)})),Xe}function rn(u,Xe){if(u instanceof Xr&&Xe.indexOf(u.name)>=0)return!1;let fr=!0;return u.eachChild((u=>{fr&&!rn(u,Xe)&&(fr=!1)})),fr}function nn(u){return{result:"success",value:u}}function sn(u){return{result:"error",value:u}}function an(u){return"data-driven"===u["property-type"]||"cross-faded-data-driven"===u["property-type"]}function on(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function ln(u){return!!u.expression&&u.expression.interpolated}function un(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":null===u?"null":typeof u}function cn(u){return"object"==typeof u&&null!==u&&!Array.isArray(u)}function hn(u){return u}function pn(u,Xe){const fr="color"===Xe.type,Ar=u.stops&&"object"==typeof u.stops[0][0],_r=Ar||!(Ar||void 0!==u.property),wr=u.type||(ln(Xe)?"exponential":"interval");if(fr||"padding"===Xe.type){const Ar=fr?Kt.parse:Jt.parse;(u=st({},u)).stops&&(u.stops=u.stops.map((u=>[u[0],Ar(u[1])]))),u.default=Ar(u.default?u.default:Xe.default)}if(u.colorSpace&&"rgb"!==(Kr=u.colorSpace)&&"hcl"!==Kr&&"lab"!==Kr)throw new Error(`Unknown color space: "${u.colorSpace}"`);var Kr;let In,io,no;if("exponential"===wr)In=mn;else if("interval"===wr)In=yn;else if("categorical"===wr){In=dn,io=Object.create(null);for(const Xe of u.stops)io[Xe[0]]=Xe[1];no=typeof u.stops[0][0]}else{if("identity"!==wr)throw new Error(`Unknown function type "${wr}"`);In=gn}if(Ar){const fr={},Ar=[];for(let Xe=0;Xe<u.stops.length;Xe++){const _r=u.stops[Xe],wr=_r[0].zoom;void 0===fr[wr]&&(fr[wr]={zoom:wr,type:u.type,property:u.property,default:u.default,stops:[]},Ar.push(wr)),fr[wr].stops.push([_r[0].value,_r[1]])}const _r=[];for(const u of Ar)_r.push([fr[u].zoom,pn(fr[u],Xe)]);const wr={name:"linear"};return{kind:"composite",interpolationType:wr,interpolationFactor:Be.interpolationFactor.bind(void 0,wr),zoomStops:_r.map((u=>u[0])),evaluate:({zoom:fr},Ar)=>mn({stops:_r,base:u.base},Xe,fr).evaluate(fr,Ar)}}if(_r){const fr="exponential"===wr?{name:"exponential",base:void 0!==u.base?u.base:1}:null;return{kind:"camera",interpolationType:fr,interpolationFactor:Be.interpolationFactor.bind(void 0,fr),zoomStops:u.stops.map((u=>u[0])),evaluate:({zoom:fr})=>In(u,Xe,fr,io,no)}}return{kind:"source",evaluate(fr,Ar){const _r=Ar&&Ar.properties?Ar.properties[u.property]:void 0;return void 0===_r?fn(u.default,Xe.default):In(u,Xe,_r,io,no)}}}function fn(u,Xe,fr){return void 0!==u?u:void 0!==Xe?Xe:void 0!==fr?fr:void 0}function dn(u,Xe,fr,Ar,_r){return fn(typeof fr===_r?Ar[fr]:void 0,u.default,Xe.default)}function yn(u,Xe,fr){if("number"!==un(fr))return fn(u.default,Xe.default);const Ar=u.stops.length;if(1===Ar)return u.stops[0][1];if(fr<=u.stops[0][0])return u.stops[0][1];if(fr>=u.stops[Ar-1][0])return u.stops[Ar-1][1];const _r=_e(u.stops.map((u=>u[0])),fr);return u.stops[_r][1]}function mn(u,Xe,fr){const Ar=void 0!==u.base?u.base:1;if("number"!==un(fr))return fn(u.default,Xe.default);const _r=u.stops.length;if(1===_r)return u.stops[0][1];if(fr<=u.stops[0][0])return u.stops[0][1];if(fr>=u.stops[_r-1][0])return u.stops[_r-1][1];const wr=_e(u.stops.map((u=>u[0])),fr),Kr=function(u,Xe,fr,Ar){const _r=Ar-fr,wr=u-fr;return 0===_r?0:1===Xe?wr/_r:(Math.pow(Xe,wr)-1)/(Math.pow(Xe,_r)-1)}(fr,Ar,u.stops[wr][0],u.stops[wr+1][0]),In=u.stops[wr][1],io=u.stops[wr+1][1],no=Kl[Xe.type]||hn;return"function"==typeof In.evaluate?{evaluate(...Xe){const fr=In.evaluate.apply(void 0,Xe),Ar=io.evaluate.apply(void 0,Xe);if(void 0!==fr&&void 0!==Ar)return no(fr,Ar,Kr,u.colorSpace)}}:no(In,io,Kr,u.colorSpace)}function gn(u,Xe,fr){switch(Xe.type){case"color":fr=Kt.parse(fr);break;case"formatted":fr=Yt.fromString(fr.toString());break;case"resolvedImage":fr=te.fromString(fr.toString());break;case"padding":fr=Jt.parse(fr);break;default:un(fr)===Xe.type||"enum"===Xe.type&&Xe.values[fr]||(fr=void 0)}return fn(fr,u.default,Xe.default)}Xr.register(nc,{error:[{kind:"error"},[ss],(u,[Xe])=>{throw new ae(Xe.evaluate(u))}],typeof:[ss,[ya],(u,[Xe])=>wt(ne(Xe.evaluate(u)))],"to-rgba":[bt(Po,4),[aa],(u,[Xe])=>{const[fr,Ar,_r,wr]=Xe.evaluate(u).rgb;return[255*fr,255*Ar,255*_r,wr]}],rgb:[aa,[Po,Po,Po],Hr],rgba:[aa,[Po,Po,Po,Po],Hr],has:{type:sa,overloads:[[[ss],(u,[Xe])=>Yr(Xe.evaluate(u),u.properties())],[[ss,fa],(u,[Xe,fr])=>Yr(Xe.evaluate(u),fr.evaluate(u))]]},get:{type:ya,overloads:[[[ss],(u,[Xe])=>Jr(Xe.evaluate(u),u.properties())],[[ss,fa],(u,[Xe,fr])=>Jr(Xe.evaluate(u),fr.evaluate(u))]]},"feature-state":[ya,[ss],(u,[Xe])=>Jr(Xe.evaluate(u),u.featureState||{})],properties:[fa,[],u=>u.properties()],"geometry-type":[ss,[],u=>u.geometryType()],id:[ya,[],u=>u.id()],zoom:[Po,[],u=>u.globals.zoom],"heatmap-density":[Po,[],u=>u.globals.heatmapDensity||0],"line-progress":[Po,[],u=>u.globals.lineProgress||0],accumulated:[ya,[],u=>void 0===u.globals.accumulated?null:u.globals.accumulated],"+":[Po,Wr(Po),(u,Xe)=>{let fr=0;for(const Ar of Xe)fr+=Ar.evaluate(u);return fr}],"*":[Po,Wr(Po),(u,Xe)=>{let fr=1;for(const Ar of Xe)fr*=Ar.evaluate(u);return fr}],"-":{type:Po,overloads:[[[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)-fr.evaluate(u)],[[Po],(u,[Xe])=>-Xe.evaluate(u)]]},"/":[Po,[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)/fr.evaluate(u)],"%":[Po,[Po,Po],(u,[Xe,fr])=>Xe.evaluate(u)%fr.evaluate(u)],ln2:[Po,[],()=>Math.LN2],pi:[Po,[],()=>Math.PI],e:[Po,[],()=>Math.E],"^":[Po,[Po,Po],(u,[Xe,fr])=>Math.pow(Xe.evaluate(u),fr.evaluate(u))],sqrt:[Po,[Po],(u,[Xe])=>Math.sqrt(Xe.evaluate(u))],log10:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN10],ln:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))],log2:[Po,[Po],(u,[Xe])=>Math.log(Xe.evaluate(u))/Math.LN2],sin:[Po,[Po],(u,[Xe])=>Math.sin(Xe.evaluate(u))],cos:[Po,[Po],(u,[Xe])=>Math.cos(Xe.evaluate(u))],tan:[Po,[Po],(u,[Xe])=>Math.tan(Xe.evaluate(u))],asin:[Po,[Po],(u,[Xe])=>Math.asin(Xe.evaluate(u))],acos:[Po,[Po],(u,[Xe])=>Math.acos(Xe.evaluate(u))],atan:[Po,[Po],(u,[Xe])=>Math.atan(Xe.evaluate(u))],min:[Po,Wr(Po),(u,Xe)=>Math.min(...Xe.map((Xe=>Xe.evaluate(u))))],max:[Po,Wr(Po),(u,Xe)=>Math.max(...Xe.map((Xe=>Xe.evaluate(u))))],abs:[Po,[Po],(u,[Xe])=>Math.abs(Xe.evaluate(u))],round:[Po,[Po],(u,[Xe])=>{const fr=Xe.evaluate(u);return fr<0?-Math.round(-fr):Math.round(fr)}],floor:[Po,[Po],(u,[Xe])=>Math.floor(Xe.evaluate(u))],ceil:[Po,[Po],(u,[Xe])=>Math.ceil(Xe.evaluate(u))],"filter-==":[sa,[ss,ya],(u,[Xe,fr])=>u.properties()[Xe.value]===fr.value],"filter-id-==":[sa,[ya],(u,[Xe])=>u.id()===Xe.value],"filter-type-==":[sa,[ss],(u,[Xe])=>u.geometryType()===Xe.value],"filter-<":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar<_r}],"filter-id-<":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr<Ar}],"filter->":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar>_r}],"filter-id->":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr>Ar}],"filter-<=":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar<=_r}],"filter-id-<=":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr<=Ar}],"filter->=":[sa,[ss,ya],(u,[Xe,fr])=>{const Ar=u.properties()[Xe.value],_r=fr.value;return typeof Ar==typeof _r&&Ar>=_r}],"filter-id->=":[sa,[ya],(u,[Xe])=>{const fr=u.id(),Ar=Xe.value;return typeof fr==typeof Ar&&fr>=Ar}],"filter-has":[sa,[ya],(u,[Xe])=>Xe.value in u.properties()],"filter-has-id":[sa,[],u=>null!==u.id()&&void 0!==u.id()],"filter-type-in":[sa,[bt(ss)],(u,[Xe])=>Xe.value.indexOf(u.geometryType())>=0],"filter-id-in":[sa,[bt(ya)],(u,[Xe])=>Xe.value.indexOf(u.id())>=0],"filter-in-small":[sa,[ss,bt(ya)],(u,[Xe,fr])=>fr.value.indexOf(u.properties()[Xe.value])>=0],"filter-in-large":[sa,[ss,bt(ya)],(u,[Xe,fr])=>function(u,Xe,fr,Ar){for(;fr<=Ar;){const _r=fr+Ar>>1;if(Xe[_r]===u)return!0;Xe[_r]>u?Ar=_r-1:fr=_r+1}return!1}(u.properties()[Xe.value],fr.value,0,fr.value.length-1)],all:{type:sa,overloads:[[[sa,sa],(u,[Xe,fr])=>Xe.evaluate(u)&&fr.evaluate(u)],[Wr(sa),(u,Xe)=>{for(const fr of Xe)if(!fr.evaluate(u))return!1;return!0}]]},any:{type:sa,overloads:[[[sa,sa],(u,[Xe,fr])=>Xe.evaluate(u)||fr.evaluate(u)],[Wr(sa),(u,Xe)=>{for(const fr of Xe)if(fr.evaluate(u))return!0;return!1}]]},"!":[sa,[sa],(u,[Xe])=>!Xe.evaluate(u)],"is-supported-script":[sa,[ss],(u,[Xe])=>{const fr=u.globals&&u.globals.isSupportedScript;return!fr||fr(Xe.evaluate(u))}],upcase:[ss,[ss],(u,[Xe])=>Xe.evaluate(u).toUpperCase()],downcase:[ss,[ss],(u,[Xe])=>Xe.evaluate(u).toLowerCase()],concat:[ss,Wr(ya),(u,Xe)=>Xe.map((Xe=>ie(Xe.evaluate(u)))).join("")],"resolved-locale":[ss,[ol],(u,[Xe])=>Xe.evaluate(u).resolvedLocale()]});class xn{constructor(u,Xe){var fr;this.expression=u,this._warningHistory={},this._evaluator=new pe,this._defaultValue=Xe?"color"===(fr=Xe).type&&cn(fr.default)?new Kt(0,0,0,0):"color"===fr.type?Kt.parse(fr.default)||null:"padding"===fr.type?Jt.parse(fr.default)||null:"variableAnchorOffsetCollection"===fr.type?Qt.parse(fr.default)||null:void 0===fr.default?null:fr.default:null,this._enumValues=Xe&&"enum"===Xe.type?Xe.values:null}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._evaluator.globals=u,this._evaluator.feature=Xe,this._evaluator.featureState=fr,this._evaluator.canonical=Ar,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr,this.expression.evaluate(this._evaluator)}evaluate(u,Xe,fr,Ar,_r,wr){this._evaluator.globals=u,this._evaluator.feature=Xe||null,this._evaluator.featureState=fr||null,this._evaluator.canonical=Ar,this._evaluator.availableImages=_r||null,this._evaluator.formattedSection=wr||null;try{const u=this.expression.evaluate(this._evaluator);if(null==u||"number"==typeof u&&u!=u)return this._defaultValue;if(this._enumValues&&!(u in this._enumValues))throw new ae(`Expected value to be one of ${Object.keys(this._enumValues).map((u=>JSON.stringify(u))).join(", ")}, but found ${JSON.stringify(u)} instead.`);return u}catch(u){return this._warningHistory[u.message]||(this._warningHistory[u.message]=!0,"undefined"!=typeof console&&console.warn(u.message)),this._defaultValue}}}function vn(u){return Array.isArray(u)&&u.length>0&&"string"==typeof u[0]&&u[0]in nc}function bn(u,Xe){const fr=new fe(nc,Qr,[],Xe?function(u){const Xe={color:aa,string:ss,number:Po,enum:ss,boolean:sa,formatted:sl,padding:al,resolvedImage:cl,variableAnchorOffsetCollection:hl};return"array"===u.type?bt(Xe[u.value]||ya,u.length):Xe[u.type]}(Xe):void 0),Ar=fr.parse(u,void 0,void 0,void 0,Xe&&"string"===Xe.type?{typeAnnotation:"coerce"}:void 0);return Ar?nn(new xn(Ar,Xe)):sn(fr.errors)}class wn{constructor(u,Xe){this.kind=u,this._styleExpression=Xe,this.isStateDependent="constant"!==u&&!en(Xe.expression)}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr)}evaluate(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluate(u,Xe,fr,Ar,_r,wr)}}class _n{constructor(u,Xe,fr,Ar){this.kind=u,this.zoomStops=fr,this._styleExpression=Xe,this.isStateDependent="camera"!==u&&!en(Xe.expression),this.interpolationType=Ar}evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluateWithoutErrorHandling(u,Xe,fr,Ar,_r,wr)}evaluate(u,Xe,fr,Ar,_r,wr){return this._styleExpression.evaluate(u,Xe,fr,Ar,_r,wr)}interpolationFactor(u,Xe,fr){return this.interpolationType?Be.interpolationFactor(this.interpolationType,u,Xe,fr):0}}function An(u,Xe){const fr=bn(u,Xe);if("error"===fr.result)return fr;const Ar=fr.value.expression,_r=tn(Ar);if(!_r&&!an(Xe))return sn([new at("","data expressions not supported")]);const wr=rn(Ar,["zoom"]);if(!wr&&!on(Xe))return sn([new at("","zoom expressions not supported")]);const Kr=kn(Ar);return Kr||wr?Kr instanceof at?sn([Kr]):Kr instanceof Be&&!ln(Xe)?sn([new at("",'"interpolate" expressions cannot be used with this property')]):nn(Kr?new _n(_r?"camera":"composite",fr.value,Kr.labels,Kr instanceof Be?Kr.interpolation:void 0):new wn(_r?"constant":"source",fr.value)):sn([new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Sn{constructor(u,Xe){this._parameters=u,this._specification=Xe,st(this,pn(this._parameters,this._specification))}static deserialize(u){return new Sn(u._parameters,u._specification)}static serialize(u){return{_parameters:u._parameters,_specification:u._specification}}}function kn(u){let Xe=null;if(u instanceof de)Xe=kn(u.result);else if(u instanceof Ee){for(const fr of u.args)if(Xe=kn(fr),Xe)break}else(u instanceof Ae||u instanceof Be)&&u.input instanceof Xr&&"zoom"===u.input.name&&(Xe=u);return Xe instanceof at||u.eachChild((u=>{const fr=kn(u);fr instanceof at?Xe=fr:!Xe&&fr?Xe=new at("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Xe&&fr&&Xe!==fr&&(Xe=new at("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),Xe}function Mn(u){if(!0===u||!1===u)return!0;if(!Array.isArray(u)||0===u.length)return!1;switch(u[0]){case"has":return u.length>=2&&"$id"!==u[1]&&"$type"!==u[1];case"in":return u.length>=3&&("string"!=typeof u[1]||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==u.length||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const Xe of u.slice(1))if(!Mn(Xe)&&"boolean"!=typeof Xe)return!1;return!0;default:return!0}}const oc={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zn(u){if(null==u)return{filter:()=>!0,needGeometry:!1};Mn(u)||(u=Bn(u));const Xe=bn(u,oc);if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return{filter:(u,fr,Ar)=>Xe.value.evaluate(u,fr,{},Ar),needGeometry:Cn(u)}}function Pn(u,Xe){return u<Xe?-1:u>Xe?1:0}function Cn(u){if(!Array.isArray(u))return!1;if("within"===u[0]||"distance"===u[0])return!0;for(let Xe=1;Xe<u.length;Xe++)if(Cn(u[Xe]))return!0;return!1}function Bn(u){if(!u)return!0;const Xe=u[0];return u.length<=1?"any"!==Xe:"=="===Xe?Vn(u[1],u[2],"=="):"!="===Xe?Tn(Vn(u[1],u[2],"==")):"<"===Xe||">"===Xe||"<="===Xe||">="===Xe?Vn(u[1],u[2],Xe):"any"===Xe?(fr=u.slice(1),["any"].concat(fr.map(Bn))):"all"===Xe?["all"].concat(u.slice(1).map(Bn)):"none"===Xe?["all"].concat(u.slice(1).map(Bn).map(Tn)):"in"===Xe?En(u[1],u.slice(2)):"!in"===Xe?Tn(En(u[1],u.slice(2))):"has"===Xe?Fn(u[1]):"!has"!==Xe||Tn(Fn(u[1]));var fr}function Vn(u,Xe,fr){switch(u){case"$type":return[`filter-type-${fr}`,Xe];case"$id":return[`filter-id-${fr}`,Xe];default:return[`filter-${fr}`,u,Xe]}}function En(u,Xe){if(0===Xe.length)return!1;switch(u){case"$type":return["filter-type-in",["literal",Xe]];case"$id":return["filter-id-in",["literal",Xe]];default:return Xe.length>200&&!Xe.some((u=>typeof u!=typeof Xe[0]))?["filter-in-large",u,["literal",Xe.sort(Pn)]]:["filter-in-small",u,["literal",Xe]]}}function Fn(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Tn(u){return["!",u]}function $n(u){const Xe=typeof u;if("number"===Xe||"boolean"===Xe||"string"===Xe||null==u)return JSON.stringify(u);if(Array.isArray(u)){let Xe="[";for(const fr of u)Xe+=`${$n(fr)},`;return`${Xe}]`}const fr=Object.keys(u).sort();let Ar="{";for(let Xe=0;Xe<fr.length;Xe++)Ar+=`${JSON.stringify(fr[Xe])}:${$n(u[fr[Xe]])},`;return`${Ar}}`}function Ln(u){let Xe="";for(const fr of xo)Xe+=`/${$n(u[fr])}`;return Xe}function Dn(u){const Xe=u.value;return Xe?[new it(u.key,Xe,"constants have been deprecated as of v8")]:[]}function On(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function jn(u){if(Array.isArray(u))return u.map(jn);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const Xe={};for(const fr in u)Xe[fr]=jn(u[fr]);return Xe}return On(u)}function Rn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec||{},_r=u.objectElementValidators||{},wr=u.style,Kr=u.styleSpec,In=u.validateSpec;let io=[];const no=un(fr);if("object"!==no)return[new it(Xe,fr,`object expected, ${no} found`)];for(const u in fr){const no=u.split(".")[0],oo=Ar[no]||Ar["*"];let so;if(_r[no])so=_r[no];else if(Ar[no])so=In;else if(_r["*"])so=_r["*"];else{if(!Ar["*"]){io.push(new it(Xe,fr[u],`unknown property "${u}"`));continue}so=In}io=io.concat(so({key:(Xe?`${Xe}.`:Xe)+u,value:fr[u],valueSpec:oo,style:wr,styleSpec:Kr,object:fr,objectKey:u,validateSpec:In},fr))}for(const u in Ar)_r[u]||Ar[u].required&&void 0===Ar[u].default&&void 0===fr[u]&&io.push(new it(Xe,fr,`missing required property "${u}"`));return io}function Un(u){const Xe=u.value,fr=u.valueSpec,Ar=u.style,_r=u.styleSpec,wr=u.key,Kr=u.arrayElementValidator||u.validateSpec;if("array"!==un(Xe))return[new it(wr,Xe,`array expected, ${un(Xe)} found`)];if(fr.length&&Xe.length!==fr.length)return[new it(wr,Xe,`array length ${fr.length} expected, length ${Xe.length} found`)];if(fr["min-length"]&&Xe.length<fr["min-length"])return[new it(wr,Xe,`array length at least ${fr["min-length"]} expected, length ${Xe.length} found`)];let In={type:fr.value,values:fr.values};_r.$version<7&&(In.function=fr.function),"object"===un(fr.value)&&(In=fr.value);let io=[];for(let fr=0;fr<Xe.length;fr++)io=io.concat(Kr({array:Xe,arrayIndex:fr,value:Xe[fr],valueSpec:In,validateSpec:u.validateSpec,style:Ar,styleSpec:_r,key:`${wr}[${fr}]`}));return io}function qn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec;let _r=un(fr);return"number"===_r&&fr!=fr&&(_r="NaN"),"number"!==_r?[new it(Xe,fr,`number expected, ${_r} found`)]:"minimum"in Ar&&fr<Ar.minimum?[new it(Xe,fr,`${fr} is less than the minimum value ${Ar.minimum}`)]:"maximum"in Ar&&fr>Ar.maximum?[new it(Xe,fr,`${fr} is greater than the maximum value ${Ar.maximum}`)]:[]}function Nn(u){const Xe=u.valueSpec,fr=On(u.value.type);let Ar,_r,wr,Kr={};const In="categorical"!==fr&&void 0===u.value.property,io=!In,no="array"===un(u.value.stops)&&"array"===un(u.value.stops[0])&&"object"===un(u.value.stops[0][0]),oo=Rn({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(u){if("identity"===fr)return[new it(u.key,u.value,'identity function may not have a "stops" property')];let Xe=[];const Ar=u.value;return Xe=Xe.concat(Un({key:u.key,value:Ar,valueSpec:u.valueSpec,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,arrayElementValidator:h})),"array"===un(Ar)&&0===Ar.length&&Xe.push(new it(u.key,Ar,"array must have at least one stop")),Xe},default:function(u){return u.validateSpec({key:u.key,value:u.value,valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec})}}});return"identity"===fr&&In&&oo.push(new it(u.key,u.value,'missing required property "property"')),"identity"===fr||u.value.stops||oo.push(new it(u.key,u.value,'missing required property "stops"')),"exponential"===fr&&u.valueSpec.expression&&!ln(u.valueSpec)&&oo.push(new it(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(io&&!an(u.valueSpec)?oo.push(new it(u.key,u.value,"property functions not supported")):In&&!on(u.valueSpec)&&oo.push(new it(u.key,u.value,"zoom functions not supported"))),"categorical"!==fr&&!no||void 0!==u.value.property||oo.push(new it(u.key,u.value,'"property" property is required')),oo;function h(u){let fr=[];const Ar=u.value,In=u.key;if("array"!==un(Ar))return[new it(In,Ar,`array expected, ${un(Ar)} found`)];if(2!==Ar.length)return[new it(In,Ar,`array length 2 expected, length ${Ar.length} found`)];if(no){if("object"!==un(Ar[0]))return[new it(In,Ar,`object expected, ${un(Ar[0])} found`)];if(void 0===Ar[0].zoom)return[new it(In,Ar,"object stop key must have zoom")];if(void 0===Ar[0].value)return[new it(In,Ar,"object stop key must have value")];if(wr&&wr>On(Ar[0].zoom))return[new it(In,Ar[0].zoom,"stop zoom values must appear in ascending order")];On(Ar[0].zoom)!==wr&&(wr=On(Ar[0].zoom),_r=void 0,Kr={}),fr=fr.concat(Rn({key:`${In}[0]`,value:Ar[0],valueSpec:{zoom:{}},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{zoom:qn,value:p}}))}else fr=fr.concat(p({key:`${In}[0]`,value:Ar[0],valueSpec:{},validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec},Ar));return vn(jn(Ar[1]))?fr.concat([new it(`${In}[1]`,Ar[1],"expressions are not allowed in function stops.")]):fr.concat(u.validateSpec({key:`${In}[1]`,value:Ar[1],valueSpec:Xe,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec}))}function p(u,wr){const In=un(u.value),io=On(u.value),no=null!==u.value?u.value:wr;if(Ar){if(In!==Ar)return[new it(u.key,no,`${In} stop domain type must match previous stop domain type ${Ar}`)]}else Ar=In;if("number"!==In&&"string"!==In&&"boolean"!==In)return[new it(u.key,no,"stop domain value must be a number, string, or boolean")];if("number"!==In&&"categorical"!==fr){let Ar=`number expected, ${In} found`;return an(Xe)&&void 0===fr&&(Ar+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new it(u.key,no,Ar)]}return"categorical"!==fr||"number"!==In||isFinite(io)&&Math.floor(io)===io?"categorical"!==fr&&"number"===In&&void 0!==_r&&io<_r?[new it(u.key,no,"stop domain values must appear in ascending order")]:(_r=io,"categorical"===fr&&io in Kr?[new it(u.key,no,"stop domain values must be unique")]:(Kr[io]=!0,[])):[new it(u.key,no,`integer expected, found ${io}`)]}}function Zn(u){const Xe=("property"===u.expressionContext?An:bn)(jn(u.value),u.valueSpec);if("error"===Xe.result)return Xe.value.map((Xe=>new it(`${u.key}${Xe.key}`,u.value,Xe.message)));const fr=Xe.value.expression||Xe.value._styleExpression.expression;if("property"===u.expressionContext&&"text-font"===u.propertyKey&&!fr.outputDefined())return[new it(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===u.expressionContext&&"layout"===u.propertyType&&!en(fr))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===u.expressionContext&&!en(fr))return[new it(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&0===u.expressionContext.indexOf("cluster")){if(!rn(fr,["zoom","feature-state"]))return[new it(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===u.expressionContext&&!tn(fr))return[new it(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Gn(u){const Xe=u.key,fr=u.value,Ar=u.valueSpec,_r=[];return Array.isArray(Ar.values)?-1===Ar.values.indexOf(On(fr))&&_r.push(new it(Xe,fr,`expected one of [${Ar.values.join(", ")}], ${JSON.stringify(fr)} found`)):-1===Object.keys(Ar.values).indexOf(On(fr))&&_r.push(new it(Xe,fr,`expected one of [${Object.keys(Ar.values).join(", ")}], ${JSON.stringify(fr)} found`)),_r}function Kn(u){return Mn(jn(u.value))?Zn(st({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Xn(u)}function Xn(u){const Xe=u.value,fr=u.key;if("array"!==un(Xe))return[new it(fr,Xe,`array expected, ${un(Xe)} found`)];const Ar=u.styleSpec;let _r,wr=[];if(Xe.length<1)return[new it(fr,Xe,"filter array must have at least 1 element")];switch(wr=wr.concat(Gn({key:`${fr}[0]`,value:Xe[0],valueSpec:Ar.filter_operator,style:u.style,styleSpec:u.styleSpec})),On(Xe[0])){case"<":case"<=":case">":case">=":Xe.length>=2&&"$type"===On(Xe[1])&&wr.push(new it(fr,Xe,`"$type" cannot be use with operator "${Xe[0]}"`));case"==":case"!=":3!==Xe.length&&wr.push(new it(fr,Xe,`filter array for operator "${Xe[0]}" must have 3 elements`));case"in":case"!in":Xe.length>=2&&(_r=un(Xe[1]),"string"!==_r&&wr.push(new it(`${fr}[1]`,Xe[1],`string expected, ${_r} found`)));for(let Kr=2;Kr<Xe.length;Kr++)_r=un(Xe[Kr]),"$type"===On(Xe[1])?wr=wr.concat(Gn({key:`${fr}[${Kr}]`,value:Xe[Kr],valueSpec:Ar.geometry_type,style:u.style,styleSpec:u.styleSpec})):"string"!==_r&&"number"!==_r&&"boolean"!==_r&&wr.push(new it(`${fr}[${Kr}]`,Xe[Kr],`string, number, or boolean expected, ${_r} found`));break;case"any":case"all":case"none":for(let Ar=1;Ar<Xe.length;Ar++)wr=wr.concat(Xn({key:`${fr}[${Ar}]`,value:Xe[Ar],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":_r=un(Xe[1]),2!==Xe.length?wr.push(new it(fr,Xe,`filter array for "${Xe[0]}" operator must have 2 elements`)):"string"!==_r&&wr.push(new it(`${fr}[1]`,Xe[1],`string expected, ${_r} found`))}return wr}function Hn(u,Xe){const fr=u.key,Ar=u.validateSpec,_r=u.style,wr=u.styleSpec,Kr=u.value,In=u.objectKey,io=wr[`${Xe}_${u.layerType}`];if(!io)return[];const no=In.match(/^(.*)-transition$/);if("paint"===Xe&&no&&io[no[1]]&&io[no[1]].transition)return Ar({key:fr,value:Kr,valueSpec:wr.transition,style:_r,styleSpec:wr});const oo=u.valueSpec||io[In];if(!oo)return[new it(fr,Kr,`unknown property "${In}"`)];let so;if("string"===un(Kr)&&an(oo)&&!oo.tokens&&(so=/^{([^}]+)}$/.exec(Kr)))return[new it(fr,Kr,`"${In}" does not support interpolation syntax\nUse an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(so[1])} }\`.`)];const ao=[];return"symbol"===u.layerType&&("text-field"===In&&_r&&!_r.glyphs&&ao.push(new it(fr,Kr,'use of "text-field" requires a style "glyphs" property')),"text-font"===In&&cn(jn(Kr))&&"identity"===On(Kr.type)&&ao.push(new it(fr,Kr,'"text-font" does not support identity functions'))),ao.concat(Ar({key:u.key,value:Kr,valueSpec:oo,style:_r,styleSpec:wr,expressionContext:"property",propertyType:Xe,propertyKey:In}))}function Yn(u){return Hn(u,"paint")}function Jn(u){return Hn(u,"layout")}function Wn(u){let Xe=[];const fr=u.value,Ar=u.key,_r=u.style,wr=u.styleSpec;fr.type||fr.ref||Xe.push(new it(Ar,fr,'either "type" or "ref" is required'));let Kr=On(fr.type);const In=On(fr.ref);if(fr.id){const wr=On(fr.id);for(let Kr=0;Kr<u.arrayIndex;Kr++){const u=_r.layers[Kr];On(u.id)===wr&&Xe.push(new it(Ar,fr.id,`duplicate layer id "${fr.id}", previously used at line ${u.id.__line__}`))}}if("ref"in fr){let u;["type","source","source-layer","filter","layout"].forEach((u=>{u in fr&&Xe.push(new it(Ar,fr[u],`"${u}" is prohibited for ref layers`))})),_r.layers.forEach((Xe=>{On(Xe.id)===In&&(u=Xe)})),u?u.ref?Xe.push(new it(Ar,fr.ref,"ref cannot reference another ref layer")):Kr=On(u.type):Xe.push(new it(Ar,fr.ref,`ref layer "${In}" not found`))}else if("background"!==Kr)if(fr.source){const u=_r.sources&&_r.sources[fr.source],wr=u&&On(u.type);u?"vector"===wr&&"raster"===Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a raster source`)):"raster-dem"!==wr&&"hillshade"===Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a raster-dem source`)):"raster"===wr&&"raster"!==Kr?Xe.push(new it(Ar,fr.source,`layer "${fr.id}" requires a vector source`)):"vector"!==wr||fr["source-layer"]?"raster-dem"===wr&&"hillshade"!==Kr?Xe.push(new it(Ar,fr.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==Kr||!fr.paint||!fr.paint["line-gradient"]||"geojson"===wr&&u.lineMetrics||Xe.push(new it(Ar,fr,`layer "${fr.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):Xe.push(new it(Ar,fr,`layer "${fr.id}" must specify a "source-layer"`)):Xe.push(new it(Ar,fr.source,`source "${fr.source}" not found`))}else Xe.push(new it(Ar,fr,'missing required property "source"'));return Xe=Xe.concat(Rn({key:Ar,value:fr,valueSpec:wr.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${Ar}.type`,value:fr.type,valueSpec:wr.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:fr,objectKey:"type"}),filter:Kn,layout:u=>Rn({layer:fr,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Jn(st({layerType:Kr},u))}}),paint:u=>Rn({layer:fr,key:u.key,value:u.value,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":u=>Yn(st({layerType:Kr},u))}})}})),Xe}function Qn(u){const Xe=u.value,fr=u.key,Ar=un(Xe);return"string"!==Ar?[new it(fr,Xe,`string expected, ${Ar} found`)]:[]}const ac={promoteId:function({key:u,value:Xe}){if("string"===un(Xe))return Qn({key:u,value:Xe});{const fr=[];for(const Ar in Xe)fr.push(...Qn({key:`${u}.${Ar}`,value:Xe[Ar]}));return fr}}};function ei(u){const Xe=u.value,fr=u.key,Ar=u.styleSpec,_r=u.style,wr=u.validateSpec;if(!Xe.type)return[new it(fr,Xe,'"type" is required')];const Kr=On(Xe.type);let In;switch(Kr){case"vector":case"raster":return In=Rn({key:fr,value:Xe,valueSpec:Ar[`source_${Kr.replace("-","_")}`],style:u.style,styleSpec:Ar,objectElementValidators:ac,validateSpec:wr}),In;case"raster-dem":return In=function(u){var Xe;const fr=null!==(Xe=u.sourceName)&&void 0!==Xe?Xe:"",Ar=u.value,_r=u.styleSpec,wr=_r.source_raster_dem,Kr=u.style;let In=[];const io=un(Ar);if(void 0===Ar)return In;if("object"!==io)return In.push(new it("source_raster_dem",Ar,`object expected, ${io} found`)),In;const no="custom"===On(Ar.encoding),oo=["redFactor","greenFactor","blueFactor","baseShift"],so=u.value.encoding?`"${u.value.encoding}"`:"Default";for(const Xe in Ar)!no&&oo.includes(Xe)?In.push(new it(Xe,Ar[Xe],`In "${fr}": "${Xe}" is only valid when "encoding" is set to "custom". ${so} encoding found`)):wr[Xe]?In=In.concat(u.validateSpec({key:Xe,value:Ar[Xe],valueSpec:wr[Xe],validateSpec:u.validateSpec,style:Kr,styleSpec:_r})):In.push(new it(Xe,Ar[Xe],`unknown property "${Xe}"`));return In}({sourceName:fr,value:Xe,style:u.style,styleSpec:Ar,validateSpec:wr}),In;case"geojson":if(In=Rn({key:fr,value:Xe,valueSpec:Ar.source_geojson,style:_r,styleSpec:Ar,validateSpec:wr,objectElementValidators:ac}),Xe.cluster)for(const u in Xe.clusterProperties){const[Ar,_r]=Xe.clusterProperties[u],Kr="string"==typeof Ar?[Ar,["accumulated"],["get",u]]:Ar;In.push(...Zn({key:`${fr}.${u}.map`,value:_r,validateSpec:wr,expressionContext:"cluster-map"})),In.push(...Zn({key:`${fr}.${u}.reduce`,value:Kr,validateSpec:wr,expressionContext:"cluster-reduce"}))}return In;case"video":return Rn({key:fr,value:Xe,valueSpec:Ar.source_video,style:_r,validateSpec:wr,styleSpec:Ar});case"image":return Rn({key:fr,value:Xe,valueSpec:Ar.source_image,style:_r,validateSpec:wr,styleSpec:Ar});case"canvas":return[new it(fr,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Gn({key:`${fr}.type`,value:Xe.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_r,validateSpec:wr,styleSpec:Ar})}}function ri(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.light,_r=u.style;let wr=[];const Kr=un(Xe);if(void 0===Xe)return wr;if("object"!==Kr)return wr=wr.concat([new it("light",Xe,`object expected, ${Kr} found`)]),wr;for(const Kr in Xe){const In=Kr.match(/^(.*)-transition$/);wr=wr.concat(In&&Ar[In[1]]&&Ar[In[1]].transition?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:fr.transition,validateSpec:u.validateSpec,style:_r,styleSpec:fr}):Ar[Kr]?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:Ar[Kr],validateSpec:u.validateSpec,style:_r,styleSpec:fr}):[new it(Kr,Xe[Kr],`unknown property "${Kr}"`)])}return wr}function ni(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.sky,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("sky",Xe,`object expected, ${wr} found`)];let Kr=[];for(const wr in Xe)Kr=Kr.concat(Ar[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:Ar[wr],style:_r,styleSpec:fr}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Kr}function ii(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.terrain,_r=u.style;let wr=[];const Kr=un(Xe);if(void 0===Xe)return wr;if("object"!==Kr)return wr=wr.concat([new it("terrain",Xe,`object expected, ${Kr} found`)]),wr;for(const Kr in Xe)wr=wr.concat(Ar[Kr]?u.validateSpec({key:Kr,value:Xe[Kr],valueSpec:Ar[Kr],validateSpec:u.validateSpec,style:_r,styleSpec:fr}):[new it(Kr,Xe[Kr],`unknown property "${Kr}"`)]);return wr}function si(u){let Xe=[];const fr=u.value,Ar=u.key;if(Array.isArray(fr)){const _r=[],wr=[];for(const Kr in fr)fr[Kr].id&&_r.includes(fr[Kr].id)&&Xe.push(new it(Ar,fr,`all the sprites' ids must be unique, but ${fr[Kr].id} is duplicated`)),_r.push(fr[Kr].id),fr[Kr].url&&wr.includes(fr[Kr].url)&&Xe.push(new it(Ar,fr,`all the sprites' URLs must be unique, but ${fr[Kr].url} is duplicated`)),wr.push(fr[Kr].url),Xe=Xe.concat(Rn({key:`${Ar}[${Kr}]`,value:fr[Kr],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return Xe}return Qn({key:Ar,value:fr})}const dc={"*":()=>[],array:Un,boolean:function(u){const Xe=u.value,fr=u.key,Ar=un(Xe);return"boolean"!==Ar?[new it(fr,Xe,`boolean expected, ${Ar} found`)]:[]},number:qn,color:function(u){const Xe=u.key,fr=u.value,Ar=un(fr);return"string"!==Ar?[new it(Xe,fr,`color expected, ${Ar} found`)]:Kt.parse(String(fr))?[]:[new it(Xe,fr,`color expected, "${fr}" found`)]},constants:Dn,enum:Gn,filter:Kn,function:Nn,layer:Wn,object:Rn,source:ei,light:ri,sky:ni,terrain:ii,projection:function(u){const Xe=u.value,fr=u.styleSpec,Ar=fr.projection,_r=u.style,wr=un(Xe);if(void 0===Xe)return[];if("object"!==wr)return[new it("projection",Xe,`object expected, ${wr} found`)];let Kr=[];for(const wr in Xe)Kr=Kr.concat(Ar[wr]?u.validateSpec({key:wr,value:Xe[wr],valueSpec:Ar[wr],style:_r,styleSpec:fr}):[new it(wr,Xe[wr],`unknown property "${wr}"`)]);return Kr},string:Qn,formatted:function(u){return 0===Qn(u).length?[]:Zn(u)},resolvedImage:function(u){return 0===Qn(u).length?[]:Zn(u)},padding:function(u){const Xe=u.key,fr=u.value;if("array"===un(fr)){if(fr.length<1||fr.length>4)return[new it(Xe,fr,`padding requires 1 to 4 values; ${fr.length} values found`)];const Ar={type:"number"};let _r=[];for(let wr=0;wr<fr.length;wr++)_r=_r.concat(u.validateSpec({key:`${Xe}[${wr}]`,value:fr[wr],validateSpec:u.validateSpec,valueSpec:Ar}));return _r}return qn({key:Xe,value:fr,valueSpec:{}})},variableAnchorOffsetCollection:function(u){const Xe=u.key,fr=u.value,Ar=un(fr),_r=u.styleSpec;if("array"!==Ar||fr.length<1||fr.length%2!=0)return[new it(Xe,fr,"variableAnchorOffsetCollection requires a non-empty array of even length")];let wr=[];for(let Ar=0;Ar<fr.length;Ar+=2)wr=wr.concat(Gn({key:`${Xe}[${Ar}]`,value:fr[Ar],valueSpec:_r.layout_symbol["text-anchor"]})),wr=wr.concat(Un({key:`${Xe}[${Ar+1}]`,value:fr[Ar+1],valueSpec:{length:2,value:"number"},validateSpec:u.validateSpec,style:u.style,styleSpec:_r}));return wr},sprite:si};function oi(u){const Xe=u.value,fr=u.valueSpec,Ar=u.styleSpec;return u.validateSpec=oi,fr.expression&&cn(On(Xe))?Nn(u):fr.expression&&vn(jn(Xe))?Zn(u):fr.type&&dc[fr.type]?dc[fr.type](u):Rn(st({},u,{valueSpec:fr.type?Ar[fr.type]:fr}))}function li(u){const Xe=u.value,fr=u.key,Ar=Qn(u);return Ar.length||(-1===Xe.indexOf("{fontstack}")&&Ar.push(new it(fr,Xe,'"glyphs" url must include a "{fontstack}" token')),-1===Xe.indexOf("{range}")&&Ar.push(new it(fr,Xe,'"glyphs" url must include a "{range}" token'))),Ar}function ui(u,Xe=Io){let fr=[];return fr=fr.concat(oi({key:"",value:u,valueSpec:Xe.$root,styleSpec:Xe,style:u,validateSpec:oi,objectElementValidators:{glyphs:li,"*":()=>[]}})),u.constants&&(fr=fr.concat(Dn({key:"constants",value:u.constants,style:u,styleSpec:Xe,validateSpec:oi}))),hi(fr)}function ci(u){return function(Xe){return u({...Xe,validateSpec:oi})}}function hi(u){return[].concat(u).sort(((u,Xe)=>u.line-Xe.line))}function pi(u){return function(...Xe){return hi(u.apply(this,Xe))}}ui.source=pi(ci(ei)),ui.sprite=pi(ci(si)),ui.glyphs=pi(ci(li)),ui.light=pi(ci(ri)),ui.sky=pi(ci(ni)),ui.terrain=pi(ci(ii)),ui.layer=pi(ci(Wn)),ui.filter=pi(ci(Kn)),ui.paintProperty=pi(ci(Yn)),ui.layoutProperty=pi(ci(Jn));const mc=ui,Ic=mc.light,yc=mc.sky,Ac=mc.paintProperty,bc=mc.layoutProperty;function xi(u,Xe){let fr=!1;if(Xe&&Xe.length)for(const Ar of Xe)u.fire(new N(new Error(Ar.message))),fr=!0;return fr}class vi{constructor(u,Xe,fr){const Ar=this.cells=[];if(u instanceof ArrayBuffer){this.arrayBuffer=u;const _r=new Int32Array(this.arrayBuffer);u=_r[0],this.d=(Xe=_r[1])+2*(fr=_r[2]);for(let u=0;u<this.d*this.d;u++){const Xe=_r[3+u],fr=_r[3+u+1];Ar.push(Xe===fr?null:_r.subarray(Xe,fr))}const wr=_r[3+Ar.length+1];this.keys=_r.subarray(_r[3+Ar.length],wr),this.bboxes=_r.subarray(wr),this.insert=this._insertReadonly}else{this.d=Xe+2*fr;for(let u=0;u<this.d*this.d;u++)Ar.push([]);this.keys=[],this.bboxes=[]}this.n=Xe,this.extent=u,this.padding=fr,this.scale=Xe/u,this.uid=0;const _r=fr/Xe*u;this.min=-_r,this.max=u+_r}insert(u,Xe,fr,Ar,_r){this._forEachCell(Xe,fr,Ar,_r,this._insertCell,this.uid++,void 0,void 0),this.keys.push(u),this.bboxes.push(Xe),this.bboxes.push(fr),this.bboxes.push(Ar),this.bboxes.push(_r)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(u,Xe,fr,Ar,_r,wr){this.cells[_r].push(wr)}query(u,Xe,fr,Ar,_r){const wr=this.min,Kr=this.max;if(u<=wr&&Xe<=wr&&Kr<=fr&&Kr<=Ar&&!_r)return Array.prototype.slice.call(this.keys);{const wr=[];return this._forEachCell(u,Xe,fr,Ar,this._queryCell,wr,{},_r),wr}}_queryCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this.cells[_r];if(null!==io){const _r=this.keys,no=this.bboxes;for(let oo=0;oo<io.length;oo++){const so=io[oo];if(void 0===Kr[so]){const io=4*so;(In?In(no[io+0],no[io+1],no[io+2],no[io+3]):u<=no[io+2]&&Xe<=no[io+3]&&fr>=no[io+0]&&Ar>=no[io+1])?(Kr[so]=!0,wr.push(_r[so])):Kr[so]=!1}}}}_forEachCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this._convertToCellCoord(u),no=this._convertToCellCoord(Xe),oo=this._convertToCellCoord(fr),so=this._convertToCellCoord(Ar);for(let ao=io;ao<=oo;ao++)for(let io=no;io<=so;io++){const no=this.d*io+ao;if((!In||In(this._convertFromCellCoord(ao),this._convertFromCellCoord(io),this._convertFromCellCoord(ao+1),this._convertFromCellCoord(io+1)))&&_r.call(this,u,Xe,fr,Ar,no,wr,Kr,In))return}}_convertFromCellCoord(u){return(u-this.padding)/this.scale}_convertToCellCoord(u){return Math.max(0,Math.min(this.d-1,Math.floor(u*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const u=this.cells,Xe=3+this.cells.length+1+1;let fr=0;for(let u=0;u<this.cells.length;u++)fr+=this.cells[u].length;const Ar=new Int32Array(Xe+fr+this.keys.length+this.bboxes.length);Ar[0]=this.extent,Ar[1]=this.n,Ar[2]=this.padding;let _r=Xe;for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];Ar[3+Xe]=_r,Ar.set(fr,_r),_r+=fr.length}return Ar[3+u.length]=_r,Ar.set(this.keys,_r),_r+=this.keys.length,Ar[3+u.length+1]=_r,Ar.set(this.bboxes,_r),_r+=this.bboxes.length,Ar.buffer}static serialize(u,Xe){const fr=u.toArrayBuffer();return Xe&&Xe.push(fr),{buffer:fr}}static deserialize(u){return new vi(u.buffer)}}const _c={};function wi(u,Xe,fr={}){if(_c[u])throw new Error(`${u} is already registered.`);Object.defineProperty(Xe,"_classRegistryKey",{value:u,writeable:!1}),_c[u]={klass:Xe,omit:fr.omit||[],shallow:fr.shallow||[]}}wi("Object",Object),wi("TransferableGridIndex",vi),wi("Color",Kt),wi("Error",Error),wi("AJAXError",L),wi("ResolvedImage",te),wi("StylePropertyFunction",Sn),wi("StyleExpression",xn,{omit:["_evaluator"]}),wi("ZoomDependentExpression",_n),wi("ZoomConstantExpression",wn),wi("CompoundExpression",Xr,{omit:["_evaluate"]});for(const u in nc)nc[u]._classRegistryKey||wi(`Expression_${u}`,nc[u]);function _i(u){return u&&"undefined"!=typeof ArrayBuffer&&(u instanceof ArrayBuffer||u.constructor&&"ArrayBuffer"===u.constructor.name)}function Ai(u){return u.$name||u.constructor._classRegistryKey}function Si(u){return!function(u){if(null===u||"object"!=typeof u)return!1;const Xe=Ai(u);return!(!Xe||"Object"===Xe)}(u)&&(null==u||"boolean"==typeof u||"number"==typeof u||"string"==typeof u||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||_i(u)||I(u)||ArrayBuffer.isView(u)||u instanceof ImageData)}function ki(u,Xe){if(Si(u))return(_i(u)||I(u))&&Xe&&Xe.push(u),ArrayBuffer.isView(u)&&Xe&&Xe.push(u.buffer),u instanceof ImageData&&Xe&&Xe.push(u.data.buffer),u;if(Array.isArray(u)){const fr=[];for(const Ar of u)fr.push(ki(Ar,Xe));return fr}if("object"!=typeof u)throw new Error("can't serialize object of type "+typeof u);const fr=Ai(u);if(!fr)throw new Error(`can't serialize object of unregistered class ${u.constructor.name}`);if(!_c[fr])throw new Error(`${fr} is not registered.`);const{klass:Ar}=_c[fr],_r=Ar.serialize?Ar.serialize(u,Xe):{};if(Ar.serialize){if(Xe&&_r===Xe[Xe.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const Ar in u){if(!u.hasOwnProperty(Ar))continue;if(_c[fr].omit.indexOf(Ar)>=0)continue;const wr=u[Ar];_r[Ar]=_c[fr].shallow.indexOf(Ar)>=0?wr:ki(wr,Xe)}u instanceof Error&&(_r.message=u.message)}if(_r.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==fr&&(_r.$name=fr),_r}function Mi(u){if(Si(u))return u;if(Array.isArray(u))return u.map(Mi);if("object"!=typeof u)throw new Error("can't deserialize object of type "+typeof u);const Xe=Ai(u)||"Object";if(!_c[Xe])throw new Error(`can't deserialize unregistered class ${Xe}`);const{klass:fr}=_c[Xe];if(!fr)throw new Error(`can't deserialize unregistered class ${Xe}`);if(fr.deserialize)return fr.deserialize(u);const Ar=Object.create(fr.prototype);for(const fr of Object.keys(u)){if("$name"===fr)continue;const _r=u[fr];Ar[fr]=_c[Xe].shallow.indexOf(fr)>=0?_r:Mi(_r)}return Ar}class Ii{constructor(){this.first=!0}update(u,Xe){const fr=Math.floor(u);return this.first?(this.first=!1,this.lastIntegerZoom=fr,this.lastIntegerZoomTime=0,this.lastZoom=u,this.lastFloorZoom=fr,!0):(this.lastFloorZoom>fr?(this.lastIntegerZoom=fr+1,this.lastIntegerZoomTime=Xe):this.lastFloorZoom<fr&&(this.lastIntegerZoom=fr,this.lastIntegerZoomTime=Xe),u!==this.lastZoom&&(this.lastZoom=u,this.lastFloorZoom=fr,!0))}}const vc={"Latin-1 Supplement":u=>u>=128&&u<=255,"Hangul Jamo":u=>u>=4352&&u<=4607,Khmer:u=>u>=6016&&u<=6143,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Katakana:u=>u>=12448&&u<=12543,Kanbun:u=>u>=12688&&u<=12703,"CJK Strokes":u=>u>=12736&&u<=12783,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"Private Use Area":u=>u>=57344&&u<=63743,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Pi(u){for(const Xe of u)if(Ti(Xe.charCodeAt(0)))return!0;return!1}function Ci(u){for(const Xe of u)if(!Ei(Xe.charCodeAt(0)))return!1;return!0}function Bi(u){const Xe=u.map((u=>{try{return new RegExp(`\\p{sc=${u}}`,"u").source}catch(u){return null}})).filter((u=>u));return new RegExp(Xe.join("|"),"u")}const Pc=Bi(["Arab","Dupl","Mong","Ougr","Syrc"]);function Ei(u){return!Pc.test(String.fromCodePoint(u))}const tg=Bi(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ti(u){return!(746!==u&&747!==u&&(u<4352||!(vc["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||vc["CJK Compatibility"](u)||vc["CJK Strokes"](u)||!(!vc["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||12336===u)||vc["Enclosed CJK Letters and Months"](u)||vc["Ideographic Description Characters"](u)||vc.Kanbun(u)||vc.Katakana(u)&&12540!==u||!(!vc["Halfwidth and Fullwidth Forms"](u)||65288===u||65289===u||65293===u||u>=65306&&u<=65310||65339===u||65341===u||65343===u||u>=65371&&u<=65503||65507===u||u>=65512&&u<=65519)||!(!vc["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||vc["Vertical Forms"](u)||vc["Yijing Hexagram Symbols"](u)||/\p{sc=Cans}/u.test(String.fromCodePoint(u))||/\p{sc=Hang}/u.test(String.fromCodePoint(u))||tg.test(String.fromCodePoint(u)))))}function $i(u){return!(Ti(u)||function(u){return!!(vc["Latin-1 Supplement"](u)&&(167===u||169===u||174===u||177===u||188===u||189===u||190===u||215===u||247===u)||vc["General Punctuation"](u)&&(8214===u||8224===u||8225===u||8240===u||8241===u||8251===u||8252===u||8258===u||8263===u||8264===u||8265===u||8273===u)||vc["Letterlike Symbols"](u)||vc["Number Forms"](u)||vc["Miscellaneous Technical"](u)&&(u>=8960&&u<=8967||u>=8972&&u<=8991||u>=8996&&u<=9e3||9003===u||u>=9085&&u<=9114||u>=9150&&u<=9165||9167===u||u>=9169&&u<=9179||u>=9186&&u<=9215)||vc["Control Pictures"](u)&&9251!==u||vc["Optical Character Recognition"](u)||vc["Enclosed Alphanumerics"](u)||vc["Geometric Shapes"](u)||vc["Miscellaneous Symbols"](u)&&!(u>=9754&&u<=9759)||vc["Miscellaneous Symbols and Arrows"](u)&&(u>=11026&&u<=11055||u>=11088&&u<=11097||u>=11192&&u<=11243)||vc["CJK Symbols and Punctuation"](u)||vc.Katakana(u)||vc["Private Use Area"](u)||vc["CJK Compatibility Forms"](u)||vc["Small Form Variants"](u)||vc["Halfwidth and Fullwidth Forms"](u)||8734===u||8756===u||8757===u||u>=9984&&u<=10087||u>=10102&&u<=10131||65532===u||65533===u)}(u))}const eg=Bi(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Di(u){return eg.test(String.fromCodePoint(u))}function Oi(u,Xe){return!(!Xe&&Di(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||vc.Khmer(u))}function ji(u){for(const Xe of u)if(Di(Xe.charCodeAt(0)))return!0;return!1}const ig=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Ui{constructor(u,Xe){this.zoom=u,Xe?(this.now=Xe.now,this.fadeDuration=Xe.fadeDuration,this.zoomHistory=Xe.zoomHistory,this.transition=Xe.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ii,this.transition={})}isSupportedScript(u){return function(u,Xe){for(const fr of u)if(!Oi(fr.charCodeAt(0),Xe))return!1;return!0}(u,"loaded"===ig.getRTLTextPluginStatus())}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const u=this.zoom,Xe=u-Math.floor(u),fr=this.crossFadingFactor();return u>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:Xe+(1-Xe)*fr}:{fromScale:.5,toScale:1,t:1-(1-fr)*Xe}}}class qi{constructor(u,Xe){this.property=u,this.value=Xe,this.expression=function(u,Xe){if(cn(u))return new Sn(u,Xe);if(vn(u)){const fr=An(u,Xe);if("error"===fr.result)throw new Error(fr.value.map((u=>`${u.key}: ${u.message}`)).join(", "));return fr.value}{let fr=u;return"color"===Xe.type&&"string"==typeof u?fr=Kt.parse(u):"padding"!==Xe.type||"number"!=typeof u&&!Array.isArray(u)?"variableAnchorOffsetCollection"===Xe.type&&Array.isArray(u)&&(fr=Qt.parse(u)):fr=Jt.parse(u),{kind:"constant",evaluate:()=>fr}}}(void 0===Xe?u.specification.default:Xe,u.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(u,Xe,fr){return this.property.possiblyEvaluate(this,u,Xe,fr)}}class Ni{constructor(u){this.property=u,this.value=new qi(u,void 0)}transitioned(u,Xe){return new Gi(this.property,this.value,Xe,g({},u.transition,this.transition),u.now)}untransitioned(){return new Gi(this.property,this.value,null,{},0)}}class Zi{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitionablePropertyValues)}getValue(u){return w(this._values[u].value.value)}setValue(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].value=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}getTransition(u){return w(this._values[u].transition)}setTransition(u,Xe){Object.prototype.hasOwnProperty.call(this._values,u)||(this._values[u]=new Ni(this._values[u].property)),this._values[u].transition=w(Xe)||void 0}serialize(){const u={};for(const Xe of Object.keys(this._values)){const fr=this.getValue(Xe);void 0!==fr&&(u[Xe]=fr);const Ar=this.getTransition(Xe);void 0!==Ar&&(u[`${Xe}-transition`]=Ar)}return u}transitioned(u,Xe){const fr=new Ki(this._properties);for(const Ar of Object.keys(this._values))fr._values[Ar]=this._values[Ar].transitioned(u,Xe._values[Ar]);return fr}untransitioned(){const u=new Ki(this._properties);for(const Xe of Object.keys(this._values))u._values[Xe]=this._values[Xe].untransitioned();return u}}class Gi{constructor(u,Xe,fr,Ar,_r){this.property=u,this.value=Xe,this.begin=_r+Ar.delay||0,this.end=this.begin+Ar.duration||0,u.specification.transition&&(Ar.delay||Ar.duration)&&(this.prior=fr)}possiblyEvaluate(u,Xe,fr){const Ar=u.now||0,_r=this.value.possiblyEvaluate(u,Xe,fr),wr=this.prior;if(wr){if(Ar>this.end)return this.prior=null,_r;if(this.value.isDataDriven())return this.prior=null,_r;if(Ar<this.begin)return wr.possiblyEvaluate(u,Xe,fr);{const Kr=(Ar-this.begin)/(this.end-this.begin);return this.property.interpolate(wr.possiblyEvaluate(u,Xe,fr),_r,function(u){if(u<=0)return 0;if(u>=1)return 1;const Xe=u*u,fr=Xe*u;return 4*(u<.5?fr:3*(u-Xe)+fr-.75)}(Kr))}}return _r}}class Ki{constructor(u){this._properties=u,this._values=Object.create(u.defaultTransitioningPropertyValues)}possiblyEvaluate(u,Xe,fr){const Ar=new Yi(this._properties);for(const _r of Object.keys(this._values))Ar._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,fr);return Ar}hasTransition(){for(const u of Object.keys(this._values))if(this._values[u].prior)return!0;return!1}}class Xi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPropertyValues)}hasValue(u){return void 0!==this._values[u].value}getValue(u){return w(this._values[u].value)}setValue(u,Xe){this._values[u]=new qi(this._values[u].property,null===Xe?void 0:w(Xe))}serialize(){const u={};for(const Xe of Object.keys(this._values)){const fr=this.getValue(Xe);void 0!==fr&&(u[Xe]=fr)}return u}possiblyEvaluate(u,Xe,fr){const Ar=new Yi(this._properties);for(const _r of Object.keys(this._values))Ar._values[_r]=this._values[_r].possiblyEvaluate(u,Xe,fr);return Ar}}class Hi{constructor(u,Xe,fr){this.property=u,this.value=Xe,this.parameters=fr}isConstant(){return"constant"===this.value.kind}constantOr(u){return"constant"===this.value.kind?this.value.value:u}evaluate(u,Xe,fr,Ar){return this.property.evaluate(this.value,this.parameters,u,Xe,fr,Ar)}}class Yi{constructor(u){this._properties=u,this._values=Object.create(u.defaultPossiblyEvaluatedValues)}get(u){return this._values[u]}}class Ji{constructor(u){this.specification=u}possiblyEvaluate(u,Xe){if(u.isDataDriven())throw new Error("Value should not be data driven");return u.expression.evaluate(Xe)}interpolate(u,Xe,fr){const Ar=Kl[this.specification.type];return Ar?Ar(u,Xe,fr):u}}class Wi{constructor(u,Xe){this.specification=u,this.overrides=Xe}possiblyEvaluate(u,Xe,fr,Ar){return new Hi(this,"constant"===u.expression.kind||"camera"===u.expression.kind?{kind:"constant",value:u.expression.evaluate(Xe,null,{},fr,Ar)}:u.expression,Xe)}interpolate(u,Xe,fr){if("constant"!==u.value.kind||"constant"!==Xe.value.kind)return u;if(void 0===u.value.value||void 0===Xe.value.value)return new Hi(this,{kind:"constant",value:void 0},u.parameters);const Ar=Kl[this.specification.type];if(Ar){const _r=Ar(u.value.value,Xe.value.value,fr);return new Hi(this,{kind:"constant",value:_r},u.parameters)}return u}evaluate(u,Xe,fr,Ar,_r,wr){return"constant"===u.kind?u.value:u.evaluate(Xe,fr,Ar,_r,wr)}}class Qi extends Wi{possiblyEvaluate(u,Xe,fr,Ar){if(void 0===u.value)return new Hi(this,{kind:"constant",value:void 0},Xe);if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},fr,Ar),wr="resolvedImage"===u.property.specification.type&&"string"!=typeof _r?_r.name:_r,Kr=this._calculate(wr,wr,wr,Xe);return new Hi(this,{kind:"constant",value:Kr},Xe)}if("camera"===u.expression.kind){const fr=this._calculate(u.expression.evaluate({zoom:Xe.zoom-1}),u.expression.evaluate({zoom:Xe.zoom}),u.expression.evaluate({zoom:Xe.zoom+1}),Xe);return new Hi(this,{kind:"constant",value:fr},Xe)}return new Hi(this,u.expression,Xe)}evaluate(u,Xe,fr,Ar,_r,wr){if("source"===u.kind){const Kr=u.evaluate(Xe,fr,Ar,_r,wr);return this._calculate(Kr,Kr,Kr,Xe)}return"composite"===u.kind?this._calculate(u.evaluate({zoom:Math.floor(Xe.zoom)-1},fr,Ar),u.evaluate({zoom:Math.floor(Xe.zoom)},fr,Ar),u.evaluate({zoom:Math.floor(Xe.zoom)+1},fr,Ar),Xe):u.value}_calculate(u,Xe,fr,Ar){return Ar.zoom>Ar.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:fr,to:Xe}}interpolate(u){return u}}class ts{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,fr,Ar){if(void 0!==u.value){if("constant"===u.expression.kind){const _r=u.expression.evaluate(Xe,null,{},fr,Ar);return this._calculate(_r,_r,_r,Xe)}return this._calculate(u.expression.evaluate(new Ui(Math.floor(Xe.zoom-1),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom),Xe)),u.expression.evaluate(new Ui(Math.floor(Xe.zoom+1),Xe)),Xe)}}_calculate(u,Xe,fr,Ar){return Ar.zoom>Ar.zoomHistory.lastIntegerZoom?{from:u,to:Xe}:{from:fr,to:Xe}}interpolate(u){return u}}class es{constructor(u){this.specification=u}possiblyEvaluate(u,Xe,fr,Ar){return!!u.expression.evaluate(Xe,null,{},fr,Ar)}interpolate(){return!1}}class rs{constructor(u){this.properties=u,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const Xe in u){const fr=u[Xe];fr.specification.overridable&&this.overridableProperties.push(Xe);const Ar=this.defaultPropertyValues[Xe]=new qi(fr,void 0),_r=this.defaultTransitionablePropertyValues[Xe]=new Ni(fr);this.defaultTransitioningPropertyValues[Xe]=_r.untransitioned(),this.defaultPossiblyEvaluatedValues[Xe]=Ar.possiblyEvaluate({})}}}wi("DataDrivenProperty",Wi),wi("DataConstantProperty",Ji),wi("CrossFadedDataDrivenProperty",Qi),wi("CrossFadedProperty",ts),wi("ColorRampProperty",es);const rg="-transition";class is extends Z{constructor(u,Xe){if(super(),this.id=u.id,this.type=u.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==u.type&&(this.metadata=u.metadata,this.minzoom=u.minzoom,this.maxzoom=u.maxzoom,"background"!==u.type&&(this.source=u.source,this.sourceLayer=u["source-layer"],this.filter=u.filter),Xe.layout&&(this._unevaluatedLayout=new Xi(Xe.layout)),Xe.paint)){this._transitionablePaint=new Zi(Xe.paint);for(const Xe in u.paint)this.setPaintProperty(Xe,u.paint[Xe],{validate:!1});for(const Xe in u.layout)this.setLayoutProperty(Xe,u.layout[Xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Yi(Xe.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(u){return"visibility"===u?this.visibility:this._unevaluatedLayout.getValue(u)}setLayoutProperty(u,Xe,fr={}){null!=Xe&&this._validate(bc,`layers.${this.id}.layout.${u}`,u,Xe,fr)||("visibility"!==u?this._unevaluatedLayout.setValue(u,Xe):this.visibility=Xe)}getPaintProperty(u){return u.endsWith(rg)?this._transitionablePaint.getTransition(u.slice(0,-11)):this._transitionablePaint.getValue(u)}setPaintProperty(u,Xe,fr={}){if(null!=Xe&&this._validate(Ac,`layers.${this.id}.paint.${u}`,u,Xe,fr))return!1;if(u.endsWith(rg))return this._transitionablePaint.setTransition(u.slice(0,-11),Xe||void 0),!1;{const fr=this._transitionablePaint._values[u],Ar="cross-faded-data-driven"===fr.property.specification["property-type"],_r=fr.value.isDataDriven(),wr=fr.value;this._transitionablePaint.setValue(u,Xe),this._handleSpecialPaintPropertyUpdate(u);const Kr=this._transitionablePaint._values[u].value;return Kr.isDataDriven()||_r||Ar||this._handleOverridablePaintPropertyUpdate(u,wr,Kr)}}_handleSpecialPaintPropertyUpdate(u){}_handleOverridablePaintPropertyUpdate(u,Xe,fr){return!1}isHidden(u){return!!(this.minzoom&&u<this.minzoom)||!!(this.maxzoom&&u>=this.maxzoom)||"none"===this.visibility}updateTransitions(u){this._transitioningPaint=this._transitionablePaint.transitioned(u,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(u,Xe){u.getCrossfadeParameters&&(this._crossfadeParameters=u.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(u,void 0,Xe)),this.paint=this._transitioningPaint.possiblyEvaluate(u,void 0,Xe)}serialize(){const u={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&&(u.layout=u.layout||{},u.layout.visibility=this.visibility),b(u,((u,Xe)=>!(void 0===u||"layout"===Xe&&!Object.keys(u).length||"paint"===Xe&&!Object.keys(u).length)))}_validate(u,Xe,fr,Ar,_r={}){return(!_r||!1!==_r.validate)&&xi(this,u.call(mc,{key:Xe,layerType:this.type,objectKey:fr,value:Ar,styleSpec:Io,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const u in this.paint._values){const Xe=this.paint.get(u);if(Xe instanceof Hi&&an(Xe.property.specification)&&("source"===Xe.value.kind||"composite"===Xe.value.kind)&&Xe.value.isStateDependent)return!0}return!1}}const ng={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class as{constructor(u,Xe){this._structArray=u,this._pos1=Xe*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class os{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(u,Xe){return u._trim(),Xe&&(u.isTransferred=!0,Xe.push(u.arrayBuffer)),{length:u.length,arrayBuffer:u.arrayBuffer}}static deserialize(u){const Xe=Object.create(this.prototype);return Xe.arrayBuffer=u.arrayBuffer,Xe.length=u.length,Xe.capacity=u.arrayBuffer.byteLength/Xe.bytesPerElement,Xe._refreshViews(),Xe}_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(u){this.reserve(u),this.length=u}reserve(u){if(u>this.capacity){this.capacity=Math.max(u,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const Xe=this.uint8;this._refreshViews(),Xe&&this.uint8.set(Xe)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ls(u,Xe=1){let fr=0,Ar=0;return{members:u.map((u=>{const _r=ng[u.type].BYTES_PER_ELEMENT,wr=fr=us(fr,Math.max(Xe,_r)),Kr=u.components||1;return Ar=Math.max(Ar,_r),fr+=_r*Kr,{name:u.name,type:u.type,components:Kr,offset:wr}})),size:us(fr,Math.max(Ar,Xe)),alignment:Xe}}function us(u,Xe){return Math.ceil(u/Xe)*Xe}class cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.int16[Ar+0]=Xe,this.int16[Ar+1]=fr,u}}cs.prototype.bytesPerElement=4,wi("StructArrayLayout2i4",cs);class hs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.int16[_r+0]=Xe,this.int16[_r+1]=fr,this.int16[_r+2]=Ar,u}}hs.prototype.bytesPerElement=6,wi("StructArrayLayout3i6",hs);class ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,fr,Ar)}emplace(u,Xe,fr,Ar,_r){const wr=4*u;return this.int16[wr+0]=Xe,this.int16[wr+1]=fr,this.int16[wr+2]=Ar,this.int16[wr+3]=_r,u}}ps.prototype.bytesPerElement=8,wi("StructArrayLayout4i8",ps);class fs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=6*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.int16[In+2]=Ar,this.int16[In+3]=_r,this.int16[In+4]=wr,this.int16[In+5]=Kr,u}}fs.prototype.bytesPerElement=12,wi("StructArrayLayout2i4i12",fs);class ds extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=4*u,io=8*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.uint8[io+4]=Ar,this.uint8[io+5]=_r,this.uint8[io+6]=wr,this.uint8[io+7]=Kr,u}}ds.prototype.bytesPerElement=8,wi("StructArrayLayout2i4ub8",ds);class ys extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.float32[Ar+0]=Xe,this.float32[Ar+1]=fr,u}}ys.prototype.bytesPerElement=8,wi("StructArrayLayout2f8",ys);class ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=this.length;return this.resize(oo+1),this.emplace(oo,u,Xe,fr,Ar,_r,wr,Kr,In,io,no)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=10*u;return this.uint16[so+0]=Xe,this.uint16[so+1]=fr,this.uint16[so+2]=Ar,this.uint16[so+3]=_r,this.uint16[so+4]=wr,this.uint16[so+5]=Kr,this.uint16[so+6]=In,this.uint16[so+7]=io,this.uint16[so+8]=no,this.uint16[so+9]=oo,u}}ms.prototype.bytesPerElement=20,wi("StructArrayLayout10ui20",ms);class gs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so){const ao=this.length;return this.resize(ao+1),this.emplace(ao,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=12*u;return this.int16[co+0]=Xe,this.int16[co+1]=fr,this.int16[co+2]=Ar,this.int16[co+3]=_r,this.uint16[co+4]=wr,this.uint16[co+5]=Kr,this.uint16[co+6]=In,this.uint16[co+7]=io,this.int16[co+8]=no,this.int16[co+9]=oo,this.int16[co+10]=so,this.int16[co+11]=ao,u}}gs.prototype.bytesPerElement=24,wi("StructArrayLayout4i4ui4i24",gs);class xs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.float32[_r+0]=Xe,this.float32[_r+1]=fr,this.float32[_r+2]=Ar,u}}xs.prototype.bytesPerElement=12,wi("StructArrayLayout3f12",xs);class vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint32[1*u+0]=Xe,u}}vs.prototype.bytesPerElement=4,wi("StructArrayLayout1ul4",vs);class bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=this.length;return this.resize(no+1),this.emplace(no,u,Xe,fr,Ar,_r,wr,Kr,In,io)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=10*u,so=5*u;return this.int16[oo+0]=Xe,this.int16[oo+1]=fr,this.int16[oo+2]=Ar,this.int16[oo+3]=_r,this.int16[oo+4]=wr,this.int16[oo+5]=Kr,this.uint32[so+3]=In,this.uint16[oo+8]=io,this.uint16[oo+9]=no,u}}bs.prototype.bytesPerElement=20,wi("StructArrayLayout6i1ul2ui20",bs);class ws extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=6*u;return this.int16[In+0]=Xe,this.int16[In+1]=fr,this.int16[In+2]=Ar,this.int16[In+3]=_r,this.int16[In+4]=wr,this.int16[In+5]=Kr,u}}ws.prototype.bytesPerElement=12,wi("StructArrayLayout2i2i2i12",ws);class _s extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r){const wr=this.length;return this.resize(wr+1),this.emplace(wr,u,Xe,fr,Ar,_r)}emplace(u,Xe,fr,Ar,_r,wr){const Kr=4*u,In=8*u;return this.float32[Kr+0]=Xe,this.float32[Kr+1]=fr,this.float32[Kr+2]=Ar,this.int16[In+6]=_r,this.int16[In+7]=wr,u}}_s.prototype.bytesPerElement=16,wi("StructArrayLayout2f1f2i16",_s);class As extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr){const Kr=this.length;return this.resize(Kr+1),this.emplace(Kr,u,Xe,fr,Ar,_r,wr)}emplace(u,Xe,fr,Ar,_r,wr,Kr){const In=16*u,io=4*u,no=8*u;return this.uint8[In+0]=Xe,this.uint8[In+1]=fr,this.float32[io+1]=Ar,this.float32[io+2]=_r,this.int16[no+6]=wr,this.int16[no+7]=Kr,u}}As.prototype.bytesPerElement=16,wi("StructArrayLayout2ub2f2i16",As);class Ss extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.uint16[_r+0]=Xe,this.uint16[_r+1]=fr,this.uint16[_r+2]=Ar,u}}Ss.prototype.bytesPerElement=6,wi("StructArrayLayout3ui6",Ss);class ks extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co){const Io=this.length;return this.resize(Io+1),this.emplace(Io,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io){const xo=24*u,Mo=12*u,Po=48*u;return this.int16[xo+0]=Xe,this.int16[xo+1]=fr,this.uint16[xo+2]=Ar,this.uint16[xo+3]=_r,this.uint32[Mo+2]=wr,this.uint32[Mo+3]=Kr,this.uint32[Mo+4]=In,this.uint16[xo+10]=io,this.uint16[xo+11]=no,this.uint16[xo+12]=oo,this.float32[Mo+7]=so,this.float32[Mo+8]=ao,this.uint8[Po+36]=co,this.uint8[Po+37]=go,this.uint8[Po+38]=ho,this.uint32[Mo+10]=Co,this.int16[xo+22]=Io,u}}ks.prototype.bytesPerElement=48,wi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ks);class Ms extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl){const al=this.length;return this.resize(al+1),this.emplace(al,u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl)}emplace(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya,ol,sl,al){const cl=32*u,hl=16*u;return this.int16[cl+0]=Xe,this.int16[cl+1]=fr,this.int16[cl+2]=Ar,this.int16[cl+3]=_r,this.int16[cl+4]=wr,this.int16[cl+5]=Kr,this.int16[cl+6]=In,this.int16[cl+7]=io,this.uint16[cl+8]=no,this.uint16[cl+9]=oo,this.uint16[cl+10]=so,this.uint16[cl+11]=ao,this.uint16[cl+12]=co,this.uint16[cl+13]=go,this.uint16[cl+14]=ho,this.uint16[cl+15]=Co,this.uint16[cl+16]=Io,this.uint16[cl+17]=xo,this.uint16[cl+18]=Mo,this.uint16[cl+19]=Po,this.uint16[cl+20]=ss,this.uint16[cl+21]=sa,this.uint16[cl+22]=aa,this.uint32[hl+12]=fa,this.float32[hl+13]=ya,this.float32[hl+14]=ol,this.uint16[cl+30]=sl,this.uint16[cl+31]=al,u}}Ms.prototype.bytesPerElement=64,wi("StructArrayLayout8i15ui1ul2f2ui64",Ms);class Is extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.float32[1*u+0]=Xe,u}}Is.prototype.bytesPerElement=4,wi("StructArrayLayout1f4",Is);class zs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=3*u;return this.uint16[6*u+0]=Xe,this.float32[_r+1]=fr,this.float32[_r+2]=Ar,u}}zs.prototype.bytesPerElement=12,wi("StructArrayLayout1ui2f12",zs);class Ps extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe,fr){const Ar=this.length;return this.resize(Ar+1),this.emplace(Ar,u,Xe,fr)}emplace(u,Xe,fr,Ar){const _r=4*u;return this.uint32[2*u+0]=Xe,this.uint16[_r+2]=fr,this.uint16[_r+3]=Ar,u}}Ps.prototype.bytesPerElement=8,wi("StructArrayLayout1ul2ui8",Ps);class Cs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u,Xe){const fr=this.length;return this.resize(fr+1),this.emplace(fr,u,Xe)}emplace(u,Xe,fr){const Ar=2*u;return this.uint16[Ar+0]=Xe,this.uint16[Ar+1]=fr,u}}Cs.prototype.bytesPerElement=4,wi("StructArrayLayout2ui4",Cs);class Bs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(u){const Xe=this.length;return this.resize(Xe+1),this.emplace(Xe,u)}emplace(u,Xe){return this.uint16[1*u+0]=Xe,u}}Bs.prototype.bytesPerElement=2,wi("StructArrayLayout1ui2",Bs);class Vs extends os{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(u,Xe,fr,Ar){const _r=this.length;return this.resize(_r+1),this.emplace(_r,u,Xe,fr,Ar)}emplace(u,Xe,fr,Ar,_r){const wr=4*u;return this.float32[wr+0]=Xe,this.float32[wr+1]=fr,this.float32[wr+2]=Ar,this.float32[wr+3]=_r,u}}Vs.prototype.bytesPerElement=16,wi("StructArrayLayout4f16",Vs);class Es extends as{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new fr(this.anchorPointX,this.anchorPointY)}}Es.prototype.size=20;class Fs extends bs{get(u){return new Es(this,u)}}wi("CollisionBoxArray",Fs);class Ts extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(u){this._structArray.uint8[this._pos1+37]=u}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(u){this._structArray.uint8[this._pos1+38]=u}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(u){this._structArray.uint32[this._pos4+10]=u}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Ts.prototype.size=48;class $s extends ks{get(u){return new Ts(this,u)}}wi("PlacedSymbolArray",$s);class Ls extends as{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(u){this._structArray.uint32[this._pos4+12]=u}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ls.prototype.size=64;class Ds extends Ms{get(u){return new Ls(this,u)}}wi("SymbolInstanceArray",Ds);class Os extends Is{getoffsetX(u){return this.float32[1*u+0]}}wi("GlyphOffsetArray",Os);class js extends hs{getx(u){return this.int16[3*u+0]}gety(u){return this.int16[3*u+1]}gettileUnitDistanceFromAnchor(u){return this.int16[3*u+2]}}wi("SymbolLineVertexArray",js);class Rs extends as{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Rs.prototype.size=12;class Us extends zs{get(u){return new Rs(this,u)}}wi("TextAnchorOffsetArray",Us);class qs extends as{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]}}qs.prototype.size=8;class Ns extends Ps{get(u){return new qs(this,u)}}wi("FeatureIndexArray",Ns);class Zs extends cs{}class Gs extends cs{}class Ks extends cs{}class Xs extends fs{}class Hs extends ds{}class Ys extends ys{}class Js extends ms{}class Ws extends gs{}class Qs extends xs{}class ta extends vs{}class ea extends ws{}class ra extends As{}class na extends Ss{}class ia extends Cs{}const og=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:sg}=og;class oa{constructor(u=[]){this.segments=u}prepareSegment(u,Xe,fr,Ar){let _r=this.segments[this.segments.length-1];return u>oa.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${oa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${u}`),(!_r||_r.vertexLength+u>oa.MAX_VERTEX_ARRAY_LENGTH||_r.sortKey!==Ar)&&(_r={vertexOffset:Xe.length,primitiveOffset:fr.length,vertexLength:0,primitiveLength:0},void 0!==Ar&&(_r.sortKey=Ar),this.segments.push(_r)),_r}get(){return this.segments}destroy(){for(const u of this.segments)for(const Xe in u.vaos)u.vaos[Xe].destroy()}static simpleSegment(u,Xe,fr,Ar){return new oa([{vertexOffset:u,primitiveOffset:Xe,vertexLength:fr,primitiveLength:Ar,vaos:{},sortKey:0}])}}function la(u,Xe){return 256*(u=y(Math.floor(u),0,255))+y(Math.floor(Xe),0,255)}oa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,wi("SegmentVector",oa);const ag=ls([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var lg={exports:{}},cg={exports:{}};cg.exports=function(u,Xe){var fr,Ar,_r,wr,Kr,In,io,no;for(Ar=u.length-(fr=3&u.length),_r=Xe,Kr=3432918353,In=461845907,no=0;no<Ar;)io=255&u.charCodeAt(no)|(255&u.charCodeAt(++no))<<8|(255&u.charCodeAt(++no))<<16|(255&u.charCodeAt(++no))<<24,++no,_r=27492+(65535&(wr=5*(65535&(_r=(_r^=io=(65535&(io=(io=(65535&io)*Kr+(((io>>>16)*Kr&65535)<<16)&4294967295)<<15|io>>>17))*In+(((io>>>16)*In&65535)<<16)&4294967295)<<13|_r>>>19))+((5*(_r>>>16)&65535)<<16)&4294967295))+((58964+(wr>>>16)&65535)<<16);switch(io=0,fr){case 3:io^=(255&u.charCodeAt(no+2))<<16;case 2:io^=(255&u.charCodeAt(no+1))<<8;case 1:_r^=io=(65535&(io=(io=(65535&(io^=255&u.charCodeAt(no)))*Kr+(((io>>>16)*Kr&65535)<<16)&4294967295)<<15|io>>>17))*In+(((io>>>16)*In&65535)<<16)&4294967295}return _r^=u.length,_r=2246822507*(65535&(_r^=_r>>>16))+((2246822507*(_r>>>16)&65535)<<16)&4294967295,_r=3266489909*(65535&(_r^=_r>>>13))+((3266489909*(_r>>>16)&65535)<<16)&4294967295,(_r^=_r>>>16)>>>0};var gg=cg.exports,hg={exports:{}};hg.exports=function(u,Xe){for(var fr,Ar=u.length,_r=Xe^Ar,wr=0;Ar>=4;)fr=1540483477*(65535&(fr=255&u.charCodeAt(wr)|(255&u.charCodeAt(++wr))<<8|(255&u.charCodeAt(++wr))<<16|(255&u.charCodeAt(++wr))<<24))+((1540483477*(fr>>>16)&65535)<<16),_r=1540483477*(65535&_r)+((1540483477*(_r>>>16)&65535)<<16)^(fr=1540483477*(65535&(fr^=fr>>>24))+((1540483477*(fr>>>16)&65535)<<16)),Ar-=4,++wr;switch(Ar){case 3:_r^=(255&u.charCodeAt(wr+2))<<16;case 2:_r^=(255&u.charCodeAt(wr+1))<<8;case 1:_r=1540483477*(65535&(_r^=255&u.charCodeAt(wr)))+((1540483477*(_r>>>16)&65535)<<16)}return _r=1540483477*(65535&(_r^=_r>>>13))+((1540483477*(_r>>>16)&65535)<<16),(_r^=_r>>>15)>>>0};var ug=gg,dg=hg.exports;lg.exports=ug,lg.exports.murmur3=ug,lg.exports.murmur2=dg;var pg=r(lg.exports);class ga{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(u,Xe,fr,Ar){this.ids.push(xa(u)),this.positions.push(Xe,fr,Ar)}getPositions(u){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const Xe=xa(u);let fr=0,Ar=this.ids.length-1;for(;fr<Ar;){const u=fr+Ar>>1;this.ids[u]>=Xe?Ar=u:fr=u+1}const _r=[];for(;this.ids[fr]===Xe;)_r.push({index:this.positions[3*fr],start:this.positions[3*fr+1],end:this.positions[3*fr+2]}),fr++;return _r}static serialize(u,Xe){const fr=new Float64Array(u.ids),Ar=new Uint32Array(u.positions);return va(fr,Ar,0,fr.length-1),Xe&&Xe.push(fr.buffer,Ar.buffer),{ids:fr,positions:Ar}}static deserialize(u){const Xe=new ga;return Xe.ids=u.ids,Xe.positions=u.positions,Xe.indexed=!0,Xe}}function xa(u){const Xe=+u;return!isNaN(Xe)&&Xe<=Number.MAX_SAFE_INTEGER?Xe:pg(String(u))}function va(u,Xe,fr,Ar){for(;fr<Ar;){const _r=u[fr+Ar>>1];let wr=fr-1,Kr=Ar+1;for(;;){do{wr++}while(u[wr]<_r);do{Kr--}while(u[Kr]>_r);if(wr>=Kr)break;ba(u,wr,Kr),ba(Xe,3*wr,3*Kr),ba(Xe,3*wr+1,3*Kr+1),ba(Xe,3*wr+2,3*Kr+2)}Kr-fr<Ar-Kr?(va(u,Xe,fr,Kr),fr=Kr+1):(va(u,Xe,Kr+1,Ar),Ar=Kr)}}function ba(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}wi("FeaturePositionMap",ga);class wa{constructor(u,Xe){this.gl=u.gl,this.location=Xe}}class _a extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1f(this.location,u))}}class Aa extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]&&u[3]===this.current[3]||(this.current=u,this.gl.uniform4f(this.location,u[0],u[1],u[2],u[3]))}}class Sa extends wa{constructor(u,Xe){super(u,Xe),this.current=Kt.transparent}set(u){u.r===this.current.r&&u.g===this.current.g&&u.b===this.current.b&&u.a===this.current.a||(this.current=u,this.gl.uniform4f(this.location,u.r,u.g,u.b,u.a))}}const mg=new Float32Array(16);function Ma(u){return[la(255*u.r,255*u.g),la(255*u.b,255*u.a)]}class Ia{constructor(u,Xe,fr){this.value=u,this.uniformNames=Xe.map((u=>`u_${u}`)),this.type=fr}setUniform(u,Xe,fr){u.set(fr.constantOr(this.value))}getBinding(u,Xe,fr){return"color"===this.type?new Sa(u,Xe):new _a(u,Xe)}}class za{constructor(u,Xe){this.uniformNames=Xe.map((u=>`u_${u}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(u,Xe){this.pixelRatioFrom=Xe.pixelRatio,this.pixelRatioTo=u.pixelRatio,this.patternFrom=Xe.tlbr,this.patternTo=u.tlbr}setUniform(u,Xe,fr,Ar){const _r="u_pattern_to"===Ar?this.patternTo:"u_pattern_from"===Ar?this.patternFrom:"u_pixel_ratio_to"===Ar?this.pixelRatioTo:"u_pixel_ratio_from"===Ar?this.pixelRatioFrom:null;_r&&u.set(_r)}getBinding(u,Xe,fr){return"u_pattern"===fr.substr(0,9)?new Aa(u,Xe):new _a(u,Xe)}}class Pa{constructor(u,Xe,fr,Ar){this.expression=u,this.type=fr,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===fr?2:1,offset:0}))),this.paintVertexArray=new Ar}populatePaintArray(u,Xe,fr,Ar,_r){const wr=this.paintVertexArray.length,Kr=this.expression.evaluate(new Ui(0),Xe,{},Ar,[],_r);this.paintVertexArray.resize(u),this._setPaintValue(wr,u,Kr)}updatePaintArray(u,Xe,fr,Ar){const _r=this.expression.evaluate({zoom:0},fr,Ar);this._setPaintValue(u,Xe,_r)}_setPaintValue(u,Xe,fr){if("color"===this.type){const Ar=Ma(fr);for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,Ar[0],Ar[1])}else{for(let Ar=u;Ar<Xe;Ar++)this.paintVertexArray.emplace(Ar,fr);this.maxValue=Math.max(this.maxValue,Math.abs(fr))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class Ca{constructor(u,Xe,fr,Ar,_r,wr){this.expression=u,this.uniformNames=Xe.map((u=>`u_${u}_t`)),this.type=fr,this.useIntegerZoom=Ar,this.zoom=_r,this.maxValue=0,this.paintVertexAttributes=Xe.map((u=>({name:`a_${u}`,type:"Float32",components:"color"===fr?4:2,offset:0}))),this.paintVertexArray=new wr}populatePaintArray(u,Xe,fr,Ar,_r){const wr=this.expression.evaluate(new Ui(this.zoom),Xe,{},Ar,[],_r),Kr=this.expression.evaluate(new Ui(this.zoom+1),Xe,{},Ar,[],_r),In=this.paintVertexArray.length;this.paintVertexArray.resize(u),this._setPaintValue(In,u,wr,Kr)}updatePaintArray(u,Xe,fr,Ar){const _r=this.expression.evaluate({zoom:this.zoom},fr,Ar),wr=this.expression.evaluate({zoom:this.zoom+1},fr,Ar);this._setPaintValue(u,Xe,_r,wr)}_setPaintValue(u,Xe,fr,Ar){if("color"===this.type){const _r=Ma(fr),wr=Ma(Ar);for(let fr=u;fr<Xe;fr++)this.paintVertexArray.emplace(fr,_r[0],_r[1],wr[0],wr[1])}else{for(let _r=u;_r<Xe;_r++)this.paintVertexArray.emplace(_r,fr,Ar);this.maxValue=Math.max(this.maxValue,Math.abs(fr),Math.abs(Ar))}}upload(u){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=u.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(u,Xe){const fr=this.useIntegerZoom?Math.floor(Xe.zoom):Xe.zoom,Ar=y(this.expression.interpolationFactor(fr,this.zoom,this.zoom+1),0,1);u.set(Ar)}getBinding(u,Xe,fr){return new _a(u,Xe)}}class Ba{constructor(u,Xe,fr,Ar,_r,wr){this.expression=u,this.type=Xe,this.useIntegerZoom=fr,this.zoom=Ar,this.layerId=wr,this.zoomInPaintVertexArray=new _r,this.zoomOutPaintVertexArray=new _r}populatePaintArray(u,Xe,fr){const Ar=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(u),this.zoomOutPaintVertexArray.resize(u),this._setPaintValues(Ar,u,Xe.patterns&&Xe.patterns[this.layerId],fr)}updatePaintArray(u,Xe,fr,Ar,_r){this._setPaintValues(u,Xe,fr.patterns&&fr.patterns[this.layerId],_r)}_setPaintValues(u,Xe,fr,Ar){if(!Ar||!fr)return;const{min:_r,mid:wr,max:Kr}=fr,In=Ar[_r],io=Ar[wr],no=Ar[Kr];if(In&&io&&no)for(let fr=u;fr<Xe;fr++)this.zoomInPaintVertexArray.emplace(fr,io.tl[0],io.tl[1],io.br[0],io.br[1],In.tl[0],In.tl[1],In.br[0],In.br[1],io.pixelRatio,In.pixelRatio),this.zoomOutPaintVertexArray.emplace(fr,io.tl[0],io.tl[1],io.br[0],io.br[1],no.tl[0],no.tl[1],no.br[0],no.br[1],io.pixelRatio,no.pixelRatio)}upload(u){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=u.createVertexBuffer(this.zoomInPaintVertexArray,ag.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=u.createVertexBuffer(this.zoomOutPaintVertexArray,ag.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class Va{constructor(u,Xe,fr){this.binders={},this._buffers=[];const Ar=[];for(const _r in u.paint._values){if(!fr(_r))continue;const wr=u.paint.get(_r);if(!(wr instanceof Hi&&an(wr.property.specification)))continue;const Kr=Fa(_r,u.type),In=wr.value,io=wr.property.specification.type,no=wr.property.useIntegerZoom,oo=wr.property.specification["property-type"],so="cross-faded"===oo||"cross-faded-data-driven"===oo;if("constant"===In.kind)this.binders[_r]=so?new za(In.value,Kr):new Ia(In.value,Kr,io),Ar.push(`/u_${_r}`);else if("source"===In.kind||so){const fr=Ta(_r,io,"source");this.binders[_r]=so?new Ba(In,io,no,Xe,fr,u.id):new Pa(In,Kr,io,fr),Ar.push(`/a_${_r}`)}else{const u=Ta(_r,io,"composite");this.binders[_r]=new Ca(In,Kr,io,no,Xe,u),Ar.push(`/z_${_r}`)}}this.cacheKey=Ar.sort().join("")}getMaxValue(u){const Xe=this.binders[u];return Xe instanceof Pa||Xe instanceof Ca?Xe.maxValue:0}populatePaintArrays(u,Xe,fr,Ar,_r){for(const wr in this.binders){const Kr=this.binders[wr];(Kr instanceof Pa||Kr instanceof Ca||Kr instanceof Ba)&&Kr.populatePaintArray(u,Xe,fr,Ar,_r)}}setConstantPatternPositions(u,Xe){for(const fr in this.binders){const Ar=this.binders[fr];Ar instanceof za&&Ar.setConstantPatternPositions(u,Xe)}}updatePaintArrays(u,Xe,fr,Ar,_r){let wr=!1;for(const Kr in u){const In=Xe.getPositions(Kr);for(const Xe of In){const In=fr.feature(Xe.index);for(const fr in this.binders){const io=this.binders[fr];if((io instanceof Pa||io instanceof Ca||io instanceof Ba)&&!0===io.expression.isStateDependent){const no=Ar.paint.get(fr);io.expression=no.value,io.updatePaintArray(Xe.start,Xe.end,In,u[Kr],_r),wr=!0}}}}return wr}defines(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];(fr instanceof Ia||fr instanceof za)&&u.push(...fr.uniformNames.map((u=>`#define HAS_UNIFORM_${u}`)))}return u}getBinderAttributes(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(fr instanceof Pa||fr instanceof Ca)for(let Xe=0;Xe<fr.paintVertexAttributes.length;Xe++)u.push(fr.paintVertexAttributes[Xe].name);else if(fr instanceof Ba)for(let Xe=0;Xe<ag.members.length;Xe++)u.push(ag.members[Xe].name)}return u}getBinderUniforms(){const u=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(fr instanceof Ia||fr instanceof za||fr instanceof Ca)for(const Xe of fr.uniformNames)u.push(Xe)}return u}getPaintVertexBuffers(){return this._buffers}getUniforms(u,Xe){const fr=[];for(const Ar in this.binders){const _r=this.binders[Ar];if(_r instanceof Ia||_r instanceof za||_r instanceof Ca)for(const wr of _r.uniformNames)if(Xe[wr]){const Kr=_r.getBinding(u,Xe[wr],wr);fr.push({name:wr,property:Ar,binding:Kr})}}return fr}setUniforms(u,Xe,fr,Ar){for(const{name:u,property:_r,binding:wr}of Xe)this.binders[_r].setUniform(wr,Ar,fr.get(_r),u)}updatePaintBuffers(u){this._buffers=[];for(const Xe in this.binders){const fr=this.binders[Xe];if(u&&fr instanceof Ba){const Xe=2===u.fromScale?fr.zoomInPaintVertexBuffer:fr.zoomOutPaintVertexBuffer;Xe&&this._buffers.push(Xe)}else(fr instanceof Pa||fr instanceof Ca)&&fr.paintVertexBuffer&&this._buffers.push(fr.paintVertexBuffer)}}upload(u){for(const Xe in this.binders){const fr=this.binders[Xe];(fr instanceof Pa||fr instanceof Ca||fr instanceof Ba)&&fr.upload(u)}this.updatePaintBuffers()}destroy(){for(const u in this.binders){const Xe=this.binders[u];(Xe instanceof Pa||Xe instanceof Ca||Xe instanceof Ba)&&Xe.destroy()}}}class Ea{constructor(u,Xe,fr=()=>!0){this.programConfigurations={};for(const Ar of u)this.programConfigurations[Ar.id]=new Va(Ar,Xe,fr);this.needsUpload=!1,this._featureMap=new ga,this._bufferOffset=0}populatePaintArrays(u,Xe,fr,Ar,_r,wr){for(const fr in this.programConfigurations)this.programConfigurations[fr].populatePaintArrays(u,Xe,Ar,_r,wr);void 0!==Xe.id&&this._featureMap.add(Xe.id,fr,this._bufferOffset,u),this._bufferOffset=u,this.needsUpload=!0}updatePaintArrays(u,Xe,fr,Ar){for(const _r of fr)this.needsUpload=this.programConfigurations[_r.id].updatePaintArrays(u,this._featureMap,Xe,_r,Ar)||this.needsUpload}get(u){return this.programConfigurations[u]}upload(u){if(this.needsUpload){for(const Xe in this.programConfigurations)this.programConfigurations[Xe].upload(u);this.needsUpload=!1}}destroy(){for(const u in this.programConfigurations)this.programConfigurations[u].destroy()}}function Fa(u,Xe){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${Xe}-`,"").replace(/-/g,"_")]}function Ta(u,Xe,fr){const Ar={color:{source:ys,composite:Vs},number:{source:Is,composite:ys}},_r=function(u){return{"line-pattern":{source:Js,composite:Js},"fill-pattern":{source:Js,composite:Js},"fill-extrusion-pattern":{source:Js,composite:Js}}[u]}(u);return _r&&_r[fr]||Ar[Xe][fr]}wi("ConstantBinder",Ia),wi("CrossFadedConstantBinder",za),wi("SourceExpressionBinder",Pa),wi("CrossFadedCompositeBinder",Ba),wi("CompositeExpressionBinder",Ca),wi("ProgramConfiguration",Va,{omit:["_buffers"]}),wi("ProgramConfigurationSet",Ea);const Cg=8192,Ig=Math.pow(2,14)-1,fg=-Ig-1;function Oa(u){const Xe=Cg/u.extent,fr=u.loadGeometry();for(let u=0;u<fr.length;u++){const Ar=fr[u];for(let u=0;u<Ar.length;u++){const fr=Ar[u],_r=Math.round(fr.x*Xe),wr=Math.round(fr.y*Xe);fr.x=y(_r,fg,Ig),fr.y=y(wr,fg,Ig),(_r<fr.x||_r>fr.x+1||wr<fr.y||wr>fr.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return fr}function ja(u,Xe){return{type:u.type,id:u.id,properties:u.properties,geometry:Xe?Oa(u):[]}}function Ra(u,Xe,fr,Ar,_r){u.emplaceBack(2*Xe+(Ar+1)/2,2*fr+(_r+1)/2)}class Ua{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Gs,this.indexArray=new na,this.segments=new oa,this.programConfigurations=new Ea(u.layers,u.zoom),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){const Ar=this.layers[0],_r=[];let wr=null,Kr=!1;"circle"===Ar.type&&(wr=Ar.layout.get("circle-sort-key"),Kr=!wr.isConstant());for(const{feature:Xe,id:Ar,index:In,sourceLayerIndex:io}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,fr))continue;const oo=Kr?wr.evaluate(no,{},fr):void 0,so={id:Ar,properties:Xe.properties,type:Xe.type,sourceLayerIndex:io,index:In,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:oo};_r.push(so)}Kr&&_r.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of _r){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar,In=u[wr].feature;this.addFeature(Ar,_r,wr,fr),Xe.featureIndex.insert(In,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,sg),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(u,Xe,fr,Ar){for(const fr of Xe)for(const Xe of fr){const fr=Xe.x,Ar=Xe.y;if(fr<0||fr>=Cg||Ar<0||Ar>=Cg)continue;const _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,u.sortKey),wr=_r.vertexLength;Ra(this.layoutVertexArray,fr,Ar,-1,-1),Ra(this.layoutVertexArray,fr,Ar,1,-1),Ra(this.layoutVertexArray,fr,Ar,1,1),Ra(this.layoutVertexArray,fr,Ar,-1,1),this.indexArray.emplaceBack(wr,wr+1,wr+2),this.indexArray.emplaceBack(wr,wr+3,wr+2),_r.vertexLength+=4,_r.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,{},Ar)}}function qa(u,Xe){for(let fr=0;fr<u.length;fr++)if(Wa(Xe,u[fr]))return!0;for(let fr=0;fr<Xe.length;fr++)if(Wa(u,Xe[fr]))return!0;return!!Ka(u,Xe)}function Na(u,Xe,fr){return!!Wa(u,Xe)||!!Ha(Xe,u,fr)}function Za(u,Xe){if(1===u.length)return Ja(Xe,u[0]);for(let fr=0;fr<Xe.length;fr++){const Ar=Xe[fr];for(let Xe=0;Xe<Ar.length;Xe++)if(Wa(u,Ar[Xe]))return!0}for(let fr=0;fr<u.length;fr++)if(Ja(Xe,u[fr]))return!0;for(let fr=0;fr<Xe.length;fr++)if(Ka(u,Xe[fr]))return!0;return!1}function Ga(u,Xe,fr){if(u.length>1){if(Ka(u,Xe))return!0;for(let Ar=0;Ar<Xe.length;Ar++)if(Ha(Xe[Ar],u,fr))return!0}for(let Ar=0;Ar<u.length;Ar++)if(Ha(u[Ar],Xe,fr))return!0;return!1}function Ka(u,Xe){if(0===u.length||0===Xe.length)return!1;for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1];for(let u=0;u<Xe.length-1;u++)if(Xa(Ar,_r,Xe[u],Xe[u+1]))return!0}return!1}function Xa(u,Xe,fr,Ar){return S(u,fr,Ar)!==S(Xe,fr,Ar)&&S(u,Xe,fr)!==S(u,Xe,Ar)}function Ha(u,Xe,fr){const Ar=fr*fr;if(1===Xe.length)return u.distSqr(Xe[0])<Ar;for(let fr=1;fr<Xe.length;fr++)if(Ya(u,Xe[fr-1],Xe[fr])<Ar)return!0;return!1}function Ya(u,Xe,fr){const Ar=Xe.distSqr(fr);if(0===Ar)return u.distSqr(Xe);const _r=((u.x-Xe.x)*(fr.x-Xe.x)+(u.y-Xe.y)*(fr.y-Xe.y))/Ar;return u.distSqr(_r<0?Xe:_r>1?fr:fr.sub(Xe)._mult(_r)._add(Xe))}function Ja(u,Xe){let fr,Ar,_r,wr=!1;for(let Kr=0;Kr<u.length;Kr++){fr=u[Kr];for(let u=0,Kr=fr.length-1;u<fr.length;Kr=u++)Ar=fr[u],_r=fr[Kr],Ar.y>Xe.y!=_r.y>Xe.y&&Xe.x<(_r.x-Ar.x)*(Xe.y-Ar.y)/(_r.y-Ar.y)+Ar.x&&(wr=!wr)}return wr}function Wa(u,Xe){let fr=!1;for(let Ar=0,_r=u.length-1;Ar<u.length;_r=Ar++){const wr=u[Ar],Kr=u[_r];wr.y>Xe.y!=Kr.y>Xe.y&&Xe.x<(Kr.x-wr.x)*(Xe.y-wr.y)/(Kr.y-wr.y)+wr.x&&(fr=!fr)}return fr}function Qa(u,Xe,fr){const Ar=fr[0],_r=fr[2];if(u.x<Ar.x&&Xe.x<Ar.x||u.x>_r.x&&Xe.x>_r.x||u.y<Ar.y&&Xe.y<Ar.y||u.y>_r.y&&Xe.y>_r.y)return!1;const wr=S(u,Xe,fr[0]);return wr!==S(u,Xe,fr[1])||wr!==S(u,Xe,fr[2])||wr!==S(u,Xe,fr[3])}function to(u,Xe,fr){const Ar=Xe.paint.get(u).value;return"constant"===Ar.kind?Ar.value:fr.programConfigurations.get(Xe.id).getMaxValue(u)}function eo(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function ro(u,Xe,Ar,_r,wr){if(!Xe[0]&&!Xe[1])return u;const Kr=fr.convert(Xe)._mult(wr);"viewport"===Ar&&Kr._rotate(-_r);const In=[];for(let Xe=0;Xe<u.length;Xe++)In.push(u[Xe].sub(Kr));return In}let yg,Ag;wi("CircleBucket",Ua,{omit:["layers"]});var bg={get paint(){return Ag=Ag||new rs({"circle-radius":new Wi(Io.paint_circle["circle-radius"]),"circle-color":new Wi(Io.paint_circle["circle-color"]),"circle-blur":new Wi(Io.paint_circle["circle-blur"]),"circle-opacity":new Wi(Io.paint_circle["circle-opacity"]),"circle-translate":new Ji(Io.paint_circle["circle-translate"]),"circle-translate-anchor":new Ji(Io.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ji(Io.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ji(Io.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Wi(Io.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Wi(Io.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Wi(Io.paint_circle["circle-stroke-opacity"])})},get layout(){return yg=yg||new rs({"circle-sort-key":new Wi(Io.layout_circle["circle-sort-key"])})}},_g=1e-6,vg="undefined"!=typeof Float32Array?Float32Array:Array;function lo(u){return u[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=1,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=1,u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u}function uo(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3],In=Xe[4],io=Xe[5],no=Xe[6],oo=Xe[7],so=Xe[8],ao=Xe[9],co=Xe[10],go=Xe[11],ho=Xe[12],Co=Xe[13],Io=Xe[14],xo=Xe[15],Mo=fr[0],Po=fr[1],ss=fr[2],sa=fr[3];return u[0]=Mo*Ar+Po*In+ss*so+sa*ho,u[1]=Mo*_r+Po*io+ss*ao+sa*Co,u[2]=Mo*wr+Po*no+ss*co+sa*Io,u[3]=Mo*Kr+Po*oo+ss*go+sa*xo,u[4]=(Mo=fr[4])*Ar+(Po=fr[5])*In+(ss=fr[6])*so+(sa=fr[7])*ho,u[5]=Mo*_r+Po*io+ss*ao+sa*Co,u[6]=Mo*wr+Po*no+ss*co+sa*Io,u[7]=Mo*Kr+Po*oo+ss*go+sa*xo,u[8]=(Mo=fr[8])*Ar+(Po=fr[9])*In+(ss=fr[10])*so+(sa=fr[11])*ho,u[9]=Mo*_r+Po*io+ss*ao+sa*Co,u[10]=Mo*wr+Po*no+ss*co+sa*Io,u[11]=Mo*Kr+Po*oo+ss*go+sa*xo,u[12]=(Mo=fr[12])*Ar+(Po=fr[13])*In+(ss=fr[14])*so+(sa=fr[15])*ho,u[13]=Mo*_r+Po*io+ss*ao+sa*Co,u[14]=Mo*wr+Po*no+ss*co+sa*Io,u[15]=Mo*Kr+Po*oo+ss*go+sa*xo,u}Math.hypot||(Math.hypot=function(){for(var u=0,Xe=arguments.length;Xe--;)u+=arguments[Xe]*arguments[Xe];return Math.sqrt(u)});var xg,wg=uo;function po(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3];return u[0]=fr[0]*Ar+fr[4]*_r+fr[8]*wr+fr[12]*Kr,u[1]=fr[1]*Ar+fr[5]*_r+fr[9]*wr+fr[13]*Kr,u[2]=fr[2]*Ar+fr[6]*_r+fr[10]*wr+fr[14]*Kr,u[3]=fr[3]*Ar+fr[7]*_r+fr[11]*wr+fr[15]*Kr,u}xg=new vg(4),vg!=Float32Array&&(xg[0]=0,xg[1]=0,xg[2]=0,xg[3]=0);class fo extends is{constructor(u){super(u,bg)}createBucket(u){return new Ua(u)}queryRadius(u){const Xe=u;return to("circle-radius",this,Xe)+to("circle-stroke-width",this,Xe)+eo(this.paint.get("circle-translate"))}queryIntersectsFeature(u,Xe,fr,Ar,_r,wr,Kr,In){const io=ro(u,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),wr.angle,Kr),no=this.paint.get("circle-radius").evaluate(Xe,fr)+this.paint.get("circle-stroke-width").evaluate(Xe,fr),oo="map"===this.paint.get("circle-pitch-alignment"),so=oo?io:function(u,Xe){return u.map((u=>yo(u,Xe)))}(io,In),ao=oo?no*Kr:no;for(const u of Ar)for(const Xe of u){const u=oo?Xe:yo(Xe,In);let fr=ao;const Ar=po([],[Xe.x,Xe.y,0,1],In);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?fr*=Ar[3]/wr.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(fr*=wr.cameraToCenterDistance/Ar[3]),Na(so,u,fr))return!0}return!1}}function yo(u,Xe){const Ar=po([],[u.x,u.y,0,1],Xe);return new fr(Ar[0]/Ar[3],Ar[1]/Ar[3])}class mo extends Ua{}let Sg;wi("HeatmapBucket",mo,{omit:["layers"]});var kg={get paint(){return Sg=Sg||new rs({"heatmap-radius":new Wi(Io.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Wi(Io.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Ji(Io.paint_heatmap["heatmap-intensity"]),"heatmap-color":new es(Io.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Ji(Io.paint_heatmap["heatmap-opacity"])})}};function vo(u,{width:Xe,height:fr},Ar,_r){if(_r){if(_r instanceof Uint8ClampedArray)_r=new Uint8Array(_r.buffer);else if(_r.length!==Xe*fr*Ar)throw new RangeError(`mismatched image size. expected: ${_r.length} but got: ${Xe*fr*Ar}`)}else _r=new Uint8Array(Xe*fr*Ar);return u.width=Xe,u.height=fr,u.data=_r,u}function bo(u,{width:Xe,height:fr},Ar){if(Xe===u.width&&fr===u.height)return;const _r=vo({},{width:Xe,height:fr},Ar);wo(u,_r,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,Xe),height:Math.min(u.height,fr)},Ar),u.width=Xe,u.height=fr,u.data=_r.data}function wo(u,Xe,fr,Ar,_r,wr){if(0===_r.width||0===_r.height)return Xe;if(_r.width>u.width||_r.height>u.height||fr.x>u.width-_r.width||fr.y>u.height-_r.height)throw new RangeError("out of range source coordinates for image copy");if(_r.width>Xe.width||_r.height>Xe.height||Ar.x>Xe.width-_r.width||Ar.y>Xe.height-_r.height)throw new RangeError("out of range destination coordinates for image copy");const Kr=u.data,In=Xe.data;if(Kr===In)throw new Error("srcData equals dstData, so image is already copied");for(let io=0;io<_r.height;io++){const no=((fr.y+io)*u.width+fr.x)*wr,oo=((Ar.y+io)*Xe.width+Ar.x)*wr;for(let u=0;u<_r.width*wr;u++)In[oo+u]=Kr[no+u]}return Xe}class _o{constructor(u,Xe){vo(this,u,1,Xe)}resize(u){bo(this,u,1)}clone(){return new _o({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,fr,Ar,_r){wo(u,Xe,fr,Ar,_r,1)}}class Ao{constructor(u,Xe){vo(this,u,4,Xe)}resize(u){bo(this,u,4)}replace(u,Xe){Xe?this.data.set(u):this.data=u instanceof Uint8ClampedArray?new Uint8Array(u.buffer):u}clone(){return new Ao({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(u,Xe,fr,Ar,_r){wo(u,Xe,fr,Ar,_r,4)}}function So(u){const Xe={},fr=u.resolution||256,Ar=u.clips?u.clips.length:1,_r=u.image||new Ao({width:fr,height:Ar});if(Math.log(fr)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${fr}`);const s=(fr,Ar,wr)=>{Xe[u.evaluationKey]=wr;const Kr=u.expression.evaluate(Xe);_r.data[fr+Ar+0]=Math.floor(255*Kr.r/Kr.a),_r.data[fr+Ar+1]=Math.floor(255*Kr.g/Kr.a),_r.data[fr+Ar+2]=Math.floor(255*Kr.b/Kr.a),_r.data[fr+Ar+3]=Math.floor(255*Kr.a)};if(u.clips)for(let Xe=0,_r=0;Xe<Ar;++Xe,_r+=4*fr)for(let Ar=0,wr=0;Ar<fr;Ar++,wr+=4){const Kr=Ar/(fr-1),{start:In,end:io}=u.clips[Xe];s(_r,wr,In*(1-Kr)+io*Kr)}else for(let u=0,Xe=0;u<fr;u++,Xe+=4)s(0,Xe,u/(fr-1));return _r}wi("AlphaImage",_o),wi("RGBAImage",Ao);class ko extends is{createBucket(u){return new mo(u)}constructor(u){super(u,kg),this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(u){"heatmap-color"===u&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=So({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility}}let Bg;var Zg={get paint(){return Bg=Bg||new rs({"hillshade-illumination-direction":new Ji(Io.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Ji(Io.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Ji(Io.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Ji(Io.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Ji(Io.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Ji(Io.paint_hillshade["hillshade-accent-color"])})}};class zo extends is{constructor(u){super(u,Zg)}hasOffscreenPass(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility}}const Gg=ls([{name:"a_pos",components:2,type:"Int16"}],4),{members:Rg}=Gg;function Bo(u,Xe,fr=2){const Ar=Xe&&Xe.length,_r=Ar?Xe[0]*fr:u.length;let wr=Vo(u,0,_r,fr,!0);const Kr=[];if(!wr||wr.next===wr.prev)return Kr;let In,io,no;if(Ar&&(wr=function(u,Xe,fr,Ar){const _r=[];for(let fr=0,wr=Xe.length;fr<wr;fr++){const Kr=Vo(u,Xe[fr]*Ar,fr<wr-1?Xe[fr+1]*Ar:u.length,Ar,!1);Kr===Kr.next&&(Kr.steiner=!0),_r.push(qo(Kr))}_r.sort(Oo);for(let u=0;u<_r.length;u++)fr=jo(_r[u],fr);return fr}(u,Xe,wr,fr)),u.length>80*fr){In=1/0,io=1/0;let Xe=-1/0,Ar=-1/0;for(let wr=fr;wr<_r;wr+=fr){const fr=u[wr],_r=u[wr+1];fr<In&&(In=fr),_r<io&&(io=_r),fr>Xe&&(Xe=fr),_r>Ar&&(Ar=_r)}no=Math.max(Xe-In,Ar-io),no=0!==no?32767/no:0}return Fo(wr,Kr,fr,In,io,no,0),Kr}function Vo(u,Xe,fr,Ar,_r){let wr;if(_r===function(u,Xe,fr,Ar){let _r=0;for(let wr=Xe,Kr=fr-Ar;wr<fr;wr+=Ar)_r+=(u[Kr]-u[wr])*(u[wr+1]+u[Kr+1]),Kr=wr;return _r}(u,Xe,fr,Ar)>0)for(let _r=Xe;_r<fr;_r+=Ar)wr=Qo(_r/Ar|0,u[_r],u[_r+1],wr);else for(let _r=fr-Ar;_r>=Xe;_r-=Ar)wr=Qo(_r/Ar|0,u[_r],u[_r+1],wr);return wr&&Ko(wr,wr.next)&&(tl(wr),wr=wr.next),wr}function Eo(u,Xe){if(!u)return u;Xe||(Xe=u);let fr,Ar=u;do{if(fr=!1,Ar.steiner||!Ko(Ar,Ar.next)&&0!==Go(Ar.prev,Ar,Ar.next))Ar=Ar.next;else{if(tl(Ar),Ar=Xe=Ar.prev,Ar===Ar.next)break;fr=!0}}while(fr||Ar!==Xe);return Xe}function Fo(u,Xe,fr,Ar,_r,wr,Kr){if(!u)return;!Kr&&wr&&function(u,Xe,fr,Ar){let _r=u;do{0===_r.z&&(_r.z=Uo(_r.x,_r.y,Xe,fr,Ar)),_r.prevZ=_r.prev,_r.nextZ=_r.next,_r=_r.next}while(_r!==u);_r.prevZ.nextZ=null,_r.prevZ=null,function(u){let Xe,fr=1;do{let Ar,_r=u;u=null;let wr=null;for(Xe=0;_r;){Xe++;let Kr=_r,In=0;for(let u=0;u<fr&&(In++,Kr=Kr.nextZ,Kr);u++);let io=fr;for(;In>0||io>0&&Kr;)0!==In&&(0===io||!Kr||_r.z<=Kr.z)?(Ar=_r,_r=_r.nextZ,In--):(Ar=Kr,Kr=Kr.nextZ,io--),wr?wr.nextZ=Ar:u=Ar,Ar.prevZ=wr,wr=Ar;_r=Kr}wr.nextZ=null,fr*=2}while(Xe>1)}(_r)}(u,Ar,_r,wr);let In=u;for(;u.prev!==u.next;){const io=u.prev,no=u.next;if(wr?$o(u,Ar,_r,wr):To(u))Xe.push(io.i,u.i,no.i),tl(u),u=no.next,In=no.next;else if((u=no)===In){Kr?1===Kr?Fo(u=Lo(Eo(u),Xe),Xe,fr,Ar,_r,wr,2):2===Kr&&Do(u,Xe,fr,Ar,_r,wr):Fo(Eo(u),Xe,fr,Ar,_r,wr,1);break}}}function To(u){const Xe=u.prev,fr=u,Ar=u.next;if(Go(Xe,fr,Ar)>=0)return!1;const _r=Xe.x,wr=fr.x,Kr=Ar.x,In=Xe.y,io=fr.y,no=Ar.y,oo=_r<wr?_r<Kr?_r:Kr:wr<Kr?wr:Kr,so=In<io?In<no?In:no:io<no?io:no,ao=_r>wr?_r>Kr?_r:Kr:wr>Kr?wr:Kr,co=In>io?In>no?In:no:io>no?io:no;let go=Ar.next;for(;go!==Xe;){if(go.x>=oo&&go.x<=ao&&go.y>=so&&go.y<=co&&No(_r,In,wr,io,Kr,no,go.x,go.y)&&Go(go.prev,go,go.next)>=0)return!1;go=go.next}return!0}function $o(u,Xe,fr,Ar){const _r=u.prev,wr=u,Kr=u.next;if(Go(_r,wr,Kr)>=0)return!1;const In=_r.x,io=wr.x,no=Kr.x,oo=_r.y,so=wr.y,ao=Kr.y,co=In<io?In<no?In:no:io<no?io:no,go=oo<so?oo<ao?oo:ao:so<ao?so:ao,ho=In>io?In>no?In:no:io>no?io:no,Co=oo>so?oo>ao?oo:ao:so>ao?so:ao,Io=Uo(co,go,Xe,fr,Ar),xo=Uo(ho,Co,Xe,fr,Ar);let Mo=u.prevZ,Po=u.nextZ;for(;Mo&&Mo.z>=Io&&Po&&Po.z<=xo;){if(Mo.x>=co&&Mo.x<=ho&&Mo.y>=go&&Mo.y<=Co&&Mo!==_r&&Mo!==Kr&&No(In,oo,io,so,no,ao,Mo.x,Mo.y)&&Go(Mo.prev,Mo,Mo.next)>=0)return!1;if(Mo=Mo.prevZ,Po.x>=co&&Po.x<=ho&&Po.y>=go&&Po.y<=Co&&Po!==_r&&Po!==Kr&&No(In,oo,io,so,no,ao,Po.x,Po.y)&&Go(Po.prev,Po,Po.next)>=0)return!1;Po=Po.nextZ}for(;Mo&&Mo.z>=Io;){if(Mo.x>=co&&Mo.x<=ho&&Mo.y>=go&&Mo.y<=Co&&Mo!==_r&&Mo!==Kr&&No(In,oo,io,so,no,ao,Mo.x,Mo.y)&&Go(Mo.prev,Mo,Mo.next)>=0)return!1;Mo=Mo.prevZ}for(;Po&&Po.z<=xo;){if(Po.x>=co&&Po.x<=ho&&Po.y>=go&&Po.y<=Co&&Po!==_r&&Po!==Kr&&No(In,oo,io,so,no,ao,Po.x,Po.y)&&Go(Po.prev,Po,Po.next)>=0)return!1;Po=Po.nextZ}return!0}function Lo(u,Xe){let fr=u;do{const Ar=fr.prev,_r=fr.next.next;!Ko(Ar,_r)&&Xo(Ar,fr,fr.next,_r)&&Jo(Ar,_r)&&Jo(_r,Ar)&&(Xe.push(Ar.i,fr.i,_r.i),tl(fr),tl(fr.next),fr=u=_r),fr=fr.next}while(fr!==u);return Eo(fr)}function Do(u,Xe,fr,Ar,_r,wr){let Kr=u;do{let u=Kr.next.next;for(;u!==Kr.prev;){if(Kr.i!==u.i&&Zo(Kr,u)){let In=Wo(Kr,u);return Kr=Eo(Kr,Kr.next),In=Eo(In,In.next),Fo(Kr,Xe,fr,Ar,_r,wr,0),void Fo(In,Xe,fr,Ar,_r,wr,0)}u=u.next}Kr=Kr.next}while(Kr!==u)}function Oo(u,Xe){return u.x-Xe.x}function jo(u,Xe){const fr=function(u,Xe){let fr=Xe;const Ar=u.x,_r=u.y;let wr,Kr=-1/0;do{if(_r<=fr.y&&_r>=fr.next.y&&fr.next.y!==fr.y){const u=fr.x+(_r-fr.y)*(fr.next.x-fr.x)/(fr.next.y-fr.y);if(u<=Ar&&u>Kr&&(Kr=u,wr=fr.x<fr.next.x?fr:fr.next,u===Ar))return wr}fr=fr.next}while(fr!==Xe);if(!wr)return null;const In=wr,io=wr.x,no=wr.y;let oo=1/0;fr=wr;do{if(Ar>=fr.x&&fr.x>=io&&Ar!==fr.x&&No(_r<no?Ar:Kr,_r,io,no,_r<no?Kr:Ar,_r,fr.x,fr.y)){const Xe=Math.abs(_r-fr.y)/(Ar-fr.x);Jo(fr,u)&&(Xe<oo||Xe===oo&&(fr.x>wr.x||fr.x===wr.x&&Ro(wr,fr)))&&(wr=fr,oo=Xe)}fr=fr.next}while(fr!==In);return wr}(u,Xe);if(!fr)return Xe;const Ar=Wo(fr,u);return Eo(Ar,Ar.next),Eo(fr,fr.next)}function Ro(u,Xe){return Go(u.prev,u,Xe.prev)<0&&Go(Xe.next,u,u.next)<0}function Uo(u,Xe,fr,Ar,_r){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-fr)*_r|0)|u<<8))|u<<4))|u<<2))|u<<1))|(Xe=1431655765&((Xe=858993459&((Xe=252645135&((Xe=16711935&((Xe=(Xe-Ar)*_r|0)|Xe<<8))|Xe<<4))|Xe<<2))|Xe<<1))<<1}function qo(u){let Xe=u,fr=u;do{(Xe.x<fr.x||Xe.x===fr.x&&Xe.y<fr.y)&&(fr=Xe),Xe=Xe.next}while(Xe!==u);return fr}function No(u,Xe,fr,Ar,_r,wr,Kr,In){return(_r-Kr)*(Xe-In)>=(u-Kr)*(wr-In)&&(u-Kr)*(Ar-In)>=(fr-Kr)*(Xe-In)&&(fr-Kr)*(wr-In)>=(_r-Kr)*(Ar-In)}function Zo(u,Xe){return u.next.i!==Xe.i&&u.prev.i!==Xe.i&&!function(u,Xe){let fr=u;do{if(fr.i!==u.i&&fr.next.i!==u.i&&fr.i!==Xe.i&&fr.next.i!==Xe.i&&Xo(fr,fr.next,u,Xe))return!0;fr=fr.next}while(fr!==u);return!1}(u,Xe)&&(Jo(u,Xe)&&Jo(Xe,u)&&function(u,Xe){let fr=u,Ar=!1;const _r=(u.x+Xe.x)/2,wr=(u.y+Xe.y)/2;do{fr.y>wr!=fr.next.y>wr&&fr.next.y!==fr.y&&_r<(fr.next.x-fr.x)*(wr-fr.y)/(fr.next.y-fr.y)+fr.x&&(Ar=!Ar),fr=fr.next}while(fr!==u);return Ar}(u,Xe)&&(Go(u.prev,u,Xe.prev)||Go(u,Xe.prev,Xe))||Ko(u,Xe)&&Go(u.prev,u,u.next)>0&&Go(Xe.prev,Xe,Xe.next)>0)}function Go(u,Xe,fr){return(Xe.y-u.y)*(fr.x-Xe.x)-(Xe.x-u.x)*(fr.y-Xe.y)}function Ko(u,Xe){return u.x===Xe.x&&u.y===Xe.y}function Xo(u,Xe,fr,Ar){const _r=Yo(Go(u,Xe,fr)),wr=Yo(Go(u,Xe,Ar)),Kr=Yo(Go(fr,Ar,u)),In=Yo(Go(fr,Ar,Xe));return _r!==wr&&Kr!==In||!(0!==_r||!Ho(u,fr,Xe))||!(0!==wr||!Ho(u,Ar,Xe))||!(0!==Kr||!Ho(fr,u,Ar))||!(0!==In||!Ho(fr,Xe,Ar))}function Ho(u,Xe,fr){return Xe.x<=Math.max(u.x,fr.x)&&Xe.x>=Math.min(u.x,fr.x)&&Xe.y<=Math.max(u.y,fr.y)&&Xe.y>=Math.min(u.y,fr.y)}function Yo(u){return u>0?1:u<0?-1:0}function Jo(u,Xe){return Go(u.prev,u,u.next)<0?Go(u,Xe,u.next)>=0&&Go(u,u.prev,Xe)>=0:Go(u,Xe,u.prev)<0||Go(u,u.next,Xe)<0}function Wo(u,Xe){const fr=el(u.i,u.x,u.y),Ar=el(Xe.i,Xe.x,Xe.y),_r=u.next,wr=Xe.prev;return u.next=Xe,Xe.prev=u,fr.next=_r,_r.prev=fr,Ar.next=fr,fr.prev=Ar,wr.next=Ar,Ar.prev=wr,Ar}function Qo(u,Xe,fr,Ar){const _r=el(u,Xe,fr);return Ar?(_r.next=Ar.next,_r.prev=Ar,Ar.next.prev=_r,Ar.next=_r):(_r.prev=_r,_r.next=_r),_r}function tl(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function el(u,Xe,fr){return{i:u,x:Xe,y:fr,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function rl(u,Xe,fr){const Ar=fr.patternDependencies;let _r=!1;for(const fr of Xe){const Xe=fr.paint.get(`${u}-pattern`);Xe.isConstant()||(_r=!0);const wr=Xe.constantOr(null);wr&&(_r=!0,Ar[wr.to]=!0,Ar[wr.from]=!0)}return _r}function nl(u,Xe,fr,Ar,_r){const wr=_r.patternDependencies;for(const Kr of Xe){const Xe=Kr.paint.get(`${u}-pattern`).value;if("constant"!==Xe.kind){let u=Xe.evaluate({zoom:Ar-1},fr,{},_r.availableImages),In=Xe.evaluate({zoom:Ar},fr,{},_r.availableImages),io=Xe.evaluate({zoom:Ar+1},fr,{},_r.availableImages);u=u&&u.name?u.name:u,In=In&&In.name?In.name:In,io=io&&io.name?io.name:io,wr[u]=!0,wr[In]=!0,wr[io]=!0,fr.patterns[Kr.id]={min:u,mid:In,max:io}}}return fr}class il{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Ks,this.indexArray=new na,this.indexArray2=new ia,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.segments2=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.hasPattern=rl("fill",this.layers,Xe);const Ar=this.layers[0].layout.get("fill-sort-key"),_r=!Ar.isConstant(),wr=[];for(const{feature:Kr,id:In,index:io,sourceLayerIndex:no}of u){const u=this.layers[0]._featureFilter.needGeometry,oo=ja(Kr,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),oo,fr))continue;const so=_r?Ar.evaluate(oo,{},fr,Xe.availableImages):void 0,ao={id:In,properties:Kr.properties,type:Kr.type,sourceLayerIndex:no,index:io,geometry:u?oo.geometry:Oa(Kr),patterns:{},sortKey:so};wr.push(ao)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of wr){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar;if(this.hasPattern){const u=nl("fill",this.layers,Ar,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(Ar,_r,wr,fr,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}addFeatures(u,Xe,fr){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Rg),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.indexBuffer2=u.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(u),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(u,Xe,fr,Ar,_r){for(const u of xr(Xe,500)){let Xe=0;for(const fr of u)Xe+=fr.length;const fr=this.segments.prepareSegment(Xe,this.layoutVertexArray,this.indexArray),Ar=fr.vertexLength,_r=[],wr=[];for(const Xe of u){if(0===Xe.length)continue;Xe!==u[0]&&wr.push(_r.length/2);const fr=this.segments2.prepareSegment(Xe.length,this.layoutVertexArray,this.indexArray2),Ar=fr.vertexLength;this.layoutVertexArray.emplaceBack(Xe[0].x,Xe[0].y),this.indexArray2.emplaceBack(Ar+Xe.length-1,Ar),_r.push(Xe[0].x),_r.push(Xe[0].y);for(let u=1;u<Xe.length;u++)this.layoutVertexArray.emplaceBack(Xe[u].x,Xe[u].y),this.indexArray2.emplaceBack(Ar+u-1,Ar+u),_r.push(Xe[u].x),_r.push(Xe[u].y);fr.vertexLength+=Xe.length,fr.primitiveLength+=Xe.length}const Kr=Bo(_r,wr);for(let u=0;u<Kr.length;u+=3)this.indexArray.emplaceBack(Ar+Kr[u],Ar+Kr[u+1],Ar+Kr[u+2]);fr.vertexLength+=Xe,fr.primitiveLength+=Kr.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}}let Vg,Wg;wi("FillBucket",il,{omit:["layers","patternFeatures"]});var Tg={get paint(){return Wg=Wg||new rs({"fill-antialias":new Ji(Io.paint_fill["fill-antialias"]),"fill-opacity":new Wi(Io.paint_fill["fill-opacity"]),"fill-color":new Wi(Io.paint_fill["fill-color"]),"fill-outline-color":new Wi(Io.paint_fill["fill-outline-color"]),"fill-translate":new Ji(Io.paint_fill["fill-translate"]),"fill-translate-anchor":new Ji(Io.paint_fill["fill-translate-anchor"]),"fill-pattern":new Qi(Io.paint_fill["fill-pattern"])})},get layout(){return Vg=Vg||new rs({"fill-sort-key":new Wi(Io.layout_fill["fill-sort-key"])})}};class ll extends is{constructor(u){super(u,Tg)}recalculate(u,Xe){super.recalculate(u,Xe);const fr=this.paint._values["fill-outline-color"];"constant"===fr.value.kind&&void 0===fr.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(u){return new il(u)}queryRadius(){return eo(this.paint.get("fill-translate"))}queryIntersectsFeature(u,Xe,fr,Ar,_r,wr,Kr){return Za(ro(u,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),wr.angle,Kr),Ar)}isTileClipped(){return!0}}const Mg=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),Pg=ls([{name:"a_centroid",components:2,type:"Int16"}],4),{members:Jg}=Mg;var zg={},Fg=Xe,Eg=yl;function yl(u,Xe,fr,Ar,_r){this.properties={},this.extent=fr,this.type=0,this._pbf=u,this._geometry=-1,this._keys=Ar,this._values=_r,u.readFields(ml,this,Xe)}function ml(u,Xe,fr){1==u?Xe.id=fr.readVarint():2==u?function(u,Xe){for(var fr=u.readVarint()+u.pos;u.pos<fr;){var Ar=Xe._keys[u.readVarint()],_r=Xe._values[u.readVarint()];Xe.properties[Ar]=_r}}(fr,Xe):3==u?Xe.type=fr.readVarint():4==u&&(Xe._geometry=fr.pos)}function gl(u){for(var Xe,fr,Ar=0,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++)Ar+=((fr=u[Kr]).x-(Xe=u[_r]).x)*(Xe.y+fr.y);return Ar}yl.types=["Unknown","Point","LineString","Polygon"],yl.prototype.loadGeometry=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe,fr=u.readVarint()+u.pos,Ar=1,_r=0,wr=0,Kr=0,In=[];u.pos<fr;){if(_r<=0){var io=u.readVarint();Ar=7&io,_r=io>>3}if(_r--,1===Ar||2===Ar)wr+=u.readSVarint(),Kr+=u.readSVarint(),1===Ar&&(Xe&&In.push(Xe),Xe=[]),Xe.push(new Fg(wr,Kr));else{if(7!==Ar)throw new Error("unknown command "+Ar);Xe&&Xe.push(Xe[0].clone())}}return Xe&&In.push(Xe),In},yl.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var Xe=u.readVarint()+u.pos,fr=1,Ar=0,_r=0,wr=0,Kr=1/0,In=-1/0,io=1/0,no=-1/0;u.pos<Xe;){if(Ar<=0){var oo=u.readVarint();fr=7&oo,Ar=oo>>3}if(Ar--,1===fr||2===fr)(_r+=u.readSVarint())<Kr&&(Kr=_r),_r>In&&(In=_r),(wr+=u.readSVarint())<io&&(io=wr),wr>no&&(no=wr);else if(7!==fr)throw new Error("unknown command "+fr)}return[Kr,io,In,no]},yl.prototype.toGeoJSON=function(u,Xe,fr){var Ar,_r,wr=this.extent*Math.pow(2,fr),Kr=this.extent*u,In=this.extent*Xe,io=this.loadGeometry(),no=yl.types[this.type];function c(u){for(var Xe=0;Xe<u.length;Xe++){var fr=u[Xe];u[Xe]=[360*(fr.x+Kr)/wr-180,360/Math.PI*Math.atan(Math.exp((180-360*(fr.y+In)/wr)*Math.PI/180))-90]}}switch(this.type){case 1:var oo=[];for(Ar=0;Ar<io.length;Ar++)oo[Ar]=io[Ar][0];c(io=oo);break;case 2:for(Ar=0;Ar<io.length;Ar++)c(io[Ar]);break;case 3:for(io=function(u){var Xe=u.length;if(Xe<=1)return[u];for(var fr,Ar,_r=[],wr=0;wr<Xe;wr++){var Kr=gl(u[wr]);0!==Kr&&(void 0===Ar&&(Ar=Kr<0),Ar===Kr<0?(fr&&_r.push(fr),fr=[u[wr]]):fr.push(u[wr]))}return fr&&_r.push(fr),_r}(io),Ar=0;Ar<io.length;Ar++)for(_r=0;_r<io[Ar].length;_r++)c(io[Ar][_r])}1===io.length?io=io[0]:no="Multi"+no;var so={type:"Feature",geometry:{type:no,coordinates:io},properties:this.properties};return"id"in this&&(so.id=this.id),so};var Xg=Eg,Hg=bl;function bl(u,Xe){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=u,this._keys=[],this._values=[],this._features=[],u.readFields(wl,this,Xe),this.length=this._features.length}function wl(u,Xe,fr){15===u?Xe.version=fr.readVarint():1===u?Xe.name=fr.readString():5===u?Xe.extent=fr.readVarint():2===u?Xe._features.push(fr.pos):3===u?Xe._keys.push(fr.readString()):4===u&&Xe._values.push(function(u){for(var Xe=null,fr=u.readVarint()+u.pos;u.pos<fr;){var Ar=u.readVarint()>>3;Xe=1===Ar?u.readString():2===Ar?u.readFloat():3===Ar?u.readDouble():4===Ar?u.readVarint64():5===Ar?u.readVarint():6===Ar?u.readSVarint():7===Ar?u.readBoolean():null}return Xe}(fr))}bl.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var Xe=this._pbf.readVarint()+this._pbf.pos;return new Xg(this._pbf,Xe,this.extent,this._keys,this._values)};var Kg=Hg;function Al(u,Xe,fr){if(3===u){var Ar=new Kg(fr,fr.readVarint()+fr.pos);Ar.length&&(Xe[Ar.name]=Ar)}}zg.VectorTile=function(u,Xe){this.layers=u.readFields(Al,{},Xe)},zg.VectorTileFeature=Eg,zg.VectorTileLayer=Hg;const Lg=zg.VectorTileFeature.types,Dg=Math.pow(2,13);function Ml(u,Xe,fr,Ar,_r,wr,Kr,In){u.emplaceBack(Xe,fr,2*Math.floor(Ar*Dg)+Kr,_r*Dg*2,wr*Dg*2,Math.round(In))}class Il{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.layoutVertexArray=new Xs,this.centroidVertexArray=new Zs,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.features=[],this.hasPattern=rl("fill-extrusion",this.layers,Xe);for(const{feature:Ar,id:_r,index:wr,sourceLayerIndex:Kr}of u){const u=this.layers[0]._featureFilter.needGeometry,In=ja(Ar,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),In,fr))continue;const io={id:_r,sourceLayerIndex:Kr,index:wr,geometry:u?In.geometry:Oa(Ar),properties:Ar.properties,type:Ar.type,patterns:{}};this.hasPattern?this.features.push(nl("fill-extrusion",this.layers,io,this.zoom,Xe)):this.addFeature(io,io.geometry,wr,fr,{}),Xe.featureIndex.insert(Ar,io.geometry,wr,Kr,this.index,!0)}}addFeatures(u,Xe,fr){for(const u of this.features){const{geometry:Ar}=u;this.addFeature(u,Ar,u.index,Xe,fr)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Jg),this.centroidVertexBuffer=u.createVertexBuffer(this.centroidVertexArray,Pg.members,!0),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(u,Xe,fr,Ar,_r){for(const fr of xr(Xe,500)){const Xe={x:0,y:0,vertexCount:0};let Ar=0;for(const u of fr)Ar+=u.length;let _r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const u of fr){if(0===u.length)continue;if(Pl(u))continue;let fr=0;for(let Ar=0;Ar<u.length;Ar++){const wr=u[Ar];if(Ar>=1){const Kr=u[Ar-1];if(!zl(wr,Kr)){_r.vertexLength+4>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const u=wr.sub(Kr)._perp()._unit(),Ar=Kr.dist(wr);fr+Ar>32768&&(fr=0),Ml(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,0,fr),Ml(this.layoutVertexArray,wr.x,wr.y,u.x,u.y,0,1,fr),Xe.x+=2*wr.x,Xe.y+=2*wr.y,Xe.vertexCount+=2,fr+=Ar,Ml(this.layoutVertexArray,Kr.x,Kr.y,u.x,u.y,0,0,fr),Ml(this.layoutVertexArray,Kr.x,Kr.y,u.x,u.y,0,1,fr),Xe.x+=2*Kr.x,Xe.y+=2*Kr.y,Xe.vertexCount+=2;const In=_r.vertexLength;this.indexArray.emplaceBack(In,In+2,In+1),this.indexArray.emplaceBack(In+1,In+2,In+3),_r.vertexLength+=4,_r.primitiveLength+=2}}}}if(_r.vertexLength+Ar>oa.MAX_VERTEX_ARRAY_LENGTH&&(_r=this.segments.prepareSegment(Ar,this.layoutVertexArray,this.indexArray)),"Polygon"!==Lg[u.type])continue;const wr=[],Kr=[],In=_r.vertexLength;for(const u of fr)if(0!==u.length){u!==fr[0]&&Kr.push(wr.length/2);for(let fr=0;fr<u.length;fr++){const Ar=u[fr];Ml(this.layoutVertexArray,Ar.x,Ar.y,0,0,1,1,0),Xe.x+=Ar.x,Xe.y+=Ar.y,Xe.vertexCount+=1,wr.push(Ar.x),wr.push(Ar.y)}}const io=Bo(wr,Kr);for(let u=0;u<io.length;u+=3)this.indexArray.emplaceBack(In+io[u],In+io[u+2],In+io[u+1]);_r.primitiveLength+=io.length/3,_r.vertexLength+=Ar;for(let u=0;u<Xe.vertexCount;u++){const u=Math.floor(Xe.x/Xe.vertexCount),fr=Math.floor(Xe.y/Xe.vertexCount);this.centroidVertexArray.emplaceBack(u,fr)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}}function zl(u,Xe){return u.x===Xe.x&&(u.x<0||u.x>Cg)||u.y===Xe.y&&(u.y<0||u.y>Cg)}function Pl(u){return u.every((u=>u.x<0))||u.every((u=>u.x>Cg))||u.every((u=>u.y<0))||u.every((u=>u.y>Cg))}let Yg;wi("FillExtrusionBucket",Il,{omit:["layers","features"]});var Ng={get paint(){return Yg=Yg||new rs({"fill-extrusion-opacity":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Qi(Io["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Wi(Io["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Ji(Io["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Vl extends is{constructor(u){super(u,Ng)}createBucket(u){return new Il(u)}queryRadius(){return eo(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(u,Xe,Ar,_r,wr,Kr,In,io){const no=ro(u,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Kr.angle,In),oo=this.paint.get("fill-extrusion-height").evaluate(Xe,Ar),so=this.paint.get("fill-extrusion-base").evaluate(Xe,Ar),ao=function(u,Xe){const Ar=[];for(const _r of u){const u=[_r.x,_r.y,0,1];po(u,u,Xe),Ar.push(new fr(u[0]/u[3],u[1]/u[3]))}return Ar}(no,io),co=function(u,Xe,Ar,_r){const wr=[],Kr=[],In=_r[8]*Xe,io=_r[9]*Xe,no=_r[10]*Xe,oo=_r[11]*Xe,so=_r[8]*Ar,ao=_r[9]*Ar,co=_r[10]*Ar,go=_r[11]*Ar;for(const Xe of u){const u=[],Ar=[];for(const wr of Xe){const Xe=wr.x,Kr=wr.y,ho=_r[0]*Xe+_r[4]*Kr+_r[12],Co=_r[1]*Xe+_r[5]*Kr+_r[13],Io=_r[2]*Xe+_r[6]*Kr+_r[14],xo=_r[3]*Xe+_r[7]*Kr+_r[15],Mo=Io+no,Po=xo+oo,ss=ho+so,sa=Co+ao,aa=Io+co,fa=xo+go,ya=new fr((ho+In)/Po,(Co+io)/Po);ya.z=Mo/Po,u.push(ya);const ol=new fr(ss/fa,sa/fa);ol.z=aa/fa,Ar.push(ol)}wr.push(u),Kr.push(Ar)}return[wr,Kr]}(_r,so,oo,io);return function(u,Xe,fr){let Ar=1/0;Za(fr,Xe)&&(Ar=Fl(fr,Xe[0]));for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r],Kr=u[_r];for(let u=0;u<wr.length-1;u++){const Xe=wr[u],_r=[Xe,wr[u+1],Kr[u+1],Kr[u],Xe];qa(fr,_r)&&(Ar=Math.min(Ar,Fl(fr,_r)))}}return Ar!==1/0&&Ar}(co[0],co[1],ao)}}function El(u,Xe){return u.x*Xe.x+u.y*Xe.y}function Fl(u,Xe){if(1===u.length){let fr=0;const Ar=Xe[fr++];let _r;for(;!_r||Ar.equals(_r);)if(_r=Xe[fr++],!_r)return 1/0;for(;fr<Xe.length;fr++){const wr=Xe[fr],Kr=u[0],In=_r.sub(Ar),io=wr.sub(Ar),no=Kr.sub(Ar),oo=El(In,In),so=El(In,io),ao=El(io,io),co=El(no,In),go=El(no,io),ho=oo*ao-so*so,Co=(ao*co-so*go)/ho,Io=(oo*go-so*co)/ho,xo=Ar.z*(1-Co-Io)+_r.z*Co+wr.z*Io;if(isFinite(xo))return xo}return 1/0}{let u=1/0;for(const fr of Xe)u=Math.min(u,fr.z);return u}}const Og=ls([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:jg}=Og,Ug=ls([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:Qg}=Ug,qg=zg.VectorTileFeature.types,$g=Math.cos(Math.PI/180*37.5),nh=Math.pow(2,14)/.5;class Ul{constructor(u){this.zoom=u.zoom,this.overscaling=u.overscaling,this.layers=u.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=u.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((u=>{this.gradients[u.id]={}})),this.layoutVertexArray=new Hs,this.layoutVertexArray2=new Ys,this.indexArray=new na,this.programConfigurations=new Ea(u.layers,u.zoom),this.segments=new oa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id))}populate(u,Xe,fr){this.hasPattern=rl("line",this.layers,Xe);const Ar=this.layers[0].layout.get("line-sort-key"),_r=!Ar.isConstant(),wr=[];for(const{feature:Xe,id:Kr,index:In,sourceLayerIndex:io}of u){const u=this.layers[0]._featureFilter.needGeometry,no=ja(Xe,u);if(!this.layers[0]._featureFilter.filter(new Ui(this.zoom),no,fr))continue;const oo=_r?Ar.evaluate(no,{},fr):void 0,so={id:Kr,properties:Xe.properties,type:Xe.type,sourceLayerIndex:io,index:In,geometry:u?no.geometry:Oa(Xe),patterns:{},sortKey:oo};wr.push(so)}_r&&wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Ar of wr){const{geometry:_r,index:wr,sourceLayerIndex:Kr}=Ar;if(this.hasPattern){const u=nl("line",this.layers,Ar,this.zoom,Xe);this.patternFeatures.push(u)}else this.addFeature(Ar,_r,wr,fr,{});Xe.featureIndex.insert(u[wr].feature,_r,wr,Kr,this.index)}}update(u,Xe,fr){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(u,Xe,this.stateDependentLayers,fr)}addFeatures(u,Xe,fr){for(const u of this.patternFeatures)this.addFeature(u,u.geometry,u.index,Xe,fr)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(u){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=u.createVertexBuffer(this.layoutVertexArray2,Qg)),this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,jg),this.indexBuffer=u.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(u),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(u){if(u.properties&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(u.properties,"mapbox_clip_end"))return{start:+u.properties.mapbox_clip_start,end:+u.properties.mapbox_clip_end}}addFeature(u,Xe,fr,Ar,_r){const wr=this.layers[0].layout,Kr=wr.get("line-join").evaluate(u,{}),In=wr.get("line-cap"),io=wr.get("line-miter-limit"),no=wr.get("line-round-limit");this.lineClips=this.lineFeatureClips(u);for(const fr of Xe)this.addLine(fr,u,Kr,In,io,no);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,u,fr,_r,Ar)}addLine(u,Xe,fr,Ar,_r,wr){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Xe=0;Xe<u.length-1;Xe++)this.totalDistance+=u[Xe].dist(u[Xe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const Kr="Polygon"===qg[Xe.type];let In=u.length;for(;In>=2&&u[In-1].equals(u[In-2]);)In--;let io=0;for(;io<In-1&&u[io].equals(u[io+1]);)io++;if(In<(Kr?3:2))return;"bevel"===fr&&(_r=1.05);const no=this.overscaling<=16?15*Cg/(512*this.overscaling):0,oo=this.segments.prepareSegment(10*In,this.layoutVertexArray,this.indexArray);let so,ao,co,go,ho;this.e1=this.e2=-1,Kr&&(so=u[In-2],ho=u[io].sub(so)._unit()._perp());for(let Xe=io;Xe<In;Xe++){if(co=Xe===In-1?Kr?u[io+1]:void 0:u[Xe+1],co&&u[Xe].equals(co))continue;ho&&(go=ho),so&&(ao=so),so=u[Xe],ho=co?co.sub(so)._unit()._perp():go,go=go||ho;let Co=go.add(ho);0===Co.x&&0===Co.y||Co._unit();const Io=go.x*ho.x+go.y*ho.y,xo=Co.x*ho.x+Co.y*ho.y,Mo=0!==xo?1/xo:1/0,Po=2*Math.sqrt(2-2*xo),ss=xo<$g&&ao&&co,sa=go.x*ho.y-go.y*ho.x>0;if(ss&&Xe>io){const u=so.dist(ao);if(u>2*no){const Xe=so.sub(so.sub(ao)._mult(no/u)._round());this.updateDistance(ao,Xe),this.addCurrentVertex(Xe,go,0,0,oo),ao=Xe}}const aa=ao&&co;let fa=aa?fr:Kr?"butt":Ar;if(aa&&"round"===fa&&(Mo<wr?fa="miter":Mo<=2&&(fa="fakeround")),"miter"===fa&&Mo>_r&&(fa="bevel"),"bevel"===fa&&(Mo>2&&(fa="flipbevel"),Mo<_r&&(fa="miter")),ao&&this.updateDistance(ao,so),"miter"===fa)Co._mult(Mo),this.addCurrentVertex(so,Co,0,0,oo);else if("flipbevel"===fa){if(Mo>100)Co=ho.mult(-1);else{const u=Mo*go.add(ho).mag()/go.sub(ho).mag();Co._perp()._mult(u*(sa?-1:1))}this.addCurrentVertex(so,Co,0,0,oo),this.addCurrentVertex(so,Co.mult(-1),0,0,oo)}else if("bevel"===fa||"fakeround"===fa){const u=-Math.sqrt(Mo*Mo-1),Xe=sa?u:0,fr=sa?0:u;if(ao&&this.addCurrentVertex(so,go,Xe,fr,oo),"fakeround"===fa){const u=Math.round(180*Po/Math.PI/20);for(let Xe=1;Xe<u;Xe++){let fr=Xe/u;if(.5!==fr){const u=fr-.5;fr+=fr*u*(fr-1)*((1.0904+Io*(Io*(3.55645-1.43519*Io)-3.2452))*u*u+(.848013+Io*(.215638*Io-1.06021)))}const Ar=ho.sub(go)._mult(fr)._add(go)._unit()._mult(sa?-1:1);this.addHalfVertex(so,Ar.x,Ar.y,!1,sa,0,oo)}}co&&this.addCurrentVertex(so,ho,-Xe,-fr,oo)}else if("butt"===fa)this.addCurrentVertex(so,Co,0,0,oo);else if("square"===fa){const u=ao?1:-1;this.addCurrentVertex(so,Co,u,u,oo)}else"round"===fa&&(ao&&(this.addCurrentVertex(so,go,0,0,oo),this.addCurrentVertex(so,go,1,1,oo,!0)),co&&(this.addCurrentVertex(so,ho,-1,-1,oo,!0),this.addCurrentVertex(so,ho,0,0,oo)));if(ss&&Xe<In-1){const u=so.dist(co);if(u>2*no){const Xe=so.add(co.sub(so)._mult(no/u)._round());this.updateDistance(so,Xe),this.addCurrentVertex(Xe,ho,0,0,oo),so=Xe}}}}addCurrentVertex(u,Xe,fr,Ar,_r,wr=!1){const Kr=Xe.y*Ar-Xe.x,In=-Xe.y-Xe.x*Ar;this.addHalfVertex(u,Xe.x+Xe.y*fr,Xe.y-Xe.x*fr,wr,!1,fr,_r),this.addHalfVertex(u,Kr,In,wr,!0,-Ar,_r),this.distance>nh/2&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(u,Xe,fr,Ar,_r,wr))}addHalfVertex({x:u,y:Xe},fr,Ar,_r,wr,Kr,In){const io=.5*(this.lineClips?this.scaledDistance*(nh-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((u<<1)+(_r?1:0),(Xe<<1)+(wr?1:0),Math.round(63*fr)+128,Math.round(63*Ar)+128,1+(0===Kr?0:Kr<0?-1:1)|(63&io)<<2,io>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const no=In.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,no),In.primitiveLength++),wr?this.e2=no:this.e1=no}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(u,Xe){this.distance+=u.dist(Xe),this.updateScaledDistance()}}let dh,mh;wi("LineBucket",Ul,{omit:["layers","patternFeatures"]});var yh={get paint(){return mh=mh||new rs({"line-opacity":new Wi(Io.paint_line["line-opacity"]),"line-color":new Wi(Io.paint_line["line-color"]),"line-translate":new Ji(Io.paint_line["line-translate"]),"line-translate-anchor":new Ji(Io.paint_line["line-translate-anchor"]),"line-width":new Wi(Io.paint_line["line-width"]),"line-gap-width":new Wi(Io.paint_line["line-gap-width"]),"line-offset":new Wi(Io.paint_line["line-offset"]),"line-blur":new Wi(Io.paint_line["line-blur"]),"line-dasharray":new ts(Io.paint_line["line-dasharray"]),"line-pattern":new Qi(Io.paint_line["line-pattern"]),"line-gradient":new es(Io.paint_line["line-gradient"])})},get layout(){return dh=dh||new rs({"line-cap":new Ji(Io.layout_line["line-cap"]),"line-join":new Wi(Io.layout_line["line-join"]),"line-miter-limit":new Ji(Io.layout_line["line-miter-limit"]),"line-round-limit":new Ji(Io.layout_line["line-round-limit"]),"line-sort-key":new Wi(Io.layout_line["line-sort-key"])})}};class Gl extends Wi{possiblyEvaluate(u,Xe){return Xe=new Ui(Math.floor(Xe.zoom),{now:Xe.now,fadeDuration:Xe.fadeDuration,zoomHistory:Xe.zoomHistory,transition:Xe.transition}),super.possiblyEvaluate(u,Xe)}evaluate(u,Xe,fr,Ar){return Xe=g({},Xe,{zoom:Math.floor(Xe.zoom)}),super.evaluate(u,Xe,fr,Ar)}}let Sh;class Xl extends is{constructor(u){super(u,yh),this.gradientVersion=0,Sh||(Sh=new Gl(yh.paint.properties["line-width"].specification),Sh.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(u){if("line-gradient"===u){const u=this.gradientExpression();this.stepInterpolant=!!function(u){return void 0!==u._styleExpression}(u)&&u._styleExpression.expression instanceof Ae,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(u,Xe){super.recalculate(u,Xe),this.paint._values["line-floorwidth"]=Sh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,u)}createBucket(u){return new Ul(u)}queryRadius(u){const Xe=u,fr=Hl(to("line-width",this,Xe),to("line-gap-width",this,Xe)),Ar=to("line-offset",this,Xe);return fr/2+Math.abs(Ar)+eo(this.paint.get("line-translate"))}queryIntersectsFeature(u,Xe,Ar,_r,wr,Kr,In){const io=ro(u,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Kr.angle,In),no=In/2*Hl(this.paint.get("line-width").evaluate(Xe,Ar),this.paint.get("line-gap-width").evaluate(Xe,Ar)),oo=this.paint.get("line-offset").evaluate(Xe,Ar);return oo&&(_r=function(u,Xe){const Ar=[];for(let _r=0;_r<u.length;_r++){const wr=u[_r],Kr=[];for(let u=0;u<wr.length;u++){const Ar=wr[u-1],_r=wr[u],In=wr[u+1],io=0===u?new fr(0,0):_r.sub(Ar)._unit()._perp(),no=u===wr.length-1?new fr(0,0):In.sub(_r)._unit()._perp(),oo=io._add(no)._unit(),so=oo.x*no.x+oo.y*no.y;0!==so&&oo._mult(1/so),Kr.push(oo._mult(Xe)._add(_r))}Ar.push(Kr)}return Ar}(_r,oo*In)),function(u,Xe,fr){for(let Ar=0;Ar<Xe.length;Ar++){const _r=Xe[Ar];if(u.length>=3)for(let Xe=0;Xe<_r.length;Xe++)if(Wa(u,_r[Xe]))return!0;if(Ga(u,_r,fr))return!0}return!1}(io,_r,no)}isTileClipped(){return!0}}function Hl(u,Xe){return Xe>0?Xe+2*u:u}const Bh=ls([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Zh=ls([{name:"a_projected_pos",components:3,type:"Float32"}],4);ls([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const Gh=ls([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ls([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Rh=ls([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Vh=ls([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function eu(u,Xe,fr){return u.sections.forEach((u=>{u.text=function(u,Xe,fr){const Ar=Xe.layout.get("text-transform").evaluate(fr,{});return"uppercase"===Ar?u=u.toLocaleUpperCase():"lowercase"===Ar&&(u=u.toLocaleLowerCase()),ig.applyArabicShaping&&(u=ig.applyArabicShaping(u)),u}(u.text,Xe,fr)})),u}ls([{name:"triangle",components:3,type:"Uint16"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ls([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ls([{type:"Float32",name:"offsetX"}]),ls([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ls([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Wh={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Th=24,Jh=ou,su=function(u,Xe,fr,Ar,_r){var wr,Kr,In=8*_r-Ar-1,io=(1<<In)-1,no=io>>1,oo=-7,so=_r-1,ao=u[Xe+so];for(so+=-1,wr=ao&(1<<-oo)-1,ao>>=-oo,oo+=In;oo>0;wr=256*wr+u[Xe+so],so+=-1,oo-=8);for(Kr=wr&(1<<-oo)-1,wr>>=-oo,oo+=Ar;oo>0;Kr=256*Kr+u[Xe+so],so+=-1,oo-=8);if(0===wr)wr=1-no;else{if(wr===io)return Kr?NaN:1/0*(ao?-1:1);Kr+=Math.pow(2,Ar),wr-=no}return(ao?-1:1)*Kr*Math.pow(2,wr-Ar)},au=function(u,Xe,fr,Ar,_r,wr){var Kr,In,io,no=8*wr-_r-1,oo=(1<<no)-1,so=oo>>1,ao=23===_r?Math.pow(2,-24)-Math.pow(2,-77):0,co=0,go=Xe<0||0===Xe&&1/Xe<0?1:0;for(Xe=Math.abs(Xe),isNaN(Xe)||Xe===1/0?(In=isNaN(Xe)?1:0,Kr=oo):(Kr=Math.floor(Math.log(Xe)/Math.LN2),Xe*(io=Math.pow(2,-Kr))<1&&(Kr--,io*=2),(Xe+=Kr+so>=1?ao/io:ao*Math.pow(2,1-so))*io>=2&&(Kr++,io/=2),Kr+so>=oo?(In=0,Kr=oo):Kr+so>=1?(In=(Xe*io-1)*Math.pow(2,_r),Kr+=so):(In=Xe*Math.pow(2,so-1)*Math.pow(2,_r),Kr=0));_r>=8;u[fr+co]=255&In,co+=1,In/=256,_r-=8);for(Kr=Kr<<_r|In,no+=_r;no>0;u[fr+co]=255&Kr,co+=1,Kr/=256,no-=8);u[fr+co-1]|=128*go};function ou(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}ou.Varint=0,ou.Fixed64=1,ou.Bytes=2,ou.Fixed32=5;var Fh=4294967296,Eh=1/Fh,Xh="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");function hu(u){return u.type===ou.Bytes?u.readVarint()+u.pos:u.pos+1}function pu(u,Xe,fr){return fr?4294967296*Xe+(u>>>0):4294967296*(Xe>>>0)+(u>>>0)}function fu(u,Xe,fr){var Ar=Xe<=16383?1:Xe<=2097151?2:Xe<=268435455?3:Math.floor(Math.log(Xe)/(7*Math.LN2));fr.realloc(Ar);for(var _r=fr.pos-1;_r>=u;_r--)fr.buf[_r+Ar]=fr.buf[_r]}function du(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeVarint(u[fr])}function yu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSVarint(u[fr])}function mu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFloat(u[fr])}function gu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeDouble(u[fr])}function xu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeBoolean(u[fr])}function vu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFixed32(u[fr])}function bu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSFixed32(u[fr])}function wu(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeFixed64(u[fr])}function _u(u,Xe){for(var fr=0;fr<u.length;fr++)Xe.writeSFixed64(u[fr])}function Au(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+16777216*u[Xe+3]}function Su(u,Xe,fr){u[fr]=Xe,u[fr+1]=Xe>>>8,u[fr+2]=Xe>>>16,u[fr+3]=Xe>>>24}function ku(u,Xe){return(u[Xe]|u[Xe+1]<<8|u[Xe+2]<<16)+(u[Xe+3]<<24)}ou.prototype={destroy:function(){this.buf=null},readFields:function(u,Xe,fr){for(fr=fr||this.length;this.pos<fr;){var Ar=this.readVarint(),_r=Ar>>3,wr=this.pos;this.type=7&Ar,u(_r,Xe,this),this.pos===wr&&this.skip(Ar)}return Xe},readMessage:function(u,Xe){return this.readFields(u,Xe,this.readVarint()+this.pos)},readFixed32:function(){var u=Au(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=ku(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Au(this.buf,this.pos)+Au(this.buf,this.pos+4)*Fh;return this.pos+=8,u},readSFixed64:function(){var u=Au(this.buf,this.pos)+ku(this.buf,this.pos+4)*Fh;return this.pos+=8,u},readFloat:function(){var u=su(this.buf,this.pos,0,23,4);return this.pos+=4,u},readDouble:function(){var u=su(this.buf,this.pos,0,52,8);return this.pos+=8,u},readVarint:function(u){var Xe,fr,Ar=this.buf;return Xe=127&(fr=Ar[this.pos++]),fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<7,fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<14,fr<128?Xe:(Xe|=(127&(fr=Ar[this.pos++]))<<21,fr<128?Xe:function(u,Xe,fr){var Ar,_r,wr=fr.buf;if(Ar=(112&(_r=wr[fr.pos++]))>>4,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<3,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<10,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<17,_r<128)return pu(u,Ar,Xe);if(Ar|=(127&(_r=wr[fr.pos++]))<<24,_r<128)return pu(u,Ar,Xe);if(Ar|=(1&(_r=wr[fr.pos++]))<<31,_r<128)return pu(u,Ar,Xe);throw new Error("Expected varint not more than 10 bytes")}(Xe|=(15&(fr=Ar[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var u=this.readVarint()+this.pos,Xe=this.pos;return this.pos=u,u-Xe>=12&&Xh?function(u,Xe,fr){return Xh.decode(u.subarray(Xe,fr))}(this.buf,Xe,u):function(u,Xe,fr){for(var Ar="",_r=Xe;_r<fr;){var wr,Kr,In,io=u[_r],no=null,oo=io>239?4:io>223?3:io>191?2:1;if(_r+oo>fr)break;1===oo?io<128&&(no=io):2===oo?128==(192&(wr=u[_r+1]))&&(no=(31&io)<<6|63&wr)<=127&&(no=null):3===oo?(Kr=u[_r+2],128==(192&(wr=u[_r+1]))&&128==(192&Kr)&&((no=(15&io)<<12|(63&wr)<<6|63&Kr)<=2047||no>=55296&&no<=57343)&&(no=null)):4===oo&&(Kr=u[_r+2],In=u[_r+3],128==(192&(wr=u[_r+1]))&&128==(192&Kr)&&128==(192&In)&&((no=(15&io)<<18|(63&wr)<<12|(63&Kr)<<6|63&In)<=65535||no>=1114112)&&(no=null)),null===no?(no=65533,oo=1):no>65535&&(no-=65536,Ar+=String.fromCharCode(no>>>10&1023|55296),no=56320|1023&no),Ar+=String.fromCharCode(no),_r+=oo}return Ar}(this.buf,Xe,u)},readBytes:function(){var u=this.readVarint()+this.pos,Xe=this.buf.subarray(this.pos,u);return this.pos=u,Xe},readPackedVarint:function(u,Xe){if(this.type!==ou.Bytes)return u.push(this.readVarint(Xe));var fr=hu(this);for(u=u||[];this.pos<fr;)u.push(this.readVarint(Xe));return u},readPackedSVarint:function(u){if(this.type!==ou.Bytes)return u.push(this.readSVarint());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSVarint());return u},readPackedBoolean:function(u){if(this.type!==ou.Bytes)return u.push(this.readBoolean());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readBoolean());return u},readPackedFloat:function(u){if(this.type!==ou.Bytes)return u.push(this.readFloat());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFloat());return u},readPackedDouble:function(u){if(this.type!==ou.Bytes)return u.push(this.readDouble());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readDouble());return u},readPackedFixed32:function(u){if(this.type!==ou.Bytes)return u.push(this.readFixed32());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed32());return u},readPackedSFixed32:function(u){if(this.type!==ou.Bytes)return u.push(this.readSFixed32());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed32());return u},readPackedFixed64:function(u){if(this.type!==ou.Bytes)return u.push(this.readFixed64());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readFixed64());return u},readPackedSFixed64:function(u){if(this.type!==ou.Bytes)return u.push(this.readSFixed64());var Xe=hu(this);for(u=u||[];this.pos<Xe;)u.push(this.readSFixed64());return u},skip:function(u){var Xe=7&u;if(Xe===ou.Varint)for(;this.buf[this.pos++]>127;);else if(Xe===ou.Bytes)this.pos=this.readVarint()+this.pos;else if(Xe===ou.Fixed32)this.pos+=4;else{if(Xe!==ou.Fixed64)throw new Error("Unimplemented type: "+Xe);this.pos+=8}},writeTag:function(u,Xe){this.writeVarint(u<<3|Xe)},realloc:function(u){for(var Xe=this.length||16;Xe<this.pos+u;)Xe*=2;if(Xe!==this.length){var fr=new Uint8Array(Xe);fr.set(this.buf),this.buf=fr,this.length=Xe}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(u){this.realloc(4),Su(this.buf,u,this.pos),this.pos+=4},writeSFixed32:function(u){this.realloc(4),Su(this.buf,u,this.pos),this.pos+=4},writeFixed64:function(u){this.realloc(8),Su(this.buf,-1&u,this.pos),Su(this.buf,Math.floor(u*Eh),this.pos+4),this.pos+=8},writeSFixed64:function(u){this.realloc(8),Su(this.buf,-1&u,this.pos),Su(this.buf,Math.floor(u*Eh),this.pos+4),this.pos+=8},writeVarint:function(u){(u=+u||0)>268435455||u<0?function(u,Xe){var fr,Ar;if(u>=0?(fr=u%4294967296|0,Ar=u/4294967296|0):(Ar=~(-u/4294967296),4294967295^(fr=~(-u%4294967296))?fr=fr+1|0:(fr=0,Ar=Ar+1|0)),u>=0x10000000000000000||u<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");Xe.realloc(10),function(u,Xe,fr){fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,u>>>=7,fr.buf[fr.pos++]=127&u|128,fr.buf[fr.pos]=127&(u>>>=7)}(fr,0,Xe),function(u,Xe){var fr=(7&u)<<4;Xe.buf[Xe.pos++]|=fr|((u>>>=3)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u|((u>>>=7)?128:0),u&&(Xe.buf[Xe.pos++]=127&u)))))}(Ar,Xe)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(Boolean(u))},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var Xe=this.pos;this.pos=function(u,Xe,fr){for(var Ar,_r,wr=0;wr<Xe.length;wr++){if((Ar=Xe.charCodeAt(wr))>55295&&Ar<57344){if(!_r){Ar>56319||wr+1===Xe.length?(u[fr++]=239,u[fr++]=191,u[fr++]=189):_r=Ar;continue}if(Ar<56320){u[fr++]=239,u[fr++]=191,u[fr++]=189,_r=Ar;continue}Ar=_r-55296<<10|Ar-56320|65536,_r=null}else _r&&(u[fr++]=239,u[fr++]=191,u[fr++]=189,_r=null);Ar<128?u[fr++]=Ar:(Ar<2048?u[fr++]=Ar>>6|192:(Ar<65536?u[fr++]=Ar>>12|224:(u[fr++]=Ar>>18|240,u[fr++]=Ar>>12&63|128),u[fr++]=Ar>>6&63|128),u[fr++]=63&Ar|128)}return fr}(this.buf,u,this.pos);var fr=this.pos-Xe;fr>=128&&fu(Xe,fr,this),this.pos=Xe-1,this.writeVarint(fr),this.pos+=fr},writeFloat:function(u){this.realloc(4),au(this.buf,u,this.pos,0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),au(this.buf,u,this.pos,0,52,8),this.pos+=8},writeBytes:function(u){var Xe=u.length;this.writeVarint(Xe),this.realloc(Xe);for(var fr=0;fr<Xe;fr++)this.buf[this.pos++]=u[fr]},writeRawMessage:function(u,Xe){this.pos++;var fr=this.pos;u(Xe,this);var Ar=this.pos-fr;Ar>=128&&fu(fr,Ar,this),this.pos=fr-1,this.writeVarint(Ar),this.pos+=Ar},writeMessage:function(u,Xe,fr){this.writeTag(u,ou.Bytes),this.writeRawMessage(Xe,fr)},writePackedVarint:function(u,Xe){Xe.length&&this.writeMessage(u,du,Xe)},writePackedSVarint:function(u,Xe){Xe.length&&this.writeMessage(u,yu,Xe)},writePackedBoolean:function(u,Xe){Xe.length&&this.writeMessage(u,xu,Xe)},writePackedFloat:function(u,Xe){Xe.length&&this.writeMessage(u,mu,Xe)},writePackedDouble:function(u,Xe){Xe.length&&this.writeMessage(u,gu,Xe)},writePackedFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,vu,Xe)},writePackedSFixed32:function(u,Xe){Xe.length&&this.writeMessage(u,bu,Xe)},writePackedFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,wu,Xe)},writePackedSFixed64:function(u,Xe){Xe.length&&this.writeMessage(u,_u,Xe)},writeBytesField:function(u,Xe){this.writeTag(u,ou.Bytes),this.writeBytes(Xe)},writeFixed32Field:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeFixed32(Xe)},writeSFixed32Field:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeSFixed32(Xe)},writeFixed64Field:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeFixed64(Xe)},writeSFixed64Field:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeSFixed64(Xe)},writeVarintField:function(u,Xe){this.writeTag(u,ou.Varint),this.writeVarint(Xe)},writeSVarintField:function(u,Xe){this.writeTag(u,ou.Varint),this.writeSVarint(Xe)},writeStringField:function(u,Xe){this.writeTag(u,ou.Bytes),this.writeString(Xe)},writeFloatField:function(u,Xe){this.writeTag(u,ou.Fixed32),this.writeFloat(Xe)},writeDoubleField:function(u,Xe){this.writeTag(u,ou.Fixed64),this.writeDouble(Xe)},writeBooleanField:function(u,Xe){this.writeVarintField(u,Boolean(Xe))}};var Hh=r(Jh);const Kh=3;function zu(u,Xe,fr){1===u&&fr.readMessage(Pu,Xe)}function Pu(u,Xe,fr){if(3===u){const{id:u,bitmap:Ar,width:_r,height:wr,left:Kr,top:In,advance:io}=fr.readMessage(Cu,{});Xe.push({id:u,bitmap:new _o({width:_r+2*Kh,height:wr+2*Kh},Ar),metrics:{width:_r,height:wr,left:Kr,top:In,advance:io}})}}function Cu(u,Xe,fr){1===u?Xe.id=fr.readVarint():2===u?Xe.bitmap=fr.readBytes():3===u?Xe.width=fr.readVarint():4===u?Xe.height=fr.readVarint():5===u?Xe.left=fr.readSVarint():6===u?Xe.top=fr.readSVarint():7===u&&(Xe.advance=fr.readVarint())}const Lh=Kh;function Vu(u){let Xe=0,fr=0;for(const Ar of u)Xe+=Ar.w*Ar.h,fr=Math.max(fr,Ar.w);u.sort(((u,Xe)=>Xe.h-u.h));const Ar=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(Xe/.95)),fr),h:1/0}];let _r=0,wr=0;for(const Xe of u)for(let u=Ar.length-1;u>=0;u--){const fr=Ar[u];if(!(Xe.w>fr.w||Xe.h>fr.h)){if(Xe.x=fr.x,Xe.y=fr.y,wr=Math.max(wr,Xe.y+Xe.h),_r=Math.max(_r,Xe.x+Xe.w),Xe.w===fr.w&&Xe.h===fr.h){const Xe=Ar.pop();u<Ar.length&&(Ar[u]=Xe)}else Xe.h===fr.h?(fr.x+=Xe.w,fr.w-=Xe.w):Xe.w===fr.w?(fr.y+=Xe.h,fr.h-=Xe.h):(Ar.push({x:fr.x+Xe.w,y:fr.y,w:fr.w-Xe.w,h:Xe.h}),fr.y+=Xe.h,fr.h-=Xe.h);break}}return{w:_r,h:wr,fill:Xe/(_r*wr)||0}}const Dh=1;class Fu{constructor(u,{pixelRatio:Xe,version:fr,stretchX:Ar,stretchY:_r,content:wr,textFitWidth:Kr,textFitHeight:In}){this.paddedRect=u,this.pixelRatio=Xe,this.stretchX=Ar,this.stretchY=_r,this.content=wr,this.version=fr,this.textFitWidth=Kr,this.textFitHeight=In}get tl(){return[this.paddedRect.x+Dh,this.paddedRect.y+Dh]}get br(){return[this.paddedRect.x+this.paddedRect.w-Dh,this.paddedRect.y+this.paddedRect.h-Dh]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Dh)/this.pixelRatio,(this.paddedRect.h-2*Dh)/this.pixelRatio]}}class Tu{constructor(u,Xe){const fr={},Ar={};this.haveRenderCallbacks=[];const _r=[];this.addImages(u,fr,_r),this.addImages(Xe,Ar,_r);const{w:wr,h:Kr}=Vu(_r),In=new Ao({width:wr||1,height:Kr||1});for(const Xe in u){const Ar=u[Xe],_r=fr[Xe].paddedRect;Ao.copy(Ar.data,In,{x:0,y:0},{x:_r.x+Dh,y:_r.y+Dh},Ar.data)}for(const u in Xe){const fr=Xe[u],_r=Ar[u].paddedRect,wr=_r.x+Dh,Kr=_r.y+Dh,io=fr.data.width,no=fr.data.height;Ao.copy(fr.data,In,{x:0,y:0},{x:wr,y:Kr},fr.data),Ao.copy(fr.data,In,{x:0,y:no-1},{x:wr,y:Kr-1},{width:io,height:1}),Ao.copy(fr.data,In,{x:0,y:0},{x:wr,y:Kr+no},{width:io,height:1}),Ao.copy(fr.data,In,{x:io-1,y:0},{x:wr-1,y:Kr},{width:1,height:no}),Ao.copy(fr.data,In,{x:0,y:0},{x:wr+io,y:Kr},{width:1,height:no})}this.image=In,this.iconPositions=fr,this.patternPositions=Ar}addImages(u,Xe,fr){for(const Ar in u){const _r=u[Ar],wr={x:0,y:0,w:_r.data.width+2*Dh,h:_r.data.height+2*Dh};fr.push(wr),Xe[Ar]=new Fu(wr,_r),_r.hasRenderCallback&&this.haveRenderCallbacks.push(Ar)}}patchUpdatedImages(u,Xe){u.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const fr in u.updatedImages)this.patchUpdatedImage(this.iconPositions[fr],u.getImage(fr),Xe),this.patchUpdatedImage(this.patternPositions[fr],u.getImage(fr),Xe)}patchUpdatedImage(u,Xe,fr){if(!u||!Xe)return;if(u.version===Xe.version)return;u.version=Xe.version;const[Ar,_r]=u.tl;fr.update(Xe.data,void 0,{x:Ar,y:_r})}}var Yh;wi("ImagePosition",Fu),wi("ImageAtlas",Tu),u.ah=void 0,(Yh=u.ah||(u.ah={}))[Yh.none=0]="none",Yh[Yh.horizontal=1]="horizontal",Yh[Yh.vertical=2]="vertical",Yh[Yh.horizontalOnly=3]="horizontalOnly";const Nh=-17;class Du{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(u,Xe){const fr=new Du;return fr.scale=u||1,fr.fontStack=Xe,fr}static forImage(u){const Xe=new Du;return Xe.imageName=u,Xe}}class Ou{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(u,Xe){const fr=new Ou;for(let Ar=0;Ar<u.sections.length;Ar++){const _r=u.sections[Ar];_r.image?fr.addImageSection(_r):fr.addTextSection(_r,Xe)}return fr}length(){return this.text.length}getSection(u){return this.sections[this.sectionIndex[u]]}getSectionIndex(u){return this.sectionIndex[u]}getCharCode(u){return this.text.charCodeAt(u)}verticalizePunctuation(){this.text=function(u){let Xe="";for(let fr=0;fr<u.length;fr++){const Ar=u.charCodeAt(fr+1)||null,_r=u.charCodeAt(fr-1)||null;Xe+=Ar&&$i(Ar)&&!Wh[u[fr+1]]||_r&&$i(_r)&&!Wh[u[fr-1]]||!Wh[u[fr]]?u[fr]:Wh[u[fr]]}return Xe}(this.text)}trim(){let u=0;for(let Xe=0;Xe<this.text.length&&Oh[this.text.charCodeAt(Xe)];Xe++)u++;let Xe=this.text.length;for(let fr=this.text.length-1;fr>=0&&fr>=u&&Oh[this.text.charCodeAt(fr)];fr--)Xe--;this.text=this.text.substring(u,Xe),this.sectionIndex=this.sectionIndex.slice(u,Xe)}substring(u,Xe){const fr=new Ou;return fr.text=this.text.substring(u,Xe),fr.sectionIndex=this.sectionIndex.slice(u,Xe),fr.sections=this.sections,fr}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((u,Xe)=>Math.max(u,this.sections[Xe].scale)),0)}addTextSection(u,Xe){this.text+=u.text,this.sections.push(Du.forText(u.scale,u.fontStack||Xe));const fr=this.sections.length-1;for(let Xe=0;Xe<u.text.length;++Xe)this.sectionIndex.push(fr)}addImageSection(u){const Xe=u.image?u.image.name:"";if(0===Xe.length)return void A("Can't add FormattedSection with an empty image.");const fr=this.getNextImageSectionCharCode();fr?(this.text+=String.fromCharCode(fr),this.sections.push(Du.forImage(Xe)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function ju(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=Ou.fromFeature(Xe,wr);let Io;ao===u.ah.vertical&&Co.verticalizePunctuation();const{processBidirectionalText:xo,processStyledBidirectionalText:Mo}=ig;if(xo&&1===Co.sections.length){Io=[];const u=xo(Co.toString(),Hu(Co,oo,Kr,fr,_r,go));for(const Xe of u){const u=new Ou;u.text=Xe,u.sections=Co.sections;for(let fr=0;fr<Xe.length;fr++)u.sectionIndex.push(0);Io.push(u)}}else if(Mo){Io=[];const u=Mo(Co.text,Co.sectionIndex,Hu(Co,oo,Kr,fr,_r,go));for(const Xe of u){const u=new Ou;u.text=Xe[0],u.sectionIndex=Xe[1],u.sections=Co.sections,Io.push(u)}}else Io=function(u,Xe){const fr=[],Ar=u.text;let _r=0;for(const Ar of Xe)fr.push(u.substring(_r,Ar)),_r=Ar;return _r<Ar.length&&fr.push(u.substring(_r,Ar.length)),fr}(Co,Hu(Co,oo,Kr,fr,_r,go));const Po=[],ss={positionedLines:Po,text:Co.toString(),top:so[1],bottom:so[1],left:so[0],right:so[0],writingMode:ao,iconsInText:!1,verticalizable:!1};return function(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){let co=0,go=Nh,ho=0,Co=0;const Io="right"===io?1:"left"===io?0:.5;let xo=0;for(const In of wr){In.trim();const wr=In.getMaxScale(),io=(wr-1)*Th,Po={positionedGlyphs:[],lineOffset:0};Xe.positionedLines[xo]=Po;const ss=Po.positionedGlyphs;let sa=0;if(!In.length()){go+=Kr,++xo;continue}for(let Kr=0;Kr<In.length();Kr++){const ho=In.getSection(Kr),Co=In.getSectionIndex(Kr),Io=In.getCharCode(Kr);let xo=0,Po=null,aa=null,fa=null,ya=Th;const ol=!(no===u.ah.horizontal||!so&&!Ti(Io)||so&&(Oh[Io]||(Mo=Io,/\p{sc=Arab}/u.test(String.fromCodePoint(Mo)))));if(ho.imageName){const u=_r[ho.imageName];if(!u)continue;fa=ho.imageName,Xe.iconsInText=Xe.iconsInText||!0,aa=u.paddedRect;const fr=u.displaySize;ho.scale=ho.scale*Th/ao,Po={width:fr[0],height:fr[1],left:Dh,top:-Lh,advance:ol?fr[1]:fr[0]},xo=io+(Th-fr[1]*ho.scale),ya=Po.advance;const Ar=ol?fr[0]*ho.scale-Th*wr:fr[1]*ho.scale-Th*wr;Ar>0&&Ar>sa&&(sa=Ar)}else{const u=Ar[ho.fontStack],Xe=u&&u[Io];if(Xe&&Xe.rect)aa=Xe.rect,Po=Xe.metrics;else{const u=fr[ho.fontStack],Xe=u&&u[Io];if(!Xe)continue;Po=Xe.metrics}xo=(wr-ho.scale)*Th}ol?(Xe.verticalizable=!0,ss.push({glyph:Io,imageName:fa,x:co,y:go+xo,vertical:ol,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:Co,metrics:Po,rect:aa}),co+=ya*ho.scale+oo):(ss.push({glyph:Io,imageName:fa,x:co,y:go+xo,vertical:ol,scale:ho.scale,fontStack:ho.fontStack,sectionIndex:Co,metrics:Po,rect:aa}),co+=Po.advance*ho.scale+oo)}0!==ss.length&&(ho=Math.max(co-oo,ho),Ju(ss,0,ss.length-1,Io,sa)),co=0;const aa=Kr*wr+sa;Po.lineOffset=Math.max(sa,io),go+=aa,Co=Math.max(aa,Co),++xo}var Mo;const Po=go-Nh,{horizontalAlign:ss,verticalAlign:sa}=Yu(In);(function(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=(Xe-fr)*_r;let oo=0;oo=wr!==Kr?-In*Ar-Nh:(-Ar*io+.5)*Kr;for(const Xe of u)for(const u of Xe.positionedGlyphs)u.x+=no,u.y+=oo})(Xe.positionedLines,Io,ss,sa,ho,Co,Kr,Po,wr.length),Xe.top+=-sa*Po,Xe.bottom=Xe.top+Po,Xe.left+=-ss*ho,Xe.right=Xe.left+ho}(ss,fr,Ar,_r,Io,In,io,no,ao,oo,co,ho),!function(u){for(const Xe of u)if(0!==Xe.positionedGlyphs.length)return!1;return!0}(Po)&&ss}const Oh={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},jh={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Uh={40:!0};function Nu(u,Xe,fr,Ar,_r,wr){if(Xe.imageName){const u=Ar[Xe.imageName];return u?u.displaySize[0]*Xe.scale*Th/wr+_r:0}{const Ar=fr[Xe.fontStack],wr=Ar&&Ar[u];return wr?wr.metrics.advance*Xe.scale+_r:0}}function Zu(u,Xe,fr,Ar){const _r=Math.pow(u-Xe,2);return Ar?u<Xe?_r/2:2*_r:_r+Math.abs(fr)*fr}function Gu(u,Xe,fr){let Ar=0;return 10===u&&(Ar-=1e4),fr&&(Ar+=150),40!==u&&65288!==u||(Ar+=50),41!==Xe&&65289!==Xe||(Ar+=50),Ar}function Ku(u,Xe,fr,Ar,_r,wr){let Kr=null,In=Zu(Xe,fr,_r,wr);for(const u of Ar){const Ar=Zu(Xe-u.x,fr,_r,wr)+u.badness;Ar<=In&&(Kr=u,In=Ar)}return{index:u,x:Xe,priorBreak:Kr,badness:In}}function Xu(u){return u?Xu(u.priorBreak).concat(u.index):[]}function Hu(u,Xe,fr,Ar,_r,wr){if(!u)return[];const Kr=[],In=function(u,Xe,fr,Ar,_r,wr){let Kr=0;for(let fr=0;fr<u.length();fr++){const In=u.getSection(fr);Kr+=Nu(u.getCharCode(fr),In,Ar,_r,Xe,wr)}return Kr/Math.max(1,Math.ceil(Kr/fr))}(u,Xe,fr,Ar,_r,wr),io=u.text.indexOf("​")>=0;let no=0;for(let fr=0;fr<u.length();fr++){const so=u.getSection(fr),ao=u.getCharCode(fr);if(Oh[ao]||(no+=Nu(ao,so,Ar,_r,Xe,wr)),fr<u.length()-1){const Xe=!((oo=ao)<11904)&&(!!vc["CJK Compatibility Forms"](oo)||!!vc["CJK Compatibility"](oo)||!!vc["CJK Strokes"](oo)||!!vc["CJK Symbols and Punctuation"](oo)||!!vc["Enclosed CJK Letters and Months"](oo)||!!vc["Halfwidth and Fullwidth Forms"](oo)||!!vc["Ideographic Description Characters"](oo)||!!vc["Vertical Forms"](oo)||tg.test(String.fromCodePoint(oo)));(jh[ao]||Xe||so.imageName||fr!==u.length()-2&&Uh[u.getCharCode(fr+1)])&&Kr.push(Ku(fr+1,no,In,Kr,Gu(ao,u.getCharCode(fr+1),Xe&&io),!1))}}var oo;return Xu(Ku(u.length(),no,In,Kr,0,!0))}function Yu(u){let Xe=.5,fr=.5;switch(u){case"right":case"top-right":case"bottom-right":Xe=1;break;case"left":case"top-left":case"bottom-left":Xe=0}switch(u){case"bottom":case"bottom-right":case"bottom-left":fr=1;break;case"top":case"top-right":case"top-left":fr=0}return{horizontalAlign:Xe,verticalAlign:fr}}function Ju(u,Xe,fr,Ar,_r){if(!Ar&&!_r)return;const wr=u[fr],Kr=(u[fr].x+wr.metrics.advance*wr.scale)*Ar;for(let Ar=Xe;Ar<=fr;Ar++)u[Ar].x-=Kr,u[Ar].y+=_r}function Wu(u,Xe,fr){const{horizontalAlign:Ar,verticalAlign:_r}=Yu(fr),wr=Xe[0]-u.displaySize[0]*Ar,Kr=Xe[1]-u.displaySize[1]*_r;return{image:u,top:Kr,bottom:Kr+u.displaySize[1],left:wr,right:wr+u.displaySize[0]}}function Qu(u){var Xe,fr;let Ar=u.left,_r=u.top,wr=u.right-Ar,Kr=u.bottom-_r;const In=null!==(Xe=u.image.textFitWidth)&&void 0!==Xe?Xe:"stretchOrShrink",io=null!==(fr=u.image.textFitHeight)&&void 0!==fr?fr:"stretchOrShrink",no=(u.image.content[2]-u.image.content[0])/(u.image.content[3]-u.image.content[1]);if("proportional"===io){if("stretchOnly"===In&&wr/Kr<no||"proportional"===In){const u=Math.ceil(Kr*no);Ar*=u/wr,wr=u}}else if("proportional"===In&&"stretchOnly"===io&&0!==no&&wr/Kr>no){const u=Math.ceil(wr/no);_r*=u/Kr,Kr=u}return{x1:Ar,y1:_r,x2:Ar+wr,y2:_r+Kr}}function tc(u,Xe,fr,Ar,_r,wr){const Kr=u.image;let In;if(Kr.content){const u=Kr.content,Xe=Kr.pixelRatio||1;In=[u[0]/Xe,u[1]/Xe,Kr.displaySize[0]-u[2]/Xe,Kr.displaySize[1]-u[3]/Xe]}const io=Xe.left*wr,no=Xe.right*wr;let oo,so,ao,co;"width"===fr||"both"===fr?(co=_r[0]+io-Ar[3],so=_r[0]+no+Ar[1]):(co=_r[0]+(io+no-Kr.displaySize[0])/2,so=co+Kr.displaySize[0]);const go=Xe.top*wr,ho=Xe.bottom*wr;return"height"===fr||"both"===fr?(oo=_r[1]+go-Ar[0],ao=_r[1]+ho+Ar[2]):(oo=_r[1]+(go+ho-Kr.displaySize[1])/2,ao=oo+Kr.displaySize[1]),{image:Kr,top:oo,right:so,bottom:ao,left:co,collisionPadding:In}}const Qh=255,qh=128,$h=Qh*qh;function ic(u,Xe){const{expression:fr}=Xe;if("constant"===fr.kind)return{kind:"constant",layoutSize:fr.evaluate(new Ui(u+1))};if("source"===fr.kind)return{kind:"source"};{const{zoomStops:Xe,interpolationType:Ar}=fr;let _r=0;for(;_r<Xe.length&&Xe[_r]<=u;)_r++;_r=Math.max(0,_r-1);let wr=_r;for(;wr<Xe.length&&Xe[wr]<u+1;)wr++;wr=Math.min(Xe.length-1,wr);const Kr=Xe[_r],In=Xe[wr];return"composite"===fr.kind?{kind:"composite",minZoom:Kr,maxZoom:In,interpolationType:Ar}:{kind:"camera",minZoom:Kr,maxZoom:In,minSize:fr.evaluate(new Ui(Kr)),maxSize:fr.evaluate(new Ui(In)),interpolationType:Ar}}}function sc(u,Xe,fr){let Ar="never";const _r=u.get(Xe);return _r?Ar=_r:u.get(fr)&&(Ar="always"),Ar}const tu=zg.VectorTileFeature.types,iu=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function lc(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=In?Math.min($h,Math.round(In[0])):0,go=In?Math.min($h,Math.round(In[1])):0;u.emplaceBack(Xe,fr,Math.round(32*Ar),Math.round(32*_r),wr,Kr,(co<<1)+(io?1:0),go,16*no,16*oo,256*so,256*ao)}function uc(u,Xe,fr){u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr),u.emplaceBack(Xe.x,Xe.y,fr)}function cc(u){for(const Xe of u.sections)if(ji(Xe.text))return!0;return!1}class hc{constructor(u){this.layoutVertexArray=new Ws,this.indexArray=new na,this.programConfigurations=u,this.segments=new oa,this.dynamicLayoutVertexArray=new Qs,this.opacityVertexArray=new ta,this.hasVisibleVertices=!1,this.placedSymbolArray=new $s}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length}upload(u,Xe,fr,Ar){this.isEmpty()||(fr&&(this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,Bh.members),this.indexBuffer=u.createIndexBuffer(this.indexArray,Xe),this.dynamicLayoutVertexBuffer=u.createVertexBuffer(this.dynamicLayoutVertexArray,Zh.members,!0),this.opacityVertexBuffer=u.createVertexBuffer(this.opacityVertexArray,iu,!0),this.opacityVertexBuffer.itemSize=1),(fr||Ar)&&this.programConfigurations.upload(u))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}wi("SymbolBuffers",hc);class pc{constructor(u,Xe,fr){this.layoutVertexArray=new u,this.layoutAttributes=Xe,this.indexArray=new fr,this.segments=new oa,this.collisionVertexArray=new ra}upload(u){this.layoutVertexBuffer=u.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=u.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=u.createVertexBuffer(this.collisionVertexArray,Gh.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}wi("CollisionBuffers",pc);class fc{constructor(Xe){this.collisionBoxArray=Xe.collisionBoxArray,this.zoom=Xe.zoom,this.overscaling=Xe.overscaling,this.layers=Xe.layers,this.layerIds=this.layers.map((u=>u.id)),this.index=Xe.index,this.pixelRatio=Xe.pixelRatio,this.sourceLayerIndex=Xe.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=lo([]),this.placementViewportMatrix=lo([]);const fr=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ic(this.zoom,fr["text-size"]),this.iconSizeData=ic(this.zoom,fr["icon-size"]);const Ar=this.layers[0].layout,_r=Ar.get("symbol-sort-key"),wr=Ar.get("symbol-z-order");this.canOverlap="never"!==sc(Ar,"text-overlap","text-allow-overlap")||"never"!==sc(Ar,"icon-overlap","icon-allow-overlap")||Ar.get("text-ignore-placement")||Ar.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==wr&&!_r.isConstant(),this.sortFeaturesByY=("viewport-y"===wr||"auto"===wr&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===Ar.get("symbol-placement")&&(this.writingModes=Ar.get("text-writing-mode").map((Xe=>u.ah[Xe]))),this.stateDependentLayerIds=this.layers.filter((u=>u.isStateDependent())).map((u=>u.id)),this.sourceID=Xe.sourceID}createArrays(){this.text=new hc(new Ea(this.layers,this.zoom,(u=>/^text/.test(u)))),this.icon=new hc(new Ea(this.layers,this.zoom,(u=>/^icon/.test(u)))),this.glyphOffsetArray=new Os,this.lineVertexArray=new js,this.symbolInstances=new Ds,this.textAnchorOffsets=new Us}calculateGlyphDependencies(u,Xe,fr,Ar,_r){for(let wr=0;wr<u.length;wr++)if(Xe[u.charCodeAt(wr)]=!0,(fr||Ar)&&_r){const fr=Wh[u.charAt(wr)];fr&&(Xe[fr.charCodeAt(0)]=!0)}}populate(Xe,fr,Ar){const _r=this.layers[0],wr=_r.layout,Kr=wr.get("text-font"),In=wr.get("text-field"),io=wr.get("icon-image"),no=("constant"!==In.value.kind||In.value.value instanceof Yt&&!In.value.value.isEmpty()||In.value.value.toString().length>0)&&("constant"!==Kr.value.kind||Kr.value.value.length>0),oo="constant"!==io.value.kind||!!io.value.value||Object.keys(io.parameters).length>0,so=wr.get("symbol-sort-key");if(this.features=[],!no&&!oo)return;const ao=fr.iconDependencies,co=fr.glyphDependencies,go=fr.availableImages,ho=new Ui(this.zoom);for(const{feature:fr,id:In,index:io,sourceLayerIndex:Co}of Xe){const Xe=_r._featureFilter.needGeometry,Io=ja(fr,Xe);if(!_r._featureFilter.filter(ho,Io,Ar))continue;let xo,Mo;if(Xe||(Io.geometry=Oa(fr)),no){const u=_r.getValueAndResolveTokens("text-field",Io,Ar,go),Xe=Yt.factory(u),fr=this.hasRTLText=this.hasRTLText||cc(Xe);(!fr||"unavailable"===ig.getRTLTextPluginStatus()||fr&&ig.isParsed())&&(xo=eu(Xe,_r,Io))}if(oo){const u=_r.getValueAndResolveTokens("icon-image",Io,Ar,go);Mo=u instanceof te?u:te.fromString(u)}if(!xo&&!Mo)continue;const Po=this.sortFeaturesByKey?so.evaluate(Io,{},Ar):void 0;if(this.features.push({id:In,text:xo,icon:Mo,index:io,sourceLayerIndex:Co,geometry:Io.geometry,properties:fr.properties,type:tu[fr.type],sortKey:Po}),Mo&&(ao[Mo.name]=!0),xo){const Xe=Kr.evaluate(Io,{},Ar).join(","),fr="viewport"!==wr.get("text-rotation-alignment")&&"point"!==wr.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(u.ah.vertical)>=0;for(const u of xo.sections)if(u.image)ao[u.image.name]=!0;else{const Ar=Pi(xo.toString()),_r=u.fontStack||Xe,wr=co[_r]=co[_r]||{};this.calculateGlyphDependencies(u.text,wr,fr,this.allowVerticalPlacement,Ar)}}}"line"===wr.get("symbol-placement")&&(this.features=function(u){const Xe={},fr={},Ar=[];let _r=0;function s(Xe){Ar.push(u[Xe]),_r++}function a(u,Xe,_r){const wr=fr[u];return delete fr[u],fr[Xe]=wr,Ar[wr].geometry[0].pop(),Ar[wr].geometry[0]=Ar[wr].geometry[0].concat(_r[0]),wr}function o(u,fr,_r){const wr=Xe[fr];return delete Xe[fr],Xe[u]=wr,Ar[wr].geometry[0].shift(),Ar[wr].geometry[0]=_r[0].concat(Ar[wr].geometry[0]),wr}function l(u,Xe,fr){const Ar=fr?Xe[0][Xe[0].length-1]:Xe[0][0];return`${u}:${Ar.x}:${Ar.y}`}for(let wr=0;wr<u.length;wr++){const Kr=u[wr],In=Kr.geometry,io=Kr.text?Kr.text.toString():null;if(!io){s(wr);continue}const no=l(io,In),oo=l(io,In,!0);if(no in fr&&oo in Xe&&fr[no]!==Xe[oo]){const u=o(no,oo,In),_r=a(no,oo,Ar[u].geometry);delete Xe[no],delete fr[oo],fr[l(io,Ar[_r].geometry,!0)]=_r,Ar[u].geometry=null}else no in fr?a(no,oo,In):oo in Xe?o(no,oo,In):(s(wr),Xe[no]=_r-1,fr[oo]=_r-1)}return Ar.filter((u=>u.geometry))}(this.features)),this.sortFeaturesByKey&&this.features.sort(((u,Xe)=>u.sortKey-Xe.sortKey))}update(u,Xe,fr){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(u,Xe,this.layers,fr),this.icon.programConfigurations.updatePaintArrays(u,Xe,this.layers,fr))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(u){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(u),this.iconCollisionBox.upload(u)),this.text.upload(u,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(u,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(u,Xe){const fr=this.lineVertexArray.length;if(void 0!==u.segment){let fr=u.dist(Xe[u.segment+1]),Ar=u.dist(Xe[u.segment]);const _r={};for(let Ar=u.segment+1;Ar<Xe.length;Ar++)_r[Ar]={x:Xe[Ar].x,y:Xe[Ar].y,tileUnitDistanceFromAnchor:fr},Ar<Xe.length-1&&(fr+=Xe[Ar+1].dist(Xe[Ar]));for(let fr=u.segment||0;fr>=0;fr--)_r[fr]={x:Xe[fr].x,y:Xe[fr].y,tileUnitDistanceFromAnchor:Ar},fr>0&&(Ar+=Xe[fr-1].dist(Xe[fr]));for(let u=0;u<Xe.length;u++){const Xe=_r[u];this.lineVertexArray.emplaceBack(Xe.x,Xe.y,Xe.tileUnitDistanceFromAnchor)}}return{lineStartIndex:fr,lineLength:this.lineVertexArray.length-fr}}addSymbols(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=Xe.indexArray,go=Xe.layoutVertexArray,ho=Xe.segments.prepareSegment(4*fr.length,go,co,this.canOverlap?Kr.sortKey:void 0),Co=this.glyphOffsetArray.length,Io=ho.vertexLength,xo=this.allowVerticalPlacement&&In===u.ah.vertical?Math.PI/2:0,Mo=Kr.text&&Kr.text.sections;for(let u=0;u<fr.length;u++){const{tl:_r,tr:wr,bl:In,br:no,tex:oo,pixelOffsetTL:so,pixelOffsetBR:Co,minFontScaleX:Io,minFontScaleY:Po,glyphOffset:ss,isSDF:sa,sectionIndex:aa}=fr[u],fa=ho.vertexLength,ya=ss[1];lc(go,io.x,io.y,_r.x,ya+_r.y,oo.x,oo.y,Ar,sa,so.x,so.y,Io,Po),lc(go,io.x,io.y,wr.x,ya+wr.y,oo.x+oo.w,oo.y,Ar,sa,Co.x,so.y,Io,Po),lc(go,io.x,io.y,In.x,ya+In.y,oo.x,oo.y+oo.h,Ar,sa,so.x,Co.y,Io,Po),lc(go,io.x,io.y,no.x,ya+no.y,oo.x+oo.w,oo.y+oo.h,Ar,sa,Co.x,Co.y,Io,Po),uc(Xe.dynamicLayoutVertexArray,io,xo),co.emplaceBack(fa,fa+1,fa+2),co.emplaceBack(fa+1,fa+2,fa+3),ho.vertexLength+=4,ho.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(ss[0]),u!==fr.length-1&&aa===fr[u+1].sectionIndex||Xe.programConfigurations.populatePaintArrays(go.length,Kr,Kr.index,{},ao,Mo&&Mo[aa])}Xe.placedSymbolArray.emplaceBack(io.x,io.y,Co,this.glyphOffsetArray.length-Co,Io,no,oo,io.segment,Ar?Ar[0]:0,Ar?Ar[1]:0,_r[0],_r[1],In,0,!1,0,so)}_addCollisionDebugVertex(u,Xe,fr,Ar,_r,wr){return Xe.emplaceBack(0,0),u.emplaceBack(fr.x,fr.y,Ar,_r,Math.round(wr.x),Math.round(wr.y))}addCollisionDebugVertices(u,Xe,Ar,_r,wr,Kr,In){const io=wr.segments.prepareSegment(4,wr.layoutVertexArray,wr.indexArray),no=io.vertexLength,oo=wr.layoutVertexArray,so=wr.collisionVertexArray,ao=In.anchorX,co=In.anchorY;this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(u,Xe)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(Ar,Xe)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(Ar,_r)),this._addCollisionDebugVertex(oo,so,Kr,ao,co,new fr(u,_r)),io.vertexLength+=4;const go=wr.indexArray;go.emplaceBack(no,no+1),go.emplaceBack(no+1,no+2),go.emplaceBack(no+2,no+3),go.emplaceBack(no+3,no),io.primitiveLength+=4}addDebugCollisionBoxes(u,Xe,fr,Ar){for(let _r=u;_r<Xe;_r++){const u=this.collisionBoxArray.get(_r);this.addCollisionDebugVertices(u.x1,u.y1,u.x2,u.y2,Ar?this.textCollisionBox:this.iconCollisionBox,u.anchorPoint,fr)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new pc(ea,Rh.members,ia),this.iconCollisionBox=new pc(ea,Rh.members,ia);for(let u=0;u<this.symbolInstances.length;u++){const Xe=this.symbolInstances.get(u);this.addDebugCollisionBoxes(Xe.textBoxStartIndex,Xe.textBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.verticalTextBoxStartIndex,Xe.verticalTextBoxEndIndex,Xe,!0),this.addDebugCollisionBoxes(Xe.iconBoxStartIndex,Xe.iconBoxEndIndex,Xe,!1),this.addDebugCollisionBoxes(Xe.verticalIconBoxStartIndex,Xe.verticalIconBoxEndIndex,Xe,!1)}}_deserializeCollisionBoxesForSymbol(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no={};for(let Ar=Xe;Ar<fr;Ar++){const Xe=u.get(Ar);no.textBox={x1:Xe.x1,y1:Xe.y1,x2:Xe.x2,y2:Xe.y2,anchorPointX:Xe.anchorPointX,anchorPointY:Xe.anchorPointY},no.textFeatureIndex=Xe.featureIndex;break}for(let Xe=Ar;Xe<_r;Xe++){const fr=u.get(Xe);no.verticalTextBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.verticalTextFeatureIndex=fr.featureIndex;break}for(let Xe=wr;Xe<Kr;Xe++){const fr=u.get(Xe);no.iconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.iconFeatureIndex=fr.featureIndex;break}for(let Xe=In;Xe<io;Xe++){const fr=u.get(Xe);no.verticalIconBox={x1:fr.x1,y1:fr.y1,x2:fr.x2,y2:fr.y2,anchorPointX:fr.anchorPointX,anchorPointY:fr.anchorPointY},no.verticalIconFeatureIndex=fr.featureIndex;break}return no}deserializeCollisionBoxes(u){this.collisionArrays=[];for(let Xe=0;Xe<this.symbolInstances.length;Xe++){const fr=this.symbolInstances.get(Xe);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(u,fr.textBoxStartIndex,fr.textBoxEndIndex,fr.verticalTextBoxStartIndex,fr.verticalTextBoxEndIndex,fr.iconBoxStartIndex,fr.iconBoxEndIndex,fr.verticalIconBoxStartIndex,fr.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(u,Xe){const fr=u.placedSymbolArray.get(Xe),Ar=fr.vertexStartIndex+4*fr.numGlyphs;for(let Xe=fr.vertexStartIndex;Xe<Ar;Xe+=4)u.indexArray.emplaceBack(Xe,Xe+1,Xe+2),u.indexArray.emplaceBack(Xe+1,Xe+2,Xe+3)}getSortedSymbolIndexes(u){if(this.sortedAngle===u&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;const Xe=Math.sin(u),fr=Math.cos(u),Ar=[],_r=[],wr=[];for(let u=0;u<this.symbolInstances.length;++u){wr.push(u);const Kr=this.symbolInstances.get(u);Ar.push(0|Math.round(Xe*Kr.anchorX+fr*Kr.anchorY)),_r.push(Kr.featureIndex)}return wr.sort(((u,Xe)=>Ar[u]-Ar[Xe]||_r[Xe]-_r[u])),wr}addToSortKeyRanges(u,Xe){const fr=this.sortKeyRanges[this.sortKeyRanges.length-1];fr&&fr.sortKey===Xe?fr.symbolInstanceEnd=u+1:this.sortKeyRanges.push({sortKey:Xe,symbolInstanceStart:u,symbolInstanceEnd:u+1})}sortFeatures(u){if(this.sortFeaturesByY&&this.sortedAngle!==u&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(u),this.sortedAngle=u,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const u of this.symbolInstanceIndexes){const Xe=this.symbolInstances.get(u);this.featureSortOrder.push(Xe.featureIndex),[Xe.rightJustifiedTextSymbolIndex,Xe.centerJustifiedTextSymbolIndex,Xe.leftJustifiedTextSymbolIndex].forEach(((u,Xe,fr)=>{u>=0&&fr.indexOf(u)===Xe&&this.addIndicesForPlacedSymbol(this.text,u)})),Xe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Xe.verticalPlacedTextSymbolIndex),Xe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.placedIconSymbolIndex),Xe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Xe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let ru,nu;wi("SymbolBucket",fc,{omit:["layers","collisionBoxArray","features","compareText"]}),fc.MAX_GLYPHS=65535,fc.addDynamicAttributes=uc;var lu={get paint(){return nu=nu||new rs({"icon-opacity":new Wi(Io.paint_symbol["icon-opacity"]),"icon-color":new Wi(Io.paint_symbol["icon-color"]),"icon-halo-color":new Wi(Io.paint_symbol["icon-halo-color"]),"icon-halo-width":new Wi(Io.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Wi(Io.paint_symbol["icon-halo-blur"]),"icon-translate":new Ji(Io.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ji(Io.paint_symbol["icon-translate-anchor"]),"text-opacity":new Wi(Io.paint_symbol["text-opacity"]),"text-color":new Wi(Io.paint_symbol["text-color"],{runtimeType:aa,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Wi(Io.paint_symbol["text-halo-color"]),"text-halo-width":new Wi(Io.paint_symbol["text-halo-width"]),"text-halo-blur":new Wi(Io.paint_symbol["text-halo-blur"]),"text-translate":new Ji(Io.paint_symbol["text-translate"]),"text-translate-anchor":new Ji(Io.paint_symbol["text-translate-anchor"])})},get layout(){return ru=ru||new rs({"symbol-placement":new Ji(Io.layout_symbol["symbol-placement"]),"symbol-spacing":new Ji(Io.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ji(Io.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Wi(Io.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ji(Io.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ji(Io.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Ji(Io.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Ji(Io.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ji(Io.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ji(Io.layout_symbol["icon-rotation-alignment"]),"icon-size":new Wi(Io.layout_symbol["icon-size"]),"icon-text-fit":new Ji(Io.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ji(Io.layout_symbol["icon-text-fit-padding"]),"icon-image":new Wi(Io.layout_symbol["icon-image"]),"icon-rotate":new Wi(Io.layout_symbol["icon-rotate"]),"icon-padding":new Wi(Io.layout_symbol["icon-padding"]),"icon-keep-upright":new Ji(Io.layout_symbol["icon-keep-upright"]),"icon-offset":new Wi(Io.layout_symbol["icon-offset"]),"icon-anchor":new Wi(Io.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ji(Io.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ji(Io.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ji(Io.layout_symbol["text-rotation-alignment"]),"text-field":new Wi(Io.layout_symbol["text-field"]),"text-font":new Wi(Io.layout_symbol["text-font"]),"text-size":new Wi(Io.layout_symbol["text-size"]),"text-max-width":new Wi(Io.layout_symbol["text-max-width"]),"text-line-height":new Ji(Io.layout_symbol["text-line-height"]),"text-letter-spacing":new Wi(Io.layout_symbol["text-letter-spacing"]),"text-justify":new Wi(Io.layout_symbol["text-justify"]),"text-radial-offset":new Wi(Io.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ji(Io.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Wi(Io.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Wi(Io.layout_symbol["text-anchor"]),"text-max-angle":new Ji(Io.layout_symbol["text-max-angle"]),"text-writing-mode":new Ji(Io.layout_symbol["text-writing-mode"]),"text-rotate":new Wi(Io.layout_symbol["text-rotate"]),"text-padding":new Ji(Io.layout_symbol["text-padding"]),"text-keep-upright":new Ji(Io.layout_symbol["text-keep-upright"]),"text-transform":new Wi(Io.layout_symbol["text-transform"]),"text-offset":new Wi(Io.layout_symbol["text-offset"]),"text-allow-overlap":new Ji(Io.layout_symbol["text-allow-overlap"]),"text-overlap":new Ji(Io.layout_symbol["text-overlap"]),"text-ignore-placement":new Ji(Io.layout_symbol["text-ignore-placement"]),"text-optional":new Ji(Io.layout_symbol["text-optional"])})}};class gc{constructor(u){if(void 0===u.property.overrides)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=u.property.overrides?u.property.overrides.runtimeType:Mo,this.defaultValue=u}evaluate(u){if(u.formattedSection){const Xe=this.defaultValue.property.overrides;if(Xe&&Xe.hasOverride(u.formattedSection))return Xe.getOverride(u.formattedSection)}return u.feature&&u.featureState?this.defaultValue.evaluate(u.feature,u.featureState):this.defaultValue.property.specification.default}eachChild(u){this.defaultValue.isConstant()||u(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}wi("FormatSectionOverride",gc,{omit:["defaultValue"]});class xc extends is{constructor(u){super(u,lu)}recalculate(u,Xe){if(super.recalculate(u,Xe),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){const u=this.layout.get("text-writing-mode");if(u){const Xe=[];for(const fr of u)Xe.indexOf(fr)<0&&Xe.push(fr);this.layout._values["text-writing-mode"]=Xe}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(u,Xe,fr,Ar){const _r=this.layout.get(u).evaluate(Xe,{},fr,Ar),wr=this._unevaluatedLayout._values[u];return wr.isDataDriven()||vn(wr.value)||!_r?_r:function(u,Xe){return Xe.replace(/{([^{}]+)}/g,((Xe,fr)=>u&&fr in u?String(u[fr]):""))}(Xe.properties,_r)}createBucket(u){return new fc(u)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const u of lu.paint.overridableProperties){if(!xc.hasPaintOverride(this.layout,u))continue;const Xe=this.paint.get(u),fr=new gc(Xe),Ar=new xn(fr,Xe.property.specification);let _r=null;_r="constant"===Xe.value.kind||"source"===Xe.value.kind?new wn("source",Ar):new _n("composite",Ar,Xe.value.zoomStops),this.paint._values[u]=new Hi(Xe.property,_r,Xe.parameters)}}_handleOverridablePaintPropertyUpdate(u,Xe,fr){return!(!this.layout||Xe.isDataDriven()||fr.isDataDriven())&&xc.hasPaintOverride(this.layout,u)}static hasPaintOverride(u,Xe){const fr=u.get("text-field"),Ar=lu.paint.properties[Xe];let _r=!1;const s=u=>{for(const Xe of u)if(Ar.overrides&&Ar.overrides.hasOverride(Xe))return void(_r=!0)};if("constant"===fr.value.kind&&fr.value.value instanceof Yt)s(fr.value.value.sections);else if("source"===fr.value.kind){const t=u=>{_r||(u instanceof se&&ne(u.value)===sl?s(u.value.sections):u instanceof Ze?s(u.sections):u.eachChild(t))},u=fr.value;u._styleExpression&&t(u._styleExpression.expression)}return _r}}let cu;var uu={get paint(){return cu=cu||new rs({"background-color":new Ji(Io.paint_background["background-color"]),"background-pattern":new ts(Io.paint_background["background-pattern"]),"background-opacity":new Ji(Io.paint_background["background-opacity"])})}};class wc extends is{constructor(u){super(u,uu)}}let Iu;var Bu={get paint(){return Iu=Iu||new rs({"raster-opacity":new Ji(Io.paint_raster["raster-opacity"]),"raster-hue-rotate":new Ji(Io.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Ji(Io.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Ji(Io.paint_raster["raster-brightness-max"]),"raster-saturation":new Ji(Io.paint_raster["raster-saturation"]),"raster-contrast":new Ji(Io.paint_raster["raster-contrast"]),"raster-resampling":new Ji(Io.paint_raster["raster-resampling"]),"raster-fade-duration":new Ji(Io.paint_raster["raster-fade-duration"])})}};class Sc extends is{constructor(u){super(u,Bu)}}class kc extends is{constructor(u){super(u,{}),this.onAdd=u=>{this.implementation.onAdd&&this.implementation.onAdd(u,u.painter.context.gl)},this.onRemove=u=>{this.implementation.onRemove&&this.implementation.onRemove(u,u.painter.context.gl)},this.implementation=u}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Mc{constructor(u){this._methodToThrottle=u,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const Ru=6371008.8;class zc{constructor(u,Xe){if(isNaN(u)||isNaN(Xe))throw new Error(`Invalid LngLat object: (${u}, ${Xe})`);if(this.lng=+u,this.lat=+Xe,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zc(m(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(u){const Xe=Math.PI/180,fr=this.lat*Xe,Ar=u.lat*Xe,_r=Math.sin(fr)*Math.sin(Ar)+Math.cos(fr)*Math.cos(Ar)*Math.cos((u.lng-this.lng)*Xe);return Ru*Math.acos(Math.min(_r,1))}static convert(u){if(u instanceof zc)return u;if(Array.isArray(u)&&(2===u.length||3===u.length))return new zc(Number(u[0]),Number(u[1]));if(!Array.isArray(u)&&"object"==typeof u&&null!==u)return new zc(Number("lng"in u?u.lng:u.lon),Number(u.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const Mu=2*Math.PI*Ru;function Cc(u){return Mu*Math.cos(u*Math.PI/180)}function Bc(u){return(180+u)/360}function Vc(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function Ec(u,Xe){return u/Cc(Xe)}function Fc(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Tc{constructor(u,Xe,fr=0){this.x=+u,this.y=+Xe,this.z=+fr}static fromLngLat(u,Xe=0){const fr=zc.convert(u);return new Tc(Bc(fr.lng),Vc(fr.lat),Ec(Xe,fr.lat))}toLngLat(){return new zc(360*this.x-180,Fc(this.y))}toAltitude(){return this.z*Cc(Fc(this.y))}meterInMercatorCoordinateUnits(){return 1/Mu*(u=Fc(this.y),1/Math.cos(u*Math.PI/180));var u}}function $c(u,Xe,fr){var Ar=2*Math.PI*6378137/256/Math.pow(2,fr);return[u*Ar-2*Math.PI*6378137/2,Xe*Ar-2*Math.PI*6378137/2]}class Lc{constructor(u,Xe,fr){if(!function(u,Xe,fr){return!(u<0||u>25||fr<0||fr>=Math.pow(2,u)||Xe<0||Xe>=Math.pow(2,u))}(u,Xe,fr))throw new Error(`x=${Xe}, y=${fr}, z=${u} outside of bounds. 0<=x<${Math.pow(2,u)}, 0<=y<${Math.pow(2,u)} 0<=z<=25 `);this.z=u,this.x=Xe,this.y=fr,this.key=jc(0,u,u,Xe,fr)}equals(u){return this.z===u.z&&this.x===u.x&&this.y===u.y}url(u,Xe,fr){const Ar=(wr=this.y,Kr=this.z,In=$c(256*(_r=this.x),256*(wr=Math.pow(2,Kr)-wr-1),Kr),io=$c(256*(_r+1),256*(wr+1),Kr),In[0]+","+In[1]+","+io[0]+","+io[1]);var _r,wr,Kr,In,io;const no=function(u,Xe,fr){let Ar,_r="";for(let wr=u;wr>0;wr--)Ar=1<<wr-1,_r+=(Xe&Ar?1:0)+(fr&Ar?2:0);return _r}(this.z,this.x,this.y);return u[(this.x+this.y)%u.length].replace(/{prefix}/g,(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"===fr?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,Xe>1?"@2x":"").replace(/{quadkey}/g,no).replace(/{bbox-epsg-3857}/g,Ar)}isChildOf(u){const Xe=this.z-u.z;return Xe>0&&u.x===this.x>>Xe&&u.y===this.y>>Xe}getTilePoint(u){const Xe=Math.pow(2,this.z);return new fr((u.x*Xe-this.x)*Cg,(u.y*Xe-this.y)*Cg)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Dc{constructor(u,Xe){this.wrap=u,this.canonical=Xe,this.key=jc(u,Xe.z,Xe.z,Xe.x,Xe.y)}}class Oc{constructor(u,Xe,fr,Ar,_r){if(u<fr)throw new Error(`overscaledZ should be >= z; overscaledZ = ${u}; z = ${fr}`);this.overscaledZ=u,this.wrap=Xe,this.canonical=new Lc(fr,+Ar,+_r),this.key=jc(Xe,u,fr,Ar,_r)}clone(){return new Oc(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(u){return this.overscaledZ===u.overscaledZ&&this.wrap===u.wrap&&this.canonical.equals(u.canonical)}scaledTo(u){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const Xe=this.canonical.z-u;return u>this.canonical.z?new Oc(u,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Oc(u,this.wrap,u,this.canonical.x>>Xe,this.canonical.y>>Xe)}calculateScaledKey(u,Xe){if(u>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${u}; overscaledZ = ${this.overscaledZ}`);const fr=this.canonical.z-u;return u>this.canonical.z?jc(this.wrap*+Xe,u,this.canonical.z,this.canonical.x,this.canonical.y):jc(this.wrap*+Xe,u,u,this.canonical.x>>fr,this.canonical.y>>fr)}isChildOf(u){if(u.wrap!==this.wrap)return!1;const Xe=this.canonical.z-u.canonical.z;return 0===u.overscaledZ||u.overscaledZ<this.overscaledZ&&u.canonical.x===this.canonical.x>>Xe&&u.canonical.y===this.canonical.y>>Xe}children(u){if(this.overscaledZ>=u)return[new Oc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const Xe=this.canonical.z+1,fr=2*this.canonical.x,Ar=2*this.canonical.y;return[new Oc(Xe,this.wrap,Xe,fr,Ar),new Oc(Xe,this.wrap,Xe,fr+1,Ar),new Oc(Xe,this.wrap,Xe,fr,Ar+1),new Oc(Xe,this.wrap,Xe,fr+1,Ar+1)]}isLessThan(u){return this.wrap<u.wrap||!(this.wrap>u.wrap)&&(this.overscaledZ<u.overscaledZ||!(this.overscaledZ>u.overscaledZ)&&(this.canonical.x<u.canonical.x||!(this.canonical.x>u.canonical.x)&&this.canonical.y<u.canonical.y))}wrapped(){return new Oc(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(u){return new Oc(this.overscaledZ,u,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Dc(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(u){return this.canonical.getTilePoint(new Tc(u.x-this.wrap,u.y))}}function jc(u,Xe,fr,Ar,_r){(u*=2)<0&&(u=-1*u-1);const wr=1<<fr;return(wr*wr*u+wr*_r+Ar).toString(36)+fr.toString(36)+Xe.toString(36)}wi("CanonicalTileID",Lc),wi("OverscaledTileID",Oc,{omit:["posMatrix"]});class Rc{constructor(u,Xe,fr,Ar=1,_r=1,wr=1,Kr=0){if(this.uid=u,Xe.height!==Xe.width)throw new RangeError("DEM tiles must be square");if(fr&&!["mapbox","terrarium","custom"].includes(fr))return void A(`"${fr}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=Xe.height;const In=this.dim=Xe.height-2;switch(this.data=new Uint32Array(Xe.data.buffer),fr){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=Ar,this.greenFactor=_r,this.blueFactor=wr,this.baseShift=Kr;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let u=0;u<In;u++)this.data[this._idx(-1,u)]=this.data[this._idx(0,u)],this.data[this._idx(In,u)]=this.data[this._idx(In-1,u)],this.data[this._idx(u,-1)]=this.data[this._idx(u,0)],this.data[this._idx(u,In)]=this.data[this._idx(u,In-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(In,-1)]=this.data[this._idx(In-1,0)],this.data[this._idx(-1,In)]=this.data[this._idx(0,In-1)],this.data[this._idx(In,In)]=this.data[this._idx(In-1,In-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let u=0;u<In;u++)for(let Xe=0;Xe<In;Xe++){const fr=this.get(u,Xe);fr>this.max&&(this.max=fr),fr<this.min&&(this.min=fr)}}get(u,Xe){const fr=new Uint8Array(this.data.buffer),Ar=4*this._idx(u,Xe);return this.unpack(fr[Ar],fr[Ar+1],fr[Ar+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(u,Xe){if(u<-1||u>=this.dim+1||Xe<-1||Xe>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(Xe+1)*this.stride+(u+1)}unpack(u,Xe,fr){return u*this.redFactor+Xe*this.greenFactor+fr*this.blueFactor-this.baseShift}getPixels(){return new Ao({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(u,Xe,fr){if(this.dim!==u.dim)throw new Error("dem dimension mismatch");let Ar=Xe*this.dim,_r=Xe*this.dim+this.dim,wr=fr*this.dim,Kr=fr*this.dim+this.dim;switch(Xe){case-1:Ar=_r-1;break;case 1:_r=Ar+1}switch(fr){case-1:wr=Kr-1;break;case 1:Kr=wr+1}const In=-Xe*this.dim,io=-fr*this.dim;for(let Xe=wr;Xe<Kr;Xe++)for(let fr=Ar;fr<_r;fr++)this.data[this._idx(fr,Xe)]=u.data[this._idx(fr+In,Xe+io)]}}wi("DEMData",Rc);class Uc{constructor(u){this._stringToNumber={},this._numberToString=[];for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];this._stringToNumber[fr]=Xe,this._numberToString[Xe]=fr}}encode(u){return this._stringToNumber[u]}decode(u){if(u>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${u} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[u]}}class qc{constructor(u,Xe,fr,Ar,_r){this.type="Feature",this._vectorTileFeature=u,u._z=Xe,u._x=fr,u._y=Ar,this.properties=u.properties,this.id=_r}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(u){this._geometry=u}toJSON(){const u={geometry:this.geometry};for(const Xe in this)"_geometry"!==Xe&&"_vectorTileFeature"!==Xe&&(u[Xe]=this[Xe]);return u}}class Nc{constructor(u,Xe){this.tileID=u,this.x=u.canonical.x,this.y=u.canonical.y,this.z=u.canonical.z,this.grid=new vi(Cg,16,0),this.grid3D=new vi(Cg,16,0),this.featureIndexArray=new Ns,this.promoteId=Xe}insert(u,Xe,fr,Ar,_r,wr){const Kr=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(fr,Ar,_r);const In=wr?this.grid3D:this.grid;for(let u=0;u<Xe.length;u++){const fr=Xe[u],Ar=[1/0,1/0,-1/0,-1/0];for(let u=0;u<fr.length;u++){const Xe=fr[u];Ar[0]=Math.min(Ar[0],Xe.x),Ar[1]=Math.min(Ar[1],Xe.y),Ar[2]=Math.max(Ar[2],Xe.x),Ar[3]=Math.max(Ar[3],Xe.y)}Ar[0]<Cg&&Ar[1]<Cg&&Ar[2]>=0&&Ar[3]>=0&&In.insert(Kr,Ar[0],Ar[1],Ar[2],Ar[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new zg.VectorTile(new Hh(this.rawTileData)).layers,this.sourceLayerCoder=new Uc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(u,Xe,Ar,_r){this.loadVTLayers();const wr=u.params||{},Kr=Cg/u.tileSize/u.scale,In=zn(wr.filter),io=u.queryGeometry,no=u.queryPadding*Kr,oo=Gc(io),so=this.grid.query(oo.minX-no,oo.minY-no,oo.maxX+no,oo.maxY+no),ao=Gc(u.cameraQueryGeometry),co=this.grid3D.query(ao.minX-no,ao.minY-no,ao.maxX+no,ao.maxY+no,((Xe,Ar,_r,wr)=>function(u,Xe,Ar,_r,wr){for(const fr of u)if(Xe<=fr.x&&Ar<=fr.y&&_r>=fr.x&&wr>=fr.y)return!0;const Kr=[new fr(Xe,Ar),new fr(Xe,wr),new fr(_r,wr),new fr(_r,Ar)];if(u.length>2)for(const Xe of Kr)if(Wa(u,Xe))return!0;for(let Xe=0;Xe<u.length-1;Xe++)if(Qa(u[Xe],u[Xe+1],Kr))return!0;return!1}(u.cameraQueryGeometry,Xe-no,Ar-no,_r+no,wr+no)));for(const u of co)so.push(u);so.sort(Kc);const go={};let ho;for(let fr=0;fr<so.length;fr++){const no=so[fr];if(no===ho)continue;ho=no;const oo=this.featureIndexArray.get(no);let ao=null;this.loadMatchingFeature(go,oo.bucketIndex,oo.sourceLayerIndex,oo.featureIndex,In,wr.layers,wr.availableImages,Xe,Ar,_r,((Xe,fr,Ar)=>(ao||(ao=Oa(Xe)),fr.queryIntersectsFeature(io,Xe,Ar,ao,this.z,u.transform,Kr,u.pixelPosMatrix))))}return go}loadMatchingFeature(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=this.bucketLayerIDs[Xe];if(wr&&!function(u,Xe){for(let fr=0;fr<u.length;fr++)if(Xe.indexOf(u[fr])>=0)return!0;return!1}(wr,so))return;const ao=this.sourceLayerCoder.decode(fr),co=this.vtLayers[ao].feature(Ar);if(_r.needGeometry){const u=ja(co,!0);if(!_r.filter(new Ui(this.tileID.overscaledZ),u,this.tileID.canonical))return}else if(!_r.filter(new Ui(this.tileID.overscaledZ),co))return;const go=this.getId(co,ao);for(let Xe=0;Xe<so.length;Xe++){const fr=so[Xe];if(wr&&wr.indexOf(fr)<0)continue;const _r=In[fr];if(!_r)continue;let ao={};go&&no&&(ao=no.getState(_r.sourceLayer||"_geojsonTileLayer",go));const ho=g({},io[fr]);ho.paint=Zc(ho.paint,_r.paint,co,ao,Kr),ho.layout=Zc(ho.layout,_r.layout,co,ao,Kr);const Co=!oo||oo(co,_r,ao);if(!Co)continue;const Io=new qc(co,this.z,this.x,this.y,go);Io.layer=ho;let xo=u[fr];void 0===xo&&(xo=u[fr]=[]),xo.push({featureIndex:Ar,feature:Io,intersectionZ:Co})}}lookupSymbolFeatures(u,Xe,fr,Ar,_r,wr,Kr,In){const io={};this.loadVTLayers();const no=zn(_r);for(const _r of u)this.loadMatchingFeature(io,fr,Ar,_r,no,wr,Kr,In,Xe);return io}hasLayer(u){for(const Xe of this.bucketLayerIDs)for(const fr of Xe)if(u===fr)return!0;return!1}getId(u,Xe){let fr=u.id;return this.promoteId&&(fr=u.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[Xe]],"boolean"==typeof fr&&(fr=Number(fr))),fr}}function Zc(u,Xe,fr,Ar,_r){return v(u,((u,wr)=>{const Kr=Xe instanceof Yi?Xe.get(wr):null;return Kr&&Kr.evaluate?Kr.evaluate(fr,Ar,_r):Kr}))}function Gc(u){let Xe=1/0,fr=1/0,Ar=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),fr=Math.min(fr,wr.y),Ar=Math.max(Ar,wr.x),_r=Math.max(_r,wr.y);return{minX:Xe,minY:fr,maxX:Ar,maxY:_r}}function Kc(u,Xe){return Xe-u}function Xc(u,Xe,Ar,_r,wr){const Kr=[];for(let In=0;In<u.length;In++){const io=u[In];let no;for(let u=0;u<io.length-1;u++){let In=io[u],oo=io[u+1];In.x<Xe&&oo.x<Xe||(In.x<Xe?In=new fr(Xe,In.y+(Xe-In.x)/(oo.x-In.x)*(oo.y-In.y))._round():oo.x<Xe&&(oo=new fr(Xe,In.y+(Xe-In.x)/(oo.x-In.x)*(oo.y-In.y))._round()),In.y<Ar&&oo.y<Ar||(In.y<Ar?In=new fr(In.x+(Ar-In.y)/(oo.y-In.y)*(oo.x-In.x),Ar)._round():oo.y<Ar&&(oo=new fr(In.x+(Ar-In.y)/(oo.y-In.y)*(oo.x-In.x),Ar)._round()),In.x>=_r&&oo.x>=_r||(In.x>=_r?In=new fr(_r,In.y+(_r-In.x)/(oo.x-In.x)*(oo.y-In.y))._round():oo.x>=_r&&(oo=new fr(_r,In.y+(_r-In.x)/(oo.x-In.x)*(oo.y-In.y))._round()),In.y>=wr&&oo.y>=wr||(In.y>=wr?In=new fr(In.x+(wr-In.y)/(oo.y-In.y)*(oo.x-In.x),wr)._round():oo.y>=wr&&(oo=new fr(In.x+(wr-In.y)/(oo.y-In.y)*(oo.x-In.x),wr)._round()),no&&In.equals(no[no.length-1])||(no=[In],Kr.push(no)),no.push(oo)))))}}return Kr}wi("FeatureIndex",Nc,{omit:["rawTileData","sourceLayerCoder"]});class Hc extends fr{constructor(u,Xe,fr,Ar){super(u,Xe),this.angle=fr,void 0!==Ar&&(this.segment=Ar)}clone(){return new Hc(this.x,this.y,this.angle,this.segment)}}function Yc(u,Xe,fr,Ar,_r){if(void 0===Xe.segment||0===fr)return!0;let wr=Xe,Kr=Xe.segment+1,In=0;for(;In>-fr/2;){if(Kr--,Kr<0)return!1;In-=u[Kr].dist(wr),wr=u[Kr]}In+=u[Kr].dist(u[Kr+1]),Kr++;const io=[];let no=0;for(;In<fr/2;){const Xe=u[Kr],fr=u[Kr+1];if(!fr)return!1;let wr=u[Kr-1].angleTo(Xe)-Xe.angleTo(fr);for(wr=Math.abs((wr+3*Math.PI)%(2*Math.PI)-Math.PI),io.push({distance:In,angleDelta:wr}),no+=wr;In-io[0].distance>Ar;)no-=io.shift().angleDelta;if(no>_r)return!1;Kr++,In+=Xe.dist(fr)}return!0}function Jc(u){let Xe=0;for(let fr=0;fr<u.length-1;fr++)Xe+=u[fr].dist(u[fr+1]);return Xe}function Wc(u,Xe,fr){return u?.6*Xe*fr:0}function Qc(u,Xe){return Math.max(u?u.right-u.left:0,Xe?Xe.right-Xe.left:0)}function th(u,Xe,fr,Ar,_r,wr){const Kr=Wc(fr,_r,wr),In=Qc(fr,Ar)*wr;let io=0;const no=Jc(u)/2;for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1],wr=Ar.dist(_r);if(io+wr>no){const oo=(no-io)/wr,so=Kl.number(Ar.x,_r.x,oo),ao=Kl.number(Ar.y,_r.y,oo),co=new Hc(so,ao,_r.angleTo(Ar),fr);return co._round(),!Kr||Yc(u,co,In,Kr,Xe)?co:void 0}io+=wr}}function eh(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=Wc(Ar,wr,Kr),oo=Qc(Ar,_r),so=oo*Kr,ao=0===u[0].x||u[0].x===io||0===u[0].y||u[0].y===io;return Xe-so<Xe/4&&(Xe=so+Xe/4),rh(u,ao?Xe/2*In%Xe:(oo/2+2*wr)*Kr*In%Xe,Xe,no,fr,so,ao,!1,io)}function rh(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=wr/2,oo=Jc(u);let so=0,ao=Xe-fr,co=[];for(let Xe=0;Xe<u.length-1;Xe++){const Kr=u[Xe],In=u[Xe+1],go=Kr.dist(In),ho=In.angleTo(Kr);for(;ao+fr<so+go;){ao+=fr;const Co=(ao-so)/go,Io=Kl.number(Kr.x,In.x,Co),xo=Kl.number(Kr.y,In.y,Co);if(Io>=0&&Io<io&&xo>=0&&xo<io&&ao-no>=0&&ao+no<=oo){const fr=new Hc(Io,xo,ho,Xe);fr._round(),Ar&&!Yc(u,fr,wr,Ar,_r)||co.push(fr)}}so+=go}return In||co.length||Kr||(co=rh(u,so/2,fr,Ar,_r,wr,Kr,!0,io)),co}wi("Anchor",Hc);const Eu=Dh;function ih(u,Xe,Ar,_r){const wr=[],Kr=u.image,In=Kr.pixelRatio,io=Kr.paddedRect.w-2*Eu,no=Kr.paddedRect.h-2*Eu;let oo={x1:u.left,y1:u.top,x2:u.right,y2:u.bottom};const so=Kr.stretchX||[[0,io]],ao=Kr.stretchY||[[0,no]],f=(u,Xe)=>u+Xe[1]-Xe[0],co=so.reduce(f,0),go=ao.reduce(f,0),ho=io-co,Co=no-go;let Io=0,xo=co,Mo=0,Po=go,ss=0,sa=ho,aa=0,fa=Co;if(Kr.content&&_r){const Xe=Kr.content,fr=Xe[2]-Xe[0],Ar=Xe[3]-Xe[1];(Kr.textFitWidth||Kr.textFitHeight)&&(oo=Qu(u)),Io=sh(so,0,Xe[0]),Mo=sh(ao,0,Xe[1]),xo=sh(so,Xe[0],Xe[2]),Po=sh(ao,Xe[1],Xe[3]),ss=Xe[0]-Io,aa=Xe[1]-Mo,sa=fr-xo,fa=Ar-Po}const ya=oo.x1,ol=oo.y1,sl=oo.x2-ya,al=oo.y2-ol,C=(u,_r,wr,io)=>{const no=oh(u.stretch-Io,xo,sl,ya),oo=lh(u.fixed-ss,sa,u.stretch,co),so=oh(_r.stretch-Mo,Po,al,ol),ao=lh(_r.fixed-aa,fa,_r.stretch,go),ho=oh(wr.stretch-Io,xo,sl,ya),Co=lh(wr.fixed-ss,sa,wr.stretch,co),cl=oh(io.stretch-Mo,Po,al,ol),hl=lh(io.fixed-aa,fa,io.stretch,go),ul=new fr(no,so),dl=new fr(ho,so),pl=new fr(ho,cl),Cl=new fr(no,cl),fl=new fr(oo/In,ao/In),_l=new fr(Co/In,hl/In),vl=Xe*Math.PI/180;if(vl){const u=Math.sin(vl),Xe=Math.cos(vl),fr=[Xe,-u,u,Xe];ul._matMult(fr),dl._matMult(fr),Cl._matMult(fr),pl._matMult(fr)}const xl=u.stretch+u.fixed,Sl=_r.stretch+_r.fixed;return{tl:ul,tr:dl,bl:Cl,br:pl,tex:{x:Kr.paddedRect.x+Eu+xl,y:Kr.paddedRect.y+Eu+Sl,w:wr.stretch+wr.fixed-xl,h:io.stretch+io.fixed-Sl},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:fl,pixelOffsetBR:_l,minFontScaleX:sa/In/sl,minFontScaleY:fa/In/al,isSDF:Ar}};if(_r&&(Kr.stretchX||Kr.stretchY)){const u=ah(so,ho,co),Xe=ah(ao,Co,go);for(let fr=0;fr<u.length-1;fr++){const Ar=u[fr],_r=u[fr+1];for(let u=0;u<Xe.length-1;u++)wr.push(C(Ar,Xe[u],_r,Xe[u+1]))}}else wr.push(C({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:io+1},{fixed:0,stretch:no+1}));return wr}function sh(u,Xe,fr){let Ar=0;for(const _r of u)Ar+=Math.max(Xe,Math.min(fr,_r[1]))-Math.max(Xe,Math.min(fr,_r[0]));return Ar}function ah(u,Xe,fr){const Ar=[{fixed:-Eu,stretch:0}];for(const[Xe,fr]of u){const u=Ar[Ar.length-1];Ar.push({fixed:Xe-u.stretch,stretch:u.stretch}),Ar.push({fixed:Xe-u.stretch,stretch:u.stretch+(fr-Xe)})}return Ar.push({fixed:Xe+Eu,stretch:fr}),Ar}function oh(u,Xe,fr,Ar){return u/Xe*fr+Ar}function lh(u,Xe,fr,Ar){return u-Xe*fr/Ar}class uh{constructor(u,Xe,Ar,_r,wr,Kr,In,io,no,oo){var so;if(this.boxStartIndex=u.length,no){let u=Kr.top,Xe=Kr.bottom;const fr=Kr.collisionPadding;fr&&(u-=fr[1],Xe+=fr[3]);let Ar=Xe-u;Ar>0&&(Ar=Math.max(10,Ar),this.circleDiameter=Ar)}else{const no=(null===(so=Kr.image)||void 0===so?void 0:so.content)&&(Kr.image.textFitWidth||Kr.image.textFitHeight)?Qu(Kr):{x1:Kr.left,y1:Kr.top,x2:Kr.right,y2:Kr.bottom};no.y1=no.y1*In-io[0],no.y2=no.y2*In+io[2],no.x1=no.x1*In-io[3],no.x2=no.x2*In+io[1];const ao=Kr.collisionPadding;if(ao&&(no.x1-=ao[0]*In,no.y1-=ao[1]*In,no.x2+=ao[2]*In,no.y2+=ao[3]*In),oo){const u=new fr(no.x1,no.y1),Xe=new fr(no.x2,no.y1),Ar=new fr(no.x1,no.y2),_r=new fr(no.x2,no.y2),wr=oo*Math.PI/180;u._rotate(wr),Xe._rotate(wr),Ar._rotate(wr),_r._rotate(wr),no.x1=Math.min(u.x,Xe.x,Ar.x,_r.x),no.x2=Math.max(u.x,Xe.x,Ar.x,_r.x),no.y1=Math.min(u.y,Xe.y,Ar.y,_r.y),no.y2=Math.max(u.y,Xe.y,Ar.y,_r.y)}u.emplaceBack(Xe.x,Xe.y,no.x1,no.y1,no.x2,no.y2,Ar,_r,wr)}this.boxEndIndex=u.length}}class ch{constructor(u=[],Xe=(u,Xe)=>u<Xe?-1:u>Xe?1:0){if(this.data=u,this.length=this.data.length,this.compare=Xe,this.length>0)for(let u=(this.length>>1)-1;u>=0;u--)this._down(u)}push(u){this.data.push(u),this._up(this.length++)}pop(){if(0===this.length)return;const u=this.data[0],Xe=this.data.pop();return--this.length>0&&(this.data[0]=Xe,this._down(0)),u}peek(){return this.data[0]}_up(u){const{data:Xe,compare:fr}=this,Ar=Xe[u];for(;u>0;){const _r=u-1>>1,wr=Xe[_r];if(fr(Ar,wr)>=0)break;Xe[u]=wr,u=_r}Xe[u]=Ar}_down(u){const{data:Xe,compare:fr}=this,Ar=this.length>>1,_r=Xe[u];for(;u<Ar;){let Ar=1+(u<<1);const wr=Ar+1;if(wr<this.length&&fr(Xe[wr],Xe[Ar])<0&&(Ar=wr),fr(Xe[Ar],_r)>=0)break;Xe[u]=Xe[Ar],u=Ar}Xe[u]=_r}}function hh(u,Xe=1,Ar=!1){let _r=1/0,wr=1/0,Kr=-1/0,In=-1/0;const io=u[0];for(let u=0;u<io.length;u++){const Xe=io[u];(!u||Xe.x<_r)&&(_r=Xe.x),(!u||Xe.y<wr)&&(wr=Xe.y),(!u||Xe.x>Kr)&&(Kr=Xe.x),(!u||Xe.y>In)&&(In=Xe.y)}const no=Math.min(Kr-_r,In-wr);let oo=no/2;const so=new ch([],ph);if(0===no)return new fr(_r,wr);for(let Xe=_r;Xe<Kr;Xe+=no)for(let fr=wr;fr<In;fr+=no)so.push(new fh(Xe+oo,fr+oo,oo,u));let ao=function(u){let Xe=0,fr=0,Ar=0;const _r=u[0];for(let u=0,wr=_r.length,Kr=wr-1;u<wr;Kr=u++){const wr=_r[u],In=_r[Kr],io=wr.x*In.y-In.x*wr.y;fr+=(wr.x+In.x)*io,Ar+=(wr.y+In.y)*io,Xe+=3*io}return new fh(fr/Xe,Ar/Xe,0,u)}(u),co=so.length;for(;so.length;){const fr=so.pop();(fr.d>ao.d||!ao.d)&&(ao=fr,Ar&&console.log("found best %d after %d probes",Math.round(1e4*fr.d)/1e4,co)),fr.max-ao.d<=Xe||(oo=fr.h/2,so.push(new fh(fr.p.x-oo,fr.p.y-oo,oo,u)),so.push(new fh(fr.p.x+oo,fr.p.y-oo,oo,u)),so.push(new fh(fr.p.x-oo,fr.p.y+oo,oo,u)),so.push(new fh(fr.p.x+oo,fr.p.y+oo,oo,u)),co+=4)}return Ar&&(console.log(`num probes: ${co}`),console.log(`best distance: ${ao.d}`)),ao.p}function ph(u,Xe){return Xe.max-u.max}function fh(u,Xe,Ar,_r){this.p=new fr(u,Xe),this.h=Ar,this.d=function(u,Xe){let fr=!1,Ar=1/0;for(let _r=0;_r<Xe.length;_r++){const wr=Xe[_r];for(let Xe=0,_r=wr.length,Kr=_r-1;Xe<_r;Kr=Xe++){const _r=wr[Xe],In=wr[Kr];_r.y>u.y!=In.y>u.y&&u.x<(In.x-_r.x)*(u.y-_r.y)/(In.y-_r.y)+_r.x&&(fr=!fr),Ar=Math.min(Ar,Ya(u,_r,In))}}return(fr?1:-1)*Math.sqrt(Ar)}(this.p,_r),this.max=this.d+this.h*Math.SQRT2}var Lu;u.aq=void 0,(Lu=u.aq||(u.aq={}))[Lu.center=1]="center",Lu[Lu.left=2]="left",Lu[Lu.right=3]="right",Lu[Lu.top=4]="top",Lu[Lu.bottom=5]="bottom",Lu[Lu["top-left"]=6]="top-left",Lu[Lu["top-right"]=7]="top-right",Lu[Lu["bottom-left"]=8]="bottom-left",Lu[Lu["bottom-right"]=9]="bottom-right";const Uu=7,qu=Number.POSITIVE_INFINITY;function gh(u,Xe){return Xe[1]!==qu?function(u,Xe,fr){let Ar=0,_r=0;switch(Xe=Math.abs(Xe),fr=Math.abs(fr),u){case"top-right":case"top-left":case"top":_r=fr-Uu;break;case"bottom-right":case"bottom-left":case"bottom":_r=-fr+Uu}switch(u){case"top-right":case"bottom-right":case"right":Ar=-Xe;break;case"top-left":case"bottom-left":case"left":Ar=Xe}return[Ar,_r]}(u,Xe[0],Xe[1]):function(u,Xe){let fr=0,Ar=0;Xe<0&&(Xe=0);const _r=Xe/Math.SQRT2;switch(u){case"top-right":case"top-left":Ar=_r-Uu;break;case"bottom-right":case"bottom-left":Ar=-_r+Uu;break;case"bottom":Ar=-Xe+Uu;break;case"top":Ar=Xe-Uu}switch(u){case"top-right":case"bottom-right":fr=-_r;break;case"top-left":case"bottom-left":fr=_r;break;case"left":fr=Xe;break;case"right":fr=-Xe}return[fr,Ar]}(u,Xe[0])}function xh(u,Xe,fr){var Ar;const _r=u.layout,wr=null===(Ar=_r.get("text-variable-anchor-offset"))||void 0===Ar?void 0:Ar.evaluate(Xe,{},fr);if(wr){const u=wr.values,Xe=[];for(let fr=0;fr<u.length;fr+=2){const Ar=Xe[fr]=u[fr],_r=u[fr+1].map((u=>u*Th));Ar.startsWith("top")?_r[1]-=Uu:Ar.startsWith("bottom")&&(_r[1]+=Uu),Xe[fr+1]=_r}return new Qt(Xe)}const Kr=_r.get("text-variable-anchor");if(Kr){let Ar;Ar=void 0!==u._unevaluatedLayout.getValue("text-radial-offset")?[_r.get("text-radial-offset").evaluate(Xe,{},fr)*Th,qu]:_r.get("text-offset").evaluate(Xe,{},fr).map((u=>u*Th));const wr=[];for(const u of Kr)wr.push(u,gh(u,Ar));return new Qt(wr)}return null}function vh(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function bh(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so){let ao=Kr.textMaxSize.evaluate(fr,{});void 0===ao&&(ao=In);const co=Xe.layers[0].layout,go=co.get("icon-offset").evaluate(fr,{},so),ho=_h(Ar.horizontal),Co=In/24,Io=Xe.tilePixelRatio*Co,xo=Xe.tilePixelRatio*ao/24,Mo=Xe.tilePixelRatio*io,Po=Xe.tilePixelRatio*co.get("symbol-spacing"),ss=co.get("text-padding")*Xe.tilePixelRatio,sa=function(u,Xe,fr,Ar=1){const _r=u.get("icon-padding").evaluate(Xe,{},fr),wr=_r&&_r.values;return[wr[0]*Ar,wr[1]*Ar,wr[2]*Ar,wr[3]*Ar]}(co,fr,so,Xe.tilePixelRatio),aa=co.get("text-max-angle")/180*Math.PI,fa="viewport"!==co.get("text-rotation-alignment")&&"point"!==co.get("symbol-placement"),ya="map"===co.get("icon-rotation-alignment")&&"point"!==co.get("symbol-placement"),ol=co.get("symbol-placement"),sl=Po/2,al=co.get("icon-text-fit");let cl;_r&&"none"!==al&&(Xe.allowVerticalPlacement&&Ar.vertical&&(cl=tc(_r,Ar.vertical,al,co.get("icon-text-fit-padding"),go,Co)),ho&&(_r=tc(_r,ho,al,co.get("icon-text-fit-padding"),go,Co)));const B=(io,ao)=>{ao.x<0||ao.x>=Cg||ao.y<0||ao.y>=Cg||function(Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo,Po,ss,sa,aa,fa,ya){const ol=Xe.addToLineVertexArray(fr,Ar);let sl,al,cl,hl,ul=0,dl=0,pl=0,Cl=0,fl=-1,_l=-1;const vl={};let xl=pg("");if(Xe.allowVerticalPlacement&&_r.vertical){const u=io.layout.get("text-rotate").evaluate(ss,{},fa)+90;cl=new uh(no,fr,oo,so,ao,_r.vertical,co,go,ho,u),In&&(hl=new uh(no,fr,oo,so,ao,In,Io,xo,ho,u))}if(wr){const Ar=io.layout.get("icon-rotate").evaluate(ss,{}),_r="none"!==io.layout.get("icon-text-fit"),Kr=ih(wr,Ar,aa,_r),co=In?ih(In,Ar,aa,_r):void 0;al=new uh(no,fr,oo,so,ao,wr,Io,xo,!1,Ar),ul=4*Kr.length;const go=Xe.iconSizeData;let ho=null;"source"===go.kind?(ho=[qh*io.layout.get("icon-size").evaluate(ss,{})],ho[0]>$h&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Qh}. Reduce your "icon-size".`)):"composite"===go.kind&&(ho=[qh*sa.compositeIconSizes[0].evaluate(ss,{},fa),qh*sa.compositeIconSizes[1].evaluate(ss,{},fa)],(ho[0]>$h||ho[1]>$h)&&A(`${Xe.layerIds[0]}: Value for "icon-size" is >= ${Qh}. Reduce your "icon-size".`)),Xe.addSymbols(Xe.icon,Kr,ho,Po,Mo,ss,u.ah.none,fr,ol.lineStartIndex,ol.lineLength,-1,fa),fl=Xe.icon.placedSymbolArray.length-1,co&&(dl=4*co.length,Xe.addSymbols(Xe.icon,co,ho,Po,Mo,ss,u.ah.vertical,fr,ol.lineStartIndex,ol.lineLength,-1,fa),_l=Xe.icon.placedSymbolArray.length-1)}const Sl=Object.keys(_r.horizontal);for(const Ar of Sl){const wr=_r.horizontal[Ar];if(!sl){xl=pg(wr.text);const u=io.layout.get("text-rotate").evaluate(ss,{},fa);sl=new uh(no,fr,oo,so,ao,wr,co,go,ho,u)}const In=1===wr.positionedLines.length;if(pl+=wh(Xe,fr,wr,Kr,io,ho,ss,Co,ol,_r.vertical?u.ah.horizontal:u.ah.horizontalOnly,In?Sl:[Ar],vl,fl,sa,fa),In)break}_r.vertical&&(Cl+=wh(Xe,fr,_r.vertical,Kr,io,ho,ss,Co,ol,u.ah.vertical,["vertical"],vl,_l,sa,fa));const kl=sl?sl.boxStartIndex:Xe.collisionBoxArray.length,Bl=sl?sl.boxEndIndex:Xe.collisionBoxArray.length,Zl=cl?cl.boxStartIndex:Xe.collisionBoxArray.length,Rl=cl?cl.boxEndIndex:Xe.collisionBoxArray.length,Wl=al?al.boxStartIndex:Xe.collisionBoxArray.length,Tl=al?al.boxEndIndex:Xe.collisionBoxArray.length,Jl=hl?hl.boxStartIndex:Xe.collisionBoxArray.length,Kl=hl?hl.boxEndIndex:Xe.collisionBoxArray.length;let Ll=-1;const Y=(u,Xe)=>u&&u.circleDiameter?Math.max(u.circleDiameter,Xe):Xe;Ll=Y(sl,Ll),Ll=Y(cl,Ll),Ll=Y(al,Ll),Ll=Y(hl,Ll);const Dl=Ll>-1?1:0;Dl&&(Ll*=ya/Th),Xe.glyphOffsetArray.length>=fc.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==ss.sortKey&&Xe.addToSortKeyRanges(Xe.symbolInstances.length,ss.sortKey);const Yl=xh(io,ss,fa),[Nl,Ol]=function(Xe,fr){const Ar=Xe.length,_r=null==fr?void 0:fr.values;if((null==_r?void 0:_r.length)>0)for(let fr=0;fr<_r.length;fr+=2){const Ar=_r[fr+1];Xe.emplaceBack(u.aq[_r[fr]],Ar[0],Ar[1])}return[Ar,Xe.length]}(Xe.textAnchorOffsets,Yl);Xe.symbolInstances.emplaceBack(fr.x,fr.y,vl.right>=0?vl.right:-1,vl.center>=0?vl.center:-1,vl.left>=0?vl.left:-1,vl.vertical||-1,fl,_l,xl,kl,Bl,Zl,Rl,Wl,Tl,Jl,Kl,oo,pl,Cl,ul,dl,Dl,0,co,Ll,Nl,Ol)}(Xe,ao,io,Ar,_r,wr,cl,Xe.layers[0],Xe.collisionBoxArray,fr.index,fr.sourceLayerIndex,Xe.index,Io,[ss,ss,ss,ss],fa,no,Mo,sa,ya,go,fr,Kr,oo,so,In)};if("line"===ol)for(const u of Xc(fr.geometry,0,0,Cg,Cg)){const fr=eh(u,Po,aa,Ar.vertical||ho,_r,24,xo,Xe.overscaling,Cg);for(const Ar of fr)ho&&Ah(Xe,ho.text,sl,Ar)||B(u,Ar)}else if("line-center"===ol){for(const u of fr.geometry)if(u.length>1){const Xe=th(u,aa,Ar.vertical||ho,_r,24,xo);Xe&&B(u,Xe)}}else if("Polygon"===fr.type)for(const u of xr(fr.geometry,0)){const Xe=hh(u,16);B(u[0],new Hc(Xe.x,Xe.y,0))}else if("LineString"===fr.type)for(const u of fr.geometry)B(u,new Hc(u[0].x,u[0].y,0));else if("Point"===fr.type)for(const u of fr.geometry)for(const Xe of u)B([Xe],new Hc(Xe.x,Xe.y,0))}function wh(u,Xe,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=function(u,Xe,Ar,_r,wr,Kr,In,io){const no=_r.layout.get("text-rotate").evaluate(Kr,{})*Math.PI/180,oo=[];for(const u of Xe.positionedLines)for(const _r of u.positionedGlyphs){if(!_r.rect)continue;const Kr=_r.rect||{};let so=Lh+1,ao=!0,co=1,go=0;const ho=(wr||io)&&_r.vertical,Co=_r.metrics.advance*_r.scale/2;if(io&&Xe.verticalizable&&(go=u.lineOffset/2-(_r.imageName?-(Th-_r.metrics.width*_r.scale)/2:(_r.scale-1)*Th)),_r.imageName){const u=In[_r.imageName];ao=u.sdf,co=u.pixelRatio,so=Dh/co}const Io=wr?[_r.x+Co,_r.y]:[0,0];let xo=wr?[0,0]:[_r.x+Co+Ar[0],_r.y+Ar[1]-go],Mo=[0,0];ho&&(Mo=xo,xo=[0,0]);const Po=_r.metrics.isDoubleResolution?2:1,ss=(_r.metrics.left-so)*_r.scale-Co+xo[0],sa=(-_r.metrics.top-so)*_r.scale+xo[1],aa=ss+Kr.w/Po*_r.scale/co,fa=sa+Kr.h/Po*_r.scale/co,ya=new fr(ss,sa),ol=new fr(aa,sa),sl=new fr(ss,fa),al=new fr(aa,fa);if(ho){const u=new fr(-Co,Co-Nh),Xe=-Math.PI/2,Ar=Th/2-Co,wr=new fr(5-Nh-Ar,-(_r.imageName?Ar:0)),Kr=new fr(...Mo);ya._rotateAround(Xe,u)._add(wr)._add(Kr),ol._rotateAround(Xe,u)._add(wr)._add(Kr),sl._rotateAround(Xe,u)._add(wr)._add(Kr),al._rotateAround(Xe,u)._add(wr)._add(Kr)}if(no){const u=Math.sin(no),Xe=Math.cos(no),fr=[Xe,-u,u,Xe];ya._matMult(fr),ol._matMult(fr),sl._matMult(fr),al._matMult(fr)}const cl=new fr(0,0),hl=new fr(0,0);oo.push({tl:ya,tr:ol,bl:sl,br:al,tex:Kr,writingMode:Xe.writingMode,glyphOffset:Io,sectionIndex:_r.sectionIndex,isSDF:ao,pixelOffsetTL:cl,pixelOffsetBR:hl,minFontScaleX:0,minFontScaleY:0})}return oo}(0,Ar,io,wr,Kr,In,_r,u.allowVerticalPlacement),Io=u.textSizeData;let xo=null;"source"===Io.kind?(xo=[qh*wr.layout.get("text-size").evaluate(In,{})],xo[0]>$h&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Qh}. Reduce your "text-size".`)):"composite"===Io.kind&&(xo=[qh*go.compositeTextSizes[0].evaluate(In,{},ho),qh*go.compositeTextSizes[1].evaluate(In,{},ho)],(xo[0]>$h||xo[1]>$h)&&A(`${u.layerIds[0]}: Value for "text-size" is >= ${Qh}. Reduce your "text-size".`)),u.addSymbols(u.text,Co,xo,io,Kr,In,oo,Xe,no.lineStartIndex,no.lineLength,co,ho);for(const Xe of so)ao[Xe]=u.text.placedSymbolArray.length-1;return 4*Co.length}function _h(u){for(const Xe in u)return u[Xe];return null}function Ah(u,Xe,fr,Ar){const _r=u.compareText;if(Xe in _r){const u=_r[Xe];for(let Xe=u.length-1;Xe>=0;Xe--)if(Ar.dist(u[Xe])<fr)return!0}else _r[Xe]=[];return _r[Xe].push(Ar),!1}const $u=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class kh{static from(u){if(!(u instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[Xe,fr]=new Uint8Array(u,0,2);if(219!==Xe)throw new Error("Data does not appear to be in a KDBush format.");const Ar=fr>>4;if(1!==Ar)throw new Error(`Got v${Ar} data when expected v1.`);const _r=$u[15&fr];if(!_r)throw new Error("Unrecognized array type.");const[wr]=new Uint16Array(u,2,1),[Kr]=new Uint32Array(u,4,1);return new kh(Kr,wr,_r,u)}constructor(u,Xe=64,fr=Float64Array,Ar){if(isNaN(u)||u<0)throw new Error(`Unpexpected numItems value: ${u}.`);this.numItems=+u,this.nodeSize=Math.min(Math.max(+Xe,2),65535),this.ArrayType=fr,this.IndexArrayType=u<65536?Uint16Array:Uint32Array;const _r=$u.indexOf(this.ArrayType),wr=2*u*this.ArrayType.BYTES_PER_ELEMENT,Kr=u*this.IndexArrayType.BYTES_PER_ELEMENT,In=(8-Kr%8)%8;if(_r<0)throw new Error(`Unexpected typed array class: ${fr}.`);Ar&&Ar instanceof ArrayBuffer?(this.data=Ar,this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Kr+In,2*u),this._pos=2*u,this._finished=!0):(this.data=new ArrayBuffer(8+wr+Kr+In),this.ids=new this.IndexArrayType(this.data,8,u),this.coords=new this.ArrayType(this.data,8+Kr+In,2*u),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+_r]),new Uint16Array(this.data,2,1)[0]=Xe,new Uint32Array(this.data,4,1)[0]=u)}add(u,Xe){const fr=this._pos>>1;return this.ids[fr]=fr,this.coords[this._pos++]=u,this.coords[this._pos++]=Xe,fr}finish(){const u=this._pos>>1;if(u!==this.numItems)throw new Error(`Added ${u} items when expected ${this.numItems}.`);return Mh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(u,Xe,fr,Ar){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_r,coords:wr,nodeSize:Kr}=this,In=[0,_r.length-1,0],io=[];for(;In.length;){const no=In.pop()||0,oo=In.pop()||0,so=In.pop()||0;if(oo-so<=Kr){for(let Kr=so;Kr<=oo;Kr++){const In=wr[2*Kr],no=wr[2*Kr+1];In>=u&&In<=fr&&no>=Xe&&no<=Ar&&io.push(_r[Kr])}continue}const ao=so+oo>>1,co=wr[2*ao],go=wr[2*ao+1];co>=u&&co<=fr&&go>=Xe&&go<=Ar&&io.push(_r[ao]),(0===no?u<=co:Xe<=go)&&(In.push(so),In.push(ao-1),In.push(1-no)),(0===no?fr>=co:Ar>=go)&&(In.push(ao+1),In.push(oo),In.push(1-no))}return io}within(u,Xe,fr){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Ar,coords:_r,nodeSize:wr}=this,Kr=[0,Ar.length-1,0],In=[],io=fr*fr;for(;Kr.length;){const no=Kr.pop()||0,oo=Kr.pop()||0,so=Kr.pop()||0;if(oo-so<=wr){for(let fr=so;fr<=oo;fr++)Ch(_r[2*fr],_r[2*fr+1],u,Xe)<=io&&In.push(Ar[fr]);continue}const ao=so+oo>>1,co=_r[2*ao],go=_r[2*ao+1];Ch(co,go,u,Xe)<=io&&In.push(Ar[ao]),(0===no?u-fr<=co:Xe-fr<=go)&&(Kr.push(so),Kr.push(ao-1),Kr.push(1-no)),(0===no?u+fr>=co:Xe+fr>=go)&&(Kr.push(ao+1),Kr.push(oo),Kr.push(1-no))}return In}}function Mh(u,Xe,fr,Ar,_r,wr){if(_r-Ar<=fr)return;const Kr=Ar+_r>>1;Ih(u,Xe,Kr,Ar,_r,wr),Mh(u,Xe,fr,Ar,Kr-1,1-wr),Mh(u,Xe,fr,Kr+1,_r,1-wr)}function Ih(u,Xe,fr,Ar,_r,wr){for(;_r>Ar;){if(_r-Ar>600){const Kr=_r-Ar+1,In=fr-Ar+1,io=Math.log(Kr),no=.5*Math.exp(2*io/3),oo=.5*Math.sqrt(io*no*(Kr-no)/Kr)*(In-Kr/2<0?-1:1);Ih(u,Xe,fr,Math.max(Ar,Math.floor(fr-In*no/Kr+oo)),Math.min(_r,Math.floor(fr+(Kr-In)*no/Kr+oo)),wr)}const Kr=Xe[2*fr+wr];let In=Ar,io=_r;for(zh(u,Xe,Ar,fr),Xe[2*_r+wr]>Kr&&zh(u,Xe,Ar,_r);In<io;){for(zh(u,Xe,In,io),In++,io--;Xe[2*In+wr]<Kr;)In++;for(;Xe[2*io+wr]>Kr;)io--}Xe[2*Ar+wr]===Kr?zh(u,Xe,Ar,io):(io++,zh(u,Xe,io,_r)),io<=fr&&(Ar=io+1),fr<=io&&(_r=io-1)}}function zh(u,Xe,fr,Ar){Ph(u,fr,Ar),Ph(Xe,2*fr,2*Ar),Ph(Xe,2*fr+1,2*Ar+1)}function Ph(u,Xe,fr){const Ar=u[Xe];u[Xe]=u[fr],u[fr]=Ar}function Ch(u,Xe,fr,Ar){const _r=u-fr,wr=Xe-Ar;return _r*_r+wr*wr}var td;u.bf=void 0,(td=u.bf||(u.bf={})).create="create",td.load="load",td.fullLoad="fullLoad";let ed=null,id=[];const rd=1e3/60,nd="loadTime",od="fullLoadTime",sd={mark(u){performance.mark(u)},frame(u){const Xe=u;null!=ed&&id.push(Xe-ed),ed=Xe},clearMetrics(){ed=null,id=[],performance.clearMeasures(nd),performance.clearMeasures(od);for(const Xe in u.bf)performance.clearMarks(u.bf[Xe])},getPerformanceMetrics(){performance.measure(nd,u.bf.create,u.bf.load),performance.measure(od,u.bf.create,u.bf.fullLoad);const Xe=performance.getEntriesByName(nd)[0].duration,fr=performance.getEntriesByName(od)[0].duration,Ar=id.length,_r=1/(id.reduce(((u,Xe)=>u+Xe),0)/Ar/1e3),wr=id.filter((u=>u>rd)).reduce(((u,Xe)=>u+(Xe-rd)/rd),0);return{loadTime:Xe,fullLoadTime:fr,fps:_r,percentDroppedFrames:wr/(Ar+wr)*100,totalFrames:Ar}}};u.$=class extends ps{},u.A=vg,u.B=yc,u.C=function(u){if(null==oo){const Xe=u.navigator?u.navigator.userAgent:null;oo=!!u.safari||!(!Xe||!(/\b(iPad|iPhone|iPod)\b/.test(Xe)||Xe.match("Safari")&&!Xe.match("Chrome")))}return oo},u.D=Ji,u.E=Z,u.F=class{constructor(u,Xe){this.target=u,this.mapId=Xe,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Mc((()=>this.process())),this.subscription=function(u,Xe,fr){return u.addEventListener(Xe,fr,!1),{unsubscribe:()=>{u.removeEventListener(Xe,fr,!1)}}}(this.target,"message",(u=>this.receive(u))),this.globalScope=k(self)?u:window}registerMessageHandler(u,Xe){this.messageHandlers[u]=Xe}sendAsync(u,Xe){return new Promise(((fr,Ar)=>{const _r=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_r]={resolve:fr,reject:Ar},Xe&&Xe.signal.addEventListener("abort",(()=>{delete this.resolveRejects[_r];const Xe={id:_r,type:"<cancel>",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Xe)}),{once:!0});const wr=[],Kr=Object.assign(Object.assign({},u),{id:_r,sourceMapId:this.mapId,origin:location.origin,data:ki(u.data,wr)});this.target.postMessage(Kr,{transfer:wr})}))}receive(u){const Xe=u.data,fr=Xe.id;if(!("file://"!==Xe.origin&&"file://"!==location.origin&&"resource://android"!==Xe.origin&&"resource://android"!==location.origin&&Xe.origin!==location.origin||Xe.targetMapId&&this.mapId!==Xe.targetMapId)){if("<cancel>"===Xe.type){delete this.tasks[fr];const u=this.abortControllers[fr];return delete this.abortControllers[fr],void(u&&u.abort())}if(k(self)||Xe.mustQueue)return this.tasks[fr]=Xe,this.taskQueue.push(fr),void this.invoker.trigger();this.processTask(fr,Xe)}}process(){if(0===this.taskQueue.length)return;const u=this.taskQueue.shift(),Xe=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),Xe&&this.processTask(u,Xe)}processTask(u,Xe){return e(this,void 0,void 0,(function*(){if("<response>"===Xe.type){const fr=this.resolveRejects[u];if(delete this.resolveRejects[u],!fr)return;return void(Xe.error?fr.reject(Mi(Xe.error)):fr.resolve(Mi(Xe.data)))}if(!this.messageHandlers[Xe.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${Xe.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const fr=Mi(Xe.data),Ar=new AbortController;this.abortControllers[u]=Ar;try{const _r=yield this.messageHandlers[Xe.type](Xe.sourceMapId,fr,Ar);this.completeTask(u,null,_r)}catch(fr){this.completeTask(u,fr)}}))}completeTask(u,Xe,fr){const Ar=[];delete this.abortControllers[u];const _r={id:u,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:Xe?ki(Xe):null,data:ki(fr,Ar)};this.target.postMessage(_r,{transfer:Ar})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},u.G=Co,u.H=function(){var u=new vg(16);return vg!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},u.I=Fu,u.J=function(u,Xe,fr){var Ar,_r,wr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Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[4]=Xe[4],u[5]=Xe[5],u[6]=Xe[6],u[7]=Xe[7],u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15],u},u.a0=oa,u.a1=Lc,u.a2=it,u.a3=u=>{const Xe=window.document.createElement("video");return Xe.muted=!0,new Promise((fr=>{Xe.onloadstart=()=>{fr(Xe)};for(const fr of u){const u=window.document.createElement("source");j(fr)||(Xe.crossOrigin="Anonymous"),u.src=fr,Xe.appendChild(u)}}))},u.a4=function(){return io++},u.a5=Fs,u.a6=fc,u.a7=zn,u.a8=ja,u.a9=qc,u.aA=function(u){if("custom"===u.type)return new kc(u);switch(u.type){case"background":return new wc(u);case"circle":return new fo(u);case"fill":return new ll(u);case"fill-extrusion":return new Vl(u);case"heatmap":return new ko(u);case"hillshade":return new zo(u);case"line":return new Xl(u);case"raster":return new Sc(u);case"symbol":return new xc(u)}},u.aB=w,u.aC=function(u,Xe){if(!u)return[{command:"setStyle",args:[Xe]}];let fr=[];try{if(!H(u.version,Xe.version))return[{command:"setStyle",args:[Xe]}];H(u.center,Xe.center)||fr.push({command:"setCenter",args:[Xe.center]}),H(u.zoom,Xe.zoom)||fr.push({command:"setZoom",args:[Xe.zoom]}),H(u.bearing,Xe.bearing)||fr.push({command:"setBearing",args:[Xe.bearing]}),H(u.pitch,Xe.pitch)||fr.push({command:"setPitch",args:[Xe.pitch]}),H(u.sprite,Xe.sprite)||fr.push({command:"setSprite",args:[Xe.sprite]}),H(u.glyphs,Xe.glyphs)||fr.push({command:"setGlyphs",args:[Xe.glyphs]}),H(u.transition,Xe.transition)||fr.push({command:"setTransition",args:[Xe.transition]}),H(u.light,Xe.light)||fr.push({command:"setLight",args:[Xe.light]}),H(u.terrain,Xe.terrain)||fr.push({command:"setTerrain",args:[Xe.terrain]}),H(u.sky,Xe.sky)||fr.push({command:"setSky",args:[Xe.sky]}),H(u.projection,Xe.projection)||fr.push({command:"setProjection",args:[Xe.projection]});const Ar={},_r=[];!function(u,Xe,fr,Ar){let _r;for(_r in Xe=Xe||{},u=u||{})Object.prototype.hasOwnProperty.call(u,_r)&&(Object.prototype.hasOwnProperty.call(Xe,_r)||W(_r,fr,Ar));for(_r in Xe)Object.prototype.hasOwnProperty.call(Xe,_r)&&(Object.prototype.hasOwnProperty.call(u,_r)?H(u[_r],Xe[_r])||("geojson"===u[_r].type&&"geojson"===Xe[_r].type&&tt(u,Xe,_r)?Y(fr,{command:"setGeoJSONSourceData",args:[_r,Xe[_r].data]}):Q(_r,Xe,fr,Ar)):J(_r,Xe,fr))}(u.sources,Xe.sources,_r,Ar);const wr=[];u.layers&&u.layers.forEach((u=>{"source"in u&&Ar[u.source]?fr.push({command:"removeLayer",args:[u.id]}):wr.push(u)})),fr=fr.concat(_r),function(u,Xe,fr){Xe=Xe||[];const Ar=(u=u||[]).map(rt),_r=Xe.map(rt),wr=u.reduce(nt,{}),Kr=Xe.reduce(nt,{}),In=Ar.slice(),io=Object.create(null);let no,oo,so,ao,co;for(let u=0,Xe=0;u<Ar.length;u++)no=Ar[u],Object.prototype.hasOwnProperty.call(Kr,no)?Xe++:(Y(fr,{command:"removeLayer",args:[no]}),In.splice(In.indexOf(no,Xe),1));for(let u=0,Xe=0;u<_r.length;u++)no=_r[_r.length-1-u],In[In.length-1-u]!==no&&(Object.prototype.hasOwnProperty.call(wr,no)?(Y(fr,{command:"removeLayer",args:[no]}),In.splice(In.lastIndexOf(no,In.length-Xe),1)):Xe++,ao=In[In.length-u],Y(fr,{command:"addLayer",args:[Kr[no],ao]}),In.splice(In.length-u,0,no),io[no]=!0);for(let u=0;u<_r.length;u++)if(no=_r[u],oo=wr[no],so=Kr[no],!io[no]&&!H(oo,so))if(H(oo.source,so.source)&&H(oo["source-layer"],so["source-layer"])&&H(oo.type,so.type)){for(co in et(oo.layout,so.layout,fr,no,null,"setLayoutProperty"),et(oo.paint,so.paint,fr,no,null,"setPaintProperty"),H(oo.filter,so.filter)||Y(fr,{command:"setFilter",args:[no,so.filter]}),H(oo.minzoom,so.minzoom)&&H(oo.maxzoom,so.maxzoom)||Y(fr,{command:"setLayerZoomRange",args:[no,so.minzoom,so.maxzoom]}),oo)Object.prototype.hasOwnProperty.call(oo,co)&&"layout"!==co&&"paint"!==co&&"filter"!==co&&"metadata"!==co&&"minzoom"!==co&&"maxzoom"!==co&&(0===co.indexOf("paint.")?et(oo[co],so[co],fr,no,co.slice(6),"setPaintProperty"):H(oo[co],so[co])||Y(fr,{command:"setLayerProperty",args:[no,co,so[co]]}));for(co in so)Object.prototype.hasOwnProperty.call(so,co)&&!Object.prototype.hasOwnProperty.call(oo,co)&&"layout"!==co&&"paint"!==co&&"filter"!==co&&"metadata"!==co&&"minzoom"!==co&&"maxzoom"!==co&&(0===co.indexOf("paint.")?et(oo[co],so[co],fr,no,co.slice(6),"setPaintProperty"):H(oo[co],so[co])||Y(fr,{command:"setLayerProperty",args:[no,co,so[co]]}))}else Y(fr,{command:"removeLayer",args:[no]}),ao=In[In.lastIndexOf(no)+1],Y(fr,{command:"addLayer",args:[so,ao]})}(wr,Xe.layers,fr)}catch(u){console.warn("Unable to compute style diff:",u),fr=[{command:"setStyle",args:[Xe]}]}return fr},u.aD=function(u){const Xe=[],fr=u.id;return void 0===fr&&Xe.push({message:`layers.${fr}: missing required property "id"`}),void 0===u.render&&Xe.push({message:`layers.${fr}: missing required method "render"`}),u.renderingMode&&"2d"!==u.renderingMode&&"3d"!==u.renderingMode&&Xe.push({message:`layers.${fr}: property "renderingMode" must be either "2d" or "3d"`}),Xe},u.aE=function t(u,Xe){if(Array.isArray(u)){if(!Array.isArray(Xe)||u.length!==Xe.length)return!1;for(let fr=0;fr<u.length;fr++)if(!t(u[fr],Xe[fr]))return!1;return!0}if("object"==typeof u&&null!==u&&null!==Xe){if("object"!=typeof Xe)return!1;if(Object.keys(u).length!==Object.keys(Xe).length)return!1;for(const fr in u)if(!t(u[fr],Xe[fr]))return!1;return!0}return u===Xe},u.aF=v,u.aG=b,u.aH=class extends wa{constructor(u,Xe){super(u,Xe),this.current=0}set(u){this.current!==u&&(this.current=u,this.gl.uniform1i(this.location,u))}},u.aI=_a,u.aJ=class extends wa{constructor(u,Xe){super(u,Xe),this.current=mg}set(u){if(u[12]!==this.current[12]||u[0]!==this.current[0])return this.current=u,void this.gl.uniformMatrix4fv(this.location,!1,u);for(let Xe=1;Xe<16;Xe++)if(u[Xe]!==this.current[Xe]){this.current=u,this.gl.uniformMatrix4fv(this.location,!1,u);break}}},u.aK=Aa,u.aL=Sa,u.aM=Kt,u.aN=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]&&u[2]===this.current[2]||(this.current=u,this.gl.uniform3f(this.location,u[0],u[1],u[2]))}},u.aO=class extends wa{constructor(u,Xe){super(u,Xe),this.current=[0,0]}set(u){u[0]===this.current[0]&&u[1]===this.current[1]||(this.current=u,this.gl.uniform2f(this.location,u[0],u[1]))}},u.aP=function(u,Xe,fr,Ar,_r,wr,Kr){var In=1/(Xe-fr),io=1/(Ar-_r),no=1/(wr-Kr);return u[0]=-2*In,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=-2*io,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=2*no,u[11]=0,u[12]=(Xe+fr)*In,u[13]=(_r+Ar)*io,u[14]=(Kr+wr)*no,u[15]=1,u},u.aQ=wg,u.aR=class extends _s{},u.aS=Vh,u.aT=class extends Ss{},u.aU=function(u){return u<=1?1:Math.pow(2,Math.ceil(Math.log(u)/Math.LN2))},u.aV=So,u.aW=Zs,u.aX=na,u.aY=class extends Bs{},u.aZ=function(u,Xe){return u[0]===Xe[0]&&u[1]===Xe[1]&&u[2]===Xe[2]&&u[3]===Xe[3]&&u[4]===Xe[4]&&u[5]===Xe[5]&&u[6]===Xe[6]&&u[7]===Xe[7]&&u[8]===Xe[8]&&u[9]===Xe[9]&&u[10]===Xe[10]&&u[11]===Xe[11]&&u[12]===Xe[12]&&u[13]===Xe[13]&&u[14]===Xe[14]&&u[15]===Xe[15]},u.a_=function(u,Xe){var fr=u[0],Ar=u[1],_r=u[2],wr=u[3],Kr=u[4],In=u[5],io=u[6],no=u[7],oo=u[8],so=u[9],ao=u[10],co=u[11],go=u[12],ho=u[13],Co=u[14],Io=u[15],xo=Xe[0],Mo=Xe[1],Po=Xe[2],ss=Xe[3],sa=Xe[4],aa=Xe[5],fa=Xe[6],ya=Xe[7],ol=Xe[8],sl=Xe[9],al=Xe[10],cl=Xe[11],hl=Xe[12],ul=Xe[13],dl=Xe[14],pl=Xe[15];return Math.abs(fr-xo)<=_g*Math.max(1,Math.abs(fr),Math.abs(xo))&&Math.abs(Ar-Mo)<=_g*Math.max(1,Math.abs(Ar),Math.abs(Mo))&&Math.abs(_r-Po)<=_g*Math.max(1,Math.abs(_r),Math.abs(Po))&&Math.abs(wr-ss)<=_g*Math.max(1,Math.abs(wr),Math.abs(ss))&&Math.abs(Kr-sa)<=_g*Math.max(1,Math.abs(Kr),Math.abs(sa))&&Math.abs(In-aa)<=_g*Math.max(1,Math.abs(In),Math.abs(aa))&&Math.abs(io-fa)<=_g*Math.max(1,Math.abs(io),Math.abs(fa))&&Math.abs(no-ya)<=_g*Math.max(1,Math.abs(no),Math.abs(ya))&&Math.abs(oo-ol)<=_g*Math.max(1,Math.abs(oo),Math.abs(ol))&&Math.abs(so-sl)<=_g*Math.max(1,Math.abs(so),Math.abs(sl))&&Math.abs(ao-al)<=_g*Math.max(1,Math.abs(ao),Math.abs(al))&&Math.abs(co-cl)<=_g*Math.max(1,Math.abs(co),Math.abs(cl))&&Math.abs(go-hl)<=_g*Math.max(1,Math.abs(go),Math.abs(hl))&&Math.abs(ho-ul)<=_g*Math.max(1,Math.abs(ho),Math.abs(ul))&&Math.abs(Co-dl)<=_g*Math.max(1,Math.abs(Co),Math.abs(dl))&&Math.abs(Io-pl)<=_g*Math.max(1,Math.abs(Io),Math.abs(pl))},u.aa=function(u){const Xe={};if(u.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((u,fr,Ar,_r)=>{const wr=Ar||_r;return Xe[fr]=!wr||wr.toLowerCase(),""})),Xe["max-age"]){const u=parseInt(Xe["max-age"],10);isNaN(u)?delete Xe["max-age"]:Xe["max-age"]=u}return Xe},u.ab=function(u,Xe){const fr=[];for(const Ar in u)Ar in Xe||fr.push(Ar);return fr},u.ac=y,u.ad=function(u,Xe,fr){var Ar=Math.sin(fr),_r=Math.cos(fr),wr=Xe[0],Kr=Xe[1],In=Xe[2],io=Xe[3],no=Xe[4],oo=Xe[5],so=Xe[6],ao=Xe[7];return Xe!==u&&(u[8]=Xe[8],u[9]=Xe[9],u[10]=Xe[10],u[11]=Xe[11],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[0]=wr*_r+no*Ar,u[1]=Kr*_r+oo*Ar,u[2]=In*_r+so*Ar,u[3]=io*_r+ao*Ar,u[4]=no*_r-wr*Ar,u[5]=oo*_r-Kr*Ar,u[6]=so*_r-In*Ar,u[7]=ao*_r-io*Ar,u},u.ae=function(u){var Xe=new vg(16);return Xe[0]=u[0],Xe[1]=u[1],Xe[2]=u[2],Xe[3]=u[3],Xe[4]=u[4],Xe[5]=u[5],Xe[6]=u[6],Xe[7]=u[7],Xe[8]=u[8],Xe[9]=u[9],Xe[10]=u[10],Xe[11]=u[11],Xe[12]=u[12],Xe[13]=u[13],Xe[14]=u[14],Xe[15]=u[15],Xe},u.af=po,u.ag=function(u,Xe){let fr=0,Ar=0;if("constant"===u.kind)Ar=u.layoutSize;else if("source"!==u.kind){const{interpolationType:_r,minZoom:wr,maxZoom:Kr}=u,In=_r?y(Be.interpolationFactor(_r,Xe,wr,Kr),0,1):0;"camera"===u.kind?Ar=Kl.number(u.minSize,u.maxSize,In):fr=In}return{uSizeT:fr,uSize:Ar}},u.ai=function(u,{uSize:Xe,uSizeT:fr},{lowerSize:Ar,upperSize:_r}){return"source"===u.kind?Ar/qh:"composite"===u.kind?Kl.number(Ar/qh,_r/qh,fr):Xe},u.aj=uc,u.ak=function(u,Xe,Ar,_r){const wr=Xe.y-u.y,Kr=Xe.x-u.x,In=_r.y-Ar.y,io=_r.x-Ar.x,no=In*Kr-io*wr;if(0===no)return null;const oo=(io*(u.y-Ar.y)-In*(u.x-Ar.x))/no;return new fr(u.x+oo*Kr,u.y+oo*wr)},u.al=Xc,u.am=qa,u.an=lo,u.ao=function(u){let Xe=1/0,fr=1/0,Ar=-1/0,_r=-1/0;for(const wr of u)Xe=Math.min(Xe,wr.x),fr=Math.min(fr,wr.y),Ar=Math.max(Ar,wr.x),_r=Math.max(_r,wr.y);return[Xe,fr,Ar,_r]},u.ap=Th,u.ar=sc,u.as=function(u,Xe){var fr=Xe[0],Ar=Xe[1],_r=Xe[2],wr=Xe[3],Kr=Xe[4],In=Xe[5],io=Xe[6],no=Xe[7],oo=Xe[8],so=Xe[9],ao=Xe[10],co=Xe[11],go=Xe[12],ho=Xe[13],Co=Xe[14],Io=Xe[15],xo=fr*In-Ar*Kr,Mo=fr*io-_r*Kr,Po=fr*no-wr*Kr,ss=Ar*io-_r*In,sa=Ar*no-wr*In,aa=_r*no-wr*io,fa=oo*ho-so*go,ya=oo*Co-ao*go,ol=oo*Io-co*go,sl=so*Co-ao*ho,al=so*Io-co*ho,cl=ao*Io-co*Co,hl=xo*cl-Mo*al+Po*sl+ss*ol-sa*ya+aa*fa;return hl?(u[0]=(In*cl-io*al+no*sl)*(hl=1/hl),u[1]=(_r*al-Ar*cl-wr*sl)*hl,u[2]=(ho*aa-Co*sa+Io*ss)*hl,u[3]=(ao*sa-so*aa-co*ss)*hl,u[4]=(io*ol-Kr*cl-no*ya)*hl,u[5]=(fr*cl-_r*ol+wr*ya)*hl,u[6]=(Co*Po-go*aa-Io*Mo)*hl,u[7]=(oo*aa-ao*Po+co*Mo)*hl,u[8]=(Kr*al-In*ol+no*fa)*hl,u[9]=(Ar*ol-fr*al-wr*fa)*hl,u[10]=(go*sa-ho*Po+Io*xo)*hl,u[11]=(so*Po-oo*sa-co*xo)*hl,u[12]=(In*ya-Kr*sl-io*fa)*hl,u[13]=(fr*sl-Ar*ya+_r*fa)*hl,u[14]=(ho*Mo-go*ss-Co*xo)*hl,u[15]=(oo*ss-so*Mo+ao*xo)*hl,u):null},u.at=vh,u.au=Yu,u.av=kh,u.aw=function(){const u={},Xe=Io.$version;for(const fr in Io.$root){const Ar=Io.$root[fr];if(Ar.required){let _r=null;_r="version"===fr?Xe:"array"===Ar.type?[]:{},null!=_r&&(u[fr]=_r)}}return u},u.ax=Ii,u.ay=D,u.az=function(u){u=u.slice();const Xe=Object.create(null);for(let fr=0;fr<u.length;fr++)Xe[u[fr].id]=u[fr];for(let fr=0;fr<u.length;fr++)"ref"in u[fr]&&(u[fr]=X(u[fr],Xe[u[fr].ref]));return u},u.b=I,u.b0=function(u,Xe,fr){return u[0]=Xe[0]*fr[0],u[1]=Xe[1]*fr[1],u[2]=Xe[2]*fr[2],u[3]=Xe[3]*fr[3],u},u.b1=function(u,Xe){return u[0]*Xe[0]+u[1]*Xe[1]+u[2]*Xe[2]+u[3]*Xe[3]},u.b2=m,u.b3=Dc,u.b4=Ec,u.b5=function(u,Xe,fr,Ar,_r){var wr,Kr=1/Math.tan(Xe/2);return u[0]=Kr/fr,u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Kr,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=-1,u[12]=0,u[13]=0,u[15]=0,null!=_r&&_r!==1/0?(u[10]=(_r+Ar)*(wr=1/(Ar-_r)),u[14]=2*_r*Ar*wr):(u[10]=-1,u[14]=-2*Ar),u},u.b6=function(u,Xe,fr){var Ar=Math.sin(fr),_r=Math.cos(fr),wr=Xe[4],Kr=Xe[5],In=Xe[6],io=Xe[7],no=Xe[8],oo=Xe[9],so=Xe[10],ao=Xe[11];return Xe!==u&&(u[0]=Xe[0],u[1]=Xe[1],u[2]=Xe[2],u[3]=Xe[3],u[12]=Xe[12],u[13]=Xe[13],u[14]=Xe[14],u[15]=Xe[15]),u[4]=wr*_r+no*Ar,u[5]=Kr*_r+oo*Ar,u[6]=In*_r+so*Ar,u[7]=io*_r+ao*Ar,u[8]=no*_r-wr*Ar,u[9]=oo*_r-Kr*Ar,u[10]=so*_r-In*Ar,u[11]=ao*_r-io*Ar,u},u.b7=f,u.b8=In,u.b9=function(u){return u*Math.PI/180},u.bA=function(u){return u.message===go},u.bB=bn,u.bC=ig,u.ba=function(u,Xe){const{x:fr,y:Ar}=Tc.fromLngLat(Xe);return!(u<0||u>25||Ar<0||Ar>=1||fr<0||fr>=1)},u.bb=function(u,Xe){return u[0]=Xe[0],u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[5]=Xe[1],u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[10]=Xe[2],u[11]=0,u[12]=0,u[13]=0,u[14]=0,u[15]=1,u},u.bc=class extends hs{},u.bd=Ru,u.be=sd,u.bg=L,u.bh=function(u,Xe){ho.REGISTERED_PROTOCOLS[u]=Xe},u.bi=function(u){delete ho.REGISTERED_PROTOCOLS[u]},u.bj=function(u,Xe){const fr={};for(let Ar=0;Ar<u.length;Ar++){const _r=Xe&&Xe[u[Ar].id]||Ln(u[Ar]);Xe&&(Xe[u[Ar].id]=_r);let wr=fr[_r];wr||(wr=fr[_r]=[]),wr.push(u[Ar])}const Ar=[];for(const u in fr)Ar.push(fr[u]);return Ar},u.bk=wi,u.bl=Uc,u.bm=Nc,u.bn=Tu,u.bo=function(Xe){Xe.bucket.createArrays(),Xe.bucket.tilePixelRatio=Cg/(512*Xe.bucket.overscaling),Xe.bucket.compareText={},Xe.bucket.iconsNeedLinear=!1;const fr=Xe.bucket.layers[0],Ar=fr.layout,_r=fr._unevaluatedLayout._values,wr={layoutIconSize:_r["icon-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),layoutTextSize:_r["text-size"].possiblyEvaluate(new Ui(Xe.bucket.zoom+1),Xe.canonical),textMaxSize:_r["text-size"].possiblyEvaluate(new Ui(18))};if("composite"===Xe.bucket.textSizeData.kind){const{minZoom:u,maxZoom:fr}=Xe.bucket.textSizeData;wr.compositeTextSizes=[_r["text-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["text-size"].possiblyEvaluate(new Ui(fr),Xe.canonical)]}if("composite"===Xe.bucket.iconSizeData.kind){const{minZoom:u,maxZoom:fr}=Xe.bucket.iconSizeData;wr.compositeIconSizes=[_r["icon-size"].possiblyEvaluate(new Ui(u),Xe.canonical),_r["icon-size"].possiblyEvaluate(new Ui(fr),Xe.canonical)]}const Kr=Ar.get("text-line-height")*Th,In="viewport"!==Ar.get("text-rotation-alignment")&&"point"!==Ar.get("symbol-placement"),io=Ar.get("text-keep-upright"),no=Ar.get("text-size");for(const _r of Xe.bucket.features){const oo=Ar.get("text-font").evaluate(_r,{},Xe.canonical).join(","),so=no.evaluate(_r,{},Xe.canonical),ao=wr.layoutTextSize.evaluate(_r,{},Xe.canonical),co=wr.layoutIconSize.evaluate(_r,{},Xe.canonical),go={horizontal:{},vertical:void 0},ho=_r.text;let Co,Io=[0,0];if(ho){const wr=ho.toString(),no=Ar.get("text-letter-spacing").evaluate(_r,{},Xe.canonical)*Th,co=Ci(wr)?no:0,Co=Ar.get("text-anchor").evaluate(_r,{},Xe.canonical),xo=xh(fr,_r,Xe.canonical);if(!xo){const u=Ar.get("text-radial-offset").evaluate(_r,{},Xe.canonical);Io=u?gh(Co,[u*Th,qu]):Ar.get("text-offset").evaluate(_r,{},Xe.canonical).map((u=>u*Th))}let Mo=In?"center":Ar.get("text-justify").evaluate(_r,{},Xe.canonical);const Po="point"===Ar.get("symbol-placement")?Ar.get("text-max-width").evaluate(_r,{},Xe.canonical)*Th:1/0,w=()=>{Xe.bucket.allowVerticalPlacement&&Pi(wr)&&(go.vertical=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,"left",co,Io,u.ah.vertical,!0,ao,so))};if(!In&&xo){const fr=new Set;if("auto"===Mo)for(let u=0;u<xo.values.length;u+=2)fr.add(vh(xo.values[u]));else fr.add(Mo);let Ar=!1;for(const _r of fr)if(!go.horizontal[_r])if(Ar)go.horizontal[_r]=go.horizontal[0];else{const fr=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,"center",_r,co,Io,u.ah.horizontal,!1,ao,so);fr&&(go.horizontal[_r]=fr,Ar=1===fr.positionedLines.length)}w()}else{"auto"===Mo&&(Mo=vh(Co));const fr=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,Mo,co,Io,u.ah.horizontal,!1,ao,so);fr&&(go.horizontal[Mo]=fr),w(),Pi(wr)&&In&&io&&(go.vertical=ju(ho,Xe.glyphMap,Xe.glyphPositions,Xe.imagePositions,oo,Po,Kr,Co,Mo,co,Io,u.ah.vertical,!1,ao,so))}}let xo=!1;if(_r.icon&&_r.icon.name){const u=Xe.imageMap[_r.icon.name];u&&(Co=Wu(Xe.imagePositions[_r.icon.name],Ar.get("icon-offset").evaluate(_r,{},Xe.canonical),Ar.get("icon-anchor").evaluate(_r,{},Xe.canonical)),xo=!!u.sdf,void 0===Xe.bucket.sdfIcons?Xe.bucket.sdfIcons=xo:Xe.bucket.sdfIcons!==xo&&A("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(u.pixelRatio!==Xe.bucket.pixelRatio||0!==Ar.get("icon-rotate").constantOr(1))&&(Xe.bucket.iconsNeedLinear=!0))}const Mo=_h(go.horizontal)||go.vertical;Xe.bucket.iconsInText=!!Mo&&Mo.iconsInText,(Mo||Co)&&bh(Xe.bucket,_r,go,Co,Xe.imageMap,wr,ao,co,Io,xo,Xe.canonical)}Xe.showCollisionBoxes&&Xe.bucket.generateCollisionDebugBuffers()},u.bp=Ul,u.bq=il,u.br=Il,u.bs=zg,u.bt=Hh,u.bu=class{constructor(u){this._marks={start:[u.url,"start"].join("#"),end:[u.url,"end"].join("#"),measure:u.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let u=performance.getEntriesByName(this._marks.measure);return 0===u.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),u=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),u}},u.bv=function(u,Xe,fr,Ar,_r){return e(this,void 0,void 0,(function*(){if(p())try{return yield P(u,Xe,fr,Ar,_r)}catch(u){}return function(u,Xe,fr,Ar,_r){const wr=u.width,Kr=u.height;ao&&co||(ao=new OffscreenCanvas(wr,Kr),co=ao.getContext("2d",{willReadFrequently:!0})),ao.width=wr,ao.height=Kr,co.drawImage(u,0,0,wr,Kr);const In=co.getImageData(Xe,fr,Ar,_r);return co.clearRect(0,0,wr,Kr),In.data}(u,Xe,fr,Ar,_r)}))},u.bw=Rc,u.bx=r,u.by=Xe,u.bz=Jh,u.c=E,u.d=u=>e(void 0,void 0,void 0,(function*(){if(0===u.byteLength)return createImageBitmap(new ImageData(1,1));const Xe=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(Xe)}catch(u){throw new Error(`Could not load image because of ${u.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),u.e=g,u.f=u=>new Promise(((Xe,fr)=>{const Ar=new Image;Ar.onload=()=>{Xe(Ar),URL.revokeObjectURL(Ar.src),Ar.onload=null,window.requestAnimationFrame((()=>{Ar.src=so}))},Ar.onerror=()=>fr(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 _r=new Blob([new Uint8Array(u)],{type:"image/png"});Ar.src=u.byteLength?URL.createObjectURL(_r):so})),u.g=T,u.h=(u,Xe)=>O(g(u,{type:"json"}),Xe),u.i=k,u.j=N,u.k=q,u.l=(u,Xe)=>O(g(u,{type:"arrayBuffer"}),Xe),u.m=O,u.n=function(u){return new Hh(u).readFields(zu,[])},u.o=_o,u.p=Vu,u.q=rs,u.r=Ic,u.s=j,u.t=xi,u.u=mc,u.v=Io,u.w=A,u.x=function([u,Xe,fr]){return Xe+=90,Xe*=Math.PI/180,fr*=Math.PI/180,{x:u*Math.cos(Xe)*Math.sin(fr),y:u*Math.sin(Xe)*Math.sin(fr),z:u*Math.cos(fr)}},u.y=Kl,u.z=Ui})),define("worker",0,(function(u){class t{constructor(u){this.keyCache={},u&&this.replace(u)}replace(u){this._layerConfigs={},this._layers={},this.update(u,[])}update(Xe,fr){for(const fr of Xe){this._layerConfigs[fr.id]=fr;const Xe=this._layers[fr.id]=u.aA(fr);Xe._featureFilter=u.a7(Xe.filter),this.keyCache[fr.id]&&delete this.keyCache[fr.id]}for(const u of fr)delete this.keyCache[u],delete this._layerConfigs[u],delete this._layers[u];this.familiesBySource={};const Ar=u.bj(Object.values(this._layerConfigs),this.keyCache);for(const u of Ar){const Xe=u.map((u=>this._layers[u.id])),fr=Xe[0];if("none"===fr.visibility)continue;const Ar=fr.source||"";let _r=this.familiesBySource[Ar];_r||(_r=this.familiesBySource[Ar]={});const wr=fr.sourceLayer||"_geojsonTileLayer";let Kr=_r[wr];Kr||(Kr=_r[wr]=[]),Kr.push(Xe)}}}class o{constructor(Xe){const fr={},Ar=[];for(const u in Xe){const _r=Xe[u],wr=fr[u]={};for(const u in _r){const Xe=_r[+u];if(!Xe||0===Xe.bitmap.width||0===Xe.bitmap.height)continue;const fr={x:0,y:0,w:Xe.bitmap.width+2,h:Xe.bitmap.height+2};Ar.push(fr),wr[u]={rect:fr,metrics:Xe.metrics}}}const{w:_r,h:wr}=u.p(Ar),Kr=new u.o({width:_r||1,height:wr||1});for(const Ar in Xe){const _r=Xe[Ar];for(const Xe in _r){const wr=_r[+Xe];if(!wr||0===wr.bitmap.width||0===wr.bitmap.height)continue;const In=fr[Ar][Xe].rect;u.o.copy(wr.bitmap,Kr,{x:0,y:0},{x:In.x+1,y:In.y+1},wr.bitmap)}}this.image=Kr,this.positions=fr}}u.bk("GlyphAtlas",o);class i{constructor(Xe){this.tileID=new u.S(Xe.tileID.overscaledZ,Xe.tileID.wrap,Xe.tileID.canonical.z,Xe.tileID.canonical.x,Xe.tileID.canonical.y),this.uid=Xe.uid,this.zoom=Xe.zoom,this.pixelRatio=Xe.pixelRatio,this.tileSize=Xe.tileSize,this.source=Xe.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Xe.showCollisionBoxes,this.collectResourceTiming=!!Xe.collectResourceTiming,this.returnDependencies=!!Xe.returnDependencies,this.promoteId=Xe.promoteId,this.inFlightDependencies=[]}parse(Xe,fr,Ar,_r){return u._(this,void 0,void 0,(function*(){this.status="parsing",this.data=Xe,this.collisionBoxArray=new u.a5;const wr=new u.bl(Object.keys(Xe.layers).sort()),Kr=new u.bm(this.tileID,this.promoteId);Kr.bucketLayerIDs=[];const In={},io={featureIndex:Kr,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ar},no=fr.familiesBySource[this.source];for(const fr in no){const _r=Xe.layers[fr];if(!_r)continue;1===_r.version&&u.w(`Vector tile source "${this.source}" layer "${fr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const oo=wr.encode(fr),so=[];for(let u=0;u<_r.length;u++){const Xe=_r.feature(u),Ar=Kr.getId(Xe,fr);so.push({feature:Xe,id:Ar,index:u,sourceLayerIndex:oo})}for(const Xe of no[fr]){const fr=Xe[0];fr.source!==this.source&&u.w(`layer.source = ${fr.source} does not equal this.source = ${this.source}`),fr.minzoom&&this.zoom<Math.floor(fr.minzoom)||fr.maxzoom&&this.zoom>=fr.maxzoom||"none"!==fr.visibility&&(s(Xe,this.zoom,Ar),(In[fr.id]=fr.createBucket({index:Kr.bucketLayerIDs.length,layers:Xe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:oo,sourceID:this.source})).populate(so,io,this.tileID.canonical),Kr.bucketLayerIDs.push(Xe.map((u=>u.id))))}}const oo=u.aF(io.glyphDependencies,(u=>Object.keys(u).map(Number)));this.inFlightDependencies.forEach((u=>null==u?void 0:u.abort())),this.inFlightDependencies=[];let so=Promise.resolve({});if(Object.keys(oo).length){const u=new AbortController;this.inFlightDependencies.push(u),so=_r.sendAsync({type:"GG",data:{stacks:oo,source:this.source,tileID:this.tileID,type:"glyphs"}},u)}const ao=Object.keys(io.iconDependencies);let co=Promise.resolve({});if(ao.length){const u=new AbortController;this.inFlightDependencies.push(u),co=_r.sendAsync({type:"GI",data:{icons:ao,source:this.source,tileID:this.tileID,type:"icons"}},u)}const go=Object.keys(io.patternDependencies);let ho=Promise.resolve({});if(go.length){const u=new AbortController;this.inFlightDependencies.push(u),ho=_r.sendAsync({type:"GI",data:{icons:go,source:this.source,tileID:this.tileID,type:"patterns"}},u)}const[Co,Io,xo]=yield Promise.all([so,co,ho]),Mo=new o(Co),Po=new u.bn(Io,xo);for(const Xe in In){const fr=In[Xe];fr instanceof u.a6?(s(fr.layers,this.zoom,Ar),u.bo({bucket:fr,glyphMap:Co,glyphPositions:Mo.positions,imageMap:Io,imagePositions:Po.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):fr.hasPattern&&(fr instanceof u.bp||fr instanceof u.bq||fr instanceof u.br)&&(s(fr.layers,this.zoom,Ar),fr.addFeatures(io,this.tileID.canonical,Po.patternPositions))}return this.status="done",{buckets:Object.values(In).filter((u=>!u.isEmpty())),featureIndex:Kr,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Mo.image,imageAtlas:Po,glyphMap:this.returnDependencies?Co:null,iconMap:this.returnDependencies?Io:null,glyphPositions:this.returnDependencies?Mo.positions:null}}))}}function s(Xe,fr,Ar){const _r=new u.z(fr);for(const u of Xe)u.recalculate(_r,Ar)}class r{constructor(u,Xe,fr){this.actor=u,this.layerIndex=Xe,this.availableImages=fr,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Xe,fr){return u._(this,void 0,void 0,(function*(){const Ar=yield u.l(Xe.request,fr);try{return{vectorTile:new u.bs.VectorTile(new u.bt(Ar.data)),rawData:Ar.data,cacheControl:Ar.cacheControl,expires:Ar.expires}}catch(u){const fr=new Uint8Array(Ar.data);let _r=`Unable to parse the tile at ${Xe.request.url}, `;throw _r+=31===fr[0]&&139===fr[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${u.message}`,new Error(_r)}}))}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const fr=Xe.uid,Ar=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bu(Xe.request),_r=new i(Xe);this.loading[fr]=_r;const wr=new AbortController;_r.abort=wr;try{const Kr=yield this.loadVectorTile(Xe,wr);if(delete this.loading[fr],!Kr)return null;const In=Kr.rawData,io={};Kr.expires&&(io.expires=Kr.expires),Kr.cacheControl&&(io.cacheControl=Kr.cacheControl);const no={};if(Ar){const u=Ar.finish();u&&(no.resourceTiming=JSON.parse(JSON.stringify(u)))}_r.vectorTile=Kr.vectorTile;const oo=_r.parse(Kr.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[fr]=_r,this.fetching[fr]={rawTileData:In,cacheControl:io,resourceTiming:no};try{const Xe=yield oo;return u.e({rawTileData:In.slice(0)},Xe,io,no)}finally{delete this.fetching[fr]}}catch(u){throw delete this.loading[fr],_r.status="done",this.loaded[fr]=_r,u}}))}reloadTile(Xe){return u._(this,void 0,void 0,(function*(){const fr=Xe.uid;if(!this.loaded||!this.loaded[fr])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const Ar=this.loaded[fr];if(Ar.showCollisionBoxes=Xe.showCollisionBoxes,"parsing"===Ar.status){const Xe=yield Ar.parse(Ar.vectorTile,this.layerIndex,this.availableImages,this.actor);let _r;if(this.fetching[fr]){const{rawTileData:Ar,cacheControl:wr,resourceTiming:Kr}=this.fetching[fr];delete this.fetching[fr],_r=u.e({rawTileData:Ar.slice(0)},Xe,wr,Kr)}else _r=Xe;return _r}if("done"===Ar.status&&Ar.vectorTile)return Ar.parse(Ar.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(Xe){return u._(this,void 0,void 0,(function*(){const u=this.loading,fr=Xe.uid;u&&u[fr]&&u[fr].abort&&(u[fr].abort.abort(),delete u[fr])}))}removeTile(Xe){return u._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[Xe.uid]&&delete this.loaded[Xe.uid]}))}}class n{constructor(){this.loaded={}}loadTile(Xe){return u._(this,void 0,void 0,(function*(){const{uid:fr,encoding:Ar,rawImageData:_r,redFactor:wr,greenFactor:Kr,blueFactor:In,baseShift:io}=Xe,no=_r.width+2,oo=_r.height+2,so=u.b(_r)?new u.R({width:no,height:oo},yield u.bv(_r,-1,-1,no,oo)):_r,ao=new u.bw(fr,so,Ar,wr,Kr,In,io);return this.loaded=this.loaded||{},this.loaded[fr]=ao,ao}))}removeTile(u){const Xe=this.loaded,fr=u.uid;Xe&&Xe[fr]&&delete Xe[fr]}}function a(u,Xe){if(0!==u.length){l(u[0],Xe);for(var fr=1;fr<u.length;fr++)l(u[fr],!Xe)}}function l(u,Xe){for(var fr=0,Ar=0,_r=0,wr=u.length,Kr=wr-1;_r<wr;Kr=_r++){var In=(u[_r][0]-u[Kr][0])*(u[Kr][1]+u[_r][1]),io=fr+In;Ar+=Math.abs(fr)>=Math.abs(In)?fr-io+In:In-io+fr,fr=io}fr+Ar>=0!=!!Xe&&u.reverse()}var Xe=u.bx((function e(u,Xe){var fr,Ar=u&&u.type;if("FeatureCollection"===Ar)for(fr=0;fr<u.features.length;fr++)e(u.features[fr],Xe);else if("GeometryCollection"===Ar)for(fr=0;fr<u.geometries.length;fr++)e(u.geometries[fr],Xe);else if("Feature"===Ar)e(u.geometry,Xe);else if("Polygon"===Ar)a(u.coordinates,Xe);else if("MultiPolygon"===Ar)for(fr=0;fr<u.coordinates.length;fr++)a(u.coordinates[fr],Xe);return u}));const fr=u.bs.VectorTileFeature.prototype.toGeoJSON;var Ar={exports:{}},_r=u.by,wr=u.bs.VectorTileFeature,Kr=p;function p(u,Xe){this.options=Xe||{},this.features=u,this.length=u.length}function m(u,Xe){this.id="number"==typeof u.id?u.id:void 0,this.type=u.type,this.rawGeometry=1===u.type?[u.geometry]:u.geometry,this.properties=u.tags,this.extent=Xe||4096}p.prototype.feature=function(u){return new m(this.features[u],this.options.extent)},m.prototype.loadGeometry=function(){var u=this.rawGeometry;this.geometry=[];for(var Xe=0;Xe<u.length;Xe++){for(var fr=u[Xe],Ar=[],wr=0;wr<fr.length;wr++)Ar.push(new _r(fr[wr][0],fr[wr][1]));this.geometry.push(Ar)}return this.geometry},m.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var u=this.geometry,Xe=1/0,fr=-1/0,Ar=1/0,_r=-1/0,wr=0;wr<u.length;wr++)for(var Kr=u[wr],In=0;In<Kr.length;In++){var io=Kr[In];Xe=Math.min(Xe,io.x),fr=Math.max(fr,io.x),Ar=Math.min(Ar,io.y),_r=Math.max(_r,io.y)}return[Xe,Ar,fr,_r]},m.prototype.toGeoJSON=wr.prototype.toGeoJSON;var In=u.bz,io=Kr;function w(u){var Xe=new In;return function(u,Xe){for(var fr in u.layers)Xe.writeMessage(3,x,u.layers[fr])}(u,Xe),Xe.finish()}function x(u,Xe){var fr;Xe.writeVarintField(15,u.version||1),Xe.writeStringField(1,u.name||""),Xe.writeVarintField(5,u.extent||4096);var Ar={keys:[],values:[],keycache:{},valuecache:{}};for(fr=0;fr<u.length;fr++)Ar.feature=u.feature(fr),Xe.writeMessage(2,b,Ar);var _r=Ar.keys;for(fr=0;fr<_r.length;fr++)Xe.writeStringField(3,_r[fr]);var wr=Ar.values;for(fr=0;fr<wr.length;fr++)Xe.writeMessage(4,P,wr[fr])}function b(u,Xe){var fr=u.feature;void 0!==fr.id&&Xe.writeVarintField(1,fr.id),Xe.writeMessage(2,S,u),Xe.writeVarintField(3,fr.type),Xe.writeMessage(4,I,fr)}function S(u,Xe){var fr=u.feature,Ar=u.keys,_r=u.values,wr=u.keycache,Kr=u.valuecache;for(var In in fr.properties){var io=fr.properties[In],no=wr[In];if(null!==io){void 0===no&&(Ar.push(In),wr[In]=no=Ar.length-1),Xe.writeVarint(no);var oo=typeof io;"string"!==oo&&"boolean"!==oo&&"number"!==oo&&(io=JSON.stringify(io));var so=oo+":"+io,ao=Kr[so];void 0===ao&&(_r.push(io),Kr[so]=ao=_r.length-1),Xe.writeVarint(ao)}}}function _(u,Xe){return(Xe<<3)+(7&u)}function M(u){return u<<1^u>>31}function I(u,Xe){for(var fr=u.loadGeometry(),Ar=u.type,_r=0,wr=0,Kr=fr.length,In=0;In<Kr;In++){var io=fr[In],no=1;1===Ar&&(no=io.length),Xe.writeVarint(_(1,no));for(var oo=3===Ar?io.length-1:io.length,so=0;so<oo;so++){1===so&&1!==Ar&&Xe.writeVarint(_(2,oo-1));var ao=io[so].x-_r,co=io[so].y-wr;Xe.writeVarint(M(ao)),Xe.writeVarint(M(co)),_r+=ao,wr+=co}3===Ar&&Xe.writeVarint(_(7,1))}}function P(u,Xe){var fr=typeof u;"string"===fr?Xe.writeStringField(1,u):"boolean"===fr?Xe.writeBooleanField(7,u):"number"===fr&&(u%1!=0?Xe.writeDoubleField(3,u):u<0?Xe.writeSVarintField(6,u):Xe.writeVarintField(5,u))}Ar.exports=w,Ar.exports.fromVectorTileJs=w,Ar.exports.fromGeojsonVt=function(u,Xe){Xe=Xe||{};var fr={};for(var Ar in u)fr[Ar]=new io(u[Ar].features,Xe),fr[Ar].name=Ar,fr[Ar].version=Xe.version,fr[Ar].extent=Xe.extent;return w({layers:fr})},Ar.exports.GeoJSONWrapper=io;var no=u.bx(Ar.exports);const oo={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:u=>u},so=Math.fround||(ao=new Float32Array(1),u=>(ao[0]=+u,ao[0]));var ao;const co=3,go=5,ho=6;class z{constructor(u){this.options=Object.assign(Object.create(oo),u),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(u){const{log:Xe,minZoom:fr,maxZoom:Ar}=this.options;Xe&&console.time("total time");const _r=`prepare ${u.length} points`;Xe&&console.time(_r),this.points=u;const wr=[];for(let Xe=0;Xe<u.length;Xe++){const fr=u[Xe];if(!fr.geometry)continue;const[Ar,_r]=fr.geometry.coordinates,Kr=so(G(Ar)),In=so(j(_r));wr.push(Kr,In,1/0,Xe,-1,1),this.options.reduce&&wr.push(0)}let Kr=this.trees[Ar+1]=this._createTree(wr);Xe&&console.timeEnd(_r);for(let u=Ar;u>=fr;u--){const fr=+Date.now();Kr=this.trees[u]=this._createTree(this._cluster(Kr,u)),Xe&&console.log("z%d: %d clusters in %dms",u,Kr.numItems,+Date.now()-fr)}return Xe&&console.timeEnd("total time"),this}getClusters(u,Xe){let fr=((u[0]+180)%360+360)%360-180;const Ar=Math.max(-90,Math.min(90,u[1]));let _r=180===u[2]?180:((u[2]+180)%360+360)%360-180;const wr=Math.max(-90,Math.min(90,u[3]));if(u[2]-u[0]>=360)fr=-180,_r=180;else if(fr>_r){const u=this.getClusters([fr,Ar,180,wr],Xe),Kr=this.getClusters([-180,Ar,_r,wr],Xe);return u.concat(Kr)}const Kr=this.trees[this._limitZoom(Xe)],In=Kr.range(G(fr),j(wr),G(_r),j(Ar)),io=Kr.data,no=[];for(const u of In){const Xe=this.stride*u;no.push(io[Xe+go]>1?A(io,Xe,this.clusterProps):this.points[io[Xe+co]])}return no}getChildren(u){const Xe=this._getOriginId(u),fr=this._getOriginZoom(u),Ar="No cluster with the specified id.",_r=this.trees[fr];if(!_r)throw new Error(Ar);const wr=_r.data;if(Xe*this.stride>=wr.length)throw new Error(Ar);const Kr=this.options.radius/(this.options.extent*Math.pow(2,fr-1)),In=_r.within(wr[Xe*this.stride],wr[Xe*this.stride+1],Kr),io=[];for(const Xe of In){const fr=Xe*this.stride;wr[fr+4]===u&&io.push(wr[fr+go]>1?A(wr,fr,this.clusterProps):this.points[wr[fr+co]])}if(0===io.length)throw new Error(Ar);return io}getLeaves(u,Xe,fr){const Ar=[];return this._appendLeaves(Ar,u,Xe=Xe||10,fr=fr||0,0),Ar}getTile(u,Xe,fr){const Ar=this.trees[this._limitZoom(u)],_r=Math.pow(2,u),{extent:wr,radius:Kr}=this.options,In=Kr/wr,io=(fr-In)/_r,no=(fr+1+In)/_r,oo={features:[]};return this._addTileFeatures(Ar.range((Xe-In)/_r,io,(Xe+1+In)/_r,no),Ar.data,Xe,fr,_r,oo),0===Xe&&this._addTileFeatures(Ar.range(1-In/_r,io,1,no),Ar.data,_r,fr,_r,oo),Xe===_r-1&&this._addTileFeatures(Ar.range(0,io,In/_r,no),Ar.data,-1,fr,_r,oo),oo.features.length?oo:null}getClusterExpansionZoom(u){let Xe=this._getOriginZoom(u)-1;for(;Xe<=this.options.maxZoom;){const fr=this.getChildren(u);if(Xe++,1!==fr.length)break;u=fr[0].properties.cluster_id}return Xe}_appendLeaves(u,Xe,fr,Ar,_r){const wr=this.getChildren(Xe);for(const Xe of wr){const wr=Xe.properties;if(wr&&wr.cluster?_r+wr.point_count<=Ar?_r+=wr.point_count:_r=this._appendLeaves(u,wr.cluster_id,fr,Ar,_r):_r<Ar?_r++:u.push(Xe),u.length===fr)break}return _r}_createTree(Xe){const fr=new u.av(Xe.length/this.stride|0,this.options.nodeSize,Float32Array);for(let u=0;u<Xe.length;u+=this.stride)fr.add(Xe[u],Xe[u+1]);return fr.finish(),fr.data=Xe,fr}_addTileFeatures(u,Xe,fr,Ar,_r,wr){for(const Kr of u){const u=Kr*this.stride,In=Xe[u+go]>1;let io,no,oo;if(In)io=E(Xe,u,this.clusterProps),no=Xe[u],oo=Xe[u+1];else{const fr=this.points[Xe[u+co]];io=fr.properties;const[Ar,_r]=fr.geometry.coordinates;no=G(Ar),oo=j(_r)}const so={type:1,geometry:[[Math.round(this.options.extent*(no*_r-fr)),Math.round(this.options.extent*(oo*_r-Ar))]],tags:io};let ao;ao=In||this.options.generateId?Xe[u+co]:this.points[Xe[u+co]].id,void 0!==ao&&(so.id=ao),wr.features.push(so)}}_limitZoom(u){return Math.max(this.options.minZoom,Math.min(Math.floor(+u),this.options.maxZoom+1))}_cluster(u,Xe){const{radius:fr,extent:Ar,reduce:_r,minPoints:wr}=this.options,Kr=fr/(Ar*Math.pow(2,Xe)),In=u.data,io=[],no=this.stride;for(let fr=0;fr<In.length;fr+=no){if(In[fr+2]<=Xe)continue;In[fr+2]=Xe;const Ar=In[fr],oo=In[fr+1],so=u.within(In[fr],In[fr+1],Kr),ao=In[fr+go];let co=ao;for(const u of so){const fr=u*no;In[fr+2]>Xe&&(co+=In[fr+go])}if(co>ao&&co>=wr){let u,wr=Ar*ao,Kr=oo*ao,ho=-1;const Co=(fr/no<<5)+(Xe+1)+this.points.length;for(const Ar of so){const io=Ar*no;if(In[io+2]<=Xe)continue;In[io+2]=Xe;const oo=In[io+go];wr+=In[io]*oo,Kr+=In[io+1]*oo,In[io+4]=Co,_r&&(u||(u=this._map(In,fr,!0),ho=this.clusterProps.length,this.clusterProps.push(u)),_r(u,this._map(In,io)))}In[fr+4]=Co,io.push(wr/co,Kr/co,1/0,Co,-1,co),_r&&io.push(ho)}else{for(let u=0;u<no;u++)io.push(In[fr+u]);if(co>1)for(const u of so){const fr=u*no;if(!(In[fr+2]<=Xe)){In[fr+2]=Xe;for(let u=0;u<no;u++)io.push(In[fr+u])}}}}return io}_getOriginId(u){return u-this.points.length>>5}_getOriginZoom(u){return(u-this.points.length)%32}_map(u,Xe,fr){if(u[Xe+go]>1){const Ar=this.clusterProps[u[Xe+ho]];return fr?Object.assign({},Ar):Ar}const Ar=this.points[u[Xe+co]].properties,_r=this.options.map(Ar);return fr&&_r===Ar?Object.assign({},_r):_r}}function A(u,Xe,fr){return{type:"Feature",id:u[Xe+co],properties:E(u,Xe,fr),geometry:{type:"Point",coordinates:[(Ar=u[Xe],360*(Ar-.5)),R(u[Xe+1])]}};var Ar}function E(u,Xe,fr){const Ar=u[Xe+go],_r=Ar>=1e4?`${Math.round(Ar/1e3)}k`:Ar>=1e3?Math.round(Ar/100)/10+"k":Ar,wr=u[Xe+ho],Kr=-1===wr?{}:Object.assign({},fr[wr]);return Object.assign(Kr,{cluster:!0,cluster_id:u[Xe+co],point_count:Ar,point_count_abbreviated:_r})}function G(u){return u/360+.5}function j(u){const Xe=Math.sin(u*Math.PI/180),fr=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return fr<0?0:fr>1?1:fr}function R(u){const Xe=(180-360*u)*Math.PI/180;return 360*Math.atan(Math.exp(Xe))/Math.PI-90}function Z(u,Xe,fr,Ar){let _r=Ar;const wr=Xe+(fr-Xe>>1);let Kr,In=fr-Xe;const io=u[Xe],no=u[Xe+1],oo=u[fr],so=u[fr+1];for(let Ar=Xe+3;Ar<fr;Ar+=3){const Xe=N(u[Ar],u[Ar+1],io,no,oo,so);if(Xe>_r)Kr=Ar,_r=Xe;else if(Xe===_r){const u=Math.abs(Ar-wr);u<In&&(Kr=Ar,In=u)}}_r>Ar&&(Kr-Xe>3&&Z(u,Xe,Kr,Ar),u[Kr+2]=_r,fr-Kr>3&&Z(u,Kr,fr,Ar))}function N(u,Xe,fr,Ar,_r,wr){let Kr=_r-fr,In=wr-Ar;if(0!==Kr||0!==In){const io=((u-fr)*Kr+(Xe-Ar)*In)/(Kr*Kr+In*In);io>1?(fr=_r,Ar=wr):io>0&&(fr+=Kr*io,Ar+=In*io)}return Kr=u-fr,In=Xe-Ar,Kr*Kr+In*In}function J(u,Xe,fr,Ar){const _r={id:null==u?null:u,type:Xe,geometry:fr,tags:Ar,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===Xe||"MultiPoint"===Xe||"LineString"===Xe)W(_r,fr);else if("Polygon"===Xe)W(_r,fr[0]);else if("MultiLineString"===Xe)for(const u of fr)W(_r,u);else if("MultiPolygon"===Xe)for(const u of fr)W(_r,u[0]);return _r}function W(u,Xe){for(let fr=0;fr<Xe.length;fr+=3)u.minX=Math.min(u.minX,Xe[fr]),u.minY=Math.min(u.minY,Xe[fr+1]),u.maxX=Math.max(u.maxX,Xe[fr]),u.maxY=Math.max(u.maxY,Xe[fr+1])}function Y(u,Xe,fr,Ar){if(!Xe.geometry)return;const _r=Xe.geometry.coordinates;if(_r&&0===_r.length)return;const wr=Xe.geometry.type,Kr=Math.pow(fr.tolerance/((1<<fr.maxZoom)*fr.extent),2);let In=[],io=Xe.id;if(fr.promoteId?io=Xe.properties[fr.promoteId]:fr.generateId&&(io=Ar||0),"Point"===wr)V(_r,In);else if("MultiPoint"===wr)for(const u of _r)V(u,In);else if("LineString"===wr)X(_r,In,Kr,!1);else if("MultiLineString"===wr){if(fr.lineMetrics){for(const fr of _r)In=[],X(fr,In,Kr,!1),u.push(J(io,"LineString",In,Xe.properties));return}q(_r,In,Kr,!1)}else if("Polygon"===wr)q(_r,In,Kr,!0);else{if("MultiPolygon"!==wr){if("GeometryCollection"===wr){for(const _r of Xe.geometry.geometries)Y(u,{id:io,geometry:_r,properties:Xe.properties},fr,Ar);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const u of _r){const Xe=[];q(u,Xe,Kr,!0),In.push(Xe)}}u.push(J(io,wr,In,Xe.properties))}function V(u,Xe){Xe.push(B(u[0]),H(u[1]),0)}function X(u,Xe,fr,Ar){let _r,wr,Kr=0;for(let fr=0;fr<u.length;fr++){const In=B(u[fr][0]),io=H(u[fr][1]);Xe.push(In,io,0),fr>0&&(Kr+=Ar?(_r*io-In*wr)/2:Math.sqrt(Math.pow(In-_r,2)+Math.pow(io-wr,2))),_r=In,wr=io}const In=Xe.length-3;Xe[2]=1,Z(Xe,0,In,fr),Xe[In+2]=1,Xe.size=Math.abs(Kr),Xe.start=0,Xe.end=Xe.size}function q(u,Xe,fr,Ar){for(let _r=0;_r<u.length;_r++){const wr=[];X(u[_r],wr,fr,Ar),Xe.push(wr)}}function B(u){return u/360+.5}function H(u){const Xe=Math.sin(u*Math.PI/180),fr=.5-.25*Math.log((1+Xe)/(1-Xe))/Math.PI;return fr<0?0:fr>1?1:fr}function U(u,Xe,fr,Ar,_r,wr,Kr,In){if(Ar/=Xe,wr>=(fr/=Xe)&&Kr<Ar)return u;if(Kr<fr||wr>=Ar)return null;const io=[];for(const Xe of u){const u=Xe.geometry;let wr=Xe.type;const Kr=0===_r?Xe.minX:Xe.minY,no=0===_r?Xe.maxX:Xe.maxY;if(Kr>=fr&&no<Ar){io.push(Xe);continue}if(no<fr||Kr>=Ar)continue;let oo=[];if("Point"===wr||"MultiPoint"===wr)$(u,oo,fr,Ar,_r);else if("LineString"===wr)K(u,oo,fr,Ar,_r,!1,In.lineMetrics);else if("MultiLineString"===wr)ee(u,oo,fr,Ar,_r,!1);else if("Polygon"===wr)ee(u,oo,fr,Ar,_r,!0);else if("MultiPolygon"===wr)for(const Xe of u){const u=[];ee(Xe,u,fr,Ar,_r,!0),u.length&&oo.push(u)}if(oo.length){if(In.lineMetrics&&"LineString"===wr){for(const u of oo)io.push(J(Xe.id,wr,u,Xe.tags));continue}"LineString"!==wr&&"MultiLineString"!==wr||(1===oo.length?(wr="LineString",oo=oo[0]):wr="MultiLineString"),"Point"!==wr&&"MultiPoint"!==wr||(wr=3===oo.length?"Point":"MultiPoint"),io.push(J(Xe.id,wr,oo,Xe.tags))}}return io.length?io:null}function $(u,Xe,fr,Ar,_r){for(let wr=0;wr<u.length;wr+=3){const Kr=u[wr+_r];Kr>=fr&&Kr<=Ar&&te(Xe,u[wr],u[wr+1],u[wr+2])}}function K(u,Xe,fr,Ar,_r,wr,Kr){let In=Q(u);const io=0===_r?oe:ie;let no,oo,so=u.start;for(let ao=0;ao<u.length-3;ao+=3){const co=u[ao],go=u[ao+1],ho=u[ao+2],Co=u[ao+3],Io=u[ao+4],xo=0===_r?co:go,Mo=0===_r?Co:Io;let Po=!1;Kr&&(no=Math.sqrt(Math.pow(co-Co,2)+Math.pow(go-Io,2))),xo<fr?Mo>fr&&(oo=io(In,co,go,Co,Io,fr),Kr&&(In.start=so+no*oo)):xo>Ar?Mo<Ar&&(oo=io(In,co,go,Co,Io,Ar),Kr&&(In.start=so+no*oo)):te(In,co,go,ho),Mo<fr&&xo>=fr&&(oo=io(In,co,go,Co,Io,fr),Po=!0),Mo>Ar&&xo<=Ar&&(oo=io(In,co,go,Co,Io,Ar),Po=!0),!wr&&Po&&(Kr&&(In.end=so+no*oo),Xe.push(In),In=Q(u)),Kr&&(so+=no)}let ao=u.length-3;const co=u[ao],go=u[ao+1],ho=0===_r?co:go;ho>=fr&&ho<=Ar&&te(In,co,go,u[ao+2]),ao=In.length-3,wr&&ao>=3&&(In[ao]!==In[0]||In[ao+1]!==In[1])&&te(In,In[0],In[1],In[2]),In.length&&Xe.push(In)}function Q(u){const Xe=[];return Xe.size=u.size,Xe.start=u.start,Xe.end=u.end,Xe}function ee(u,Xe,fr,Ar,_r,wr){for(const Kr of u)K(Kr,Xe,fr,Ar,_r,wr,!1)}function te(u,Xe,fr,Ar){u.push(Xe,fr,Ar)}function oe(u,Xe,fr,Ar,_r,wr){const Kr=(wr-Xe)/(Ar-Xe);return te(u,wr,fr+(_r-fr)*Kr,1),Kr}function ie(u,Xe,fr,Ar,_r,wr){const Kr=(wr-fr)/(_r-fr);return te(u,Xe+(Ar-Xe)*Kr,wr,1),Kr}function se(u,Xe){const fr=[];for(let Ar=0;Ar<u.length;Ar++){const _r=u[Ar],wr=_r.type;let Kr;if("Point"===wr||"MultiPoint"===wr||"LineString"===wr)Kr=re(_r.geometry,Xe);else if("MultiLineString"===wr||"Polygon"===wr){Kr=[];for(const u of _r.geometry)Kr.push(re(u,Xe))}else if("MultiPolygon"===wr){Kr=[];for(const u of _r.geometry){const fr=[];for(const Ar of u)fr.push(re(Ar,Xe));Kr.push(fr)}}fr.push(J(_r.id,wr,Kr,_r.tags))}return fr}function re(u,Xe){const fr=[];fr.size=u.size,void 0!==u.start&&(fr.start=u.start,fr.end=u.end);for(let Ar=0;Ar<u.length;Ar+=3)fr.push(u[Ar]+Xe,u[Ar+1],u[Ar+2]);return fr}function ne(u,Xe){if(u.transformed)return u;const fr=1<<u.z,Ar=u.x,_r=u.y;for(const wr of u.features){const u=wr.geometry,Kr=wr.type;if(wr.geometry=[],1===Kr)for(let Kr=0;Kr<u.length;Kr+=2)wr.geometry.push(ae(u[Kr],u[Kr+1],Xe,fr,Ar,_r));else for(let Kr=0;Kr<u.length;Kr++){const In=[];for(let wr=0;wr<u[Kr].length;wr+=2)In.push(ae(u[Kr][wr],u[Kr][wr+1],Xe,fr,Ar,_r));wr.geometry.push(In)}}return u.transformed=!0,u}function ae(u,Xe,fr,Ar,_r,wr){return[Math.round(fr*(u*Ar-_r)),Math.round(fr*(Xe*Ar-wr))]}function le(u,Xe,fr,Ar,_r){const wr=Xe===_r.maxZoom?0:_r.tolerance/((1<<Xe)*_r.extent),Kr={features:[],numPoints:0,numSimplified:0,numFeatures:u.length,source:null,x:fr,y:Ar,z:Xe,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Xe of u)ce(Kr,Xe,wr,_r);return Kr}function ce(u,Xe,fr,Ar){const _r=Xe.geometry,wr=Xe.type,Kr=[];if(u.minX=Math.min(u.minX,Xe.minX),u.minY=Math.min(u.minY,Xe.minY),u.maxX=Math.max(u.maxX,Xe.maxX),u.maxY=Math.max(u.maxY,Xe.maxY),"Point"===wr||"MultiPoint"===wr)for(let Xe=0;Xe<_r.length;Xe+=3)Kr.push(_r[Xe],_r[Xe+1]),u.numPoints++,u.numSimplified++;else if("LineString"===wr)ue(Kr,_r,u,fr,!1,!1);else if("MultiLineString"===wr||"Polygon"===wr)for(let Xe=0;Xe<_r.length;Xe++)ue(Kr,_r[Xe],u,fr,"Polygon"===wr,0===Xe);else if("MultiPolygon"===wr)for(let Xe=0;Xe<_r.length;Xe++){const Ar=_r[Xe];for(let Xe=0;Xe<Ar.length;Xe++)ue(Kr,Ar[Xe],u,fr,!0,0===Xe)}if(Kr.length){let fr=Xe.tags||null;if("LineString"===wr&&Ar.lineMetrics){fr={};for(const u in Xe.tags)fr[u]=Xe.tags[u];fr.mapbox_clip_start=_r.start/_r.size,fr.mapbox_clip_end=_r.end/_r.size}const In={geometry:Kr,type:"Polygon"===wr||"MultiPolygon"===wr?3:"LineString"===wr||"MultiLineString"===wr?2:1,tags:fr};null!==Xe.id&&(In.id=Xe.id),u.features.push(In)}}function ue(u,Xe,fr,Ar,_r,wr){const Kr=Ar*Ar;if(Ar>0&&Xe.size<(_r?Kr:Ar))return void(fr.numPoints+=Xe.length/3);const In=[];for(let u=0;u<Xe.length;u+=3)(0===Ar||Xe[u+2]>Kr)&&(fr.numSimplified++,In.push(Xe[u],Xe[u+1])),fr.numPoints++;_r&&function(u,Xe){let fr=0;for(let Xe=0,Ar=u.length,_r=Ar-2;Xe<Ar;_r=Xe,Xe+=2)fr+=(u[Xe]-u[_r])*(u[Xe+1]+u[_r+1]);if(fr>0===Xe)for(let Xe=0,fr=u.length;Xe<fr/2;Xe+=2){const Ar=u[Xe],_r=u[Xe+1];u[Xe]=u[fr-2-Xe],u[Xe+1]=u[fr-1-Xe],u[fr-2-Xe]=Ar,u[fr-1-Xe]=_r}}(In,wr),u.push(In)}const Co={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class de{constructor(u,Xe){const fr=(Xe=this.options=function(u,Xe){for(const fr in Xe)u[fr]=Xe[fr];return u}(Object.create(Co),Xe)).debug;if(fr&&console.time("preprocess data"),Xe.maxZoom<0||Xe.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Xe.promoteId&&Xe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ar=function(u,Xe){const fr=[];if("FeatureCollection"===u.type)for(let Ar=0;Ar<u.features.length;Ar++)Y(fr,u.features[Ar],Xe,Ar);else Y(fr,"Feature"===u.type?u:{geometry:u},Xe);return fr}(u,Xe);this.tiles={},this.tileCoords=[],fr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Xe.indexMaxZoom,Xe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ar=function(u,Xe){const fr=Xe.buffer/Xe.extent;let Ar=u;const _r=U(u,1,-1-fr,fr,0,-1,2,Xe),wr=U(u,1,1-fr,2+fr,0,-1,2,Xe);return(_r||wr)&&(Ar=U(u,1,-fr,1+fr,0,-1,2,Xe)||[],_r&&(Ar=se(_r,1).concat(Ar)),wr&&(Ar=Ar.concat(se(wr,-1)))),Ar}(Ar,Xe),Ar.length&&this.splitTile(Ar,0,0,0),fr&&(Ar.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(u,Xe,fr,Ar,_r,wr,Kr){const In=[u,Xe,fr,Ar],io=this.options,no=io.debug;for(;In.length;){Ar=In.pop(),fr=In.pop(),Xe=In.pop(),u=In.pop();const oo=1<<Xe,so=fe(Xe,fr,Ar);let ao=this.tiles[so];if(!ao&&(no>1&&console.time("creation"),ao=this.tiles[so]=le(u,Xe,fr,Ar,io),this.tileCoords.push({z:Xe,x:fr,y:Ar}),no)){no>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Xe,fr,Ar,ao.numFeatures,ao.numPoints,ao.numSimplified),console.timeEnd("creation"));const u=`z${Xe}`;this.stats[u]=(this.stats[u]||0)+1,this.total++}if(ao.source=u,null==_r){if(Xe===io.indexMaxZoom||ao.numPoints<=io.indexMaxPoints)continue}else{if(Xe===io.maxZoom||Xe===_r)continue;if(null!=_r){const u=_r-Xe;if(fr!==wr>>u||Ar!==Kr>>u)continue}}if(ao.source=null,0===u.length)continue;no>1&&console.time("clipping");const co=.5*io.buffer/io.extent,go=.5-co,ho=.5+co,Co=1+co;let Io=null,xo=null,Mo=null,Po=null,ss=U(u,oo,fr-co,fr+ho,0,ao.minX,ao.maxX,io),sa=U(u,oo,fr+go,fr+Co,0,ao.minX,ao.maxX,io);u=null,ss&&(Io=U(ss,oo,Ar-co,Ar+ho,1,ao.minY,ao.maxY,io),xo=U(ss,oo,Ar+go,Ar+Co,1,ao.minY,ao.maxY,io),ss=null),sa&&(Mo=U(sa,oo,Ar-co,Ar+ho,1,ao.minY,ao.maxY,io),Po=U(sa,oo,Ar+go,Ar+Co,1,ao.minY,ao.maxY,io),sa=null),no>1&&console.timeEnd("clipping"),In.push(Io||[],Xe+1,2*fr,2*Ar),In.push(xo||[],Xe+1,2*fr,2*Ar+1),In.push(Mo||[],Xe+1,2*fr+1,2*Ar),In.push(Po||[],Xe+1,2*fr+1,2*Ar+1)}}getTile(u,Xe,fr){u=+u,Xe=+Xe,fr=+fr;const Ar=this.options,{extent:_r,debug:wr}=Ar;if(u<0||u>24)return null;const Kr=1<<u,In=fe(u,Xe=Xe+Kr&Kr-1,fr);if(this.tiles[In])return ne(this.tiles[In],_r);wr>1&&console.log("drilling down to z%d-%d-%d",u,Xe,fr);let io,no=u,oo=Xe,so=fr;for(;!io&&no>0;)no--,oo>>=1,so>>=1,io=this.tiles[fe(no,oo,so)];return io&&io.source?(wr>1&&(console.log("found parent tile z%d-%d-%d",no,oo,so),console.time("drilling down")),this.splitTile(io.source,no,oo,so,u,Xe,fr),wr>1&&console.timeEnd("drilling down"),this.tiles[In]?ne(this.tiles[In],_r):null):null}}function fe(u,Xe,fr){return 32*((1<<u)*fr+Xe)+u}function ge(u,Xe){return Xe?u.properties[Xe]:u.id}function pe(u,Xe){if(null==u)return!0;if("Feature"===u.type)return null!=ge(u,Xe);if("FeatureCollection"===u.type){const fr=new Set;for(const Ar of u.features){const u=ge(Ar,Xe);if(null==u)return!1;if(fr.has(u))return!1;fr.add(u)}return!0}return!1}function me(u,Xe){const fr=new Map;if(null==u);else if("Feature"===u.type)fr.set(ge(u,Xe),u);else for(const Ar of u.features)fr.set(ge(Ar,Xe),Ar);return fr}class ye extends r{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(Xe,Ar){return u._(this,void 0,void 0,(function*(){const Ar=Xe.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const _r=this._geoJSONIndex.getTile(Ar.z,Ar.x,Ar.y);if(!_r)return null;const wr=new class{constructor(Xe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=u.X,this.length=Xe.length,this._features=Xe}feature(Xe){return new class{constructor(Xe){this._feature=Xe,this.extent=u.X,this.type=Xe.type,this.properties=Xe.tags,"id"in Xe&&!isNaN(Xe.id)&&(this.id=parseInt(Xe.id,10))}loadGeometry(){if(1===this._feature.type){const Xe=[];for(const fr of this._feature.geometry)Xe.push([new u.P(fr[0],fr[1])]);return Xe}{const Xe=[];for(const fr of this._feature.geometry){const Ar=[];for(const Xe of fr)Ar.push(new u.P(Xe[0],Xe[1]));Xe.push(Ar)}return Xe}}toGeoJSON(u,Xe,Ar){return fr.call(this,u,Xe,Ar)}}(this._features[Xe])}}(_r.features);let Kr=no(wr);return 0===Kr.byteOffset&&Kr.byteLength===Kr.buffer.byteLength||(Kr=new Uint8Array(Kr)),{vectorTile:wr,rawData:Kr.buffer}}))}loadData(Xe){return u._(this,void 0,void 0,(function*(){var fr;null===(fr=this._pendingRequest)||void 0===fr||fr.abort();const Ar=!!(Xe&&Xe.request&&Xe.request.collectResourceTiming)&&new u.bu(Xe.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(Xe,this._pendingRequest),this._geoJSONIndex=Xe.cluster?new z(function({superclusterOptions:Xe,clusterProperties:fr}){if(!fr||!Xe)return Xe;const Ar={},_r={},wr={accumulated:null,zoom:0},Kr={properties:null},In=Object.keys(fr);for(const Xe of In){const[wr,Kr]=fr[Xe],In=u.bB(Kr),io=u.bB("string"==typeof wr?[wr,["accumulated"],["get",Xe]]:wr);Ar[Xe]=In.value,_r[Xe]=io.value}return Xe.map=u=>{Kr.properties=u;const Xe={};for(const u of In)Xe[u]=Ar[u].evaluate(wr,Kr);return Xe},Xe.reduce=(u,Xe)=>{Kr.properties=Xe;for(const Xe of In)wr.accumulated=u[Xe],u[Xe]=_r[Xe].evaluate(wr,Kr)},Xe}(Xe)).load((yield this._pendingData).features):(_r=yield this._pendingData,new de(_r,Xe.geojsonVtOptions)),this.loaded={};const fr={};if(Ar){const u=Ar.finish();u&&(fr.resourceTiming={},fr.resourceTiming[Xe.source]=JSON.parse(JSON.stringify(u)))}return fr}catch(Xe){if(delete this._pendingRequest,u.bA(Xe))return{abandoned:!0};throw Xe}var _r}))}getData(){return u._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(u){const Xe=this.loaded;return Xe&&Xe[u.uid]?super.reloadTile(u):this.loadTile(u)}loadAndProcessGeoJSON(fr,Ar){return u._(this,void 0,void 0,(function*(){let _r=yield this.loadGeoJSON(fr,Ar);if(delete this._pendingRequest,"object"!=typeof _r)throw new Error(`Input data given to '${fr.source}' is not a valid GeoJSON object.`);if(Xe(_r,!0),fr.filter){const Xe=u.bB(fr.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===Xe.result)throw new Error(Xe.value.map((u=>`${u.key}: ${u.message}`)).join(", "));const Ar=_r.features.filter((u=>Xe.value.evaluate({zoom:0},u)));_r={type:"FeatureCollection",features:Ar}}return _r}))}loadGeoJSON(Xe,fr){return u._(this,void 0,void 0,(function*(){const{promoteId:Ar}=Xe;if(Xe.request){const _r=yield u.h(Xe.request,fr);return this._dataUpdateable=pe(_r.data,Ar)?me(_r.data,Ar):void 0,_r.data}if("string"==typeof Xe.data)try{const u=JSON.parse(Xe.data);return this._dataUpdateable=pe(u,Ar)?me(u,Ar):void 0,u}catch(u){throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`)}if(!Xe.dataDiff)throw new Error(`Input data given to '${Xe.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Xe.source}`);return function(u,Xe,fr){var Ar,_r,wr,Kr;if(Xe.removeAll&&u.clear(),Xe.remove)for(const fr of Xe.remove)u.delete(fr);if(Xe.add)for(const Ar of Xe.add){const Xe=ge(Ar,fr);null!=Xe&&u.set(Xe,Ar)}if(Xe.update)for(const fr of Xe.update){let Xe=u.get(fr.id);if(null==Xe)continue;const In=!fr.removeAllProperties&&((null===(Ar=fr.removeProperties)||void 0===Ar?void 0:Ar.length)>0||(null===(_r=fr.addOrUpdateProperties)||void 0===_r?void 0:_r.length)>0);if((fr.newGeometry||fr.removeAllProperties||In)&&(Xe=Object.assign({},Xe),u.set(fr.id,Xe),In&&(Xe.properties=Object.assign({},Xe.properties))),fr.newGeometry&&(Xe.geometry=fr.newGeometry),fr.removeAllProperties)Xe.properties={};else if((null===(wr=fr.removeProperties)||void 0===wr?void 0:wr.length)>0)for(const u of fr.removeProperties)Object.prototype.hasOwnProperty.call(Xe.properties,u)&&delete Xe.properties[u];if((null===(Kr=fr.addOrUpdateProperties)||void 0===Kr?void 0:Kr.length)>0)for(const{key:u,value:Ar}of fr.addOrUpdateProperties)Xe.properties[u]=Ar}}(this._dataUpdateable,Xe.dataDiff,Ar),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(Xe){return u._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(u){return this._geoJSONIndex.getClusterExpansionZoom(u.clusterId)}getClusterChildren(u){return this._geoJSONIndex.getChildren(u.clusterId)}getClusterLeaves(u){return this._geoJSONIndex.getLeaves(u.clusterId,u.limit,u.offset)}}class ve{constructor(Xe){this.self=Xe,this.actor=new u.F(Xe),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(u,Xe)=>{if(this.externalWorkerSourceTypes[u])throw new Error(`Worker source with name "${u}" already registered.`);this.externalWorkerSourceTypes[u]=Xe},this.self.addProtocol=u.bh,this.self.removeProtocol=u.bi,this.self.registerRTLTextPlugin=Xe=>{if(u.bC.isParsed())throw new Error("RTL text plugin already registered.");u.bC.setMethods(Xe)},this.actor.registerMessageHandler("LDT",((u,Xe)=>this._getDEMWorkerSource(u,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RDT",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Xe,fr.source).removeTile(fr)})))),this.actor.registerMessageHandler("GCEZ",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterExpansionZoom(fr)})))),this.actor.registerMessageHandler("GCC",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterChildren(fr)})))),this.actor.registerMessageHandler("GCL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){return this._getWorkerSource(Xe,fr.type,fr.source).getClusterLeaves(fr)})))),this.actor.registerMessageHandler("LD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadData(Xe))),this.actor.registerMessageHandler("GD",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).getData())),this.actor.registerMessageHandler("LT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).loadTile(Xe))),this.actor.registerMessageHandler("RT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).reloadTile(Xe))),this.actor.registerMessageHandler("AT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).abortTile(Xe))),this.actor.registerMessageHandler("RMT",((u,Xe)=>this._getWorkerSource(u,Xe.type,Xe.source).removeTile(Xe))),this.actor.registerMessageHandler("RS",((Xe,fr)=>u._(this,void 0,void 0,(function*(){if(!this.workerSources[Xe]||!this.workerSources[Xe][fr.type]||!this.workerSources[Xe][fr.type][fr.source])return;const u=this.workerSources[Xe][fr.type][fr.source];delete this.workerSources[Xe][fr.type][fr.source],void 0!==u.removeSource&&u.removeSource(fr)})))),this.actor.registerMessageHandler("RM",(Xe=>u._(this,void 0,void 0,(function*(){delete this.layerIndexes[Xe],delete this.availableImages[Xe],delete this.workerSources[Xe],delete this.demWorkerSources[Xe]})))),this.actor.registerMessageHandler("SR",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this.referrer=fr})))),this.actor.registerMessageHandler("SRPS",((u,Xe)=>this._syncRTLPluginState(u,Xe))),this.actor.registerMessageHandler("IS",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this.self.importScripts(fr)})))),this.actor.registerMessageHandler("SI",((u,Xe)=>this._setImages(u,Xe))),this.actor.registerMessageHandler("UL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).update(fr.layers,fr.removedIds)})))),this.actor.registerMessageHandler("SL",((Xe,fr)=>u._(this,void 0,void 0,(function*(){this._getLayerIndex(Xe).replace(fr)}))))}_setImages(Xe,fr){return u._(this,void 0,void 0,(function*(){this.availableImages[Xe]=fr;for(const u in this.workerSources[Xe]){const Ar=this.workerSources[Xe][u];for(const u in Ar)Ar[u].availableImages=fr}}))}_syncRTLPluginState(Xe,fr){return u._(this,void 0,void 0,(function*(){if(u.bC.isParsed())return u.bC.getState();if("loading"!==fr.pluginStatus)return u.bC.setState(fr),fr;const Xe=fr.pluginURL;if(this.self.importScripts(Xe),u.bC.isParsed()){const fr={pluginStatus:"loaded",pluginURL:Xe};return u.bC.setState(fr),fr}throw u.bC.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Xe}`)}))}_getAvailableImages(u){let Xe=this.availableImages[u];return Xe||(Xe=[]),Xe}_getLayerIndex(u){let Xe=this.layerIndexes[u];return Xe||(Xe=this.layerIndexes[u]=new t),Xe}_getWorkerSource(u,Xe,fr){if(this.workerSources[u]||(this.workerSources[u]={}),this.workerSources[u][Xe]||(this.workerSources[u][Xe]={}),!this.workerSources[u][Xe][fr]){const Ar={sendAsync:(Xe,fr)=>(Xe.targetMapId=u,this.actor.sendAsync(Xe,fr))};switch(Xe){case"vector":this.workerSources[u][Xe][fr]=new r(Ar,this._getLayerIndex(u),this._getAvailableImages(u));break;case"geojson":this.workerSources[u][Xe][fr]=new ye(Ar,this._getLayerIndex(u),this._getAvailableImages(u));break;default:this.workerSources[u][Xe][fr]=new this.externalWorkerSourceTypes[Xe](Ar,this._getLayerIndex(u),this._getAvailableImages(u))}}return this.workerSources[u][Xe][fr]}_getDEMWorkerSource(u,Xe){return this.demWorkerSources[u]||(this.demWorkerSources[u]={}),this.demWorkerSources[u][Xe]||(this.demWorkerSources[u][Xe]=new n),this.demWorkerSources[u][Xe]}}return u.i(self)&&(self.worker=new ve(self)),ve})),define("index",0,(function(u,Xe){var fr="4.6.0";let Ar,_r;const wr={now:"undefined"!=typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:u=>new Promise(((fr,Ar)=>{const _r=requestAnimationFrame(fr);u.signal.addEventListener("abort",(()=>{cancelAnimationFrame(_r),Ar(Xe.c())}))})),getImageData(u,Xe=0){return this.getImageCanvasContext(u).getImageData(-Xe,-Xe,u.width+2*Xe,u.height+2*Xe)},getImageCanvasContext(u){const Xe=window.document.createElement("canvas"),fr=Xe.getContext("2d",{willReadFrequently:!0});if(!fr)throw new Error("failed to create canvas 2d context");return Xe.width=u.width,Xe.height=u.height,fr.drawImage(u,0,0,u.width,u.height),fr},resolveURL:u=>(Ar||(Ar=document.createElement("a")),Ar.href=u,Ar.href),hardwareConcurrency:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==_r&&(_r=matchMedia("(prefers-reduced-motion: reduce)")),_r.matches)}};class r{static testProp(u){if(!r.docStyle)return u[0];for(let Xe=0;Xe<u.length;Xe++)if(u[Xe]in r.docStyle)return u[Xe];return u[0]}static create(u,Xe,fr){const Ar=window.document.createElement(u);return void 0!==Xe&&(Ar.className=Xe),fr&&fr.appendChild(Ar),Ar}static createNS(u,Xe){return window.document.createElementNS(u,Xe)}static disableDrag(){r.docStyle&&r.selectProp&&(r.userSelect=r.docStyle[r.selectProp],r.docStyle[r.selectProp]="none")}static enableDrag(){r.docStyle&&r.selectProp&&(r.docStyle[r.selectProp]=r.userSelect)}static setTransform(u,Xe){u.style[r.transformProp]=Xe}static addEventListener(u,Xe,fr,Ar={}){u.addEventListener(Xe,fr,"passive"in Ar?Ar:Ar.capture)}static removeEventListener(u,Xe,fr,Ar={}){u.removeEventListener(Xe,fr,"passive"in Ar?Ar:Ar.capture)}static suppressClickInternal(u){u.preventDefault(),u.stopPropagation(),window.removeEventListener("click",r.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",r.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",r.suppressClickInternal,!0)}),0)}static getScale(u){const Xe=u.getBoundingClientRect();return{x:Xe.width/u.offsetWidth||1,y:Xe.height/u.offsetHeight||1,boundingClientRect:Xe}}static getPoint(u,fr,Ar){const _r=fr.boundingClientRect;return new Xe.P((Ar.clientX-_r.left)/fr.x-u.clientLeft,(Ar.clientY-_r.top)/fr.y-u.clientTop)}static mousePos(u,Xe){const fr=r.getScale(u);return r.getPoint(u,fr,Xe)}static touchPos(u,Xe){const fr=[],Ar=r.getScale(u);for(let _r=0;_r<Xe.length;_r++)fr.push(r.getPoint(u,Ar,Xe[_r]));return fr}static mouseButton(u){return u.button}static remove(u){u.parentNode&&u.parentNode.removeChild(u)}}r.docStyle="undefined"!=typeof window&&window.document&&window.document.documentElement.style,r.selectProp=r.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),r.transformProp=r.testProp(["transform","WebkitTransform"]);const Kr={supported:!1,testSupport:function(u){!no&&io&&(oo?d(u):In=u)}};let In,io,no=!1,oo=!1;function d(u){const Xe=u.createTexture();u.bindTexture(u.TEXTURE_2D,Xe);try{if(u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,io),u.isContextLost())return;Kr.supported=!0}catch(u){}u.deleteTexture(Xe),no=!0}var so;"undefined"!=typeof document&&(io=document.createElement("img"),io.onload=()=>{In&&d(In),In=null,oo=!0},io.onerror=()=>{no=!0,In=null},io.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(u){let fr,Ar,_r,wr;u.resetRequestQueue=()=>{fr=[],Ar=0,_r=0,wr={}},u.addThrottleControl=u=>{const Xe=_r++;return wr[Xe]=u,Xe},u.removeThrottleControl=u=>{delete wr[u],l()},u.getImage=(u,Ar,_r=!0)=>new Promise(((wr,In)=>{Kr.supported&&(u.headers||(u.headers={}),u.headers.accept="image/webp,*/*"),Xe.e(u,{type:"image"}),fr.push({abortController:Ar,requestParameters:u,supportImageRefresh:_r,state:"queued",onError:u=>{In(u)},onSuccess:u=>{wr(u)}}),l()}));const r=u=>Xe._(this,void 0,void 0,(function*(){u.state="running";const{requestParameters:fr,supportImageRefresh:_r,onError:wr,onSuccess:Kr,abortController:In}=u,io=!1===_r&&!Xe.i(self)&&!Xe.g(fr.url)&&(!fr.headers||Object.keys(fr.headers).reduce(((u,Xe)=>u&&"accept"===Xe),!0));Ar++;const no=io?h(fr,In):Xe.m(fr,In);try{const fr=yield no;delete u.abortController,u.state="completed",fr.data instanceof HTMLImageElement||Xe.b(fr.data)?Kr(fr):fr.data&&Kr({data:yield(oo=fr.data,"function"==typeof createImageBitmap?Xe.d(oo):Xe.f(oo)),cacheControl:fr.cacheControl,expires:fr.expires})}catch(Xe){delete u.abortController,wr(Xe)}finally{Ar--,l()}var oo})),l=()=>{const u=(()=>{for(const u of Object.keys(wr))if(wr[u]())return!0;return!1})()?Xe.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:Xe.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Xe=Ar;Xe<u&&fr.length>0;Xe++){const u=fr.shift();u.abortController.signal.aborted?Xe--:r(u)}},h=(u,fr)=>new Promise(((Ar,_r)=>{const wr=new Image,Kr=u.url,In=u.credentials;In&&"include"===In?wr.crossOrigin="use-credentials":(In&&"same-origin"===In||!Xe.s(Kr))&&(wr.crossOrigin="anonymous"),fr.signal.addEventListener("abort",(()=>{wr.src="",_r(Xe.c())})),wr.fetchPriority="high",wr.onload=()=>{wr.onerror=wr.onload=null,Ar({data:wr})},wr.onerror=()=>{wr.onerror=wr.onload=null,fr.signal.aborted||_r(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."))},wr.src=Kr}))}(so||(so={})),so.resetRequestQueue();class p{constructor(u){this._transformRequestFn=u}transformRequest(u,Xe){return this._transformRequestFn&&this._transformRequestFn(u,Xe)||{url:u}}setTransformRequest(u){this._transformRequestFn=u}}function m(u){var fr=new Xe.A(3);return fr[0]=u[0],fr[1]=u[1],fr[2]=u[2],fr}var ao,g=function(u,Xe,fr){return u[0]=Xe[0]-fr[0],u[1]=Xe[1]-fr[1],u[2]=Xe[2]-fr[2],u};ao=new Xe.A(3),Xe.A!=Float32Array&&(ao[0]=0,ao[1]=0,ao[2]=0);var v=function(u){var Xe=u[0],fr=u[1];return Xe*Xe+fr*fr};function x(u){const Xe=[];if("string"==typeof u)Xe.push({id:"default",url:u});else if(u&&u.length>0){const fr=[];for(const{id:Ar,url:_r}of u){const u=`${Ar}${_r}`;-1===fr.indexOf(u)&&(fr.push(u),Xe.push({id:Ar,url:_r}))}}return Xe}function y(u,Xe,fr){const Ar=u.split("?");return Ar[0]+=`${Xe}${fr}`,Ar.join("?")}!function(){var u=new Xe.A(2);Xe.A!=Float32Array&&(u[0]=0,u[1]=0)}();class b{constructor(u,Xe,fr,Ar){this.context=u,this.format=fr,this.texture=u.gl.createTexture(),this.update(Xe,Ar)}update(u,fr,Ar){const{width:_r,height:wr}=u,Kr=!(this.size&&this.size[0]===_r&&this.size[1]===wr||Ar),{context:In}=this,{gl:io}=In;if(this.useMipmap=Boolean(fr&&fr.useMipmap),io.bindTexture(io.TEXTURE_2D,this.texture),In.pixelStoreUnpackFlipY.set(!1),In.pixelStoreUnpack.set(1),In.pixelStoreUnpackPremultiplyAlpha.set(this.format===io.RGBA&&(!fr||!1!==fr.premultiply)),Kr)this.size=[_r,wr],u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?io.texImage2D(io.TEXTURE_2D,0,this.format,this.format,io.UNSIGNED_BYTE,u):io.texImage2D(io.TEXTURE_2D,0,this.format,_r,wr,0,this.format,io.UNSIGNED_BYTE,u.data);else{const{x:fr,y:Kr}=Ar||{x:0,y:0};u instanceof HTMLImageElement||u instanceof HTMLCanvasElement||u instanceof HTMLVideoElement||u instanceof ImageData||Xe.b(u)?io.texSubImage2D(io.TEXTURE_2D,0,fr,Kr,io.RGBA,io.UNSIGNED_BYTE,u):io.texSubImage2D(io.TEXTURE_2D,0,fr,Kr,_r,wr,io.RGBA,io.UNSIGNED_BYTE,u.data)}this.useMipmap&&this.isSizePowerOfTwo()&&io.generateMipmap(io.TEXTURE_2D)}bind(u,Xe,fr){const{context:Ar}=this,{gl:_r}=Ar;_r.bindTexture(_r.TEXTURE_2D,this.texture),fr!==_r.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(fr=_r.LINEAR),u!==this.filter&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MAG_FILTER,u),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_MIN_FILTER,fr||u),this.filter=u),Xe!==this.wrap&&(_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_S,Xe),_r.texParameteri(_r.TEXTURE_2D,_r.TEXTURE_WRAP_T,Xe),this.wrap=Xe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:u}=this.context;u.deleteTexture(this.texture),this.texture=null}}function w(u){const{userImage:Xe}=u;return!!(Xe&&Xe.render&&Xe.render())&&(u.data.replace(new Uint8Array(Xe.data.buffer)),!0)}class T extends Xe.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new Xe.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(u){if(this.loaded!==u&&(this.loaded=u,u)){for(const{ids:u,promiseResolve:Xe}of this.requestors)Xe(this._getImagesForIds(u));this.requestors=[]}}getImage(u){const fr=this.images[u];if(fr&&!fr.data&&fr.spriteData){const u=fr.spriteData;fr.data=new Xe.R({width:u.width,height:u.height},u.context.getImageData(u.x,u.y,u.width,u.height).data),fr.spriteData=null}return fr}addImage(u,Xe){if(this.images[u])throw new Error(`Image id ${u} already exist, use updateImage instead`);this._validate(u,Xe)&&(this.images[u]=Xe)}_validate(u,fr){let Ar=!0;const _r=fr.data||fr.spriteData;return this._validateStretch(fr.stretchX,_r&&_r.width)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchX" value`))),Ar=!1),this._validateStretch(fr.stretchY,_r&&_r.height)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "stretchY" value`))),Ar=!1),this._validateContent(fr.content,fr)||(this.fire(new Xe.j(new Error(`Image "${u}" has invalid "content" value`))),Ar=!1),Ar}_validateStretch(u,Xe){if(!u)return!0;let fr=0;for(const Ar of u){if(Ar[0]<fr||Ar[1]<Ar[0]||Xe<Ar[1])return!1;fr=Ar[1]}return!0}_validateContent(u,Xe){if(!u)return!0;if(4!==u.length)return!1;const fr=Xe.spriteData,Ar=fr&&fr.width||Xe.data.width,_r=fr&&fr.height||Xe.data.height;return!(u[0]<0||Ar<u[0]||u[1]<0||_r<u[1]||u[2]<0||Ar<u[2]||u[3]<0||_r<u[3]||u[2]<u[0]||u[3]<u[1])}updateImage(u,Xe,fr=!0){const Ar=this.getImage(u);if(fr&&(Ar.data.width!==Xe.data.width||Ar.data.height!==Xe.data.height))throw new Error(`size mismatch between old image (${Ar.data.width}x${Ar.data.height}) and new image (${Xe.data.width}x${Xe.data.height}).`);Xe.version=Ar.version+1,this.images[u]=Xe,this.updatedImages[u]=!0}removeImage(u){const Xe=this.images[u];delete this.images[u],delete this.patterns[u],Xe.userImage&&Xe.userImage.onRemove&&Xe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(u){return new Promise(((Xe,fr)=>{let Ar=!0;if(!this.isLoaded())for(const Xe of u)this.images[Xe]||(Ar=!1);this.isLoaded()||Ar?Xe(this._getImagesForIds(u)):this.requestors.push({ids:u,promiseResolve:Xe})}))}_getImagesForIds(u){const fr={};for(const Ar of u){let u=this.getImage(Ar);u||(this.fire(new Xe.k("styleimagemissing",{id:Ar})),u=this.getImage(Ar)),u?fr[Ar]={data:u.data.clone(),pixelRatio:u.pixelRatio,sdf:u.sdf,version:u.version,stretchX:u.stretchX,stretchY:u.stretchY,content:u.content,textFitWidth:u.textFitWidth,textFitHeight:u.textFitHeight,hasRenderCallback:Boolean(u.userImage&&u.userImage.render)}:Xe.w(`Image "${Ar}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return fr}getPixelSize(){const{width:u,height:Xe}=this.atlasImage;return{width:u,height:Xe}}getPattern(u){const fr=this.patterns[u],Ar=this.getImage(u);if(!Ar)return null;if(fr&&fr.position.version===Ar.version)return fr.position;if(fr)fr.position.version=Ar.version;else{const fr={w:Ar.data.width+2,h:Ar.data.height+2,x:0,y:0},_r=new Xe.I(fr,Ar);this.patterns[u]={bin:fr,position:_r}}return this._updatePatternAtlas(),this.patterns[u].position}bind(u){const Xe=u.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new b(u,this.atlasImage,Xe.RGBA),this.atlasTexture.bind(Xe.LINEAR,Xe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const u=[];for(const Xe in this.patterns)u.push(this.patterns[Xe].bin);const{w:fr,h:Ar}=Xe.p(u),_r=this.atlasImage;_r.resize({width:fr||1,height:Ar||1});for(const u in this.patterns){const{bin:fr}=this.patterns[u],Ar=fr.x+1,wr=fr.y+1,Kr=this.getImage(u).data,In=Kr.width,io=Kr.height;Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar,y:wr},{width:In,height:io}),Xe.R.copy(Kr,_r,{x:0,y:io-1},{x:Ar,y:wr-1},{width:In,height:1}),Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar,y:wr+io},{width:In,height:1}),Xe.R.copy(Kr,_r,{x:In-1,y:0},{x:Ar-1,y:wr},{width:1,height:io}),Xe.R.copy(Kr,_r,{x:0,y:0},{x:Ar+In,y:wr},{width:1,height:io})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(u){for(const fr of u){if(this.callbackDispatchedThisFrame[fr])continue;this.callbackDispatchedThisFrame[fr]=!0;const u=this.getImage(fr);u||Xe.w(`Image with ID: "${fr}" was not found`),w(u)&&this.updateImage(fr,u)}}}const co=1e20;function E(u,Xe,fr,Ar,_r,wr,Kr,In,io){for(let no=Xe;no<Xe+Ar;no++)P(u,fr*wr+no,wr,_r,Kr,In,io);for(let no=fr;no<fr+_r;no++)P(u,no*wr+Xe,1,Ar,Kr,In,io)}function P(u,Xe,fr,Ar,_r,wr,Kr){wr[0]=0,Kr[0]=-co,Kr[1]=co,_r[0]=u[Xe];for(let In=1,io=0,no=0;In<Ar;In++){_r[In]=u[Xe+In*fr];const Ar=In*In;do{const u=wr[io];no=(_r[In]-_r[u]+Ar-u*u)/(In-u)/2}while(no<=Kr[io]&&--io>-1);io++,wr[io]=In,Kr[io]=no,Kr[io+1]=co}for(let In=0,io=0;In<Ar;In++){for(;Kr[io+1]<In;)io++;const Ar=wr[io],no=In-Ar;u[Xe+In*fr]=_r[Ar]+no*no}}class C{constructor(u,Xe){this.requestManager=u,this.localIdeographFontFamily=Xe,this.entries={}}setURL(u){this.url=u}getGlyphs(u){return Xe._(this,void 0,void 0,(function*(){const Xe=[];for(const fr in u)for(const Ar of u[fr])Xe.push(this._getAndCacheGlyphsPromise(fr,Ar));const fr=yield Promise.all(Xe),Ar={};for(const{stack:u,id:Xe,glyph:_r}of fr)Ar[u]||(Ar[u]={}),Ar[u][Xe]=_r&&{id:_r.id,bitmap:_r.bitmap.clone(),metrics:_r.metrics};return Ar}))}_getAndCacheGlyphsPromise(u,fr){return Xe._(this,void 0,void 0,(function*(){let Xe=this.entries[u];Xe||(Xe=this.entries[u]={glyphs:{},requests:{},ranges:{}});let Ar=Xe.glyphs[fr];if(void 0!==Ar)return{stack:u,id:fr,glyph:Ar};if(Ar=this._tinySDF(Xe,u,fr),Ar)return Xe.glyphs[fr]=Ar,{stack:u,id:fr,glyph:Ar};const _r=Math.floor(fr/256);if(256*_r>65535)throw new Error("glyphs > 65535 not supported");if(Xe.ranges[_r])return{stack:u,id:fr,glyph:Ar};if(!this.url)throw new Error("glyphsUrl is not set");if(!Xe.requests[_r]){const fr=C.loadGlyphRange(u,_r,this.url,this.requestManager);Xe.requests[_r]=fr}const wr=yield Xe.requests[_r];for(const u in wr)this._doesCharSupportLocalGlyph(+u)||(Xe.glyphs[+u]=wr[+u]);return Xe.ranges[_r]=!0,{stack:u,id:fr,glyph:wr[fr]||null}}))}_doesCharSupportLocalGlyph(u){return!!this.localIdeographFontFamily&&/\p{Ideo}|\p{sc=Hang}|\p{sc=Hira}|\p{sc=Kana}/u.test(String.fromCodePoint(u))}_tinySDF(u,fr,Ar){const _r=this.localIdeographFontFamily;if(!_r)return;if(!this._doesCharSupportLocalGlyph(Ar))return;let wr=u.tinySDF;if(!wr){let Xe="400";/bold/i.test(fr)?Xe="900":/medium/i.test(fr)?Xe="500":/light/i.test(fr)&&(Xe="200"),wr=u.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:_r,fontWeight:Xe})}const Kr=wr.draw(String.fromCharCode(Ar));return{id:Ar,bitmap:new Xe.o({width:Kr.width||60,height:Kr.height||60},Kr.data),metrics:{width:Kr.glyphWidth/2||24,height:Kr.glyphHeight/2||24,left:Kr.glyphLeft/2+.5||0,top:Kr.glyphTop/2-27.5||-8,advance:Kr.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(u,fr,Ar,_r){return Xe._(this,void 0,void 0,(function*(){const wr=256*fr,Kr=wr+255,In=_r.transformRequest(Ar.replace("{fontstack}",u).replace("{range}",`${wr}-${Kr}`),"Glyphs"),io=yield Xe.l(In,new AbortController);if(!io||!io.data)throw new Error(`Could not load glyph range. range: ${fr}, ${wr}-${Kr}`);const no={};for(const u of Xe.n(io.data))no[u.id]=u;return no}))},C.TinySDF=class{constructor({fontSize:u=24,buffer:Xe=3,radius:fr=8,cutoff:Ar=.25,fontFamily:_r="sans-serif",fontWeight:wr="normal",fontStyle:Kr="normal"}={}){this.buffer=Xe,this.cutoff=Ar,this.radius=fr;const In=this.size=u+4*Xe,io=this._createCanvas(In),no=this.ctx=io.getContext("2d",{willReadFrequently:!0});no.font=`${Kr} ${wr} ${u}px ${_r}`,no.textBaseline="alphabetic",no.textAlign="left",no.fillStyle="black",this.gridOuter=new Float64Array(In*In),this.gridInner=new Float64Array(In*In),this.f=new Float64Array(In),this.z=new Float64Array(In+1),this.v=new Uint16Array(In)}_createCanvas(u){const Xe=document.createElement("canvas");return Xe.width=Xe.height=u,Xe}draw(u){const{width:Xe,actualBoundingBoxAscent:fr,actualBoundingBoxDescent:Ar,actualBoundingBoxLeft:_r,actualBoundingBoxRight:wr}=this.ctx.measureText(u),Kr=Math.ceil(fr),In=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(wr-_r))),io=Math.min(this.size-this.buffer,Kr+Math.ceil(Ar)),no=In+2*this.buffer,oo=io+2*this.buffer,so=Math.max(no*oo,0),ao=new Uint8ClampedArray(so),go={data:ao,width:no,height:oo,glyphWidth:In,glyphHeight:io,glyphTop:Kr,glyphLeft:0,glyphAdvance:Xe};if(0===In||0===io)return go;const{ctx:ho,buffer:Co,gridInner:Io,gridOuter:xo}=this;ho.clearRect(Co,Co,In,io),ho.fillText(u,Co,Co+Kr);const Mo=ho.getImageData(Co,Co,In,io);xo.fill(co,0,so),Io.fill(0,0,so);for(let u=0;u<io;u++)for(let Xe=0;Xe<In;Xe++){const fr=Mo.data[4*(u*In+Xe)+3]/255;if(0===fr)continue;const Ar=(u+Co)*no+Xe+Co;if(1===fr)xo[Ar]=0,Io[Ar]=co;else{const u=.5-fr;xo[Ar]=u>0?u*u:0,Io[Ar]=u<0?u*u:0}}E(xo,0,0,no,oo,no,this.f,this.v,this.z),E(Io,Co,Co,In,io,no,this.f,this.v,this.z);for(let u=0;u<so;u++){const Xe=Math.sqrt(xo[u])-Math.sqrt(Io[u]);ao[u]=Math.round(255-255*(Xe/this.radius+this.cutoff))}return go}};class S{constructor(){this.specification=Xe.v.light.position}possiblyEvaluate(u,fr){return Xe.x(u.expression.evaluate(fr))}interpolate(u,fr,Ar){return{x:Xe.y.number(u.x,fr.x,Ar),y:Xe.y.number(u.y,fr.y,Ar),z:Xe.y.number(u.z,fr.z,Ar)}}}let go;class D extends Xe.E{constructor(u){super(),go=go||new Xe.q({anchor:new Xe.D(Xe.v.light.anchor),position:new S,color:new Xe.D(Xe.v.light.color),intensity:new Xe.D(Xe.v.light.intensity)}),this._transitionable=new Xe.T(go),this.setLight(u),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(u,fr={}){if(!this._validate(Xe.r,u,fr))for(const Xe in u){const fr=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),fr):this._transitionable.setValue(Xe,fr)}}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,fr,Ar){return(!Ar||!1!==Ar.validate)&&Xe.t(this,u.call(Xe.u,{value:fr,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v}))}}const ho=new Xe.q({"sky-color":new Xe.D(Xe.v.sky["sky-color"]),"horizon-color":new Xe.D(Xe.v.sky["horizon-color"]),"fog-color":new Xe.D(Xe.v.sky["fog-color"]),"fog-ground-blend":new Xe.D(Xe.v.sky["fog-ground-blend"]),"horizon-fog-blend":new Xe.D(Xe.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new Xe.D(Xe.v.sky["sky-horizon-blend"]),"atmosphere-blend":new Xe.D(Xe.v.sky["atmosphere-blend"])});class A extends Xe.E{constructor(u){super(),this._transitionable=new Xe.T(ho),this.setSky(u),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new Xe.z(0))}setSky(u,fr={}){if(!this._validate(Xe.B,u,fr)){u||(u={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent"});for(const Xe in u){const fr=u[Xe];Xe.endsWith("-transition")?this._transitionable.setTransition(Xe.slice(0,-11),fr):this._transitionable.setValue(Xe,fr)}}}getSky(){return this._transitionable.serialize()}updateTransitions(u){this._transitioning=this._transitionable.transitioned(u,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(u){this.properties=this._transitioning.possiblyEvaluate(u)}_validate(u,fr,Ar={}){return!1!==(null==Ar?void 0:Ar.validate)&&Xe.t(this,u.call(Xe.u,Xe.e({value:fr,style:{glyphs:!0,sprite:!0},styleSpec:Xe.v})))}calculateFogBlendOpacity(u){return u<60?0:u<70?(u-60)/10:1}}class R{constructor(u,Xe){this.width=u,this.height=Xe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(u,Xe){const fr=u.join(",")+String(Xe);return this.dashEntry[fr]||(this.dashEntry[fr]=this.addDash(u,Xe)),this.dashEntry[fr]}getDashRanges(u,Xe,fr){const Ar=[];let _r=u.length%2==1?-u[u.length-1]*fr:0,wr=u[0]*fr,Kr=!0;Ar.push({left:_r,right:wr,isDash:Kr,zeroLength:0===u[0]});let In=u[0];for(let Xe=1;Xe<u.length;Xe++){Kr=!Kr;const io=u[Xe];_r=In*fr,In+=io,wr=In*fr,Ar.push({left:_r,right:wr,isDash:Kr,zeroLength:0===io})}return Ar}addRoundDash(u,Xe,fr){const Ar=Xe/2;for(let Xe=-fr;Xe<=fr;Xe++){const _r=this.width*(this.nextRow+fr+Xe);let wr=0,Kr=u[wr];for(let In=0;In<this.width;In++){In/Kr.right>1&&(Kr=u[++wr]);const io=Math.abs(In-Kr.left),no=Math.abs(In-Kr.right),oo=Math.min(io,no);let so;const ao=Xe/fr*(Ar+1);if(Kr.isDash){const u=Ar-Math.abs(ao);so=Math.sqrt(oo*oo+u*u)}else so=Ar-Math.sqrt(oo*oo+ao*ao);this.data[_r+In]=Math.max(0,Math.min(255,so+128))}}}addRegularDash(u){for(let Xe=u.length-1;Xe>=0;--Xe){const fr=u[Xe],Ar=u[Xe+1];fr.zeroLength?u.splice(Xe,1):Ar&&Ar.isDash===fr.isDash&&(Ar.left=fr.left,u.splice(Xe,1))}const Xe=u[0],fr=u[u.length-1];Xe.isDash===fr.isDash&&(Xe.left=fr.left-this.width,fr.right=Xe.right+this.width);const Ar=this.width*this.nextRow;let _r=0,wr=u[_r];for(let Xe=0;Xe<this.width;Xe++){Xe/wr.right>1&&(wr=u[++_r]);const fr=Math.abs(Xe-wr.left),Kr=Math.abs(Xe-wr.right),In=Math.min(fr,Kr);this.data[Ar+Xe]=Math.max(0,Math.min(255,(wr.isDash?In:-In)+128))}}addDash(u,fr){const Ar=fr?7:0,_r=2*Ar+1;if(this.nextRow+_r>this.height)return Xe.w("LineAtlas out of space"),null;let wr=0;for(let Xe=0;Xe<u.length;Xe++)wr+=u[Xe];if(0!==wr){const Xe=this.width/wr,_r=this.getDashRanges(u,this.width,Xe);fr?this.addRoundDash(_r,Xe,Ar):this.addRegularDash(_r)}const Kr={y:(this.nextRow+Ar+.5)/this.height,height:2*Ar/this.height,width:wr};return this.nextRow+=_r,this.dirty=!0,Kr}bind(u){const Xe=u.gl;this.texture?(Xe.bindTexture(Xe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Xe.texSubImage2D(Xe.TEXTURE_2D,0,0,0,this.width,this.height,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))):(this.texture=Xe.createTexture(),Xe.bindTexture(Xe.TEXTURE_2D,this.texture),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_S,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_WRAP_T,Xe.REPEAT),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MIN_FILTER,Xe.LINEAR),Xe.texParameteri(Xe.TEXTURE_2D,Xe.TEXTURE_MAG_FILTER,Xe.LINEAR),Xe.texImage2D(Xe.TEXTURE_2D,0,Xe.ALPHA,this.width,this.height,0,Xe.ALPHA,Xe.UNSIGNED_BYTE,this.data))}}const Co="maplibre_preloaded_worker_pool";class L{constructor(){this.active={}}acquire(u){if(!this.workers)for(this.workers=[];this.workers.length<L.workerCount;)this.workers.push(new Worker(Xe.a.WORKER_URL));return this.active[u]=!0,this.workers.slice()}release(u){delete this.active[u],0===this.numActive()&&(this.workers.forEach((u=>{u.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[Co]}numActive(){return Object.keys(this.active).length}}const Io=Math.floor(wr.hardwareConcurrency/2);let xo,Mo;function N(){return xo||(xo=new L),xo}L.workerCount=Xe.C(globalThis)?Math.max(Math.min(Io,3),1):1;class j{constructor(u,fr){this.workerPool=u,this.actors=[],this.currentActor=0,this.id=fr;const Ar=this.workerPool.acquire(fr);for(let u=0;u<Ar.length;u++){const _r=new Xe.F(Ar[u],fr);_r.name=`Worker ${u}`,this.actors.push(_r)}if(!this.actors.length)throw new Error("No actors found")}broadcast(u,Xe){const fr=[];for(const Ar of this.actors)fr.push(Ar.sendAsync({type:u,data:Xe}));return Promise.all(fr)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(u=!0){this.actors.forEach((u=>{u.remove()})),this.actors=[],u&&this.workerPool.release(this.id)}registerMessageHandler(u,Xe){for(const fr of this.actors)fr.registerMessageHandler(u,Xe)}}function U(){return Mo||(Mo=new j(N(),Xe.G),Mo.registerMessageHandler("GR",((u,fr,Ar)=>Xe.m(fr,Ar)))),Mo}function Z(u,fr){const Ar=Xe.H();return Xe.J(Ar,Ar,[1,1,0]),Xe.K(Ar,Ar,[.5*u.width,.5*u.height,1]),Xe.L(Ar,Ar,u.calculatePosMatrix(fr.toUnwrapped()))}function q(u,Xe,fr,Ar,_r,wr){const Kr=function(u,Xe,fr){if(u)for(const Ar of u){const u=Xe[Ar];if(u&&u.source===fr&&"fill-extrusion"===u.type)return!0}else for(const u in Xe){const Ar=Xe[u];if(Ar.source===fr&&"fill-extrusion"===Ar.type)return!0}return!1}(_r&&_r.layers,Xe,u.id),In=wr.maxPitchScaleFactor(),io=u.tilesIn(Ar,In,Kr);io.sort(V);const no=[];for(const Ar of io)no.push({wrappedTileID:Ar.tileID.wrapped().key,queryResults:Ar.tile.queryRenderedFeatures(Xe,fr,u._state,Ar.queryGeometry,Ar.cameraQueryGeometry,Ar.scale,_r,wr,In,Z(u.transform,Ar.tileID))});const oo=function(u){const Xe={},fr={};for(const Ar of u){const u=Ar.queryResults,_r=Ar.wrappedTileID,wr=fr[_r]=fr[_r]||{};for(const fr in u){const Ar=u[fr],_r=wr[fr]=wr[fr]||{},Kr=Xe[fr]=Xe[fr]||[];for(const u of Ar)_r[u.featureIndex]||(_r[u.featureIndex]=!0,Kr.push(u))}}return Xe}(no);for(const Xe in oo)oo[Xe].forEach((Xe=>{const fr=Xe.feature,Ar=u.getFeatureState(fr.layer["source-layer"],fr.id);fr.source=fr.layer.source,fr.layer["source-layer"]&&(fr.sourceLayer=fr.layer["source-layer"]),fr.state=Ar}));return oo}function V(u,Xe){const fr=u.tileID,Ar=Xe.tileID;return fr.overscaledZ-Ar.overscaledZ||fr.canonical.y-Ar.canonical.y||fr.wrap-Ar.wrap||fr.canonical.x-Ar.canonical.x}function G(u,fr,Ar){return Xe._(this,void 0,void 0,(function*(){let _r=u;if(u.url?_r=(yield Xe.h(fr.transformRequest(u.url,"Source"),Ar)).data:yield wr.frameAsync(Ar),!_r)return null;const Kr=Xe.M(Xe.e(_r,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in _r&&_r.vector_layers&&(Kr.vectorLayerIds=_r.vector_layers.map((u=>u.id))),Kr}))}class H{constructor(u,Xe){u&&(Xe?this.setSouthWest(u).setNorthEast(Xe):Array.isArray(u)&&(4===u.length?this.setSouthWest([u[0],u[1]]).setNorthEast([u[2],u[3]]):this.setSouthWest(u[0]).setNorthEast(u[1])))}setNorthEast(u){return this._ne=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}setSouthWest(u){return this._sw=u instanceof Xe.N?new Xe.N(u.lng,u.lat):Xe.N.convert(u),this}extend(u){const fr=this._sw,Ar=this._ne;let _r,wr;if(u instanceof Xe.N)_r=u,wr=u;else{if(!(u instanceof H))return Array.isArray(u)?4===u.length||u.every(Array.isArray)?this.extend(H.convert(u)):this.extend(Xe.N.convert(u)):u&&("lng"in u||"lon"in u)&&"lat"in u?this.extend(Xe.N.convert(u)):this;if(_r=u._sw,wr=u._ne,!_r||!wr)return this}return fr||Ar?(fr.lng=Math.min(_r.lng,fr.lng),fr.lat=Math.min(_r.lat,fr.lat),Ar.lng=Math.max(wr.lng,Ar.lng),Ar.lat=Math.max(wr.lat,Ar.lat)):(this._sw=new Xe.N(_r.lng,_r.lat),this._ne=new Xe.N(wr.lng,wr.lat)),this}getCenter(){return new Xe.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new Xe.N(this.getWest(),this.getNorth())}getSouthEast(){return new Xe.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(u){const{lng:fr,lat:Ar}=Xe.N.convert(u);let _r=this._sw.lng<=fr&&fr<=this._ne.lng;return this._sw.lng>this._ne.lng&&(_r=this._sw.lng>=fr&&fr>=this._ne.lng),this._sw.lat<=Ar&&Ar<=this._ne.lat&&_r}static convert(u){return u instanceof H?u:u?new H(u):u}static fromLngLat(u,fr=0){const Ar=360*fr/40075017,_r=Ar/Math.cos(Math.PI/180*u.lat);return new H(new Xe.N(u.lng-_r,u.lat-Ar),new Xe.N(u.lng+_r,u.lat+Ar))}}class W{constructor(u,Xe,fr){this.bounds=H.convert(this.validateBounds(u)),this.minzoom=Xe||0,this.maxzoom=fr||24}validateBounds(u){return Array.isArray(u)&&4===u.length?[Math.max(-180,u[0]),Math.max(-90,u[1]),Math.min(180,u[2]),Math.min(90,u[3])]:[-180,-90,180,90]}contains(u){const fr=Math.pow(2,u.z),Ar=Math.floor(Xe.O(this.bounds.getWest())*fr),_r=Math.floor(Xe.Q(this.bounds.getNorth())*fr),wr=Math.ceil(Xe.O(this.bounds.getEast())*fr),Kr=Math.ceil(Xe.Q(this.bounds.getSouth())*fr);return u.x>=Ar&&u.x<wr&&u.y>=_r&&u.y<Kr}}class $ extends Xe.E{constructor(u,fr,Ar,_r){if(super(),this.id=u,this.dispatcher=Ar,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,Xe.e(this,Xe.M(fr,["url","scheme","tileSize","promoteId"])),this._options=Xe.e({type:"vector"},fr),this._collectResourceTiming=fr.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(_r)}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}onAdd(u){this.map=u,this.load()}setSourceProperty(u){this._tileJSONRequest&&this._tileJSONRequest.abort(),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return Xe.e({},this._options)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),fr={request:this.map._requestManager.transformRequest(Xe,"Tile"),uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,tileSize:this.tileSize*u.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};fr.request.collectResourceTiming=this._collectResourceTiming;let Ar="RT";if(u.actor&&"expired"!==u.state){if("loading"===u.state)return new Promise(((Xe,fr)=>{u.reloadPromise={resolve:Xe,reject:fr}}))}else u.actor=this.dispatcher.getActor(),Ar="LT";u.abortController=new AbortController;try{const Xe=yield u.actor.sendAsync({type:Ar,data:fr},u.abortController);if(delete u.abortController,u.aborted)return;this._afterTileLoadWorkerResponse(u,Xe)}catch(Xe){if(delete u.abortController,u.aborted)return;if(Xe&&404!==Xe.status)throw Xe;this._afterTileLoadWorkerResponse(u,null)}}))}_afterTileLoadWorkerResponse(u,Xe){if(Xe&&Xe.resourceTiming&&(u.resourceTiming=Xe.resourceTiming),Xe&&this.map._refreshExpiredTiles&&u.setExpiryData(Xe),u.loadVectorData(Xe,this.map.painter),u.reloadPromise){const Xe=u.reloadPromise;u.reloadPromise=null,this.loadTile(u).then(Xe.resolve).catch(Xe.reject)}}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.actor&&(yield u.actor.sendAsync({type:"AT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),u.actor&&(yield u.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class X extends Xe.E{constructor(u,fr,Ar,_r){super(),this.id=u,this.dispatcher=Ar,this.setEventedParent(_r),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=Xe.e({type:"raster"},fr),Xe.e(this,Xe.M(fr,["url","scheme","tileSize"]))}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const u=yield G(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,u&&(Xe.e(this,u),u.bounds&&(this.tileBounds=new W(u.bounds,this.minzoom,this.maxzoom)),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})))}catch(u){this._tileJSONRequest=null,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}onAdd(u){this.map=u,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(u){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),u(),this.load()}setTiles(u){return this.setSourceProperty((()=>{this._options.tiles=u})),this}setUrl(u){return this.setSourceProperty((()=>{this.url=u,this._options.url=u})),this}serialize(){return Xe.e({},this._options)}hasTile(u){return!this.tileBounds||this.tileBounds.contains(u.canonical)}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);u.abortController=new AbortController;try{const fr=yield so.getImage(this.map._requestManager.transformRequest(Xe,"Tile"),u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(fr&&fr.data){this.map._refreshExpiredTiles&&fr.cacheControl&&fr.expires&&u.setExpiryData({cacheControl:fr.cacheControl,expires:fr.expires});const Xe=this.map.painter.context,Ar=Xe.gl,_r=fr.data;u.texture=this.map.painter.getTileTexture(_r.width),u.texture?u.texture.update(_r,{useMipmap:!0}):(u.texture=new b(Xe,_r,Ar.RGBA,{useMipmap:!0}),u.texture.bind(Ar.LINEAR,Ar.CLAMP_TO_EDGE,Ar.LINEAR_MIPMAP_NEAREST)),u.state="loaded"}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController)}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.texture&&this.map.painter.saveTileTexture(u.texture)}))}hasTransition(){return!1}}class K extends X{constructor(u,fr,Ar,_r){super(u,fr,Ar,_r),this.type="raster-dem",this.maxzoom=22,this._options=Xe.e({type:"raster-dem"},fr),this.encoding=fr.encoding||"mapbox",this.redFactor=fr.redFactor,this.greenFactor=fr.greenFactor,this.blueFactor=fr.blueFactor,this.baseShift=fr.baseShift}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const fr=u.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Ar=this.map._requestManager.transformRequest(fr,"Tile");u.neighboringTiles=this._getNeighboringTiles(u.tileID),u.abortController=new AbortController;try{const fr=yield so.getImage(Ar,u.abortController,this.map._refreshExpiredTiles);if(delete u.abortController,u.aborted)return void(u.state="unloaded");if(fr&&fr.data){const Ar=fr.data;this.map._refreshExpiredTiles&&fr.cacheControl&&fr.expires&&u.setExpiryData({cacheControl:fr.cacheControl,expires:fr.expires});const _r=Xe.b(Ar)&&Xe.U()?Ar:yield this.readImageNow(Ar),wr={type:this.type,uid:u.uid,source:this.id,rawImageData:_r,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!u.actor||"expired"===u.state){u.actor=this.dispatcher.getActor();const Xe=yield u.actor.sendAsync({type:"LDT",data:wr});u.dem=Xe,u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0,u.state="loaded"}}}catch(Xe){if(delete u.abortController,u.aborted)u.state="unloaded";else if(Xe)throw u.state="errored",Xe}}))}readImageNow(u){return Xe._(this,void 0,void 0,(function*(){if("undefined"!=typeof VideoFrame&&Xe.V()){const fr=u.width+2,Ar=u.height+2;try{return new Xe.R({width:fr,height:Ar},yield Xe.W(u,-1,-1,fr,Ar))}catch(u){}}return wr.getImageData(u,1)}))}_getNeighboringTiles(u){const fr=u.canonical,Ar=Math.pow(2,fr.z),_r=(fr.x-1+Ar)%Ar,wr=0===fr.x?u.wrap-1:u.wrap,Kr=(fr.x+1+Ar)%Ar,In=fr.x+1===Ar?u.wrap+1:u.wrap,io={};return io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y).key]={backfilled:!1},fr.y>0&&(io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y-1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,u.wrap,fr.z,fr.x,fr.y-1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y-1).key]={backfilled:!1}),fr.y+1<Ar&&(io[new Xe.S(u.overscaledZ,wr,fr.z,_r,fr.y+1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,u.wrap,fr.z,fr.x,fr.y+1).key]={backfilled:!1},io[new Xe.S(u.overscaledZ,In,fr.z,Kr,fr.y+1).key]={backfilled:!1}),io}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.demTexture&&this.map.painter.saveTileTexture(u.demTexture),u.fbo&&(u.fbo.destroy(),delete u.fbo),u.dem&&delete u.dem,delete u.neighboringTiles,u.state="unloaded",u.actor&&(yield u.actor.sendAsync({type:"RDT",data:{type:this.type,uid:u.uid,source:this.id}}))}))}}class J extends Xe.E{constructor(u,fr,Ar,_r){super(),this.id=u,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Ar.getActor(),this.setEventedParent(_r),this._data=fr.data,this._options=Xe.e({},fr),this._collectResourceTiming=fr.collectResourceTiming,void 0!==fr.maxzoom&&(this.maxzoom=fr.maxzoom),fr.type&&(this.type=fr.type),fr.attribution&&(this.attribution=fr.attribution),this.promoteId=fr.promoteId;const wr=Xe.X/this.tileSize;this.workerOptions=Xe.e({source:this.id,cluster:fr.cluster||!1,geojsonVtOptions:{buffer:(void 0!==fr.buffer?fr.buffer:128)*wr,tolerance:(void 0!==fr.tolerance?fr.tolerance:.375)*wr,extent:Xe.X,maxZoom:this.maxzoom,lineMetrics:fr.lineMetrics||!1,generateId:fr.generateId||!1},superclusterOptions:{maxZoom:void 0!==fr.clusterMaxZoom?fr.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,fr.clusterMinPoints||2),extent:Xe.X,radius:(fr.clusterRadius||50)*wr,log:!1,generateId:fr.generateId||!1},clusterProperties:fr.clusterProperties,filter:fr.filter},fr.workerOptions),"string"==typeof this.promoteId&&(this.workerOptions.promoteId=this.promoteId)}load(){return Xe._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(u){this.map=u,this.load()}setData(u){return this._data=u,this._updateWorkerData(),this}updateData(u){return this._updateWorkerData(u),this}getData(){return Xe._(this,void 0,void 0,(function*(){const u=Xe.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:u})}))}setClusterOptions(u){return this.workerOptions.cluster=u.cluster,u&&(void 0!==u.clusterRadius&&(this.workerOptions.superclusterOptions.radius=u.clusterRadius),void 0!==u.clusterMaxZoom&&(this.workerOptions.superclusterOptions.maxZoom=u.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(u){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:u,source:this.id}})}getClusterChildren(u){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:u,source:this.id}})}getClusterLeaves(u,Xe,fr){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:u,limit:Xe,offset:fr}})}_updateWorkerData(u){return Xe._(this,void 0,void 0,(function*(){const fr=Xe.e({type:this.type},this.workerOptions);u?fr.dataDiff=u:"string"==typeof this._data?(fr.request=this.map._requestManager.transformRequest(wr.resolveURL(this._data),"Source"),fr.request.collectResourceTiming=this._collectResourceTiming):fr.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new Xe.k("dataloading",{dataType:"source"}));try{const u=yield this.actor.sendAsync({type:"LD",data:fr});if(this._pendingLoads--,this._removed||u.abandoned)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));let Ar=null;u.resourceTiming&&u.resourceTiming[this.id]&&(Ar=u.resourceTiming[this.id].slice(0));const _r={dataType:"source"};this._collectResourceTiming&&Ar&&Ar.length>0&&Xe.e(_r,{resourceTiming:Ar}),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"metadata"}))),this.fire(new Xe.k("data",Object.assign(Object.assign({},_r),{sourceDataType:"content"})))}catch(u){if(this._pendingLoads--,this._removed)return void this.fire(new Xe.k("dataabort",{dataType:"source"}));this.fire(new Xe.j(u))}}))}loaded(){return 0===this._pendingLoads}loadTile(u){return Xe._(this,void 0,void 0,(function*(){const Xe=u.actor?"RT":"LT";u.actor=this.actor;const fr={type:this.type,uid:u.uid,tileID:u.tileID,zoom:u.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};u.abortController=new AbortController;const Ar=yield this.actor.sendAsync({type:Xe,data:fr},u.abortController);delete u.abortController,u.unloadVectorData(),u.aborted||u.loadVectorData(Ar,this.map.painter,"RT"===Xe)}))}abortTile(u){return Xe._(this,void 0,void 0,(function*(){u.abortController&&(u.abortController.abort(),delete u.abortController),u.aborted=!0}))}unloadTile(u){return Xe._(this,void 0,void 0,(function*(){u.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:u.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return Xe.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Po=Xe.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Q extends Xe.E{constructor(u,Xe,fr,Ar){super(),this.id=u,this.dispatcher=fr,this.coordinates=Xe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Ar),this.options=Xe}load(u){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new Xe.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const Xe=yield so.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,Xe&&Xe.data&&(this.image=Xe.data,u&&(this.coordinates=u),this._finishLoading())}catch(u){this._request=null,this._loaded=!0,this.fire(new Xe.j(u))}}))}loaded(){return this._loaded}updateImage(u){return u.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=u.url,this.load(u.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(u){this.map=u,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(u){this.coordinates=u;const fr=u.map(Xe.Z.fromLngLat);this.tileID=function(u){let fr=1/0,Ar=1/0,_r=-1/0,wr=-1/0;for(const Xe of u)fr=Math.min(fr,Xe.x),Ar=Math.min(Ar,Xe.y),_r=Math.max(_r,Xe.x),wr=Math.max(wr,Xe.y);const Kr=Math.max(_r-fr,wr-Ar),In=Math.max(0,Math.floor(-Math.log(Kr)/Math.LN2)),io=Math.pow(2,In);return new Xe.a1(In,Math.floor((fr+_r)/2*io),Math.floor((Ar+wr)/2*io))}(fr),this.minzoom=this.maxzoom=this.tileID.z;const Ar=fr.map((u=>this.tileID.getTilePoint(u)._round()));return this._boundsArray=new Xe.$,this._boundsArray.emplaceBack(Ar[0].x,Ar[0].y,0,0),this._boundsArray.emplaceBack(Ar[1].x,Ar[1].y,Xe.X,0),this._boundsArray.emplaceBack(Ar[3].x,Ar[3].y,0,Xe.X),this._boundsArray.emplaceBack(Ar[2].x,Ar[2].y,Xe.X,Xe.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;const u=this.map.painter.context,fr=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new b(u,this.image,fr.RGBA),this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE));let Ar=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,Ar=!0)}Ar&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(u){return Xe._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(u.tileID.canonical)?(this.tiles[String(u.tileID.wrap)]=u,u.buckets={}):u.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class tt extends Q{constructor(u,Xe,fr,Ar){super(u,Xe,fr,Ar),this.roundZoom=!0,this.type="video",this.options=Xe}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!1;const u=this.options;this.urls=[];for(const Xe of u.urls)this.urls.push(this.map._requestManager.transformRequest(Xe,"Source").url);try{const u=yield Xe.a3(this.urls);if(this._loaded=!0,!u)return;this.video=u,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(u){this.fire(new Xe.j(u))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(u){if(this.video){const fr=this.video.seekable;u<fr.start(0)||u>fr.end(0)?this.fire(new Xe.j(new Xe.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${fr.start(0)} and ${fr.end(0)}-second mark.`))):this.video.currentTime=u}}getVideo(){return this.video}onAdd(u){this.map||(this.map=u,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;const u=this.map.painter.context,fr=u.gl;this.boundsBuffer||(this.boundsBuffer=u.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE),fr.texSubImage2D(fr.TEXTURE_2D,0,0,0,fr.RGBA,fr.UNSIGNED_BYTE,this.video)):(this.texture=new b(u,this.video,fr.RGBA),this.texture.bind(fr.LINEAR,fr.CLAMP_TO_EDGE));let Ar=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,Ar=!0)}Ar&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class et extends Q{constructor(u,fr,Ar,_r){super(u,fr,Ar,_r),fr.coordinates?Array.isArray(fr.coordinates)&&4===fr.coordinates.length&&!fr.coordinates.some((u=>!Array.isArray(u)||2!==u.length||u.some((u=>"number"!=typeof u))))||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "coordinates"'))),fr.animate&&"boolean"!=typeof fr.animate&&this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'optional "animate" property must be a boolean value'))),fr.canvas?"string"==typeof fr.canvas||fr.canvas instanceof HTMLCanvasElement||this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new Xe.j(new Xe.a2(`sources.${u}`,null,'missing required property "canvas"'))),this.options=fr,this.animate=void 0===fr.animate||fr.animate}load(){return Xe._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new Xe.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(u){this.map=u,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let u=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,u=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,u=!0),this._hasInvalidDimensions())return;if(0===Object.keys(this.tiles).length)return;const fr=this.map.painter.context,Ar=fr.gl;this.boundsBuffer||(this.boundsBuffer=fr.createVertexBuffer(this._boundsArray,Po.members)),this.boundsSegments||(this.boundsSegments=Xe.a0.simpleSegment(0,0,4,2)),this.texture?(u||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new b(fr,this.canvas,Ar.RGBA,{premultiply:!0});let _r=!1;for(const u in this.tiles){const Xe=this.tiles[u];"loaded"!==Xe.state&&(Xe.state="loaded",Xe.texture=this.texture,_r=!0)}_r&&this.fire(new Xe.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const u of[this.canvas.width,this.canvas.height])if(isNaN(u)||u<=0)return!0;return!1}}const ss={},at=u=>{switch(u){case"geojson":return J;case"image":return Q;case"raster":return X;case"raster-dem":return K;case"vector":return $;case"video":return tt;case"canvas":return et}return ss[u]},sa="RTLPluginLoaded";class ot extends Xe.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=U()}_syncState(u){return this.status=u,this.dispatcher.broadcast("SRPS",{pluginStatus:u,pluginURL:this.url}).catch((u=>{throw this.status="error",u}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(u){return Xe._(this,arguments,void 0,(function*(u,Xe=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=wr.resolveURL(u),!this.url)throw new Error(`requested url ${u} is invalid`);if("unavailable"===this.status){if(!Xe)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()}))}_requestImport(){return Xe._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new Xe.k(sa))}))}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let aa=null;function nt(){return aa||(aa=new ot),aa}class lt{constructor(u,fr){this.timeAdded=0,this.fadeEndTime=0,this.tileID=u,this.uid=Xe.a4(),this.uses=0,this.tileSize=fr,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(u){const Xe=u+this.timeAdded;Xe<this.fadeEndTime||(this.fadeEndTime=Xe)}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(u){this.demTexture&&u.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(u,fr,Ar){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",u){u.featureIndex&&(this.latestFeatureIndex=u.featureIndex,u.rawTileData?(this.latestRawTileData=u.rawTileData,this.latestFeatureIndex.rawTileData=u.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=u.collisionBoxArray,this.buckets=function(u,Xe){const fr={};if(!Xe)return fr;for(const Ar of u){const u=Ar.layerIds.map((u=>Xe.getLayer(u))).filter(Boolean);if(0!==u.length){Ar.layers=u,Ar.stateDependentLayerIds&&(Ar.stateDependentLayers=Ar.stateDependentLayerIds.map((Xe=>u.filter((u=>u.id===Xe))[0])));for(const Xe of u)fr[Xe.id]=Ar}}return fr}(u.buckets,fr.style),this.hasSymbolBuckets=!1;for(const u in this.buckets){const fr=this.buckets[u];if(fr instanceof Xe.a6){if(this.hasSymbolBuckets=!0,!Ar)break;fr.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const u in this.buckets){const fr=this.buckets[u];if(fr instanceof Xe.a6&&fr.hasRTLText){this.hasRTLText=!0,nt().lazyLoad();break}}this.queryPadding=0;for(const u in this.buckets){const Xe=this.buckets[u];this.queryPadding=Math.max(this.queryPadding,fr.style.getLayer(u).queryRadius(Xe))}u.imageAtlas&&(this.imageAtlas=u.imageAtlas),u.glyphAtlasImage&&(this.glyphAtlasImage=u.glyphAtlasImage)}else this.collisionBoxArray=new Xe.a5}unloadVectorData(){for(const u in this.buckets)this.buckets[u].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(u){return this.buckets[u.id]}upload(u){for(const Xe in this.buckets){const fr=this.buckets[Xe];fr.uploadPending()&&fr.upload(u)}const Xe=u.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new b(u,this.imageAtlas.image,Xe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new b(u,this.glyphAtlasImage,Xe.ALPHA),this.glyphAtlasImage=null)}prepare(u){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(u,this.imageAtlasTexture)}queryRenderedFeatures(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Ar,cameraQueryGeometry:_r,scale:wr,tileSize:this.tileSize,pixelPosMatrix:no,transform:In,params:Kr,queryPadding:this.queryPadding*io},u,Xe,fr):{}}querySourceFeatures(u,fr){const Ar=this.latestFeatureIndex;if(!Ar||!Ar.rawTileData)return;const _r=Ar.loadVTLayers(),wr=fr&&fr.sourceLayer?fr.sourceLayer:"",Kr=_r._geojsonTileLayer||_r[wr];if(!Kr)return;const In=Xe.a7(fr&&fr.filter),{z:io,x:no,y:oo}=this.tileID.canonical,so={z:io,x:no,y:oo};for(let fr=0;fr<Kr.length;fr++){const _r=Kr.feature(fr);if(In.needGeometry){const u=Xe.a8(_r,!0);if(!In.filter(new Xe.z(this.tileID.overscaledZ),u,this.tileID.canonical))continue}else if(!In.filter(new Xe.z(this.tileID.overscaledZ),_r))continue;const ao=Ar.getId(_r,wr),co=new Xe.a9(_r,io,no,oo,ao);co.tile=so,u.push(co)}}hasData(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(u){const fr=this.expirationTime;if(u.cacheControl){const fr=Xe.aa(u.cacheControl);fr["max-age"]&&(this.expirationTime=Date.now()+1e3*fr["max-age"])}else u.expires&&(this.expirationTime=new Date(u.expires).getTime());if(this.expirationTime){const u=Date.now();let Xe=!1;if(this.expirationTime>u)Xe=!1;else if(fr)if(this.expirationTime<fr)Xe=!0;else{const Ar=this.expirationTime-fr;Ar?this.expirationTime=u+Math.max(Ar,3e4):Xe=!0}else Xe=!0;Xe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)}setFeatureState(u,Xe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||0===Object.keys(u).length)return;const fr=this.latestFeatureIndex.loadVTLayers();for(const Ar in this.buckets){if(!Xe.style.hasLayer(Ar))continue;const _r=this.buckets[Ar],wr=_r.layers[0].sourceLayer||"_geojsonTileLayer",Kr=fr[wr],In=u[wr];if(!Kr||!In||0===Object.keys(In).length)continue;_r.update(In,Kr,this.imageAtlas&&this.imageAtlas.patternPositions||{});const io=Xe&&Xe.style&&Xe.style.getLayer(Ar);io&&(this.queryPadding=Math.max(this.queryPadding,io.queryRadius(_r)))}}holdingForFade(){return void 0!==this.symbolFadeHoldUntil}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<wr.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(u){this.symbolFadeHoldUntil=wr.now()+u}setDependencies(u,Xe){const fr={};for(const u of Xe)fr[u]=!0;this.dependencies[u]=fr}hasDependency(u,Xe){for(const fr of u){const u=this.dependencies[fr];if(u)for(const fr of Xe)if(u[fr])return!0}return!1}}class ht{constructor(u,Xe){this.max=u,this.onRemove=Xe,this.reset()}reset(){for(const u in this.data)for(const Xe of this.data[u])Xe.timeout&&clearTimeout(Xe.timeout),this.onRemove(Xe.value);return this.data={},this.order=[],this}add(u,Xe,fr){const Ar=u.wrapped().key;void 0===this.data[Ar]&&(this.data[Ar]=[]);const _r={value:Xe,timeout:void 0};if(void 0!==fr&&(_r.timeout=setTimeout((()=>{this.remove(u,_r)}),fr)),this.data[Ar].push(_r),this.order.push(Ar),this.order.length>this.max){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}has(u){return u.wrapped().key in this.data}getAndRemove(u){return this.has(u)?this._getAndRemoveByKey(u.wrapped().key):null}_getAndRemoveByKey(u){const Xe=this.data[u].shift();return Xe.timeout&&clearTimeout(Xe.timeout),0===this.data[u].length&&delete this.data[u],this.order.splice(this.order.indexOf(u),1),Xe.value}getByKey(u){const Xe=this.data[u];return Xe?Xe[0].value:null}get(u){return this.has(u)?this.data[u.wrapped().key][0].value:null}remove(u,Xe){if(!this.has(u))return this;const fr=u.wrapped().key,Ar=void 0===Xe?0:this.data[fr].indexOf(Xe),_r=this.data[fr][Ar];return this.data[fr].splice(Ar,1),_r.timeout&&clearTimeout(_r.timeout),0===this.data[fr].length&&delete this.data[fr],this.onRemove(_r.value),this.order.splice(this.order.indexOf(fr),1),this}setMaxSize(u){for(this.max=u;this.order.length>this.max;){const u=this._getAndRemoveByKey(this.order[0]);u&&this.onRemove(u)}return this}filter(u){const Xe=[];for(const fr in this.data)for(const Ar of this.data[fr])u(Ar.value)||Xe.push(Ar);for(const u of Xe)this.remove(u.value.tileID,u)}}class ct{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(u,fr,Ar){const _r=String(fr);if(this.stateChanges[u]=this.stateChanges[u]||{},this.stateChanges[u][_r]=this.stateChanges[u][_r]||{},Xe.e(this.stateChanges[u][_r],Ar),null===this.deletedStates[u]){this.deletedStates[u]={};for(const Xe in this.state[u])Xe!==_r&&(this.deletedStates[u][Xe]=null)}else if(this.deletedStates[u]&&null===this.deletedStates[u][_r]){this.deletedStates[u][_r]={};for(const Xe in this.state[u][_r])Ar[Xe]||(this.deletedStates[u][_r][Xe]=null)}else for(const Xe in Ar)this.deletedStates[u]&&this.deletedStates[u][_r]&&null===this.deletedStates[u][_r][Xe]&&delete this.deletedStates[u][_r][Xe]}removeFeatureState(u,Xe,fr){if(null===this.deletedStates[u])return;const Ar=String(Xe);if(this.deletedStates[u]=this.deletedStates[u]||{},fr&&void 0!==Xe)null!==this.deletedStates[u][Ar]&&(this.deletedStates[u][Ar]=this.deletedStates[u][Ar]||{},this.deletedStates[u][Ar][fr]=null);else if(void 0!==Xe)if(this.stateChanges[u]&&this.stateChanges[u][Ar])for(fr in this.deletedStates[u][Ar]={},this.stateChanges[u][Ar])this.deletedStates[u][Ar][fr]=null;else this.deletedStates[u][Ar]=null;else this.deletedStates[u]=null}getState(u,fr){const Ar=String(fr),_r=Xe.e({},(this.state[u]||{})[Ar],(this.stateChanges[u]||{})[Ar]);if(null===this.deletedStates[u])return{};if(this.deletedStates[u]){const Xe=this.deletedStates[u][fr];if(null===Xe)return{};for(const u in Xe)delete _r[u]}return _r}initializeTileState(u,Xe){u.setFeatureState(this.state,Xe)}coalesceChanges(u,fr){const Ar={};for(const u in this.stateChanges){this.state[u]=this.state[u]||{};const fr={};for(const Ar in this.stateChanges[u])this.state[u][Ar]||(this.state[u][Ar]={}),Xe.e(this.state[u][Ar],this.stateChanges[u][Ar]),fr[Ar]=this.state[u][Ar];Ar[u]=fr}for(const u in this.deletedStates){this.state[u]=this.state[u]||{};const fr={};if(null===this.deletedStates[u])for(const Xe in this.state[u])fr[Xe]={},this.state[u][Xe]={};else for(const Xe in this.deletedStates[u]){if(null===this.deletedStates[u][Xe])this.state[u][Xe]={};else for(const fr of Object.keys(this.deletedStates[u][Xe]))delete this.state[u][Xe][fr];fr[Xe]=this.state[u][Xe]}Ar[u]=Ar[u]||{},Xe.e(Ar[u],fr)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(Ar).length)for(const Xe in u)u[Xe].setFeatureState(Ar,fr)}}class ut extends Xe.E{constructor(u,Xe,fr){super(),this.id=u,this.dispatcher=fr,this.on("data",(u=>this._dataHandler(u))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((u,Xe,fr,Ar)=>{const _r=new(at(Xe.type))(u,Xe,fr,Ar);if(_r.id!==u)throw new Error(`Expected Source id to be ${u} instead of ${_r.id}`);return _r})(u,Xe,fr,this),this._tiles={},this._cache=new ht(0,(u=>this._unloadTile(u))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ct,this._didEmitContent=!1,this._updated=!1}onAdd(u){this.map=u,this._maxTileCacheSize=u?u._maxTileCacheSize:null,this._maxTileCacheZoomLevels=u?u._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(u)}onRemove(u){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(u)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const u in this._tiles){const Xe=this._tiles[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const u=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,u&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(u,fr,Ar){return Xe._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(u),this._tileLoaded(u,fr,Ar)}catch(fr){u.state="errored",404!==fr.status?this._source.fire(new Xe.j(fr,{tile:u})):this.update(this.transform,this.terrain)}}))}_unloadTile(u){this._source.unloadTile&&this._source.unloadTile(u)}_abortTile(u){this._source.abortTile&&this._source.abortTile(u),this._source.fire(new Xe.k("dataabort",{tile:u,coord:u.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(u){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const Xe in this._tiles){const fr=this._tiles[Xe];fr.upload(u),fr.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((u=>u.tileID)).sort(dt).map((u=>u.key))}getRenderableIds(u){const fr=[];for(const Xe in this._tiles)this._isIdRenderable(Xe,u)&&fr.push(this._tiles[Xe]);return u?fr.sort(((u,fr)=>{const Ar=u.tileID,_r=fr.tileID,wr=new Xe.P(Ar.canonical.x,Ar.canonical.y)._rotate(this.transform.angle),Kr=new Xe.P(_r.canonical.x,_r.canonical.y)._rotate(this.transform.angle);return Ar.overscaledZ-_r.overscaledZ||Kr.y-wr.y||Kr.x-wr.x})).map((u=>u.tileID.key)):fr.map((u=>u.tileID)).sort(dt).map((u=>u.key))}hasRenderableParent(u){const Xe=this.findLoadedParent(u,0);return!!Xe&&this._isIdRenderable(Xe.tileID.key)}_isIdRenderable(u,Xe){return this._tiles[u]&&this._tiles[u].hasData()&&!this._coveredTiles[u]&&(Xe||!this._tiles[u].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const u in this._tiles)"errored"!==this._tiles[u].state&&this._reloadTile(u,"reloading")}}_reloadTile(u,fr){return Xe._(this,void 0,void 0,(function*(){const Xe=this._tiles[u];Xe&&("loading"!==Xe.state&&(Xe.state=fr),yield this._loadTile(Xe,u,fr))}))}_tileLoaded(u,fr,Ar){u.timeAdded=wr.now(),"expired"===Ar&&(u.refreshedUponExpiration=!0),this._setTileReloadTimer(fr,u),"raster-dem"===this.getSource().type&&u.dem&&this._backfillDEM(u),this._state.initializeTileState(u,this.map?this.map.painter:null),u.aborted||this._source.fire(new Xe.k("data",{dataType:"source",tile:u,coord:u.tileID}))}_backfillDEM(u){const Xe=this.getRenderableIds();for(let fr=0;fr<Xe.length;fr++){const Ar=Xe[fr];if(u.neighboringTiles&&u.neighboringTiles[Ar]){const Xe=this.getTileByID(Ar);i(u,Xe),i(Xe,u)}}function i(u,Xe){u.needsHillshadePrepare=!0,u.needsTerrainPrepare=!0;let fr=Xe.tileID.canonical.x-u.tileID.canonical.x;const Ar=Xe.tileID.canonical.y-u.tileID.canonical.y,_r=Math.pow(2,u.tileID.canonical.z),wr=Xe.tileID.key;0===fr&&0===Ar||Math.abs(Ar)>1||(Math.abs(fr)>1&&(1===Math.abs(fr+_r)?fr+=_r:1===Math.abs(fr-_r)&&(fr-=_r)),Xe.dem&&u.dem&&(u.dem.backfillBorder(Xe.dem,fr,Ar),u.neighboringTiles&&u.neighboringTiles[wr]&&(u.neighboringTiles[wr].backfilled=!0)))}}getTile(u){return this.getTileByID(u.key)}getTileByID(u){return this._tiles[u]}_retainLoadedChildren(u,Xe,fr,Ar){for(const _r in this._tiles){let wr=this._tiles[_r];if(Ar[_r]||!wr.hasData()||wr.tileID.overscaledZ<=Xe||wr.tileID.overscaledZ>fr)continue;let Kr=wr.tileID;for(;wr&&wr.tileID.overscaledZ>Xe+1;){const u=wr.tileID.scaledTo(wr.tileID.overscaledZ-1);wr=this._tiles[u.key],wr&&wr.hasData()&&(Kr=u)}let In=Kr;for(;In.overscaledZ>Xe;)if(In=In.scaledTo(In.overscaledZ-1),u[In.key]){Ar[Kr.key]=Kr;break}}}findLoadedParent(u,Xe){if(u.key in this._loadedParentTiles){const fr=this._loadedParentTiles[u.key];return fr&&fr.tileID.overscaledZ>=Xe?fr:null}for(let fr=u.overscaledZ-1;fr>=Xe;fr--){const Xe=u.scaledTo(fr),Ar=this._getLoadedTile(Xe);if(Ar)return Ar}}findLoadedSibling(u){return this._getLoadedTile(u)}_getLoadedTile(u){const Xe=this._tiles[u.key];return Xe&&Xe.hasData()?Xe:this._cache.getByKey(u.wrapped().key)}updateCacheSize(u){const fr=Math.ceil(u.width/this._source.tileSize)+1,Ar=Math.ceil(u.height/this._source.tileSize)+1,_r=Math.floor(fr*Ar*(null===this._maxTileCacheZoomLevels?Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),wr="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,_r):_r;this._cache.setMaxSize(wr)}handleWrapJump(u){const Xe=Math.round((u-(void 0===this._prevLng?u:this._prevLng))/360);if(this._prevLng=u,Xe){const u={};for(const fr in this._tiles){const Ar=this._tiles[fr];Ar.tileID=Ar.tileID.unwrapTo(Ar.tileID.wrap+Xe),u[Ar.tileID.key]=Ar}this._tiles=u;for(const u in this._timers)clearTimeout(this._timers[u]),delete this._timers[u];for(const u in this._tiles)this._setTileReloadTimer(u,this._tiles[u])}}_updateCoveredAndRetainedTiles(u,Xe,fr,Ar,_r,Kr){const In={},io={},no=Object.keys(u),oo=wr.now();for(const fr of no){const Ar=u[fr],_r=this._tiles[fr];if(!_r||0!==_r.fadeEndTime&&_r.fadeEndTime<=oo)continue;const wr=this.findLoadedParent(Ar,Xe),Kr=this.findLoadedSibling(Ar),no=wr||Kr||null;no&&(this._addTile(no.tileID),In[no.tileID.key]=no.tileID),io[fr]=Ar}this._retainLoadedChildren(io,Ar,fr,u);for(const Xe in In)u[Xe]||(this._coveredTiles[Xe]=!0,u[Xe]=In[Xe]);if(Kr){const Xe={},fr={};for(const u of _r)this._tiles[u.key].hasData()?Xe[u.key]=u:fr[u.key]=u;for(const Ar in fr){const _r=fr[Ar].children(this._source.maxzoom);this._tiles[_r[0].key]&&this._tiles[_r[1].key]&&this._tiles[_r[2].key]&&this._tiles[_r[3].key]&&(Xe[_r[0].key]=u[_r[0].key]=_r[0],Xe[_r[1].key]=u[_r[1].key]=_r[1],Xe[_r[2].key]=u[_r[2].key]=_r[2],Xe[_r[3].key]=u[_r[3].key]=_r[3],delete fr[Ar])}for(const Ar in fr){const _r=fr[Ar],wr=this.findLoadedParent(_r,this._source.minzoom),Kr=this.findLoadedSibling(_r),In=wr||Kr||null;if(In){Xe[In.tileID.key]=u[In.tileID.key]=In.tileID;for(const u in Xe)Xe[u].isChildOf(In.tileID)&&delete Xe[u]}}for(const u in this._tiles)Xe[u]||(this._coveredTiles[u]=!0)}}update(u,fr){if(!this._sourceLoaded||this._paused)return;let Ar;this.transform=u,this.terrain=fr,this.updateCacheSize(u),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Ar=u.getVisibleUnwrappedCoordinates(this._source.tileID).map((u=>new Xe.S(u.canonical.z,u.wrap,u.canonical.z,u.canonical.x,u.canonical.y))):(Ar=u.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:fr}),this._source.hasTile&&(Ar=Ar.filter((u=>this._source.hasTile(u))))):Ar=[];const _r=u.coveringZoomLevel(this._source),wr=Math.max(_r-ut.maxOverzooming,this._source.minzoom),Kr=Math.max(_r+ut.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const u={};for(const Xe of Ar)if(Xe.canonical.z>this._source.minzoom){const fr=Xe.scaledTo(Xe.canonical.z-1);u[fr.key]=fr;const Ar=Xe.scaledTo(Math.max(this._source.minzoom,Math.min(Xe.canonical.z,5)));u[Ar.key]=Ar}Ar=Ar.concat(Object.values(u))}const In=0===Ar.length&&!this._updated&&this._didEmitContent;this._updated=!0,In&&this.fire(new Xe.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const io=this._updateRetainedTiles(Ar,_r);_t(this._source.type)&&this._updateCoveredAndRetainedTiles(io,wr,Kr,_r,Ar,fr);for(const u in io)this._tiles[u].clearFadeHold();const no=Xe.ab(this._tiles,io);for(const u of no){const Xe=this._tiles[u];Xe.hasSymbolBuckets&&!Xe.holdingForFade()?Xe.setHoldDuration(this.map._fadeDuration):Xe.hasSymbolBuckets&&!Xe.symbolFadeFinished()||this._removeTile(u)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const u in this._tiles)this._tiles[u].holdingForFade()&&this._removeTile(u)}_updateRetainedTiles(u,Xe){var fr;const Ar={},_r={},wr=Math.max(Xe-ut.maxOverzooming,this._source.minzoom),Kr=Math.max(Xe+ut.maxUnderzooming,this._source.minzoom),In={};for(const fr of u){const u=this._addTile(fr);Ar[fr.key]=fr,u.hasData()||Xe<this._source.maxzoom&&(In[fr.key]=fr)}this._retainLoadedChildren(In,Xe,Kr,Ar);for(const Kr of u){let u=this._tiles[Kr.key];if(u.hasData())continue;if(Xe+1>this._source.maxzoom){const u=Kr.children(this._source.maxzoom)[0],Xe=this.getTile(u);if(Xe&&Xe.hasData()){Ar[u.key]=u;continue}}else{const u=Kr.children(this._source.maxzoom);if(Ar[u[0].key]&&Ar[u[1].key]&&Ar[u[2].key]&&Ar[u[3].key])continue}let In=u.wasRequested();for(let Xe=Kr.overscaledZ-1;Xe>=wr;--Xe){const wr=Kr.scaledTo(Xe);if(_r[wr.key])break;if(_r[wr.key]=!0,u=this.getTile(wr),!u&&In&&(u=this._addTile(wr)),u){const Xe=u.hasData();if((Xe||!(null===(fr=this.map)||void 0===fr?void 0:fr.cancelPendingTileRequestsWhileZooming)||In)&&(Ar[wr.key]=wr),In=u.wasRequested(),Xe)break}}}return Ar}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const u in this._tiles){const Xe=[];let fr,Ar=this._tiles[u].tileID;for(;Ar.overscaledZ>0;){if(Ar.key in this._loadedParentTiles){fr=this._loadedParentTiles[Ar.key];break}Xe.push(Ar.key);const u=Ar.scaledTo(Ar.overscaledZ-1);if(fr=this._getLoadedTile(u),fr)break;Ar=u}for(const u of Xe)this._loadedParentTiles[u]=fr}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const u in this._tiles){const Xe=this._tiles[u].tileID,fr=this._getLoadedTile(Xe);this._loadedSiblingTiles[Xe.key]=fr}}_addTile(u){let fr=this._tiles[u.key];if(fr)return fr;fr=this._cache.getAndRemove(u),fr&&(this._setTileReloadTimer(u.key,fr),fr.tileID=u,this._state.initializeTileState(fr,this.map?this.map.painter:null),this._cacheTimers[u.key]&&(clearTimeout(this._cacheTimers[u.key]),delete this._cacheTimers[u.key],this._setTileReloadTimer(u.key,fr)));const Ar=fr;return fr||(fr=new lt(u,this._source.tileSize*u.overscaleFactor()),this._loadTile(fr,u.key,fr.state)),fr.uses++,this._tiles[u.key]=fr,Ar||this._source.fire(new Xe.k("dataloading",{tile:fr,coord:fr.tileID,dataType:"source"})),fr}_setTileReloadTimer(u,Xe){u in this._timers&&(clearTimeout(this._timers[u]),delete this._timers[u]);const fr=Xe.getExpiryTimeout();fr&&(this._timers[u]=setTimeout((()=>{this._reloadTile(u,"expired"),delete this._timers[u]}),fr))}_removeTile(u){const Xe=this._tiles[u];Xe&&(Xe.uses--,delete this._tiles[u],this._timers[u]&&(clearTimeout(this._timers[u]),delete this._timers[u]),Xe.uses>0||(Xe.hasData()&&"reloading"!==Xe.state?this._cache.add(Xe.tileID,Xe,Xe.getExpiryTimeout()):(Xe.aborted=!0,this._abortTile(Xe),this._unloadTile(Xe))))}_dataHandler(u){const Xe=u.sourceDataType;"source"===u.dataType&&"metadata"===Xe&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===u.dataType&&"content"===Xe&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const u in this._tiles)this._removeTile(u);this._cache.reset()}tilesIn(u,fr,Ar){const _r=[],wr=this.transform;if(!wr)return _r;const Kr=Ar?wr.getCameraQueryGeometry(u):u,In=u.map((u=>wr.pointCoordinate(u,this.terrain))),io=Kr.map((u=>wr.pointCoordinate(u,this.terrain))),no=this.getIds();let oo=1/0,so=1/0,ao=-1/0,co=-1/0;for(const u of io)oo=Math.min(oo,u.x),so=Math.min(so,u.y),ao=Math.max(ao,u.x),co=Math.max(co,u.y);for(let u=0;u<no.length;u++){const Ar=this._tiles[no[u]];if(Ar.holdingForFade())continue;const Kr=Ar.tileID,go=Math.pow(2,wr.zoom-Ar.tileID.overscaledZ),ho=fr*Ar.queryPadding*Xe.X/Ar.tileSize/go,Co=[Kr.getTilePoint(new Xe.Z(oo,so)),Kr.getTilePoint(new Xe.Z(ao,co))];if(Co[0].x-ho<Xe.X&&Co[0].y-ho<Xe.X&&Co[1].x+ho>=0&&Co[1].y+ho>=0){const u=In.map((u=>Kr.getTilePoint(u))),Xe=io.map((u=>Kr.getTilePoint(u)));_r.push({tile:Ar,tileID:Kr,queryGeometry:u,cameraQueryGeometry:Xe,scale:go})}}return _r}getVisibleCoordinates(u){const Xe=this.getRenderableIds(u).map((u=>this._tiles[u].tileID));for(const u of Xe)u.posMatrix=this.transform.calculatePosMatrix(u.toUnwrapped());return Xe}hasTransition(){if(this._source.hasTransition())return!0;if(_t(this._source.type)){const u=wr.now();for(const Xe in this._tiles)if(this._tiles[Xe].fadeEndTime>=u)return!0}return!1}setFeatureState(u,Xe,fr){this._state.updateState(u=u||"_geojsonTileLayer",Xe,fr)}removeFeatureState(u,Xe,fr){this._state.removeFeatureState(u=u||"_geojsonTileLayer",Xe,fr)}getFeatureState(u,Xe){return this._state.getState(u=u||"_geojsonTileLayer",Xe)}setDependencies(u,Xe,fr){const Ar=this._tiles[u];Ar&&Ar.setDependencies(Xe,fr)}reloadTilesForDependencies(u,Xe){for(const fr in this._tiles)this._tiles[fr].hasDependency(u,Xe)&&this._reloadTile(fr,"reloading");this._cache.filter((fr=>!fr.hasDependency(u,Xe)))}}function dt(u,Xe){const fr=Math.abs(2*u.wrap)-+(u.wrap<0),Ar=Math.abs(2*Xe.wrap)-+(Xe.wrap<0);return u.overscaledZ-Xe.overscaledZ||Ar-fr||Xe.canonical.y-u.canonical.y||Xe.canonical.x-u.canonical.x}function _t(u){return"raster"===u||"image"===u||"video"===u}ut.maxOverzooming=10,ut.maxUnderzooming=3;class pt{constructor(u,Xe){this.reset(u,Xe)}reset(u,Xe){this.points=u||[],this._distances=[0];for(let u=1;u<this.points.length;u++)this._distances[u]=this._distances[u-1]+this.points[u].dist(this.points[u-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Xe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(u){if(1===this.points.length)return this.points[0];u=Xe.ac(u,0,1);let fr=1,Ar=this._distances[fr];const _r=u*this.paddedLength+this.padding;for(;Ar<_r&&fr<this._distances.length;)Ar=this._distances[++fr];const wr=fr-1,Kr=this._distances[wr],In=Ar-Kr,io=In>0?(_r-Kr)/In:0;return this.points[wr].mult(1-io).add(this.points[fr].mult(io))}}function mt(u,Xe){let fr=!0;return"always"===u||"never"!==u&&"never"!==Xe||(fr=!1),fr}class ft{constructor(u,Xe,fr){const Ar=this.boxCells=[],_r=this.circleCells=[];this.xCellCount=Math.ceil(u/fr),this.yCellCount=Math.ceil(Xe/fr);for(let u=0;u<this.xCellCount*this.yCellCount;u++)Ar.push([]),_r.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=u,this.height=Xe,this.xScale=this.xCellCount/u,this.yScale=this.yCellCount/Xe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(u,Xe,fr,Ar,_r){this._forEachCell(Xe,fr,Ar,_r,this._insertBoxCell,this.boxUid++),this.boxKeys.push(u),this.bboxes.push(Xe),this.bboxes.push(fr),this.bboxes.push(Ar),this.bboxes.push(_r)}insertCircle(u,Xe,fr,Ar){this._forEachCell(Xe-Ar,fr-Ar,Xe+Ar,fr+Ar,this._insertCircleCell,this.circleUid++),this.circleKeys.push(u),this.circles.push(Xe),this.circles.push(fr),this.circles.push(Ar)}_insertBoxCell(u,Xe,fr,Ar,_r,wr){this.boxCells[_r].push(wr)}_insertCircleCell(u,Xe,fr,Ar,_r,wr){this.circleCells[_r].push(wr)}_query(u,Xe,fr,Ar,_r,wr,Kr){if(fr<0||u>this.width||Ar<0||Xe>this.height)return[];const In=[];if(u<=0&&Xe<=0&&this.width<=fr&&this.height<=Ar){if(_r)return[{key:null,x1:u,y1:Xe,x2:fr,y2:Ar}];for(let u=0;u<this.boxKeys.length;u++)In.push({key:this.boxKeys[u],x1:this.bboxes[4*u],y1:this.bboxes[4*u+1],x2:this.bboxes[4*u+2],y2:this.bboxes[4*u+3]});for(let u=0;u<this.circleKeys.length;u++){const Xe=this.circles[3*u],fr=this.circles[3*u+1],Ar=this.circles[3*u+2];In.push({key:this.circleKeys[u],x1:Xe-Ar,y1:fr-Ar,x2:Xe+Ar,y2:fr+Ar})}}else this._forEachCell(u,Xe,fr,Ar,this._queryCell,In,{hitTest:_r,overlapMode:wr,seenUids:{box:{},circle:{}}},Kr);return In}query(u,Xe,fr,Ar){return this._query(u,Xe,fr,Ar,!1,null)}hitTest(u,Xe,fr,Ar,_r,wr){return this._query(u,Xe,fr,Ar,!0,_r,wr).length>0}hitTestCircle(u,Xe,fr,Ar,_r){const wr=u-fr,Kr=u+fr,In=Xe-fr,io=Xe+fr;if(Kr<0||wr>this.width||io<0||In>this.height)return!1;const no=[];return this._forEachCell(wr,In,Kr,io,this._queryCellCircle,no,{hitTest:!0,overlapMode:Ar,circle:{x:u,y:Xe,radius:fr},seenUids:{box:{},circle:{}}},_r),no.length>0}_queryCell(u,Xe,fr,Ar,_r,wr,Kr,In){const{seenUids:io,hitTest:no,overlapMode:oo}=Kr,so=this.boxCells[_r];if(null!==so){const _r=this.bboxes;for(const Kr of so)if(!io.box[Kr]){io.box[Kr]=!0;const so=4*Kr,ao=this.boxKeys[Kr];if(u<=_r[so+2]&&Xe<=_r[so+3]&&fr>=_r[so+0]&&Ar>=_r[so+1]&&(!In||In(ao))&&(!no||!mt(oo,ao.overlapMode))&&(wr.push({key:ao,x1:_r[so],y1:_r[so+1],x2:_r[so+2],y2:_r[so+3]}),no))return!0}}const ao=this.circleCells[_r];if(null!==ao){const _r=this.circles;for(const Kr of ao)if(!io.circle[Kr]){io.circle[Kr]=!0;const so=3*Kr,ao=this.circleKeys[Kr];if(this._circleAndRectCollide(_r[so],_r[so+1],_r[so+2],u,Xe,fr,Ar)&&(!In||In(ao))&&(!no||!mt(oo,ao.overlapMode))){const u=_r[so],Xe=_r[so+1],fr=_r[so+2];if(wr.push({key:ao,x1:u-fr,y1:Xe-fr,x2:u+fr,y2:Xe+fr}),no)return!0}}}return!1}_queryCellCircle(u,Xe,fr,Ar,_r,wr,Kr,In){const{circle:io,seenUids:no,overlapMode:oo}=Kr,so=this.boxCells[_r];if(null!==so){const u=this.bboxes;for(const Xe of so)if(!no.box[Xe]){no.box[Xe]=!0;const fr=4*Xe,Ar=this.boxKeys[Xe];if(this._circleAndRectCollide(io.x,io.y,io.radius,u[fr+0],u[fr+1],u[fr+2],u[fr+3])&&(!In||In(Ar))&&!mt(oo,Ar.overlapMode))return wr.push(!0),!0}}const ao=this.circleCells[_r];if(null!==ao){const u=this.circles;for(const Xe of ao)if(!no.circle[Xe]){no.circle[Xe]=!0;const fr=3*Xe,Ar=this.circleKeys[Xe];if(this._circlesCollide(u[fr],u[fr+1],u[fr+2],io.x,io.y,io.radius)&&(!In||In(Ar))&&!mt(oo,Ar.overlapMode))return wr.push(!0),!0}}}_forEachCell(u,Xe,fr,Ar,_r,wr,Kr,In){const io=this._convertToXCellCoord(u),no=this._convertToYCellCoord(Xe),oo=this._convertToXCellCoord(fr),so=this._convertToYCellCoord(Ar);for(let ao=io;ao<=oo;ao++)for(let io=no;io<=so;io++)if(_r.call(this,u,Xe,fr,Ar,this.xCellCount*io+ao,wr,Kr,In))return}_convertToXCellCoord(u){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(u*this.xScale)))}_convertToYCellCoord(u){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(u*this.yScale)))}_circlesCollide(u,Xe,fr,Ar,_r,wr){const Kr=Ar-u,In=_r-Xe,io=fr+wr;return io*io>Kr*Kr+In*In}_circleAndRectCollide(u,Xe,fr,Ar,_r,wr,Kr){const In=(wr-Ar)/2,io=Math.abs(u-(Ar+In));if(io>In+fr)return!1;const no=(Kr-_r)/2,oo=Math.abs(Xe-(_r+no));if(oo>no+fr)return!1;if(io<=In||oo<=no)return!0;const so=io-In,ao=oo-no;return so*so+ao*ao<=fr*fr}}function gt(u,fr,Ar,_r,wr){const Kr=Xe.H();return fr?(Xe.K(Kr,Kr,[1/wr,1/wr,1]),Ar||Xe.ad(Kr,Kr,_r.angle)):Xe.L(Kr,_r.labelPlaneMatrix,u),Kr}function vt(u,fr,Ar,_r,wr){if(fr){const fr=Xe.ae(u);return Xe.K(fr,fr,[wr,wr,1]),Ar||Xe.ad(fr,fr,-_r.angle),fr}return _r.glCoordMatrix}function xt(u,fr,Ar){let _r;Ar?(_r=[u.x,u.y,Ar(u.x,u.y),1],Xe.af(_r,_r,fr)):(_r=[u.x,u.y,0,1],function(u,Xe,fr){const Ar=Xe[0],_r=Xe[1];u[0]=fr[0]*Ar+fr[4]*_r+fr[12],u[1]=fr[1]*Ar+fr[5]*_r+fr[13],u[3]=fr[3]*Ar+fr[7]*_r+fr[15]}(_r,_r,fr));const wr=_r[3];return{point:new Xe.P(_r[0]/wr,_r[1]/wr),signedDistanceFromCamera:wr,isOccluded:!1}}function yt(u,Xe){return.5+u/Xe*.5}function bt(u,Xe){return u.x>=-Xe[0]&&u.x<=Xe[0]&&u.y>=-Xe[1]&&u.y<=Xe[1]}function wt(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho){const Co=_r?u.textSizeData:u.iconSizeData,Io=Xe.ag(Co,Ar.transform.zoom),xo=[256/Ar.width*2+1,256/Ar.height*2+1],Mo=_r?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;Mo.clear();const Po=u.lineVertexArray,ss=_r?u.text.placedSymbolArray:u.icon.placedSymbolArray,sa=Ar.transform.width/Ar.transform.height;let aa=!1;for(let _r=0;_r<ss.length;_r++){const fa=ss.get(_r);if(fa.hidden||fa.writingMode===Xe.ah.vertical&&!aa){Rt(fa.numGlyphs,Mo);continue}aa=!1;const ya=xt(new Xe.P(fa.anchorX,fa.anchorY),fr,ho);if(!bt(ya.point,xo)){Rt(fa.numGlyphs,Mo);continue}const ol=yt(Ar.transform.cameraToCenterDistance,ya.signedDistanceFromCamera),sl=Xe.ai(Co,Io,fa),al=In?sl/ol:sl*ol,cl={getElevation:ho,labelPlaneMatrix:wr,lineVertexArray:Po,pitchWithMap:In,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:oo,tileAnchorPoint:new Xe.P(fa.anchorX,fa.anchorY),unwrappedTileID:so,width:ao,height:co,translation:go},hl=Et(cl,fa,al,!1,io,fr,Kr,u.glyphOffsetArray,Mo,sa,no);aa=hl.useVertical,(hl.notEnoughRoom||aa||hl.needsFlipping&&Et(cl,fa,al,!0,io,fr,Kr,u.glyphOffsetArray,Mo,sa,no).notEnoughRoom)&&Rt(fa.numGlyphs,Mo)}_r?u.text.dynamicLayoutVertexBuffer.updateData(Mo):u.icon.dynamicLayoutVertexBuffer.updateData(Mo)}function Tt(u,Xe,fr,Ar,_r,wr,Kr,In){const io=wr.glyphStartIndex+wr.numGlyphs,no=wr.lineStartIndex,oo=wr.lineStartIndex+wr.lineLength,so=Xe.getoffsetX(wr.glyphStartIndex),ao=Xe.getoffsetX(io-1),co=Mt(u*so,fr,Ar,_r,wr.segment,no,oo,In,Kr);if(!co)return null;const go=Mt(u*ao,fr,Ar,_r,wr.segment,no,oo,In,Kr);return go?In.projectionCache.anyProjectionOccluded?null:{first:co,last:go}:null}function It(u,fr,Ar,_r){return u===Xe.ah.horizontal&&Math.abs(Ar.y-fr.y)>Math.abs(Ar.x-fr.x)*_r?{useVertical:!0}:(u===Xe.ah.vertical?fr.y<Ar.y:fr.x>Ar.x)?{needsFlipping:!0}:null}function Et(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so){const ao=Ar/24,co=fr.lineOffsetX*ao,go=fr.lineOffsetY*ao;let ho;if(fr.numGlyphs>1){const Xe=fr.glyphStartIndex+fr.numGlyphs,Ar=fr.lineStartIndex,Kr=fr.lineStartIndex+fr.lineLength,no=Tt(ao,io,co,go,_r,fr,so,u);if(!no)return{notEnoughRoom:!0};const Co=xt(no.first.point,In,u.getElevation).point,Io=xt(no.last.point,In,u.getElevation).point;if(wr&&!_r){const u=It(fr.writingMode,Co,Io,oo);if(u)return u}ho=[no.first];for(let wr=fr.glyphStartIndex+1;wr<Xe-1;wr++)ho.push(Mt(ao*io.getoffsetX(wr),co,go,_r,fr.segment,Ar,Kr,u,so));ho.push(no.last)}else{if(wr&&!_r){const Ar=xt(u.tileAnchorPoint,Kr,u.getElevation).point,_r=fr.lineStartIndex+fr.segment+1,wr=new Xe.P(u.lineVertexArray.getx(_r),u.lineVertexArray.gety(_r)),In=xt(wr,Kr,u.getElevation),io=In.signedDistanceFromCamera>0?In.point:function(u,Xe,fr,Ar,_r,wr){return Pt(u,Xe,fr,1,_r,wr)}(u.tileAnchorPoint,wr,Ar,0,Kr,u),no=It(fr.writingMode,Ar,io,oo);if(no)return no}const Ar=Mt(ao*io.getoffsetX(fr.glyphStartIndex),co,go,_r,fr.segment,fr.lineStartIndex,fr.lineStartIndex+fr.lineLength,u,so);if(!Ar||u.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};ho=[Ar]}for(const u of ho)Xe.aj(no,u.point,u.angle);return{}}function Pt(u,Xe,fr,Ar,_r,wr){const Kr=u.add(u.sub(Xe)._unit()),In=void 0!==_r?xt(Kr,_r,wr.getElevation).point:St(Kr.x,Kr.y,wr).point,io=fr.sub(In);return fr.add(io._mult(Ar/io.mag()))}function Ct(u,fr,Ar){const _r=fr.projectionCache;if(_r.projections[u])return _r.projections[u];const wr=new Xe.P(fr.lineVertexArray.getx(u),fr.lineVertexArray.gety(u)),Kr=St(wr.x,wr.y,fr);if(Kr.signedDistanceFromCamera>0)return _r.projections[u]=Kr.point,_r.anyProjectionOccluded=_r.anyProjectionOccluded||Kr.isOccluded,Kr.point;const In=u-Ar.direction;return function(u,Xe,fr,Ar,_r){return Pt(u,Xe,fr,Ar,void 0,_r)}(0===Ar.distanceFromAnchor?fr.tileAnchorPoint:new Xe.P(fr.lineVertexArray.getx(In),fr.lineVertexArray.gety(In)),wr,Ar.previousVertex,Ar.absOffsetX-Ar.distanceFromAnchor+1,fr)}function St(u,fr,Ar){const _r=u+Ar.translation[0],wr=fr+Ar.translation[1];let Kr;return!Ar.pitchWithMap&&Ar.projection.useSpecialProjectionForSymbols?(Kr=Ar.projection.projectTileCoordinates(_r,wr,Ar.unwrappedTileID,Ar.getElevation),Kr.point.x=(.5*Kr.point.x+.5)*Ar.width,Kr.point.y=(.5*-Kr.point.y+.5)*Ar.height):(Kr=xt(new Xe.P(_r,wr),Ar.labelPlaneMatrix,Ar.getElevation),Kr.isOccluded=!1),Kr}function zt(u,Xe,fr){return u._unit()._perp()._mult(Xe*fr)}function Dt(u,fr,Ar,_r,wr,Kr,In,io,no){if(io.projectionCache.offsets[u])return io.projectionCache.offsets[u];const oo=Ar.add(fr);if(u+no.direction<_r||u+no.direction>=wr)return io.projectionCache.offsets[u]=oo,oo;const so=Ct(u+no.direction,io,no),ao=zt(so.sub(Ar),In,no.direction),co=Ar.add(ao),go=so.add(ao);return io.projectionCache.offsets[u]=Xe.ak(Kr,oo,co,go)||oo,io.projectionCache.offsets[u]}function Mt(u,Xe,fr,Ar,_r,wr,Kr,In,io){const no=Ar?u-Xe:u+Xe;let oo=no>0?1:-1,so=0;Ar&&(oo*=-1,so=Math.PI),oo<0&&(so+=Math.PI);let ao,co=oo>0?wr+_r:wr+_r+1;In.projectionCache.cachedAnchorPoint?ao=In.projectionCache.cachedAnchorPoint:(ao=St(In.tileAnchorPoint.x,In.tileAnchorPoint.y,In).point,In.projectionCache.cachedAnchorPoint=ao);let go,ho,Co=ao,Io=ao,xo=0,Mo=0;const Po=Math.abs(no),ss=[];let sa;for(;xo+Mo<=Po;){if(co+=oo,co<wr||co>=Kr)return null;xo+=Mo,Io=Co,ho=go;const u={absOffsetX:Po,direction:oo,distanceFromAnchor:xo,previousVertex:Io};if(Co=Ct(co,In,u),0===fr)ss.push(Io),sa=Co.sub(Io);else{let Xe;const Ar=Co.sub(Io);Xe=0===Ar.mag()?zt(Ct(co+oo,In,u).sub(Co),fr,oo):zt(Ar,fr,oo),ho||(ho=Io.add(Xe)),go=Dt(co,Xe,Co,wr,Kr,ho,fr,In,u),ss.push(ho),sa=go.sub(ho)}Mo=sa.mag()}const aa=sa._mult((Po-xo)/Mo)._add(ho||Io),fa=so+Math.atan2(Co.y-Io.y,Co.x-Io.x);return ss.push(aa),{point:aa,angle:io?fa:0,path:ss}}const fa=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Rt(u,Xe){for(let fr=0;fr<u;fr++){const u=Xe.length;Xe.resize(u+4),Xe.float32.set(fa,3*u)}}const ya=100;class Lt{constructor(u,Xe,fr=new ft(u.width+200,u.height+200,25),Ar=new ft(u.width+200,u.height+200,25)){this.transform=u,this.mapProjection=Xe,this.grid=fr,this.ignoredGrid=Ar,this.pitchFactor=Math.cos(u._pitch)*u.cameraToCenterDistance,this.screenRightBoundary=u.width+ya,this.screenBottomBoundary=u.height+ya,this.gridRightBoundary=u.width+200,this.gridBottomBoundary=u.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=u.anchorPointX+In[0],ao=u.anchorPointY+In[1],co=this.projectAndGetPerspectiveRatio(Ar,so,ao,_r,no),go=this._projectCollisionBox(u,fr,Ar,_r,wr,Kr,In,co,no,oo),[ho,Co,Io,xo]=go.box;return this.mapProjection.useSpecialProjectionForSymbols&&(wr?go.allPointsOccluded:this.mapProjection.isOccluded(so,ao,_r))||co.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(ho,Co,Io,xo)||"always"!==Xe&&this.grid.hitTest(ho,Co,Io,xo,Xe,io)?{box:[ho,Co,Io,xo],placeable:!1,offscreen:!1}:{box:[ho,Co,Io,xo],placeable:!0,offscreen:this.isOffscreen(ho,Co,Io,xo)}}placeCollisionCircles(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co){const Io=[],xo=new Xe.P(fr.anchorX,fr.anchorY),Mo=this.getPerspectiveRatio(Kr,xo.x,xo.y,In,Co),Po=(so?wr/Mo:wr*Mo)/Xe.ap,ss={getElevation:Co,labelPlaneMatrix:io,lineVertexArray:Ar,pitchWithMap:so,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:xo,unwrappedTileID:In,width:this.transform.width,height:this.transform.height,translation:ho},sa=Tt(Po,_r,fr.lineOffsetX*Po,fr.lineOffsetY*Po,!1,fr,!1,ss);let aa=!1,fa=!1,ol=!0;if(sa){const fr=.5*co*Mo+go,Ar=new Xe.P(-100,-100),_r=new Xe.P(this.screenRightBoundary,this.screenBottomBoundary),wr=new pt,Kr=sa.first,In=sa.last;let io=[];for(let u=Kr.path.length-1;u>=1;u--)io.push(Kr.path[u]);for(let u=1;u<In.path.length;u++)io.push(In.path[u]);const so=2.5*fr;if(no){const u=this.projectPathToScreenSpace(io,ss,no);io=u.some((u=>u.signedDistanceFromCamera<=0))?[]:u.map((u=>u.point))}let ho=[];if(io.length>0){const u=io[0].clone(),fr=io[0].clone();for(let Xe=1;Xe<io.length;Xe++)u.x=Math.min(u.x,io[Xe].x),u.y=Math.min(u.y,io[Xe].y),fr.x=Math.max(fr.x,io[Xe].x),fr.y=Math.max(fr.y,io[Xe].y);ho=u.x>=Ar.x&&fr.x<=_r.x&&u.y>=Ar.y&&fr.y<=_r.y?[io]:fr.x<Ar.x||u.x>_r.x||fr.y<Ar.y||u.y>_r.y?[]:Xe.al([io],Ar.x,Ar.y,_r.x,_r.y)}for(const Xe of ho){wr.reset(Xe,.25*fr);let Ar=0;Ar=wr.length<=.5*fr?1:Math.ceil(wr.paddedLength/so)+1;for(let Xe=0;Xe<Ar;Xe++){const _r=Xe/Math.max(Ar-1,1),Kr=wr.lerp(_r),In=Kr.x+ya,io=Kr.y+ya;Io.push(In,io,fr,0);const no=In-fr,so=io-fr,co=In+fr,go=io+fr;if(ol=ol&&this.isOffscreen(no,so,co,go),fa=fa||this.isInsideGrid(no,so,co,go),"always"!==u&&this.grid.hitTestCircle(In,io,fr,u,ao)&&(aa=!0,!oo))return{circles:[],offscreen:!1,collisionDetected:aa}}}}return{circles:!oo&&aa||!fa||Mo<this.perspectiveRatioCutoff?[]:Io,offscreen:ol,collisionDetected:aa}}projectPathToScreenSpace(u,Xe,fr){return u.map((u=>xt(u,fr,Xe.getElevation)))}queryRenderedSymbols(u){if(0===u.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};const fr=[];let Ar=1/0,_r=1/0,wr=-1/0,Kr=-1/0;for(const In of u){const u=new Xe.P(In.x+ya,In.y+ya);Ar=Math.min(Ar,u.x),_r=Math.min(_r,u.y),wr=Math.max(wr,u.x),Kr=Math.max(Kr,u.y),fr.push(u)}const In=this.grid.query(Ar,_r,wr,Kr).concat(this.ignoredGrid.query(Ar,_r,wr,Kr)),io={},no={};for(const u of In){const Ar=u.key;if(void 0===io[Ar.bucketInstanceId]&&(io[Ar.bucketInstanceId]={}),io[Ar.bucketInstanceId][Ar.featureIndex])continue;const _r=[new Xe.P(u.x1,u.y1),new Xe.P(u.x2,u.y1),new Xe.P(u.x2,u.y2),new Xe.P(u.x1,u.y2)];Xe.am(fr,_r)&&(io[Ar.bucketInstanceId][Ar.featureIndex]=!0,void 0===no[Ar.bucketInstanceId]&&(no[Ar.bucketInstanceId]=[]),no[Ar.bucketInstanceId].push(Ar.featureIndex))}return no}insertCollisionBox(u,Xe,fr,Ar,_r,wr){(fr?this.ignoredGrid:this.grid).insert({bucketInstanceId:Ar,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe},u[0],u[1],u[2],u[3])}insertCollisionCircles(u,Xe,fr,Ar,_r,wr){const Kr=fr?this.ignoredGrid:this.grid,In={bucketInstanceId:Ar,featureIndex:_r,collisionGroupID:wr,overlapMode:Xe};for(let Xe=0;Xe<u.length;Xe+=4)Kr.insertCircle(In,u[Xe],u[Xe+1],u[Xe+2])}projectAndGetPerspectiveRatio(u,fr,Ar,_r,wr){const Kr=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fr,Ar,_r,wr):xt(new Xe.P(fr,Ar),u,wr);return{point:new Xe.P((Kr.point.x+1)/2*this.transform.width+ya,(1-Kr.point.y)/2*this.transform.height+ya),perspectiveRatio:.5+this.transform.cameraToCenterDistance/Kr.signedDistanceFromCamera*.5,isOccluded:Kr.isOccluded,signedDistanceFromCamera:Kr.signedDistanceFromCamera}}getPerspectiveRatio(u,fr,Ar,_r,wr){const Kr=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fr,Ar,_r,wr):xt(new Xe.P(fr,Ar),u,wr);return.5+this.transform.cameraToCenterDistance/Kr.signedDistanceFromCamera*.5}isOffscreen(u,Xe,fr,Ar){return fr<ya||u>=this.screenRightBoundary||Ar<ya||Xe>this.screenBottomBoundary}isInsideGrid(u,Xe,fr,Ar){return fr>=0&&u<this.gridRightBoundary&&Ar>=0&&Xe<this.gridBottomBoundary}getViewportMatrix(){const u=Xe.an([]);return Xe.J(u,u,[-100,-100,0]),u}_projectCollisionBox(u,fr,Ar,_r,wr,Kr,In,io,no,oo){const so=fr*io.perspectiveRatio;let ao=new Xe.P(1,0),co=new Xe.P(0,1);const go=new Xe.P(u.anchorPointX+In[0],u.anchorPointY+In[1]);if(Kr&&!wr){const u=this.projectAndGetPerspectiveRatio(Ar,go.x+1,go.y,_r,no).point.sub(io.point).unit(),fr=Math.atan(u.y/u.x)+(u.x<0?Math.PI:0),wr=Math.sin(fr),Kr=Math.cos(fr);ao=new Xe.P(Kr,wr),co=new Xe.P(-wr,Kr)}else if(!Kr&&wr){const u=-this.transform.angle,fr=Math.sin(u),Ar=Math.cos(u);ao=new Xe.P(Ar,fr),co=new Xe.P(-fr,Ar)}let ho=io.point,Co=so;if(wr){ho=go;const u=this.transform.zoom-Math.floor(this.transform.zoom);Co=Math.pow(2,-u),Co*=this.mapProjection.getPitchedTextCorrection(this.transform,go,_r),oo||(Co*=Xe.ac(.5+io.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}oo&&(ho=ho.add(ao.mult(oo.x*Co)).add(co.mult(oo.y*Co)));const Io=u.x1*Co,xo=u.x2*Co,Mo=(Io+xo)/2,Po=u.y1*Co,ss=u.y2*Co,sa=(Po+ss)/2,aa=[{offsetX:Io,offsetY:Po},{offsetX:Mo,offsetY:Po},{offsetX:xo,offsetY:Po},{offsetX:xo,offsetY:sa},{offsetX:xo,offsetY:ss},{offsetX:Mo,offsetY:ss},{offsetX:Io,offsetY:ss},{offsetX:Io,offsetY:sa}];let fa=[];for(const{offsetX:u,offsetY:fr}of aa)fa.push(new Xe.P(ho.x+ao.x*u+co.x*fr,ho.y+ao.y*u+co.y*fr));let ya=!1;if(wr){const u=fa.map((u=>this.projectAndGetPerspectiveRatio(Ar,u.x,u.y,_r,no)));ya=u.some((u=>!u.isOccluded)),fa=u.map((u=>u.point))}else ya=!0;return{box:Xe.ao(fa),allPointsOccluded:!ya}}}function Ft(u,fr,Ar){return fr*(Xe.X/(u.tileSize*Math.pow(2,Ar-u.tileID.overscaledZ)))}class Bt{constructor(u,Xe,fr,Ar){this.opacity=u?Math.max(0,Math.min(1,u.opacity+(u.placed?Xe:-Xe))):Ar&&fr?1:0,this.placed=fr}isHidden(){return 0===this.opacity&&!this.placed}}class Ot{constructor(u,Xe,fr,Ar,_r){this.text=new Bt(u?u.text:null,Xe,fr,_r),this.icon=new Bt(u?u.icon:null,Xe,Ar,_r)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Nt{constructor(u,Xe,fr){this.text=u,this.icon=Xe,this.skipFade=fr}}class jt{constructor(){this.invProjMatrix=Xe.H(),this.viewportMatrix=Xe.H(),this.circles=[]}}class Ut{constructor(u,Xe,fr,Ar,_r){this.bucketInstanceId=u,this.featureIndex=Xe,this.sourceLayerIndex=fr,this.bucketIndex=Ar,this.tileID=_r}}class Zt{constructor(u){this.crossSourceCollisions=u,this.maxGroupID=0,this.collisionGroups={}}get(u){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[u]){const Xe=++this.maxGroupID;this.collisionGroups[u]={ID:Xe,predicate:u=>u.collisionGroupID===Xe}}return this.collisionGroups[u]}}function qt(u,fr,Ar,_r,wr){const{horizontalAlign:Kr,verticalAlign:In}=Xe.au(u);return new Xe.P(-(Kr-.5)*fr+_r[0]*wr,-(In-.5)*Ar+_r[1]*wr)}class Vt{constructor(u,Xe,fr,Ar,_r,wr){this.transform=u.clone(),this.terrain=fr,this.collisionIndex=new Lt(this.transform,Xe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Ar,this.retainedQueryData={},this.collisionGroups=new Zt(_r),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=wr,wr&&(wr.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(u){const Xe=this.terrain;return Xe?(fr,Ar)=>Xe.getElevation(u,fr,Ar):null}getBucketParts(u,fr,Ar,_r){const wr=Ar.getBucket(fr),Kr=Ar.latestFeatureIndex;if(!wr||!Kr||fr.id!==wr.layerIds[0])return;const In=Ar.collisionBoxArray,io=wr.layers[0].layout,no=wr.layers[0].paint,oo=Math.pow(2,this.transform.zoom-Ar.tileID.overscaledZ),so=Ar.tileSize/Xe.X,ao=Ar.tileID.toUnwrapped(),co=this.transform.calculatePosMatrix(ao),go="map"===io.get("text-pitch-alignment"),ho="map"===io.get("text-rotation-alignment"),Co=Ft(Ar,1,this.transform.zoom),Io=this.collisionIndex.mapProjection.translatePosition(this.transform,Ar,no.get("text-translate"),no.get("text-translate-anchor")),xo=this.collisionIndex.mapProjection.translatePosition(this.transform,Ar,no.get("icon-translate"),no.get("icon-translate-anchor")),Mo=gt(co,go,ho,this.transform,Co);let Po=null;if(go){const u=vt(co,go,ho,this.transform,Co);Po=Xe.L([],this.transform.labelPlaneMatrix,u)}this.retainedQueryData[wr.bucketInstanceId]=new Ut(wr.bucketInstanceId,Kr,wr.sourceLayerIndex,wr.index,Ar.tileID);const ss={bucket:wr,layout:io,translationText:Io,translationIcon:xo,posMatrix:co,unwrappedTileID:ao,textLabelPlaneMatrix:Mo,labelToScreenMatrix:Po,scale:oo,textPixelRatio:so,holdingForFade:Ar.holdingForFade(),collisionBoxArray:In,partiallyEvaluatedTextSize:Xe.ag(wr.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(wr.sourceID)};if(_r)for(const Xe of wr.sortKeyRanges){const{sortKey:fr,symbolInstanceStart:Ar,symbolInstanceEnd:_r}=Xe;u.push({sortKey:fr,symbolInstanceStart:Ar,symbolInstanceEnd:_r,parameters:ss})}else u.push({symbolInstanceStart:0,symbolInstanceEnd:wr.symbolInstances.length,parameters:ss})}attemptAnchorPlacement(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io,xo,Mo){const Po=Xe.aq[u.textAnchor],ss=[u.textOffset0,u.textOffset1],sa=qt(Po,Ar,_r,ss,wr),aa=this.collisionIndex.placeCollisionBox(fr,ao,io,no,oo,In,Kr,Co,so.predicate,Mo,sa);if((!xo||this.collisionIndex.placeCollisionBox(xo,ao,io,no,oo,In,Kr,Io,so.predicate,Mo,sa).placeable)&&aa.placeable){let u;if(this.prevPlacement&&this.prevPlacement.variableOffsets[co.crossTileID]&&this.prevPlacement.placements[co.crossTileID]&&this.prevPlacement.placements[co.crossTileID].text&&(u=this.prevPlacement.variableOffsets[co.crossTileID].anchor),0===co.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[co.crossTileID]={textOffset:ss,width:Ar,height:_r,anchor:Po,textBoxScale:wr,prevAnchor:u},this.markUsedJustification(go,Po,co,ho),go.allowVerticalPlacement&&(this.markUsedOrientation(go,ho,co),this.placedOrientations[co.crossTileID]=ho),{shift:sa,placedGlyphBoxes:aa}}}placeLayerBucketPart(u,fr,Ar){const{bucket:_r,layout:wr,translationText:Kr,translationIcon:In,posMatrix:io,unwrappedTileID:no,textLabelPlaneMatrix:oo,labelToScreenMatrix:so,textPixelRatio:ao,holdingForFade:co,collisionBoxArray:go,partiallyEvaluatedTextSize:ho,collisionGroup:Co}=u.parameters,Io=wr.get("text-optional"),xo=wr.get("icon-optional"),Mo=Xe.ar(wr,"text-overlap","text-allow-overlap"),Po="always"===Mo,ss=Xe.ar(wr,"icon-overlap","icon-allow-overlap"),sa="always"===ss,aa="map"===wr.get("text-rotation-alignment"),fa="map"===wr.get("text-pitch-alignment"),ya="none"!==wr.get("icon-text-fit"),ol="viewport-y"===wr.get("symbol-z-order"),sl=Po&&(sa||!_r.hasIconData()||xo),al=sa&&(Po||!_r.hasTextData()||Io);!_r.collisionArrays&&go&&_r.deserializeCollisionBoxes(go);const cl=this._getTerrainElevationFunc(this.retainedQueryData[_r.bucketInstanceId].tileID),D=(u,go,sa)=>{var ol,hl;if(fr[u.crossTileID])return;if(co)return void(this.placements[u.crossTileID]=new Nt(!1,!1,!1));let ul=!1,dl=!1,pl=!0,Cl=null,fl={box:null,placeable:!1,offscreen:null},_l={box:null,placeable:!1,offscreen:null},vl=null,xl=null,Sl=null,kl=0,Bl=0,Zl=0;go.textFeatureIndex?kl=go.textFeatureIndex:u.useRuntimeCollisionCircles&&(kl=u.featureIndex),go.verticalTextFeatureIndex&&(Bl=go.verticalTextFeatureIndex);const Rl=go.textBox;if(Rl){const i=fr=>{let Ar=Xe.ah.horizontal;if(_r.allowVerticalPlacement&&!fr&&this.prevPlacement){const Xe=this.prevPlacement.placedOrientations[u.crossTileID];Xe&&(this.placedOrientations[u.crossTileID]=Xe,Ar=Xe,this.markUsedOrientation(_r,Ar,u))}return Ar},o=(fr,Ar)=>{if(_r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&go.verticalTextBox){for(const u of _r.writingModes)if(u===Xe.ah.vertical?(fl=Ar(),_l=fl):fl=fr(),fl&&fl.placeable)break}else fl=fr()},fr=u.textAnchorOffsetStartIndex,wr=u.textAnchorOffsetEndIndex;if(wr===fr){const a=(Xe,fr)=>{const Ar=this.collisionIndex.placeCollisionBox(Xe,Mo,ao,io,no,fa,aa,Kr,Co.predicate,cl);return Ar&&Ar.placeable&&(this.markUsedOrientation(_r,fr,u),this.placedOrientations[u.crossTileID]=fr),Ar};o((()=>a(Rl,Xe.ah.horizontal)),(()=>{const fr=go.verticalTextBox;return _r.allowVerticalPlacement&&u.numVerticalGlyphVertices>0&&fr?a(fr,Xe.ah.vertical):{box:null,offscreen:null}})),i(fl&&fl.placeable)}else{let oo=Xe.aq[null===(hl=null===(ol=this.prevPlacement)||void 0===ol?void 0:ol.variableOffsets[u.crossTileID])||void 0===hl?void 0:hl.anchor];const m=(so,co,go)=>{const ho=so.x2-so.x1,Io=so.y2-so.y1,xo=u.textBoxScale,Po=ya&&"never"===ss?co:null;let sa=null,ol="never"===Mo?1:2,sl="never";oo&&ol++;for(let Xe=0;Xe<ol;Xe++){for(let Xe=fr;Xe<wr;Xe++){const fr=_r.textAnchorOffsets.get(Xe);if(oo&&fr.textAnchor!==oo)continue;const Ar=this.attemptAnchorPlacement(fr,so,ho,Io,xo,aa,fa,ao,io,no,Co,sl,u,_r,go,Kr,In,Po,cl);if(Ar&&(sa=Ar.placedGlyphBoxes,sa&&sa.placeable))return ul=!0,Cl=Ar.shift,sa}oo?oo=null:sl=Mo}return Ar&&!sa&&(sa={box:this.collisionIndex.placeCollisionBox(Rl,"always",ao,io,no,fa,aa,Kr,Co.predicate,cl,new Xe.P(0,0)).box,offscreen:!1,placeable:!1}),sa};o((()=>m(Rl,go.iconBox,Xe.ah.horizontal)),(()=>{const fr=go.verticalTextBox;return _r.allowVerticalPlacement&&(!fl||!fl.placeable)&&u.numVerticalGlyphVertices>0&&fr?m(fr,go.verticalIconBox,Xe.ah.vertical):{box:null,occluded:!0,offscreen:null}})),fl&&(ul=fl.placeable,pl=fl.offscreen);const so=i(fl&&fl.placeable);if(!ul&&this.prevPlacement){const Xe=this.prevPlacement.variableOffsets[u.crossTileID];Xe&&(this.variableOffsets[u.crossTileID]=Xe,this.markUsedJustification(_r,Xe.anchor,u,so))}}}if(vl=fl,ul=vl&&vl.placeable,pl=vl&&vl.offscreen,u.useRuntimeCollisionCircles){const fr=_r.text.placedSymbolArray.get(u.centerJustifiedTextSymbolIndex),In=Xe.ai(_r.textSizeData,ho,fr),ao=wr.get("text-padding");xl=this.collisionIndex.placeCollisionCircles(Mo,fr,_r.lineVertexArray,_r.glyphOffsetArray,In,io,no,oo,so,Ar,fa,Co.predicate,u.collisionCircleDiameter,ao,Kr,cl),xl.circles.length&&xl.collisionDetected&&!Ar&&Xe.w("Collisions detected, but collision boxes are not shown"),ul=Po||xl.circles.length>0&&!xl.collisionDetected,pl=pl&&xl.offscreen}if(go.iconFeatureIndex&&(Zl=go.iconFeatureIndex),go.iconBox){const t=u=>this.collisionIndex.placeCollisionBox(u,ss,ao,io,no,fa,aa,In,Co.predicate,cl,ya&&Cl?Cl:void 0);_l&&_l.placeable&&go.verticalIconBox?(Sl=t(go.verticalIconBox),dl=Sl.placeable):(Sl=t(go.iconBox),dl=Sl.placeable),pl=pl&&Sl.offscreen}const Wl=Io||0===u.numHorizontalGlyphVertices&&0===u.numVerticalGlyphVertices,Tl=xo||0===u.numIconVertices;Wl||Tl?Tl?Wl||(dl=dl&&ul):ul=dl&&ul:dl=ul=dl&&ul;const Jl=dl&&Sl.placeable;if(ul&&vl.placeable&&this.collisionIndex.insertCollisionBox(vl.box,Mo,wr.get("text-ignore-placement"),_r.bucketInstanceId,_l&&_l.placeable&&Bl?Bl:kl,Co.ID),Jl&&this.collisionIndex.insertCollisionBox(Sl.box,ss,wr.get("icon-ignore-placement"),_r.bucketInstanceId,Zl,Co.ID),xl&&ul&&this.collisionIndex.insertCollisionCircles(xl.circles,Mo,wr.get("text-ignore-placement"),_r.bucketInstanceId,kl,Co.ID),Ar&&this.storeCollisionData(_r.bucketInstanceId,sa,go,vl,Sl,xl),0===u.crossTileID)throw new Error("symbolInstance.crossTileID can't be 0");if(0===_r.bucketInstanceId)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[u.crossTileID]=new Nt(ul||sl,dl||al,pl||_r.justReloaded),fr[u.crossTileID]=!0};if(ol){if(0!==u.symbolInstanceStart)throw new Error("bucket.bucketInstanceId should be 0");const Xe=_r.getSortedSymbolIndexes(this.transform.angle);for(let u=Xe.length-1;u>=0;--u){const fr=Xe[u];D(_r.symbolInstances.get(fr),_r.collisionArrays[fr],fr)}}else for(let Xe=u.symbolInstanceStart;Xe<u.symbolInstanceEnd;Xe++)D(_r.symbolInstances.get(Xe),_r.collisionArrays[Xe],Xe);if(Ar&&_r.bucketInstanceId in this.collisionCircleArrays){const u=this.collisionCircleArrays[_r.bucketInstanceId];Xe.as(u.invProjMatrix,io),u.viewportMatrix=this.collisionIndex.getViewportMatrix()}_r.justReloaded=!1}storeCollisionData(u,Xe,fr,Ar,_r,wr){if(fr.textBox||fr.iconBox){let wr,Kr;this.collisionBoxArrays.has(u)?wr=this.collisionBoxArrays.get(u):(wr=new Map,this.collisionBoxArrays.set(u,wr)),wr.has(Xe)?Kr=wr.get(Xe):(Kr={text:null,icon:null},wr.set(Xe,Kr)),fr.textBox&&(Kr.text=Ar.box),fr.iconBox&&(Kr.icon=_r.box)}if(wr){let Xe=this.collisionCircleArrays[u];void 0===Xe&&(Xe=this.collisionCircleArrays[u]=new jt);for(let u=0;u<wr.circles.length;u+=4)Xe.circles.push(wr.circles[u+0]),Xe.circles.push(wr.circles[u+1]),Xe.circles.push(wr.circles[u+2]),Xe.circles.push(wr.collisionDetected?1:0)}}markUsedJustification(u,fr,Ar,_r){let wr;wr=_r===Xe.ah.vertical?Ar.verticalPlacedTextSymbolIndex:{left:Ar.leftJustifiedTextSymbolIndex,center:Ar.centerJustifiedTextSymbolIndex,right:Ar.rightJustifiedTextSymbolIndex}[Xe.at(fr)];const Kr=[Ar.leftJustifiedTextSymbolIndex,Ar.centerJustifiedTextSymbolIndex,Ar.rightJustifiedTextSymbolIndex,Ar.verticalPlacedTextSymbolIndex];for(const Xe of Kr)Xe>=0&&(u.text.placedSymbolArray.get(Xe).crossTileID=wr>=0&&Xe!==wr?0:Ar.crossTileID)}markUsedOrientation(u,fr,Ar){const _r=fr===Xe.ah.horizontal||fr===Xe.ah.horizontalOnly?fr:0,wr=fr===Xe.ah.vertical?fr:0,Kr=[Ar.leftJustifiedTextSymbolIndex,Ar.centerJustifiedTextSymbolIndex,Ar.rightJustifiedTextSymbolIndex];for(const Xe of Kr)u.text.placedSymbolArray.get(Xe).placedOrientation=_r;Ar.verticalPlacedTextSymbolIndex&&(u.text.placedSymbolArray.get(Ar.verticalPlacedTextSymbolIndex).placedOrientation=wr)}commit(u){this.commitTime=u,this.zoomAtLastRecencyCheck=this.transform.zoom;const Xe=this.prevPlacement;let fr=!1;this.prevZoomAdjustment=Xe?Xe.zoomAdjustment(this.transform.zoom):0;const Ar=Xe?Xe.symbolFadeChange(u):1,_r=Xe?Xe.opacities:{},wr=Xe?Xe.variableOffsets:{},Kr=Xe?Xe.placedOrientations:{};for(const u in this.placements){const Xe=this.placements[u],wr=_r[u];wr?(this.opacities[u]=new Ot(wr,Ar,Xe.text,Xe.icon),fr=fr||Xe.text!==wr.text.placed||Xe.icon!==wr.icon.placed):(this.opacities[u]=new Ot(null,Ar,Xe.text,Xe.icon,Xe.skipFade),fr=fr||Xe.text||Xe.icon)}for(const u in _r){const Xe=_r[u];if(!this.opacities[u]){const _r=new Ot(Xe,Ar,!1,!1);_r.isHidden()||(this.opacities[u]=_r,fr=fr||Xe.text.placed||Xe.icon.placed)}}for(const u in wr)this.variableOffsets[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.variableOffsets[u]=wr[u]);for(const u in Kr)this.placedOrientations[u]||!this.opacities[u]||this.opacities[u].isHidden()||(this.placedOrientations[u]=Kr[u]);if(Xe&&void 0===Xe.lastPlacementChangeTime)throw new Error("Last placement time for previous placement is not defined");fr?this.lastPlacementChangeTime=u:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=Xe?Xe.lastPlacementChangeTime:u)}updateLayerOpacities(u,Xe){const fr={};for(const Ar of Xe){const Xe=Ar.getBucket(u);Xe&&Ar.latestFeatureIndex&&u.id===Xe.layerIds[0]&&this.updateBucketOpacities(Xe,Ar.tileID,fr,Ar.collisionBoxArray)}}updateBucketOpacities(u,fr,Ar,_r){u.hasTextData()&&(u.text.opacityVertexArray.clear(),u.text.hasVisibleVertices=!1),u.hasIconData()&&(u.icon.opacityVertexArray.clear(),u.icon.hasVisibleVertices=!1),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexArray.clear(),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexArray.clear();const wr=u.layers[0],Kr=wr.layout,In=new Ot(null,0,!1,!1,!0),io=Kr.get("text-allow-overlap"),no=Kr.get("icon-allow-overlap"),oo=wr._unevaluatedLayout.hasValue("text-variable-anchor")||wr._unevaluatedLayout.hasValue("text-variable-anchor-offset"),so="map"===Kr.get("text-rotation-alignment"),ao="map"===Kr.get("text-pitch-alignment"),co="none"!==Kr.get("icon-text-fit"),go=new Ot(null,0,io&&(no||!u.hasIconData()||Kr.get("icon-optional")),no&&(io||!u.hasTextData()||Kr.get("text-optional")),!0);!u.collisionArrays&&_r&&(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData())&&u.deserializeCollisionBoxes(_r);const m=(u,Xe,fr)=>{for(let Ar=0;Ar<Xe/4;Ar++)u.opacityVertexArray.emplaceBack(fr);u.hasVisibleVertices=u.hasVisibleVertices||fr!==pl},ho=this.collisionBoxArrays.get(u.bucketInstanceId);for(let fr=0;fr<u.symbolInstances.length;fr++){const _r=u.symbolInstances.get(fr),{numHorizontalGlyphVertices:wr,numVerticalGlyphVertices:Kr,crossTileID:io}=_r;let no=this.opacities[io];Ar[io]?no=In:no||(no=go,this.opacities[io]=no),Ar[io]=!0;const Co=_r.numIconVertices>0,Io=this.placedOrientations[_r.crossTileID],xo=Io===Xe.ah.vertical,Mo=Io===Xe.ah.horizontal||Io===Xe.ah.horizontalOnly;if(wr>0||Kr>0){const Xe=Qt(no.text);m(u.text,wr,xo?pl:Xe),m(u.text,Kr,Mo?pl:Xe);const fr=no.text.isHidden();[_r.rightJustifiedTextSymbolIndex,_r.centerJustifiedTextSymbolIndex,_r.leftJustifiedTextSymbolIndex].forEach((Xe=>{Xe>=0&&(u.text.placedSymbolArray.get(Xe).hidden=fr||xo?1:0)})),_r.verticalPlacedTextSymbolIndex>=0&&(u.text.placedSymbolArray.get(_r.verticalPlacedTextSymbolIndex).hidden=fr||Mo?1:0);const Ar=this.variableOffsets[_r.crossTileID];Ar&&this.markUsedJustification(u,Ar.anchor,_r,Io);const In=this.placedOrientations[_r.crossTileID];In&&(this.markUsedJustification(u,"left",_r,In),this.markUsedOrientation(u,In,_r))}if(Co){const Xe=Qt(no.icon),fr=!(co&&_r.verticalPlacedIconSymbolIndex&&xo);_r.placedIconSymbolIndex>=0&&(m(u.icon,_r.numIconVertices,fr?Xe:pl),u.icon.placedSymbolArray.get(_r.placedIconSymbolIndex).hidden=no.icon.isHidden()),_r.verticalPlacedIconSymbolIndex>=0&&(m(u.icon,_r.numVerticalIconVertices,fr?pl:Xe),u.icon.placedSymbolArray.get(_r.verticalPlacedIconSymbolIndex).hidden=no.icon.isHidden())}const Po=ho&&ho.has(fr)?ho.get(fr):{text:null,icon:null};if(u.hasIconCollisionBoxData()||u.hasTextCollisionBoxData()){const Ar=u.collisionArrays[fr];if(Ar){let fr=new Xe.P(0,0);if(Ar.textBox||Ar.verticalTextBox){let Xe=!0;if(oo){const u=this.variableOffsets[io];u?(fr=qt(u.anchor,u.width,u.height,u.textOffset,u.textBoxScale),so&&fr._rotate(ao?this.transform.angle:-this.transform.angle)):Xe=!1}if(Ar.textBox||Ar.verticalTextBox){let _r;Ar.textBox&&(_r=xo),Ar.verticalTextBox&&(_r=Mo),Gt(u.textCollisionBox.collisionVertexArray,no.text.placed,!Xe||_r,Po.text,fr.x,fr.y)}}if(Ar.iconBox||Ar.verticalIconBox){const Xe=Boolean(!Mo&&Ar.verticalIconBox);let _r;Ar.iconBox&&(_r=Xe),Ar.verticalIconBox&&(_r=!Xe),Gt(u.iconCollisionBox.collisionVertexArray,no.icon.placed,_r,Po.icon,co?fr.x:0,co?fr.y:0)}}}}if(u.sortFeatures(this.transform.angle),this.retainedQueryData[u.bucketInstanceId]&&(this.retainedQueryData[u.bucketInstanceId].featureSortOrder=u.featureSortOrder),u.hasTextData()&&u.text.opacityVertexBuffer&&u.text.opacityVertexBuffer.updateData(u.text.opacityVertexArray),u.hasIconData()&&u.icon.opacityVertexBuffer&&u.icon.opacityVertexBuffer.updateData(u.icon.opacityVertexArray),u.hasIconCollisionBoxData()&&u.iconCollisionBox.collisionVertexBuffer&&u.iconCollisionBox.collisionVertexBuffer.updateData(u.iconCollisionBox.collisionVertexArray),u.hasTextCollisionBoxData()&&u.textCollisionBox.collisionVertexBuffer&&u.textCollisionBox.collisionVertexBuffer.updateData(u.textCollisionBox.collisionVertexArray),u.text.opacityVertexArray.length!==u.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${u.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${u.text.layoutVertexArray.length}) / 4`);if(u.icon.opacityVertexArray.length!==u.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${u.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${u.icon.layoutVertexArray.length}) / 4`);if(u.bucketInstanceId in this.collisionCircleArrays){const Xe=this.collisionCircleArrays[u.bucketInstanceId];u.placementInvProjMatrix=Xe.invProjMatrix,u.placementViewportMatrix=Xe.viewportMatrix,u.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[u.bucketInstanceId]}}symbolFadeChange(u){return 0===this.fadeDuration?1:(u-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(u){return Math.max(0,(this.transform.zoom-u)/1.5)}hasTransitions(u){return this.stale||u-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(u,Xe){const fr=this.zoomAtLastRecencyCheck===Xe?1-this.zoomAdjustment(Xe):1;return this.zoomAtLastRecencyCheck=Xe,this.commitTime+this.fadeDuration*fr>u}setStale(){this.stale=!0}}function Gt(u,Xe,fr,Ar,_r,wr){Ar&&0!==Ar.length||(Ar=[0,0,0,0]);const Kr=Ar[0]-ya,In=Ar[1]-ya,io=Ar[2]-ya,no=Ar[3]-ya;u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,Kr,In),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,io,In),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,io,no),u.emplaceBack(Xe?1:0,fr?1:0,_r||0,wr||0,Kr,no)}const ol=Math.pow(2,25),sl=Math.pow(2,24),al=Math.pow(2,17),cl=Math.pow(2,16),hl=Math.pow(2,9),ul=Math.pow(2,8),dl=Math.pow(2,1);function Qt(u){if(0===u.opacity&&!u.placed)return 0;if(1===u.opacity&&u.placed)return 4294967295;const Xe=u.placed?1:0,fr=Math.floor(127*u.opacity);return fr*ol+Xe*sl+fr*al+Xe*cl+fr*hl+Xe*ul+fr*dl+Xe}const pl=0;function ee(){return{isOccluded:(u,Xe,fr)=>!1,getPitchedTextCorrection:(u,Xe,fr)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(u,Xe,fr,Ar){throw new Error("Not implemented.")},translatePosition:(u,Xe,fr,Ar)=>function(u,Xe,fr,Ar,_r=!1){if(!fr[0]&&!fr[1])return[0,0];const wr=_r?"map"===Ar?u.angle:0:"viewport"===Ar?-u.angle:0;if(wr){const u=Math.sin(wr),Xe=Math.cos(wr);fr=[fr[0]*Xe-fr[1]*u,fr[0]*u+fr[1]*Xe]}return[_r?fr[0]:Ft(Xe,fr[0],u.zoom),_r?fr[1]:Ft(Xe,fr[1],u.zoom)]}(u,Xe,fr,Ar),getCircleRadiusCorrection:u=>1}}class ie{constructor(u){this._sortAcrossTiles="viewport-y"!==u.layout.get("symbol-z-order")&&!u.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(u,Xe,fr,Ar,_r){const wr=this._bucketParts;for(;this._currentTileIndex<u.length;)if(Xe.getBucketParts(wr,Ar,u[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,_r())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,wr.sort(((u,Xe)=>u.sortKey-Xe.sortKey)));this._currentPartIndex<wr.length;)if(Xe.placeLayerBucketPart(wr[this._currentPartIndex],this._seenCrossTileIDs,fr),this._currentPartIndex++,_r())return!0;return!1}}class ae{constructor(u,Xe,fr,Ar,_r,wr,Kr,In){this.placement=new Vt(u,ee(),Xe,wr,Kr,In),this._currentPlacementIndex=fr.length-1,this._forceFullPlacement=Ar,this._showCollisionBoxes=_r,this._done=!1}isDone(){return this._done}continuePlacement(u,Xe,fr){const Ar=wr.now(),s=()=>!this._forceFullPlacement&&wr.now()-Ar>2;for(;this._currentPlacementIndex>=0;){const Ar=Xe[u[this._currentPlacementIndex]],_r=this.placement.collisionIndex.transform.zoom;if("symbol"===Ar.type&&(!Ar.minzoom||Ar.minzoom<=_r)&&(!Ar.maxzoom||Ar.maxzoom>_r)){if(this._inProgressLayer||(this._inProgressLayer=new ie(Ar)),this._inProgressLayer.continuePlacement(fr[Ar.source],this.placement,this._showCollisionBoxes,Ar,s))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(u){return this.placement.commit(u),this.placement}}const Cl=512/Xe.X/2;class oe{constructor(u,fr,Ar){this.tileID=u,this.bucketInstanceId=Ar,this._symbolsByKey={};const _r=new Map;for(let u=0;u<fr.length;u++){const Xe=fr.get(u),Ar=Xe.key,wr=_r.get(Ar);wr?wr.push(Xe):_r.set(Ar,[Xe])}for(const[u,fr]of _r){const Ar={positions:fr.map((u=>({x:Math.floor(u.anchorX*Cl),y:Math.floor(u.anchorY*Cl)}))),crossTileIDs:fr.map((u=>u.crossTileID))};if(Ar.positions.length>128){const u=new Xe.av(Ar.positions.length,16,Uint16Array);for(const{x:Xe,y:fr}of Ar.positions)u.add(Xe,fr);u.finish(),delete Ar.positions,Ar.index=u}this._symbolsByKey[u]=Ar}}getScaledCoordinates(u,fr){const{x:Ar,y:_r,z:wr}=this.tileID.canonical,{x:Kr,y:In,z:io}=fr.canonical,no=Cl/Math.pow(2,io-wr),oo=(In*Xe.X+u.anchorY)*no,so=_r*Xe.X*Cl;return{x:Math.floor((Kr*Xe.X+u.anchorX)*no-Ar*Xe.X*Cl),y:Math.floor(oo-so)}}findMatches(u,Xe,fr){const Ar=this.tileID.canonical.z<Xe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Xe.canonical.z);for(let _r=0;_r<u.length;_r++){const wr=u.get(_r);if(wr.crossTileID)continue;const Kr=this._symbolsByKey[wr.key];if(!Kr)continue;const In=this.getScaledCoordinates(wr,Xe);if(Kr.index){const u=Kr.index.range(In.x-Ar,In.y-Ar,In.x+Ar,In.y+Ar).sort();for(const Xe of u){const u=Kr.crossTileIDs[Xe];if(!fr[u]){fr[u]=!0,wr.crossTileID=u;break}}}else if(Kr.positions)for(let u=0;u<Kr.positions.length;u++){const Xe=Kr.positions[u],_r=Kr.crossTileIDs[u];if(Math.abs(Xe.x-In.x)<=Ar&&Math.abs(Xe.y-In.y)<=Ar&&!fr[_r]){fr[_r]=!0,wr.crossTileID=_r;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map((({crossTileIDs:u})=>u))}}class re{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ne{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(u){const Xe=Math.round((u-this.lng)/360);if(0!==Xe)for(const u in this.indexes){const fr=this.indexes[u],Ar={};for(const u in fr){const _r=fr[u];_r.tileID=_r.tileID.unwrapTo(_r.tileID.wrap+Xe),Ar[_r.tileID.key]=_r}this.indexes[u]=Ar}this.lng=u}addBucket(u,Xe,fr){if(this.indexes[u.overscaledZ]&&this.indexes[u.overscaledZ][u.key]){if(this.indexes[u.overscaledZ][u.key].bucketInstanceId===Xe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(u.overscaledZ,this.indexes[u.overscaledZ][u.key])}for(let u=0;u<Xe.symbolInstances.length;u++)Xe.symbolInstances.get(u).crossTileID=0;this.usedCrossTileIDs[u.overscaledZ]||(this.usedCrossTileIDs[u.overscaledZ]={});const Ar=this.usedCrossTileIDs[u.overscaledZ];for(const fr in this.indexes){const _r=this.indexes[fr];if(Number(fr)>u.overscaledZ)for(const fr in _r){const wr=_r[fr];wr.tileID.isChildOf(u)&&wr.findMatches(Xe.symbolInstances,u,Ar)}else{const wr=_r[u.scaledTo(Number(fr)).key];wr&&wr.findMatches(Xe.symbolInstances,u,Ar)}}for(let u=0;u<Xe.symbolInstances.length;u++){const _r=Xe.symbolInstances.get(u);_r.crossTileID||(_r.crossTileID=fr.generate(),Ar[_r.crossTileID]=!0)}return void 0===this.indexes[u.overscaledZ]&&(this.indexes[u.overscaledZ]={}),this.indexes[u.overscaledZ][u.key]=new oe(u,Xe.symbolInstances,Xe.bucketInstanceId),!0}removeBucketCrossTileIDs(u,Xe){for(const fr of Xe.getCrossTileIDsLists())for(const Xe of fr)delete this.usedCrossTileIDs[u][Xe]}removeStaleBuckets(u){let Xe=!1;for(const fr in this.indexes){const Ar=this.indexes[fr];for(const _r in Ar)u[Ar[_r].bucketInstanceId]||(this.removeBucketCrossTileIDs(fr,Ar[_r]),delete Ar[_r],Xe=!0)}return Xe}}class le{constructor(){this.layerIndexes={},this.crossTileIDs=new re,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(u,Xe,fr){let Ar=this.layerIndexes[u.id];void 0===Ar&&(Ar=this.layerIndexes[u.id]=new ne);let _r=!1;const wr={};Ar.handleWrapJump(fr);for(const fr of Xe){const Xe=fr.getBucket(u);Xe&&u.id===Xe.layerIds[0]&&(Xe.bucketInstanceId||(Xe.bucketInstanceId=++this.maxBucketInstanceId),Ar.addBucket(fr.tileID,Xe,this.crossTileIDs)&&(_r=!0),wr[Xe.bucketInstanceId]=!0)}return Ar.removeStaleBuckets(wr)&&(_r=!0),_r}pruneUnusedLayers(u){const Xe={};u.forEach((u=>{Xe[u]=!0}));for(const u in this.layerIndexes)Xe[u]||delete this.layerIndexes[u]}}const he=(u,fr)=>Xe.t(u,fr&&fr.filter((u=>"source.canvas"!==u.identifier))),fl=Xe.aw();class ue extends Xe.E{constructor(u,fr={}){super(),this._rtlPluginLoaded=()=>{for(const u in this.sourceCaches){const Xe=this.sourceCaches[u].getSource().type;"vector"!==Xe&&"geojson"!==Xe||this.sourceCaches[u].reload()}},this.map=u,this.dispatcher=new j(N(),u._getMapId()),this.dispatcher.registerMessageHandler("GG",((u,Xe)=>this.getGlyphs(u,Xe))),this.dispatcher.registerMessageHandler("GI",((u,Xe)=>this.getImages(u,Xe))),this.imageManager=new T,this.imageManager.setEventedParent(this),this.glyphManager=new C(u._requestManager,fr.localIdeographFontFamily),this.lineAtlas=new R(256,512),this.crossTileSymbolIndex=new le,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new Xe.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",Xe.ay()),nt().on(sa,this._rtlPluginLoaded),this.on("data",(u=>{if("source"!==u.dataType||"metadata"!==u.sourceDataType)return;const Xe=this.sourceCaches[u.sourceId];if(!Xe)return;const fr=Xe.getSource();if(fr&&fr.vectorLayerIds)for(const u in this._layers){const Xe=this._layers[u];Xe.source===fr.id&&this._validateLayer(Xe)}}))}loadURL(u,fr={},Ar){this.fire(new Xe.k("dataloading",{dataType:"style"})),fr.validate="boolean"!=typeof fr.validate||fr.validate;const _r=this.map._requestManager.transformRequest(u,"Style");this._loadStyleRequest=new AbortController;const wr=this._loadStyleRequest;Xe.h(_r,this._loadStyleRequest).then((u=>{this._loadStyleRequest=null,this._load(u.data,fr,Ar)})).catch((u=>{this._loadStyleRequest=null,u&&!wr.signal.aborted&&this.fire(new Xe.j(u))}))}loadJSON(u,fr={},Ar){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,fr.validate=!1!==fr.validate,this._load(u,fr,Ar)})).catch((()=>{}))}loadEmpty(){this.fire(new Xe.k("dataloading",{dataType:"style"})),this._load(fl,{validate:!1})}_load(u,fr,Ar){var _r;const wr=fr.transformStyle?fr.transformStyle(Ar,u):u;if(!fr.validate||!he(this,Xe.u(wr))){this._loaded=!0,this.stylesheet=wr;for(const u in wr.sources)this.addSource(u,wr.sources[u],{validate:!1});wr.sprite?this._loadSprite(wr.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(wr.glyphs),this._createLayers(),this.light=new D(this.stylesheet.light),this.sky=new A(this.stylesheet.sky),this.map.setTerrain(null!==(_r=this.stylesheet.terrain)&&void 0!==_r?_r:null),this.fire(new Xe.k("data",{dataType:"style"})),this.fire(new Xe.k("style.load"))}}_createLayers(){const u=Xe.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",u),this._order=u.map((u=>u.id)),this._layers={},this._serializedLayers=null;for(const fr of u){const u=Xe.aA(fr);u.setEventedParent(this,{layer:{id:fr.id}}),this._layers[fr.id]=u}}_loadSprite(u,fr=!1,Ar=void 0){let _r;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(u,fr,Ar,_r){return Xe._(this,void 0,void 0,(function*(){const Kr=x(u),In=Ar>1?"@2x":"",io={},no={};for(const{id:u,url:Ar}of Kr){const wr=fr.transformRequest(y(Ar,In,".json"),"SpriteJSON");io[u]=Xe.h(wr,_r);const Kr=fr.transformRequest(y(Ar,In,".png"),"SpriteImage");no[u]=so.getImage(Kr,_r)}return yield Promise.all([...Object.values(io),...Object.values(no)]),function(u,fr){return Xe._(this,void 0,void 0,(function*(){const Xe={};for(const Ar in u){Xe[Ar]={};const _r=wr.getImageCanvasContext((yield fr[Ar]).data),Kr=(yield u[Ar]).data;for(const u in Kr){const{width:fr,height:wr,x:In,y:io,sdf:no,pixelRatio:oo,stretchX:so,stretchY:ao,content:co,textFitWidth:go,textFitHeight:ho}=Kr[u];Xe[Ar][u]={data:null,pixelRatio:oo,sdf:no,stretchX:so,stretchY:ao,content:co,textFitWidth:go,textFitHeight:ho,spriteData:{width:fr,height:wr,x:In,y:io,context:_r}}}}return Xe}))}(io,no)}))}(u,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((u=>{if(this._spriteRequest=null,u)for(const Xe in u){this._spritesImagesIds[Xe]=[];const Ar=this._spritesImagesIds[Xe]?this._spritesImagesIds[Xe].filter((Xe=>!(Xe in u))):[];for(const u of Ar)this.imageManager.removeImage(u),this._changedImages[u]=!0;for(const Ar in u[Xe]){const _r="default"===Xe?Ar:`${Xe}:${Ar}`;this._spritesImagesIds[Xe].push(_r),_r in this.imageManager.images?this.imageManager.updateImage(_r,u[Xe][Ar],!1):this.imageManager.addImage(_r,u[Xe][Ar]),fr&&(this._changedImages[_r]=!0)}}})).catch((u=>{this._spriteRequest=null,_r=u,this.fire(new Xe.j(_r))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),fr&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"})),Ar&&Ar(_r)}))}_unloadSprite(){for(const u of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(u),this._changedImages[u]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}_validateLayer(u){const fr=this.sourceCaches[u.source];if(!fr)return;const Ar=u.sourceLayer;if(!Ar)return;const _r=fr.getSource();("geojson"===_r.type||_r.vectorLayerIds&&-1===_r.vectorLayerIds.indexOf(Ar))&&this.fire(new Xe.j(new Error(`Source layer "${Ar}" does not exist on source "${_r.id}" as specified by style layer "${u.id}".`)))}loaded(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(const u in this.sourceCaches)if(!this.sourceCaches[u].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(u,fr=!1){const Ar=this._serializedAllLayers();if(!u||0===u.length)return Object.values(fr?Xe.aB(Ar):Ar);const _r=[];for(const wr of u)if(Ar[wr]){const u=fr?Xe.aB(Ar[wr]):Ar[wr];_r.push(u)}return _r}_serializedAllLayers(){let u=this._serializedLayers;if(u)return u;u=this._serializedLayers={};const Xe=Object.keys(this._layers);for(const fr of Xe){const Xe=this._layers[fr];"custom"!==Xe.type&&(u[fr]=Xe.serialize())}return u}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;if(this.sky&&this.sky.hasTransition())return!0;for(const u in this.sourceCaches)if(this.sourceCaches[u].hasTransition())return!0;for(const u in this._layers)if(this._layers[u].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(u){if(!this._loaded)return;const fr=this._changed;if(fr){const Xe=Object.keys(this._updatedLayers),fr=Object.keys(this._removedLayers);(Xe.length||fr.length)&&this._updateWorkerLayers(Xe,fr);for(const u in this._updatedSources){const Xe=this._updatedSources[u];if("reload"===Xe)this._reloadSource(u);else{if("clear"!==Xe)throw new Error(`Invalid action ${Xe}`);this._clearSource(u)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Xe in this._updatedPaintProps)this._layers[Xe].updateTransitions(u);this.light.updateTransitions(u),this.sky.updateTransitions(u),this._resetUpdates()}const Ar={};for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Ar[u]=Xe.used,Xe.used=!1}for(const Xe of this._order){const fr=this._layers[Xe];fr.recalculate(u,this._availableImages),!fr.isHidden(u.zoom)&&fr.source&&(this.sourceCaches[fr.source].used=!0)}for(const u in Ar){const fr=this.sourceCaches[u];!!Ar[u]!=!!fr.used&&fr.fire(new Xe.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:u}))}this.light.recalculate(u),this.sky.recalculate(u),this.z=u.zoom,fr&&this.fire(new Xe.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const u=Object.keys(this._changedImages);if(u.length){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].reloadTilesForDependencies(["icons","patterns"],u);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const u in this.sourceCaches)this.sourceCaches[u].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(u,Xe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(u,!1),removedIds:Xe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(u,fr={}){var Ar;this._checkLoaded();const _r=this.serialize();if(u=fr.transformStyle?fr.transformStyle(_r,u):u,(null===(Ar=fr.validate)||void 0===Ar||Ar)&&he(this,Xe.u(u)))return!1;(u=Xe.aB(u)).layers=Xe.az(u.layers);const wr=Xe.aC(_r,u),Kr=this._getOperationsToPerform(wr);if(Kr.unimplemented.length>0)throw new Error(`Unimplemented: ${Kr.unimplemented.join(", ")}.`);if(0===Kr.operations.length)return!1;for(const u of Kr.operations)u();return this.stylesheet=u,this._serializedLayers=null,!0}_getOperationsToPerform(u){const Xe=[],fr=[];for(const Ar of u)switch(Ar.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":Xe.push((()=>this.addLayer.apply(this,Ar.args)));break;case"removeLayer":Xe.push((()=>this.removeLayer.apply(this,Ar.args)));break;case"setPaintProperty":Xe.push((()=>this.setPaintProperty.apply(this,Ar.args)));break;case"setLayoutProperty":Xe.push((()=>this.setLayoutProperty.apply(this,Ar.args)));break;case"setFilter":Xe.push((()=>this.setFilter.apply(this,Ar.args)));break;case"addSource":Xe.push((()=>this.addSource.apply(this,Ar.args)));break;case"removeSource":Xe.push((()=>this.removeSource.apply(this,Ar.args)));break;case"setLayerZoomRange":Xe.push((()=>this.setLayerZoomRange.apply(this,Ar.args)));break;case"setLight":Xe.push((()=>this.setLight.apply(this,Ar.args)));break;case"setGeoJSONSourceData":Xe.push((()=>this.setGeoJSONSourceData.apply(this,Ar.args)));break;case"setGlyphs":Xe.push((()=>this.setGlyphs.apply(this,Ar.args)));break;case"setSprite":Xe.push((()=>this.setSprite.apply(this,Ar.args)));break;case"setSky":Xe.push((()=>this.setSky.apply(this,Ar.args)));break;case"setTerrain":Xe.push((()=>this.map.setTerrain.apply(this,Ar.args)));break;case"setTransition":Xe.push((()=>{}));break;default:fr.push(Ar.command)}return{operations:Xe,unimplemented:fr}}addImage(u,fr){if(this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" already exists.`)));this.imageManager.addImage(u,fr),this._afterImageUpdated(u)}updateImage(u,Xe){this.imageManager.updateImage(u,Xe)}getImage(u){return this.imageManager.getImage(u)}removeImage(u){if(!this.getImage(u))return this.fire(new Xe.j(new Error(`An image named "${u}" does not exist.`)));this.imageManager.removeImage(u),this._afterImageUpdated(u)}_afterImageUpdated(u){this._availableImages=this.imageManager.listImages(),this._changedImages[u]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(u,fr,Ar={}){if(this._checkLoaded(),void 0!==this.sourceCaches[u])throw new Error(`Source "${u}" already exists.`);if(!fr.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(fr).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(fr.type)>=0&&this._validate(Xe.u.source,`sources.${u}`,fr,null,Ar))return;this.map&&this.map._collectResourceTiming&&(fr.collectResourceTiming=!0);const _r=this.sourceCaches[u]=new ut(u,fr,this.dispatcher);_r.style=this,_r.setEventedParent(this,(()=>({isSourceLoaded:_r.loaded(),source:_r.serialize(),sourceId:u}))),_r.onAdd(this.map),this._changed=!0}removeSource(u){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error("There is no source with this ID");for(const fr in this._layers)if(this._layers[fr].source===u)return this.fire(new Xe.j(new Error(`Source "${u}" cannot be removed while layer "${fr}" is using it.`)));const fr=this.sourceCaches[u];delete this.sourceCaches[u],delete this._updatedSources[u],fr.fire(new Xe.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:u})),fr.setEventedParent(null),fr.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(u,Xe){if(this._checkLoaded(),void 0===this.sourceCaches[u])throw new Error(`There is no source with this ID=${u}`);const fr=this.sourceCaches[u].getSource();if("geojson"!==fr.type)throw new Error(`geojsonSource.type is ${fr.type}, which is !== 'geojson`);fr.setData(Xe),this._changed=!0}getSource(u){return this.sourceCaches[u]&&this.sourceCaches[u].getSource()}addLayer(u,fr,Ar={}){this._checkLoaded();const _r=u.id;if(this.getLayer(_r))return void this.fire(new Xe.j(new Error(`Layer "${_r}" already exists on this map.`)));let wr;if("custom"===u.type){if(he(this,Xe.aD(u)))return;wr=Xe.aA(u)}else{if("source"in u&&"object"==typeof u.source&&(this.addSource(_r,u.source),u=Xe.aB(u),u=Xe.e(u,{source:_r})),this._validate(Xe.u.layer,`layers.${_r}`,u,{arrayIndex:-1},Ar))return;wr=Xe.aA(u),this._validateLayer(wr),wr.setEventedParent(this,{layer:{id:_r}})}const Kr=fr?this._order.indexOf(fr):this._order.length;if(fr&&-1===Kr)this.fire(new Xe.j(new Error(`Cannot add layer "${_r}" before non-existing layer "${fr}".`)));else{if(this._order.splice(Kr,0,_r),this._layerOrderChanged=!0,this._layers[_r]=wr,this._removedLayers[_r]&&wr.source&&"custom"!==wr.type){const u=this._removedLayers[_r];delete this._removedLayers[_r],u.type!==wr.type?this._updatedSources[wr.source]="clear":(this._updatedSources[wr.source]="reload",this.sourceCaches[wr.source].pause())}this._updateLayer(wr),wr.onAdd&&wr.onAdd(this.map)}}moveLayer(u,fr){if(this._checkLoaded(),this._changed=!0,!this._layers[u])return void this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be moved.`)));if(u===fr)return;const Ar=this._order.indexOf(u);this._order.splice(Ar,1);const _r=fr?this._order.indexOf(fr):this._order.length;fr&&-1===_r?this.fire(new Xe.j(new Error(`Cannot move layer "${u}" before non-existing layer "${fr}".`))):(this._order.splice(_r,0,u),this._layerOrderChanged=!0)}removeLayer(u){this._checkLoaded();const fr=this._layers[u];if(!fr)return void this.fire(new Xe.j(new Error(`Cannot remove non-existing layer "${u}".`)));fr.setEventedParent(null);const Ar=this._order.indexOf(u);this._order.splice(Ar,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[u]=fr,delete this._layers[u],this._serializedLayers&&delete this._serializedLayers[u],delete this._updatedLayers[u],delete this._updatedPaintProps[u],fr.onRemove&&fr.onRemove(this.map)}getLayer(u){return this._layers[u]}getLayersOrder(){return[...this._order]}hasLayer(u){return u in this._layers}setLayerZoomRange(u,fr,Ar){this._checkLoaded();const _r=this.getLayer(u);_r?_r.minzoom===fr&&_r.maxzoom===Ar||(null!=fr&&(_r.minzoom=fr),null!=Ar&&(_r.maxzoom=Ar),this._updateLayer(_r)):this.fire(new Xe.j(new Error(`Cannot set the zoom range of non-existing layer "${u}".`)))}setFilter(u,fr,Ar={}){this._checkLoaded();const _r=this.getLayer(u);if(_r){if(!Xe.aE(_r.filter,fr))return null==fr?(_r.filter=void 0,void this._updateLayer(_r)):void(this._validate(Xe.u.filter,`layers.${_r.id}.filter`,fr,null,Ar)||(_r.filter=Xe.aB(fr),this._updateLayer(_r)))}else this.fire(new Xe.j(new Error(`Cannot filter non-existing layer "${u}".`)))}getFilter(u){return Xe.aB(this.getLayer(u).filter)}setLayoutProperty(u,fr,Ar,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getLayoutProperty(fr),Ar)||(wr.setLayoutProperty(fr,Ar,_r),this._updateLayer(wr)):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getLayoutProperty(u,fr){const Ar=this.getLayer(u);if(Ar)return Ar.getLayoutProperty(fr);this.fire(new Xe.j(new Error(`Cannot get style of non-existing layer "${u}".`)))}setPaintProperty(u,fr,Ar,_r={}){this._checkLoaded();const wr=this.getLayer(u);wr?Xe.aE(wr.getPaintProperty(fr),Ar)||(wr.setPaintProperty(fr,Ar,_r)&&this._updateLayer(wr),this._changed=!0,this._updatedPaintProps[u]=!0,this._serializedLayers=null):this.fire(new Xe.j(new Error(`Cannot style non-existing layer "${u}".`)))}getPaintProperty(u,Xe){return this.getLayer(u).getPaintProperty(Xe)}setFeatureState(u,fr){this._checkLoaded();const Ar=u.source,_r=u.sourceLayer,wr=this.sourceCaches[Ar];if(void 0===wr)return void this.fire(new Xe.j(new Error(`The source '${Ar}' does not exist in the map's style.`)));const Kr=wr.getSource().type;"geojson"===Kr&&_r?this.fire(new Xe.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==Kr||_r?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),wr.setFeatureState(_r,u.id,fr)):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(u,fr){this._checkLoaded();const Ar=u.source,_r=this.sourceCaches[Ar];if(void 0===_r)return void this.fire(new Xe.j(new Error(`The source '${Ar}' does not exist in the map's style.`)));const wr=_r.getSource().type,Kr="vector"===wr?u.sourceLayer:void 0;"vector"!==wr||Kr?fr&&"string"!=typeof u.id&&"number"!=typeof u.id?this.fire(new Xe.j(new Error("A feature id is required to remove its specific state property."))):_r.removeFeatureState(Kr,u.id,fr):this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(u){this._checkLoaded();const fr=u.source,Ar=u.sourceLayer,_r=this.sourceCaches[fr];if(void 0!==_r)return"vector"!==_r.getSource().type||Ar?(void 0===u.id&&this.fire(new Xe.j(new Error("The feature id parameter must be provided."))),_r.getFeatureState(Ar,u.id)):void this.fire(new Xe.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new Xe.j(new Error(`The source '${fr}' does not exist in the map's style.`)))}getTransition(){return Xe.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const u=Xe.aF(this.sourceCaches,(u=>u.serialize())),fr=this._serializeByIds(this._order,!0),Ar=this.map.getTerrain()||void 0,_r=this.stylesheet;return Xe.aG({version:_r.version,name:_r.name,metadata:_r.metadata,light:_r.light,sky:_r.sky,center:_r.center,zoom:_r.zoom,bearing:_r.bearing,pitch:_r.pitch,sprite:_r.sprite,glyphs:_r.glyphs,transition:_r.transition,sources:u,layers:fr,terrain:Ar},(u=>void 0!==u))}_updateLayer(u){this._updatedLayers[u.id]=!0,u.source&&!this._updatedSources[u.source]&&"raster"!==this.sourceCaches[u.source].getSource().type&&(this._updatedSources[u.source]="reload",this.sourceCaches[u.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(u){const e=u=>"fill-extrusion"===this._layers[u].type,Xe={},fr=[];for(let Ar=this._order.length-1;Ar>=0;Ar--){const _r=this._order[Ar];if(e(_r)){Xe[_r]=Ar;for(const Xe of u){const u=Xe[_r];if(u)for(const Xe of u)fr.push(Xe)}}}fr.sort(((u,Xe)=>Xe.intersectionZ-u.intersectionZ));const Ar=[];for(let _r=this._order.length-1;_r>=0;_r--){const wr=this._order[_r];if(e(wr))for(let u=fr.length-1;u>=0;u--){const wr=fr[u].feature;if(Xe[wr.layer.id]<_r)break;Ar.push(wr),fr.pop()}else for(const Xe of u){const u=Xe[wr];if(u)for(const Xe of u)Ar.push(Xe.feature)}}return Ar}queryRenderedFeatures(u,fr,Ar){fr&&fr.filter&&this._validate(Xe.u.filter,"queryRenderedFeatures.filter",fr.filter,null,fr);const _r={};if(fr&&fr.layers){if(!Array.isArray(fr.layers))return this.fire(new Xe.j(new Error("parameters.layers must be an Array."))),[];for(const u of fr.layers){const fr=this._layers[u];if(!fr)return this.fire(new Xe.j(new Error(`The layer '${u}' does not exist in the map's style and cannot be queried for features.`))),[];_r[fr.source]=!0}}const wr=[];fr.availableImages=this._availableImages;const Kr=this._serializedAllLayers();for(const Xe in this.sourceCaches)fr.layers&&!_r[Xe]||wr.push(q(this.sourceCaches[Xe],this._layers,Kr,u,fr,Ar));return this.placement&&wr.push(function(u,Xe,fr,Ar,_r,wr,Kr){const In={},io=wr.queryRenderedSymbols(Ar),no=[];for(const u of Object.keys(io).map(Number))no.push(Kr[u]);no.sort(V);for(const fr of no){const Ar=fr.featureIndex.lookupSymbolFeatures(io[fr.bucketInstanceId],Xe,fr.bucketIndex,fr.sourceLayerIndex,_r.filter,_r.layers,_r.availableImages,u);for(const u in Ar){const Xe=In[u]=In[u]||[],_r=Ar[u];_r.sort(((u,Xe)=>{const Ar=fr.featureSortOrder;if(Ar){const fr=Ar.indexOf(u.featureIndex);return Ar.indexOf(Xe.featureIndex)-fr}return Xe.featureIndex-u.featureIndex}));for(const u of _r)Xe.push(u)}}for(const Xe in In)In[Xe].forEach((Ar=>{const _r=Ar.feature,wr=fr[u[Xe].source].getFeatureState(_r.layer["source-layer"],_r.id);_r.source=_r.layer.source,_r.layer["source-layer"]&&(_r.sourceLayer=_r.layer["source-layer"]),_r.state=wr}));return In}(this._layers,Kr,this.sourceCaches,u,fr,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(wr)}querySourceFeatures(u,fr){fr&&fr.filter&&this._validate(Xe.u.filter,"querySourceFeatures.filter",fr.filter,null,fr);const Ar=this.sourceCaches[u];return Ar?function(u,Xe){const fr=u.getRenderableIds().map((Xe=>u.getTileByID(Xe))),Ar=[],_r={};for(let u=0;u<fr.length;u++){const wr=fr[u],Kr=wr.tileID.canonical.key;_r[Kr]||(_r[Kr]=!0,wr.querySourceFeatures(Ar,Xe))}return Ar}(Ar,fr):[]}getLight(){return this.light.getLight()}setLight(u,fr={}){this._checkLoaded();const Ar=this.light.getLight();let _r=!1;for(const fr in u)if(!Xe.aE(u[fr],Ar[fr])){_r=!0;break}if(!_r)return;const Kr={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(u,fr),this.light.updateTransitions(Kr)}getSky(){var u;return null===(u=this.stylesheet)||void 0===u?void 0:u.sky}setSky(u,fr={}){const Ar=this.getSky();let _r=!1;if(!u&&!Ar)return;if(u&&!Ar)_r=!0;else if(!u&&Ar)_r=!0;else for(const fr in u)if(!Xe.aE(u[fr],Ar[fr])){_r=!0;break}if(!_r)return;const Kr={now:wr.now(),transition:Xe.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=u,this.sky.setSky(u,fr),this.sky.updateTransitions(Kr)}_validate(u,fr,Ar,_r,wr={}){return(!wr||!1!==wr.validate)&&he(this,u.call(Xe.u,Xe.e({key:fr,style:this.serialize(),value:Ar,styleSpec:Xe.v},_r)))}_remove(u=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),nt().off(sa,this._rtlPluginLoaded);for(const u in this._layers)this._layers[u].setEventedParent(null);for(const u in this.sourceCaches){const Xe=this.sourceCaches[u];Xe.setEventedParent(null),Xe.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),u&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(u)}_clearSource(u){this.sourceCaches[u].clearTiles()}_reloadSource(u){this.sourceCaches[u].resume(),this.sourceCaches[u].reload()}_updateSources(u){for(const Xe in this.sourceCaches)this.sourceCaches[Xe].update(u,this.map.terrain)}_generateCollisionBoxes(){for(const u in this.sourceCaches)this._reloadSource(u)}_updatePlacement(u,Xe,fr,Ar,_r=!1){let Kr=!1,In=!1;const io={};for(const Xe of this._order){const fr=this._layers[Xe];if("symbol"!==fr.type)continue;if(!io[fr.source]){const u=this.sourceCaches[fr.source];io[fr.source]=u.getRenderableIds(!0).map((Xe=>u.getTileByID(Xe))).sort(((u,Xe)=>Xe.tileID.overscaledZ-u.tileID.overscaledZ||(u.tileID.isLessThan(Xe.tileID)?-1:1)))}const Ar=this.crossTileSymbolIndex.addLayer(fr,io[fr.source],u.center.lng);Kr=Kr||Ar}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((_r=_r||this._layerOrderChanged||0===fr)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(wr.now(),u.zoom))&&(this.pauseablePlacement=new ae(u,this.map.terrain,this._order,_r,Xe,fr,Ar,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,io),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(wr.now()),In=!0),Kr&&this.pauseablePlacement.placement.setStale()),In||Kr)for(const u of this._order){const Xe=this._layers[u];"symbol"===Xe.type&&this.placement.updateLayerOpacities(Xe,io[Xe.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(wr.now())}_releaseSymbolFadeTiles(){for(const u in this.sourceCaches)this.sourceCaches[u].releaseSymbolFadeTiles()}getImages(u,fr){return Xe._(this,void 0,void 0,(function*(){const u=yield this.imageManager.getImages(fr.icons);this._updateTilesForChangedImages();const Xe=this.sourceCaches[fr.source];return Xe&&Xe.setDependencies(fr.tileID.key,fr.type,fr.icons),u}))}getGlyphs(u,fr){return Xe._(this,void 0,void 0,(function*(){const u=yield this.glyphManager.getGlyphs(fr.stacks),Xe=this.sourceCaches[fr.source];return Xe&&Xe.setDependencies(fr.tileID.key,fr.type,[""]),u}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(u,fr={}){this._checkLoaded(),u&&this._validate(Xe.u.glyphs,"glyphs",u,null,fr)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=u,this.glyphManager.entries={},this.glyphManager.setURL(u))}addSprite(u,fr,Ar={},_r){this._checkLoaded();const wr=[{id:u,url:fr}],Kr=[...x(this.stylesheet.sprite),...wr];this._validate(Xe.u.sprite,"sprite",Kr,null,Ar)||(this.stylesheet.sprite=Kr,this._loadSprite(wr,!0,_r))}removeSprite(u){this._checkLoaded();const fr=x(this.stylesheet.sprite);if(fr.find((Xe=>Xe.id===u))){if(this._spritesImagesIds[u])for(const Xe of this._spritesImagesIds[u])this.imageManager.removeImage(Xe),this._changedImages[Xe]=!0;fr.splice(fr.findIndex((Xe=>Xe.id===u)),1),this.stylesheet.sprite=fr.length>0?fr:void 0,delete this._spritesImagesIds[u],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new Xe.k("data",{dataType:"style"}))}else this.fire(new Xe.j(new Error(`Sprite "${u}" doesn't exists on this map.`)))}getSprite(){return x(this.stylesheet.sprite)}setSprite(u,fr={},Ar){this._checkLoaded(),u&&this._validate(Xe.u.sprite,"sprite",u,null,fr)||(this.stylesheet.sprite=u,u?this._loadSprite(u,!0,Ar):(this._unloadSprite(),Ar&&Ar(null)))}}var _l=Xe.Y([{name:"a_pos",type:"Int16",components:2}]);const vl={prelude:pe("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\n","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}\n#ifdef TERRAIN3D\nuniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;\n#endif\nconst highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {\n#ifdef TERRAIN3D\nhighp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));\n#else\nreturn 1.0;\n#endif\n}float calculate_visibility(vec4 pos) {\n#ifdef TERRAIN3D\nvec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;\n#else\nreturn 1.0;\n#endif\n}float ele(vec2 pos) {\n#ifdef TERRAIN3D\nvec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;\n#else\nreturn 0.0;\n#endif\n}float get_elevation(vec2 pos) {\n#ifdef TERRAIN3D\nvec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;\n#else\nreturn 0.0;\n#endif\n}"),background:pe("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:pe("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:pe("varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),clippingMask:pe("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:pe("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),heatmapTexture:pe("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:pe("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:pe("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:pe("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:pe("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),fillOutline:pe("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillOutlinePattern:pe("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),fillPattern:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),fillExtrusion:pe("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),fillExtrusionPattern:pe("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;\n#ifdef TERRAIN3D\nattribute vec2 a_centroid;\n#endif\nvarying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;\n#ifdef TERRAIN3D\nfloat height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);\n#else\nfloat height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;\n#endif\nbase=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),hillshadePrepare:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:pe("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:pe("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),lineGradient:pe("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_width2=vec2(outset,inset);}"),linePattern:pe("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),lineSDF:pe("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;\n#ifdef TERRAIN3D\nv_gamma_scale=1.0;\n#else\nfloat extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;\n#endif\nv_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),raster:pe("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:pe("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}"),symbolSDF:pe("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),symbolTextAndIcon:pe("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}"),terrain:pe("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:pe("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:pe("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:pe("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function pe(u,Xe){const fr=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Ar=Xe.match(/attribute ([\w]+) ([\w]+)/g),_r=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),wr=Xe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Kr=wr?wr.concat(_r):_r,In={};return{fragmentSource:u=u.replace(fr,((u,Xe,fr,Ar,_r)=>(In[_r]=!0,"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nvarying ${fr} ${Ar} ${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:`\n#ifdef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`))),vertexSource:Xe=Xe.replace(fr,((u,Xe,fr,Ar,_r)=>{const wr="float"===Ar?"vec2":"vec4",Kr=_r.match(/color/)?"color":wr;return In[_r]?"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${fr} ${wr} a_${_r};\nvarying ${fr} ${Ar} ${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:"vec4"===Kr?`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${_r} = a_${_r};\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${_r} = unpack_mix_${Kr}(a_${_r}, u_${_r}_t);\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:"define"===Xe?`\n#ifndef HAS_UNIFORM_u_${_r}\nuniform lowp float u_${_r}_t;\nattribute ${fr} ${wr} a_${_r};\n#else\nuniform ${fr} ${Ar} u_${_r};\n#endif\n`:"vec4"===Kr?`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = a_${_r};\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`:`\n#ifndef HAS_UNIFORM_u_${_r}\n    ${fr} ${Ar} ${_r} = unpack_mix_${Kr}(a_${_r}, u_${_r}_t);\n#else\n    ${fr} ${Ar} ${_r} = u_${_r};\n#endif\n`})),staticAttributes:Ar,staticUniforms:Kr}}class me{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(u,Xe,fr,Ar,_r,wr,Kr,In,io){this.context=u;let no=this.boundPaintVertexBuffers.length!==Ar.length;for(let u=0;!no&&u<Ar.length;u++)this.boundPaintVertexBuffers[u]!==Ar[u]&&(no=!0);!this.vao||this.boundProgram!==Xe||this.boundLayoutVertexBuffer!==fr||no||this.boundIndexBuffer!==_r||this.boundVertexOffset!==wr||this.boundDynamicVertexBuffer!==Kr||this.boundDynamicVertexBuffer2!==In||this.boundDynamicVertexBuffer3!==io?this.freshBind(Xe,fr,Ar,_r,wr,Kr,In,io):(u.bindVertexArray.set(this.vao),Kr&&Kr.bind(),_r&&_r.dynamicDraw&&_r.bind(),In&&In.bind(),io&&io.bind())}freshBind(u,Xe,fr,Ar,_r,wr,Kr,In){const io=u.numAttributes,no=this.context,oo=no.gl;this.vao&&this.destroy(),this.vao=no.createVertexArray(),no.bindVertexArray.set(this.vao),this.boundProgram=u,this.boundLayoutVertexBuffer=Xe,this.boundPaintVertexBuffers=fr,this.boundIndexBuffer=Ar,this.boundVertexOffset=_r,this.boundDynamicVertexBuffer=wr,this.boundDynamicVertexBuffer2=Kr,this.boundDynamicVertexBuffer3=In,Xe.enableAttributes(oo,u);for(const Xe of fr)Xe.enableAttributes(oo,u);wr&&wr.enableAttributes(oo,u),Kr&&Kr.enableAttributes(oo,u),In&&In.enableAttributes(oo,u),Xe.bind(),Xe.setVertexAttribPointers(oo,u,_r);for(const Xe of fr)Xe.bind(),Xe.setVertexAttribPointers(oo,u,_r);wr&&(wr.bind(),wr.setVertexAttribPointers(oo,u,_r)),Ar&&Ar.bind(),Kr&&(Kr.bind(),Kr.setVertexAttribPointers(oo,u,_r)),In&&(In.bind(),In.setVertexAttribPointers(oo,u,_r)),no.currentNumAttributes=io}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const fe=(u,fr,Ar,_r,wr)=>({u_matrix:u,u_texture:0,u_ele_delta:fr,u_fog_matrix:Ar,u_fog_color:_r?_r.properties.get("fog-color"):Xe.aM.white,u_fog_ground_blend:_r?_r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:_r?_r.calculateFogBlendOpacity(wr):0,u_horizon_color:_r?_r.properties.get("horizon-color"):Xe.aM.white,u_horizon_fog_blend:_r?_r.properties.get("horizon-fog-blend"):1});function ge(u){const Xe=[];for(let fr=0;fr<u.length;fr++){if(null===u[fr])continue;const Ar=u[fr].split(" ");Xe.push(Ar.pop())}return Xe}class ve{constructor(u,fr,Ar,_r,wr,Kr){const In=u.gl;this.program=In.createProgram();const io=ge(fr.staticAttributes),no=Ar?Ar.getBinderAttributes():[],oo=io.concat(no),so=vl.prelude.staticUniforms?ge(vl.prelude.staticUniforms):[],ao=fr.staticUniforms?ge(fr.staticUniforms):[],co=Ar?Ar.getBinderUniforms():[],go=so.concat(ao).concat(co),ho=[];for(const u of go)ho.indexOf(u)<0&&ho.push(u);const Co=Ar?Ar.defines():[];wr&&Co.push("#define OVERDRAW_INSPECTOR;"),Kr&&Co.push("#define TERRAIN3D;");const Io=Co.concat(vl.prelude.fragmentSource,fr.fragmentSource).join("\n"),xo=Co.concat(vl.prelude.vertexSource,fr.vertexSource).join("\n"),Mo=In.createShader(In.FRAGMENT_SHADER);if(In.isContextLost())return void(this.failedToCreate=!0);if(In.shaderSource(Mo,Io),In.compileShader(Mo),!In.getShaderParameter(Mo,In.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${In.getShaderInfoLog(Mo)}`);In.attachShader(this.program,Mo);const Po=In.createShader(In.VERTEX_SHADER);if(In.isContextLost())return void(this.failedToCreate=!0);if(In.shaderSource(Po,xo),In.compileShader(Po),!In.getShaderParameter(Po,In.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${In.getShaderInfoLog(Po)}`);In.attachShader(this.program,Po),this.attributes={};const ss={};this.numAttributes=oo.length;for(let u=0;u<this.numAttributes;u++)oo[u]&&(In.bindAttribLocation(this.program,u,oo[u]),this.attributes[oo[u]]=u);if(In.linkProgram(this.program),!In.getProgramParameter(this.program,In.LINK_STATUS))throw new Error(`Program failed to link: ${In.getProgramInfoLog(this.program)}`);In.deleteShader(Po),In.deleteShader(Mo);for(let u=0;u<ho.length;u++){const Xe=ho[u];if(Xe&&!ss[Xe]){const u=In.getUniformLocation(this.program,Xe);u&&(ss[Xe]=u)}}this.fixedUniforms=_r(u,ss),this.terrainUniforms=((u,fr)=>({u_depth:new Xe.aH(u,fr.u_depth),u_terrain:new Xe.aH(u,fr.u_terrain),u_terrain_dim:new Xe.aI(u,fr.u_terrain_dim),u_terrain_matrix:new Xe.aJ(u,fr.u_terrain_matrix),u_terrain_unpack:new Xe.aK(u,fr.u_terrain_unpack),u_terrain_exaggeration:new Xe.aI(u,fr.u_terrain_exaggeration)}))(u,ss),this.binderUniforms=Ar?Ar.getUniforms(u,ss):[]}draw(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho,Co,Io){const xo=u.gl;if(this.failedToCreate)return;if(u.program.set(this.program),u.setDepthMode(fr),u.setStencilMode(Ar),u.setColorMode(_r),u.setCullFace(wr),In){u.activeTexture.set(xo.TEXTURE2),xo.bindTexture(xo.TEXTURE_2D,In.depthTexture),u.activeTexture.set(xo.TEXTURE3),xo.bindTexture(xo.TEXTURE_2D,In.texture);for(const u in this.terrainUniforms)this.terrainUniforms[u].set(In[u])}for(const u in this.fixedUniforms)this.fixedUniforms[u].set(Kr[u]);go&&go.setUniforms(u,this.binderUniforms,ao,{zoom:co});let Mo=0;switch(Xe){case xo.LINES:Mo=2;break;case xo.TRIANGLES:Mo=3;break;case xo.LINE_STRIP:Mo=1}for(const fr of so.get()){const Ar=fr.vaos||(fr.vaos={});(Ar[io]||(Ar[io]=new me)).bind(u,this,no,go?go.getPaintVertexBuffers():[],oo,fr.vertexOffset,ho,Co,Io),xo.drawElements(Xe,fr.primitiveLength*Mo,xo.UNSIGNED_SHORT,fr.primitiveOffset*Mo*2)}}}function xe(u,Xe,fr){const Ar=1/Ft(fr,1,Xe.transform.tileZoom),_r=Math.pow(2,fr.tileID.overscaledZ),wr=fr.tileSize*Math.pow(2,Xe.transform.tileZoom)/_r,Kr=wr*(fr.tileID.canonical.x+fr.tileID.wrap*_r),In=wr*fr.tileID.canonical.y;return{u_image:0,u_texsize:fr.imageAtlasTexture.size,u_scale:[Ar,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[Kr>>16,In>>16],u_pixel_coord_lower:[65535&Kr,65535&In]}}const ye=(u,fr,Ar,_r)=>{const wr=fr.style.light,Kr=wr.properties.get("position"),In=[Kr.x,Kr.y,Kr.z],io=function(){var u=new Xe.A(9);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[5]=0,u[6]=0,u[7]=0),u[0]=1,u[4]=1,u[8]=1,u}();"viewport"===wr.properties.get("anchor")&&function(u,Xe){var fr=Math.sin(Xe),Ar=Math.cos(Xe);u[0]=Ar,u[1]=fr,u[2]=0,u[3]=-fr,u[4]=Ar,u[5]=0,u[6]=0,u[7]=0,u[8]=1}(io,-fr.transform.angle),function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2];u[0]=Ar*fr[0]+_r*fr[3]+wr*fr[6],u[1]=Ar*fr[1]+_r*fr[4]+wr*fr[7],u[2]=Ar*fr[2]+_r*fr[5]+wr*fr[8]}(In,In,io);const no=wr.properties.get("color");return{u_matrix:u,u_lightpos:In,u_lightintensity:wr.properties.get("intensity"),u_lightcolor:[no.r,no.g,no.b],u_vertical_gradient:+Ar,u_opacity:_r}},be=(u,fr,Ar,_r,wr,Kr,In)=>Xe.e(ye(u,fr,Ar,_r),xe(Kr,fr,In),{u_height_factor:-Math.pow(2,wr.overscaledZ)/In.tileSize/8}),we=u=>({u_matrix:u}),Te=(u,fr,Ar,_r)=>Xe.e(we(u),xe(Ar,fr,_r)),Ie=(u,Xe)=>({u_matrix:u,u_world:Xe}),Ee=(u,fr,Ar,_r,wr)=>Xe.e(Te(u,fr,Ar,_r),{u_world:wr}),Pe=(u,Xe,fr,Ar)=>{const _r=u.transform;let wr,Kr;if("map"===Ar.paint.get("circle-pitch-alignment")){const u=Ft(fr,1,_r.zoom);wr=!0,Kr=[u,u]}else wr=!1,Kr=_r.pixelsToGLUnits;return{u_camera_to_center_distance:_r.cameraToCenterDistance,u_scale_with_map:+("map"===Ar.paint.get("circle-pitch-scale")),u_matrix:u.translatePosMatrix(Xe.posMatrix,fr,Ar.paint.get("circle-translate"),Ar.paint.get("circle-translate-anchor")),u_pitch_with_map:+wr,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:Kr}},Ce=(u,Xe,fr)=>({u_matrix:u,u_inv_matrix:Xe,u_camera_to_center_distance:fr.cameraToCenterDistance,u_viewport_size:[fr.width,fr.height]}),Se=(u,Xe,fr=1)=>({u_matrix:u,u_color:Xe,u_overlay:0,u_overlay_scale:fr}),ze=u=>({u_matrix:u}),De=(u,Xe,fr,Ar)=>({u_matrix:u,u_extrude_scale:Ft(Xe,1,fr),u_intensity:Ar});function Me(u,fr){const Ar=Math.pow(2,fr.canonical.z),_r=fr.canonical.y;return[new Xe.Z(0,_r/Ar).toLngLat().lat,new Xe.Z(0,(_r+1)/Ar).toLngLat().lat]}const Ae=(u,Xe,fr,Ar)=>{const _r=u.transform;return{u_matrix:Be(u,Xe,fr,Ar),u_ratio:1/Ft(Xe,1,_r.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/_r.pixelsToGLUnits[0],1/_r.pixelsToGLUnits[1]]}},Re=(u,fr,Ar,_r,wr)=>Xe.e(Ae(u,fr,Ar,wr),{u_image:0,u_image_height:_r}),ke=(u,Xe,fr,Ar,_r)=>{const wr=u.transform,Kr=Fe(Xe,wr);return{u_matrix:Be(u,Xe,fr,_r),u_texsize:Xe.imageAtlasTexture.size,u_ratio:1/Ft(Xe,1,wr.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[Kr,Ar.fromScale,Ar.toScale],u_fade:Ar.t,u_units_to_pixels:[1/wr.pixelsToGLUnits[0],1/wr.pixelsToGLUnits[1]]}},Le=(u,fr,Ar,_r,wr,Kr)=>{const In=u.lineAtlas,io=Fe(fr,u.transform),no="round"===Ar.layout.get("line-cap"),oo=In.getDash(_r.from,no),so=In.getDash(_r.to,no),ao=oo.width*wr.fromScale,co=so.width*wr.toScale;return Xe.e(Ae(u,fr,Ar,Kr),{u_patternscale_a:[io/ao,-oo.height/2],u_patternscale_b:[io/co,-so.height/2],u_sdfgamma:In.width/(256*Math.min(ao,co)*u.pixelRatio)/2,u_image:0,u_tex_y_a:oo.y,u_tex_y_b:so.y,u_mix:wr.t})};function Fe(u,Xe){return 1/Ft(u,1,Xe.tileZoom)}function Be(u,Xe,fr,Ar){return u.translatePosMatrix(Ar?Ar.posMatrix:Xe.tileID.posMatrix,Xe,fr.paint.get("line-translate"),fr.paint.get("line-translate-anchor"))}const Oe=(u,Xe,fr,Ar,_r)=>{return{u_matrix:u,u_tl_parent:Xe,u_scale_parent:fr,u_buffer_scale:1,u_fade_t:Ar.mix,u_opacity:Ar.opacity*_r.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:_r.paint.get("raster-brightness-min"),u_brightness_high:_r.paint.get("raster-brightness-max"),u_saturation_factor:(Kr=_r.paint.get("raster-saturation"),Kr>0?1-1/(1.001-Kr):-Kr),u_contrast_factor:(wr=_r.paint.get("raster-contrast"),wr>0?1/(1-wr):1+wr),u_spin_weights:Ne(_r.paint.get("raster-hue-rotate"))};var wr,Kr};function Ne(u){u*=Math.PI/180;const Xe=Math.sin(u),fr=Math.cos(u);return[(2*fr+1)/3,(-Math.sqrt(3)*Xe-fr+1)/3,(Math.sqrt(3)*Xe-fr+1)/3]}const je=(u,Xe,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co)=>{const go=Kr.transform;return{u_is_size_zoom_constant:+("constant"===u||"source"===u),u_is_size_feature_constant:+("constant"===u||"camera"===u),u_size_t:Xe?Xe.uSizeT:0,u_size:Xe?Xe.uSize:0,u_camera_to_center_distance:go.cameraToCenterDistance,u_pitch:go.pitch/360*2*Math.PI,u_rotate_symbol:+fr,u_aspect_ratio:go.width/go.height,u_fade_change:Kr.options.fadeDuration?Kr.symbolFadeChange:1,u_matrix:In,u_label_plane_matrix:io,u_coord_matrix:no,u_is_text:+so,u_pitch_with_map:+Ar,u_is_along_line:_r,u_is_variable_anchor:wr,u_texsize:ao,u_texture:0,u_translation:oo,u_pitched_scale:co}},Ue=(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go,ho)=>{const Co=In.transform;return Xe.e(je(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,ho),{u_gamma_scale:_r?Math.cos(Co._pitch)*Co.cameraToCenterDistance:1,u_device_pixel_ratio:In.pixelRatio,u_is_halo:+go})},Ze=(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go)=>Xe.e(Ue(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,!0,ao,!0,go),{u_texsize_icon:co,u_texture_icon:1}),qe=(u,Xe,fr)=>({u_matrix:u,u_opacity:Xe,u_color:fr}),Ve=(u,fr,Ar,_r,wr,Kr)=>Xe.e(function(u,Xe,fr,Ar){const _r=fr.imageManager.getPattern(u.from.toString()),wr=fr.imageManager.getPattern(u.to.toString()),{width:Kr,height:In}=fr.imageManager.getPixelSize(),io=Math.pow(2,Ar.tileID.overscaledZ),no=Ar.tileSize*Math.pow(2,fr.transform.tileZoom)/io,oo=no*(Ar.tileID.canonical.x+Ar.tileID.wrap*io),so=no*Ar.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:_r.tl,u_pattern_br_a:_r.br,u_pattern_tl_b:wr.tl,u_pattern_br_b:wr.br,u_texsize:[Kr,In],u_mix:Xe.t,u_pattern_size_a:_r.displaySize,u_pattern_size_b:wr.displaySize,u_scale_a:Xe.fromScale,u_scale_b:Xe.toScale,u_tile_units_to_pixels:1/Ft(Ar,1,fr.transform.tileZoom),u_pixel_coord_upper:[oo>>16,so>>16],u_pixel_coord_lower:[65535&oo,65535&so]}}(_r,Kr,Ar,wr),{u_matrix:u,u_opacity:fr}),xl={fillExtrusion:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_lightpos:new Xe.aN(u,fr.u_lightpos),u_lightintensity:new Xe.aI(u,fr.u_lightintensity),u_lightcolor:new Xe.aN(u,fr.u_lightcolor),u_vertical_gradient:new Xe.aI(u,fr.u_vertical_gradient),u_opacity:new Xe.aI(u,fr.u_opacity)}),fillExtrusionPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_lightpos:new Xe.aN(u,fr.u_lightpos),u_lightintensity:new Xe.aI(u,fr.u_lightintensity),u_lightcolor:new Xe.aN(u,fr.u_lightcolor),u_vertical_gradient:new Xe.aI(u,fr.u_vertical_gradient),u_height_factor:new Xe.aI(u,fr.u_height_factor),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade),u_opacity:new Xe.aI(u,fr.u_opacity)}),fill:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix)}),fillPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),fillOutline:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world)}),fillOutlinePattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world),u_image:new Xe.aH(u,fr.u_image),u_texsize:new Xe.aO(u,fr.u_texsize),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),circle:(u,fr)=>({u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_scale_with_map:new Xe.aH(u,fr.u_scale_with_map),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_extrude_scale:new Xe.aO(u,fr.u_extrude_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_matrix:new Xe.aJ(u,fr.u_matrix)}),collisionBox:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_pixel_extrude_scale:new Xe.aO(u,fr.u_pixel_extrude_scale)}),collisionCircle:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_inv_matrix:new Xe.aJ(u,fr.u_inv_matrix),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_viewport_size:new Xe.aO(u,fr.u_viewport_size)}),debug:(u,fr)=>({u_color:new Xe.aL(u,fr.u_color),u_matrix:new Xe.aJ(u,fr.u_matrix),u_overlay:new Xe.aH(u,fr.u_overlay),u_overlay_scale:new Xe.aI(u,fr.u_overlay_scale)}),clippingMask:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix)}),heatmap:(u,fr)=>({u_extrude_scale:new Xe.aI(u,fr.u_extrude_scale),u_intensity:new Xe.aI(u,fr.u_intensity),u_matrix:new Xe.aJ(u,fr.u_matrix)}),heatmapTexture:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_world:new Xe.aO(u,fr.u_world),u_image:new Xe.aH(u,fr.u_image),u_color_ramp:new Xe.aH(u,fr.u_color_ramp),u_opacity:new Xe.aI(u,fr.u_opacity)}),hillshade:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_latrange:new Xe.aO(u,fr.u_latrange),u_light:new Xe.aO(u,fr.u_light),u_shadow:new Xe.aL(u,fr.u_shadow),u_highlight:new Xe.aL(u,fr.u_highlight),u_accent:new Xe.aL(u,fr.u_accent)}),hillshadePrepare:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_image:new Xe.aH(u,fr.u_image),u_dimension:new Xe.aO(u,fr.u_dimension),u_zoom:new Xe.aI(u,fr.u_zoom),u_unpack:new Xe.aK(u,fr.u_unpack)}),line:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels)}),lineGradient:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_image:new Xe.aH(u,fr.u_image),u_image_height:new Xe.aI(u,fr.u_image_height)}),linePattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texsize:new Xe.aO(u,fr.u_texsize),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_image:new Xe.aH(u,fr.u_image),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_scale:new Xe.aN(u,fr.u_scale),u_fade:new Xe.aI(u,fr.u_fade)}),lineSDF:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ratio:new Xe.aI(u,fr.u_ratio),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_units_to_pixels:new Xe.aO(u,fr.u_units_to_pixels),u_patternscale_a:new Xe.aO(u,fr.u_patternscale_a),u_patternscale_b:new Xe.aO(u,fr.u_patternscale_b),u_sdfgamma:new Xe.aI(u,fr.u_sdfgamma),u_image:new Xe.aH(u,fr.u_image),u_tex_y_a:new Xe.aI(u,fr.u_tex_y_a),u_tex_y_b:new Xe.aI(u,fr.u_tex_y_b),u_mix:new Xe.aI(u,fr.u_mix)}),raster:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_tl_parent:new Xe.aO(u,fr.u_tl_parent),u_scale_parent:new Xe.aI(u,fr.u_scale_parent),u_buffer_scale:new Xe.aI(u,fr.u_buffer_scale),u_fade_t:new Xe.aI(u,fr.u_fade_t),u_opacity:new Xe.aI(u,fr.u_opacity),u_image0:new Xe.aH(u,fr.u_image0),u_image1:new Xe.aH(u,fr.u_image1),u_brightness_low:new Xe.aI(u,fr.u_brightness_low),u_brightness_high:new Xe.aI(u,fr.u_brightness_high),u_saturation_factor:new Xe.aI(u,fr.u_saturation_factor),u_contrast_factor:new Xe.aI(u,fr.u_contrast_factor),u_spin_weights:new Xe.aN(u,fr.u_spin_weights)}),symbolIcon:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texture:new Xe.aH(u,fr.u_texture),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),symbolSDF:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texture:new Xe.aH(u,fr.u_texture),u_gamma_scale:new Xe.aI(u,fr.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,fr.u_is_halo),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),symbolTextAndIcon:(u,fr)=>({u_is_size_zoom_constant:new Xe.aH(u,fr.u_is_size_zoom_constant),u_is_size_feature_constant:new Xe.aH(u,fr.u_is_size_feature_constant),u_size_t:new Xe.aI(u,fr.u_size_t),u_size:new Xe.aI(u,fr.u_size),u_camera_to_center_distance:new Xe.aI(u,fr.u_camera_to_center_distance),u_pitch:new Xe.aI(u,fr.u_pitch),u_rotate_symbol:new Xe.aH(u,fr.u_rotate_symbol),u_aspect_ratio:new Xe.aI(u,fr.u_aspect_ratio),u_fade_change:new Xe.aI(u,fr.u_fade_change),u_matrix:new Xe.aJ(u,fr.u_matrix),u_label_plane_matrix:new Xe.aJ(u,fr.u_label_plane_matrix),u_coord_matrix:new Xe.aJ(u,fr.u_coord_matrix),u_is_text:new Xe.aH(u,fr.u_is_text),u_pitch_with_map:new Xe.aH(u,fr.u_pitch_with_map),u_is_along_line:new Xe.aH(u,fr.u_is_along_line),u_is_variable_anchor:new Xe.aH(u,fr.u_is_variable_anchor),u_texsize:new Xe.aO(u,fr.u_texsize),u_texsize_icon:new Xe.aO(u,fr.u_texsize_icon),u_texture:new Xe.aH(u,fr.u_texture),u_texture_icon:new Xe.aH(u,fr.u_texture_icon),u_gamma_scale:new Xe.aI(u,fr.u_gamma_scale),u_device_pixel_ratio:new Xe.aI(u,fr.u_device_pixel_ratio),u_is_halo:new Xe.aH(u,fr.u_is_halo),u_translation:new Xe.aO(u,fr.u_translation),u_pitched_scale:new Xe.aI(u,fr.u_pitched_scale)}),background:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_opacity:new Xe.aI(u,fr.u_opacity),u_color:new Xe.aL(u,fr.u_color)}),backgroundPattern:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_opacity:new Xe.aI(u,fr.u_opacity),u_image:new Xe.aH(u,fr.u_image),u_pattern_tl_a:new Xe.aO(u,fr.u_pattern_tl_a),u_pattern_br_a:new Xe.aO(u,fr.u_pattern_br_a),u_pattern_tl_b:new Xe.aO(u,fr.u_pattern_tl_b),u_pattern_br_b:new Xe.aO(u,fr.u_pattern_br_b),u_texsize:new Xe.aO(u,fr.u_texsize),u_mix:new Xe.aI(u,fr.u_mix),u_pattern_size_a:new Xe.aO(u,fr.u_pattern_size_a),u_pattern_size_b:new Xe.aO(u,fr.u_pattern_size_b),u_scale_a:new Xe.aI(u,fr.u_scale_a),u_scale_b:new Xe.aI(u,fr.u_scale_b),u_pixel_coord_upper:new Xe.aO(u,fr.u_pixel_coord_upper),u_pixel_coord_lower:new Xe.aO(u,fr.u_pixel_coord_lower),u_tile_units_to_pixels:new Xe.aI(u,fr.u_tile_units_to_pixels)}),terrain:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texture:new Xe.aH(u,fr.u_texture),u_ele_delta:new Xe.aI(u,fr.u_ele_delta),u_fog_matrix:new Xe.aJ(u,fr.u_fog_matrix),u_fog_color:new Xe.aL(u,fr.u_fog_color),u_fog_ground_blend:new Xe.aI(u,fr.u_fog_ground_blend),u_fog_ground_blend_opacity:new Xe.aI(u,fr.u_fog_ground_blend_opacity),u_horizon_color:new Xe.aL(u,fr.u_horizon_color),u_horizon_fog_blend:new Xe.aI(u,fr.u_horizon_fog_blend)}),terrainDepth:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_ele_delta:new Xe.aI(u,fr.u_ele_delta)}),terrainCoords:(u,fr)=>({u_matrix:new Xe.aJ(u,fr.u_matrix),u_texture:new Xe.aH(u,fr.u_texture),u_terrain_coords_id:new Xe.aI(u,fr.u_terrain_coords_id),u_ele_delta:new Xe.aI(u,fr.u_ele_delta)}),sky:(u,fr)=>({u_sky_color:new Xe.aL(u,fr.u_sky_color),u_horizon_color:new Xe.aL(u,fr.u_horizon_color),u_horizon:new Xe.aI(u,fr.u_horizon),u_sky_horizon_blend:new Xe.aI(u,fr.u_sky_horizon_blend)})};class He{constructor(u,Xe,fr){this.context=u;const Ar=u.gl;this.buffer=Ar.createBuffer(),this.dynamicDraw=Boolean(fr),this.context.unbindVAO(),u.bindElementBuffer.set(this.buffer),Ar.bufferData(Ar.ELEMENT_ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?Ar.DYNAMIC_DRAW:Ar.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(u){const Xe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),Xe.bufferSubData(Xe.ELEMENT_ARRAY_BUFFER,0,u.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class $e{constructor(u,Xe,fr,Ar){this.length=Xe.length,this.attributes=fr,this.itemSize=Xe.bytesPerElement,this.dynamicDraw=Ar,this.context=u;const _r=u.gl;this.buffer=_r.createBuffer(),u.bindVertexBuffer.set(this.buffer),_r.bufferData(_r.ARRAY_BUFFER,Xe.arrayBuffer,this.dynamicDraw?_r.DYNAMIC_DRAW:_r.STATIC_DRAW),this.dynamicDraw||delete Xe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(u){if(u.length!==this.length)throw new Error(`Length of new data is ${u.length}, which doesn't match current length of ${this.length}`);const Xe=this.context.gl;this.bind(),Xe.bufferSubData(Xe.ARRAY_BUFFER,0,u.arrayBuffer)}enableAttributes(u,Xe){for(let fr=0;fr<this.attributes.length;fr++){const Ar=Xe.attributes[this.attributes[fr].name];void 0!==Ar&&u.enableVertexAttribArray(Ar)}}setVertexAttribPointers(u,Xe,fr){for(let Ar=0;Ar<this.attributes.length;Ar++){const _r=this.attributes[Ar],wr=Xe.attributes[_r.name];void 0!==wr&&u.vertexAttribPointer(wr,_r.components,u[Sl[_r.type]],!1,this.itemSize,_r.offset+this.itemSize*(fr||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const kl=new WeakMap;function Ke(u){var Xe;if(kl.has(u))return kl.get(u);{const fr=null===(Xe=u.getParameter(u.VERSION))||void 0===Xe?void 0:Xe.startsWith("WebGL 2.0");return kl.set(u,fr),fr}}class Je{constructor(u){this.gl=u.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(u){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Ye extends Je{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.clearColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class Qe extends Je{getDefault(){return 1}set(u){(u!==this.current||this.dirty)&&(this.gl.clearDepth(u),this.current=u,this.dirty=!1)}}class ti extends Je{getDefault(){return 0}set(u){(u!==this.current||this.dirty)&&(this.gl.clearStencil(u),this.current=u,this.dirty=!1)}}class ei extends Je{getDefault(){return[!0,!0,!0,!0]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.colorMask(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class ii extends Je{getDefault(){return!0}set(u){(u!==this.current||this.dirty)&&(this.gl.depthMask(u),this.current=u,this.dirty=!1)}}class ai extends Je{getDefault(){return 255}set(u){(u!==this.current||this.dirty)&&(this.gl.stencilMask(u),this.current=u,this.dirty=!1)}}class si extends Je{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(u){const Xe=this.current;(u.func!==Xe.func||u.ref!==Xe.ref||u.mask!==Xe.mask||this.dirty)&&(this.gl.stencilFunc(u.func,u.ref,u.mask),this.current=u,this.dirty=!1)}}class oi extends Je{getDefault(){const u=this.gl;return[u.KEEP,u.KEEP,u.KEEP]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||this.dirty)&&(this.gl.stencilOp(u[0],u[1],u[2]),this.current=u,this.dirty=!1)}}class ri extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.STENCIL_TEST):Xe.disable(Xe.STENCIL_TEST),this.current=u,this.dirty=!1}}class ni extends Je{getDefault(){return[0,1]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.depthRange(u[0],u[1]),this.current=u,this.dirty=!1)}}class li extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.DEPTH_TEST):Xe.disable(Xe.DEPTH_TEST),this.current=u,this.dirty=!1}}class hi extends Je{getDefault(){return this.gl.LESS}set(u){(u!==this.current||this.dirty)&&(this.gl.depthFunc(u),this.current=u,this.dirty=!1)}}class ci extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.BLEND):Xe.disable(Xe.BLEND),this.current=u,this.dirty=!1}}class ui extends Je{getDefault(){const u=this.gl;return[u.ONE,u.ZERO]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||this.dirty)&&(this.gl.blendFunc(u[0],u[1]),this.current=u,this.dirty=!1)}}class di extends Je{getDefault(){return Xe.aM.transparent}set(u){const Xe=this.current;(u.r!==Xe.r||u.g!==Xe.g||u.b!==Xe.b||u.a!==Xe.a||this.dirty)&&(this.gl.blendColor(u.r,u.g,u.b,u.a),this.current=u,this.dirty=!1)}}class _i extends Je{getDefault(){return this.gl.FUNC_ADD}set(u){(u!==this.current||this.dirty)&&(this.gl.blendEquation(u),this.current=u,this.dirty=!1)}}class pi extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;u?Xe.enable(Xe.CULL_FACE):Xe.disable(Xe.CULL_FACE),this.current=u,this.dirty=!1}}class mi extends Je{getDefault(){return this.gl.BACK}set(u){(u!==this.current||this.dirty)&&(this.gl.cullFace(u),this.current=u,this.dirty=!1)}}class fi extends Je{getDefault(){return this.gl.CCW}set(u){(u!==this.current||this.dirty)&&(this.gl.frontFace(u),this.current=u,this.dirty=!1)}}class gi extends Je{getDefault(){return null}set(u){(u!==this.current||this.dirty)&&(this.gl.useProgram(u),this.current=u,this.dirty=!1)}}class vi extends Je{getDefault(){return this.gl.TEXTURE0}set(u){(u!==this.current||this.dirty)&&(this.gl.activeTexture(u),this.current=u,this.dirty=!1)}}class xi extends Je{getDefault(){const u=this.gl;return[0,0,u.drawingBufferWidth,u.drawingBufferHeight]}set(u){const Xe=this.current;(u[0]!==Xe[0]||u[1]!==Xe[1]||u[2]!==Xe[2]||u[3]!==Xe[3]||this.dirty)&&(this.gl.viewport(u[0],u[1],u[2],u[3]),this.current=u,this.dirty=!1)}}class yi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindFramebuffer(Xe.FRAMEBUFFER,u),this.current=u,this.dirty=!1}}class bi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindRenderbuffer(Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class wi extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindTexture(Xe.TEXTURE_2D,u),this.current=u,this.dirty=!1}}class Ti extends Je{getDefault(){return null}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.bindBuffer(Xe.ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ii extends Je{getDefault(){return null}set(u){const Xe=this.gl;Xe.bindBuffer(Xe.ELEMENT_ARRAY_BUFFER,u),this.current=u,this.dirty=!1}}class Ei extends Je{getDefault(){return null}set(u){var Xe;if(u===this.current&&!this.dirty)return;const fr=this.gl;Ke(fr)?fr.bindVertexArray(u):null===(Xe=fr.getExtension("OES_vertex_array_object"))||void 0===Xe||Xe.bindVertexArrayOES(u),this.current=u,this.dirty=!1}}class Pi extends Je{getDefault(){return 4}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_ALIGNMENT,u),this.current=u,this.dirty=!1}}class Ci extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),this.current=u,this.dirty=!1}}class Si extends Je{getDefault(){return!1}set(u){if(u===this.current&&!this.dirty)return;const Xe=this.gl;Xe.pixelStorei(Xe.UNPACK_FLIP_Y_WEBGL,u),this.current=u,this.dirty=!1}}class zi extends Je{constructor(u,Xe){super(u),this.context=u,this.parent=Xe}getDefault(){return null}}class Di extends zi{setDirty(){this.dirty=!0}set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferTexture2D(Xe.FRAMEBUFFER,Xe.COLOR_ATTACHMENT0,Xe.TEXTURE_2D,u,0),this.current=u,this.dirty=!1}}class Mi extends zi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ai extends zi{set(u){if(u===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const Xe=this.gl;Xe.framebufferRenderbuffer(Xe.FRAMEBUFFER,Xe.DEPTH_STENCIL_ATTACHMENT,Xe.RENDERBUFFER,u),this.current=u,this.dirty=!1}}class Ri{constructor(u,Xe,fr,Ar,_r){this.context=u,this.width=Xe,this.height=fr;const wr=u.gl,Kr=this.framebuffer=wr.createFramebuffer();if(this.colorAttachment=new Di(u,Kr),Ar)this.depthAttachment=_r?new Ai(u,Kr):new Mi(u,Kr);else if(_r)throw new Error("Stencil cannot be set without depth");if(wr.checkFramebufferStatus(wr.FRAMEBUFFER)!==wr.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const u=this.context.gl,Xe=this.colorAttachment.get();if(Xe&&u.deleteTexture(Xe),this.depthAttachment){const Xe=this.depthAttachment.get();Xe&&u.deleteRenderbuffer(Xe)}u.deleteFramebuffer(this.framebuffer)}}class ki{constructor(u,Xe,fr){this.blendFunction=u,this.blendColor=Xe,this.mask=fr}}ki.Replace=[1,0],ki.disabled=new ki(ki.Replace,Xe.aM.transparent,[!1,!1,!1,!1]),ki.unblended=new ki(ki.Replace,Xe.aM.transparent,[!0,!0,!0,!0]),ki.alphaBlended=new ki([1,771],Xe.aM.transparent,[!0,!0,!0,!0]);class Li{constructor(u){var Xe,fr;if(this.gl=u,this.clearColor=new Ye(this),this.clearDepth=new Qe(this),this.clearStencil=new ti(this),this.colorMask=new ei(this),this.depthMask=new ii(this),this.stencilMask=new ai(this),this.stencilFunc=new si(this),this.stencilOp=new oi(this),this.stencilTest=new ri(this),this.depthRange=new ni(this),this.depthTest=new li(this),this.depthFunc=new hi(this),this.blend=new ci(this),this.blendFunc=new ui(this),this.blendColor=new di(this),this.blendEquation=new _i(this),this.cullFace=new pi(this),this.cullFaceSide=new mi(this),this.frontFace=new fi(this),this.program=new gi(this),this.activeTexture=new vi(this),this.viewport=new xi(this),this.bindFramebuffer=new yi(this),this.bindRenderbuffer=new bi(this),this.bindTexture=new wi(this),this.bindVertexBuffer=new Ti(this),this.bindElementBuffer=new Ii(this),this.bindVertexArray=new Ei(this),this.pixelStoreUnpack=new Pi(this),this.pixelStoreUnpackPremultiplyAlpha=new Ci(this),this.pixelStoreUnpackFlipY=new Si(this),this.extTextureFilterAnisotropic=u.getExtension("EXT_texture_filter_anisotropic")||u.getExtension("MOZ_EXT_texture_filter_anisotropic")||u.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=u.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=u.getParameter(u.MAX_TEXTURE_SIZE),Ke(u)){this.HALF_FLOAT=u.HALF_FLOAT;const Ar=u.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!==(Xe=u.RGBA16F)&&void 0!==Xe?Xe:null==Ar?void 0:Ar.RGBA16F_EXT,this.RGB16F=null!==(fr=u.RGB16F)&&void 0!==fr?fr:null==Ar?void 0:Ar.RGB16F_EXT,u.getExtension("EXT_color_buffer_float")}else{u.getExtension("EXT_color_buffer_half_float"),u.getExtension("OES_texture_half_float_linear");const Xe=u.getExtension("OES_texture_half_float");this.HALF_FLOAT=null==Xe?void 0:Xe.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(u,Xe){return new He(this,u,Xe)}createVertexBuffer(u,Xe,fr){return new $e(this,u,Xe,fr)}createRenderbuffer(u,Xe,fr){const Ar=this.gl,_r=Ar.createRenderbuffer();return this.bindRenderbuffer.set(_r),Ar.renderbufferStorage(Ar.RENDERBUFFER,u,Xe,fr),this.bindRenderbuffer.set(null),_r}createFramebuffer(u,Xe,fr,Ar){return new Ri(this,u,Xe,fr,Ar)}clear({color:u,depth:Xe,stencil:fr}){const Ar=this.gl;let _r=0;u&&(_r|=Ar.COLOR_BUFFER_BIT,this.clearColor.set(u),this.colorMask.set([!0,!0,!0,!0])),void 0!==Xe&&(_r|=Ar.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(Xe),this.depthMask.set(!0)),void 0!==fr&&(_r|=Ar.STENCIL_BUFFER_BIT,this.clearStencil.set(fr),this.stencilMask.set(255)),Ar.clear(_r)}setCullFace(u){!1===u.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(u.mode),this.frontFace.set(u.frontFace))}setDepthMode(u){u.func!==this.gl.ALWAYS||u.mask?(this.depthTest.set(!0),this.depthFunc.set(u.func),this.depthMask.set(u.mask),this.depthRange.set(u.range)):this.depthTest.set(!1)}setStencilMode(u){u.test.func!==this.gl.ALWAYS||u.mask?(this.stencilTest.set(!0),this.stencilMask.set(u.mask),this.stencilOp.set([u.fail,u.depthFail,u.pass]),this.stencilFunc.set({func:u.test.func,ref:u.ref,mask:u.test.mask})):this.stencilTest.set(!1)}setColorMode(u){Xe.aE(u.blendFunction,ki.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(u.blendFunction),this.blendColor.set(u.blendColor)),this.colorMask.set(u.mask)}createVertexArray(){var u;return Ke(this.gl)?this.gl.createVertexArray():null===(u=this.gl.getExtension("OES_vertex_array_object"))||void 0===u?void 0:u.createVertexArrayOES()}deleteVertexArray(u){var Xe;return Ke(this.gl)?this.gl.deleteVertexArray(u):null===(Xe=this.gl.getExtension("OES_vertex_array_object"))||void 0===Xe?void 0:Xe.deleteVertexArrayOES(u)}unbindVAO(){this.bindVertexArray.set(null)}}class Fi{constructor(u,Xe,fr){this.func=u,this.mask=Xe,this.range=fr}}Fi.ReadOnly=!1,Fi.ReadWrite=!0,Fi.disabled=new Fi(519,Fi.ReadOnly,[0,1]);const Bl=7680;class Oi{constructor(u,Xe,fr,Ar,_r,wr){this.test=u,this.ref=Xe,this.mask=fr,this.fail=Ar,this.depthFail=_r,this.pass=wr}}Oi.disabled=new Oi({func:519,mask:0},0,0,Bl,Bl,Bl);class Ni{constructor(u,Xe,fr){this.enable=u,this.mode=Xe,this.frontFace=fr}}let Zl;function Ui(u,fr,Ar,_r,wr){const Kr=u.context,In=Kr.gl,io=u.useProgram("collisionBox"),no=[];let oo=0,so=0;for(let co=0;co<_r.length;co++){const go=_r[co],ho=fr.getTile(go).getBucket(Ar);if(!ho)continue;const Co=wr?ho.textCollisionBox:ho.iconCollisionBox,Io=ho.collisionCircleArray;if(Io.length>0){const fr=Xe.H();Xe.aQ(fr,ho.placementInvProjMatrix,u.transform.glCoordMatrix),Xe.aQ(fr,fr,ho.placementViewportMatrix),no.push({circleArray:Io,circleOffset:so,transform:go.posMatrix,invTransform:fr,coord:go}),oo+=Io.length/4,so=oo}Co&&io.draw(Kr,In.LINES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,{u_matrix:go.posMatrix,u_pixel_extrude_scale:[1/(ao=u.transform).width,1/ao.height]},u.style.map.terrain&&u.style.map.terrain.getTerrainData(go),Ar.id,Co.layoutVertexBuffer,Co.indexBuffer,Co.segments,null,u.transform.zoom,null,null,Co.collisionVertexBuffer)}var ao;if(!wr||!no.length)return;const co=u.useProgram("collisionCircle"),go=new Xe.aR;go.resize(4*oo),go._trim();let ho=0;for(const u of no)for(let Xe=0;Xe<u.circleArray.length/4;Xe++){const fr=4*Xe,Ar=u.circleArray[fr+0],_r=u.circleArray[fr+1],wr=u.circleArray[fr+2],Kr=u.circleArray[fr+3];go.emplace(ho++,Ar,_r,wr,Kr,0),go.emplace(ho++,Ar,_r,wr,Kr,1),go.emplace(ho++,Ar,_r,wr,Kr,2),go.emplace(ho++,Ar,_r,wr,Kr,3)}(!Zl||Zl.length<2*oo)&&(Zl=function(u){const fr=2*u,Ar=new Xe.aT;Ar.resize(fr),Ar._trim();for(let u=0;u<fr;u++){const Xe=6*u;Ar.uint16[Xe+0]=4*u+0,Ar.uint16[Xe+1]=4*u+1,Ar.uint16[Xe+2]=4*u+2,Ar.uint16[Xe+3]=4*u+2,Ar.uint16[Xe+4]=4*u+3,Ar.uint16[Xe+5]=4*u+0}return Ar}(oo));const Co=Kr.createIndexBuffer(Zl,!0),Io=Kr.createVertexBuffer(go,Xe.aS.members,!0);for(const fr of no){const _r=Ce(fr.transform,fr.invTransform,u.transform);co.draw(Kr,In.TRIANGLES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,_r,u.style.map.terrain&&u.style.map.terrain.getTerrainData(fr.coord),Ar.id,Io,Co,Xe.a0.simpleSegment(0,2*fr.circleOffset,fr.circleArray.length,fr.circleArray.length/2),null,u.transform.zoom,null,null,null)}Io.destroy(),Co.destroy()}Ni.disabled=new Ni(!1,1029,2305),Ni.backCCW=new Ni(!0,1029,2305);const Rl=Xe.an(new Float32Array(16));function qi(u,fr,Ar,_r,wr,Kr){const{horizontalAlign:In,verticalAlign:io}=Xe.au(u);return new Xe.P((-(In-.5)*fr/wr+_r[0])*Kr,(-(io-.5)*Ar/wr+_r[1])*Kr)}function Vi(u,fr,Ar,_r,wr,Kr){const In=fr.tileAnchorPoint.add(new Xe.P(fr.translation[0],fr.translation[1]));if(fr.pitchWithMap){let u=_r.mult(Kr);return Ar||(u=u.rotate(-wr)),xt(In.add(u),fr.labelPlaneMatrix,fr.getElevation).point}if(Ar){const Xe=St(fr.tileAnchorPoint.x+1,fr.tileAnchorPoint.y,fr).point.sub(u),Ar=Math.atan(Xe.y/Xe.x)+(Xe.x<0?Math.PI:0);return u.add(_r.rotate(Ar))}return u.add(_r)}function Gi(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao,co,go){const ho=u.text.placedSymbolArray,Co=u.text.dynamicLayoutVertexArray,Io=u.icon.dynamicLayoutVertexArray,xo={};Co.clear();for(let Io=0;Io<ho.length;Io++){const Mo=ho.get(Io),Po=Mo.hidden||!Mo.crossTileID||u.allowVerticalPlacement&&!Mo.placedOrientation?null:_r[Mo.crossTileID];if(Po){const _r=new Xe.P(Mo.anchorX,Mo.anchorY),ho={getElevation:go,width:wr.width,height:wr.height,labelPlaneMatrix:Kr,lineVertexArray:null,pitchWithMap:Ar,projection:so,projectionCache:null,tileAnchorPoint:_r,translation:ao,unwrappedTileID:co},Io=Ar?xt(_r,In,go):St(_r.x,_r.y,ho),ss=yt(wr.cameraToCenterDistance,Io.signedDistanceFromCamera);let sa=Xe.ai(u.textSizeData,no,Mo)*ss/Xe.ap;Ar&&(sa*=u.tilePixelRatio/io);const{width:aa,height:fa,anchor:ya,textOffset:ol,textBoxScale:sl}=Po,al=qi(ya,aa,fa,ol,sl,sa),cl=so.getPitchedTextCorrection(wr,_r.add(new Xe.P(ao[0],ao[1])),co),hl=Vi(Io.point,ho,fr,al,wr.angle,cl),ul=u.allowVerticalPlacement&&Mo.placedOrientation===Xe.ah.vertical?Math.PI/2:0;for(let u=0;u<Mo.numGlyphs;u++)Xe.aj(Co,hl,ul);oo&&Mo.associatedIconIndex>=0&&(xo[Mo.associatedIconIndex]={shiftedAnchor:hl,angle:ul})}else Rt(Mo.numGlyphs,Co)}if(oo){Io.clear();const fr=u.icon.placedSymbolArray;for(let u=0;u<fr.length;u++){const Ar=fr.get(u);if(Ar.hidden)Rt(Ar.numGlyphs,Io);else{const fr=xo[u];if(fr)for(let u=0;u<Ar.numGlyphs;u++)Xe.aj(Io,fr.shiftedAnchor,fr.angle);else Rt(Ar.numGlyphs,Io)}}u.icon.dynamicLayoutVertexBuffer.updateData(Io)}u.text.dynamicLayoutVertexBuffer.updateData(Co)}function Hi(u,Xe,fr){return fr.iconsInText&&Xe?"symbolTextAndIcon":u?"symbolSDF":"symbolIcon"}function Wi(u,fr,Ar,_r,wr,Kr,In,io,no,oo,so,ao){const co=u.context,go=co.gl,ho=u.transform,Co=ee(),Io="map"===io,xo="map"===no,Mo="viewport"!==io&&"point"!==Ar.layout.get("symbol-placement"),Po=Io&&!xo&&!Mo,ss=!xo&&Mo,sa=!Ar.layout.get("symbol-sort-key").isConstant();let aa=!1;const fa=u.depthModeForSublayer(0,Fi.ReadOnly),ya=Ar._unevaluatedLayout.hasValue("text-variable-anchor")||Ar._unevaluatedLayout.hasValue("text-variable-anchor-offset"),ol=[],sl=Co.getCircleRadiusCorrection(ho);for(const io of _r){const _r=fr.getTile(io),no=_r.getBucket(Ar);if(!no)continue;const so=wr?no.text:no.icon;if(!so||!so.segments.get().length||!so.hasVisibleVertices)continue;const ao=so.programConfigurations.get(Ar.id),co=wr||no.sdfIcons,fa=wr?no.textSizeData:no.iconSizeData,al=xo||0!==ho.pitch,cl=u.useProgram(Hi(co,wr,no),ao),hl=Xe.ag(fa,ho.zoom),ul=u.style.map.terrain&&u.style.map.terrain.getTerrainData(io);let dl,pl,Cl,fl,_l=[0,0],vl=null;if(wr)pl=_r.glyphAtlasTexture,Cl=go.LINEAR,dl=_r.glyphAtlasTexture.size,no.iconsInText&&(_l=_r.imageAtlasTexture.size,vl=_r.imageAtlasTexture,fl=al||u.options.rotating||u.options.zooming||"composite"===fa.kind||"camera"===fa.kind?go.LINEAR:go.NEAREST);else{const Xe=1!==Ar.layout.get("icon-size").constantOr(0)||no.iconsNeedLinear;pl=_r.imageAtlasTexture,Cl=co||u.options.rotating||u.options.zooming||Xe||al?go.LINEAR:go.NEAREST,dl=_r.imageAtlasTexture.size}const xl=Ft(_r,1,u.transform.zoom),Sl=ss?io.posMatrix:Rl,kl=gt(Sl,xo,Io,u.transform,xl),Bl=vt(Sl,xo,Io,u.transform,xl),Zl=vt(io.posMatrix,xo,Io,u.transform,xl),Wl=Co.translatePosition(u.transform,_r,Kr,In),Tl=ya&&no.hasTextData(),Jl="none"!==Ar.layout.get("icon-text-fit")&&Tl&&no.hasIconData();if(Mo){const Xe=u.style.map.terrain?(Xe,fr)=>u.style.map.terrain.getElevation(io,Xe,fr):null,fr="map"===Ar.layout.get("text-rotation-alignment");wt(no,io.posMatrix,u,wr,kl,Zl,xo,oo,fr,Co,io.toUnwrapped(),ho.width,ho.height,Wl,Xe)}const Kl=io.posMatrix,Ll=wr&&ya||Jl,Dl=Mo||Ll?Rl:kl,Yl=Bl,Nl=co&&0!==Ar.paint.get(wr?"text-halo-width":"icon-halo-width").constantOr(1);let Ol;Ol=co?no.iconsInText?Ze(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,dl,_l,sl):Ue(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,wr,dl,!0,sl):je(fa.kind,hl,Po,xo,Mo,Ll,u,Kl,Dl,Yl,Wl,wr,dl,sl);const jl={program:cl,buffers:so,uniformValues:Ol,atlasTexture:pl,atlasTextureIcon:vl,atlasInterpolation:Cl,atlasInterpolationIcon:fl,isSDF:co,hasHalo:Nl};if(sa&&no.canOverlap){aa=!0;const u=so.segments.get();for(const fr of u)ol.push({segments:new Xe.a0([fr]),sortKey:fr.sortKey,state:jl,terrainData:ul})}else ol.push({segments:so.segments,sortKey:0,state:jl,terrainData:ul})}aa&&ol.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of ol){const fr=Xe.state;if(co.activeTexture.set(go.TEXTURE0),fr.atlasTexture.bind(fr.atlasInterpolation,go.CLAMP_TO_EDGE),fr.atlasTextureIcon&&(co.activeTexture.set(go.TEXTURE1),fr.atlasTextureIcon&&fr.atlasTextureIcon.bind(fr.atlasInterpolationIcon,go.CLAMP_TO_EDGE)),fr.isSDF){const _r=fr.uniformValues;fr.hasHalo&&(_r.u_is_halo=1,$i(fr.buffers,Xe.segments,Ar,u,fr.program,fa,so,ao,_r,Xe.terrainData)),_r.u_is_halo=0}$i(fr.buffers,Xe.segments,Ar,u,fr.program,fa,so,ao,fr.uniformValues,Xe.terrainData)}}function $i(u,Xe,fr,Ar,_r,wr,Kr,In,io,no){const oo=Ar.context;_r.draw(oo,oo.gl.TRIANGLES,wr,Kr,In,Ni.disabled,io,no,fr.id,u.layoutVertexBuffer,u.indexBuffer,Xe,fr.paint,Ar.transform.zoom,u.programConfigurations.get(fr.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function Xi(u,Xe,fr,Ar,_r){if(!fr||!Ar||!Ar.imageAtlas)return;const wr=Ar.imageAtlas.patternPositions;let Kr=wr[fr.to.toString()],In=wr[fr.from.toString()];if(!Kr&&In&&(Kr=In),!In&&Kr&&(In=Kr),!Kr||!In){const u=_r.getPaintProperty(Xe);Kr=wr[u],In=wr[u]}Kr&&In&&u.setConstantPatternPositions(Kr,In)}function Ki(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context.gl,io="fill-pattern",no=fr.paint.get(io),oo=no&&no.constantOr(1),so=fr.getCrossfadeParameters();let ao,co,go,ho,Co;Kr?(co=oo&&!fr.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",ao=In.LINES):(co=oo?"fillPattern":"fill",ao=In.TRIANGLES);const Io=no.constantOr(null);for(const no of Ar){const Ar=Xe.getTile(no);if(oo&&!Ar.patternsLoaded())continue;const xo=Ar.getBucket(fr);if(!xo)continue;const Mo=xo.programConfigurations.get(fr.id),Po=u.useProgram(co,Mo),ss=u.style.map.terrain&&u.style.map.terrain.getTerrainData(no);oo&&(u.context.activeTexture.set(In.TEXTURE0),Ar.imageAtlasTexture.bind(In.LINEAR,In.CLAMP_TO_EDGE),Mo.updatePaintBuffers(so)),Xi(Mo,io,Io,Ar,fr);const sa=ss?no:null,aa=u.translatePosMatrix(sa?sa.posMatrix:no.posMatrix,Ar,fr.paint.get("fill-translate"),fr.paint.get("fill-translate-anchor"));if(Kr){ho=xo.indexBuffer2,Co=xo.segments2;const Xe=[In.drawingBufferWidth,In.drawingBufferHeight];go="fillOutlinePattern"===co&&oo?Ee(aa,u,so,Ar,Xe):Ie(aa,Xe)}else ho=xo.indexBuffer,Co=xo.segments,go=oo?Te(aa,u,so,Ar):we(aa);Po.draw(u.context,ao,_r,u.stencilModeForClipping(no),wr,Ni.disabled,go,ss,fr.id,xo.layoutVertexBuffer,ho,Co,fr.paint,u.transform.zoom,Mo)}}function Ji(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no="fill-extrusion-pattern",oo=fr.paint.get(no),so=oo.constantOr(1),ao=fr.getCrossfadeParameters(),co=fr.paint.get("fill-extrusion-opacity"),go=oo.constantOr(null);for(const oo of Ar){const Ar=Xe.getTile(oo),ho=Ar.getBucket(fr);if(!ho)continue;const Co=u.style.map.terrain&&u.style.map.terrain.getTerrainData(oo),Io=ho.programConfigurations.get(fr.id),xo=u.useProgram(so?"fillExtrusionPattern":"fillExtrusion",Io);so&&(u.context.activeTexture.set(io.TEXTURE0),Ar.imageAtlasTexture.bind(io.LINEAR,io.CLAMP_TO_EDGE),Io.updatePaintBuffers(ao)),Xi(Io,no,go,Ar,fr);const Mo=u.translatePosMatrix(oo.posMatrix,Ar,fr.paint.get("fill-extrusion-translate"),fr.paint.get("fill-extrusion-translate-anchor")),Po=fr.paint.get("fill-extrusion-vertical-gradient"),ss=so?be(Mo,u,Po,co,oo,ao,Ar):ye(Mo,u,Po,co);xo.draw(In,In.gl.TRIANGLES,_r,wr,Kr,Ni.backCCW,ss,Co,fr.id,ho.layoutVertexBuffer,ho.indexBuffer,ho.segments,fr.paint,u.transform.zoom,Io,u.style.map.terrain&&ho.centroidVertexBuffer)}}function Yi(u,Xe,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no=fr.fbo;if(!no)return;const oo=u.useProgram("hillshade"),so=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);In.activeTexture.set(io.TEXTURE0),io.bindTexture(io.TEXTURE_2D,no.colorAttachment.get()),oo.draw(In,io.TRIANGLES,_r,wr,Kr,Ni.disabled,((u,Xe,fr,Ar)=>{const _r=fr.paint.get("hillshade-shadow-color"),wr=fr.paint.get("hillshade-highlight-color"),Kr=fr.paint.get("hillshade-accent-color");let In=fr.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===fr.paint.get("hillshade-illumination-anchor")&&(In-=u.transform.angle);const io=!u.options.moving;return{u_matrix:Ar?Ar.posMatrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped(),io),u_image:0,u_latrange:Me(0,Xe.tileID),u_light:[fr.paint.get("hillshade-exaggeration"),In],u_shadow:_r,u_highlight:wr,u_accent:Kr}})(u,fr,Ar,so?Xe:null),so,Ar.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function Qi(u,fr,Ar,_r,wr,Kr){const In=u.context,io=In.gl,no=fr.dem;if(no&&no.data){const oo=no.dim,so=no.stride,ao=no.getPixels();if(In.activeTexture.set(io.TEXTURE1),In.pixelStoreUnpackPremultiplyAlpha.set(!1),fr.demTexture=fr.demTexture||u.getTileTexture(so),fr.demTexture){const u=fr.demTexture;u.update(ao,{premultiply:!1}),u.bind(io.NEAREST,io.CLAMP_TO_EDGE)}else fr.demTexture=new b(In,ao,io.RGBA,{premultiply:!1}),fr.demTexture.bind(io.NEAREST,io.CLAMP_TO_EDGE);In.activeTexture.set(io.TEXTURE0);let co=fr.fbo;if(!co){const u=new b(In,{width:oo,height:oo,data:null},io.RGBA);u.bind(io.LINEAR,io.CLAMP_TO_EDGE),co=fr.fbo=In.createFramebuffer(oo,oo,!0,!1),co.colorAttachment.set(u.texture)}In.bindFramebuffer.set(co.framebuffer),In.viewport.set([0,0,oo,oo]),u.useProgram("hillshadePrepare").draw(In,io.TRIANGLES,_r,wr,Kr,Ni.disabled,((u,fr)=>{const Ar=fr.stride,_r=Xe.H();return Xe.aP(_r,0,Xe.X,-Xe.X,0,0,1),Xe.J(_r,_r,[0,-Xe.X,0]),{u_matrix:_r,u_image:1,u_dimension:[Ar,Ar],u_zoom:u.overscaledZ,u_unpack:fr.getUnpackVector()}})(fr.tileID,no),null,Ar.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),fr.needsHillshadePrepare=!1}}function ta(u,fr,Ar,_r,Kr,In){const io=_r.paint.get("raster-fade-duration");if(!In&&io>0){const _r=wr.now(),In=(_r-u.timeAdded)/io,no=fr?(_r-fr.timeAdded)/io:-1,oo=Ar.getSource(),so=Kr.coveringZoomLevel({tileSize:oo.tileSize,roundZoom:oo.roundZoom}),ao=!fr||Math.abs(fr.tileID.overscaledZ-so)>Math.abs(u.tileID.overscaledZ-so),co=ao&&u.refreshedUponExpiration?1:Xe.ac(ao?In:1-no,0,1);return u.refreshedUponExpiration&&In>=1&&(u.refreshedUponExpiration=!1),fr?{opacity:1,mix:1-co}:{opacity:co,mix:0}}return{opacity:1,mix:0}}const Wl=new Xe.aM(1,0,0,1),Tl=new Xe.aM(0,1,0,1),Jl=new Xe.aM(0,0,1,1),Kl=new Xe.aM(1,0,1,1),Ll=new Xe.aM(0,1,1,1);function ra(u,Xe,fr,Ar){la(u,0,Xe+fr/2,u.transform.width,fr,Ar)}function na(u,Xe,fr,Ar){la(u,Xe-fr/2,0,fr,u.transform.height,Ar)}function la(u,Xe,fr,Ar,_r,wr){const Kr=u.context,In=Kr.gl;In.enable(In.SCISSOR_TEST),In.scissor(Xe*u.pixelRatio,fr*u.pixelRatio,Ar*u.pixelRatio,_r*u.pixelRatio),Kr.clear({color:wr}),In.disable(In.SCISSOR_TEST)}function ha(u,fr,Ar){const _r=u.context,wr=_r.gl,Kr=Ar.posMatrix,In=u.useProgram("debug"),io=Fi.disabled,no=Oi.disabled,oo=u.colorModeForRenderPass(),so="$debug",ao=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Ar);_r.activeTexture.set(wr.TEXTURE0);const co=fr.getTileByID(Ar.key).latestRawTileData,go=Math.floor((co&&co.byteLength||0)/1024),ho=fr.getTile(Ar).tileSize,Co=512/Math.min(ho,512)*(Ar.overscaledZ/u.transform.zoom)*.5;let Io=Ar.canonical.toString();Ar.overscaledZ!==Ar.canonical.z&&(Io+=` => ${Ar.overscaledZ}`),function(u,Xe){u.initDebugOverlayCanvas();const fr=u.debugOverlayCanvas,Ar=u.context.gl,_r=u.debugOverlayCanvas.getContext("2d");_r.clearRect(0,0,fr.width,fr.height),_r.shadowColor="white",_r.shadowBlur=2,_r.lineWidth=1.5,_r.strokeStyle="white",_r.textBaseline="top",_r.font="bold 36px Open Sans, sans-serif",_r.fillText(Xe,5,5),_r.strokeText(Xe,5,5),u.debugOverlayTexture.update(fr),u.debugOverlayTexture.bind(Ar.LINEAR,Ar.CLAMP_TO_EDGE)}(u,`${Io} ${go}kB`),In.draw(_r,wr.TRIANGLES,io,no,ki.alphaBlended,Ni.disabled,Se(Kr,Xe.aM.transparent,Co),null,so,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),In.draw(_r,wr.LINE_STRIP,io,no,oo,Ni.disabled,Se(Kr,Xe.aM.red),ao,so,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function ca(u,Xe,fr){const Ar=u.context,_r=Ar.gl,wr=u.colorModeForRenderPass(),Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D),In=u.useProgram("terrain"),io=Xe.getTerrainMesh();Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height]);for(const no of fr){const fr=u.renderToTexture.getTexture(no),oo=Xe.getTerrainData(no.tileID);Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,fr.texture);const so=u.transform.calculatePosMatrix(no.tileID.toUnwrapped()),ao=Xe.getMeshFrameDelta(u.transform.zoom),co=u.transform.calculateFogMatrix(no.tileID.toUnwrapped()),go=fe(so,ao,co,u.style.sky,u.transform.pitch);In.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,go,oo,"terrain",io.vertexBuffer,io.indexBuffer,io.segments)}}class ua{constructor(u,Xe,fr){this.vertexBuffer=u,this.indexBuffer=Xe,this.segments=fr}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class da{constructor(u,fr){this.context=new Li(u),this.transform=fr,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:Xe.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ut.maxUnderzooming+ut.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new le}resize(u,Xe,fr){if(this.width=Math.floor(u*fr),this.height=Math.floor(Xe*fr),this.pixelRatio=fr,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const u of this.style._order)this.style._layers[u].resize()}setup(){const u=this.context,fr=new Xe.aW;fr.emplaceBack(0,0),fr.emplaceBack(Xe.X,0),fr.emplaceBack(0,Xe.X),fr.emplaceBack(Xe.X,Xe.X),this.tileExtentBuffer=u.createVertexBuffer(fr,_l.members),this.tileExtentSegments=Xe.a0.simpleSegment(0,0,4,2);const Ar=new Xe.aW;Ar.emplaceBack(0,0),Ar.emplaceBack(Xe.X,0),Ar.emplaceBack(0,Xe.X),Ar.emplaceBack(Xe.X,Xe.X),this.debugBuffer=u.createVertexBuffer(Ar,_l.members),this.debugSegments=Xe.a0.simpleSegment(0,0,4,5);const _r=new Xe.$;_r.emplaceBack(0,0,0,0),_r.emplaceBack(Xe.X,0,Xe.X,0),_r.emplaceBack(0,Xe.X,0,Xe.X),_r.emplaceBack(Xe.X,Xe.X,Xe.X,Xe.X),this.rasterBoundsBuffer=u.createVertexBuffer(_r,Po.members),this.rasterBoundsSegments=Xe.a0.simpleSegment(0,0,4,2);const wr=new Xe.aW;wr.emplaceBack(0,0),wr.emplaceBack(1,0),wr.emplaceBack(0,1),wr.emplaceBack(1,1),this.viewportBuffer=u.createVertexBuffer(wr,_l.members),this.viewportSegments=Xe.a0.simpleSegment(0,0,4,2);const Kr=new Xe.aY;Kr.emplaceBack(0),Kr.emplaceBack(1),Kr.emplaceBack(3),Kr.emplaceBack(2),Kr.emplaceBack(0),this.tileBorderIndexBuffer=u.createIndexBuffer(Kr);const In=new Xe.aX;In.emplaceBack(0,1,2),In.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=u.createIndexBuffer(In);const io=this.context.gl;this.stencilClearMode=new Oi({func:io.ALWAYS,mask:0},0,255,io.ZERO,io.ZERO,io.ZERO)}clearStencil(){const u=this.context,fr=u.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const Ar=Xe.H();Xe.aP(Ar,0,this.width,this.height,0,0,1),Xe.K(Ar,Ar,[fr.drawingBufferWidth,fr.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(u,fr.TRIANGLES,Fi.disabled,this.stencilClearMode,ki.disabled,Ni.disabled,ze(Ar),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(u,Xe){if(this.currentStencilSource===u.source||!u.isTileClipped()||!Xe||!Xe.length)return;this.currentStencilSource=u.source;const fr=this.context,Ar=fr.gl;this.nextStencilID+Xe.length>256&&this.clearStencil(),fr.setColorMode(ki.disabled),fr.setDepthMode(Fi.disabled);const _r=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const u of Xe){const Xe=this._tileClippingMaskIDs[u.key]=this.nextStencilID++,wr=this.style.map.terrain&&this.style.map.terrain.getTerrainData(u);_r.draw(fr,Ar.TRIANGLES,Fi.disabled,new Oi({func:Ar.ALWAYS,mask:0},Xe,255,Ar.KEEP,Ar.KEEP,Ar.REPLACE),ki.disabled,Ni.disabled,ze(u.posMatrix),wr,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const u=this.nextStencilID++,Xe=this.context.gl;return new Oi({func:Xe.NOTEQUAL,mask:255},u,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilModeForClipping(u){const Xe=this.context.gl;return new Oi({func:Xe.EQUAL,mask:255},this._tileClippingMaskIDs[u.key],0,Xe.KEEP,Xe.KEEP,Xe.REPLACE)}stencilConfigForOverlap(u){const Xe=this.context.gl,fr=u.sort(((u,Xe)=>Xe.overscaledZ-u.overscaledZ)),Ar=fr[fr.length-1].overscaledZ,_r=fr[0].overscaledZ-Ar+1;if(_r>1){this.currentStencilSource=void 0,this.nextStencilID+_r>256&&this.clearStencil();const u={};for(let fr=0;fr<_r;fr++)u[fr+Ar]=new Oi({func:Xe.GEQUAL,mask:255},fr+this.nextStencilID,255,Xe.KEEP,Xe.KEEP,Xe.REPLACE);return this.nextStencilID+=_r,[u,fr]}return[{[Ar]:Oi.disabled},fr]}colorModeForRenderPass(){const u=this.context.gl;if(this._showOverdrawInspector){const fr=1/8;return new ki([u.CONSTANT_COLOR,u.ONE],new Xe.aM(fr,fr,fr,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?ki.unblended:ki.alphaBlended}depthModeForSublayer(u,Xe,fr){if(!this.opaquePassEnabledForLayer())return Fi.disabled;const Ar=1-((1+this.currentLayer)*this.numSublayers+u)*this.depthEpsilon;return new Fi(fr||this.context.gl.LEQUAL,Xe,[Ar,Ar])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(u,fr){this.style=u,this.options=fr,this.lineAtlas=u.lineAtlas,this.imageManager=u.imageManager,this.glyphManager=u.glyphManager,this.symbolFadeChange=u.placement.symbolFadeChange(wr.now()),this.imageManager.beginFrame();const Ar=this.style._order,_r=this.style.sourceCaches,Kr={},In={},io={};for(const u in _r){const Xe=_r[u];Xe.used&&Xe.prepare(this.context),Kr[u]=Xe.getVisibleCoordinates(),In[u]=Kr[u].slice().reverse(),io[u]=Xe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let u=0;u<Ar.length;u++)if(this.style._layers[Ar[u]].is3D()){this.opaquePassCutoff=u;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const u of Ar){const Xe=this.style._layers[u];if(!Xe.hasOffscreenPass()||Xe.isHidden(this.transform.zoom))continue;const fr=In[Xe.source];("custom"===Xe.type||fr.length)&&this.renderLayer(this,_r[Xe.source],Xe,fr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:fr.showOverdrawInspector?Xe.aM.black:Xe.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(u,fr){const Ar=u.context,_r=Ar.gl,wr=((u,Xe,fr)=>({u_sky_color:u.properties.get("sky-color"),u_horizon_color:u.properties.get("horizon-color"),u_horizon:(Xe.height/2+Xe.getHorizon())*fr,u_sky_horizon_blend:u.properties.get("sky-horizon-blend")*Xe.height/2*fr}))(fr,u.style.map.transform,u.pixelRatio),Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=Oi.disabled,io=u.colorModeForRenderPass(),no=u.useProgram("sky");if(!fr.mesh){const u=new Xe.aW;u.emplaceBack(-1,-1),u.emplaceBack(1,-1),u.emplaceBack(1,1),u.emplaceBack(-1,1);const _r=new Xe.aX;_r.emplaceBack(0,1,2),_r.emplaceBack(0,2,3),fr.mesh=new ua(Ar.createVertexBuffer(u,_l.members),Ar.createIndexBuffer(_r),Xe.a0.simpleSegment(0,0,u.length,_r.length))}no.draw(Ar,_r.TRIANGLES,Kr,In,io,Ni.disabled,wr,void 0,"sky",fr.mesh.vertexBuffer,fr.mesh.indexBuffer,fr.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=fr.showOverdrawInspector,this.depthRangeFor3D=[0,1-(u._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Ar.length-1;this.currentLayer>=0;this.currentLayer--){const u=this.style._layers[Ar[this.currentLayer]],Xe=_r[u.source],fr=Kr[u.source];this._renderTileClippingMasks(u,fr),this.renderLayer(this,Xe,u,fr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Ar.length;this.currentLayer++){const u=this.style._layers[Ar[this.currentLayer]],Xe=_r[u.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(u))continue;const fr=("symbol"===u.type?io:In)[u.source];this._renderTileClippingMasks(u,Kr[u.source]),this.renderLayer(this,Xe,u,fr)}if(this.options.showTileBoundaries){const u=function(u,Xe){let fr=null;const Ar=Object.values(u._layers).flatMap((fr=>fr.source&&!fr.isHidden(Xe)?[u.sourceCaches[fr.source]]:[])),_r=Ar.filter((u=>"vector"===u.getSource().type)),wr=Ar.filter((u=>"vector"!==u.getSource().type)),r=u=>{(!fr||fr.getSource().maxzoom<u.getSource().maxzoom)&&(fr=u)};return _r.forEach((u=>r(u))),fr||wr.forEach((u=>r(u))),fr}(this.style,this.transform.zoom);u&&function(u,Xe,fr){for(let Ar=0;Ar<fr.length;Ar++)ha(u,Xe,fr[Ar])}(this,u,u.getVisibleCoordinates())}this.options.showPadding&&function(u){const Xe=u.transform.padding;ra(u,u.transform.height-(Xe.top||0),3,Wl),ra(u,Xe.bottom||0,3,Tl),na(u,Xe.left||0,3,Jl),na(u,u.transform.width-(Xe.right||0),3,Kl);const fr=u.transform.centerPoint;!function(u,Xe,fr,Ar){la(u,Xe-1,fr-10,2,20,Ar),la(u,Xe-10,fr-1,20,2,Ar)}(u,fr.x,u.transform.height-fr.y,Ll)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(u){if(!this.style||!this.style.map||!this.style.map.terrain)return;const fr=this.terrainFacilitator.matrix,Ar=this.transform.modelViewProjectionMatrix;let _r=this.terrainFacilitator.dirty;_r||(_r=u?!Xe.aZ(fr,Ar):!Xe.a_(fr,Ar)),_r||(_r=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),_r&&(Xe.a$(fr,Ar),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(u,fr){const Ar=u.context,_r=Ar.gl,wr=ki.unblended,Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=fr.getTerrainMesh(),io=fr.sourceCache.getRenderableTiles(),no=u.useProgram("terrainDepth");Ar.bindFramebuffer.set(fr.getFramebuffer("depth").framebuffer),Ar.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),Ar.clear({color:Xe.aM.transparent,depth:1});for(const Xe of io){const io=fr.getTerrainData(Xe.tileID),oo={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_ele_delta:fr.getMeshFrameDelta(u.transform.zoom)};no.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,oo,io,"terrain",In.vertexBuffer,In.indexBuffer,In.segments)}Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain),function(u,fr){const Ar=u.context,_r=Ar.gl,wr=ki.unblended,Kr=new Fi(_r.LEQUAL,Fi.ReadWrite,[0,1]),In=fr.getTerrainMesh(),io=fr.getCoordsTexture(),no=fr.sourceCache.getRenderableTiles(),oo=u.useProgram("terrainCoords");Ar.bindFramebuffer.set(fr.getFramebuffer("coords").framebuffer),Ar.viewport.set([0,0,u.width/devicePixelRatio,u.height/devicePixelRatio]),Ar.clear({color:Xe.aM.transparent,depth:1}),fr.coordsIndex=[];for(const Xe of no){const no=fr.getTerrainData(Xe.tileID);Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,io.texture);const so={u_matrix:u.transform.calculatePosMatrix(Xe.tileID.toUnwrapped()),u_terrain_coords_id:(255-fr.coordsIndex.length)/255,u_texture:0,u_ele_delta:fr.getMeshFrameDelta(u.transform.zoom)};oo.draw(Ar,_r.TRIANGLES,Kr,Oi.disabled,wr,Ni.backCCW,so,no,"terrain",In.vertexBuffer,In.indexBuffer,In.segments),fr.coordsIndex.push(Xe.tileID.key)}Ar.bindFramebuffer.set(null),Ar.viewport.set([0,0,u.width,u.height])}(this,this.style.map.terrain))}renderLayer(u,fr,Ar,_r){if(!Ar.isHidden(this.transform.zoom)&&("background"===Ar.type||"custom"===Ar.type||(_r||[]).length))switch(this.id=Ar.id,Ar.type){case"symbol":!function(u,fr,Ar,_r,wr){if("translucent"!==u.renderPass)return;const Kr=Oi.disabled,In=u.colorModeForRenderPass();(Ar._unevaluatedLayout.hasValue("text-variable-anchor")||Ar._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(u,fr,Ar,_r,wr,Kr,In,io,no){const oo=fr.transform,so=ee(),ao="map"===wr,co="map"===Kr;for(const wr of u){const u=_r.getTile(wr),Kr=u.getBucket(Ar);if(!Kr||!Kr.text||!Kr.text.segments.get().length)continue;const go=Xe.ag(Kr.textSizeData,oo.zoom),ho=Ft(u,1,fr.transform.zoom),Co=gt(wr.posMatrix,co,ao,fr.transform,ho),Io="none"!==Ar.layout.get("icon-text-fit")&&Kr.hasIconData();if(go){const Xe=Math.pow(2,oo.zoom-u.tileID.overscaledZ),Ar=fr.style.map.terrain?(u,Xe)=>fr.style.map.terrain.getElevation(wr,u,Xe):null,_r=so.translatePosition(oo,u,In,io);Gi(Kr,ao,co,no,oo,Co,wr.posMatrix,Xe,go,Io,so,_r,wr.toUnwrapped(),Ar)}}}(_r,u,Ar,fr,Ar.layout.get("text-rotation-alignment"),Ar.layout.get("text-pitch-alignment"),Ar.paint.get("text-translate"),Ar.paint.get("text-translate-anchor"),wr),0!==Ar.paint.get("icon-opacity").constantOr(1)&&Wi(u,fr,Ar,_r,!1,Ar.paint.get("icon-translate"),Ar.paint.get("icon-translate-anchor"),Ar.layout.get("icon-rotation-alignment"),Ar.layout.get("icon-pitch-alignment"),Ar.layout.get("icon-keep-upright"),Kr,In),0!==Ar.paint.get("text-opacity").constantOr(1)&&Wi(u,fr,Ar,_r,!0,Ar.paint.get("text-translate"),Ar.paint.get("text-translate-anchor"),Ar.layout.get("text-rotation-alignment"),Ar.layout.get("text-pitch-alignment"),Ar.layout.get("text-keep-upright"),Kr,In),fr.map.showCollisionBoxes&&(Ui(u,fr,Ar,_r,!0),Ui(u,fr,Ar,_r,!1))}(u,fr,Ar,_r,this.style.placement.variableOffsets);break;case"circle":!function(u,fr,Ar,_r){if("translucent"!==u.renderPass)return;const wr=Ar.paint.get("circle-opacity"),Kr=Ar.paint.get("circle-stroke-width"),In=Ar.paint.get("circle-stroke-opacity"),io=!Ar.layout.get("circle-sort-key").isConstant();if(0===wr.constantOr(1)&&(0===Kr.constantOr(1)||0===In.constantOr(1)))return;const no=u.context,oo=no.gl,so=u.depthModeForSublayer(0,Fi.ReadOnly),ao=Oi.disabled,co=u.colorModeForRenderPass(),go=[];for(let wr=0;wr<_r.length;wr++){const Kr=_r[wr],In=fr.getTile(Kr),no=In.getBucket(Ar);if(!no)continue;const oo=no.programConfigurations.get(Ar.id),so=u.useProgram("circle",oo),ao=no.layoutVertexBuffer,co=no.indexBuffer,ho=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Kr),Co={programConfiguration:oo,program:so,layoutVertexBuffer:ao,indexBuffer:co,uniformValues:Pe(u,Kr,In,Ar),terrainData:ho};if(io){const u=no.segments.get();for(const fr of u)go.push({segments:new Xe.a0([fr]),sortKey:fr.sortKey,state:Co})}else go.push({segments:no.segments,sortKey:0,state:Co})}io&&go.sort(((u,Xe)=>u.sortKey-Xe.sortKey));for(const Xe of go){const{programConfiguration:fr,program:_r,layoutVertexBuffer:wr,indexBuffer:Kr,uniformValues:In,terrainData:io}=Xe.state;_r.draw(no,oo.TRIANGLES,so,ao,co,Ni.disabled,In,io,Ar.id,wr,Kr,Xe.segments,Ar.paint,u.transform.zoom,fr)}}(u,fr,Ar,_r);break;case"heatmap":!function(u,fr,Ar,_r){if(0!==Ar.paint.get("heatmap-opacity"))if("offscreen"===u.renderPass){const wr=u.context,Kr=wr.gl,In=Oi.disabled,io=new ki([Kr.ONE,Kr.ONE],Xe.aM.transparent,[!0,!0,!0,!0]);!function(u,Xe,fr){const Ar=u.gl;u.activeTexture.set(Ar.TEXTURE1),u.viewport.set([0,0,Xe.width/4,Xe.height/4]);let _r=fr.heatmapFbo;if(_r)Ar.bindTexture(Ar.TEXTURE_2D,_r.colorAttachment.get()),u.bindFramebuffer.set(_r.framebuffer);else{const wr=Ar.createTexture();Ar.bindTexture(Ar.TEXTURE_2D,wr),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_WRAP_S,Ar.CLAMP_TO_EDGE),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_WRAP_T,Ar.CLAMP_TO_EDGE),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_MIN_FILTER,Ar.LINEAR),Ar.texParameteri(Ar.TEXTURE_2D,Ar.TEXTURE_MAG_FILTER,Ar.LINEAR),_r=fr.heatmapFbo=u.createFramebuffer(Xe.width/4,Xe.height/4,!1,!1),function(u,Xe,fr,Ar){var _r,wr;const Kr=u.gl,In=null!==(_r=u.HALF_FLOAT)&&void 0!==_r?_r:Kr.UNSIGNED_BYTE,io=null!==(wr=u.RGBA16F)&&void 0!==wr?wr:Kr.RGBA;Kr.texImage2D(Kr.TEXTURE_2D,0,io,Xe.width/4,Xe.height/4,0,Kr.RGBA,In,null),Ar.colorAttachment.set(fr)}(u,Xe,wr,_r)}}(wr,u,Ar),wr.clear({color:Xe.aM.transparent});for(let Xe=0;Xe<_r.length;Xe++){const no=_r[Xe];if(fr.hasRenderableParent(no))continue;const oo=fr.getTile(no),so=oo.getBucket(Ar);if(!so)continue;const ao=so.programConfigurations.get(Ar.id),co=u.useProgram("heatmap",ao),{zoom:go}=u.transform;co.draw(wr,Kr.TRIANGLES,Fi.disabled,In,io,Ni.disabled,De(no.posMatrix,oo,go,Ar.paint.get("heatmap-intensity")),null,Ar.id,so.layoutVertexBuffer,so.indexBuffer,so.segments,Ar.paint,u.transform.zoom,ao)}wr.viewport.set([0,0,u.width,u.height])}else"translucent"===u.renderPass&&(u.context.setColorMode(u.colorModeForRenderPass()),function(u,fr){const Ar=u.context,_r=Ar.gl,wr=fr.heatmapFbo;if(!wr)return;Ar.activeTexture.set(_r.TEXTURE0),_r.bindTexture(_r.TEXTURE_2D,wr.colorAttachment.get()),Ar.activeTexture.set(_r.TEXTURE1);let Kr=fr.colorRampTexture;Kr||(Kr=fr.colorRampTexture=new b(Ar,fr.colorRamp,_r.RGBA)),Kr.bind(_r.LINEAR,_r.CLAMP_TO_EDGE),u.useProgram("heatmapTexture").draw(Ar,_r.TRIANGLES,Fi.disabled,Oi.disabled,u.colorModeForRenderPass(),Ni.disabled,((u,fr)=>{const Ar=Xe.H();Xe.aP(Ar,0,u.width,u.height,0,0,1);const _r=u.context.gl;return{u_matrix:Ar,u_world:[_r.drawingBufferWidth,_r.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:fr.paint.get("heatmap-opacity")}})(u,fr),null,fr.id,u.viewportBuffer,u.quadTriangleIndexBuffer,u.viewportSegments,fr.paint,u.transform.zoom)}(u,Ar))}(u,fr,Ar,_r);break;case"line":!function(u,fr,Ar,_r){if("translucent"!==u.renderPass)return;const wr=Ar.paint.get("line-opacity"),Kr=Ar.paint.get("line-width");if(0===wr.constantOr(1)||0===Kr.constantOr(1))return;const In=u.depthModeForSublayer(0,Fi.ReadOnly),io=u.colorModeForRenderPass(),no=Ar.paint.get("line-dasharray"),oo=Ar.paint.get("line-pattern"),so=oo.constantOr(1),ao=Ar.paint.get("line-gradient"),co=Ar.getCrossfadeParameters(),go=so?"linePattern":no?"lineSDF":ao?"lineGradient":"line",ho=u.context,Co=ho.gl;let Io=!0;for(const wr of _r){const _r=fr.getTile(wr);if(so&&!_r.patternsLoaded())continue;const Kr=_r.getBucket(Ar);if(!Kr)continue;const xo=Kr.programConfigurations.get(Ar.id),Mo=u.context.program.get(),Po=u.useProgram(go,xo),ss=Io||Po.program!==Mo,sa=u.style.map.terrain&&u.style.map.terrain.getTerrainData(wr),aa=oo.constantOr(null);if(aa&&_r.imageAtlas){const u=_r.imageAtlas,Xe=u.patternPositions[aa.to.toString()],fr=u.patternPositions[aa.from.toString()];Xe&&fr&&xo.setConstantPatternPositions(Xe,fr)}const fa=sa?wr:null,ya=so?ke(u,_r,Ar,co,fa):no?Le(u,_r,Ar,no,co,fa):ao?Re(u,_r,Ar,Kr.lineClipsArray.length,fa):Ae(u,_r,Ar,fa);if(so)ho.activeTexture.set(Co.TEXTURE0),_r.imageAtlasTexture.bind(Co.LINEAR,Co.CLAMP_TO_EDGE),xo.updatePaintBuffers(co);else if(no&&(ss||u.lineAtlas.dirty))ho.activeTexture.set(Co.TEXTURE0),u.lineAtlas.bind(ho);else if(ao){const _r=Kr.gradients[Ar.id];let In=_r.texture;if(Ar.gradientVersion!==_r.version){let io=256;if(Ar.stepInterpolant){const Ar=fr.getSource().maxzoom,_r=wr.canonical.z===Ar?Math.ceil(1<<u.transform.maxZoom-wr.canonical.z):1;io=Xe.ac(Xe.aU(Kr.maxLineLength/Xe.X*1024*_r),256,ho.maxTextureSize)}_r.gradient=Xe.aV({expression:Ar.gradientExpression(),evaluationKey:"lineProgress",resolution:io,image:_r.gradient||void 0,clips:Kr.lineClipsArray}),_r.texture?_r.texture.update(_r.gradient):_r.texture=new b(ho,_r.gradient,Co.RGBA),_r.version=Ar.gradientVersion,In=_r.texture}ho.activeTexture.set(Co.TEXTURE0),In.bind(Ar.stepInterpolant?Co.NEAREST:Co.LINEAR,Co.CLAMP_TO_EDGE)}Po.draw(ho,Co.TRIANGLES,In,u.stencilModeForClipping(wr),io,Ni.disabled,ya,sa,Ar.id,Kr.layoutVertexBuffer,Kr.indexBuffer,Kr.segments,Ar.paint,u.transform.zoom,xo,Kr.layoutVertexBuffer2),Io=!1}}(u,fr,Ar,_r);break;case"fill":!function(u,fr,Ar,_r){const wr=Ar.paint.get("fill-color"),Kr=Ar.paint.get("fill-opacity");if(0===Kr.constantOr(1))return;const In=u.colorModeForRenderPass(),io=Ar.paint.get("fill-pattern"),no=u.opaquePassEnabledForLayer()&&!io.constantOr(1)&&1===wr.constantOr(Xe.aM.transparent).a&&1===Kr.constantOr(0)?"opaque":"translucent";if(u.renderPass===no){const Xe=u.depthModeForSublayer(1,"opaque"===u.renderPass?Fi.ReadWrite:Fi.ReadOnly);Ki(u,fr,Ar,_r,Xe,In,!1)}if("translucent"===u.renderPass&&Ar.paint.get("fill-antialias")){const Xe=u.depthModeForSublayer(Ar.getPaintProperty("fill-outline-color")?2:0,Fi.ReadOnly);Ki(u,fr,Ar,_r,Xe,In,!0)}}(u,fr,Ar,_r);break;case"fill-extrusion":!function(u,Xe,fr,Ar){const _r=fr.paint.get("fill-extrusion-opacity");if(0!==_r&&"translucent"===u.renderPass){const wr=new Fi(u.context.gl.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D);if(1!==_r||fr.paint.get("fill-extrusion-pattern").constantOr(1))Ji(u,Xe,fr,Ar,wr,Oi.disabled,ki.disabled),Ji(u,Xe,fr,Ar,wr,u.stencilModeFor3D(),u.colorModeForRenderPass());else{const _r=u.colorModeForRenderPass();Ji(u,Xe,fr,Ar,wr,Oi.disabled,_r)}}}(u,fr,Ar,_r);break;case"hillshade":!function(u,Xe,fr,Ar){if("offscreen"!==u.renderPass&&"translucent"!==u.renderPass)return;const _r=u.context,wr=u.depthModeForSublayer(0,Fi.ReadOnly),Kr=u.colorModeForRenderPass(),[In,io]="translucent"===u.renderPass?u.stencilConfigForOverlap(Ar):[{},Ar];for(const Ar of io){const _r=Xe.getTile(Ar);void 0!==_r.needsHillshadePrepare&&_r.needsHillshadePrepare&&"offscreen"===u.renderPass?Qi(u,_r,fr,wr,Oi.disabled,Kr):"translucent"===u.renderPass&&Yi(u,Ar,_r,fr,wr,In[Ar.overscaledZ],Kr)}_r.viewport.set([0,0,u.width,u.height])}(u,fr,Ar,_r);break;case"raster":!function(u,Xe,fr,Ar){if("translucent"!==u.renderPass)return;if(0===fr.paint.get("raster-opacity"))return;if(!Ar.length)return;const _r=u.context,wr=_r.gl,Kr=Xe.getSource(),In=u.useProgram("raster"),io=u.colorModeForRenderPass(),[no,oo]=Kr instanceof Q?[{},Ar]:u.stencilConfigForOverlap(Ar),so=oo[oo.length-1].overscaledZ,ao=!u.options.moving;for(const Ar of oo){const oo=u.depthModeForSublayer(Ar.overscaledZ-so,1===fr.paint.get("raster-opacity")?Fi.ReadWrite:Fi.ReadOnly,wr.LESS),co=Xe.getTile(Ar);co.registerFadeDuration(fr.paint.get("raster-fade-duration"));const go=Xe.findLoadedParent(Ar,0),ho=Xe.findLoadedSibling(Ar),Co=ta(co,go||ho||null,Xe,fr,u.transform,u.style.map.terrain);let Io,xo;const Mo="nearest"===fr.paint.get("raster-resampling")?wr.NEAREST:wr.LINEAR;_r.activeTexture.set(wr.TEXTURE0),co.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),_r.activeTexture.set(wr.TEXTURE1),go?(go.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),Io=Math.pow(2,go.tileID.overscaledZ-co.tileID.overscaledZ),xo=[co.tileID.canonical.x*Io%1,co.tileID.canonical.y*Io%1]):co.texture.bind(Mo,wr.CLAMP_TO_EDGE,wr.LINEAR_MIPMAP_NEAREST),co.texture.useMipmap&&_r.extTextureFilterAnisotropic&&u.transform.pitch>20&&wr.texParameterf(wr.TEXTURE_2D,_r.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,_r.extTextureFilterAnisotropicMax);const Po=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Ar),ss=Po?Ar:null,sa=ss?ss.posMatrix:u.transform.calculatePosMatrix(Ar.toUnwrapped(),ao),aa=Oe(sa,xo||[0,0],Io||1,Co,fr);Kr instanceof Q?In.draw(_r,wr.TRIANGLES,oo,Oi.disabled,io,Ni.disabled,aa,Po,fr.id,Kr.boundsBuffer,u.quadTriangleIndexBuffer,Kr.boundsSegments):In.draw(_r,wr.TRIANGLES,oo,no[Ar.overscaledZ],io,Ni.disabled,aa,Po,fr.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}}(u,fr,Ar,_r);break;case"background":!function(u,Xe,fr,Ar){const _r=fr.paint.get("background-color"),wr=fr.paint.get("background-opacity");if(0===wr)return;const Kr=u.context,In=Kr.gl,io=u.transform,no=io.tileSize,oo=fr.paint.get("background-pattern");if(u.isPatternMissing(oo))return;const so=!oo&&1===_r.a&&1===wr&&u.opaquePassEnabledForLayer()?"opaque":"translucent";if(u.renderPass!==so)return;const ao=Oi.disabled,co=u.depthModeForSublayer(0,"opaque"===so?Fi.ReadWrite:Fi.ReadOnly),go=u.colorModeForRenderPass(),ho=u.useProgram(oo?"backgroundPattern":"background"),Co=Ar||io.coveringTiles({tileSize:no,terrain:u.style.map.terrain});oo&&(Kr.activeTexture.set(In.TEXTURE0),u.imageManager.bind(u.context));const Io=fr.getCrossfadeParameters();for(const Xe of Co){const io=Ar?Xe.posMatrix:u.transform.calculatePosMatrix(Xe.toUnwrapped()),so=oo?Ve(io,wr,u,oo,{tileID:Xe,tileSize:no},Io):qe(io,wr,_r),Co=u.style.map.terrain&&u.style.map.terrain.getTerrainData(Xe);ho.draw(Kr,In.TRIANGLES,co,ao,go,Ni.disabled,so,Co,fr.id,u.tileExtentBuffer,u.quadTriangleIndexBuffer,u.tileExtentSegments)}}(u,0,Ar,_r);break;case"custom":!function(u,Xe,fr){const Ar=u.context,_r=fr.implementation;if("offscreen"===u.renderPass){const Xe=_r.prerender;Xe&&(u.setCustomLayerDefaults(),Ar.setColorMode(u.colorModeForRenderPass()),Xe.call(_r,Ar.gl,u.transform.customLayerMatrix()),Ar.setDirty(),u.setBaseState())}else if("translucent"===u.renderPass){u.setCustomLayerDefaults(),Ar.setColorMode(u.colorModeForRenderPass()),Ar.setStencilMode(Oi.disabled);const Xe="3d"===_r.renderingMode?new Fi(u.context.gl.LEQUAL,Fi.ReadWrite,u.depthRangeFor3D):u.depthModeForSublayer(0,Fi.ReadOnly);Ar.setDepthMode(Xe),_r.render(Ar.gl,u.transform.customLayerMatrix(),{farZ:u.transform.farZ,nearZ:u.transform.nearZ,fov:u.transform._fov,modelViewProjectionMatrix:u.transform.modelViewProjectionMatrix,projectionMatrix:u.transform.projectionMatrix}),Ar.setDirty(),u.setBaseState(),Ar.bindFramebuffer.set(null)}}(u,0,Ar)}}translatePosMatrix(u,fr,Ar,_r,wr){if(!Ar[0]&&!Ar[1])return u;const Kr=wr?"map"===_r?this.transform.angle:0:"viewport"===_r?-this.transform.angle:0;if(Kr){const u=Math.sin(Kr),Xe=Math.cos(Kr);Ar=[Ar[0]*Xe-Ar[1]*u,Ar[0]*u+Ar[1]*Xe]}const In=[wr?Ar[0]:Ft(fr,Ar[0],this.transform.zoom),wr?Ar[1]:Ft(fr,Ar[1],this.transform.zoom),0],io=new Float32Array(16);return Xe.J(io,u,In),io}saveTileTexture(u){const Xe=this._tileTextures[u.size[0]];Xe?Xe.push(u):this._tileTextures[u.size[0]]=[u]}getTileTexture(u){const Xe=this._tileTextures[u];return Xe&&Xe.length>0?Xe.pop():null}isPatternMissing(u){if(!u)return!1;if(!u.from||!u.to)return!0;const Xe=this.imageManager.getPattern(u.from.toString()),fr=this.imageManager.getPattern(u.to.toString());return!Xe||!fr}useProgram(u,Xe){this.cache=this.cache||{};const fr=u+(Xe?Xe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[fr]||(this.cache[fr]=new ve(this.context,vl[u],Xe,xl[u],this._showOverdrawInspector,this.style.map.terrain)),this.cache[fr]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const u=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(u.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new b(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:u,drawingBufferHeight:Xe}=this.context.gl;return this.width!==u||this.height!==Xe}}class _a{constructor(u,Xe){this.points=u,this.planes=Xe}static fromInvProjectionMatrix(u,fr,Ar){const _r=Math.pow(2,Ar),wr=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((Ar=>{const wr=1/(Ar=Xe.af([],Ar,u))[3]/fr*_r;return Xe.b0(Ar,Ar,[wr,wr,1/Ar[3],wr])})),Kr=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((u=>{const Xe=function(u,Xe){var fr=Xe[0],Ar=Xe[1],_r=Xe[2],wr=fr*fr+Ar*Ar+_r*_r;return wr>0&&(wr=1/Math.sqrt(wr)),u[0]=Xe[0]*wr,u[1]=Xe[1]*wr,u[2]=Xe[2]*wr,u}([],function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=fr[0],In=fr[1],io=fr[2];return u[0]=_r*io-wr*In,u[1]=wr*Kr-Ar*io,u[2]=Ar*In-_r*Kr,u}([],g([],wr[u[0]],wr[u[1]]),g([],wr[u[2]],wr[u[1]]))),fr=-((Ar=Xe)[0]*(_r=wr[u[1]])[0]+Ar[1]*_r[1]+Ar[2]*_r[2]);var Ar,_r;return Xe.concat(fr)}));return new _a(wr,Kr)}}class pa{constructor(u,Xe){this.min=u,this.max=Xe,this.center=function(u,Xe){return u[0]=.5*Xe[0],u[1]=.5*Xe[1],u[2]=.5*Xe[2],u}([],function(u,Xe,fr){return u[0]=Xe[0]+fr[0],u[1]=Xe[1]+fr[1],u[2]=Xe[2]+fr[2],u}([],this.min,this.max))}quadrant(u){const Xe=[u%2==0,u<2],fr=m(this.min),Ar=m(this.max);for(let u=0;u<Xe.length;u++)fr[u]=Xe[u]?this.min[u]:this.center[u],Ar[u]=Xe[u]?this.center[u]:this.max[u];return Ar[2]=this.max[2],new pa(fr,Ar)}distanceX(u){return Math.max(Math.min(this.max[0],u[0]),this.min[0])-u[0]}distanceY(u){return Math.max(Math.min(this.max[1],u[1]),this.min[1])-u[1]}intersects(u){const fr=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let Ar=!0;for(let _r=0;_r<u.planes.length;_r++){const wr=u.planes[_r];let Kr=0;for(let u=0;u<fr.length;u++)Xe.b1(wr,fr[u])>=0&&Kr++;if(0===Kr)return 0;Kr!==fr.length&&(Ar=!1)}if(Ar)return 2;for(let Xe=0;Xe<3;Xe++){let fr=Number.MAX_VALUE,Ar=-Number.MAX_VALUE;for(let _r=0;_r<u.points.length;_r++){const wr=u.points[_r][Xe]-this.min[Xe];fr=Math.min(fr,wr),Ar=Math.max(Ar,wr)}if(Ar<0||fr>this.max[Xe]-this.min[Xe])return 0}return 1}}class ma{constructor(u=0,Xe=0,fr=0,Ar=0){if(isNaN(u)||u<0||isNaN(Xe)||Xe<0||isNaN(fr)||fr<0||isNaN(Ar)||Ar<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=u,this.bottom=Xe,this.left=fr,this.right=Ar}interpolate(u,fr,Ar){return null!=fr.top&&null!=u.top&&(this.top=Xe.y.number(u.top,fr.top,Ar)),null!=fr.bottom&&null!=u.bottom&&(this.bottom=Xe.y.number(u.bottom,fr.bottom,Ar)),null!=fr.left&&null!=u.left&&(this.left=Xe.y.number(u.left,fr.left,Ar)),null!=fr.right&&null!=u.right&&(this.right=Xe.y.number(u.right,fr.right,Ar)),this}getCenter(u,fr){const Ar=Xe.ac((this.left+u-this.right)/2,0,u),_r=Xe.ac((this.top+fr-this.bottom)/2,0,fr);return new Xe.P(Ar,_r)}equals(u){return this.top===u.top&&this.bottom===u.bottom&&this.left===u.left&&this.right===u.right}clone(){return new ma(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Dl=85.051129;class ga{constructor(u,fr,Ar,_r,wr){this.tileSize=512,this._renderWorldCopies=void 0===wr||!!wr,this._minZoom=u||0,this._maxZoom=fr||22,this._minPitch=null==Ar?0:Ar,this._maxPitch=null==_r?60:_r,this.setMaxBounds(),this.width=0,this.height=0,this._center=new Xe.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ma,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const u=new ga(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return u.apply(this),u}apply(u){this.tileSize=u.tileSize,this.latRange=u.latRange,this.width=u.width,this.height=u.height,this._center=u._center,this._elevation=u._elevation,this.minElevationForCurrentTile=u.minElevationForCurrentTile,this.zoom=u.zoom,this.angle=u.angle,this._fov=u._fov,this._pitch=u._pitch,this._unmodified=u._unmodified,this._edgeInsets=u._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(u){this._minZoom!==u&&(this._minZoom=u,this.zoom=Math.max(this.zoom,u))}get maxZoom(){return this._maxZoom}set maxZoom(u){this._maxZoom!==u&&(this._maxZoom=u,this.zoom=Math.min(this.zoom,u))}get minPitch(){return this._minPitch}set minPitch(u){this._minPitch!==u&&(this._minPitch=u,this.pitch=Math.max(this.pitch,u))}get maxPitch(){return this._maxPitch}set maxPitch(u){this._maxPitch!==u&&(this._maxPitch=u,this.pitch=Math.min(this.pitch,u))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(u){void 0===u?u=!0:null===u&&(u=!1),this._renderWorldCopies=u}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new Xe.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(u){const fr=-Xe.b2(u,-180,180)*Math.PI/180;this.angle!==fr&&(this._unmodified=!1,this.angle=fr,this._calcMatrices(),this.rotationMatrix=function(){var u=new Xe.A(4);return Xe.A!=Float32Array&&(u[1]=0,u[2]=0),u[0]=1,u[3]=1,u}(),function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1],wr=Xe[2],Kr=Xe[3],In=Math.sin(fr),io=Math.cos(fr);u[0]=Ar*io+wr*In,u[1]=_r*io+Kr*In,u[2]=Ar*-In+wr*io,u[3]=_r*-In+Kr*io}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(u){const fr=Xe.ac(u,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==fr&&(this._unmodified=!1,this._pitch=fr,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(u){u=Math.max(.01,Math.min(60,u)),this._fov!==u&&(this._unmodified=!1,this._fov=u/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(u){const Xe=Math.min(Math.max(u,this.minZoom),this.maxZoom);this._zoom!==Xe&&(this._unmodified=!1,this._zoom=Xe,this.tileZoom=Math.max(0,Math.floor(Xe)),this.scale=this.zoomScale(Xe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(u){u.lat===this._center.lat&&u.lng===this._center.lng||(this._unmodified=!1,this._center=u,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(u){u!==this._elevation&&(this._elevation=u,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(u){this._edgeInsets.equals(u)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,u,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(u){return this._edgeInsets.equals(u)}interpolatePadding(u,Xe,fr){this._unmodified=!1,this._edgeInsets.interpolate(u,Xe,fr),this._constrain(),this._calcMatrices()}coveringZoomLevel(u){const Xe=(u.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/u.tileSize));return Math.max(0,Xe)}getVisibleUnwrappedCoordinates(u){const fr=[new Xe.b3(0,u)];if(this._renderWorldCopies){const Ar=this.pointCoordinate(new Xe.P(0,0)),_r=this.pointCoordinate(new Xe.P(this.width,0)),wr=this.pointCoordinate(new Xe.P(this.width,this.height)),Kr=this.pointCoordinate(new Xe.P(0,this.height)),In=Math.floor(Math.min(Ar.x,_r.x,wr.x,Kr.x)),io=Math.floor(Math.max(Ar.x,_r.x,wr.x,Kr.x)),no=1;for(let Ar=In-no;Ar<=io+no;Ar++)0!==Ar&&fr.push(new Xe.b3(Ar,u))}return fr}coveringTiles(u){var fr,Ar;let _r=this.coveringZoomLevel(u);const wr=_r;if(void 0!==u.minzoom&&_r<u.minzoom)return[];void 0!==u.maxzoom&&_r>u.maxzoom&&(_r=u.maxzoom);const Kr=this.pointCoordinate(this.getCameraPoint()),In=Xe.Z.fromLngLat(this.center),io=Math.pow(2,_r),no=[io*Kr.x,io*Kr.y,0],oo=[io*In.x,io*In.y,0],so=_a.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,_r);let ao=u.minzoom||0;!u.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(ao=_r);const co=u.terrain?2/Math.min(this.tileSize,u.tileSize)*this.tileSize:3,p=u=>({aabb:new pa([u*io,0,0],[(u+1)*io,io,0]),zoom:0,x:0,y:0,wrap:u,fullyVisible:!1}),go=[],ho=[],Co=_r,Io=u.reparseOverscaled?wr:_r;if(this._renderWorldCopies)for(let u=1;u<=3;u++)go.push(p(-u)),go.push(p(u));for(go.push(p(0));go.length>0;){const _r=go.pop(),wr=_r.x,Kr=_r.y;let In=_r.fullyVisible;if(!In){const u=_r.aabb.intersects(so);if(0===u)continue;In=2===u}const io=u.terrain?no:oo,xo=_r.aabb.distanceX(io),Mo=_r.aabb.distanceY(io),Po=Math.max(Math.abs(xo),Math.abs(Mo));if(_r.zoom===Co||Po>co+(1<<Co-_r.zoom)-2&&_r.zoom>=ao){const u=Co-_r.zoom,fr=no[0]-.5-(wr<<u),Ar=no[1]-.5-(Kr<<u);ho.push({tileID:new Xe.S(_r.zoom===Co?Io:_r.zoom,_r.wrap,_r.zoom,wr,Kr),distanceSq:v([oo[0]-.5-wr,oo[1]-.5-Kr]),tileDistanceToCamera:Math.sqrt(fr*fr+Ar*Ar)})}else for(let io=0;io<4;io++){const no=(wr<<1)+io%2,oo=(Kr<<1)+(io>>1),so=_r.zoom+1;let ao=_r.aabb.quadrant(io);if(u.terrain){const wr=new Xe.S(so,_r.wrap,so,no,oo),Kr=u.terrain.getMinMaxElevation(wr),In=null!==(fr=Kr.minElevation)&&void 0!==fr?fr:this.elevation,io=null!==(Ar=Kr.maxElevation)&&void 0!==Ar?Ar:this.elevation;ao=new pa([ao.min[0],ao.min[1],In],[ao.max[0],ao.max[1],io])}go.push({aabb:ao,zoom:so,x:no,y:oo,wrap:_r.wrap,fullyVisible:In})}}return ho.sort(((u,Xe)=>u.distanceSq-Xe.distanceSq)).map((u=>u.tileID))}resize(u,Xe){this.width=u,this.height=Xe,this.pixelsToGLUnits=[2/u,-2/Xe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(u){return Math.pow(2,u)}scaleZoom(u){return Math.log(u)/Math.LN2}project(u){const fr=Xe.ac(u.lat,-85.051129,Dl);return new Xe.P(Xe.O(u.lng)*this.worldSize,Xe.Q(fr)*this.worldSize)}unproject(u){return new Xe.Z(u.x/this.worldSize,u.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(u){const fr=this.elevation,Ar=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,_r=this.pointLocation(this.centerPoint,u),wr=u.getElevationForLngLatZoom(_r,this.tileZoom);if(!(this.elevation-wr))return;const Kr=Ar+fr-wr,In=Math.cos(this._pitch)*this.cameraToCenterDistance/Kr/Xe.b4(1,_r.lat),io=this.scaleZoom(In/this.tileSize);this._elevation=wr,this._center=_r,this.zoom=io}setLocationAtPoint(u,fr){const Ar=this.pointCoordinate(fr),_r=this.pointCoordinate(this.centerPoint),wr=this.locationCoordinate(u),Kr=new Xe.Z(wr.x-(Ar.x-_r.x),wr.y-(Ar.y-_r.y));this.center=this.coordinateLocation(Kr),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(u,Xe){return Xe?this.coordinatePoint(this.locationCoordinate(u),Xe.getElevationForLngLatZoom(u,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(u))}pointLocation(u,Xe){return this.coordinateLocation(this.pointCoordinate(u,Xe))}locationCoordinate(u){return Xe.Z.fromLngLat(u)}coordinateLocation(u){return u&&u.toLngLat()}pointCoordinate(u,fr){if(fr){const Xe=fr.pointCoordinate(u);if(null!=Xe)return Xe}const Ar=[u.x,u.y,0,1],_r=[u.x,u.y,1,1];Xe.af(Ar,Ar,this.pixelMatrixInverse),Xe.af(_r,_r,this.pixelMatrixInverse);const wr=Ar[3],Kr=_r[3],In=Ar[1]/wr,io=_r[1]/Kr,no=Ar[2]/wr,oo=_r[2]/Kr,so=no===oo?0:(0-no)/(oo-no);return new Xe.Z(Xe.y.number(Ar[0]/wr,_r[0]/Kr,so)/this.worldSize,Xe.y.number(In,io,so)/this.worldSize)}coordinatePoint(u,fr=0,Ar=this.pixelMatrix){const _r=[u.x*this.worldSize,u.y*this.worldSize,fr,1];return Xe.af(_r,_r,Ar),new Xe.P(_r[0]/_r[3],_r[1]/_r[3])}getBounds(){const u=Math.max(0,this.height/2-this.getHorizon());return(new H).extend(this.pointLocation(new Xe.P(0,u))).extend(this.pointLocation(new Xe.P(this.width,u))).extend(this.pointLocation(new Xe.P(this.width,this.height))).extend(this.pointLocation(new Xe.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new H([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(u){u?(this.lngRange=[u.getWest(),u.getEast()],this.latRange=[u.getSouth(),u.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Dl])}calculateTileMatrix(u){const fr=u.canonical,Ar=this.worldSize/this.zoomScale(fr.z),_r=fr.x+Math.pow(2,fr.z)*u.wrap,wr=Xe.an(new Float64Array(16));return Xe.J(wr,wr,[_r*Ar,fr.y*Ar,0]),Xe.K(wr,wr,[Ar/Xe.X,Ar/Xe.X,1]),wr}calculatePosMatrix(u,fr=!1){const Ar=u.key,_r=fr?this._alignedPosMatrixCache:this._posMatrixCache;if(_r[Ar])return _r[Ar];const wr=this.calculateTileMatrix(u);return Xe.L(wr,fr?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,wr),_r[Ar]=new Float32Array(wr),_r[Ar]}calculateFogMatrix(u){const fr=u.key,Ar=this._fogMatrixCache;if(Ar[fr])return Ar[fr];const _r=this.calculateTileMatrix(u);return Xe.L(_r,this.fogMatrix,_r),Ar[fr]=new Float32Array(_r),Ar[fr]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(u,fr){fr=Xe.ac(+fr,this.minZoom,this.maxZoom);const Ar={center:new Xe.N(u.lng,u.lat),zoom:fr};let _r=this.lngRange;if(!this._renderWorldCopies&&null===_r){const u=180-1e-10;_r=[-u,u]}const wr=this.tileSize*this.zoomScale(Ar.zoom);let Kr=0,In=wr,io=0,no=wr,oo=0,so=0;const{x:ao,y:co}=this.size;if(this.latRange){const u=this.latRange;Kr=Xe.Q(u[1])*wr,In=Xe.Q(u[0])*wr,In-Kr<co&&(oo=co/(In-Kr))}_r&&(io=Xe.b2(Xe.O(_r[0])*wr,0,wr),no=Xe.b2(Xe.O(_r[1])*wr,0,wr),no<io&&(no+=wr),no-io<ao&&(so=ao/(no-io)));const{x:go,y:ho}=this.project.call({worldSize:wr},u);let Co,Io;const xo=Math.max(so||0,oo||0);if(xo){const u=new Xe.P(so?(no+io)/2:go,oo?(In+Kr)/2:ho);return Ar.center=this.unproject.call({worldSize:wr},u).wrap(),Ar.zoom+=this.scaleZoom(xo),Ar}if(this.latRange){const u=co/2;ho-u<Kr&&(Io=Kr+u),ho+u>In&&(Io=In-u)}if(_r){const u=(io+no)/2;let fr=go;this._renderWorldCopies&&(fr=Xe.b2(go,u-wr/2,u+wr/2));const Ar=ao/2;fr-Ar<io&&(Co=io+Ar),fr+Ar>no&&(Co=no-Ar)}if(void 0!==Co||void 0!==Io){const u=new Xe.P(null!=Co?Co:go,null!=Io?Io:ho);Ar.center=this.unproject.call({worldSize:wr},u).wrap()}return Ar}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const u=this._unmodified,{center:Xe,zoom:fr}=this.getConstrained(this.center,this.zoom);this.center=Xe,this.zoom=fr,this._unmodified=u,this._constraining=!1}_calcMatrices(){if(!this.height)return;const u=this.centerOffset,fr=this.point.x,Ar=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=Xe.b4(1,this.center.lat)*this.worldSize;let _r=Xe.an(new Float64Array(16));Xe.K(_r,_r,[this.width/2,-this.height/2,1]),Xe.J(_r,_r,[1,-1,0]),this.labelPlaneMatrix=_r,_r=Xe.an(new Float64Array(16)),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[-1,-1,0]),Xe.K(_r,_r,[2/this.width,2/this.height,1]),this.glCoordMatrix=_r;const wr=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Kr=Math.min(this.elevation,this.minElevationForCurrentTile),In=wr-Kr*this._pixelPerMeter/Math.cos(this._pitch),io=Kr<0?In:wr,no=Math.PI/2+this._pitch,oo=this._fov*(.5+u.y/this.height),so=Math.sin(oo)*io/Math.sin(Xe.ac(Math.PI-no-oo,.01,Math.PI-.01)),ao=this.getHorizon(),co=2*Math.atan(ao/this.cameraToCenterDistance)*(.5+u.y/(2*ao)),go=Math.sin(co)*io/Math.sin(Xe.ac(Math.PI-no-co,.01,Math.PI-.01)),ho=Math.min(so,go);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ho+io),this.nearZ=this.height/50,_r=new Float64Array(16),Xe.b5(_r,this._fov,this.width/this.height,this.nearZ,this.farZ),_r[8]=2*-u.x/this.width,_r[9]=2*u.y/this.height,this.projectionMatrix=Xe.ae(_r),Xe.K(_r,_r,[1,-1,1]),Xe.J(_r,_r,[0,0,-this.cameraToCenterDistance]),Xe.b6(_r,_r,this._pitch),Xe.ad(_r,_r,this.angle),Xe.J(_r,_r,[-fr,-Ar,0]),this.mercatorMatrix=Xe.K([],_r,[this.worldSize,this.worldSize,this.worldSize]),Xe.K(_r,_r,[1,1,this._pixelPerMeter]),this.pixelMatrix=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r),Xe.J(_r,_r,[0,0,-this.elevation]),this.modelViewProjectionMatrix=_r,this.invModelViewProjectionMatrix=Xe.as([],_r),this.fogMatrix=new Float64Array(16),Xe.b5(this.fogMatrix,this._fov,this.width/this.height,wr,this.farZ),this.fogMatrix[8]=2*-u.x/this.width,this.fogMatrix[9]=2*u.y/this.height,Xe.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),Xe.b6(this.fogMatrix,this.fogMatrix,this._pitch),Xe.ad(this.fogMatrix,this.fogMatrix,this.angle),Xe.J(this.fogMatrix,this.fogMatrix,[-fr,-Ar,0]),Xe.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),Xe.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=Xe.L(new Float64Array(16),this.labelPlaneMatrix,_r);const Co=this.width%2/2,Io=this.height%2/2,xo=Math.cos(this.angle),Mo=Math.sin(this.angle),Po=fr-Math.round(fr)+xo*Co+Mo*Io,ss=Ar-Math.round(Ar)+xo*Io+Mo*Co,sa=new Float64Array(_r);if(Xe.J(sa,sa,[Po>.5?Po-1:Po,ss>.5?ss-1:ss,0]),this.alignedModelViewProjectionMatrix=sa,_r=Xe.as(new Float64Array(16),this.pixelMatrix),!_r)throw new Error("failed to invert matrix");this.pixelMatrixInverse=_r,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const u=this.pointCoordinate(new Xe.P(0,0)),fr=[u.x*this.worldSize,u.y*this.worldSize,0,1];return Xe.af(fr,fr,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const u=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new Xe.P(0,u))}getCameraQueryGeometry(u){const fr=this.getCameraPoint();if(1===u.length)return[u[0],fr];{let Ar=fr.x,_r=fr.y,wr=fr.x,Kr=fr.y;for(const Xe of u)Ar=Math.min(Ar,Xe.x),_r=Math.min(_r,Xe.y),wr=Math.max(wr,Xe.x),Kr=Math.max(Kr,Xe.y);return[new Xe.P(Ar,_r),new Xe.P(wr,_r),new Xe.P(wr,Kr),new Xe.P(Ar,Kr),new Xe.P(Ar,_r)]}}lngLatToCameraDepth(u,fr){const Ar=this.locationCoordinate(u),_r=[Ar.x*this.worldSize,Ar.y*this.worldSize,fr,1];return Xe.af(_r,_r,this.modelViewProjectionMatrix),_r[2]/_r[3]}}function va(u,Xe){let fr,Ar=!1,_r=null,wr=null;const r=()=>{_r=null,Ar&&(u.apply(wr,fr),_r=setTimeout(r,Xe),Ar=!1)};return(...u)=>(Ar=!0,wr=this,fr=u,_r||r(),_r)}class xa{constructor(u){this._getCurrentHash=()=>{const u=window.location.hash.replace("#","");if(this._hashName){let Xe;return u.split("&").map((u=>u.split("="))).forEach((u=>{u[0]===this._hashName&&(Xe=u)})),(Xe&&Xe[1]||"").split("/")}return u.split("/")},this._onHashChange=()=>{const u=this._getCurrentHash();if(u.length>=3&&!u.some((u=>isNaN(u)))){const Xe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(u[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+u[2],+u[1]],zoom:+u[0],bearing:Xe,pitch:+(u[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const u=window.location.href.replace(/(#.+)?$/,this.getHashString());window.history.replaceState(window.history.state,null,u)},this._removeHash=()=>{const u=this._getCurrentHash();if(0===u.length)return;const Xe=u.join("/");let fr=Xe;fr.split("&").length>0&&(fr=fr.split("&")[0]),this._hashName&&(fr=`${this._hashName}=${Xe}`);let Ar=window.location.hash.replace(fr,"");Ar.startsWith("#&")?Ar=Ar.slice(0,1)+Ar.slice(2):"#"===Ar&&(Ar="");let _r=window.location.href.replace(/(#.+)?$/,Ar);_r=_r.replace("&&","&"),window.history.replaceState(window.history.state,null,_r)},this._updateHash=va(this._updateHashUnthrottled,300),this._hashName=u&&encodeURIComponent(u)}addTo(u){return this._map=u,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(u){const Xe=this._map.getCenter(),fr=Math.round(100*this._map.getZoom())/100,Ar=Math.ceil((fr*Math.LN2+Math.log(512/360/.5))/Math.LN10),_r=Math.pow(10,Ar),wr=Math.round(Xe.lng*_r)/_r,Kr=Math.round(Xe.lat*_r)/_r,In=this._map.getBearing(),io=this._map.getPitch();let no="";if(no+=u?`/${wr}/${Kr}/${fr}`:`${fr}/${Kr}/${wr}`,(In||io)&&(no+="/"+Math.round(10*In)/10),io&&(no+=`/${Math.round(io)}`),this._hashName){const u=this._hashName;let Xe=!1;const fr=window.location.hash.slice(1).split("&").map((fr=>{const Ar=fr.split("=")[0];return Ar===u?(Xe=!0,`${Ar}=${no}`):fr})).filter((u=>u));return Xe||fr.push(`${u}=${no}`),`#${fr.join("&")}`}return`#${no}`}}const Yl={linearity:.3,easing:Xe.b7(0,0,.3,1)},Nl=Xe.e({deceleration:2500,maxSpeed:1400},Yl),Ol=Xe.e({deceleration:20,maxSpeed:1400},Yl),jl=Xe.e({deceleration:1e3,maxSpeed:360},Yl),Ql=Xe.e({deceleration:1e3,maxSpeed:90},Yl);class Ea{constructor(u){this._map=u,this.clear()}clear(){this._inertiaBuffer=[]}record(u){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:wr.now(),settings:u})}_drainInertiaBuffer(){const u=this._inertiaBuffer,Xe=wr.now();for(;u.length>0&&Xe-u[0].time>160;)u.shift()}_onMoveEnd(u){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const fr={zoom:0,bearing:0,pitch:0,pan:new Xe.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:u}of this._inertiaBuffer)fr.zoom+=u.zoomDelta||0,fr.bearing+=u.bearingDelta||0,fr.pitch+=u.pitchDelta||0,u.panDelta&&fr.pan._add(u.panDelta),u.around&&(fr.around=u.around),u.pinchAround&&(fr.pinchAround=u.pinchAround);const Ar=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,_r={};if(fr.pan.mag()){const wr=Ca(fr.pan.mag(),Ar,Xe.e({},Nl,u||{}));_r.offset=fr.pan.mult(wr.amount/fr.pan.mag()),_r.center=this._map.transform.center,Pa(_r,wr)}if(fr.zoom){const u=Ca(fr.zoom,Ar,Ol);_r.zoom=this._map.transform.zoom+u.amount,Pa(_r,u)}if(fr.bearing){const u=Ca(fr.bearing,Ar,jl);_r.bearing=this._map.transform.bearing+Xe.ac(u.amount,-179,179),Pa(_r,u)}if(fr.pitch){const u=Ca(fr.pitch,Ar,Ql);_r.pitch=this._map.transform.pitch+u.amount,Pa(_r,u)}if(_r.zoom||_r.bearing){const u=void 0===fr.pinchAround?fr.around:fr.pinchAround;_r.around=u?this._map.unproject(u):this._map.getCenter()}return this.clear(),Xe.e(_r,{noMoveStart:!0})}}function Pa(u,Xe){(!u.duration||u.duration<Xe.duration)&&(u.duration=Xe.duration,u.easing=Xe.easing)}function Ca(u,fr,Ar){const{maxSpeed:_r,linearity:wr,deceleration:Kr}=Ar,In=Xe.ac(u*wr/(fr/1e3),-_r,_r),io=Math.abs(In)/(Kr*wr);return{easing:Ar.easing,duration:1e3*io,amount:In*(io/2)}}class Sa extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,fr,Ar,_r={}){const wr=r.mousePos(fr.getCanvas(),Ar),Kr=fr.unproject(wr);super(u,Xe.e({point:wr,lngLat:Kr,originalEvent:Ar},_r)),this._defaultPrevented=!1,this.target=fr}}class za extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,fr,Ar){const _r="touchend"===u?Ar.changedTouches:Ar.touches,wr=r.touchPos(fr.getCanvasContainer(),_r),Kr=wr.map((u=>fr.unproject(u))),In=wr.reduce(((u,Xe,fr,Ar)=>u.add(Xe.div(Ar.length))),new Xe.P(0,0));super(u,{points:wr,point:In,lngLats:Kr,lngLat:fr.unproject(In),originalEvent:Ar}),this._defaultPrevented=!1}}class Da extends Xe.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(u,Xe,fr){super(u,{originalEvent:fr}),this._defaultPrevented=!1}}class Ma{constructor(u,Xe){this._map=u,this._clickTolerance=Xe.clickTolerance}reset(){delete this._mousedownPos}wheel(u){return this._firePreventable(new Da(u.type,this._map,u))}mousedown(u,Xe){return this._mousedownPos=Xe,this._firePreventable(new Sa(u.type,this._map,u))}mouseup(u){this._map.fire(new Sa(u.type,this._map,u))}click(u,Xe){this._mousedownPos&&this._mousedownPos.dist(Xe)>=this._clickTolerance||this._map.fire(new Sa(u.type,this._map,u))}dblclick(u){return this._firePreventable(new Sa(u.type,this._map,u))}mouseover(u){this._map.fire(new Sa(u.type,this._map,u))}mouseout(u){this._map.fire(new Sa(u.type,this._map,u))}touchstart(u){return this._firePreventable(new za(u.type,this._map,u))}touchmove(u){this._map.fire(new za(u.type,this._map,u))}touchend(u){this._map.fire(new za(u.type,this._map,u))}touchcancel(u){this._map.fire(new za(u.type,this._map,u))}_firePreventable(u){if(this._map.fire(u),u.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Aa{constructor(u){this._map=u}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(u){this._map.fire(new Sa(u.type,this._map,u))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Sa("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(u){this._delayContextMenu?this._contextMenuEvent=u:this._ignoreContextMenu||this._map.fire(new Sa(u.type,this._map,u)),this._map.listens("contextmenu")&&u.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ra{constructor(u){this._map=u}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this._map.terrain)}}class ka{constructor(u,Xe){this._map=u,this._tr=new Ra(u),this._el=u.getCanvasContainer(),this._container=u.getContainer(),this._clickTolerance=Xe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(u,Xe){this.isEnabled()&&u.shiftKey&&0===u.button&&(r.disableDrag(),this._startPos=this._lastPos=Xe,this._active=!0)}mousemoveWindow(u,Xe){if(!this._active)return;const fr=Xe;if(this._lastPos.equals(fr)||!this._box&&fr.dist(this._startPos)<this._clickTolerance)return;const Ar=this._startPos;this._lastPos=fr,this._box||(this._box=r.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",u));const _r=Math.min(Ar.x,fr.x),wr=Math.max(Ar.x,fr.x),Kr=Math.min(Ar.y,fr.y),In=Math.max(Ar.y,fr.y);r.setTransform(this._box,`translate(${_r}px,${Kr}px)`),this._box.style.width=wr-_r+"px",this._box.style.height=In-Kr+"px"}mouseupWindow(u,fr){if(!this._active)return;if(0!==u.button)return;const Ar=this._startPos,_r=fr;if(this.reset(),r.suppressClick(),Ar.x!==_r.x||Ar.y!==_r.y)return this._map.fire(new Xe.k("boxzoomend",{originalEvent:u})),{cameraAnimation:u=>u.fitScreenCoordinates(Ar,_r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",u)}keydown(u){this._active&&27===u.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",u))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(u,fr){return this._map.fire(new Xe.k(u,{originalEvent:fr}))}}function La(u,Xe){if(u.length!==Xe.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${Xe.length}`);const fr={};for(let Ar=0;Ar<u.length;Ar++)fr[u[Ar].identifier]=Xe[Ar];return fr}class Fa{constructor(u){this.reset(),this.numTouches=u.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(u,fr,Ar){(this.centroid||Ar.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=u.timeStamp),Ar.length===this.numTouches&&(this.centroid=function(u){const fr=new Xe.P(0,0);for(const Xe of u)fr._add(Xe);return fr.div(u.length)}(fr),this.touches=La(Ar,fr)))}touchmove(u,Xe,fr){if(this.aborted||!this.centroid)return;const Ar=La(fr,Xe);for(const u in this.touches){const Xe=Ar[u];(!Xe||Xe.dist(this.touches[u])>30)&&(this.aborted=!0)}}touchend(u,Xe,fr){if((!this.centroid||u.timeStamp-this.startTime>500)&&(this.aborted=!0),0===fr.length){const u=!this.aborted&&this.centroid;if(this.reset(),u)return u}}}class Ba{constructor(u){this.singleTap=new Fa(u),this.numTaps=u.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(u,Xe,fr){this.singleTap.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){this.singleTap.touchmove(u,Xe,fr)}touchend(u,Xe,fr){const Ar=this.singleTap.touchend(u,Xe,fr);if(Ar){const Xe=u.timeStamp-this.lastTime<500,fr=!this.lastTap||this.lastTap.dist(Ar)<30;if(Xe&&fr||this.reset(),this.count++,this.lastTime=u.timeStamp,this.lastTap=Ar,this.count===this.numTaps)return this.reset(),Ar}}}class Oa{constructor(u){this._tr=new Ra(u),this._zoomIn=new Ba({numTouches:1,numTaps:2}),this._zoomOut=new Ba({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(u,Xe,fr){this._zoomIn.touchstart(u,Xe,fr),this._zoomOut.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){this._zoomIn.touchmove(u,Xe,fr),this._zoomOut.touchmove(u,Xe,fr)}touchend(u,Xe,fr){const Ar=this._zoomIn.touchend(u,Xe,fr),_r=this._zoomOut.touchend(u,Xe,fr),wr=this._tr;return Ar?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom+1,around:wr.unproject(Ar)},{originalEvent:u})}):_r?(this._active=!0,u.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:Xe=>Xe.easeTo({duration:300,zoom:wr.zoom-1,around:wr.unproject(_r)},{originalEvent:u})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Na{constructor(u){this._enabled=!!u.enable,this._moveStateManager=u.moveStateManager,this._clickTolerance=u.clickTolerance||1,this._moveFunction=u.move,this._activateOnStart=!!u.activateOnStart,u.assignEvents(this),this.reset()}reset(u){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(u)}_move(...u){const Xe=this._moveFunction(...u);if(Xe.bearingDelta||Xe.pitchDelta||Xe.around||Xe.panDelta)return this._active=!0,Xe}dragStart(u,Xe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(u)&&(this._moveStateManager.startMove(u),this._lastPoint=Xe.length?Xe[0]:Xe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(u,Xe){if(!this.isEnabled())return;const fr=this._lastPoint;if(!fr)return;if(u.preventDefault(),!this._moveStateManager.isValidMoveEvent(u))return void this.reset(u);const Ar=Xe.length?Xe[0]:Xe;return!this._moved&&Ar.dist(fr)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Ar,this._move(fr,Ar))}dragEnd(u){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(u)&&(this._moved&&r.suppressClick(),this.reset(u))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ql={0:1,2:2};class Ua{constructor(u){this._correctEvent=u.checkCorrectEvent}startMove(u){const Xe=r.mouseButton(u);this._eventButton=Xe}endMove(u){delete this._eventButton}isValidStartEvent(u){return this._correctEvent(u)}isValidMoveEvent(u){return!function(u,Xe){const fr=ql[Xe];return void 0===u.buttons||(u.buttons&fr)!==fr}(u,this._eventButton)}isValidEndEvent(u){return r.mouseButton(u)===this._eventButton}}class Za{constructor(){this._firstTouch=void 0}_isOneFingerTouch(u){return 1===u.targetTouches.length}_isSameTouchEvent(u){return u.targetTouches[0].identifier===this._firstTouch}startMove(u){this._firstTouch=u.targetTouches[0].identifier}endMove(u){delete this._firstTouch}isValidStartEvent(u){return this._isOneFingerTouch(u)}isValidMoveEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}isValidEndEvent(u){return this._isOneFingerTouch(u)&&this._isSameTouchEvent(u)}}const qa=u=>{u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=u=>{u.preventDefault()}},Va=({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:fr=.8})=>{const Ar=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Na({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*fr}),moveStateManager:Ar,enable:u,assignEvents:qa})},Ga=({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:fr=-.5})=>{const Ar=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&u.ctrlKey||2===r.mouseButton(u)});return new Na({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*fr}),moveStateManager:Ar,enable:u,assignEvents:qa})};class Ha{constructor(u,Xe){this._clickTolerance=u.clickTolerance||1,this._map=Xe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new Xe.P(0,0)}_shouldBePrevented(u){return u<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(u,Xe,fr){return this._calculateTransform(u,Xe,fr)}touchmove(u,Xe,fr){if(this._active){if(!this._shouldBePrevented(fr.length))return u.preventDefault(),this._calculateTransform(u,Xe,fr);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",u)}}touchend(u,Xe,fr){this._calculateTransform(u,Xe,fr),this._active&&this._shouldBePrevented(fr.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(u,fr,Ar){Ar.length>0&&(this._active=!0);const _r=La(Ar,fr),wr=new Xe.P(0,0),Kr=new Xe.P(0,0);let In=0;for(const u in _r){const Xe=_r[u],fr=this._touches[u];fr&&(wr._add(Xe),Kr._add(Xe.sub(fr)),In++,_r[u]=Xe)}if(this._touches=_r,this._shouldBePrevented(In)||!Kr.mag())return;const io=Kr.div(In);return this._sum._add(io),this._sum.mag()<this._clickTolerance?void 0:{around:wr.div(In),panDelta:io}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Wa{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(u,Xe,fr){this._firstTwoTouches||fr.length<2||(this._firstTwoTouches=[fr[0].identifier,fr[1].identifier],this._start([Xe[0],Xe[1]]))}touchmove(u,Xe,fr){if(!this._firstTwoTouches)return;u.preventDefault();const[Ar,_r]=this._firstTwoTouches,wr=$a(fr,Xe,Ar),Kr=$a(fr,Xe,_r);if(!wr||!Kr)return;const In=this._aroundCenter?null:wr.add(Kr).div(2);return this._move([wr,Kr],In,u)}touchend(u,Xe,fr){if(!this._firstTwoTouches)return;const[Ar,_r]=this._firstTwoTouches,wr=$a(fr,Xe,Ar),Kr=$a(fr,Xe,_r);wr&&Kr||(this._active&&r.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(u){this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function $a(u,Xe,fr){for(let Ar=0;Ar<u.length;Ar++)if(u[Ar].identifier===fr)return Xe[Ar]}function Xa(u,Xe){return Math.log(u/Xe)/Math.LN2}class Ka extends Wa{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(u){this._startDistance=this._distance=u[0].dist(u[1])}_move(u,Xe){const fr=this._distance;if(this._distance=u[0].dist(u[1]),this._active||!(Math.abs(Xa(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Xa(this._distance,fr),pinchAround:Xe}}}function Ja(u,Xe){return 180*u.angleWith(Xe)/Math.PI}class Ya extends Wa{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(u){this._startVector=this._vector=u[0].sub(u[1]),this._minDiameter=u[0].dist(u[1])}_move(u,Xe,fr){const Ar=this._vector;if(this._vector=u[0].sub(u[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ja(this._vector,Ar),pinchAround:Xe}}_isBelowThreshold(u){this._minDiameter=Math.min(this._minDiameter,u.mag());const Xe=25/(Math.PI*this._minDiameter)*360,fr=Ja(u,this._startVector);return Math.abs(fr)<Xe}}function Qa(u){return Math.abs(u.y)>Math.abs(u.x)}class ts extends Wa{constructor(u){super(),this._currentTouchCount=0,this._map=u}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(u,Xe,fr){super.touchstart(u,Xe,fr),this._currentTouchCount=fr.length}_start(u){this._lastPoints=u,Qa(u[0].sub(u[1]))&&(this._valid=!1)}_move(u,Xe,fr){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Ar=u[0].sub(this._lastPoints[0]),_r=u[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Ar,_r,fr.timeStamp),this._valid?(this._lastPoints=u,this._active=!0,{pitchDelta:(Ar.y+_r.y)/2*-.5}):void 0}gestureBeginsVertically(u,Xe,fr){if(void 0!==this._valid)return this._valid;const Ar=u.mag()>=2,_r=Xe.mag()>=2;if(!Ar&&!_r)return;if(!Ar||!_r)return void 0===this._firstMove&&(this._firstMove=fr),fr-this._firstMove<100&&void 0;const wr=u.y>0==Xe.y>0;return Qa(u)&&Qa(Xe)&&wr}}const $l={panStep:100,bearingStep:15,pitchStep:10};class is{constructor(u){this._tr=new Ra(u);const Xe=$l;this._panStep=Xe.panStep,this._bearingStep=Xe.bearingStep,this._pitchStep=Xe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(u){if(u.altKey||u.ctrlKey||u.metaKey)return;let Xe=0,fr=0,Ar=0,_r=0,wr=0;switch(u.keyCode){case 61:case 107:case 171:case 187:Xe=1;break;case 189:case 109:case 173:Xe=-1;break;case 37:u.shiftKey?fr=-1:(u.preventDefault(),_r=-1);break;case 39:u.shiftKey?fr=1:(u.preventDefault(),_r=1);break;case 38:u.shiftKey?Ar=1:(u.preventDefault(),wr=-1);break;case 40:u.shiftKey?Ar=-1:(u.preventDefault(),wr=1);break;default:return}return this._rotationDisabled&&(fr=0,Ar=0),{cameraAnimation:Kr=>{const In=this._tr;Kr.easeTo({duration:300,easeId:"keyboardHandler",easing:as,zoom:Xe?Math.round(In.zoom)+Xe*(u.shiftKey?2:1):In.zoom,bearing:In.bearing+fr*this._bearingStep,pitch:In.pitch+Ar*this._pitchStep,offset:[-_r*this._panStep,-wr*this._panStep],center:In.center},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function as(u){return u*(2-u)}const ec=4.000244140625;class os{constructor(u,Xe){this._onTimeout=u=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(u)},this._map=u,this._tr=new Ra(u),this._triggerRenderFrame=Xe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(u){this._defaultZoomRate=u}setWheelZoomRate(u){this._wheelZoomRate=u}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(u){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!u&&"center"===u.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(u){return!!this._map.cooperativeGestures.isEnabled()&&!(u.ctrlKey||this._map.cooperativeGestures.isBypassed(u))}wheel(u){if(!this.isEnabled())return;if(this._shouldBePrevented(u))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",u);let Xe=u.deltaMode===WheelEvent.DOM_DELTA_LINE?40*u.deltaY:u.deltaY;const fr=wr.now(),Ar=fr-(this._lastWheelEventTime||0);this._lastWheelEventTime=fr,0!==Xe&&Xe%ec==0?this._type="wheel":0!==Xe&&Math.abs(Xe)<4?this._type="trackpad":Ar>400?(this._type=null,this._lastValue=Xe,this._timeout=setTimeout(this._onTimeout,40,u)):this._type||(this._type=Math.abs(Ar*Xe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Xe+=this._lastValue)),u.shiftKey&&Xe&&(Xe/=4),this._type&&(this._lastWheelEvent=u,this._delta-=Xe,this._active||this._start(u)),u.preventDefault()}_start(u){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const fr=r.mousePos(this._map.getCanvas(),u),Ar=this._tr;this._around=fr.y>Ar.transform.height/2-Ar.transform.getHorizon()?Xe.N.convert(this._aroundCenter?Ar.center:Ar.unproject(fr)):Xe.N.convert(Ar.center),this._aroundPoint=Ar.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId)return;if(this._frameId=null,!this.isActive())return;const u=this._tr.transform;if(0!==this._delta){const Xe="wheel"===this._type&&Math.abs(this._delta)>ec?this._wheelZoomRate:this._defaultZoomRate;let fr=2/(1+Math.exp(-Math.abs(this._delta*Xe)));this._delta<0&&0!==fr&&(fr=1/fr);const Ar="number"==typeof this._targetZoom?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(Ar*fr))),"wheel"===this._type&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const fr="number"==typeof this._targetZoom?this._targetZoom:u.zoom,Ar=this._startZoom,_r=this._easing;let Kr,In=!1;const io=wr.now()-this._lastWheelEventTime;if("wheel"===this._type&&Ar&&_r&&io){const u=Math.min(io/200,1),wr=_r(u);Kr=Xe.y.number(Ar,fr,wr),u<1?this._frameId||(this._frameId=!0):In=!0}else Kr=fr,In=!0;return this._active=!0,In&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!In,zoomDelta:Kr-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(u){let fr=Xe.b8;if(this._prevEase){const u=this._prevEase,Ar=(wr.now()-u.start)/u.duration,_r=u.easing(Ar+.01)-u.easing(Ar),Kr=.27/Math.sqrt(_r*_r+1e-4)*.01,In=Math.sqrt(.0729-Kr*Kr);fr=Xe.b7(Kr,In,.25,1)}return this._prevEase={start:wr.now(),duration:u,easing:fr},fr}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class rs{constructor(u,Xe){this._clickZoom=u,this._tapZoom=Xe}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ns{constructor(u){this._tr=new Ra(u),this.reset()}reset(){this._active=!1}dblclick(u,Xe){return u.preventDefault(),{cameraAnimation:fr=>{fr.easeTo({duration:300,zoom:this._tr.zoom+(u.shiftKey?-1:1),around:this._tr.unproject(Xe)},{originalEvent:u})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ls{constructor(){this._tap=new Ba({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(u,Xe,fr){if(!this._swipePoint)if(this._tapTime){const Ar=Xe[0],_r=u.timeStamp-this._tapTime<500,wr=this._tapPoint.dist(Ar)<30;_r&&wr?fr.length>0&&(this._swipePoint=Ar,this._swipeTouch=fr[0].identifier):this.reset()}else this._tap.touchstart(u,Xe,fr)}touchmove(u,Xe,fr){if(this._tapTime){if(this._swipePoint){if(fr[0].identifier!==this._swipeTouch)return;const Ar=Xe[0],_r=Ar.y-this._swipePoint.y;return this._swipePoint=Ar,u.preventDefault(),this._active=!0,{zoomDelta:_r/128}}}else this._tap.touchmove(u,Xe,fr)}touchend(u,Xe,fr){if(this._tapTime)this._swipePoint&&0===fr.length&&this.reset();else{const Ar=this._tap.touchend(u,Xe,fr);Ar&&(this._tapTime=u.timeStamp,this._tapPoint=Ar)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class hs{constructor(u,Xe,fr){this._el=u,this._mousePan=Xe,this._touchPan=fr}enable(u){this._inertiaOptions=u||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class cs{constructor(u,Xe,fr){this._pitchWithRotate=u.pitchWithRotate,this._mouseRotate=Xe,this._mousePitch=fr}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class us{constructor(u,Xe,fr,Ar){this._el=u,this._touchZoom=Xe,this._touchRotate=fr,this._tapDragZoom=Ar,this._rotationDisabled=!1,this._enabled=!0}enable(u){this._touchZoom.enable(u),this._rotationDisabled||this._touchRotate.enable(u),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class ds{constructor(u,Xe){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=u,this._options=Xe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const u=this._map.getCanvasContainer();u.classList.add("maplibregl-cooperative-gestures"),this._container=r.create("div","maplibregl-cooperative-gesture-screen",u);let Xe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(Xe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const fr=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Ar=document.createElement("div");Ar.className="maplibregl-desktop-message",Ar.textContent=Xe,this._container.appendChild(Ar);const _r=document.createElement("div");_r.className="maplibregl-mobile-message",_r.textContent=fr,this._container.appendChild(_r),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(r.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(u){return u[this._bypassKey]}notifyGestureBlocked(u,fr){this._enabled&&(this._map.fire(new Xe.k("cooperativegestureprevented",{gestureType:u,originalEvent:fr})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}const _s=u=>u.zoom||u.drag||u.pitch||u.rotate;class ps extends Xe.k{}function ms(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class fs{constructor(u,Xe){this.handleWindowEvent=u=>{this.handleEvent(u,`${u.type}Window`)},this.handleEvent=(u,Xe)=>{if("blur"===u.type)return void this.stop(!0);this._updatingCamera=!0;const fr="renderFrame"===u.type?void 0:u,Ar={needsRenderFrame:!1},_r={},wr={},Kr=u.touches,In=Kr?this._getMapTouches(Kr):void 0,io=In?r.touchPos(this._map.getCanvas(),In):r.mousePos(this._map.getCanvas(),u);for(const{handlerName:Kr,handler:no,allowed:oo}of this._handlers){if(!no.isEnabled())continue;let so;this._blockedByActive(wr,oo,Kr)?no.reset():no[Xe||u.type]&&(so=no[Xe||u.type](u,io,In),this.mergeHandlerResult(Ar,_r,so,Kr,fr),so&&so.needsRenderFrame&&this._triggerRenderFrame()),(so||no.isActive())&&(wr[Kr]=no)}const no={};for(const u in this._previousActiveHandlers)wr[u]||(no[u]=fr);this._previousActiveHandlers=wr,(Object.keys(no).length||ms(Ar))&&(this._changes.push([Ar,_r,no]),this._triggerRenderFrame()),(Object.keys(wr).length||ms(Ar))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:oo}=Ar;oo&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],oo(this._map))},this._map=u,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ea(u),this._bearingSnap=Xe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Xe);const fr=this._el;this._listeners=[[fr,"touchstart",{passive:!0}],[fr,"touchmove",{passive:!1}],[fr,"touchend",void 0],[fr,"touchcancel",void 0],[fr,"mousedown",void 0],[fr,"mousemove",void 0],[fr,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[fr,"mouseover",void 0],[fr,"mouseout",void 0],[fr,"dblclick",void 0],[fr,"click",void 0],[fr,"keydown",{capture:!1}],[fr,"keyup",void 0],[fr,"wheel",{passive:!1}],[fr,"contextmenu",void 0],[window,"blur",void 0]];for(const[u,Xe,fr]of this._listeners)r.addEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,fr)}destroy(){for(const[u,Xe,fr]of this._listeners)r.removeEventListener(u,Xe,u===document?this.handleWindowEvent:this.handleEvent,fr)}_addDefaultHandlers(u){const Xe=this._map,fr=Xe.getCanvasContainer();this._add("mapEvent",new Ma(Xe,u));const Ar=Xe.boxZoom=new ka(Xe,u);this._add("boxZoom",Ar),u.interactive&&u.boxZoom&&Ar.enable();const _r=Xe.cooperativeGestures=new ds(Xe,u.cooperativeGestures);this._add("cooperativeGestures",_r),u.cooperativeGestures&&_r.enable();const wr=new Oa(Xe),Kr=new ns(Xe);Xe.doubleClickZoom=new rs(Kr,wr),this._add("tapZoom",wr),this._add("clickZoom",Kr),u.interactive&&u.doubleClickZoom&&Xe.doubleClickZoom.enable();const In=new ls;this._add("tapDragZoom",In);const io=Xe.touchPitch=new ts(Xe);this._add("touchPitch",io),u.interactive&&u.touchPitch&&Xe.touchPitch.enable(u.touchPitch);const no=Va(u),oo=Ga(u);Xe.dragRotate=new cs(u,no,oo),this._add("mouseRotate",no,["mousePitch"]),this._add("mousePitch",oo,["mouseRotate"]),u.interactive&&u.dragRotate&&Xe.dragRotate.enable();const so=(({enable:u,clickTolerance:Xe})=>{const fr=new Ua({checkCorrectEvent:u=>0===r.mouseButton(u)&&!u.ctrlKey});return new Na({clickTolerance:Xe,move:(u,Xe)=>({around:Xe,panDelta:Xe.sub(u)}),activateOnStart:!0,moveStateManager:fr,enable:u,assignEvents:qa})})(u),ao=new Ha(u,Xe);Xe.dragPan=new hs(fr,so,ao),this._add("mousePan",so),this._add("touchPan",ao,["touchZoom","touchRotate"]),u.interactive&&u.dragPan&&Xe.dragPan.enable(u.dragPan);const co=new Ya,go=new Ka;Xe.touchZoomRotate=new us(fr,go,co,In),this._add("touchRotate",co,["touchPan","touchZoom"]),this._add("touchZoom",go,["touchPan","touchRotate"]),u.interactive&&u.touchZoomRotate&&Xe.touchZoomRotate.enable(u.touchZoomRotate);const ho=Xe.scrollZoom=new os(Xe,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ho,["mousePan"]),u.interactive&&u.scrollZoom&&Xe.scrollZoom.enable(u.scrollZoom);const Co=Xe.keyboard=new is(Xe);this._add("keyboard",Co),u.interactive&&u.keyboard&&Xe.keyboard.enable(),this._add("blockableMapEvent",new Aa(Xe))}_add(u,Xe,fr){this._handlers.push({handlerName:u,handler:Xe,allowed:fr}),this._handlersById[u]=Xe}stop(u){if(!this._updatingCamera){for(const{handler:u}of this._handlers)u.reset();this._inertia.clear(),this._fireEvents({},{},u),this._changes=[]}}isActive(){for(const{handler:u}of this._handlers)if(u.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return Boolean(_s(this._eventsInProgress))||this.isZooming()}_blockedByActive(u,Xe,fr){for(const Ar in u)if(Ar!==fr&&(!Xe||Xe.indexOf(Ar)<0))return!0;return!1}_getMapTouches(u){const Xe=[];for(const fr of u)this._el.contains(fr.target)&&Xe.push(fr);return Xe}mergeHandlerResult(u,fr,Ar,_r,wr){if(!Ar)return;Xe.e(u,Ar);const Kr={handlerName:_r,originalEvent:Ar.originalEvent||wr};void 0!==Ar.zoomDelta&&(fr.zoom=Kr),void 0!==Ar.panDelta&&(fr.drag=Kr),void 0!==Ar.pitchDelta&&(fr.pitch=Kr),void 0!==Ar.bearingDelta&&(fr.rotate=Kr)}_applyChanges(){const u={},fr={},Ar={};for(const[_r,wr,Kr]of this._changes)_r.panDelta&&(u.panDelta=(u.panDelta||new Xe.P(0,0))._add(_r.panDelta)),_r.zoomDelta&&(u.zoomDelta=(u.zoomDelta||0)+_r.zoomDelta),_r.bearingDelta&&(u.bearingDelta=(u.bearingDelta||0)+_r.bearingDelta),_r.pitchDelta&&(u.pitchDelta=(u.pitchDelta||0)+_r.pitchDelta),void 0!==_r.around&&(u.around=_r.around),void 0!==_r.pinchAround&&(u.pinchAround=_r.pinchAround),_r.noInertia&&(u.noInertia=_r.noInertia),Xe.e(fr,wr),Xe.e(Ar,Kr);this._updateMapTransform(u,fr,Ar),this._changes=[]}_updateMapTransform(u,Xe,fr){const Ar=this._map,_r=Ar._getTransformForUpdate(),wr=Ar.terrain;if(!(ms(u)||wr&&this._terrainMovement))return this._fireEvents(Xe,fr,!0);let{panDelta:Kr,zoomDelta:In,bearingDelta:io,pitchDelta:no,around:oo,pinchAround:so}=u;void 0!==so&&(oo=so),Ar._stop(!0),oo=oo||Ar.transform.centerPoint;const ao=_r.pointLocation(Kr?oo.sub(Kr):oo);io&&(_r.bearing+=io),no&&(_r.pitch+=no),In&&(_r.zoom+=In),wr?this._terrainMovement||!Xe.drag&&!Xe.zoom?Xe.drag&&this._terrainMovement?_r.center=_r.pointLocation(_r.centerPoint.sub(Kr)):_r.setLocationAtPoint(ao,oo):(this._terrainMovement=!0,this._map._elevationFreeze=!0,_r.setLocationAtPoint(ao,oo)):_r.setLocationAtPoint(ao,oo),Ar._applyUpdatedTransform(_r),this._map._update(),u.noInertia||this._inertia.record(u),this._fireEvents(Xe,fr,!0)}_fireEvents(u,fr,Ar){const _r=_s(this._eventsInProgress),Kr=_s(u),In={};for(const Xe in u){const{originalEvent:fr}=u[Xe];this._eventsInProgress[Xe]||(In[`${Xe}start`]=fr),this._eventsInProgress[Xe]=u[Xe]}!_r&&Kr&&this._fireEvent("movestart",Kr.originalEvent);for(const u in In)this._fireEvent(u,In[u]);Kr&&this._fireEvent("move",Kr.originalEvent);for(const Xe in u){const{originalEvent:fr}=u[Xe];this._fireEvent(Xe,fr)}const io={};let no;for(const u in this._eventsInProgress){const{handlerName:Xe,originalEvent:Ar}=this._eventsInProgress[u];this._handlersById[Xe].isActive()||(delete this._eventsInProgress[u],no=fr[Xe]||Ar,io[`${u}end`]=no)}for(const u in io)this._fireEvent(u,io[u]);const oo=_s(this._eventsInProgress),so=(_r||Kr)&&!oo;if(so&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const u=this._map._getTransformForUpdate();u.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(u)}if(Ar&&so){this._updatingCamera=!0;const u=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),i=u=>0!==u&&-this._bearingSnap<u&&u<this._bearingSnap;!u||!u.essential&&wr.prefersReducedMotion?(this._map.fire(new Xe.k("moveend",{originalEvent:no})),i(this._map.getBearing())&&this._map.resetNorth()):(i(u.bearing||this._map.getBearing())&&(u.bearing=0),u.freezeElevation=!0,this._map.easeTo(u,{originalEvent:no})),this._updatingCamera=!1}}_fireEvent(u,fr){this._map.fire(new Xe.k(u,fr?{originalEvent:fr}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add((u=>{delete this._frameId,this.handleEvent(new ps("renderFrame",{timeStamp:u})),this._applyChanges()}))}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class gs extends Xe.E{constructor(u,Xe){super(),this._renderFrameCallback=()=>{const u=Math.min((wr.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(u)),u<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=u,this._bearingSnap=Xe.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new Xe.N(this.transform.center.lng,this.transform.center.lat)}setCenter(u,Xe){return this.jumpTo({center:u},Xe)}panBy(u,fr,Ar){return u=Xe.P.convert(u).mult(-1),this.panTo(this.transform.center,Xe.e({offset:u},fr),Ar)}panTo(u,fr,Ar){return this.easeTo(Xe.e({center:u},fr),Ar)}getZoom(){return this.transform.zoom}setZoom(u,Xe){return this.jumpTo({zoom:u},Xe),this}zoomTo(u,fr,Ar){return this.easeTo(Xe.e({zoom:u},fr),Ar)}zoomIn(u,Xe){return this.zoomTo(this.getZoom()+1,u,Xe),this}zoomOut(u,Xe){return this.zoomTo(this.getZoom()-1,u,Xe),this}getBearing(){return this.transform.bearing}setBearing(u,Xe){return this.jumpTo({bearing:u},Xe),this}getPadding(){return this.transform.padding}setPadding(u,Xe){return this.jumpTo({padding:u},Xe),this}rotateTo(u,fr,Ar){return this.easeTo(Xe.e({bearing:u},fr),Ar)}resetNorth(u,fr){return this.rotateTo(0,Xe.e({duration:1e3},u),fr),this}resetNorthPitch(u,fr){return this.easeTo(Xe.e({bearing:0,pitch:0,duration:1e3},u),fr),this}snapToNorth(u,Xe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(u,Xe):this}getPitch(){return this.transform.pitch}setPitch(u,Xe){return this.jumpTo({pitch:u},Xe),this}cameraForBounds(u,Xe){u=H.convert(u);const fr=Xe&&Xe.bearing||0;return this._cameraForBoxAndBearing(u.getNorthWest(),u.getSouthEast(),fr,Xe)}_cameraForBoxAndBearing(u,fr,Ar,_r){const wr={top:0,bottom:0,right:0,left:0};if("number"==typeof(_r=Xe.e({padding:wr,offset:[0,0],maxZoom:this.transform.maxZoom},_r)).padding){const u=_r.padding;_r.padding={top:u,bottom:u,right:u,left:u}}_r.padding=Xe.e(wr,_r.padding);const Kr=this.transform,In=Kr.padding,io=new H(u,fr),no=Kr.project(io.getNorthWest()),oo=Kr.project(io.getNorthEast()),so=Kr.project(io.getSouthEast()),ao=Kr.project(io.getSouthWest()),co=Xe.b9(-Ar),go=no.rotate(co),ho=oo.rotate(co),Co=so.rotate(co),Io=ao.rotate(co),xo=new Xe.P(Math.max(go.x,ho.x,Io.x,Co.x),Math.max(go.y,ho.y,Io.y,Co.y)),Mo=new Xe.P(Math.min(go.x,ho.x,Io.x,Co.x),Math.min(go.y,ho.y,Io.y,Co.y)),Po=xo.sub(Mo),ss=(Kr.width-(In.left+In.right+_r.padding.left+_r.padding.right))/Po.x,sa=(Kr.height-(In.top+In.bottom+_r.padding.top+_r.padding.bottom))/Po.y;if(sa<0||ss<0)return void Xe.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const aa=Math.min(Kr.scaleZoom(Kr.scale*Math.min(ss,sa)),_r.maxZoom),fa=Xe.P.convert(_r.offset),ya=new Xe.P((_r.padding.left-_r.padding.right)/2,(_r.padding.top-_r.padding.bottom)/2).rotate(Xe.b9(Ar)),ol=fa.add(ya).mult(Kr.scale/Kr.zoomScale(aa));return{center:Kr.unproject(no.add(so).div(2).sub(ol)),zoom:aa,bearing:Ar}}fitBounds(u,Xe,fr){return this._fitInternal(this.cameraForBounds(u,Xe),Xe,fr)}fitScreenCoordinates(u,fr,Ar,_r,wr){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(Xe.P.convert(u)),this.transform.pointLocation(Xe.P.convert(fr)),Ar,_r),_r,wr)}_fitInternal(u,fr,Ar){return u?(delete(fr=Xe.e(u,fr)).padding,fr.linear?this.easeTo(fr,Ar):this.flyTo(fr,Ar)):this}jumpTo(u,fr){this.stop();const Ar=this._getTransformForUpdate();let _r=!1,wr=!1,Kr=!1;return"zoom"in u&&Ar.zoom!==+u.zoom&&(_r=!0,Ar.zoom=+u.zoom),void 0!==u.center&&(Ar.center=Xe.N.convert(u.center)),"bearing"in u&&Ar.bearing!==+u.bearing&&(wr=!0,Ar.bearing=+u.bearing),"pitch"in u&&Ar.pitch!==+u.pitch&&(Kr=!0,Ar.pitch=+u.pitch),null==u.padding||Ar.isPaddingEqual(u.padding)||(Ar.padding=u.padding),this._applyUpdatedTransform(Ar),this.fire(new Xe.k("movestart",fr)).fire(new Xe.k("move",fr)),_r&&this.fire(new Xe.k("zoomstart",fr)).fire(new Xe.k("zoom",fr)).fire(new Xe.k("zoomend",fr)),wr&&this.fire(new Xe.k("rotatestart",fr)).fire(new Xe.k("rotate",fr)).fire(new Xe.k("rotateend",fr)),Kr&&this.fire(new Xe.k("pitchstart",fr)).fire(new Xe.k("pitch",fr)).fire(new Xe.k("pitchend",fr)),this.fire(new Xe.k("moveend",fr))}calculateCameraOptionsFromTo(u,fr,Ar,_r=0){const wr=Xe.Z.fromLngLat(u,fr),Kr=Xe.Z.fromLngLat(Ar,_r),In=Kr.x-wr.x,io=Kr.y-wr.y,no=Kr.z-wr.z,oo=Math.hypot(In,io,no);if(0===oo)throw new Error("Can't calculate camera options with same From and To");const so=Math.hypot(In,io),ao=this.transform.scaleZoom(this.transform.cameraToCenterDistance/oo/this.transform.tileSize),co=180*Math.atan2(In,-io)/Math.PI;let go=180*Math.acos(so/oo)/Math.PI;return go=no<0?90-go:90+go,{center:Kr.toLngLat(),zoom:ao,pitch:go,bearing:co}}easeTo(u,fr){var Ar;this._stop(!1,u.easeId),(!1===(u=Xe.e({offset:[0,0],duration:500,easing:Xe.b8},u)).animate||!u.essential&&wr.prefersReducedMotion)&&(u.duration=0);const _r=this._getTransformForUpdate(),Kr=_r.zoom,In=_r.bearing,io=_r.pitch,no=_r.padding,oo="bearing"in u?this._normalizeBearing(u.bearing,In):In,so="pitch"in u?+u.pitch:io,ao="padding"in u?u.padding:_r.padding,co=Xe.P.convert(u.offset);let go=_r.centerPoint.add(co);const ho=_r.pointLocation(go),{center:Co,zoom:Io}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(Ar=u.zoom)&&void 0!==Ar?Ar:Kr);this._normalizeCenter(Co,_r);const xo=_r.project(ho),Mo=_r.project(Co).sub(xo),Po=_r.zoomScale(Io-Kr);let ss,sa;u.around&&(ss=Xe.N.convert(u.around),sa=_r.locationPoint(ss));const aa={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||Io!==Kr,this._rotating=this._rotating||In!==oo,this._pitching=this._pitching||so!==io,this._padding=!_r.isPaddingEqual(ao),this._easeId=u.easeId,this._prepareEase(fr,u.noMoveStart,aa),this.terrain&&this._prepareElevation(Co),this._ease((Ar=>{if(this._zooming&&(_r.zoom=Xe.y.number(Kr,Io,Ar)),this._rotating&&(_r.bearing=Xe.y.number(In,oo,Ar)),this._pitching&&(_r.pitch=Xe.y.number(io,so,Ar)),this._padding&&(_r.interpolatePadding(no,ao,Ar),go=_r.centerPoint.add(co)),this.terrain&&!u.freezeElevation&&this._updateElevation(Ar),ss)_r.setLocationAtPoint(ss,sa);else{const u=_r.zoomScale(_r.zoom-Kr),Xe=Io>Kr?Math.min(2,Po):Math.max(.5,Po),fr=Math.pow(Xe,1-Ar),wr=_r.unproject(xo.add(Mo.mult(Ar*fr)).mult(u));_r.setLocationAtPoint(_r.renderWorldCopies?wr.wrap():wr,go)}this._applyUpdatedTransform(_r),this._fireMoveEvents(fr)}),(Xe=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(fr,Xe)}),u),this}_prepareEase(u,fr,Ar={}){this._moving=!0,fr||Ar.moving||this.fire(new Xe.k("movestart",u)),this._zooming&&!Ar.zooming&&this.fire(new Xe.k("zoomstart",u)),this._rotating&&!Ar.rotating&&this.fire(new Xe.k("rotatestart",u)),this._pitching&&!Ar.pitching&&this.fire(new Xe.k("pitchstart",u))}_prepareElevation(u){this._elevationCenter=u,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(u,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(u){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const fr=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(u<1&&fr!==this._elevationTarget){const Xe=this._elevationTarget-this._elevationStart;this._elevationStart+=u*(Xe-(fr-(Xe*u+this._elevationStart))/(1-u)),this._elevationTarget=fr}this.transform.elevation=Xe.y.number(this._elevationStart,this._elevationTarget,u)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(u){const Xe=u.getCameraPosition(),fr=this.terrain.getElevationForLngLatZoom(Xe.lngLat,u.zoom);if(Xe.altitude<fr){const Ar=this.calculateCameraOptionsFromTo(Xe.lngLat,fr,u.center,u.elevation);return{pitch:Ar.pitch,zoom:Ar.zoom}}return{}}_applyUpdatedTransform(u){const Xe=[];if(this.terrain&&Xe.push((u=>this._elevateCameraIfInsideTerrain(u))),this.transformCameraUpdate&&Xe.push((u=>this.transformCameraUpdate(u))),!Xe.length)return;const fr=u.clone();for(const u of Xe){const Xe=fr.clone(),{center:Ar,zoom:_r,pitch:wr,bearing:Kr,elevation:In}=u(Xe);Ar&&(Xe.center=Ar),void 0!==_r&&(Xe.zoom=_r),void 0!==wr&&(Xe.pitch=wr),void 0!==Kr&&(Xe.bearing=Kr),void 0!==In&&(Xe.elevation=In),fr.apply(Xe)}this.transform.apply(fr)}_fireMoveEvents(u){this.fire(new Xe.k("move",u)),this._zooming&&this.fire(new Xe.k("zoom",u)),this._rotating&&this.fire(new Xe.k("rotate",u)),this._pitching&&this.fire(new Xe.k("pitch",u))}_afterEase(u,fr){if(this._easeId&&fr&&this._easeId===fr)return;delete this._easeId;const Ar=this._zooming,_r=this._rotating,wr=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Ar&&this.fire(new Xe.k("zoomend",u)),_r&&this.fire(new Xe.k("rotateend",u)),wr&&this.fire(new Xe.k("pitchend",u)),this.fire(new Xe.k("moveend",u))}flyTo(u,fr){var Ar;if(!u.essential&&wr.prefersReducedMotion){const Ar=Xe.M(u,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ar,fr)}this.stop(),u=Xe.e({offset:[0,0],speed:1.2,curve:1.42,easing:Xe.b8},u);const _r=this._getTransformForUpdate(),Kr=_r.zoom,In=_r.bearing,io=_r.pitch,no=_r.padding,oo="bearing"in u?this._normalizeBearing(u.bearing,In):In,so="pitch"in u?+u.pitch:io,ao="padding"in u?u.padding:_r.padding,co=Xe.P.convert(u.offset);let go=_r.centerPoint.add(co);const ho=_r.pointLocation(go),{center:Co,zoom:Io}=_r.getConstrained(Xe.N.convert(u.center||ho),null!==(Ar=u.zoom)&&void 0!==Ar?Ar:Kr);this._normalizeCenter(Co,_r);const xo=_r.zoomScale(Io-Kr),Mo=_r.project(ho),Po=_r.project(Co).sub(Mo);let ss=u.curve;const sa=Math.max(_r.width,_r.height),aa=sa/xo,fa=Po.mag();if("minZoom"in u){const fr=Xe.ac(Math.min(u.minZoom,Kr,Io),_r.minZoom,_r.maxZoom),Ar=sa/_r.zoomScale(fr-Kr);ss=Math.sqrt(Ar/fa*2)}const ya=ss*ss;function P(u){const Xe=(aa*aa-sa*sa+(u?-1:1)*ya*ya*fa*fa)/(2*(u?aa:sa)*ya*fa);return Math.log(Math.sqrt(Xe*Xe+1)-Xe)}function C(u){return(Math.exp(u)-Math.exp(-u))/2}function S(u){return(Math.exp(u)+Math.exp(-u))/2}const ol=P(!1);let D=function(u){return S(ol)/S(ol+ss*u)},M=function(u){return sa*((S(ol)*(C(Xe=ol+ss*u)/S(Xe))-C(ol))/ya)/fa;var Xe},sl=(P(!0)-ol)/ss;if(Math.abs(fa)<1e-6||!isFinite(sl)){if(Math.abs(sa-aa)<1e-6)return this.easeTo(u,fr);const Xe=aa<sa?-1:1;sl=Math.abs(Math.log(aa/sa))/ss,M=()=>0,D=u=>Math.exp(Xe*ss*u)}return u.duration="duration"in u?+u.duration:1e3*sl/("screenSpeed"in u?+u.screenSpeed/ss:+u.speed),u.maxDuration&&u.duration>u.maxDuration&&(u.duration=0),this._zooming=!0,this._rotating=In!==oo,this._pitching=so!==io,this._padding=!_r.isPaddingEqual(ao),this._prepareEase(fr,!1),this.terrain&&this._prepareElevation(Co),this._ease((Ar=>{const wr=Ar*sl,ho=1/D(wr);_r.zoom=1===Ar?Io:Kr+_r.scaleZoom(ho),this._rotating&&(_r.bearing=Xe.y.number(In,oo,Ar)),this._pitching&&(_r.pitch=Xe.y.number(io,so,Ar)),this._padding&&(_r.interpolatePadding(no,ao,Ar),go=_r.centerPoint.add(co)),this.terrain&&!u.freezeElevation&&this._updateElevation(Ar);const xo=1===Ar?Co:_r.unproject(Mo.add(Po.mult(M(wr))).mult(ho));_r.setLocationAtPoint(_r.renderWorldCopies?xo.wrap():xo,go),this._applyUpdatedTransform(_r),this._fireMoveEvents(fr)}),(()=>{this.terrain&&u.freezeElevation&&this._finalizeElevation(),this._afterEase(fr)}),u),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(u,Xe){var fr;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const u=this._onEaseEnd;delete this._onEaseEnd,u.call(this,Xe)}return u||null===(fr=this.handlers)||void 0===fr||fr.stop(!1),this}_ease(u,Xe,fr){!1===fr.animate||0===fr.duration?(u(1),Xe()):(this._easeStart=wr.now(),this._easeOptions=fr,this._onEaseFrame=u,this._onEaseEnd=Xe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(u,fr){u=Xe.b2(u,-180,180);const Ar=Math.abs(u-fr);return Math.abs(u-360-fr)<Ar&&(u-=360),Math.abs(u+360-fr)<Ar&&(u+=360),u}_normalizeCenter(u,Xe){if(!Xe.renderWorldCopies||Xe.lngRange)return;const fr=u.lng-Xe.center.lng;u.lng+=fr>180?-360:fr<-180?360:0}queryTerrainElevation(u){return this.terrain?this.terrain.getElevationForLngLatZoom(Xe.N.convert(u),this.transform.tileZoom)-this.transform.elevation:null}}const rc={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class xs{constructor(u=rc){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=u=>{!u||"metadata"!==u.sourceDataType&&"visibility"!==u.sourceDataType&&"style"!==u.dataType&&"terrain"!==u.type||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=u}getDefaultPosition(){return"bottom-right"}onAdd(u){return this._map=u,this._compact=this.options.compact,this._container=r.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=r.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=r.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(u,Xe){const fr=this._map._getUIString(`AttributionControl.${Xe}`);u.title=fr,u.setAttribute("aria-label",fr)}_updateAttributions(){if(!this._map.style)return;let u=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?u=u.concat(this.options.customAttribution.map((u=>"string"!=typeof u?"":u))):"string"==typeof this.options.customAttribution&&u.push(this.options.customAttribution)),this._map.style.stylesheet){const u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}const Xe=this._map.style.sourceCaches;for(const fr in Xe){const Ar=Xe[fr];if(Ar.used||Ar.usedForTerrain){const Xe=Ar.getSource();Xe.attribution&&u.indexOf(Xe.attribution)<0&&u.push(Xe.attribution)}}u=u.filter((u=>String(u).trim())),u.sort(((u,Xe)=>u.length-Xe.length)),u=u.filter(((Xe,fr)=>{for(let Ar=fr+1;Ar<u.length;Ar++)if(u[Ar].indexOf(Xe)>=0)return!1;return!0}));const fr=u.join(" | ");fr!==this._attribHTML&&(this._attribHTML=fr,u.length?(this._innerContainer.innerHTML=fr,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ys{constructor(u={}){this._updateCompact=()=>{const u=this._container.children;if(u.length){const Xe=u[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&Xe.classList.add("maplibregl-compact"):Xe.classList.remove("maplibregl-compact")}},this.options=u}getDefaultPosition(){return"bottom-left"}onAdd(u){this._map=u,this._compact=this.options&&this.options.compact,this._container=r.create("div","maplibregl-ctrl");const Xe=r.create("a","maplibregl-ctrl-logo");return Xe.target="_blank",Xe.rel="noopener nofollow",Xe.href="https://maplibre.org/",Xe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Xe.setAttribute("rel","noopener nofollow"),this._container.appendChild(Xe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){r.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class bs{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(u){const Xe=++this._id;return this._queue.push({callback:u,id:Xe,cancelled:!1}),Xe}remove(u){const Xe=this._currentlyRunning,fr=Xe?this._queue.concat(Xe):this._queue;for(const Xe of fr)if(Xe.id===u)return void(Xe.cancelled=!0)}run(u=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const Xe=this._currentlyRunning=this._queue;this._queue=[];for(const fr of Xe)if(!fr.cancelled&&(fr.callback(u),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nc=Xe.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ts extends Xe.E{constructor(u){super(),this.sourceCache=u,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,u.usedForTerrain=!0,u.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(u,fr){this.sourceCache.update(u,fr),this._renderableTilesKeys=[];const Ar={};for(const _r of u.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:fr}))Ar[_r.key]=!0,this._renderableTilesKeys.push(_r.key),this._tiles[_r.key]||(_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),this._tiles[_r.key]=new lt(_r,this.tileSize));for(const u in this._tiles)Ar[u]||delete this._tiles[u]}freeRtt(u){for(const Xe in this._tiles){const fr=this._tiles[Xe];(!u||fr.tileID.equals(u)||fr.tileID.isChildOf(u)||u.isChildOf(fr.tileID))&&(fr.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((u=>this.getTileByID(u)))}getTileByID(u){return this._tiles[u]}getTerrainCoords(u){const fr={};for(const Ar of this._renderableTilesKeys){const _r=this._tiles[Ar].tileID;if(_r.canonical.equals(u.canonical)){const _r=u.clone();_r.posMatrix=new Float64Array(16),Xe.aP(_r.posMatrix,0,Xe.X,0,Xe.X,0,1),fr[Ar]=_r}else if(_r.canonical.isChildOf(u.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Kr=_r.canonical.z-u.canonical.z,In=_r.canonical.x-(_r.canonical.x>>Kr<<Kr),io=_r.canonical.y-(_r.canonical.y>>Kr<<Kr),no=Xe.X>>Kr;Xe.aP(wr.posMatrix,0,no,0,no,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[-In*no,-io*no,0]),fr[Ar]=wr}else if(u.canonical.isChildOf(_r.canonical)){const wr=u.clone();wr.posMatrix=new Float64Array(16);const Kr=u.canonical.z-_r.canonical.z,In=u.canonical.x-(u.canonical.x>>Kr<<Kr),io=u.canonical.y-(u.canonical.y>>Kr<<Kr),no=Xe.X>>Kr;Xe.aP(wr.posMatrix,0,Xe.X,0,Xe.X,0,1),Xe.J(wr.posMatrix,wr.posMatrix,[In*no,io*no,0]),Xe.K(wr.posMatrix,wr.posMatrix,[1/2**Kr,1/2**Kr,0]),fr[Ar]=wr}}return fr}getSourceTile(u,Xe){const fr=this.sourceCache._source;let Ar=u.overscaledZ-this.deltaZoom;if(Ar>fr.maxzoom&&(Ar=fr.maxzoom),Ar<fr.minzoom)return null;this._sourceTileCache[u.key]||(this._sourceTileCache[u.key]=u.scaledTo(Ar).key);let _r=this.sourceCache.getTileByID(this._sourceTileCache[u.key]);if((!_r||!_r.dem)&&Xe)for(;Ar>=fr.minzoom&&(!_r||!_r.dem);)_r=this.sourceCache.getTileByID(u.scaledTo(Ar--).key);return _r}tilesAfterTime(u=Date.now()){return Object.values(this._tiles).filter((Xe=>Xe.timeAdded>=u))}}class Is{constructor(u,Xe,fr){this.painter=u,this.sourceCache=new Ts(Xe),this.options=fr,this.exaggeration="number"==typeof fr.exaggeration?fr.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(u,fr,Ar,_r=Xe.X){var wr;if(!(fr>=0&&fr<_r&&Ar>=0&&Ar<_r))return 0;const Kr=this.getTerrainData(u),In=null===(wr=Kr.tile)||void 0===wr?void 0:wr.dem;if(!In)return 0;const io=function(u,Xe,fr){var Ar=Xe[0],_r=Xe[1];return u[0]=fr[0]*Ar+fr[4]*_r+fr[12],u[1]=fr[1]*Ar+fr[5]*_r+fr[13],u}([],[fr/_r*Xe.X,Ar/_r*Xe.X],Kr.u_terrain_matrix),no=[io[0]*In.dim,io[1]*In.dim],oo=Math.floor(no[0]),so=Math.floor(no[1]),ao=no[0]-oo,co=no[1]-so;return In.get(oo,so)*(1-ao)*(1-co)+In.get(oo+1,so)*ao*(1-co)+In.get(oo,so+1)*(1-ao)*co+In.get(oo+1,so+1)*ao*co}getElevationForLngLatZoom(u,fr){if(!Xe.ba(fr,u.wrap()))return 0;const{tileID:Ar,mercatorX:_r,mercatorY:wr}=this._getOverscaledTileIDFromLngLatZoom(u,fr);return this.getElevation(Ar,_r%Xe.X,wr%Xe.X,Xe.X)}getElevation(u,fr,Ar,_r=Xe.X){return this.getDEMElevation(u,fr,Ar,_r)*this.exaggeration}getTerrainData(u){if(!this._emptyDemTexture){const u=this.painter.context,fr=new Xe.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new b(u,fr,u.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new b(u,new Xe.R({width:1,height:1}),u.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=Xe.an([])}const fr=this.sourceCache.getSourceTile(u,!0);if(fr&&fr.dem&&(!fr.demTexture||fr.needsTerrainPrepare)){const u=this.painter.context;fr.demTexture=this.painter.getTileTexture(fr.dem.stride),fr.demTexture?fr.demTexture.update(fr.dem.getPixels(),{premultiply:!1}):fr.demTexture=new b(u,fr.dem.getPixels(),u.gl.RGBA,{premultiply:!1}),fr.demTexture.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),fr.needsTerrainPrepare=!1}const Ar=fr&&fr+fr.tileID.key+u.key;if(Ar&&!this._demMatrixCache[Ar]){const Ar=this.sourceCache.sourceCache._source.maxzoom;let _r=u.canonical.z-fr.tileID.canonical.z;u.overscaledZ>u.canonical.z&&(u.canonical.z>=Ar?_r=u.canonical.z-Ar:Xe.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const wr=u.canonical.x-(u.canonical.x>>_r<<_r),Kr=u.canonical.y-(u.canonical.y>>_r<<_r),In=Xe.bb(new Float64Array(16),[1/(Xe.X<<_r),1/(Xe.X<<_r),0]);Xe.J(In,In,[wr*Xe.X,Kr*Xe.X,0]),this._demMatrixCache[u.key]={matrix:In,coord:u}}return{u_depth:2,u_terrain:3,u_terrain_dim:fr&&fr.dem&&fr.dem.dim||1,u_terrain_matrix:Ar?this._demMatrixCache[u.key].matrix:this._emptyDemMatrix,u_terrain_unpack:fr&&fr.dem&&fr.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(fr&&fr.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:fr}}getFramebuffer(u){const Xe=this.painter,fr=Xe.width/devicePixelRatio,Ar=Xe.height/devicePixelRatio;return!this._fbo||this._fbo.width===fr&&this._fbo.height===Ar||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new b(Xe.context,{width:fr,height:Ar,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new b(Xe.context,{width:fr,height:Ar,data:null},Xe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(Xe.context.gl.NEAREST,Xe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=Xe.context.createFramebuffer(fr,Ar,!0,!1),this._fbo.depthAttachment.set(Xe.context.createRenderbuffer(Xe.context.gl.DEPTH_COMPONENT16,fr,Ar))),this._fbo.colorAttachment.set("coords"===u?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const u=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const fr=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let u=0,Xe=0;u<this._coordsTextureSize;u++)for(let Ar=0;Ar<this._coordsTextureSize;Ar++,Xe+=4)fr[Xe+0]=255&Ar,fr[Xe+1]=255&u,fr[Xe+2]=Ar>>8<<4|u>>8,fr[Xe+3]=0;const Ar=new Xe.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(fr.buffer)),_r=new b(u,Ar,u.gl.RGBA,{premultiply:!1});return _r.bind(u.gl.NEAREST,u.gl.CLAMP_TO_EDGE),this._coordsTexture=_r,_r}pointCoordinate(u){this.painter.maybeDrawDepthAndCoords(!0);const fr=new Uint8Array(4),Ar=this.painter.context,_r=Ar.gl,wr=Math.round(u.x*this.painter.pixelRatio/devicePixelRatio),Kr=Math.round(u.y*this.painter.pixelRatio/devicePixelRatio),In=Math.round(this.painter.height/devicePixelRatio);Ar.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),_r.readPixels(wr,In-Kr-1,1,1,_r.RGBA,_r.UNSIGNED_BYTE,fr),Ar.bindFramebuffer.set(null);const io=fr[0]+(fr[2]>>4<<8),no=fr[1]+((15&fr[2])<<8),oo=this.coordsIndex[255-fr[3]],so=oo&&this.sourceCache.getTileByID(oo);if(!so)return null;const ao=this._coordsTextureSize,co=(1<<so.tileID.canonical.z)*ao;return new Xe.Z((so.tileID.canonical.x*ao+io)/co+so.tileID.wrap,(so.tileID.canonical.y*ao+no)/co,this.getElevation(so.tileID,io,no,ao))}depthAtPoint(u){const Xe=new Uint8Array(4),fr=this.painter.context,Ar=fr.gl;return fr.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Ar.readPixels(u.x,this.painter.height/devicePixelRatio-u.y-1,1,1,Ar.RGBA,Ar.UNSIGNED_BYTE,Xe),fr.bindFramebuffer.set(null),(Xe[0]/16777216+Xe[1]/65536+Xe[2]/256+Xe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const u=this.painter.context,fr=new Xe.bc,Ar=new Xe.aX,_r=this.meshSize,wr=Xe.X/_r,Kr=_r*_r;for(let u=0;u<=_r;u++)for(let Xe=0;Xe<=_r;Xe++)fr.emplaceBack(Xe*wr,u*wr,0);for(let u=0;u<Kr;u+=_r+1)for(let Xe=0;Xe<_r;Xe++)Ar.emplaceBack(Xe+u,_r+Xe+u+1,_r+Xe+u+2),Ar.emplaceBack(Xe+u,_r+Xe+u+2,Xe+u+1);const In=fr.length,io=In+2*(_r+1);for(const u of[0,1])for(let Ar=0;Ar<=_r;Ar++)for(const _r of[0,1])fr.emplaceBack(Ar*wr,u*Xe.X,_r);for(let u=0;u<2*_r;u+=2)Ar.emplaceBack(io+u,io+u+1,io+u+3),Ar.emplaceBack(io+u,io+u+3,io+u+2),Ar.emplaceBack(In+u,In+u+3,In+u+1),Ar.emplaceBack(In+u,In+u+2,In+u+3);const no=fr.length,oo=no+2*(_r+1);for(const u of[0,1])for(let Ar=0;Ar<=_r;Ar++)for(const _r of[0,1])fr.emplaceBack(u*Xe.X,Ar*wr,_r);for(let u=0;u<2*_r;u+=2)Ar.emplaceBack(no+u,no+u+1,no+u+3),Ar.emplaceBack(no+u,no+u+3,no+u+2),Ar.emplaceBack(oo+u,oo+u+3,oo+u+1),Ar.emplaceBack(oo+u,oo+u+2,oo+u+3);return this._mesh=new ua(u.createVertexBuffer(fr,nc.members),u.createIndexBuffer(Ar),Xe.a0.simpleSegment(0,0,fr.length,Ar.length)),this._mesh}getMeshFrameDelta(u){return 2*Math.PI*Xe.bd/Math.pow(2,u)/5}getMinTileElevationForLngLatZoom(u,Xe){var fr;const{tileID:Ar}=this._getOverscaledTileIDFromLngLatZoom(u,Xe);return null!==(fr=this.getMinMaxElevation(Ar).minElevation)&&void 0!==fr?fr:0}getMinMaxElevation(u){const Xe=this.getTerrainData(u).tile,fr={minElevation:null,maxElevation:null};return Xe&&Xe.dem&&(fr.minElevation=Xe.dem.min*this.exaggeration,fr.maxElevation=Xe.dem.max*this.exaggeration),fr}_getOverscaledTileIDFromLngLatZoom(u,fr){const Ar=Xe.Z.fromLngLat(u.wrap()),_r=(1<<fr)*Xe.X,wr=Ar.x*_r,Kr=Ar.y*_r,In=Math.floor(wr/Xe.X),io=Math.floor(Kr/Xe.X);return{tileID:new Xe.S(fr,0,fr,In,io),mercatorX:wr,mercatorY:Kr}}}class Es{constructor(u,Xe,fr){this._context=u,this._size=Xe,this._tileSize=fr,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const u of this._objects)u.texture.destroy(),u.fbo.destroy()}_createObject(u){const Xe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),fr=new b(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return fr.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),Xe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),Xe.colorAttachment.set(fr.texture),{id:u,fbo:Xe,texture:fr,stamp:-1,inUse:!1}}getObjectForId(u){return this._objects[u]}useObject(u){u.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter((Xe=>u.id!==Xe)),this._recentlyUsed.push(u.id)}stampObject(u){u.stamp=++this._stamp}getOrCreateFreeObject(){for(const u of this._recentlyUsed)if(!this._objects[u].inUse)return this._objects[u];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const u=this._createObject(this._objects.length);return this._objects.push(u),u}freeObject(u){u.inUse=!1}freeAllObjects(){for(const u of this._objects)this.freeObject(u)}isFull(){return!(this._objects.length<this._size)&&!1===this._objects.some((u=>!u.inUse))}}const oc={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Cs{constructor(u,Xe){this.painter=u,this.terrain=Xe,this.pool=new Es(u.context,30,Xe.sourceCache.tileSize*Xe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(u){return this.pool.getObjectForId(u.rtt[this._stacks.length-1].id).texture}prepareForRender(u,Xe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=u._order.filter((fr=>!u._layers[fr].isHidden(Xe))),this._coordsDescendingInv={};for(const Xe in u.sourceCaches){this._coordsDescendingInv[Xe]={};const fr=u.sourceCaches[Xe].getVisibleCoordinates();for(const u of fr){const fr=this.terrain.sourceCache.getTerrainCoords(u);for(const u in fr)this._coordsDescendingInv[Xe][u]||(this._coordsDescendingInv[Xe][u]=[]),this._coordsDescendingInv[Xe][u].push(fr[u])}}this._coordsDescendingInvStr={};for(const Xe of u._order){const fr=u._layers[Xe],Ar=fr.source;if(oc[fr.type]&&!this._coordsDescendingInvStr[Ar]){this._coordsDescendingInvStr[Ar]={};for(const u in this._coordsDescendingInv[Ar])this._coordsDescendingInvStr[Ar][u]=this._coordsDescendingInv[Ar][u].map((u=>u.key)).sort().join()}}for(const u of this._renderableTiles)for(const Xe in this._coordsDescendingInvStr){const fr=this._coordsDescendingInvStr[Xe][u.tileID.key];fr&&fr!==u.rttCoords[Xe]&&(u.rtt=[])}}renderLayer(u){if(u.isHidden(this.painter.transform.zoom))return!1;const fr=u.type,Ar=this.painter,_r=this._renderableLayerIds[this._renderableLayerIds.length-1]===u.id;if(oc[fr]&&(this._prevType&&oc[this._prevType]||this._stacks.push([]),this._prevType=fr,this._stacks[this._stacks.length-1].push(u.id),!_r))return!0;if(oc[this._prevType]||oc[fr]&&_r){this._prevType=fr;const u=this._stacks.length-1,_r=this._stacks[u]||[];for(const fr of this._renderableTiles){if(this.pool.isFull()&&(ca(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(fr),fr.rtt[u]){const Xe=this.pool.getObjectForId(fr.rtt[u].id);if(Xe.stamp===fr.rtt[u].stamp){this.pool.useObject(Xe);continue}}const wr=this.pool.getOrCreateFreeObject();this.pool.useObject(wr),this.pool.stampObject(wr),fr.rtt[u]={id:wr.id,stamp:wr.stamp},Ar.context.bindFramebuffer.set(wr.fbo.framebuffer),Ar.context.clear({color:Xe.aM.transparent,stencil:0}),Ar.currentStencilSource=void 0;for(let u=0;u<_r.length;u++){const Xe=Ar.style._layers[_r[u]],Kr=Xe.source?this._coordsDescendingInv[Xe.source][fr.tileID.key]:[fr.tileID];Ar.context.viewport.set([0,0,wr.fbo.width,wr.fbo.height]),Ar._renderTileClippingMasks(Xe,Kr),Ar.renderLayer(Ar,Ar.style.sourceCaches[Xe.source],Xe,Kr),Xe.source&&(fr.rttCoords[Xe.source]=this._coordsDescendingInvStr[Xe.source][fr.tileID.key])}}return ca(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),oc[fr]}return!1}}const ac={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},dc=fr,mc={hash:!1,interactive:!0,bearingSnap:7,attributionControl:rc,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!0,scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:Xe.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Ms=u=>{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},Ic={showCompass:!0,showZoom:!0,visualizePitch:!1};class Rs{constructor(u,fr,Ar=!1){this.mousedown=u=>{this.startMouse(Xe.e({},u,{ctrlKey:!0,preventDefault:()=>u.preventDefault()}),r.mousePos(this.element,u)),r.addEventListener(window,"mousemove",this.mousemove),r.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=u=>{this.moveMouse(u,r.mousePos(this.element,u))},this.mouseup=u=>{this.mouseRotate.dragEnd(u),this.mousePitch&&this.mousePitch.dragEnd(u),this.offTemp()},this.touchstart=u=>{1!==u.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.startTouch(u,this._startPos),r.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.addEventListener(window,"touchend",this.touchend))},this.touchmove=u=>{1!==u.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,u.targetTouches)[0],this.moveTouch(u,this._lastPos))},this.touchend=u=>{0===u.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const _r=u.dragRotate._mouseRotate.getClickTolerance(),wr=u.dragRotate._mousePitch.getClickTolerance();this.element=fr,this.mouseRotate=Va({clickTolerance:_r,enable:!0}),this.touchRotate=(({enable:u,clickTolerance:Xe,bearingDegreesPerPixelMoved:fr=.8})=>{const Ar=new Za;return new Na({clickTolerance:Xe,move:(u,Xe)=>({bearingDelta:(Xe.x-u.x)*fr}),moveStateManager:Ar,enable:u,assignEvents:Ms})})({clickTolerance:_r,enable:!0}),this.map=u,Ar&&(this.mousePitch=Ga({clickTolerance:wr,enable:!0}),this.touchPitch=(({enable:u,clickTolerance:Xe,pitchDegreesPerPixelMoved:fr=-.5})=>{const Ar=new Za;return new Na({clickTolerance:Xe,move:(u,Xe)=>({pitchDelta:(Xe.y-u.y)*fr}),moveStateManager:Ar,enable:u,assignEvents:Ms})})({clickTolerance:wr,enable:!0})),r.addEventListener(fr,"mousedown",this.mousedown),r.addEventListener(fr,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(fr,"touchcancel",this.reset)}startMouse(u,Xe){this.mouseRotate.dragStart(u,Xe),this.mousePitch&&this.mousePitch.dragStart(u,Xe),r.disableDrag()}startTouch(u,Xe){this.touchRotate.dragStart(u,Xe),this.touchPitch&&this.touchPitch.dragStart(u,Xe),r.disableDrag()}moveMouse(u,Xe){const fr=this.map,{bearingDelta:Ar}=this.mouseRotate.dragMove(u,Xe)||{};if(Ar&&fr.setBearing(fr.getBearing()+Ar),this.mousePitch){const{pitchDelta:Ar}=this.mousePitch.dragMove(u,Xe)||{};Ar&&fr.setPitch(fr.getPitch()+Ar)}}moveTouch(u,Xe){const fr=this.map,{bearingDelta:Ar}=this.touchRotate.dragMove(u,Xe)||{};if(Ar&&fr.setBearing(fr.getBearing()+Ar),this.touchPitch){const{pitchDelta:Ar}=this.touchPitch.dragMove(u,Xe)||{};Ar&&fr.setPitch(fr.getPitch()+Ar)}}off(){const u=this.element;r.removeEventListener(u,"mousedown",this.mousedown),r.removeEventListener(u,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend),r.removeEventListener(u,"touchcancel",this.reset),this.offTemp()}offTemp(){r.enableDrag(),r.removeEventListener(window,"mousemove",this.mousemove),r.removeEventListener(window,"mouseup",this.mouseup),r.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),r.removeEventListener(window,"touchend",this.touchend)}}let yc;function Ls(u,fr,Ar){const _r=new Xe.N(u.lng,u.lat);if(u=new Xe.N(u.lng,u.lat),fr){const _r=new Xe.N(u.lng-360,u.lat),wr=new Xe.N(u.lng+360,u.lat),Kr=Ar.locationPoint(u).distSqr(fr);Ar.locationPoint(_r).distSqr(fr)<Kr?u=_r:Ar.locationPoint(wr).distSqr(fr)<Kr&&(u=wr)}for(;Math.abs(u.lng-Ar.center.lng)>180;){const Xe=Ar.locationPoint(u);if(Xe.x>=0&&Xe.y>=0&&Xe.x<=Ar.width&&Xe.y<=Ar.height)break;u.lng>Ar.center.lng?u.lng-=360:u.lng+=360}return u.lng!==_r.lng&&Ar.locationPoint(u).y>Ar.height/2-Ar.getHorizon()?u:_r}const Ac={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Bs(u,Xe,fr){const Ar=u.classList;for(const u in Ac)Ar.remove(`maplibregl-${fr}-anchor-${u}`);Ar.add(`maplibregl-${fr}-anchor-${Xe}`)}class Os extends Xe.E{constructor(u){if(super(),this._onKeyPress=u=>{const Xe=u.code,fr=u.charCode||u.keyCode;"Space"!==Xe&&"Enter"!==Xe&&32!==fr&&13!==fr||this.togglePopup()},this._onMapClick=u=>{const Xe=u.originalEvent.target,fr=this._element;this._popup&&(Xe===fr||fr.contains(Xe))&&this.togglePopup()},this._update=u=>{var Xe;if(!this._map)return;const fr=this._map.loaded()&&!this._map.isMoving();("terrain"===(null==u?void 0:u.type)||"render"===(null==u?void 0:u.type)&&!fr)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Ls(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ar="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?Ar=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(Ar=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _r="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?_r="rotateX(0deg)":"map"===this._pitchAlignment&&(_r=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||u&&"moveend"!==u.type||(this._pos=this._pos.round()),r.setTransform(this._element,`${Ac[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_r} ${Ar}`),wr.frameAsync(new AbortController).then((()=>{this._updateOpacity(u&&"moveend"===u.type)})).catch((()=>{}))},this._onMove=u=>{if(!this._isDragging){const Xe=this._clickTolerance||this._map._clickTolerance;this._isDragging=u.point.dist(this._pointerdownPos)>=Xe}this._isDragging&&(this._pos=u.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new Xe.k("dragstart"))),this.fire(new Xe.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new Xe.k("dragend")),this._state="inactive"},this._addDragHandler=u=>{this._element.contains(u.originalEvent.target)&&(u.preventDefault(),this._positionDelta=u.point.sub(this._pos).add(this._offset),this._pointerdownPos=u.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=u&&u.anchor||"center",this._color=u&&u.color||"#3FB1CE",this._scale=u&&u.scale||1,this._draggable=u&&u.draggable||!1,this._clickTolerance=u&&u.clickTolerance||0,this._subpixelPositioning=u&&u.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=u&&u.rotation||0,this._rotationAlignment=u&&u.rotationAlignment||"auto",this._pitchAlignment=u&&u.pitchAlignment&&"auto"!==u.pitchAlignment?u.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(null==u?void 0:u.opacity,null==u?void 0:u.opacityWhenCovered),u&&u.element)this._element=u.element,this._offset=Xe.P.convert(u&&u.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");const fr=r.createNS("http://www.w3.org/2000/svg","svg"),Ar=41,_r=27;fr.setAttributeNS(null,"display","block"),fr.setAttributeNS(null,"height",`${Ar}px`),fr.setAttributeNS(null,"width",`${_r}px`),fr.setAttributeNS(null,"viewBox",`0 0 ${_r} ${Ar}`);const wr=r.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"stroke","none"),wr.setAttributeNS(null,"stroke-width","1"),wr.setAttributeNS(null,"fill","none"),wr.setAttributeNS(null,"fill-rule","evenodd");const Kr=r.createNS("http://www.w3.org/2000/svg","g");Kr.setAttributeNS(null,"fill-rule","nonzero");const In=r.createNS("http://www.w3.org/2000/svg","g");In.setAttributeNS(null,"transform","translate(3.0, 29.0)"),In.setAttributeNS(null,"fill","#000000");const io=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const u of io){const Xe=r.createNS("http://www.w3.org/2000/svg","ellipse");Xe.setAttributeNS(null,"opacity","0.04"),Xe.setAttributeNS(null,"cx","10.5"),Xe.setAttributeNS(null,"cy","5.80029008"),Xe.setAttributeNS(null,"rx",u.rx),Xe.setAttributeNS(null,"ry",u.ry),In.appendChild(Xe)}const no=r.createNS("http://www.w3.org/2000/svg","g");no.setAttributeNS(null,"fill",this._color);const oo=r.createNS("http://www.w3.org/2000/svg","path");oo.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),no.appendChild(oo);const so=r.createNS("http://www.w3.org/2000/svg","g");so.setAttributeNS(null,"opacity","0.25"),so.setAttributeNS(null,"fill","#000000");const ao=r.createNS("http://www.w3.org/2000/svg","path");ao.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),so.appendChild(ao);const co=r.createNS("http://www.w3.org/2000/svg","g");co.setAttributeNS(null,"transform","translate(6.0, 7.0)"),co.setAttributeNS(null,"fill","#FFFFFF");const go=r.createNS("http://www.w3.org/2000/svg","g");go.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ho=r.createNS("http://www.w3.org/2000/svg","circle");ho.setAttributeNS(null,"fill","#000000"),ho.setAttributeNS(null,"opacity","0.25"),ho.setAttributeNS(null,"cx","5.5"),ho.setAttributeNS(null,"cy","5.5"),ho.setAttributeNS(null,"r","5.4999962");const Co=r.createNS("http://www.w3.org/2000/svg","circle");Co.setAttributeNS(null,"fill","#FFFFFF"),Co.setAttributeNS(null,"cx","5.5"),Co.setAttributeNS(null,"cy","5.5"),Co.setAttributeNS(null,"r","5.4999962"),go.appendChild(ho),go.appendChild(Co),Kr.appendChild(In),Kr.appendChild(no),Kr.appendChild(so),Kr.appendChild(co),Kr.appendChild(go),fr.appendChild(Kr),fr.setAttributeNS(null,"height",Ar*this._scale+"px"),fr.setAttributeNS(null,"width",_r*this._scale+"px"),this._element.appendChild(fr),this._offset=Xe.P.convert(u&&u.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(u=>{u.preventDefault()})),this._element.addEventListener("mousedown",(u=>{u.preventDefault()})),Bs(this._element,this._anchor,"marker"),u&&u.className)for(const Xe of u.className.split(" "))this._element.classList.add(Xe);this._popup=null}addTo(u){return this.remove(),this._map=u,this._element.setAttribute("aria-label",u._getUIString("Marker.Title")),u.getCanvasContainer().appendChild(this._element),u.on("move",this._update),u.on("moveend",this._update),u.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(u){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),u){if(!("offset"in u.options)){const Xe=38.1,fr=13.5,Ar=Math.abs(fr)/Math.SQRT2;u.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Xe],"bottom-left":[Ar,-1*(Xe-fr+Ar)],"bottom-right":[-Ar,-1*(Xe-fr+Ar)],left:[fr,-1*(Xe-fr)],right:[-fr,-1*(Xe-fr)]}:this._offset}this._popup=u,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(u){return this._subpixelPositioning=u,this}getPopup(){return this._popup}togglePopup(){const u=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:u?(u.isOpen()?u.remove():(u.setLngLat(this._lngLat),u.addTo(this._map)),this):this}_updateOpacity(u=!1){var fr,Ar;if(!(null===(fr=this._map)||void 0===fr?void 0:fr.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(u)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}const _r=this._map,wr=_r.terrain.depthAtPoint(this._pos),Kr=_r.terrain.getElevationForLngLatZoom(this._lngLat,_r.transform.tileZoom);if(_r.transform.lngLatToCameraDepth(this._lngLat,Kr)-wr<.006)return void(this._element.style.opacity=this._opacity);const In=-this._offset.y/_r.transform._pixelPerMeter,io=Math.sin(_r.getPitch()*Math.PI/180)*In,no=_r.terrain.depthAtPoint(new Xe.P(this._pos.x,this._pos.y-this._offset.y)),oo=_r.transform.lngLatToCameraDepth(this._lngLat,Kr+io)-no>.006;(null===(Ar=this._popup)||void 0===Ar?void 0:Ar.isOpen())&&oo&&this._popup.remove(),this._element.style.opacity=oo?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(u){return this._offset=Xe.P.convert(u),this._update(),this}addClassName(u){this._element.classList.add(u)}removeClassName(u){this._element.classList.remove(u)}toggleClassName(u){return this._element.classList.toggle(u)}setDraggable(u){return this._draggable=!!u,this._map&&(u?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(u){return this._rotation=u||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(u){return this._rotationAlignment=u||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(u){return this._pitchAlignment=u&&"auto"!==u?u:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(u,Xe){return void 0===u&&void 0===Xe&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==u&&(this._opacity=u),void 0!==Xe&&(this._opacityWhenCovered=Xe),this._map&&this._updateOpacity(!0),this}}const bc={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let _c=0,vc=!1;const Pc={maxWidth:100,unit:"metric"};function qs(u,Xe,fr){const Ar=fr&&fr.maxWidth||100,_r=u._container.clientHeight/2,wr=u.unproject([0,_r]),Kr=u.unproject([Ar,_r]),In=wr.distanceTo(Kr);if(fr&&"imperial"===fr.unit){const fr=3.2808*In;fr>5280?Vs(Xe,Ar,fr/5280,u._getUIString("ScaleControl.Miles")):Vs(Xe,Ar,fr,u._getUIString("ScaleControl.Feet"))}else fr&&"nautical"===fr.unit?Vs(Xe,Ar,In/1852,u._getUIString("ScaleControl.NauticalMiles")):In>=1e3?Vs(Xe,Ar,In/1e3,u._getUIString("ScaleControl.Kilometers")):Vs(Xe,Ar,In,u._getUIString("ScaleControl.Meters"))}function Vs(u,Xe,fr,Ar){const _r=function(u){const Xe=Math.pow(10,`${Math.floor(u)}`.length-1);let fr=u/Xe;return fr=fr>=10?10:fr>=5?5:fr>=3?3:fr>=2?2:fr>=1?1:function(u){const Xe=Math.pow(10,Math.ceil(-Math.log(u)/Math.LN10));return Math.round(u*Xe)/Xe}(fr),Xe*fr}(fr);u.style.width=Xe*(_r/fr)+"px",u.innerHTML=`${_r}&nbsp;${Ar}`}const tg={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},eg=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ws(u){if(u){if("number"==typeof u){const fr=Math.round(Math.abs(u)/Math.SQRT2);return{center:new Xe.P(0,0),top:new Xe.P(0,u),"top-left":new Xe.P(fr,fr),"top-right":new Xe.P(-fr,fr),bottom:new Xe.P(0,-u),"bottom-left":new Xe.P(fr,-fr),"bottom-right":new Xe.P(-fr,-fr),left:new Xe.P(u,0),right:new Xe.P(-u,0)}}if(u instanceof Xe.P||Array.isArray(u)){const fr=Xe.P.convert(u);return{center:fr,top:fr,"top-left":fr,"top-right":fr,bottom:fr,"bottom-left":fr,"bottom-right":fr,left:fr,right:fr}}return{center:Xe.P.convert(u.center||[0,0]),top:Xe.P.convert(u.top||[0,0]),"top-left":Xe.P.convert(u["top-left"]||[0,0]),"top-right":Xe.P.convert(u["top-right"]||[0,0]),bottom:Xe.P.convert(u.bottom||[0,0]),"bottom-left":Xe.P.convert(u["bottom-left"]||[0,0]),"bottom-right":Xe.P.convert(u["bottom-right"]||[0,0]),left:Xe.P.convert(u.left||[0,0]),right:Xe.P.convert(u.right||[0,0])}}return Ws(new Xe.P(0,0))}const ig=fr;u.AJAXError=Xe.bg,u.Evented=Xe.E,u.LngLat=Xe.N,u.MercatorCoordinate=Xe.Z,u.Point=Xe.P,u.addProtocol=Xe.bh,u.config=Xe.a,u.removeProtocol=Xe.bi,u.AttributionControl=xs,u.BoxZoomHandler=ka,u.CanvasSource=et,u.CooperativeGesturesHandler=ds,u.DoubleClickZoomHandler=rs,u.DragPanHandler=hs,u.DragRotateHandler=cs,u.EdgeInsets=ma,u.FullscreenControl=class extends Xe.E{constructor(u={}){super(),this._onFullscreenChange=()=>{var u;let Xe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null===(u=null==Xe?void 0:Xe.shadowRoot)||void 0===u?void 0:u.fullscreenElement;)Xe=Xe.shadowRoot.fullscreenElement;Xe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:Xe.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){r.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=r.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);r.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new Xe.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new Xe.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},u.GeoJSONSource=J,u.GeolocateControl=class extends Xe.E{constructor(u){super(),this._onSuccess=u=>{if(this._map){if(this._isOutOfMapMaxBounds(u))return this._setErrorState(),this.fire(new Xe.k("outofmaxbounds",u)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=u,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(u),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(u),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("geolocate",u)),this._finish()}},this._updateCamera=u=>{const fr=new Xe.N(u.coords.longitude,u.coords.latitude),Ar=u.coords.accuracy,_r=this._map.getBearing(),wr=Xe.e({bearing:_r},this.options.fitBoundsOptions),Kr=H.fromLngLat(fr,Ar);this._map.fitBounds(Kr,wr,{geolocateSource:!0})},this._updateMarker=u=>{if(u){const fr=new Xe.N(u.coords.longitude,u.coords.latitude);this._accuracyCircleMarker.setLngLat(fr).addTo(this._map),this._userLocationDotMarker.setLngLat(fr).addTo(this._map),this._accuracy=u.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=u=>{if(this._map){if(this.options.trackUserLocation)if(1===u.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===u.code&&vc)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new Xe.k("error",u)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this._geolocateButton=r.create("button","maplibregl-ctrl-geolocate",this._container),r.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=u=>{if(this._map){if(!1===u){Xe.w("Geolocation support is not available so the GeolocateControl will be disabled.");const u=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}else{const u=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=u,this._geolocateButton.setAttribute("aria-label",u)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Os({element:this._dotElement}),this._circleElement=r.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Os({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(u=>{u.geolocateSource||"ACTIVE_LOCK"!==this._watchState||u.originalEvent&&"resize"===u.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new Xe.k("trackuserlocationend")),this.fire(new Xe.k("userlocationlostfocus")))}))}},this.options=Xe.e({},bc,u)}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return Xe._(this,arguments,void 0,(function*(u=!1){if(void 0!==yc&&!u)return yc;if(void 0===window.navigator.permissions)return yc=!!window.navigator.geolocation,yc;try{const u=yield window.navigator.permissions.query({name:"geolocation"});yc="denied"!==u.state}catch(u){yc=!!window.navigator.geolocation}return yc}))}().then((u=>this._finishSetupUI(u))),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_c=0,vc=!1}_isOutOfMapMaxBounds(u){const Xe=this._map.getMaxBounds(),fr=u.coords;return Xe&&(fr.longitude<Xe.getWest()||fr.longitude>Xe.getEast()||fr.latitude<Xe.getSouth()||fr.latitude>Xe.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const u=this._map.getBounds(),Xe=u.getSouthEast(),fr=u.getNorthEast(),Ar=Xe.distanceTo(fr),_r=Math.ceil(this._accuracy/(Ar/this._map._container.clientHeight)*2);this._circleElement.style.width=`${_r}px`,this._circleElement.style.height=`${_r}px`}trigger(){if(!this._setup)return Xe.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new Xe.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":_c--,vc=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new Xe.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new Xe.k("trackuserlocationstart")),this.fire(new Xe.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_c++,_c>1?(u={maximumAge:6e5,timeout:0},vc=!0):(u=this.options.positionOptions,vc=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},u.Hash=xa,u.ImageSource=Q,u.KeyboardHandler=is,u.LngLatBounds=H,u.LogoControl=ys,u.Map=class extends gs{constructor(u){Xe.be.mark(Xe.bf.create);const fr=Object.assign(Object.assign({},mc),u);if(null!=fr.minZoom&&null!=fr.maxZoom&&fr.minZoom>fr.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=fr.minPitch&&null!=fr.maxPitch&&fr.minPitch>fr.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=fr.minPitch&&fr.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=fr.maxPitch&&fr.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ga(fr.minZoom,fr.maxZoom,fr.minPitch,fr.maxPitch,fr.renderWorldCopies),{bearingSnap:fr.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new bs,this._controls=[],this._mapId=Xe.a4(),this._contextLost=u=>{u.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new Xe.k("webglcontextlost",{originalEvent:u}))},this._contextRestored=u=>{this._setupPainter(),this.resize(),this._update(),this.fire(new Xe.k("webglcontextrestored",{originalEvent:u}))},this._onMapScroll=u=>{if(u.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fr.interactive,this._maxTileCacheSize=fr.maxTileCacheSize,this._maxTileCacheZoomLevels=fr.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===fr.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===fr.preserveDrawingBuffer,this._antialias=!0===fr.antialias,this._trackResize=!0===fr.trackResize,this._bearingSnap=fr.bearingSnap,this._refreshExpiredTiles=!0===fr.refreshExpiredTiles,this._fadeDuration=fr.fadeDuration,this._crossSourceCollisions=!0===fr.crossSourceCollisions,this._collectResourceTiming=!0===fr.collectResourceTiming,this._locale=Object.assign(Object.assign({},ac),fr.locale),this._clickTolerance=fr.clickTolerance,this._overridePixelRatio=fr.pixelRatio,this._maxCanvasSize=fr.maxCanvasSize,this.transformCameraUpdate=fr.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===fr.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=so.addThrottleControl((()=>this.isMoving())),this._requestManager=new p(fr.transformRequest),"string"==typeof fr.container){if(this._container=document.getElementById(fr.container),!this._container)throw new Error(`Container '${fr.container}' not found.`)}else{if(!(fr.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=fr.container}if(fr.maxBounds&&this.setMaxBounds(fr.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),"undefined"!=typeof window){addEventListener("online",this._onWindowOnline,!1);let u=!1;const Xe=va((u=>{this._trackResize&&!this._removed&&this.resize(u)._update()}),50);this._resizeObserver=new ResizeObserver((fr=>{u?Xe(fr):u=!0})),this._resizeObserver.observe(this._container)}this.handlers=new fs(this,fr),this._hash=fr.hash&&new xa("string"==typeof fr.hash&&fr.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:fr.center,zoom:fr.zoom,bearing:fr.bearing,pitch:fr.pitch}),fr.bounds&&(this.resize(),this.fitBounds(fr.bounds,Xe.e({},fr.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=fr.localIdeographFontFamily,this._validateStyle=fr.validateStyle,fr.style&&this.setStyle(fr.style,{localIdeographFontFamily:fr.localIdeographFontFamily}),fr.attributionControl&&this.addControl(new xs("boolean"==typeof fr.attributionControl?void 0:fr.attributionControl)),fr.maplibreLogo&&this.addControl(new ys,fr.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(u=>{this._update("style"===u.dataType),this.fire(new Xe.k(`${u.dataType}data`,u))})),this.on("dataloading",(u=>{this.fire(new Xe.k(`${u.dataType}dataloading`,u))})),this.on("dataabort",(u=>{this.fire(new Xe.k("sourcedataabort",u))}))}_getMapId(){return this._mapId}addControl(u,fr){if(void 0===fr&&(fr=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new Xe.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const Ar=u.onAdd(this);this._controls.push(u);const _r=this._controlPositions[fr];return-1!==fr.indexOf("bottom")?_r.insertBefore(Ar,_r.firstChild):_r.appendChild(Ar),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new Xe.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const fr=this._controls.indexOf(u);return fr>-1&&this._controls.splice(fr,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,Xe,fr,Ar){return null==Ar&&this.terrain&&(Ar=this.terrain.getElevationForLngLatZoom(fr,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,Xe,fr,Ar)}resize(u){var fr;const Ar=this._containerDimensions(),_r=Ar[0],wr=Ar[1],Kr=this._getClampedPixelRatio(_r,wr);if(this._resizeCanvas(_r,wr,Kr),this.painter.resize(_r,wr,Kr),this.painter.overLimit()){const u=this.painter.context.gl;this._maxCanvasSize=[u.drawingBufferWidth,u.drawingBufferHeight];const Xe=this._getClampedPixelRatio(_r,wr);this._resizeCanvas(_r,wr,Xe),this.painter.resize(_r,wr,Xe)}this.transform.resize(_r,wr),null===(fr=this._requestedCameraState)||void 0===fr||fr.resize(_r,wr);const In=!this._moving;return In&&(this.stop(),this.fire(new Xe.k("movestart",u)).fire(new Xe.k("move",u))),this.fire(new Xe.k("resize",u)),In&&this.fire(new Xe.k("moveend",u)),this}_getClampedPixelRatio(u,Xe){const{0:fr,1:Ar}=this._maxCanvasSize,_r=this.getPixelRatio(),wr=u*_r,Kr=Xe*_r;return Math.min(wr>fr?fr/wr:1,Kr>Ar?Ar/Kr:1)*_r}getPixelRatio(){var u;return null!==(u=this._overridePixelRatio)&&void 0!==u?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(H.convert(u)),this._update()}setMinZoom(u){if((u=null==u?-2:u)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()<u&&this.setZoom(u),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(u){if((u=null==u?22:u)>=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=null==u?0:u)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()<u&&this.setPitch(u),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(u){if((u=null==u?60:u)>85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}project(u){return this.transform.locationPoint(Xe.N.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(Xe.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||(null===(u=this.handlers)||void 0===u?void 0:u.isMoving())}isZooming(){var u;return this._zooming||(null===(u=this.handlers)||void 0===u?void 0:u.isZooming())}isRotating(){var u;return this._rotating||(null===(u=this.handlers)||void 0===u?void 0:u.isRotating())}_createDelegatedListener(u,Xe,fr){if("mouseenter"===u||"mouseover"===u){let Ar=!1;const s=_r=>{const wr=this.getLayer(Xe)?this.queryRenderedFeatures(_r.point,{layers:[Xe]}):[];wr.length?Ar||(Ar=!0,fr.call(this,new Sa(u,this,_r.originalEvent,{features:wr}))):Ar=!1};return{layer:Xe,listener:fr,delegates:{mousemove:s,mouseout:()=>{Ar=!1}}}}if("mouseleave"===u||"mouseout"===u){let Ar=!1;const s=_r=>{(this.getLayer(Xe)?this.queryRenderedFeatures(_r.point,{layers:[Xe]}):[]).length?Ar=!0:Ar&&(Ar=!1,fr.call(this,new Sa(u,this,_r.originalEvent)))},o=Xe=>{Ar&&(Ar=!1,fr.call(this,new Sa(u,this,Xe.originalEvent)))};return{layer:Xe,listener:fr,delegates:{mousemove:s,mouseout:o}}}{const a=u=>{const Ar=this.getLayer(Xe)?this.queryRenderedFeatures(u.point,{layers:[Xe]}):[];Ar.length&&(u.features=Ar,fr.call(this,u),delete u.features)};return{layer:Xe,listener:fr,delegates:{[u]:a}}}}on(u,Xe,fr){if(void 0===fr)return super.on(u,Xe);const Ar=this._createDelegatedListener(u,Xe,fr);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(Ar);for(const u in Ar.delegates)this.on(u,Ar.delegates[u]);return this}once(u,Xe,fr){if(void 0===fr)return super.once(u,Xe);const Ar=this._createDelegatedListener(u,Xe,fr);for(const u in Ar.delegates)this.once(u,Ar.delegates[u]);return this}off(u,Xe,fr){return void 0===fr?super.off(u,Xe):(this._delegatedListeners&&this._delegatedListeners[u]&&(()=>{const Ar=this._delegatedListeners[u];for(let u=0;u<Ar.length;u++){const _r=Ar[u];if(_r.layer===Xe&&_r.listener===fr){for(const u in _r.delegates)this.off(u,_r.delegates[u]);return Ar.splice(u,1),this}}})(),this)}queryRenderedFeatures(u,fr){if(!this.style)return[];let Ar;const _r=u instanceof Xe.P||Array.isArray(u),wr=_r?u:[[0,0],[this.transform.width,this.transform.height]];if(fr=fr||(_r?{}:u)||{},wr instanceof Xe.P||"number"==typeof wr[0])Ar=[Xe.P.convert(wr)];else{const u=Xe.P.convert(wr[0]),fr=Xe.P.convert(wr[1]);Ar=[u,new Xe.P(fr.x,u.y),fr,new Xe.P(u.x,fr.y),u]}return this.style.queryRenderedFeatures(Ar,fr,this.transform)}querySourceFeatures(u,Xe){return this.style.querySourceFeatures(u,Xe)}setStyle(u,fr){return!1!==(fr=Xe.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},fr)).diff&&fr.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&u?(this._diffStyle(u,fr),this):(this._localIdeographFontFamily=fr.localIdeographFontFamily,this._updateStyle(u,fr))}setTransformRequest(u){return this._requestManager.setTransformRequest(u),this}_getUIString(u){const Xe=this._locale[u];if(null==Xe)throw new Error(`Missing UI string '${u}'`);return Xe}_updateStyle(u,Xe){if(Xe.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(u,Xe)));const fr=this.style&&Xe.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new ue(this,Xe||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof u?this.style.loadURL(u,Xe,fr):this.style.loadJSON(u,Xe,fr),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ue(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,fr){if("string"==typeof u){const Ar=this._requestManager.transformRequest(u,"Style");Xe.h(Ar,new AbortController).then((u=>{this._updateDiff(u.data,fr)})).catch((u=>{u&&this.fire(new Xe.j(u))}))}else"object"==typeof u&&this._updateDiff(u,fr)}_updateDiff(u,fr){try{this.style.setState(u,fr)&&this._update(!0)}catch(Ar){Xe.w(`Unable to perform style diff: ${Ar.message||Ar.error||Ar}.  Rebuilding the style from scratch.`),this._updateStyle(u,fr)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():Xe.w("There is no style added to the map.")}addSource(u,Xe){return this._lazyInitEmptyStyle(),this.style.addSource(u,Xe),this._update(!0)}isSourceLoaded(u){const fr=this.style&&this.style.sourceCaches[u];if(void 0!==fr)return fr.loaded();this.fire(new Xe.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const fr=this.style.sourceCaches[u.source];if(!fr)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);null===this.terrain&&fr.reload();for(const fr in this.style._layers){const Ar=this.style._layers[fr];"hillshade"===Ar.type&&Ar.source===u.source&&Xe.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Is(this.painter,fr,u),this.painter.renderToTexture=new Cs(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=Xe=>{"style"===Xe.dataType?this.terrain.sourceCache.freeRtt():"source"===Xe.dataType&&Xe.tile&&(Xe.sourceId!==u.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(Xe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new Xe.k("terrain",{terrain:u})),this}getTerrain(){var u,Xe;return null!==(Xe=null===(u=this.terrain)||void 0===u?void 0:u.options)&&void 0!==Xe?Xe:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const Xe in u){const fr=u[Xe]._tiles;for(const u in fr){const Xe=fr[u];if("loaded"!==Xe.state&&"errored"!==Xe.state)return!1}}return!0}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,fr,Ar={}){const{pixelRatio:_r=1,sdf:Kr=!1,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so}=Ar;if(this._lazyInitEmptyStyle(),!(fr instanceof HTMLImageElement||Xe.b(fr))){if(void 0===fr.width||void 0===fr.height)return this.fire(new Xe.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:Ar,height:wr,data:ao}=fr,co=fr;return this.style.addImage(u,{data:new Xe.R({width:Ar,height:wr},new Uint8Array(ao)),pixelRatio:_r,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so,sdf:Kr,version:0,userImage:co}),co.onAdd&&co.onAdd(this,u),this}}{const{width:Ar,height:ao,data:co}=wr.getImageData(fr);this.style.addImage(u,{data:new Xe.R({width:Ar,height:ao},co),pixelRatio:_r,stretchX:In,stretchY:io,content:no,textFitWidth:oo,textFitHeight:so,sdf:Kr,version:0})}}updateImage(u,fr){const Ar=this.style.getImage(u);if(!Ar)return this.fire(new Xe.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _r=fr instanceof HTMLImageElement||Xe.b(fr)?wr.getImageData(fr):fr,{width:Kr,height:In,data:io}=_r;if(void 0===Kr||void 0===In)return this.fire(new Xe.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Kr!==Ar.data.width||In!==Ar.data.height)return this.fire(new Xe.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const no=!(fr instanceof HTMLImageElement||Xe.b(fr));return Ar.data.replace(io,no),this.style.updateImage(u,Ar),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new Xe.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u){return so.getImage(this._requestManager.transformRequest(u,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(u,Xe){return this._lazyInitEmptyStyle(),this.style.addLayer(u,Xe),this._update(!0)}moveLayer(u,Xe){return this.style.moveLayer(u,Xe),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,Xe,fr){return this.style.setLayerZoomRange(u,Xe,fr),this._update(!0)}setFilter(u,Xe,fr={}){return this.style.setFilter(u,Xe,fr),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,Xe,fr,Ar={}){return this.style.setPaintProperty(u,Xe,fr,Ar),this._update(!0)}getPaintProperty(u,Xe){return this.style.getPaintProperty(u,Xe)}setLayoutProperty(u,Xe,fr,Ar={}){return this.style.setLayoutProperty(u,Xe,fr,Ar),this._update(!0)}getLayoutProperty(u,Xe){return this.style.getLayoutProperty(u,Xe)}setGlyphs(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,Xe),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,Xe,fr={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,Xe,fr,(u=>{u||this._update(!0)})),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,Xe,(u=>{u||this._update(!0)})),this}setLight(u,Xe={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,Xe),this._update(!0)}getLight(){return this.style.getLight()}setSky(u){return this._lazyInitEmptyStyle(),this.style.setSky(u),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(u,Xe){return this.style.setFeatureState(u,Xe),this._update()}removeFeatureState(u,Xe){return this.style.removeFeatureState(u,Xe),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,Xe=0;return this._container&&(u=this._container.clientWidth||400,Xe=this._container.clientHeight||300),[u,Xe]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const Xe=this._canvasContainer=r.create("div","maplibregl-canvas-container",u);this._interactive&&Xe.classList.add("maplibregl-interactive"),this._canvas=r.create("canvas","maplibregl-canvas",Xe),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const fr=this._containerDimensions(),Ar=this._getClampedPixelRatio(fr[0],fr[1]);this._resizeCanvas(fr[0],fr[1],Ar);const _r=this._controlContainer=r.create("div","maplibregl-control-container",u),wr=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((u=>{wr[u]=r.create("div",`maplibregl-ctrl-${u} `,_r)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(u,Xe,fr){this._canvas.width=Math.floor(fr*u),this._canvas.height=Math.floor(fr*Xe),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${Xe}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let Xe=null;this._canvas.addEventListener("webglcontextcreationerror",(fr=>{Xe={requestedAttributes:u},fr&&(Xe.statusMessage=fr.statusMessage,Xe.type=fr.type)}),{once:!0});const fr=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!fr){const u="Failed to initialize WebGL";throw Xe?(Xe.message=u,new Error(JSON.stringify(Xe))):new Error(u)}this.painter=new da(fr,this.transform),Kr.testSupport(fr)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const fr=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let Ar=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const u=this.transform.zoom,_r=wr.now();this.style.zoomHistory.update(u,_r);const Kr=new Xe.z(u,{now:_r,fadeDuration:fr,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),In=Kr.crossFadingFactor();1===In&&In===this._crossFadingFactor||(Ar=!0,this._crossFadingFactor=In),this.style.update(Kr)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,fr,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:fr,showPadding:this.showPadding}),this.fire(new Xe.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,Xe.be.mark(Xe.bf.load),this.fire(new Xe.k("load"))),this.style&&(this.style.hasTransitions()||Ar)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const _r=this._sourcesDirty||this._styleDirty||this._placementDirty;return _r||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new Xe.k("idle")),!this._loaded||this._fullyLoaded||_r||(this._fullyLoaded=!0,Xe.be.mark(Xe.bf.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const u of this._controls)u.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"undefined"!=typeof window&&removeEventListener("online",this._onWindowOnline,!1),so.removeThrottleControl(this._imageQueueHandle),null===(u=this._resizeObserver)||void 0===u||u.disconnect();const fr=this.painter.context.gl.getExtension("WEBGL_lose_context");(null==fr?void 0:fr.loseContext)&&fr.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),r.remove(this._canvasContainer),r.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),Xe.be.clearMetrics(),this._removed=!0,this.fire(new Xe.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,wr.frameAsync(this._frameRequest).then((u=>{Xe.be.frame(u),this._frameRequest=null,this._render(u)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return dc}getCameraTargetElevation(){return this.transform.elevation}},u.MapMouseEvent=Sa,u.MapTouchEvent=za,u.MapWheelEvent=Da,u.Marker=Os,u.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const u=this._map.getZoom(),Xe=u===this._map.getMaxZoom(),fr=u===this._map.getMinZoom();this._zoomInButton.disabled=Xe,this._zoomOutButton.disabled=fr,this._zoomInButton.setAttribute("aria-disabled",Xe.toString()),this._zoomOutButton.setAttribute("aria-disabled",fr.toString())},this._rotateCompassArrow=()=>{const u=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=u},this._setButtonTitle=(u,Xe)=>{const fr=this._map._getUIString(`NavigationControl.${Xe}`);u.title=fr,u.setAttribute("aria-label",fr)},this.options=Xe.e({},Ic,u),this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(u=>u.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(u=>this._map.zoomIn({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(u=>this._map.zoomOut({},{originalEvent:u}))),r.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(u=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:u}):this._map.resetNorth({},{originalEvent:u})})),this._compassIcon=r.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Rs(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(u,Xe){const fr=r.create("button",u,this._container);return fr.type="button",fr.addEventListener("click",Xe),fr}},u.Popup=class extends Xe.E{constructor(u){super(),this.remove=()=>(this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new Xe.k("close"))),this),this._onMouseUp=u=>{this._update(u.point)},this._onMouseMove=u=>{this._update(u.point)},this._onDrag=u=>{this._update(u.point)},this._update=u=>{var Xe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=r.create("div","maplibregl-popup",this._map.getContainer()),this._tip=r.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const u of this.options.className.split(" "))this._container.classList.add(u);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Ls(this._lngLat,this._flatPos,this._map.transform):null===(Xe=this._lngLat)||void 0===Xe?void 0:Xe.wrap(),this._trackPointer&&!u)return;const fr=this._flatPos=this._pos=this._trackPointer&&u?u:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&u?u:this._map.transform.locationPoint(this._lngLat));let Ar=this.options.anchor;const _r=Ws(this.options.offset);if(!Ar){const u=this._container.offsetWidth,Xe=this._container.offsetHeight;let wr;wr=fr.y+_r.bottom.y<Xe?["top"]:fr.y>this._map.transform.height-Xe?["bottom"]:[],fr.x<u/2?wr.push("left"):fr.x>this._map.transform.width-u/2&&wr.push("right"),Ar=0===wr.length?"bottom":wr.join("-")}let wr=fr.add(_r[Ar]);this.options.subpixelPositioning||(wr=wr.round()),r.setTransform(this._container,`${Ac[Ar]} translate(${wr.x}px,${wr.y}px)`),Bs(this._container,Ar,"popup")},this._onClose=()=>{this.remove()},this.options=Xe.e(Object.create(tg),u)}addTo(u){return this._map&&this.remove(),this._map=u,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new Xe.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=Xe.N.convert(u),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const Xe=document.createDocumentFragment(),fr=document.createElement("body");let Ar;for(fr.innerHTML=u;Ar=fr.firstChild,Ar;)Xe.appendChild(Ar);return this.setDOMContent(Xe)}getMaxWidth(){var u;return null===(u=this._container)||void 0===u?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=r.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){return this._container&&this._container.classList.add(u),this}removeClassName(u){return this._container&&this._container.classList.remove(u),this}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}setSubpixelPositioning(u){this.options.subpixelPositioning=u}_createCloseButton(){this.options.closeButton&&(this._closeButton=r.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const u=this._container.querySelector(eg);u&&u.focus()}},u.RasterDEMTileSource=K,u.RasterTileSource=X,u.ScaleControl=class{constructor(u){this._onMove=()=>{qs(this._map,this._container,this.options)},this.setUnit=u=>{this.options.unit=u,qs(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Pc),u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},u.ScrollZoomHandler=os,u.Style=ue,u.TerrainControl=class{constructor(u){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=u}onAdd(u){return this._map=u,this._container=r.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=r.create("button","maplibregl-ctrl-terrain",this._container),r.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){r.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},u.TwoFingersTouchPitchHandler=ts,u.TwoFingersTouchRotateHandler=Ya,u.TwoFingersTouchZoomHandler=Ka,u.TwoFingersTouchZoomRotateHandler=us,u.VectorTileSource=$,u.VideoSource=tt,u.addSourceType=(u,fr)=>Xe._(void 0,void 0,void 0,(function*(){if(at(u))throw new Error(`A source type called "${u}" already exists.`);((u,Xe)=>{ss[u]=Xe})(u,fr)})),u.clearPrewarmedResources=function(){const u=xo;u&&(u.isPreloaded()&&1===u.numActive()?(u.release(Co),xo=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},u.getMaxParallelImageRequests=function(){return Xe.a.MAX_PARALLEL_IMAGE_REQUESTS},u.getRTLTextPluginStatus=function(){return nt().getRTLTextPluginStatus()},u.getVersion=function(){return ig},u.getWorkerCount=function(){return L.workerCount},u.getWorkerUrl=function(){return Xe.a.WORKER_URL},u.importScriptInWorkers=function(u){return U().broadcast("IS",u)},u.prewarm=function(){N().acquire(Co)},u.setMaxParallelImageRequests=function(u){Xe.a.MAX_PARALLEL_IMAGE_REQUESTS=u},u.setRTLTextPlugin=function(u,Xe){return nt().setRTLTextPlugin(u,Xe)},u.setWorkerCount=function(u){L.workerCount=u},u.setWorkerUrl=function(u){Xe.a.WORKER_URL=u}})),u},"object"==typeof exports&&"undefined"!=typeof module?module.exports=lg():"function"==typeof define&&define.amd?define(lg):(ag="undefined"!=typeof globalThis?globalThis:ag||self).maplibregl=lg();var cg=dsv$1(","),gg=cg.parse,hg=cg.parseRows,ug=cg.format,dg=cg.formatRows,pg=dsv$1("\t"),mg=pg.parse,Cg=pg.parseRows,Ig=pg.format,fg=pg.formatRows,yg=getAugmentedNamespace(Object.freeze({__proto__:null,csvFormat:ug,csvFormatRows:dg,csvParse:gg,csvParseRows:hg,dsvFormat:dsv$1,tsvFormat:Ig,tsvFormatRows:fg,tsvParse:mg,tsvParseRows:Cg})),Ag={exports:{}};function format(u,Xe){var fr=coordToDMS(u,Xe);return fr.whole+"° "+(fr.minutes?fr.minutes+"' ":"")+(fr.seconds?fr.seconds+'" ':"")+fr.dir}function coordToDMS(u,Xe){var fr=({lat:["N","S"],lon:["E","W"]}[Xe]||"")[u>=0?0:1],Ar=Math.abs(u),_r=Math.floor(Ar),wr=60*(Ar-_r),Kr=Math.floor(wr);return{whole:_r,minutes:Kr,seconds:Math.floor(60*(wr-Kr)),dir:fr}}function search(u,Xe){if(Xe||(Xe="NSEW"),"string"!=typeof u)return null;var fr=(u=u.toUpperCase()).match(/^[\s\,]*([NSEW])?\s*([\-|—|―]?[0-9.]+)[°º˚]?\s*(?:([0-9.]+)['’′‘]\s*)?(?:([0-9.]+)(?:''|"|”|″)\s*)?([NSEW])?/);if(!fr)return null;var Ar,_r=fr[0];if(fr[1]&&fr[5]?(Ar=fr[1],_r=_r.slice(0,-1)):Ar=fr[1]||fr[5],Ar&&-1===Xe.indexOf(Ar))return null;var wr=fr[2]?parseFloat(fr[2]):0,Kr=fr[3]?parseFloat(fr[3])/60:0,In=fr[4]?parseFloat(fr[4])/3600:0,io=wr<0?-1:1;return"S"!==Ar&&"W"!==Ar||(io*=-1),{val:(Math.abs(wr)+Kr+In)*io,dim:Ar,matched:_r,remain:u.slice(_r.length)}}Ag.exports=function element(u,Xe){var fr=search(u,Xe);return null===fr?null:fr.val},Ag.exports.pair=function pair(u,Xe){var fr=search(u=u.trim(),Xe);if(!fr)return null;var Ar=search(u=fr.remain.trim(),Xe);if(!Ar||Ar.remain)return null;return fr.dim?function swapdim(u,Xe,fr){if("N"===fr||"S"===fr)return[u,Xe];if("W"===fr||"E"===fr)return[Xe,u]}(fr.val,Ar.val,fr.dim):[fr.val,Ar.val]},Ag.exports.format=format,Ag.exports.formatPair=function formatPair(u){return format(u.lat,"lat")+" "+format(u.lon,"lon")},Ag.exports.coordToDMS=coordToDMS;var bg=Ag.exports,_g=yg,vg=bg,xg=/(Lat)(itude)?/gi,wg=/(L)(on|ng)(gitude)?/i;function guessHeader(u,Xe){var fr,Ar,_r;for(var wr in u)(Ar=wr.match(Xe))&&(!fr||Ar[0].length/wr.length>_r)&&(_r=Ar[0].length/wr.length,fr=wr);return fr}function guessLatHeader(u){return guessHeader(u,xg)}function guessLonHeader(u){return guessHeader(u,wg)}function keyCount(u){return"object"==typeof u?Object.keys(u).length:0}function autoDelimiter(u){var Xe=[];return[",",";","\t","|"].forEach((function(fr){var Ar=_g.dsvFormat(fr).parse(u);if(Ar.length>=1){for(var _r=keyCount(Ar[0]),wr=0;wr<Ar.length;wr++)if(keyCount(Ar[wr])!==_r)return;Xe.push({delimiter:fr,arity:Object.keys(Ar[0]).length})}})),Xe.length?Xe.sort((function(u,Xe){return Xe.arity-u.arity}))[0].delimiter:null}var Sg={isLon:function isLon(u){return!!u.match(wg)},isLat:function isLat(u){return!!u.match(xg)},guessLatHeader:guessLatHeader,guessLonHeader:guessLonHeader,csv:_g.csvParse,tsv:_g.tsvParse,dsv:_g,auto:function auto(u){var Xe=autoDelimiter(u);return Xe?function deleteColumns(u){return delete u.columns,u}(_g.dsvFormat(Xe).parse(u)):null},csv2geojson:function csv2geojson(u,Xe,fr){fr||(fr=Xe,Xe={}),Xe.delimiter=Xe.delimiter||",";var Ar=Xe.latfield||"",_r=Xe.lonfield||"",wr=Xe.crs||"",Kr=[],In={type:"FeatureCollection",features:Kr};if(""!==wr&&(In.crs={type:"name",properties:{name:wr}}),"auto"!==Xe.delimiter||"string"!=typeof u||(Xe.delimiter=autoDelimiter(u),Xe.delimiter)){var io=Xe.numericFields?Xe.numericFields.split(","):null,no="string"==typeof u?_g.dsvFormat(Xe.delimiter).parse(u,(function(u){if(io)for(var Xe in u)io.includes(Xe)&&(u[Xe]=+u[Xe]);return u})):u;if(no.length){var oo,so=[];if(Ar||(Ar=guessLatHeader(no[0])),_r||(_r=guessLonHeader(no[0])),!Ar||!_r){for(oo=0;oo<no.length;oo++)Kr.push({type:"Feature",properties:no[oo],geometry:null});fr(so.length?so:null,In)}else{for(oo=0;oo<no.length;oo++)if(void 0!==no[oo][_r]&&void 0!==no[oo][Ar]){var ao,co,go,ho=no[oo][_r],Co=no[oo][Ar];(go=vg(ho,"EW"))&&(ho=go),(go=vg(Co,"NS"))&&(Co=go),ao=parseFloat(ho),co=parseFloat(Co),isNaN(ao)||isNaN(co)?so.push({message:"A row contained an invalid value for latitude or longitude",row:no[oo],index:oo}):(Xe.includeLatLon||(delete no[oo][_r],delete no[oo][Ar]),Kr.push({type:"Feature",properties:no[oo],geometry:{type:"Point",coordinates:[parseFloat(ao),parseFloat(co)]}}))}fr(so.length?so:null,In)}}else fr(null,In)}else fr({type:"Error",message:"Could not autodetect delimiter"})},toLine:function toLine(u){for(var Xe=u.features,fr={type:"Feature",geometry:{type:"LineString",coordinates:[]}},Ar=0;Ar<Xe.length;Ar++)fr.geometry.coordinates.push(Xe[Ar].geometry.coordinates);return fr.properties=Xe.reduce((function(u,Xe){for(var fr in Xe.properties)u[fr]||(u[fr]=[]),u[fr].push(Xe.properties[fr]);return u}),{}),{type:"FeatureCollection",features:[fr]}},toPolygon:function toPolygon(u){for(var Xe=u.features,fr={type:"Feature",geometry:{type:"Polygon",coordinates:[[]]}},Ar=0;Ar<Xe.length;Ar++)fr.geometry.coordinates[0].push(Xe[Ar].geometry.coordinates);return fr.properties=Xe.reduce((function(u,Xe){for(var fr in Xe.properties)u[fr]||(u[fr]=[]),u[fr].push(Xe.properties[fr]);return u}),{}),{type:"FeatureCollection",features:[fr]}}};function identity(u){return u}function feature(u,Xe){var fr=Xe.id,Ar=Xe.bbox,_r=null==Xe.properties?{}:Xe.properties,wr=function object(u,Xe){var fr=function transform(u){if(null==u)return identity;var Xe,fr,Ar=u.scale[0],_r=u.scale[1],wr=u.translate[0],Kr=u.translate[1];return function(u,In){In||(Xe=fr=0);var io=2,no=u.length,oo=new Array(no);for(oo[0]=(Xe+=u[0])*Ar+wr,oo[1]=(fr+=u[1])*_r+Kr;io<no;)oo[io]=u[io],++io;return oo}}(u.transform),Ar=u.arcs;function arc(u,Xe){Xe.length&&Xe.pop();for(var _r=Ar[u<0?~u:u],wr=0,Kr=_r.length;wr<Kr;++wr)Xe.push(fr(_r[wr],wr));u<0&&function reverse(u,Xe){for(var fr,Ar=u.length,_r=Ar-Xe;_r<--Ar;)fr=u[_r],u[_r++]=u[Ar],u[Ar]=fr}(Xe,Kr)}function point(u){return fr(u)}function line(u){for(var Xe=[],fr=0,Ar=u.length;fr<Ar;++fr)arc(u[fr],Xe);return Xe.length<2&&Xe.push(Xe[0]),Xe}function ring(u){for(var Xe=line(u);Xe.length<4;)Xe.push(Xe[0]);return Xe}function polygon(u){return u.map(ring)}function geometry(u){var Xe,fr=u.type;switch(fr){case"GeometryCollection":return{type:fr,geometries:u.geometries.map(geometry)};case"Point":Xe=point(u.coordinates);break;case"MultiPoint":Xe=u.coordinates.map(point);break;case"LineString":Xe=line(u.arcs);break;case"MultiLineString":Xe=u.arcs.map(line);break;case"Polygon":Xe=polygon(u.arcs);break;case"MultiPolygon":Xe=u.arcs.map(polygon);break;default:return null}return{type:fr,coordinates:Xe}}return geometry(Xe)}(u,Xe);return null==fr&&null==Ar?{type:"Feature",properties:_r,geometry:wr}:null==Ar?{type:"Feature",id:fr,properties:_r,geometry:wr}:{type:"Feature",id:fr,bbox:Ar,properties:_r,geometry:wr}}function $(u,Xe){return Array.from(u.getElementsByTagName(Xe))}function normalizeId(u){return"#"===u[0]?u:`#${u}`}function nodeVal(u){return u?.normalize(),u&&u.textContent||""}function get1(u,Xe,fr){const Ar=u.getElementsByTagName(Xe),_r=Ar.length?Ar[0]:null;return _r&&fr&&fr(_r),_r}function get(u,Xe,fr){const Ar={};if(!u)return Ar;const _r=u.getElementsByTagName(Xe),wr=_r.length?_r[0]:null;return wr&&fr?fr(wr,Ar):Ar}function val1(u,Xe,fr){const Ar=nodeVal(get1(u,Xe));return Ar&&fr&&fr(Ar)||{}}function $num(u,Xe,fr){const Ar=parseFloat(nodeVal(get1(u,Xe)));if(!isNaN(Ar))return Ar&&fr&&fr(Ar)||{}}function num1(u,Xe,fr){const Ar=parseFloat(nodeVal(get1(u,Xe)));if(!isNaN(Ar))return fr&&fr(Ar),Ar}function getMulti(u,Xe){const fr={};for(const Ar of Xe)val1(u,Ar,(u=>{fr[Ar]=u}));return fr}function isElement(u){return 1===u?.nodeType}function getLineStyle(u){return get(u,"line",(u=>Object.assign({},val1(u,"color",(u=>({stroke:`#${u}`}))),$num(u,"opacity",(u=>({"stroke-opacity":u}))),$num(u,"width",(u=>({"stroke-width":96*u/25.4}))))))}function getExtensions(u){let Xe=[];if(null===u)return Xe;for(const fr of Array.from(u.childNodes)){if(!isElement(fr))continue;const u=abbreviateName(fr.nodeName);if("gpxtpx:TrackPointExtension"===u)Xe=Xe.concat(getExtensions(fr));else{const Ar=nodeVal(fr);Xe.push([u,parseNumeric(Ar)])}}return Xe}function abbreviateName(u){return["heart","gpxtpx:hr","hr"].includes(u)?"heart":u}function parseNumeric(u){const Xe=parseFloat(u);return isNaN(Xe)?u:Xe}function coordPair$1(u){const Xe=[parseFloat(u.getAttribute("lon")||""),parseFloat(u.getAttribute("lat")||"")];if(isNaN(Xe[0])||isNaN(Xe[1]))return null;num1(u,"ele",(u=>{Xe.push(u)}));const fr=get1(u,"time");return{coordinates:Xe,time:fr?nodeVal(fr):null,extendedValues:getExtensions(get1(u,"extensions"))}}function extractProperties(u){const Xe=getMulti(u,["name","cmt","desc","type","time","keywords"]),fr=Array.from(u.getElementsByTagNameNS("http://www.garmin.com/xmlschemas/GpxExtensions/v3","*"));for(const Ar of fr)Ar.parentNode?.parentNode===u&&(Xe[Ar.tagName.replace(":","_")]=nodeVal(Ar));const Ar=$(u,"link");return Ar.length&&(Xe.links=Ar.map((u=>Object.assign({href:u.getAttribute("href")},getMulti(u,["text","type"]))))),Xe}function getPoints$1(u,Xe){const fr=$(u,Xe),Ar=[],_r=[],wr={};for(let u=0;u<fr.length;u++){const Xe=coordPair$1(fr[u]);if(Xe){Ar.push(Xe.coordinates),Xe.time&&_r.push(Xe.time);for(const[Ar,_r]of Xe.extendedValues){const Xe="heart"===Ar?Ar:Ar.replace("gpxtpx:","")+"s";wr[Xe]||(wr[Xe]=Array(fr.length).fill(null)),wr[Xe][u]=_r}}}if(!(Ar.length<2))return{line:Ar,times:_r,extendedValues:wr}}function getRoute(u){const Xe=getPoints$1(u,"rtept");if(Xe)return{type:"Feature",properties:Object.assign({_gpxType:"rte"},extractProperties(u),getLineStyle(get1(u,"extensions"))),geometry:{type:"LineString",coordinates:Xe.line}}}function getTrack(u){const Xe=$(u,"trkseg"),fr=[],Ar=[],_r=[];for(const u of Xe){const Xe=getPoints$1(u,"trkpt");Xe&&(_r.push(Xe),Xe.times&&Xe.times.length&&Ar.push(Xe.times))}if(0===_r.length)return null;const wr=_r.length>1,Kr=Object.assign({_gpxType:"trk"},extractProperties(u),getLineStyle(get1(u,"extensions")),Ar.length?{coordinateProperties:{times:wr?Ar:Ar[0]}}:{});for(const u of _r){fr.push(u.line),Kr.coordinateProperties||(Kr.coordinateProperties={});const Xe=Kr.coordinateProperties,Ar=Object.entries(u.extendedValues);for(let u=0;u<Ar.length;u++){const[fr,Kr]=Ar[u];wr?(Xe[fr]||(Xe[fr]=_r.map((u=>new Array(u.line.length).fill(null)))),Xe[fr][u]=Kr):Xe[fr]=Kr}}return{type:"Feature",properties:Kr,geometry:wr?{type:"MultiLineString",coordinates:fr}:{type:"LineString",coordinates:fr[0]}}}function getPoint(u){const Xe=Object.assign(extractProperties(u),getMulti(u,["sym"])),fr=coordPair$1(u);return fr?{type:"Feature",properties:Xe,geometry:{type:"Point",coordinates:fr.coordinates}}:null}function*gpxGen(u){for(const Xe of $(u,"trk")){const u=getTrack(Xe);u&&(yield u)}for(const Xe of $(u,"rte")){const u=getRoute(Xe);u&&(yield u)}for(const Xe of $(u,"wpt")){const u=getPoint(Xe);u&&(yield u)}}const kg="http://www.garmin.com/xmlschemas/ActivityExtension/v2",Bg=[["heartRate","heartRates"],["Cadence","cadences"],["Speed","speeds"],["Watts","watts"]],Zg=[["TotalTimeSeconds","totalTimeSeconds"],["DistanceMeters","distanceMeters"],["MaximumSpeed","maxSpeed"],["AverageHeartRateBpm","avgHeartRate"],["MaximumHeartRateBpm","maxHeartRate"],["AvgSpeed","avgSpeed"],["AvgWatts","avgWatts"],["MaxWatts","maxWatts"]];function getProperties(u,Xe){const fr=[];for(const[Ar,_r]of Xe){let Xe=get1(u,Ar);if(!Xe){const fr=u.getElementsByTagNameNS(kg,Ar);fr.length&&(Xe=fr[0])}const wr=parseFloat(nodeVal(Xe));isNaN(wr)||fr.push([_r,wr])}return fr}function coordPair(u){const Xe=[num1(u,"LongitudeDegrees"),num1(u,"LatitudeDegrees")];if(void 0===Xe[0]||isNaN(Xe[0])||void 0===Xe[1]||isNaN(Xe[1]))return null;const fr=get1(u,"HeartRateBpm"),Ar=nodeVal(get1(u,"Time"));return get1(u,"AltitudeMeters",(u=>{const fr=parseFloat(nodeVal(u));isNaN(fr)||Xe.push(fr)})),{coordinates:Xe,time:Ar||null,heartRate:fr?parseFloat(nodeVal(fr)):null,extensions:getProperties(u,Bg)}}function getPoints(u){const Xe=$(u,"Trackpoint"),fr=[],Ar=[],_r=[];if(Xe.length<2)return null;const wr={},Kr={extendedProperties:wr};for(let u=0;u<Xe.length;u++){const Kr=coordPair(Xe[u]);if(null===Kr)continue;fr.push(Kr.coordinates);const{time:In,heartRate:io,extensions:no}=Kr;In&&Ar.push(In),io&&_r.push(io);for(const[fr,Ar]of no)wr[fr]||(wr[fr]=Array(Xe.length).fill(null)),wr[fr][u]=Ar}return fr.length<2?null:Object.assign(Kr,{line:fr,times:Ar,heartRates:_r})}function getLap(u){const Xe=$(u,"Track"),fr=[],Ar=[],_r=[],wr=[];let Kr;const In=Object.assign(Object.fromEntries(getProperties(u,Zg)),get(u,"Name",(u=>({name:nodeVal(u)}))));for(const u of Xe)Kr=getPoints(u),Kr&&(fr.push(Kr.line),Kr.times.length&&Ar.push(Kr.times),Kr.heartRates.length&&_r.push(Kr.heartRates),wr.push(Kr.extendedProperties));for(let u=0;u<wr.length;u++){const Ar=wr[u];for(const _r in Ar)1===Xe.length?Kr&&(In[_r]=Kr.extendedProperties[_r]):(In[_r]||(In[_r]=fr.map((u=>Array(u.length).fill(null)))),In[_r][u]=Ar[_r])}return 0===fr.length?null:((Ar.length||_r.length)&&(In.coordinateProperties=Object.assign(Ar.length?{times:1===fr.length?Ar[0]:Ar}:{},_r.length?{heart:1===fr.length?_r[0]:_r}:{})),{type:"Feature",properties:In,geometry:1===fr.length?{type:"LineString",coordinates:fr[0]}:{type:"MultiLineString",coordinates:fr}})}function*tcxGen(u){for(const Xe of $(u,"Lap")){const u=getLap(Xe);u&&(yield u)}for(const Xe of $(u,"Courses")){const u=getLap(Xe);u&&(yield u)}}function fixColor(u,Xe){const fr={},Ar="stroke"==Xe||"fill"===Xe?Xe:Xe+"-color";return"#"===u[0]&&(u=u.substring(1)),6===u.length||3===u.length?fr[Ar]="#"+u:8===u.length&&(fr[Xe+"-opacity"]=parseInt(u.substring(0,2),16)/255,fr[Ar]="#"+u.substring(6,8)+u.substring(4,6)+u.substring(2,4)),fr}function numericProperty(u,Xe,fr){const Ar={};return num1(u,Xe,(u=>{Ar[fr]=u})),Ar}function getColor(u,Xe){return get(u,"color",(u=>fixColor(nodeVal(u),Xe)))}function extractIconHref(u){return get(u,"Icon",((u,Xe)=>(val1(u,"href",(u=>{Xe.icon=u})),Xe)))}function extractStyle(u){return Object.assign({},function extractPoly(u){return get(u,"PolyStyle",((u,Xe)=>Object.assign(Xe,get(u,"color",(u=>fixColor(nodeVal(u),"fill"))),val1(u,"fill",(u=>{if("0"===u)return{"fill-opacity":0}})),val1(u,"outline",(u=>{if("0"===u)return{"stroke-opacity":0}})))))}(u),function extractLine(u){return get(u,"LineStyle",(u=>Object.assign(getColor(u,"stroke"),numericProperty(u,"width","stroke-width"))))}(u),function extractLabel(u){return get(u,"LabelStyle",(u=>Object.assign(getColor(u,"label"),numericProperty(u,"scale","label-scale"))))}(u),function extractIcon(u){return get(u,"IconStyle",(u=>Object.assign(getColor(u,"icon"),numericProperty(u,"scale","icon-scale"),numericProperty(u,"heading","icon-heading"),get(u,"hotSpot",(u=>{const Xe=parseFloat(u.getAttribute("x")||""),fr=parseFloat(u.getAttribute("y")||""),Ar=u.getAttribute("xunits")||"",_r=u.getAttribute("yunits")||"";return isNaN(Xe)||isNaN(fr)?{}:{"icon-offset":[Xe,fr],"icon-offset-units":[Ar,_r]}})),extractIconHref(u))))}(u))}const toNumber=u=>Number(u),Gg={string:u=>u,int:toNumber,uint:toNumber,short:toNumber,ushort:toNumber,float:toNumber,double:toNumber,bool:u=>Boolean(u)};function extractExtendedData(u,Xe){return get(u,"ExtendedData",((u,fr)=>{for(const Xe of $(u,"Data"))fr[Xe.getAttribute("name")||""]=nodeVal(get1(Xe,"value"));for(const Ar of $(u,"SimpleData")){const u=Ar.getAttribute("name")||"",_r=Xe[u]||Gg.string;fr[u]=_r(nodeVal(Ar))}return fr}))}function getMaybeHTMLDescription(u){const Xe=get1(u,"description");for(const u of Array.from(Xe?.childNodes||[]))if(4===u.nodeType)return{description:{"@type":"html",value:nodeVal(u)}};return{}}function extractTimeSpan(u){return get(u,"TimeSpan",(u=>({timespan:{begin:nodeVal(get1(u,"begin")),end:nodeVal(get1(u,"end"))}})))}function extractTimeStamp(u){return get(u,"TimeStamp",(u=>({timestamp:nodeVal(get1(u,"when"))})))}function extractCascadedStyle(u,Xe){return val1(u,"styleUrl",(u=>(u=normalizeId(u),Xe[u]?Object.assign({styleUrl:u},Xe[u]):{styleUrl:u})))}const Rg=/\s*/g,Vg=/^\s*|\s*$/g,Wg=/\s+/;function coord1(u){return u.replace(Rg,"").split(",").map(parseFloat).filter((u=>!isNaN(u))).slice(0,3)}function coord(u){return u.replace(Vg,"").split(Wg).map(coord1).filter((u=>u.length>=2))}function gxCoords(u){let Xe=$(u,"coord");0===Xe.length&&(Xe=function $ns(u,Xe,fr){return Array.from(u.getElementsByTagNameNS(fr,Xe))}(u,"coord","*"));const fr=Xe.map((u=>nodeVal(u).split(" ").map(parseFloat)));return 0===fr.length?null:{geometry:fr.length>2?{type:"LineString",coordinates:fr}:{type:"Point",coordinates:fr[0]},times:$(u,"when").map((u=>nodeVal(u)))}}function fixRing(u){if(0===u.length)return u;const Xe=u[0],fr=u[u.length-1];let Ar=!0;for(let u=0;u<Math.max(Xe.length,fr.length);u++)if(Xe[u]!==fr[u]){Ar=!1;break}return Ar?u:u.concat([u[0]])}function getCoordinates(u){return nodeVal(get1(u,"coordinates"))}function getGeometry(u){let Xe=[],fr=[];for(let Ar=0;Ar<u.childNodes.length;Ar++){const _r=u.childNodes.item(Ar);if(isElement(_r))switch(_r.tagName){case"MultiGeometry":case"MultiTrack":case"gx:MultiTrack":{const u=getGeometry(_r);Xe=Xe.concat(u.geometries),fr=fr.concat(u.coordTimes);break}case"Point":{const u=coord1(getCoordinates(_r));u.length>=2&&Xe.push({type:"Point",coordinates:u});break}case"LinearRing":case"LineString":{const u=coord(getCoordinates(_r));u.length>=2&&Xe.push({type:"LineString",coordinates:u});break}case"Polygon":{const u=[];for(const Xe of $(_r,"LinearRing")){const fr=fixRing(coord(getCoordinates(Xe)));fr.length>=4&&u.push(fr)}u.length&&Xe.push({type:"Polygon",coordinates:u});break}case"Track":case"gx:Track":{const u=gxCoords(_r);if(!u)break;const{times:Ar,geometry:wr}=u;Xe.push(wr),Ar.length&&fr.push(Ar);break}}}return{geometries:Xe,coordTimes:fr}}function getPlacemark(u,Xe,fr,Ar){const{coordTimes:_r,geometries:wr}=getGeometry(u),Kr=function geometryListToGeometry(u){return 0===u.length?null:1===u.length?u[0]:{type:"GeometryCollection",geometries:u}}(wr);if(!Kr&&Ar.skipNullGeometry)return null;const In={type:"Feature",geometry:Kr,properties:Object.assign(getMulti(u,["name","address","visibility","open","phoneNumber","description"]),getMaybeHTMLDescription(u),extractCascadedStyle(u,Xe),extractStyle(u),extractExtendedData(u,fr),extractTimeSpan(u),extractTimeStamp(u),_r.length?{coordinateProperties:{times:1===_r.length?_r[0]:_r}}:{})};void 0!==In.properties?.visibility&&(In.properties.visibility="0"!==In.properties.visibility);const io=u.getAttribute("id");return null!==io&&""!==io&&(In.id=io),In}function getGroundOverlayBox(u){if(get1(u,"gx:LatLonQuad")){return{geometry:{type:"Polygon",coordinates:[fixRing(coord(getCoordinates(u)))]}}}return function getLatLonBox(u){const Xe=get1(u,"LatLonBox");if(Xe){const u=num1(Xe,"north"),fr=num1(Xe,"west"),Ar=num1(Xe,"east"),_r=num1(Xe,"south"),wr=num1(Xe,"rotation");if("number"==typeof u&&"number"==typeof _r&&"number"==typeof fr&&"number"==typeof Ar){const Xe=[fr,_r,Ar,u];let Kr=[[[fr,u],[Ar,u],[Ar,_r],[fr,_r],[fr,u]]];return"number"==typeof wr&&(Kr=function rotateBox(u,Xe,fr){const Ar=[(u[0]+u[2])/2,(u[1]+u[3])/2];return[Xe[0].map((u=>{const Xe=u[1]-Ar[1],_r=u[0]-Ar[0],wr=Math.sqrt(Math.pow(Xe,2)+Math.pow(_r,2)),Kr=Math.atan2(Xe,_r)+fr*Tg;return[Ar[0]+Math.cos(Kr)*wr,Ar[1]+Math.sin(Kr)*wr]}))]}(Xe,Kr,wr)),{bbox:Xe,geometry:{type:"Polygon",coordinates:Kr}}}}return null}(u)}const Tg=Math.PI/180;function getGroundOverlay(u,Xe,fr,Ar){const _r=getGroundOverlayBox(u),wr=_r?.geometry||null;if(!wr&&Ar.skipNullGeometry)return null;const Kr={type:"Feature",geometry:wr,properties:Object.assign({"@geometry-type":"groundoverlay"},getMulti(u,["name","address","visibility","open","phoneNumber","description"]),getMaybeHTMLDescription(u),extractCascadedStyle(u,Xe),extractStyle(u),extractIconHref(u),extractExtendedData(u,fr),extractTimeSpan(u),extractTimeStamp(u))};_r?.bbox&&(Kr.bbox=_r.bbox),void 0!==Kr.properties?.visibility&&(Kr.properties.visibility="0"!==Kr.properties.visibility);const In=u.getAttribute("id");return null!==In&&""!==In&&(Kr.id=In),Kr}function getStyleId(u){let Xe=u.getAttribute("id");const fr=u.parentNode;return!Xe&&isElement(fr)&&"CascadingStyle"===fr.localName&&(Xe=fr.getAttribute("kml:id")||fr.getAttribute("id")),normalizeId(Xe||"")}function buildStyleMap(u){const Xe={};for(const fr of $(u,"Style"))Xe[getStyleId(fr)]=extractStyle(fr);for(const fr of $(u,"StyleMap")){const u=normalizeId(fr.getAttribute("id")||"");val1(fr,"styleUrl",(fr=>{fr=normalizeId(fr),Xe[fr]&&(Xe[u]=Xe[fr])}))}return Xe}function buildSchema(u){const Xe={};for(const fr of $(u,"SimpleField"))Xe[fr.getAttribute("name")||""]=Gg[fr.getAttribute("type")||""]||Gg.string;return Xe}const Mg=["name","visibility","open","address","description","phoneNumber","visibility"];function*kmlGen(u,Xe={skipNullGeometry:!1}){const fr=buildStyleMap(u),Ar=buildSchema(u);for(const _r of $(u,"Placemark")){const u=getPlacemark(_r,fr,Ar,Xe);u&&(yield u)}for(const _r of $(u,"GroundOverlay")){const u=getGroundOverlay(_r,fr,Ar,Xe);u&&(yield u)}}var Pg=Object.freeze({__proto__:null,gpx:function gpx(u){return{type:"FeatureCollection",features:Array.from(gpxGen(u))}},gpxGen:gpxGen,kml:function kml(u,Xe={skipNullGeometry:!1}){return{type:"FeatureCollection",features:Array.from(kmlGen(u,Xe))}},kmlGen:kmlGen,kmlWithFolders:function kmlWithFolders(u,Xe={skipNullGeometry:!1}){const fr=buildStyleMap(u),Ar=buildSchema(u),_r={type:"root",children:[]};return function traverse(u,Xe,_r){if(isElement(u))switch(u.tagName){case"GroundOverlay":{const wr=getGroundOverlay(u,fr,Ar,_r);wr&&Xe.children.push(wr);break}case"Placemark":{const wr=getPlacemark(u,fr,Ar,_r);wr&&Xe.children.push(wr);break}case"Folder":{const fr=function getFolder(u){const Xe={};for(const fr of Array.from(u.childNodes))isElement(fr)&&Mg.includes(fr.tagName)&&(Xe[fr.tagName]=nodeVal(fr));return{type:"folder",meta:Xe,children:[]}}(u);Xe.children.push(fr),Xe=fr;break}}if(u.childNodes)for(let fr=0;fr<u.childNodes.length;fr++)traverse(u.childNodes[fr],Xe,_r)}(u,_r,Xe),_r},tcx:function tcx(u){return{type:"FeatureCollection",features:Array.from(tcxGen(u))}},tcxGen:tcxGen}),Jg={exports:{}};!function(u){var Xe={};function py2_round(u){return Math.floor(Math.abs(u)+.5)*(u>=0?1:-1)}function encode(u,Xe,fr){var Ar=2*((u=py2_round(u*fr))-(Xe=py2_round(Xe*fr)));Ar<0&&(Ar=-Ar-1);for(var _r="";Ar>=32;)_r+=String.fromCharCode(63+(32|31&Ar)),Ar/=32;return _r+=String.fromCharCode(63+(0|Ar))}function flipped(u){for(var Xe=[],fr=0;fr<u.length;fr++){var Ar=u[fr].slice();Xe.push([Ar[1],Ar[0]])}return Xe}Xe.decode=function(u,Xe){for(var fr,Ar=0,_r=0,wr=0,Kr=[],In=0,io=0,no=null,oo=Math.pow(10,Number.isInteger(Xe)?Xe:5);Ar<u.length;){no=null,In=1,io=0;do{io+=(31&(no=u.charCodeAt(Ar++)-63))*In,In*=32}while(no>=32);fr=1&io?(-io-1)/2:io/2,In=1,io=0;do{io+=(31&(no=u.charCodeAt(Ar++)-63))*In,In*=32}while(no>=32);_r+=fr,wr+=1&io?(-io-1)/2:io/2,Kr.push([_r/oo,wr/oo])}return Kr},Xe.encode=function(u,Xe){if(!u.length)return"";for(var fr=Math.pow(10,Number.isInteger(Xe)?Xe:5),Ar=encode(u[0][0],0,fr)+encode(u[0][1],0,fr),_r=1;_r<u.length;_r++){var wr=u[_r],Kr=u[_r-1];Ar+=encode(wr[0],Kr[0],fr),Ar+=encode(wr[1],Kr[1],fr)}return Ar},Xe.fromGeoJSON=function(u,fr){if(u&&"Feature"===u.type&&(u=u.geometry),!u||"LineString"!==u.type)throw new Error("Input must be a GeoJSON LineString");return Xe.encode(flipped(u.coordinates),fr)},Xe.toGeoJSON=function(u,fr){return{type:"LineString",coordinates:flipped(Xe.decode(u,fr))}},u.exports&&(u.exports=Xe)}(Jg);var zg=Jg.exports,Fg=(()=>{const first=u=>u[0],last=u=>u[u.length-1],coordsToKey=u=>u.join(","),addToMap=(u,Xe,fr)=>{let Ar=u[Xe];Ar?Ar.push(fr):u[Xe]=[fr]},removeFromMap=(u,Xe,fr)=>{let Ar=u[Xe],_r=null;Ar&&(_r=Ar.indexOf(fr))>=0&&Ar.splice(_r,1)},getFirstFromMap=(u,Xe)=>{let fr=u[Xe];return fr&&fr.length>0?fr[0]:null},isRing=u=>u.length>3&&coordsToKey(first(u))===coordsToKey(last(u)),ringDirection=(u,Xe,fr)=>{Xe=Xe||0,fr=fr||1;let Ar=u.reduce(((fr,Ar,_r)=>u[fr][Xe]>Ar[Xe]?fr:_r),0),_r=Ar<=0?u.length-2:Ar-1,wr=Ar>=u.length-1?1:Ar+1,Kr=u[_r][Xe],In=u[Ar][Xe],io=u[wr][Xe],no=u[_r][fr],oo=u[Ar][fr];return(In-Kr)*(u[wr][fr]-no)-(io-Kr)*(oo-no)<0?"clockwise":"counterclockwise"},strToFloat=u=>u instanceof Array?u.map(strToFloat):parseFloat(u);class RefElements extends Map{constructor(){super(),this.binders=[]}add(u,Xe){this.has(u)||this.set(u,Xe)}addBinder(u){this.binders.push(u)}bindAll(){this.binders.forEach((u=>u.bind()))}}return{purgeProps:(u,Xe)=>{if(u){let fr=Object.assign({},u);if(Xe)for(let u of Xe)delete fr[u];return fr}return{}},mergeProps:(u,Xe)=>(u=u||{},Xe=Xe||{},Object.assign(u,Xe)),first:first,last:last,coordsToKey:coordsToKey,addToMap:addToMap,removeFromMap:removeFromMap,getFirstFromMap:getFirstFromMap,isRing:isRing,ringDirection:ringDirection,ptInsidePolygon:(u,Xe,fr,Ar)=>{fr=fr||0,Ar=Ar||1;let _r=!1;for(let wr=0,Kr=Xe.length-1;wr<Xe.length;Kr=wr++)(Xe[wr][fr]<=u[fr]&&u[fr]<Xe[Kr][fr]||Xe[Kr][fr]<=u[fr]&&u[fr]<Xe[wr][fr])&&u[Ar]<(Xe[Kr][Ar]-Xe[wr][Ar])*(u[fr]-Xe[wr][fr])/(Xe[Kr][fr]-Xe[wr][fr])+Xe[wr][Ar]&&(_r=!_r);return _r},strToFloat:strToFloat,RefElements:RefElements,LateBinder:class LateBinder{constructor(u,Xe,fr,Ar){this.container=u,this.valueFunc=Xe,this.ctx=fr,this.args=Ar}bind(){let u=this.valueFunc.apply(this.ctx,this.args);if(this.container instanceof Array){let Xe=this.container.indexOf(this);if(Xe>=0){let fr=[Xe,1];u&&fr.push(u),[].splice.apply(this.container,fr)}}else if("object"==typeof this.container){let Xe=Object.keys(this.container).find((u=>this.container[u]===this));Xe&&(u?this.container[Xe]=u:delete this.container[Xe])}}},WayCollection:class WayCollection extends Array{constructor(){super(),this.firstMap={},this.lastMap={}}addWay(u){(u=u.toCoordsArray()).length>0&&(this.push(u),addToMap(this.firstMap,coordsToKey(first(u)),u),addToMap(this.lastMap,coordsToKey(last(u)),u))}toStrings(){let u=[],Xe=null;for(;Xe=this.shift();){removeFromMap(this.firstMap,coordsToKey(first(Xe)),Xe),removeFromMap(this.lastMap,coordsToKey(last(Xe)),Xe);let fr=Xe,Ar=null;do{let u=coordsToKey(last(fr)),Xe=!1;Ar=getFirstFromMap(this.firstMap,u),Ar||(Ar=getFirstFromMap(this.lastMap,u),Xe=!0),Ar&&(this.splice(this.indexOf(Ar),1),removeFromMap(this.firstMap,coordsToKey(first(Ar)),Ar),removeFromMap(this.lastMap,coordsToKey(last(Ar)),Ar),Xe&&(Ar.length>fr.length&&([fr,Ar]=[Ar,fr]),Ar.reverse()),fr=fr.concat(Ar.slice(1)))}while(Ar);u.push(strToFloat(fr))}return u}toRings(u){let Xe=this.toStrings(),fr=[],Ar=null;for(;Ar=Xe.shift();)isRing(Ar)&&(ringDirection(Ar)!==u&&Ar.reverse(),fr.push(Ar));return fr}}}})(),Eg={building:{},highway:{whitelist:["services","rest_area","escape","elevator"]},natural:{blacklist:["coastline","cliff","ridge","arete","tree_row"]},landuse:{},waterway:{whitelist:["riverbank","dock","boatyard","dam"]},amenity:{},leisure:{},barrier:{whitelist:["city_wall","ditch","hedge","retaining_wall","wall","spikes"]},railway:{whitelist:["station","turntable","roundhouse","platform"]},area:{},boundary:{},man_made:{blacklist:["cutline","embankment","pipeline"]},power:{whitelist:["plant","substation","generator","transformer"]},place:{},shop:{},aeroway:{blacklist:["taxiway"]},tourism:{},historic:{},public_transport:{},office:{},"building:part":{},military:{},ruins:{},"area:highway":{},craft:{},golf:{},indoor:{}},Xg=(()=>{const{first:u,last:Xe,coordsToKey:fr,addToMap:Ar,removeFromMap:_r,getFirstFromMap:wr,isRing:Kr,ringDirection:In,ptInsidePolygon:io,strToFloat:no,LateBinder:oo,WayCollection:so}=Fg,ao=Eg;class OsmObject{constructor(u,Xe,fr){this.type=u,this.id=Xe,this.refElems=fr,this.tags={},this.props={id:this.getCompositeId()},this.refCount=0,this.hasTag=!1,fr&&fr.add(this.getCompositeId(),this)}addTags(u){this.tags=Object.assign(this.tags,u),this.hasTag=!!u}addTag(u,Xe){this.tags[u]=Xe,this.hasTag=!!u}addProp(u,Xe){this.props[u]=Xe}addProps(u){this.props=Object.assign(this.props,u)}getCompositeId(){return`${this.type}/${this.id}`}getProps(){return Object.assign(this.props,this.tags)}toFeatureArray(){return[]}}class Node extends OsmObject{constructor(u,Xe){super("node",u,Xe),this.latLng=null}setLatLng(u){this.latLng=u}toFeatureArray(){return this.latLng?[{type:"Feature",id:this.getCompositeId(),properties:this.getProps(),geometry:{type:"Point",coordinates:no([this.latLng.lon,this.latLng.lat])}}]:[]}getLatLng(){return this.latLng}}class Way extends OsmObject{constructor(u,Xe){super("way",u,Xe),this.latLngArray=[],this.isPolygon=!1}addLatLng(u){this.latLngArray.push(u)}setLatLngArray(u){this.latLngArray=u}addNodeRef(u){let Xe=new oo(this.latLngArray,(function(u){let Xe=this.refElems.get(`node/${u}`);if(Xe)return Xe.refCount++,Xe.getLatLng()}),this,[u]);this.latLngArray.push(Xe),this.refElems.addBinder(Xe)}analyzeGeometryType(u,Xe){let fr=ao[u];fr&&(this.isPolygon=!0,fr.whitelist?this.isPolygon=fr.whitelist.indexOf(Xe)>=0:fr.blacklist&&(this.isPolygon=!(fr.blacklist.indexOf(Xe)>=0)))}addTags(u){super.addTags(u);for(let[Xe,fr]of Object.entries(u))this.analyzeGeometryType(Xe,fr)}addTag(u,Xe){super.addTag(u,Xe),this.analyzeGeometryType(u,Xe)}toCoordsArray(){return this.latLngArray.map((u=>[u.lon,u.lat]))}toFeatureArray(){let u=this.toCoordsArray();if(u.length>1){u=no(u);let Xe={type:"Feature",id:this.getCompositeId(),properties:this.getProps(),geometry:{type:"LineString",coordinates:u}};return this.isPolygon&&Kr(u)?("counterclockwise"!==In(u)&&u.reverse(),Xe.geometry={type:"Polygon",coordinates:[u]},[Xe]):[Xe]}return[]}}return{Node:Node,Way:Way,Relation:class Relation extends OsmObject{constructor(u,Xe){super("relation",u,Xe),this.relations=[],this.nodes=[],this.bounds=null}setBounds(u){this.bounds=u}addMember(u){switch(u.type){case"relation":let Xe=new oo(this.relations,(function(u){let Xe=this.refElems.get(`relation/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);this.relations.push(Xe),this.refElems.addBinder(Xe);break;case"way":u.role||(u.role="");let fr=this[u.role];if(fr||(fr=this[u.role]=[]),u.geometry){let Xe=new Way(u.ref,this.refElems);Xe.setLatLngArray(u.geometry),Xe.refCount++,fr.push(Xe)}else if(u.nodes){let Xe=new Way(u.ref,this.refElems);for(let fr of u.nodes)Xe.addNodeRef(fr);Xe.refCount++,fr.push(Xe)}else{let Xe=new oo(fr,(function(u){let Xe=this.refElems.get(`way/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);fr.push(Xe),this.refElems.addBinder(Xe)}break;case"node":let Ar=null;if(u.lat&&u.lon){Ar=new Node(u.ref,this.refElems),Ar.setLatLng({lon:u.lon,lat:u.lat}),u.tags&&Ar.addTags(u.tags);for(let[Xe,fr]of Object.entries(u))["id","type","lat","lon"].indexOf(Xe)<0&&Ar.addProp(Xe,fr);Ar.refCount++,this.nodes.push(Ar)}else{let Xe=new oo(this.nodes,(function(u){let Xe=this.refElems.get(`node/${u}`);if(Xe)return Xe.refCount++,Xe}),this,[u.ref]);this.nodes.push(Xe),this.refElems.addBinder(Xe)}}}toFeatureArray(){let Xe=[],fr=[],Ar=[];const _r=["outer","inner",""];for(let u of this.relations)if(u)for(let Xe of _r){let fr=u[Xe];if(fr){let u=this[Xe];u?[].splice.apply(u,[u.length,0].concat(fr)):this[Xe]=fr}}for(let u of _r){let Xe=this[u];if(Xe){this[u]=new so;for(let fr of Xe)this[u].addWay(fr)}}let wr=null,Kr={type:"Feature",id:this.getCompositeId(),bbox:this.bounds,properties:this.getProps()};this.bounds||delete Kr.bbox,this.outer?(wr=((Xe,fr)=>{let Ar=Xe?Xe.toRings("counterclockwise"):[],_r=fr?fr.toRings("clockwise"):[];if(Ar.length>0){let Xe=[],fr=null;for(fr of Ar)Xe.push([fr]);for(;fr=_r.shift();)for(let _r in Ar)if(io(u(fr),Ar[_r])){Xe[_r].push(fr);break}return 1===Xe.length?{type:"Polygon",coordinates:Xe[0]}:{type:"MultiPolygon",coordinates:Xe}}return null})(this.outer,this.inner),wr&&(Kr.geometry=wr,Xe.push(Kr))):this[""]&&(wr=(u=>{let Xe=u?u.toStrings():[];return Xe.length>0?1===Xe.length?{type:"LineString",coordinates:Xe[0]}:{type:"MultiLineString",coordinates:Xe}:null})(this[""]),wr&&(Kr.geometry=wr,fr.push(Kr)));for(let u of this.nodes)Ar=Ar.concat(u.toFeatureArray());return Xe.concat(fr).concat(Ar)}}}})(),Hg=(()=>{function conditioned(u){return null!=u.match(/^(.+?)\[(.+?)\]>$/g)}function parseEvent(u){let Xe=/^(.+?)\[(.+?)\]>$/g.exec(u);return Xe?{evt:Xe[1]+">",exp:Xe[2]}:{evt:u}}return class{constructor(u){u&&(this.queryParent=!!u.queryParent,this.progressive=u.progressive,this.queryParent&&(this.parentMap=new WeakMap)),this.evtListeners={}}parse(u,Xe,fr){fr=fr?fr+".":"";let Ar=/<([^ >\/]+)(.*?)>/gm,_r=null,wr=[];for(;_r=Ar.exec(u);){let Kr=_r[1],In={$tag:Kr},io=fr+Kr,no=_r[2].trim(),oo=!1;(no.endsWith("/")||Kr.startsWith("?")||Kr.startsWith("!"))&&(oo=!0);let so=/([^ ]+?)="(.+?)"/g,ao=/([^ ]+?)='(.+?)'/g,co=null,go=!1;for(;co=so.exec(no);)go=!0,In[co[1]]=co[2];if(!go)for(;co=ao.exec(no);)go=!0,In[co[1]]=co[2];if(go||""===no||(In.text=no),this.progressive&&this.emit(`<${io}>`,In,Xe),!oo){let Xe=new RegExp(`([^]+?)</${Kr}>`,"g");Xe.lastIndex=Ar.lastIndex;let fr=Xe.exec(u);if(fr&&fr[1]){Ar.lastIndex=Xe.lastIndex;let u=this.parse(fr[1],In,io);u.length>0?In.$innerNodes=u:In.$innerText=fr[1]}}this.queryParent&&Xe&&this.parentMap.set(In,Xe),this.progressive&&this.emit(`</${io}>`,In,Xe),wr.push(In)}return wr}getParent(u){return this.queryParent?this.parentMap.get(u):null}#t(u,Xe){let fr=this.evtListeners[u];fr?fr.push(Xe):this.evtListeners[u]=[Xe]}addListener(u,Xe){conditioned(u)&&(u=parseEvent(u),Xe.condition=function genConditionFunc(u){let Xe="return "+u.replace(/(\$.+?)(?=[=!.])/g,"node.$&")+";";return new Function("node",Xe)}(u.exp),u=u.evt),this.#t(u,Xe)}#e(u,Xe){let fr=this.evtListeners[u],Ar=null;fr&&(Ar=fr.indexOf(Xe))>=0&&fr.splice(Ar,1)}removeListener(u,Xe){conditioned(u)&&(u=(u=parseEvent(u)).evt),this.#e(u,Xe)}emit(u,...Xe){let fr=this.evtListeners[u];if(fr)for(let u of fr)u.condition?!0===u.condition.apply(null,Xe)&&u.apply(null,Xe):u.apply(null,Xe)}on(u,Xe){this.addListener(u,Xe)}off(u,Xe){this.removeListener(u,Xe)}}})();const{Node:Kg,Way:Lg,Relation:Dg}=Xg,{purgeProps:Yg,RefElements:Ng}=Fg,Og=Hg;var lib=(u,Xe)=>{let fr=!1,Ar=!1,_r=!0;(u=>{if(u){fr=!(!u.completeFeature&&!u.allFeatures),Ar=!!u.renderTagged;let Xe=u.suppressWay||u.excludeWay;void 0===Xe||Xe||(_r=!1)}})(Xe);let wr=(u=>u.elements?"json":u.indexOf("<osm")>=0?"xml":u.trim().startsWith("{")?"json-raw":"invalid")(u),Kr=new Ng,In=[];"json-raw"===wr&&(wr=(u=JSON.parse(u)).elements?"json":"invalid"),"json"===wr?(u=>{for(let Xe of u.elements)switch(Xe.type){case"node":let u=new Kg(Xe.id,Kr);Xe.tags&&u.addTags(Xe.tags),u.addProps(Yg(Xe,["id","type","tags","lat","lon"])),u.setLatLng(Xe);break;case"way":let fr=new Lg(Xe.id,Kr);if(Xe.tags&&fr.addTags(Xe.tags),fr.addProps(Yg(Xe,["id","type","tags","nodes","geometry"])),Xe.nodes)for(let u of Xe.nodes)fr.addNodeRef(u);else Xe.geometry&&fr.setLatLngArray(Xe.geometry);break;case"relation":let Ar=new Dg(Xe.id,Kr);if(Xe.bounds&&Ar.setBounds([parseFloat(Xe.bounds.minlon),parseFloat(Xe.bounds.minlat),parseFloat(Xe.bounds.maxlon),parseFloat(Xe.bounds.maxlat)]),Xe.tags&&Ar.addTags(Xe.tags),Ar.addProps(Yg(Xe,["id","type","tags","bounds","members"])),Xe.members)for(let u of Xe.members)Ar.addMember(u)}})(u):"xml"===wr&&(u=>{const Xe=new Og({progressive:!0});Xe.on("</osm.node>",(u=>{let Xe=new Kg(u.id,Kr);for(let[fr,Ar]of Object.entries(u))!fr.startsWith("$")&&["id","lon","lat"].indexOf(fr)<0&&Xe.addProp(fr,Ar);if(Xe.setLatLng(u),u.$innerNodes)for(let fr of u.$innerNodes)"tag"===fr.$tag&&Xe.addTag(fr.k,fr.v)})),Xe.on("</osm.way>",(u=>{let Xe=new Lg(u.id,Kr);for(let[fr,Ar]of Object.entries(u))!fr.startsWith("$")&&["id"].indexOf(fr)<0&&Xe.addProp(fr,Ar);if(u.$innerNodes)for(let fr of u.$innerNodes)"nd"===fr.$tag?fr.lon&&fr.lat?Xe.addLatLng(fr):fr.ref&&Xe.addNodeRef(fr.ref):"tag"===fr.$tag&&Xe.addTag(fr.k,fr.v)})),Xe.on("<osm.relation>",(u=>{new Dg(u.id,Kr)})),Xe.on("</osm.relation.member>",((u,Xe)=>{let fr=Kr.get(`relation/${Xe.id}`),Ar={type:u.type,role:u.role?u.role:"",ref:u.ref};if(u.lat&&u.lon){Ar.lat=u.lat,Ar.lon=u.lon,Ar.tags={};for(let[Xe,fr]of Object.entries(u))!Xe.startsWith("$")&&["type","lat","lon"].indexOf(Xe)<0&&(Ar[Xe]=fr)}if(u.$innerNodes){let Xe=[],fr=[];for(let Ar of u.$innerNodes)Ar.lat&&Ar.lon?Xe.push(Ar):fr.push(Ar.ref);Xe.length>0?Ar.geometry=Xe:fr.length>0&&(Ar.nodes=fr)}fr.addMember(Ar)})),Xe.on("</osm.relation.bounds>",((u,Xe)=>{Kr.get(`relation/${Xe.id}`).setBounds([parseFloat(u.minlon),parseFloat(u.minlat),parseFloat(u.maxlon),parseFloat(u.maxlat)])})),Xe.on("</osm.relation.tag>",((u,Xe)=>{Kr.get(`relation/${Xe.id}`).addTag(u.k,u.v)})),Xe.parse(u)})(u),Kr.bindAll();for(let u of Kr.values())if(u.refCount<=0||u.hasTag&&Ar&&!(u instanceof Lg&&_r)){let Xe=u.toFeatureArray();if(u instanceof Dg&&!fr&&Xe.length>0)return Xe[0].geometry;In=In.concat(Xe)}return{type:"FeatureCollection",features:In}},jg=getDefaultExportFromCjs(lib);const Ug=["topojson","osm","kml","gpx","tcx","csv","tsv","polyline"];class Converter{constructor(u,Xe,fr={}){this.blankGeoJSON=()=>({type:"FeatureCollection",features:[]}),this._rawData=Xe,this._format=u,this._options=fr;const Ar={topojson:this.loadTopoJson,osm:this.loadOsm,kml:this.loadXml,gpx:this.loadXml,tcx:this.loadXml,csv:this.loadCsv,tsv:this.loadCsv,polyline:this.loadPolyline};this._conversionFn=Ar[u]}async convert(){return this._conversionFn?this._conversionFn():new Promise(((u,Xe)=>Xe(`No converter exists for ${this._format}`)))}async loadXml(){return Pg[this._format]((new DOMParser).parseFromString(this._rawData,"text/xml"))}async loadCsv(){let u=this._options.csvOptions||{};"tsv"===this._format&&(u.delimiter="\t");return await new Promise(((Xe,fr)=>{Sg.csv2geojson(this._rawData,u,((u,Ar)=>{u?fr(u):Xe(Ar)}))}))}async loadTopoJson(){let u={};try{u=JSON.parse(this._rawData)}catch(u){throw"Invalid TopoJson"}let Xe=this.blankGeoJSON();return"Topology"===u.type&&void 0!==u.objects&&(Xe={type:"FeatureCollection",features:Xe.features=Object.keys(u.objects).map((Xe=>function topojsonFeature(u,Xe){return"string"==typeof Xe&&(Xe=u.objects[Xe]),"GeometryCollection"===Xe.type?{type:"FeatureCollection",features:Xe.geometries.map((function(Xe){return feature(u,Xe)}))}:feature(u,Xe)}(u,Xe))).reduce(((u,Xe)=>[...u,...Xe.features]),[])}),Xe}async loadOsm(){return jg(this._rawData)}async loadPolyline(){let u=this._options.polylineOptions||{};return await new Promise(((Xe,fr)=>{try{const fr=zg.toGeoJSON(this._rawData,u.precision);let Ar=fr;"point"===u.type?1===fr.coordinates.length?Ar={type:"Point",coordinates:fr.coordinates[0]}:console.warn("Cannot convert polyline to "+u.type):"polygon"===u.type&&(fr.coordinates[0][0]===fr.coordinates[fr.coordinates.length-1][0]&&fr.coordinates[0][1]===fr.coordinates[fr.coordinates.length-1][1]?Ar={type:"Polygon",coordinates:[fr.coordinates]}:console.warn("Cannot convert polyline to "+u.type)),Xe({type:"FeatureCollection",features:[{type:"Feature",geometry:Ar,properties:u.properties||{}}]})}catch(u){fr(u)}}))}}var Qg=null;try{var qg="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof __non_webpack_require__&&__non_webpack_require__("worker_threads")||"function"==typeof require&&require("worker_threads");Qg=qg.Worker}catch(e){}function createBase64WorkerFactory$2(u,Xe,fr){var Ar=function decodeBase64$1(u,Xe){return Buffer.from(u,"base64").toString("utf8")}(u),_r=Ar.indexOf("\n",10)+1,wr=Ar.substring(_r)+"";return function WorkerFactory(u){return new Qg(wr,Object.assign({},u,{eval:!0}))}}function createURL(u,Xe,fr){var Ar=function decodeBase64(u,Xe){return atob(u)}(u),_r=Ar.indexOf("\n",10)+1,wr=Ar.substring(_r)+"",Kr=new Blob([wr],{type:"application/javascript"});return URL.createObjectURL(Kr)}var $g="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var nh=function createBase64WorkerFactory(u,Xe,fr){return function isNodeJS(){return $g}()?createBase64WorkerFactory$2(u):function createBase64WorkerFactory$1(u,Xe,fr){var Ar;return function WorkerFactory(Xe){return Ar=Ar||createURL(u),new Worker(Ar,Xe)}}(u)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewoJJ3VzZSBzdHJpY3QnOwoKCWZ1bmN0aW9uIGdldERlZmF1bHRFeHBvcnRGcm9tQ2pzICh4KSB7CgkJcmV0dXJuIHggJiYgeC5fX2VzTW9kdWxlICYmIE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbCh4LCAnZGVmYXVsdCcpID8geFsnZGVmYXVsdCddIDogeDsKCX0KCglmdW5jdGlvbiBnZXRBdWdtZW50ZWROYW1lc3BhY2UobikgewoJICBpZiAobi5fX2VzTW9kdWxlKSByZXR1cm4gbjsKCSAgdmFyIGYgPSBuLmRlZmF1bHQ7CgkJaWYgKHR5cGVvZiBmID09ICJmdW5jdGlvbiIpIHsKCQkJdmFyIGEgPSBmdW5jdGlvbiBhICgpIHsKCQkJCWlmICh0aGlzIGluc3RhbmNlb2YgYSkgewoJICAgICAgICByZXR1cm4gUmVmbGVjdC5jb25zdHJ1Y3QoZiwgYXJndW1lbnRzLCB0aGlzLmNvbnN0cnVjdG9yKTsKCQkJCX0KCQkJCXJldHVybiBmLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7CgkJCX07CgkJCWEucHJvdG90eXBlID0gZi5wcm90b3R5cGU7CgkgIH0gZWxzZSBhID0ge307CgkgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShhLCAnX19lc01vZHV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ga2V5Q291bnQobykgewoJICAgIHJldHVybiAodHlwZW9mIG8gPT0gJ29iamVjdCcpID8gT2JqZWN0LmtleXMobykubGVuZ3RoIDogMDsKCX0KCglmdW5jdGlvbiBhdXRvRGVsaW1pdGVyKHgpIHsKCSAgICB2YXIgZGVsaW1pdGVycyA9IFsnLCcsICc7JywgJ1x0JywgJ3wnXTsKCSAgICB2YXIgcmVzdWx0cyA9IFtdOwoKCSAgICBkZWxpbWl0ZXJzLmZvckVhY2goZnVuY3Rpb24gKGRlbGltaXRlcikgewoJICAgICAgICB2YXIgcmVzID0gZHN2LmRzdkZvcm1hdChkZWxpbWl0ZXIpLnBhcnNlKHgpOwoJICAgICAgICBpZiAocmVzLmxlbmd0aCA+PSAxKSB7CgkgICAgICAgICAgICB2YXIgY291bnQgPSBrZXlDb3VudChyZXNbMF0pOwoJICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCByZXMubGVuZ3RoOyBpKyspIHsKCSAgICAgICAgICAgICAgICBpZiAoa2V5Q291bnQocmVzW2ldKSAhPT0gY291bnQpIHJldHVybjsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIHJlc3VsdHMucHVzaCh7CgkgICAgICAgICAgICAgICAgZGVsaW1pdGVyOiBkZWxpbWl0ZXIsCgkgICAgICAgICAgICAgICAgYXJpdHk6IE9iamVjdC5rZXlzKHJlc1swXSkubGVuZ3RoLAoJICAgICAgICAgICAgfSk7CgkgICAgICAgIH0KCSAgICB9KTsKCgkgICAgaWYgKHJlc3VsdHMubGVuZ3RoKSB7CgkgICAgICAgIHJldHVybiByZXN1bHRzLnNvcnQoZnVuY3Rpb24gKGEsIGIpIHsKCSAgICAgICAgICAgIHJldHVybiBiLmFyaXR5IC0gYS5hcml0eTsKCSAgICAgICAgfSlbMF0uZGVsaW1pdGVyOwoJICAgIH0gZWxzZSB7CgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIH0KCX0KCgkvKioKCSAqIFNpbGx5IHN0b3BnYXAgZ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3R5cGU6ICduYW1lJywgcHJvcGVydGllczoge25hbWU6IGNyc319OwoJICAgIH0KCgkgICAgaWYgKG9wdGlvbnMuZGVsaW1pdGVyID09PSAnYXV0bycgJiYgdHlwZW9mIHggPT0gJ3N0cmluZycpIHsKCSAgICAgICAgb3B0aW9ucy5kZWxpbWl0ZXIgPSBhdXRvRGVsaW1pdGVyKHgpOwoJICAgICAgICBpZiAoIW9wdGlvbnMuZGVsaW1pdGVyKSB7CgkgICAgICAgICAgICBjYWxsYmFjayh7CgkgICAgICAgICAgICAgICAgdHlwZTogJ0Vycm9yJywKCSAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQ291bGQgbm90IGF1dG9kZXRlY3QgZGVsaW1pdGVyJwoJICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICByZXR1cm47CgkgICAgICAgIH0KCSAgICB9CgoJICAgIHZhciBudW1lcmljRmllbGRzID0gb3B0aW9ucy5udW1lcmljRmllbGRzID8gb3B0aW9ucy5udW1lcmljRmllbGRzLnNwbGl0KCcsJykgOiBudWxsOwoKCSAgICB2YXIgcGFyc2VkID0gKHR5cGVvZiB4ID09ICdzdHJpbmcnKSA/CgkgICAgICAgIGRzdi5kc3ZGb3JtYXQob3B0aW9ucy5kZWxpbWl0ZXIpLnBhcnNlKHgsIGZ1bmN0aW9uIChkKSB7CgkgICAgICAgICAgICBpZiAobnVtZXJpY0ZpZWxkcykgewoJICAgICAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBkKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChudW1lcmljRmllbGRzLmluY2x1ZGVzKGtleSkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGRba2V5XSA9ICtkW2tleV07CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICByZXR1cm4gZDsKCSAgICAgICAgfSkgOiB4OwoKCSAgICBpZiAoIXBhcnNlZC5sZW5ndGgpIHsKC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gICBsb25mLCBsYXRmLAoJICAgICAgICAgICAgICAgIGE7CgoJICAgICAgICAgICAgYSA9IHNleGFnZXNpbWFsKGxvbmssICdFVycpOwoJICAgICAgICAgICAgaWYgKGEpIGxvbmsgPSBhOwoJICAgICAgICAgICAgYSA9IHNleGFnZXNpbWFsKGxhdGssICdOUycpOwoJICAgICAgICAgICAgaWYgKGEpIGxhdGsgPSBhOwoKCSAgICAgICAgICAgIGxvbmYgPSBwYXJzZUZsb2F0KGxvbmspOwoJICAgICAgICAgICAgbGF0ZiA9IHBhcnNlRmxvYXQobGF0ayk7CgoJICAgICAgICAgICAgaWYgKGlzTmFOKGxvbmYpIHx8CgkgICAgICAgICAgICAgICAgaXNOYU4obGF0ZikpIHsKCSAgICAgICAgICAgICAgICBlcnJvcnMucHVzaCh7CgkgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdBIHJvdyBjb250YWluZWQgYW4gaW52YWxpZCB2YWx1ZSBmb3IgbGF0aXR1ZGUgb3IgbG9uZ2l0dWRlJywKCSAgICAgICAgICAgICAgICAgICAgcm93OiBwYXJzZWRbaV0sCgkgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpCgkgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgIGlmICghb3B0aW9ucy5pbmNsdWRlTGF0TG9uKSB7CgkgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBwYXJzZWRbaV1bbG9uZmllbGRdOwoJICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyc2VkW2ldW2xhdGZpZWxkXTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGZlYXR1cmVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHBhcnNlZFtpXSwKCSAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdQb2ludCcsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogWwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRmxvYXQobG9uZiksCgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VGbG9hdChsYXRmKQoJICAgICAgICAgICAgICAgICAgICAgICAgXQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCSAgICB9CgoJICAgIGNhbGxiYWNrKGVycm9ycy5sZW5ndGggPyBlcnJvcnMgOiBudWxsLCBmZWF0dXJlY29sbGVjdGlvbik7Cgl9CgoJZnVuY3Rpb24gdG9MaW5lKGdqKSB7CgkgICAgdmFyIGZlYXR1cmVzID0gZ2ouZmVhdHVyZXM7CgkgICAgdmFyIGxpbmUgPSB7CgkgICAgICAgIHR5cGU6ICdGZWF0dXJlJywKCSAgICAgICAgZ2VvbWV0cnk6IHsKCSAgICAgICAgICAgIHR5cGU6ICdMaW5lU3RyaW5nJywKCSAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBbXQoJICAgICAgICB9CgkgICAgfTsKCSAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZlYXR1cmVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIGxpbmUuZ2VvbWV0cnkuY29vcmRpbmF0ZXMucHVzaChmZWF0dXJlc1tpXS5nZW9tZXRyeS5jb29yZGluYXRlcyk7CgkgICAgfQoJICAgIGxpbmUucHJvcGVydGllcyA9IGZlYXR1cmVzLnJlZHVjZShmdW5jdGlvbiAoYWdncmVnYXRlZFByb3BlcnRpZXMsIG5ld0ZlYXR1cmUpIHsKCSAgICAgICAgZm9yICh2YXIga2V5IGluIG5ld0ZlYXR1cmUucHJvcGVydGllcykgewoJICAgICAgICAgICAgaWYgKCFhZ2dyZWdhdGVkUHJvcGVydGllc1trZXldKSB7CgkgICAgICAgICAgICAgICAgYWdncmVnYXRlZFByb3BlcnRpZXNba2V5XSA9IFtdOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgYWdncmVnYXRlZFByb3BlcnRpZXNba2V5XS5wdXNoKG5ld0ZlYXR1cmUucHJvcGVydGllc1trZXldKTsKCSAgICAgICAgfQoJICAgICAgICByZXR1cm4gYWdncmVnYXRlZFByb3BlcnRpZXM7CgkgICAgfSwge30pOwoJICAgIHJldHVybiB7CgkgICAgICAgIHR5cGU6ICdGZWF0dXJlQ29sbGVjdGlvbicsCgkgICAgICAgIGZlYXR1cmVzOiBbbGluZV0KCSAgICB9OwoJfQoKCWZ1bmN0aW9uIHRvUG9seWdvbihnaikgewoJICAgIHZhciBmZWF0dXJlcyA9IGdqLmZlYXR1cmVzOwoJICAgIHZhciBwb2x5ID0gewoJICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICB0eXBlOiAnUG9seWdvbicsCgkgICAgICAgICAgICBjb29yZGluYXRlczogW1tdXQoJICAgICAgICB9CgkgICAgfTsKCSAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZlYXR1cmVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIHBvbHkuZ2VvbWV0cnkuY29vcmRpbmF0ZXNbMF0ucHVzaChmZWF0dXJlc1tpXS5nZW9tZXRyeS5jb29yZGluYXRlcyk7CgkgICAgfQoJICAgIHBvbHkucHJvcGVydGllcyA9IGZlYXR1cmVzLnJlZHVjZShmdW5jdGlvbiAoYWdncmVnYXRlZFByb3BlcnRpZXMsIG5ld0ZlYXR1cmUpIHsKCSAgICAgICAgZm9yICh2YXIga2V5IGluIG5ld0ZlYXR1cmUucHJvcGVydGllcykgewoJICAgICAgICAgICAgaWYgKCFhZ2dyZWdhdGVkUHJvcGVydGllc1trZXldKSB7CgkgICAgICAgICAgICAgICAgYWdncmVnYXRlZFByb3BlcnRpZXNba2V5XSA9IFtdO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GVtZW50LgoJICovCglmdW5jdGlvbiBnZXRQb2ludHMkMShub2RlLCBwb2ludG5hbWUpIHsKCSAgICBjb25zdCBwdHMgPSAkKG5vZGUsIHBvaW50bmFtZSk7CgkgICAgY29uc3QgbGluZSA9IFtdOwoJICAgIGNvbnN0IHRpbWVzID0gW107CgkgICAgY29uc3QgZXh0ZW5kZWRWYWx1ZXMgPSB7fTsKCSAgICBmb3IgKGxldCBpID0gMDsgaSA8IHB0cy5sZW5ndGg7IGkrKykgewoJICAgICAgICBjb25zdCBjID0gY29vcmRQYWlyJDEocHRzW2ldKTsKCSAgICAgICAgaWYgKCFjKSB7CgkgICAgICAgICAgICBjb250aW51ZTsKCSAgICAgICAgfQoJICAgICAgICBsaW5lLnB1c2goYy5jb29yZGluYXRlcyk7CgkgICAgICAgIGlmIChjLnRpbWUpCgkgICAgICAgICAgICB0aW1lcy5wdXNoKGMudGltZSk7CgkgICAgICAgIGZvciAoY29uc3QgW25hbWUsIHZhbF0gb2YgYy5leHRlbmRlZFZhbHVlcykgewoJICAgICAgICAgICAgY29uc3QgcGx1cmFsID0gbmFtZSA9PT0gImhlYXJ0IiA/IG5hbWUgOiBuYW1lLnJlcGxhY2UoImdweHRweDoiLCAiIikgKyAicyI7CgkgICAgICAgICAgICBpZiAoIWV4dGVuZGVkVmFsdWVzW3BsdXJhbF0pIHsKCSAgICAgICAgICAgICAgICBleHRlbmRlZFZhbHVlc1twbHVyYWxdID0gQXJyYXkocHRzLmxlbmd0aCkuZmlsbChudWxsKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGV4dGVuZGVkVmFsdWVzW3BsdXJhbF1baV0gPSB2YWw7CgkgICAgICAgIH0KCSAgICB9CgkgICAgaWYgKGxpbmUubGVuZ3RoIDwgMikKCSAgICAgICAgcmV0dXJuOyAvLyBJbnZhbGlkIGxpbmUgaW4gR2VvSlNPTgoJICAgIHJldHVybiB7CgkgICAgICAgIGxpbmU6IGxpbmUsCgkgICAgICAgIHRpbWV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ICAgICAgICAgICBjb25zdCBbbmFtZSwgdmFsXSA9IGVudHJpZXNbaV07CgkgICAgICAgICAgICBpZiAobXVsdGkpIHsKCSAgICAgICAgICAgICAgICBpZiAoIXByb3BzW25hbWVdKSB7CgkgICAgICAgICAgICAgICAgICAgIHByb3BzW25hbWVdID0gZXh0cmFjdGVkTGluZXMubWFwKChsaW5lKSA9PiBuZXcgQXJyYXkobGluZS5saW5lLmxlbmd0aCkuZmlsbChudWxsKSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIHByb3BzW25hbWVdW2ldID0gdmFsOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgcHJvcHNbbmFtZV0gPSB2YWw7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCSAgICB9CgkgICAgcmV0dXJuIHsKCSAgICAgICAgdHlwZTogIkZlYXR1cmUiLAoJICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wZXJ0aWVzLAoJICAgICAgICBnZW9tZXRyeTogbXVsdGkKCSAgICAgICAgICAgID8gewoJICAgICAgICAgICAgICAgIHR5cGU6ICJNdWx0aUxpbmVTdHJpbmciLAoJICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiB0cmFjaywKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIDogewoJICAgICAgICAgICAgICAgIHR5cGU6ICJMaW5lU3RyaW5nIiwKCSAgICAgICAgICAgICAgICBjb29yZGluYXRlczogdHJhY2tbMF0sCgkgICAgICAgICAgICB9LAoJICAgIH07Cgl9CgkvKioKCSAqIEV4dHJhY3QgYSBwb2ludCwgaWYgcG9zc2libGUsIGZyb20gYSBnaXZlbiBub2RlLAoJICogd2hpY2ggaXMgdXN1YWxseSBhIHdwdCBvciB0cmtwdAoJICovCglmdW5jdGlvbiBnZXRQb2ludChub2RlKSB7CgkgICAgY29uc3QgcHJvcGVydGllcyA9IE9iamVjdC5hc3NpZ24oZXh0cmFjdFBy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RWxlbWVudCkgfTsKCSAgICB9KSk7CgkgICAgZm9yIChjb25zdCBzZWdtZW50IG9mIHNlZ21lbnRzKSB7CgkgICAgICAgIGxpbmUgPSBnZXRQb2ludHMoc2VnbWVudCk7CgkgICAgICAgIGlmIChsaW5lKSB7CgkgICAgICAgICAgICB0cmFjay5wdXNoKGxpbmUubGluZSk7CgkgICAgICAgICAgICBpZiAobGluZS50aW1lcy5sZW5ndGgpCgkgICAgICAgICAgICAgICAgdGltZXMucHVzaChsaW5lLnRpbWVzKTsKCSAgICAgICAgICAgIGlmIChsaW5lLmhlYXJ0UmF0ZXMubGVuZ3RoKQoJICAgICAgICAgICAgICAgIGhlYXJ0UmF0ZXMucHVzaChsaW5lLmhlYXJ0UmF0ZXMpOwoJICAgICAgICAgICAgYWxsRXh0ZW5kZWRQcm9wZXJ0aWVzLnB1c2gobGluZS5leHRlbmRlZFByb3BlcnRpZXMpOwoJICAgICAgICB9CgkgICAgfQoJICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYWxsRXh0ZW5kZWRQcm9wZXJ0aWVzLmxlbmd0aDsgaSsrKSB7CgkgICAgICAgIGNvbnN0IGV4dGVuZGVkUHJvcGVydGllcyA9IGFsbEV4dGVuZGVkUHJvcGVydGllc1tpXTsKCSAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBleHRlbmRlZFByb3BlcnRpZXMpIHsKCSAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGggPT09IDEpIHsKCSAgICAgICAgICAgICAgICBpZiAobGluZSkgewoJICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzW3Byb3BlcnR5XSA9IGxpbmUuZXh0ZW5kZWRQcm9wZXJ0aWVzW3Byb3BlcnR5XTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICBlbHNlIHsKCSAgICAgICAgICAgICAgICBpZiAoIXByb3BlcnRpZXNbcHJvcGVydHldKSB7CgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXNbcHJvcGVydHldID0gdHJhY2subWFwKCh0cmFjaykgPT4gQXJyYXkodHJhY2subGVuZ3RoKS5maWxsKG51bGwpKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgcHJvcGVydGllc1twcm9wZXJ0eV1baV0gPSBleHRlbmRlZFByb3BlcnRpZXNbcHJvcGVydHldOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfQoJICAgIGlmICh0cmFjay5sZW5ndGggPT09IDApCgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIGlmICh0aW1lcy5sZW5ndGggfHwgaGVhcnRSYXRlcy5sZW5ndGgpIHsKCSAgICAgICAgcHJvcGVydGllcy5jb29yZGluYXRlUHJvcGVydGllcyA9IE9iamVjdC5hc3NpZ24odGltZXMubGVuZ3RoCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICB0aW1lczogdHJhY2subGVuZ3RoID09PSAxID8gdGltZXNbMF0gOiB0aW1lcywKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIDoge30sIGhlYXJ0UmF0ZXMubGVuZ3RoCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICBoZWFydDogdHJhY2subGVuZ3RoID09PSAxID8gaGVhcnRSYXRlc1swXSA6IGhlYXJ0UmF0ZXMsCgkgICAgICAgICAgICB9CgkgICAgICAgICAgICA6IHt9KTsKCSAgICB9CgkgICAgcmV0dXJuIHsKCSAgICAgICAgdHlwZTogIkZlYXR1cmUiLAoJICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wZXJ0aWVzLAoJICAgICAgICBnZW9tZXRyeTogdHJhY2subGVuZ3RoID09PSAxCgkgICAgICAgICAgICA/IHsKCSAgICAgICAgICAgICAgICB0eXBlOiAiTGluZVN0cmluZyIsCgkgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXM6IHRyYWNrWzBdLAoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgOiB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gIGlmICghaXNOYU4obGVmdCkgJiYgIWlzTmFOKHRvcCkpCgkgICAgICAgICAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICAgICAgImljb24tb2Zmc2V0IjogW2xlZnQsIHRvcF0sCgkgICAgICAgICAgICAgICAgICAgICJpY29uLW9mZnNldC11bml0cyI6IFt4dW5pdHMsIHl1bml0c10sCgkgICAgICAgICAgICAgICAgfTsKCSAgICAgICAgICAgIHJldHVybiB7fTsKCSAgICAgICAgfSksIGV4dHJhY3RJY29uSHJlZihpY29uU3R5bGUpKTsKCSAgICB9KTsKCX0KCWZ1bmN0aW9uIGV4dHJhY3RMYWJlbChub2RlKSB7CgkgICAgcmV0dXJuIGdldChub2RlLCAiTGFiZWxTdHlsZSIsIChsYWJlbFN0eWxlKSA9PiB7CgkgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKGdldENvbG9yKGxhYmVsU3R5bGUsICJsYWJlbCIpLCBudW1lcmljUHJvcGVydHkobGFiZWxTdHlsZSwgInNjYWxlIiwgImxhYmVsLXNjYWxlIikpOwoJICAgIH0pOwoJfQoJZnVuY3Rpb24gZXh0cmFjdExpbmUobm9kZSkgewoJICAgIHJldHVybiBnZXQobm9kZSwgIkxpbmVTdHlsZSIsIChsaW5lU3R5bGUpID0+IHsKCSAgICAgICAgcmV0dXJuIE9iamVjdC5hc3NpZ24oZ2V0Q29sb3IobGluZVN0eWxlLCAic3Ryb2tlIiksIG51bWVyaWNQcm9wZXJ0eShsaW5lU3R5bGUsICJ3aWR0aCIsICJzdHJva2Utd2lkdGgiKSk7CgkgICAgfSk7Cgl9CglmdW5jdGlvbiBleHRyYWN0UG9seShub2RlKSB7CgkgICAgcmV0dXJuIGdldChub2RlLCAiUG9seVN0eWxlIiwgKHBvbHlTdHlsZSwgcHJvcGVydGllcykgPT4gewoJICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihwcm9wZXJ0aWVzLCBnZXQocG9seVN0eWxlLCAiY29sb3IiLCA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kgICAgfQoJICAgIGlmICghZXF1YWwpIHsKCSAgICAgICAgcmV0dXJuIHJpbmcuY29uY2F0KFtyaW5nWzBdXSk7CgkgICAgfQoJICAgIHJldHVybiByaW5nOwoJfQoJZnVuY3Rpb24gZ2V0Q29vcmRpbmF0ZXMobm9kZSkgewoJICAgIHJldHVybiBub2RlVmFsKGdldDEobm9kZSwgImNvb3JkaW5hdGVzIikpOwoJfQoJZnVuY3Rpb24gZ2V0R2VvbWV0cnkobm9kZSkgewoJICAgIGxldCBnZW9tZXRyaWVzID0gW107CgkgICAgbGV0IGNvb3JkVGltZXMgPSBbXTsKCSAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5vZGUuY2hpbGROb2Rlcy5sZW5ndGg7IGkrKykgewoJICAgICAgICBjb25zdCBjaGlsZCA9IG5vZGUuY2hpbGROb2Rlcy5pdGVtKGkpOwoJICAgICAgICBpZiAoaXNFbGVtZW50KGNoaWxkKSkgewoJICAgICAgICAgICAgc3dpdGNoIChjaGlsZC50YWdOYW1lKSB7CgkgICAgICAgICAgICAgICAgY2FzZSAiTXVsdGlHZW9tZXRyeSI6CgkgICAgICAgICAgICAgICAgY2FzZSAiTXVsdGlUcmFjayI6CgkgICAgICAgICAgICAgICAgY2FzZSAiZ3g6TXVsdGlUcmFjayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGRHZW9tZXRyaWVzID0gZ2V0R2VvbWV0cnkoY2hpbGQpOwoJICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzID0gZ2VvbWV0cmllcy5jb25jYXQoY2hpbGRHZW9tZXRyaWVzLmdlb21ldHJpZXMpOwoJICAgICAgICAgICAgICAgICAgICBjb29yZFRpbWVzID0gY29vcmRUaW1lcy5jb25jYXQoY2hpbGRHZW9tZXRyaWVzLmNvb3JkVGltZXMpOwoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgY2FzZSAiUG9pbnQiOiB7CgkgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvb3JkaW5hdGVzID0gY29vcmQxKGdldENvb3JkaW5hdGVzKGNoaWxkKSk7CgkgICAgICAgICAgICAgICAgICAgIGlmIChjb29yZGluYXRlcy5sZW5ndGggPj0gMikgewoJICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cmllcy5wdXNoKHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAiUG9pbnQiLAoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzLAoJICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIkxpbmVhclJpbmciOgoJICAgICAgICAgICAgICAgIGNhc2UgIkxpbmVTdHJpbmciOiB7CgkgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvb3JkaW5hdGVzID0gY29vcmQoZ2V0Q29vcmRpbmF0ZXMoY2hpbGQpKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGNvb3JkaW5hdGVzLmxlbmd0aCA+PSAyKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJMaW5lU3RyaW5nIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlcywKCSAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBjYXNlICJQb2x5Z29uIjogewoJICAgICAgICAgICAgICAgICAgICBjb25zdCBjb29yZHMgPSBbXTsKCSAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBsaW5lYXJSaW5nIG9mICQoY2hpbGQsICJMaW5lYXJSaW5nIikpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJpbmcgPSBmaXhSaW5nKGNvb3JkKGdldENvb3JkaW5hdGVzKGxpbmVhclJpbmcpKSk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmluZy5sZW5ndGggPj0gNCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3Jkcy5wdXNoKHJpbmcpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGlmIChjb29yZHMubGVuZ3RoKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJQb2x5Z29uIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogY29vcmRzLAoJICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIlRyYWNrIjoKCSAgICAgICAgICAgICAgICBjYXNlICJneDpUcmFjayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgZ3ggPSBneENvb3JkcyhjaGlsZCk7CgkgICAgICAgICAgICAgICAgICAgIGlmICghZ3gpCgkgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgeyB0aW1lcywgZ2VvbWV0cnkgfSA9IGd4OwoJICAgICAgICAgICAgICAgICAgICBnZW9tZXRyaWVzLnB1c2goZ2VvbWV0cnkpOwoJICAgICAgICAgICAgICAgICAgICBpZiAodGltZXMubGVuZ3RoKQoJICAgICAgICAgICAgICAgICAgICAgICAgY29vcmRUaW1lcy5wdXNoKHRpbWVzKTsKCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfQoJICAgIHJldHVybiB7CgkgICAgICAgIGdlb21ldHJpZXMsCgkgICAgICAgIGNvb3JkVGltZXMsCgkgICAgfTsKCX0KCglmdW5jdGlvbiBnZW9tZXRyeUxpc3RUb0dlb21ldHJ5KGdlb21ldHJpZXMpIHsKCSAgICByZXR1cm4gZ2VvbWV0cmllcy5sZW5ndGggPT09IDAKCSAgICAgICAgPyBudWxsCgkgICAgICAgIDogZ2VvbWV0cmllcy5sZW5ndGggPT09IDEKCSAgICAgICAgICAgID8gZ2VvbWV0cmllc1swXQoJICAgICAgICAgICAgOiB7CgkgICAgICAgICAgICAgICAgdHlwZTogIkdlb21ldHJ5Q29sbGVjdGlvbiIsCgkgICAgICAgICAgICAgICAgZ2VvbWV0cmllcywKCSAgICAgICAgICAgIH07Cgl9CglmdW5jdGlvbiBnZXRQbGFjZW1hcmsobm9kZSwgc3R5bGVNYXAsIHNjaGVtYSwgb3B0aW9ucykgewoJICAgIGNvbnN0IHsgY29vcmRUaW1lcywgZ2VvbWV0cmllcyB9ID0gZ2V0R2VvbWV0cnkobm9kZSk7CgkgICAgY29uc3QgZ2VvbWV0cnkgPSBnZW9tZXRyeUxpc3RUb0dlb21ldHJ5KGdlb21ldHJpZXMpOwoJICAgIGlmICghZ2VvbWV0cnkgJiYgb3B0aW9ucy5za2lwTnVsbEdlb21ldHJ5KSB7CgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIH0KCSAgICBjb25zdCBmZWF0dXJlID0gewoJICAgICAgICB0eXBlOiAiRmVhdHVyZSIsCgkgICAgICAgIGdlb21ldHJ5LAoJICAgICAgICBwcm9wZXJ0aWVzOiBPYmplY3QuYXNzaWduKGdldE11bHRpKG5vZGUsIFsKCSAgICAgICAgICAgICJuYW1lIiwKCSAgICAgICAgICAgICJhZGRyZXNzIiwKCSAgICAgICA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G5vZGUsICJneDpMYXRMb25RdWFkIik7CgkgICAgaWYgKGxhdExvblF1YWQpIHsKCSAgICAgICAgY29uc3QgcmluZyA9IGZpeFJpbmcoY29vcmQoZ2V0Q29vcmRpbmF0ZXMobm9kZSkpKTsKCSAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgdHlwZTogIlBvbHlnb24iLAoJICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBbcmluZ10sCgkgICAgICAgICAgICB9LAoJICAgICAgICB9OwoJICAgIH0KCSAgICByZXR1cm4gZ2V0TGF0TG9uQm94KG5vZGUpOwoJfQoJY29uc3QgREVHUkVFU19UT19SQURJQU5TID0gTWF0aC5QSSAvIDE4MDsKCWZ1bmN0aW9uIHJvdGF0ZUJveChiYm94LCBjb29yZGluYXRlcywgcm90YXRpb24pIHsKCSAgICBjb25zdCBjZW50ZXIgPSBbKGJib3hbMF0gKyBiYm94WzJdKSAvIDIsIChiYm94WzFdICsgYmJveFszXSkgLyAyXTsKCSAgICByZXR1cm4gWwoJICAgICAgICBjb29yZGluYXRlc1swXS5tYXAoKGNvb3JkaW5hdGUpID0+IHsKCSAgICAgICAgICAgIGNvbnN0IGR5ID0gY29vcmRpbmF0ZVsxXSAtIGNlbnRlclsxXTsKCSAgICAgICAgICAgIGNvbnN0IGR4ID0gY29vcmRpbmF0ZVswXSAtIGNlbnRlclswXTsKCSAgICAgICAgICAgIGNvbnN0IGRpc3RhbmNlID0gTWF0aC5zcXJ0KE1hdGgucG93KGR5LCAyKSArIE1hdGgucG93KGR4LCAyKSk7CgkgICAgICAgICAgICBjb25zdCBhbmdsZSA9IE1hdGguYXRhbjIoZHksIGR4KSArIHJvdGF0aW9uICogREVHUkVFU19UT19SQURJQU5TOwoJICAgICAgICAgICAgcmV0dXJuIFsKCSAgICAgICAgICAgICAgICBjZW50ZXJbMF0gKyBNYXRoLmNvcyhhbmdsZSkgKiBkaXN0YW5jZSwKCSAgICAgICAgICAgICAgICBjZW50ZXJbMV0gKyBNYXRoLnNpbihhbmdsZSkgKiBkaXN0YW5jZSwKCSAgICAgICAgICAgIF07CgkgICAgICAgIH0pLAoJICAgIF07Cgl9CglmdW5jdGlvbiBnZXRMYXRMb25Cb3gobm9kZSkgewoJICAgIGNvbnN0IGxhdExvbkJveCA9IGdldDEobm9kZSwgIkxhdExvbkJveCIpOwoJICAgIGlmIChsYXRMb25Cb3gpIHsKCSAgICAgICAgY29uc3Qgbm9ydGggPSBudW0xKGxhdExvbkJveCwgIm5vcnRoIik7CgkgICAgICAgIGNvbnN0IHdlc3QgPSBudW0xKGxhdExvbkJveCwgIndlc3QiKTsKCSAgICAgICAgY29uc3QgZWFzdCA9IG51bTEobGF0TG9uQm94LCAiZWFzdCIpOwoJICAgICAgICBjb25zdCBzb3V0aCA9IG51bTEobGF0TG9uQm94LCAic291dGgiKTsKCSAgICAgICAgY29uc3Qgcm90YXRpb24gPSBudW0xKGxhdExvbkJveCwgInJvdGF0aW9uIik7CgkgICAgICAgIGlmICh0eXBlb2Ygbm9ydGggPT09ICJudW1iZXIiICYmCgkgICAgICAgICAgICB0eXBlb2Ygc291dGggPT09ICJudW1iZXIiICYmCgkgICAgICAgICAgICB0eXBlb2Ygd2VzdCA9PT0gIm51bWJlciIgJiYKCSAgICAgICAgICAgIHR5cGVvZiBlYXN0ID09PSAibnVtYmVyIikgewoJICAgICAgICAgICAgY29uc3QgYmJveCA9IFt3ZXN0LCBzb3V0aCwgZWFzdCwgbm9ydGhdOwoJICAgICAgICAgICAgbGV0IGNvb3JkaW5hdGVzID0gWwoJICAgICAgICAgICAgICAgIFsKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIG5vcnRoXSwKCSAgICAgICAgICAgICAgICAgICAgW2Vhc3QsIG5vcnRoXSwKCSAgICAgICAgICAgICAgICAgICAgW2Vhc3QsIHNvdXRoXSwKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIHNvdXRoXSwKCSAgICAgICAgICAgICAgICAgICAgW3dlc3QsIG5vcnRoXSwgLy8gdG9wIGxlZnQgKGFnYWluKQoJICAgICAgICAgICAgICAgIF0sCgkgICAgICAgICAgICBdOwoJICAgICAgICAgICAgaWYgKHR5cGVvZiByb3RhdGlvbiA9PT0gIm51bWJlciIpIHsKCSAgICAgICAgICAgICAgICBjb29yZGluYXRlcyA9IHJvdGF0ZUJveChiYm94LCBjb29yZGluYXRlcywgcm90YXRpb24pOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICBiYm94LAoJICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgICAgIHR5cGU6ICJQb2x5Z29uIiwKCSAgICAgICAgICAgICAgICAgICAgY29vcmRpbmF0ZXMsCgkgICAgICAgICAgICAgICAgfSwKCSAgICAgICAgICAgIH07CgkgICAgICAgIH0KCSAgICB9CgkgICAgcmV0dXJuIG51bGw7Cgl9CglmdW5jdGlvbiBnZXRHcm91bmRPdmVybGF5KG5vZGUsIHN0eWxlTWFwLCBzY2hlbWEsIG9wdGlvbnMpIHsKCSAgICBjb25zdCBib3ggPSBnZXRHcm91bmRPdmVybGF5Qm94KG5vZGUpOwoJICAgIGNvbnN0IGdlb21ldHJ5ID0gYm94Py5nZW9tZXRyeSB8fCBudWxsOwoJICAgIGlmICghZ2VvbWV0cnkgJiYgb3B0aW9ucy5za2lwTnVsbEdlb21ldHJ5KSB7CgkgICAgICAgIHJldHVybiBudWxsOwoJICAgIH0KCSAgICBjb25zdCBmZWF0dXJlID0gewoJICAgICAgICB0eXBlOiAiRmVhdHVyZSIsCgkgICAgICAgIGdlb21ldHJ5LAoJICAgICAgICBwcm9wZXJ0aWVzOiBPYmplY3QuYXNzaWduKAoJICAgICAgICAvKioKCSAgICAgICAgICogUmVsYXRlZCB0bwoJICAgICAgICAgKiBodHRwczovL2dpc3QuZ2l0aHViLmNvbS90bWN3LzAzN2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lcnMobm9kZSwgb3B0aW9ucyA9IHsKCSAgICBza2lwTnVsbEdlb21ldHJ5OiBmYWxzZSwKCX0pIHsKCSAgICBjb25zdCBzdHlsZU1hcCA9IGJ1aWxkU3R5bGVNYXAobm9kZSk7CgkgICAgY29uc3Qgc2NoZW1hID0gYnVpbGRTY2hlbWEobm9kZSk7CgkgICAgY29uc3QgdHJlZSA9IHsgdHlwZTogInJvb3QiLCBjaGlsZHJlbjogW10gfTsKCSAgICBmdW5jdGlvbiB0cmF2ZXJzZShub2RlLCBwb2ludGVyLCBvcHRpb25zKSB7CgkgICAgICAgIGlmIChpc0VsZW1lbnQobm9kZSkpIHsKCSAgICAgICAgICAgIHN3aXRjaCAobm9kZS50YWdOYW1lKSB7CgkgICAgICAgICAgICAgICAgY2FzZSAiR3JvdW5kT3ZlcmxheSI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgcGxhY2VtYXJrID0gZ2V0R3JvdW5kT3ZlcmxheShub2RlLCBzdHlsZU1hcCwgc2NoZW1hLCBvcHRpb25zKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKHBsYWNlbWFyaykgewoJICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlci5jaGlsZHJlbi5wdXNoKHBsYWNlbWFyayk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGNhc2UgIlBsYWNlbWFyayI6IHsKCSAgICAgICAgICAgICAgICAgICAgY29uc3QgcGxhY2VtYXJrID0gZ2V0UGxhY2VtYXJrKG5vZGUsIHN0eWxlTWFwLCBzY2hlbWEsIG9wdGlvbnMpOwoJICAgICAgICAgICAgICAgICAgICBpZiAocGxhY2VtYXJrKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBwb2ludGVyLmNoaWxkcmVuLnB1c2gocGxhY2VtYXJrKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgY2FzZSAiRm9sZGVyIjogewoJICAgICAgICAgICAgICAgICAgICBjb25zdCBmb2xkZXIgPSBnZXRGb2xkZXIobm9kZSk7CgkgICAgICAgICAgICAgICAgICAgIHBvaW50ZXIuY2hpbGRyZW4ucHVzaChmb2xkZXIpOwoJICAgICAgICAgICAgICAgICAgICBwb2ludGVyID0gZm9sZGVyOwoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCSAgICAgICAgaWYgKG5vZGUuY2hpbGROb2RlcykgewoJICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBub2RlLmNoaWxkTm9kZXMubGVuZ3RoOyBpKyspIHsKCSAgICAgICAgICAgICAgICB0cmF2ZXJzZShub2RlLmNoaWxkTm9kZXNbaV0sIHBvaW50ZXIsIG9wdGlvbnMpOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfQoJICAgIHRyYXZlcnNlKG5vZGUsIHRyZWUsIG9wdGlvbnMpOwoJICAgIHJldHVybiB0cmVlOwoJfQoJLyoqCgkgKiBDb252ZXJ0IEtNTCB0byBHZW9KU09OIGluY3JlbWVudGFsbHksIHJldHVybmluZwoJICogYSBbR2VuZXJhdG9yXShodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZy9lbi1VUy9kb2NzL1dlYi9KYXZhU2NyaXB0L0d1aWRlL0l0ZXJhdG9yc19hbmRfR2VuZXJhdG9ycykKCSAqIHRoYXQgeWllbGRzIG91dHB1dCBmZWF0dXJlIGJ5IGZlYXR1cmUuCgkgKi8KCWZ1bmN0aW9uKiBrbWxHZW4obm9kZSwgb3B0aW9ucyA9IHsKCSAgICBza2lwTnVsbEdlb21ldHJ5OiBmYWxzZSwKCX0pIHsKCSAgICBjb25zdCBzdHlsZU1hcCA9IGJ1aWxkU3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EsIG9iajIpID0+IHsKCSAgICAgICAgb2JqMSA9IG9iajEgPyBvYmoxIDoge307CgkgICAgICAgIG9iajIgPSBvYmoyID8gb2JqMiA6IHt9OwoJICAgICAgICByZXR1cm4gT2JqZWN0LmFzc2lnbihvYmoxLCBvYmoyKTsKCSAgICB9OwoKCSAgICBjb25zdCBmaXJzdCA9IGEgPT4gYVswXTsKCSAgICBjb25zdCBsYXN0ID0gYSA9PiBhW2EubGVuZ3RoIC0gMV07CgkgICAgY29uc3QgY29vcmRzVG9LZXkgPSBhID0+IGEuam9pbignLCcpOwoKCSAgICBjb25zdCBhZGRUb01hcCA9IChtLCBrLCB2KSA9PiB7CgkgICAgICAgIGxldCBhID0gbVtrXTsKCSAgICAgICAgaWYgKGEpIHsKCSAgICAgICAgICAgIGEucHVzaCh2KTsKCSAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgIG1ba10gPSBbdl07CgkgICAgICAgIH0KCSAgICB9OwoKCSAgICBjb25zdCByZW1vdmVGcm9tTWFwID0gKG0sIGssIHYpID0+IHsKCSAgICAgICAgbGV0IGEgPSBtW2tdOwoJICAgICAgICBsZXQgaWR4ID0gbnVsbDsKCSAgICAgICAgaWYgKGEgJiYgKGlkeCA9IGEuaW5kZXhPZih2KSkgPj0gMCkgewoJICAgICAgICAgICAgYS5zcGxpY2UoaWR4LCAxKTsKCSAgICAgICAgfQoJICAgIH07CgoJICAgIGNvbnN0IGdldEZpcnN0RnJvbU1hcCA9IChtLCBrKSA9PiB7CgkgICAgICAgIGxldCBhID0gbVtrXTsKCSAgICAgICAgaWYgKGEgJiYgYS5sZW5ndGggPiAwKSB7CgkgICAgICAgICAgICByZXR1cm4gYVswXTsKCSAgICAgICAgfQoJICAgICAgICByZXR1cm4gbnVsbDsKCSAgICB9OwoKCSAgICAvLyBuZWVkIDMrIGRpZmZlcmVudCBwb2ludHMgdG8gZm9ybSBhIHJpbmcsIGhlcmUgdXNpbmcgPiAzIGlzICdjb3ogYSB0aGUgZml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gICBjbGFzcyBSZWZFbGVtZW50cyBleHRlbmRzIE1hcCB7CgkgICAgICAgIGNvbnN0cnVjdG9yKCkgewoJICAgICAgICAgICAgc3VwZXIoKTsKCSAgICAgICAgICAgIHRoaXMuYmluZGVycyA9IFtdOwoJICAgICAgICB9CgoJICAgICAgICBhZGQoaywgdikgewoJICAgICAgICAgICAgaWYgKCF0aGlzLmhhcyhrKSkgewoJICAgICAgICAgICAgICAgIHRoaXMuc2V0KGssIHYpOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgLy8gc3VwcHJlc3MgZHVwbGNhdGVkIGtleSBlcnJvcgoJICAgICAgICAgICAgLy8gZWxzZQoJICAgICAgICAgICAgLy8gdGhyb3cgYEVycm9yOiBhZGRpbmcgZHVwbGljYXRlZCBrZXkgJyR7a30nIHRvIFJlZkVsZW1lbnRzYDsKCSAgICAgICAgfQoKCSAgICAgICAgYWRkQmluZGVyKGJpbmRlcikgewoJICAgICAgICAgICAgdGhpcy5iaW5kZXJzLnB1c2goYmluZGVyKTsKCSAgICAgICAgfQoKCSAgICAgICAgYmluZEFsbCgpIHsKCSAgICAgICAgICAgIHRoaXMuYmluZGVycy5mb3JFYWNoKGJpbmRlciA9PiBiaW5kZXIuYmluZCgpKTsKCSAgICAgICAgfQoJICAgIH0KCgkgICAgY2xhc3MgTGF0ZUJpbmRlciB7CgkgICAgICAgIGNvbnN0cnVjdG9yKGNvbnRhaW5lciwgdmFsdWVGdW5jLCBjdHgsIGFyZ3MpIHsKCSAgICAgICAgICAgIHRoaXMuY29udGFpbmVyID0gY29udGFpbmVyOwoJICAgICAgICAgICAgdGhpcy52YWx1ZUZ1bmMgPSB2YWx1ZUZ1bmM7CgkgICAgICAgICAgICB0aGlzLmN0eCA9IGN0eDsKCSAgICAgICAgICAgIHRoaXMuYXJncyA9IGFyZ3M7CgkgICAgICAgIH0KCgkgICAgICAgIGJpbmQoKSB7CgkgICAgICAgICAgICBsZXQgdiA9IHRoaXMudmFsdWVGdW5jLmFwcGx5KHRoaXMuY3R4LCB0aGlzLmFyZ3MpOwoJICAgICAgICAgICAgaWYgKHRoaXMuY29udGFpbmVyIGluc3RhbmNlb2YgQXJyYXkpIHsKCSAgICAgICAgICAgICAgICBsZXQgaWR4ID0gdGhpcy5jb250YWluZXIuaW5kZXhPZih0aGlzKTsKCSAgICAgICAgICAgICAgICBpZiAoaWR4ID49IDApIHsKCSAgICAgICAgICAgICAgICAgICAgbGV0IGFyZ3MgPSBbaWR4LCAxXTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKHYpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MucHVzaCh2KTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBbXS5zcGxpY2UuYXBwbHkodGhpcy5jb250YWluZXIsIGFyZ3MpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHRoaXMuY29udGFpbmVyID09PSAnb2JqZWN0JykgewoJICAgICAgICAgICAgICAgIGxldCBrID0gT2JqZWN0LmtleXModGhpcy5jb250YWluZXIpLmZpbmQodiA9PiB0aGlzLmNvbnRhaW5lclt2XSA9PT0gdGhpcyk7CgkgICAgICAgICAgICAgICAgaWYgKGspIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKHYpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29udGFpbmVyW2tdID0gdjsKCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmNvbnRhaW5lcltrXTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoJICAgIH0KCgkgICAgY2xhc3MgV2F5Q29sbGVjdGlvbiBleHRlbmRzIEFycmF5IHsKCSAgICAgICAgY29uc3RydWN0b3IoKSB7CgkgICAgICAgICAgICBzdXBlcigpOwoJICAgICAgICAgICAgdGhpcy5maXJzdE1hcCA9IHt9OwoJICAgICAgICAgICAgdGhpcy5sYXN0TWFwID0ge307CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFdheSh3YXkpIHsKCSAgICAgICAgICAgIHdheSA9IHdheS50b0Nvb3Jkc0FycmF5KCk7CgkgICAgICAgICAgICBpZiAod2F5Lmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICB0aGlzLnB1c2god2F5KTsKCSAgICAgICAgICAgICAgICBhZGRUb01hcCh0aGlzLmZpcnN0TWFwLCBjb29yZHNUb0tleShmaXJzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICBhZGRUb01hcCh0aGlzLmxhc3RNYXAsIGNvb3Jkc1RvS2V5KGxhc3Qod2F5KSksIHdheSk7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIHRvU3RyaW5ncygpIHsKCSAgICAgICAgICAgIGxldCBzdHJpbmdzID0gW10sIHdheSA9IG51bGw7CgkgICAgICAgICAgICB3aGlsZSAod2F5ID0gdGhpcy5zaGlmdCgpKSB7CgkgICAgICAgICAgICAgICAgcmVtb3ZlRnJvbU1hcCh0aGlzLmZpcnN0TWFwLCBjb29yZHNUb0tleShmaXJzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICByZW1vdmVGcm9tTWFwKHRoaXMubGFzdE1hcCwgY29vcmRzVG9LZXkobGFzdCh3YXkpKSwgd2F5KTsKCSAgICAgICAgICAgICAgICBsZXQgY3VycmVudCA9IHdheSwgbmV4dCA9IG51bGw7CgkgICAgICAgICAgICAgICAgZG8gewoJICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gY29vcmRzVG9LZXkobGFzdChjdXJyZW50KSksIHNob3VsZFJldmVyc2UgPSBmYWxzZTsKCgkgICAgICAgICAgICAgICAgICAgIG5leHQgPSBnZXRGaXJzdEZyb21NYXAodGhpcy5maXJzdE1hcCwga2V5KTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKCFuZXh0KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gZ2V0Rmlyc3RGcm9tTWFwKHRoaXMubGFzdE1hcCwga2V5KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHNob3VsZFJldmVyc2UgPSB0cnVlOwoJICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zcGxpY2UodGhpcy5pbmRleE9mKG5leHQpLCAxKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUZyb21NYXAodGhpcy5maXJzdE1hcCwgY29vcmRzVG9LZXkoZmlyc3QobmV4dCkpLCBuZXh0KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZUZyb21NYXAodGhpcy5sYXN0TWFwLCBjb29yZHNUb0tleShsYXN0KG5leHQpKSwgbmV4dCk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2hvdWxkUmV2ZXJzZSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFsd2F5cyByZXZlcnNlIHNob3J0ZXIgb25lIHRvIHNhdmUgdGltZQoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXh0Lmxlbmd0aCA+IGN1cnJlbnQubGVuZ3RoKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtjdXJyZW50LCBuZXh0XSA9IFtuZXh0LCBjdXJyZW50XTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dC5yZXZlcnNlKCk7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQuY29uY2F0KG5leHQuc2xpY2UoMSkpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfSB3aGlsZSAobmV4dCk7CgkgICAgICAgICAgICAgICAgc3RyaW5ncy5wdXNoKHN0clRvRmxvYXQoY3VycmVudCkpOwoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIHJldHVybiBzdHJpbmdzOwoJICAgICAgICB9CgoJICAgICAgICB0b1JpbmdzKGRpcmVjdGlvbikgewoJICAgICAgICAgICAgbGV0IHN0cmluZ3MgPSB0aGlzLnRvU3RyaW5ncygpOwoJICAgICAgICAgICAgbGV0IHJpbmdzID0gW10sIHN0cmluZyA9IG51bGw7CgkgICAgICAgICAgICB3aGlsZSAoc3RyaW5nID0gc3RyaW5ncy5zaGlmdCgpKSB7CgkgICAgICAgICAgICAgICAgaWYgKGlzUmluZyhzdHJpbmcpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChyaW5nRGlyZWN0aW9uKHN0cmluZykgIT09IGRpcmVjdGlvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nLnJldmVyc2UoKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICByaW5ncy5wdXNoKHN0cmluZyk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIHJpbmdzOwoJICAgICAgICB9CgkgICAgfQoKCSAgICByZXR1cm4gewoJICAgICAgICBwdXJnZVByb3BzLCBtZXJnZVByb3BzLAoJICAgICAgICBmaXJzdCwgbGFzdCwgY29vcmRzVG9LZXksCgkgICAgICAgIGFkZFRvTWFwLCByZW1vdmVGcm9tTWFwLCBnZXRGaXJzdEZyb21NYXAsCgkgICAgICAgIGlzUmluZywgcmluZ0RpcmVjdGlvbiwgcHRJbnNpZGVQb2x5Z29uLCBzdHJUb0Zsb2F0LAoJICAgICAgICBSZWZFbGVtZW50cywgTGF0ZUJpbmRlciwgV2F5Q29sbGVjdGlvbgoJICAgIH07Cgl9KSgpOwoKCXZhciBidWlsZGluZyA9IHsKCX07Cgl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hhc1RhZyA9IHRhZ3MgPyB0cnVlIDogZmFsc2U7CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFRhZyhrLCB2KSB7CgkgICAgICAgICAgICB0aGlzLnRhZ3Nba10gPSB2OwoJICAgICAgICAgICAgdGhpcy5oYXNUYWcgPSBrID8gdHJ1ZSA6IGZhbHNlOwoJICAgICAgICB9CgoJICAgICAgICBhZGRQcm9wKGssIHYpIHsKCSAgICAgICAgICAgIHRoaXMucHJvcHNba10gPSB2OwoJICAgICAgICB9CgoJICAgICAgICBhZGRQcm9wcyhwcm9wcykgewoJICAgICAgICAgICAgdGhpcy5wcm9wcyA9IE9iamVjdC5hc3NpZ24odGhpcy5wcm9wcywgcHJvcHMpOwoJICAgICAgICB9CgoJICAgICAgICBnZXRDb21wb3NpdGVJZCgpIHsKCSAgICAgICAgICAgIHJldHVybiBgJHt0aGlzLnR5cGV9LyR7dGhpcy5pZH1gOwoJICAgICAgICB9CgoJICAgICAgICBnZXRQcm9wcygpIHsKCSAgICAgICAgICAgIHJldHVybiBPYmplY3QuYXNzaWduKHRoaXMucHJvcHMsIHRoaXMudGFncyk7CgkgICAgICAgIH0KCgkgICAgICAgIHRvRmVhdHVyZUFycmF5KCkgewoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgkgICAgfQoKCSAgICBjbGFzcyBOb2RlIGV4dGVuZHMgT3NtT2JqZWN0IHsKCSAgICAgICAgY29uc3RydWN0b3IoaWQsIHJlZkVsZW1zKSB7CgkgICAgICAgICAgICBzdXBlcignbm9kZScsIGlkLCByZWZFbGVtcyk7CgkgICAgICAgICAgICB0aGlzLmxhdExuZyA9IG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgIHNldExhdExuZyhsYXRMbmcpIHsKCSAgICAgICAgICAgIHRoaXMubGF0TG5nID0gbGF0TG5nOwoJICAgICAgICB9CgoJICAgICAgICB0b0ZlYXR1cmVBcnJheSgpIHsKCSAgICAgICAgICAgIGlmICh0aGlzLmxhdExuZykgewoJICAgICAgICAgICAgICAgIHJldHVybiBbewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAnRmVhdHVyZScsCgkgICAgICAgICAgICAgICAgICAgIGlkOiB0aGlzLmdldENvbXBvc2l0ZUlkKCksCgkgICAgICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHRoaXMuZ2V0UHJvcHMoKSwKCSAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnk6IHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdQb2ludCcsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogc3RyVG9GbG9hdChbdGhpcy5sYXRMbmcubG9uLCB0aGlzLmxhdExuZy5sYXRdKQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfV07CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgoJICAgICAgICBnZXRMYXRMbmcoKSB7CgkgICAgICAgICAgICByZXR1cm4gdGhpcy5sYXRMbmc7CgkgICAgICAgIH0KCSAgICB9CgoJICAgIGNsYXNzIFdheSBleHRlbmRzIE9zbU9iamVjdCB7CgkgICAgICAgIGNvbnN0cnVjdG9yKGlkLCByZWZFbGVtcykgewoJICAgICAgICAgICAgc3VwZXIoJ3dheScsIGlkLCByZWZFbGVtcyk7CgkgICAgICAgICAgICB0aGlzLmxhdExuZ0FycmF5ID0gW107CgkgICAgICAgICAgICB0aGlzLmlzUG9seWdvbiA9IGZhbHNlOwoJICAgICAgICB9CgoJICAgICAgICBhZGRMYXRMbmcobGF0TG5nKSB7CgkgICAgICAgICAgICB0aGlzLmxhdExuZ0FycmF5LnB1c2gobGF0TG5nKTsKCSAgICAgICAgfQoKCSAgICAgICAgc2V0TGF0TG5nQXJyYXkobGF0TG5nQXJyYXkpIHsKCSAgICAgICAgICAgIHRoaXMubGF0TG5nQXJyYXkgPSBsYXRMbmdBcnJheTsKCSAgICAgICAgfQoKCSAgICAgICAgYWRkTm9kZVJlZihyZWYpIHsKCSAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih0aGlzLmxhdExuZ0FycmF5LCBmdW5jdGlvbiAoaWQpIHsKCSAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IHRoaXMucmVmRWxlbXMuZ2V0KGBub2RlLyR7aWR9YCk7CgkgICAgICAgICAgICAgICAgaWYgKG5vZGUpIHsKCSAgICAgICAgICAgICAgICAgICAgbm9kZS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5nZXRMYXRMbmcoKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9LCB0aGlzLCBbcmVmXSk7CgoJICAgICAgICAgICAgdGhpcy5sYXRMbmdBcnJheS5wdXNoKGJpbmRlcik7CgkgICAgICAgICAgICB0aGlzLnJlZkVsZW1zLmFkZEJpbmRlcihiaW5kZXIpOwoJICAgICAgICB9CgoJICAgICAgICBhbmFseXplR2VvbWV0cnlUeXBlKGssIHYpIHsKCSAgICAgICAgICAgIGxldCBvID0gcG9seWdvblRhZ3Nba107CgkgICAgICAgICAgICBpZiAobykgewoJICAgICAgICAgICAgICAgIHRoaXMuaXNQb2x5Z29uID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICBpZiAoby53aGl0ZWxpc3QpIHsKCSAgICAgICAgICAgICAgICAgICAgdGhpcy5pc1BvbHlnb24gPSBvLndoaXRlbGlzdC5pbmRleE9mKHYpID49IDAgPyB0cnVlIDogZmFsc2U7CgkgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChvLmJsYWNrbGlzdCkgewoJICAgICAgICAgICAgICAgICAgICB0aGlzLmlzUG9seWdvbiA9IG8uYmxhY2tsaXN0LmluZGV4T2YodikgPj0gMCA/IGZhbHNlIDogdHJ1ZTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIGFkZFRhZ3ModGFncykgewoJICAgICAgICAgICAgc3VwZXIuYWRkVGFncyh0YWdzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyh0YWdzKSkgewoJICAgICAgICAgICAgICAgIHRoaXMuYW5hbHl6ZUdlb21ldHJ5VHlwZShrLCB2KTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoKCSAgICAgICAgYWRkVGFnKGssIHYpIHsKCSAgICAgICAgICAgIHN1cGVyLmFkZFRhZyhrLCB2KTsKCSAgICAgICAgICAgIHRoaXMuYW5hbHl6ZUdlb21ldHJ5VHlwZShrLCB2KTsKCSAgICAgICAgfQoKCSAgICAgICAgdG9Db29yZHNBcnJheSgpIHsKCSAgICAgICAgICAgIHJldHVybiB0aGlzLmxhdExuZ0FycmF5Lm1hcChsYXRMbmcgPT4gW2xhdExuZy5sb24sIGxhdExuZy5sYXRdKTsKCSAgICAgICAgfQoKCSAgICAgICAgdG9GZWF0dXJlQXJyYXkoKSB7CgkgICAgICAgICAgICBsZXQgY29vcmRzQXJyYXkgPSB0aGlzLnRvQ29vcmRzQXJyYXkoKTsKCSAgICAgICAgICAgIGlmIChjb29yZHNBcnJheS5sZW5ndGggPiAxKSB7CgkgICAgICAgICAgICAgICAgY29vcmRzQXJyYXkgPSBzdHJUb0Zsb2F0KGNvb3Jkc0FycmF5KTsKCSAgICAgICAgICAgICAgICBsZXQgZmVhdHVyZSA9IHsKCSAgICAgICAgICAgICAgICAgICAgdHlwZTogJ0ZlYXR1cmUnLAoJICAgICAgICAgICAgICAgICAgICBpZDogdGhpcy5nZXRDb21wb3NpdGVJZCgpLAoJICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzOiB0aGlzLmdldFByb3BzKCksCgkgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5OiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTGluZVN0cmluZycsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogY29vcmRzQXJyYXkKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH07CgoJICAgICAgICAgICAgICAgIGlmICh0aGlzLmlzUG9seWdvbiAmJiBpc1JpbmcoY29vcmRzQXJyYXkpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChyaW5nRGlyZWN0aW9uKGNvb3Jkc0FycmF5KSAhPT0gJ2NvdW50ZXJjbG9ja3dpc2UnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZHNBcnJheS5yZXZlcnNlKCk7CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIGZlYXR1cmUuZ2VvbWV0cnkgPSB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnUG9seWdvbicsCgkgICAgICAgICAgICAgICAgICAgICAgICBjb29yZGluYXRlczogW2Nvb3Jkc0FycmF5XQoJICAgICAgICAgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtmZWF0dXJlXTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIHJldHVybiBbZmVhdHVyZV07CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIFtdOwoJICAgICAgICB9CgkgICAgfQoKCSAgICBjbGFzcyBSZWxhdGlvbiBleHRlbmRzIE9zbU9iamVjdCB7CgkgICAgICAgIGNvbnN0cnVjdG9yKGlkLCByZWZFbGVtcykgewoJICAgICAgICAgICAgc3VwZXIoJ3JlbGF0aW9uJywgaWQsIHJlZkVsZW1zKTsKCSAgICAgICAgICAgIHRoaXMucmVsYXRpb25zID0gW107CgkgICAgICAgICAgICB0aGlzLm5vZGVzID0gW107CgkgICAgICAgICAgICB0aGlzLmJvdW5kcyA9IG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgIHNldEJvdW5kcyhib3VuZHMpIHsKCSAgICAgICAgICAgIHRoaXMuYm91bmRzID0gYm91bmRzOwoJICAgICAgICB9CgoJICAgICAgICBhZGRNZW1iZXIobWVtYmVyKSB7CgkgICAgICAgICAgICBzd2l0Y2ggKG1lbWJlci50eXBlKSB7CgkgICAgICAgICAgICAgICAgLy8gc3VwZXIgcmVsYXRpb24sIG5lZWQgdG8gZG8gY29tYmluYXRpb24KCSAgICAgICAgICAgICAgICBjYXNlICdyZWxhdGlvbic6CgkgICAgICAgICAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih0aGlzLnJlbGF0aW9ucywgZnVuY3Rpb24gKGlkKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVsYXRpb24gPSB0aGlzLnJlZkVsZW1zLmdldChgcmVsYXRpb24vJHtpZH1gKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWxhdGlvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlbGF0aW9uOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLCBbbWVtYmVyLnJlZl0pOwoJICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aW9ucy5wdXNoKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucmVmRWxlbXMuYWRkQmluZGVyKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoKCSAgICAgICAgICAgICAgICBjYXNlICd3YXknOgoJICAgICAgICAgICAgICAgICAgICBpZiAoIW1lbWJlci5yb2xlKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBtZW1iZXIucm9sZSA9ICcnOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGxldCB3YXlzID0gdGhpc1ttZW1iZXIucm9sZV07CgkgICAgICAgICAgICAgICAgICAgIGlmICghd2F5cykgewoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5cyA9IHRoaXNbbWVtYmVyLnJvbGVdID0gW107CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgaWYgKG1lbWJlci5nZW9tZXRyeSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdheSA9IG5ldyBXYXkobWVtYmVyLnJlZiwgdGhpcy5yZWZFbGVtcyk7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXkuc2V0TGF0TG5nQXJyYXkobWVtYmVyLmdlb21ldHJ5KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHdheS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5cy5wdXNoKHdheSk7CgkgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWVtYmVyLm5vZGVzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2F5ID0gbmV3IFdheShtZW1iZXIucmVmLCB0aGlzLnJlZkVsZW1zKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IG5pZCBvZiBtZW1iZXIubm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXkuYWRkTm9kZVJlZihuaWQpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXlzLnB1c2god2F5KTsKCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaW5kZXIgPSBuZXcgTGF0ZUJpbmRlcih3YXlzLCBmdW5jdGlvbiAoaWQpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2F5ID0gdGhpcy5yZWZFbGVtcy5nZXQoYHdheS8ke2lkfWApOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3YXkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB3YXk7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGhpcywgW21lbWJlci5yZWZdKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHdheXMucHVzaChiaW5kZXIpOwoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZFbGVtcy5hZGRCaW5kZXIoYmluZGVyKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICBicmVhazsKCgkgICAgICAgICAgICAgICAgY2FzZSAnbm9kZSc6CgkgICAgICAgICAgICAgICAgICAgIGxldCBub2RlID0gbnVsbDsKCSAgICAgICAgICAgICAgICAgICAgaWYgKG1lbWJlci5sYXQgJiYgbWVtYmVyLmxvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSA9IG5ldyBOb2RlKG1lbWJlci5yZWYsIHRoaXMucmVmRWxlbXMpOwoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5zZXRMYXRMbmcoeyBsb246IG1lbWJlci5sb24sIGxhdDogbWVtYmVyLmxhdCB9KTsKCSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtZW1iZXIudGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuYWRkVGFncyhtZW1iZXIudGFncyk7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBbaywgdl0gb2YgT2JqZWN0LmVudHJpZXMobWVtYmVyKSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChbJ2lkJywgJ3R5cGUnLCAnbGF0JywgJ2xvbiddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuYWRkUHJvcChrLCB2KTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5yZWZDb3VudCsrOwoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5ub2Rlcy5wdXNoKG5vZGUpOwoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJpbmRlciA9IG5ldyBMYXRlQmluZGVyKHRoaXMubm9kZXMsIGZ1bmN0aW9uIChpZCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlID0gdGhpcy5yZWZFbGVtcy5nZXQoYG5vZGUvJHtpZH1gKTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobm9kZSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlLnJlZkNvdW50Kys7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBub2RlOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRoaXMsIFttZW1iZXIucmVmXSk7CgkgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLm5vZGVzLnB1c2goYmluZGVyKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVmRWxlbXMuYWRkQmluZGVyKGJpbmRlcik7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgkgICAgICAgICAgICB9CgkgICAgICAgIH0KCgkgICAgICAgIHRvRmVhdHVyZUFycmF5KCkgewoJICAgICAgICAgICAgY29uc3QgY29uc3RydWN0U3RyaW5nR2VvbWV0cnkgPSAod3MpID0+IHsKCSAgICAgICAgICAgICAgICBsZXQgc3RyaW5ncyA9IHdzID8gd3MudG9TdHJpbmdzKCkgOiBbXTsKCSAgICAgICAgICAgICAgICBpZiAoc3RyaW5ncy5sZW5ndGggPiAwKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdzLmxlbmd0aCA9PT0gMSkgcmV0dXJuIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdMaW5lU3RyaW5nJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBzdHJpbmdzWzBdCgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTXVsdGlMaW5lU3RyaW5nJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBzdHJpbmdzCgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGNvbnN0IGNvbnN0cnVjdFBvbHlnb25HZW9tZXRyeSA9IChvd3MsIGl3cykgPT4gewoJICAgICAgICAgICAgICAgIGxldCBvdXRlclJpbmdzID0gb3dzID8gb3dzLnRvUmluZ3MoJ2NvdW50ZXJjbG9ja3dpc2UnKSA6IFtdLAoJICAgICAgICAgICAgICAgICAgICBpbm5lclJpbmdzID0gaXdzID8gaXdzLnRvUmluZ3MoJ2Nsb2Nrd2lzZScpIDogW107CgoJICAgICAgICAgICAgICAgIGlmIChvdXRlclJpbmdzLmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICAgICAgbGV0IGNvbXBvc2l0UG9seW9ucyA9IFtdOwoKCSAgICAgICAgICAgICAgICAgICAgbGV0IHJpbmcgPSBudWxsOwoJICAgICAgICAgICAgICAgICAgICBmb3IgKHJpbmcgb2Ygb3V0ZXJSaW5ncykKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvc2l0UG9seW9ucy5wdXNoKFtyaW5nXSk7CgoJICAgICAgICAgICAgICAgICAgICAvLyBsaW5rIGlubmVyIHBvbHlnb25zIHRvIG91dGVyIGNvbnRhaW5lcnMKCSAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHJpbmcgPSBpbm5lclJpbmdzLnNoaWZ0KCkpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGlkeCBpbiBvdXRlclJpbmdzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHB0SW5zaWRlUG9seWdvbihmaXJzdChyaW5nKSwgb3V0ZXJSaW5nc1tpZHhdKSkgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb3NpdFBvbHlvbnNbaWR4XS5wdXNoKHJpbmcpOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIC8vIGNvbnN0cnVjdCB0aGUgUG9seWdvbi9NdWx0aVBvbHlnb24gZ2VvbWV0cnkKCSAgICAgICAgICAgICAgICAgICAgaWYgKGNvbXBvc2l0UG9seW9ucy5sZW5ndGggPT09IDEpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ1BvbHlnb24nLAoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBjb21wb3NpdFBvbHlvbnNbMF0KCSAgICAgICAgICAgICAgICAgICAgICAgIH07CgkgICAgICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CgkgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnTXVsdGlQb2x5Z29uJywKCSAgICAgICAgICAgICAgICAgICAgICAgIGNvb3JkaW5hdGVzOiBjb21wb3NpdFBvbHlvbnMKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGxldCBwb2x5Z29uRmVhdHVyZXMgPSBbXSwgc3RyaW5nRmVhdHVyZXMgPSBbXSwgcG9pbnRGZWF0dXJlcyA9IFtdOwoJICAgICAgICAgICAgY29uc3Qgd2F5c0ZpZWxkTmFtZXMgPSBbJ291dGVyJywgJ2lubmVyJywgJyddOwoJICAgICAgICAgICAgLy8gbmVlZCB0byBkbyBjb21iaW5hdGlvbiB3aGVuIHRoZXJlJ3JlIG5lc3RlZCByZWxhdGlvbnMKCSAgICAgICAgICAgIGZvciAobGV0IHJlbGF0aW9uIG9mIHRoaXMucmVsYXRpb25zKSB7CgkgICAgICAgICAgICAgICAgaWYgKHJlbGF0aW9uKSB7CgkgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGZpZWxkTmFtZSBvZiB3YXlzRmllbGROYW1lcykgewoJICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdheXMgPSByZWxhdGlvbltmaWVsZE5hbWVdOwoJICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdheXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGhpc1dheXMgPSB0aGlzW2ZpZWxkTmFtZV07CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXNXYXlzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdLnNwbGljZS5hcHBseSh0aGlzV2F5cywgW3RoaXNXYXlzLmxlbmd0aCwgMF0uY29uY2F0KHdheXMpKTsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2ZpZWxkTmFtZV0gPSB3YXlzOwoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCgkgICAgICAgICAgICBmb3IgKGxldCBmaWVsZE5hbWUgb2Ygd2F5c0ZpZWxkTmFtZXMpIHsKCSAgICAgICAgICAgICAgICBsZXQgd2F5cyA9IHRoaXNbZmllbGROYW1lXTsKCSAgICAgICAgICAgICAgICBpZiAod2F5cykgewoJICAgICAgICAgICAgICAgICAgICB0aGlzW2ZpZWxkTmFtZV0gPSBuZXcgV2F5Q29sbGVjdGlvbigpOwoJICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCB3YXkgb2Ygd2F5cykgewoJICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tmaWVsZE5hbWVdLmFkZFdheSh3YXkpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIGxldCBnZW9tZXRyeSA9IG51bGw7CgoJICAgICAgICAgICAgbGV0IGZlYXR1cmUgPSB7CgkgICAgICAgICAgICAgICAgdHlwZTogJ0ZlYXR1cmUnLAoJICAgICAgICAgICAgICAgIGlkOiB0aGlzLmdldENvbXBvc2l0ZUlkKCksCgkgICAgICAgICAgICAgICAgYmJveDogdGhpcy5ib3VuZHMsCgkgICAgICAgICAgICAgICAgcHJvcGVydGllczogdGhpcy5nZXRQcm9wcygpCgkgICAgICAgICAgICB9OwoKCSAgICAgICAgICAgIGlmICghdGhpcy5ib3VuZHMpIHsKCSAgICAgICAgICAgICAgICBkZWxldGUgZmVhdHVyZS5iYm94OwoJICAgICAgICAgICAgfQoKCSAgICAgICAgICAgIGlmICh0aGlzLm91dGVyKSB7CgkgICAgICAgICAgICAgICAgZ2VvbWV0cnkgPSBjb25zdHJ1Y3RQb2x5Z29uR2VvbWV0cnkodGhpcy5vdXRlciwgdGhpcy5pbm5lcik7CgkgICAgICAgICAgICAgICAgaWYgKGdlb21ldHJ5KSB7CgkgICAgICAgICAgICAgICAgICAgIGZlYXR1cmUuZ2VvbWV0cnkgPSBnZW9tZXRyeTsKCSAgICAgICAgICAgICAgICAgICAgcG9seWdvbkZlYXR1cmVzLnB1c2goZmVhdHVyZSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSBpZiAodGhpc1snJ10pIHsKCSAgICAgICAgICAgICAgICBnZW9tZXRyeSA9IGNvbnN0cnVjdFN0cmluZ0dlb21ldHJ5KHRoaXNbJyddKTsKCSAgICAgICAgICAgICAgICBpZiAoZ2VvbWV0cnkpIHsKCSAgICAgICAgICAgICAgICAgICAgZmVhdHVyZS5nZW9tZXRyeSA9IGdlb21ldHJ5OwoJICAgICAgICAgICAgICAgICAgICBzdHJpbmdGZWF0dXJlcy5wdXNoKGZlYXR1cmUpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCgkgICAgICAgICAgICBmb3IgKGxldCBub2RlIG9mIHRoaXMubm9kZXMpIHsKCSAgICAgICAgICAgICAgICBwb2ludEZlYXR1cmVzID0gcG9pbnRGZWF0dXJlcy5jb25jYXQobm9kZS50b0ZlYXR1cmVBcnJheSgpKTsKCSAgICAgICAgICAgIH0KCgkgICAgICAgICAgICByZXR1cm4gcG9seWdvbkZlYXR1cmVzLmNvbmNhdChzdHJpbmdGZWF0dXJlcykuY29uY2F0KHBvaW50RmVhdHVyZXMpOwoJICAgICAgICB9CgkgICAgfQoKCSAgICByZXR1cm4geyBOb2RlLCBXYXksIFJlbGF0aW9uIH07Cgl9KSgpOwoKCXZhciB4bWxwYXJzZXIgPSAoKCkgPT4gewoKCSAgICBmdW5jdGlvbiBjb25kaXRpb25lZChldnQpIHsKCSAgICAgICAgcmV0dXJuIGV2dC5tYXRjaCgvXiguKz8pXFsoLis/KVxdPiQvZykgIT0gbnVsbDsKCSAgICB9CgoJICAgIGZ1bmN0aW9uIHBhcnNlRXZlbnQoZXZ0KSB7CgkgICAgICAgIGxldCBtYXRjaCA9IC9eKC4rPylcWyguKz8pXF0+JC9nLmV4ZWMoZXZ0KTsKCSAgICAgICAgaWYgKG1hdGNoKSB7CgkgICAgICAgICAgICByZXR1cm4geyBldnQ6IG1hdGNoWzFdICsgJz4nLCBleHA6IG1hdGNoWzJdIH07CgkgICAgICAgIH0KCSAgICAgICAgcmV0dXJuIHsgZXZ0OiBldnQgfTsKCSAgICB9CgoJICAgIGZ1bmN0aW9uIGdlbkNvbmRpdGlvbkZ1bmMoY29uZCkgewoJICAgICAgICBsZXQgYm9keSA9ICdyZXR1cm4gJyArIGNvbmQucmVwbGFjZSgvKFwkLis/KSg/PVs9IS5dKS9nLCAnbm9kZS4kJicpICsgJzsnOwoJICAgICAgICByZXR1cm4gbmV3IEZ1bmN0aW9uKCdub2RlJywgYm9keSk7CgkgICAgfQoKCSAgICByZXR1cm4gY2xhc3MgewoJICAgICAgICBjb25zdHJ1Y3RvcihvcHRzKSB7CgkgICAgICAgICAgICBpZiAob3B0cykgewoJICAgICAgICAgICAgICAgIHRoaXMucXVlcnlQYXJlbnQgPSBvcHRzLnF1ZXJ5UGFyZW50ID8gdHJ1ZSA6IGZhbHNlOwoJICAgICAgICAgICAgICAgIHRoaXMucHJvZ3Jlc3NpdmUgPSBvcHRzLnByb2dyZXNzaXZlOwoJICAgICAgICAgICAgICAgIGlmICh0aGlzLnF1ZXJ5UGFyZW50KSB7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50TWFwID0gbmV3IFdlYWtNYXAoKTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICB0aGlzLmV2dExpc3RlbmVycyA9IHt9OwoJICAgICAgICB9CgoJICAgICAgICBwYXJzZSh4bWwsIHBhcmVudCwgZGlyKSB7CgkgICAgICAgICAgICBkaXIgPSBkaXIgPyBkaXIgKyAnLicgOiAnJzsKCSAgICAgICAgICAgIGxldCBub2RlUmVnRXggPSAvPChbXiA+XC9dKykoLio/KT4vbWcsIG5vZGVNYXRjaCA9IG51bGwsIG5vZGVzID0gW107CgkgICAgICAgICAgICB3aGlsZSAobm9kZU1hdGNoID0gbm9kZVJlZ0V4LmV4ZWMoeG1sKSkgewoJICAgICAgICAgICAgICAgIGxldCB0YWcgPSBub2RlTWF0Y2hbMV0sIG5vZGUgPSB7ICR0YWc6IHRhZyB9LCBmdWxsVGFnID0gZGlyICsgdGFnOwoKCSAgICAgICAgICAgICAgICBsZXQgYXR0clRleHQgPSBub2RlTWF0Y2hbMl0udHJpbSgpLCBjbG9zZWQgPSBmYWxzZTsKCSAgICAgICAgICAgICAgICBpZiAoYXR0clRleHQuZW5kc1dpdGgoJy8nKSB8fCB0YWcuc3RhcnRzV2l0aCgnPycpIHx8IHRhZy5zdGFydHNXaXRoKCchJykpIHsKCSAgICAgICAgICAgICAgICAgICAgY2xvc2VkID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGxldCBhdHRSZWdFeDEgPSAvKFteIF0rPyk9IiguKz8pIi9nLCBhdHRSZWdFeDIgPSAvKFteIF0rPyk9JyguKz8pJy9nOwoJICAgICAgICAgICAgICAgIGxldCBhdHRNYXRjaCA9IG51bGwsIGhhc0F0dHJzID0gZmFsc2U7CgkgICAgICAgICAgICAgICAgd2hpbGUgKGF0dE1hdGNoID0gYXR0UmVnRXgxLmV4ZWMoYXR0clRleHQpKSB7CgkgICAgICAgICAgICAgICAgICAgIGhhc0F0dHJzID0gdHJ1ZTsKCSAgICAgICAgICAgICAgICAgICAgbm9kZVthdHRNYXRjaFsxXV0gPSBhdHRNYXRjaFsyXTsKCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgaWYgKCFoYXNBdHRycykKCSAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGF0dE1hdGNoID0gYXR0UmVnRXgyLmV4ZWMoYXR0clRleHQpKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBoYXNBdHRycyA9IHRydWU7CgkgICAgICAgICAgICAgICAgICAgICAgICBub2RlW2F0dE1hdGNoWzFdXSA9IGF0dE1hdGNoWzJdOwoJICAgICAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIGlmICghaGFzQXR0cnMgJiYgYXR0clRleHQgIT09ICcnKSB7CgkgICAgICAgICAgICAgICAgICAgIG5vZGUudGV4dCA9IGF0dHJUZXh0OwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBpZiAodGhpcy5wcm9ncmVzc2l2ZSkgewoJICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoYDwke2Z1bGxUYWd9PmAsIG5vZGUsIHBhcmVudCk7CgkgICAgICAgICAgICAgICAgfQoKCSAgICAgICAgICAgICAgICBpZiAoIWNsb3NlZCkgewoJICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJSZWdFeCA9IG5ldyBSZWdFeHAoYChbXl0rPyk8XC8ke3RhZ30+YCwgJ2cnKTsKCSAgICAgICAgICAgICAgICAgICAgaW5uZXJSZWdFeC5sYXN0SW5kZXggPSBub2RlUmVnRXgubGFzdEluZGV4OwoJICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJNYXRjaCA9IGlubmVyUmVnRXguZXhlYyh4bWwpOwoJICAgICAgICAgICAgICAgICAgICBpZiAoaW5uZXJNYXRjaCAmJiBpbm5lck1hdGNoWzFdKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBub2RlUmVnRXgubGFzdEluZGV4ID0gaW5uZXJSZWdFeC5sYXN0SW5kZXg7CgkgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5uZXJOb2RlcyA9IHRoaXMucGFyc2UoaW5uZXJNYXRjaFsxXSwgbm9kZSwgZnVsbFRhZyk7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5uZXJOb2Rlcy5sZW5ndGggPiAwKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS4kaW5uZXJOb2RlcyA9IGlubmVyTm9kZXM7CgkgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuJGlubmVyVGV4dCA9IGlubmVyTWF0Y2hbMV07CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgaWYgKHRoaXMucXVlcnlQYXJlbnQgJiYgcGFyZW50KSB7CgkgICAgICAgICAgICAgICAgICAgIHRoaXMucGFyZW50TWFwLnNldChub2RlLCBwYXJlbnQpOwoJICAgICAgICAgICAgICAgIH0KCgkgICAgICAgICAgICAgICAgaWYgKHRoaXMucHJvZ3Jlc3NpdmUpIHsKCSAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KGA8LyR7ZnVsbFRhZ30+YCwgbm9kZSwgcGFyZW50KTsKCSAgICAgICAgICAgICAgICB9CgoJICAgICAgICAgICAgICAgIG5vZGVzLnB1c2gobm9kZSk7CgkgICAgICAgICAgICB9CgoJICAgICAgICAgICAgcmV0dXJuIG5vZGVzOwoJICAgICAgICB9CgoJICAgICAgICBnZXRQYXJlbnQobm9kZSkgewoJICAgICAgICAgICAgaWYgKHRoaXMucXVlcnlQYXJlbnQpIHsKCSAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJlbnRNYXAuZ2V0KG5vZGUpOwoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmV0dXJuIG51bGw7CgkgICAgICAgIH0KCgkgICAgICAgICNhZGRMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGxldCBmdW5jcyA9IHRoaXMuZXZ0TGlzdGVuZXJzW2V2dF07CgkgICAgICAgICAgICBpZiAoZnVuY3MpIHsKCSAgICAgICAgICAgICAgICBmdW5jcy5wdXNoKGZ1bmMpOwoJICAgICAgICAgICAgfSBlbHNlIHsKCSAgICAgICAgICAgICAgICB0aGlzLmV2dExpc3RlbmVyc1tldnRdID0gW2Z1bmNdOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgoJICAgICAgICAvLyBzdXBwb3J0IGphdmFzY3JpcHQgY29uZGl0aW9uIGZvciB0aGUgbGFzdCB0YWcKCSAgICAgICAgYWRkTGlzdGVuZXIoZXZ0LCBmdW5jKSB7CgkgICAgICAgICAgICBpZiAoY29uZGl0aW9uZWQoZXZ0KSkgewoJICAgICAgICAgICAgICAgIC8vIGZ1bmMucHJvdG90eXBlID0gZXZ0OwoJICAgICAgICAgICAgICAgIGV2dCA9IHBhcnNlRXZlbnQoZXZ0KTsKCSAgICAgICAgICAgICAgICBmdW5jLmNvbmRpdGlvbiA9IGdlbkNvbmRpdGlvbkZ1bmMoZXZ0LmV4cCk7CgkgICAgICAgICAgICAgICAgZXZ0ID0gZXZ0LmV2dDsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIHRoaXMuI2FkZExpc3RlbmVyKGV2dCwgZnVuYyk7CgkgICAgICAgIH0KCgkgICAgICAgICNyZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGxldCBmdW5jcyA9IHRoaXMuZXZ0TGlzdGVuZXJzW2V2dF07CgkgICAgICAgICAgICBsZXQgaWR4ID0gbnVsbDsKCSAgICAgICAgICAgIGlmIChmdW5jcyAmJiAoaWR4ID0gZnVuY3MuaW5kZXhPZihmdW5jKSkgPj0gMCkgewoJICAgICAgICAgICAgICAgIGZ1bmNzLnNwbGljZShpZHgsIDEpOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgoJICAgICAgICByZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIGlmIChjb25kaXRpb25lZChldnQpKSB7CgkgICAgICAgICAgICAgICAgZXZ0ID0gcGFyc2VFdmVudChldnQpOwoJICAgICAgICAgICAgICAgIGV2dCA9IGV2dC5ldnQ7CgkgICAgICAgICAgICB9CgkgICAgICAgICAgICB0aGlzLiNyZW1vdmVMaXN0ZW5lcihldnQsIGZ1bmMpOwoJICAgICAgICB9CgoJICAgICAgICBlbWl0KGV2dCwgLi4uYXJncykgewoJICAgICAgICAgICAgbGV0IGZ1bmNzID0gdGhpcy5ldnRMaXN0ZW5lcnNbZXZ0XTsKCSAgICAgICAgICAgIGlmIChmdW5jcykgewoJICAgICAgICAgICAgICAgIGZvciAobGV0IGZ1bmMgb2YgZnVuY3MpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGZ1bmMuY29uZGl0aW9uKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZnVuYy5jb25kaXRpb24uYXBwbHkobnVsbCwgYXJncykgPT09IHRydWUpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jLmFwcGx5KG51bGwsIGFyZ3MpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgZnVuYy5hcHBseShudWxsLCBhcmdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoKCSAgICAgICAgb24oZXZ0LCBmdW5jKSB7CgkgICAgICAgICAgICB0aGlzLmFkZExpc3RlbmVyKGV2dCwgZnVuYyk7CgkgICAgICAgIH0KCgkgICAgICAgIG9mZihldnQsIGZ1bmMpIHsKCSAgICAgICAgICAgIHRoaXMucmVtb3ZlTGlzdGVuZXIoZXZ0LCBmdW5jKTsKCSAgICAgICAgfQoJICAgIH07Cgl9KSgpOwoKCWNvbnN0IHsgTm9kZSwgV2F5LCBSZWxhdGlvbiB9ID0gb3Ntb2JqcywKCSAgICB7IHB1cmdlUHJvcHMsIFJlZkVsZW1lbnRzIH0gPSB1dGlscywKCSAgICBYbWxQYXJzZXIgPSB4bWxwYXJzZXI7CgoJdmFyIGxpYiA9IChvc20sIG9wdHMpID0+IHsKCSAgICBsZXQgY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kVsZW1lbnRzID0gbmV3IFJlZkVsZW1lbnRzKCksIGZlYXR1cmVBcnJheSA9IFtdOwoKCSAgICBjb25zdCBhbmFseXplRmVhdHVyZXNGcm9tSnNvbiA9IG9zbSA9PiB7CgkgICAgICAgIGZvciAobGV0IGVsZW0gb2Ygb3NtLmVsZW1lbnRzKSB7CgkgICAgICAgICAgICBzd2l0Y2ggKGVsZW0udHlwZSkgewoJICAgICAgICAgICAgICAgIGNhc2UgJ25vZGUnOgoJICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IG5ldyBOb2RlKGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0udGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5hZGRUYWdzKGVsZW0udGFncyk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgbm9kZS5hZGRQcm9wcyhwdXJnZVByb3BzKGVsZW0sIFsnaWQnLCAndHlwZScsICd0YWdzJywgJ2xhdCcsICdsb24nXSkpOwoJICAgICAgICAgICAgICAgICAgICBub2RlLnNldExhdExuZyhlbGVtKTsKCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgoJICAgICAgICAgICAgICAgIGNhc2UgJ3dheSc6CgkgICAgICAgICAgICAgICAgICAgIGxldCB3YXkgPSBuZXcgV2F5KGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0udGFncykgewoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZFRhZ3MoZWxlbS50YWdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB3YXkuYWRkUHJvcHMocHVyZ2VQcm9wcyhlbGVtLCBbJ2lkJywgJ3R5cGUnLCAndGFncycsICdub2RlcycsICdnZW9tZXRyeSddKSk7CgkgICAgICAgICAgICAgICAgICAgIGlmIChlbGVtLm5vZGVzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBuIG9mIGVsZW0ubm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXkuYWRkTm9kZVJlZihuKTsKCSAgICAgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChlbGVtLmdlb21ldHJ5KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICB3YXkuc2V0TGF0TG5nQXJyYXkoZWxlbS5nZW9tZXRyeSk7CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgoJICAgICAgICAgICAgICAgIGNhc2UgJ3JlbGF0aW9uJzoKCSAgICAgICAgICAgICAgICAgICAgbGV0IHJlbGF0aW9uID0gbmV3IFJlbGF0aW9uKGVsZW0uaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0uYm91bmRzKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICByZWxhdGlvbi5zZXRCb3VuZHMoW3BhcnNlRmxvYXQoZWxlbS5ib3VuZHMubWlubG9uKSwgcGFyc2VGbG9hdChlbGVtLmJvdW5kcy5taW5sYXQpLCBwYXJzZUZsb2F0KGVsZW0uYm91bmRzLm1heGxvbiksIHBhcnNlRmxvYXQoZWxlbS5ib3VuZHMubWF4bGF0KV0pOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGlmIChlbGVtLnRhZ3MpIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLmFkZFRhZ3MoZWxlbS50YWdzKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICByZWxhdGlvbi5hZGRQcm9wcyhwdXJnZVByb3BzKGVsZW0sIFsnaWQnLCAndHlwZScsICd0YWdzJywgJ2JvdW5kcycsICdtZW1iZXJzJ10pKTsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGVsZW0ubWVtYmVycykgewoJICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgbWVtYmVyIG9mIGVsZW0ubWVtYmVycykgewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aW9uLmFkZE1lbWJlcihtZW1iZXIpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGJyZWFrOwoJICAgICAgICAgICAgfQoJICAgICAgICB9CgkgICAgfTsKCgkgICAgY29uc3QgYW5hbHl6ZUZlYXR1cmVzRnJvbVhtbCA9IG9zbSA9PiB7CgkgICAgICAgIGNvbnN0IHhtbFBhcnNlciA9IG5ldyBYbWxQYXJzZXIoeyBwcm9ncmVzc2l2ZTogdHJ1ZSB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5vbignPC9vc20ubm9kZT4nLCBub2RlID0+IHsKCSAgICAgICAgICAgIGxldCBuZCA9IG5ldyBOb2RlKG5vZGUuaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyhub2RlKSkKCSAgICAgICAgICAgICAgICBpZiAoIWsuc3RhcnRzV2l0aCgnJCcpICYmIFsnaWQnLCAnbG9uJywgJ2xhdCddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgIG5kLmFkZFByb3Aoaywgdik7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgbmQuc2V0TGF0TG5nKG5vZGUpOwoJICAgICAgICAgICAgaWYgKG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmQgb2Ygbm9kZS4kaW5uZXJOb2RlcykgewoJICAgICAgICAgICAgICAgICAgICBpZiAoaW5kLiR0YWcgPT09ICd0YWcnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBuZC5hZGRUYWcoaW5kLmssIGluZC52KTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgoJICAgICAgICB4bWxQYXJzZXIub24oJzwvb3NtLndheT4nLCBub2RlID0+IHsKCSAgICAgICAgICAgIGxldCB3YXkgPSBuZXcgV2F5KG5vZGUuaWQsIHJlZkVsZW1lbnRzKTsKCSAgICAgICAgICAgIGZvciAobGV0IFtrLCB2XSBvZiBPYmplY3QuZW50cmllcyhub2RlKSkgewoJICAgICAgICAgICAgICAgIGlmICghay5zdGFydHNXaXRoKCckJykgJiYgWydpZCddLmluZGV4T2YoaykgPCAwKSB7CgkgICAgICAgICAgICAgICAgICAgIHdheS5hZGRQcm9wKGssIHYpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGlmIChub2RlLiRpbm5lck5vZGVzKSB7CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kIG9mIG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGluZC4kdGFnID09PSAnbmQnKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kLmxvbiAmJiBpbmQubGF0KSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZExhdExuZyhpbmQpOwoJICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbmQucmVmKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZE5vZGVSZWYoaW5kLnJlZik7CgkgICAgICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5kLiR0YWcgPT09ICd0YWcnKQoJICAgICAgICAgICAgICAgICAgICAgICAgd2F5LmFkZFRhZyhpbmQuaywgaW5kLnYpOwoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgoJICAgICAgICB4bWxQYXJzZXIub24oJzxvc20ucmVsYXRpb24+Jywgbm9kZSA9PiB7CgkgICAgICAgICAgICBuZXcgUmVsYXRpb24obm9kZS5pZCwgcmVmRWxlbWVudHMpOwoJICAgICAgICB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5vbignPC9vc20ucmVsYXRpb24ubWVtYmVyPicsIChub2RlLCBwYXJlbnQpID0+IHsKCSAgICAgICAgICAgIGxldCByZWxhdGlvbiA9IHJlZkVsZW1lbnRzLmdldChgcmVsYXRpb24vJHtwYXJlbnQuaWR9YCk7CgkgICAgICAgICAgICBsZXQgbWVtYmVyID0gewoJICAgICAgICAgICAgICAgIHR5cGU6IG5vZGUudHlwZSwKCSAgICAgICAgICAgICAgICByb2xlOiBub2RlLnJvbGUgPyBub2RlLnJvbGUgOiAnJywKCSAgICAgICAgICAgICAgICByZWY6IG5vZGUucmVmCgkgICAgICAgICAgICB9OwoJICAgICAgICAgICAgaWYgKG5vZGUubGF0ICYmIG5vZGUubG9uKSB7CgkgICAgICAgICAgICAgICAgbWVtYmVyLmxhdCA9IG5vZGUubGF0LCBtZW1iZXIubG9uID0gbm9kZS5sb24sIG1lbWJlci50YWdzID0ge307CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgW2ssIHZdIG9mIE9iamVjdC5lbnRyaWVzKG5vZGUpKSB7CgkgICAgICAgICAgICAgICAgICAgIGlmICghay5zdGFydHNXaXRoKCckJykgJiYgWyd0eXBlJywgJ2xhdCcsICdsb24nXS5pbmRleE9mKGspIDwgMCkgewoJICAgICAgICAgICAgICAgICAgICAgICAgbWVtYmVyW2tdID0gdjsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGlmIChub2RlLiRpbm5lck5vZGVzKSB7CgkgICAgICAgICAgICAgICAgbGV0IGdlb21ldHJ5ID0gW107CgkgICAgICAgICAgICAgICAgbGV0IG5vZGVzID0gW107CgkgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kIG9mIG5vZGUuJGlubmVyTm9kZXMpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGluZC5sYXQgJiYgaW5kLmxvbikgewoJICAgICAgICAgICAgICAgICAgICAgICAgZ2VvbWV0cnkucHVzaChpbmQpOwoJICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChpbmQucmVmKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBpZiAoZ2VvbWV0cnkubGVuZ3RoID4gMCkgewoJICAgICAgICAgICAgICAgICAgICBtZW1iZXIuZ2VvbWV0cnkgPSBnZW9tZXRyeTsKCSAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5vZGVzLmxlbmd0aCA+IDApIHsKCSAgICAgICAgICAgICAgICAgICAgbWVtYmVyLm5vZGVzID0gbm9kZXM7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgcmVsYXRpb24uYWRkTWVtYmVyKG1lbWJlcik7CgkgICAgICAgIH0pOwoKCSAgICAgICAgeG1sUGFyc2VyLm9uKCc8L29zbS5yZWxhdGlvbi5ib3VuZHM+JywgKG5vZGUsIHBhcmVudCkgPT4gewoJICAgICAgICAgICAgcmVmRWxlbWVudHMuZ2V0KGByZWxhdGlvbi8ke3BhcmVudC5pZH1gKS5zZXRCb3VuZHMoW3BhcnNlRmxvYXQobm9kZS5taW5sb24pLCBwYXJzZUZsb2F0KG5vZGUubWlubGF0KSwgcGFyc2VGbG9hdChub2RlLm1heGxvbiksIHBhcnNlRmxvYXQobm9kZS5tYXhsYXQpXSk7CgkgICAgICAgIH0pOwoKCSAgICAgICAgeG1sUGFyc2VyLm9uKCc8L29zbS5yZWxhdGlvbi50YWc+JywgKG5vZGUsIHBhcmVudCkgPT4gewoJICAgICAgICAgICAgcmVmRWxlbWVudHMuZ2V0KGByZWxhdGlvbi8ke3BhcmVudC5pZH1gKS5hZGRUYWcobm9kZS5rLCBub2RlLnYpOwoJICAgICAgICB9KTsKCgkgICAgICAgIHhtbFBhcnNlci5wYXJzZShvc20pOwoJICAgIH07CgoJICAgIGlmIChmb3JtYXQgPT09ICdqc29uLXJhdycpIHsKCSAgICAgICAgb3NtID0gSlNPTi5wYXJzZShvc20pOwoJICAgICAgICBpZiAob3NtLmVsZW1lbnRzKSB7CgkgICAgICAgICAgICBmb3JtYXQgPSAnanNvbic7CgkgICAgICAgIH0gZWxzZSB7CgkgICAgICAgICAgICBmb3JtYXQgPSAnaW52YWxpZCc7CgkgICAgICAgIH0KCSAgICB9CgoJICAgIGlmIChmb3JtYXQgPT09ICdqc29uJykgewoJICAgICAgICBhbmFseXplRmVhdHVyZXNGcm9tSnNvbihvc20pOwoJICAgIH0gZWxzZSBpZiAoZm9ybWF0ID09PSAneG1sJykgewoJICAgICAgICBhbmFseXplRmVhdHVyZXNGcm9tWG1sKG9zbSk7CgkgICAgfQoKCSAgICByZWZFbGVtZW50cy5iaW5kQWxsKCk7CgoJICAgIGZvciAobGV0IHYgb2YgcmVmRWxlbWVudHMudmFsdWVzKCkpIHsKCSAgICAgICAgaWYgKHYucmVmQ291bnQgPD0gMCB8fCAodi5oYXNUYWcgJiYgcmVuZGVyVGFnZ2VkICYmICEodiBpbnN0YW5jZW9mIFdheSAmJiBleGNsdWRlV2F5KSkpIHsKCSAgICAgICAgICAgIGxldCBmZWF0dXJlcyA9IHYudG9GZWF0dXJlQXJyYXkoKTsKCSAgICAgICAgICAgIC8vIHJldHVybiB0aGUgZmlyc3QgZ2VvbWV0cnkgb2YgdGhlIGZpcnN0IHJlbGF0aW9uIGVsZW1lbnQKCSAgICAgICAgICAgIGlmICh2IGluc3RhbmNlb2YgUmVsYXRpb24gJiYgIWNvbXBsZXRlRmVhdHVyZSAmJiBmZWF0dXJlcy5sZW5ndGggPiAwKSB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gICAgICAgIGlmIChvcHRpb25zLnR5cGUgPT09ICdwb2ludCcpIHsKCSAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVTdHJpbmcuY29vcmRpbmF0ZXMubGVuZ3RoID09PSAxKSB7CgkgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIGl0IGEgcG9pbnQKCSAgICAgICAgICAgICAgICAgICAgICAgIGdlb21ldHJ5ID0gewoJICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0eXBlJzogJ1BvaW50JywKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29vcmRpbmF0ZXMnOiBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzWzBdCgkgICAgICAgICAgICAgICAgICAgICAgICB9OwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCdDYW5ub3QgY29udmVydCBwb2x5bGluZSB0byAnICsgb3B0aW9ucy50eXBlKTsKCSAgICAgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICBlbHNlIGlmIChvcHRpb25zLnR5cGUgPT09ICdwb2x5Z29uJykgewoJICAgICAgICAgICAgICAgICAgICBpZiAobGluZVN0cmluZy5jb29yZGluYXRlc1swXVswXSA9PT0gbGluZVN0cmluZy5jb29yZGluYXRlc1tsaW5lU3RyaW5nLmNvb3JkaW5hdGVzLmxlbmd0aCAtIDFdWzBdICYmCgkgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzWzBdWzFdID09PSBsaW5lU3RyaW5nLmNvb3JkaW5hdGVzW2xpbmVTdHJpbmcuY29vcmRpbmF0ZXMubGVuZ3RoIC0gMV1bMV0pIHsKCSAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1ha2UgaXQgYSBwb2x5Z29uCgkgICAgICAgICAgICAgICAgICAgICAgICBnZW9tZXRyeSA9IHsKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAndHlwZSc6ICdQb2x5Z29uJywKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29vcmRpbmF0ZXMnOiBbbGluZVN0cmluZy5jb29yZGluYXRlc10KCSAgICAgICAgICAgICAgICAgICAgICAgIH07CgkgICAgICAgICAgICAgICAgICAgIH0KCSAgICAgICAgICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ0Nhbm5vdCBjb252ZXJ0IHBvbHlsaW5lIHRvICcgKyBvcHRpb25zLnR5cGUpOwoJICAgICAgICAgICAgICAgICAgICB9CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIHJlc29sdmUoewoJICAgICAgICAgICAgICAgICAgICB0eXBlOiAiRmVhdHVyZUNvbGxlY3Rpb24iLAoJICAgICAgICAgICAgICAgICAgICBmZWF0dXJlczogW3sKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAidHlwZSI6ICJGZWF0dXJlIiwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAiZ2VvbWV0cnkiOiBnZW9tZXRyeSwKCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAicHJvcGVydGllcyI6IG9wdGlvbnMucHJvcGVydGllcyB8fCB7fQoJICAgICAgICAgICAgICAgICAgICAgICAgfV0KCSAgICAgICAgICAgICAgICB9KTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGNhdGNoIChlcnIpIHsKCSAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfSk7CgkgICAgICAgIHJldHVybiBnZW9qc29uOwoJICAgIH0KCX0KCgljb25zdCBsaWJyYXJpZXMgPSB7CgkgICAgJ0NvbnZlcnRlcic6IENvbnZlcnRlcgoJfTsKCWxldCBzdWJDbGFzczsKCXNlbGYuYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScsIGUgPT4gewoJICAgIGNvbnN0IGRhdGEgPSAoZS5kYXRhIHx8IGUpOwoJICAgIGNvbnN0IHBvc3QgPSAoaWQsIGVyciwgcmVzLCB0eXBlKSA9PiB7CgkgICAgICAgIHBvc3RNZXNzYWdlKHsKCSAgICAgICAgICAgIHR5cGU6IHR5cGUgPyB0eXBlIDogKGVyciA/ICdlcnJvcicgOiAncmVzcG9uc2UnKSwKCSAgICAgICAgICAgIGlkOiBpZCwKCSAgICAgICAgICAgIG1lc3NhZ2U6IHJlcywKCSAgICAgICAgICAgIGVycm9yOiBlcnIKCSAgICAgICAgfSk7CgkgICAgfTsKCSAgICBjb25zdCBjb21tYW5kcyA9IHsKCSAgICAgICAgJ2luaXQnOiAobXNnKSA9PiB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kLCBtZXNzYWdlIH0gPSBtc2c7CgkgICAgICAgICAgICBzdWJDbGFzcyA9IG5ldyBsaWJyYXJpZXNbY29tbWFuZF0obWVzc2FnZVswXSwgbWVzc2FnZVsxXSk7CgkgICAgICAgICAgICAvLyByZXR1cm4gdGhlIGNsYXNzJyBtZXRob2RzCgkgICAgICAgICAgICBjb25zdCBmbnMgPSBbCgkgICAgICAgICAgICAgICAgLi4uT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMobGlicmFyaWVzW2NvbW1hbmRdLnByb3RvdHlwZSksCgkgICAgICAgICAgICAgICAgLi4uT2JqZWN0LmtleXMoc3ViQ2xhc3MpCgkgICAgICAgICAgICBdLm1hcChrZXkgPT4gW2tleSwgdHlwZW9mIGxpYnJhcmllc1tjb21tYW5kXS5wcm90b3R5cGVba2V5XV0pCgkgICAgICAgICAgICAgICAgLnJlZHVjZSgoYSwgYykgPT4gKHsgLi4uYSwgLi4ueyBbY1swXV06IGNbMV0gfSB9KSwge30pOwoJICAgICAgICAgICAgcG9zdChpZCwgdW5kZWZpbmVkLCBmbnMsICdpbml0X3Jlc3BvbnNlJyk7CgkgICAgICAgIH0sCgkgICAgICAgICdnZXQnOiBmdW5jdGlvbiAobXNnKSB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kIH0gPSBtc2c7CgkgICAgICAgICAgICBpZiAoc3ViQ2xhc3MgJiYgc3ViQ2xhc3NbY29tbWFuZF0pIHsKCSAgICAgICAgICAgICAgICBwb3N0KGlkLCB1bmRlZmluZWQsIHN1YkNsYXNzW2NvbW1hbmRdKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgIHBvc3QoaWQsIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfSwKCSAgICAgICAgJ2V4ZWMnOiBmdW5jdGlvbiAobXNnKSB7CgkgICAgICAgICAgICBjb25zdCB7IGlkLCBjb21tYW5kLCBtZXNzYWdlIH0gPSBtc2c7CgkgICAgICAgICAgICBpZiAoc3ViQ2xhc3MgJiYgc3ViQ2xhc3NbY29tbWFuZF0gJiYgdHlwZW9mIHN1YkNsYXNzW2NvbW1hbmRdID09PSAnZnVuY3Rpb24nKSB7CgkgICAgICAgICAgICAgICAgY29uc3QgY21kID0gc3ViQ2xhc3NbY29tbWFuZF0KCSAgICAgICAgICAgICAgICAgICAgLmFwcGx5KHN1YkNsYXNzLCBtZXNzYWdlKTsKCSAgICAgICAgICAgICAgICBpZiAoISFjbWQgJiYgdHlwZW9mIGNtZC50aGVuID09PSAnZnVuY3Rpb24nKSB7CgkgICAgICAgICAgICAgICAgICAgIC8vIEl0J3MgYSBwcm9taXNlLCBzbyB3YWl0IGZvciBpdAoJICAgICAgICAgICAgICAgICAgICBjbWQKCSAgICAgICAgICAgICAgICAgICAgICAgIC50aGVuKHJlcyA9PiBwb3N0KGlkLCB1bmRlZmluZWQsIHJlcykpCgkgICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZSA9PiBwb3N0KGlkLCBlKSk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgICAgIGVsc2UgewoJICAgICAgICAgICAgICAgICAgICAvLyBOb3QgYSBwcm9taXNlLCBqdXN0IHJldHVybiBpdAoJICAgICAgICAgICAgICAgICAgICBwb3N0KGlkLCB1bmRlZmluZWQsIGNtZCk7CgkgICAgICAgICAgICAgICAgfQoJICAgICAgICAgICAgfQoJICAgICAgICAgICAgZWxzZSB7CgkgICAgICAgICAgICAgICAgLy8gRXJyb3IKCSAgICAgICAgICAgICAgICBwb3N0KGlkLCBuZXcgRXJyb3IoYGNvbW1hbmQgIiR7Y29tbWFuZH0iIG5vdCBmb3VuZGApKTsKCSAgICAgICAgICAgIH0KCSAgICAgICAgfQoJICAgIH07CgkgICAgaWYgKGNvbW1hbmRzW2RhdGEudHlwZV0pIHsKCSAgICAgICAgY29tbWFuZHNbZGF0YS50eXBlXShkYXRhKTsKCSAgICB9Cgl9KTsKCn0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPXdvcmtlci5qcy5tYXAKCg==");const randomString=()=>Math.random().toString(36).substring(2);class Actor{constructor(u,Xe){this.initId=randomString()+"-"+u,this.worker=new nh,this.handlers=new Map,this.worker.onmessage=Xe=>{const fr=Xe.data,Ar=this.handlers.get(fr.id),_r=this;if(Ar){if("response"===fr.type&&Ar.resolve(fr.message),"error"===fr.type){const Xe=fr.error||new Error(`Unknown error with ${u}`);Ar.reject(Xe)}"init_response"===fr.type&&(this._=Object.keys(fr.message).map((u=>{const Xe="function"==typeof fr.message[u];return[u,function(){return Xe?_r.exec(u)(...arguments):_r.get(u)}]})).reduce(((u,Xe)=>({...u,[Xe[0]]:Xe[1]})),{}),Ar.resolve(this._))}},this.worker.postMessage({type:"init",id:this.initId,command:u,message:Xe})}onLoad(){return new Promise((u=>{void 0===this._?this.handlers.set(this.initId,{resolve:u,reject:u}):u(this._)}))}exec(u){const Xe=this;return function(...fr){return new Promise(((Ar,_r)=>{const wr=randomString()+"-"+u;Xe.handlers.set(wr,{resolve:Ar,reject:_r}),Xe.worker.postMessage({type:"exec",id:wr,command:u,message:[...fr]})}))}}get(u){return new Promise(((Xe,fr)=>{const Ar=randomString()+"-"+u;this.handlers.set(Ar,{resolve:Xe,reject:fr}),this.worker.postMessage({type:"get",id:Ar,command:u,message:[]})}))}}const dh="test://http://example.com"!==new URL("test://http://example.com").href;async function processData(u,Xe,fr){const Ar=await fetch(u,fr?{signal:fr.signal}:void 0);let _r={};const wr=new URL(u,window.location.href);if(wr.hash.length){const u=wr.hash,Xe=decodeURIComponent(u.slice(1));try{_r=JSON.parse(Xe)}catch(u){console.warn("Error parsing or reading URL:",u)}}if(200==Ar.status){const u=await Ar.text();let fr;if(["kml","tcx","gpx"].includes(Xe)||!(()=>{let u=!1;try{u="function"==typeof window.Worker}catch(Xe){u=!1}return u})()){fr=new Converter(Xe,u,_r).convert()}else{fr=new Actor("Converter",[Xe,u,_r]).exec("convert")()}return await fr}throw new Error(`Data fetch error: ${Ar.statusText}`)}const processUrl=u=>{const Xe=u.split("://")[0],fr=u.replace(new RegExp(`^${Xe}://`),""),Ar=dh?(u=>{const Xe=new RegExp("^(https?)(//)");return u.replace(Xe,"$1:$2")})(fr):fr;return{prefix:Xe,url:Ar}},VectorTextProtocol=(u,Xe)=>Xe instanceof AbortController?(async(u,Xe)=>{const{prefix:fr,url:Ar}=processUrl(u.url);if(!Ar)throw new Error("Invalid URL: "+u.url);try{return{data:await processData(Ar,fr,Xe)}}catch(u){throw new Error(u||"Unknown Error")}})(u,Xe):((u,Xe)=>{const fr=new AbortController,{prefix:Ar,url:_r}=processUrl(u.url);return _r&&processData(_r,Ar,fr).then((u=>Xe(null,u))).catch((u=>Xe(u))),{cancel:()=>{fr.abort()}}})(u,Xe);(u=>{if(document.head.querySelector(`link[href="${u}"]`))return;const Xe=document.createElement("link");Object.assign(Xe,{rel:"stylesheet",href:u,onerror:()=>console.warn("Fail to load stylesheet:",u)}),document.head.appendChild(Xe)})("https://unpkg.com/maplibre-gl@4.5.2/dist/maplibre-gl.css");const mh=class extends defaultExport{id="maplibre";pitch=0;bearing=0;style="https://demotiles.maplibre.org/style.json";link=!1;maplibregl=window.maplibregl;static validOptions=this.validOptions.concat([new MapOption({name:"pitch",desc:"Pitch toward the horizon measured in degrees",example:"60",exampleDesc:"Look a little upward",isValid:u=>u<=90&&u>=0}),new MapOption({name:"bearing",desc:"The compass direction that is 'up'",example:"-30",exampleDesc:"Rotate map a little",isValid:u=>u<=180&&u>=-180}),new MapOption({name:"link",desc:"Syn map's position with the hash fragment of the page's URL",example:"true",exampleDesc:"Add hash for page URL",isValid:u=>"true"===u}),new MapOption({name:"style",desc:"URL of style document, read https://maplibre.org/maplibre-style-spec/",example:"https://tile.openstreetmap.jp/styles/openmaptiles/style.json",exampleDesc:"Style form OSM japan!!!",isValid:u=>URL.parse(u)})]);async addMap({maplibregl:u,target:Xe,style:fr,data:Ar,center:_r,zoom:wr,pitch:Kr,bearing:In,link:io}){const no=Ar.filter((u=>"tile"===u.type)),oo=0!==no.length?{version:8,sources:{},layers:[]}:fr;return this.map=new u.Map({container:Xe,style:oo,center:_r,zoom:wr,pitch:Kr,bearing:In,hash:io}),new Promise(((u,Xe)=>{this.map.on("load",(()=>{u(this.map)}))}))}getTerraDrawAdapter({maplibregl:u,map:Xe,draw:fr}){return fr?(this.terraDrawAdapter=new l({map:Xe,maplibregl:u}),this.terraDrawAdapter):{state:"skip"}}setControl({maplibregl:u,map:Xe,control:fr}){if(!fr||0===Object.values(fr).filter((u=>u)).length)return{state:"skip"};if(!0===fr.fullscreen&&Xe.addControl(new u.FullscreenControl),!0===fr.scale){const fr=new u.ScaleControl({unit:"metric"});Xe.addControl(fr)}}setExtra(u){const{map:Xe,debug:fr}=u;if(!fr&&!u.eval)return{state:"skip"};!0===fr&&(Xe.showTileBoundaries=!0),u.eval&&this.evalScript(u.eval,[["map",Xe]])}addMarker(u){const Xe=(new this.maplibregl.Marker).setLngLat(u.xy).addTo(this.map);return Xe.getElement().classList.add("marker"),Xe.getElement().title=u.title,Xe.getElement()}addTileData({map:u,data:Xe}){const fr=Xe.filter((u=>"tile"===u.type));if(0===fr.length)return{state:"skip"};const Ar=u.getStyle();fr.forEach(((u,Xe)=>{const fr=u.name?u.name:Xe.toString();Ar.sources[fr]={type:"raster",tiles:[u.url],tileSize:256},Ar.layers.push({id:fr,type:"raster",source:fr})})),u.setStyle(Ar)}async addGPXFile({maplibregl:u,map:Xe,data:fr}){const Ar=fr.find((u=>"gpx"===u.type));if(!Ar)return{state:"skip"};var _r;_r=u,Ug.forEach((u=>{_r.addProtocol(u,VectorTextProtocol)}));const wr="gpx",Kr={type:"geojson",data:"gpx://"+Ar};if(Xe.addSource(wr,Kr),Xe.addLayer({id:"id_"+wr,type:"line",source:wr,paint:{"line-color":"red","line-width":3}}),!Object.prototype.hasOwnProperty.call(this,"center")){const fr=(await Xe.getSource(wr).getData()).features[0].geometry.coordinates,Ar=fr.reduce(((u,Xe)=>u.extend(Xe)),new u.LngLatBounds(fr[0],fr[0]));Xe.fitBounds(Ar,{padding:20})}}updateCamera(u,Xe){Xe?this.map.flyTo({center:u.center,zoom:u.zoom}):(this.map.setCenter(u.center),this.map.setZoom(u.zoom))}project([u,Xe]){return this.map.project([u,Xe])}unproject([u,Xe]){const{lng:fr,lat:Ar}=this.map.unproject([u,Xe]);return[fr,Ar]}},converter=u=>({...u,use:mh}),yh=renderWith(converter),Sh=renderByYamlWith(converter),Bh=((u=null)=>async()=>{const Xe=document.currentScript,fr=Xe?.getAttribute("data-target")??URL.parse(Xe?.src)?.searchParams?.get("target"),Ar=document.querySelectorAll(fr);fr&&Ar&&Ar.forEach((Xe=>renderByYamlWith(u)(Xe)))})(converter);globalThis.mapclay={render:yh,renderByYaml:Sh};export{mh as default,yh as render,Bh as renderByScriptTarget,Sh as renderByYaml};
diff --git a/dist/renderers/openlayers.js b/dist/renderers/openlayers.js
new file mode 100644
index 0000000..288beed
--- /dev/null
+++ b/dist/renderers/openlayers.js
@@ -0,0 +1,2 @@
+!function(c,u){"object"==typeof exports&&"undefined"!=typeof module?u(exports):"function"==typeof define&&define.amd?define(["exports"],u):u((c="undefined"!=typeof globalThis?globalThis:c||self).openlayers={})}(this,(function(c){"use strict";var u="undefined"!=typeof document?document.currentScript:null;function t(){return t=Object.assign?Object.assign.bind():function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)({}).hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},t.apply(null,arguments)}function e(c,u=9){const d=Math.pow(10,u);return Math.round(c*d)/d}const i$1=(c,u)=>{const{x:d,y:p}=c,{x:g,y:f}=u,_=g-d,y=f-p;return Math.sqrt(y*y+_*_)};class o{constructor({name:c,callback:u,unregister:d,register:p}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=c,this.register=()=>{this.registered||(this.registered=!0,p(u))},this.unregister=()=>{this.register&&(this.registered=!1,d(u))},this.callback=u}}class r{constructor(c){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof c.minPixelDragDistance?c.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof c.minPixelDragDistanceSelecting?c.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof c.minPixelDragDistanceDrawing?c.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof c.coordinatePrecision?c.coordinatePrecision:9}getButton(c){return-1===c.button?"neither":0===c.button?"left":1===c.button?"middle":2===c.button?"right":"neither"}getMapElementXYPosition(c){const u=this.getMapEventElement(),{left:d,top:p}=u.getBoundingClientRect();return{containerX:c.clientX-d,containerY:c.clientY-p}}getDrawEventFromEvent(c){const u=this.getLngLatFromEvent(c);if(!u)return null;const{lng:d,lat:p}=u,{containerX:g,containerY:f}=this.getMapElementXYPosition(c),_=this.getButton(c),y=Array.from(this._heldKeys);return{lng:e(d,this._coordinatePrecision),lat:e(p,this._coordinatePrecision),containerX:g,containerY:f,button:_,heldKeys:y}}register(c){this._currentModeCallbacks=c,this._listeners=this.getAdapterListeners(),this._listeners.forEach((c=>{c.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;const u=this.getDrawEventFromEvent(c);u&&(this._dragState="pre-dragging",this._lastDrawEvent=u)},register:c=>{this.getMapEventElement().addEventListener("pointerdown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerdown",c)}}),new o({name:"pointermove",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;c.preventDefault();const u=this.getDrawEventFromEvent(c);if(u)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(u),this._lastDrawEvent=u;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const c={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},d={x:u.containerX,y:u.containerY},p=this._currentModeCallbacks.getState(),g=i$1(c,d);let f=!1;if(f="drawing"===p?g<this._minPixelDragDistanceDrawing:"selecting"===p?g<this._minPixelDragDistanceSelecting:g<this._minPixelDragDistance,f)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(u,(c=>{this.setDraggability.bind(this)(c)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(u,(c=>{this.setDraggability.bind(this)(c)}))},register:c=>{this.getMapEventElement().addEventListener("pointermove",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointermove",c)}}),new o({name:"contextmenu",callback:c=>{this._currentModeCallbacks&&c.preventDefault()},register:c=>{this.getMapEventElement().addEventListener("contextmenu",c)},unregister:c=>{this.getMapEventElement().removeEventListener("contextmenu",c)}}),new o({name:"pointerup",callback:c=>{if(!this._currentModeCallbacks)return;if(c.target!==this.getMapEventElement())return;if(!c.isPrimary)return;const u=this.getDrawEventFromEvent(c);u&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(u,(c=>{this.setDraggability.bind(this)(c)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(u),this._dragState="not-dragging",this.setDraggability(!0))},register:c=>{this.getMapEventElement().addEventListener("pointerup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerup",c)}}),new o({name:"keyup",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.delete(c.key),this._currentModeCallbacks.onKeyUp({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keyup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keyup",c)}}),new o({name:"keydown",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.add(c.key),this._currentModeCallbacks.onKeyDown({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keydown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keydown",c)}})]}unregister(){this._listeners.forEach((c=>{c.unregister()})),this.clear()}}const d={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var p=class{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||d[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const g=6378137,f=Math.PI*g,_=[-f,-f,f,f],y=[-180,-85,180,85],x=g*Math.log(Math.tan(Math.PI/2));class m extends p{constructor(c){super({code:c,units:"m",extent:_,global:!0,worldExtent:y,getPointResolution:function(c,u){return c/Math.cosh(u[1]/g)}})}}const v=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],C=[-180,-90,180,90],M=6378137*Math.PI/180;class P extends p{constructor(c,u){super({code:c,units:"degrees",extent:C,axisOrientation:u,global:!0,metersPerUnit:M,worldExtent:C})}}const T=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let L={},A={};function b(c,u,d){const p=c.getCode(),g=u.getCode();p in A||(A[p]={}),A[p][g]=d}function S(c,u){if(void 0!==u)for(let d=0,p=c.length;d<p;++d)u[d]=c[d];else u=c.slice();return u}function E(c,u){if(void 0!==u&&c!==u){for(let d=0,p=c.length;d<p;++d)u[d]=c[d];c=u}return c}function w(c){!function(c,u){L[c]=u}(c.getCode(),c),b(c,c,S)}function I$1(c){return"string"==typeof c?L[u=c]||L[u.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:c||null;var u}function F(c){!function(c){c.forEach(w)}(c),c.forEach((function(u){c.forEach((function(c){u!==c&&b(u,c,S)}))}))}function D(c,u,d){const p=function(c,u){return function(c,u){let d=function(c,u){let d;return c in A&&u in A[c]&&(d=A[c][u]),d}(c.getCode(),u.getCode());return d||(d=E),d}(I$1(c),I$1(u))}(u,d);return p(c,void 0,c.length)}var I,k,O,N;F(v),F(T),I=v,k=function(c,u,d){const p=c.length;d=d>1?d:2,void 0===u&&(u=d>2?c.slice():new Array(p));for(let _=0;_<p;_+=d){u[_]=f*c[_]/180;let d=g*Math.log(Math.tan(Math.PI*(+c[_+1]+90)/360));d>x?d=x:d<-x&&(d=-x),u[_+1]=d}return u},O=function(c,u,d){const p=c.length;d=d>1?d:2,void 0===u&&(u=d>2?c.slice():new Array(p));for(let _=0;_<p;_+=d)u[_]=180*c[_]/f,u[_+1]=360*Math.atan(Math.exp(c[_+1]/g))/Math.PI-90;return u},T.forEach((function(c){I.forEach((function(u){b(c,u,k),b(u,c,O)}))}));class W extends r{constructor(c){super(c),this.stylingFunction=()=>({}),this._lib=void 0,this._map=void 0,this._container=void 0,this._projection=void 0,this._vectorSource=void 0,this._geoJSONReader=void 0,this._map=c.map,this._lib=c.lib,this._geoJSONReader=new this._lib.GeoJSON,this._projection=()=>{var c;return null!=(c=this._lib.getUserProjection())?c:new p({code:"EPSG:3857"})},this._container=this._map.getViewport(),this._container.setAttribute("tabindex","0");const u=new this._lib.VectorSource({features:[]});this._vectorSource=u;const d=new this._lib.VectorLayer({source:u,style:c=>this.getStyles(c,this.stylingFunction())});this._map.addLayer(d)}hexToRGB(c){return{r:parseInt(c.slice(1,3),16),g:parseInt(c.slice(3,5),16),b:parseInt(c.slice(5,7),16)}}getStyles(c,u){const d=c.getGeometry();if(d)return{Point:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"Point",coordinates:[]},properties:d});return new this._lib.Style({image:new this._lib.Circle({radius:p.pointWidth,fill:new this._lib.Fill({color:p.pointColor}),stroke:new this._lib.Stroke({color:p.pointOutlineColor,width:p.pointOutlineWidth})})})},LineString:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:d});return new this._lib.Style({stroke:new this._lib.Stroke({color:p.lineStringColor,width:p.lineStringWidth})})},Polygon:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"Polygon",coordinates:[]},properties:d}),{r:g,g:f,b:_}=this.hexToRGB(p.polygonFillColor);return new this._lib.Style({stroke:new this._lib.Stroke({color:p.polygonOutlineColor,width:p.polygonOutlineWidth}),fill:new this._lib.Fill({color:`rgba(${g},${f},${_},${p.polygonFillOpacity})`})})}}[d.getType()](c)}clearLayers(){this._vectorSource&&this._vectorSource.clear()}addFeature(c){const u=this._geoJSONReader.readFeature(c,{dataProjection:"EPSG:4326",featureProjection:this._projection()});this._vectorSource.addFeature(u)}removeFeature(c){const u=this._vectorSource.getFeatureById(c);u&&this._vectorSource.removeFeature(u)}getLngLatFromEvent(c){const{containerX:u,containerY:d}=this.getMapElementXYPosition(c);try{return this.unproject(u,d)}catch(c){return null}}getMapEventElement(){const c=this._container.querySelectorAll("canvas");if(c.length>1)throw Error("Terra Draw currently only supports 1 canvas with OpenLayers");return c[0]}setDraggability(c){this._map.getInteractions().forEach((u=>{"DragPan"===u.constructor.name&&u.setActive(c)}))}project(c,u){const[d,p]=this._map.getPixelFromCoordinate(D([c,u],"EPSG:4326",void 0!==(g=this._projection())?g:"EPSG:3857"));var g;return{x:d,y:p}}unproject(c,u){const[d,p]=function(c,u){const d=D(c,void 0!==u?u:"EPSG:3857","EPSG:4326"),p=d[0];return(p<-180||p>180)&&(d[0]=function(c){const u=c%360;return 360*u<0?u+360:u}(p+180)-180),d}(this._map.getCoordinateFromPixel([c,u]),this._projection());return{lng:d,lat:p}}setCursor(c){"unset"===c?this.getMapEventElement().style.removeProperty("cursor"):this.getMapEventElement().style.cursor=c}setDoubleClickToZoom(c){this._map.getInteractions().forEach((function(u){"DoubleClickZoom"===u.constructor.name&&u.setActive(c)}))}render(c,u){this.stylingFunction=()=>u,c.deletedIds.forEach((c=>{this.removeFeature(c)})),c.updated.forEach((c=>{this.removeFeature(c.id),this.addFeature(c)})),c.created.forEach((c=>{this.addFeature(c)}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers())}register(c){super.register(c),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}}!function(c){c.Commit="commit",c.Provisional="provisional",c.Finish="finish"}(N||(N={}));const G="selected",j="midPoint",B="closingPoint";function A$1(c){return Boolean(c&&"object"==typeof c&&null!==c&&!Array.isArray(c))}function R(c){if(!function(c){return"number"==typeof c&&!isNaN(new Date(c).valueOf())}(c))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var V;!function(c){c.Drawing="drawing",c.Select="select",c.Static="static",c.Render="render"}(V||(V={}));class X{get state(){return this._state}set state(c){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(c){if("object"!=typeof c)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=c}registerBehaviors(c){}constructor(c){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=V.Drawing,this.mode="base",this._state="unregistered",this._styles=c&&c.styles?t({},c.styles):{},this.pointerDistance=c&&c.pointerDistance||40,this.validate=c&&c.validation,this.projection=c&&c.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(c){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=c.store,this.store.registerOnChange(c.onChange),this.setDoubleClickToZoom=c.setDoubleClickToZoom,this.project=c.project,this.unproject=c.unproject,this.onSelect=c.onSelect,this.onDeselect=c.onDeselect,this.setCursor=c.setCursor,this.onStyleChange=c.onChange,this.onFinish=c.onFinish,this.coordinatePrecision=c.coordinatePrecision,this.registerBehaviors({mode:c.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:c.coordinatePrecision,projection:this.projection})}validateFeature(c){if("unregistered"===this._state)throw new Error("Mode must be registered");const u=function(c,u){let d;if(A$1(c))if(null==c.id)d="Feature has no id";else if("string"!=typeof c.id&&"number"!=typeof c.id)d="Feature must be string or number as per GeoJSON spec";else if(u(c.id))if(A$1(c.geometry))if(A$1(c.properties))if("string"==typeof c.geometry.type&&["Polygon","LineString","Point"].includes(c.geometry.type))if(Array.isArray(c.geometry.coordinates)){if(!c.properties.mode||"string"!=typeof c.properties.mode)throw new Error("Feature does not have a valid mode property")}else d="Feature coordinates is not an array";else d="Feature is not Point, LineString or Polygon";else d="Feature has no properties";else d="Feature has no geometry";else d="Feature must match the id strategy (default is UUID4)";else d="Feature is not object";if(d)throw new Error(d);return!0}(c,this.store.idStrategy.isValidId);return this.validate?this.validate(c,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:N.Provisional}):u}onFinish(c,u){}onDeselect(c){}onSelect(c){}onKeyDown(c){}onKeyUp(c){}onMouseMove(c){}onClick(c){}onDragStart(c,u){}onDrag(c,u){}onDragEnd(c,u){}getHexColorStylingValue(c,u,d){return this.getStylingValue(c,u,d)}getNumericStylingValue(c,u,d){return this.getStylingValue(c,u,d)}getStylingValue(c,u,d){return void 0===c?u:"function"==typeof c?c(d):c}}class U extends X{constructor(...c){super(...c),this.type=V.Select}}function Y(c,u){const i=c=>c*Math.PI/180,d=i(c[1]),p=i(c[0]),g=i(u[1]),f=g-d,_=i(u[0])-p,y=Math.sin(f/2)*Math.sin(f/2)+Math.cos(d)*Math.cos(g)*Math.sin(_/2)*Math.sin(_/2);return 2*Math.atan2(Math.sqrt(y),Math.sqrt(1-y))*6371e3/1e3}const q=6371008.8;function z(c){return c%360*Math.PI/180}function H(c){return c/(q/1e3)}function $(c){return c%(2*Math.PI)*180/Math.PI}const Z=57.29577951308232,K=.017453292519943295,J=6378137,Q=(c,u)=>({x:0===c?0:c*K*J,y:0===u?0:Math.log(Math.tan(Math.PI/4+u*K/2))*J}),tt=(c,u)=>({lng:0===c?0:Z*(c/J),lat:0===u?0:(2*Math.atan(Math.exp(u/J))-Math.PI/2)*Z});function et(c,u,d){const p=z(c[0]),g=z(c[1]),f=z(d),_=H(u),y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(f));return[$(p+Math.atan2(Math.sin(f)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),$(y)]}function it(c){const{center:u,radiusKilometers:d,coordinatePrecision:p}=c,g=c.steps?c.steps:64,f=[];for(let c=0;c<g;c++){const _=et(u,d,-360*c/g);f.push([e(_[0],p),e(_[1],p)])}return f.push(f[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[f]},properties:{}}}function ot(c){const u={epsilon:0};let d;if("Polygon"===c.geometry.type)d=c.geometry.coordinates;else{if("LineString"!==c.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");d=[c.geometry.coordinates]}const p=[];for(let c=0;c<d.length;c++)for(let u=0;u<d[c].length-1;u++)for(let p=0;p<d.length;p++)for(let g=0;g<d[p].length-1;g++)s(c,u,p,g);return p.length>0;function r(c){return c<0-u.epsilon||c>1+u.epsilon}function s(c,u,g,f){const _=d[c][u],y=d[c][u+1],x=d[g][f],v=d[g][f+1],C=function(c,u,d,p){if(rt(c,d)||rt(c,p)||rt(u,d)||rt(p,d))return null;const g=c[0],f=c[1],_=u[0],y=u[1],x=d[0],v=d[1],C=p[0],M=p[1],T=(g-_)*(v-M)-(f-y)*(x-C);return 0===T?null:[((g*y-f*_)*(x-C)-(g-_)*(x*M-v*C))/T,((g*y-f*_)*(v-M)-(f-y)*(x*M-v*C))/T]}(_,y,x,v);if(null===C)return;let M,T;M=y[0]!==_[0]?(C[0]-_[0])/(y[0]-_[0]):(C[1]-_[1])/(y[1]-_[1]),T=v[0]!==x[0]?(C[0]-x[0])/(v[0]-x[0]):(C[1]-x[1])/(v[1]-x[1]),r(M)||r(T)||(C.toString(),p.push(C))}}function rt(c,u){return c[0]===u[0]&&c[1]===u[1]}function st(c,u){return 2===c.length&&"number"==typeof c[0]&&"number"==typeof c[1]&&1/0!==c[0]&&1/0!==c[1]&&(p=c[0])>=-180&&p<=180&&(d=c[1])>=-90&&d<=90&&nt(c[0])<=u&&nt(c[1])<=u;var d,p}function nt(c){let u=1,d=0;for(;Math.round(c*u)/u!==c;)u*=10,d++;return d}function at(c,u){return"Polygon"===c.geometry.type&&1===c.geometry.coordinates.length&&c.geometry.coordinates[0].length>=4&&c.geometry.coordinates[0].every((c=>st(c,u)))&&(d=c.geometry.coordinates[0][0])[0]===(p=c.geometry.coordinates[0][c.geometry.coordinates[0].length-1])[0]&&d[1]===p[1];var d,p}function lt(c,u){return at(c,u)&&!ot(c)}class ht extends X{constructor(c){var u;super(c),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const d={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}this.startingRadiusKilometers=null!=(u=null==c?void 0:c.startingRadiusKilometers)?u:1e-5,this.validate=null==c?void 0:c.validation}close(){if(void 0===this.currentCircleId)return;const c=this.currentCircleId;if(this.validate&&c){const u=this.store.getGeometryCopy(c);if(!this.validate({type:"Feature",id:c,geometry:u,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:N.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const u=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[d]=this.store.create([{geometry:u.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=d,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(c),this.close()}onMouseMove(c){this.updateCircle(c)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c])}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u):u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}updateCircle(c){if(1===this.clickCount&&this.center&&this.currentCircleId){const u=Y(this.center,[c.lng,c.lat]);let d;if("web-mercator"===this.projection){const p=function(c,u){const d=1e3*Y(c,u);if(0===d)return 1;const{x:p,y:g}=Q(c[0],c[1]),{x:f,y:_}=Q(u[0],u[1]);return Math.sqrt(Math.pow(f-p,2)+Math.pow(_-g,2))/d}(this.center,[c.lng,c.lat]);d=function(c){const{center:u,radiusKilometers:d,coordinatePrecision:p}=c,g=c.steps?c.steps:64,f=1e3*d,[_,y]=u,{x:x,y:v}=Q(_,y),C=[];for(let c=0;c<g;c++){const u=360*c/g*Math.PI/180,d=f*Math.cos(u),_=f*Math.sin(u),[y,M]=[x+d,v+_],{lng:T,lat:L}=tt(y,M);C.push([e(T,p),e(L,p)])}return C.push(C[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[C]},properties:{}}}({center:this.center,radiusKilometers:u*p,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");d=it({center:this.center,radiusKilometers:u,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:d.geometry,properties:{radiusKilometers:u}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:N.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:d.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:u}])}}}class dt{constructor({store:c,mode:u,project:d,unproject:p,pointerDistance:g,coordinatePrecision:f,projection:_}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=c,this.mode=u,this.project=d,this.unproject=p,this.pointerDistance=g,this.coordinatePrecision=f,this.projection=_}}function ut({unproject:c,point:u,pointerDistance:d}){const p=d/2,{x:g,y:f}=u;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[c(g-p,f-p),c(g+p,f-p),c(g+p,f+p),c(g-p,f+p),c(g-p,f-p)].map((c=>[c.lng,c.lat]))]}}}class gt extends dt{constructor(c){super(c)}create(c){const{containerX:u,containerY:d}=c;return ut({unproject:this.unproject,point:{x:u,y:d},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(c){super(c)}measure(c,u){const{x:d,y:p}=this.project(u[0],u[1]);return i$1({x:d,y:p},{x:c.containerX,y:c.containerY})}}class yt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=c=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode))),this.getSnappableCoordinate=(c,u)=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode&&c.id!==u))),this.config=c,this.pixelDistance=u,this.clickBoundingBox=d}getSnappable(c,u){const d=this.clickBoundingBox.create(c),p=this.store.search(d,u),g={coord:void 0,minDist:1/0};return p.forEach((u=>{let d;if("Polygon"===u.geometry.type)d=u.geometry.coordinates[0];else{if("LineString"!==u.geometry.type)return;d=u.geometry.coordinates}d.forEach((u=>{const d=this.pixelDistance.measure(c,u);d<g.minDist&&d<this.pointerDistance&&(g.coord=u,g.minDist=d)}))})),g.coord}}function mt(c,u,d){const p=z(c[0]),g=z(c[1]),f=z(d),_=H(u),y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(f));return[$(p+Math.atan2(Math.sin(f)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),$(y)]}function Ct(c,u){const d=z(c[0]),p=z(u[0]),g=z(c[1]),f=z(u[1]),_=Math.sin(p-d)*Math.cos(f),y=Math.cos(g)*Math.sin(f)-Math.sin(g)*Math.cos(f)*Math.cos(p-d);return $(Math.atan2(_,y))}function Pt(c,u,d){const p=[],g=c.length;let f,_,y,x=0;for(let g=0;g<c.length&&!(u>=x&&g===c.length-1);g++){if(x>u&&0===p.length){if(f=u-x,!f)return p.push(c[g]),p;_=Ct(c[g],c[g-1])-180,y=mt(c[g],f,_),p.push(y)}if(x>=d)return f=d-x,f?(_=Ct(c[g],c[g-1])-180,y=mt(c[g],f,_),p.push(y),p):(p.push(c[g]),p);if(x>=u&&p.push(c[g]),g===c.length-1)return p;x+=Y(c[g],c[g+1])}if(x<u&&c.length===g)throw new Error("Start position is beyond line");const v=c[c.length-1];return[v,v]}function _t(c){return c*(Math.PI/180)}function xt(c){return c*(180/Math.PI)}class Mt extends dt{constructor(c){super(c),this.config=void 0,this.config=c}generateInsertionCoordinates(c,u,d){const p=[c,u];let g=0;for(let c=0;c<p.length-1;c++)g+=Y(p[0],p[1]);if(g<=d)return p;let f=g/d-1;Number.isInteger(f)||(f=Math.floor(f)+1);const _=[];for(let c=0;c<f;c++){const u=Pt(p,d*c,d*(c+1));_.push(u)}const y=[];for(let c=0;c<_.length;c++)y.push(_[c][1]);return this.limitCoordinates(y)}generateInsertionGeodesicCoordinates(c,u,d){const p=Y(c,u),g=function(c,u,d){const p=[],g=_t(c[1]),f=_t(c[0]),_=_t(u[1]),y=_t(u[0]);d+=1;const x=2*Math.asin(Math.sqrt(Math.sin((_-g)/2)**2+Math.cos(g)*Math.cos(_)*Math.sin((y-f)/2)**2));if(0===x||isNaN(x))return p;for(let c=0;c<=d;c++){const u=c/d,v=Math.sin((1-u)*x)/Math.sin(x),C=Math.sin(u*x)/Math.sin(x),M=v*Math.cos(g)*Math.cos(f)+C*Math.cos(_)*Math.cos(y),T=v*Math.cos(g)*Math.sin(f)+C*Math.cos(_)*Math.sin(y),L=v*Math.sin(g)+C*Math.sin(_);if(isNaN(M)||isNaN(T)||isNaN(L))continue;const A=Math.atan2(L,Math.sqrt(M**2+T**2)),I=Math.atan2(T,M);isNaN(A)||isNaN(I)||p.push([xt(I),xt(A)])}return p.slice(1,-1)}(c,u,Math.floor(p/d));return this.limitCoordinates(g)}limitCoordinates(c){return c.map((c=>[e(c[0],this.config.coordinatePrecision),e(c[1],this.config.coordinatePrecision)]))}}function bt(c,u){return c[0]===u[0]&&c[1]===u[1]}class St extends X{constructor(c){super(c),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const u={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}this.validate=null==c?void 0:c.validation,this.insertCoordinates=null==c?void 0:c.insertCoordinates}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId);c.coordinates.pop(),this.updateGeometries([...c.coordinates],void 0,N.Commit);const u=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}updateGeometries(c,u,d){if(!this.currentId)return;const p={type:"LineString",coordinates:c};if(this.validate&&!this.validate({type:"Feature",geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d}))return;const g=[{id:this.currentId,geometry:p}];this.closingPointId&&u&&g.push({id:this.closingPointId,geometry:{type:"Point",coordinates:u}}),"commit"===d&&(this.lastCommitedCoordinates=p.coordinates),this.store.updateGeometry(g)}generateInsertCoordinates(c,u){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const d=Y(c,u)/(this.insertCoordinates.value+1);let p=[];return"globe"===this.projection?p=this.insertPoint.generateInsertionGeodesicCoordinates(c,u,d):"web-mercator"===this.projection&&(p=this.insertPoint.generateInsertionCoordinates(c,u,d)),p}createLine(c){const[u]=this.store.create([{geometry:{type:"LineString",coordinates:[c,c]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[c,c],this.currentId=u,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(c){if(!this.currentId)return;const u=this.store.getGeometryCopy(this.currentId).coordinates,[d]=this.store.create([{geometry:{type:"Point",coordinates:[...c]},properties:{mode:this.mode}}]);this.closingPointId=d,this.setCursor(this.cursors.close);const p=[...u,c];this.updateGeometries(p,void 0,N.Commit),this.currentCoordinate++}updateToLine(c,u){if(!this.currentId)return;const d=this.store.getGeometryCopy(this.currentId).coordinates,[p,g]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:d[d.length-2],{x:f,y:_}=this.project(p,g);if(i$1({x:f,y:_},{x:u.x,y:u.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const y=[...d,c];this.updateGeometries(y,d[d.length-1],N.Commit),this.currentCoordinate++}registerBehaviors(c){this.snapping=new yt(c,new pt(c),new gt(c)),this.insertPoint=new Mt(c)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const u=this.store.getGeometryCopy(this.currentId).coordinates;u.pop();const d=this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];if(this.closingPointId){const[d,p]=u[u.length-1],{x:g,y:f}=this.project(d,p);i$1({x:g,y:f},{x:c.containerX,y:c.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let p=[...u,d];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const c=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],u=d;if(!bt(c,u)){const g=this.generateInsertCoordinates(c,u);p=[...this.lastCommitedCoordinates.slice(0,-1),...g,d]}}this.updateGeometries(p,void 0,N.Provisional)}onClick(c){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1;const u=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];0===this.currentCoordinate?this.createLine(u):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(u):this.currentId&&this.updateToLine(u,{x:c.containerX,y:c.containerY})}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel&&this.cleanUp(),c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"LineString"===c.geometry.type&&c.properties.mode===this.mode?(u.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,u.lineStringColor,c),u.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,u.lineStringWidth,c),u.zIndex=10,u):"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode?(u.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,u.pointColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,u.pointWidth,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),u.zIndex=40,u):u}validateFeature(c){return!!super.validateFeature(c)&&"LineString"===c.geometry.type&&c.properties.mode===this.mode&&c.geometry.coordinates.length>=2}}function Et(c,u){return"Point"===c.geometry.type&&st(c.geometry.coordinates,u)}class wt extends X{constructor(c){super(c),this.mode="point",this.cursors=void 0;const u={create:"crosshair"};this.cursors=c&&c.cursors?t({},u,c.cursors):u}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(!this.store)throw new Error("Mode must be registered first");const u={type:"Point",coordinates:[c.lng,c.lat]},d={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:u,properties:d},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:N.Finish}))return;const[p]=this.store.create([{geometry:u,properties:d}]);this.onFinish(p,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode&&(u.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.pointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,c),u.zIndex=30),u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&Et(c,this.coordinatePrecision)}}class It extends dt{constructor(c,u){super(c),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=c,this.pixelDistance=u}get ids(){return this._startEndPoints.concat()}set ids(c){}create(c,u){if(this.ids.length)throw new Error("Opening and closing points already created");if(c.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:c[0]},properties:{mode:u,[B]:!0}},{geometry:{type:"Point",coordinates:c[c.length-2]},properties:{mode:u,[B]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(c){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:c[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:c[c.length-3]}}])}isClosingPoint(c){const u=this.store.getGeometryCopy(this.ids[0]),d=this.store.getGeometryCopy(this.ids[1]),p=this.pixelDistance.measure(c,u.coordinates),g=this.pixelDistance.measure(c,d.coordinates);return{isClosing:p<this.pointerDistance,isPreviousClosing:g<this.pointerDistance}}}class Ft extends X{constructor(c){super(c),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const u={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId).coordinates[0];if(c.length<5)return;if(!this.updatePolygonGeometry([...c.slice(0,-2),c[0]],N.Finish))return;const u=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}registerBehaviors(c){this.pixelDistance=new pt(c),this.snapping=new yt(c,this.pixelDistance,new gt(c)),this.closingPoints=new It(c,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,d=this.store.getGeometryCopy(this.currentId).coordinates[0];let p;if(u&&(c.lng=u[0],c.lat=u[1]),1===this.currentCoordinate){const u=1/Math.pow(10,this.coordinatePrecision-1),g=Math.max(1e-6,u);p=[d[0],[c.lng,c.lat],[c.lng,c.lat-g],d[0]]}else if(2===this.currentCoordinate)p=[d[0],d[1],[c.lng,c.lat],d[0]];else{const{isClosing:u,isPreviousClosing:g}=this.closingPoints.isClosingPoint(c);g||u?(this.setCursor(this.cursors.close),p=[...d.slice(0,-2),d[0],d[0]]):p=[...d.slice(0,-2),[c.lng,c.lat],d[0]]}this.updatePolygonGeometry(p,N.Provisional)}updatePolygonGeometry(c,u){if(!this.currentId)return!1;const d={type:"Polygon",coordinates:[c]};return!(this.validate&&!this.validate({type:"Feature",geometry:d},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:u})||(this.store.updateGeometry([{id:this.currentId,geometry:d}]),0))}onClick(c){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1,0===this.currentCoordinate){const u=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(c):void 0;u&&(c.lng=u[0],c.lat=u[1]);const[d]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentId=d,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;u&&(c.lng=u[0],c.lat=u[1]);const d=this.store.getGeometryCopy(this.currentId);if(bt([c.lng,c.lat],d.coordinates[0][0]))return;if(!this.updatePolygonGeometry([d.coordinates[0][0],[c.lng,c.lat],[c.lng,c.lat],d.coordinates[0][0]],N.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;u&&(c.lng=u[0],c.lat=u[1]);const d=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([c.lng,c.lat],d[1]))return;if(!this.updatePolygonGeometry([d[0],d[1],[c.lng,c.lat],[c.lng,c.lat],d[0]],N.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(d,"polygon"),this.currentCoordinate++}else if(this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,d=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:p,isPreviousClosing:g}=this.closingPoints.isClosingPoint(c);if(g||p)this.close();else{if(u&&(c.lng=u[0],c.lat=u[1]),bt([c.lng,c.lat],d[this.currentCoordinate-1]))return;const p=function(c=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:c},properties:{}}}([[...d.slice(0,-1),[c.lng,c.lat],d[0]]]);if(!this.updatePolygonGeometry(p.geometry.coordinates[0],N.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(p.geometry.coordinates[0])}}}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const c=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode){if("Polygon"===c.geometry.type)return u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u;if("Point"===c.geometry.type)return u.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),u.zIndex=30,u}return u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&at(c,this.coordinatePrecision)}}class Dt extends X{constructor(c){super(c),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const u={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}}updateRectangle(c,u){if(1===this.clickCount&&this.center&&this.currentRectangleId){const d=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],p={type:"Polygon",coordinates:[[d,[c.lng,d[1]],[c.lng,c.lat],[d[0],c.lat],d]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:u}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:p}])}}close(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),c&&this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const[u]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=u,this.clickCount++,this.setDrawing()}else this.updateRectangle(c,N.Finish),this.close()}onMouseMove(c){this.updateRectangle(c,N.Provisional)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==c&&this.store.delete([c])}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u):u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}}class kt extends X{constructor(c){super({styles:c.styles}),this.type=V.Render,this.mode="render",this.mode=c.modeName}registerBehaviors(c){this.mode=c.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(c){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",c),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,c),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",c),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,c),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",c),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,c),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",c),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,c),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,c),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",c),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,c)}}validateFeature(c){return super.validateFeature(c)&&(Et(c,this.coordinatePrecision)||at(c,this.coordinatePrecision)||function(c,u){return"LineString"===c.geometry.type&&c.geometry.coordinates.length>=2&&c.geometry.coordinates.every((c=>st(c,u)))}(c,this.coordinatePrecision))}}function Ot(c,u){const d=c,p=u,g=z(d[1]),f=z(p[1]);let _=z(p[0]-d[0]);_>Math.PI&&(_-=2*Math.PI),_<-Math.PI&&(_+=2*Math.PI);const y=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(g/2+Math.PI/4)),x=($(Math.atan2(_,y))+360)%360;return x>180?-(360-x):x}function jt(c,u,d){let p=u;u<0&&(p=-Math.abs(p));const g=p/q,f=c[0]*Math.PI/180,_=z(c[1]),y=z(d),x=g*Math.cos(y);let v=_+x;Math.abs(v)>Math.PI/2&&(v=v>0?Math.PI-v:-Math.PI-v);const C=Math.log(Math.tan(v/2+Math.PI/4)/Math.tan(_/2+Math.PI/4)),M=Math.abs(C)>1e-11?x/C:Math.cos(_),T=[(180*(f+g*Math.sin(y)/M)/Math.PI+540)%360-180,180*v/Math.PI];return T[0]+=T[0]-c[0]>180?-360:c[0]-T[0]>180?360:0,T}function Lt(c,u,d,p,g){const f=p(c[0],c[1]),_=p(u[0],u[1]),{lng:y,lat:x}=g((f.x+_.x)/2,(f.y+_.y)/2);return[e(y,d),e(x,d)]}function Wt(c,u,d){const p=jt(c,1e3*Y(c,u)/2,Ot(c,u));return[e(p[0],d),e(p[1],d)]}function Bt({featureCoords:c,precision:u,unproject:d,project:p,projection:g}){const f=[];for(let _=0;_<c.length-1;_++){let y;if("web-mercator"===g)y=Lt(c[_],c[_+1],u,p,d);else{if("globe"!==g)throw new Error("Invalid projection");y=Wt(c[_],c[_+1],u)}f.push(y)}return f}class Gt extends dt{constructor(c,u){super(c),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=c,this.selectionPointBehavior=u}get ids(){return this._midPoints.concat()}set ids(c){}insert(c,u){const d=this.store.getGeometryCopy(c),{midPointFeatureId:p,midPointSegment:g}=this.store.getPropertiesCopy(c),f=this.store.getGeometryCopy(p),_="Polygon"===f.type?f.coordinates[0]:f.coordinates;_.splice(g+1,0,d.coordinates),f.coordinates="Polygon"===f.type?[_]:_,this.store.updateGeometry([{id:p,geometry:f}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(_,p,u),this.selectionPointBehavior.create(_,f.type,p)}create(c,u,d){if(!this.store.has(u))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(c,u,d,p,g,f){return Bt({featureCoords:c,precision:d,project:p,unproject:g,projection:f}).map(((c,d)=>({geometry:{type:"Point",coordinates:c},properties:u(d)})))}(c,(c=>({mode:this.mode,[j]:!0,midPointSegment:c,midPointFeatureId:u})),d,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(c){if(0!==this._midPoints.length)return Bt({featureCoords:c,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((c,u)=>({id:this._midPoints[u],geometry:{type:"Point",coordinates:c}})))}}class Nt extends dt{constructor(c){super(c),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(c){}create(c,u,d){this._selectionPoints=this.store.create(function(c,u,d){const p=[],g="Polygon"===u?c.length-1:c.length;for(let u=0;u<g;u++)p.push({geometry:{type:"Point",coordinates:c[u]},properties:d(u)});return p}(c,u,(c=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:d,index:c}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(c){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((u,d)=>({id:u,geometry:{type:"Point",coordinates:c[d]}})))}getOneUpdated(c,u){if(void 0!==this._selectionPoints[c])return{id:this._selectionPoints[c],geometry:{type:"Point",coordinates:u}}}}function Vt(c,u){let d=!1;for(let _=0,y=u.length;_<y;_++){const y=u[_];for(let u=0,_=y.length,x=_-1;u<_;x=u++)(g=y[u])[1]>(p=c)[1]!=(f=y[x])[1]>p[1]&&p[0]<(f[0]-g[0])*(p[1]-g[1])/(f[1]-g[1])+g[0]&&(d=!d)}var p,g,f;return d}const At=(c,u,d)=>{const o=c=>c*c,r=(c,u)=>o(c.x-u.x)+o(c.y-u.y);return Math.sqrt(((c,u,d)=>{const p=r(u,d);if(0===p)return r(c,u);let g=((c.x-u.x)*(d.x-u.x)+(c.y-u.y)*(d.y-u.y))/p;return g=Math.max(0,Math.min(1,g)),r(c,{x:u.x+g*(d.x-u.x),y:u.y+g*(d.y-u.y)})})(c,u,d))};class Rt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=c,this.createClickBoundingBox=u,this.pixelDistance=d}find(c,u){let d,p,g,f,_=1/0,y=1/0,x=1/0;const v=this.createClickBoundingBox.create(c),C=this.store.search(v);for(let v=0;v<C.length;v++){const M=C[v],T=M.geometry;if("Point"===T.type){if(M.properties.selectionPoint||!u&&M.properties[j])continue;const p=this.pixelDistance.measure(c,T.coordinates);M.properties[j]&&p<this.pointerDistance&&p<x?(x=p,g=M):!M.properties[j]&&p<this.pointerDistance&&p<_&&(_=p,d=M)}else if("LineString"===T.type){if(d)continue;for(let u=0;u<T.coordinates.length-1;u++){const d=T.coordinates[u],g=T.coordinates[u+1],f=At({x:c.containerX,y:c.containerY},this.project(d[0],d[1]),this.project(g[0],g[1]));f<this.pointerDistance&&f<y&&(y=f,p=M)}}else if("Polygon"===T.type){if(d||p)continue;Vt([c.lng,c.lat],T.coordinates)&&(f=M)}}return{clickedFeature:d||p||f,clickedMidPoint:g}}}class Tt extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=c,this.featuresAtMouseEvent=u,this.selectionPoints=d,this.midPoints=p}startDragging(c,u){this.draggedFeatureId=u,this.dragPosition=[c.lng,c.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(c,u){const{clickedFeature:d}=this.featuresAtMouseEvent.find(c,!0);return!(!d||d.id!==u)}drag(c,u){if(!this.draggedFeatureId)return;const d=this.store.getGeometryCopy(this.draggedFeatureId),p=[c.lng,c.lat];if("Polygon"===d.type||"LineString"===d.type){let g,f;if("Polygon"===d.type?(g=d.coordinates[0],f=g.length-1):(g=d.coordinates,f=g.length),!this.dragPosition)return!1;for(let c=0;c<f;c++){const u=g[c],d=[this.dragPosition[0]-p[0],this.dragPosition[1]-p[1]],f=e(u[0]-d[0],this.config.coordinatePrecision),_=e(u[1]-d[1],this.config.coordinatePrecision);if(f>180||f<-180||_>90||_<-90)return!1;g[c]=[f,_]}"Polygon"===d.type&&(g[g.length-1]=[g[0][0],g[0][1]]);const _=this.selectionPoints.getUpdated(g)||[],y=this.midPoints.getUpdated(g)||[];if(u&&!u({type:"Feature",id:this.draggedFeatureId,geometry:d,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:N.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:d},..._,...y]),this.dragPosition=[c.lng,c.lat]}else"Point"===d.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:p}}]),this.dragPosition=[c.lng,c.lat])}}class Xt extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=c,this.pixelDistance=u,this.selectionPoints=d,this.midPoints=p}getClosestCoordinate(c,u){const d={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let p;if("LineString"===u.type)p=u.coordinates;else{if("Polygon"!==u.type)return d;p=u.coordinates[0]}for(let g=0;g<p.length;g++){const f=this.pixelDistance.measure(c,p[g]);if(f<this.pointerDistance&&f<d.dist){const c="Polygon"===u.type&&(g===p.length-1||0===g);d.dist=f,d.index=c?0:g,d.isFirstOrLastPolygonCoord=c}}return d}getDraggableIndex(c,u){const d=this.store.getGeometryCopy(u),p=this.getClosestCoordinate(c,d);return-1===p.index?-1:p.index}drag(c,u,d){if(!this.draggedCoordinate.id)return!1;const p=this.draggedCoordinate.index,g=this.store.getGeometryCopy(this.draggedCoordinate.id),f="LineString"===g.type?g.coordinates:g.coordinates[0],_=[c.lng,c.lat];if(c.lng>180||c.lng<-180||c.lat>90||c.lat<-90)return!1;if("Polygon"!==g.type||p!==f.length-1&&0!==p)f[p]=_;else{const c=f.length-1;f[0]=_,f[c]=_}const y=this.selectionPoints.getOneUpdated(p,_),x=y?[y]:[],v=this.midPoints.getUpdated(f)||[];return!("Point"!==g.type&&!u&&ot({type:"Feature",geometry:g,properties:{}})||d&&!d({type:"Feature",id:this.draggedCoordinate.id,geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:N.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:g},...x,...v]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,u){this.draggedCoordinate={id:c,index:u}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(c){let u=0,d=0,p=0;return("Polygon"===c.geometry.type?c.geometry.coordinates[0].slice(0,-1):c.geometry.coordinates).forEach((c=>{u+=c[0],d+=c[1],p++}),!0),[u/p,d/p]}function Yt(c,u){c[0]+=c[0]-u[0]>180?-360:u[0]-c[0]>180?360:0;const d=q,p=u[1]*Math.PI/180,g=c[1]*Math.PI/180,f=g-p;let _=Math.abs(c[0]-u[0])*Math.PI/180;_>Math.PI&&(_-=2*Math.PI);const y=Math.log(Math.tan(g/2+Math.PI/4)/Math.tan(p/2+Math.PI/4)),x=Math.abs(y)>1e-11?f/y:Math.cos(p);return Math.sqrt(f*f+x*x*_*_)*d}function Kt(c){const u=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((c=>{const{x:u,y:d}=Q(c[0],c[1]);return[u,d]}));return"Polygon"===c.geometry.type?function(c){let u=0,d=0,p=0;const g=c.length;for(let f=0;f<g-1;f++){const[g,_]=c[f],[y,x]=c[f+1],v=g*x-y*_;u+=v,d+=(g+y)*v,p+=(_+x)*v}return u/=2,d/=6*u,p/=6*u,{x:d,y:p}}(u):function(c){const u=c.length;let d=0,p=0;for(let g=0;g<u;g++){const[u,f]=c[g];d+=u,p+=f}return{x:d/u,y:p/u}}(u)}class zt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=c,this.selectionPoints=u,this.midPoints=d}reset(){this.lastBearing=void 0}rotate(c,u,d){const p=this.store.getGeometryCopy(u);if("Polygon"!==p.type&&"LineString"!==p.type)return;const g=[c.lng,c.lat];let f;const _={type:"Feature",geometry:p,properties:{}};if("web-mercator"===this.config.projection){if(f=function vt({x:c,y:u},{x:d,y:p}){let g=Math.atan2(p-u,d-c);return g*=180/Math.PI,g>180?g-=360:g<-180&&(g+=360),g}(Kt(_),Q(c.lng,c.lat)),!this.lastBearing)return void(this.lastBearing=f);((c,u)=>{if(0===u||360===u||-360===u)return c;const d=.017453292519943295*u,p=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,u])=>Q(c,u))),g=p.reduce(((c,u)=>({x:c.x+u.x,y:c.y+u.y})),{x:0,y:0});g.x/=p.length,g.y/=p.length;const f=p.map((c=>({x:g.x+(c.x-g.x)*Math.cos(d)-(c.y-g.y)*Math.sin(d),y:g.y+(c.x-g.x)*Math.sin(d)+(c.y-g.y)*Math.cos(d)}))).map((({x:c,y:u})=>[tt(c,u).lng,tt(c,u).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=f:(console.log("rotatedCoordinates linestring",f),c.geometry.coordinates=f)})(_,-(this.lastBearing-f))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(f=Ot(Ut({type:"Feature",geometry:p,properties:{}}),g),!this.lastBearing)return void(this.lastBearing=f+180);!function(c,u){if(0===u||360===u||-360===u)return c;const d=Ut(c);("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const p=Ot(d,c)+u,g=Yt(d,c),f=jt(d,g,p);c[0]=f[0],c[1]=f[1]}))}(_,-(this.lastBearing-(f+180)))}const y="Polygon"===p.type?p.coordinates[0]:p.coordinates;y.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const x=this.midPoints.getUpdated(y)||[],v=this.selectionPoints.getUpdated(y)||[];if(d&&!d({id:u,type:"Feature",geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:N.Provisional}))return!1;this.store.updateGeometry([{id:u,geometry:p},...v,...x]),"web-mercator"===this.projection?this.lastBearing=f:"globe"===this.projection&&(this.lastBearing=f+180)}}class Ht extends dt{constructor(c,u,d){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=c,this.selectionPoints=u,this.midPoints=d}reset(){this.lastDistance=void 0}scale(c,u,d){const p=this.store.getGeometryCopy(u);if("Polygon"!==p.type&&"LineString"!==p.type)return;const g=[c.lng,c.lat],f={type:"Feature",geometry:p,properties:{}};let _;const y=Kt(f);if("web-mercator"===this.config.projection){const u=Q(c.lng,c.lat);_=i$1(y,u)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");_=Y(Ut({type:"Feature",geometry:p,properties:{}}),g)}if(!this.lastDistance)return void(this.lastDistance=_);const x=1-(this.lastDistance-_)/_;if("web-mercator"===this.config.projection){const{lng:c,lat:u}=tt(y.x,y.y);!function(c,u,d){if(1===u)return c;const p=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,u])=>Q(c,u))),g=Q(d[0],d[1]),f=p.map((c=>({x:g.x+(c.x-g.x)*u,y:g.y+(c.y-g.y)*u}))).map((({x:c,y:u})=>[tt(c,u).lng,tt(c,u).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=f:c.geometry.coordinates=f}(f,x,[c,u])}else"globe"===this.config.projection&&function(c,u,d,p="xy"){1===u||("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const g=Yt(d,c),f=Ot(d,c),_=jt(d,g*u,f);"x"!==p&&"xy"!==p||(c[0]=_[0]),"y"!==p&&"xy"!==p||(c[1]=_[1])}))}(f,x,Ut(f));const v="Polygon"===p.type?p.coordinates[0]:p.coordinates;v.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const C=this.midPoints.getUpdated(v)||[],M=this.selectionPoints.getUpdated(v)||[];if(d&&!d({id:u,type:"Feature",geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:N.Provisional}))return!1;this.store.updateGeometry([{id:u,geometry:p},...M,...C]),this.lastDistance=_}}class $t extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=c,this.pixelDistance=u,this.selectionPoints=d,this.midPoints=p}getClosestCoordinate(c,u){const d={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let p;if("LineString"===u.type)p=u.coordinates;else{if("Polygon"!==u.type)return d;p=u.coordinates[0]}for(let g=0;g<p.length;g++){const f=this.pixelDistance.measure(c,p[g]);if(f<this.pointerDistance&&f<d.dist){const c="Polygon"===u.type&&(g===p.length-1||0===g);d.dist=f,d.index=c?0:g,d.isFirstOrLastPolygonCoord=c}}return d}isValidDragWebMercator(c,u,d){switch(c){case 0:if(u<=0||d>=0)return!1;break;case 1:if(d>=0)return!1;break;case 2:if(u>=0||d>=0)return!1;break;case 3:if(u>=0)return!1;break;case 4:if(u>=0||d<=0)return!1;break;case 5:if(d<=0)return!1;break;case 6:if(u<=0||d<=0)return!1;break;case 7:if(u<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const c=this.getFeature(this.draggedCoordinate.id);if(!c)return null;const u=this.getNormalisedCoordinates(c.geometry);return{boundingBox:this.getBBoxWebMercator(u),feature:c,updatedCoords:u,selectedCoordinate:u[this.draggedCoordinate.index]}}centerWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{feature:d,boundingBox:p,updatedCoords:g,selectedCoordinate:f}=u,_=Kt(d);if(!_)return null;const y=Q(f[0],f[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(p,y),v=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:x,updatedCoords:g,webMercatorCursor:v,webMercatorSelected:y,webMercatorOrigin:_}),g}centerFixedWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{feature:d,boundingBox:p,updatedCoords:g,selectedCoordinate:f}=u,_=Kt(d);if(!_)return null;const y=Q(f[0],f[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(p,y),v=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:x,updatedCoords:g,webMercatorCursor:v,webMercatorSelected:y,webMercatorOrigin:_}),g}scaleFixedWebMercator({closestBBoxIndex:c,webMercatorOrigin:u,webMercatorSelected:d,webMercatorCursor:p,updatedCoords:g}){if(!this.isValidDragWebMercator(c,u.x-p.x,u.y-p.y))return null;let f=i$1(u,p)/i$1(u,d);return f<0&&(f=this.minimumScale),this.performWebMercatorScale(g,u.x,u.y,f,f),g}oppositeFixedWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{boundingBox:d,updatedCoords:p,selectedCoordinate:g}=u,f=Q(g[0],g[1]),{oppositeBboxIndex:_,closestBBoxIndex:y}=this.getIndexesWebMercator(d,f),x={x:d[_][0],y:d[_][1]},v=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:y,updatedCoords:p,webMercatorCursor:v,webMercatorSelected:f,webMercatorOrigin:x}),p}oppositeWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{boundingBox:d,updatedCoords:p,selectedCoordinate:g}=u,f=Q(g[0],g[1]),{oppositeBboxIndex:_,closestBBoxIndex:y}=this.getIndexesWebMercator(d,f),x={x:d[_][0],y:d[_][1]},v=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:y,updatedCoords:p,webMercatorCursor:v,webMercatorSelected:f,webMercatorOrigin:x}),p}scaleWebMercator({closestBBoxIndex:c,webMercatorOrigin:u,webMercatorSelected:d,webMercatorCursor:p,updatedCoords:g}){const f=u.x-p.x,_=u.y-p.y;if(!this.isValidDragWebMercator(c,f,_))return null;let y=1;0!==f&&1!==c&&5!==c&&(y=1-(u.x-d.x-f)/f);let x=1;return 0!==_&&3!==c&&7!==c&&(x=1-(u.y-d.y-_)/_),this.validateScale(y,x)?(y<0&&(y=this.minimumScale),x<0&&(x=this.minimumScale),this.performWebMercatorScale(g,u.x,u.y,y,x),g):null}getFeature(c){if(null===this.draggedCoordinate.id)return null;const u=this.store.getGeometryCopy(c);return"Polygon"!==u.type&&"LineString"!==u.type?null:{type:"Feature",geometry:u,properties:{}}}getNormalisedCoordinates(c){return"Polygon"===c.type?c.coordinates[0]:c.coordinates}validateScale(c,u){const d=!isNaN(c)&&u<Number.MAX_SAFE_INTEGER,p=!isNaN(u)&&u<Number.MAX_SAFE_INTEGER;return d&&p}performWebMercatorScale(c,u,d,p,g){c.forEach((c=>{const{x:f,y:_}=Q(c[0],c[1]),y=u+(f-u)*p,x=d+(_-d)*g,{lng:v,lat:C}=tt(y,x);c[0]=v,c[1]=C}))}getBBoxWebMercator(c){const u=[1/0,1/0,-1/0,-1/0];(c=c.map((c=>{const{x:u,y:d}=Q(c[0],c[1]);return[u,d]}))).forEach((([c,d])=>{c<u[0]&&(u[0]=c),d<u[1]&&(u[1]=d),c>u[2]&&(u[2]=c),d>u[3]&&(u[3]=d)}));const[d,p,g,f]=u;return[[d,f],[(d+g)/2,f],[g,f],[g,f+(p-f)/2],[g,p],[(d+g)/2,p],[d,p],[d,f+(p-f)/2]]}getIndexesWebMercator(c,u){let d,p=1/0;for(let g=0;g<c.length;g++){const f=i$1({x:u.x,y:u.y},{x:c[g][0],y:c[g][1]});f<p&&(d=g,p=f)}if(void 0===d)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[d],closestBBoxIndex:d}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,u){this.draggedCoordinate={id:c,index:u}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(c,u){const d=this.store.getGeometryCopy(u),p=this.getClosestCoordinate(c,d);return-1===p.index?-1:p.index}drag(c,u,d){if(!this.draggedCoordinate.id)return!1;const p=this.getFeature(this.draggedCoordinate.id);if(!p)return!1;let g=null;if("center"===u?g=this.centerWebMercatorDrag(c):"opposite"===u?g=this.oppositeWebMercatorDrag(c):"center-fixed"===u?g=this.centerFixedWebMercatorDrag(c):"opposite-fixed"===u&&(g=this.oppositeFixedWebMercatorDrag(c)),!g)return!1;for(let c=0;c<g.length;c++){const u=g[c];if(u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision),!st(u,this.coordinatePrecision))return!1}const f=this.midPoints.getUpdated(g)||[],_=this.selectionPoints.getUpdated(g)||[],y={type:p.geometry.type,coordinates:"Polygon"===p.geometry.type?[g]:g};return!(d&&!d({id:this.draggedCoordinate.id,type:"Feature",geometry:y,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:N.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:y},..._,...f]),0))}}class Jt extends U{constructor(c){var u;super(c),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=c&&c.flags?c.flags:{};const d={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const u={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}if(this.dragEventThrottle=c&&void 0!==c.dragEventThrottle&&c.dragEventThrottle||5,this.allowManualDeselection=null==(u=null==c?void 0:c.allowManualDeselection)||u,c&&c.flags&&c.flags)for(const u in c.flags){const d=c.flags[u].feature;d&&d.validation&&(this.validations[u]=d.validation)}}selectFeature(c){this.select(c,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(c){this.pixelDistance=new pt(c),this.clickBoundingBox=new gt(c),this.featuresAtMouseEvent=new Rt(c,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(c),this.midPoints=new Gt(c,this.selectionPoints),this.rotateFeature=new zt(c,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(c,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(c,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(c,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(c,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const c=this.selected.filter((c=>this.store.has(c))).map((c=>({id:c,property:G,value:!1})));this.store.updateProperty(c),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(c){if(!this.selectionPoints.ids.length)return;let u,d=1/0;if(this.selectionPoints.ids.forEach((p=>{const g=this.store.getGeometryCopy(p),f=this.pixelDistance.measure(c,g.coordinates);f<this.pointerDistance&&f<d&&(d=f,u=this.store.getPropertiesCopy(p))})),!u)return;const p=u.selectionPointFeatureId,g=u.index,f=this.store.getPropertiesCopy(p),_=this.flags[f.mode],y=this.validations[f.mode];if(!(_&&_.feature&&_.feature.coordinates&&_.feature.coordinates.deletable))return;const x=this.store.getGeometryCopy(p);let v;if("Polygon"===x.type){if(v=x.coordinates[0],v.length<=4)return}else if("LineString"===x.type&&(v=x.coordinates,v.length<=3))return;if(v){if("Polygon"===x.type&&0===g||g===v.length-1?(v.shift(),v.pop(),v.push([v[0][0],v[0][1]])):v.splice(g,1),y&&!y({id:p,type:"Feature",geometry:x,properties:f},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:N.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:p,geometry:x}]),this.selectionPoints.create(v,x.type,p),_&&_.feature&&_.feature.coordinates&&_.feature.coordinates.midpoints&&this.midPoints.create(v,p,this.coordinatePrecision)}}select(c,u=!0){if(this.selected[0]===c)return;const{mode:d}=this.store.getPropertiesCopy(c),p=this.flags[d];if(!p||!p.feature)return;const g=this.selected[0];if(g){if(g===c)return;this.deselect()}u&&this.setCursor(this.cursors.pointerOver),this.selected=[c],this.store.updateProperty([{id:c,property:"selected",value:!0}]),this.onSelect(c);const{type:f,coordinates:_}=this.store.getGeometryCopy(c);if("LineString"!==f&&"Polygon"!==f)return;const y="LineString"===f?_:_[0];y&&p&&p.feature.coordinates&&(this.selectionPoints.create(y,f,c),p.feature.coordinates.midpoints&&this.midPoints.create(y,c,this.coordinatePrecision))}onLeftClick(c){const{clickedFeature:u,clickedMidPoint:d}=this.featuresAtMouseEvent.find(c,this.selected.length>0);if(this.selected.length&&d)this.midPoints.insert(d.id,this.coordinatePrecision);else if(u&&u.id)this.select(u.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(c){"right"!==c.button?"left"===c.button&&this.onLeftClick(c):this.onRightClick(c)}canScale(c){return this.keyEvents.scale&&this.keyEvents.scale.every((u=>c.heldKeys.includes(u)))}canRotate(c){return this.keyEvents.rotate&&this.keyEvents.rotate.every((u=>c.heldKeys.includes(u)))}preventDefaultKeyEvent(c){const u=this.canRotate(c),d=this.canScale(c);(u||d)&&c.preventDefault()}onKeyDown(c){this.preventDefaultKeyEvent(c)}onKeyUp(c){if(this.preventDefaultKeyEvent(c),this.keyEvents.delete&&c.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&c.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(c,u){if(!this.selected.length)return;const d=this.store.getPropertiesCopy(this.selected[0]),p=this.flags[d.mode];if(!(p&&p.feature&&(p.feature.draggable||p.feature.coordinates&&p.feature.coordinates.draggable||p.feature.coordinates&&p.feature.coordinates.resizable)))return;this.dragEventCount=0;const g=this.selected[0],f=this.dragCoordinate.getDraggableIndex(c,g);return p&&p.feature&&p.feature.coordinates&&(p.feature.coordinates.draggable||p.feature.coordinates.resizable)&&-1!==f?(this.setCursor(this.cursors.dragStart),p.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(g,f):this.dragCoordinate.startDragging(g,f),void u(!1)):p&&p.feature&&p.feature.draggable&&this.dragFeature.canDrag(c,g)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(c,g),void u(!1)):void 0}onDrag(c,u){const d=this.selected[0];if(!d)return;const p=this.store.getPropertiesCopy(d),g=this.flags[p.mode],f=!0===(g&&g.feature&&g.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const _=this.validations[p.mode];if(g&&g.feature&&g.feature.rotateable&&this.canRotate(c))return u(!1),void this.rotateFeature.rotate(c,d,_);if(g&&g.feature&&g.feature.scaleable&&this.canScale(c))return u(!1),void this.scaleFeature.scale(c,d,_);if(this.dragCoordinateResizeFeature.isDragging()&&g.feature&&g.feature.coordinates&&g.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return u(!1),void this.dragCoordinateResizeFeature.drag(c,g.feature.coordinates.resizable,_)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(c,f,_):this.dragFeature.isDragging()?this.dragFeature.drag(c,_):u(!0)}onDragEnd(c,u){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),u(!0)}onMouseMove(c){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let u=!1;this.midPoints.ids.forEach((d=>{if(u)return;const p=this.store.getGeometryCopy(d);this.pixelDistance.measure(c,p.coordinates)<this.pointerDistance&&(u=!0)}));let d=!1;if(this.selectionPoints.ids.forEach((p=>{const g=this.store.getGeometryCopy(p);this.pixelDistance.measure(c,g.coordinates)<this.pointerDistance&&(u=!1,d=!0)})),u)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:p}=this.featuresAtMouseEvent.find(c,!0);this.setCursor(this.selected.length>0&&(p&&p.id===this.selected[0]||d)?this.cursors.pointerOver:"unset")}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode&&"Point"===c.geometry.type){if(c.properties.selectionPoint)return u.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,u.pointOutlineColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,u.pointWidth,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,c),u.zIndex=30,u;if(c.properties.midPoint)return u.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,u.pointOutlineColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,c),u.zIndex=40,u}else if(c.properties[G]){if("Polygon"===c.geometry.type)return u.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,u.polygonFillColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,u.polygonOutlineWidth,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,u.polygonOutlineColor,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u;if("LineString"===c.geometry.type)return u.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,u.lineStringColor,c),u.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,u.lineStringWidth,c),u.zIndex=10,u;if("Point"===c.geometry.type)return u.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,u.pointOutlineWidth,c),u.zIndex=10,u}return u}}class Zt extends X{constructor(...c){super(...c),this.type=V.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(c,u,d,p,g){for(;p>d;){if(p-d>600){const f=p-d+1,_=u-d+1,y=Math.log(f),x=.5*Math.exp(2*y/3),v=.5*Math.sqrt(y*x*(f-x)/f)*(_-f/2<0?-1:1);qt(c,u,Math.max(d,Math.floor(u-_*x/f+v)),Math.min(p,Math.floor(u+(f-_)*x/f+v)),g)}const f=c[u];let _=d,y=p;for(Qt(c,d,u),g(c[p],f)>0&&Qt(c,d,p);_<y;){for(Qt(c,_,y),_++,y--;g(c[_],f)<0;)_++;for(;g(c[y],f)>0;)y--}0===g(c[d],f)?Qt(c,d,y):(y++,Qt(c,y,p)),y<=u&&(d=y+1),u<=y&&(p=y-1)}}function Qt(c,u,d){const p=c[u];c[u]=c[d],c[d]=p}function te(c,u){ee(c,0,c.children.length,u,c)}function ee(c,u,d,p,g){g||(g=ce([])),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let f=u;f<d;f++){const u=c.children[f];ie(g,c.leaf?p(u):u)}return g}function ie(c,u){return c.minX=Math.min(c.minX,u.minX),c.minY=Math.min(c.minY,u.minY),c.maxX=Math.max(c.maxX,u.maxX),c.maxY=Math.max(c.maxY,u.maxY),c}function oe(c,u){return c.minX-u.minX}function re(c,u){return c.minY-u.minY}function se(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function ne(c){return c.maxX-c.minX+(c.maxY-c.minY)}function ae(c,u){const d=Math.max(c.minX,u.minX),p=Math.max(c.minY,u.minY),g=Math.min(c.maxX,u.maxX),f=Math.min(c.maxY,u.maxY);return Math.max(0,g-d)*Math.max(0,f-p)}function le(c,u){return c.minX<=u.minX&&c.minY<=u.minY&&u.maxX<=c.maxX&&u.maxY<=c.maxY}function he(c,u){return u.minX<=c.maxX&&u.minY<=c.maxY&&u.maxX>=c.minX&&u.maxY>=c.minY}function ce(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(c,u,d,p,g){const f=[u,d];for(;f.length;){if((d=f.pop())-(u=f.pop())<=p)continue;const _=u+Math.ceil((d-u)/p/2)*p;qt(c,_,u,d,g),f.push(u,_,_,d)}}class ue{constructor(c){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(c){let u=this.data;const d=[];if(!he(c,u))return d;const p=this.toBBox,g=[];for(;u;){for(let f=0;f<u.children.length;f++){const _=u.children[f],y=u.leaf?p(_):_;he(c,y)&&(u.leaf?d.push(_):le(c,y)?this._all(_,d):g.push(_))}u=g.pop()}return d}collides(c){let u=this.data;if(he(c,u)){const d=[];for(;u;){for(let p=0;p<u.children.length;p++){const g=u.children[p],f=u.leaf?this.toBBox(g):g;if(he(c,f)){if(u.leaf||le(c,f))return!0;d.push(g)}}u=d.pop()}}return!1}load(c){if(c.length<this._minEntries){for(let u=0;u<c.length;u++)this.insert(c[u]);return}let u=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===u.height)this._splitRoot(this.data,u);else{if(this.data.height<u.height){const c=this.data;this.data=u,u=c}this._insert(u,this.data.height-u.height-1,!0)}else this.data=u}insert(c){this._insert(c,this.data.height-1)}clear(){this.data=ce([])}remove(c){let u=this.data;const d=this.toBBox(c),p=[],g=[];let f,_,y=!1;for(;u||p.length;){if(u||(u=p.pop(),_=p[p.length-1],f=g.pop(),y=!0),u.leaf){const d=u.children.indexOf(c);-1!==d&&(u.children.splice(d,1),p.push(u),this._condense(p))}y||u.leaf||!le(u,d)?_?(f++,u=_.children[f],y=!1):u=null:(p.push(u),g.push(f),f=0,_=u,u=u.children[0])}}toBBox(c){return c}compareMinX(c,u){return c.minX-u.minX}compareMinY(c,u){return c.minY-u.minY}_all(c,u){const d=[];for(;c;)c.leaf?u.push(...c.children):d.push(...c.children),c=d.pop();return u}_build(c,u,d,p){const g=d-u+1;let f,_=this._maxEntries;if(g<=_)return f=ce(c.slice(u,d+1)),te(f,this.toBBox),f;p||(p=Math.ceil(Math.log(g)/Math.log(_)),_=Math.ceil(g/Math.pow(_,p-1))),f=ce([]),f.leaf=!1,f.height=p;const y=Math.ceil(g/_),x=y*Math.ceil(Math.sqrt(_));de(c,u,d,x,this.compareMinX);for(let g=u;g<=d;g+=x){const u=Math.min(g+x-1,d);de(c,g,u,y,this.compareMinY);for(let d=g;d<=u;d+=y){const g=Math.min(d+y-1,u);f.children.push(this._build(c,d,g,p-1))}}return te(f,this.toBBox),f}_chooseSubtree(c,u,d,p){for(;p.push(u),!u.leaf&&p.length-1!==d;){let d,p=1/0,_=1/0;for(let y=0;y<u.children.length;y++){const x=u.children[y],v=se(x),C=(g=c,f=x,(Math.max(f.maxX,g.maxX)-Math.min(f.minX,g.minX))*(Math.max(f.maxY,g.maxY)-Math.min(f.minY,g.minY))-v);C<_?(_=C,p=v<p?v:p,d=x):C===_&&v<p&&(p=v,d=x)}u=d||u.children[0]}var g,f;return u}_insert(c,u,d){const p=d?c:this.toBBox(c),g=[],f=this._chooseSubtree(p,this.data,u,g);for(f.children.push(c),ie(f,p);u>=0&&g[u].children.length>this._maxEntries;)this._split(g,u),u--;this._adjustParentBBoxes(p,g,u)}_split(c,u){const d=c[u],p=d.children.length,g=this._minEntries;this._chooseSplitAxis(d,g,p);const f=this._chooseSplitIndex(d,g,p),_=ce(d.children.splice(f,d.children.length-f));_.height=d.height,_.leaf=d.leaf,te(d,this.toBBox),te(_,this.toBBox),u?c[u-1].children.push(_):this._splitRoot(d,_)}_splitRoot(c,u){this.data=ce([c,u]),this.data.height=c.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(c,u,d){let p,g=1/0,f=1/0;for(let _=u;_<=d-u;_++){const u=ee(c,0,_,this.toBBox),y=ee(c,_,d,this.toBBox),x=ae(u,y),v=se(u)+se(y);x<g?(g=x,p=_,f=v<f?v:f):x===g&&v<f&&(f=v,p=_)}return p||d-u}_chooseSplitAxis(c,u,d){const p=c.leaf?this.compareMinX:oe,g=c.leaf?this.compareMinY:re;this._allDistMargin(c,u,d,p)<this._allDistMargin(c,u,d,g)&&c.children.sort(p)}_allDistMargin(c,u,d,p){c.children.sort(p);const g=this.toBBox,f=ee(c,0,u,g),_=ee(c,d-u,d,g);let y=ne(f)+ne(_);for(let p=u;p<d-u;p++){const u=c.children[p];ie(f,c.leaf?g(u):u),y+=ne(f)}for(let p=d-u-1;p>=u;p--){const u=c.children[p];ie(_,c.leaf?g(u):u),y+=ne(_)}return y}_adjustParentBBoxes(c,u,d){for(let p=d;p>=0;p--)ie(u[p],c)}_condense(c){for(let u,d=c.length-1;d>=0;d--)0===c[d].children.length?d>0?(u=c[d-1].children,u.splice(u.indexOf(c[d]),1)):this.clear():te(c[d],this.toBBox)}}class ge{constructor(c){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(c&&c.maxEntries?c.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(c,u){this.idToNode.set(c.id,u),this.nodeToId.set(u,c.id)}toBBox(c){const u=[],d=[];let p;if("Polygon"===c.geometry.type)p=c.geometry.coordinates[0];else if("LineString"===c.geometry.type)p=c.geometry.coordinates;else{if("Point"!==c.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");p=[c.geometry.coordinates]}for(let c=0;c<p.length;c++)d.push(p[c][1]),u.push(p[c][0]);const g=Math.min(...d),f=Math.max(...d);return{minX:Math.min(...u),minY:g,maxX:Math.max(...u),maxY:f}}insert(c){if(this.idToNode.get(String(c.id)))throw new Error("Feature already exists");const u=this.toBBox(c);this.setMaps(c,u),this.tree.insert(u)}load(c){const u=[],d=new Set;c.forEach((c=>{const p=this.toBBox(c);if(this.setMaps(c,p),d.has(String(c.id)))throw new Error(`Duplicate feature ID found ${c.id}`);d.add(String(c.id)),u.push(p)})),this.tree.load(u)}update(c){this.remove(c.id);const u=this.toBBox(c);this.setMaps(c,u),this.tree.insert(u)}remove(c){const u=this.idToNode.get(c);if(!u)throw new Error(`${c} not inserted into the spatial index`);this.tree.remove(u)}clear(){this.tree.clear()}search(c){return this.tree.search(this.toBBox(c)).map((c=>this.nodeToId.get(c)))}collides(c){return this.tree.collides(this.toBBox(c))}}const ct={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){const u=16*Math.random()|0;return("x"==c?u:3&u|8).toString(16)})),isValidId:c=>"string"==typeof c&&36===c.length};class ye{constructor(c){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!c||!1!==c.tracked,this.idStrategy=c&&c.idStrategy?c.idStrategy:ct}clone(c){return JSON.parse(JSON.stringify(c))}getId(){return this.idStrategy.getId()}has(c){return Boolean(this.store[c])}load(c,u){if(0===c.length)return;const d=this.clone(c);d.forEach((c=>{null==c.id&&(c.id=this.idStrategy.getId()),this.tracked&&(c.properties.createdAt?R(c.properties.createdAt):c.properties.createdAt=+new Date,c.properties.updatedAt?R(c.properties.updatedAt):c.properties.updatedAt=+new Date)}));const p=[];d.forEach((c=>{const d=c.id;if(u&&!u(c))throw new Error(`Feature ${d} is not valid: ${JSON.stringify(c)}`);if(this.has(d))throw new Error(`Feature already exists with this id: ${d}`);this.store[d]=c,p.push(d)})),this.spatialIndex.load(d),this._onChange(p,"create")}search(c,u){const d=this.spatialIndex.search(c).map((c=>this.store[c]));return this.clone(u?d.filter(u):d)}registerOnChange(c){this._onChange=(u,d)=>{c(u,d)}}getGeometryCopy(c){const u=this.store[c];if(!u)throw new Error(`No feature with this id (${c}), can not get geometry copy`);return this.clone(u.geometry)}getPropertiesCopy(c){const u=this.store[c];if(!u)throw new Error(`No feature with this id (${c}), can not get properties copy`);return this.clone(u.properties)}updateProperty(c){const u=[];c.forEach((({id:c,property:d,value:p})=>{const g=this.store[c];if(!g)throw new Error(`No feature with this (${c}), can not update geometry`);u.push(c),g.properties[d]=p,this.tracked&&(g.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(u,"update")}updateGeometry(c){const u=[];c.forEach((({id:c,geometry:d})=>{u.push(c);const p=this.store[c];if(!p)throw new Error(`No feature with this (${c}), can not update geometry`);p.geometry=this.clone(d),this.spatialIndex.update(p),this.tracked&&(p.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(u,"update")}create(c){const u=[];return c.forEach((({geometry:c,properties:d})=>{let p,g=t({},d);this.tracked&&(p=+new Date,d?(g.createdAt="number"==typeof d.createdAt?d.createdAt:p,g.updatedAt="number"==typeof d.updatedAt?d.updatedAt:p):g={createdAt:p,updatedAt:p});const f=this.getId(),_={id:f,type:"Feature",geometry:c,properties:g};this.store[f]=_,this.spatialIndex.insert(_),u.push(f)})),this._onChange&&this._onChange([...u],"create"),u}delete(c){c.forEach((c=>{if(!this.store[c])throw new Error("No feature with this id, can not delete");delete this.store[c],this.spatialIndex.remove(c)})),this._onChange&&this._onChange([...c],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((c=>this.store[c])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(c){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=c.adapter,this._mode=new Zt;const u=new Set,d=c.modes.reduce(((c,d)=>{if(u.has(d.mode))throw new Error(`There is already a ${d.mode} mode provided`);return u.add(d.mode),c[d.mode]=d,c}),{}),p=Object.keys(d);if(0===p.length)throw new Error("No modes provided");p.forEach((c=>{if(d[c].type===V.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=c}})),this._modes=t({},d,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!c.tracked,idStrategy:c.idStrategy?c.idStrategy:void 0});const s=c=>{const u=[],d=this._store.copyAll().filter((d=>!c.includes(d.id)||(u.push(d),!1)));return{changed:u,unchanged:d}},n=(c,u)=>{this._enabled&&this._eventListeners.finish.forEach((d=>{d(c,u)}))},a=(c,u)=>{if(!this._enabled)return;this._eventListeners.change.forEach((d=>{d(c,u)}));const{changed:d,unchanged:p}=s(c);"create"===u?this._adapter.render({created:d,deletedIds:[],unchanged:p,updated:[]},this.getModeStyles()):"update"===u?this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles()):"delete"===u?this._adapter.render({created:[],deletedIds:c,unchanged:p,updated:[]},this.getModeStyles()):"styling"===u&&this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:[]},this.getModeStyles())},l=c=>{if(!this._enabled)return;this._eventListeners.select.forEach((u=>{u(c)}));const{changed:u,unchanged:d}=s([c]);this._adapter.render({created:[],deletedIds:[],unchanged:d,updated:u},this.getModeStyles())},h=c=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((c=>{c()}));const{changed:u,unchanged:d}=s([c]);u&&this._adapter.render({created:[],deletedIds:[],unchanged:d,updated:u},this.getModeStyles())};Object.keys(this._modes).forEach((c=>{this._modes[c].register({mode:c,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const c={};return Object.keys(this._modes).forEach((u=>{c[u]=c=>this._instanceSelectMode&&c.properties[G]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(c):this._modes[u].styleFeature.bind(this._modes[u])(c)})),c}featuresAtLocation({lng:c,lat:u},d){const p=d&&void 0!==d.pointerDistance?d.pointerDistance:30,g=!d||void 0===d.ignoreSelectFeatures||d.ignoreSelectFeatures,f=this._adapter.unproject.bind(this._adapter),_=this._adapter.project.bind(this._adapter),y=_(c,u),x=ut({unproject:f,point:y,pointerDistance:p});return this._store.search(x).filter((d=>{if(g&&(d.properties[j]||d.properties.selectionPoint))return!1;if("Point"===d.geometry.type){const c=d.geometry.coordinates,u=_(c[0],c[1]);return i$1(y,u)<p}if("LineString"===d.geometry.type){const c=d.geometry.coordinates;for(let u=0;u<c.length-1;u++){const d=c[u],g=c[u+1];if(At(y,_(d[0],d[1]),_(g[0],g[1]))<p)return!0}return!1}return!!Vt([c,u],d.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(c,u){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._modes[c].styles=u}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(c){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(c){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[c],this._mode.start()}removeFeatures(c){this.checkEnabled(),this._store.delete(c)}selectFeature(c){this.getSelectMode().selectFeature(c)}deselectFeature(c){this.getSelectMode().deselectFeature(c)}getFeatureId(){return this._store.getId()}hasFeature(c){return this._store.has(c)}addFeatures(c){this.checkEnabled(),0!==c.length&&this._store.load(c,(c=>{if(Boolean(c&&"object"==typeof c&&"properties"in c&&"object"==typeof c.properties&&null!==c.properties&&"mode"in c.properties)){const u=this._modes[c.properties.mode];return!!u&&u.validateFeature.bind(u)(c)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((c=>{c()}))},getState:()=>this._mode.state,onClick:c=>{this._mode.onClick(c)},onMouseMove:c=>{this._mode.onMouseMove(c)},onKeyDown:c=>{this._mode.onKeyDown(c)},onKeyUp:c=>{this._mode.onKeyUp(c)},onDragStart:(c,u)=>{this._mode.onDragStart(c,u)},onDrag:(c,u)=>{this._mode.onDrag(c,u)},onDragEnd:(c,u)=>{this._mode.onDragEnd(c,u)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(c,u){const{lng:d,lat:p}=c;return this.featuresAtLocation({lng:d,lat:p},u)}getFeaturesAtPointerEvent(c,u){const d=this._adapter.getLngLatFromEvent.bind(this._adapter)(c);return null===d?[]:this.featuresAtLocation(d,u)}stop(){this._enabled=!1,this._adapter.unregister()}on(c,u){const d=this._eventListeners[c];d.includes(u)||d.push(u)}off(c,u){const d=this._eventListeners[c];d.includes(u)&&d.splice(d.indexOf(u),1)}}class MapOption{constructor({name:c,desc:u,example:d,exampleDesc:p,isValid:g}){this.name=c,this.desc=u,this.example=d,this.exampleDesc=p,this.isValid=g}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(c){if(this._map)throw Error("map cannot be reassigned");this._map=c}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(c,u){const d=this.constructor.validOptions.find((u=>u.valueOf()===c))?.isValid;if(!d)throw Error(`Cannot find inValid method for option ${c}`);return d(u)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:c=>!!c?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`width: ${c}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`height: ${c}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:c=>{try{const[u,d]=JSON.parse(c);return!isNaN(u)&&!isNaN(d)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:c=>{const u=Number(c);return!isNaN(u)&&u>=0&&u<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:c=>"object"==typeof c}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:c=>"true"===c}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:c=>URL.parse(c)&&c.includes("{x}")&&c.includes("{y}")&&c.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:c=>URL.parse(c)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:c=>URL.parse(c)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:c=>"true"===c}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(c){if(c.XYZ){("string"==typeof c.XYZ?[c.XYZ]:c.XYZ).forEach((u=>{let d,p;if("string"==typeof u)p=new URL(u),d={type:"tile",url:u,title:`${p.host}${p.pathname.split("%7B")[0]}`};else{if("object"!=typeof u)return;p=new URL(u.url),d={type:"tile",url:u.url,title:u.title?u.title:`${p.host}${p.pathname.split("%7B")[0]}`}}c.data.push(d)})),delete c.XYZ}c.WMTS&&(c.data.push({type:"wmts",url:c.aliases[c.WMTS]??c.WMTS}),delete c.WMTS),c.GPX&&(c.data.push({type:"gpx",url:c.GPX}),delete c.GPX),"string"==typeof c.center&&Object.prototype.hasOwnProperty.call(c.aliases,c.center)&&(c.center=c.aliases[c.center]),c.data?.forEach((u=>{Object.prototype.hasOwnProperty.call(c.aliases,u.url)&&(u.title=u.url,u.url=c.aliases[u.url])}))}createView({target:c,width:u,height:d}){c.style.width=u,c.style.height=d,"flex"===window.getComputedStyle(c.parentElement).display&&(c.style.flexBasis=`calc(${u})`)}setDraw=({target:c,terraDrawAdapter:u})=>{const d=c?.id?c.id+"-":"",p={idStrategy:{isValidId:c=>!0,getId:function(){let c=d+window.crypto.randomUUID();return function(){return c=d+window.crypto.randomUUID(),c}}()}};return this.terraDraw=((c,u={})=>new Se({adapter:c,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...u}))(u,p),((c,u,d={})=>{const p=document.createElement("select");c.appendChild(p),p.name="Draw",p.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",p.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',u.start(),u.setMode("render");const g=c.id?`terra-draw-data-${c.id}`:"terra-draw-data",f=window.localStorage.getItem(g);if(f)try{const c=JSON.parse(f);c.forEach((c=>c.properties={mode:"render"})),u.addFeatures(c)}catch(c){console.warn("Fail to drawn features from Local Storage.",f,c),window.localStorage.removeItem(g)}const _=c.querySelector("canvas")??c;p.onchange=()=>{p.children[0].textContent="--STOP--",_.style.removeProperty("cursor");const c=u.getSnapshot();switch(p.value){case"nothing":u.setMode("render"),p.children[0].textContent="Draw Something";break;case"modify":u.setMode("select");break;case"delete":u.setMode("render"),_.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(g),p.value="nothing",p.onchange(),u.clear();break;case"features":window.alert(`${c.length} features\n\n${JSON.stringify(c,null,4)}`);break;default:u.setMode(p.value)}},u.on("change",(()=>{})),u.on("finish",((c,f)=>{if("draw"===f.action){const d=u.getSnapshot().find((u=>u.id===c));d&&(u.removeFeatures([c]),d.properties.mode="render",u.addFeatures([d]))}const _=d.idFilter??(()=>!0),y=u.getSnapshot().filter(_);window.localStorage.setItem(g,JSON.stringify(y)),"point"!==f.mode&&"draw"===f.action&&(p.value="nothing",p.onchange())})),document.onclick=c=>{if("delete"===p.value){const d=u.getFeaturesAtPointerEvent(c,{pointerDistance:40});d.length>0&&(u.removeFeatures([d[0].id]),0===u.getSnapshot().length&&(p.value="nothing",p.onchange()))}}})(c,this.terraDraw,{idFilter:c=>c.id.startsWith(d)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(c){const u=c.filter((c=>"wmts"===c.type)),d=c.filter((c=>"tile"===c.type));return u.length>0||d.length>1}propsForEval(){let c=this,u=[],d=[];for(;c!==Object.prototype;)u=u.concat(Object.getOwnPropertyNames(c)),d=d.concat(Object.entries(c)),c=Object.getPrototypeOf(c);return u}evalScript(c,u=[]){const d=this.propsForEval(),p=u.map((([c,u])=>c)),g=[...d.map((c=>this[c])),...u.map((([c,u])=>u))],f=Function([...d,...p],c).bind(this,...g);try{return f()}catch(c){return console.warn("Fail to run custom script:",c),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(c){return null==c}var ft=function extend$4(c,u){var d,p,g,f;if(u)for(d=0,p=(f=Object.keys(u)).length;d<p;d+=1)c[g=f[d]]=u[g];return c},pe={isNothing:isNothing,isObject:function isObject(c){return"object"==typeof c&&null!==c},toArray:function toArray$1(c){return Array.isArray(c)?c:isNothing(c)?[]:[c]},repeat:function repeat(c,u){var d,p="";for(d=0;d<u;d+=1)p+=c;return p},isNegativeZero:function isNegativeZero(c){return 0===c&&Number.NEGATIVE_INFINITY===1/c},extend:ft};function formatError(c,u){var d="",p=c.reason||"(unknown reason)";return c.mark?(c.mark.name&&(d+='in "'+c.mark.name+'" '),d+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!u&&c.mark.snippet&&(d+="\n\n"+c.mark.snippet),p+" "+d):p}function YAMLException$1(c,u){Error.call(this),this.name="YAMLException",this.reason=c,this.mark=u,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(c){return this.name+": "+formatError(this,c)};var me=YAMLException$1;function getLine(c,u,d,p,g){var f="",_="",y=Math.floor(g/2)-1;return p-u>y&&(u=p-y+(f=" ... ").length),d-p>y&&(d=p+y-(_=" ...").length),{str:f+c.slice(u,d).replace(/\t/g,"→")+_,pos:p-u+f.length}}function padStart(c,u){return pe.repeat(" ",u-c.length)+c}var fe=function makeSnippet(c,u){if(u=Object.create(u||null),!c.buffer)return null;u.maxLength||(u.maxLength=79),"number"!=typeof u.indent&&(u.indent=1),"number"!=typeof u.linesBefore&&(u.linesBefore=3),"number"!=typeof u.linesAfter&&(u.linesAfter=2);for(var d,p=/\r?\n|\r|\0/g,g=[0],f=[],_=-1;d=p.exec(c.buffer);)f.push(d.index),g.push(d.index+d[0].length),c.position<=d.index&&_<0&&(_=g.length-2);_<0&&(_=g.length-1);var y,x,v="",C=Math.min(c.line+u.linesAfter,f.length).toString().length,M=u.maxLength-(u.indent+C+3);for(y=1;y<=u.linesBefore&&!(_-y<0);y++)x=getLine(c.buffer,g[_-y],f[_-y],c.position-(g[_]-g[_-y]),M),v=pe.repeat(" ",u.indent)+padStart((c.line-y+1).toString(),C)+" | "+x.str+"\n"+v;for(x=getLine(c.buffer,g[_],f[_],c.position,M),v+=pe.repeat(" ",u.indent)+padStart((c.line+1).toString(),C)+" | "+x.str+"\n",v+=pe.repeat("-",u.indent+C+3+x.pos)+"^\n",y=1;y<=u.linesAfter&&!(_+y>=f.length);y++)x=getLine(c.buffer,g[_+y],f[_+y],c.position-(g[_]-g[_+y]),M),v+=pe.repeat(" ",u.indent)+padStart((c.line+y+1).toString(),C)+" | "+x.str+"\n";return v.replace(/\n$/,"")},_e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],xe=["scalar","sequence","mapping"];var ve=function Type$1(c,u){if(u=u||{},Object.keys(u).forEach((function(u){if(-1===_e.indexOf(u))throw new me('Unknown option "'+u+'" is met in definition of "'+c+'" YAML type.')})),this.options=u,this.tag=c,this.kind=u.kind||null,this.resolve=u.resolve||function(){return!0},this.construct=u.construct||function(c){return c},this.instanceOf=u.instanceOf||null,this.predicate=u.predicate||null,this.represent=u.represent||null,this.representName=u.representName||null,this.defaultStyle=u.defaultStyle||null,this.multi=u.multi||!1,this.styleAliases=function compileStyleAliases(c){var u={};return null!==c&&Object.keys(c).forEach((function(d){c[d].forEach((function(c){u[String(c)]=d}))})),u}(u.styleAliases||null),-1===xe.indexOf(this.kind))throw new me('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')};function compileList(c,u){var d=[];return c[u].forEach((function(c){var u=d.length;d.forEach((function(d,p){d.tag===c.tag&&d.kind===c.kind&&d.multi===c.multi&&(u=p)})),d[u]=c})),d}function Schema$1(c){return this.extend(c)}Schema$1.prototype.extend=function extend(c){var u=[],d=[];if(c instanceof ve)d.push(c);else if(Array.isArray(c))d=d.concat(c);else{if(!c||!Array.isArray(c.implicit)&&!Array.isArray(c.explicit))throw new me("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.implicit&&(u=u.concat(c.implicit)),c.explicit&&(d=d.concat(c.explicit))}u.forEach((function(c){if(!(c instanceof ve))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&"scalar"!==c.loadKind)throw new me("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new me("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),d.forEach((function(c){if(!(c instanceof ve))throw new me("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var p=Object.create(Schema$1.prototype);return p.implicit=(this.implicit||[]).concat(u),p.explicit=(this.explicit||[]).concat(d),p.compiledImplicit=compileList(p,"implicit"),p.compiledExplicit=compileList(p,"explicit"),p.compiledTypeMap=function compileMap(){var c,u,d={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(c){c.multi?(d.multi[c.kind].push(c),d.multi.fallback.push(c)):d[c.kind][c.tag]=d.fallback[c.tag]=c}for(c=0,u=arguments.length;c<u;c+=1)arguments[c].forEach(collectType);return d}(p.compiledImplicit,p.compiledExplicit),p};var we=new Schema$1({explicit:[new ve("tag:yaml.org,2002:str",{kind:"scalar",construct:function(c){return null!==c?c:""}}),new ve("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(c){return null!==c?c:[]}}),new ve("tag:yaml.org,2002:map",{kind:"mapping",construct:function(c){return null!==c?c:{}}})]});var Ce=new ve("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(c){if(null===c)return!0;var u=c.length;return 1===u&&"~"===c||4===u&&("null"===c||"Null"===c||"NULL"===c)},construct:function constructYamlNull(){return null},predicate:function isNull(c){return null===c},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var Ee=new ve("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(c){if(null===c)return!1;var u=c.length;return 4===u&&("true"===c||"True"===c||"TRUE"===c)||5===u&&("false"===c||"False"===c||"FALSE"===c)},construct:function constructYamlBoolean(c){return"true"===c||"True"===c||"TRUE"===c},predicate:function isBoolean(c){return"[object Boolean]"===Object.prototype.toString.call(c)},represent:{lowercase:function(c){return c?"true":"false"},uppercase:function(c){return c?"TRUE":"FALSE"},camelcase:function(c){return c?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}var Pe=new ve("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(c){if(null===c)return!1;var u,d=c.length,p=0,g=!1;if(!d)return!1;if("-"!==(u=c[p])&&"+"!==u||(u=c[++p]),"0"===u){if(p+1===d)return!0;if("b"===(u=c[++p])){for(p++;p<d;p++)if("_"!==(u=c[p])){if("0"!==u&&"1"!==u)return!1;g=!0}return g&&"_"!==u}if("x"===u){for(p++;p<d;p++)if("_"!==(u=c[p])){if(!isHexCode(c.charCodeAt(p)))return!1;g=!0}return g&&"_"!==u}if("o"===u){for(p++;p<d;p++)if("_"!==(u=c[p])){if(!isOctCode(c.charCodeAt(p)))return!1;g=!0}return g&&"_"!==u}}if("_"===u)return!1;for(;p<d;p++)if("_"!==(u=c[p])){if(!isDecCode(c.charCodeAt(p)))return!1;g=!0}return!(!g||"_"===u)},construct:function constructYamlInteger(c){var u,d=c,p=1;if(-1!==d.indexOf("_")&&(d=d.replace(/_/g,"")),"-"!==(u=d[0])&&"+"!==u||("-"===u&&(p=-1),u=(d=d.slice(1))[0]),"0"===d)return 0;if("0"===u){if("b"===d[1])return p*parseInt(d.slice(2),2);if("x"===d[1])return p*parseInt(d.slice(2),16);if("o"===d[1])return p*parseInt(d.slice(2),8)}return p*parseInt(d,10)},predicate:function isInteger(c){return"[object Number]"===Object.prototype.toString.call(c)&&c%1==0&&!pe.isNegativeZero(c)},represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),be=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Me=/^[-+]?[0-9]+e/;var Te=new ve("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(c){return null!==c&&!(!be.test(c)||"_"===c[c.length-1])},construct:function constructYamlFloat(c){var u,d;return d="-"===(u=c.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(u[0])>=0&&(u=u.slice(1)),".inf"===u?1===d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===u?NaN:d*parseFloat(u,10)},predicate:function isFloat(c){return"[object Number]"===Object.prototype.toString.call(c)&&(c%1!=0||pe.isNegativeZero(c))},represent:function representYamlFloat(c,u){var d;if(isNaN(c))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(pe.isNegativeZero(c))return"-0.0";return d=c.toString(10),Me.test(d)?d.replace("e",".e"):d},defaultStyle:"lowercase"}),Re=we.extend({implicit:[Ce,Ee,Pe,Te]}),Le=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ae=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Ie=new ve("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(c){return null!==c&&(null!==Le.exec(c)||null!==Ae.exec(c))},construct:function constructYamlTimestamp(c){var u,d,p,g,f,_,y,x,v=0,C=null;if(null===(u=Le.exec(c))&&(u=Ae.exec(c)),null===u)throw new Error("Date resolve error");if(d=+u[1],p=+u[2]-1,g=+u[3],!u[4])return new Date(Date.UTC(d,p,g));if(f=+u[4],_=+u[5],y=+u[6],u[7]){for(v=u[7].slice(0,3);v.length<3;)v+="0";v=+v}return u[9]&&(C=6e4*(60*+u[10]+ +(u[11]||0)),"-"===u[9]&&(C=-C)),x=new Date(Date.UTC(d,p,g,f,_,y,v)),C&&x.setTime(x.getTime()-C),x},instanceOf:Date,represent:function representYamlTimestamp(c){return c.toISOString()}});var Fe=new ve("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(c){return"<<"===c||null===c}}),ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Oe=new ve("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(c){if(null===c)return!1;var u,d,p=0,g=c.length,f=ke;for(d=0;d<g;d++)if(!((u=f.indexOf(c.charAt(d)))>64)){if(u<0)return!1;p+=6}return p%8==0},construct:function constructYamlBinary(c){var u,d,p=c.replace(/[\r\n=]/g,""),g=p.length,f=ke,_=0,y=[];for(u=0;u<g;u++)u%4==0&&u&&(y.push(_>>16&255),y.push(_>>8&255),y.push(255&_)),_=_<<6|f.indexOf(p.charAt(u));return 0===(d=g%4*6)?(y.push(_>>16&255),y.push(_>>8&255),y.push(255&_)):18===d?(y.push(_>>10&255),y.push(_>>2&255)):12===d&&y.push(_>>4&255),new Uint8Array(y)},predicate:function isBinary(c){return"[object Uint8Array]"===Object.prototype.toString.call(c)},represent:function representYamlBinary(c){var u,d,p="",g=0,f=c.length,_=ke;for(u=0;u<f;u++)u%3==0&&u&&(p+=_[g>>18&63],p+=_[g>>12&63],p+=_[g>>6&63],p+=_[63&g]),g=(g<<8)+c[u];return 0===(d=f%3)?(p+=_[g>>18&63],p+=_[g>>12&63],p+=_[g>>6&63],p+=_[63&g]):2===d?(p+=_[g>>10&63],p+=_[g>>4&63],p+=_[g<<2&63],p+=_[64]):1===d&&(p+=_[g>>2&63],p+=_[g<<4&63],p+=_[64],p+=_[64]),p}}),Ne=Object.prototype.hasOwnProperty,De=Object.prototype.toString;var Ge=new ve("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(c){if(null===c)return!0;var u,d,p,g,f,_=[],y=c;for(u=0,d=y.length;u<d;u+=1){if(p=y[u],f=!1,"[object Object]"!==De.call(p))return!1;for(g in p)if(Ne.call(p,g)){if(f)return!1;f=!0}if(!f)return!1;if(-1!==_.indexOf(g))return!1;_.push(g)}return!0},construct:function constructYamlOmap(c){return null!==c?c:[]}}),je=Object.prototype.toString;var ze=new ve("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(c){if(null===c)return!0;var u,d,p,g,f,_=c;for(f=new Array(_.length),u=0,d=_.length;u<d;u+=1){if(p=_[u],"[object Object]"!==je.call(p))return!1;if(1!==(g=Object.keys(p)).length)return!1;f[u]=[g[0],p[g[0]]]}return!0},construct:function constructYamlPairs(c){if(null===c)return[];var u,d,p,g,f,_=c;for(f=new Array(_.length),u=0,d=_.length;u<d;u+=1)p=_[u],g=Object.keys(p),f[u]=[g[0],p[g[0]]];return f}}),Be=Object.prototype.hasOwnProperty;var Ue=new ve("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(c){if(null===c)return!0;var u,d=c;for(u in d)if(Be.call(d,u)&&null!==d[u])return!1;return!0},construct:function constructYamlSet(c){return null!==c?c:{}}}),$e=Re.extend({implicit:[Ie,Fe],explicit:[Oe,Ge,ze,Ue]}),We=Object.prototype.hasOwnProperty,Xe=1,Ve=2,qe=3,Ye=4,Ze=1,Ke=2,He=3,Je=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Qe=/[\x85\u2028\u2029]/,ti=/[,\[\]\{\}]/,ei=/^(?:!|!!|![a-z\-]+!)$/i,ii=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(c){return Object.prototype.toString.call(c)}function is_EOL(c){return 10===c||13===c}function is_WHITE_SPACE(c){return 9===c||32===c}function is_WS_OR_EOL(c){return 9===c||32===c||10===c||13===c}function is_FLOW_INDICATOR(c){return 44===c||91===c||93===c||123===c||125===c}function fromHexCode(c){var u;return 48<=c&&c<=57?c-48:97<=(u=32|c)&&u<=102?u-97+10:-1}function escapedHexLen(c){return 120===c?2:117===c?4:85===c?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return 48===c?"\0":97===c?"":98===c?"\b":116===c||9===c?"\t":110===c?"\n":118===c?"\v":102===c?"\f":114===c?"\r":101===c?"":32===c?" ":34===c?'"':47===c?"/":92===c?"\\":78===c?"…":95===c?" ":76===c?"\u2028":80===c?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode(55296+(c-65536>>10),56320+(c-65536&1023))}for(var ri=new Array(256),ni=new Array(256),si=0;si<256;si++)ri[si]=simpleEscapeSequence(si)?1:0,ni[si]=simpleEscapeSequence(si);function State$1(c,u){this.input=c,this.filename=u.filename||null,this.schema=u.schema||$e,this.onWarning=u.onWarning||null,this.legacy=u.legacy||!1,this.json=u.json||!1,this.listener=u.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(c,u){var d={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return d.snippet=fe(d),new me(u,d)}function throwError(c,u){throw generateError(c,u)}function throwWarning(c,u){c.onWarning&&c.onWarning.call(null,generateError(c,u))}var oi={YAML:function handleYamlDirective(c,u,d){var p,g,f;null!==c.version&&throwError(c,"duplication of %YAML directive"),1!==d.length&&throwError(c,"YAML directive accepts exactly one argument"),null===(p=/^([0-9]+)\.([0-9]+)$/.exec(d[0]))&&throwError(c,"ill-formed argument of the YAML directive"),g=parseInt(p[1],10),f=parseInt(p[2],10),1!==g&&throwError(c,"unacceptable YAML version of the document"),c.version=d[0],c.checkLineBreaks=f<2,1!==f&&2!==f&&throwWarning(c,"unsupported YAML version of the document")},TAG:function handleTagDirective(c,u,d){var p,g;2!==d.length&&throwError(c,"TAG directive accepts exactly two arguments"),p=d[0],g=d[1],ei.test(p)||throwError(c,"ill-formed tag handle (first argument) of the TAG directive"),We.call(c.tagMap,p)&&throwError(c,'there is a previously declared suffix for "'+p+'" tag handle'),ii.test(g)||throwError(c,"ill-formed tag prefix (second argument) of the TAG directive");try{g=decodeURIComponent(g)}catch(u){throwError(c,"tag prefix is malformed: "+g)}c.tagMap[p]=g}};function captureSegment(c,u,d,p){var g,f,_,y;if(u<d){if(y=c.input.slice(u,d),p)for(g=0,f=y.length;g<f;g+=1)9===(_=y.charCodeAt(g))||32<=_&&_<=1114111||throwError(c,"expected valid JSON character");else Je.test(y)&&throwError(c,"the stream contains non-printable characters");c.result+=y}}function mergeMappings(c,u,d,p){var g,f,_,y;for(pe.isObject(d)||throwError(c,"cannot merge mappings; the provided source object is unacceptable"),_=0,y=(g=Object.keys(d)).length;_<y;_+=1)f=g[_],We.call(u,f)||(u[f]=d[f],p[f]=!0)}function storeMappingPair(c,u,d,p,g,f,_,y,x){var v,C;if(Array.isArray(g))for(v=0,C=(g=Array.prototype.slice.call(g)).length;v<C;v+=1)Array.isArray(g[v])&&throwError(c,"nested arrays are not supported inside keys"),"object"==typeof g&&"[object Object]"===_class(g[v])&&(g[v]="[object Object]");if("object"==typeof g&&"[object Object]"===_class(g)&&(g="[object Object]"),g=String(g),null===u&&(u={}),"tag:yaml.org,2002:merge"===p)if(Array.isArray(f))for(v=0,C=f.length;v<C;v+=1)mergeMappings(c,u,f[v],d);else mergeMappings(c,u,f,d);else c.json||We.call(d,g)||!We.call(u,g)||(c.line=_||c.line,c.lineStart=y||c.lineStart,c.position=x||c.position,throwError(c,"duplicated mapping key")),"__proto__"===g?Object.defineProperty(u,g,{configurable:!0,enumerable:!0,writable:!0,value:f}):u[g]=f,delete d[g];return u}function readLineBreak(c){var u;10===(u=c.input.charCodeAt(c.position))?c.position++:13===u?(c.position++,10===c.input.charCodeAt(c.position)&&c.position++):throwError(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function skipSeparationSpace(c,u,d){for(var p=0,g=c.input.charCodeAt(c.position);0!==g;){for(;is_WHITE_SPACE(g);)9===g&&-1===c.firstTabInLine&&(c.firstTabInLine=c.position),g=c.input.charCodeAt(++c.position);if(u&&35===g)do{g=c.input.charCodeAt(++c.position)}while(10!==g&&13!==g&&0!==g);if(!is_EOL(g))break;for(readLineBreak(c),g=c.input.charCodeAt(c.position),p++,c.lineIndent=0;32===g;)c.lineIndent++,g=c.input.charCodeAt(++c.position)}return-1!==d&&0!==p&&c.lineIndent<d&&throwWarning(c,"deficient indentation"),p}function testDocumentSeparator(c){var u,d=c.position;return!(45!==(u=c.input.charCodeAt(d))&&46!==u||u!==c.input.charCodeAt(d+1)||u!==c.input.charCodeAt(d+2)||(d+=3,0!==(u=c.input.charCodeAt(d))&&!is_WS_OR_EOL(u)))}function writeFoldedLines(c,u){1===u?c.result+=" ":u>1&&(c.result+=pe.repeat("\n",u-1))}function readBlockSequence(c,u){var d,p,g=c.tag,f=c.anchor,_=[],y=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=_),p=c.input.charCodeAt(c.position);0!==p&&(-1!==c.firstTabInLine&&(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),45===p)&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1));)if(y=!0,c.position++,skipSeparationSpace(c,!0,-1)&&c.lineIndent<=u)_.push(null),p=c.input.charCodeAt(c.position);else if(d=c.line,composeNode(c,u,qe,!1,!0),_.push(c.result),skipSeparationSpace(c,!0,-1),p=c.input.charCodeAt(c.position),(c.line===d||c.lineIndent>u)&&0!==p)throwError(c,"bad indentation of a sequence entry");else if(c.lineIndent<u)break;return!!y&&(c.tag=g,c.anchor=f,c.kind="sequence",c.result=_,!0)}function readTagProperty(c){var u,d,p,g,f=!1,_=!1;if(33!==(g=c.input.charCodeAt(c.position)))return!1;if(null!==c.tag&&throwError(c,"duplication of a tag property"),60===(g=c.input.charCodeAt(++c.position))?(f=!0,g=c.input.charCodeAt(++c.position)):33===g?(_=!0,d="!!",g=c.input.charCodeAt(++c.position)):d="!",u=c.position,f){do{g=c.input.charCodeAt(++c.position)}while(0!==g&&62!==g);c.position<c.length?(p=c.input.slice(u,c.position),g=c.input.charCodeAt(++c.position)):throwError(c,"unexpected end of the stream within a verbatim tag")}else{for(;0!==g&&!is_WS_OR_EOL(g);)33===g&&(_?throwError(c,"tag suffix cannot contain exclamation marks"):(d=c.input.slice(u-1,c.position+1),ei.test(d)||throwError(c,"named tag handle cannot contain such characters"),_=!0,u=c.position+1)),g=c.input.charCodeAt(++c.position);p=c.input.slice(u,c.position),ti.test(p)&&throwError(c,"tag suffix cannot contain flow indicator characters")}p&&!ii.test(p)&&throwError(c,"tag name cannot contain such characters: "+p);try{p=decodeURIComponent(p)}catch(u){throwError(c,"tag name is malformed: "+p)}return f?c.tag=p:We.call(c.tagMap,d)?c.tag=c.tagMap[d]+p:"!"===d?c.tag="!"+p:"!!"===d?c.tag="tag:yaml.org,2002:"+p:throwError(c,'undeclared tag handle "'+d+'"'),!0}function readAnchorProperty(c){var u,d;if(38!==(d=c.input.charCodeAt(c.position)))return!1;for(null!==c.anchor&&throwError(c,"duplication of an anchor property"),d=c.input.charCodeAt(++c.position),u=c.position;0!==d&&!is_WS_OR_EOL(d)&&!is_FLOW_INDICATOR(d);)d=c.input.charCodeAt(++c.position);return c.position===u&&throwError(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(u,c.position),!0}function composeNode(c,u,d,p,g){var f,_,y,x,v,C,M,T,L,A=1,I=!1,k=!1;if(null!==c.listener&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null,f=_=y=Ye===d||qe===d,p&&skipSeparationSpace(c,!0,-1)&&(I=!0,c.lineIndent>u?A=1:c.lineIndent===u?A=0:c.lineIndent<u&&(A=-1)),1===A)for(;readTagProperty(c)||readAnchorProperty(c);)skipSeparationSpace(c,!0,-1)?(I=!0,y=f,c.lineIndent>u?A=1:c.lineIndent===u?A=0:c.lineIndent<u&&(A=-1)):y=!1;if(y&&(y=I||g),1!==A&&Ye!==d||(T=Xe===d||Ve===d?u:u+1,L=c.position-c.lineStart,1===A?y&&(readBlockSequence(c,L)||function readBlockMapping(c,u,d){var p,g,f,_,y,x,v,C=c.tag,M=c.anchor,T={},L=Object.create(null),A=null,I=null,k=null,O=!1,N=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=T),v=c.input.charCodeAt(c.position);0!==v;){if(O||-1===c.firstTabInLine||(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),p=c.input.charCodeAt(c.position+1),f=c.line,63!==v&&58!==v||!is_WS_OR_EOL(p)){if(_=c.line,y=c.lineStart,x=c.position,!composeNode(c,d,Ve,!1,!0))break;if(c.line===f){for(v=c.input.charCodeAt(c.position);is_WHITE_SPACE(v);)v=c.input.charCodeAt(++c.position);if(58===v)is_WS_OR_EOL(v=c.input.charCodeAt(++c.position))||throwError(c,"a whitespace character is expected after the key-value separator within a block mapping"),O&&(storeMappingPair(c,T,L,A,I,null,_,y,x),A=I=k=null),N=!0,O=!1,g=!1,A=c.tag,I=c.result;else{if(!N)return c.tag=C,c.anchor=M,!0;throwError(c,"can not read an implicit mapping pair; a colon is missed")}}else{if(!N)return c.tag=C,c.anchor=M,!0;throwError(c,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===v?(O&&(storeMappingPair(c,T,L,A,I,null,_,y,x),A=I=k=null),N=!0,O=!0,g=!0):O?(O=!1,g=!0):throwError(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,v=p;if((c.line===f||c.lineIndent>u)&&(O&&(_=c.line,y=c.lineStart,x=c.position),composeNode(c,u,Ye,!0,g)&&(O?I=c.result:k=c.result),O||(storeMappingPair(c,T,L,A,I,k,_,y,x),A=I=k=null),skipSeparationSpace(c,!0,-1),v=c.input.charCodeAt(c.position)),(c.line===f||c.lineIndent>u)&&0!==v)throwError(c,"bad indentation of a mapping entry");else if(c.lineIndent<u)break}return O&&storeMappingPair(c,T,L,A,I,null,_,y,x),N&&(c.tag=C,c.anchor=M,c.kind="mapping",c.result=T),N}(c,L,T))||function readFlowCollection(c,u){var d,p,g,f,_,y,x,v,C,M,T,L,A=!0,I=c.tag,k=c.anchor,O=Object.create(null);if(91===(L=c.input.charCodeAt(c.position)))_=93,v=!1,f=[];else{if(123!==L)return!1;_=125,v=!0,f={}}for(null!==c.anchor&&(c.anchorMap[c.anchor]=f),L=c.input.charCodeAt(++c.position);0!==L;){if(skipSeparationSpace(c,!0,u),(L=c.input.charCodeAt(c.position))===_)return c.position++,c.tag=I,c.anchor=k,c.kind=v?"mapping":"sequence",c.result=f,!0;A?44===L&&throwError(c,"expected the node content, but found ','"):throwError(c,"missed comma between flow collection entries"),T=null,y=x=!1,63===L&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1))&&(y=x=!0,c.position++,skipSeparationSpace(c,!0,u)),d=c.line,p=c.lineStart,g=c.position,composeNode(c,u,Xe,!1,!0),M=c.tag,C=c.result,skipSeparationSpace(c,!0,u),L=c.input.charCodeAt(c.position),!x&&c.line!==d||58!==L||(y=!0,L=c.input.charCodeAt(++c.position),skipSeparationSpace(c,!0,u),composeNode(c,u,Xe,!1,!0),T=c.result),v?storeMappingPair(c,f,O,M,C,T,d,p,g):y?f.push(storeMappingPair(c,null,O,M,C,T,d,p,g)):f.push(C),skipSeparationSpace(c,!0,u),44===(L=c.input.charCodeAt(c.position))?(A=!0,L=c.input.charCodeAt(++c.position)):A=!1}throwError(c,"unexpected end of the stream within a flow collection")}(c,T)?k=!0:(_&&function readBlockScalar(c,u){var d,p,g,f,_=Ze,y=!1,x=!1,v=u,C=0,M=!1;if(124===(f=c.input.charCodeAt(c.position)))p=!1;else{if(62!==f)return!1;p=!0}for(c.kind="scalar",c.result="";0!==f;)if(43===(f=c.input.charCodeAt(++c.position))||45===f)Ze===_?_=43===f?He:Ke:throwError(c,"repeat of a chomping mode identifier");else{if(!((g=fromDecimalCode(f))>=0))break;0===g?throwError(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):x?throwError(c,"repeat of an indentation width identifier"):(v=u+g-1,x=!0)}if(is_WHITE_SPACE(f)){do{f=c.input.charCodeAt(++c.position)}while(is_WHITE_SPACE(f));if(35===f)do{f=c.input.charCodeAt(++c.position)}while(!is_EOL(f)&&0!==f)}for(;0!==f;){for(readLineBreak(c),c.lineIndent=0,f=c.input.charCodeAt(c.position);(!x||c.lineIndent<v)&&32===f;)c.lineIndent++,f=c.input.charCodeAt(++c.position);if(!x&&c.lineIndent>v&&(v=c.lineIndent),is_EOL(f))C++;else{if(c.lineIndent<v){_===He?c.result+=pe.repeat("\n",y?1+C:C):_===Ze&&y&&(c.result+="\n");break}for(p?is_WHITE_SPACE(f)?(M=!0,c.result+=pe.repeat("\n",y?1+C:C)):M?(M=!1,c.result+=pe.repeat("\n",C+1)):0===C?y&&(c.result+=" "):c.result+=pe.repeat("\n",C):c.result+=pe.repeat("\n",y?1+C:C),y=!0,x=!0,C=0,d=c.position;!is_EOL(f)&&0!==f;)f=c.input.charCodeAt(++c.position);captureSegment(c,d,c.position,!1)}}return!0}(c,T)||function readSingleQuotedScalar(c,u){var d,p,g;if(39!==(d=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,p=g=c.position;0!==(d=c.input.charCodeAt(c.position));)if(39===d){if(captureSegment(c,p,c.position,!0),39!==(d=c.input.charCodeAt(++c.position)))return!0;p=c.position,c.position++,g=c.position}else is_EOL(d)?(captureSegment(c,p,g,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,u)),p=g=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a single quoted scalar"):(c.position++,g=c.position);throwError(c,"unexpected end of the stream within a single quoted scalar")}(c,T)||function readDoubleQuotedScalar(c,u){var d,p,g,f,_,y;if(34!==(y=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,d=p=c.position;0!==(y=c.input.charCodeAt(c.position));){if(34===y)return captureSegment(c,d,c.position,!0),c.position++,!0;if(92===y){if(captureSegment(c,d,c.position,!0),is_EOL(y=c.input.charCodeAt(++c.position)))skipSeparationSpace(c,!1,u);else if(y<256&&ri[y])c.result+=ni[y],c.position++;else if((_=escapedHexLen(y))>0){for(g=_,f=0;g>0;g--)(_=fromHexCode(y=c.input.charCodeAt(++c.position)))>=0?f=(f<<4)+_:throwError(c,"expected hexadecimal character");c.result+=charFromCodepoint(f),c.position++}else throwError(c,"unknown escape sequence");d=p=c.position}else is_EOL(y)?(captureSegment(c,d,p,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,u)),d=p=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a double quoted scalar"):(c.position++,p=c.position)}throwError(c,"unexpected end of the stream within a double quoted scalar")}(c,T)?k=!0:!function readAlias(c){var u,d,p;if(42!==(p=c.input.charCodeAt(c.position)))return!1;for(p=c.input.charCodeAt(++c.position),u=c.position;0!==p&&!is_WS_OR_EOL(p)&&!is_FLOW_INDICATOR(p);)p=c.input.charCodeAt(++c.position);return c.position===u&&throwError(c,"name of an alias node must contain at least one character"),d=c.input.slice(u,c.position),We.call(c.anchorMap,d)||throwError(c,'unidentified alias "'+d+'"'),c.result=c.anchorMap[d],skipSeparationSpace(c,!0,-1),!0}(c)?function readPlainScalar(c,u,d){var p,g,f,_,y,x,v,C,M=c.kind,T=c.result;if(is_WS_OR_EOL(C=c.input.charCodeAt(c.position))||is_FLOW_INDICATOR(C)||35===C||38===C||42===C||33===C||124===C||62===C||39===C||34===C||37===C||64===C||96===C)return!1;if((63===C||45===C)&&(is_WS_OR_EOL(p=c.input.charCodeAt(c.position+1))||d&&is_FLOW_INDICATOR(p)))return!1;for(c.kind="scalar",c.result="",g=f=c.position,_=!1;0!==C;){if(58===C){if(is_WS_OR_EOL(p=c.input.charCodeAt(c.position+1))||d&&is_FLOW_INDICATOR(p))break}else if(35===C){if(is_WS_OR_EOL(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&testDocumentSeparator(c)||d&&is_FLOW_INDICATOR(C))break;if(is_EOL(C)){if(y=c.line,x=c.lineStart,v=c.lineIndent,skipSeparationSpace(c,!1,-1),c.lineIndent>=u){_=!0,C=c.input.charCodeAt(c.position);continue}c.position=f,c.line=y,c.lineStart=x,c.lineIndent=v;break}}_&&(captureSegment(c,g,f,!1),writeFoldedLines(c,c.line-y),g=f=c.position,_=!1),is_WHITE_SPACE(C)||(f=c.position+1),C=c.input.charCodeAt(++c.position)}return captureSegment(c,g,f,!1),!!c.result||(c.kind=M,c.result=T,!1)}(c,T,Xe===d)&&(k=!0,null===c.tag&&(c.tag="?")):(k=!0,null===c.tag&&null===c.anchor||throwError(c,"alias node should not have any properties")),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):0===A&&(k=y&&readBlockSequence(c,L))),null===c.tag)null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);else if("?"===c.tag){for(null!==c.result&&"scalar"!==c.kind&&throwError(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"'),x=0,v=c.implicitTypes.length;x<v;x+=1)if((M=c.implicitTypes[x]).resolve(c.result)){c.result=M.construct(c.result),c.tag=M.tag,null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);break}}else if("!"!==c.tag){if(We.call(c.typeMap[c.kind||"fallback"],c.tag))M=c.typeMap[c.kind||"fallback"][c.tag];else for(M=null,x=0,v=(C=c.typeMap.multi[c.kind||"fallback"]).length;x<v;x+=1)if(c.tag.slice(0,C[x].tag.length)===C[x].tag){M=C[x];break}M||throwError(c,"unknown tag !<"+c.tag+">"),null!==c.result&&M.kind!==c.kind&&throwError(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+M.kind+'", not "'+c.kind+'"'),M.resolve(c.result,c.tag)?(c.result=M.construct(c.result,c.tag),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):throwError(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return null!==c.listener&&c.listener("close",c),null!==c.tag||null!==c.anchor||k}function readDocument(c){var u,d,p,g,f=c.position,_=!1;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);0!==(g=c.input.charCodeAt(c.position))&&(skipSeparationSpace(c,!0,-1),g=c.input.charCodeAt(c.position),!(c.lineIndent>0||37!==g));){for(_=!0,g=c.input.charCodeAt(++c.position),u=c.position;0!==g&&!is_WS_OR_EOL(g);)g=c.input.charCodeAt(++c.position);for(p=[],(d=c.input.slice(u,c.position)).length<1&&throwError(c,"directive name must not be less than one character in length");0!==g;){for(;is_WHITE_SPACE(g);)g=c.input.charCodeAt(++c.position);if(35===g){do{g=c.input.charCodeAt(++c.position)}while(0!==g&&!is_EOL(g));break}if(is_EOL(g))break;for(u=c.position;0!==g&&!is_WS_OR_EOL(g);)g=c.input.charCodeAt(++c.position);p.push(c.input.slice(u,c.position))}0!==g&&readLineBreak(c),We.call(oi,d)?oi[d](c,d,p):throwWarning(c,'unknown document directive "'+d+'"')}skipSeparationSpace(c,!0,-1),0===c.lineIndent&&45===c.input.charCodeAt(c.position)&&45===c.input.charCodeAt(c.position+1)&&45===c.input.charCodeAt(c.position+2)?(c.position+=3,skipSeparationSpace(c,!0,-1)):_&&throwError(c,"directives end mark is expected"),composeNode(c,c.lineIndent-1,Ye,!1,!0),skipSeparationSpace(c,!0,-1),c.checkLineBreaks&&Qe.test(c.input.slice(f,c.position))&&throwWarning(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&testDocumentSeparator(c)?46===c.input.charCodeAt(c.position)&&(c.position+=3,skipSeparationSpace(c,!0,-1)):c.position<c.length-1&&throwError(c,"end of the stream or a document separator is expected")}function loadDocuments(c,u){u=u||{},0!==(c=String(c)).length&&(10!==c.charCodeAt(c.length-1)&&13!==c.charCodeAt(c.length-1)&&(c+="\n"),65279===c.charCodeAt(0)&&(c=c.slice(1)));var d=new State$1(c,u),p=c.indexOf("\0");for(-1!==p&&(d.position=p,throwError(d,"null byte is not allowed in input")),d.input+="\0";32===d.input.charCodeAt(d.position);)d.lineIndent+=1,d.position+=1;for(;d.position<d.length-1;)readDocument(d);return d.documents}var ai={loadAll:function loadAll$1(c,u,d){null!==u&&"object"==typeof u&&void 0===d&&(d=u,u=null);var p=loadDocuments(c,d);if("function"!=typeof u)return p;for(var g=0,f=p.length;g<f;g+=1)u(p[g])},load:function load$1(c,u){var d=loadDocuments(c,u);if(0!==d.length){if(1===d.length)return d[0];throw new me("expected a single document in the stream, but found more")}}},li=ai.load,hi=ai.loadAll;const ci=new URL("./","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:u&&u.src||new URL("openlayers.js",document.baseURI).href),ui=Object.freeze({use:{Leaflet:{value:ci+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:ci+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:ci+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=c=>({use:c.use??"Leaflet",width:"100%",...c,aliases:{...ui,...c.aliases??{}}}),di={},setValueByAliases=c=>c.aliases?(Object.entries(c).filter((([c,u])=>"aliases"!==c&&"string"==typeof u&&u.match(/^[A-Z]/))).forEach((([u,d])=>{const p=c.aliases?.[u]?.[d],g="object"!=typeof p||Array.isArray(p)?p:p.value;g&&(c[u]=g,"use"===u&&(c.url=p.url,c.desc=p.desc))})),c):c,applyOtherConfig=async c=>{if(!c.apply)return c;await(async c=>{c&&!di[c]&&(di[c]=await fetch(c).then((c=>{if(200!==c.status)throw Error();return c.text()})).then((c=>li(c))).catch((u=>{throw Error(`Fail to fetch applied config ${c}`,u)})))})(c.apply);const u=di[c.apply];if(!u)throw Error("Fail to fetch remote config "+c.aply);return{...u,...c,aliases:{...u.aliases,...c.aliases??{}}}},prepareRenderer=async c=>{let u;if(c.use)if(c.use.steps)u=c.use;else{const d=(await import(c.use)).default;u=new d}else u=c;return Object.entries(c).forEach((([c,d])=>u[c]=d)),u},healthCheck=c=>{if(!c.steps)throw c.steps=[],Error("not health");return c},renderWithConfig=async c=>{c.results=[];const u=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],d=(c=>{let u=c;return c=>c.reduce(((c,d)=>c.then((async()=>u.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(u=await d(u),u))).then((c=>u.results.push({type:"prepare",func:d.valueOf(),state:c?.state??"success",result:c?.reason??u}))).catch((c=>{u.results.push({type:"prepare",func:d.valueOf(),state:"fail",result:c})})).then((()=>{u.prepareCallback?.(u,u.results)}))),Promise.resolve(u)).then((()=>u))})(c)(u).then((c=>(c=>(c.steps??[]).reduce(((u,d)=>u.then((()=>{if("stop"===c.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(d.depends){const u=c.results.findLast((c=>c.func===d.depends))?.state;if(u.match(/skip|fail/))return{state:"skip"}}return d.valueOf().bind(c)(c)})).then((u=>c.results.push({type:"render",func:d.valueOf(),state:u?.state??"success",result:u?.reason??u}))).catch((u=>c.results.push({type:"render",func:d.valueOf(),state:"fail",result:u}))).then((()=>{c.stepCallback?.(c,c)}))),Promise.resolve()).then((()=>c)))(c))).then((c=>{const u=!c.results||0===c.results.length||!c.results.find((c=>c.state.match(/success/)))||c.results.find((c=>c.state.match(/fail|stop/))),d=u?"unfulfilled":"fulfilled";return c?.target?.setAttribute("data-render",d),c}));return d.valueOf=()=>c.results,d},setValueOf=c=>(c.valueOf=()=>JSON.stringify(c,((c,u)=>c.match(/aliases|target/)?void 0:u)),c),shouldRender=c=>!(c.target instanceof window.HTMLElement&&c.target.classList.contains("mapclay")&&c.valueOf()===c.target.getAttribute("data-mapclay")&&"fulfilled"===c.target.getAttribute("data-render")),renderWith=c=>(u,d)=>{c=c??(c=>c);const p="object"==typeof d?Array.isArray(d)?d.map(c):[d].map(c):null;if(!p)throw Error(`Invalid config files: ${d}`);u.innerHTML="";return p.map(setValueOf).map((c=>{if(shouldRender(c)){const u=document.createElement("div");c.id&&(u.id=c.id.replaceAll(" ","_"),u.title=`ID: ${u.id}`),u.classList.add("mapclay"),c.target=u,u.dataset.render="rendering",u.dataset.mapclay=c.valueOf()}return u.append(c.target),window.CSS.supports(`width: ${c.width}`)&&(c.target.style.width=c.width),window.CSS.supports(`height: ${c.height}`)&&(c.target.style.height=c.height),c})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(c=null)=>async(u,d=null)=>{const p=(c=>{const u=[];return hi(c,(c=>{"object"!=typeof c||Array.isArray(c)?u.length>0&&(u.at(-1).eval=c.toString()):u.push(c??{})})),0===u.length?[{}]:u})(d??u.textContent);return renderWith(c)(u,p)},pi=renderWith(applyDefaultAliases),gi=renderByYamlWith(applyDefaultAliases);document.currentScript&&(globalThis.mapclay={render:pi,renderWith:renderWith,renderByYaml:gi,renderByYamlWith:renderByYamlWith});class BaseEvent{constructor(c){this.propagationStopped,this.defaultPrevented,this.type=c,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function stopPropagation(c){c.stopPropagation()}var mi="propertychange";var fi=class Disposable{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function ascending(c,u){return c>u?1:c<u?-1:0}function descending(c,u){return c<u?1:c>u?-1:0}function linearFindNearest(c,u,d){if(c[0]<=u)return 0;const p=c.length;if(u<=c[p-1])return p-1;if("function"==typeof d){for(let g=1;g<p;++g){const p=c[g];if(p===u)return g;if(p<u)return d(u,c[g-1],p)>0?g-1:g}return p-1}if(d>0){for(let d=1;d<p;++d)if(c[d]<u)return d-1;return p-1}if(d<0){for(let d=1;d<p;++d)if(c[d]<=u)return d;return p-1}for(let d=1;d<p;++d){if(c[d]==u)return d;if(c[d]<u)return c[d-1]-u<u-c[d]?d-1:d}return p-1}function reverseSubArray(c,u,d){for(;u<d;){const p=c[u];c[u]=c[d],c[d]=p,++u,--d}}function extend$3(c,u){const d=Array.isArray(u)?u:[u],p=d.length;for(let u=0;u<p;u++)c[c.length]=d[u]}function equals$2(c,u){const d=c.length;if(d!==u.length)return!1;for(let p=0;p<d;p++)if(c[p]!==u[p])return!1;return!0}function TRUE(){return!0}function FALSE(){return!1}function VOID(){}function memoizeOne(c){let u,d,p;return function(){const g=Array.prototype.slice.call(arguments);return d&&this===p&&equals$2(g,d)||(p=this,d=g,u=c.apply(this,arguments)),u}}function toPromise(c){return function promiseGetter(){let u;try{u=c()}catch(c){return Promise.reject(c)}return u instanceof Promise?u:Promise.resolve(u)}()}function clear$2(c){for(const u in c)delete c[u]}function isEmpty$1(c){let u;for(u in c)return!1;return!u}class Target extends fi{constructor(c){super(),this.eventTarget_=c,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(c,u){if(!c||!u)return;const d=this.listeners_||(this.listeners_={}),p=d[c]||(d[c]=[]);p.includes(u)||p.push(u)}dispatchEvent(c){const u="string"==typeof c,d=u?c:c.type,p=this.listeners_&&this.listeners_[d];if(!p)return;const g=u?new BaseEvent(c):c;g.target||(g.target=this.eventTarget_||this);const f=this.dispatching_||(this.dispatching_={}),_=this.pendingRemovals_||(this.pendingRemovals_={});let y;d in f||(f[d]=0,_[d]=0),++f[d];for(let c=0,u=p.length;c<u;++c)if(y="handleEvent"in p[c]?p[c].handleEvent(g):p[c].call(this,g),!1===y||g.propagationStopped){y=!1;break}if(0==--f[d]){let c=_[d];for(delete _[d];c--;)this.removeEventListener(d,VOID);delete f[d]}return y}disposeInternal(){this.listeners_&&clear$2(this.listeners_)}getListeners(c){return this.listeners_&&this.listeners_[c]||void 0}hasListener(c){return!!this.listeners_&&(c?c in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(c,u){if(!this.listeners_)return;const d=this.listeners_[c];if(!d)return;const p=d.indexOf(u);-1!==p&&(this.pendingRemovals_&&c in this.pendingRemovals_?(d[p]=VOID,++this.pendingRemovals_[c]):(d.splice(p,1),0===d.length&&delete this.listeners_[c]))}}var _i="change",yi="error",xi="contextmenu",vi="click",Si="dblclick",wi="keydown",Ci="keypress",Ei="load",Pi="touchmove",bi="wheel";function listen(c,u,d,p,g){if(g){const g=d;d=function(){c.removeEventListener(u,d),g.apply(p??this,arguments)}}else p&&p!==c&&(d=d.bind(p));const f={target:c,type:u,listener:d};return c.addEventListener(u,d),f}function listenOnce(c,u,d,p){return listen(c,u,d,p,!0)}function unlistenByKey(c){c&&c.target&&(c.target.removeEventListener(c.type,c.listener),clear$2(c))}class Observable extends Target{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(_i)}getRevision(){return this.revision_}onInternal(c,u){if(Array.isArray(c)){const d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=listen(this,c[g],u);return p}return listen(this,c,u)}onceInternal(c,u){let d;if(Array.isArray(c)){const p=c.length;d=new Array(p);for(let g=0;g<p;++g)d[g]=listenOnce(this,c[g],u)}else d=listenOnce(this,c,u);return u.ol_key=d,d}unInternal(c,u){const d=u.ol_key;if(d)!function unByKey(c){if(Array.isArray(c))for(let u=0,d=c.length;u<d;++u)unlistenByKey(c[u]);else unlistenByKey(c)}(d);else if(Array.isArray(c))for(let d=0,p=c.length;d<p;++d)this.removeEventListener(c[d],u);else this.removeEventListener(c,u)}}Observable.prototype.on,Observable.prototype.once,Observable.prototype.un;var Mi=Observable;function abstract(){throw new Error("Unimplemented abstract method.")}let Ti=0;function getUid(c){return c.ol_uid||(c.ol_uid=String(++Ti))}class ObjectEvent extends BaseEvent{constructor(c,u,d){super(c),this.key=u,this.oldValue=d}}var Ri=class BaseObject extends Mi{constructor(c){super(),this.on,this.once,this.un,getUid(this),this.values_=null,void 0!==c&&this.setProperties(c)}get(c){let u;return this.values_&&this.values_.hasOwnProperty(c)&&(u=this.values_[c]),u}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(c,u){let d;d=`change:${c}`,this.hasListener(d)&&this.dispatchEvent(new ObjectEvent(d,c,u)),d=mi,this.hasListener(d)&&this.dispatchEvent(new ObjectEvent(d,c,u))}addChangeListener(c,u){this.addEventListener(`change:${c}`,u)}removeChangeListener(c,u){this.removeEventListener(`change:${c}`,u)}set(c,u,d){const p=this.values_||(this.values_={});if(d)p[c]=u;else{const d=p[c];p[c]=u,d!==u&&this.notify(c,d)}}setProperties(c,u){for(const d in c)this.set(d,c[d],u)}applyProperties(c){c.values_&&Object.assign(this.values_||(this.values_={}),c.values_)}unset(c,u){if(this.values_&&c in this.values_){const d=this.values_[c];delete this.values_[c],isEmpty$1(this.values_)&&(this.values_=null),u||this.notify(c,d)}}},Li="add",Ai="remove";const Ii="length";class CollectionEvent extends BaseEvent{constructor(c,u,d){super(c),this.element=u,this.index=d}}var Fi=class Collection extends Ri{constructor(c,u){if(super(),this.on,this.once,this.un,u=u||{},this.unique_=!!u.unique,this.array_=c||[],this.unique_)for(let c=0,u=this.array_.length;c<u;++c)this.assertUnique_(this.array_[c],c);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(c){for(let u=0,d=c.length;u<d;++u)this.push(c[u]);return this}forEach(c){const u=this.array_;for(let d=0,p=u.length;d<p;++d)c(u[d],d,u)}getArray(){return this.array_}item(c){return this.array_[c]}getLength(){return this.get(Ii)}insertAt(c,u){if(c<0||c>this.getLength())throw new Error("Index out of bounds: "+c);this.unique_&&this.assertUnique_(u),this.array_.splice(c,0,u),this.updateLength_(),this.dispatchEvent(new CollectionEvent(Li,u,c))}pop(){return this.removeAt(this.getLength()-1)}push(c){this.unique_&&this.assertUnique_(c);const u=this.getLength();return this.insertAt(u,c),this.getLength()}remove(c){const u=this.array_;for(let d=0,p=u.length;d<p;++d)if(u[d]===c)return this.removeAt(d)}removeAt(c){if(c<0||c>=this.getLength())return;const u=this.array_[c];return this.array_.splice(c,1),this.updateLength_(),this.dispatchEvent(new CollectionEvent(Ai,u,c)),u}setAt(c,u){if(c>=this.getLength())return void this.insertAt(c,u);if(c<0)throw new Error("Index out of bounds: "+c);this.unique_&&this.assertUnique_(u,c);const d=this.array_[c];this.array_[c]=u,this.dispatchEvent(new CollectionEvent(Ai,d,c)),this.dispatchEvent(new CollectionEvent(Li,u,c))}updateLength_(){this.set(Ii,this.array_.length)}assertUnique_(c,u){for(let d=0,p=this.array_.length;d<p;++d)if(this.array_[d]===c&&d!==u)throw new Error("Duplicate item added to a unique collection")}};function assert(c,u){if(!c)throw new Error(u)}class Feature extends Ri{constructor(c){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),c)if("function"==typeof c.getSimplifiedGeometry){const u=c;this.setGeometry(u)}else{const u=c;this.setProperties(u)}}clone(){const c=new Feature(this.hasProperties()?this.getProperties():null);c.setGeometryName(this.getGeometryName());const u=this.getGeometry();u&&c.setGeometry(u.clone());const d=this.getStyle();return d&&c.setStyle(d),c}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);const c=this.getGeometry();c&&(this.geometryChangeKey_=listen(c,_i,this.handleGeometryChange_,this)),this.changed()}setGeometry(c){this.set(this.geometryName_,c)}setStyle(c){this.style_=c,this.styleFunction_=c?function createStyleFunction(c){if("function"==typeof c)return c;let u;if(Array.isArray(c))u=c;else{assert("function"==typeof c.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`");u=[c]}return function(){return u}}(c):void 0,this.changed()}setId(c){this.id_=c,this.changed()}setGeometryName(c){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=c,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}var ki=Feature;const Oi=new Array(6);function reset(c){return set(c,1,0,0,1,0,0)}function multiply(c,u){const d=c[0],p=c[1],g=c[2],f=c[3],_=c[4],y=c[5],x=u[0],v=u[1],C=u[2],M=u[3],T=u[4],L=u[5];return c[0]=d*x+g*v,c[1]=p*x+f*v,c[2]=d*C+g*M,c[3]=p*C+f*M,c[4]=d*T+g*L+_,c[5]=p*T+f*L+y,c}function set(c,u,d,p,g,f,_){return c[0]=u,c[1]=d,c[2]=p,c[3]=g,c[4]=f,c[5]=_,c}function apply(c,u){const d=u[0],p=u[1];return u[0]=c[0]*d+c[2]*p+c[4],u[1]=c[1]*d+c[3]*p+c[5],u}function scale$3(c,u,d){return multiply(c,set(Oi,u,0,0,d,0,0))}function translate$1(c,u,d){return multiply(c,set(Oi,1,0,0,1,u,d))}function compose(c,u,d,p,g,f,_,y){const x=Math.sin(f),v=Math.cos(f);return c[0]=p*v,c[1]=g*x,c[2]=-p*x,c[3]=g*v,c[4]=_*p*v-y*p*x+u,c[5]=_*g*x+y*g*v+d,c}function makeInverse(c,u){const d=function determinant(c){return c[0]*c[3]-c[1]*c[2]}(u);assert(0!==d,"Transformation matrix cannot be inverted");const p=u[0],g=u[1],f=u[2],_=u[3],y=u[4],x=u[5];return c[0]=_/d,c[1]=-g/d,c[2]=-f/d,c[3]=p/d,c[4]=(f*x-_*y)/d,c[5]=-(p*x-g*y)/d,c}const Ni=[1e6,1e6,1e6,1e6,2,2];var Di={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function boundingExtent(c){const u=createEmpty();for(let d=0,p=c.length;d<p;++d)extendCoordinate(u,c[d]);return u}function buffer(c,u,d){return d?(d[0]=c[0]-u,d[1]=c[1]-u,d[2]=c[2]+u,d[3]=c[3]+u,d):[c[0]-u,c[1]-u,c[2]+u,c[3]+u]}function clone(c,u){return u?(u[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u):c.slice()}function closestSquaredDistanceXY(c,u,d){let p,g;return p=u<c[0]?c[0]-u:c[2]<u?u-c[2]:0,g=d<c[1]?c[1]-d:c[3]<d?d-c[3]:0,p*p+g*g}function containsCoordinate(c,u){return containsXY(c,u[0],u[1])}function containsExtent(c,u){return c[0]<=u[0]&&u[2]<=c[2]&&c[1]<=u[1]&&u[3]<=c[3]}function containsXY(c,u,d){return c[0]<=u&&u<=c[2]&&c[1]<=d&&d<=c[3]}function coordinateRelationship(c,u){const d=c[0],p=c[1],g=c[2],f=c[3],_=u[0],y=u[1];let x=Di.UNKNOWN;return _<d?x|=Di.LEFT:_>g&&(x|=Di.RIGHT),y<p?x|=Di.BELOW:y>f&&(x|=Di.ABOVE),x===Di.UNKNOWN&&(x=Di.INTERSECTING),x}function createEmpty(){return[1/0,1/0,-1/0,-1/0]}function createOrUpdate$2(c,u,d,p,g){return g?(g[0]=c,g[1]=u,g[2]=d,g[3]=p,g):[c,u,d,p]}function createOrUpdateEmpty(c){return createOrUpdate$2(1/0,1/0,-1/0,-1/0,c)}function createOrUpdateFromCoordinate(c,u){const d=c[0],p=c[1];return createOrUpdate$2(d,p,d,p,u)}function createOrUpdateFromFlatCoordinates(c,u,d,p,g){return extendFlatCoordinates(createOrUpdateEmpty(g),c,u,d,p)}function equals$1(c,u){return c[0]==u[0]&&c[2]==u[2]&&c[1]==u[1]&&c[3]==u[3]}function extend$2(c,u){return u[0]<c[0]&&(c[0]=u[0]),u[2]>c[2]&&(c[2]=u[2]),u[1]<c[1]&&(c[1]=u[1]),u[3]>c[3]&&(c[3]=u[3]),c}function extendCoordinate(c,u){u[0]<c[0]&&(c[0]=u[0]),u[0]>c[2]&&(c[2]=u[0]),u[1]<c[1]&&(c[1]=u[1]),u[1]>c[3]&&(c[3]=u[1])}function extendFlatCoordinates(c,u,d,p,g){for(;d<p;d+=g)extendXY(c,u[d],u[d+1]);return c}function extendXY(c,u,d){c[0]=Math.min(c[0],u),c[1]=Math.min(c[1],d),c[2]=Math.max(c[2],u),c[3]=Math.max(c[3],d)}function forEachCorner(c,u){let d;return d=u(getBottomLeft(c)),d||(d=u(getBottomRight(c)),d||(d=u(getTopRight(c)),d||(d=u(getTopLeft(c)),d||!1)))}function getArea(c){let u=0;return isEmpty(c)||(u=getWidth(c)*getHeight(c)),u}function getBottomLeft(c){return[c[0],c[1]]}function getBottomRight(c){return[c[2],c[1]]}function getCenter(c){return[(c[0]+c[2])/2,(c[1]+c[3])/2]}function getCorner(c,u){let d;if("bottom-left"===u)d=getBottomLeft(c);else if("bottom-right"===u)d=getBottomRight(c);else if("top-left"===u)d=getTopLeft(c);else{if("top-right"!==u)throw new Error("Invalid corner");d=getTopRight(c)}return d}function getForViewAndSize(c,u,d,p,g){const[f,_,y,x,v,C,M,T]=function getRotatedViewport(c,u,d,p){const g=u*p[0]/2,f=u*p[1]/2,_=Math.cos(d),y=Math.sin(d),x=g*_,v=g*y,C=f*_,M=f*y,T=c[0],L=c[1];return[T-x+M,L-v-C,T-x-M,L-v+C,T+x-M,L+v+C,T+x+M,L+v-C,T-x+M,L-v-C]}(c,u,d,p);return createOrUpdate$2(Math.min(f,y,v,M),Math.min(_,x,C,T),Math.max(f,y,v,M),Math.max(_,x,C,T),g)}function getHeight(c){return c[3]-c[1]}function getIntersection(c,u,d){const p=d||[1/0,1/0,-1/0,-1/0];return intersects$1(c,u)?(c[0]>u[0]?p[0]=c[0]:p[0]=u[0],c[1]>u[1]?p[1]=c[1]:p[1]=u[1],c[2]<u[2]?p[2]=c[2]:p[2]=u[2],c[3]<u[3]?p[3]=c[3]:p[3]=u[3]):createOrUpdateEmpty(p),p}function getTopLeft(c){return[c[0],c[3]]}function getTopRight(c){return[c[2],c[3]]}function getWidth(c){return c[2]-c[0]}function intersects$1(c,u){return c[0]<=u[2]&&c[2]>=u[0]&&c[1]<=u[3]&&c[3]>=u[1]}function isEmpty(c){return c[2]<c[0]||c[3]<c[1]}function scaleFromCenter(c,u){const d=(c[2]-c[0])/2*(u-1),p=(c[3]-c[1])/2*(u-1);c[0]-=d,c[2]+=d,c[1]-=p,c[3]+=p}function applyTransform(c,u,d,p){if(isEmpty(c))return createOrUpdateEmpty(d);let g=[];if(p>1){const u=c[2]-c[0],d=c[3]-c[1];for(let f=0;f<p;++f)g.push(c[0]+u*f/p,c[1],c[2],c[1]+d*f/p,c[2]-u*f/p,c[3],c[0],c[3]-d*f/p)}else g=[c[0],c[1],c[2],c[1],c[2],c[3],c[0],c[3]];u(g,g,2);const f=[],_=[];for(let c=0,u=g.length;c<u;c+=2)f.push(g[c]),_.push(g[c+1]);return function _boundingExtentXYs(c,u,d){return createOrUpdate$2(Math.min.apply(null,c),Math.min.apply(null,u),Math.max.apply(null,c),Math.max.apply(null,u),d)}(f,_,d)}function wrapX$2(c,u){const d=u.getExtent(),p=getCenter(c);if(u.canWrapX()&&(p[0]<d[0]||p[0]>=d[2])){const u=getWidth(d),g=Math.floor((p[0]-d[0])/u)*u;c[0]-=g,c[2]-=g}return c}function wrapAndSliceX(c,u,d){if(u.canWrapX()){const p=u.getExtent();if(!isFinite(c[0])||!isFinite(c[2]))return[[p[0],c[1],p[2],c[3]]];wrapX$2(c,u);const g=getWidth(p);if(getWidth(c)>g&&!d)return[[p[0],c[1],p[2],c[3]]];if(c[0]<p[0])return[[c[0]+g,c[1],p[2],c[3]],[p[0],c[1],c[2],c[3]]];if(c[2]>p[2])return[[c[0],c[1],p[2],c[3]],[p[0],c[1],c[2]-g,c[3]]]}return[c]}const Gi={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var ji=class Projection{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Gi[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const zi=6378137,Bi=Math.PI*zi,Ui=[-Bi,-Bi,Bi,Bi],$i=[-180,-85,180,85],Wi=zi*Math.log(Math.tan(Math.PI/2));class EPSG3857Projection extends ji{constructor(c){super({code:c,units:"m",extent:Ui,global:!0,worldExtent:$i,getPointResolution:function(c,u){return c/Math.cosh(u[1]/zi)}})}}const Xi=[new EPSG3857Projection("EPSG:3857"),new EPSG3857Projection("EPSG:102100"),new EPSG3857Projection("EPSG:102113"),new EPSG3857Projection("EPSG:900913"),new EPSG3857Projection("http://www.opengis.net/def/crs/EPSG/0/3857"),new EPSG3857Projection("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fromEPSG4326(c,u,d,p){const g=c.length;d=d>1?d:2,p=p??d,void 0===u&&(u=d>2?c.slice():new Array(g));for(let d=0;d<g;d+=p){u[d]=Bi*c[d]/180;let p=zi*Math.log(Math.tan(Math.PI*(+c[d+1]+90)/360));p>Wi?p=Wi:p<-Wi&&(p=-Wi),u[d+1]=p}return u}function toEPSG4326(c,u,d,p){const g=c.length;d=d>1?d:2,p=p??d,void 0===u&&(u=d>2?c.slice():new Array(g));for(let d=0;d<g;d+=p)u[d]=180*c[d]/Bi,u[d+1]=360*Math.atan(Math.exp(c[d+1]/zi))/Math.PI-90;return u}const Vi=[-180,-90,180,90],qi=6378137*Math.PI/180;class EPSG4326Projection extends ji{constructor(c,u){super({code:c,units:"degrees",extent:Vi,axisOrientation:u,global:!0,metersPerUnit:qi,worldExtent:Vi})}}const Yi=[new EPSG4326Projection("CRS:84"),new EPSG4326Projection("EPSG:4326","neu"),new EPSG4326Projection("urn:ogc:def:crs:OGC:1.3:CRS84"),new EPSG4326Projection("urn:ogc:def:crs:OGC:2:84"),new EPSG4326Projection("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new EPSG4326Projection("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new EPSG4326Projection("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Zi={};let Ki={};function add$2(c,u,d){const p=c.getCode(),g=u.getCode();p in Ki||(Ki[p]={}),Ki[p][g]=d}function get$3(c,u){let d;return c in Ki&&u in Ki[c]&&(d=Ki[c][u]),d}function clamp(c,u,d){return Math.min(Math.max(c,u),d)}function squaredSegmentDistance(c,u,d,p,g,f){const _=g-d,y=f-p;if(0!==_||0!==y){const x=((c-d)*_+(u-p)*y)/(_*_+y*y);x>1?(d=g,p=f):x>0&&(d+=_*x,p+=y*x)}return squaredDistance(c,u,d,p)}function squaredDistance(c,u,d,p){const g=d-c,f=p-u;return g*g+f*f}function toDegrees(c){return 180*c/Math.PI}function toRadians(c){return c*Math.PI/180}function modulo(c,u){const d=c%u;return d*u<0?d+u:d}function lerp(c,u,d){return c+d*(u-c)}function toFixed(c,u){const d=Math.pow(10,u);return Math.round(c*d)/d}function round(c,u){return Math.round(toFixed(c,u))}function floor(c,u){return Math.floor(toFixed(c,u))}function ceil(c,u){return Math.ceil(toFixed(c,u))}function padNumber(c,u,d){const p=void 0!==d?c.toFixed(d):""+c;let g=p.indexOf(".");return g=-1===g?p.length:g,g>u?p:new Array(1+u-g).join("0")+p}function compareVersions(c,u){const d=(""+c).split("."),p=(""+u).split(".");for(let c=0;c<Math.max(d.length,p.length);c++){const u=parseInt(d[c]||"0",10),g=parseInt(p[c]||"0",10);if(u>g)return 1;if(g>u)return-1}return 0}function add$1(c,u){return c[0]+=+u[0],c[1]+=+u[1],c}function degreesToStringHDMS(c,u,d){const p=modulo(u+180,360)-180,g=Math.abs(3600*p),f=d||0;let _=Math.floor(g/3600),y=Math.floor((g-3600*_)/60),x=toFixed(g-3600*_-60*y,f);x>=60&&(x=0,y+=1),y>=60&&(y=0,_+=1);let v=_+"°";return 0===y&&0===x||(v+=" "+padNumber(y,2)+"′"),0!==x&&(v+=" "+padNumber(x,2,f)+"″"),0!==p&&(v+=" "+c.charAt(p<0?1:0)),v}function equals(c,u){let d=!0;for(let p=c.length-1;p>=0;--p)if(c[p]!=u[p]){d=!1;break}return d}function rotate$1(c,u){const d=Math.cos(u),p=Math.sin(u),g=c[0]*d-c[1]*p,f=c[1]*d+c[0]*p;return c[0]=g,c[1]=f,c}function scale$2(c,u){return c[0]*=u,c[1]*=u,c}function wrapX$1(c,u){if(u.canWrapX()){const d=getWidth(u.getExtent()),p=getWorldsAway(c,u,d);p&&(c[0]-=p*d)}return c}function getWorldsAway(c,u,d){const p=u.getExtent();let g=0;return u.canWrapX()&&(c[0]<p[0]||c[0]>p[2])&&(d=d||getWidth(p),g=Math.floor((c[0]-p[0])/d)),g}const Hi=6371008.8;function getDistance(c,u,d){d=d||Hi;const p=toRadians(c[1]),g=toRadians(u[1]),f=(g-p)/2,_=toRadians(u[0]-c[0])/2,y=Math.sin(f)*Math.sin(f)+Math.sin(_)*Math.sin(_)*Math.cos(p)*Math.cos(g);return 2*d*Math.atan2(Math.sqrt(y),Math.sqrt(1-y))}function offset(c,u,d,p){p=p||Hi;const g=toRadians(c[1]),f=toRadians(c[0]),_=u/p,y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(d));return[toDegrees(f+Math.atan2(Math.sin(d)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),toDegrees(y)]}const Ji={info:1,warn:2,error:3,none:4};let Qi=Ji.info;function warn(...c){console.warn(...c)}function error(...c){Qi>Ji.error||console.error(...c)}let tr=!0;function disableCoordinateWarning(c){tr=!(void 0===c||c)}function cloneTransform(c,u){if(void 0!==u)for(let d=0,p=c.length;d<p;++d)u[d]=c[d];else u=c.slice();return u}function identityTransform(c,u){if(void 0!==u&&c!==u){for(let d=0,p=c.length;d<p;++d)u[d]=c[d];c=u}return c}function addProjection(c){!function add$3(c,u){Zi[c]=u}(c.getCode(),c),add$2(c,c,cloneTransform)}function addProjections(c){c.forEach(addProjection)}function get$2(c){return"string"==typeof c?function get$4(c){return Zi[c]||Zi[c.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}(c):c||null}function getPointResolution(c,u,d,p){let g;const f=(c=get$2(c)).getPointResolutionFunc();if(f){if(g=f(u,d),p&&p!==c.getUnits()){const u=c.getMetersPerUnit();u&&(g=g*u/Gi[p])}}else{const f=c.getUnits();if("degrees"==f&&!p||"degrees"==p)g=u;else{const _=getTransformFromProjections(c,get$2("EPSG:4326"));if(_===identityTransform&&"degrees"!==f)g=u*c.getMetersPerUnit();else{let c=[d[0]-u/2,d[1],d[0]+u/2,d[1],d[0],d[1]-u/2,d[0],d[1]+u/2];c=_(c,c,2);g=(getDistance(c.slice(0,2),c.slice(2,4))+getDistance(c.slice(4,6),c.slice(6,8)))/2}const y=p?Gi[p]:c.getMetersPerUnit();void 0!==y&&(g/=y)}}return g}function addEquivalentProjections(c){addProjections(c),c.forEach((function(u){c.forEach((function(c){u!==c&&add$2(u,c,cloneTransform)}))}))}function addEquivalentTransforms(c,u,d,p){c.forEach((function(c){u.forEach((function(u){add$2(c,u,d),add$2(u,c,p)}))}))}function createProjection(c,u){return c?"string"==typeof c?get$2(c):c:get$2(u)}function createTransformFromCoordinateTransform(c){return function(u,d,p,g){const f=u.length;p=void 0!==p?p:2,g=g??p,d=void 0!==d?d:new Array(f);for(let _=0;_<f;_+=g){const f=c(u.slice(_,_+p)),y=f.length;for(let c=0,p=g;c<p;++c)d[_+c]=c>=y?u[_+c]:f[c]}return d}}function addCoordinateTransforms(c,u,d,p){const g=get$2(c),f=get$2(u);add$2(g,f,createTransformFromCoordinateTransform(d)),add$2(f,g,createTransformFromCoordinateTransform(p))}function toLonLat(c,u){const d=transform$1(c,void 0!==u?u:"EPSG:3857","EPSG:4326"),p=d[0];return(p<-180||p>180)&&(d[0]=modulo(p+180,360)-180),d}function equivalent(c,u){if(c===u)return!0;const d=c.getUnits()===u.getUnits();if(c.getCode()===u.getCode())return d;return getTransformFromProjections(c,u)===cloneTransform&&d}function getTransformFromProjections(c,u){let d=get$3(c.getCode(),u.getCode());return d||(d=identityTransform),d}function getTransform(c,u){return getTransformFromProjections(get$2(c),get$2(u))}function transform$1(c,u,d){return getTransform(u,d)(c,void 0,c.length)}function transformExtent(c,u,d,p){return applyTransform(c,getTransform(u,d),void 0,p)}let er=null;function setUserProjection(c){er=get$2(c)}function getUserProjection(){return er}function toUserCoordinate(c,u){return er?transform$1(c,u,er):c}function fromUserCoordinate(c,u){return er?transform$1(c,er,u):(tr&&!equals(c,[0,0])&&c[0]>=-180&&c[0]<=180&&c[1]>=-90&&c[1]<=90&&(tr=!1,warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),c)}function toUserExtent(c,u){return er?transformExtent(c,u,er):c}function fromUserExtent(c,u){return er?transformExtent(c,er,u):c}function toUserResolution(c,u){if(!er)return c;const d=get$2(u).getMetersPerUnit(),p=er.getMetersPerUnit();return d&&p?c*d/p:c}function createSafeCoordinateTransform(c,u,d){return function(p){let g,f;if(c.canWrapX()){const u=c.getExtent(),_=getWidth(u);f=getWorldsAway(p=p.slice(0),c,_),f&&(p[0]=p[0]-f*_),p[0]=clamp(p[0],u[0],u[2]),p[1]=clamp(p[1],u[1],u[3]),g=d(p)}else g=d(p);return f&&u.canWrapX()&&(g[0]+=f*getWidth(u.getExtent())),g}}function addCommon(){addEquivalentProjections(Xi),addEquivalentProjections(Yi),addEquivalentTransforms(Yi,Xi,fromEPSG4326,toEPSG4326)}addCommon();var ir=Object.freeze({__proto__:null,METERS_PER_UNIT:Gi,Projection:ji,addCommon:addCommon,addCoordinateTransforms:addCoordinateTransforms,addEquivalentProjections:addEquivalentProjections,addEquivalentTransforms:addEquivalentTransforms,addProjection:addProjection,addProjections:addProjections,clearAllProjections:function clearAllProjections(){!function clear$1(){Zi={}}(),function clear(){Ki={}}()},clearUserProjection:function clearUserProjection(){er=null},cloneTransform:cloneTransform,createProjection:createProjection,createSafeCoordinateTransform:createSafeCoordinateTransform,createTransformFromCoordinateTransform:createTransformFromCoordinateTransform,disableCoordinateWarning:disableCoordinateWarning,equivalent:equivalent,fromLonLat:function fromLonLat(c,u){return disableCoordinateWarning(),transform$1(c,"EPSG:4326",void 0!==u?u:"EPSG:3857")},fromUserCoordinate:fromUserCoordinate,fromUserExtent:fromUserExtent,fromUserResolution:function fromUserResolution(c,u){if(!er)return c;const d=get$2(u).getMetersPerUnit(),p=er.getMetersPerUnit();return d&&p?c*p/d:c},get:get$2,getPointResolution:getPointResolution,getTransform:getTransform,getTransformFromProjections:getTransformFromProjections,getUserProjection:getUserProjection,identityTransform:identityTransform,setUserProjection:setUserProjection,toLonLat:toLonLat,toUserCoordinate:toUserCoordinate,toUserExtent:toUserExtent,toUserResolution:toUserResolution,transform:transform$1,transformExtent:transformExtent,transformWithProjections:function transformWithProjections(c,u,d){return getTransformFromProjections(u,d)(c)},useGeographic:function useGeographic(){setUserProjection("EPSG:4326")}});function transform2D(c,u,d,p,g,f,_){f=f||[],_=_||2;let y=0;for(let x=u;x<d;x+=p){const u=c[x],d=c[x+1];f[y++]=g[0]*u+g[2]*d+g[4],f[y++]=g[1]*u+g[3]*d+g[5];for(let u=2;u<_;u++)f[y++]=c[x+u]}return f&&f.length!=y&&(f.length=y),f}function rotate(c,u,d,p,g,f,_){_=_||[];const y=Math.cos(g),x=Math.sin(g),v=f[0],C=f[1];let M=0;for(let g=u;g<d;g+=p){const u=c[g]-v,d=c[g+1]-C;_[M++]=v+u*y-d*x,_[M++]=C+u*x+d*y;for(let u=g+2;u<g+p;++u)_[M++]=c[u]}return _&&_.length!=M&&(_.length=M),_}const rr=[1,0,0,1,0,0];var nr=class Geometry extends Ri{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=memoizeOne(((c,u,d)=>{if(!d)return this.getSimplifiedGeometry(u);const p=this.clone();return p.applyTransform(d),p.getSimplifiedGeometry(u)}))}simplifyTransformed(c,u){return this.simplifyTransformedInternal(this.getRevision(),c,u)}clone(){return abstract()}closestPointXY(c,u,d,p){return abstract()}containsXY(c,u){const d=this.getClosestPoint([c,u]);return d[0]===c&&d[1]===u}getClosestPoint(c,u){return u=u||[NaN,NaN],this.closestPointXY(c[0],c[1],u,1/0),u}intersectsCoordinate(c){return this.containsXY(c[0],c[1])}computeExtent(c){return abstract()}getExtent(c){if(this.extentRevision_!=this.getRevision()){const c=this.computeExtent(this.extent_);(isNaN(c[0])||isNaN(c[1]))&&createOrUpdateEmpty(c),this.extentRevision_=this.getRevision()}return function returnOrUpdate(c,u){return u?(u[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u):c}(this.extent_,c)}rotate(c,u){abstract()}scale(c,u,d){abstract()}simplify(c){return this.getSimplifiedGeometry(c*c)}getSimplifiedGeometry(c){return abstract()}getType(){return abstract()}applyTransform(c){abstract()}intersectsExtent(c){return abstract()}translate(c,u){abstract()}transform(c,u){const d=get$2(c),p="tile-pixels"==d.getUnits()?function(c,p,g){const f=d.getExtent(),_=d.getWorldExtent(),y=getHeight(_)/getHeight(f);return compose(rr,_[0],_[3],y,-y,0,0,0),transform2D(c,0,c.length,g,rr,p),getTransform(d,u)(c,p,g)}:getTransform(d,u);return this.applyTransform(p),this}};function getLayoutForStride(c){let u;return 2==c?u="XY":3==c?u="XYZ":4==c&&(u="XYZM"),u}function getStrideForLayout(c){let u;return"XY"==c?u=2:"XYZ"==c||"XYM"==c?u=3:"XYZM"==c&&(u=4),u}var sr=class SimpleGeometry extends nr{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(c){return createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}getCoordinates(){return abstract()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(c){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),c<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&c<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const u=this.getSimplifiedGeometryInternal(c);return u.getFlatCoordinates().length<this.flatCoordinates.length?u:(this.simplifiedGeometryMaxMinSquaredTolerance=c,this)}getSimplifiedGeometryInternal(c){return this}getStride(){return this.stride}setFlatCoordinates(c,u){this.stride=getStrideForLayout(c),this.layout=c,this.flatCoordinates=u}setCoordinates(c,u){abstract()}setLayout(c,u,d){let p;if(c)p=getStrideForLayout(c);else{for(let c=0;c<d;++c){if(0===u.length)return this.layout="XY",void(this.stride=2);u=u[0]}p=u.length,c=getLayoutForStride(p)}this.layout=c,this.stride=p}applyTransform(c){this.flatCoordinates&&(c(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(c,u){const d=this.getFlatCoordinates();if(d){const p=this.getStride();rotate(d,0,d.length,p,c,u,d),this.changed()}}scale(c,u,d){void 0===u&&(u=c),d||(d=getCenter(this.getExtent()));const p=this.getFlatCoordinates();if(p){const g=this.getStride();!function scale$1(c,u,d,p,g,f,_,y){y=y||[];const x=_[0],v=_[1];let C=0;for(let _=u;_<d;_+=p){const u=c[_]-x,d=c[_+1]-v;y[C++]=x+g*u,y[C++]=v+f*d;for(let u=_+2;u<_+p;++u)y[C++]=c[u]}return y&&y.length!=C&&(y.length=C),y}(p,0,p.length,g,c,u,d,p),this.changed()}}translate(c,u){const d=this.getFlatCoordinates();if(d){const p=this.getStride();!function translate(c,u,d,p,g,f,_){_=_||[];let y=0;for(let x=u;x<d;x+=p){_[y++]=c[x]+g,_[y++]=c[x+1]+f;for(let u=x+2;u<x+p;++u)_[y++]=c[u]}return _&&_.length!=y&&(_.length=y),_}(d,0,d.length,p,c,u,d),this.changed()}}};function assignClosest(c,u,d,p,g,f,_){const y=c[u],x=c[u+1],v=c[d]-y,C=c[d+1]-x;let M;if(0===v&&0===C)M=u;else{const T=((g-y)*v+(f-x)*C)/(v*v+C*C);if(T>1)M=d;else{if(T>0){for(let g=0;g<p;++g)_[g]=lerp(c[u+g],c[d+g],T);return void(_.length=p)}M=u}}for(let u=0;u<p;++u)_[u]=c[M+u];_.length=p}function maxSquaredDelta(c,u,d,p,g){let f=c[u],_=c[u+1];for(u+=p;u<d;u+=p){const d=c[u],p=c[u+1],y=squaredDistance(f,_,d,p);y>g&&(g=y),f=d,_=p}return g}function arrayMaxSquaredDelta(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];g=maxSquaredDelta(c,u,_,p,g),u=_}return g}function assignClosestPoint(c,u,d,p,g,f,_,y,x,v,C){if(u==d)return v;let M,T;if(0===g){if(T=squaredDistance(_,y,c[u],c[u+1]),T<v){for(M=0;M<p;++M)x[M]=c[u+M];return x.length=p,T}return v}C=C||[NaN,NaN];let L=u+p;for(;L<d;)if(assignClosest(c,L-p,L,p,_,y,C),T=squaredDistance(_,y,C[0],C[1]),T<v){for(v=T,M=0;M<p;++M)x[M]=C[M];x.length=p,L+=p}else L+=p*Math.max((Math.sqrt(T)-Math.sqrt(v))/g|0,1);if(f&&(assignClosest(c,d-p,u,p,_,y,C),T=squaredDistance(_,y,C[0],C[1]),T<v)){for(v=T,M=0;M<p;++M)x[M]=C[M];x.length=p}return v}function assignClosestArrayPoint(c,u,d,p,g,f,_,y,x,v,C){C=C||[NaN,NaN];for(let M=0,T=d.length;M<T;++M){const T=d[M];v=assignClosestPoint(c,u,T,p,g,f,_,y,x,v,C),u=T}return v}function deflateCoordinate(c,u,d,p){for(let p=0,g=d.length;p<g;++p)c[u++]=d[p];return u}function deflateCoordinates(c,u,d,p){for(let g=0,f=d.length;g<f;++g){const f=d[g];for(let d=0;d<p;++d)c[u++]=f[d]}return u}function deflateCoordinatesArray(c,u,d,p,g){g=g||[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=deflateCoordinates(c,u,d[_],p);g[f++]=y,u=y}return g.length=f,g}function deflateMultiCoordinatesArray(c,u,d,p,g){g=g||[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=deflateCoordinatesArray(c,u,d[_],p,g[f]);0===y.length&&(y[0]=u),g[f++]=y,u=y[y.length-1]}return g.length=f,g}function douglasPeucker(c,u,d,p,g,f,_){const y=(d-u)/p;if(y<3){for(;u<d;u+=p)f[_++]=c[u],f[_++]=c[u+1];return _}const x=new Array(y);x[0]=1,x[y-1]=1;const v=[u,d-p];let C=0;for(;v.length>0;){const d=v.pop(),f=v.pop();let _=0;const y=c[f],M=c[f+1],T=c[d],L=c[d+1];for(let u=f+p;u<d;u+=p){const d=squaredSegmentDistance(c[u],c[u+1],y,M,T,L);d>_&&(C=u,_=d)}_>g&&(x[(C-u)/p]=1,f+p<C&&v.push(f,C),C+p<d&&v.push(C,d))}for(let d=0;d<y;++d)x[d]&&(f[_++]=c[u+d*p],f[_++]=c[u+d*p+1]);return _}function douglasPeuckerArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x];_=douglasPeucker(c,u,v,p,g,f,_),y.push(_),u=v}return _}function snap(c,u){return u*Math.round(c/u)}function quantize(c,u,d,p,g,f,_){if(u==d)return _;let y,x,v=snap(c[u],g),C=snap(c[u+1],g);u+=p,f[_++]=v,f[_++]=C;do{if(y=snap(c[u],g),x=snap(c[u+1],g),(u+=p)==d)return f[_++]=y,f[_++]=x,_}while(y==v&&x==C);for(;u<d;){const d=snap(c[u],g),M=snap(c[u+1],g);if(u+=p,d==y&&M==x)continue;const T=y-v,L=x-C,A=d-v,I=M-C;T*I==L*A&&(T<0&&A<T||T==A||T>0&&A>T)&&(L<0&&I<L||L==I||L>0&&I>L)?(y=d,x=M):(f[_++]=y,f[_++]=x,v=y,C=x,y=d,x=M)}return f[_++]=y,f[_++]=x,_}function quantizeArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x];_=quantize(c,u,v,p,g,f,_),y.push(_),u=v}return _}function inflateCoordinates(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=u;_<d;_+=p)g[f++]=c.slice(_,_+p);return g.length=f,g}function inflateCoordinatesArray(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=d[_];g[f++]=inflateCoordinates(c,u,y,p,g[f]),u=y}return g.length=f,g}function inflateMultiCoordinatesArray(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=d[_];g[f++]=1===y.length&&y[0]===u?[]:inflateCoordinatesArray(c,u,y,p,g[f]),u=y[y.length-1]}return g.length=f,g}function linearRing(c,u,d,p){let g=0;const f=c[d-p],_=c[d-p+1];let y=0,x=0;for(;u<d;u+=p){const d=c[u]-f,p=c[u+1]-_;g+=x*d-y*p,y=d,x=p}return g/2}function linearRings(c,u,d,p){let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f];g+=linearRing(c,u,_,p),u=_}return g}class LinearRing extends sr{constructor(c,u){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===u||Array.isArray(c[0])?this.setCoordinates(c,u):this.setFlatCoordinates(u,c)}clone(){return new LinearRing(this.flatCoordinates.slice(),this.layout)}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,c,u,d,p))}getArea(){return linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(c){const u=[];return u.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,0),new LinearRing(u,"XY")}getType(){return"LinearRing"}intersectsExtent(c){return!1}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var or=LinearRing;var ar=class Point extends sr{constructor(c,u){super(),this.setCoordinates(c,u)}clone(){const c=new Point(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){const g=this.flatCoordinates,f=squaredDistance(c,u,g[0],g[1]);if(f<p){const c=this.stride;for(let u=0;u<c;++u)d[u]=g[u];return d.length=c,f}return p}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(c){return createOrUpdateFromCoordinate(this.flatCoordinates,c)}getType(){return"Point"}intersectsExtent(c){return containsXY(c,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(c,u){this.setLayout(u,c,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinate(this.flatCoordinates,0,c,this.stride),this.changed()}};function linearRingContainsExtent(c,u,d,p,g){return!forEachCorner(g,(function(g){return!linearRingContainsXY(c,u,d,p,g[0],g[1])}))}function linearRingContainsXY(c,u,d,p,g,f){let _=0,y=c[d-p],x=c[d-p+1];for(;u<d;u+=p){const d=c[u],p=c[u+1];x<=f?p>f&&(d-y)*(f-x)-(g-y)*(p-x)>0&&_++:p<=f&&(d-y)*(f-x)-(g-y)*(p-x)<0&&_--,y=d,x=p}return 0!==_}function linearRingsContainsXY(c,u,d,p,g,f){if(0===d.length)return!1;if(!linearRingContainsXY(c,u,d[0],p,g,f))return!1;for(let u=1,_=d.length;u<_;++u)if(linearRingContainsXY(c,d[u-1],d[u],p,g,f))return!1;return!0}function getInteriorPointOfArray(c,u,d,p,g,f,_){let y,x,v,C,M,T,L;const A=g[f+1],I=[];for(let g=0,f=d.length;g<f;++g){const f=d[g];for(C=c[f-p],T=c[f-p+1],y=u;y<f;y+=p)M=c[y],L=c[y+1],(A<=T&&L<=A||T<=A&&A<=L)&&(v=(A-T)/(L-T)*(M-C)+C,I.push(v)),C=M,T=L}let k=NaN,O=-1/0;for(I.sort(ascending),C=I[0],y=1,x=I.length;y<x;++y){M=I[y];const g=Math.abs(M-C);g>O&&(v=(C+M)/2,linearRingsContainsXY(c,u,d,p,v,A)&&(k=v,O=g)),C=M}return isNaN(k)&&(k=g[f]),_?(_.push(k,A,O),_):[k,A,O]}function getInteriorPointsOfMultiArray(c,u,d,p,g){let f=[];for(let _=0,y=d.length;_<y;++_){const y=d[_];f=getInteriorPointOfArray(c,u,y,p,g,2*_,f),u=y[y.length-1]}return f}function forEach(c,u,d,p,g){let f;for(u+=p;u<d;u+=p)if(f=g(c.slice(u-p,u),c.slice(u,u+p)),f)return f;return!1}function intersectsLineString(c,u,d,p,g){const f=extendFlatCoordinates([1/0,1/0,-1/0,-1/0],c,u,d,p);return!!intersects$1(g,f)&&(!!containsExtent(g,f)||(f[0]>=g[0]&&f[2]<=g[2]||(f[1]>=g[1]&&f[3]<=g[3]||forEach(c,u,d,p,(function(c,u){return function intersectsSegment(c,u,d){let p=!1;const g=coordinateRelationship(c,u),f=coordinateRelationship(c,d);if(g===Di.INTERSECTING||f===Di.INTERSECTING)p=!0;else{const _=c[0],y=c[1],x=c[2],v=c[3],C=u[0],M=u[1],T=d[0],L=d[1],A=(L-M)/(T-C);let I,k;f&Di.ABOVE&&!(g&Di.ABOVE)&&(I=T-(L-v)/A,p=I>=_&&I<=x),p||!(f&Di.RIGHT)||g&Di.RIGHT||(k=L-(T-x)*A,p=k>=y&&k<=v),p||!(f&Di.BELOW)||g&Di.BELOW||(I=T-(L-y)/A,p=I>=_&&I<=x),p||!(f&Di.LEFT)||g&Di.LEFT||(k=L-(T-_)*A,p=k>=y&&k<=v)}return p}(g,c,u)})))))}function intersectsLinearRing(c,u,d,p,g){return!!intersectsLineString(c,u,d,p,g)||(!!linearRingContainsXY(c,u,d,p,g[0],g[1])||(!!linearRingContainsXY(c,u,d,p,g[0],g[3])||(!!linearRingContainsXY(c,u,d,p,g[2],g[1])||!!linearRingContainsXY(c,u,d,p,g[2],g[3]))))}function intersectsLinearRingArray(c,u,d,p,g){if(!intersectsLinearRing(c,u,d[0],p,g))return!1;if(1===d.length)return!0;for(let u=1,f=d.length;u<f;++u)if(linearRingContainsExtent(c,d[u-1],d[u],p,g)&&!intersectsLineString(c,d[u-1],d[u],p,g))return!1;return!0}function coordinates(c,u,d,p){for(;u<d-p;){for(let g=0;g<p;++g){const f=c[u+g];c[u+g]=c[d-p+g],c[d-p+g]=f}u+=p,d-=p}}function linearRingIsClockwise(c,u,d,p){let g=0,f=c[d-p],_=c[d-p+1];for(;u<d;u+=p){const d=c[u],p=c[u+1];g+=(d-f)*(p+_),f=d,_=p}return 0===g?void 0:g>0}function linearRingsAreOriented(c,u,d,p,g){g=void 0!==g&&g;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=linearRingIsClockwise(c,u,_,p);if(0===f){if(g&&y||!g&&!y)return!1}else if(g&&!y||!g&&y)return!1;u=_}return!0}function linearRingssAreOriented(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];if(!linearRingsAreOriented(c,u,_,p,g))return!1;_.length&&(u=_[_.length-1])}return!0}function orientLinearRings(c,u,d,p,g){g=void 0!==g&&g;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=linearRingIsClockwise(c,u,_,p);(0===f?g&&y||!g&&!y:g&&!y||!g&&y)&&coordinates(c,u,_,p),u=_}return u}function orientLinearRingsArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f)u=orientLinearRings(c,u,d[f],p,g);return u}function inflateEnds(c,u){const d=[];let p,g=0,f=0;for(let _=0,y=u.length;_<y;++_){const y=u[_],x=linearRingIsClockwise(c,g,y,2);if(void 0===p&&(p=x),x===p)d.push(u.slice(f,_+1));else{if(0===d.length)continue;d[d.length-1].push(u[f])}f=_+1,g=y}return d}class Polygon extends sr{constructor(c,u,d){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==u&&d?(this.setFlatCoordinates(u,c),this.ends_=d):this.setCoordinates(c,u)}appendLinearRing(c){this.flatCoordinates?extend$3(this.flatCoordinates,c.getFlatCoordinates()):this.flatCoordinates=c.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const c=new Polygon(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,c,u,d,p))}containsXY(c,u){return linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c,u)}getArea(){return linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(c){let u;return void 0!==c?(u=this.getOrientedFlatCoordinates().slice(),orientLinearRings(u,0,this.ends_,this.stride,c)):u=this.flatCoordinates,inflateCoordinatesArray(u,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const c=getCenter(this.getExtent());this.flatInteriorPoint_=getInteriorPointOfArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new ar(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(c){return c<0||this.ends_.length<=c?null:new or(this.flatCoordinates.slice(0===c?0:this.ends_[c-1],this.ends_[c]),this.layout)}getLinearRings(){const c=this.layout,u=this.flatCoordinates,d=this.ends_,p=[];let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=new or(u.slice(g,_),c);p.push(y),g=_}return p}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const c=this.flatCoordinates;linearRingsAreOriented(c,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=c:(this.orientedFlatCoordinates_=c.slice(),this.orientedFlatCoordinates_.length=orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=quantizeArray(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(c),u,0,d),new Polygon(u,"XY",d)}getType(){return"Polygon"}intersectsExtent(c){return intersectsLinearRingArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,2),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.ends_);this.flatCoordinates.length=0===d.length?0:d[d.length-1],this.changed()}}var lr=Polygon;function fromExtent(c){if(isEmpty(c))throw new Error("Cannot create polygon from empty extent");const u=c[0],d=c[1],p=c[2],g=c[3],f=[u,d,u,g,p,g,p,d,u,d];return new Polygon(f,"XY",[f.length])}const hr="accuracy",cr="accuracyGeometry",ur="altitude",dr="altitudeAccuracy",pr="heading",gr="position",mr="projection",fr="speed",_r="tracking",yr="trackingOptions",xr="error";class GeolocationError extends BaseEvent{constructor(c){super(xr),this.code=c.code,this.message=c.message}}var vr=class Geolocation extends Ri{constructor(c){super(),this.on,this.once,this.un,c=c||{},this.position_=null,this.transform_=identityTransform,this.watchId_=void 0,this.addChangeListener(mr,this.handleProjectionChanged_),this.addChangeListener(_r,this.handleTrackingChanged_),void 0!==c.projection&&this.setProjection(c.projection),void 0!==c.trackingOptions&&this.setTrackingOptions(c.trackingOptions),this.setTracking(void 0!==c.tracking&&c.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const c=this.getProjection();c&&(this.transform_=getTransformFromProjections(get$2("EPSG:4326"),c),this.position_&&this.set(gr,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const c=this.getTracking();c&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):c||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(c){const u=c.coords;this.set(hr,u.accuracy),this.set(ur,null===u.altitude?void 0:u.altitude),this.set(dr,null===u.altitudeAccuracy?void 0:u.altitudeAccuracy),this.set(pr,null===u.heading?void 0:toRadians(u.heading)),this.position_?(this.position_[0]=u.longitude,this.position_[1]=u.latitude):this.position_=[u.longitude,u.latitude];const d=this.transform_(this.position_);this.set(gr,d.slice()),this.set(fr,null===u.speed?void 0:u.speed);const p=function circular(c,u,d,p){d=d||32;const g=[];for(let f=0;f<d;++f)extend$3(g,offset(c,u,2*Math.PI*f/d,p));return g.push(g[0],g[1]),new Polygon(g,"XY",[g.length])}(this.position_,u.accuracy);p.applyTransform(this.transform_),this.set(cr,p),this.changed()}positionError_(c){this.dispatchEvent(new GeolocationError(c))}getAccuracy(){return this.get(hr)}getAccuracyGeometry(){return this.get(cr)||null}getAltitude(){return this.get(ur)}getAltitudeAccuracy(){return this.get(dr)}getHeading(){return this.get(pr)}getPosition(){return this.get(gr)}getProjection(){return this.get(mr)}getSpeed(){return this.get(fr)}getTracking(){return this.get(_r)}getTrackingOptions(){return this.get(yr)}setProjection(c){this.set(mr,get$2(c))}setTracking(c){this.set(_r,c)}setTrackingOptions(c){this.set(yr,c)}},Sr="prerender",wr="postrender",Cr="precompose",Er="postcompose",Pr="rendercomplete",br={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},Mr={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Tr={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};Tr.max=Tr.whitepoint[2].D65,Tr.rgb=function(c,u){u=u||Tr.whitepoint[2].E;var d,p,g,f=c[0]/u[0],_=c[1]/u[1],y=c[2]/u[2];return p=-.96924363628087*f+1.87596750150772*_+.041555057407175*y,g=.055630079696993*f+-.20397695888897*_+1.056971514242878*y,d=(d=3.240969941904521*f+-1.537383177570093*_+-.498610760293*y)>.0031308?1.055*Math.pow(d,1/2.4)-.055:d*=12.92,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:p*=12.92,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*=12.92,[255*(d=Math.min(Math.max(0,d),1)),255*(p=Math.min(Math.max(0,p),1)),255*(g=Math.min(Math.max(0,g),1))]},Mr.xyz=function(c,u){var d=c[0]/255,p=c[1]/255,g=c[2]/255,f=.21263900587151*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)+.71516867876775*(p=p>.04045?Math.pow((p+.055)/1.055,2.4):p/12.92)+.072192315360733*(g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92),_=.019330818715591*d+.11919477979462*p+.95053215224966*g;return[(.41239079926595*d+.35758433938387*p+.18048078840183*g)*(u=u||Tr.whitepoint[2].E)[0],f*u[1],_*u[2]]};var Rr={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(c,u,d){var p,g,f,_,y,x,v,C,M;if(f=c[0],_=c[1],y=c[2],0===f)return[0,0,0];return u=u||"D65",d=d||2,p=_/(13*f)+4*(v=Tr.whitepoint[d][u][0])/(v+15*(C=Tr.whitepoint[d][u][1])+3*(M=Tr.whitepoint[d][u][2]))||0,g=y/(13*f)+9*C/(v+15*C+3*M)||0,[9*(x=f>8?C*Math.pow((f+16)/116,3):C*f*.0011070564598794539)*p/(4*g)||0,x,x*(12-3*p-20*g)/(4*g)||0]}};Tr.luv=function(c,u,d){var p,g,f,_,y,x,v,C,M,T,L;u=u||"D65",d=d||2,T=4*(v=Tr.whitepoint[d][u][0])/(v+15*(C=Tr.whitepoint[d][u][1])+3*(M=Tr.whitepoint[d][u][2])),L=9*C/(v+15*C+3*M),p=4*(_=c[0])/(_+15*(y=c[1])+3*(x=c[2]))||0,g=9*y/(_+15*y+3*x)||0;var A=y/C;return[f=A<=.008856451679035631?903.2962962962961*A:116*Math.pow(A,1/3)-16,13*f*(p-T),13*f*(g-L)]};var Lr={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(c){var u,d=c[0],p=c[1];return u=c[2]/360*2*Math.PI,[d,p*Math.cos(u),p*Math.sin(u)]},xyz:function(c){return Rr.xyz(Lr.luv(c))}};Rr.lchuv=function(c){var u=c[0],d=c[1],p=c[2],g=Math.sqrt(d*d+p*p),f=360*Math.atan2(p,d)/2/Math.PI;return f<0&&(f+=360),[u,g,f]},Tr.lchuv=function(c){return Rr.lchuv(Tr.luv(c))};var Ar={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ir={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var Fr={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(c){var u,d,p,g,f,_=c[0]/360,y=c[1]/100,x=c[2]/100,v=0;if(0===y)return[f=255*x,f,f];for(u=2*x-(d=x<.5?x*(1+y):x+y-x*y),g=[0,0,0];v<3;)(p=_+1/3*-(v-1))<0?p++:p>1&&p--,f=6*p<1?u+6*(d-u)*p:2*p<1?d:3*p<2?u+(d-u)*(2/3-p)*6:u,g[v++]=255*f;return g}};function rgba(c){var u;Array.isArray(c)&&c.raw&&(c=String.raw(...arguments)),c instanceof Number&&(c=+c);var d=function parse$3(c){var u,d,p=[],g=1;if("number"==typeof c)return{space:"rgb",values:[c>>>16,(65280&c)>>>8,255&c],alpha:1};if("number"==typeof c)return{space:"rgb",values:[c>>>16,(65280&c)>>>8,255&c],alpha:1};if(c=String(c).toLowerCase(),Ar[c])p=Ar[c].slice(),d="rgb";else if("transparent"===c)g=0,d="rgb",p=[0,0,0];else if("#"===c[0]){var f=c.slice(1),_=f.length;g=1,_<=4?(p=[parseInt(f[0]+f[0],16),parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16)],4===_&&(g=parseInt(f[3]+f[3],16)/255)):(p=[parseInt(f[0]+f[1],16),parseInt(f[2]+f[3],16),parseInt(f[4]+f[5],16)],8===_&&(g=parseInt(f[6]+f[7],16)/255)),p[0]||(p[0]=0),p[1]||(p[1]=0),p[2]||(p[2]=0),d="rgb"}else if(u=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(c)){var y=u[1],x="cmyk"===(d=y.replace(/a$/,""))?4:"gray"===d?1:3;p=u[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===d&&(d=p.shift()),p=p.map((function(c,u){if("%"===c[c.length-1])return c=parseFloat(c)/100,3===u?c:"rgb"===d?255*c:"h"===d[0]?100*c:"l"!==d[0]||u?"lab"===d?125*c:"lch"===d?u<2?150*c:360*c:"o"!==d[0]||u?"oklab"===d?.4*c:"oklch"===d?u<2?.4*c:360*c:c:c:100*c;if("h"===d[u]||2===u&&"h"===d[d.length-1]){if(void 0!==Ir[c])return Ir[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return 360*parseFloat(c);if(c.endsWith("grad"))return 360*parseFloat(c)/400;if(c.endsWith("rad"))return 180*parseFloat(c)/Math.PI}return"none"===c?0:parseFloat(c)})),g=p.length>x?p.pop():1}else/[0-9](?:\s|\/|,)/.test(c)&&(p=c.match(/([0-9]+)/g).map((function(c){return parseFloat(c)})),d=c.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:d,values:p,alpha:g}}(c);if(!d.space)return[];const p="h"===d.space[0]?Fr.min:Mr.min,g="h"===d.space[0]?Fr.max:Mr.max;return(u=Array(3))[0]=Math.min(Math.max(d.values[0],p[0]),g[0]),u[1]=Math.min(Math.max(d.values[1],p[1]),g[1]),u[2]=Math.min(Math.max(d.values[2],p[2]),g[2]),"h"===d.space[0]&&(u=Fr.rgb(u)),u.push(Math.min(Math.max(d.alpha,0),1)),u}Mr.hsl=function(c){var u,d,p=c[0]/255,g=c[1]/255,f=c[2]/255,_=Math.min(p,g,f),y=Math.max(p,g,f),x=y-_;return y===_?u=0:p===y?u=(g-f)/x:g===y?u=2+(f-p)/x:f===y&&(u=4+(p-g)/x),(u=Math.min(60*u,360))<0&&(u+=360),d=(_+y)/2,[u,100*(y===_?0:d<=.5?x/(y+_):x/(2-y-_)),100*d]};const kr=[NaN,NaN,NaN,0];const Or=1024,Nr={};let Dr=0;function withAlpha(c){if(4===c.length)return c;const u=c.slice();return u[3]=1,u}function rgbaToLcha(c){const u=Tr.lchuv(Mr.xyz(c));return u[3]=c[3],u}function fromString(c){if("none"===c)return kr;if(Nr.hasOwnProperty(c))return Nr[c];if(Dr>=Or){let c=0;for(const u in Nr)3&c++||(delete Nr[u],--Dr)}const u=rgba(c);if(4!==u.length)throw new Error('failed to parse "'+c+'" as color');for(const d of u)if(isNaN(d))throw new Error('failed to parse "'+c+'" as color');return normalize(u),Nr[c]=u,++Dr,u}function asArray(c){return Array.isArray(c)?c:fromString(c)}function normalize(c){return c[0]=clamp(c[0]+.5|0,0,255),c[1]=clamp(c[1]+.5|0,0,255),c[2]=clamp(c[2]+.5|0,0,255),c[3]=clamp(c[3],0,1),c}function toString(c){let u=c[0];u!=(0|u)&&(u=u+.5|0);let d=c[1];d!=(0|d)&&(d=d+.5|0);let p=c[2];p!=(0|p)&&(p=p+.5|0);return"rgba("+u+","+d+","+p+","+(void 0===c[3]?1:Math.round(1e3*c[3])/1e3)+")"}const Gr="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",jr=Gr.includes("firefox"),zr=Gr.includes("safari")&&!Gr.includes("chrom")&&(Gr.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Gr)),Br=Gr.includes("webkit")&&!Gr.includes("edge"),Ur=Gr.includes("macintosh"),$r="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Wr="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Xr="undefined"!=typeof Image&&Image.prototype.decode,Vr="function"==typeof createImageBitmap,qr=function(){let c=!1;try{const u=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("_",null,u),window.removeEventListener("_",null,u)}catch(c){}return c}();function createCanvasContext2D(c,u,d,p){let g;return g=d&&d.length?d.shift():Wr?new OffscreenCanvas(c||300,u||300):document.createElement("canvas"),c&&(g.width=c),u&&(g.height=u),g.getContext("2d",p)}let Yr;function getSharedCanvasContext2D(){return Yr||(Yr=createCanvasContext2D(1,1)),Yr}function releaseCanvas$1(c){const u=c.canvas;u.width=1,u.height=1,c.clearRect(0,0,1,1)}function outerWidth(c){let u=c.offsetWidth;const d=getComputedStyle(c);return u+=parseInt(d.marginLeft,10)+parseInt(d.marginRight,10),u}function outerHeight(c){let u=c.offsetHeight;const d=getComputedStyle(c);return u+=parseInt(d.marginTop,10)+parseInt(d.marginBottom,10),u}function replaceNode(c,u){const d=u.parentNode;d&&d.replaceChild(c,u)}function removeChildren(c){for(;c.lastChild;)c.lastChild.remove()}function decodeFallback(c,u){return u&&(c.src=u),c.src&&Xr?new Promise(((u,d)=>c.decode().then((()=>u(c))).catch((p=>c.complete&&c.width?u(c):d(p))))):function load(c,u){return new Promise(((u,d)=>{function handleLoad(){unlisten(),u(c)}function handleError(){unlisten(),d(new Error("Image load error"))}function unlisten(){c.removeEventListener("load",handleLoad),c.removeEventListener("error",handleError)}c.addEventListener("load",handleLoad),c.addEventListener("error",handleError)}))}(c)}function decode$1(c,u){return u&&(c.src=u),c.src&&Xr&&Vr?c.decode().then((()=>createImageBitmap(c))).catch((u=>{if(c.complete&&c.width)return c;throw u})):decodeFallback(c)}var Zr=class ImageWrapper extends Target{constructor(c,u,d,p){super(),this.extent=c,this.pixelRatio_=d,this.resolution=u,this.state="function"==typeof p?br.IDLE:p,this.image_=null,this.loader="function"==typeof p?p:null}changed(){this.dispatchEvent(_i)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==br.IDLE&&this.loader){this.state=br.LOADING,this.changed();const c=this.getResolution(),u=Array.isArray(c)?c[0]:c;toPromise((()=>this.loader(this.getExtent(),u,this.getPixelRatio()))).then((c=>{"image"in c&&(this.image_=c.image),"extent"in c&&(this.extent=c.extent),"resolution"in c&&(this.resolution=c.resolution),"pixelRatio"in c&&(this.pixelRatio_=c.pixelRatio),(c instanceof HTMLImageElement||c instanceof ImageBitmap||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement)&&(this.image_=c),this.state=br.LOADED})).catch((c=>{this.state=br.ERROR,console.error(c)})).finally((()=>this.changed()))}}setImage(c){this.image_=c}setResolution(c){this.resolution=c}};function getCacheKey$2(c,u,d){return u+":"+c+":"+(d?asArray(d):"null")}const Kr=new class IconImageCache{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let c=0;for(const u in this.cache_){const d=this.cache_[u];3&c++||d.hasListener()||(delete this.cache_[u],delete this.patternCache_[u],--this.cacheSize_)}}}get(c,u,d){const p=getCacheKey$2(c,u,d);return p in this.cache_?this.cache_[p]:null}getPattern(c,u,d){const p=getCacheKey$2(c,u,d);return p in this.patternCache_?this.patternCache_[p]:null}set(c,u,d,p,g){const f=getCacheKey$2(c,u,d),_=f in this.cache_;this.cache_[f]=p,g&&(p.getImageState()===br.IDLE&&p.load(),p.getImageState()===br.LOADING?p.ready().then((()=>{this.patternCache_[f]=getSharedCanvasContext2D().createPattern(p.getImage(1),"repeat")})):this.patternCache_[f]=getSharedCanvasContext2D().createPattern(p.getImage(1),"repeat")),_||++this.cacheSize_}setSize(c){this.maxCacheSize_=c,this.expire()}};let Hr=null;class IconImage extends Target{constructor(c,u,d,p,g){super(),this.hitDetectionImage_=null,this.image_=c,this.crossOrigin_=d,this.canvas_={},this.color_=g,this.imageState_=void 0===p?br.IDLE:p,this.size_=c&&c.width&&c.height?[c.width,c.height]:null,this.src_=u,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===br.LOADED){Hr||(Hr=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})),Hr.drawImage(this.image_,0,0);try{Hr.getImageData(0,0,1,1),this.tainted_=!1}catch(c){Hr=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(_i)}handleImageError_(){this.imageState_=br.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=br.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(c){return this.image_||this.initializeImage_(),this.replaceColor_(c),this.canvas_[c]?this.canvas_[c]:this.image_}getPixelRatio(c){return this.replaceColor_(c),this.canvas_[c]?c:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const c=this.size_[0],u=this.size_[1],d=createCanvasContext2D(c,u);d.fillRect(0,0,c,u),this.hitDetectionImage_=d.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===br.IDLE){this.image_||this.initializeImage_(),this.imageState_=br.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(c){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&decodeFallback(this.image_,this.src_).then((c=>{this.image_=c,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(c){if(!this.color_||this.canvas_[c]||this.imageState_!==br.LOADED)return;const u=this.image_,d=document.createElement("canvas");d.width=Math.ceil(u.width*c),d.height=Math.ceil(u.height*c);const p=d.getContext("2d");p.scale(c,c),p.drawImage(u,0,0),p.globalCompositeOperation="multiply",p.fillStyle=function asString(c){return"string"==typeof c?c:toString(c)}(this.color_),p.fillRect(0,0,d.width/c,d.height/c),p.globalCompositeOperation="destination-in",p.drawImage(u,0,0),this.canvas_[c]=d}ready(){return this.ready_||(this.ready_=new Promise((c=>{if(this.imageState_===br.LOADED||this.imageState_===br.ERROR)c();else{const onChange=()=>{this.imageState_!==br.LOADED&&this.imageState_!==br.ERROR||(this.removeEventListener(_i,onChange),c())};this.addEventListener(_i,onChange)}}))),this.ready_}}function get$1(c,u,d,p,g,f){let _=void 0===u?void 0:Kr.get(u,d,g);return _||(_=new IconImage(c,c&&"src"in c?c.src||void 0:u,d,p,g),Kr.set(u,d,g,_,f)),f&&_&&!Kr.getPattern(u,d,g)&&Kr.set(u,d,g,_,f),_}var Jr=IconImage;class Fill{constructor(c){c=c||{},this.patternImage_=null,this.color_=null,void 0!==c.color&&this.setColor(c.color)}clone(){const c=this.getColor();return new Fill({color:Array.isArray(c)?c.slice():c||void 0})}getColor(){return this.color_}setColor(c){if(null!==c&&"object"==typeof c&&"src"in c){const u=get$1(null,c.src,"anonymous",void 0,c.offset?null:c.color?c.color:null,!(c.offset&&c.size));u.ready().then((()=>{this.patternImage_=null})),u.getImageState()===br.IDLE&&u.load(),u.getImageState()===br.LOADING&&(this.patternImage_=u)}this.color_=c}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}var Qr=Fill;function interpolatePoint(c,u,d,p,g,f,_){let y,x;const v=(d-u)/p;if(1===v)y=u;else if(2===v)y=u,x=g;else if(0!==v){let f=c[u],_=c[u+1],v=0;const C=[0];for(let g=u+p;g<d;g+=p){const u=c[g],d=c[g+1];v+=Math.sqrt((u-f)*(u-f)+(d-_)*(d-_)),C.push(v),f=u,_=d}const M=g*v,T=function binarySearch(c,u,d){let p,g;d=d||ascending;let f=0,_=c.length,y=!1;for(;f<_;)p=f+(_-f>>1),g=+d(c[p],u),g<0?f=p+1:(_=p,y=!g);return y?f:~f}(C,M);T<0?(x=(M-C[-T-2])/(C[-T-1]-C[-T-2]),y=u+(-T-2)*p):y=u+T*p}_=_>1?_:2,f=f||new Array(_);for(let u=0;u<_;++u)f[u]=void 0===y?NaN:void 0===x?c[y+u]:lerp(c[y+u],c[y+p+u],x);return f}function lineStringCoordinateAtM(c,u,d,p,g,f){if(d==u)return null;let _;if(g<c[u+p-1])return f?(_=c.slice(u,u+p),_[p-1]=g,_):null;if(c[d-1]<g)return f?(_=c.slice(d-p,d),_[p-1]=g,_):null;if(g==c[u+p-1])return c.slice(u,u+p);let y=u/p,x=d/p;for(;y<x;){const u=y+x>>1;g<c[(u+1)*p-1]?x=u:y=u+1}const v=c[y*p-1];if(g==v)return c.slice((y-1)*p,(y-1)*p+p);const C=(g-v)/(c[(y+1)*p-1]-v);_=[];for(let u=0;u<p-1;++u)_.push(lerp(c[(y-1)*p+u],c[y*p+u],C));return _.push(g),_}function lineStringLength(c,u,d,p){let g=c[u],f=c[u+1],_=0;for(let y=u+p;y<d;y+=p){const u=c[y],d=c[y+1];_+=Math.sqrt((u-g)*(u-g)+(d-f)*(d-f)),g=u,f=d}return _}class LineString extends sr{constructor(c,u){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===u||Array.isArray(c[0])?this.setCoordinates(c,u):this.setFlatCoordinates(u,c)}appendCoordinate(c){extend$3(this.flatCoordinates,c),this.changed()}clone(){const c=new LineString(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,c,u,d,p))}forEachSegment(c){return forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}getCoordinateAtM(c,u){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(u=void 0!==u&&u,lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u))}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(c,u){return interpolatePoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,this.stride)}getLength(){return lineStringLength(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(c){const u=[];return u.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,0),new LineString(u,"XY")}getType(){return"LineString"}intersectsExtent(c){return intersectsLineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var tn=LineString;class Stroke{constructor(c){c=c||{},this.color_=void 0!==c.color?c.color:null,this.lineCap_=c.lineCap,this.lineDash_=void 0!==c.lineDash?c.lineDash:null,this.lineDashOffset_=c.lineDashOffset,this.lineJoin_=c.lineJoin,this.miterLimit_=c.miterLimit,this.width_=c.width}clone(){const c=this.getColor();return new Stroke({color:Array.isArray(c)?c.slice():c||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(c){this.color_=c}setLineCap(c){this.lineCap_=c}setLineDash(c){this.lineDash_=c}setLineDashOffset(c){this.lineDashOffset_=c}setLineJoin(c){this.lineJoin_=c}setMiterLimit(c){this.miterLimit_=c}setWidth(c){this.width_=c}}var en=Stroke;function hasArea(c){return c[0]>0&&c[1]>0}function scale(c,u,d){return void 0===d&&(d=[0,0]),d[0]=c[0]*u+.5|0,d[1]=c[1]*u+.5|0,d}function toSize(c,u){return Array.isArray(c)?c:(void 0===u?u=[c,c]:(u[0]=c,u[1]=c),u)}class ImageStyle{constructor(c){this.opacity_=c.opacity,this.rotateWithView_=c.rotateWithView,this.rotation_=c.rotation,this.scale_=c.scale,this.scaleArray_=toSize(c.scale),this.displacement_=c.displacement,this.declutterMode_=c.declutterMode}clone(){const c=this.getScale();return new ImageStyle({opacity:this.getOpacity(),scale:Array.isArray(c)?c.slice():c,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return abstract()}getImage(c){return abstract()}getHitDetectionImage(){return abstract()}getPixelRatio(c){return 1}getImageState(){return abstract()}getImageSize(){return abstract()}getOrigin(){return abstract()}getSize(){return abstract()}setDisplacement(c){this.displacement_=c}setOpacity(c){this.opacity_=c}setRotateWithView(c){this.rotateWithView_=c}setRotation(c){this.rotation_=c}setScale(c){this.scale_=c,this.scaleArray_=toSize(c)}listenImageChange(c){abstract()}load(){abstract()}unlistenImageChange(c){abstract()}ready(){return Promise.resolve()}}var rn=ImageStyle;function asColorLike(c){return c?Array.isArray(c)?toString(c):"object"==typeof c&&"src"in c?function asCanvasPattern(c){if(!c.offset||!c.size)return Kr.getPattern(c.src,"anonymous",c.color);const u=c.src+":"+c.offset,d=Kr.getPattern(u,void 0,c.color);if(d)return d;const p=Kr.get(c.src,"anonymous",null);if(p.getImageState()!==br.LOADED)return null;const g=createCanvasContext2D(c.size[0],c.size[1]);return g.drawImage(p.getImage(1),c.offset[0],c.offset[1],c.size[0],c.size[1],0,0,c.size[0],c.size[1]),get$1(g.canvas,u,void 0,br.LOADED,c.color,!0),Kr.getPattern(u,void 0,c.color)}(c):c:null}const nn="ol-hidden",sn="ol-unselectable",on="ol-unsupported",an="ol-control",ln="ol-collapsed",hn=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),cn=["style","variant","weight","size","lineHeight","family"],getFontParameters=function(c){const u=c.match(hn);if(!u)return null;const d={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let c=0,p=cn.length;c<p;++c){const p=u[c+1];void 0!==p&&(d[cn[c]]=p)}return d.families=d.family.split(/,\s?/),d},un="10px sans-serif",dn="#000",pn="round",gn=[],mn="round",fn="#000",_n="center",yn="middle",xn=[0,0,0,0],vn=new Ri;let Sn,wn=null;const Cn={},En=function(){const c="32px ",u=["monospace","serif"],d=u.length,p="wmytzilWMYTZIL@#/&?$%10";let g,f;function isAvailable(g,_,y){let x=!0;for(let v=0;v<d;++v){const d=u[v];if(f=measureTextWidth(g+" "+_+" "+c+d,p),y!=d){const u=measureTextWidth(g+" "+_+" "+c+y+","+d,p);x=x&&u!=f}}return!!x}function check(){let c=!0;const u=vn.getKeys();for(let d=0,p=u.length;d<p;++d){const p=u[d];if(vn.get(p)<100){const[u,d,g]=p.split("\n");isAvailable(u,d,g)?(clear$2(Cn),wn=null,Sn=void 0,vn.set(p,100)):(vn.set(p,vn.get(p)+1,!0),c=!1)}}c&&(clearInterval(g),g=void 0)}return function(c){const u=getFontParameters(c);if(!u)return;const d=u.families;for(let c=0,p=d.length;c<p;++c){const p=d[c],f=u.style+"\n"+u.weight+"\n"+p;void 0===vn.get(f)&&(vn.set(f,100,!0),isAvailable(u.style,u.weight,p)||(vn.set(f,0,!0),void 0===g&&(g=setInterval(check,32))))}}}(),Pn=function(){let c;return function(u){let d=Cn[u];if(null==d){if(Wr){const c=getFontParameters(u),p=measureText(u,"Žg");d=(isNaN(Number(c.lineHeight))?1.2:Number(c.lineHeight))*(p.actualBoundingBoxAscent+p.actualBoundingBoxDescent)}else c||(c=document.createElement("div"),c.innerHTML="M",c.style.minHeight="0",c.style.maxHeight="none",c.style.height="auto",c.style.padding="0",c.style.border="none",c.style.position="absolute",c.style.display="block",c.style.left="-99999px"),c.style.font=u,document.body.appendChild(c),d=c.offsetHeight,document.body.removeChild(c);Cn[u]=d}return d}}();function measureText(c,u){return wn||(wn=createCanvasContext2D(1,1)),c!=Sn&&(wn.font=c,Sn=wn.font),wn.measureText(u)}function measureTextWidth(c,u){return measureText(c,u).width}function measureAndCacheTextWidth(c,u,d){if(u in d)return d[u];const p=u.split("\n").reduce(((u,d)=>Math.max(u,measureTextWidth(c,d))),0);return d[u]=p,p}function drawImageOrLabel(c,u,d,p,g,f,_,y,x,v,C){c.save(),1!==d&&(void 0===c.globalAlpha?c.globalAlpha=c=>c.globalAlpha*=d:c.globalAlpha*=d),u&&c.transform.apply(c,u),p.contextInstructions?(c.translate(x,v),c.scale(C[0],C[1]),function executeLabelInstructions(c,u){const d=c.contextInstructions;for(let c=0,p=d.length;c<p;c+=2)Array.isArray(d[c+1])?u[d[c]].apply(u,d[c+1]):u[d[c]]=d[c+1]}(p,c)):C[0]<0||C[1]<0?(c.translate(x,v),c.scale(C[0],C[1]),c.drawImage(p,g,f,_,y,0,0,_,y)):c.drawImage(p,g,f,_,y,x,v,_*C[0],y*C[1]),c.restore()}class RegularShape extends rn{constructor(c){super({opacity:1,rotateWithView:void 0!==c.rotateWithView&&c.rotateWithView,rotation:void 0!==c.rotation?c.rotation:0,scale:void 0!==c.scale?c.scale:1,displacement:void 0!==c.displacement?c.displacement:[0,0],declutterMode:c.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==c.fill?c.fill:null,this.origin_=[0,0],this.points_=c.points,this.radius=c.radius,this.radius2_=c.radius2,this.angle_=void 0!==c.angle?c.angle:0,this.stroke_=void 0!==c.stroke?c.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?br.LOADING:br.LOADED,this.imageState_===br.LOADING&&this.ready().then((()=>this.imageState_=br.LOADED)),this.render()}clone(){const c=this.getScale(),u=new RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(c)?c.slice():c,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return u.setOpacity(this.getOpacity()),u}getAnchor(){const c=this.size_,u=this.getDisplacement(),d=this.getScaleArray();return[c[0]/2-u[0]/d[0],c[1]/2+u[1]/d[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(c){this.fill_=c,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(c){let u=this.canvases_[c];if(!u){const d=this.renderOptions_,p=createCanvasContext2D(d.size*c,d.size*c);this.draw_(d,p,c),u=p.canvas,this.canvases_[c]=u}return u}getPixelRatio(c){return c}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(c){this.stroke_=c,this.render()}listenImageChange(c){}load(){}unlistenImageChange(c){}calculateLineJoinSize_(c,u,d){if(0===u||this.points_===1/0||"bevel"!==c&&"miter"!==c)return u;let p=this.radius,g=void 0===this.radius2_?p:this.radius2_;if(p<g){const c=p;p=g,g=c}const f=void 0===this.radius2_?this.points_:2*this.points_,_=2*Math.PI/f,y=g*Math.sin(_),x=p-Math.sqrt(g*g-y*y),v=Math.sqrt(y*y+x*x),C=v/y;if("miter"===c&&C<=d)return C*u;const M=u/2/C,T=u/2*(x/v),L=Math.sqrt((p+M)*(p+M)+T*T)-p;if(void 0===this.radius2_||"bevel"===c)return 2*L;const A=p*Math.sin(_),I=g-Math.sqrt(p*p-A*A),k=Math.sqrt(A*A+I*I)/A;if(k<=d){const c=k*u/2-g-p;return 2*Math.max(L,c)}return 2*L}createRenderOptions(){let c,u=pn,d=mn,p=0,g=null,f=0,_=0;this.stroke_&&(c=asColorLike(this.stroke_.getColor()??fn),_=this.stroke_.getWidth()??1,g=this.stroke_.getLineDash(),f=this.stroke_.getLineDashOffset()??0,d=this.stroke_.getLineJoin()??mn,u=this.stroke_.getLineCap()??pn,p=this.stroke_.getMiterLimit()??10);const y=this.calculateLineJoinSize_(d,_,p),x=Math.max(this.radius,this.radius2_||0);return{strokeStyle:c,strokeWidth:_,size:Math.ceil(2*x+y),lineCap:u,lineDash:g,lineDashOffset:f,lineJoin:d,miterLimit:p}}render(){this.renderOptions_=this.createRenderOptions();const c=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[c,c]}draw_(c,u,d){if(u.scale(d,d),u.translate(c.size/2,c.size/2),this.createPath_(u),this.fill_){let c=this.fill_.getColor();null===c&&(c=dn),u.fillStyle=asColorLike(c),u.fill()}c.strokeStyle&&(u.strokeStyle=c.strokeStyle,u.lineWidth=c.strokeWidth,c.lineDash&&(u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset),u.lineCap=c.lineCap,u.lineJoin=c.lineJoin,u.miterLimit=c.miterLimit,u.stroke())}createHitDetectionCanvas_(c){let u;if(this.fill_){let d=this.fill_.getColor(),p=0;"string"==typeof d&&(d=asArray(d)),null===d?p=1:Array.isArray(d)&&(p=4===d.length?d[3]:1),0===p&&(u=createCanvasContext2D(c.size,c.size),this.drawHitDetectionCanvas_(c,u))}return u?u.canvas:this.getImage(1)}createPath_(c){let u=this.points_;const d=this.radius;if(u===1/0)c.arc(0,0,d,0,2*Math.PI);else{const p=void 0===this.radius2_?d:this.radius2_;void 0!==this.radius2_&&(u*=2);const g=this.angle_-Math.PI/2,f=2*Math.PI/u;for(let _=0;_<u;_++){const u=g+_*f,y=_%2==0?d:p;c.lineTo(y*Math.cos(u),y*Math.sin(u))}c.closePath()}}drawHitDetectionCanvas_(c,u){u.translate(c.size/2,c.size/2),this.createPath_(u),u.fillStyle=dn,u.fill(),c.strokeStyle&&(u.strokeStyle=c.strokeStyle,u.lineWidth=c.strokeWidth,c.lineDash&&(u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset),u.lineJoin=c.lineJoin,u.miterLimit=c.miterLimit,u.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}var bn=RegularShape;class CircleStyle extends bn{constructor(c){super({points:1/0,fill:(c=c||{radius:5}).fill,radius:c.radius,stroke:c.stroke,scale:void 0!==c.scale?c.scale:1,rotation:void 0!==c.rotation?c.rotation:0,rotateWithView:void 0!==c.rotateWithView&&c.rotateWithView,displacement:void 0!==c.displacement?c.displacement:[0,0],declutterMode:c.declutterMode})}clone(){const c=this.getScale(),u=new CircleStyle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(c)?c.slice():c,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return u.setOpacity(this.getOpacity()),u}setRadius(c){this.radius=c,this.render()}}var Mn=CircleStyle;class Style{constructor(c){c=c||{},this.geometry_=null,this.geometryFunction_=defaultGeometryFunction,void 0!==c.geometry&&this.setGeometry(c.geometry),this.fill_=void 0!==c.fill?c.fill:null,this.image_=void 0!==c.image?c.image:null,this.renderer_=void 0!==c.renderer?c.renderer:null,this.hitDetectionRenderer_=void 0!==c.hitDetectionRenderer?c.hitDetectionRenderer:null,this.stroke_=void 0!==c.stroke?c.stroke:null,this.text_=void 0!==c.text?c.text:null,this.zIndex_=c.zIndex}clone(){let c=this.getGeometry();return c&&"object"==typeof c&&(c=c.clone()),new Style({geometry:c??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(c){this.renderer_=c}setHitDetectionRenderer(c){this.hitDetectionRenderer_=c}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(c){this.fill_=c}getImage(){return this.image_}setImage(c){this.image_=c}getStroke(){return this.stroke_}setStroke(c){this.stroke_=c}getText(){return this.text_}setText(c){this.text_=c}getZIndex(){return this.zIndex_}setGeometry(c){"function"==typeof c?this.geometryFunction_=c:"string"==typeof c?this.geometryFunction_=function(u){return u.get(c)}:c?void 0!==c&&(this.geometryFunction_=function(){return c}):this.geometryFunction_=defaultGeometryFunction,this.geometry_=c}setZIndex(c){this.zIndex_=c}}let Tn=null;function createDefaultStyle$1(c,u){if(!Tn){const c=new Qr({color:"rgba(255,255,255,0.4)"}),u=new en({color:"#3399CC",width:1.25});Tn=[new Style({image:new Mn({fill:c,stroke:u,radius:5}),fill:c,stroke:u})]}return Tn}function defaultGeometryFunction(c){return c.getGeometry()}var Rn=Style;class Text{constructor(c){c=c||{},this.font_=c.font,this.rotation_=c.rotation,this.rotateWithView_=c.rotateWithView,this.scale_=c.scale,this.scaleArray_=toSize(void 0!==c.scale?c.scale:1),this.text_=c.text,this.textAlign_=c.textAlign,this.justify_=c.justify,this.repeat_=c.repeat,this.textBaseline_=c.textBaseline,this.fill_=void 0!==c.fill?c.fill:new Qr({color:"#333"}),this.maxAngle_=void 0!==c.maxAngle?c.maxAngle:Math.PI/4,this.placement_=void 0!==c.placement?c.placement:"point",this.overflow_=!!c.overflow,this.stroke_=void 0!==c.stroke?c.stroke:null,this.offsetX_=void 0!==c.offsetX?c.offsetX:0,this.offsetY_=void 0!==c.offsetY?c.offsetY:0,this.backgroundFill_=c.backgroundFill?c.backgroundFill:null,this.backgroundStroke_=c.backgroundStroke?c.backgroundStroke:null,this.padding_=void 0===c.padding?null:c.padding,this.declutterMode_=c.declutterMode}clone(){const c=this.getScale();return new Text({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(c)?c.slice():c,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(c){this.overflow_=c}setFont(c){this.font_=c}setMaxAngle(c){this.maxAngle_=c}setOffsetX(c){this.offsetX_=c}setOffsetY(c){this.offsetY_=c}setPlacement(c){this.placement_=c}setRepeat(c){this.repeat_=c}setRotateWithView(c){this.rotateWithView_=c}setFill(c){this.fill_=c}setRotation(c){this.rotation_=c}setScale(c){this.scale_=c,this.scaleArray_=toSize(void 0!==c?c:1)}setStroke(c){this.stroke_=c}setText(c){this.text_=c}setTextAlign(c){this.textAlign_=c}setJustify(c){this.justify_=c}setTextBaseline(c){this.textBaseline_=c}setBackgroundFill(c){this.backgroundFill_=c}setBackgroundStroke(c){this.backgroundStroke_=c}setPadding(c){this.padding_=c}}var Ln=Text,An="opacity",In="visible",Fn="extent",kn="zIndex",On="maxResolution",Nn="minResolution",Dn="maxZoom",Gn="minZoom",jn="source",zn="map";class BaseLayer extends Ri{constructor(c){super(),this.on,this.once,this.un,this.background_=c.background;const u=Object.assign({},c);"object"==typeof c.properties&&(delete u.properties,Object.assign(u,c.properties)),u[An]=void 0!==c.opacity?c.opacity:1,assert("number"==typeof u[An],"Layer opacity must be a number"),u[In]=void 0===c.visible||c.visible,u[kn]=c.zIndex,u[On]=void 0!==c.maxResolution?c.maxResolution:1/0,u[Nn]=void 0!==c.minResolution?c.minResolution:0,u[Gn]=void 0!==c.minZoom?c.minZoom:-1/0,u[Dn]=void 0!==c.maxZoom?c.maxZoom:1/0,this.className_=void 0!==u.className?u.className:"ol-layer",delete u.className,this.setProperties(u),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(c){const u=this.state_||{layer:this,managed:void 0===c||c},d=this.getZIndex();return u.opacity=clamp(Math.round(100*this.getOpacity())/100,0,1),u.visible=this.getVisible(),u.extent=this.getExtent(),u.zIndex=void 0!==d||u.managed?d:1/0,u.maxResolution=this.getMaxResolution(),u.minResolution=Math.max(this.getMinResolution(),0),u.minZoom=this.getMinZoom(),u.maxZoom=this.getMaxZoom(),this.state_=u,u}getLayersArray(c){return abstract()}getLayerStatesArray(c){return abstract()}getExtent(){return this.get(Fn)}getMaxResolution(){return this.get(On)}getMinResolution(){return this.get(Nn)}getMinZoom(){return this.get(Gn)}getMaxZoom(){return this.get(Dn)}getOpacity(){return this.get(An)}getSourceState(){return abstract()}getVisible(){return this.get(In)}getZIndex(){return this.get(kn)}setBackground(c){this.background_=c,this.changed()}setExtent(c){this.set(Fn,c)}setMaxResolution(c){this.set(On,c)}setMinResolution(c){this.set(Nn,c)}setMaxZoom(c){this.set(Dn,c)}setMinZoom(c){this.set(Gn,c)}setOpacity(c){assert("number"==typeof c,"Layer opacity must be a number"),this.set(An,c)}setVisible(c){this.set(In,c)}setZIndex(c){this.set(kn,c)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var Bn=0,Un=1,$n={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const Wn=42,Xn=256;function createExtent(c,u,d){return function(p,g,f,_,y){if(!p)return;if(!g&&!u)return p;const x=u?0:f[0]*g,v=u?0:f[1]*g,C=y?y[0]:0,M=y?y[1]:0;let T=c[0]+x/2+C,L=c[2]-x/2+C,A=c[1]+v/2+M,I=c[3]-v/2+M;T>L&&(T=(L+T)/2,L=T),A>I&&(A=(I+A)/2,I=A);let k=clamp(p[0],T,L),O=clamp(p[1],A,I);if(_&&d&&g){const c=30*g;k+=-c*Math.log(1+Math.max(0,T-p[0])/c)+c*Math.log(1+Math.max(0,p[0]-L)/c),O+=-c*Math.log(1+Math.max(0,A-p[1])/c)+c*Math.log(1+Math.max(0,p[1]-I)/c)}return[k,O]}}function none$1(c){return c}function getViewportClampedResolution(c,u,d,p){const g=getWidth(u)/d[0],f=getHeight(u)/d[1];return p?Math.min(c,Math.max(g,f)):Math.min(c,Math.min(g,f))}function getSmoothClampedResolution(c,u,d){let p=Math.min(c,u);return p*=Math.log(1+50*Math.max(0,c/u-1))/50+1,d&&(p=Math.max(p,d),p/=Math.log(1+50*Math.max(0,d/c-1))/50+1),clamp(p,d/2,2*u)}function createMinMaxResolution(c,u,d,p,g){return d=void 0===d||d,function(f,_,y,x){if(void 0!==f){const _=p?getViewportClampedResolution(c,p,y,g):c;return d&&x?getSmoothClampedResolution(f,_,u):clamp(f,u,_)}}}function disable(c){if(void 0!==c)return 0}function none(c){if(void 0!==c)return c}function easeIn(c){return Math.pow(c,3)}function easeOut(c){return 1-easeIn(1-c)}function inAndOut(c){return 3*c*c-2*c*c*c}function linear(c){return c}function animationCallback(c,u){setTimeout((function(){c(u)}),0)}function isNoopAnimation(c){return!(c.sourceCenter&&c.targetCenter&&!equals(c.sourceCenter,c.targetCenter))&&(c.sourceResolution===c.targetResolution&&c.sourceRotation===c.targetRotation)}function calculateCenterOn(c,u,d,p,g){const f=Math.cos(-g);let _=Math.sin(-g),y=c[0]*f-c[1]*_,x=c[1]*f+c[0]*_;y+=(u[0]/2-d[0])*p,x+=(d[1]-u[1]/2)*p,_=-_;return[y*f-x*_,x*f+y*_]}var Vn=class View extends Ri{constructor(c){super(),this.on,this.once,this.un,c=Object.assign({},c),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=createProjection(c.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,c.projection&&disableCoordinateWarning(),c.center&&(c.center=fromUserCoordinate(c.center,this.projection_)),c.extent&&(c.extent=fromUserExtent(c.extent,this.projection_)),this.applyOptions_(c)}applyOptions_(c){const u=Object.assign({},c);for(const c in $n)delete u[c];this.setProperties(u,!0);const d=function createResolutionConstraint(c){let u,d,p;const g=28,f=2;let _=void 0!==c.minZoom?c.minZoom:0,y=void 0!==c.maxZoom?c.maxZoom:g;const x=void 0!==c.zoomFactor?c.zoomFactor:f,v=void 0!==c.multiWorld&&c.multiWorld,C=void 0===c.smoothResolutionConstraint||c.smoothResolutionConstraint,M=void 0!==c.showFullExtent&&c.showFullExtent,T=createProjection(c.projection,"EPSG:3857"),L=T.getExtent();let A=c.constrainOnlyCenter,I=c.extent;v||I||!T.isGlobal()||(A=!1,I=L);if(void 0!==c.resolutions){const g=c.resolutions;d=g[_],p=void 0!==g[y]?g[y]:g[g.length-1],u=c.constrainResolution?function createSnapToResolutions(c,u,d,p){return u=void 0===u||u,function(g,f,_,y){if(void 0!==g){const x=c[0],v=c[c.length-1],C=d?getViewportClampedResolution(x,d,_,p):x;if(y)return u?getSmoothClampedResolution(g,C,v):clamp(g,v,C);const M=Math.min(C,g),T=Math.floor(linearFindNearest(c,M,f));return c[T]>C&&T<c.length-1?c[T+1]:c[T]}}}(g,C,!A&&I,M):createMinMaxResolution(d,p,C,!A&&I,M)}else{const v=(L?Math.max(getWidth(L),getHeight(L)):360*Gi.degrees/T.getMetersPerUnit())/Xn/Math.pow(f,0),k=v/Math.pow(f,g-0);d=c.maxResolution,void 0!==d?_=0:d=v/Math.pow(x,_),p=c.minResolution,void 0===p&&(p=void 0!==c.maxZoom?void 0!==c.maxResolution?d/Math.pow(x,y):v/Math.pow(x,y):k),y=_+Math.floor(Math.log(d/p)/Math.log(x)),p=d/Math.pow(x,y-_),u=c.constrainResolution?function createSnapToPower(c,u,d,p,g,f){return p=void 0===p||p,d=void 0!==d?d:0,function(_,y,x,v){if(void 0!==_){const C=g?getViewportClampedResolution(u,g,x,f):u;if(v)return p?getSmoothClampedResolution(_,C,d):clamp(_,d,C);const M=1e-9,T=Math.ceil(Math.log(u/C)/Math.log(c)-M),L=-y*(.5-M)+.5,A=Math.min(C,_),I=Math.floor(Math.log(u/A)/Math.log(c)+L),k=Math.max(T,I);return clamp(u/Math.pow(c,k),d,C)}}}(x,d,p,C,!A&&I,M):createMinMaxResolution(d,p,C,!A&&I,M)}return{constraint:u,maxResolution:d,minResolution:p,minZoom:_,zoomFactor:x}}(c);this.maxResolution_=d.maxResolution,this.minResolution_=d.minResolution,this.zoomFactor_=d.zoomFactor,this.resolutions_=c.resolutions,this.padding_=c.padding,this.minZoom_=d.minZoom;const p=function createCenterConstraint(c){if(void 0!==c.extent){const u=void 0===c.smoothExtentConstraint||c.smoothExtentConstraint;return createExtent(c.extent,c.constrainOnlyCenter,u)}const u=createProjection(c.projection,"EPSG:3857");if(!0!==c.multiWorld&&u.isGlobal()){const c=u.getExtent().slice();return c[0]=-1/0,c[2]=1/0,createExtent(c,!1,!1)}return none$1}(c),g=d.constraint,f=function createRotationConstraint(c){const u=void 0===c.enableRotation||c.enableRotation;if(u){const u=c.constrainRotation;return void 0===u||!0===u?function createSnapToZero(c){const u=toRadians(5);return function(c,d){return d||void 0===c?c:Math.abs(c)<=u?0:c}}():!1===u?none:"number"==typeof u?function createSnapToN(c){const u=2*Math.PI/c;return function(c,d){return d?c:void 0!==c?c=Math.floor(c/u+.5)*u:void 0}}(u):none}return disable}(c);this.constraints_={center:p,resolution:g,rotation:f},this.setRotation(void 0!==c.rotation?c.rotation:0),this.setCenterInternal(void 0!==c.center?c.center:null),void 0!==c.resolution?this.setResolution(c.resolution):void 0!==c.zoom&&this.setZoom(c.zoom)}get padding(){return this.padding_}set padding(c){let u=this.padding_;this.padding_=c;const d=this.getCenterInternal();if(d){const p=c||[0,0,0,0];u=u||[0,0,0,0];const g=this.getResolution(),f=g/2*(p[3]-u[3]+u[1]-p[1]),_=g/2*(p[0]-u[0]+u[2]-p[2]);this.setCenterInternal([d[0]+f,d[1]-_])}}getUpdatedOptions_(c){const u=this.getProperties();return void 0!==u.resolution?u.resolution=this.getResolution():u.zoom=this.getZoom(),u.center=this.getCenterInternal(),u.rotation=this.getRotation(),Object.assign({},u,c)}animate(c){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const u=new Array(arguments.length);for(let c=0;c<u.length;++c){let d=arguments[c];d.center&&(d=Object.assign({},d),d.center=fromUserCoordinate(d.center,this.getProjection())),d.anchor&&(d=Object.assign({},d),d.anchor=fromUserCoordinate(d.anchor,this.getProjection())),u[c]=d}this.animateInternal.apply(this,u)}animateInternal(c){let u,d=arguments.length;d>1&&"function"==typeof arguments[d-1]&&(u=arguments[d-1],--d);let p=0;for(;p<d&&!this.isDef();++p){const c=arguments[p];c.center&&this.setCenterInternal(c.center),void 0!==c.zoom?this.setZoom(c.zoom):c.resolution&&this.setResolution(c.resolution),void 0!==c.rotation&&this.setRotation(c.rotation)}if(p===d)return void(u&&animationCallback(u,!0));let g=Date.now(),f=this.targetCenter_.slice(),_=this.targetResolution_,y=this.targetRotation_;const x=[];for(;p<d;++p){const c=arguments[p],d={start:g,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||inAndOut,callback:u};if(c.center&&(d.sourceCenter=f,d.targetCenter=c.center.slice(),f=d.targetCenter),void 0!==c.zoom?(d.sourceResolution=_,d.targetResolution=this.getResolutionForZoom(c.zoom),_=d.targetResolution):c.resolution&&(d.sourceResolution=_,d.targetResolution=c.resolution,_=d.targetResolution),void 0!==c.rotation){d.sourceRotation=y;const u=modulo(c.rotation-y+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=y+u,y=d.targetRotation}isNoopAnimation(d)?d.complete=!0:g+=d.duration,x.push(d)}this.animations_.push(x),this.setHint(Bn,1),this.updateAnimations_()}getAnimating(){return this.hints_[Bn]>0}getInteracting(){return this.hints_[Un]>0}cancelAnimations(){let c;this.setHint(Bn,-this.hints_[Bn]);for(let u=0,d=this.animations_.length;u<d;++u){const d=this.animations_[u];if(d[0].callback&&animationCallback(d[0].callback,!1),!c)for(let u=0,p=d.length;u<p;++u){const p=d[u];if(!p.complete){c=p.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=c,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const c=Date.now();let u=!1;for(let d=this.animations_.length-1;d>=0;--d){const p=this.animations_[d];let g=!0;for(let d=0,f=p.length;d<f;++d){const f=p[d];if(f.complete)continue;const _=c-f.start;let y=f.duration>0?_/f.duration:1;y>=1?(f.complete=!0,y=1):g=!1;const x=f.easing(y);if(f.sourceCenter){const c=f.sourceCenter[0],u=f.sourceCenter[1],d=f.targetCenter[0],p=f.targetCenter[1];this.nextCenter_=f.targetCenter;const g=c+x*(d-c),_=u+x*(p-u);this.targetCenter_=[g,_]}if(f.sourceResolution&&f.targetResolution){const c=1===x?f.targetResolution:f.sourceResolution+x*(f.targetResolution-f.sourceResolution);if(f.anchor){const u=this.getViewportSize_(this.getRotation()),d=this.constraints_.resolution(c,0,u,!0);this.targetCenter_=this.calculateCenterZoom(d,f.anchor)}this.nextResolution_=f.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(void 0!==f.sourceRotation&&void 0!==f.targetRotation){const c=1===x?modulo(f.targetRotation+Math.PI,2*Math.PI)-Math.PI:f.sourceRotation+x*(f.targetRotation-f.sourceRotation);if(f.anchor){const u=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(u,f.anchor)}this.nextRotation_=f.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),u=!0,!f.complete)break}if(g){this.animations_[d]=null,this.setHint(Bn,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const c=p[0].callback;c&&animationCallback(c,!0)}}this.animations_=this.animations_.filter(Boolean),u&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(c,u){let d;const p=this.getCenterInternal();return void 0!==p&&(d=[p[0]-u[0],p[1]-u[1]],rotate$1(d,c-this.getRotation()),add$1(d,u)),d}calculateCenterZoom(c,u){let d;const p=this.getCenterInternal(),g=this.getResolution();if(void 0!==p&&void 0!==g){d=[u[0]-c*(u[0]-p[0])/g,u[1]-c*(u[1]-p[1])/g]}return d}getViewportSize_(c){const u=this.viewportSize_;if(c){const d=u[0],p=u[1];return[Math.abs(d*Math.cos(c))+Math.abs(p*Math.sin(c)),Math.abs(d*Math.sin(c))+Math.abs(p*Math.cos(c))]}return u}setViewportSize(c){this.viewportSize_=Array.isArray(c)?c.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const c=this.getCenterInternal();return c?toUserCoordinate(c,this.getProjection()):c}getCenterInternal(){return this.get($n.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(c){return void 0!==c?(c[0]=this.hints_[0],c[1]=this.hints_[1],c):this.hints_.slice()}calculateExtent(c){return toUserExtent(this.calculateExtentInternal(c),this.getProjection())}calculateExtentInternal(c){c=c||this.getViewportSizeMinusPadding_();const u=this.getCenterInternal();assert(u,"The view center is not defined");const d=this.getResolution();assert(void 0!==d,"The view resolution is not defined");const p=this.getRotation();return assert(void 0!==p,"The view rotation is not defined"),getForViewAndSize(u,d,p,c)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(c){this.applyOptions_(this.getUpdatedOptions_({maxZoom:c}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(c){this.applyOptions_(this.getUpdatedOptions_({minZoom:c}))}setConstrainResolution(c){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:c}))}getProjection(){return this.projection_}getResolution(){return this.get($n.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(c,u){return this.getResolutionForExtentInternal(fromUserExtent(c,this.getProjection()),u)}getResolutionForExtentInternal(c,u){u=u||this.getViewportSizeMinusPadding_();const d=getWidth(c)/u[0],p=getHeight(c)/u[1];return Math.max(d,p)}getResolutionForValueFunction(c){c=c||2;const u=this.getConstrainedResolution(this.maxResolution_),d=this.minResolution_,p=Math.log(u/d)/Math.log(c);return function(d){return u/Math.pow(c,d*p)}}getRotation(){return this.get($n.ROTATION)}getValueForResolutionFunction(c){const u=Math.log(c||2),d=this.getConstrainedResolution(this.maxResolution_),p=this.minResolution_,g=Math.log(d/p)/u;return function(c){return Math.log(d/c)/u/g}}getViewportSizeMinusPadding_(c){let u=this.getViewportSize_(c);const d=this.padding_;return d&&(u=[u[0]-d[1]-d[3],u[1]-d[0]-d[2]]),u}getState(){const c=this.getProjection(),u=this.getResolution(),d=this.getRotation();let p=this.getCenterInternal();const g=this.padding_;if(g){const c=this.getViewportSizeMinusPadding_();p=calculateCenterOn(p,this.getViewportSize_(),[c[0]/2+g[3],c[1]/2+g[0]],u,d)}return{center:p.slice(0),projection:void 0!==c?c:null,resolution:u,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:d,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let c;const u=this.getResolution();return void 0!==u&&(c=this.getZoomForResolution(u)),c}getZoomForResolution(c){let u,d,p=this.minZoom_||0;if(this.resolutions_){const g=linearFindNearest(this.resolutions_,c,1);p=g,u=this.resolutions_[g],d=g==this.resolutions_.length-1?2:u/this.resolutions_[g+1]}else u=this.maxResolution_,d=this.zoomFactor_;return p+Math.log(u/c)/Math.log(d)}getResolutionForZoom(c){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const u=clamp(Math.floor(c),0,this.resolutions_.length-2),d=this.resolutions_[u]/this.resolutions_[u+1];return this.resolutions_[u]/Math.pow(d,clamp(c-u,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,c-this.minZoom_)}fit(c,u){let d;if(assert(Array.isArray(c)||"function"==typeof c.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(c)){assert(!isEmpty(c),"Cannot fit empty extent provided as `geometry`");d=fromExtent(fromUserExtent(c,this.getProjection()))}else if("Circle"===c.getType()){const u=fromUserExtent(c.getExtent(),this.getProjection());d=fromExtent(u),d.rotate(this.getRotation(),getCenter(u))}else{const u=getUserProjection();d=u?c.clone().transform(u,this.getProjection()):c}this.fitInternal(d,u)}rotatedExtentForGeometry(c){const u=this.getRotation(),d=Math.cos(u),p=Math.sin(-u),g=c.getFlatCoordinates(),f=c.getStride();let _=1/0,y=1/0,x=-1/0,v=-1/0;for(let c=0,u=g.length;c<u;c+=f){const u=g[c]*d-g[c+1]*p,f=g[c]*p+g[c+1]*d;_=Math.min(_,u),y=Math.min(y,f),x=Math.max(x,u),v=Math.max(v,f)}return[_,y,x,v]}fitInternal(c,u){let d=(u=u||{}).size;d||(d=this.getViewportSizeMinusPadding_());const p=void 0!==u.padding?u.padding:[0,0,0,0],g=void 0!==u.nearest&&u.nearest;let f;f=void 0!==u.minResolution?u.minResolution:void 0!==u.maxZoom?this.getResolutionForZoom(u.maxZoom):0;const _=this.rotatedExtentForGeometry(c);let y=this.getResolutionForExtentInternal(_,[d[0]-p[1]-p[3],d[1]-p[0]-p[2]]);y=isNaN(y)?f:Math.max(y,f),y=this.getConstrainedResolution(y,g?0:1);const x=this.getRotation(),v=Math.sin(x),C=Math.cos(x),M=getCenter(_);M[0]+=(p[1]-p[3])/2*y,M[1]+=(p[0]-p[2])/2*y;const T=M[0]*C-M[1]*v,L=M[1]*C+M[0]*v,A=this.getConstrainedCenter([T,L],y),I=u.callback?u.callback:VOID;void 0!==u.duration?this.animateInternal({resolution:y,center:A,duration:u.duration,easing:u.easing},I):(this.targetResolution_=y,this.targetCenter_=A,this.applyTargetState_(!1,!0),animationCallback(I,!0))}centerOn(c,u,d){this.centerOnInternal(fromUserCoordinate(c,this.getProjection()),u,d)}centerOnInternal(c,u,d){this.setCenterInternal(calculateCenterOn(c,u,d,this.getResolution(),this.getRotation()))}calculateCenterShift(c,u,d,p){let g;const f=this.padding_;if(f&&c){const _=this.getViewportSizeMinusPadding_(-d),y=calculateCenterOn(c,p,[_[0]/2+f[3],_[1]/2+f[0]],u,d);g=[c[0]-y[0],c[1]-y[1]]}return g}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(c){const u=toUserCoordinate(this.targetCenter_,this.getProjection());this.setCenter([u[0]+c[0],u[1]+c[1]])}adjustCenterInternal(c){const u=this.targetCenter_;this.setCenterInternal([u[0]+c[0],u[1]+c[1]])}adjustResolution(c,u){u=u&&fromUserCoordinate(u,this.getProjection()),this.adjustResolutionInternal(c,u)}adjustResolutionInternal(c,u){const d=this.getAnimating()||this.getInteracting(),p=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(this.targetResolution_*c,0,p,d);u&&(this.targetCenter_=this.calculateCenterZoom(g,u)),this.targetResolution_*=c,this.applyTargetState_()}adjustZoom(c,u){this.adjustResolution(Math.pow(this.zoomFactor_,-c),u)}adjustRotation(c,u){u&&(u=fromUserCoordinate(u,this.getProjection())),this.adjustRotationInternal(c,u)}adjustRotationInternal(c,u){const d=this.getAnimating()||this.getInteracting(),p=this.constraints_.rotation(this.targetRotation_+c,d);u&&(this.targetCenter_=this.calculateCenterRotate(p,u)),this.targetRotation_+=c,this.applyTargetState_()}setCenter(c){this.setCenterInternal(c?fromUserCoordinate(c,this.getProjection()):c)}setCenterInternal(c){this.targetCenter_=c,this.applyTargetState_()}setHint(c,u){return this.hints_[c]+=u,this.changed(),this.hints_[c]}setResolution(c){this.targetResolution_=c,this.applyTargetState_()}setRotation(c){this.targetRotation_=c,this.applyTargetState_()}setZoom(c){this.setResolution(this.getResolutionForZoom(c))}applyTargetState_(c,u){const d=this.getAnimating()||this.getInteracting()||u,p=this.constraints_.rotation(this.targetRotation_,d),g=this.getViewportSize_(p),f=this.constraints_.resolution(this.targetResolution_,0,g,d),_=this.constraints_.center(this.targetCenter_,f,g,d,this.calculateCenterShift(this.targetCenter_,f,p,g));this.get($n.ROTATION)!==p&&this.set($n.ROTATION,p),this.get($n.RESOLUTION)!==f&&(this.set($n.RESOLUTION,f),this.set("zoom",this.getZoom(),!0)),_&&this.get($n.CENTER)&&equals(this.get($n.CENTER),_)||this.set($n.CENTER,_),this.getAnimating()&&!c&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(c,u,d){c=void 0!==c?c:200;const p=u||0,g=this.constraints_.rotation(this.targetRotation_),f=this.getViewportSize_(g),_=this.constraints_.resolution(this.targetResolution_,p,f),y=this.constraints_.center(this.targetCenter_,_,f,!1,this.calculateCenterShift(this.targetCenter_,_,g,f));if(0===c&&!this.cancelAnchor_)return this.targetResolution_=_,this.targetRotation_=g,this.targetCenter_=y,void this.applyTargetState_();d=d||(0===c?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===_&&this.getRotation()===g&&this.getCenterInternal()&&equals(this.getCenterInternal(),y)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:g,center:y,resolution:_,duration:c,easing:easeOut,anchor:d}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Un,1)}endInteraction(c,u,d){d=d&&fromUserCoordinate(d,this.getProjection()),this.endInteractionInternal(c,u,d)}endInteractionInternal(c,u,d){this.getInteracting()&&(this.setHint(Un,-1),this.resolveConstraints(c,u,d))}getConstrainedCenter(c,u){const d=this.getViewportSize_(this.getRotation());return this.constraints_.center(c,u||this.getResolution(),d)}getConstrainedZoom(c,u){const d=this.getResolutionForZoom(c);return this.getZoomForResolution(this.getConstrainedResolution(d,u))}getConstrainedResolution(c,u){u=u||0;const d=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(c,u,d)}};function inView(c,u){if(!c.visible)return!1;const d=u.resolution;if(d<c.minResolution||d>=c.maxResolution)return!1;const p=u.zoom;return p>c.minZoom&&p<=c.maxZoom}var qn=class Layer extends BaseLayer{constructor(c){const u=Object.assign({},c);delete u.source,super(u),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,c.render&&(this.render=c.render),c.map&&this.setMap(c.map),this.addChangeListener(jn,this.handleSourcePropertyChange_);const d=c.source?c.source:null;this.setSource(d)}getLayersArray(c){return(c=c||[]).push(this),c}getLayerStatesArray(c){return(c=c||[]).push(this.getLayerState()),c}getSource(){return this.get(jn)||null}getRenderSource(){return this.getSource()}getSourceState(){const c=this.getSource();return c?c.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(unlistenByKey(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const c=this.getSource();c&&(this.sourceChangeKey_=listen(c,_i,this.handleSourceChange_,this),"ready"===c.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(c){return this.renderer_?this.renderer_.getFeatures(c):Promise.resolve([])}getData(c){return this.renderer_&&this.rendered?this.renderer_.getData(c):null}isVisible(c){let u;const d=this.getMapInternal();let p;!c&&d&&(c=d.getView()),u=c instanceof Vn?{viewState:c.getState(),extent:c.calculateExtent()}:c,!u.layerStatesArray&&d&&(u.layerStatesArray=d.getLayerGroup().getLayerStatesArray()),p=u.layerStatesArray?u.layerStatesArray.find((c=>c.layer===this)):this.getLayerState();const g=this.getExtent();return inView(p,u.viewState)&&(!g||intersects$1(g,u.extent))}getAttributions(c){if(!this.isVisible(c))return[];const u=this.getSource()?.getAttributions();if(!u)return[];let d=u(c instanceof Vn?c.getViewStateAndExtent():c);return Array.isArray(d)||(d=[d]),d}render(c,u){const d=this.getRenderer();return d.prepareFrame(c)?(this.rendered=!0,d.renderFrame(c,u)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(c,u){}renderDeferred(c){const u=this.getRenderer();u&&u.renderDeferred(c)}setMapInternal(c){c||this.unrender(),this.set(zn,c)}getMapInternal(){return this.get(zn)}setMap(c){this.mapPrecomposeKey_&&(unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),c||this.changed(),this.mapRenderKey_&&(unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),c&&(this.mapPrecomposeKey_=listen(c,Cr,(c=>{const u=c.frameState.layerStatesArray,d=this.getLayerState(!1);assert(!u.some((function(c){return c.layer===d.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),u.push(d)})),this.mapRenderKey_=listen(this,_i,c.render,c),this.changed())}setSource(c){this.set(jn,c)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function quickselect(c,u,d=0,p=c.length-1,g=defaultCompare){for(;p>d;){if(p-d>600){const f=p-d+1,_=u-d+1,y=Math.log(f),x=.5*Math.exp(2*y/3),v=.5*Math.sqrt(y*x*(f-x)/f)*(_-f/2<0?-1:1);quickselect(c,u,Math.max(d,Math.floor(u-_*x/f+v)),Math.min(p,Math.floor(u+(f-_)*x/f+v)),g)}const f=c[u];let _=d,y=p;for(swap(c,d,u),g(c[p],f)>0&&swap(c,d,p);_<y;){for(swap(c,_,y),_++,y--;g(c[_],f)<0;)_++;for(;g(c[y],f)>0;)y--}0===g(c[d],f)?swap(c,d,y):(y++,swap(c,y,p)),y<=u&&(d=y+1),u<=y&&(p=y-1)}}function swap(c,u,d){const p=c[u];c[u]=c[d],c[d]=p}function defaultCompare(c,u){return c<u?-1:c>u?1:0}let Yn=class RBush{constructor(c=9){this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(c){let u=this.data;const d=[];if(!intersects(c,u))return d;const p=this.toBBox,g=[];for(;u;){for(let f=0;f<u.children.length;f++){const _=u.children[f],y=u.leaf?p(_):_;intersects(c,y)&&(u.leaf?d.push(_):contains(c,y)?this._all(_,d):g.push(_))}u=g.pop()}return d}collides(c){let u=this.data;if(!intersects(c,u))return!1;const d=[];for(;u;){for(let p=0;p<u.children.length;p++){const g=u.children[p],f=u.leaf?this.toBBox(g):g;if(intersects(c,f)){if(u.leaf||contains(c,f))return!0;d.push(g)}}u=d.pop()}return!1}load(c){if(!c||!c.length)return this;if(c.length<this._minEntries){for(let u=0;u<c.length;u++)this.insert(c[u]);return this}let u=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===u.height)this._splitRoot(this.data,u);else{if(this.data.height<u.height){const c=this.data;this.data=u,u=c}this._insert(u,this.data.height-u.height-1,!0)}else this.data=u;return this}insert(c){return c&&this._insert(c,this.data.height-1),this}clear(){return this.data=createNode([]),this}remove(c,u){if(!c)return this;let d=this.data;const p=this.toBBox(c),g=[],f=[];let _,y,x;for(;d||g.length;){if(d||(d=g.pop(),y=g[g.length-1],_=f.pop(),x=!0),d.leaf){const p=findItem(c,d.children,u);if(-1!==p)return d.children.splice(p,1),g.push(d),this._condense(g),this}x||d.leaf||!contains(d,p)?y?(_++,d=y.children[_],x=!1):d=null:(g.push(d),f.push(_),_=0,y=d,d=d.children[0])}return this}toBBox(c){return c}compareMinX(c,u){return c.minX-u.minX}compareMinY(c,u){return c.minY-u.minY}toJSON(){return this.data}fromJSON(c){return this.data=c,this}_all(c,u){const d=[];for(;c;)c.leaf?u.push(...c.children):d.push(...c.children),c=d.pop();return u}_build(c,u,d,p){const g=d-u+1;let f,_=this._maxEntries;if(g<=_)return f=createNode(c.slice(u,d+1)),calcBBox(f,this.toBBox),f;p||(p=Math.ceil(Math.log(g)/Math.log(_)),_=Math.ceil(g/Math.pow(_,p-1))),f=createNode([]),f.leaf=!1,f.height=p;const y=Math.ceil(g/_),x=y*Math.ceil(Math.sqrt(_));multiSelect(c,u,d,x,this.compareMinX);for(let g=u;g<=d;g+=x){const u=Math.min(g+x-1,d);multiSelect(c,g,u,y,this.compareMinY);for(let d=g;d<=u;d+=y){const g=Math.min(d+y-1,u);f.children.push(this._build(c,d,g,p-1))}}return calcBBox(f,this.toBBox),f}_chooseSubtree(c,u,d,p){for(;p.push(u),!u.leaf&&p.length-1!==d;){let d,p=1/0,g=1/0;for(let f=0;f<u.children.length;f++){const _=u.children[f],y=bboxArea(_),x=enlargedArea(c,_)-y;x<g?(g=x,p=y<p?y:p,d=_):x===g&&y<p&&(p=y,d=_)}u=d||u.children[0]}return u}_insert(c,u,d){const p=d?c:this.toBBox(c),g=[],f=this._chooseSubtree(p,this.data,u,g);for(f.children.push(c),extend$1(f,p);u>=0&&g[u].children.length>this._maxEntries;)this._split(g,u),u--;this._adjustParentBBoxes(p,g,u)}_split(c,u){const d=c[u],p=d.children.length,g=this._minEntries;this._chooseSplitAxis(d,g,p);const f=this._chooseSplitIndex(d,g,p),_=createNode(d.children.splice(f,d.children.length-f));_.height=d.height,_.leaf=d.leaf,calcBBox(d,this.toBBox),calcBBox(_,this.toBBox),u?c[u-1].children.push(_):this._splitRoot(d,_)}_splitRoot(c,u){this.data=createNode([c,u]),this.data.height=c.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(c,u,d){let p,g=1/0,f=1/0;for(let _=u;_<=d-u;_++){const u=distBBox(c,0,_,this.toBBox),y=distBBox(c,_,d,this.toBBox),x=intersectionArea(u,y),v=bboxArea(u)+bboxArea(y);x<g?(g=x,p=_,f=v<f?v:f):x===g&&v<f&&(f=v,p=_)}return p||d-u}_chooseSplitAxis(c,u,d){const p=c.leaf?this.compareMinX:compareNodeMinX,g=c.leaf?this.compareMinY:compareNodeMinY;this._allDistMargin(c,u,d,p)<this._allDistMargin(c,u,d,g)&&c.children.sort(p)}_allDistMargin(c,u,d,p){c.children.sort(p);const g=this.toBBox,f=distBBox(c,0,u,g),_=distBBox(c,d-u,d,g);let y=bboxMargin(f)+bboxMargin(_);for(let p=u;p<d-u;p++){const u=c.children[p];extend$1(f,c.leaf?g(u):u),y+=bboxMargin(f)}for(let p=d-u-1;p>=u;p--){const u=c.children[p];extend$1(_,c.leaf?g(u):u),y+=bboxMargin(_)}return y}_adjustParentBBoxes(c,u,d){for(let p=d;p>=0;p--)extend$1(u[p],c)}_condense(c){for(let u,d=c.length-1;d>=0;d--)0===c[d].children.length?d>0?(u=c[d-1].children,u.splice(u.indexOf(c[d]),1)):this.clear():calcBBox(c[d],this.toBBox)}};function findItem(c,u,d){if(!d)return u.indexOf(c);for(let p=0;p<u.length;p++)if(d(c,u[p]))return p;return-1}function calcBBox(c,u){distBBox(c,0,c.children.length,u,c)}function distBBox(c,u,d,p,g){g||(g=createNode(null)),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let f=u;f<d;f++){const u=c.children[f];extend$1(g,c.leaf?p(u):u)}return g}function extend$1(c,u){return c.minX=Math.min(c.minX,u.minX),c.minY=Math.min(c.minY,u.minY),c.maxX=Math.max(c.maxX,u.maxX),c.maxY=Math.max(c.maxY,u.maxY),c}function compareNodeMinX(c,u){return c.minX-u.minX}function compareNodeMinY(c,u){return c.minY-u.minY}function bboxArea(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function bboxMargin(c){return c.maxX-c.minX+(c.maxY-c.minY)}function enlargedArea(c,u){return(Math.max(u.maxX,c.maxX)-Math.min(u.minX,c.minX))*(Math.max(u.maxY,c.maxY)-Math.min(u.minY,c.minY))}function intersectionArea(c,u){const d=Math.max(c.minX,u.minX),p=Math.max(c.minY,u.minY),g=Math.min(c.maxX,u.maxX),f=Math.min(c.maxY,u.maxY);return Math.max(0,g-d)*Math.max(0,f-p)}function contains(c,u){return c.minX<=u.minX&&c.minY<=u.minY&&u.maxX<=c.maxX&&u.maxY<=c.maxY}function intersects(c,u){return u.minX<=c.maxX&&u.minY<=c.maxY&&u.maxX>=c.minX&&u.maxY>=c.minY}function createNode(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(c,u,d,p,g){const f=[u,d];for(;f.length;){if((d=f.pop())-(u=f.pop())<=p)continue;const _=u+Math.ceil((d-u)/p/2)*p;quickselect(c,_,u,d,g),f.push(u,_,_,d)}}function calculateScale(c,u,d,p){return void 0!==d&&void 0!==p?[d/c,p/u]:void 0!==d?d/c:void 0!==p?p/u:1}class Icon extends rn{constructor(c){const u=void 0!==(c=c||{}).opacity?c.opacity:1,d=void 0!==c.rotation?c.rotation:0,p=void 0!==c.scale?c.scale:1,g=void 0!==c.rotateWithView&&c.rotateWithView;super({opacity:u,rotation:d,scale:p,displacement:void 0!==c.displacement?c.displacement:[0,0],rotateWithView:g,declutterMode:c.declutterMode}),this.anchor_=void 0!==c.anchor?c.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==c.anchorOrigin?c.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==c.anchorXUnits?c.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==c.anchorYUnits?c.anchorYUnits:"fraction",this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null;const f=void 0!==c.img?c.img:null;let _,y=c.src;if(assert(!(void 0!==y&&f),"`image` and `src` cannot be provided at the same time"),void 0!==y&&0!==y.length||!f||(y=f.src||getUid(f)),assert(void 0!==y&&y.length>0,"A defined and non-empty `src` or `image` must be provided"),assert(!((void 0!==c.width||void 0!==c.height)&&void 0!==c.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==c.src?_=br.IDLE:void 0!==f&&(_="complete"in f?f.complete?f.src?br.LOADED:br.IDLE:br.LOADING:br.LOADED),this.color_=void 0!==c.color?asArray(c.color):null,this.iconImage_=get$1(f,y,this.crossOrigin_,_,this.color_),this.offset_=void 0!==c.offset?c.offset:[0,0],this.offsetOrigin_=void 0!==c.offsetOrigin?c.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==c.size?c.size:null,this.initialOptions_,void 0!==c.width||void 0!==c.height){let u,d;if(c.size)[u,d]=c.size;else{const p=this.getImage(1);if(p.width&&p.height)u=p.width,d=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=c;const onload=()=>{if(this.unlistenImageChange(onload),!this.initialOptions_)return;const u=this.iconImage_.getSize();this.setScale(calculateScale(u[0],u[1],c.width,c.height))};return void this.listenImageChange(onload)}}void 0!==u&&this.setScale(calculateScale(u,d,c.width,c.height))}}clone(){let c,u,d;return this.initialOptions_?(u=this.initialOptions_.width,d=this.initialOptions_.height):(c=this.getScale(),c=Array.isArray(c)?c.slice():c),new Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:c,width:u,height:d,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let c=this.normalizedAnchor_;if(!c){c=this.anchor_;const u=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!u)return null;c=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(c[0]*=u[0]),"fraction"==this.anchorYUnits_&&(c[1]*=u[1])}if("top-left"!=this.anchorOrigin_){if(!u)return null;c===this.anchor_&&(c=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(c[0]=-c[0]+u[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(c[1]=-c[1]+u[1])}this.normalizedAnchor_=c}const u=this.getDisplacement(),d=this.getScaleArray();return[c[0]-u[0]/d[0],c[1]+u[1]/d[1]]}setAnchor(c){this.anchor_=c,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(c){return this.iconImage_.getImage(c)}getPixelRatio(c){return this.iconImage_.getPixelRatio(c)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let c=this.offset_;if("top-left"!=this.offsetOrigin_){const u=this.getSize(),d=this.iconImage_.getSize();if(!u||!d)return null;c=c.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(c[0]=d[0]-u[0]-c[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(c[1]=d[1]-u[1]-c[1])}return this.origin_=c,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const c=this.getScaleArray();return this.size_?this.size_[0]*c[0]:this.iconImage_.getImageState()==br.LOADED?this.iconImage_.getSize()[0]*c[0]:void 0}getHeight(){const c=this.getScaleArray();return this.size_?this.size_[1]*c[1]:this.iconImage_.getImageState()==br.LOADED?this.iconImage_.getSize()[1]*c[1]:void 0}setScale(c){delete this.initialOptions_,super.setScale(c)}listenImageChange(c){this.iconImage_.addEventListener(_i,c)}load(){this.iconImage_.load()}unlistenImageChange(c){this.iconImage_.removeEventListener(_i,c)}ready(){return this.iconImage_.ready()}}var Zn=Icon;let Kn=0;const Hn=1<<Kn++,Jn=1<<Kn++,Qn=1<<Kn++,ts=1<<Kn++,es=1<<Kn++,is=1<<Kn++,rs=Math.pow(2,6)-1,ns={[Hn]:"boolean",[Jn]:"number",[Qn]:"string",[ts]:"color",[es]:"number[]",[is]:"size"},ss=Object.keys(ns).map(Number).sort(ascending);function typeName(c){const u=[];for(const d of ss)includesType(c,d)&&u.push(ns[d]);return 0===u.length?"untyped":u.length<3?u.join(" or "):u.slice(0,-1).join(", ")+", or "+u[u.length-1]}function includesType(c,u){return(c&u)===u}function isType(c,u){return c===u}class LiteralExpression{constructor(c,u){if(!function isSpecific(c){return c in ns}(c))throw new Error(`literal expressions must have a specific type, got ${typeName(c)}`);this.type=c,this.value=u}}class CallExpression{constructor(c,u,...d){this.type=c,this.operator=u,this.args=d}}function newParsingContext(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1}}function parse$2(c,u,d){switch(typeof c){case"boolean":if(isType(u,Qn))return new LiteralExpression(Qn,c?"true":"false");if(!includesType(u,Hn))throw new Error(`got a boolean, but expected ${typeName(u)}`);return new LiteralExpression(Hn,c);case"number":if(isType(u,is))return new LiteralExpression(is,toSize(c));if(isType(u,Hn))return new LiteralExpression(Hn,!!c);if(isType(u,Qn))return new LiteralExpression(Qn,c.toString());if(!includesType(u,Jn))throw new Error(`got a number, but expected ${typeName(u)}`);return new LiteralExpression(Jn,c);case"string":if(isType(u,ts))return new LiteralExpression(ts,fromString(c));if(isType(u,Hn))return new LiteralExpression(Hn,!!c);if(!includesType(u,Qn))throw new Error(`got a string, but expected ${typeName(u)}`);return new LiteralExpression(Qn,c)}if(!Array.isArray(c))throw new Error("expression must be an array or a primitive value");if(0===c.length)throw new Error("empty expression");if("string"==typeof c[0])return function parseCallExpression(c,u,d){const p=c[0],g=as[p];if(!g)throw new Error(`unknown operator: ${p}`);return g(c,u,d)}(c,u,d);for(const u of c)if("number"!=typeof u)throw new Error("expected an array of numbers");if(isType(u,is)){if(2!==c.length)throw new Error(`expected an array of two values for a size, got ${c.length}`);return new LiteralExpression(is,c)}if(isType(u,ts)){if(3===c.length)return new LiteralExpression(ts,[...c,1]);if(4===c.length)return new LiteralExpression(ts,c);throw new Error(`expected an array of 3 or 4 values for a color, got ${c.length}`)}if(!includesType(u,es))throw new Error(`got an array of numbers, but expected ${typeName(u)}`);return new LiteralExpression(es,c)}const os={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},as={[os.Get]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[os.Var]:createCallExpressionParser(hasArgsCount(1,1),(function withVarArgs(c,u,d){const p=c[1];if("string"!=typeof p)throw new Error("expected a string argument for var operation");return d.variables.add(p),[new LiteralExpression(Qn,p)]})),[os.Has]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[os.Id]:createCallExpressionParser((function usesFeatureId(c,u,d){d.featureId=!0}),withNoArgs),[os.Concat]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Qn)),[os.GeometryType]:createCallExpressionParser((function usesGeometryType(c,u,d){d.geometryType=!0}),withNoArgs),[os.LineMetric]:createCallExpressionParser(withNoArgs),[os.Resolution]:createCallExpressionParser(withNoArgs),[os.Zoom]:createCallExpressionParser(withNoArgs),[os.Time]:createCallExpressionParser(withNoArgs),[os.Any]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Hn)),[os.All]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Hn)),[os.Not]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Hn)),[os.Equal]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(rs)),[os.NotEqual]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(rs)),[os.GreaterThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.GreaterThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.LessThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.LessThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.Multiply]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[os.Coalesce]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[os.Divide]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.Add]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Jn)),[os.Subtract]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.Clamp]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(Jn)),[os.Mod]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.Pow]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Jn)),[os.Abs]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Floor]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Ceil]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Round]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Sin]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Cos]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Atan]:createCallExpressionParser(hasArgsCount(1,2),withArgsOfType(Jn)),[os.Sqrt]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Jn)),[os.Match]:createCallExpressionParser(hasArgsCount(4,1/0),hasEvenArgs,(function withMatchArgs(c,u,d){const p=c.length-1,g=Qn|Jn|Hn,f=parse$2(c[1],g,d),_=parse$2(c[c.length-1],u,d),y=new Array(p-2);for(let u=0;u<p-2;u+=2){try{const p=parse$2(c[u+2],f.type,d);y[u]=p}catch(c){throw new Error(`failed to parse argument ${u+1} of match expression: ${c.message}`)}try{const p=parse$2(c[u+3],_.type,d);y[u+1]=p}catch(c){throw new Error(`failed to parse argument ${u+2} of match expression: ${c.message}`)}}return[f,...y,_]})),[os.Between]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(Jn)),[os.Interpolate]:createCallExpressionParser(hasArgsCount(6,1/0),hasEvenArgs,(function withInterpolateArgs(c,u,d){const p=c[1];let g;switch(p[0]){case"linear":g=1;break;case"exponential":const c=p[1];if("number"!=typeof c||c<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(c)} instead`);g=c;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(p)}`)}const f=new LiteralExpression(Jn,g);let _;try{_=parse$2(c[2],Jn,d)}catch(c){throw new Error(`failed to parse argument 1 in interpolate expression: ${c.message}`)}const y=new Array(c.length-3);for(let p=0;p<y.length;p+=2){try{const u=parse$2(c[p+3],Jn,d);y[p]=u}catch(c){throw new Error(`failed to parse argument ${p+2} for interpolate expression: ${c.message}`)}try{const g=parse$2(c[p+4],u,d);y[p+1]=g}catch(c){throw new Error(`failed to parse argument ${p+3} for interpolate expression: ${c.message}`)}}return[f,_,...y]})),[os.Case]:createCallExpressionParser(hasArgsCount(3,1/0),(function hasOddArgs(c,u,d){const p=c[0],g=c.length-1;if(g%2==0)throw new Error(`expected an odd number of arguments for ${p}, got ${g} instead`)}),(function withCaseArgs(c,u,d){const p=parse$2(c[c.length-1],u,d),g=new Array(c.length-1);for(let u=0;u<g.length-1;u+=2){try{const p=parse$2(c[u+1],Hn,d);g[u]=p}catch(c){throw new Error(`failed to parse argument ${u} of case expression: ${c.message}`)}try{const f=parse$2(c[u+2],p.type,d);g[u+1]=f}catch(c){throw new Error(`failed to parse argument ${u+1} of case expression: ${c.message}`)}}return g[g.length-1]=p,g})),[os.In]:createCallExpressionParser(hasArgsCount(2,2),(function withInArgs(c,u,d){let p,g=c[2];if(!Array.isArray(g))throw new Error('the second argument for the "in" operator must be an array');if("string"==typeof g[0]){if("literal"!==g[0])throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(g[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');g=g[1],p=Qn}else p=Jn;const f=new Array(g.length);for(let c=0;c<f.length;c++)try{const u=parse$2(g[c],p,d);f[c]=u}catch(u){throw new Error(`failed to parse haystack item ${c} for "in" expression: ${u.message}`)}return[parse$2(c[1],p,d),...f]})),[os.Number]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(rs)),[os.String]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(rs)),[os.Array]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(Jn)),[os.Color]:createCallExpressionParser(hasArgsCount(1,4),withArgsOfType(Jn)),[os.Band]:createCallExpressionParser(hasArgsCount(1,3),withArgsOfType(Jn)),[os.Palette]:createCallExpressionParser(hasArgsCount(2,2),(function withPaletteArgs(c,u,d){let p;try{p=parse$2(c[1],Jn,d)}catch(c){throw new Error(`failed to parse first argument in palette expression: ${c.message}`)}const g=c[2];if(!Array.isArray(g))throw new Error("the second argument of palette must be an array");const f=new Array(g.length);for(let c=0;c<f.length;c++){let u;try{u=parse$2(g[c],ts,d)}catch(u){throw new Error(`failed to parse color at index ${c} in palette expression: ${u.message}`)}if(!(u instanceof LiteralExpression))throw new Error(`the palette color at index ${c} must be a literal value`);f[c]=u}return[p,...f]})),[os.ToString]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Hn|Jn|Qn|ts))};function withGetArgs(c,u,d){const p=c.length-1,g=new Array(p);for(let u=0;u<p;++u){const p=c[u+1];switch(typeof p){case"number":g[u]=new LiteralExpression(Jn,p);break;case"string":g[u]=new LiteralExpression(Qn,p);break;default:throw new Error(`expected a string key or numeric array index for a get operation, got ${p}`)}0===u&&d.properties.add(String(p))}return g}function withNoArgs(c,u,d){const p=c[0];if(1!==c.length)throw new Error(`expected no arguments for ${p} operation`);return[]}function hasArgsCount(c,u){return function(d,p,g){const f=d[0],_=d.length-1;if(c===u){if(_!==c){throw new Error(`expected ${c} argument${1===c?"":"s"} for ${f}, got ${_}`)}}else if(_<c||_>u){throw new Error(`expected ${u===1/0?`${c} or more`:`${c} to ${u}`} arguments for ${f}, got ${_}`)}}}function withArgsOfReturnType(c,u,d){const p=c.length-1,g=new Array(p);for(let f=0;f<p;++f){const p=parse$2(c[f+1],u,d);g[f]=p}return g}function withArgsOfType(c){return function(u,d,p){const g=u.length-1,f=new Array(g);for(let d=0;d<g;++d){const g=parse$2(u[d+1],c,p);f[d]=g}return f}}function hasEvenArgs(c,u,d){const p=c[0],g=c.length-1;if(g%2==1)throw new Error(`expected an even number of arguments for operation ${p}, got ${g} instead`)}function createCallExpressionParser(...c){return function(u,d,p){const g=u[0];let f;for(let g=0;g<c.length;g++){const _=c[g](u,d,p);if(g==c.length-1){if(!_)throw new Error("expected last argument validator to return the parsed args");f=_}}return new CallExpression(d,g,...f)}}function computeGeometryType(c){if(!c)return"";const u=c.getType();switch(u){case"Point":case"LineString":case"Polygon":return u;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return u.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return computeGeometryType(c.getGeometries()[0]);default:return""}}function buildExpression$1(c,u,d){return compileExpression(parse$2(c,u,d))}function compileExpression(c,u){if(c instanceof LiteralExpression){if(c.type===ts&&"string"==typeof c.value){const u=fromString(c.value);return function(){return u}}return function(){return c.value}}const d=c.operator;switch(d){case os.Number:case os.String:case os.Coalesce:return function compileAssertionExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case os.Coalesce:return c=>{for(let u=0;u<p;++u){const d=g[u](c);if(null!=d)return d}throw new Error("Expected one of the values to be non-null")};case os.Number:case os.String:return c=>{for(let u=0;u<p;++u){const p=g[u](c);if(typeof p===d)return p}throw new Error(`Expected one of the values to be a ${d}`)};default:throw new Error(`Unsupported assertion operator ${d}`)}}(c);case os.Get:case os.Var:case os.Has:return function compileAccessorExpression(c,u){const d=c.args[0],p=d.value;switch(c.operator){case os.Get:return u=>{const d=c.args;let g=u.properties[p];for(let c=1,u=d.length;c<u;++c){g=g[d[c].value]}return g};case os.Var:return c=>c.variables[p];case os.Has:return u=>{const d=c.args;if(!(p in u.properties))return!1;let g=u.properties[p];for(let c=1,u=d.length;c<u;++c){const u=d[c].value;if(!g||!Object.hasOwn(g,u))return!1;g=g[u]}return!0};default:throw new Error(`Unsupported accessor operator ${c.operator}`)}}(c);case os.Id:return c=>c.featureId;case os.GeometryType:return c=>c.geometryType;case os.Concat:{const u=c.args.map((c=>compileExpression(c)));return c=>"".concat(...u.map((u=>u(c).toString())))}case os.Resolution:return c=>c.resolution;case os.Any:case os.All:case os.Between:case os.In:case os.Not:return function compileLogicalExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case os.Any:return c=>{for(let u=0;u<p;++u)if(g[u](c))return!0;return!1};case os.All:return c=>{for(let u=0;u<p;++u)if(!g[u](c))return!1;return!0};case os.Between:return c=>{const u=g[0](c),d=g[1](c),p=g[2](c);return u>=d&&u<=p};case os.In:return c=>{const u=g[0](c);for(let d=1;d<p;++d)if(u===g[d](c))return!0;return!1};case os.Not:return c=>!g[0](c);default:throw new Error(`Unsupported logical operator ${d}`)}}(c);case os.Equal:case os.NotEqual:case os.LessThan:case os.LessThanOrEqualTo:case os.GreaterThan:case os.GreaterThanOrEqualTo:return function compileComparisonExpression(c,u){const d=c.operator,p=compileExpression(c.args[0]),g=compileExpression(c.args[1]);switch(d){case os.Equal:return c=>p(c)===g(c);case os.NotEqual:return c=>p(c)!==g(c);case os.LessThan:return c=>p(c)<g(c);case os.LessThanOrEqualTo:return c=>p(c)<=g(c);case os.GreaterThan:return c=>p(c)>g(c);case os.GreaterThanOrEqualTo:return c=>p(c)>=g(c);default:throw new Error(`Unsupported comparison operator ${d}`)}}(c);case os.Multiply:case os.Divide:case os.Add:case os.Subtract:case os.Clamp:case os.Mod:case os.Pow:case os.Abs:case os.Floor:case os.Ceil:case os.Round:case os.Sin:case os.Cos:case os.Atan:case os.Sqrt:return function compileNumericExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case os.Multiply:return c=>{let u=1;for(let d=0;d<p;++d)u*=g[d](c);return u};case os.Divide:return c=>g[0](c)/g[1](c);case os.Add:return c=>{let u=0;for(let d=0;d<p;++d)u+=g[d](c);return u};case os.Subtract:return c=>g[0](c)-g[1](c);case os.Clamp:return c=>{const u=g[0](c),d=g[1](c);if(u<d)return d;const p=g[2](c);return u>p?p:u};case os.Mod:return c=>g[0](c)%g[1](c);case os.Pow:return c=>Math.pow(g[0](c),g[1](c));case os.Abs:return c=>Math.abs(g[0](c));case os.Floor:return c=>Math.floor(g[0](c));case os.Ceil:return c=>Math.ceil(g[0](c));case os.Round:return c=>Math.round(g[0](c));case os.Sin:return c=>Math.sin(g[0](c));case os.Cos:return c=>Math.cos(g[0](c));case os.Atan:return 2===p?c=>Math.atan2(g[0](c),g[1](c)):c=>Math.atan(g[0](c));case os.Sqrt:return c=>Math.sqrt(g[0](c));default:throw new Error(`Unsupported numeric operator ${d}`)}}(c);case os.Case:return function compileCaseExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{for(let u=0;u<d-1;u+=2){if(p[u](c))return p[u+1](c)}return p[d-1](c)}}(c);case os.Match:return function compileMatchExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{const u=p[0](c);for(let g=1;g<d;g+=2)if(u===p[g](c))return p[g+1](c);return p[d-1](c)}}(c);case os.Interpolate:return function compileInterpolateExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{const u=p[0](c),g=p[1](c);let f,_;for(let y=2;y<d;y+=2){const d=p[y](c);let x=p[y+1](c);const v=Array.isArray(x);if(v&&(x=withAlpha(x)),d>=g)return 2===y?x:v?interpolateColor(u,g,f,_,d,x):interpolateNumber(u,g,f,_,d,x);f=d,_=x}return _}}(c);case os.ToString:return function compileConvertExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);if(d===os.ToString)return u=>{const d=g[0](u);return c.args[0].type===ts?toString(d):d.toString()};throw new Error(`Unsupported convert operator ${d}`)}(c);default:throw new Error(`Unsupported operator ${d}`)}}function interpolateNumber(c,u,d,p,g,f){const _=g-d;if(0===_)return p;const y=u-d;return p+(1===c?y/_:(Math.pow(c,y)-1)/(Math.pow(c,_)-1))*(f-p)}function interpolateColor(c,u,d,p,g,f){if(0===g-d)return p;const _=rgbaToLcha(p),y=rgbaToLcha(f);let x=y[2]-_[2];x>180?x-=360:x<-180&&(x+=360);return normalize(function lchaToRgba(c){const u=Tr.rgb(Lr.xyz(c));return u[3]=c[3],u}([interpolateNumber(c,u,d,_[0],g,y[0]),interpolateNumber(c,u,d,_[1],g,y[1]),_[2]+interpolateNumber(c,u,d,0,g,x),interpolateNumber(c,u,d,p[3],g,f[3])]))}function always$1(c){return!0}function rulesToStyleFunction(c){const u=newParsingContext(),d=function buildRuleSet(c,u){const d=c.length,p=new Array(d);for(let g=0;g<d;++g){const d=c[g],f="filter"in d?buildExpression$1(d.filter,Hn,u):always$1;let _;if(Array.isArray(d.style)){const c=d.style.length;_=new Array(c);for(let p=0;p<c;++p)_[p]=buildStyle(d.style[p],u)}else _=[buildStyle(d.style,u)];p[g]={filter:f,styles:_}}return function(u){const g=[];let f=!1;for(let _=0;_<d;++_){if((0,p[_].filter)(u)&&(!c[_].else||!f)){f=!0;for(const c of p[_].styles){const d=c(u);d&&g.push(d)}}}return g}}(c,u),p={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""};return function(c,g){if(p.properties=c.getPropertiesInternal(),p.resolution=g,u.featureId){const u=c.getId();p.featureId=void 0!==u?u:null}return u.geometryType&&(p.geometryType=computeGeometryType(c.getGeometry())),d(p)}}function flatStylesToStyleFunction(c){const u=newParsingContext(),d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=buildStyle(c[g],u);const g={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""},f=new Array(d);return function(c,_){if(g.properties=c.getPropertiesInternal(),g.resolution=_,u.featureId){const u=c.getId();g.featureId=void 0!==u?u:null}let y=0;for(let c=0;c<d;++c){const u=p[c](g);u&&(f[y]=u,y+=1)}return f.length=y,f}}function buildStyle(c,u){const d=buildFill(c,"",u),p=buildStroke(c,"",u),g=function buildText(c,u){const d="text-",p=stringEvaluator(c,d+"value",u);if(!p)return null;const g=buildFill(c,d,u),f=buildFill(c,d+"background-",u),_=buildStroke(c,d,u),y=buildStroke(c,d+"background-",u),x=stringEvaluator(c,d+"font",u),v=numberEvaluator(c,d+"max-angle",u),C=numberEvaluator(c,d+"offset-x",u),M=numberEvaluator(c,d+"offset-y",u),T=booleanEvaluator(c,d+"overflow",u),L=stringEvaluator(c,d+"placement",u),A=numberEvaluator(c,d+"repeat",u),I=sizeLikeEvaluator(c,d+"scale",u),k=booleanEvaluator(c,d+"rotate-with-view",u),O=numberEvaluator(c,d+"rotation",u),N=stringEvaluator(c,d+"align",u),G=stringEvaluator(c,d+"justify",u),j=stringEvaluator(c,d+"baseline",u),B=numberArrayEvaluator(c,d+"padding",u),V=optionalDeclutterMode(c,d+"declutter-mode"),q=new Ln({declutterMode:V});return function(c){if(q.setText(p(c)),g&&q.setFill(g(c)),f&&q.setBackgroundFill(f(c)),_&&q.setStroke(_(c)),y&&q.setBackgroundStroke(y(c)),x&&q.setFont(x(c)),v&&q.setMaxAngle(v(c)),C&&q.setOffsetX(C(c)),M&&q.setOffsetY(M(c)),T&&q.setOverflow(T(c)),L){const u=L(c);if("point"!==u&&"line"!==u)throw new Error("Expected point or line for text-placement");q.setPlacement(u)}if(A&&q.setRepeat(A(c)),I&&q.setScale(I(c)),k&&q.setRotateWithView(k(c)),O&&q.setRotation(O(c)),N){const u=N(c);if("left"!==u&&"center"!==u&&"right"!==u&&"end"!==u&&"start"!==u)throw new Error("Expected left, right, center, start, or end for text-align");q.setTextAlign(u)}if(G){const u=G(c);if("left"!==u&&"right"!==u&&"center"!==u)throw new Error("Expected left, right, or center for text-justify");q.setJustify(u)}if(j){const u=j(c);if("bottom"!==u&&"top"!==u&&"middle"!==u&&"alphabetic"!==u&&"hanging"!==u)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");q.setTextBaseline(u)}return B&&q.setPadding(B(c)),q}}(c,u),f=function buildImage(c,u){if("icon-src"in c)return function buildIcon(c,u){const d="icon-",p=d+"src",g=requireString(c[p],p),f=coordinateEvaluator(c,d+"anchor",u),_=sizeLikeEvaluator(c,d+"scale",u),y=numberEvaluator(c,d+"opacity",u),x=coordinateEvaluator(c,d+"displacement",u),v=numberEvaluator(c,d+"rotation",u),C=booleanEvaluator(c,d+"rotate-with-view",u),M=optionalIconOrigin(c,d+"anchor-origin"),T=optionalIconAnchorUnits(c,d+"anchor-x-units"),L=optionalIconAnchorUnits(c,d+"anchor-y-units"),A=function optionalColorLike(c,u){const d=c[u];if(void 0===d)return;return requireColorLike(d,u)}(c,d+"color"),I=function optionalString(c,u){const d=c[u];if(void 0===d)return;if("string"!=typeof d)throw new Error(`Expected a string for ${u}`);return d}(c,d+"cross-origin"),k=function optionalNumberArray(c,u){const d=c[u];if(void 0===d)return;return requireNumberArray(d,u)}(c,d+"offset"),O=optionalIconOrigin(c,d+"offset-origin"),N=optionalNumber(c,d+"width"),G=optionalNumber(c,d+"height"),j=function optionalSize(c,u){const d=c[u];if(void 0===d)return;if("number"==typeof d)return toSize(d);if(!Array.isArray(d))throw new Error(`Expected a number or size array for ${u}`);if(2!==d.length||"number"!=typeof d[0]||"number"!=typeof d[1])throw new Error(`Expected a number or size array for ${u}`);return d}(c,d+"size"),B=optionalDeclutterMode(c,d+"declutter-mode"),V=new Zn({src:g,anchorOrigin:M,anchorXUnits:T,anchorYUnits:L,color:A,crossOrigin:I,offset:k,offsetOrigin:O,height:G,width:N,size:j,declutterMode:B});return function(c){return y&&V.setOpacity(y(c)),x&&V.setDisplacement(x(c)),v&&V.setRotation(v(c)),C&&V.setRotateWithView(C(c)),_&&V.setScale(_(c)),f&&V.setAnchor(f(c)),V}}(c,u);if("shape-points"in c)return function buildShape(c,u){const d="shape-",p=d+"points",g=d+"radius",f=requireNumber(c[p],p),_=requireNumber(c[g],g),y=buildFill(c,d,u),x=buildStroke(c,d,u),v=sizeLikeEvaluator(c,d+"scale",u),C=coordinateEvaluator(c,d+"displacement",u),M=numberEvaluator(c,d+"rotation",u),T=booleanEvaluator(c,d+"rotate-with-view",u),L=optionalNumber(c,d+"radius2"),A=optionalNumber(c,d+"angle"),I=optionalDeclutterMode(c,d+"declutter-mode"),k=new bn({points:f,radius:_,radius2:L,angle:A,declutterMode:I});return function(c){return y&&k.setFill(y(c)),x&&k.setStroke(x(c)),C&&k.setDisplacement(C(c)),M&&k.setRotation(M(c)),T&&k.setRotateWithView(T(c)),v&&k.setScale(v(c)),k}}(c,u);if("circle-radius"in c)return function buildCircle(c,u){const d="circle-",p=buildFill(c,d,u),g=buildStroke(c,d,u),f=numberEvaluator(c,d+"radius",u),_=sizeLikeEvaluator(c,d+"scale",u),y=coordinateEvaluator(c,d+"displacement",u),x=numberEvaluator(c,d+"rotation",u),v=booleanEvaluator(c,d+"rotate-with-view",u),C=optionalDeclutterMode(c,d+"declutter-mode"),M=new Mn({radius:5,declutterMode:C});return function(c){return f&&M.setRadius(f(c)),p&&M.setFill(p(c)),g&&M.setStroke(g(c)),y&&M.setDisplacement(y(c)),x&&M.setRotation(x(c)),v&&M.setRotateWithView(v(c)),_&&M.setScale(_(c)),M}}(c,u);return null}(c,u),_=numberEvaluator(c,"z-index",u);if(!(d||p||g||f||isEmpty$1(c)))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(c));const y=new Rn;return function(c){let u=!0;if(d){const p=d(c);p&&(u=!1),y.setFill(p)}if(p){const d=p(c);d&&(u=!1),y.setStroke(d)}if(g){const d=g(c);d&&(u=!1),y.setText(d)}if(f){const d=f(c);d&&(u=!1),y.setImage(d)}return _&&y.setZIndex(_(c)),u?null:y}}function buildFill(c,u,d){let p;if(u+"fill-pattern-src"in c)p=function patternEvaluator(c,u,d){const p=stringEvaluator(c,u+"pattern-src",d),g=sizeEvaluator(c,u+"pattern-offset",d),f=sizeEvaluator(c,u+"pattern-size",d),_=colorLikeEvaluator(c,u+"color",d);return function(c){return{src:p(c),offset:g&&g(c),size:f&&f(c),color:_&&_(c)}}}(c,u+"fill-",d);else{if("none"===c[u+"fill-color"])return c=>null;p=colorLikeEvaluator(c,u+"fill-color",d)}if(!p)return null;const g=new Qr;return function(c){const u=p(c);return u===kr?null:(g.setColor(u),g)}}function buildStroke(c,u,d){const p=numberEvaluator(c,u+"stroke-width",d),g=colorLikeEvaluator(c,u+"stroke-color",d);if(!p&&!g)return null;const f=stringEvaluator(c,u+"stroke-line-cap",d),_=stringEvaluator(c,u+"stroke-line-join",d),y=numberArrayEvaluator(c,u+"stroke-line-dash",d),x=numberEvaluator(c,u+"stroke-line-dash-offset",d),v=numberEvaluator(c,u+"stroke-miter-limit",d),C=new en;return function(c){if(g){const u=g(c);if(u===kr)return null;C.setColor(u)}if(p&&C.setWidth(p(c)),f){const u=f(c);if("butt"!==u&&"round"!==u&&"square"!==u)throw new Error("Expected butt, round, or square line cap");C.setLineCap(u)}if(_){const u=_(c);if("bevel"!==u&&"round"!==u&&"miter"!==u)throw new Error("Expected bevel, round, or miter line join");C.setLineJoin(u)}return y&&C.setLineDash(y(c)),x&&C.setLineDashOffset(x(c)),v&&C.setMiterLimit(v(c)),C}}function numberEvaluator(c,u,d){if(!(u in c))return;const p=buildExpression$1(c[u],Jn,d);return function(c){return requireNumber(p(c),u)}}function stringEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Qn,d);return function(c){return requireString(p(c),u)}}function booleanEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Hn,d);return function(c){const d=p(c);if("boolean"!=typeof d)throw new Error(`Expected a boolean for ${u}`);return d}}function colorLikeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],ts,d);return function(c){return requireColorLike(p(c),u)}}function numberArrayEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],es,d);return function(c){return requireNumberArray(p(c),u)}}function coordinateEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],es,d);return function(c){const d=requireNumberArray(p(c),u);if(2!==d.length)throw new Error(`Expected two numbers for ${u}`);return d}}function sizeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],es,d);return function(c){return requireSize(p(c),u)}}function sizeLikeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],es|Jn,d);return function(c){return function requireSizeLike(c,u){if("number"==typeof c)return c;return requireSize(c,u)}(p(c),u)}}function optionalNumber(c,u){const d=c[u];if(void 0!==d){if("number"!=typeof d)throw new Error(`Expected a number for ${u}`);return d}}function optionalIconOrigin(c,u){const d=c[u];if(void 0!==d){if("bottom-left"!==d&&"bottom-right"!==d&&"top-left"!==d&&"top-right"!==d)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${u}`);return d}}function optionalIconAnchorUnits(c,u){const d=c[u];if(void 0!==d){if("pixels"!==d&&"fraction"!==d)throw new Error(`Expected pixels or fraction for ${u}`);return d}}function optionalDeclutterMode(c,u){const d=c[u];if(void 0!==d){if("string"!=typeof d)throw new Error(`Expected a string for ${u}`);if("declutter"!==d&&"obstacle"!==d&&"none"!==d)throw new Error(`Expected declutter, obstacle, or none for ${u}`);return d}}function requireNumberArray(c,u){if(!Array.isArray(c))throw new Error(`Expected an array for ${u}`);const d=c.length;for(let p=0;p<d;++p)if("number"!=typeof c[p])throw new Error(`Expected an array of numbers for ${u}`);return c}function requireString(c,u){if("string"!=typeof c)throw new Error(`Expected a string for ${u}`);return c}function requireNumber(c,u){if("number"!=typeof c)throw new Error(`Expected a number for ${u}`);return c}function requireColorLike(c,u){if("string"==typeof c)return c;const d=requireNumberArray(c,u),p=d.length;if(p<3||p>4)throw new Error(`Expected a color with 3 or 4 values for ${u}`);return d}function requireSize(c,u){const d=requireNumberArray(c,u);if(2!==d.length)throw new Error(`Expected an array of two numbers for ${u}`);return d}const ls="renderOrder";class BaseVectorLayer extends qn{constructor(c){c=c||{};const u=Object.assign({},c);delete u.style,delete u.renderBuffer,delete u.updateWhileAnimating,delete u.updateWhileInteracting,super(u),this.declutter_=c.declutter?String(c.declutter):void 0,this.renderBuffer_=void 0!==c.renderBuffer?c.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(c.style),this.updateWhileAnimating_=void 0!==c.updateWhileAnimating&&c.updateWhileAnimating,this.updateWhileInteracting_=void 0!==c.updateWhileInteracting&&c.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(c){return super.getFeatures(c)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(ls)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(c,u){const d=this.getDeclutter();d in c.declutter==!1&&(c.declutter[d]=new Yn(9)),this.getRenderer().renderDeclutter(c,u)}setRenderOrder(c){this.set(ls,c)}setStyle(c){this.style_=void 0===c?createDefaultStyle$1:c;const u=function toStyleLike(c){if(void 0===c)return createDefaultStyle$1;if(!c)return null;if("function"==typeof c)return c;if(c instanceof Rn)return c;if(!Array.isArray(c))return flatStylesToStyleFunction([c]);if(0===c.length)return[];const u=c.length,d=c[0];if(d instanceof Rn){const d=new Array(u);for(let p=0;p<u;++p){const u=c[p];if(!(u instanceof Rn))throw new Error("Expected a list of style instances");d[p]=u}return d}if("style"in d){const d=new Array(u);for(let p=0;p<u;++p){const u=c[p];if(!("style"in u))throw new Error("Expected a list of rules with a style property");d[p]=u}return rulesToStyleFunction(d)}const p=c;return flatStylesToStyleFunction(p)}(c);this.styleFunction_=null===c?void 0:function toFunction(c){let u;if("function"==typeof c)u=c;else{let d;Array.isArray(c)?d=c:(assert("function"==typeof c.getZIndex,"Expected an `Style` or an array of `Style`"),d=[c]),u=function(){return d}}return u}(u),this.changed()}}const hs=0,cs=1,us=2,ds=3,ps=4,gs=5,ms=6,fs=7,_s=8,ys=9,xs=10,vs=11,Ss=12,ws=[_s],Cs=[Ss],Es=[cs],Ps=[ds];class VectorContext{drawCustom(c,u,d,p,g){}drawGeometry(c){}setStyle(c){}drawCircle(c,u,d){}drawFeature(c,u,d){}drawGeometryCollection(c,u,d){}drawLineString(c,u,d){}drawMultiLineString(c,u,d){}drawMultiPoint(c,u,d){}drawMultiPolygon(c,u,d){}drawPoint(c,u,d){}drawPolygon(c,u,d){}drawText(c,u,d){}setFillStrokeStyle(c,u){}setImageStyle(c,u){}setTextStyle(c,u){}}class CanvasBuilder extends VectorContext{constructor(c,u,d,p){super(),this.tolerance=c,this.maxExtent=u,this.pixelRatio=p,this.maxLineWidth=0,this.resolution=d,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(c){const u=this.pixelRatio;return 1==u?c:c.map((function(c){return c*u}))}appendFlatPointCoordinates(c,u){const d=this.getBufferedMaxExtent(),p=this.tmpCoordinate_,g=this.coordinates;let f=g.length;for(let _=0,y=c.length;_<y;_+=u)p[0]=c[_],p[1]=c[_+1],containsCoordinate(d,p)&&(g[f++]=p[0],g[f++]=p[1]);return f}appendFlatLineCoordinates(c,u,d,p,g,f){const _=this.coordinates;let y=_.length;const x=this.getBufferedMaxExtent();f&&(u+=p);let v=c[u],C=c[u+1];const M=this.tmpCoordinate_;let T,L,A,I=!0;for(T=u+p;T<d;T+=p)M[0]=c[T],M[1]=c[T+1],A=coordinateRelationship(x,M),A!==L?(I&&(_[y++]=v,_[y++]=C,I=!1),_[y++]=M[0],_[y++]=M[1]):A===Di.INTERSECTING?(_[y++]=M[0],_[y++]=M[1],I=!1):I=!0,v=M[0],C=M[1],L=A;return(g&&I||T===u+p)&&(_[y++]=v,_[y++]=C),y}drawCustomCoordinates_(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f],y=this.appendFlatLineCoordinates(c,u,_,p,!1,!1);g.push(y),u=_}return u}drawCustom(c,u,d,p,g){this.beginGeometry(c,u,g);const f=c.getType(),_=c.getStride(),y=this.coordinates.length;let x,v,C,M,T;switch(f){case"MultiPolygon":x=c.getOrientedFlatCoordinates(),M=[];const u=c.getEndss();T=0;for(let c=0,d=u.length;c<d;++c){const d=[];T=this.drawCustomCoordinates_(x,T,u[c],_,d),M.push(d)}this.instructions.push([ps,y,M,c,d,inflateMultiCoordinatesArray,g]),this.hitDetectionInstructions.push([ps,y,M,c,p||d,inflateMultiCoordinatesArray,g]);break;case"Polygon":case"MultiLineString":C=[],x="Polygon"==f?c.getOrientedFlatCoordinates():c.getFlatCoordinates(),T=this.drawCustomCoordinates_(x,0,c.getEnds(),_,C),this.instructions.push([ps,y,C,c,d,inflateCoordinatesArray,g]),this.hitDetectionInstructions.push([ps,y,C,c,p||d,inflateCoordinatesArray,g]);break;case"LineString":case"Circle":x=c.getFlatCoordinates(),v=this.appendFlatLineCoordinates(x,0,x.length,_,!1,!1),this.instructions.push([ps,y,v,c,d,inflateCoordinates,g]),this.hitDetectionInstructions.push([ps,y,v,c,p||d,inflateCoordinates,g]);break;case"MultiPoint":x=c.getFlatCoordinates(),v=this.appendFlatPointCoordinates(x,_),v>y&&(this.instructions.push([ps,y,v,c,d,inflateCoordinates,g]),this.hitDetectionInstructions.push([ps,y,v,c,p||d,inflateCoordinates,g]));break;case"Point":x=c.getFlatCoordinates(),this.coordinates.push(x[0],x[1]),v=this.coordinates.length,this.instructions.push([ps,y,v,c,d,void 0,g]),this.hitDetectionInstructions.push([ps,y,v,c,p||d,void 0,g])}this.endGeometry(u)}beginGeometry(c,u,d){this.beginGeometryInstruction1_=[hs,u,0,c,d],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[hs,u,0,c,d],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const c=this.hitDetectionInstructions;let u;c.reverse();const d=c.length;let p,g,f=-1;for(u=0;u<d;++u)p=c[u],g=p[0],g==fs?f=u:g==hs&&(p[2]=u,reverseSubArray(this.hitDetectionInstructions,f,u),f=-1)}setFillStrokeStyle(c,u){const d=this.state;if(c){const u=c.getColor();d.fillPatternScale=u&&"object"==typeof u&&"src"in u?this.pixelRatio:1,d.fillStyle=asColorLike(u||dn)}else d.fillStyle=void 0;if(u){const c=u.getColor();d.strokeStyle=asColorLike(c||fn);const p=u.getLineCap();d.lineCap=void 0!==p?p:pn;const g=u.getLineDash();d.lineDash=g?g.slice():gn;const f=u.getLineDashOffset();d.lineDashOffset=f||0;const _=u.getLineJoin();d.lineJoin=void 0!==_?_:mn;const y=u.getWidth();d.lineWidth=void 0!==y?y:1;const x=u.getMiterLimit();d.miterLimit=void 0!==x?x:10,d.lineWidth>this.maxLineWidth&&(this.maxLineWidth=d.lineWidth,this.bufferedMaxExtent_=null)}else d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineDashOffset=void 0,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0}createFill(c){const u=c.fillStyle,d=[xs,u];return"string"!=typeof u&&d.push(c.fillPatternScale),d}applyStroke(c){this.instructions.push(this.createStroke(c))}createStroke(c){return[vs,c.strokeStyle,c.lineWidth*this.pixelRatio,c.lineCap,c.lineJoin,c.miterLimit,this.applyPixelRatio(c.lineDash),c.lineDashOffset*this.pixelRatio]}updateFillStyle(c,u){const d=c.fillStyle;"string"==typeof d&&c.currentFillStyle==d||(void 0!==d&&this.instructions.push(u.call(this,c)),c.currentFillStyle=d)}updateStrokeStyle(c,u){const d=c.strokeStyle,p=c.lineCap,g=c.lineDash,f=c.lineDashOffset,_=c.lineJoin,y=c.lineWidth,x=c.miterLimit;(c.currentStrokeStyle!=d||c.currentLineCap!=p||g!=c.currentLineDash&&!equals$2(c.currentLineDash,g)||c.currentLineDashOffset!=f||c.currentLineJoin!=_||c.currentLineWidth!=y||c.currentMiterLimit!=x)&&(void 0!==d&&u.call(this,c),c.currentStrokeStyle=d,c.currentLineCap=p,c.currentLineDash=g,c.currentLineDashOffset=f,c.currentLineJoin=_,c.currentLineWidth=y,c.currentMiterLimit=x)}endGeometry(c){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const u=[fs,c];this.instructions.push(u),this.hitDetectionInstructions.push(u)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=clone(this.maxExtent),this.maxLineWidth>0)){const c=this.resolution*(this.maxLineWidth+1)/2;buffer(this.bufferedMaxExtent_,c,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class CanvasPolygonBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p)}drawFlatCoordinatess_(c,u,d,p){const g=this.state,f=void 0!==g.fillStyle,_=void 0!==g.strokeStyle,y=d.length;this.instructions.push(Es),this.hitDetectionInstructions.push(Es);for(let g=0;g<y;++g){const f=d[g],y=this.coordinates.length,x=this.appendFlatLineCoordinates(c,u,f,p,!0,!_),v=[ys,y,x];this.instructions.push(v),this.hitDetectionInstructions.push(v),_&&(this.instructions.push(Ps),this.hitDetectionInstructions.push(Ps)),u=f}return f&&(this.instructions.push(ws),this.hitDetectionInstructions.push(ws)),_&&(this.instructions.push(Cs),this.hitDetectionInstructions.push(Cs)),u}drawCircle(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([xs,dn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([vs,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,gn,0]);const _=c.getFlatCoordinates(),y=c.getStride(),x=this.coordinates.length;this.appendFlatLineCoordinates(_,0,_.length,y,!1,!1);const v=[us,x];this.instructions.push(Es,v),this.hitDetectionInstructions.push(Es,v),void 0!==p.fillStyle&&(this.instructions.push(ws),this.hitDetectionInstructions.push(ws)),void 0!==p.strokeStyle&&(this.instructions.push(Cs),this.hitDetectionInstructions.push(Cs)),this.endGeometry(u)}drawPolygon(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([xs,dn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([vs,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,gn,0]);const _=c.getEnds(),y=c.getOrientedFlatCoordinates(),x=c.getStride();this.drawFlatCoordinatess_(y,0,_,x),this.endGeometry(u)}drawMultiPolygon(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([xs,dn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([vs,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,gn,0]);const _=c.getEndss(),y=c.getOrientedFlatCoordinates(),x=c.getStride();let v=0;for(let c=0,u=_.length;c<u;++c)v=this.drawFlatCoordinatess_(y,v,_[c],x);this.endGeometry(u)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const c=this.tolerance;if(0!==c){const u=this.coordinates;for(let d=0,p=u.length;d<p;++d)u[d]=snap(u[d],c)}return super.finish()}setFillStrokeStyles_(){const c=this.state;void 0!==c.fillStyle&&this.updateFillStyle(c,this.createFill),void 0!==c.strokeStyle&&this.updateStrokeStyle(c,this.applyStroke)}}function lineChunk(c,u,d,p,g){const f=[];let _=d,y=0,x=u.slice(d,2);for(;y<c&&_+g<p;){const[d,p]=x.slice(-2),v=u[_+g],C=u[_+g+1],M=Math.sqrt((v-d)*(v-d)+(C-p)*(C-p));if(y+=M,y>=c){const u=(c-y+M)/M,T=lerp(d,v,u),L=lerp(p,C,u);x.push(T,L),f.push(x),x=[T,L],y==c&&(_+=g),y=0}else if(y<c)x.push(u[_+g],u[_+g+1]),_+=g;else{const c=M-y,u=lerp(d,v,c/M),T=lerp(p,C,c/M);x.push(u,T),f.push(x),x=[u,T],y=0,_+=g}}return y>0&&f.push(x),f}function matchingChunk(c,u,d,p,g){let f,_,y,x,v,C,M,T,L,A,I=d,k=d,O=0,N=0,G=d;for(_=d;_<p;_+=g){const d=u[_],p=u[_+1];void 0!==v&&(L=d-v,A=p-C,x=Math.sqrt(L*L+A*A),void 0!==M&&(N+=y,f=Math.acos((M*L+T*A)/(y*x)),f>c&&(N>O&&(O=N,I=G,k=_),N=0,G=_-g)),y=x,M=L,T=A),v=d,C=p}return N+=x,N>O?[G,_]:[I,k]}const bs={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const Ms={Circle:CanvasPolygonBuilder,Default:CanvasBuilder,Image:class CanvasImageBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(c,u,d){if(!this.image_||this.maxExtent&&!containsCoordinate(this.maxExtent,c.getFlatCoordinates()))return;this.beginGeometry(c,u,d);const p=c.getFlatCoordinates(),g=c.getStride(),f=this.coordinates.length,_=this.appendFlatPointCoordinates(p,g);this.instructions.push([ms,f,_,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ms,f,_,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(u)}drawMultiPoint(c,u,d){if(!this.image_)return;this.beginGeometry(c,u,d);const p=c.getFlatCoordinates(),g=[];for(let u=0,d=p.length;u<d;u+=c.getStride())this.maxExtent&&!containsCoordinate(this.maxExtent,p.slice(u,u+2))||g.push(p[u],p[u+1]);const f=this.coordinates.length,_=this.appendFlatPointCoordinates(g,2);this.instructions.push([ms,f,_,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ms,f,_,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(u)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(c,u){const d=c.getAnchor(),p=c.getSize(),g=c.getOrigin();this.imagePixelRatio_=c.getPixelRatio(this.pixelRatio),this.anchorX_=d[0],this.anchorY_=d[1],this.hitDetectionImage_=c.getHitDetectionImage(),this.image_=c.getImage(this.pixelRatio),this.height_=p[1],this.opacity_=c.getOpacity(),this.originX_=g[0],this.originY_=g[1],this.rotateWithView_=c.getRotateWithView(),this.rotation_=c.getRotation(),this.scale_=c.getScaleArray(),this.width_=p[0],this.declutterMode_=c.getDeclutterMode(),this.declutterImageWithText_=u}},LineString:class CanvasLineStringBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p)}drawFlatCoordinates_(c,u,d,p){const g=this.coordinates.length,f=this.appendFlatLineCoordinates(c,u,d,p,!1,!1),_=[ys,g,f];return this.instructions.push(_),this.hitDetectionInstructions.push(_),d}drawLineString(c,u,d){const p=this.state,g=p.strokeStyle,f=p.lineWidth;if(void 0===g||void 0===f)return;this.updateStrokeStyle(p,this.applyStroke),this.beginGeometry(c,u,d),this.hitDetectionInstructions.push([vs,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,gn,0],Es);const _=c.getFlatCoordinates(),y=c.getStride();this.drawFlatCoordinates_(_,0,_.length,y),this.hitDetectionInstructions.push(Cs),this.endGeometry(u)}drawMultiLineString(c,u,d){const p=this.state,g=p.strokeStyle,f=p.lineWidth;if(void 0===g||void 0===f)return;this.updateStrokeStyle(p,this.applyStroke),this.beginGeometry(c,u,d),this.hitDetectionInstructions.push([vs,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,gn,0],Es);const _=c.getEnds(),y=c.getFlatCoordinates(),x=c.getStride();let v=0;for(let c=0,u=_.length;c<u;++c)v=this.drawFlatCoordinates_(y,v,_[c],x);this.hitDetectionInstructions.push(Cs),this.endGeometry(u)}finish(){const c=this.state;return null!=c.lastStroke&&c.lastStroke!=this.coordinates.length&&this.instructions.push(Cs),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(c){null!=c.lastStroke&&c.lastStroke!=this.coordinates.length&&(this.instructions.push(Cs),c.lastStroke=this.coordinates.length),c.lastStroke=0,super.applyStroke(c),this.instructions.push(Es)}},Polygon:CanvasPolygonBuilder,Text:class CanvasTextBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[dn]={fillStyle:dn},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const c=super.finish();return c.textStates=this.textStates,c.fillStates=this.fillStates,c.strokeStates=this.strokeStates,c}drawText(c,u,d){const p=this.textFillState_,g=this.textStrokeState_,f=this.textState_;if(""===this.text_||!f||!p&&!g)return;const _=this.coordinates;let y=_.length;const x=c.getType();let v=null,C=c.getStride();if("line"!==f.placement||"LineString"!=x&&"MultiLineString"!=x&&"Polygon"!=x&&"MultiPolygon"!=x){let p=f.overflow?null:[];switch(x){case"Point":case"MultiPoint":v=c.getFlatCoordinates();break;case"LineString":v=c.getFlatMidpoint();break;case"Circle":v=c.getCenter();break;case"MultiLineString":v=c.getFlatMidpoints(),C=2;break;case"Polygon":v=c.getFlatInteriorPoint(),f.overflow||p.push(v[2]/this.resolution),C=3;break;case"MultiPolygon":const u=c.getFlatInteriorPoints();v=[];for(let c=0,d=u.length;c<d;c+=3)f.overflow||p.push(u[c+2]/this.resolution),v.push(u[c],u[c+1]);if(0===v.length)return;C=2}const g=this.appendFlatPointCoordinates(v,C);if(g===y)return;if(p&&(g-y)/2!=v.length/C){let c=y/2;p=p.filter(((u,d)=>{const p=_[2*(c+d)]===v[d*C]&&_[2*(c+d)+1]===v[d*C+1];return p||--c,p}))}this.saveTextStates_(),(f.backgroundFill||f.backgroundStroke)&&(this.setFillStrokeStyle(f.backgroundFill,f.backgroundStroke),f.backgroundFill&&this.updateFillStyle(this.state,this.createFill),f.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(c,u,d);let M=f.padding;if(M!=xn&&(f.scale[0]<0||f.scale[1]<0)){let c=f.padding[0],u=f.padding[1],d=f.padding[2],p=f.padding[3];f.scale[0]<0&&(u=-u,p=-p),f.scale[1]<0&&(c=-c,d=-d),M=[c,u,d,p]}const T=this.pixelRatio;this.instructions.push([ms,y,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,M==xn?xn:M.map((function(c){return c*T})),!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]);const L=1/T,A=this.state.fillStyle;f.backgroundFill&&(this.state.fillStyle=dn,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([ms,y,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[L,L],NaN,this.declutterMode_,this.declutterImageWithText_,M,!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?dn:this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]),f.backgroundFill&&(this.state.fillStyle=A,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(u)}else{if(!intersects$1(this.maxExtent,c.getExtent()))return;let p;if(v=c.getFlatCoordinates(),"LineString"==x)p=[v.length];else if("MultiLineString"==x)p=c.getEnds();else if("Polygon"==x)p=c.getEnds().slice(0,1);else if("MultiPolygon"==x){const u=c.getEndss();p=[];for(let c=0,d=u.length;c<d;++c)p.push(u[c][0])}this.beginGeometry(c,u,d);const g=f.repeat,M=g?void 0:f.textAlign;let T=0;for(let c=0,u=p.length;c<u;++c){let u;u=g?lineChunk(g*this.resolution,v,T,p[c],C):[v.slice(T,p[c])];for(let d=0,g=u.length;d<g;++d){const g=u[d];let x=0,v=g.length;if(null==M){const c=matchingChunk(f.maxAngle,g,0,g.length,2);x=c[0],v=c[1]}for(let c=x;c<v;c+=C)_.push(g[c],g[c+1]);const L=_.length;T=p[c],this.drawChars_(y,L),y=L}}this.endGeometry(u)}}saveTextStates_(){const c=this.textStrokeState_,u=this.textState_,d=this.textFillState_,p=this.strokeKey_;c&&(p in this.strokeStates||(this.strokeStates[p]={strokeStyle:c.strokeStyle,lineCap:c.lineCap,lineDashOffset:c.lineDashOffset,lineWidth:c.lineWidth,lineJoin:c.lineJoin,miterLimit:c.miterLimit,lineDash:c.lineDash}));const g=this.textKey_;g in this.textStates||(this.textStates[g]={font:u.font,textAlign:u.textAlign||_n,justify:u.justify,textBaseline:u.textBaseline||yn,scale:u.scale});const f=this.fillKey_;d&&(f in this.fillStates||(this.fillStates[f]={fillStyle:d.fillStyle}))}drawChars_(c,u){const d=this.textStrokeState_,p=this.textState_,g=this.strokeKey_,f=this.textKey_,_=this.fillKey_;this.saveTextStates_();const y=this.pixelRatio,x=bs[p.textBaseline],v=this.textOffsetY_*y,C=this.text_,M=d?d.lineWidth*Math.abs(p.scale[0])/2:0;this.instructions.push([gs,c,u,x,p.overflow,_,p.maxAngle,y,v,g,M*y,C,f,1,this.declutterMode_]),this.hitDetectionInstructions.push([gs,c,u,x,p.overflow,_?dn:_,p.maxAngle,y,v,g,M*y,C,f,1/y,this.declutterMode_])}setTextStyle(c,u){let d,p,g;if(c){const u=c.getFill();u?(p=this.textFillState_,p||(p={},this.textFillState_=p),p.fillStyle=asColorLike(u.getColor()||dn)):(p=null,this.textFillState_=p);const f=c.getStroke();if(f){g=this.textStrokeState_,g||(g={},this.textStrokeState_=g);const c=f.getLineDash(),u=f.getLineDashOffset(),d=f.getWidth(),p=f.getMiterLimit();g.lineCap=f.getLineCap()||pn,g.lineDash=c?c.slice():gn,g.lineDashOffset=void 0===u?0:u,g.lineJoin=f.getLineJoin()||mn,g.lineWidth=void 0===d?1:d,g.miterLimit=void 0===p?10:p,g.strokeStyle=asColorLike(f.getColor()||fn)}else g=null,this.textStrokeState_=g;d=this.textState_;const _=c.getFont()||un;En(_);const y=c.getScaleArray();d.overflow=c.getOverflow(),d.font=_,d.maxAngle=c.getMaxAngle(),d.placement=c.getPlacement(),d.textAlign=c.getTextAlign(),d.repeat=c.getRepeat(),d.justify=c.getJustify(),d.textBaseline=c.getTextBaseline()||yn,d.backgroundFill=c.getBackgroundFill(),d.backgroundStroke=c.getBackgroundStroke(),d.padding=c.getPadding()||xn,d.scale=void 0===y?[1,1]:y;const x=c.getOffsetX(),v=c.getOffsetY(),C=c.getRotateWithView(),M=c.getRotation();this.text_=c.getText()||"",this.textOffsetX_=void 0===x?0:x,this.textOffsetY_=void 0===v?0:v,this.textRotateWithView_=void 0!==C&&C,this.textRotation_=void 0===M?0:M,this.strokeKey_=g?("string"==typeof g.strokeStyle?g.strokeStyle:getUid(g.strokeStyle))+g.lineCap+g.lineDashOffset+"|"+g.lineWidth+g.lineJoin+g.miterLimit+"["+g.lineDash.join()+"]":"",this.textKey_=d.font+d.scale+(d.textAlign||"?")+(d.repeat||"?")+(d.justify||"?")+(d.textBaseline||"?"),this.fillKey_=p&&p.fillStyle?"string"==typeof p.fillStyle?p.fillStyle:"|"+getUid(p.fillStyle):""}else this.text_="";this.declutterMode_=c.getDeclutterMode(),this.declutterImageWithText_=u}}};class BuilderGroup{constructor(c,u,d,p){this.tolerance_=c,this.maxExtent_=u,this.pixelRatio_=p,this.resolution_=d,this.buildersByZIndex_={}}finish(){const c={};for(const u in this.buildersByZIndex_){c[u]=c[u]||{};const d=this.buildersByZIndex_[u];for(const p in d){const g=d[p].finish();c[u][p]=g}}return c}getBuilder(c,u){const d=void 0!==c?c.toString():"0";let p=this.buildersByZIndex_[d];void 0===p&&(p={},this.buildersByZIndex_[d]=p);let g=p[u];if(void 0===g){g=new(0,Ms[u])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),p[u]=g}return g}}class LayerRenderer extends Mi{constructor(c){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=c,this.staleKeys_=new Array,this.maxStaleKeys=5}getStaleKeys(){return this.staleKeys_}prependStaleKey(c){this.staleKeys_.unshift(c),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(c){return abstract()}getData(c){return null}prepareFrame(c){return abstract()}renderFrame(c,u){return abstract()}forEachFeatureAtCoordinate(c,u,d,p,g){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(c){const u=c.target;u.getState()!==br.LOADED&&u.getState()!==br.ERROR||this.renderIfReadyAndVisible()}loadImage(c){let u=c.getState();return u!=br.LOADED&&u!=br.ERROR&&c.addEventListener(_i,this.boundHandleImageChange_),u==br.IDLE&&(c.load(),u=c.getState()),u==br.LOADED}renderIfReadyAndVisible(){const c=this.getLayer();c&&c.getVisible()&&"ready"===c.getSourceState()&&c.changed()}renderDeferred(c){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class RenderEvent extends BaseEvent{constructor(c,u,d,p){super(c),this.inversePixelTransform=u,this.frameState=d,this.context=p}}class ZIndexContext{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(getSharedCanvasContext2D(),{get:(c,u)=>{if("function"==typeof getSharedCanvasContext2D()[u])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(u),this.pushMethodArgs_},set:(c,u,d)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(u,d),!0)})}pushMethodArgs_=(...c)=>(this.instructions_[this.zIndex+this.offset_].push(c),this);pushFunction(c){this.instructions_[this.zIndex+this.offset_].push(c)}getContext(){return this.context_}draw(c){this.instructions_.forEach((u=>{for(let d=0,p=u.length;d<p;++d){const p=u[d];if("function"==typeof p){p(c);continue}const g=u[++d];if("function"==typeof c[p])c[p](...g);else{if("function"==typeof g){c[p]=g(c);continue}c[p]=g}}}))}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const Ts=[];let Rs=null;class CanvasLayerRenderer extends LayerRenderer{constructor(c){super(c),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(c,u,d){let p;Rs||function createPixelContext$1(){Rs=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}(),Rs.clearRect(0,0,1,1);try{Rs.drawImage(c,u,d,1,1,0,0,1,1),p=Rs.getImageData(0,0,1,1).data}catch(c){return Rs=null,null}return p}getBackground(c){let u=this.getLayer().getBackground();return"function"==typeof u&&(u=u(c.viewState.resolution)),u||void 0}useContainer(c,u,d){const p=this.getLayer().getClassName();let g,f;if(c&&c.className===p&&(!d||c&&c.style.backgroundColor&&equals$2(asArray(c.style.backgroundColor),asArray(d)))){const u=c.firstElementChild;u instanceof HTMLCanvasElement&&(f=u.getContext("2d"))}if(f&&f.canvas.style.transform===u?(this.container=c,this.context=f,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){g=document.createElement("div"),g.className=p;let c=g.style;c.position="absolute",c.width="100%",c.height="100%",f=createCanvasContext2D();const u=f.canvas;g.appendChild(u),c=u.style,c.position="absolute",c.left="0",c.transformOrigin="top left",this.container=g,this.context=f}this.containerReused||!d||this.container.style.backgroundColor||(this.container.style.backgroundColor=d)}clipUnrotated(c,u,d){const p=getTopLeft(d),g=getTopRight(d),f=getBottomRight(d),_=getBottomLeft(d);apply(u.coordinateToPixelTransform,p),apply(u.coordinateToPixelTransform,g),apply(u.coordinateToPixelTransform,f),apply(u.coordinateToPixelTransform,_);const y=this.inversePixelTransform;apply(y,p),apply(y,g),apply(y,f),apply(y,_),c.save(),c.beginPath(),c.moveTo(Math.round(p[0]),Math.round(p[1])),c.lineTo(Math.round(g[0]),Math.round(g[1])),c.lineTo(Math.round(f[0]),Math.round(f[1])),c.lineTo(Math.round(_[0]),Math.round(_[1])),c.clip()}prepareContainer(c,u){const d=c.extent,p=c.viewState.resolution,g=c.viewState.rotation,f=c.pixelRatio,_=Math.round(getWidth(d)/p*f),y=Math.round(getHeight(d)/p*f);compose(this.pixelTransform,c.size[0]/2,c.size[1]/2,1/f,1/f,g,-_/2,-y/2),makeInverse(this.inversePixelTransform,this.pixelTransform);const x=function toString$1(c){const u="matrix("+c.map(((c,u)=>Math.round(c*Ni[u])/Ni[u])).join(", ")+")";return u}(this.pixelTransform);if(this.useContainer(u,x,this.getBackground(c)),!this.containerReused){const c=this.context.canvas;c.width!=_||c.height!=y?(c.width=_,c.height=y):this.context.clearRect(0,0,_,y),x!==c.style.transform&&(c.style.transform=x)}}dispatchRenderEvent_(c,u,d){const p=this.getLayer();if(p.hasListener(c)){const g=new RenderEvent(c,this.inversePixelTransform,d,u);p.dispatchEvent(g)}}preRender(c,u){this.frameState=u,u.declutter||this.dispatchRenderEvent_(Sr,c,u)}postRender(c,u){u.declutter||this.dispatchRenderEvent_(wr,c,u)}renderDeferredInternal(c){}getRenderContext(c){return c.declutter&&!this.deferredContext_&&(this.deferredContext_=new ZIndexContext),c.declutter?this.deferredContext_.getContext():this.context}renderDeferred(c){c.declutter&&(this.dispatchRenderEvent_(Sr,this.context,c),c.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(c),this.dispatchRenderEvent_(wr,this.context,c))}getRenderTransform(c,u,d,p,g,f,_){const y=g/2,x=f/2,v=p/u,C=-v,M=-c[0]+_,T=-c[1];return compose(this.tempTransform,y,x,v,C,-d,M,T)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function drawTextOnPath(c,u,d,p,g,f,_,y,x,v,C,M){let T=c[u],L=c[u+1],A=0,I=0,k=0,O=0;function advance(){A=T,I=L,T=c[u+=p],L=c[u+1],O+=k,k=Math.sqrt((T-A)*(T-A)+(L-I)*(L-I))}do{advance()}while(u<d-p&&O+k<f);let N=0===k?0:(f-O)/k;const G=lerp(A,T,N),j=lerp(I,L,N),B=u-p,V=O,q=f+y*x(v,g,C);for(;u<d-p&&O+k<q;)advance();N=0===k?0:(q-O)/k;const Z=lerp(A,T,N),K=lerp(I,L,N);let J;if(M){const c=[G,j,Z,K];rotate(c,0,4,2,M,c,c),J=c[0]>c[2]}else J=G>Z;const ct=Math.PI,ft=[],pe=B+p===u;let me;if(k=0,O=V,T=c[u=B],L=c[u+1],pe){advance(),me=Math.atan2(L-I,T-A),J&&(me+=me>0?-ct:ct);const c=(Z+G)/2,u=(K+j)/2;return ft[0]=[c,u,(q-f)/2,me,g],ft}for(let c=0,M=(g=g.replace(/\n/g," ")).length;c<M;){advance();let G=Math.atan2(L-I,T-A);if(J&&(G+=G>0?-ct:ct),void 0!==me){let c=G-me;if(c+=c>ct?-2*ct:c<-ct?2*ct:0,Math.abs(c)>_)return null}me=G;const j=c;let B=0;for(;c<M;++c){const _=y*x(v,g[J?M-c-1:c],C);if(u+p<d&&O+k<f+B+_/2)break;B+=_}if(c===j)continue;const V=J?g.substring(M-j,M-c):g.substring(j,c);N=0===k?0:(f+B/2-O)/k;const q=lerp(A,T,N),Z=lerp(I,L,N);ft.push([q,Z,B/2,G,V]),f+=B}return ft}const Ls=[1/0,1/0,-1/0,-1/0],As=[],Is=[],Fs=[],ks=[];function getDeclutterBox(c){return c[3].declutterBox}const Os=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function horizontalTextAlign(c,u){return"start"===u?u=Os.test(c)?"right":"left":"end"===u&&(u=Os.test(c)?"left":"right"),bs[u]}function createTextChunks(c,u,d){return d>0&&c.push("\n",""),c.push(u,""),c}class Executor{constructor(c,u,d,p,g){this.overlaps=d,this.pixelRatio=u,this.resolution=c,this.alignAndScaleFill_,this.instructions=p.instructions,this.coordinates=p.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=p.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=p.fillStates||{},this.strokeStates=p.strokeStates||{},this.textStates=p.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=g?new ZIndexContext:null}getZIndexContext(){return this.zIndexContext_}createLabel(c,u,d,p){const g=c+u+d+p;if(this.labels_[g])return this.labels_[g];const f=p?this.strokeStates[p]:null,_=d?this.fillStates[d]:null,y=this.textStates[u],x=this.pixelRatio,v=[y.scale[0]*x,y.scale[1]*x],C=y.justify?bs[y.justify]:horizontalTextAlign(Array.isArray(c)?c[0]:c,y.textAlign||_n),M=p&&f.lineWidth?f.lineWidth:0,T=Array.isArray(c)?c:String(c).split("\n").reduce(createTextChunks,[]),{width:L,height:A,widths:I,heights:k,lineWidths:O}=function getTextDimensions(c,u){const d=[],p=[],g=[];let f=0,_=0,y=0,x=0;for(let v=0,C=u.length;v<=C;v+=2){const M=u[v];if("\n"===M||v===C){f=Math.max(f,_),g.push(_),_=0,y+=x,x=0;continue}const T=u[v+1]||c.font,L=measureTextWidth(T,M);d.push(L),_+=L;const A=Pn(T);p.push(A),x=Math.max(x,A)}return{width:f,height:y,widths:d,heights:p,lineWidths:g}}(y,T),N=L+M,G=[],j=(N+2)*v[0],B=(A+M)*v[1],V={width:j<0?Math.floor(j):Math.ceil(j),height:B<0?Math.floor(B):Math.ceil(B),contextInstructions:G};1==v[0]&&1==v[1]||G.push("scale",v),p&&(G.push("strokeStyle",f.strokeStyle),G.push("lineWidth",M),G.push("lineCap",f.lineCap),G.push("lineJoin",f.lineJoin),G.push("miterLimit",f.miterLimit),G.push("setLineDash",[f.lineDash]),G.push("lineDashOffset",f.lineDashOffset)),d&&G.push("fillStyle",_.fillStyle),G.push("textBaseline","middle"),G.push("textAlign","center");const q=.5-C;let Z=C*N+q*M;const K=[],J=[];let ct,ft=0,pe=0,me=0,fe=0;for(let c=0,u=T.length;c<u;c+=2){const u=T[c];if("\n"===u){pe+=ft,ft=0,Z=C*N+q*M,++fe;continue}const g=T[c+1]||y.font;g!==ct&&(p&&K.push("font",g),d&&J.push("font",g),ct=g),ft=Math.max(ft,k[me]);const f=[u,Z+q*I[me]+C*(I[me]-O[fe]),.5*(M+ft)+pe];Z+=I[me],p&&K.push("strokeText",f),d&&J.push("fillText",f),++me}return Array.prototype.push.apply(G,K),Array.prototype.push.apply(G,J),this.labels_[g]=V,V}replayTextBackground_(c,u,d,p,g,f,_){c.beginPath(),c.moveTo.apply(c,u),c.lineTo.apply(c,d),c.lineTo.apply(c,p),c.lineTo.apply(c,g),c.lineTo.apply(c,u),f&&(this.alignAndScaleFill_=f[2],this.fill_(c)),_&&(this.setStrokeStyle_(c,_),c.stroke())}calculateImageOrLabelDimensions_(c,u,d,p,g,f,_,y,x,v,C,M,T,L,A,I){let k=d-(_*=M[0]),O=p-(y*=M[1]);const N=g+x>c?c-x:g,G=f+v>u?u-v:f,j=L[3]+N*M[0]+L[1],B=L[0]+G*M[1]+L[2],V=k-L[3],q=O-L[0];let Z;return(A||0!==C)&&(As[0]=V,ks[0]=V,As[1]=q,Is[1]=q,Is[0]=V+j,Fs[0]=Is[0],Fs[1]=q+B,ks[1]=Fs[1]),0!==C?(Z=compose([1,0,0,1,0,0],d,p,1,1,C,-d,-p),apply(Z,As),apply(Z,Is),apply(Z,Fs),apply(Z,ks),createOrUpdate$2(Math.min(As[0],Is[0],Fs[0],ks[0]),Math.min(As[1],Is[1],Fs[1],ks[1]),Math.max(As[0],Is[0],Fs[0],ks[0]),Math.max(As[1],Is[1],Fs[1],ks[1]),Ls)):createOrUpdate$2(Math.min(V,V+j),Math.min(q,q+B),Math.max(V,V+j),Math.max(q,q+B),Ls),T&&(k=Math.round(k),O=Math.round(O)),{drawImageX:k,drawImageY:O,drawImageW:N,drawImageH:G,originX:x,originY:v,declutterBox:{minX:Ls[0],minY:Ls[1],maxX:Ls[2],maxY:Ls[3],value:I},canvasTransform:Z,scale:M}}replayImageOrLabel_(c,u,d,p,g,f,_){const y=!(!f&&!_),x=p.declutterBox,v=_?_[2]*p.scale[0]/2:0;return x.minX-v<=u[0]&&x.maxX+v>=0&&x.minY-v<=u[1]&&x.maxY+v>=0&&(y&&this.replayTextBackground_(c,As,Is,Fs,ks,f,_),drawImageOrLabel(c,p.canvasTransform,g,d,p.originX,p.originY,p.drawImageW,p.drawImageH,p.drawImageX,p.drawImageY,p.scale)),!0}fill_(c){const u=this.alignAndScaleFill_;if(u){const d=apply(this.renderedTransform_,[0,0]),p=512*this.pixelRatio;c.save(),c.translate(d[0]%p,d[1]%p),1!==u&&c.scale(u,u),c.rotate(this.viewRotation_)}c.fill(),u&&c.restore()}setStrokeStyle_(c,u){c.strokeStyle=u[1],c.lineWidth=u[2],c.lineCap=u[3],c.lineJoin=u[4],c.miterLimit=u[5],c.lineDashOffset=u[7],c.setLineDash(u[6])}drawLabelWithPointPlacement_(c,u,d,p){const g=this.textStates[u],f=this.createLabel(c,u,p,d),_=this.strokeStates[d],y=this.pixelRatio,x=horizontalTextAlign(Array.isArray(c)?c[0]:c,g.textAlign||_n),v=bs[g.textBaseline||yn],C=_&&_.lineWidth?_.lineWidth:0;return{label:f,anchorX:x*(f.width/y-2*g.scale[0])+2*(.5-x)*C,anchorY:v*f.height/y+2*(.5-v)*C}}execute_(c,u,d,p,g,f,_,y){const x=this.zIndexContext_;let v;this.pixelCoordinates_&&equals$2(d,this.renderedTransform_)?v=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),v=transform2D(this.coordinates,0,this.coordinates.length,2,d,this.pixelCoordinates_),function setFromArray(c,u){return c[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5],c}(this.renderedTransform_,d));let C=0;const M=p.length;let T,L,A,I,k,O,N,G,j,B,V,q,Z,K=0,J=0,ct=0,ft=null,pe=null;const me=this.coordinateCache_,fe=this.viewRotation_,_e=Math.round(1e12*Math.atan2(-d[1],d[0]))/1e12,xe={context:c,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:fe},ve=this.instructions!=p||this.overlaps?0:200;let we,Ce,Ee,Pe;for(;C<M;){const d=p[C];switch(d[0]){case hs:we=d[1],Pe=d[3],we.getGeometry()?void 0===_||intersects$1(_,Pe.getExtent())?++C:C=d[2]+1:C=d[2],x&&(x.zIndex=d[4]);break;case cs:J>ve&&(this.fill_(c),J=0),ct>ve&&(c.stroke(),ct=0),J||ct||(c.beginPath(),k=NaN,O=NaN),++C;break;case us:K=d[1];const p=v[K],M=v[K+1],be=v[K+2]-p,Me=v[K+3]-M,Te=Math.sqrt(be*be+Me*Me);c.moveTo(p+Te,M),c.arc(p,M,Te,0,2*Math.PI,!0),++C;break;case ds:c.closePath(),++C;break;case ps:K=d[1],T=d[2];const Re=d[3],Le=d[4],Ae=d[5];xe.geometry=Re,xe.feature=we,C in me||(me[C]=[]);const Ie=me[C];Ae?Ae(v,K,T,2,Ie):(Ie[0]=v[K],Ie[1]=v[K+1],Ie.length=2),x&&(x.zIndex=d[6]),Le(Ie,xe),++C;break;case ms:K=d[1],T=d[2],j=d[3],L=d[4],A=d[5];let Fe=d[6];const ke=d[7],Oe=d[8],Ne=d[9],De=d[10];let Ge=d[11];const je=d[12];let ze=d[13];I=d[14]||"declutter";const Be=d[15];if(!j&&d.length>=20){B=d[19],V=d[20],q=d[21],Z=d[22];const c=this.drawLabelWithPointPlacement_(B,V,q,Z);j=c.label,d[3]=j;const u=d[23];L=(c.anchorX-u)*this.pixelRatio,d[4]=L;const p=d[24];A=(c.anchorY-p)*this.pixelRatio,d[5]=A,Fe=j.height,d[6]=Fe,ze=j.width,d[13]=ze}let Ue,$e,We,Xe;d.length>25&&(Ue=d[25]),d.length>17?($e=d[16],We=d[17],Xe=d[18]):($e=xn,We=!1,Xe=!1),De&&_e?Ge+=fe:De||_e||(Ge-=fe);let Ve=0;for(;K<T;K+=2){if(Ue&&Ue[Ve++]<ze/this.pixelRatio)continue;const d=this.calculateImageOrLabelDimensions_(j.width,j.height,v[K],v[K+1],ze,Fe,L,A,Oe,Ne,Ge,je,g,$e,We||Xe,we),p=[c,u,j,d,ke,We?ft:null,Xe?pe:null];if(y){let c,u,g,f,_;if(Be){const d=T-K;if(!Be[d]){Be[d]={args:p,declutterMode:I};continue}const f=Be[d];c=f.args,u=f.declutterMode,delete Be[d],g=getDeclutterBox(c)}if(!c||"declutter"===u&&y.collides(g)||(f=!0),"declutter"===I&&y.collides(d.declutterBox)||(_=!0),"declutter"===u&&"declutter"===I){const c=f&&_;f=c,_=c}f&&("none"!==u&&y.insert(g),this.replayImageOrLabel_.apply(this,c)),_&&("none"!==I&&y.insert(d.declutterBox),this.replayImageOrLabel_.apply(this,p))}else this.replayImageOrLabel_.apply(this,p)}++C;break;case gs:const qe=d[1],Ye=d[2],Ze=d[3],Ke=d[4];Z=d[5];const He=d[6],Je=d[7],Qe=d[8];q=d[9];const ti=d[10];B=d[11],V=d[12];const ei=[d[13],d[13]];I=d[14]||"declutter";const ii=this.textStates[V],ri=ii.font,ni=[ii.scale[0]*Je,ii.scale[1]*Je];let si;ri in this.widths_?si=this.widths_[ri]:(si={},this.widths_[ri]=si);const oi=lineStringLength(v,qe,Ye,2),ai=Math.abs(ni[0])*measureAndCacheTextWidth(ri,B,si);if(Ke||ai<=oi){const d=drawTextOnPath(v,qe,Ye,2,B,(oi-ai)*horizontalTextAlign(B,this.textStates[V].textAlign),He,Math.abs(ni[0]),measureAndCacheTextWidth,ri,si,_e?0:this.viewRotation_);t:if(d){const p=[];let g,f,_,x,v;if(q)for(g=0,f=d.length;g<f;++g){v=d[g],_=v[4],x=this.createLabel(_,V,"",q),L=v[2]+(ni[0]<0?-ti:ti),A=Ze*x.height+2*(.5-Ze)*ti*ni[1]/ni[0]-Qe;const f=this.calculateImageOrLabelDimensions_(x.width,x.height,v[0],v[1],x.width,x.height,L,A,0,0,v[3],ei,!1,xn,!1,we);if(y&&"declutter"===I&&y.collides(f.declutterBox))break t;p.push([c,u,x,f,1,null,null])}if(Z)for(g=0,f=d.length;g<f;++g){v=d[g],_=v[4],x=this.createLabel(_,V,Z,""),L=v[2],A=Ze*x.height-Qe;const f=this.calculateImageOrLabelDimensions_(x.width,x.height,v[0],v[1],x.width,x.height,L,A,0,0,v[3],ei,!1,xn,!1,we);if(y&&"declutter"===I&&y.collides(f.declutterBox))break t;p.push([c,u,x,f,1,null,null])}y&&"none"!==I&&y.load(p.map(getDeclutterBox));for(let c=0,u=p.length;c<u;++c)this.replayImageOrLabel_.apply(this,p[c])}}++C;break;case fs:if(void 0!==f){we=d[1];const c=f(we,Pe,I);if(c)return c}++C;break;case _s:ve?J++:this.fill_(c),++C;break;case ys:for(K=d[1],T=d[2],Ce=v[K],Ee=v[K+1],c.moveTo(Ce,Ee),k=Ce+.5|0,O=Ee+.5|0,K+=2;K<T;K+=2)Ce=v[K],Ee=v[K+1],N=Ce+.5|0,G=Ee+.5|0,K!=T-2&&N===k&&G===O||(c.lineTo(Ce,Ee),k=N,O=G);++C;break;case xs:ft=d,this.alignAndScaleFill_=d[2],J&&(this.fill_(c),J=0,ct&&(c.stroke(),ct=0)),c.fillStyle=d[1],++C;break;case vs:pe=d,ct&&(c.stroke(),ct=0),this.setStrokeStyle_(c,d),++C;break;case Ss:ve?ct++:c.stroke(),++C;break;default:++C}}J&&this.fill_(c),ct&&c.stroke()}execute(c,u,d,p,g,f){this.viewRotation_=p,this.execute_(c,u,d,this.instructions,g,void 0,void 0,f)}executeHitDetection(c,u,d,p,g){return this.viewRotation_=d,this.execute_(c,[c.canvas.width,c.canvas.height],u,this.hitDetectionInstructions,!0,p,g)}}const Ns=["Polygon","Circle","LineString","Image","Text","Default"],Ds=["Image","Text"],Gs=Ns.filter((c=>!Ds.includes(c)));class ExecutorGroup{constructor(c,u,d,p,g,f,_){this.maxExtent_=c,this.overlaps_=p,this.pixelRatio_=d,this.resolution_=u,this.renderBuffer_=f,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(g,_)}clip(c,u){const d=this.getClipCoords(u);c.beginPath(),c.moveTo(d[0],d[1]),c.lineTo(d[2],d[3]),c.lineTo(d[4],d[5]),c.lineTo(d[6],d[7]),c.clip()}createExecutors_(c,u){for(const d in c){let p=this.executorsByZIndex_[d];void 0===p&&(p={},this.executorsByZIndex_[d]=p);const g=c[d];for(const c in g){const d=g[c];p[c]=new Executor(this.resolution_,this.pixelRatio_,this.overlaps_,d,u)}}}hasExecutors(c){for(const u in this.executorsByZIndex_){const d=this.executorsByZIndex_[u];for(let u=0,p=c.length;u<p;++u)if(c[u]in d)return!0}return!1}forEachFeatureAtCoordinate(c,u,d,p,g,f){const _=2*(p=Math.round(p))+1,y=compose(this.hitDetectionTransform_,p+.5,p+.5,1/u,-1/u,-d,-c[0],-c[1]),x=!this.hitDetectionContext_;x&&(this.hitDetectionContext_=createCanvasContext2D(_,_,void 0,{willReadFrequently:!0}));const v=this.hitDetectionContext_;let C;v.canvas.width!==_||v.canvas.height!==_?(v.canvas.width=_,v.canvas.height=_):x||v.clearRect(0,0,_,_),void 0!==this.renderBuffer_&&(C=[1/0,1/0,-1/0,-1/0],extendCoordinate(C,c),buffer(C,u*(this.renderBuffer_+p),C));const M=function getPixelIndexArray(c){if(void 0!==js[c])return js[c];const u=2*c+1,d=c*c,p=new Array(d+1);for(let g=0;g<=c;++g)for(let f=0;f<=c;++f){const _=g*g+f*f;if(_>d)break;let y=p[_];y||(y=[],p[_]=y),y.push(4*((c+g)*u+(c+f))+3),g>0&&y.push(4*((c-g)*u+(c+f))+3),f>0&&(y.push(4*((c+g)*u+(c-f))+3),g>0&&y.push(4*((c-g)*u+(c-f))+3))}const g=[];for(let c=0,u=p.length;c<u;++c)p[c]&&g.push(...p[c]);return js[c]=g,g}(p);let T;function featureCallback(c,u,d){const y=v.getImageData(0,0,_,_).data;for(let x=0,C=M.length;x<C;x++)if(y[M[x]]>0){if(!f||"none"===d||"Image"!==T&&"Text"!==T||f.includes(c)){const d=(M[x]-3)/4,f=p-d%_,y=p-(d/_|0),v=g(c,u,f*f+y*y);if(v)return v}v.clearRect(0,0,_,_);break}}const L=Object.keys(this.executorsByZIndex_).map(Number);let A,I,k,O,N;for(L.sort(ascending),A=L.length-1;A>=0;--A){const c=L[A].toString();for(k=this.executorsByZIndex_[c],I=Ns.length-1;I>=0;--I)if(T=Ns[I],O=k[T],void 0!==O&&(N=O.executeHitDetection(v,y,d,featureCallback,C),N))return N}}getClipCoords(c){const u=this.maxExtent_;if(!u)return null;const d=u[0],p=u[1],g=u[2],f=u[3],_=[d,p,d,f,g,f,g,p];return transform2D(_,0,8,2,c,_),_}isEmpty(){return isEmpty$1(this.executorsByZIndex_)}execute(c,u,d,p,g,f,_){const y=Object.keys(this.executorsByZIndex_).map(Number);y.sort(ascending),f=f||Ns;const x=Ns.length;let v,C,M,T,L;for(_&&y.reverse(),v=0,C=y.length;v<C;++v){const C=y[v].toString();for(L=this.executorsByZIndex_[C],M=0,T=f.length;M<T;++M){const C=f[M],T=L[C];if(void 0!==T){const f=null===_?void 0:T.getZIndexContext(),L=f?f.getContext():c,A=this.maxExtent_&&"Image"!==C&&"Text"!==C;if(A&&(L.save(),this.clip(L,d)),f&&"Text"!==C&&"Image"!==C?f.pushFunction((c=>T.execute(c,u,d,p,g,_))):T.execute(L,u,d,p,g,_),A&&L.restore(),f){f.offset();const c=y[v]*x+M;this.deferredZIndexContexts_[c]||(this.deferredZIndexContexts_[c]=[]),this.deferredZIndexContexts_[c].push(f)}}}}this.renderedContext_=c}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const c=this.deferredZIndexContexts_,u=Object.keys(c).map(Number).sort(ascending);for(let d=0,p=u.length;d<p;++d)c[u[d]].forEach((c=>{c.draw(this.renderedContext_),c.clear()})),c[u[d]].length=0}}const js={};class CanvasImmediateRenderer extends VectorContext{constructor(c,u,d,p,g,f,_){super(),this.context_=c,this.pixelRatio_=u,this.extent_=d,this.transform_=p,this.transformRotation_=p?toFixed(Math.atan2(p[1],p[0]),10):0,this.viewRotation_=g,this.squaredTolerance_=f,this.userTransform_=_,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(c,u,d,p){if(!this.image_)return;const g=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_),f=this.context_,_=this.tmpLocalTransform_,y=f.globalAlpha;1!=this.imageOpacity_&&(f.globalAlpha=y*this.imageOpacity_);let x=this.imageRotation_;0===this.transformRotation_&&(x-=this.viewRotation_),this.imageRotateWithView_&&(x+=this.viewRotation_);for(let c=0,u=g.length;c<u;c+=2){const u=g[c]-this.imageAnchorX_,d=g[c+1]-this.imageAnchorY_;if(0!==x||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const c=u+this.imageAnchorX_,p=d+this.imageAnchorY_;compose(_,c,p,1,1,x,-c,-p),f.save(),f.transform.apply(f,_),f.translate(c,p),f.scale(this.imageScale_[0],this.imageScale_[1]),f.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),f.restore()}else f.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,u,d,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(f.globalAlpha=y)}drawText_(c,u,d,p){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const g=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_),f=this.context_;let _=this.textRotation_;for(0===this.transformRotation_&&(_-=this.viewRotation_),this.textRotateWithView_&&(_+=this.viewRotation_);u<d;u+=p){const c=g[u]+this.textOffsetX_,d=g[u+1]+this.textOffsetY_;0!==_||1!=this.textScale_[0]||1!=this.textScale_[1]?(f.save(),f.translate(c-this.textOffsetX_,d-this.textOffsetY_),f.rotate(_),f.translate(this.textOffsetX_,this.textOffsetY_),f.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&f.strokeText(this.text_,0,0),this.textFillState_&&f.fillText(this.text_,0,0),f.restore()):(this.textStrokeState_&&f.strokeText(this.text_,c,d),this.textFillState_&&f.fillText(this.text_,c,d))}}moveToLineTo_(c,u,d,p,g){const f=this.context_,_=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_);f.moveTo(_[0],_[1]);let y=_.length;g&&(y-=2);for(let c=2;c<y;c+=2)f.lineTo(_[c],_[c+1]);return g&&f.closePath(),d}drawRings_(c,u,d,p){for(let g=0,f=d.length;g<f;++g)u=this.moveToLineTo_(c,u,d[g],p,!0);return u}drawCircle(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=function transformGeom2D(c,u,d){const p=c.getFlatCoordinates();if(!p)return null;const g=c.getStride();return transform2D(p,0,p.length,g,u,d)}(c,this.transform_,this.pixelCoordinates_),d=u[2]-u[0],p=u[3]-u[1],g=Math.sqrt(d*d+p*p),f=this.context_;f.beginPath(),f.arc(u[0],u[1],g,0,2*Math.PI),this.fillState_&&f.fill(),this.strokeState_&&f.stroke()}""!==this.text_&&this.drawText_(c.getCenter(),0,2,2)}}setStyle(c){this.setFillStrokeStyle(c.getFill(),c.getStroke()),this.setImageStyle(c.getImage()),this.setTextStyle(c.getText())}setTransform(c){this.transform_=c}drawGeometry(c){switch(c.getType()){case"Point":this.drawPoint(c);break;case"LineString":this.drawLineString(c);break;case"Polygon":this.drawPolygon(c);break;case"MultiPoint":this.drawMultiPoint(c);break;case"MultiLineString":this.drawMultiLineString(c);break;case"MultiPolygon":this.drawMultiPolygon(c);break;case"GeometryCollection":this.drawGeometryCollection(c);break;case"Circle":this.drawCircle(c)}}drawFeature(c,u){const d=u.getGeometryFunction()(c);d&&(this.setStyle(u),this.drawGeometry(d))}drawGeometryCollection(c){const u=c.getGeometriesArray();for(let c=0,d=u.length;c<d;++c)this.drawGeometry(u[c])}drawPoint(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getFlatCoordinates(),d=c.getStride();this.image_&&this.drawImages_(u,0,u.length,d),""!==this.text_&&this.drawText_(u,0,u.length,d)}drawMultiPoint(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getFlatCoordinates(),d=c.getStride();this.image_&&this.drawImages_(u,0,u.length,d),""!==this.text_&&this.drawText_(u,0,u.length,d)}drawLineString(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getFlatCoordinates();u.beginPath(),this.moveToLineTo_(d,0,d.length,c.getStride(),!1),u.stroke()}if(""!==this.text_){const u=c.getFlatMidpoint();this.drawText_(u,0,2,2)}}}drawMultiLineString(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getExtent();if(intersects$1(this.extent_,u)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getFlatCoordinates();let p=0;const g=c.getEnds(),f=c.getStride();u.beginPath();for(let c=0,u=g.length;c<u;++c)p=this.moveToLineTo_(d,p,g[c],f,!1);u.stroke()}if(""!==this.text_){const u=c.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}}drawPolygon(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=this.context_;u.beginPath(),this.drawRings_(c.getOrientedFlatCoordinates(),0,c.getEnds(),c.getStride()),this.fillState_&&u.fill(),this.strokeState_&&u.stroke()}if(""!==this.text_){const u=c.getFlatInteriorPoint();this.drawText_(u,0,2,2)}}}drawMultiPolygon(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getOrientedFlatCoordinates();let p=0;const g=c.getEndss(),f=c.getStride();u.beginPath();for(let c=0,u=g.length;c<u;++c){const u=g[c];p=this.drawRings_(d,p,u,f)}this.fillState_&&u.fill(),this.strokeState_&&u.stroke()}if(""!==this.text_){const u=c.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}}setContextFillState_(c){const u=this.context_,d=this.contextFillState_;d?d.fillStyle!=c.fillStyle&&(d.fillStyle=c.fillStyle,u.fillStyle=c.fillStyle):(u.fillStyle=c.fillStyle,this.contextFillState_={fillStyle:c.fillStyle})}setContextStrokeState_(c){const u=this.context_,d=this.contextStrokeState_;d?(d.lineCap!=c.lineCap&&(d.lineCap=c.lineCap,u.lineCap=c.lineCap),equals$2(d.lineDash,c.lineDash)||u.setLineDash(d.lineDash=c.lineDash),d.lineDashOffset!=c.lineDashOffset&&(d.lineDashOffset=c.lineDashOffset,u.lineDashOffset=c.lineDashOffset),d.lineJoin!=c.lineJoin&&(d.lineJoin=c.lineJoin,u.lineJoin=c.lineJoin),d.lineWidth!=c.lineWidth&&(d.lineWidth=c.lineWidth,u.lineWidth=c.lineWidth),d.miterLimit!=c.miterLimit&&(d.miterLimit=c.miterLimit,u.miterLimit=c.miterLimit),d.strokeStyle!=c.strokeStyle&&(d.strokeStyle=c.strokeStyle,u.strokeStyle=c.strokeStyle)):(u.lineCap=c.lineCap,u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset,u.lineJoin=c.lineJoin,u.lineWidth=c.lineWidth,u.miterLimit=c.miterLimit,u.strokeStyle=c.strokeStyle,this.contextStrokeState_={lineCap:c.lineCap,lineDash:c.lineDash,lineDashOffset:c.lineDashOffset,lineJoin:c.lineJoin,lineWidth:c.lineWidth,miterLimit:c.miterLimit,strokeStyle:c.strokeStyle})}setContextTextState_(c){const u=this.context_,d=this.contextTextState_,p=c.textAlign?c.textAlign:_n;d?(d.font!=c.font&&(d.font=c.font,u.font=c.font),d.textAlign!=p&&(d.textAlign=p,u.textAlign=p),d.textBaseline!=c.textBaseline&&(d.textBaseline=c.textBaseline,u.textBaseline=c.textBaseline)):(u.font=c.font,u.textAlign=p,u.textBaseline=c.textBaseline,this.contextTextState_={font:c.font,textAlign:p,textBaseline:c.textBaseline})}setFillStrokeStyle(c,u){if(c){const u=c.getColor();this.fillState_={fillStyle:asColorLike(u||dn)}}else this.fillState_=null;if(u){const c=u.getColor(),d=u.getLineCap(),p=u.getLineDash(),g=u.getLineDashOffset(),f=u.getLineJoin(),_=u.getWidth(),y=u.getMiterLimit(),x=p||gn;this.strokeState_={lineCap:void 0!==d?d:pn,lineDash:1===this.pixelRatio_?x:x.map((c=>c*this.pixelRatio_)),lineDashOffset:(g||0)*this.pixelRatio_,lineJoin:void 0!==f?f:mn,lineWidth:(void 0!==_?_:1)*this.pixelRatio_,miterLimit:void 0!==y?y:10,strokeStyle:asColorLike(c||fn)}}else this.strokeState_=null}setImageStyle(c){let u;if(!c||!(u=c.getSize()))return void(this.image_=null);const d=c.getPixelRatio(this.pixelRatio_),p=c.getAnchor(),g=c.getOrigin();this.image_=c.getImage(this.pixelRatio_),this.imageAnchorX_=p[0]*d,this.imageAnchorY_=p[1]*d,this.imageHeight_=u[1]*d,this.imageOpacity_=c.getOpacity(),this.imageOriginX_=g[0],this.imageOriginY_=g[1],this.imageRotateWithView_=c.getRotateWithView(),this.imageRotation_=c.getRotation();const f=c.getScaleArray();this.imageScale_=[f[0]*this.pixelRatio_/d,f[1]*this.pixelRatio_/d],this.imageWidth_=u[0]*d}setTextStyle(c){if(c){const u=c.getFill();if(u){const c=u.getColor();this.textFillState_={fillStyle:asColorLike(c||dn)}}else this.textFillState_=null;const d=c.getStroke();if(d){const c=d.getColor(),u=d.getLineCap(),p=d.getLineDash(),g=d.getLineDashOffset(),f=d.getLineJoin(),_=d.getWidth(),y=d.getMiterLimit();this.textStrokeState_={lineCap:void 0!==u?u:pn,lineDash:p||gn,lineDashOffset:g||0,lineJoin:void 0!==f?f:mn,lineWidth:void 0!==_?_:1,miterLimit:void 0!==y?y:10,strokeStyle:asColorLike(c||fn)}}else this.textStrokeState_=null;const p=c.getFont(),g=c.getOffsetX(),f=c.getOffsetY(),_=c.getRotateWithView(),y=c.getRotation(),x=c.getScaleArray(),v=c.getText(),C=c.getTextAlign(),M=c.getTextBaseline();this.textState_={font:void 0!==p?p:un,textAlign:void 0!==C?C:_n,textBaseline:void 0!==M?M:yn},this.text_=void 0!==v?Array.isArray(v)?v.reduce(((c,u,d)=>c+(d%2?" ":u)),""):v:"",this.textOffsetX_=void 0!==g?this.pixelRatio_*g:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0!==y?y:0,this.textScale_=[this.pixelRatio_*x[0],this.pixelRatio_*x[1]]}else this.text_=""}}var zs=Object.freeze({__proto__:null,Circle:Mn,Fill:Qr,Icon:Zn,IconImage:Jr,Image:rn,RegularShape:bn,Stroke:en,Style:Rn,Text:Ln});const Bs=.5;function createHitDetectionImageData(c,u,d,p,g,f,_,y,x){const v=x?toUserExtent(g,x):g,C=createCanvasContext2D(c[0]*Bs,c[1]*Bs);C.imageSmoothingEnabled=!1;const M=C.canvas,T=new CanvasImmediateRenderer(C,Bs,g,null,_,y,x?getTransformFromProjections(getUserProjection(),x):null),L=d.length,A=Math.floor(16777215/L),I={};for(let c=1;c<=L;++c){const u=d[c-1],g=u.getStyleFunction()||p;if(!g)continue;let _=g(u,f);if(!_)continue;Array.isArray(_)||(_=[_]);const y=(c*A).toString(16).padStart(7,"#00000");for(let c=0,d=_.length;c<d;++c){const d=_[c],p=d.getGeometryFunction()(u);if(!p||!intersects$1(v,p.getExtent()))continue;const g=d.clone(),f=g.getFill();f&&f.setColor(y);const x=g.getStroke();x&&(x.setColor(y),x.setLineDash(null)),g.setText(void 0);const C=d.getImage();if(C){const c=C.getImageSize();if(!c)continue;const u=createCanvasContext2D(c[0],c[1],void 0,{alpha:!1}),d=u.canvas;u.fillStyle=y,u.fillRect(0,0,d.width,d.height),g.setImage(new Zn({img:d,anchor:C.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:C.getOrigin(),opacity:1,size:C.getSize(),scale:C.getScale(),rotation:C.getRotation(),rotateWithView:C.getRotateWithView()}))}const M=g.getZIndex()||0;let T=I[M];T||(T={},I[M]=T,T.Polygon=[],T.Circle=[],T.LineString=[],T.Point=[]);const L=p.getType();if("GeometryCollection"===L){const c=p.getGeometriesArrayRecursive();for(let u=0,d=c.length;u<d;++u){const d=c[u];T[d.getType().replace("Multi","")].push(d,g)}}else T[L.replace("Multi","")].push(p,g)}}const k=Object.keys(I).map(Number).sort(ascending);for(let c=0,d=k.length;c<d;++c){const d=I[k[c]];for(const c in d){const p=d[c];for(let c=0,d=p.length;c<d;c+=2){T.setStyle(p[c+1]);for(let d=0,g=u.length;d<g;++d)T.setTransform(u[d]),T.drawGeometry(p[c])}}}return C.getImageData(0,0,M.width,M.height)}function hitDetect(c,u,d){const p=[];if(d){const g=Math.floor(Math.round(c[0])*Bs),f=Math.floor(Math.round(c[1])*Bs),_=4*(clamp(g,0,d.width-1)+clamp(f,0,d.height-1)*d.width),y=d.data[_],x=d.data[_+1],v=d.data[_+2]+256*(x+256*y),C=Math.floor(16777215/u.length);v&&v%C==0&&p.push(u[v/C-1])}return p}const Us=.5,$s={Point:function renderPointGeometry(c,u,d,p,g,f){const _=d.getImage(),y=d.getText(),x=y&&y.getText(),v=f&&_&&x?{}:void 0;if(_){if(_.getImageState()!=br.LOADED)return;const f=c.getBuilder(d.getZIndex(),"Image");f.setImageStyle(_,v),f.drawPoint(u,p,g)}if(x){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y,v),f.drawText(u,p,g)}},LineString:function renderLineStringGeometry(c,u,d,p,g){const f=d.getStroke();if(f){const _=c.getBuilder(d.getZIndex(),"LineString");_.setFillStrokeStyle(null,f),_.drawLineString(u,p,g)}const _=d.getText();if(_&&_.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(_),f.drawText(u,p,g)}},Polygon:function renderPolygonGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(f||_){const y=c.getBuilder(d.getZIndex(),"Polygon");y.setFillStrokeStyle(f,_),y.drawPolygon(u,p,g)}const y=d.getText();if(y&&y.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y),f.drawText(u,p,g)}},MultiPoint:function renderMultiPointGeometry(c,u,d,p,g,f){const _=d.getImage(),y=_&&0!==_.getOpacity(),x=d.getText(),v=x&&x.getText(),C=f&&y&&v?{}:void 0;if(y){if(_.getImageState()!=br.LOADED)return;const f=c.getBuilder(d.getZIndex(),"Image");f.setImageStyle(_,C),f.drawMultiPoint(u,p,g)}if(v){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(x,C),f.drawText(u,p,g)}},MultiLineString:function renderMultiLineStringGeometry(c,u,d,p,g){const f=d.getStroke();if(f){const _=c.getBuilder(d.getZIndex(),"LineString");_.setFillStrokeStyle(null,f),_.drawMultiLineString(u,p,g)}const _=d.getText();if(_&&_.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(_),f.drawText(u,p,g)}},MultiPolygon:function renderMultiPolygonGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(_||f){const y=c.getBuilder(d.getZIndex(),"Polygon");y.setFillStrokeStyle(f,_),y.drawMultiPolygon(u,p,g)}const y=d.getText();if(y&&y.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y),f.drawText(u,p,g)}},GeometryCollection:function renderGeometryCollectionGeometry(c,u,d,p,g,f){const _=u.getGeometriesArray();let y,x;for(y=0,x=_.length;y<x;++y){(0,$s[_[y].getType()])(c,_[y],d,p,g,f)}},Circle:function renderCircleGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(f||_){const y=c.getBuilder(d.getZIndex(),"Circle");y.setFillStrokeStyle(f,_),y.drawCircle(u,p,g)}const y=d.getText();if(y&&y.getText()){const g=c.getBuilder(d.getZIndex(),"Text");g.setTextStyle(y),g.drawText(u,p)}}};function defaultOrder(c,u){return parseInt(getUid(c),10)-parseInt(getUid(u),10)}function getSquaredTolerance(c,u){const d=getTolerance(c,u);return d*d}function getTolerance(c,u){return Us*c/u}function renderFeature(c,u,d,p,g,f,_,y){const x=[],v=d.getImage();if(v){let c=!0;const u=v.getImageState();u==br.LOADED||u==br.ERROR?c=!1:u==br.IDLE&&v.load(),c&&x.push(v.ready())}const C=d.getFill();C&&C.loading()&&x.push(C.ready());const M=x.length>0;return M&&Promise.all(x).then((()=>g(null))),function renderFeatureInternal(c,u,d,p,g,f,_){const y=d.getGeometryFunction()(u);if(!y)return;const x=y.simplifyTransformed(p,g),v=d.getRenderer();if(v)renderGeometry(c,x,d,u,_);else{(0,$s[x.getType()])(c,x,d,u,_,f)}}(c,u,d,p,f,_,y),M}function renderGeometry(c,u,d,p,g){if("GeometryCollection"==u.getType()){const f=u.getGeometries();for(let u=0,_=f.length;u<_;++u)renderGeometry(c,f[u],d,p,g);return}c.getBuilder(d.getZIndex(),"Default").drawCustom(u,p,d.getRenderer(),d.getHitDetectionRenderer(),g)}class CanvasVectorLayerRenderer extends CanvasLayerRenderer{constructor(c){super(c),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(c,u,d){const p=u.extent,g=u.viewState,f=g.center,_=g.resolution,y=g.projection,x=g.rotation,v=y.getExtent(),C=this.getLayer().getSource(),M=this.getLayer().getDeclutter(),T=u.pixelRatio,L=u.viewHints,A=!(L[Bn]||L[Un]),I=this.context,k=Math.round(getWidth(p)/_*T),O=Math.round(getHeight(p)/_*T),N=C.getWrapX()&&y.canWrapX(),G=N?getWidth(v):null,j=N?Math.ceil((p[2]-v[2])/G)+1:1;let B=N?Math.floor((p[0]-v[0])/G):0;do{let p=this.getRenderTransform(f,_,0,T,k,O,B*G);u.declutter&&(p=p.slice(0)),c.execute(I,[I.canvas.width,I.canvas.height],p,x,A,void 0===d?Ns:d?Ds:Gs,d?M&&u.declutter[M]:void 0)}while(++B<j)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=createCanvasContext2D(this.context.canvas.width,this.context.canvas.height,Ts))}resetDrawContext_(){if(1!==this.opacity_){const c=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=c,releaseCanvas$1(this.context),Ts.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(c){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,c,!0)}renderDeferredInternal(c){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(c,u){const d=c.layerStatesArray[c.layerIndex];this.opacity_=d.opacity;const p=c.viewState;this.prepareContainer(c,u);const g=this.context,f=this.replayGroup_;let _=f&&!f.isEmpty();if(!_){if(!(this.getLayer().hasListener(Sr)||this.getLayer().hasListener(wr)))return null}this.setDrawContext_(),this.preRender(g,c);const y=p.projection;if(this.clipped_=!1,_&&d.extent&&this.clipping){const u=fromUserExtent(d.extent,y);_=intersects$1(u,c.extent),this.clipped_=_&&!containsExtent(u,c.extent),this.clipped_&&this.clipUnrotated(g,c,u)}return _&&this.renderWorlds(f,c,!this.getLayer().getDeclutter()&&void 0),!c.declutter&&this.clipped_&&g.restore(),this.postRender(g,c),this.renderedRotation_!==p.rotation&&(this.renderedRotation_=p.rotation,this.hitDetectionImageData_=null),c.declutter||this.resetDrawContext_(),this.container}getFeatures(c){return new Promise((u=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const c=this.frameState.size.slice(),u=this.renderedCenter_,d=this.renderedResolution_,p=this.renderedRotation_,g=this.renderedProjection_,f=this.wrappedRenderedExtent_,_=this.getLayer(),y=[],x=c[0]*Bs,v=c[1]*Bs;y.push(this.getRenderTransform(u,d,p,Bs,x,v,0).slice());const C=_.getSource(),M=g.getExtent();if(C.getWrapX()&&g.canWrapX()&&!containsExtent(M,f)){let c=f[0];const g=getWidth(M);let _,C=0;for(;c<M[0];)--C,_=g*C,y.push(this.getRenderTransform(u,d,p,Bs,x,v,_).slice()),c+=g;for(C=0,c=f[2];c>M[2];)++C,_=g*C,y.push(this.getRenderTransform(u,d,p,Bs,x,v,_).slice()),c-=g}const T=getUserProjection();this.hitDetectionImageData_=createHitDetectionImageData(c,y,this.renderedFeatures_,_.getStyleFunction(),f,d,p,getSquaredTolerance(d,this.renderedPixelRatio_),T?g:null)}u(hitDetect(c,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(c,u,d,p,g){if(!this.replayGroup_)return;const f=u.viewState.resolution,_=u.viewState.rotation,y=this.getLayer(),x={},featureCallback=function(c,u,d){const f=getUid(c),_=x[f];if(_){if(!0!==_&&d<_.distanceSq){if(0===d)return x[f]=!0,g.splice(g.lastIndexOf(_),1),p(c,y,u);_.geometry=u,_.distanceSq=d}}else{if(0===d)return x[f]=!0,p(c,y,u);g.push(x[f]={feature:c,layer:y,geometry:u,distanceSq:d,callback:p})}};let v;const C=[this.replayGroup_],M=this.getLayer().getDeclutter();return C.some((p=>v=p.forEachFeatureAtCoordinate(c,f,_,d,featureCallback,M&&u.declutter[M]?u.declutter[M].all().map((c=>c.value)):null))),v}handleFontsChanged(){const c=this.getLayer();c.getVisible()&&this.replayGroup_&&c.changed()}handleStyleImageChange_(c){this.renderIfReadyAndVisible()}prepareFrame(c){const u=this.getLayer(),d=u.getSource();if(!d)return!1;const p=c.viewHints[Bn],g=c.viewHints[Un],f=u.getUpdateWhileAnimating(),_=u.getUpdateWhileInteracting();if(this.ready&&!f&&p||!_&&g)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const y=c.extent,x=c.viewState,v=x.projection,C=x.resolution,M=c.pixelRatio,T=u.getRevision(),L=u.getRenderBuffer();let A=u.getRenderOrder();void 0===A&&(A=defaultOrder);const I=x.center.slice(),k=buffer(y,L*C),O=k.slice(),N=[k.slice()],G=v.getExtent();if(d.getWrapX()&&v.canWrapX()&&!containsExtent(G,c.extent)){const c=getWidth(G),u=Math.max(getWidth(k)/2,c);k[0]=G[0]-u,k[2]=G[2]+u,wrapX$1(I,v);const d=wrapX$2(N[0],v);d[0]<G[0]&&d[2]<G[2]?N.push([d[0]+c,d[1],d[2]+c,d[3]]):d[0]>G[0]&&d[2]>G[2]&&N.push([d[0]-c,d[1],d[2]-c,d[3]])}if(this.ready&&this.renderedResolution_==C&&this.renderedRevision_==T&&this.renderedRenderOrder_==A&&this.renderedFrameDeclutter_===!!c.declutter&&containsExtent(this.wrappedRenderedExtent_,k))return equals$2(this.renderedExtent_,O)||(this.hitDetectionImageData_=null,this.renderedExtent_=O),this.renderedCenter_=I,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const j=new BuilderGroup(getTolerance(C,M),k,C,M),B=getUserProjection();let V;if(B){for(let c=0,u=N.length;c<u;++c){const u=toUserExtent(N[c],v);d.loadFeatures(u,toUserResolution(C,v),B)}V=getTransformFromProjections(B,v)}else for(let c=0,u=N.length;c<u;++c)d.loadFeatures(N[c],C,v);const q=getSquaredTolerance(C,M);let Z=!0;const render=(c,d)=>{let p;const g=c.getStyleFunction()||u.getStyleFunction();if(g&&(p=g(c,C)),p){const u=this.renderFeature(c,q,p,j,V,this.getLayer().getDeclutter(),d);Z=Z&&!u}},K=toUserExtent(k,v),J=d.getFeaturesInExtent(K);A&&J.sort(A);for(let c=0,u=J.length;c<u;++c)render(J[c],c);this.renderedFeatures_=J,this.ready=Z;const ct=j.finish(),ft=new ExecutorGroup(k,C,M,d.getOverlaps(),ct,u.getRenderBuffer(),!!c.declutter);return this.renderedResolution_=C,this.renderedRevision_=T,this.renderedRenderOrder_=A,this.renderedFrameDeclutter_=!!c.declutter,this.renderedExtent_=O,this.wrappedRenderedExtent_=k,this.renderedCenter_=I,this.renderedProjection_=v,this.renderedPixelRatio_=M,this.replayGroup_=ft,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(c,u,d,p,g,f,_){if(!d)return!1;let y=!1;if(Array.isArray(d))for(let x=0,v=d.length;x<v;++x)y=renderFeature(p,c,d[x],u,this.boundHandleStyleImageChange_,g,f,_)||y;else y=renderFeature(p,c,d,u,this.boundHandleStyleImageChange_,g,f,_);return y}}var Ws=class VectorLayer extends BaseVectorLayer{constructor(c){super(c)}createRenderer(){return new CanvasVectorLayerRenderer(this)}};class RBush{constructor(c){this.rbush_=new Yn(c),this.items_={}}insert(c,u){const d={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3],value:u};this.rbush_.insert(d),this.items_[getUid(u)]=d}load(c,u){const d=new Array(u.length);for(let p=0,g=u.length;p<g;p++){const g=c[p],f=u[p],_={minX:g[0],minY:g[1],maxX:g[2],maxY:g[3],value:f};d[p]=_,this.items_[getUid(f)]=_}this.rbush_.load(d)}remove(c){const u=getUid(c),d=this.items_[u];return delete this.items_[u],null!==this.rbush_.remove(d)}update(c,u){const d=this.items_[getUid(u)];equals$1([d.minX,d.minY,d.maxX,d.maxY],c)||(this.remove(u),this.insert(c,u))}getAll(){return this.rbush_.all().map((function(c){return c.value}))}getInExtent(c){const u={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]};return this.rbush_.search(u).map((function(c){return c.value}))}forEach(c){return this.forEach_(this.getAll(),c)}forEachInExtent(c,u){return this.forEach_(this.getInExtent(c),u)}forEach_(c,u){let d;for(let p=0,g=c.length;p<g;p++)if(d=u(c[p]),d)return d;return d}isEmpty(){return isEmpty$1(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(c){const u=this.rbush_.toJSON();return createOrUpdate$2(u.minX,u.minY,u.maxX,u.maxY,c)}concat(c){this.rbush_.load(c.rbush_.all());for(const u in c.items_)this.items_[u]=c.items_[u]}}class Circle extends sr{constructor(c,u,d){super(),void 0!==d&&void 0===u?this.setFlatCoordinates(d,c):(u=u||0,this.setCenterAndRadius(c,u,d))}clone(){const c=new Circle(this.flatCoordinates.slice(),void 0,this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){const g=this.flatCoordinates,f=c-g[0],_=u-g[1],y=f*f+_*_;if(y<p){if(0===y)for(let c=0;c<this.stride;++c)d[c]=g[c];else{const c=this.getRadius()/Math.sqrt(y);d[0]=g[0]+c*f,d[1]=g[1]+c*_;for(let c=2;c<this.stride;++c)d[c]=g[c]}return d.length=this.stride,y}return p}containsXY(c,u){const d=this.flatCoordinates,p=c-d[0],g=u-d[1];return p*p+g*g<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(c){const u=this.flatCoordinates,d=u[this.stride]-u[0];return createOrUpdate$2(u[0]-d,u[1]-d,u[0]+d,u[1]+d,c)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const c=this.flatCoordinates[this.stride]-this.flatCoordinates[0],u=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return c*c+u*u}getType(){return"Circle"}intersectsExtent(c){if(intersects$1(c,this.getExtent())){const u=this.getCenter();return c[0]<=u[0]&&c[2]>=u[0]||(c[1]<=u[1]&&c[3]>=u[1]||forEachCorner(c,this.intersectsCoordinate.bind(this)))}return!1}setCenter(c){const u=this.stride,d=this.flatCoordinates[u]-this.flatCoordinates[0],p=c.slice();p[u]=p[0]+d;for(let d=1;d<u;++d)p[u+d]=c[d];this.setFlatCoordinates(this.layout,p),this.changed()}setCenterAndRadius(c,u,d){this.setLayout(d,c,0),this.flatCoordinates||(this.flatCoordinates=[]);const p=this.flatCoordinates;let g=deflateCoordinate(p,0,c,this.stride);p[g++]=p[0]+u;for(let c=1,u=this.stride;c<u;++c)p[g++]=p[c];p.length=g,this.changed()}getCoordinates(){return null}setCoordinates(c,u){}setRadius(c){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+c,this.changed()}rotate(c,u){const d=this.getCenter(),p=this.getStride();this.setCenter(rotate(d,0,d.length,p,c,u,d)),this.changed()}}Circle.prototype.transform;var Xs=Circle;class GeometryCollection extends nr{constructor(c){super(),this.geometries_=c,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(unlistenByKey),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const c=this.geometries_;for(let u=0,d=c.length;u<d;++u)this.changeEventsKeys_.push(listen(c[u],_i,this.changed,this))}clone(){const c=new GeometryCollection(cloneGeometries(this.geometries_));return c.applyProperties(this),c}closestPointXY(c,u,d,p){if(p<closestSquaredDistanceXY(this.getExtent(),c,u))return p;const g=this.geometries_;for(let f=0,_=g.length;f<_;++f)p=g[f].closestPointXY(c,u,d,p);return p}containsXY(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)if(d[p].containsXY(c,u))return!0;return!1}computeExtent(c){createOrUpdateEmpty(c);const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)extend$2(c,u[d].getExtent());return c}getGeometries(){return cloneGeometries(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let c=[];const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)u[d].getType()===this.getType()?c=c.concat(u[d].getGeometriesArrayRecursive()):c.push(u[d]);return c}getSimplifiedGeometry(c){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),c<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&c<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const u=[],d=this.geometries_;let p=!1;for(let g=0,f=d.length;g<f;++g){const f=d[g],_=f.getSimplifiedGeometry(c);u.push(_),_!==f&&(p=!0)}if(p){return new GeometryCollection(u)}return this.simplifiedGeometryMaxMinSquaredTolerance=c,this}getType(){return"GeometryCollection"}intersectsExtent(c){const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)if(u[d].intersectsExtent(c))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)d[p].rotate(c,u);this.changed()}scale(c,u,d){d||(d=getCenter(this.getExtent()));const p=this.geometries_;for(let g=0,f=p.length;g<f;++g)p[g].scale(c,u,d);this.changed()}setGeometries(c){this.setGeometriesArray(cloneGeometries(c))}setGeometriesArray(c){this.unlistenGeometriesChange_(),this.geometries_=c,this.listenGeometriesChange_(),this.changed()}applyTransform(c){const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)u[d].applyTransform(c);this.changed()}translate(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)d[p].translate(c,u);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function cloneGeometries(c){return c.map((c=>c.clone()))}var Vs=GeometryCollection;class MultiLineString extends sr{constructor(c,u,d){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(c[0]))this.setCoordinates(c,u);else if(void 0!==u&&d)this.setFlatCoordinates(u,c),this.ends_=d;else{const u=c,d=[],p=[];for(let c=0,g=u.length;c<g;++c){extend$3(d,u[c].getFlatCoordinates()),p.push(d.length)}const g=0===u.length?this.getLayout():u[0].getLayout();this.setFlatCoordinates(g,d),this.ends_=p}}appendLineString(c){extend$3(this.flatCoordinates,c.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const c=new MultiLineString(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,c,u,d,p))}getCoordinateAtM(c,u,d){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(u=void 0!==u&&u,d=void 0!==d&&d,function lineStringsCoordinateAtM(c,u,d,p,g,f,_){if(_)return lineStringCoordinateAtM(c,u,d[d.length-1],p,g,f);let y;if(g<c[p-1])return f?(y=c.slice(0,p),y[p-1]=g,y):null;if(c[c.length-1]<g)return f?(y=c.slice(c.length-p),y[p-1]=g,y):null;for(let f=0,_=d.length;f<_;++f){const _=d[f];if(u!=_){if(g<c[u+p-1])return null;if(g<=c[_-1])return lineStringCoordinateAtM(c,u,_,p,g,!1);u=_}}return null}(this.flatCoordinates,0,this.ends_,this.stride,c,u,d))}getCoordinates(){return inflateCoordinatesArray(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(c){return c<0||this.ends_.length<=c?null:new tn(this.flatCoordinates.slice(0===c?0:this.ends_[c-1],this.ends_[c]),this.layout)}getLineStrings(){const c=this.flatCoordinates,u=this.ends_,d=this.layout,p=[];let g=0;for(let f=0,_=u.length;f<_;++f){const _=u[f],y=new tn(c.slice(g,_),d);p.push(y),g=_}return p}getFlatMidpoints(){const c=[],u=this.flatCoordinates;let d=0;const p=this.ends_,g=this.stride;for(let f=0,_=p.length;f<_;++f){const _=p[f];extend$3(c,interpolatePoint(u,d,_,g,.5)),d=_}return c}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=douglasPeuckerArray(this.flatCoordinates,0,this.ends_,this.stride,c,u,0,d),new MultiLineString(u,"XY",d)}getType(){return"MultiLineString"}intersectsExtent(c){return function intersectsLineStringArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){if(intersectsLineString(c,u,d[f],p,g))return!0;u=d[f]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,2),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.ends_);this.flatCoordinates.length=0===d.length?0:d[d.length-1],this.changed()}}var qs=MultiLineString;class MultiPoint extends sr{constructor(c,u){super(),u&&!Array.isArray(c[0])?this.setFlatCoordinates(u,c):this.setCoordinates(c,u)}appendPoint(c){extend$3(this.flatCoordinates,c.getFlatCoordinates()),this.changed()}clone(){const c=new MultiPoint(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){if(p<closestSquaredDistanceXY(this.getExtent(),c,u))return p;const g=this.flatCoordinates,f=this.stride;for(let _=0,y=g.length;_<y;_+=f){const y=squaredDistance(c,u,g[_],g[_+1]);if(y<p){p=y;for(let c=0;c<f;++c)d[c]=g[_+c];d.length=f}}return p}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(c){const u=this.flatCoordinates.length/this.stride;return c<0||u<=c?null:new ar(this.flatCoordinates.slice(c*this.stride,(c+1)*this.stride),this.layout)}getPoints(){const c=this.flatCoordinates,u=this.layout,d=this.stride,p=[];for(let g=0,f=c.length;g<f;g+=d){const f=new ar(c.slice(g,g+d),u);p.push(f)}return p}getType(){return"MultiPoint"}intersectsExtent(c){const u=this.flatCoordinates,d=this.stride;for(let p=0,g=u.length;p<g;p+=d){if(containsXY(c,u[p],u[p+1]))return!0}return!1}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var Ys=MultiPoint;function linearRingss(c,u,d,p){const g=[];let f=[1/0,1/0,-1/0,-1/0];for(let _=0,y=d.length;_<y;++_){const y=d[_];f=createOrUpdateFromFlatCoordinates(c,u,y[0],p),g.push((f[0]+f[2])/2,(f[1]+f[3])/2),u=y[y.length-1]}return g}class MultiPolygon extends sr{constructor(c,u,d){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!d&&!Array.isArray(c[0])){const p=c,g=[],f=[];for(let c=0,u=p.length;c<u;++c){const u=p[c],d=g.length,_=u.getEnds();for(let c=0,u=_.length;c<u;++c)_[c]+=d;extend$3(g,u.getFlatCoordinates()),f.push(_)}u=0===p.length?this.getLayout():p[0].getLayout(),c=g,d=f}void 0!==u&&d?(this.setFlatCoordinates(u,c),this.endss_=d):this.setCoordinates(c,u)}appendPolygon(c){let u;if(this.flatCoordinates){const d=this.flatCoordinates.length;extend$3(this.flatCoordinates,c.getFlatCoordinates()),u=c.getEnds().slice();for(let c=0,p=u.length;c<p;++c)u[c]+=d}else this.flatCoordinates=c.getFlatCoordinates().slice(),u=c.getEnds().slice(),this.endss_.push();this.endss_.push(u),this.changed()}clone(){const c=this.endss_.length,u=new Array(c);for(let d=0;d<c;++d)u[d]=this.endss_[d].slice();const d=new MultiPolygon(this.flatCoordinates.slice(),this.layout,u);return d.applyProperties(this),d}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function multiArrayMaxSquaredDelta(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];g=arrayMaxSquaredDelta(c,u,_,p,g),u=_[_.length-1]}return g}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function assignClosestMultiArrayPoint(c,u,d,p,g,f,_,y,x,v,C){C=C||[NaN,NaN];for(let M=0,T=d.length;M<T;++M){const T=d[M];v=assignClosestArrayPoint(c,u,T,p,g,f,_,y,x,v,C),u=T[T.length-1]}return v}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,c,u,d,p))}containsXY(c,u){return function linearRingssContainsXY(c,u,d,p,g,f){if(0===d.length)return!1;for(let _=0,y=d.length;_<y;++_){const y=d[_];if(linearRingsContainsXY(c,u,y,p,g,f))return!0;u=y[y.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c,u)}getArea(){return function linearRingss$1(c,u,d,p){let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f];g+=linearRings(c,u,_,p),u=_[_.length-1]}return g}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(c){let u;return void 0!==c?(u=this.getOrientedFlatCoordinates().slice(),orientLinearRingsArray(u,0,this.endss_,this.stride,c)):u=this.flatCoordinates,inflateMultiCoordinatesArray(u,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const c=linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Ys(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const c=this.flatCoordinates;linearRingssAreOriented(c,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=c:(this.orientedFlatCoordinates_=c.slice(),this.orientedFlatCoordinates_.length=orientLinearRingsArray(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=function quantizeMultiArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x],C=[];_=quantizeArray(c,u,v,p,g,f,_,C),y.push(C),u=v[v.length-1]}return _}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(c),u,0,d),new MultiPolygon(u,"XY",d)}getPolygon(c){if(c<0||this.endss_.length<=c)return null;let u;if(0===c)u=0;else{const d=this.endss_[c-1];u=d[d.length-1]}const d=this.endss_[c].slice(),p=d[d.length-1];if(0!==u)for(let c=0,p=d.length;c<p;++c)d[c]-=u;return new lr(this.flatCoordinates.slice(u,p),this.layout,d)}getPolygons(){const c=this.layout,u=this.flatCoordinates,d=this.endss_,p=[];let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f].slice(),y=_[_.length-1];if(0!==g)for(let c=0,u=_.length;c<u;++c)_[c]-=g;const x=new lr(u.slice(g,y),c,_);p.push(x),g=y}return p}getType(){return"MultiPolygon"}intersectsExtent(c){return function intersectsLinearRingMultiArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];if(intersectsLinearRingArray(c,u,_,p,g))return!0;u=_[_.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,3),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateMultiCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.endss_);if(0===d.length)this.flatCoordinates.length=0;else{const c=d[d.length-1];this.flatCoordinates.length=0===c.length?0:c[c.length-1]}this.changed()}}var Zs=MultiPolygon,Ks=Object.freeze({__proto__:null,Circle:Xs,Geometry:nr,GeometryCollection:Vs,LineString:tn,LinearRing:or,MultiLineString:qs,MultiPoint:Ys,MultiPolygon:Zs,Point:ar,Polygon:lr,SimpleGeometry:sr});const Hs=[1,0,0,1,0,0];class RenderFeature{constructor(c,u,d,p,g,f){this.styleFunction,this.extent_,this.id_=f,this.type_=c,this.flatCoordinates_=u,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=d||null,this.properties_=g,this.squaredTolerance_,this.stride_=p,this.simplifiedGeometry_}get(c){return this.properties_[c]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?createOrUpdateFromCoordinate(this.flatCoordinates_):createOrUpdateFromFlatCoordinates(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const c=getCenter(this.getExtent());this.flatInteriorPoints_=getInteriorPointOfArray(this.flatCoordinates_,0,this.ends_,2,c,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const c=inflateEnds(this.flatCoordinates_,this.ends_),u=linearRingss(this.flatCoordinates_,0,c,2);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.flatCoordinates_,0,c,2,u)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=interpolatePoint(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const c=this.flatCoordinates_;let u=0;const d=this.ends_;for(let p=0,g=d.length;p<g;++p){const g=d[p],f=interpolatePoint(c,u,g,2,.5);extend$3(this.flatMidpoints_,f),u=g}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(c){return this}simplifyTransformed(c,u){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(c){const u=(c=get$2(c)).getExtent(),d=c.getWorldExtent();if(u&&d){const c=getHeight(d)/getHeight(u);compose(Hs,d[0],d[3],c,-c,0,0,0),transform2D(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Hs,this.flatCoordinates_)}}applyTransform(c){c(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new RenderFeature(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=memoizeOne(((c,u)=>{if(c===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),u&&this.simplifiedGeometry_.applyTransform(u);const d=this.simplifiedGeometry_.getFlatCoordinates();let p;switch(this.type_){case"LineString":d.length=douglasPeucker(d,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,c,d,0),p=[d.length];break;case"MultiLineString":p=[],d.length=douglasPeuckerArray(d,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,c,d,0,p);break;case"Polygon":p=[],d.length=quantizeArray(d,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(c),d,0,p)}return p&&(this.simplifiedGeometry_=new RenderFeature(this.type_,d,p,2,this.properties_,this.id_)),this.squaredTolerance_=c,this.simplifiedGeometry_})),this}}RenderFeature.prototype.getFlatCoordinates=RenderFeature.prototype.getOrientedFlatCoordinates;function adaptAttributions(c){return c?"function"==typeof c?c:(Array.isArray(c)||(c=[c]),u=>c):null}var Js=class Source extends Ri{constructor(c){super(),this.projection=get$2(c.projection),this.attributions_=adaptAttributions(c.attributions),this.attributionsCollapsible_=c.attributionsCollapsible??!0,this.loading=!1,this.state_=void 0!==c.state?c.state:"ready",this.wrapX_=void 0!==c.wrapX&&c.wrapX,this.interpolate_=!!c.interpolate,this.viewResolver=null,this.viewRejector=null;const u=this;this.viewPromise_=new Promise((function(c,d){u.viewResolver=c,u.viewRejector=d}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(c){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(c){this.attributions_=adaptAttributions(c),this.changed()}setState(c){this.state_=c,this.changed()}},Qs="addfeature",to="changefeature",eo="clear",io="removefeature",ro="featuresloadstart",no="featuresloadend",so="featuresloaderror";function all$1(c,u){return[[-1/0,-1/0,1/0,1/0]]}let oo=!1;function loadFeaturesXhr(c,u,d,p,g,f,_){const y=new XMLHttpRequest;y.open("GET","function"==typeof c?c(d,p,g):c,!0),"arraybuffer"==u.getType()&&(y.responseType="arraybuffer"),y.withCredentials=oo,y.onload=function(c){if(!y.status||y.status>=200&&y.status<300){const c=u.getType();try{let p;"text"==c||"json"==c?p=y.responseText:"xml"==c?p=y.responseXML||y.responseText:"arraybuffer"==c&&(p=y.response),p?f(u.readFeatures(p,{extent:d,featureProjection:g}),u.readProjection(p)):_()}catch{_()}}else _()},y.onerror=_,y.send()}function xhr(c,u){return function(d,p,g,f,_){const y=this;loadFeaturesXhr(c,u,d,p,g,(function(c,u){y.addFeatures(c),void 0!==f&&f(c)}),_||VOID)}}class VectorSourceEvent extends BaseEvent{constructor(c,u,d){super(c),this.feature=u,this.features=d}}var ao=class VectorSource extends Js{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===c.wrapX||c.wrapX}),this.on,this.once,this.un,this.loader_=VOID,this.format_=c.format||null,this.overlaps_=void 0===c.overlaps||c.overlaps,this.url_=c.url,void 0!==c.loader?this.loader_=c.loader:void 0!==this.url_&&(assert(this.format_,"`format` must be set when `url` is set"),this.loader_=xhr(this.url_,this.format_)),this.strategy_=void 0!==c.strategy?c.strategy:all$1;const u=void 0===c.useSpatialIndex||c.useSpatialIndex;let d,p;this.featuresRtree_=u?new RBush:null,this.loadedExtentsRtree_=new RBush,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(c.features)?p=c.features:c.features&&(d=c.features,p=d.getArray()),u||void 0!==d||(d=new Fi(p)),void 0!==p&&this.addFeaturesInternal(p),void 0!==d&&this.bindFeaturesCollection_(d)}addFeature(c){this.addFeatureInternal(c),this.changed()}addFeatureInternal(c){const u=getUid(c);if(!this.addToIndex_(u,c))return void(this.featuresCollection_&&this.featuresCollection_.remove(c));this.setupChangeEvents_(u,c);const d=c.getGeometry();if(d){const u=d.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(u,c)}else this.nullGeometryFeatures_[u]=c;this.dispatchEvent(new VectorSourceEvent(Qs,c))}setupChangeEvents_(c,u){u instanceof RenderFeature||(this.featureChangeKeys_[c]=[listen(u,_i,this.handleFeatureChange_,this),listen(u,mi,this.handleFeatureChange_,this)])}addToIndex_(c,u){let d=!0;if(void 0!==u.getId()){const c=String(u.getId());if(c in this.idIndex_)if(u instanceof RenderFeature){const p=this.idIndex_[c];p instanceof RenderFeature?Array.isArray(p)?p.push(u):this.idIndex_[c]=[p,u]:d=!1}else d=!1;else this.idIndex_[c]=u}return d&&(assert(!(c in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[c]=u),d}addFeatures(c){this.addFeaturesInternal(c),this.changed()}addFeaturesInternal(c){const u=[],d=[],p=[];for(let u=0,p=c.length;u<p;u++){const p=c[u],g=getUid(p);this.addToIndex_(g,p)&&d.push(p)}for(let c=0,g=d.length;c<g;c++){const g=d[c],f=getUid(g);this.setupChangeEvents_(f,g);const _=g.getGeometry();if(_){const c=_.getExtent();u.push(c),p.push(g)}else this.nullGeometryFeatures_[f]=g}if(this.featuresRtree_&&this.featuresRtree_.load(u,p),this.hasListener(Qs))for(let c=0,u=d.length;c<u;c++)this.dispatchEvent(new VectorSourceEvent(Qs,d[c]))}bindFeaturesCollection_(c){let u=!1;this.addEventListener(Qs,(function(d){u||(u=!0,c.push(d.feature),u=!1)})),this.addEventListener(io,(function(d){u||(u=!0,c.remove(d.feature),u=!1)})),c.addEventListener(Li,(c=>{u||(u=!0,this.addFeature(c.element),u=!1)})),c.addEventListener(Ai,(c=>{u||(u=!0,this.removeFeature(c.element),u=!1)})),this.featuresCollection_=c}clear(c){if(c){for(const c in this.featureChangeKeys_){this.featureChangeKeys_[c].forEach(unlistenByKey)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const removeAndIgnoreReturn=c=>{this.removeFeatureInternal(c)};this.featuresRtree_.forEach(removeAndIgnoreReturn);for(const c in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[c])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const u=new VectorSourceEvent(eo);this.dispatchEvent(u),this.changed()}forEachFeature(c){if(this.featuresRtree_)return this.featuresRtree_.forEach(c);this.featuresCollection_&&this.featuresCollection_.forEach(c)}forEachFeatureAtCoordinateDirect(c,u){const d=[c[0],c[1],c[0],c[1]];return this.forEachFeatureInExtent(d,(function(d){const p=d.getGeometry();if(p instanceof RenderFeature||p.intersectsCoordinate(c))return u(d)}))}forEachFeatureInExtent(c,u){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(c,u);this.featuresCollection_&&this.featuresCollection_.forEach(u)}forEachFeatureIntersectingExtent(c,u){return this.forEachFeatureInExtent(c,(function(d){const p=d.getGeometry();if(p instanceof RenderFeature||p.intersectsExtent(c)){const c=u(d);if(c)return c}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let c;return this.featuresCollection_?c=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(c=this.featuresRtree_.getAll(),isEmpty$1(this.nullGeometryFeatures_)||extend$3(c,Object.values(this.nullGeometryFeatures_))),c}getFeaturesAtCoordinate(c){const u=[];return this.forEachFeatureAtCoordinateDirect(c,(function(c){u.push(c)})),u}getFeaturesInExtent(c,u){if(this.featuresRtree_){if(!(u&&u.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(c);const d=wrapAndSliceX(c,u);return[].concat(...d.map((c=>this.featuresRtree_.getInExtent(c))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(c,u){const d=c[0],p=c[1];let g=null;const f=[NaN,NaN];let _=1/0;const y=[-1/0,-1/0,1/0,1/0];return u=u||TRUE,this.featuresRtree_.forEachInExtent(y,(function(c){if(u(c)){const u=c.getGeometry(),x=_;if(_=u instanceof RenderFeature?0:u.closestPointXY(d,p,f,_),_<x){g=c;const u=Math.sqrt(_);y[0]=d-u,y[1]=p-u,y[2]=d+u,y[3]=p+u}}})),g}getExtent(c){return this.featuresRtree_.getExtent(c)}getFeatureById(c){const u=this.idIndex_[c.toString()];return void 0!==u?u:null}getFeatureByUid(c){const u=this.uidIndex_[c];return void 0!==u?u:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(c){const u=c.target,d=getUid(u),p=u.getGeometry();if(p){const c=p.getExtent();d in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[d],this.featuresRtree_&&this.featuresRtree_.insert(c,u)):this.featuresRtree_&&this.featuresRtree_.update(c,u)}else d in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(u),this.nullGeometryFeatures_[d]=u);const g=u.getId();if(void 0!==g){const c=g.toString();this.idIndex_[c]!==u&&(this.removeFromIdIndex_(u),this.idIndex_[c]=u)}else this.removeFromIdIndex_(u),this.uidIndex_[d]=u;this.changed(),this.dispatchEvent(new VectorSourceEvent(to,u))}hasFeature(c){const u=c.getId();return void 0!==u?u in this.idIndex_:getUid(c)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&isEmpty$1(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(c,u,d){const p=this.loadedExtentsRtree_,g=this.strategy_(c,u,d);for(let c=0,f=g.length;c<f;++c){const f=g[c];p.forEachInExtent(f,(function(c){return containsExtent(c.extent,f)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(ro)),this.loader_.call(this,f,u,d,(c=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(no,void 0,c))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(so))})),p.insert(f,{extent:f.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(c){const u=this.loadedExtentsRtree_;let d;u.forEachInExtent(c,(function(u){if(equals$1(u.extent,c))return d=u,!0})),d&&u.remove(d)}removeFeatures(c){let u=!1;for(let d=0,p=c.length;d<p;++d)u=this.removeFeatureInternal(c[d])||u;u&&this.changed()}removeFeature(c){if(!c)return;this.removeFeatureInternal(c)&&this.changed()}removeFeatureInternal(c){const u=getUid(c);if(!(u in this.uidIndex_))return!1;u in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[u]:this.featuresRtree_&&this.featuresRtree_.remove(c);const d=this.featureChangeKeys_[u];d?.forEach(unlistenByKey),delete this.featureChangeKeys_[u];const p=c.getId();if(void 0!==p){const u=p.toString(),d=this.idIndex_[u];d===c?delete this.idIndex_[u]:Array.isArray(d)&&(d.splice(d.indexOf(c),1),1===d.length&&(this.idIndex_[u]=d[0]))}return delete this.uidIndex_[u],this.hasListener(io)&&this.dispatchEvent(new VectorSourceEvent(io,c)),!0}removeFromIdIndex_(c){for(const u in this.idIndex_)if(this.idIndex_[u]===c){delete this.idIndex_[u];break}}setLoader(c){this.loader_=c}setUrl(c){assert(this.format_,"`format` must be set when `url` is set"),this.url_=c,this.setLoader(xhr(c,this.format_))}};function line(c,u,d){const p=[];let g=c(0),f=c(1),_=u(g),y=u(f);const x=[f,g],v=[y,_],C=[1,0],M={};let T,L,A,I,k,O,N=1e5;for(;--N>0&&C.length>0;)A=C.pop(),g=x.pop(),_=v.pop(),O=A.toString(),O in M||(p.push(_[0],_[1]),M[O]=!0),I=C.pop(),f=x.pop(),y=v.pop(),k=(A+I)/2,T=c(k),L=u(T),squaredSegmentDistance(L[0],L[1],_[0],_[1],y[0],y[1])<d?(p.push(y[0],y[1]),O=I.toString(),M[O]=!0):(C.push(I,k,k,A),v.push(y,L,L,_),x.push(f,T,T,g));return p}const lo=new en({color:"rgba(0,0,0,0.2)"}),ho=[90,45,30,20,10,5,2,1,.5,20/60,10/60,5/60,2/60,1/60,30/3600,20/3600,10/3600,5/3600,2/3600,1/3600];var co=class Graticule extends Ws{constructor(c){c=c||{};const u=Object.assign({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},c);delete u.maxLines,delete u.strokeStyle,delete u.targetSize,delete u.showLabels,delete u.lonLabelFormatter,delete u.latLabelFormatter,delete u.lonLabelPosition,delete u.latLabelPosition,delete u.lonLabelStyle,delete u.latLabelStyle,delete u.intervals,super(u),this.projection_=null,this.maxLat_=1/0,this.maxLon_=1/0,this.minLat_=-1/0,this.minLon_=-1/0,this.maxX_=1/0,this.maxY_=1/0,this.minX_=-1/0,this.minY_=-1/0,this.targetSize_=void 0!==c.targetSize?c.targetSize:100,this.maxLines_=void 0!==c.maxLines?c.maxLines:100,this.meridians_=[],this.parallels_=[],this.strokeStyle_=void 0!==c.strokeStyle?c.strokeStyle:lo,this.fromLonLatTransform_=void 0,this.toLonLatTransform_=void 0,this.projectionCenterLonLat_=null,this.bottomLeft_=null,this.bottomRight_=null,this.topLeft_=null,this.topRight_=null,this.meridiansLabels_=null,this.parallelsLabels_=null,c.showLabels&&(this.lonLabelFormatter_=null==c.lonLabelFormatter?degreesToStringHDMS.bind(this,"EW"):c.lonLabelFormatter,this.latLabelFormatter_=null==c.latLabelFormatter?degreesToStringHDMS.bind(this,"NS"):c.latLabelFormatter,this.lonLabelPosition_=null==c.lonLabelPosition?0:c.lonLabelPosition,this.latLabelPosition_=null==c.latLabelPosition?1:c.latLabelPosition,this.lonLabelStyleBase_=new Rn({text:void 0!==c.lonLabelStyle?c.lonLabelStyle.clone():new Ln({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Qr({color:"rgba(0,0,0,1)"}),stroke:new en({color:"rgba(255,255,255,1)",width:3})})}),this.lonLabelStyle_=c=>{const u=c.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(u),this.lonLabelStyleBase_},this.latLabelStyleBase_=new Rn({text:void 0!==c.latLabelStyle?c.latLabelStyle.clone():new Ln({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Qr({color:"rgba(0,0,0,1)"}),stroke:new en({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=c=>{const u=c.get("graticule_label");return this.latLabelStyleBase_.getText().setText(u),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(wr,this.drawLabels_.bind(this))),this.intervals_=void 0!==c.intervals?c.intervals:ho,this.setSource(new ao({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new Fi,overlaps:!1,useSpatialIndex:!1,wrapX:c.wrapX})),this.featurePool_=[],this.lineStyle_=new Rn({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(c,u){let d=c.slice();return this.projection_&&this.getSource().getWrapX()&&wrapX$2(d,this.projection_),this.loadedExtent_&&(!function approximatelyEquals(c,u,d){return Math.abs(c[0]-u[0])<d&&Math.abs(c[2]-u[2])<d&&Math.abs(c[1]-u[1])<d&&Math.abs(c[3]-u[3])<d}(this.loadedExtent_,d,u)?this.getSource().removeLoadedExtent(this.loadedExtent_):d=this.loadedExtent_.slice()),[d]}loaderFunction(c,u,d){this.loadedExtent_=c;const p=this.getSource(),g=getIntersection(this.getExtent()||[-1/0,-1/0,1/0,1/0],c);if(this.renderedExtent_&&equals$1(this.renderedExtent_,g)&&this.renderedResolution_===u)return;if(this.renderedExtent_=g,this.renderedResolution_=u,isEmpty(g))return;const f=getCenter(g),_=u*u/4;(!this.projection_||!equivalent(this.projection_,d))&&this.updateProjectionInfo_(d),this.createGraticule_(g,f,u,_);let y,x=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(x+=this.meridians_.length),this.parallelsLabels_&&(x+=this.parallels_.length);x>this.featurePool_.length;)y=new ki,this.featurePool_.push(y);const v=p.getFeaturesCollection();v.clear();let C,M,T=0;for(C=0,M=this.meridians_.length;C<M;++C)y=this.featurePool_[T++],y.setGeometry(this.meridians_[C]),y.setStyle(this.lineStyle_),v.push(y);for(C=0,M=this.parallels_.length;C<M;++C)y=this.featurePool_[T++],y.setGeometry(this.parallels_[C]),y.setStyle(this.lineStyle_),v.push(y)}addMeridian_(c,u,d,p,g,f){const _=this.getMeridian_(c,u,d,p,f);if(intersects$1(_.getExtent(),g)){if(this.meridiansLabels_){const u=this.lonLabelFormatter_(c);f in this.meridiansLabels_?this.meridiansLabels_[f].text=u:this.meridiansLabels_[f]={geom:new ar([]),text:u}}this.meridians_[f++]=_}return f}addParallel_(c,u,d,p,g,f){const _=this.getParallel_(c,u,d,p,f);if(intersects$1(_.getExtent(),g)){if(this.parallelsLabels_){const u=this.latLabelFormatter_(c);f in this.parallelsLabels_?this.parallelsLabels_[f].text=u:this.parallelsLabels_[f]={geom:new ar([]),text:u}}this.parallels_[f++]=_}return f}drawLabels_(c){const u=c.frameState.viewState.rotation,d=c.frameState.viewState.resolution,p=c.frameState.size,g=c.frameState.extent,f=getCenter(g);let _=g;if(u){const c=p[0]*d,u=p[1]*d;_=[f[0]-c/2,f[1]-u/2,f[0]+c/2,f[1]+u/2]}let y=0,x=0,v=this.latLabelPosition_<.5;const C=this.projection_.getExtent(),M=getWidth(C);if(this.getSource().getWrapX()&&this.projection_.canWrapX()&&!containsExtent(C,g)){y=Math.floor((g[0]-C[0])/M),x=Math.ceil((g[2]-C[2])/M);v=v!==Math.abs(u)>Math.PI/2}const T=function getVectorContext(c){if(!(c.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const u=c.inversePixelTransform[0],d=c.inversePixelTransform[1],p=Math.sqrt(u*u+d*d),g=c.frameState,f=multiply(c.inversePixelTransform.slice(),g.coordinateToPixelTransform),_=getSquaredTolerance(g.viewState.resolution,p);let y;const x=getUserProjection();return x&&(y=getTransformFromProjections(x,g.viewState.projection)),new CanvasImmediateRenderer(c.context,p,g.extent,f,g.viewState.rotation,_,y)}(c);for(let c=y;c<=x;++c){let d,p,C,L,A=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(p=0,C=this.meridiansLabels_.length;p<C;++p){const y=this.meridians_[p];if(u||0!==c){const d=y.clone();d.translate(c*M,0),d.rotate(-u,f),L=this.getMeridianPoint_(d,_,p),L.rotate(u,f)}else L=this.getMeridianPoint_(y,g,p);d=this.featurePool_[A++],d.setGeometry(L),d.set("graticule_label",this.meridiansLabels_[p].text),T.drawFeature(d,this.lonLabelStyle_(d))}if(this.parallelsLabels_&&(c===y&&v||c===x&&!v))for(p=0,C=this.parallels_.length;p<C;++p){const y=this.parallels_[p];if(u||0!==c){const d=y.clone();d.translate(c*M,0),d.rotate(-u,f),L=this.getParallelPoint_(d,_,p),L.rotate(u,f)}else L=this.getParallelPoint_(y,g,p);d=this.featurePool_[A++],d.setGeometry(L),d.set("graticule_label",this.parallelsLabels_[p].text),T.drawFeature(d,this.latLabelStyle_(d))}}}createGraticule_(c,u,d,p){const g=this.getInterval_(d);if(-1==g)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));let f=!1;const _=this.projection_.getExtent(),y=getWidth(_);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!containsExtent(_,c)&&(getWidth(c)>=y?(c[0]=_[0],c[2]=_[2]):f=!0);const x=[clamp(u[0],this.minX_,this.maxX_),clamp(u[1],this.minY_,this.maxY_)],v=this.toLonLatTransform_(x);isNaN(v[1])&&(v[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let C=clamp(v[0],this.minLon_,this.maxLon_),M=clamp(v[1],this.minLat_,this.maxLat_);const T=this.maxLines_;let L,A,I,k,O=c;f||(O=[clamp(c[0],this.minX_,this.maxX_),clamp(c[1],this.minY_,this.maxY_),clamp(c[2],this.minX_,this.maxX_),clamp(c[3],this.minY_,this.maxY_)]);const N=applyTransform(O,this.toLonLatTransform_,void 0,8);let G=N[3],j=N[2],B=N[1],V=N[0];if(f||(containsCoordinate(O,this.bottomLeft_)&&(V=this.minLon_,B=this.minLat_),containsCoordinate(O,this.bottomRight_)&&(j=this.maxLon_,B=this.minLat_),containsCoordinate(O,this.topLeft_)&&(V=this.minLon_,G=this.maxLat_),containsCoordinate(O,this.topRight_)&&(j=this.maxLon_,G=this.maxLat_),G=clamp(G,M,this.maxLat_),j=clamp(j,C,this.maxLon_),B=clamp(B,this.minLat_,M),V=clamp(V,this.minLon_,C)),C=Math.floor(C/g)*g,k=clamp(C,this.minLon_,this.maxLon_),A=this.addMeridian_(k,B,G,p,c,0),L=0,f)for(;(k-=g)>=V&&L++<T;)A=this.addMeridian_(k,B,G,p,c,A);else for(;k!=this.minLon_&&L++<T;)k=Math.max(k-g,this.minLon_),A=this.addMeridian_(k,B,G,p,c,A);if(k=clamp(C,this.minLon_,this.maxLon_),L=0,f)for(;(k+=g)<=j&&L++<T;)A=this.addMeridian_(k,B,G,p,c,A);else for(;k!=this.maxLon_&&L++<T;)k=Math.min(k+g,this.maxLon_),A=this.addMeridian_(k,B,G,p,c,A);for(this.meridians_.length=A,this.meridiansLabels_&&(this.meridiansLabels_.length=A),M=Math.floor(M/g)*g,I=clamp(M,this.minLat_,this.maxLat_),A=this.addParallel_(I,V,j,p,c,0),L=0;I!=this.minLat_&&L++<T;)I=Math.max(I-g,this.minLat_),A=this.addParallel_(I,V,j,p,c,A);for(I=clamp(M,this.minLat_,this.maxLat_),L=0;I!=this.maxLat_&&L++<T;)I=Math.min(I+g,this.maxLat_),A=this.addParallel_(I,V,j,p,c,A);this.parallels_.length=A,this.parallelsLabels_&&(this.parallelsLabels_.length=A)}getInterval_(c){const u=this.projectionCenterLonLat_[0],d=this.projectionCenterLonLat_[1];let p=-1;const g=Math.pow(this.targetSize_*c,2),f=[],_=[];for(let c=0,y=this.intervals_.length;c<y;++c){const y=clamp(this.intervals_[c]/2,0,90),x=clamp(d,-90+y,90-y);f[0]=u-y,f[1]=x-y,_[0]=u+y,_[1]=x+y,this.fromLonLatTransform_(f,f),this.fromLonLatTransform_(_,_);if(Math.pow(_[0]-f[0],2)+Math.pow(_[1]-f[1],2)<=g)break;p=this.intervals_[c]}return p}getMeridian_(c,u,d,p,g){const f=function meridian(c,u,d,p,g){return line((function(p){return[c,u+(d-u)*p]}),getTransform(get$2("EPSG:4326"),p),g)}(c,u,d,this.projection_,p);let _=this.meridians_[g];return _?(_.setFlatCoordinates("XY",f),_.changed()):(_=new tn(f,"XY"),this.meridians_[g]=_),_}getMeridianPoint_(c,u,d){const p=c.getFlatCoordinates();let g=1,f=p.length-1;p[g]>p[f]&&(g=f,f=1);const _=Math.max(u[1],p[g]),y=Math.min(u[3],p[f]),x=clamp(u[1]+Math.abs(u[1]-u[3])*this.lonLabelPosition_,_,y),v=[p[g-1]+(p[f-1]-p[g-1])*(x-p[g])/(p[f]-p[g]),x],C=this.meridiansLabels_[d].geom;return C.setCoordinates(v),C}getMeridians(){return this.meridians_}getParallel_(c,u,d,p,g){const f=function parallel(c,u,d,p,g){return line((function(p){return[u+(d-u)*p,c]}),getTransform(get$2("EPSG:4326"),p),g)}(c,u,d,this.projection_,p);let _=this.parallels_[g];return _?(_.setFlatCoordinates("XY",f),_.changed()):_=new tn(f,"XY"),_}getParallelPoint_(c,u,d){const p=c.getFlatCoordinates();let g=0,f=p.length-2;p[g]>p[f]&&(g=f,f=0);const _=Math.max(u[0],p[g]),y=Math.min(u[2],p[f]),x=clamp(u[0]+Math.abs(u[0]-u[2])*this.latLabelPosition_,_,y),v=[x,p[g+1]+(p[f+1]-p[g+1])*(x-p[g])/(p[f]-p[g])],C=this.parallelsLabels_[d].geom;return C.setCoordinates(v),C}getParallels(){return this.parallels_}updateProjectionInfo_(c){const u=get$2("EPSG:4326"),d=c.getWorldExtent();this.maxLat_=d[3],this.maxLon_=d[2],this.minLat_=d[1],this.minLon_=d[0];const p=getTransform(c,u);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=p;else{const c=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(u,d,g){const f=p(u,d,g=g||2);for(let u=0,d=f.length;u<d;u+=g)f[u]<c&&(f[u]+=360);return f}}this.fromLonLatTransform_=getTransform(u,c);const g=applyTransform([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=g[0],this.maxX_=g[2],this.minY_=g[1],this.maxY_=g[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(getCenter(c.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=c}};var uo=class ImageCanvas extends Zr{constructor(c,u,d,p,g){super(c,u,d,void 0!==g?br.IDLE:br.LOADED),this.loader_=void 0!==g?g:null,this.canvas_=p,this.error_=null}getError(){return this.error_}handleLoad_(c){c?(this.error_=c,this.state=br.ERROR):this.state=br.LOADED,this.changed()}load(){this.state==br.IDLE&&(this.state=br.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}},po=0,go=1,mo=2,fo=3,_o=4;var yo=class Tile extends Target{constructor(c,u,d){super(),d=d||{},this.tileCoord=c,this.state=u,this.key="",this.transition_=void 0===d.transition?250:d.transition,this.transitionStarts_={},this.interpolate=!!d.interpolate}changed(){this.dispatchEvent(_i)}release(){this.state===fo&&this.setState(_o)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(c){if(this.state!==fo&&this.state>c)throw new Error("Tile load sequence violation");this.state=c,this.changed()}load(){abstract()}getAlpha(c,u){if(!this.transition_)return 1;let d=this.transitionStarts_[c];if(d){if(-1===d)return 1}else d=u,this.transitionStarts_[c]=d;const p=u-d+1e3/60;return p>=this.transition_?1:easeIn(p/this.transition_)}inTransition(c){return!!this.transition_&&-1!==this.transitionStarts_[c]}endTransition(c){this.transition_&&(this.transitionStarts_[c]=-1)}};var xo=class ImageTile extends yo{constructor(c,u,d,p,g,f){super(c,u,f),this.crossOrigin_=p,this.src_=d,this.key=d,this.image_=new Image,null!==p&&(this.image_.crossOrigin=p),this.unlisten_=null,this.tileLoadFunction_=g}getImage(){return this.image_}setImage(c){this.image_=c,this.state=mo,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=fo,this.unlistenImage_(),this.image_=function getBlankImage(){const c=createCanvasContext2D(1,1);return c.fillStyle="rgba(0,0,0,0)",c.fillRect(0,0,1,1),c.canvas}(),this.changed()}handleImageLoad_(){const c=this.image_;c.naturalWidth&&c.naturalHeight?this.state=mo:this.state=_o,this.unlistenImage_(),this.changed()}load(){this.state==fo&&(this.state=po,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==po&&(this.state=go,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=function listenImage(c,u,d){const p=c;let g=!0,f=!1,_=!1;const y=[listenOnce(p,Ei,(function(){_=!0,f||u()}))];return p.src&&Xr?(f=!0,p.decode().then((function(){g&&u()})).catch((function(c){g&&(_?u():d())}))):y.push(listenOnce(p,yi,d)),function unlisten(){g=!1,y.forEach(unlistenByKey)}}(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}};var vo=class Kinetic{constructor(c,u,d){this.decay_=c,this.minVelocity_=u,this.delay_=d,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(c,u){this.points_.push(c,u,Date.now())}end(){if(this.points_.length<6)return!1;const c=Date.now()-this.delay_,u=this.points_.length-3;if(this.points_[u+2]<c)return!1;let d=u-3;for(;d>0&&this.points_[d+2]>c;)d-=3;const p=this.points_[u+2]-this.points_[d+2];if(p<1e3/60)return!1;const g=this.points_[u]-this.points_[d],f=this.points_[u+1]-this.points_[d+1];return this.angle_=Math.atan2(f,g),this.initialVelocity_=Math.sqrt(g*g+f*f)/p,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};class MapRenderer extends fi{constructor(c){super(),this.map_=c}dispatchRenderEvent(c,u){abstract()}calculateMatrices2D(c){const u=c.viewState,d=c.coordinateToPixelTransform,p=c.pixelToCoordinateTransform;compose(d,c.size[0]/2,c.size[1]/2,1/u.resolution,-1/u.resolution,-u.rotation,-u.center[0],-u.center[1]),makeInverse(p,d)}forEachFeatureAtCoordinate(c,u,d,p,g,f,_,y){let x;const v=u.viewState;function forEachFeatureAtCoordinate(c,u,d,p){return g.call(f,u,c?d:null,p)}const C=v.projection,M=wrapX$1(c.slice(),C),T=[[0,0]];if(C.canWrapX()&&p){const c=getWidth(C.getExtent());T.push([-c,0],[c,0])}const L=u.layerStatesArray,A=L.length,I=[],k=[];for(let p=0;p<T.length;p++)for(let g=A-1;g>=0;--g){const f=L[g],C=f.layer;if(C.hasRenderer()&&inView(f,v)&&_.call(y,C)){const g=C.getRenderer(),_=C.getSource();if(g&&_){const y=_.getWrapX()?M:c,v=forEachFeatureAtCoordinate.bind(null,f.managed);k[0]=y[0]+T[p][0],k[1]=y[1]+T[p][1],x=g.forEachFeatureAtCoordinate(k,u,d,v,I)}if(x)return x}}if(0===I.length)return;const O=1/I.length;return I.forEach(((c,u)=>c.distanceSq+=u*O)),I.sort(((c,u)=>c.distanceSq-u.distanceSq)),I.some((c=>x=c.callback(c.feature,c.layer,c.geometry))),x}hasFeatureAtCoordinate(c,u,d,p,g,f){return void 0!==this.forEachFeatureAtCoordinate(c,u,d,p,TRUE,this,g,f)}getMap(){return this.map_}renderFrame(c){abstract()}scheduleExpireIconCache(c){Kr.canExpireCache()&&c.postRenderFunctions.push(expireIconCache)}}function expireIconCache(c,u){Kr.expire()}class CompositeMapRenderer extends MapRenderer{constructor(c){super(c),this.fontChangeListenerKey_=listen(vn,mi,c.redrawText.bind(c)),this.element_=document.createElement("div");const u=this.element_.style;u.position="absolute",u.width="100%",u.height="100%",u.zIndex="0",this.element_.className=sn+" ol-layers";const d=c.getViewport();d.insertBefore(this.element_,d.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(c,u){const d=this.getMap();if(d.hasListener(c)){const p=new RenderEvent(c,void 0,u);d.dispatchEvent(p)}}disposeInternal(){unlistenByKey(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(c){if(!c)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(c),this.dispatchRenderEvent(Cr,c);const u=c.layerStatesArray.sort(((c,u)=>c.zIndex-u.zIndex));u.some((c=>c.layer instanceof BaseVectorLayer&&c.layer.getDeclutter()))&&(c.declutter={});const d=c.viewState;this.children_.length=0;const p=[];let g=null;for(let f=0,_=u.length;f<_;++f){const _=u[f];c.layerIndex=f;const y=_.layer,x=y.getSourceState();if(!inView(_,d)||"ready"!=x&&"undefined"!=x){y.unrender();continue}const v=y.render(c,g);v&&(v!==g&&(this.children_.push(v),g=v),p.push(_))}this.declutter(c,p),function replaceChildren(c,u){const d=c.childNodes;for(let p=0;;++p){const g=d[p],f=u[p];if(!g&&!f)break;g!==f&&(g?f?c.insertBefore(f,g):(c.removeChild(g),--p):c.appendChild(f))}}(this.element_,this.children_),this.dispatchRenderEvent(Er,c),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(c)}declutter(c,u){if(c.declutter){for(let d=u.length-1;d>=0;--d){const p=u[d],g=p.layer;g.getDeclutter()&&g.renderDeclutter(c,p)}u.forEach((u=>u.layer.renderDeferred(c)))}}}class GroupEvent extends BaseEvent{constructor(c,u){super(c),this.layer=u}}const So="layers";class LayerGroup extends BaseLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.layers;let d=c.layers;super(u),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(So,this.handleLayersChanged_),d?Array.isArray(d)?d=new Fi(d.slice(),{unique:!0}):assert("function"==typeof d.getArray,"Expected `layers` to be an array or a `Collection`"):d=new Fi(void 0,{unique:!0}),this.setLayers(d)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey),this.layersListenerKeys_.length=0;const c=this.getLayers();this.layersListenerKeys_.push(listen(c,Li,this.handleLayersAdd_,this),listen(c,Ai,this.handleLayersRemove_,this));for(const c in this.listenerKeys_)this.listenerKeys_[c].forEach(unlistenByKey);clear$2(this.listenerKeys_);const u=c.getArray();for(let c=0,d=u.length;c<d;c++){const d=u[c];this.registerLayerListeners_(d),this.dispatchEvent(new GroupEvent("addlayer",d))}this.changed()}registerLayerListeners_(c){const u=[listen(c,mi,this.handleLayerChange_,this),listen(c,_i,this.handleLayerChange_,this)];c instanceof LayerGroup&&u.push(listen(c,"addlayer",this.handleLayerGroupAdd_,this),listen(c,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[getUid(c)]=u}handleLayerGroupAdd_(c){this.dispatchEvent(new GroupEvent("addlayer",c.layer))}handleLayerGroupRemove_(c){this.dispatchEvent(new GroupEvent("removelayer",c.layer))}handleLayersAdd_(c){const u=c.element;this.registerLayerListeners_(u),this.dispatchEvent(new GroupEvent("addlayer",u)),this.changed()}handleLayersRemove_(c){const u=c.element,d=getUid(u);this.listenerKeys_[d].forEach(unlistenByKey),delete this.listenerKeys_[d],this.dispatchEvent(new GroupEvent("removelayer",u)),this.changed()}getLayers(){return this.get(So)}setLayers(c){const u=this.getLayers();if(u){const c=u.getArray();for(let u=0,d=c.length;u<d;++u)this.dispatchEvent(new GroupEvent("removelayer",c[u]))}this.set(So,c)}getLayersArray(c){return c=void 0!==c?c:[],this.getLayers().forEach((function(u){u.getLayersArray(c)})),c}getLayerStatesArray(c){const u=void 0!==c?c:[],d=u.length;this.getLayers().forEach((function(c){c.getLayerStatesArray(u)}));const p=this.getLayerState();let g=p.zIndex;c||void 0!==p.zIndex||(g=0);for(let c=d,f=u.length;c<f;c++){const d=u[c];d.opacity*=p.opacity,d.visible=d.visible&&p.visible,d.maxResolution=Math.min(d.maxResolution,p.maxResolution),d.minResolution=Math.max(d.minResolution,p.minResolution),d.minZoom=Math.max(d.minZoom,p.minZoom),d.maxZoom=Math.min(d.maxZoom,p.maxZoom),void 0!==p.extent&&(void 0!==d.extent?d.extent=getIntersection(d.extent,p.extent):d.extent=p.extent),void 0===d.zIndex&&(d.zIndex=g)}return u}getSourceState(){return"ready"}}var wo=LayerGroup;var Co=class MapEvent extends BaseEvent{constructor(c,u,d){super(c),this.map=u,this.frameState=void 0!==d?d:null}};var Eo=class MapBrowserEvent extends Co{constructor(c,u,d,p,g,f){super(c,u,g),this.originalEvent=d,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==p&&p,this.activePointers=f}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(c){this.pixel_=c}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(c){this.coordinate_=c}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},Po={SINGLECLICK:"singleclick",CLICK:vi,DBLCLICK:Si,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},bo="pointermove",Mo="pointerdown",To="pointerup",Ro="pointerout";var Lo=class MapBrowserEventHandler extends Target{constructor(c,u){super(c),this.map_=c,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===u?1:u,this.down_=null;const d=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=d,this.pointerdownListenerKey_=listen(d,Mo,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=listen(d,bo,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(Pi,this.boundHandleTouchMove_,!!qr&&{passive:!1})}emulateClick_(c){let u=new Eo(Po.CLICK,this.map_,c);this.dispatchEvent(u),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,u=new Eo(Po.DBLCLICK,this.map_,c),this.dispatchEvent(u)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const u=new Eo(Po.SINGLECLICK,this.map_,c);this.dispatchEvent(u)}),250)}updateActivePointers_(c){const u=c,d=u.pointerId;if(u.type==Po.POINTERUP||u.type==Po.POINTERCANCEL){delete this.trackedTouches_[d];for(const c in this.trackedTouches_)if(this.trackedTouches_[c].target!==u.target){delete this.trackedTouches_[c];break}}else u.type!=Po.POINTERDOWN&&u.type!=Po.POINTERMOVE||(this.trackedTouches_[d]=u);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(c){this.updateActivePointers_(c);const u=new Eo(Po.POINTERUP,this.map_,c,void 0,void 0,this.activePointers_);this.dispatchEvent(u),this.emulateClicks_&&!u.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(c)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(c){return 0===c.button}handlePointerDown_(c){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(c);const u=new Eo(Po.POINTERDOWN,this.map_,c,void 0,void 0,this.activePointers_);if(this.dispatchEvent(u),this.down_=new PointerEvent(c.type,c),Object.defineProperty(this.down_,"target",{writable:!1,value:c.target}),0===this.dragListenerKeys_.length){const c=this.map_.getOwnerDocument();this.dragListenerKeys_.push(listen(c,Po.POINTERMOVE,this.handlePointerMove_,this),listen(c,Po.POINTERUP,this.handlePointerUp_,this),listen(this.element_,Po.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==c&&this.dragListenerKeys_.push(listen(this.element_.getRootNode(),Po.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(c){if(this.isMoving_(c)){this.updateActivePointers_(c),this.dragging_=!0;const u=new Eo(Po.POINTERDRAG,this.map_,c,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(u)}}relayMoveEvent_(c){this.originalPointerMoveEvent_=c;const u=!(!this.down_||!this.isMoving_(c));this.dispatchEvent(new Eo(Po.POINTERMOVE,this.map_,c,u))}handleTouchMove_(c){const u=this.originalPointerMoveEvent_;u&&!u.defaultPrevented||"boolean"==typeof c.cancelable&&!0!==c.cancelable||c.preventDefault()}isMoving_(c){return this.dragging_||Math.abs(c.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(c.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Pi,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Ao="postrender",Io="movestart",Fo="moveend",ko="loadstart",Oo="loadend",No="layergroup",Do="size",Go="target",jo="view";const zo=1/0;class PriorityQueue{constructor(c,u){this.priorityFunction_=c,this.keyFunction_=u,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,clear$2(this.queuedElements_)}dequeue(){const c=this.elements_,u=this.priorities_,d=c[0];1==c.length?(c.length=0,u.length=0):(c[0]=c.pop(),u[0]=u.pop(),this.siftUp_(0));const p=this.keyFunction_(d);return delete this.queuedElements_[p],d}enqueue(c){assert(!(this.keyFunction_(c)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const u=this.priorityFunction_(c);return u!=zo&&(this.elements_.push(c),this.priorities_.push(u),this.queuedElements_[this.keyFunction_(c)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(c){return 2*c+1}getRightChildIndex_(c){return 2*c+2}getParentIndex_(c){return c-1>>1}heapify_(){let c;for(c=(this.elements_.length>>1)-1;c>=0;c--)this.siftUp_(c)}isEmpty(){return 0===this.elements_.length}isKeyQueued(c){return c in this.queuedElements_}isQueued(c){return this.isKeyQueued(this.keyFunction_(c))}siftUp_(c){const u=this.elements_,d=this.priorities_,p=u.length,g=u[c],f=d[c],_=c;for(;c<p>>1;){const g=this.getLeftChildIndex_(c),f=this.getRightChildIndex_(c),_=f<p&&d[f]<d[g]?f:g;u[c]=u[_],d[c]=d[_],c=_}u[c]=g,d[c]=f,this.siftDown_(_,c)}siftDown_(c,u){const d=this.elements_,p=this.priorities_,g=d[u],f=p[u];for(;u>c;){const c=this.getParentIndex_(u);if(!(p[c]>f))break;d[u]=d[c],p[u]=p[c],u=c}d[u]=g,p[u]=f}reprioritize(){const c=this.priorityFunction_,u=this.elements_,d=this.priorities_;let p=0;const g=u.length;let f,_,y;for(_=0;_<g;++_)f=u[_],y=c(f),y==zo?delete this.queuedElements_[this.keyFunction_(f)]:(d[p]=y,u[p++]=f);u.length=p,d.length=p,this.heapify_()}}var Bo=class TileQueue extends PriorityQueue{constructor(c,u){super((function(u){return c.apply(null,u)}),(function(c){return c[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=u,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(c){const u=super.enqueue(c);if(u){c[0].addEventListener(_i,this.boundHandleTileChange_)}return u}getTilesLoading(){return this.tilesLoading_}handleTileChange(c){const u=c.target,d=u.getState();if(d===mo||d===fo||d===_o){d!==fo&&u.removeEventListener(_i,this.boundHandleTileChange_);const c=u.getKey();c in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[c],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(c,u){let d=0;for(;this.tilesLoading_<c&&d<u&&this.getCount()>0;){const c=this.dequeue()[0],u=c.getKey();c.getState()!==po||u in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[u]=!0,++this.tilesLoading_,++d,c.load())}}};var Uo=class Control extends Ri{constructor(c){super();const u=c.element;!u||c.target||u.style.pointerEvents||(u.style.pointerEvents="auto"),this.element=u||null,this.target_=null,this.map_=null,this.listenerKeys=[],c.render&&(this.render=c.render),c.target&&this.setTarget(c.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(c){this.map_&&this.element?.remove();for(let c=0,u=this.listenerKeys.length;c<u;++c)unlistenByKey(this.listenerKeys[c]);if(this.listenerKeys.length=0,this.map_=c,c){(this.target_??c.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==VOID&&this.listenerKeys.push(listen(c,Ao,this.render,this)),c.render()}}render(c){}setTarget(c){this.target_="string"==typeof c?document.getElementById(c):c}};var $o=class Attribution extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===c.collapsed||c.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==c.collapsible,this.collapsible_=void 0===c.collapsible||c.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=c.attributions;const u=void 0!==c.className?c.className:"ol-attribution",d=void 0!==c.tipLabel?c.tipLabel:"Attributions",p=void 0!==c.expandClassName?c.expandClassName:u+"-expand",g=void 0!==c.collapseLabel?c.collapseLabel:"›",f=void 0!==c.collapseClassName?c.collapseClassName:u+"-collapse";"string"==typeof g?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=g,this.collapseLabel_.className=f):this.collapseLabel_=g;const _=void 0!==c.label?c.label:"i";"string"==typeof _?(this.label_=document.createElement("span"),this.label_.textContent=_,this.label_.className=p):this.label_=_;const y=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=d,this.toggleButton_.appendChild(y),this.toggleButton_.addEventListener(vi,this.handleClick_.bind(this),!1);const x=u+" "+sn+" "+an+(this.collapsed_&&this.collapsible_?" "+ln:"")+(this.collapsible_?"":" ol-uncollapsible"),v=this.element;v.className=x,v.appendChild(this.toggleButton_),v.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(c){const u=this.getMap().getAllLayers(),d=new Set(u.flatMap((u=>u.getAttributions(c))));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach((c=>d.add(c))):d.add(this.attributions_)),!this.overrideCollapsible_){const c=!u.some((c=>!1===c.getSource()?.getAttributionsCollapsible()));this.setCollapsible(c)}return Array.from(d)}async updateElement_(c){if(!c)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const u=await Promise.all(this.collectSourceAttributions_(c).map((c=>toPromise((()=>c))))),d=u.length>0;if(this.renderedVisible_!=d&&(this.element.style.display=d?"":"none",this.renderedVisible_=d),!equals$2(u,this.renderedAttributions_)){removeChildren(this.ulElement_);for(let c=0,d=u.length;c<d;++c){const d=document.createElement("li");d.innerHTML=u[c],this.ulElement_.appendChild(d)}this.renderedAttributions_=u}}handleClick_(c){c.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(ln),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(c){this.collapsible_!==c&&(this.collapsible_=c,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(c){this.userCollapsed_=c,this.collapsible_&&this.collapsed_!==c&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(c){this.updateElement_(c.frameState)}};var Wo=class Rotate extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target});const u=void 0!==c.className?c.className:"ol-rotate",d=void 0!==c.label?c.label:"⇧",p=void 0!==c.compassClassName?c.compassClassName:"ol-compass";this.label_=null,"string"==typeof d?(this.label_=document.createElement("span"),this.label_.className=p,this.label_.textContent=d):(this.label_=d,this.label_.classList.add(p));const g=c.tipLabel?c.tipLabel:"Reset rotation",f=document.createElement("button");f.className=u+"-reset",f.setAttribute("type","button"),f.title=g,f.appendChild(this.label_),f.addEventListener(vi,this.handleClick_.bind(this),!1);const _=u+" "+sn+" "+an,y=this.element;y.className=_,y.appendChild(f),this.callResetNorth_=c.resetNorth?c.resetNorth:void 0,this.duration_=void 0!==c.duration?c.duration:250,this.autoHide_=void 0===c.autoHide||c.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(nn)}handleClick_(c){c.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const c=this.getMap().getView();if(!c)return;const u=c.getRotation();void 0!==u&&(this.duration_>0&&u%(2*Math.PI)!=0?c.animate({rotation:0,duration:this.duration_,easing:easeOut}):c.setRotation(0))}render(c){const u=c.frameState;if(!u)return;const d=u.viewState.rotation;if(d!=this.rotation_){const c="rotate("+d+"rad)";if(this.autoHide_){const c=this.element.classList.contains(nn);c||0!==d?c&&0!==d&&this.element.classList.remove(nn):this.element.classList.add(nn)}this.label_.style.transform=c}this.rotation_=d}};var Xo=class Zoom extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target});const u=void 0!==c.className?c.className:"ol-zoom",d=void 0!==c.delta?c.delta:1,p=void 0!==c.zoomInClassName?c.zoomInClassName:u+"-in",g=void 0!==c.zoomOutClassName?c.zoomOutClassName:u+"-out",f=void 0!==c.zoomInLabel?c.zoomInLabel:"+",_=void 0!==c.zoomOutLabel?c.zoomOutLabel:"–",y=void 0!==c.zoomInTipLabel?c.zoomInTipLabel:"Zoom in",x=void 0!==c.zoomOutTipLabel?c.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=p,v.setAttribute("type","button"),v.title=y,v.appendChild("string"==typeof f?document.createTextNode(f):f),v.addEventListener(vi,this.handleClick_.bind(this,d),!1);const C=document.createElement("button");C.className=g,C.setAttribute("type","button"),C.title=x,C.appendChild("string"==typeof _?document.createTextNode(_):_),C.addEventListener(vi,this.handleClick_.bind(this,-d),!1);const M=u+" "+sn+" "+an,T=this.element;T.className=M,T.appendChild(v),T.appendChild(C),this.duration_=void 0!==c.duration?c.duration:250}handleClick_(c,u){u.preventDefault(),this.zoomByDelta_(c)}zoomByDelta_(c){const u=this.getMap().getView();if(!u)return;const d=u.getZoom();if(void 0!==d){const p=u.getConstrainedZoom(d+c);this.duration_>0?(u.getAnimating()&&u.cancelAnimations(),u.animate({zoom:p,duration:this.duration_,easing:easeOut})):u.setZoom(p)}}};function defaults$1(c){c=c||{};const u=new Fi;(void 0===c.zoom||c.zoom)&&u.push(new Xo(c.zoomOptions));(void 0===c.rotate||c.rotate)&&u.push(new Wo(c.rotateOptions));return(void 0===c.attribution||c.attribution)&&u.push(new $o(c.attributionOptions)),u}var Vo="active";class Interaction extends Ri{constructor(c){super(),this.on,this.once,this.un,c&&c.handleEvent&&(this.handleEvent=c.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Vo)}getMap(){return this.map_}handleEvent(c){return!0}setActive(c){this.set(Vo,c)}setMap(c){this.map_=c}}function zoomByDelta(c,u,d,p){const g=c.getZoom();if(void 0===g)return;const f=c.getConstrainedZoom(g+u),_=c.getResolutionForZoom(f);c.getAnimating()&&c.cancelAnimations(),c.animate({resolution:_,anchor:d,duration:void 0!==p?p:250,easing:easeOut})}class DoubleClickZoom extends Interaction{constructor(c){super(),c=c||{},this.delta_=c.delta?c.delta:1,this.duration_=void 0!==c.duration?c.duration:250}handleEvent(c){let u=!1;if(c.type==Po.DBLCLICK){const d=c.originalEvent,p=c.map,g=c.coordinate,f=d.shiftKey?-this.delta_:this.delta_;zoomByDelta(p.getView(),f,g,this.duration_),d.preventDefault(),u=!0}return!u}}class PointerInteraction extends Interaction{constructor(c){super(c=c||{}),c.handleDownEvent&&(this.handleDownEvent=c.handleDownEvent),c.handleDragEvent&&(this.handleDragEvent=c.handleDragEvent),c.handleMoveEvent&&(this.handleMoveEvent=c.handleMoveEvent),c.handleUpEvent&&(this.handleUpEvent=c.handleUpEvent),c.stopDown&&(this.stopDown=c.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(c){return!1}handleDragEvent(c){}handleEvent(c){if(!c.originalEvent)return!0;let u=!1;if(this.updateTrackedPointers_(c),this.handlingDownUpSequence){if(c.type==Po.POINTERDRAG)this.handleDragEvent(c),c.originalEvent.preventDefault();else if(c.type==Po.POINTERUP){const u=this.handleUpEvent(c);this.handlingDownUpSequence=u&&this.targetPointers.length>0}}else if(c.type==Po.POINTERDOWN){const d=this.handleDownEvent(c);this.handlingDownUpSequence=d,u=this.stopDown(d)}else c.type==Po.POINTERMOVE&&this.handleMoveEvent(c);return!u}handleMoveEvent(c){}handleUpEvent(c){return!1}stopDown(c){return c}updateTrackedPointers_(c){c.activePointers&&(this.targetPointers=c.activePointers)}}function centroid(c){const u=c.length;let d=0,p=0;for(let g=0;g<u;g++)d+=c[g].clientX,p+=c[g].clientY;return{clientX:d/u,clientY:p/u}}function all(c){const u=arguments;return function(c){let d=!0;for(let p=0,g=u.length;p<g&&(d=d&&u[p](c),d);++p);return d}}const altShiftKeysOnly=function(c){const u=c.originalEvent;return u.altKey&&!(u.metaKey||u.ctrlKey)&&u.shiftKey},focusWithTabindex=function(c){const u=c.map.getTargetElement(),d=u.getRootNode();return!(d instanceof ShadowRoot?d.host:u).hasAttribute("tabindex")||function(c){const u=c.map.getTargetElement(),d=u.getRootNode(),p=c.map.getOwnerDocument().activeElement;return d instanceof ShadowRoot?d.host.contains(p):u.contains(p)}(c)},qo=TRUE,mouseActionButton=function(c){const u=c.originalEvent;return 0==u.button&&!(Br&&Ur&&u.ctrlKey)},noModifierKeys=function(c){const u=c.originalEvent;return!u.altKey&&!(u.metaKey||u.ctrlKey)&&!u.shiftKey},shiftKeyOnly=function(c){const u=c.originalEvent;return!u.altKey&&!(u.metaKey||u.ctrlKey)&&u.shiftKey},targetNotEditable=function(c){const u=c.originalEvent,d=u.target.tagName;return"INPUT"!==d&&"SELECT"!==d&&"TEXTAREA"!==d&&!u.target.isContentEditable},mouseOnly=function(c){const u=c.originalEvent;return assert(void 0!==u,"mapBrowserEvent must originate from a pointer event"),"mouse"==u.pointerType},primaryAction=function(c){const u=c.originalEvent;return assert(void 0!==u,"mapBrowserEvent must originate from a pointer event"),u.isPrimary&&0===u.button};class DragPan extends PointerInteraction{constructor(c){super({stopDown:FALSE}),c=c||{},this.kinetic_=c.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const u=c.condition?c.condition:all(noModifierKeys,primaryAction);this.condition_=c.onFocusOnly?all(focusWithTabindex,u):u,this.noKinetic_=!1}handleDragEvent(c){const u=c.map;this.panning_||(this.panning_=!0,u.getView().beginInteraction());const d=this.targetPointers,p=u.getEventPixel(centroid(d));if(d.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(p[0],p[1]),this.lastCentroid){const u=[this.lastCentroid[0]-p[0],p[1]-this.lastCentroid[1]],d=c.map.getView();scale$2(u,d.getResolution()),rotate$1(u,d.getRotation()),d.adjustCenterInternal(u)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=p,this.lastPointersCount_=d.length,c.originalEvent.preventDefault()}handleUpEvent(c){const u=c.map,d=u.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const c=this.kinetic_.getDistance(),p=this.kinetic_.getAngle(),g=d.getCenterInternal(),f=u.getPixelFromCoordinateInternal(g),_=u.getCoordinateFromPixelInternal([f[0]-c*Math.cos(p),f[1]-c*Math.sin(p)]);d.animateInternal({center:d.getConstrainedCenter(_),duration:500,easing:easeOut})}return this.panning_&&(this.panning_=!1,d.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(c){if(this.targetPointers.length>0&&this.condition_(c)){const u=c.map.getView();return this.lastCentroid=null,u.getAnimating()&&u.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class DragRotate extends PointerInteraction{constructor(c){c=c||{},super({stopDown:FALSE}),this.condition_=c.condition?c.condition:altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=void 0!==c.duration?c.duration:250}handleDragEvent(c){if(!mouseOnly(c))return;const u=c.map,d=u.getView();if(d.getConstraints().rotation===disable)return;const p=u.getSize(),g=c.pixel,f=Math.atan2(p[1]/2-g[1],g[0]-p[0]/2);if(void 0!==this.lastAngle_){const c=f-this.lastAngle_;d.adjustRotationInternal(-c)}this.lastAngle_=f}handleUpEvent(c){if(!mouseOnly(c))return!0;return c.map.getView().endInteraction(this.duration_),!1}handleDownEvent(c){if(!mouseOnly(c))return!1;if(mouseActionButton(c)&&this.condition_(c)){return c.map.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}class RenderBox extends fi{constructor(c){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+c,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const c=this.startPixel_,u=this.endPixel_,d="px",p=this.element_.style;p.left=Math.min(c[0],u[0])+d,p.top=Math.min(c[1],u[1])+d,p.width=Math.abs(u[0]-c[0])+d,p.height=Math.abs(u[1]-c[1])+d}setMap(c){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const c=this.element_.style;c.left="inherit",c.top="inherit",c.width="inherit",c.height="inherit"}this.map_=c,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(c,u){this.startPixel_=c,this.endPixel_=u,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const c=this.startPixel_,u=this.endPixel_,d=[c,[c[0],u[1]],u,[u[0],c[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);d[4]=d[0].slice(),this.geometry_?this.geometry_.setCoordinates([d]):this.geometry_=new lr([d])}getGeometry(){return this.geometry_}}const Yo="boxstart",Zo="boxdrag",Ko="boxend",Ho="boxcancel";class DragBoxEvent extends BaseEvent{constructor(c,u,d){super(c),this.coordinate=u,this.mapBrowserEvent=d}}class DragBox extends PointerInteraction{constructor(c){super(),this.on,this.once,this.un,c=c??{},this.box_=new RenderBox(c.className||"ol-dragbox"),this.minArea_=c.minArea??64,c.onBoxEnd&&(this.onBoxEnd=c.onBoxEnd),this.startPixel_=null,this.condition_=c.condition??mouseActionButton,this.boxEndCondition_=c.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(c,u,d){const p=d[0]-u[0],g=d[1]-u[1];return p*p+g*g>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(c){this.startPixel_&&(this.box_.setPixels(this.startPixel_,c.pixel),this.dispatchEvent(new DragBoxEvent(Zo,c.coordinate,c)))}handleUpEvent(c){if(!this.startPixel_)return!1;const u=this.boxEndCondition_(c,this.startPixel_,c.pixel);return u&&this.onBoxEnd(c),this.dispatchEvent(new DragBoxEvent(u?Ko:Ho,c.coordinate,c)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(c){return!!this.condition_(c)&&(this.startPixel_=c.pixel,this.box_.setMap(c.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new DragBoxEvent(Yo,c.coordinate,c)),!0)}onBoxEnd(c){}setActive(c){c||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(Ho,this.startPixel_,null)),this.startPixel_=null)),super.setActive(c)}setMap(c){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(Ho,this.startPixel_,null)),this.startPixel_=null)),super.setMap(c)}}class DragZoom extends DragBox{constructor(c){super({condition:(c=c||{}).condition?c.condition:shiftKeyOnly,className:c.className||"ol-dragzoom",minArea:c.minArea}),this.duration_=void 0!==c.duration?c.duration:200,this.out_=void 0!==c.out&&c.out}onBoxEnd(c){const u=this.getMap().getView();let d=this.getGeometry();if(this.out_){const c=u.rotatedExtentForGeometry(d),p=u.getResolutionForExtentInternal(c),g=u.getResolution()/p;d=d.clone(),d.scale(g*g)}u.fitInternal(d,{duration:this.duration_,easing:easeOut})}}var Jo="ArrowLeft",Qo="ArrowUp",ta="ArrowRight",ea="ArrowDown";class KeyboardPan extends Interaction{constructor(c){super(),c=c||{},this.defaultCondition_=function(c){return noModifierKeys(c)&&targetNotEditable(c)},this.condition_=void 0!==c.condition?c.condition:this.defaultCondition_,this.duration_=void 0!==c.duration?c.duration:100,this.pixelDelta_=void 0!==c.pixelDelta?c.pixelDelta:128}handleEvent(c){let u=!1;if(c.type==wi){const d=c.originalEvent,p=d.key;if(this.condition_(c)&&(p==ea||p==Jo||p==ta||p==Qo)){const g=c.map.getView(),f=g.getResolution()*this.pixelDelta_;let _=0,y=0;p==ea?y=-f:p==Jo?_=-f:p==ta?_=f:y=f;const x=[_,y];rotate$1(x,g.getRotation()),function pan(c,u,d){const p=c.getCenterInternal();if(p){const g=[p[0]+u[0],p[1]+u[1]];c.animateInternal({duration:void 0!==d?d:250,easing:linear,center:c.getConstrainedCenter(g)})}}(g,x,this.duration_),d.preventDefault(),u=!0}}return!u}}class KeyboardZoom extends Interaction{constructor(c){super(),c=c||{},this.condition_=c.condition?c.condition:function(c){return!function(c){const u=c.originalEvent;return Ur?u.metaKey:u.ctrlKey}(c)&&targetNotEditable(c)},this.delta_=c.delta?c.delta:1,this.duration_=void 0!==c.duration?c.duration:100}handleEvent(c){let u=!1;if(c.type==wi||c.type==Ci){const d=c.originalEvent,p=d.key;if(this.condition_(c)&&("+"===p||"-"===p)){const g=c.map,f="+"===p?this.delta_:-this.delta_;zoomByDelta(g.getView(),f,void 0,this.duration_),d.preventDefault(),u=!0}}return!u}}class MouseWheelZoom extends Interaction{constructor(c){super(c=c||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==c.maxDelta?c.maxDelta:1,this.duration_=void 0!==c.duration?c.duration:250,this.timeout_=void 0!==c.timeout?c.timeout:80,this.useAnchor_=void 0===c.useAnchor||c.useAnchor,this.constrainResolution_=void 0!==c.constrainResolution&&c.constrainResolution;const u=c.condition?c.condition:qo;this.condition_=c.onFocusOnly?all(focusWithTabindex,u):u,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const c=this.getMap();if(!c)return;c.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(c){if(!this.condition_(c))return!0;if(c.type!==bi)return!0;const u=c.map,d=c.originalEvent;let p;if(d.preventDefault(),this.useAnchor_&&(this.lastAnchor_=c.coordinate),c.type==bi&&(p=d.deltaY,jr&&d.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(p/=$r),d.deltaMode===WheelEvent.DOM_DELTA_LINE&&(p*=40)),0===p)return!1;this.lastDelta_=p;const g=Date.now();void 0===this.startTime_&&(this.startTime_=g),(!this.mode_||g-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(p)<4?"trackpad":"wheel");const f=u.getView();if("trackpad"===this.mode_&&!f.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(f.getAnimating()&&f.cancelAnimations(),f.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),f.adjustZoom(-p/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=g,!1;this.totalDelta_+=p;const _=Math.max(this.timeout_-(g-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,u),_),!1}handleWheelZoom_(c){const u=c.getView();u.getAnimating()&&u.cancelAnimations();let d=-clamp(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(u.getConstrainResolution()||this.constrainResolution_)&&(d=d?d>0?1:-1:0),zoomByDelta(u,d,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(c){this.useAnchor_=c,c||(this.lastAnchor_=null)}}class PinchRotate extends PointerInteraction{constructor(c){const u=c=c||{};u.stopDown||(u.stopDown=FALSE),super(u),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==c.threshold?c.threshold:.3,this.duration_=void 0!==c.duration?c.duration:250}handleDragEvent(c){let u=0;const d=this.targetPointers[0],p=this.targetPointers[1],g=Math.atan2(p.clientY-d.clientY,p.clientX-d.clientX);if(void 0!==this.lastAngle_){const c=g-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),u=c}this.lastAngle_=g;const f=c.map,_=f.getView();_.getConstraints().rotation!==disable&&(this.anchor_=f.getCoordinateFromPixelInternal(f.getEventPixel(centroid(this.targetPointers))),this.rotating_&&(f.render(),_.adjustRotationInternal(u,this.anchor_)))}handleUpEvent(c){if(this.targetPointers.length<2){return c.map.getView().endInteraction(this.duration_),!1}return!0}handleDownEvent(c){if(this.targetPointers.length>=2){const u=c.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||u.getView().beginInteraction(),!0}return!1}}class PinchZoom extends PointerInteraction{constructor(c){const u=c=c||{};u.stopDown||(u.stopDown=FALSE),super(u),this.anchor_=null,this.duration_=void 0!==c.duration?c.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(c){let u=1;const d=this.targetPointers[0],p=this.targetPointers[1],g=d.clientX-p.clientX,f=d.clientY-p.clientY,_=Math.sqrt(g*g+f*f);void 0!==this.lastDistance_&&(u=this.lastDistance_/_),this.lastDistance_=_;const y=c.map,x=y.getView();1!=u&&(this.lastScaleDelta_=u),this.anchor_=y.getCoordinateFromPixelInternal(y.getEventPixel(centroid(this.targetPointers))),y.render(),x.adjustResolutionInternal(u,this.anchor_)}handleUpEvent(c){if(this.targetPointers.length<2){const u=c.map.getView(),d=this.lastScaleDelta_>1?1:-1;return u.endInteraction(this.duration_,d),!1}return!0}handleDownEvent(c){if(this.targetPointers.length>=2){const u=c.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||u.getView().beginInteraction(),!0}return!1}}function removeLayerMapProperty(c){c instanceof qn?c.setMapInternal(null):c instanceof wo&&c.getLayers().forEach(removeLayerMapProperty)}function setLayerMapProperty(c,u){if(c instanceof qn)c.setMapInternal(u);else if(c instanceof wo){const d=c.getLayers().getArray();for(let c=0,p=d.length;c<p;++c)setLayerMapProperty(d[c],u)}}var ia=class Map extends Ri{constructor(c){super(),c=c||{},this.on,this.once,this.un;const u=function createOptionsInternal(c){let u=null;void 0!==c.keyboardEventTarget&&(u="string"==typeof c.keyboardEventTarget?document.getElementById(c.keyboardEventTarget):c.keyboardEventTarget);const d={},p=c.layers&&"function"==typeof c.layers.getLayers?c.layers:new wo({layers:c.layers});let g,f,_;d[No]=p,d[Go]=c.target,d[jo]=c.view instanceof Vn?c.view:new Vn,void 0!==c.controls&&(Array.isArray(c.controls)?g=new Fi(c.controls.slice()):(assert("function"==typeof c.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),g=c.controls));void 0!==c.interactions&&(Array.isArray(c.interactions)?f=new Fi(c.interactions.slice()):(assert("function"==typeof c.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),f=c.interactions));void 0!==c.overlays?Array.isArray(c.overlays)?_=new Fi(c.overlays.slice()):(assert("function"==typeof c.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),_=c.overlays):_=new Fi;return{controls:g,interactions:f,keyboardEventTarget:u,overlays:_,values:d}}(c);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==c.maxTilesLoading?c.maxTilesLoading:16,this.pixelRatio_=void 0!==c.pixelRatio?c.pixelRatio:$r,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=c.moveTolerance,this.keyboardEventTarget_=u.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=u.controls||defaults$1(),this.interactions=u.interactions||function defaults(c){c=c||{};const u=new Fi,d=new vo(-.005,.05,100);return(void 0===c.altShiftDragRotate||c.altShiftDragRotate)&&u.push(new DragRotate),(void 0===c.doubleClickZoom||c.doubleClickZoom)&&u.push(new DoubleClickZoom({delta:c.zoomDelta,duration:c.zoomDuration})),(void 0===c.dragPan||c.dragPan)&&u.push(new DragPan({onFocusOnly:c.onFocusOnly,kinetic:d})),(void 0===c.pinchRotate||c.pinchRotate)&&u.push(new PinchRotate),(void 0===c.pinchZoom||c.pinchZoom)&&u.push(new PinchZoom({duration:c.zoomDuration})),(void 0===c.keyboard||c.keyboard)&&(u.push(new KeyboardPan),u.push(new KeyboardZoom({delta:c.zoomDelta,duration:c.zoomDuration}))),(void 0===c.mouseWheelZoom||c.mouseWheelZoom)&&u.push(new MouseWheelZoom({onFocusOnly:c.onFocusOnly,duration:c.zoomDuration})),(void 0===c.shiftDragZoom||c.shiftDragZoom)&&u.push(new DragZoom({duration:c.zoomDuration})),u}({onFocusOnly:!0}),this.overlays_=u.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Bo(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(No,this.handleLayerGroupChanged_),this.addChangeListener(jo,this.handleViewChanged_),this.addChangeListener(Do,this.handleSizeChanged_),this.addChangeListener(Go,this.handleTargetChanged_),this.setProperties(u.values);const d=this;!c.view||c.view instanceof Vn||c.view.then((function(c){d.setView(new Vn(c))})),this.controls.addEventListener(Li,(c=>{c.element.setMap(this)})),this.controls.addEventListener(Ai,(c=>{c.element.setMap(null)})),this.interactions.addEventListener(Li,(c=>{c.element.setMap(this)})),this.interactions.addEventListener(Ai,(c=>{c.element.setMap(null)})),this.overlays_.addEventListener(Li,(c=>{this.addOverlayInternal_(c.element)})),this.overlays_.addEventListener(Ai,(c=>{const u=c.element.getId();void 0!==u&&delete this.overlayIdIndex_[u.toString()],c.element.setMap(null)})),this.controls.forEach((c=>{c.setMap(this)})),this.interactions.forEach((c=>{c.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(c){this.getControls().push(c)}addInteraction(c){this.getInteractions().push(c)}addLayer(c){this.getLayerGroup().getLayers().push(c)}handleLayerAdd_(c){setLayerMapProperty(c.layer,this)}addOverlay(c){this.getOverlays().push(c)}addOverlayInternal_(c){const u=c.getId();void 0!==u&&(this.overlayIdIndex_[u.toString()]=c),c.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(c,u,d){if(!this.frameState_||!this.renderer_)return;const p=this.getCoordinateFromPixelInternal(c),g=void 0!==(d=void 0!==d?d:{}).hitTolerance?d.hitTolerance:0,f=void 0!==d.layerFilter?d.layerFilter:TRUE,_=!1!==d.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(p,this.frameState_,g,_,u,null,f,null)}getFeaturesAtPixel(c,u){const d=[];return this.forEachFeatureAtPixel(c,(function(c){d.push(c)}),u),d}getAllLayers(){const c=[];return function addLayersFrom(u){u.forEach((function(u){u instanceof wo?addLayersFrom(u.getLayers()):c.push(u)}))}(this.getLayers()),c}hasFeatureAtPixel(c,u){if(!this.frameState_||!this.renderer_)return!1;const d=this.getCoordinateFromPixelInternal(c),p=void 0!==(u=void 0!==u?u:{}).layerFilter?u.layerFilter:TRUE,g=void 0!==u.hitTolerance?u.hitTolerance:0,f=!1!==u.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(d,this.frameState_,g,f,p,null)}getEventCoordinate(c){return this.getCoordinateFromPixel(this.getEventPixel(c))}getEventCoordinateInternal(c){return this.getCoordinateFromPixelInternal(this.getEventPixel(c))}getEventPixel(c){const u=this.viewport_.getBoundingClientRect(),d=this.getSize(),p=u.width/d[0],g=u.height/d[1],f="changedTouches"in c?c.changedTouches[0]:c;return[(f.clientX-u.left)/p,(f.clientY-u.top)/g]}getTarget(){return this.get(Go)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(c){return toUserCoordinate(this.getCoordinateFromPixelInternal(c),this.getView().getProjection())}getCoordinateFromPixelInternal(c){const u=this.frameState_;return u?apply(u.pixelToCoordinateTransform,c.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(c){const u=this.overlayIdIndex_[c.toString()];return void 0!==u?u:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(No)}setLayers(c){const u=this.getLayerGroup();if(c instanceof Fi)return void u.setLayers(c);const d=u.getLayers();d.clear(),d.extend(c)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const c=this.getLayerGroup().getLayerStatesArray();for(let u=0,d=c.length;u<d;++u){const d=c[u];if(!d.visible)continue;const p=d.layer.getRenderer();if(p&&!p.ready)return!0;const g=d.layer.getSource();if(g&&g.loading)return!0}return!1}getPixelFromCoordinate(c){const u=fromUserCoordinate(c,this.getView().getProjection());return this.getPixelFromCoordinateInternal(u)}getPixelFromCoordinateInternal(c){const u=this.frameState_;return u?apply(u.coordinateToPixelTransform,c.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Do)}getView(){return this.get(jo)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const c=this.getTargetElement();return c?c.ownerDocument:document}getTilePriority(c,u,d,p){return function getTilePriority(c,u,d,p,g){if(!c||!(d in c.wantedTiles))return zo;if(!c.wantedTiles[d][u.getKey()])return zo;const f=c.viewState.center,_=p[0]-f[0],y=p[1]-f[1];return 65536*Math.log(g)+Math.sqrt(_*_+y*y)/g}(this.frameState_,c,u,d,p)}handleBrowserEvent(c,u){u=u||c.type;const d=new Eo(u,this,c);this.handleMapBrowserEvent(d)}handleMapBrowserEvent(c){if(!this.frameState_)return;const u=c.originalEvent,d=u.type;if(d===Mo||d===bi||d===wi){const c=this.getOwnerDocument(),d=this.viewport_.getRootNode?this.viewport_.getRootNode():c,p=u.target,g=d instanceof ShadowRoot?d.host===p?d.host.ownerDocument:d:d===c?c.documentElement:d;if(this.overlayContainerStopEvent_.contains(p)||!g.contains(p))return}if(c.frameState=this.frameState_,!1!==this.dispatchEvent(c)){const u=this.getInteractions().getArray().slice();for(let d=u.length-1;d>=0;d--){const p=u[d];if(p.getMap()!==this||!p.getActive()||!this.getTargetElement())continue;if(!p.handleEvent(c)||c.propagationStopped)break}}}handlePostRender(){const c=this.frameState_,u=this.tileQueue_;if(!u.isEmpty()){let d=this.maxTilesLoading_,p=d;if(c){const u=c.viewHints;if(u[Bn]||u[Un]){const u=Date.now()-c.time>8;d=u?0:8,p=u?0:2}}u.getTilesLoading()<d&&(u.reprioritize(),u.loadMoreTiles(d,p))}c&&this.renderer_&&!c.animate&&(this.renderComplete_?(this.hasListener(Pr)&&this.renderer_.dispatchRenderEvent(Pr,c),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Co(Oo,this,c)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Co(ko,this,c))));const d=this.postRenderFunctions_;for(let u=0,p=d.length;u<p;++u)d[u](this,c);d.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let c=0,u=this.targetChangeHandlerKeys_.length;c<u;++c)unlistenByKey(this.targetChangeHandlerKeys_[c]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(xi,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(bi,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const c=this.targetElement_.getRootNode();c instanceof ShadowRoot&&this.resizeObserver_.unobserve(c.host),this.setSize(void 0)}const c=this.getTarget(),u="string"==typeof c?document.getElementById(c):c;if(this.targetElement_=u,u){u.appendChild(this.viewport_),this.renderer_||(this.renderer_=new CompositeMapRenderer(this)),this.mapBrowserEventHandler_=new Lo(this,this.moveTolerance_);for(const c in Po)this.mapBrowserEventHandler_.addEventListener(Po[c],this.handleMapBrowserEvent.bind(this));let c;if(this.viewport_.addEventListener(xi,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(bi,this.boundHandleBrowserEvent_,!!qr&&{passive:!1}),this.keyboardEventTarget_)c=this.keyboardEventTarget_;else{const d=u.getRootNode();c=d instanceof ShadowRoot?d.host:u}this.targetChangeHandlerKeys_=[listen(c,wi,this.handleBrowserEvent,this),listen(c,Ci,this.handleBrowserEvent,this)];const d=u.getRootNode();d instanceof ShadowRoot&&this.resizeObserver_.observe(d.host),this.resizeObserver_.observe(u)}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(unlistenByKey(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(unlistenByKey(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const c=this.getView();c&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=listen(c,mi,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=listen(c,_i,this.handleViewPropertyChanged_,this),c.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey),this.layerGroupPropertyListenerKeys_=null);const c=this.getLayerGroup();c&&(this.handleLayerAdd_(new GroupEvent("addlayer",c)),this.layerGroupPropertyListenerKeys_=[listen(c,mi,this.render,this),listen(c,_i,this.render,this),listen(c,"addlayer",this.handleLayerAdd_,this),listen(c,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const c=this.getLayerGroup().getLayerStatesArray();for(let u=0,d=c.length;u<d;++u){const d=c[u].layer;d.hasRenderer()&&d.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(c){return this.getControls().remove(c)}removeInteraction(c){return this.getInteractions().remove(c)}removeLayer(c){return this.getLayerGroup().getLayers().remove(c)}handleLayerRemove_(c){removeLayerMapProperty(c.layer)}removeOverlay(c){return this.getOverlays().remove(c)}renderFrame_(c){const u=this.getSize(),d=this.getView(),p=this.frameState_;let g=null;if(void 0!==u&&hasArea(u)&&d&&d.isDef()){const p=d.getHints(this.frameState_?this.frameState_.viewHints:void 0),f=d.getState();if(g={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:getForViewAndSize(f.center,f.resolution,f.rotation,u),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:u,tileQueue:this.tileQueue_,time:c,usedTiles:{},viewState:f,viewHints:p,wantedTiles:{},mapId:getUid(this),renderTargets:{}},f.nextCenter&&f.nextResolution){const c=isNaN(f.nextRotation)?f.rotation:f.nextRotation;g.nextExtent=getForViewAndSize(f.nextCenter,f.nextResolution,c,u)}}if(this.frameState_=g,this.renderer_.renderFrame(g),g){if(g.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,g.postRenderFunctions),p){(!this.previousExtent_||!isEmpty(this.previousExtent_)&&!equals$1(g.extent,this.previousExtent_))&&(this.dispatchEvent(new Co(Io,this,p)),this.previousExtent_=createOrUpdateEmpty(this.previousExtent_))}this.previousExtent_&&!g.viewHints[Bn]&&!g.viewHints[Un]&&!equals$1(g.extent,this.previousExtent_)&&(this.dispatchEvent(new Co(Fo,this,g)),clone(g.extent,this.previousExtent_))}this.dispatchEvent(new Co(Ao,this,g)),this.renderComplete_=(this.hasListener(ko)||this.hasListener(Oo)||this.hasListener(Pr))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(c){const u=this.getLayerGroup();u&&this.handleLayerRemove_(new GroupEvent("removelayer",u)),this.set(No,c)}setSize(c){this.set(Do,c)}setTarget(c){this.set(Go,c)}setView(c){if(!c||c instanceof Vn)return void this.set(jo,c);this.set(jo,new Vn);const u=this;c.then((function(c){u.setView(new Vn(c))}))}updateSize(){const c=this.getTargetElement();let u;if(c){const d=getComputedStyle(c),p=c.offsetWidth-parseFloat(d.borderLeftWidth)-parseFloat(d.paddingLeft)-parseFloat(d.paddingRight)-parseFloat(d.borderRightWidth),g=c.offsetHeight-parseFloat(d.borderTopWidth)-parseFloat(d.paddingTop)-parseFloat(d.paddingBottom)-parseFloat(d.borderBottomWidth);isNaN(p)||isNaN(g)||(u=[Math.max(0,p),Math.max(0,g)],!hasArea(u)&&(c.offsetWidth||c.offsetHeight||c.getClientRects().length)&&warn("No map visible because the map container's width or height are 0."))}const d=this.getSize();!u||d&&equals$2(u,d)||(this.setSize(u),this.updateViewportSize_(u))}updateViewportSize_(c){const u=this.getView();u&&u.setViewportSize(c)}};const ra="element",na="map",sa="offset",oa="position",aa="positioning";class Overlay extends Ri{constructor(c){super(),this.on,this.once,this.un,this.options=c,this.id=c.id,this.insertFirst=void 0===c.insertFirst||c.insertFirst,this.stopEvent=void 0===c.stopEvent||c.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==c.className?c.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===c.autoPan?{}:c.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(ra,this.handleElementChanged),this.addChangeListener(na,this.handleMapChanged),this.addChangeListener(sa,this.handleOffsetChanged),this.addChangeListener(oa,this.handlePositionChanged),this.addChangeListener(aa,this.handlePositioningChanged),void 0!==c.element&&this.setElement(c.element),this.setOffset(void 0!==c.offset?c.offset:[0,0]),this.setPositioning(c.positioning||"top-left"),void 0!==c.position&&this.setPosition(c.position)}getElement(){return this.get(ra)}getId(){return this.id}getMap(){return this.get(na)||null}getOffset(){return this.get(sa)}getPosition(){return this.get(oa)}getPositioning(){return this.get(aa)}handleElementChanged(){removeChildren(this.element);const c=this.getElement();c&&this.element.appendChild(c)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),unlistenByKey(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const c=this.getMap();if(c){this.mapPostrenderListenerKey=listen(c,Ao,this.render,this),this.updatePixelPosition();const u=this.stopEvent?c.getOverlayContainerStopEvent():c.getOverlayContainer();this.insertFirst?u.insertBefore(this.element,u.childNodes[0]||null):u.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(c){this.set(ra,c)}setMap(c){this.set(na,c)}setOffset(c){this.set(sa,c)}setPosition(c){this.set(oa,c)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(c){const u=this.getMap();if(!u||!u.getTargetElement()||!this.get(oa))return;const d=this.getRect(u.getTargetElement(),u.getSize()),p=this.getElement(),g=this.getRect(p,[outerWidth(p),outerHeight(p)]),f=void 0===(c=c||{}).margin?20:c.margin;if(!containsExtent(d,g)){const p=g[0]-d[0],_=d[2]-g[2],y=g[1]-d[1],x=d[3]-g[3],v=[0,0];if(p<0?v[0]=p-f:_<0&&(v[0]=Math.abs(_)+f),y<0?v[1]=y-f:x<0&&(v[1]=Math.abs(x)+f),0!==v[0]||0!==v[1]){const d=u.getView().getCenterInternal(),p=u.getPixelFromCoordinateInternal(d);if(!p)return;const g=[p[0]+v[0],p[1]+v[1]],f=c.animation||{};u.getView().animateInternal({center:u.getCoordinateFromPixelInternal(g),duration:f.duration,easing:f.easing})}}}getRect(c,u){const d=c.getBoundingClientRect(),p=d.left+window.pageXOffset,g=d.top+window.pageYOffset;return[p,g,p+u[0],g+u[1]]}setPositioning(c){this.set(aa,c)}setVisible(c){this.rendered.visible!==c&&(this.element.style.display=c?"":"none",this.rendered.visible=c)}updatePixelPosition(){const c=this.getMap(),u=this.getPosition();if(!c||!c.isRendered()||!u)return void this.setVisible(!1);const d=c.getPixelFromCoordinate(u),p=c.getSize();this.updateRenderedPosition(d,p)}updateRenderedPosition(c,u){const d=this.element.style,p=this.getOffset(),g=this.getPositioning();this.setVisible(!0);let f="0%",_="0%";"bottom-right"==g||"center-right"==g||"top-right"==g?f="-100%":"bottom-center"!=g&&"center-center"!=g&&"top-center"!=g||(f="-50%"),"bottom-left"==g||"bottom-center"==g||"bottom-right"==g?_="-100%":"center-left"!=g&&"center-center"!=g&&"center-right"!=g||(_="-50%");const y=`translate(${f}, ${_}) translate(${Math.round(c[0]+p[0])+"px"}, ${Math.round(c[1]+p[1])+"px"})`;this.rendered.transform_!=y&&(this.rendered.transform_=y,d.transform=y)}getOptions(){return this.options}}class LRUCache{constructor(c){this.highWaterMark=void 0!==c?c:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(c){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(c){return this.entries_.hasOwnProperty(c)}forEach(c){let u=this.oldest_;for(;u;)c(u.value_,u.key_,this),u=u.newer}get(c,u){const d=this.entries_[c];return assert(void 0!==d,"Tried to get a value for a key that does not exist in the cache"),d===this.newest_||(d===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(d.newer.older=d.older,d.older.newer=d.newer),d.newer=null,d.older=this.newest_,this.newest_.newer=d,this.newest_=d),d.value_}remove(c){const u=this.entries_[c];return assert(void 0!==u,"Tried to get a value for a key that does not exist in the cache"),u===this.newest_?(this.newest_=u.older,this.newest_&&(this.newest_.newer=null)):u===this.oldest_?(this.oldest_=u.newer,this.oldest_&&(this.oldest_.older=null)):(u.newer.older=u.older,u.older.newer=u.newer),delete this.entries_[c],--this.count_,u.value_}getCount(){return this.count_}getKeys(){const c=new Array(this.count_);let u,d=0;for(u=this.newest_;u;u=u.older)c[d++]=u.key_;return c}getValues(){const c=new Array(this.count_);let u,d=0;for(u=this.newest_;u;u=u.older)c[d++]=u.value_;return c}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(c){return this.entries_[c]?.value_}pop(){const c=this.oldest_;return delete this.entries_[c.key_],c.newer&&(c.newer.older=null),this.oldest_=c.newer,this.oldest_||(this.newest_=null),--this.count_,c.value_}replace(c,u){this.get(c),this.entries_[c].value_=u}set(c,u){assert(!(c in this.entries_),"Tried to set a value for a key that is used already");const d={key_:c,newer:null,older:this.newest_,value_:u};this.newest_?this.newest_.newer=d:this.oldest_=d,this.newest_=d,this.entries_[c]=d,++this.count_}setSize(c){this.highWaterMark=c}}function createOrUpdate$1(c,u,d,p){return void 0!==p?(p[0]=c,p[1]=u,p[2]=d,p):[c,u,d]}function getKeyZXY(c,u,d){return c+"/"+u+"/"+d}function getKey(c){return getKeyZXY(c[0],c[1],c[2])}function hash(c){return hashZXY(c[0],c[1],c[2])}function hashZXY(c,u,d){return(u<<c)+d}var la=class TileCache extends LRUCache{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(c){for(;this.canExpireCache();){if(this.peekLast().getKey()in c)break;this.pop().release()}}pruneExceptNewestZ(){if(0===this.getCount())return;const c=function fromKey(c){return c.split("/").map(Number)}(this.peekFirstKey()),u=c[0];this.forEach((c=>{c.tileCoord[0]!==u&&(this.remove(getKey(c.tileCoord)),c.release())}))}};class TileRange{constructor(c,u,d,p){this.minX=c,this.maxX=u,this.minY=d,this.maxY=p}contains(c){return this.containsXY(c[1],c[2])}containsTileRange(c){return this.minX<=c.minX&&c.maxX<=this.maxX&&this.minY<=c.minY&&c.maxY<=this.maxY}containsXY(c,u){return this.minX<=c&&c<=this.maxX&&this.minY<=u&&u<=this.maxY}equals(c){return this.minX==c.minX&&this.minY==c.minY&&this.maxX==c.maxX&&this.maxY==c.maxY}extend(c){c.minX<this.minX&&(this.minX=c.minX),c.maxX>this.maxX&&(this.maxX=c.maxX),c.minY<this.minY&&(this.minY=c.minY),c.maxY>this.maxY&&(this.maxY=c.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(c){return this.minX<=c.maxX&&this.maxX>=c.minX&&this.minY<=c.maxY&&this.maxY>=c.minY}}function createOrUpdate(c,u,d,p,g){return void 0!==g?(g.minX=c,g.maxX=u,g.minY=d,g.maxY=p,g):new TileRange(c,u,d,p)}var ha=TileRange;const ca=[];var ua=class VectorRenderTile extends yo{constructor(c,u,d,p){super(c,u,{transition:0}),this.context_=null,this.executorGroups=[],this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=p.bind(void 0,this),this.wrappedTileCoord=d}getContext(){return this.context_||(this.context_=createCanvasContext2D(1,1,ca)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(c){const u=getUid(c);return u in this.replayState_||(this.replayState_[u]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[u]}load(){this.getSourceTiles()}release(){releaseCanvas$1(this.context_),ca.push(this.context_.canvas),this.context_=null,super.release()}};var da=class VectorTile extends yo{constructor(c,u,d,p,g,f){super(c,u,f),this.extent=null,this.format_=p,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=g,this.url_=d,this.key=d}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==po&&(this.setState(go),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(c,u){this.setFeatures(c)}onError(){this.setState(fo)}setFeatures(c){this.features_=c,this.setState(mo)}setLoader(c){this.loader_=c}},pa=Object.freeze({__proto__:null,Collection:Fi,Disposable:fi,Feature:ki,Geolocation:vr,Graticule:co,Image:Zr,ImageCanvas:uo,ImageTile:xo,ImageWrapper:Zr,Kinetic:vo,Map:ia,MapBrowserEvent:Eo,MapBrowserEventHandler:Lo,MapEvent:Co,Object:Ri,Observable:Mi,Overlay:Overlay,Tile:yo,TileCache:la,TileQueue:Bo,TileRange:ha,VERSION:"10.1.0",VectorRenderTile:ua,VectorTile:da,View:Vn,getUid:getUid});const ga=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],ma="enterfullscreen",fa="leavefullscreen";function isFullScreenSupported(c){const u=c.body;return!!(u.webkitRequestFullscreen||u.requestFullscreen&&c.fullscreenEnabled)}function isFullScreen(c){return!(!c.webkitIsFullScreen&&!c.fullscreenElement)}function requestFullScreen(c){c.requestFullscreen?c.requestFullscreen():c.webkitRequestFullscreen&&c.webkitRequestFullscreen()}var _a=class FullScreen extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target}),this.on,this.once,this.un,this.keys_=void 0!==c.keys&&c.keys,this.source_=c.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==c.className?c.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==c.activeClassName?c.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==c.inactiveClassName?c.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const u=void 0!==c.label?c.label:"⤢";this.labelNode_="string"==typeof u?document.createTextNode(u):u;const d=void 0!==c.labelActive?c.labelActive:"×";this.labelActiveNode_="string"==typeof d?document.createTextNode(d):d;const p=c.tipLabel?c.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=p,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(vi,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${sn} ${an}`,this.element.appendChild(this.button_)}handleClick_(c){c.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const c=this.getMap();if(!c)return;const u=c.getOwnerDocument();if(isFullScreenSupported(u))if(isFullScreen(u))!function exitFullScreen(c){c.exitFullscreen?c.exitFullscreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()}(u);else{let d;d=this.source_?"string"==typeof this.source_?u.getElementById(this.source_):this.source_:c.getTargetElement(),this.keys_?function requestFullScreenWithKeys(c){c.webkitRequestFullscreen?c.webkitRequestFullscreen():requestFullScreen(c)}(d):requestFullScreen(d)}}handleFullScreenChange_(){const c=this.getMap();if(!c)return;const u=this.isInFullscreen_;this.isInFullscreen_=isFullScreen(c.getOwnerDocument()),u!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(replaceNode(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(ma)):(replaceNode(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(fa)),c.updateSize())}setClassName_(c,u){u?(c.classList.remove(...this.inactiveClassName_),c.classList.add(...this.activeClassName_)):(c.classList.remove(...this.activeClassName_),c.classList.add(...this.inactiveClassName_))}setMap(c){const u=this.getMap();u&&u.removeChangeListener(Go,this.boundHandleMapTargetChange_),super.setMap(c),this.handleMapTargetChange_(),c&&c.addChangeListener(Go,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const c=this.documentListeners_;for(let u=0,d=c.length;u<d;++u)unlistenByKey(c[u]);c.length=0;const u=this.getMap();if(u){const d=u.getOwnerDocument();isFullScreenSupported(d)?this.element.classList.remove(on):this.element.classList.add(on);for(let u=0,p=ga.length;u<p;++u)c.push(listen(d,ga[u],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}};const ya="projection",xa="coordinateFormat";var va=class MousePosition extends Uo{constructor(c){c=c||{};const u=document.createElement("div");u.className=void 0!==c.className?c.className:"ol-mouse-position",super({element:u,render:c.render,target:c.target}),this.on,this.once,this.un,this.addChangeListener(ya,this.handleProjectionChanged_),c.coordinateFormat&&this.setCoordinateFormat(c.coordinateFormat),c.projection&&this.setProjection(c.projection),this.renderOnMouseOut_=void 0!==c.placeholder,this.placeholder_=this.renderOnMouseOut_?c.placeholder:"&#160;",this.renderedHTML_=u.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==c.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(xa)}getProjection(){return this.get(ya)}handleMouseMove(c){const u=this.getMap();this.updateHTML_(u.getEventPixel(c))}handleMouseOut(c){this.updateHTML_(null)}setMap(c){if(super.setMap(c),c){const u=c.getViewport();this.listenerKeys.push(listen(u,bo,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(listen(u,Ro,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(c){this.set(xa,c)}setProjection(c){this.set(ya,get$2(c))}updateHTML_(c){let u=this.placeholder_;if(c&&this.mapProjection_){if(!this.transform_){const c=this.getProjection();this.transform_=c?getTransformFromProjections(this.mapProjection_,c):identityTransform}const d=this.getMap().getCoordinateFromPixelInternal(c);if(d){const c=getUserProjection();if(c&&(this.transform_=getTransformFromProjections(this.mapProjection_,c)),this.transform_(d,d),this.wrapX_){wrapX$1(d,c||this.getProjection()||this.mapProjection_)}const p=this.getCoordinateFormat();u=p?p(d):d.toString()}}this.renderedHTML_&&u===this.renderedHTML_||(this.element.innerHTML=u,this.renderedHTML_=u)}render(c){const u=c.frameState;u?this.mapProjection_!=u.viewState.projection&&(this.mapProjection_=u.viewState.projection,this.transform_=null):this.mapProjection_=null}};const Sa=.75,wa=.1;var Ca=class OverviewMap extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===c.collapsed||c.collapsed,this.collapsible_=void 0===c.collapsible||c.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==c.rotateWithView&&c.rotateWithView,this.viewExtent_=void 0;const u=void 0!==c.className?c.className:"ol-overviewmap",d=void 0!==c.tipLabel?c.tipLabel:"Overview map",p=void 0!==c.collapseLabel?c.collapseLabel:"‹";"string"==typeof p?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=p):this.collapseLabel_=p;const g=void 0!==c.label?c.label:"›";"string"==typeof g?(this.label_=document.createElement("span"),this.label_.textContent=g):this.label_=g;const f=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,_=document.createElement("button");_.setAttribute("type","button"),_.title=d,_.appendChild(f),_.addEventListener(vi,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=c.view;const y=new ia({view:c.view,controls:new Fi,interactions:new Fi});this.ovmap_=y,c.layers&&c.layers.forEach((function(c){y.addLayer(c)}));const x=document.createElement("div");x.className="ol-overviewmap-box",x.style.boxSizing="border-box",this.boxOverlay_=new Overlay({position:[0,0],positioning:"center-center",element:x}),this.ovmap_.addOverlay(this.boxOverlay_);const v=u+" "+sn+" "+an+(this.collapsed_&&this.collapsible_?" "+ln:"")+(this.collapsible_?"":" ol-uncollapsible"),C=this.element;C.className=v,C.appendChild(this.ovmapDiv_),C.appendChild(_);const M=this,T=this.boxOverlay_,L=this.boxOverlay_.getElement(),move=function(c){const u={clientX:(d=c).clientX,clientY:d.clientY};var d;const p=y.getEventCoordinate(u);T.setPosition(p)},endMoving=function(c){const u=y.getEventCoordinateInternal(c);M.getMap().getView().setCenterInternal(u),window.removeEventListener("pointermove",move),window.removeEventListener("pointerup",endMoving)};this.ovmapDiv_.addEventListener("pointerdown",(function(){event.target===L&&window.addEventListener("pointermove",move),window.addEventListener("pointerup",endMoving)}))}setMap(c){const u=this.getMap();if(c!==u){if(u){const c=u.getView();c&&this.unbindView_(c),this.ovmap_.setTarget(null)}if(super.setMap(c),c){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(listen(c,mi,this.handleMapPropertyChange_,this));const u=c.getView();u&&this.bindView_(u),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(c){if(c.key===jo){const u=c.oldValue;u&&this.unbindView_(u);const d=this.getMap().getView();this.bindView_(d)}else this.ovmap_.isRendered()||c.key!==Go&&c.key!==Do||this.ovmap_.updateSize()}bindView_(c){if(!this.view_){const u=new Vn({projection:c.getProjection()});this.ovmap_.setView(u)}c.addChangeListener($n.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_(),c.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())}unbindView_(c){c.removeChangeListener($n.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const c=this.getMap(),u=this.ovmap_;if(!c.isRendered()||!u.isRendered())return;const d=c.getSize(),p=c.getView().calculateExtentInternal(d);if(this.viewExtent_&&equals$1(p,this.viewExtent_))return;this.viewExtent_=p;const g=u.getSize(),f=u.getView().calculateExtentInternal(g),_=u.getPixelFromCoordinateInternal(getTopLeft(p)),y=u.getPixelFromCoordinateInternal(getBottomRight(p)),x=Math.abs(_[0]-y[0]),v=Math.abs(_[1]-y[1]),C=g[0],M=g[1];x<C*wa||v<M*wa||x>C*Sa||v>M*Sa?this.resetExtent_():containsExtent(f,p)||this.recenter_()}resetExtent_(){const c=this.getMap(),u=this.ovmap_,d=c.getSize(),p=c.getView().calculateExtentInternal(d),g=u.getView(),f=Math.log(7.5)/Math.LN2;scaleFromCenter(p,1/(Math.pow(2,f/2)*wa)),g.fitInternal(fromExtent(p))}recenter_(){const c=this.getMap(),u=this.ovmap_,d=c.getView();u.getView().setCenterInternal(d.getCenterInternal())}updateBox_(){const c=this.getMap(),u=this.ovmap_;if(!c.isRendered()||!u.isRendered())return;const d=c.getSize(),p=c.getView(),g=u.getView(),f=this.rotateWithView_?0:-p.getRotation(),_=this.boxOverlay_,y=this.boxOverlay_.getElement(),x=p.getCenter(),v=p.getResolution(),C=g.getResolution(),M=d[0]*v/C,T=d[1]*v/C;if(_.setPosition(x),y){y.style.width=M+"px",y.style.height=T+"px";const c="rotate("+f+"rad)";y.style.transform=c}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=listenOnce(this.ovmap_,Ao,(c=>{delete this.ovmapPostrenderKey_,this.updateBox_()})))}handleClick_(c){c.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(ln),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const c=this.ovmap_;if(!this.collapsed_){if(c.isRendered())return this.viewExtent_=void 0,void c.render();c.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(c){this.collapsible_!==c&&(this.collapsible_=c,this.element.classList.toggle("ol-uncollapsible"),!c&&this.collapsed_&&this.handleToggle_())}setCollapsed(c){this.collapsible_&&this.collapsed_!==c&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(c){this.rotateWithView_!==c&&(this.rotateWithView_=c,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(c){this.validateExtent_(),this.updateBox_()}};const Ea="units",Pa=[1,2,5],ba=25.4/.28;var Ma=class ScaleLine extends Uo{constructor(c){c=c||{};const u=document.createElement("div");u.style.pointerEvents="none",super({element:u,render:c.render,target:c.target}),this.on,this.once,this.un;const d=void 0!==c.className?c.className:c.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=d+"-inner",this.element.className=d+" "+sn,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==c.minWidth?c.minWidth:64,this.maxWidth_=c.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Ea,this.handleUnitsChanged_),this.setUnits(c.units||"metric"),this.scaleBar_=c.bar||!1,this.scaleBarSteps_=c.steps||4,this.scaleBarText_=c.text||!1,this.dpi_=c.dpi||void 0}getUnits(){return this.get(Ea)}handleUnitsChanged_(){this.updateElement_()}setUnits(c){this.set(Ea,c)}setDpi(c){this.dpi_=c}updateElement_(){const c=this.viewState_;if(!c)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const u=c.center,d=c.projection,p=this.getUnits(),g="degrees"==p?"degrees":"m";let f=getPointResolution(d,c.resolution,u,g);const _=this.minWidth_*(this.dpi_||ba)/ba,y=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||ba)/ba:void 0;let x=_*f,v="";if("degrees"==p){const c=Gi.degrees;x*=c,x<c/60?(v="″",f*=3600):x<c?(v="′",f*=60):v="°"}else if("imperial"==p)x<.9144?(v="in",f/=.0254):x<1609.344?(v="ft",f/=.3048):(v="mi",f/=1609.344);else if("nautical"==p)f/=1852,v="NM";else if("metric"==p)x<1e-6?(v="nm",f*=1e9):x<.001?(v="μm",f*=1e6):x<1?(v="mm",f*=1e3):x<1e3?v="m":(v="km",f/=1e3);else{if("us"!=p)throw new Error("Invalid units");x<.9144?(v="in",f*=39.37):x<1609.344?(v="ft",f/=.30480061):(v="mi",f/=1609.3472)}let C,M,T,L,A,I,k=3*Math.floor(Math.log(_*f)/Math.log(10));for(;;){T=Math.floor(k/3);const c=Math.pow(10,T);if(C=Pa[(k%3+3)%3]*c,M=Math.round(C/f),isNaN(M))return this.element.style.display="none",void(this.renderedVisible_=!1);if(void 0!==y&&M>=y){C=L,M=A,T=I;break}if(M>=_)break;L=C,A=M,I=T,++k}const O=this.scaleBar_?this.createScaleBar(M,C,v):C.toFixed(T<0?-T:0)+" "+v;this.renderedHTML_!=O&&(this.innerElement_.innerHTML=O,this.renderedHTML_=O),this.renderedWidth_!=M&&(this.innerElement_.style.width=M+"px",this.renderedWidth_=M),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(c,u,d){const p=this.getScaleForResolution(),g=p<1?Math.round(1/p).toLocaleString()+" : 1":"1 : "+Math.round(p).toLocaleString(),f=this.scaleBarSteps_,_=c/f,y=[this.createMarker("absolute")];for(let p=0;p<f;++p){const g=p%2==0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";y.push(`<div><div class="ol-scale-singlebar ${g}" style="width: ${_}px;"></div>`+this.createMarker("relative")+(p%2==0||2===f?this.createStepText(p,c,!1,u,d):"")+"</div>")}y.push(this.createStepText(f,c,!0,u,d));return(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${c}px;">`+g+"</div>":"")+y.join("")}createMarker(c){return`<div class="ol-scale-step-marker" style="position: ${c}; top: ${"absolute"===c?3:-10}px;"></div>`}createStepText(c,u,d,p,g){const f=(0===c?0:Math.round(p/this.scaleBarSteps_*c*100)/100)+(0===c?"":" "+g);return`<div class="ol-scale-step-text" style="margin-left: ${0===c?-3:u/this.scaleBarSteps_*-1}px;text-align: ${0===c?"left":"center"};min-width: ${0===c?0:u/this.scaleBarSteps_*2}px;left: ${d?u+"px":"unset"};">`+f+"</div>"}getScaleForResolution(){return getPointResolution(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||ba)}render(c){const u=c.frameState;this.viewState_=u?u.viewState:null,this.updateElement_()}};const Ta=0,Ra=1;var La=class ZoomSlider extends Uo{constructor(c){super({target:(c=c||{}).target,element:document.createElement("div"),render:c.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=Ta,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==c.duration?c.duration:200;const u=void 0!==c.className?c.className:"ol-zoomslider",d=document.createElement("button");d.setAttribute("type","button"),d.className=u+"-thumb "+sn;const p=this.element;p.className=u+" "+sn+" "+an,p.appendChild(d),p.addEventListener(Mo,this.handleDraggerStart_.bind(this),!1),p.addEventListener(bo,this.handleDraggerDrag_.bind(this),!1),p.addEventListener(To,this.handleDraggerEnd_.bind(this),!1),p.addEventListener(vi,this.handleContainerClick_.bind(this),!1),d.addEventListener(vi,stopPropagation,!1)}setMap(c){super.setMap(c),c&&c.render()}initSlider_(){const c=this.element;let u=c.offsetWidth,d=c.offsetHeight;if(0===u&&0===d)return this.sliderInitialized_=!1;const p=getComputedStyle(c);u-=parseFloat(p.paddingRight)+parseFloat(p.paddingLeft),d-=parseFloat(p.paddingTop)+parseFloat(p.paddingBottom);const g=c.firstElementChild,f=getComputedStyle(g),_=g.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft),y=g.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);return this.thumbSize_=[_,y],u>d?(this.direction_=Ra,this.widthLimit_=u-_):(this.direction_=Ta,this.heightLimit_=d-y),this.sliderInitialized_=!0}handleContainerClick_(c){const u=this.getMap().getView(),d=this.getRelativePosition_(c.offsetX-this.thumbSize_[0]/2,c.offsetY-this.thumbSize_[1]/2),p=this.getResolutionForPosition_(d),g=u.getConstrainedZoom(u.getZoomForResolution(p));u.animateInternal({zoom:g,duration:this.duration_,easing:easeOut})}handleDraggerStart_(c){if(!this.dragging_&&c.target===this.element.firstElementChild){const u=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=c.clientX-parseFloat(u.style.left),this.startY_=c.clientY-parseFloat(u.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const c=this.handleDraggerDrag_,u=this.handleDraggerEnd_,d=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(listen(d,bo,c,this),listen(d,To,u,this))}}}handleDraggerDrag_(c){if(this.dragging_){const u=c.clientX-this.startX_,d=c.clientY-this.startY_,p=this.getRelativePosition_(u,d);this.currentResolution_=this.getResolutionForPosition_(p),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(c){if(this.dragging_){this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0}}setThumbPosition_(c){const u=this.getPositionForResolution_(c),d=this.element.firstElementChild;this.direction_==Ra?d.style.left=this.widthLimit_*u+"px":d.style.top=this.heightLimit_*u+"px"}getRelativePosition_(c,u){let d;return d=this.direction_===Ra?c/this.widthLimit_:u/this.heightLimit_,clamp(d,0,1)}getResolutionForPosition_(c){return this.getMap().getView().getResolutionForValueFunction()(1-c)}getPositionForResolution_(c){return clamp(1-this.getMap().getView().getValueForResolutionFunction()(c),0,1)}render(c){if(!c.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const u=c.frameState.viewState.resolution;this.currentResolution_=u,this.setThumbPosition_(u)}};var Aa=class ZoomToExtent extends Uo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target}),this.extent=c.extent?c.extent:null;const u=void 0!==c.className?c.className:"ol-zoom-extent",d=void 0!==c.label?c.label:"E",p=void 0!==c.tipLabel?c.tipLabel:"Fit to extent",g=document.createElement("button");g.setAttribute("type","button"),g.title=p,g.appendChild("string"==typeof d?document.createTextNode(d):d),g.addEventListener(vi,this.handleClick_.bind(this),!1);const f=u+" "+sn+" "+an,_=this.element;_.className=f,_.appendChild(g)}handleClick_(c){c.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const c=this.getMap().getView(),u=this.extent?fromUserExtent(this.extent,c.getProjection()):c.getProjection().getExtent();c.fitInternal(fromExtent(u))}},Ia=Object.freeze({__proto__:null,Attribution:$o,Control:Uo,FullScreen:_a,MousePosition:va,OverviewMap:Ca,Rotate:Wo,ScaleLine:Ma,Zoom:Xo,ZoomSlider:La,ZoomToExtent:Aa,defaults:defaults$1});var Fa=class FeatureFormat{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=ki,this.supportedMediaTypes=null}getReadOptions(c,u){if(u){let d=u.dataProjection?get$2(u.dataProjection):this.readProjection(c);u.extent&&d&&"tile-pixels"===d.getUnits()&&(d=get$2(d),d.setWorldExtent(u.extent)),u={dataProjection:d,featureProjection:u.featureProjection}}return this.adaptOptions(u)}adaptOptions(c){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},c)}getType(){return abstract()}readFeature(c,u){return abstract()}readFeatures(c,u){return abstract()}readGeometry(c,u){return abstract()}readProjection(c){return abstract()}writeFeature(c,u){return abstract()}writeFeatures(c,u){return abstract()}writeGeometry(c,u){return abstract()}};function transformGeometryWithOptions(c,u,d){const p=d?get$2(d.featureProjection):null,g=d?get$2(d.dataProjection):null;let f=c;if(p&&g&&!equivalent(p,g)){u&&(f=c.clone());const d=u?p:g,_=u?g:p;"tile-pixels"===d.getUnits()?f.transform(d,_):f.applyTransform(getTransform(d,_))}if(u&&d&&void 0!==d.decimals){const u=Math.pow(10,d.decimals),transform=function(c){for(let d=0,p=c.length;d<p;++d)c[d]=Math.round(c[d]*u)/u;return c};f===c&&(f=c.clone()),f.applyTransform(transform)}return f}function transformExtentWithOptions(c,u){const d=u?get$2(u.featureProjection):null,p=u?get$2(u.dataProjection):null;return d&&p&&!equivalent(d,p)?transformExtent(c,p,d):c}const ka={Point:ar,LineString:tn,Polygon:lr,MultiPoint:Ys,MultiLineString:qs,MultiPolygon:Zs};function createRenderFeature(c,u){const d=c.geometry;if(!d)return[];if(Array.isArray(d))return d.map((u=>createRenderFeature({...c,geometry:u}))).flat();const p="MultiPolygon"===d.type?"Polygon":d.type;if("GeometryCollection"===p||"Circle"===p)throw new Error("Unsupported geometry type: "+p);const g=d.layout.length;return transformGeometryWithOptions(new RenderFeature(p,"Polygon"===p?function orientFlatCoordinates(c,u,d){return Array.isArray(u[0])?(linearRingssAreOriented(c,0,u,d)||orientLinearRingsArray(c=c.slice(),0,u,d),c):(linearRingsAreOriented(c,0,u,d)||orientLinearRings(c=c.slice(),0,u,d),c)}(d.flatCoordinates,d.ends,g):d.flatCoordinates,d.ends?.flat(),g,c.properties||{},c.id).enableSimplifyTransformed(),!1,u)}function createGeometry(c,u){if(!c)return null;if(Array.isArray(c)){const d=c.map((c=>createGeometry(c,u)));return new Vs(d)}return transformGeometryWithOptions(new(0,ka[c.type])(c.flatCoordinates,c.layout,c.ends),!1,u)}class JSONFeature extends Fa{constructor(){super()}getType(){return"json"}readFeature(c,u){return this.readFeatureFromObject(getObject(c),this.getReadOptions(c,u))}readFeatures(c,u){return this.readFeaturesFromObject(getObject(c),this.getReadOptions(c,u))}readFeatureFromObject(c,u){return abstract()}readFeaturesFromObject(c,u){return abstract()}readGeometry(c,u){return this.readGeometryFromObject(getObject(c),this.getReadOptions(c,u))}readGeometryFromObject(c,u){return abstract()}readProjection(c){return this.readProjectionFromObject(getObject(c))}readProjectionFromObject(c){return abstract()}writeFeature(c,u){return JSON.stringify(this.writeFeatureObject(c,u))}writeFeatureObject(c,u){return abstract()}writeFeatures(c,u){return JSON.stringify(this.writeFeaturesObject(c,u))}writeFeaturesObject(c,u){return abstract()}writeGeometry(c,u){return JSON.stringify(this.writeGeometryObject(c,u))}writeGeometryObject(c,u){return abstract()}}function getObject(c){if("string"==typeof c){const u=JSON.parse(c);return u||null}return null!==c?c:null}const Oa={Point:function readPointGeometry$2(c){let u;u=void 0!==c.m&&void 0!==c.z?new ar([c.x,c.y,c.z,c.m],"XYZM"):void 0!==c.z?new ar([c.x,c.y,c.z],"XYZ"):void 0!==c.m?new ar([c.x,c.y,c.m],"XYM"):new ar([c.x,c.y]);return u},LineString:function readLineStringGeometry$2(c){const u=getGeometryLayout(c);return new tn(c.paths[0],u)},Polygon:function readPolygonGeometry$2(c){const u=getGeometryLayout(c);return new lr(c.rings,u)},MultiPoint:function readMultiPointGeometry$2(c){const u=getGeometryLayout(c);return new Ys(c.points,u)},MultiLineString:function readMultiLineStringGeometry$2(c){const u=getGeometryLayout(c);return new qs(c.paths,u)},MultiPolygon:function readMultiPolygonGeometry$2(c){const u=getGeometryLayout(c);return new Zs(c.rings,u)}},Na={Point:function writePointGeometry$1(c,u){const d=c.getCoordinates();let p;const g=c.getLayout();if("XYZ"===g)p={x:d[0],y:d[1],z:d[2]};else if("XYM"===g)p={x:d[0],y:d[1],m:d[2]};else if("XYZM"===g)p={x:d[0],y:d[1],z:d[2],m:d[3]};else{if("XY"!==g)throw new Error("Invalid geometry layout");p={x:d[0],y:d[1]}}return p},LineString:function writeLineStringGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,paths:[c.getCoordinates()]}},Polygon:function writePolygonGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,rings:c.getCoordinates(!1)}},MultiPoint:function writeMultiPointGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,points:c.getCoordinates()}},MultiLineString:function writeMultiLineStringGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,paths:c.getCoordinates()}},MultiPolygon:function writeMultiPolygonGeometry$1(c,u){const d=getHasZM(c),p=c.getCoordinates(!1),g=[];for(let c=0;c<p.length;c++)for(let u=p[c].length-1;u>=0;u--)g.push(p[c][u]);return{hasZ:d.hasZ,hasM:d.hasM,rings:g}}};function readGeometry$1(c,u){if(!c)return null;let d;if("number"==typeof c.x&&"number"==typeof c.y)d="Point";else if(c.points)d="MultiPoint";else if(c.paths){d=1===c.paths.length?"LineString":"MultiLineString"}else if(c.rings){const u=c,p=getGeometryLayout(u),g=function convertRings(c,u){const d=[],p=[],g=[];let f,_;for(f=0,_=c.length;f<_;++f){d.length=0,deflateCoordinates(d,0,c[f],u.length);linearRingIsClockwise(d,0,d.length,u.length)?p.push([c[f]]):g.push(c[f])}for(;g.length;){const c=g.shift();let u=!1;for(f=p.length-1;f>=0;f--){const d=p[f][0];if(containsExtent(new or(d).getExtent(),new or(c).getExtent())){p[f].push(c),u=!0;break}}u||p.push([c.reverse()])}return p}(u.rings,p);1===g.length?(d="Polygon",c=Object.assign({},c,{rings:g[0]})):(d="MultiPolygon",c=Object.assign({},c,{rings:g}))}return transformGeometryWithOptions((0,Oa[d])(c),!1,u)}function getGeometryLayout(c){let u="XY";return!0===c.hasZ&&!0===c.hasM?u="XYZM":!0===c.hasZ?u="XYZ":!0===c.hasM&&(u="XYM"),u}function getHasZM(c){const u=c.getLayout();return{hasZ:"XYZ"===u||"XYZM"===u,hasM:"XYM"===u||"XYZM"===u}}function writeGeometry$1(c,u){return(0,Na[c.getType()])(transformGeometryWithOptions(c,!0,u),u)}var Da=class EsriJSON extends JSONFeature{constructor(c){c=c||{},super(),this.geometryName_=c.geometryName}readFeatureFromObject(c,u,d){const p=c,g=readGeometry$1(p.geometry,u),f=new ki;if(this.geometryName_&&f.setGeometryName(this.geometryName_),f.setGeometry(g),p.attributes){f.setProperties(p.attributes,!0);const c=p.attributes[d];void 0!==c&&f.setId(c)}return f}readFeaturesFromObject(c,u){if(u=u||{},c.features){const d=[],p=c.features;for(let g=0,f=p.length;g<f;++g)d.push(this.readFeatureFromObject(p[g],u,c.objectIdFieldName));return d}return[this.readFeatureFromObject(c,u)]}readGeometryFromObject(c,u){return readGeometry$1(c,u)}readProjectionFromObject(c){if(c.spatialReference&&void 0!==c.spatialReference.wkid){return get$2("EPSG:"+c.spatialReference.wkid)}return null}writeGeometryObject(c,u){return writeGeometry$1(c,this.adaptOptions(u))}writeFeatureObject(c,u){u=this.adaptOptions(u);const d={};if(!c.hasProperties())return d.attributes={},d;const p=c.getProperties(),g=c.getGeometry();if(g){d.geometry=writeGeometry$1(g,u);const f=u&&(u.dataProjection||u.featureProjection);f&&(d.geometry.spatialReference={wkid:Number(get$2(f).getCode().split(":").pop())}),delete p[c.getGeometryName()]}return isEmpty$1(p)?d.attributes={}:d.attributes=p,d}writeFeaturesObject(c,u){u=this.adaptOptions(u);const d=[];for(let p=0,g=c.length;p<g;++p)d.push(this.writeFeatureObject(c[p],u));return{features:d}}};function readGeometryInternal(c,u){if(!c)return null;let d;switch(c.type){case"Point":d=function readPointGeometry$1(c){const u=c.coordinates;return{type:"Point",flatCoordinates:u,layout:getLayoutForStride(u.length)}}(c);break;case"LineString":d=function readLineStringGeometry$1(c){const u=c.coordinates,d=u.flat();return{type:"LineString",flatCoordinates:d,ends:[d.length],layout:getLayoutForStride(u[0]?.length||2)}}(c);break;case"Polygon":d=function readPolygonGeometry$1(c){const u=c.coordinates,d=[],p=u[0]?.[0]?.length,g=deflateCoordinatesArray(d,0,u,p);return{type:"Polygon",flatCoordinates:d,ends:g,layout:getLayoutForStride(p)}}(c);break;case"MultiPoint":d=function readMultiPointGeometry$1(c){const u=c.coordinates;return{type:"MultiPoint",flatCoordinates:u.flat(),layout:getLayoutForStride(u[0]?.length||2)}}(c);break;case"MultiLineString":d=function readMultiLineStringGeometry$1(c){const u=c.coordinates,d=u[0]?.[0]?.length||2,p=[],g=deflateCoordinatesArray(p,0,u,d);return{type:"MultiLineString",flatCoordinates:p,ends:g,layout:getLayoutForStride(d)}}(c);break;case"MultiPolygon":d=function readMultiPolygonGeometry$1(c){const u=c.coordinates,d=[],p=u[0]?.[0]?.[0].length||2,g=deflateMultiCoordinatesArray(d,0,u,p);return{type:"MultiPolygon",flatCoordinates:d,ends:g,layout:getLayoutForStride(p)}}(c);break;case"GeometryCollection":d=function readGeometryCollectionGeometry(c,u){const d=c.geometries.map((function(c){return readGeometryInternal(c)}));return d}(c);break;default:throw new Error("Unsupported GeoJSON type: "+c.type)}return d}function writeGeometry(c,u){const d=(c=transformGeometryWithOptions(c,!0,u)).getType();let p;switch(d){case"Point":p=function writePointGeometry(c,u){return{type:"Point",coordinates:c.getCoordinates()}}(c);break;case"LineString":p=function writeLineStringGeometry(c,u){return{type:"LineString",coordinates:c.getCoordinates()}}(c);break;case"Polygon":p=function writePolygonGeometry(c,u){let d;u&&(d=u.rightHanded);return{type:"Polygon",coordinates:c.getCoordinates(d)}}(c,u);break;case"MultiPoint":p=function writeMultiPointGeometry(c,u){return{type:"MultiPoint",coordinates:c.getCoordinates()}}(c);break;case"MultiLineString":p=function writeMultiLineStringGeometry(c,u){return{type:"MultiLineString",coordinates:c.getCoordinates()}}(c);break;case"MultiPolygon":p=function writeMultiPolygonGeometry(c,u){let d;u&&(d=u.rightHanded);return{type:"MultiPolygon",coordinates:c.getCoordinates(d)}}(c,u);break;case"GeometryCollection":p=function writeGeometryCollectionGeometry(c,u){u=Object.assign({},u),delete u.featureProjection;const d=c.getGeometriesArray().map((function(c){return writeGeometry(c,u)}));return{type:"GeometryCollection",geometries:d}}(c,u);break;case"Circle":p={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+d)}return p}var Ga=class GeoJSON extends JSONFeature{constructor(c){c=c||{},super(),this.dataProjection=get$2(c.dataProjection?c.dataProjection:"EPSG:4326"),c.featureProjection&&(this.defaultFeatureProjection=get$2(c.featureProjection)),c.featureClass&&(this.featureClass=c.featureClass),this.geometryName_=c.geometryName,this.extractGeometryName_=c.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(c,u){let d=null;d="Feature"===c.type?c:{type:"Feature",geometry:c,properties:null};const p=readGeometryInternal(d.geometry);if(this.featureClass===RenderFeature)return createRenderFeature({geometry:p,id:d.id,properties:d.properties},u);const g=new ki;return this.geometryName_?g.setGeometryName(this.geometryName_):this.extractGeometryName_&&d.geometry_name&&g.setGeometryName(d.geometry_name),g.setGeometry(createGeometry(p,u)),"id"in d&&g.setId(d.id),d.properties&&g.setProperties(d.properties,!0),g}readFeaturesFromObject(c,u){let d=null;if("FeatureCollection"===c.type){d=[];const p=c.features;for(let c=0,g=p.length;c<g;++c){const g=this.readFeatureFromObject(p[c],u);g&&d.push(g)}}else d=[this.readFeatureFromObject(c,u)];return d.flat()}readGeometryFromObject(c,u){return function readGeometry(c,u){const d=readGeometryInternal(c);return createGeometry(d,u)}(c,u)}readProjectionFromObject(c){const u=c.crs;let d;if(u)if("name"==u.type)d=get$2(u.properties.name);else{if("EPSG"!==u.type)throw new Error("Unknown SRS type");d=get$2("EPSG:"+u.properties.code)}else d=this.dataProjection;return d}writeFeatureObject(c,u){u=this.adaptOptions(u);const d={type:"Feature",geometry:null,properties:null},p=c.getId();if(void 0!==p&&(d.id=p),!c.hasProperties())return d;const g=c.getProperties(),f=c.getGeometry();return f&&(d.geometry=writeGeometry(f,u),delete g[c.getGeometryName()]),isEmpty$1(g)||(d.properties=g),d}writeFeaturesObject(c,u){u=this.adaptOptions(u);const d=[];for(let p=0,g=c.length;p<g;++p)d.push(this.writeFeatureObject(c[p],u));return{type:"FeatureCollection",features:d}}writeGeometryObject(c,u){return writeGeometry(c,this.adaptOptions(u))}};const ja="http://www.w3.org/2001/XMLSchema-instance";function createElementNS(c,u){return getDocument().createElementNS(c,u)}function getAllTextContent(c,u){return getAllTextContent_(c,u,[]).join("")}function getAllTextContent_(c,u,d){if(c.nodeType==Node.CDATA_SECTION_NODE||c.nodeType==Node.TEXT_NODE)d.push(c.nodeValue);else{let p;for(p=c.firstChild;p;p=p.nextSibling)getAllTextContent_(p,u,d)}return d}function isDocument(c){return"documentElement"in c}function parse$1(c){return(new DOMParser).parseFromString(c,"application/xml")}function makeArrayExtender(c,u){return function(d,p){const g=c.call(u??this,d,p);if(void 0!==g){extend$3(p[p.length-1],g)}}}function makeArrayPusher(c,u){return function(d,p){const g=c.call(u??this,d,p);if(void 0!==g){p[p.length-1].push(g)}}}function makeReplacer(c,u){return function(d,p){const g=c.call(u??this,d,p);void 0!==g&&(p[p.length-1]=g)}}function makeObjectPropertyPusher(c,u,d){return function(u,d){const p=c.call(this,u,d);if(void 0!==p){const c=d[d.length-1],g=u.localName;let f;g in c?f=c[g]:(f=[],c[g]=f),f.push(p)}}}function makeObjectPropertySetter(c,u,d){return function(d,p){const g=c.call(this,d,p);if(void 0!==g){p[p.length-1][void 0!==u?u:d.localName]=g}}}function makeChildAppender(c,u){return function(d,p,g){c.call(u??this,d,p,g);g[g.length-1].node.appendChild(d)}}function makeArraySerializer(c,u){let d,p;return function(u,g,f){if(void 0===d){d={};const g={};g[u.localName]=c,d[u.namespaceURI]=g,p=makeSimpleNodeFactory(u.localName)}serialize(d,p,g,f)}}function makeSimpleNodeFactory(c,u){return function(d,p,g){const f=p[p.length-1].node;let _=c;void 0===_&&(_=g);return createElementNS(void 0!==u?u:f.namespaceURI,_)}}const za=makeSimpleNodeFactory();function makeSequence(c,u){const d=u.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=c[u[g]];return p}function makeStructureNS(c,u,d){let p,g;for(d=void 0!==d?d:{},p=0,g=c.length;p<g;++p)d[c[p]]=u;return d}function parseNode(c,u,d,p){let g;for(g=u.firstElementChild;g;g=g.nextElementSibling){const u=c[g.namespaceURI];if(void 0!==u){const c=u[g.localName];void 0!==c&&c.call(p,g,d)}}}function pushParseAndPop(c,u,d,p,g){return p.push(c),parseNode(u,d,p,g),p.pop()}function serialize(c,u,d,p,g,f){const _=(void 0!==g?g:d).length;let y,x;for(let v=0;v<_;++v)y=d[v],void 0!==y&&(x=u.call(f,y,p,void 0!==g?g[v]:void 0),void 0!==x&&c[x.namespaceURI][x.localName].call(f,x,y,p))}function pushSerializeAndPop(c,u,d,p,g,f,_){return g.push(c),serialize(u,d,p,g,f,_),g.pop()}let Ba,Ua;function getDocument(){return void 0===Ua&&"undefined"!=typeof document&&(Ua=document.implementation.createDocument("","",null)),Ua}class XMLFeature extends Fa{constructor(){super(),this.xmlSerializer_=function getXMLSerializer(){return void 0===Ba&&"undefined"!=typeof XMLSerializer&&(Ba=new XMLSerializer),Ba}()}getType(){return"xml"}readFeature(c,u){if(!c)return null;if("string"==typeof c){const d=parse$1(c);return this.readFeatureFromDocument(d,u)}return isDocument(c)?this.readFeatureFromDocument(c,u):this.readFeatureFromNode(c,u)}readFeatureFromDocument(c,u){const d=this.readFeaturesFromDocument(c,u);return d.length>0?d[0]:null}readFeatureFromNode(c,u){return null}readFeatures(c,u){if(!c)return[];if("string"==typeof c){const d=parse$1(c);return this.readFeaturesFromDocument(d,u)}return isDocument(c)?this.readFeaturesFromDocument(c,u):this.readFeaturesFromNode(c,u)}readFeaturesFromDocument(c,u){const d=[];for(let p=c.firstChild;p;p=p.nextSibling)p.nodeType==Node.ELEMENT_NODE&&extend$3(d,this.readFeaturesFromNode(p,u));return d}readFeaturesFromNode(c,u){return abstract()}readGeometry(c,u){if(!c)return null;if("string"==typeof c){const d=parse$1(c);return this.readGeometryFromDocument(d,u)}return isDocument(c)?this.readGeometryFromDocument(c,u):this.readGeometryFromNode(c,u)}readGeometryFromDocument(c,u){return null}readGeometryFromNode(c,u){return null}readProjection(c){if(!c)return null;if("string"==typeof c){const u=parse$1(c);return this.readProjectionFromDocument(u)}return isDocument(c)?this.readProjectionFromDocument(c):this.readProjectionFromNode(c)}readProjectionFromDocument(c){return this.dataProjection}readProjectionFromNode(c){return this.dataProjection}writeFeature(c,u){const d=this.writeFeatureNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeFeatureNode(c,u){return null}writeFeatures(c,u){const d=this.writeFeaturesNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeFeaturesNode(c,u){return null}writeGeometry(c,u){const d=this.writeGeometryNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeGeometryNode(c,u){return null}}const $a="http://www.opengis.net/gml",Wa=/^\s*$/;class GMLBase extends XMLFeature{constructor(c){super(),c=c||{},this.featureType=c.featureType,this.featureNS=c.featureNS,this.srsName=c.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:makeArrayPusher(this.readFeaturesInternal),featureMembers:makeReplacer(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(c,u){const d=c.localName;let p=null;if("FeatureCollection"==d)p=pushParseAndPop([],this.FEATURE_COLLECTION_PARSERS,c,u,this);else if("featureMembers"==d||"featureMember"==d||"member"==d){const g=u[0];let f=g.featureType,_=g.featureNS;const y="p",x="p0";if(!f&&c.childNodes){f=[],_={};for(let u=0,d=c.childNodes.length;u<d;++u){const d=c.childNodes[u];if(1===d.nodeType){const c=d.nodeName.split(":").pop();if(!f.includes(c)){let u="",p=0;const g=d.namespaceURI;for(const c in _){if(_[c]===g){u=c;break}++p}u||(u=y+p,_[u]=g),f.push(u+":"+c)}}}"featureMember"!=d&&(g.featureType=f,g.featureNS=_)}if("string"==typeof _){const c=_;_={},_[x]=c}const v={},C=Array.isArray(f)?f:[f];for(const c in _){const u={};for(let p=0,g=C.length;p<g;++p){(C[p].includes(":")?C[p].split(":")[0]:x)===c&&(u[C[p].split(":").pop()]="featureMembers"==d?makeArrayPusher(this.readFeatureElement,this):makeReplacer(this.readFeatureElement,this))}v[_[c]]=u}p=pushParseAndPop("featureMember"==d||"member"==d?void 0:[],v,c,u)}return null===p&&(p=[]),p}readGeometryOrExtent(c,u){const d=u[0];return d.srsName=c.firstElementChild.getAttribute("srsName"),d.srsDimension=c.firstElementChild.getAttribute("srsDimension"),pushParseAndPop(null,this.GEOMETRY_PARSERS,c,u,this)}readExtentElement(c,u){const d=u[0],p=this.readGeometryOrExtent(c,u);return p?transformExtentWithOptions(p,d):void 0}readGeometryElement(c,u){const d=u[0],p=this.readGeometryOrExtent(c,u);return p?transformGeometryWithOptions(p,!1,d):void 0}readFeatureElementInternal(c,u,d){let p;const g={};for(let f=c.firstElementChild;f;f=f.nextElementSibling){let c;const _=f.localName;0===f.childNodes.length||1===f.childNodes.length&&(3===f.firstChild.nodeType||4===f.firstChild.nodeType)?(c=getAllTextContent(f,!1),Wa.test(c)&&(c=void 0)):(d&&(c="boundedBy"===_?this.readExtentElement(f,u):this.readGeometryElement(f,u)),c?"boundedBy"!==_&&(p=_):c=this.readFeatureElementInternal(f,u,!1));const y=f.attributes.length;if(y>0&&!(c instanceof nr)){c={_content_:c};for(let u=0;u<y;u++){c[f.attributes[u].name]=f.attributes[u].value}}g[_]?(g[_]instanceof Array||(g[_]=[g[_]]),g[_].push(c)):g[_]=c}if(!d)return g;const f=new ki(g);p&&f.setGeometryName(p);const _=c.getAttribute("fid")||function getAttributeNS(c,u,d){return c.getAttributeNS(u,d)||""}(c,this.namespace,"id");return _&&f.setId(_),f}readFeatureElement(c,u){return this.readFeatureElementInternal(c,u,!0)}readPoint(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d)return new ar(d,"XYZ")}readMultiPoint(c,u){const d=pushParseAndPop([],this.MULTIPOINT_PARSERS,c,u,this);if(d)return new Ys(d)}readMultiLineString(c,u){const d=pushParseAndPop([],this.MULTILINESTRING_PARSERS,c,u,this);if(d)return new qs(d)}readMultiPolygon(c,u){const d=pushParseAndPop([],this.MULTIPOLYGON_PARSERS,c,u,this);if(d)return new Zs(d)}pointMemberParser(c,u){parseNode(this.POINTMEMBER_PARSERS,c,u,this)}lineStringMemberParser(c,u){parseNode(this.LINESTRINGMEMBER_PARSERS,c,u,this)}polygonMemberParser(c,u){parseNode(this.POLYGONMEMBER_PARSERS,c,u,this)}readLineString(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d){return new tn(d,"XYZ")}}readFlatLinearRing(c,u){const d=pushParseAndPop(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this);if(d)return d}readLinearRing(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d)return new or(d,"XYZ")}readPolygon(c,u){const d=pushParseAndPop([null],this.FLAT_LINEAR_RINGS_PARSERS,c,u,this);if(d&&d[0]){const c=d[0],u=[c.length];let p,g;for(p=1,g=d.length;p<g;++p)extend$3(c,d[p]),u.push(c.length);return new lr(c,"XYZ",u)}}readFlatCoordinatesFromNode(c,u){return pushParseAndPop(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this)}readGeometryFromNode(c,u){const d=this.readGeometryElement(c,[this.getReadOptions(c,u||{})]);return d||null}readFeaturesFromNode(c,u){const d={featureType:this.featureType,featureNS:this.featureNS};d&&Object.assign(d,this.getReadOptions(c,u));return this.readFeaturesInternal(c,[d])||[]}readProjectionFromNode(c){return get$2(this.srsName?this.srsName:c.firstElementChild.getAttribute("srsName"))}}function readBoolean(c){return readBooleanString(getAllTextContent(c,!1))}function readBooleanString(c){const u=/^\s*(true|1)|(false|0)\s*$/.exec(c);if(u)return void 0!==u[1]||!1}function readDateTime(c){const u=getAllTextContent(c,!1),d=Date.parse(u);return isNaN(d)?void 0:d/1e3}function readDecimal(c){return readDecimalString(getAllTextContent(c,!1))}function readDecimalString(c){const u=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(c);if(u)return parseFloat(u[1])}function readPositiveInteger(c){return readNonNegativeIntegerString(getAllTextContent(c,!1))}function readNonNegativeIntegerString(c){const u=/^\s*(\d+)\s*$/.exec(c);if(u)return parseInt(u[1],10)}function readString(c){return getAllTextContent(c,!1).trim()}function writeBooleanTextNode(c,u){writeStringTextNode(c,u?"1":"0")}function writeDecimalTextNode(c,u){const d=u.toPrecision();c.appendChild(getDocument().createTextNode(d))}function writeNonNegativeIntegerTextNode(c,u){const d=u.toString();c.appendChild(getDocument().createTextNode(d))}function writeStringTextNode(c,u){c.appendChild(getDocument().createTextNode(u))}GMLBase.prototype.namespace=$a,GMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:makeArrayPusher(GMLBase.prototype.pointMemberParser),pointMembers:makeArrayPusher(GMLBase.prototype.pointMemberParser)}},GMLBase.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:makeArrayPusher(GMLBase.prototype.lineStringMemberParser),lineStringMembers:makeArrayPusher(GMLBase.prototype.lineStringMemberParser)}},GMLBase.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:makeArrayPusher(GMLBase.prototype.polygonMemberParser),polygonMembers:makeArrayPusher(GMLBase.prototype.polygonMemberParser)}},GMLBase.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode)}},GMLBase.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:makeArrayPusher(GMLBase.prototype.readLineString)}},GMLBase.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon)}},GMLBase.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing)}};const Xa=$a+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Va={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class GML2 extends GMLBase{constructor(c){super(c=c||{}),this.FEATURE_COLLECTION_PARSERS[$a].featureMember=makeArrayPusher(this.readFeaturesInternal),this.schemaLocation=c.schemaLocation?c.schemaLocation:Xa}readFlatCoordinates(c,u){const d=getAllTextContent(c,!1).replace(/^\s*|\s*$/g,""),p=u[0].srsName;let g="enu";if(p){const c=get$2(p);c&&(g=c.getAxisOrientation())}const f=d.trim().split(/\s+/),_=[];for(let c=0,u=f.length;c<u;c++){const u=f[c].split(/,+/),d=parseFloat(u[0]),p=parseFloat(u[1]),y=3===u.length?parseFloat(u[2]):0;g.startsWith("en")?_.push(d,p,y):_.push(p,d,y)}return _}readBox(c,u){const d=pushParseAndPop([null],this.BOX_PARSERS_,c,u,this);return createOrUpdate$2(d[1][0],d[1][1],d[1][3],d[1][4])}innerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1].push(d)}}outerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1][0]=d}}GEOMETRY_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.multiSurface,f=p.surface,_=p.multiCurve;return Array.isArray(c)?d="Envelope":"MultiPolygon"===(d=c.getType())&&!0===g?d="MultiSurface":"Polygon"===d&&!0===f?d="Surface":"MultiLineString"===d&&!0===_&&(d="MultiCurve"),createElementNS("http://www.opengis.net/gml",d)}writeFeatureElement(c,u,d){const p=u.getId();p&&c.setAttribute("fid",p);const g=d[d.length-1],f=g.featureNS,_=u.getGeometryName();g.serializers||(g.serializers={},g.serializers[f]={});const y=[],x=[];if(u.hasProperties()){const c=u.getProperties();for(const u in c){const d=c[u];null!=d&&(y.push(u),x.push(d),u==_||"function"==typeof d.getSimplifiedGeometry?u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(this.writeGeometryElement,this)):u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(writeStringTextNode)))}}const v=Object.assign({},g);v.node=c,pushSerializeAndPop(v,g.serializers,makeSimpleNodeFactory(void 0,f),x,d,y)}writeCurveOrLineString(c,u,d){const p=d[d.length-1].srsName;if("LineStringSegment"!==c.nodeName&&p&&c.setAttribute("srsName",p),"LineString"===c.nodeName||"LineStringSegment"===c.nodeName){const p=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(p),this.writeCoordinates_(p,u,d)}else if("Curve"===c.nodeName){const p=createElementNS(c.namespaceURI,"segments");c.appendChild(p),this.writeCurveSegments_(p,u,d)}}writeLineStringOrCurveMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeCurveOrLineString(p,u,d))}writeMultiCurveOrLineString(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.curve;f&&c.setAttribute("srsName",f);const y=u.getLineStrings();pushSerializeAndPop({node:c,hasZ:g,srsName:f,curve:_},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeGeometryElement(c,u,d){const p=d[d.length-1],g=Object.assign({},p);let f;g.node=c,f=Array.isArray(u)?transformExtentWithOptions(u,p):transformGeometryWithOptions(u,!0,p),pushSerializeAndPop(g,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[f],d,void 0,this)}createCoordinatesNode_(c){const u=createElementNS(c,"coordinates");return u.setAttribute("decimal","."),u.setAttribute("cs",","),u.setAttribute("ts"," "),u}writeCoordinates_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=u.getCoordinates(),y=_.length,x=new Array(y);for(let c=0;c<y;++c){const u=_[c];x[c]=this.getCoords_(u,f,g)}writeStringTextNode(c,x.join(" "))}writeCurveSegments_(c,u,d){const p=createElementNS(c.namespaceURI,"LineStringSegment");c.appendChild(p),this.writeCurveOrLineString(p,u,d)}writeSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;if("PolygonPatch"!==c.nodeName&&f&&c.setAttribute("srsName",f),"Polygon"===c.nodeName||"PolygonPatch"===c.nodeName){const p=u.getLinearRings();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,p,d,void 0,this)}else if("Surface"===c.nodeName){const p=createElementNS(c.namespaceURI,"patches");c.appendChild(p),this.writeSurfacePatches_(p,u,d)}}RING_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.node,f=p.exteriorWritten;return void 0===f&&(p.exteriorWritten=!0),createElementNS(g.namespaceURI,void 0!==f?"innerBoundaryIs":"outerBoundaryIs")}writeSurfacePatches_(c,u,d){const p=createElementNS(c.namespaceURI,"PolygonPatch");c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d)}writeRing(c,u,d){const p=createElementNS(c.namespaceURI,"LinearRing");c.appendChild(p),this.writeLinearRing(p,u,d)}getCoords_(c,u,d){let p=(u?get$2(u).getAxisOrientation():"enu").startsWith("en")?c[0]+","+c[1]:c[1]+","+c[0];if(d){p+=","+(c[2]||0)}return p}writePoint(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;f&&c.setAttribute("srsName",f);const _=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(_);const y=u.getCoordinates();writeStringTextNode(_,this.getCoords_(y,f,g))}writeMultiPoint(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;f&&c.setAttribute("srsName",f);const _=u.getPoints();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.POINTMEMBER_SERIALIZERS,makeSimpleNodeFactory("pointMember"),_,d,void 0,this)}writePointMember(c,u,d){const p=createElementNS(c.namespaceURI,"Point");c.appendChild(p),this.writePoint(p,u,d)}writeLinearRing(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(g),this.writeCoordinates_(g,u,d)}writeMultiSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.surface;f&&c.setAttribute("srsName",f);const y=u.getPolygons();pushSerializeAndPop({node:c,hasZ:g,srsName:f,surface:_},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeSurfaceOrPolygonMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d))}writeEnvelope(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=[u[0]+" "+u[1],u[2]+" "+u[3]];pushSerializeAndPop({node:c},this.ENVELOPE_SERIALIZERS,za,g,d,["lowerCorner","upperCorner"],this)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(c,u,d){const p=u[u.length-1].node;return createElementNS("http://www.opengis.net/gml",Va[p.nodeName])}}GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML2.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:GML2.prototype.innerBoundaryIsParser,outerBoundaryIs:GML2.prototype.outerBoundaryIsParser}},GML2.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:makeArrayPusher(GML2.prototype.readFlatCoordinates)}},GML2.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Box:makeReplacer(GML2.prototype.readBox)}},GML2.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:makeChildAppender(GML2.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML2.prototype.writePoint),MultiPoint:makeChildAppender(GML2.prototype.writeMultiPoint),LineString:makeChildAppender(GML2.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML2.prototype.writeLinearRing),Polygon:makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML2.prototype.writeEnvelope)}},GML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML2.prototype.writeLineStringOrCurveMember)}},GML2.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:makeChildAppender(GML2.prototype.writeRing),innerBoundaryIs:makeChildAppender(GML2.prototype.writeRing)}},GML2.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:makeChildAppender(GML2.prototype.writePointMember)}},GML2.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember)}},GML2.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}};const qa=$a+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Ya={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class GML3 extends GMLBase{constructor(c){super(c=c||{}),this.surface_=void 0!==c.surface&&c.surface,this.curve_=void 0!==c.curve&&c.curve,this.multiCurve_=void 0===c.multiCurve||c.multiCurve,this.multiSurface_=void 0===c.multiSurface||c.multiSurface,this.schemaLocation=c.schemaLocation?c.schemaLocation:qa,this.hasZ=void 0!==c.hasZ&&c.hasZ}readMultiCurve(c,u){const d=pushParseAndPop([],this.MULTICURVE_PARSERS,c,u,this);if(d){return new qs(d)}}readFlatCurveRing(c,u){const d=pushParseAndPop([],this.MULTICURVE_PARSERS,c,u,this),p=[];for(let c=0,u=d.length;c<u;++c)extend$3(p,d[c].getFlatCoordinates());return p}readMultiSurface(c,u){const d=pushParseAndPop([],this.MULTISURFACE_PARSERS,c,u,this);if(d)return new Zs(d)}curveMemberParser(c,u){parseNode(this.CURVEMEMBER_PARSERS,c,u,this)}surfaceMemberParser(c,u){parseNode(this.SURFACEMEMBER_PARSERS,c,u,this)}readPatch(c,u){return pushParseAndPop([null],this.PATCHES_PARSERS,c,u,this)}readSegment(c,u){return pushParseAndPop([],this.SEGMENTS_PARSERS,c,u,this)}readPolygonPatch(c,u){return pushParseAndPop([null],this.FLAT_LINEAR_RINGS_PARSERS,c,u,this)}readLineStringSegment(c,u){return pushParseAndPop([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this)}interiorParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1].push(d)}}exteriorParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1][0]=d}}readSurface(c,u){const d=pushParseAndPop([null],this.SURFACE_PARSERS,c,u,this);if(d&&d[0]){const c=d[0],u=[c.length];let p,g;for(p=1,g=d.length;p<g;++p)extend$3(c,d[p]),u.push(c.length);return new lr(c,"XYZ",u)}}readCurve(c,u){const d=pushParseAndPop([null],this.CURVE_PARSERS,c,u,this);if(d){return new tn(d,"XYZ")}}readEnvelope(c,u){const d=pushParseAndPop([null],this.ENVELOPE_PARSERS,c,u,this);return createOrUpdate$2(d[1][0],d[1][1],d[2][0],d[2][1])}readFlatPos(c,u){let d=getAllTextContent(c,!1);const p=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,g=[];let f;for(;f=p.exec(d);)g.push(parseFloat(f[1])),d=d.substr(f[0].length);if(""!==d)return;const _=u[0].srsName;if("neu"===(_?get$2(_).getAxisOrientation():"enu"))for(let c=0,u=g.length;c<u;c+=3){const u=g[c],d=g[c+1];g[c]=d,g[c+1]=u}const y=g.length;return 2==y&&g.push(0),0!==y?g:void 0}readFlatPosList(c,u){const d=getAllTextContent(c,!1).replace(/^\s*|\s*$/g,""),p=u[0],g=p.srsName,f=p.srsDimension,_=g?get$2(g).getAxisOrientation():"enu",y=d.split(/\s+/);let x=2;c.getAttribute("srsDimension")?x=readNonNegativeIntegerString(c.getAttribute("srsDimension")):c.getAttribute("dimension")?x=readNonNegativeIntegerString(c.getAttribute("dimension")):c.parentNode.getAttribute("srsDimension")?x=readNonNegativeIntegerString(c.parentNode.getAttribute("srsDimension")):f&&(x=readNonNegativeIntegerString(f));const v=_.startsWith("en");let C,M,T;const L=[];for(let c=0,u=y.length;c<u;c+=x)C=parseFloat(y[c]),M=parseFloat(y[c+1]),T=3===x?parseFloat(y[c+2]):0,v?L.push(C,M,T):L.push(M,C,T);return L}writePos_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=g?"3":"2";c.setAttribute("srsDimension",f);const _=p.srsName,y=_?get$2(_).getAxisOrientation():"enu",x=u.getCoordinates();let v=y.startsWith("en")?x[0]+" "+x[1]:x[1]+" "+x[0];if(g){v+=" "+(x[2]||0)}writeStringTextNode(c,v)}getCoords_(c,u,d){let p=(u?get$2(u).getAxisOrientation():"enu").startsWith("en")?c[0]+" "+c[1]:c[1]+" "+c[0];if(d){p+=" "+(c[2]||0)}return p}writePosList_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=g?"3":"2";c.setAttribute("srsDimension",f);const _=p.srsName,y=u.getCoordinates(),x=y.length,v=new Array(x);let C;for(let c=0;c<x;++c)C=y[c],v[c]=this.getCoords_(C,_,g);writeStringTextNode(c,v.join(" "))}writePoint(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=createElementNS(c.namespaceURI,"pos");c.appendChild(g),this.writePos_(g,u,d)}writeEnvelope(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=[u[0]+" "+u[1],u[2]+" "+u[3]];pushSerializeAndPop({node:c},this.ENVELOPE_SERIALIZERS,za,g,d,["lowerCorner","upperCorner"],this)}writeLinearRing(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=createElementNS(c.namespaceURI,"posList");c.appendChild(g),this.writePosList_(g,u,d)}RING_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.node,f=p.exteriorWritten;return void 0===f&&(p.exteriorWritten=!0),createElementNS(g.namespaceURI,void 0!==f?"interior":"exterior")}writeSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;if("PolygonPatch"!==c.nodeName&&f&&c.setAttribute("srsName",f),"Polygon"===c.nodeName||"PolygonPatch"===c.nodeName){const p=u.getLinearRings();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,p,d,void 0,this)}else if("Surface"===c.nodeName){const p=createElementNS(c.namespaceURI,"patches");c.appendChild(p),this.writeSurfacePatches_(p,u,d)}}writeCurveOrLineString(c,u,d){const p=d[d.length-1].srsName;if("LineStringSegment"!==c.nodeName&&p&&c.setAttribute("srsName",p),"LineString"===c.nodeName||"LineStringSegment"===c.nodeName){const p=createElementNS(c.namespaceURI,"posList");c.appendChild(p),this.writePosList_(p,u,d)}else if("Curve"===c.nodeName){const p=createElementNS(c.namespaceURI,"segments");c.appendChild(p),this.writeCurveSegments_(p,u,d)}}writeMultiSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.surface;f&&c.setAttribute("srsName",f);const y=u.getPolygons();pushSerializeAndPop({node:c,hasZ:g,srsName:f,surface:_},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeMultiPoint(c,u,d){const p=d[d.length-1],g=p.srsName,f=p.hasZ;g&&c.setAttribute("srsName",g);const _=u.getPoints();pushSerializeAndPop({node:c,hasZ:f,srsName:g},this.POINTMEMBER_SERIALIZERS,makeSimpleNodeFactory("pointMember"),_,d,void 0,this)}writeMultiCurveOrLineString(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.curve;f&&c.setAttribute("srsName",f);const y=u.getLineStrings();pushSerializeAndPop({node:c,hasZ:g,srsName:f,curve:_},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeRing(c,u,d){const p=createElementNS(c.namespaceURI,"LinearRing");c.appendChild(p),this.writeLinearRing(p,u,d)}writeSurfaceOrPolygonMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d))}writePointMember(c,u,d){const p=createElementNS(c.namespaceURI,"Point");c.appendChild(p),this.writePoint(p,u,d)}writeLineStringOrCurveMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeCurveOrLineString(p,u,d))}writeSurfacePatches_(c,u,d){const p=createElementNS(c.namespaceURI,"PolygonPatch");c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d)}writeCurveSegments_(c,u,d){const p=createElementNS(c.namespaceURI,"LineStringSegment");c.appendChild(p),this.writeCurveOrLineString(p,u,d)}writeGeometryElement(c,u,d){const p=d[d.length-1],g=Object.assign({},p);let f;g.node=c,f=Array.isArray(u)?transformExtentWithOptions(u,p):transformGeometryWithOptions(u,!0,p),pushSerializeAndPop(g,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[f],d,void 0,this)}writeFeatureElement(c,u,d){const p=u.getId();p&&c.setAttribute("fid",p);const g=d[d.length-1],f=g.featureNS,_=u.getGeometryName();g.serializers||(g.serializers={},g.serializers[f]={});const y=[],x=[];if(u.hasProperties()){const c=u.getProperties();for(const u in c){const d=c[u];null!=d&&(y.push(u),x.push(d),u==_||"function"==typeof d.getSimplifiedGeometry?u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(this.writeGeometryElement,this)):u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(writeStringTextNode)))}}const v=Object.assign({},g);v.node=c,pushSerializeAndPop(v,g.serializers,makeSimpleNodeFactory(void 0,f),x,d,y)}writeFeatureMembers_(c,u,d){const p=d[d.length-1],g=p.featureType,f=p.featureNS,_={};_[f]={},_[f][g]=makeChildAppender(this.writeFeatureElement,this);const y=Object.assign({},p);y.node=c,pushSerializeAndPop(y,_,makeSimpleNodeFactory(g,f),u,d)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(c,u,d){const p=u[u.length-1].node;return createElementNS(this.namespace,Ya[p.nodeName])}GEOMETRY_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.multiSurface,f=p.surface,_=p.curve,y=p.multiCurve;return Array.isArray(c)?d="Envelope":"MultiPolygon"===(d=c.getType())&&!0===g?d="MultiSurface":"Polygon"===d&&!0===f?d="Surface":"LineString"===d&&!0===_?d="Curve":"MultiLineString"===d&&!0===y&&(d="MultiCurve"),createElementNS(this.namespace,d)}writeGeometryNode(c,u){u=this.adaptOptions(u);const d=createElementNS(this.namespace,"geom"),p={node:d,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return u&&Object.assign(p,u),this.writeGeometryElement(d,c,[p]),d}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS(this.namespace,"featureMembers");d.setAttributeNS(ja,"xsi:schemaLocation",this.schemaLocation);const p={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return u&&Object.assign(p,u),this.writeFeatureMembers_(d,c,[p]),d}}GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:makeReplacer(GML3.prototype.readFlatPos),posList:makeReplacer(GML3.prototype.readFlatPosList),coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML3.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:GML3.prototype.interiorParser,exterior:GML3.prototype.exteriorParser}},GML3.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Surface:makeReplacer(GML3.prototype.readSurface),MultiSurface:makeReplacer(GML3.prototype.readMultiSurface),Curve:makeReplacer(GML3.prototype.readCurve),MultiCurve:makeReplacer(GML3.prototype.readMultiCurve),Envelope:makeReplacer(GML3.prototype.readEnvelope)}},GML3.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:makeArrayPusher(GML3.prototype.curveMemberParser),curveMembers:makeArrayPusher(GML3.prototype.curveMemberParser)}},GML3.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:makeArrayPusher(GML3.prototype.surfaceMemberParser),surfaceMembers:makeArrayPusher(GML3.prototype.surfaceMemberParser)}},GML3.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:makeArrayPusher(GMLBase.prototype.readLineString),Curve:makeArrayPusher(GML3.prototype.readCurve)}},GML3.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon),Surface:makeArrayPusher(GML3.prototype.readSurface)}},GML3.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:makeReplacer(GML3.prototype.readPatch)}},GML3.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:makeReplacer(GML3.prototype.readSegment)}},GML3.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:makeArrayPusher(GML3.prototype.readFlatPosList),upperCorner:makeArrayPusher(GML3.prototype.readFlatPosList)}},GML3.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:makeReplacer(GML3.prototype.readPolygonPatch)}},GML3.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:makeArrayExtender(GML3.prototype.readLineStringSegment)}},GMLBase.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing),Ring:makeReplacer(GML3.prototype.readFlatCurveRing)}},GML3.prototype.writeFeatures,GML3.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:makeChildAppender(GML3.prototype.writeRing),interior:makeChildAppender(GML3.prototype.writeRing)}},GML3.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}},GML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember)}},GML3.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:makeChildAppender(GML3.prototype.writePointMember)}},GML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember)}},GML3.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML3.prototype.writePoint),MultiPoint:makeChildAppender(GML3.prototype.writeMultiPoint),LineString:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML3.prototype.writeLinearRing),Polygon:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML3.prototype.writeEnvelope)}};const Za=GML3;Za.prototype.writeFeatures,Za.prototype.writeFeaturesNode;var Ka=Za;const Ha=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Ja={rte:readRte,trk:readTrk,wpt:readWpt},Qa=makeStructureNS(Ha,{rte:makeArrayPusher(readRte),trk:makeArrayPusher(readTrk),wpt:makeArrayPusher(readWpt)}),tl=makeStructureNS(Ha,{text:makeObjectPropertySetter(readString,"linkText"),type:makeObjectPropertySetter(readString,"linkType")}),el=makeStructureNS(Ha,{name:makeObjectPropertySetter(readString),email:function parseEmail(c,u){const d=u[u.length-1],p=c.getAttribute("id"),g=c.getAttribute("domain");null!==p&&null!==g&&(d.email=`${p}@${g}`)},link:parseLink}),il=makeStructureNS(Ha,{name:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),author:makeObjectPropertySetter((function readAuthor(c,u){const d=pushParseAndPop({},el,c,u);if(d)return d;return})),copyright:makeObjectPropertySetter((function readCopyright(c,u){const d=pushParseAndPop({},rl,c,u);if(d){const u=c.getAttribute("author");return null!==u&&(d.author=u),d}return})),link:parseLink,time:makeObjectPropertySetter(readDateTime),keywords:makeObjectPropertySetter(readString),bounds:function parseBounds(c,u){const d=u[u.length-1],p=c.getAttribute("minlat"),g=c.getAttribute("minlon"),f=c.getAttribute("maxlat"),_=c.getAttribute("maxlon");null!==g&&null!==p&&null!==_&&null!==f&&(d.bounds=[[parseFloat(g),parseFloat(p)],[parseFloat(_),parseFloat(f)]])},extensions:parseExtensions}),rl=makeStructureNS(Ha,{year:makeObjectPropertySetter(readPositiveInteger),license:makeObjectPropertySetter(readString)}),nl=makeStructureNS(Ha,{rte:makeChildAppender((function writeRte(c,u,d){const p=d[0],g=u.getProperties(),f={node:c};f.properties=g;const _=u.getGeometry();if("LineString"==_.getType()){const c=transformGeometryWithOptions(_,!0,p);f.geometryLayout=c.getLayout(),g.rtept=c.getCoordinates()}const y=d[d.length-1].node,x=pl[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(f,gl,za,v,d,x)})),trk:makeChildAppender((function writeTrk(c,u,d){const p=d[0],g=u.getProperties(),f={node:c};f.properties=g;const _=u.getGeometry();if("MultiLineString"==_.getType()){const c=transformGeometryWithOptions(_,!0,p);g.trkseg=c.getLineStrings()}const y=d[d.length-1].node,x=fl[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(f,_l,za,v,d,x)})),wpt:makeChildAppender((function writeWpt(c,u,d){const p=d[0],g=d[d.length-1];g.properties=u.getProperties();const f=u.getGeometry();if("Point"==f.getType()){const u=transformGeometryWithOptions(f,!0,p);g.geometryLayout=u.getLayout(),writeWptType(c,u.getCoordinates(),d)}}))});const sl=makeStructureNS(Ha,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions,type:makeObjectPropertySetter(readString),rtept:function parseRtePt(c,u){const d=pushParseAndPop({},ol,c,u);if(d){const p=u[u.length-1];appendCoordinate(p.flatCoordinates,p.layoutOptions,c,d)}}}),ol=makeStructureNS(Ha,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),al=makeStructureNS(Ha,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),type:makeObjectPropertySetter(readString),extensions:parseExtensions,trkseg:function parseTrkSeg(c,u){const d=u[u.length-1];parseNode(ll,c,u);const p=d.flatCoordinates;d.ends.push(p.length)}}),ll=makeStructureNS(Ha,{trkpt:function parseTrkPt(c,u){const d=pushParseAndPop({},hl,c,u);if(d){const p=u[u.length-1];appendCoordinate(p.flatCoordinates,p.layoutOptions,c,d)}}}),hl=makeStructureNS(Ha,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),cl=makeStructureNS(Ha,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime),magvar:makeObjectPropertySetter(readDecimal),geoidheight:makeObjectPropertySetter(readDecimal),name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,sym:makeObjectPropertySetter(readString),type:makeObjectPropertySetter(readString),fix:makeObjectPropertySetter(readString),sat:makeObjectPropertySetter(readPositiveInteger),hdop:makeObjectPropertySetter(readDecimal),vdop:makeObjectPropertySetter(readDecimal),pdop:makeObjectPropertySetter(readDecimal),ageofdgpsdata:makeObjectPropertySetter(readDecimal),dgpsid:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions}),ul=["text","type"],dl=makeStructureNS(Ha,{text:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode)}),pl=makeStructureNS(Ha,["name","cmt","desc","src","link","number","type","rtept"]),gl=makeStructureNS(Ha,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),rtept:makeArraySerializer(makeChildAppender(writeWptType))}),ml=makeStructureNS(Ha,["ele","time"]),fl=makeStructureNS(Ha,["name","cmt","desc","src","link","number","type","trkseg"]),_l=makeStructureNS(Ha,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),trkseg:makeArraySerializer(makeChildAppender((function writeTrkSeg(c,u,d){const p={node:c};p.geometryLayout=u.getLayout(),p.properties={},pushSerializeAndPop(p,xl,yl,u.getCoordinates(),d)})))}),yl=makeSimpleNodeFactory("trkpt"),xl=makeStructureNS(Ha,{trkpt:makeChildAppender(writeWptType)}),vl=makeStructureNS(Ha,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),Sl=makeStructureNS(Ha,{ele:makeChildAppender(writeDecimalTextNode),time:makeChildAppender((function writeDateTimeTextNode(c,u){const d=new Date(1e3*u),p=d.getUTCFullYear()+"-"+padNumber(d.getUTCMonth()+1,2)+"-"+padNumber(d.getUTCDate(),2)+"T"+padNumber(d.getUTCHours(),2)+":"+padNumber(d.getUTCMinutes(),2)+":"+padNumber(d.getUTCSeconds(),2)+"Z";c.appendChild(getDocument().createTextNode(p))})),magvar:makeChildAppender(writeDecimalTextNode),geoidheight:makeChildAppender(writeDecimalTextNode),name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),sym:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode),fix:makeChildAppender(writeStringTextNode),sat:makeChildAppender(writeNonNegativeIntegerTextNode),hdop:makeChildAppender(writeDecimalTextNode),vdop:makeChildAppender(writeDecimalTextNode),pdop:makeChildAppender(writeDecimalTextNode),ageofdgpsdata:makeChildAppender(writeDecimalTextNode),dgpsid:makeChildAppender(writeNonNegativeIntegerTextNode)}),wl={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function GPX_NODE_FACTORY(c,u,d){const p=c.getGeometry();if(p){const c=wl[p.getType()];if(c){return createElementNS(u[u.length-1].node.namespaceURI,c)}}}function appendCoordinate(c,u,d,p){return c.push(parseFloat(d.getAttribute("lon")),parseFloat(d.getAttribute("lat"))),"ele"in p?(c.push(p.ele),delete p.ele,u.hasZ=!0):c.push(0),"time"in p?(c.push(p.time),delete p.time,u.hasM=!0):c.push(0),c}function applyLayoutOptions(c,u,d){let p="XY",g=2;if(c.hasZ&&c.hasM?(p="XYZM",g=4):c.hasZ?(p="XYZ",g=3):c.hasM&&(p="XYM",g=3),4!==g){for(let d=0,p=u.length/4;d<p;d++)u[d*g]=u[4*d],u[d*g+1]=u[4*d+1],c.hasZ&&(u[d*g+2]=u[4*d+2]),c.hasM&&(u[d*g+2]=u[4*d+3]);if(u.length=u.length/4*g,d)for(let c=0,u=d.length;c<u;c++)d[c]=d[c]/4*g}return p}function parseLink(c,u){const d=u[u.length-1],p=c.getAttribute("href");null!==p&&(d.link=p),parseNode(tl,c,u)}function parseExtensions(c,u){u[u.length-1].extensionsNode_=c}function readRte(c,u){const d=u[0],p=pushParseAndPop({flatCoordinates:[],layoutOptions:{}},sl,c,u);if(!p)return;const g=p.flatCoordinates;delete p.flatCoordinates;const f=p.layoutOptions;delete p.layoutOptions;const _=applyLayoutOptions(f,g),y=new tn(g,_);transformGeometryWithOptions(y,!1,d);const x=new ki(y);return x.setProperties(p,!0),x}function readTrk(c,u){const d=u[0],p=pushParseAndPop({flatCoordinates:[],ends:[],layoutOptions:{}},al,c,u);if(!p)return;const g=p.flatCoordinates;delete p.flatCoordinates;const f=p.ends;delete p.ends;const _=p.layoutOptions;delete p.layoutOptions;const y=applyLayoutOptions(_,g,f),x=new qs(g,y,f);transformGeometryWithOptions(x,!1,d);const v=new ki(x);return v.setProperties(p,!0),v}function readWpt(c,u){const d=u[0],p=pushParseAndPop({},cl,c,u);if(!p)return;const g={},f=appendCoordinate([],g,c,p),_=applyLayoutOptions(g,f),y=new ar(f,_);transformGeometryWithOptions(y,!1,d);const x=new ki(y);return x.setProperties(p,!0),x}function writeLink(c,u,d){c.setAttribute("href",u);const p=d[d.length-1].properties,g=[p.linkText,p.linkType];pushSerializeAndPop({node:c},dl,za,g,d,ul)}function writeWptType(c,u,d){const p=d[d.length-1],g=p.node.namespaceURI,f=p.properties;c.setAttributeNS(null,"lat",String(u[1])),c.setAttributeNS(null,"lon",String(u[0]));switch(p.geometryLayout){case"XYZM":0!==u[3]&&(f.time=u[3]);case"XYZ":0!==u[2]&&(f.ele=u[2]);break;case"XYM":0!==u[2]&&(f.time=u[2])}const _="rtept"==c.nodeName?ml[g]:vl[g],y=makeSequence(f,_);pushSerializeAndPop({node:c,properties:f},Sl,za,y,d,_)}var Cl=class GPX extends XMLFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.readExtensions_=c.readExtensions}handleReadExtensions_(c){c||(c=[]);for(let u=0,d=c.length;u<d;++u){const d=c[u];if(this.readExtensions_){const c=d.get("extensionsNode_")||null;this.readExtensions_(d,c)}d.set("extensionsNode_",void 0)}}readMetadata(c){return c?"string"==typeof c?this.readMetadataFromDocument(parse$1(c)):isDocument(c)?this.readMetadataFromDocument(c):this.readMetadataFromNode(c):null}readMetadataFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType===Node.ELEMENT_NODE){const c=this.readMetadataFromNode(u);if(c)return c}return null}readMetadataFromNode(c){if(!Ha.includes(c.namespaceURI))return null;for(let u=c.firstElementChild;u;u=u.nextElementSibling)if(Ha.includes(u.namespaceURI)&&"metadata"===u.localName)return pushParseAndPop({},il,u,[]);return null}readFeatureFromNode(c,u){if(!Ha.includes(c.namespaceURI))return null;const d=Ja[c.localName];if(!d)return null;const p=d(c,[this.getReadOptions(c,u)]);return p?(this.handleReadExtensions_([p]),p):null}readFeaturesFromNode(c,u){if(!Ha.includes(c.namespaceURI))return[];if("gpx"==c.localName){const d=pushParseAndPop([],Qa,c,[this.getReadOptions(c,u)]);return d?(this.handleReadExtensions_(d),d):[]}return[]}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS("http://www.topografix.com/GPX/1/1","gpx");return d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",ja),d.setAttributeNS(ja,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),d.setAttribute("version","1.1"),d.setAttribute("creator","OpenLayers"),pushSerializeAndPop({node:d},nl,GPX_NODE_FACTORY,c,[u]),d}};class TextFeature extends Fa{constructor(){super()}getType(){return"text"}readFeature(c,u){return this.readFeatureFromText(getText(c),this.adaptOptions(u))}readFeatureFromText(c,u){return abstract()}readFeatures(c,u){return this.readFeaturesFromText(getText(c),this.adaptOptions(u))}readFeaturesFromText(c,u){return abstract()}readGeometry(c,u){return this.readGeometryFromText(getText(c),this.adaptOptions(u))}readGeometryFromText(c,u){return abstract()}readProjection(c){return this.readProjectionFromText(getText(c))}readProjectionFromText(c){return this.dataProjection}writeFeature(c,u){return this.writeFeatureText(c,this.adaptOptions(u))}writeFeatureText(c,u){return abstract()}writeFeatures(c,u){return this.writeFeaturesText(c,this.adaptOptions(u))}writeFeaturesText(c,u){return abstract()}writeGeometry(c,u){return this.writeGeometryText(c,this.adaptOptions(u))}writeGeometryText(c,u){return abstract()}}function getText(c){return"string"==typeof c?c:""}const El=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Pl=/^H.([A-Z]{3}).*?:(.*)/,bl=/^HFDTE(\d{2})(\d{2})(\d{2})/,Ml=/^HFDTEDATE:(\d{2})(\d{2})(\d{2}),(\d{2})/,Tl=/\r\n|\r|\n/;var Rl=class IGC extends TextFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.altitudeMode_=c.altitudeMode?c.altitudeMode:"none",this.lad_=!1,this.lod_=!1,this.ladStart_=0,this.ladStop_=0,this.lodStart_=0,this.lodStop_=0}readFeatureFromText(c,u){const d=this.altitudeMode_,p=c.split(Tl),g={},f=[];let _,y,x=2e3,v=0,C=1,M=-1;for(_=0,y=p.length;_<y;++_){const c=p[_];let u;if("B"==c.charAt(0)){if(u=El.exec(c),u){const p=parseInt(u[1],10),g=parseInt(u[2],10),_=parseInt(u[3],10);let y=parseInt(u[4],10)+parseInt(u[5],10)/6e4;this.lad_&&(y+=parseInt(c.slice(this.ladStart_,this.ladStop_),10)/6e4/10**(this.ladStop_-this.ladStart_)),"S"==u[6]&&(y=-y);let T=parseInt(u[7],10)+parseInt(u[8],10)/6e4;if(this.lod_&&(T+=parseInt(c.slice(this.lodStart_,this.lodStop_),10)/6e4/10**(this.lodStop_-this.lodStart_)),"W"==u[9]&&(T=-T),f.push(T,y),"none"!=d){let c;c="gps"==d?parseInt(u[11],10):"barometric"==d?parseInt(u[12],10):0,f.push(c)}let L=Date.UTC(x,v,C,p,g,_);L<M&&(L=Date.UTC(x,v,C+1,p,g,_)),f.push(L/1e3),M=L}}else if("H"==c.charAt(0))u=Ml.exec(c),u?(C=parseInt(u[1],10),v=parseInt(u[2],10)-1,x=2e3+parseInt(u[3],10)):(u=bl.exec(c),u?(C=parseInt(u[1],10),v=parseInt(u[2],10)-1,x=2e3+parseInt(u[3],10)):(u=Pl.exec(c),u&&(g[u[1]]=u[2].trim())));else if("I"==c.charAt(0)){const u=parseInt(c.slice(1,3),10);for(let d=0;d<u;d++){const u=c.slice(7+7*d,10+7*d);if("LAD"===u||"LOD"===u){const p=parseInt(c.slice(3+7*d,5+7*d),10)-1,g=parseInt(c.slice(5+7*d,7+7*d),10);"LAD"===u?(this.lad_=!0,this.ladStart_=p,this.ladStop_=g):"LOD"===u&&(this.lod_=!0,this.lodStart_=p,this.lodStop_=g)}}}}if(0===f.length)return null;const T=new tn(f,"none"==d?"XYM":"XYZM"),L=new ki(transformGeometryWithOptions(T,!1,u));return L.setProperties(g,!0),L}readFeaturesFromText(c,u){const d=this.readFeatureFromText(c,u);return d?[d]:[]}};const Ll="version1",Al="version2",Il="version3",Fl={};Fl[Ll]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},Fl[Al]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},Fl[Il]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},Fl.none={none:{supports:[],formats:[],qualities:[]}};const kl=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Ol=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Nl=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;const Dl={};Dl[Ll]=function generateVersion1Options(c){let u=c.getComplianceLevelSupportedFeatures();return void 0===u&&(u=Fl[Ll].level0),{url:void 0===c.imageInfo["@id"]?void 0:c.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:u.supports,formats:[...u.formats,void 0===c.imageInfo.formats?[]:c.imageInfo.formats],qualities:[...u.qualities,void 0===c.imageInfo.qualities?[]:c.imageInfo.qualities],resolutions:c.imageInfo.scale_factors,tileSize:void 0!==c.imageInfo.tile_width?void 0!==c.imageInfo.tile_height?[c.imageInfo.tile_width,c.imageInfo.tile_height]:[c.imageInfo.tile_width,c.imageInfo.tile_width]:null!=c.imageInfo.tile_height?[c.imageInfo.tile_height,c.imageInfo.tile_height]:void 0}},Dl[Al]=function generateVersion2Options(c){const u=c.getComplianceLevelSupportedFeatures(),d=Array.isArray(c.imageInfo.profile)&&c.imageInfo.profile.length>1,p=d&&c.imageInfo.profile[1].supports?c.imageInfo.profile[1].supports:[],g=d&&c.imageInfo.profile[1].formats?c.imageInfo.profile[1].formats:[],f=d&&c.imageInfo.profile[1].qualities?c.imageInfo.profile[1].qualities:[];return{url:c.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===c.imageInfo.sizes?void 0:c.imageInfo.sizes.map((function(c){return[c.width,c.height]})),tileSize:void 0===c.imageInfo.tiles?void 0:[c.imageInfo.tiles.map((function(c){return c.width}))[0],c.imageInfo.tiles.map((function(c){return void 0===c.height?c.width:c.height}))[0]],resolutions:void 0===c.imageInfo.tiles?void 0:c.imageInfo.tiles.map((function(c){return c.scaleFactors}))[0],supports:[...u.supports,...p],formats:[...u.formats,...g],qualities:[...u.qualities,...f]}},Dl[Il]=function generateVersion3Options(c){const u=c.getComplianceLevelSupportedFeatures(),d=void 0===c.imageInfo.extraFormats?u.formats:[...u.formats,...c.imageInfo.extraFormats],p=void 0!==c.imageInfo.preferredFormats&&Array.isArray(c.imageInfo.preferredFormats)&&c.imageInfo.preferredFormats.length>0?c.imageInfo.preferredFormats.filter((function(c){return["jpg","png","gif"].includes(c)})).reduce((function(c,u){return void 0===c&&d.includes(u)?u:c}),void 0):void 0;return{url:c.imageInfo.id,sizes:void 0===c.imageInfo.sizes?void 0:c.imageInfo.sizes.map((function(c){return[c.width,c.height]})),tileSize:void 0===c.imageInfo.tiles?void 0:[c.imageInfo.tiles.map((function(c){return c.width}))[0],c.imageInfo.tiles.map((function(c){return c.height}))[0]],resolutions:void 0===c.imageInfo.tiles?void 0:c.imageInfo.tiles.map((function(c){return c.scaleFactors}))[0],supports:void 0===c.imageInfo.extraFeatures?u.supports:[...u.supports,...c.imageInfo.extraFeatures],formats:d,qualities:void 0===c.imageInfo.extraQualities?u.qualities:[...u.qualities,...c.imageInfo.extraQualities],preferredFormat:p}};var Gl=class IIIFInfo{constructor(c){this.setImageInfo(c)}setImageInfo(c){this.imageInfo="string"==typeof c?JSON.parse(c):c}getImageApiVersion(){if(void 0===this.imageInfo)return;let c=this.imageInfo["@context"]||"ol-no-context";"string"==typeof c&&(c=[c]);for(let u=0;u<c.length;u++)switch(c[u]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return Ll;case"http://iiif.io/api/image/2/context.json":return Al;case"http://iiif.io/api/image/3/context.json":return Il;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Ll)&&this.imageInfo.identifier)return Ll}assert(!1,"Cannot determine IIIF Image API version from provided image information JSON")}getComplianceLevelEntryFromProfile(c){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===c&&(c=this.getImageApiVersion()),c){case Ll:if(kl.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Il:if(Nl.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Al:if("string"==typeof this.imageInfo.profile&&Ol.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Ol.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}}getComplianceLevelFromProfile(c){const u=this.getComplianceLevelEntryFromProfile(c);if(void 0===u)return;const d=u.match(/level[0-2](?:\.json)?$/g);return Array.isArray(d)?d[0].replace(".json",""):void 0}getComplianceLevelSupportedFeatures(){if(void 0===this.imageInfo)return;const c=this.getImageApiVersion(),u=this.getComplianceLevelFromProfile(c);return void 0===u?Fl.none.none:Fl[c][u]}getTileSourceOptions(c){const u=c||{},d=this.getImageApiVersion();if(void 0===d)return;const p=void 0===d?void 0:Dl[d](this);return void 0!==p?{url:p.url,version:d,size:[this.imageInfo.width,this.imageInfo.height],sizes:p.sizes,format:void 0!==u.format&&p.formats.includes(u.format)?u.format:void 0!==p.preferredFormat?p.preferredFormat:"jpg",supports:p.supports,quality:u.quality&&p.qualities.includes(u.quality)?u.quality:p.qualities.includes("native")?"native":"default",resolutions:Array.isArray(p.resolutions)?p.resolutions.sort((function(c,u){return u-c})):void 0,tileSize:p.tileSize}:void 0}};const jl=["http://www.google.com/kml/ext/2.2"],zl=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],Bl={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},Ul=makeStructureNS(zl,{ExtendedData:extendedDataParser,Region:regionParser,MultiGeometry:makeObjectPropertySetter(readMultiGeometry,"geometry"),LineString:makeObjectPropertySetter(readLineString,"geometry"),LinearRing:makeObjectPropertySetter(readLinearRing,"geometry"),Point:makeObjectPropertySetter(readPoint,"geometry"),Polygon:makeObjectPropertySetter(readPolygon,"geometry"),Style:makeObjectPropertySetter(readStyle$2),StyleMap:function placemarkStyleMapParser(c,u){const d=readStyleMapValue.call(this,c,u);if(!d)return;const p=u[u.length-1];if(Array.isArray(d))p.Style=d;else{if("string"!=typeof d)throw new Error("`styleMapValue` has an unknown type");p.styleUrl=d}},address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL),visibility:makeObjectPropertySetter(readBoolean)},makeStructureNS(jl,{MultiTrack:makeObjectPropertySetter((function readGxMultiTrack(c,u){const d=pushParseAndPop([],fh,c,u);if(!d)return;return new qs(d)}),"geometry"),Track:makeObjectPropertySetter(readGxTrack,"geometry")})),$l=makeStructureNS(zl,{ExtendedData:extendedDataParser,Region:regionParser,Link:function linkParser(c,u){parseNode(Wl,c,u)},address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),visibility:makeObjectPropertySetter(readBoolean)}),Wl=makeStructureNS(zl,{href:makeObjectPropertySetter(readURI)}),Xl=makeStructureNS(zl,{Altitude:makeObjectPropertySetter(readDecimal),Longitude:makeObjectPropertySetter(readDecimal),Latitude:makeObjectPropertySetter(readDecimal),Tilt:makeObjectPropertySetter(readDecimal),AltitudeMode:makeObjectPropertySetter(readString),Heading:makeObjectPropertySetter(readDecimal),Roll:makeObjectPropertySetter(readDecimal)}),Vl=makeStructureNS(zl,{LatLonAltBox:function latLonAltBoxParser(c,u){const d=pushParseAndPop({},Th,c,u);if(!d)return;const p=u[u.length-1],g=[parseFloat(d.west),parseFloat(d.south),parseFloat(d.east),parseFloat(d.north)];p.extent=g,p.altitudeMode=d.altitudeMode,p.minAltitude=parseFloat(d.minAltitude),p.maxAltitude=parseFloat(d.maxAltitude)},Lod:function lodParser(c,u){const d=pushParseAndPop({},Rh,c,u);if(!d)return;const p=u[u.length-1];p.minLodPixels=parseFloat(d.minLodPixels),p.maxLodPixels=parseFloat(d.maxLodPixels),p.minFadeExtent=parseFloat(d.minFadeExtent),p.maxFadeExtent=parseFloat(d.maxFadeExtent)}}),ql=makeStructureNS(zl,["Document","Placemark"]),Yl=makeStructureNS(zl,{Document:makeChildAppender((function writeDocument(c,u,d){pushSerializeAndPop({node:c},Fh,DOCUMENT_NODE_FACTORY,u,d,void 0,this)})),Placemark:makeChildAppender(writePlacemark)});let Zl,Kl,Hl,Jl,Ql,th,eh,ih,rh,nh=null,sh=null,oh=null,ah=null,lh=null,hh=null;function scaleForSize(c){return 32/Math.min(c[0],c[1])}function defaultIconUrlFunction(c){return c}function findStyle(c,u,d){return Array.isArray(c)?c:"string"==typeof c?findStyle(d[c],u,d):u}function readColor(c){const u=getAllTextContent(c,!1),d=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(u);if(d){const c=d[1];return[parseInt(c.substr(6,2),16),parseInt(c.substr(4,2),16),parseInt(c.substr(2,2),16),parseInt(c.substr(0,2),16)/255]}}function readFlatCoordinates(c){let u=getAllTextContent(c,!1);const d=[];u=u.replace(/\s*,\s*/g,",");const p=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;let g;for(;g=p.exec(u);){const c=parseFloat(g[1]),p=parseFloat(g[2]),f=g[3]?parseFloat(g[3]):0;d.push(c,p,f),u=u.substr(g[0].length)}if(""===u)return d}function readURI(c){const u=getAllTextContent(c,!1).trim();let d=c.baseURI;if(d&&"about:blank"!=d||(d=window.location.href),d){return new URL(u,d).href}return u}function readStyleURL(c){const u=getAllTextContent(c,!1).trim().replace(/^(?!.*#)/,"#");let d=c.baseURI;if(d&&"about:blank"!=d||(d=window.location.href),d){return new URL(u,d).href}return u}function readScale(c){return readDecimal(c)}const ch=makeStructureNS(zl,{Pair:function pairDataParser(c,u){const d=pushParseAndPop({},bh,c,u,this);if(!d)return;const p=d.key;if(p&&"normal"==p){const c=d.styleUrl;c&&(u[u.length-1]=c);const p=d.Style;p&&(u[u.length-1]=p)}}});function readStyleMapValue(c,u){return pushParseAndPop(void 0,ch,c,u,this)}const uh=makeStructureNS(zl,{Icon:makeObjectPropertySetter((function readIcon(c,u){const d=pushParseAndPop({},yh,c,u);if(d)return d;return null})),color:makeObjectPropertySetter(readColor),heading:makeObjectPropertySetter(readDecimal),hotSpot:makeObjectPropertySetter((function readVec2(c){const u=c.getAttribute("xunits"),d=c.getAttribute("yunits");let p;return p="insetPixels"!==u?"insetPixels"!==d?"bottom-left":"top-left":"insetPixels"!==d?"bottom-right":"top-right",{x:parseFloat(c.getAttribute("x")),xunits:Bl[u],y:parseFloat(c.getAttribute("y")),yunits:Bl[d],origin:p}})),scale:makeObjectPropertySetter(readScale)});const dh=makeStructureNS(zl,{color:makeObjectPropertySetter(readColor),scale:makeObjectPropertySetter(readScale)});const ph=makeStructureNS(zl,{color:makeObjectPropertySetter(readColor),width:makeObjectPropertySetter(readDecimal)});const gh=makeStructureNS(zl,{color:makeObjectPropertySetter(readColor),fill:makeObjectPropertySetter(readBoolean),outline:makeObjectPropertySetter(readBoolean)});const mh=makeStructureNS(zl,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatLinearRing(c,u){return pushParseAndPop(null,mh,c,u)}const fh=makeStructureNS(jl,{Track:makeArrayPusher(readGxTrack)});const _h=makeStructureNS(zl,{when:function whenParser(c,u){const d=u[u.length-1].whens,p=getAllTextContent(c,!1),g=Date.parse(p);d.push(isNaN(g)?0:g)}},makeStructureNS(jl,{coord:function gxCoordParser(c,u){const d=u[u.length-1].coordinates,p=getAllTextContent(c,!1),g=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(p);if(g){const c=parseFloat(g[1]),u=parseFloat(g[2]),p=parseFloat(g[3]);d.push([c,u,p])}else d.push([])}}));function readGxTrack(c,u){const d=pushParseAndPop({coordinates:[],whens:[]},_h,c,u);if(!d)return;const p=[],g=d.coordinates,f=d.whens;for(let c=0,u=Math.min(g.length,f.length);c<u;++c)3==g[c].length&&p.push(g[c][0],g[c][1],g[c][2],f[c]);return new tn(p,"XYZM")}const yh=makeStructureNS(zl,{href:makeObjectPropertySetter(readURI)},makeStructureNS(jl,{x:makeObjectPropertySetter(readDecimal),y:makeObjectPropertySetter(readDecimal),w:makeObjectPropertySetter(readDecimal),h:makeObjectPropertySetter(readDecimal)}));const xh=makeStructureNS(zl,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatCoordinatesFromNode(c,u){return pushParseAndPop(null,xh,c,u)}const vh=makeStructureNS(zl,{extrude:makeObjectPropertySetter(readBoolean),tessellate:makeObjectPropertySetter(readBoolean),altitudeMode:makeObjectPropertySetter(readString)});function readLineString(c,u){const d=pushParseAndPop({},vh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new tn(p,"XYZ");return c.setProperties(d,!0),c}}function readLinearRing(c,u){const d=pushParseAndPop({},vh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new lr(p,"XYZ",[p.length]);return c.setProperties(d,!0),c}}const Sh=makeStructureNS(zl,{LineString:makeArrayPusher(readLineString),LinearRing:makeArrayPusher(readLinearRing),MultiGeometry:makeArrayPusher(readMultiGeometry),Point:makeArrayPusher(readPoint),Polygon:makeArrayPusher(readPolygon)});function readMultiGeometry(c,u){const d=pushParseAndPop([],Sh,c,u);if(!d)return null;if(0===d.length)return new Vs(d);let p,g=!0;const f=d[0].getType();let _;for(let c=1,u=d.length;c<u;++c)if(_=d[c],_.getType()!=f){g=!1;break}if(g){let c,u;if("Point"==f){const g=d[0];c=g.getLayout(),u=g.getFlatCoordinates();for(let c=1,p=d.length;c<p;++c)_=d[c],extend$3(u,_.getFlatCoordinates());p=new Ys(u,c),setCommonGeometryProperties(p,d)}else if("LineString"==f)p=new qs(d),setCommonGeometryProperties(p,d);else if("Polygon"==f)p=new Zs(d),setCommonGeometryProperties(p,d);else{if("GeometryCollection"!=f&&!f.startsWith("Multi"))throw new Error("Unknown geometry type found");p=new Vs(d)}}else p=new Vs(d);return p}function readPoint(c,u){const d=pushParseAndPop({},vh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new ar(p,"XYZ");return c.setProperties(d,!0),c}}const wh=makeStructureNS(zl,{innerBoundaryIs:function innerBoundaryIsParser(c,u){const d=pushParseAndPop([],Lh,c,u);if(d.length>0){u[u.length-1].push(...d)}},outerBoundaryIs:function outerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,Ah,c,u);if(d){u[u.length-1][0]=d}}});function readPolygon(c,u){const d=pushParseAndPop({},vh,c,u),p=pushParseAndPop([null],wh,c,u);if(p&&p[0]){const c=p[0],u=[c.length];for(let d=1,g=p.length;d<g;++d)extend$3(c,p[d]),u.push(c.length);const g=new lr(c,"XYZ",u);return g.setProperties(d,!0),g}}const Ch=makeStructureNS(zl,{IconStyle:function iconStyleParser(c,u){const d=pushParseAndPop({},uh,c,u);if(!d)return;const p=u[u.length-1],g="Icon"in d?d.Icon:{},f=!("Icon"in d)||Object.keys(g).length>0;let _;const y=g.href;let x,v,C;y?_=y:f&&(_=th);let M="bottom-left";const T=d.hotSpot;let L;T?(x=[T.x,T.y],v=T.xunits,C=T.yunits,M=T.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(_)&&(_.includes("pushpin")?(x=Kl,v=Hl,C=Jl):_.includes("arrow-reverse")?(x=[54,42],v=Hl,C=Jl):_.includes("paddle")&&(x=[32,1],v=Hl,C=Jl));const A=g.x,I=g.y;let k;void 0!==A&&void 0!==I&&(L=[A,I]);const O=g.w,N=g.h;let G;void 0!==O&&void 0!==N&&(k=[O,N]);const j=d.heading;void 0!==j&&(G=toRadians(j));const B=d.scale,V=d.color;if(f){_==th&&(k=Ql);const c=new Zn({anchor:x,anchorOrigin:M,anchorXUnits:v,anchorYUnits:C,crossOrigin:this.crossOrigin_,offset:L,offsetOrigin:"bottom-left",rotation:G,scale:B,size:k,src:this.iconUrlFunction_(_),color:V}),u=c.getScaleArray()[0],d=c.getSize();if(null===d){const d=c.getImageState();if(d===br.IDLE||d===br.LOADING){const listener=function(){const d=c.getImageState();if(d!==br.IDLE&&d!==br.LOADING){const d=c.getSize();if(d&&2==d.length){const p=scaleForSize(d);c.setScale(u*p)}c.unlistenImageChange(listener)}};c.listenImageChange(listener),d===br.IDLE&&c.load()}}else if(2==d.length){const p=scaleForSize(d);c.setScale(u*p)}p.imageStyle=c}else p.imageStyle=eh},LabelStyle:function labelStyleParser(c,u){const d=pushParseAndPop({},dh,c,u);if(!d)return;const p=u[u.length-1],g=new Ln({fill:new Qr({color:"color"in d?d.color:Zl}),scale:d.scale});p.textStyle=g},LineStyle:function lineStyleParser(c,u){const d=pushParseAndPop({},ph,c,u);if(!d)return;const p=u[u.length-1],g=new en({color:"color"in d?d.color:Zl,width:"width"in d?d.width:1});p.strokeStyle=g},PolyStyle:function polyStyleParser(c,u){const d=pushParseAndPop({},gh,c,u);if(!d)return;const p=u[u.length-1],g=new Qr({color:"color"in d?d.color:Zl});p.fillStyle=g;const f=d.fill;void 0!==f&&(p.fill=f);const _=d.outline;void 0!==_&&(p.outline=_)}});function readStyle$2(c,u){const d=pushParseAndPop({},Ch,c,u,this);if(!d)return null;let p="fillStyle"in d?d.fillStyle:nh;const g=d.fill;let f;void 0===g||g||(p=null),"imageStyle"in d?d.imageStyle!=eh&&(f=d.imageStyle):f=sh;const _="textStyle"in d?d.textStyle:ah,y="strokeStyle"in d?d.strokeStyle:oh,x=d.outline;return void 0===x||x?[new Rn({fill:p,image:f,stroke:y,text:_,zIndex:void 0})]:[new Rn({geometry:function(c){const u=c.getGeometry(),d=u.getType();if("GeometryCollection"===d){return new Vs(u.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"!==u&&"MultiPolygon"!==u})))}if("Polygon"!==d&&"MultiPolygon"!==d)return u},fill:p,image:f,stroke:y,text:_,zIndex:void 0}),new Rn({geometry:function(c){const u=c.getGeometry(),d=u.getType();if("GeometryCollection"===d){return new Vs(u.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"===u||"MultiPolygon"===u})))}if("Polygon"===d||"MultiPolygon"===d)return u},fill:p,stroke:null,zIndex:void 0})]}function setCommonGeometryProperties(c,u){const d=u.length,p=new Array(u.length),g=new Array(u.length),f=new Array(u.length);let _,y,x;_=!1,y=!1,x=!1;for(let c=0;c<d;++c){const d=u[c];p[c]=d.get("extrude"),g[c]=d.get("tessellate"),f[c]=d.get("altitudeMode"),_=_||void 0!==p[c],y=y||void 0!==g[c],x=x||f[c]}_&&c.set("extrude",p),y&&c.set("tessellate",g),x&&c.set("altitudeMode",f)}const Eh=makeStructureNS(zl,{displayName:makeObjectPropertySetter(readString),value:makeObjectPropertySetter(readString)});const Ph=makeStructureNS(zl,{Data:function dataParser(c,u){const d=c.getAttribute("name");parseNode(Eh,c,u);const p=u[u.length-1];d&&p.displayName?p[d]={value:p.value,displayName:p.displayName,toString:function(){return p.value}}:null!==d?p[d]=p.value:null!==p.displayName&&(p[p.displayName]=p.value),delete p.value},SchemaData:function schemaDataParser(c,u){parseNode(Mh,c,u)}});function extendedDataParser(c,u){parseNode(Ph,c,u)}function regionParser(c,u){parseNode(Vl,c,u)}const bh=makeStructureNS(zl,{Style:makeObjectPropertySetter(readStyle$2),key:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL)});const Mh=makeStructureNS(zl,{SimpleData:function simpleDataParser(c,u){const d=c.getAttribute("name");if(null!==d){const p=readString(c);u[u.length-1][d]=p}}});const Th=makeStructureNS(zl,{altitudeMode:makeObjectPropertySetter(readString),minAltitude:makeObjectPropertySetter(readDecimal),maxAltitude:makeObjectPropertySetter(readDecimal),north:makeObjectPropertySetter(readDecimal),south:makeObjectPropertySetter(readDecimal),east:makeObjectPropertySetter(readDecimal),west:makeObjectPropertySetter(readDecimal)});const Rh=makeStructureNS(zl,{minLodPixels:makeObjectPropertySetter(readDecimal),maxLodPixels:makeObjectPropertySetter(readDecimal),minFadeExtent:makeObjectPropertySetter(readDecimal),maxFadeExtent:makeObjectPropertySetter(readDecimal)});const Lh=makeStructureNS(zl,{LinearRing:makeArrayPusher(readFlatLinearRing)});const Ah=makeStructureNS(zl,{LinearRing:makeReplacer(readFlatLinearRing)});function writeColorTextNode(c,u){const d=asArray(u),p=[255*(4==d.length?d[3]:1),d[2],d[1],d[0]];for(let c=0;c<4;++c){const u=Math.floor(p[c]).toString(16);p[c]=1==u.length?"0"+u:u}writeStringTextNode(c,p.join(""))}const Ih=makeStructureNS(zl,{Data:makeChildAppender((function writeDataNode(c,u,d){c.setAttribute("name",u.name);const p={node:c},g=u.value;"object"==typeof g?(null!==g&&g.displayName&&pushSerializeAndPop(p,Ih,za,[g.displayName],d,["displayName"]),null!==g&&g.value&&pushSerializeAndPop(p,Ih,za,[g.value],d,["value"])):pushSerializeAndPop(p,Ih,za,[g],d,["value"])})),value:makeChildAppender((function writeDataNodeValue(c,u){writeStringTextNode(c,u)})),displayName:makeChildAppender((function writeDataNodeName(c,u){!function writeCDATASection(c,u){c.appendChild(getDocument().createCDATASection(u))}(c,u)}))});const Fh=makeStructureNS(zl,{Placemark:makeChildAppender(writePlacemark)}),DOCUMENT_NODE_FACTORY=function(c,u,d){return createElementNS(u[u.length-1].node.namespaceURI,"Placemark")};const kh=makeSimpleNodeFactory("Data");const Oh=makeStructureNS(zl,["href"],makeStructureNS(jl,["x","y","w","h"])),Nh=makeStructureNS(zl,{href:makeChildAppender(writeStringTextNode)},makeStructureNS(jl,{x:makeChildAppender(writeDecimalTextNode),y:makeChildAppender(writeDecimalTextNode),w:makeChildAppender(writeDecimalTextNode),h:makeChildAppender(writeDecimalTextNode)})),GX_NODE_FACTORY=function(c,u,d){return createElementNS(jl[0],"gx:"+d)};const Dh=makeStructureNS(zl,["scale","heading","Icon","color","hotSpot"]),Gh=makeStructureNS(zl,{Icon:makeChildAppender((function writeIcon(c,u,d){const p={node:c},g=d[d.length-1].node;let f=Oh[g.namespaceURI],_=makeSequence(u,f);pushSerializeAndPop(p,Nh,za,_,d,f),f=Oh[jl[0]],_=makeSequence(u,f),pushSerializeAndPop(p,Nh,GX_NODE_FACTORY,_,d,f)})),color:makeChildAppender(writeColorTextNode),heading:makeChildAppender(writeDecimalTextNode),hotSpot:makeChildAppender((function writeVec2(c,u){c.setAttribute("x",String(u.x)),c.setAttribute("y",String(u.y)),c.setAttribute("xunits",u.xunits),c.setAttribute("yunits",u.yunits)})),scale:makeChildAppender(writeScaleTextNode)});const jh=makeStructureNS(zl,["color","scale"]),zh=makeStructureNS(zl,{color:makeChildAppender(writeColorTextNode),scale:makeChildAppender(writeScaleTextNode)});const Bh=makeStructureNS(zl,["color","width"]),Uh=makeStructureNS(zl,{color:makeChildAppender(writeColorTextNode),width:makeChildAppender(writeDecimalTextNode)});const $h={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},GEOMETRY_NODE_FACTORY=function(c,u,d){if(c){return createElementNS(u[u.length-1].node.namespaceURI,$h[c.getType()])}},Wh=makeSimpleNodeFactory("Point"),Xh=makeSimpleNodeFactory("LineString"),Vh=makeSimpleNodeFactory("LinearRing"),qh=makeSimpleNodeFactory("Polygon"),Yh=makeStructureNS(zl,{LineString:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),GeometryCollection:makeChildAppender(writeMultiGeometry)});function writeMultiGeometry(c,u,d){const p={node:c},g=u.getType();let f,_=[];if("GeometryCollection"===g)u.getGeometriesArrayRecursive().forEach((function(c){const u=c.getType();if("MultiPoint"===u)_=_.concat(c.getPoints());else if("MultiLineString"===u)_=_.concat(c.getLineStrings());else if("MultiPolygon"===u)_=_.concat(c.getPolygons());else{if("Point"!==u&&"LineString"!==u&&"Polygon"!==u)throw new Error("Unknown geometry type");_.push(c)}})),f=GEOMETRY_NODE_FACTORY;else if("MultiPoint"===g)_=u.getPoints(),f=Wh;else if("MultiLineString"===g)_=u.getLineStrings(),f=Xh;else{if("MultiPolygon"!==g)throw new Error("Unknown geometry type");_=u.getPolygons(),f=qh}pushSerializeAndPop(p,Yh,f,_,d)}const Zh=makeStructureNS(zl,{LinearRing:makeChildAppender(writePrimitiveGeometry)});function writeBoundaryIs(c,u,d){pushSerializeAndPop({node:c},Zh,Vh,[u],d)}const Kh=makeStructureNS(zl,{ExtendedData:makeChildAppender((function writeExtendedData(c,u,d){const p={node:c},g=u.names,f=u.values,_=g.length;for(let c=0;c<_;c++)pushSerializeAndPop(p,Ih,kh,[{name:g[c],value:f[c]}],d)})),MultiGeometry:makeChildAppender(writeMultiGeometry),LineString:makeChildAppender(writePrimitiveGeometry),LinearRing:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),Style:makeChildAppender((function writeStyle(c,u,d){const p={node:c},g={};if(u.pointStyles.length){const c=u.pointStyles[0].getText();c&&(g.LabelStyle=c);const d=u.pointStyles[0].getImage();d&&"function"==typeof d.getSrc&&(g.IconStyle=d)}if(u.lineStyles.length){const c=u.lineStyles[0].getStroke();c&&(g.LineStyle=c)}if(u.polyStyles.length){const c=u.polyStyles[0].getStroke();c&&!g.LineStyle&&(g.LineStyle=c),g.PolyStyle=u.polyStyles[0]}const f=d[d.length-1].node,_=oc[f.namespaceURI],y=makeSequence(g,_);pushSerializeAndPop(p,ac,za,y,d,_)})),address:makeChildAppender(writeStringTextNode),description:makeChildAppender(writeStringTextNode),name:makeChildAppender(writeStringTextNode),open:makeChildAppender(writeBooleanTextNode),phoneNumber:makeChildAppender(writeStringTextNode),styleUrl:makeChildAppender(writeStringTextNode),visibility:makeChildAppender(writeBooleanTextNode)}),Hh=makeStructureNS(zl,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Jh=makeSimpleNodeFactory("ExtendedData");function writePlacemark(c,u,d){const p={node:c};u.getId()&&c.setAttribute("id",u.getId());const g=u.getProperties(),f={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};f[u.getGeometryName()]=1;const _=Object.keys(g||{}).sort().filter((function(c){return!f[c]})),y=u.getStyleFunction();if(y){const c=y(u,0);if(c){const d=Array.isArray(c)?c:[c];let p=d;if(u.getGeometry()&&(p=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Point"===u||"MultiPoint"===u})).length:"Point"===c||"MultiPoint"===c}}))),this.writeStyles_){let c=d,f=d;u.getGeometry()&&(c=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"LineString"===u||"MultiLineString"===u})).length:"LineString"===c||"MultiLineString"===c}})),f=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"===u||"MultiPolygon"===u})).length:"Polygon"===c||"MultiPolygon"===c}}))),g.Style={pointStyles:p,lineStyles:c,polyStyles:f}}if(p.length&&void 0===g.name){const c=p[0].getText();c&&(g.name=c.getText())}}}const x=d[d.length-1].node,v=Hh[x.namespaceURI],C=makeSequence(g,v);if(pushSerializeAndPop(p,Kh,za,C,d,v),_.length>0){const c=makeSequence(g,_);pushSerializeAndPop(p,Kh,Jh,[{names:_,values:c}],d)}const M=d[0];let T=u.getGeometry();T&&(T=transformGeometryWithOptions(T,!0,M)),pushSerializeAndPop(p,Kh,GEOMETRY_NODE_FACTORY,[T],d)}const Qh=makeStructureNS(zl,["extrude","tessellate","altitudeMode","coordinates"]),tc=makeStructureNS(zl,{extrude:makeChildAppender(writeBooleanTextNode),tessellate:makeChildAppender(writeBooleanTextNode),altitudeMode:makeChildAppender(writeStringTextNode),coordinates:makeChildAppender((function writeCoordinatesTextNode(c,u,d){const p=d[d.length-1],g=p.layout,f=p.stride;let _;if("XY"==g||"XYM"==g)_=2;else{if("XYZ"!=g&&"XYZM"!=g)throw new Error("Invalid geometry layout");_=3}const y=u.length;let x="";if(y>0){x+=u[0];for(let c=1;c<_;++c)x+=","+u[c];for(let c=f;c<y;c+=f){x+=" "+u[c];for(let d=1;d<_;++d)x+=","+u[c+d]}}writeStringTextNode(c,x)}))});function writePrimitiveGeometry(c,u,d){const p=u.getFlatCoordinates(),g={node:c};g.layout=u.getLayout(),g.stride=u.getStride();const f=u.getProperties();f.coordinates=p;const _=d[d.length-1].node,y=Qh[_.namespaceURI],x=makeSequence(f,y);pushSerializeAndPop(g,tc,za,x,d,y)}const ec=makeStructureNS(zl,["color","fill","outline"]),ic=makeStructureNS(zl,{outerBoundaryIs:makeChildAppender(writeBoundaryIs),innerBoundaryIs:makeChildAppender(writeBoundaryIs)}),rc=makeSimpleNodeFactory("innerBoundaryIs"),nc=makeSimpleNodeFactory("outerBoundaryIs");function writePolygon(c,u,d){const p=u.getLinearRings(),g=p.shift(),f={node:c};pushSerializeAndPop(f,ic,rc,p,d),pushSerializeAndPop(f,ic,nc,[g],d)}const sc=makeStructureNS(zl,{color:makeChildAppender(writeColorTextNode),fill:makeChildAppender(writeBooleanTextNode),outline:makeChildAppender(writeBooleanTextNode)});function writeScaleTextNode(c,u){writeDecimalTextNode(c,Math.round(1e6*u)/1e6)}const oc=makeStructureNS(zl,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),ac=makeStructureNS(zl,{IconStyle:makeChildAppender((function writeIconStyle(c,u,d){const p={node:c},g={},f=u.getSrc(),_=u.getSize(),y=u.getImageSize(),x={href:f};if(_){x.w=_[0],x.h=_[1];const c=u.getAnchor(),d=u.getOrigin();if(d&&y&&0!==d[0]&&d[1]!==_[1]&&(x.x=d[0],x.y=y[1]-(d[1]+_[1])),c&&(c[0]!==_[0]/2||c[1]!==_[1]/2)){const u={x:c[0],xunits:"pixels",y:_[1]-c[1],yunits:"pixels"};g.hotSpot=u}}g.Icon=x;let v=u.getScaleArray()[0],C=_;if(null===C&&(C=Ql),2==C.length){v/=scaleForSize(C)}1!==v&&(g.scale=v);const M=u.getRotation();0!==M&&(g.heading=M);const T=u.getColor();T&&(g.color=T);const L=d[d.length-1].node,A=Dh[L.namespaceURI],I=makeSequence(g,A);pushSerializeAndPop(p,Gh,za,I,d,A)})),LabelStyle:makeChildAppender((function writeLabelStyle(c,u,d){const p={node:c},g={},f=u.getFill();f&&(g.color=f.getColor());const _=u.getScale();_&&1!==_&&(g.scale=_);const y=d[d.length-1].node,x=jh[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(p,zh,za,v,d,x)})),LineStyle:makeChildAppender((function writeLineStyle(c,u,d){const p={node:c},g={color:u.getColor(),width:Number(u.getWidth())||1},f=d[d.length-1].node,_=Bh[f.namespaceURI],y=makeSequence(g,_);pushSerializeAndPop(p,Uh,za,y,d,_)})),PolyStyle:makeChildAppender((function writePolyStyle(c,u,d){const p={node:c},g=u.getFill(),f=u.getStroke(),_={color:g?g.getColor():void 0,fill:!!g&&void 0,outline:!!f&&void 0},y=d[d.length-1].node,x=ec[y.namespaceURI],v=makeSequence(_,x);pushSerializeAndPop(p,sc,za,v,d,x)}))});var lc=class KML extends XMLFeature{constructor(c){super(),c=c||{},hh||function createStyleDefaults(){Zl=[255,255,255,1],nh=new Qr({color:Zl}),Kl=[20,2],Hl="pixels",Jl="pixels",Ql=[64,64],th="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",sh=new Zn({anchor:Kl,anchorOrigin:"bottom-left",anchorXUnits:Hl,anchorYUnits:Jl,crossOrigin:"anonymous",rotation:0,scale:scaleForSize(Ql),size:Ql,src:th}),eh="NO_IMAGE",oh=new en({color:Zl,width:1}),ih=new en({color:[51,51,51,1],width:2}),ah=new Ln({font:"bold 16px Helvetica",fill:nh,stroke:ih,scale:.8}),lh=new Rn({fill:nh,image:sh,text:ah,stroke:oh,zIndex:0}),hh=[lh]}(),this.dataProjection=get$2("EPSG:4326"),this.defaultStyle_=c.defaultStyle?c.defaultStyle:hh,this.extractStyles_=void 0===c.extractStyles||c.extractStyles,this.writeStyles_=void 0===c.writeStyles||c.writeStyles,this.sharedStyles_={},this.showPointNames_=void 0===c.showPointNames||c.showPointNames,this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:"anonymous",this.iconUrlFunction_=c.iconUrlFunction?c.iconUrlFunction:defaultIconUrlFunction,this.supportedMediaTypes=["application/vnd.google-earth.kml+xml"]}readDocumentOrFolder_(c,u){const d=pushParseAndPop([],makeStructureNS(zl,{Document:makeArrayExtender(this.readDocumentOrFolder_,this),Folder:makeArrayExtender(this.readDocumentOrFolder_,this),Placemark:makeArrayPusher(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),c,u,this);if(d)return d}readPlacemark_(c,u){const d=pushParseAndPop({geometry:null},Ul,c,u,this);if(!d)return;const p=new ki,g=c.getAttribute("id");null!==g&&p.setId(g);const f=u[0],_=d.geometry;if(_&&transformGeometryWithOptions(_,!1,f),p.setGeometry(_),delete d.geometry,this.extractStyles_){const c=function createFeatureStyleFunction(c,u,d,p,g){return function(f,_){let y=g,x="",v=[];if(y){const c=f.getGeometry();if(c)if(c instanceof Vs)v=c.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Point"===u||"MultiPoint"===u})),y=v.length>0;else{const u=c.getType();y="Point"===u||"MultiPoint"===u}}y&&(x=f.get("name"),y=y&&!!x,y&&/&[^&]+;/.test(x)&&(rh||(rh=document.createElement("textarea")),rh.innerHTML=x,x=rh.value));let C=d;if(c?C=c:u&&(C=findStyle(u,d,p)),y){const c=function createNameStyleFunction(c,u){const d=[0,0];let p="start";const g=c.getImage();if(g){const c=g.getSize();if(c&&2==c.length){const u=g.getScaleArray(),f=g.getAnchor();d[0]=u[0]*(c[0]-f[0]),d[1]=u[1]*(c[1]/2-f[1]),p="left"}}let f=c.getText();f?(f=f.clone(),f.setFont(f.getFont()||ah.getFont()),f.setScale(f.getScale()||ah.getScale()),f.setFill(f.getFill()||ah.getFill()),f.setStroke(f.getStroke()||ih)):f=ah.clone();f.setText(u),f.setOffsetX(d[0]),f.setOffsetY(d[1]),f.setTextAlign(p);const _=new Rn({image:g,text:f});return _}(C[0],x);if(v.length>0){c.setGeometry(new Vs(v));return[c,new Rn({geometry:C[0].getGeometry(),image:null,fill:C[0].getFill(),stroke:C[0].getStroke(),text:null})].concat(C.slice(1))}return c}return C}}(d.Style,d.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);p.setStyle(c)}return delete d.Style,p.setProperties(d,!0),p}readSharedStyle_(c,u){const d=c.getAttribute("id");if(null!==d){const p=readStyle$2.call(this,c,u);if(p){let u,g=c.baseURI;if(g&&"about:blank"!=g||(g=window.location.href),g){u=new URL("#"+d,g).href}else u="#"+d;this.sharedStyles_[u]=p}}}readSharedStyleMap_(c,u){const d=c.getAttribute("id");if(null===d)return;const p=readStyleMapValue.call(this,c,u);if(!p)return;let g,f=c.baseURI;if(f&&"about:blank"!=f||(f=window.location.href),f){g=new URL("#"+d,f).href}else g="#"+d;this.sharedStyles_[g]=p}readFeatureFromNode(c,u){if(!zl.includes(c.namespaceURI))return null;const d=this.readPlacemark_(c,[this.getReadOptions(c,u)]);return d||null}readFeaturesFromNode(c,u){if(!zl.includes(c.namespaceURI))return[];let d;const p=c.localName;if("Document"==p||"Folder"==p)return d=this.readDocumentOrFolder_(c,[this.getReadOptions(c,u)]),d||[];if("Placemark"==p){const d=this.readPlacemark_(c,[this.getReadOptions(c,u)]);return d?[d]:[]}if("kml"==p){d=[];for(let p=c.firstElementChild;p;p=p.nextElementSibling){const c=this.readFeaturesFromNode(p,u);c&&extend$3(d,c)}return d}return[]}readName(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readNameFromDocument(u)}return isDocument(c)?this.readNameFromDocument(c):this.readNameFromNode(c)}}readNameFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE){const c=this.readNameFromNode(u);if(c)return c}}readNameFromNode(c){for(let u=c.firstElementChild;u;u=u.nextElementSibling)if(zl.includes(u.namespaceURI)&&"name"==u.localName)return readString(u);for(let u=c.firstElementChild;u;u=u.nextElementSibling){const c=u.localName;if(zl.includes(u.namespaceURI)&&("Document"==c||"Folder"==c||"Placemark"==c||"kml"==c)){const c=this.readNameFromNode(u);if(c)return c}}}readNetworkLinks(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readNetworkLinksFromDocument(d))}else isDocument(c)?extend$3(u,this.readNetworkLinksFromDocument(c)):extend$3(u,this.readNetworkLinksFromNode(c));return u}readNetworkLinksFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType==Node.ELEMENT_NODE&&extend$3(u,this.readNetworkLinksFromNode(d));return u}readNetworkLinksFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(zl.includes(d.namespaceURI)&&"NetworkLink"==d.localName){const c=pushParseAndPop({},$l,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!zl.includes(d.namespaceURI)||"Document"!=c&&"Folder"!=c&&"kml"!=c||extend$3(u,this.readNetworkLinksFromNode(d))}return u}readRegion(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readRegionFromDocument(d))}else isDocument(c)?extend$3(u,this.readRegionFromDocument(c)):extend$3(u,this.readRegionFromNode(c));return u}readRegionFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType==Node.ELEMENT_NODE&&extend$3(u,this.readRegionFromNode(d));return u}readRegionFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(zl.includes(d.namespaceURI)&&"Region"==d.localName){const c=pushParseAndPop({},Vl,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!zl.includes(d.namespaceURI)||"Document"!=c&&"Folder"!=c&&"kml"!=c||extend$3(u,this.readRegionFromNode(d))}return u}readCamera(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readCameraFromDocument(d))}else isDocument(c)?extend$3(u,this.readCameraFromDocument(c)):extend$3(u,this.readCameraFromNode(c));return u}readCameraFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType===Node.ELEMENT_NODE&&extend$3(u,this.readCameraFromNode(d));return u}readCameraFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(zl.includes(d.namespaceURI)&&"Camera"===d.localName){const c=pushParseAndPop({},Xl,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!zl.includes(d.namespaceURI)||"Document"!==c&&"Folder"!==c&&"Placemark"!==c&&"kml"!==c||extend$3(u,this.readCameraFromNode(d))}return u}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS(zl[4],"kml"),p="http://www.w3.org/2000/xmlns/";d.setAttributeNS(p,"xmlns:gx",jl[0]),d.setAttributeNS(p,"xmlns:xsi",ja),d.setAttributeNS(ja,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");const g={node:d},f={};c.length>1?f.Document=c:1==c.length&&(f.Placemark=c[0]);const _=ql[d.namespaceURI],y=makeSequence(f,_);return pushSerializeAndPop(g,Yl,za,y,[u],_,this),d}};const hc=4294967296,cc=1/hc,uc="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class Pbf{constructor(c=new Uint8Array(16)){this.buf=ArrayBuffer.isView(c)?c:new Uint8Array(c),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(c,u,d=this.length){for(;this.pos<d;){const d=this.readVarint(),p=d>>3,g=this.pos;this.type=7&d,c(p,u,this),this.pos===g&&this.skip(d)}return u}readMessage(c,u){return this.readFields(c,u,this.readVarint()+this.pos)}readFixed32(){const c=this.dataView.getUint32(this.pos,!0);return this.pos+=4,c}readSFixed32(){const c=this.dataView.getInt32(this.pos,!0);return this.pos+=4,c}readFixed64(){const c=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*hc;return this.pos+=8,c}readSFixed64(){const c=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*hc;return this.pos+=8,c}readFloat(){const c=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,c}readDouble(){const c=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,c}readVarint(c){const u=this.buf;let d,p;return p=u[this.pos++],d=127&p,p<128?d:(p=u[this.pos++],d|=(127&p)<<7,p<128?d:(p=u[this.pos++],d|=(127&p)<<14,p<128?d:(p=u[this.pos++],d|=(127&p)<<21,p<128?d:(p=u[this.pos],d|=(15&p)<<28,function readVarintRemainder(c,u,d){const p=d.buf;let g,f;if(f=p[d.pos++],g=(112&f)>>4,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<3,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<10,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<17,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<24,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(1&f)<<31,f<128)return toNum(c,g,u);throw new Error("Expected varint not more than 10 bytes")}(d,c,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const c=this.readVarint();return c%2==1?(c+1)/-2:c/2}readBoolean(){return Boolean(this.readVarint())}readString(){const c=this.readVarint()+this.pos,u=this.pos;return this.pos=c,c-u>=12&&uc?uc.decode(this.buf.subarray(u,c)):function readUtf8(c,u,d){let p="",g=u;for(;g<d;){const u=c[g];let f,_,y,x=null,v=u>239?4:u>223?3:u>191?2:1;if(g+v>d)break;1===v?u<128&&(x=u):2===v?(f=c[g+1],128==(192&f)&&(x=(31&u)<<6|63&f,x<=127&&(x=null))):3===v?(f=c[g+1],_=c[g+2],128==(192&f)&&128==(192&_)&&(x=(15&u)<<12|(63&f)<<6|63&_,(x<=2047||x>=55296&&x<=57343)&&(x=null))):4===v&&(f=c[g+1],_=c[g+2],y=c[g+3],128==(192&f)&&128==(192&_)&&128==(192&y)&&(x=(15&u)<<18|(63&f)<<12|(63&_)<<6|63&y,(x<=65535||x>=1114112)&&(x=null))),null===x?(x=65533,v=1):x>65535&&(x-=65536,p+=String.fromCharCode(x>>>10&1023|55296),x=56320|1023&x),p+=String.fromCharCode(x),g+=v}return p}(this.buf,u,c)}readBytes(){const c=this.readVarint()+this.pos,u=this.buf.subarray(this.pos,c);return this.pos=c,u}readPackedVarint(c=[],u){const d=this.readPackedEnd();for(;this.pos<d;)c.push(this.readVarint(u));return c}readPackedSVarint(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSVarint());return c}readPackedBoolean(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readBoolean());return c}readPackedFloat(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFloat());return c}readPackedDouble(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readDouble());return c}readPackedFixed32(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFixed32());return c}readPackedSFixed32(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSFixed32());return c}readPackedFixed64(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFixed64());return c}readPackedSFixed64(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSFixed64());return c}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}skip(c){const u=7&c;if(0===u)for(;this.buf[this.pos++]>127;);else if(2===u)this.pos=this.readVarint()+this.pos;else if(5===u)this.pos+=4;else{if(1!==u)throw new Error(`Unimplemented type: ${u}`);this.pos+=8}}writeTag(c,u){this.writeVarint(c<<3|u)}realloc(c){let u=this.length||16;for(;u<this.pos+c;)u*=2;if(u!==this.length){const c=new Uint8Array(u);c.set(this.buf),this.buf=c,this.dataView=new DataView(c.buffer),this.length=u}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(c){this.realloc(4),this.dataView.setInt32(this.pos,c,!0),this.pos+=4}writeSFixed32(c){this.realloc(4),this.dataView.setInt32(this.pos,c,!0),this.pos+=4}writeFixed64(c){this.realloc(8),this.dataView.setInt32(this.pos,-1&c,!0),this.dataView.setInt32(this.pos+4,Math.floor(c*cc),!0),this.pos+=8}writeSFixed64(c){this.realloc(8),this.dataView.setInt32(this.pos,-1&c,!0),this.dataView.setInt32(this.pos+4,Math.floor(c*cc),!0),this.pos+=8}writeVarint(c){(c=+c||0)>268435455||c<0?function writeBigVarint(c,u){let d,p;c>=0?(d=c%4294967296|0,p=c/4294967296|0):(d=~(-c%4294967296),p=~(-c/4294967296),4294967295^d?d=d+1|0:(d=0,p=p+1|0));if(c>=0x10000000000000000||c<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");u.realloc(10),function writeBigVarintLow(c,u,d){d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos]=127&c}(d,0,u),function writeBigVarintHigh(c,u){const d=(7&c)<<4;if(u.buf[u.pos++]|=d|((c>>>=3)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;u.buf[u.pos++]=127&c}(p,u)}(c,this):(this.realloc(4),this.buf[this.pos++]=127&c|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=c>>>7&127))))}writeSVarint(c){this.writeVarint(c<0?2*-c-1:2*c)}writeBoolean(c){this.writeVarint(+c)}writeString(c){c=String(c),this.realloc(4*c.length),this.pos++;const u=this.pos;this.pos=function writeUtf8(c,u,d){for(let p,g,f=0;f<u.length;f++){if(p=u.charCodeAt(f),p>55295&&p<57344){if(!g){p>56319||f+1===u.length?(c[d++]=239,c[d++]=191,c[d++]=189):g=p;continue}if(p<56320){c[d++]=239,c[d++]=191,c[d++]=189,g=p;continue}p=g-55296<<10|p-56320|65536,g=null}else g&&(c[d++]=239,c[d++]=191,c[d++]=189,g=null);p<128?c[d++]=p:(p<2048?c[d++]=p>>6|192:(p<65536?c[d++]=p>>12|224:(c[d++]=p>>18|240,c[d++]=p>>12&63|128),c[d++]=p>>6&63|128),c[d++]=63&p|128)}return d}(this.buf,c,this.pos);const d=this.pos-u;d>=128&&makeRoomForExtraLength(u,d,this),this.pos=u-1,this.writeVarint(d),this.pos+=d}writeFloat(c){this.realloc(4),this.dataView.setFloat32(this.pos,c,!0),this.pos+=4}writeDouble(c){this.realloc(8),this.dataView.setFloat64(this.pos,c,!0),this.pos+=8}writeBytes(c){const u=c.length;this.writeVarint(u),this.realloc(u);for(let d=0;d<u;d++)this.buf[this.pos++]=c[d]}writeRawMessage(c,u){this.pos++;const d=this.pos;c(u,this);const p=this.pos-d;p>=128&&makeRoomForExtraLength(d,p,this),this.pos=d-1,this.writeVarint(p),this.pos+=p}writeMessage(c,u,d){this.writeTag(c,2),this.writeRawMessage(u,d)}writePackedVarint(c,u){u.length&&this.writeMessage(c,writePackedVarint,u)}writePackedSVarint(c,u){u.length&&this.writeMessage(c,writePackedSVarint,u)}writePackedBoolean(c,u){u.length&&this.writeMessage(c,writePackedBoolean,u)}writePackedFloat(c,u){u.length&&this.writeMessage(c,writePackedFloat,u)}writePackedDouble(c,u){u.length&&this.writeMessage(c,writePackedDouble,u)}writePackedFixed32(c,u){u.length&&this.writeMessage(c,writePackedFixed32,u)}writePackedSFixed32(c,u){u.length&&this.writeMessage(c,writePackedSFixed32,u)}writePackedFixed64(c,u){u.length&&this.writeMessage(c,writePackedFixed64,u)}writePackedSFixed64(c,u){u.length&&this.writeMessage(c,writePackedSFixed64,u)}writeBytesField(c,u){this.writeTag(c,2),this.writeBytes(u)}writeFixed32Field(c,u){this.writeTag(c,5),this.writeFixed32(u)}writeSFixed32Field(c,u){this.writeTag(c,5),this.writeSFixed32(u)}writeFixed64Field(c,u){this.writeTag(c,1),this.writeFixed64(u)}writeSFixed64Field(c,u){this.writeTag(c,1),this.writeSFixed64(u)}writeVarintField(c,u){this.writeTag(c,0),this.writeVarint(u)}writeSVarintField(c,u){this.writeTag(c,0),this.writeSVarint(u)}writeStringField(c,u){this.writeTag(c,2),this.writeString(u)}writeFloatField(c,u){this.writeTag(c,5),this.writeFloat(u)}writeDoubleField(c,u){this.writeTag(c,1),this.writeDouble(u)}writeBooleanField(c,u){this.writeVarintField(c,+u)}}function toNum(c,u,d){return d?4294967296*u+(c>>>0):4294967296*(u>>>0)+(c>>>0)}function makeRoomForExtraLength(c,u,d){const p=u<=16383?1:u<=2097151?2:u<=268435455?3:Math.floor(Math.log(u)/(7*Math.LN2));d.realloc(p);for(let u=d.pos-1;u>=c;u--)d.buf[u+p]=d.buf[u]}function writePackedVarint(c,u){for(let d=0;d<c.length;d++)u.writeVarint(c[d])}function writePackedSVarint(c,u){for(let d=0;d<c.length;d++)u.writeSVarint(c[d])}function writePackedFloat(c,u){for(let d=0;d<c.length;d++)u.writeFloat(c[d])}function writePackedDouble(c,u){for(let d=0;d<c.length;d++)u.writeDouble(c[d])}function writePackedBoolean(c,u){for(let d=0;d<c.length;d++)u.writeBoolean(c[d])}function writePackedFixed32(c,u){for(let d=0;d<c.length;d++)u.writeFixed32(c[d])}function writePackedSFixed32(c,u){for(let d=0;d<c.length;d++)u.writeSFixed32(c[d])}function writePackedFixed64(c,u){for(let d=0;d<c.length;d++)u.writeFixed64(c[d])}function writePackedSFixed64(c,u){for(let d=0;d<c.length;d++)u.writeSFixed64(c[d])}function layersPBFReader(c,u,d){if(3===c){const c={keys:[],values:[],features:[]},p=d.readVarint()+d.pos;d.readFields(layerPBFReader,c,p),c.length=c.features.length,c.length&&(u[c.name]=c)}}function layerPBFReader(c,u,d){if(15===c)u.version=d.readVarint();else if(1===c)u.name=d.readString();else if(5===c)u.extent=d.readVarint();else if(2===c)u.features.push(d.pos);else if(3===c)u.keys.push(d.readString());else if(4===c){let p=null;const g=d.readVarint()+d.pos;for(;d.pos<g;)p=1===(c=d.readVarint()>>3)?d.readString():2===c?d.readFloat():3===c?d.readDouble():4===c?d.readVarint64():5===c?d.readVarint():6===c?d.readSVarint():7===c?d.readBoolean():null;u.values.push(p)}}function featurePBFReader(c,u,d){if(1==c)u.id=d.readVarint();else if(2==c){const c=d.readVarint()+d.pos;for(;d.pos<c;){const c=u.layer.keys[d.readVarint()],p=u.layer.values[d.readVarint()];u.properties[c]=p}}else 3==c?u.type=d.readVarint():4==c&&(u.geometry=d.pos)}function readRawFeature(c,u,d){c.pos=u.features[d];const p=c.readVarint()+c.pos,g={layer:u,type:0,properties:{}};return c.readFields(featurePBFReader,g,p),g}var dc=class MVT extends Fa{constructor(c){super(),c=c||{},this.dataProjection=new ji({code:"",units:"tile-pixels"}),this.featureClass=c.featureClass?c.featureClass:RenderFeature,this.geometryName_=c.geometryName,this.layerName_=c.layerName?c.layerName:"layer",this.layers_=c.layers?c.layers:null,this.idProperty_=c.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(c,u,d,p){c.pos=u.geometry;const g=c.readVarint()+c.pos;let f=1,_=0,y=0,x=0,v=0,C=0;for(;c.pos<g;){if(!_){const u=c.readVarint();f=7&u,_=u>>3}if(_--,1===f||2===f)y+=c.readSVarint(),x+=c.readSVarint(),1===f&&v>C&&(p.push(v),C=v),d.push(y,x),v+=2;else{if(7!==f)throw new Error("Invalid command found in the PBF");v>C&&(d.push(d[C],d[C+1]),v+=2)}}v>C&&(p.push(v),C=v)}createFeature_(c,u,d){const p=u.type;if(0===p)return null;let g;const f=u.properties;let _;this.idProperty_?(_=f[this.idProperty_],delete f[this.idProperty_]):_=u.id,f[this.layerName_]=u.layer.name;const y=[],x=[];this.readRawGeometry_(c,u,y,x);const v=function getGeometryType(c,u){let d;1===c?d=1===u?"Point":"MultiPoint":2===c?d=1===u?"LineString":"MultiLineString":3===c&&(d="Polygon");return d}(p,x.length);if(this.featureClass===RenderFeature)g=new this.featureClass(v,y,x,2,f,_),g.transform(d.dataProjection);else{let c;if("Polygon"==v){const u=inflateEnds(y,x);c=u.length>1?new Zs(y,"XY",u):new lr(y,"XY",x)}else c="Point"===v?new ar(y,"XY"):"LineString"===v?new tn(y,"XY"):"MultiPoint"===v?new Ys(y,"XY"):"MultiLineString"===v?new qs(y,"XY",x):null;g=new(0,this.featureClass),this.geometryName_&&g.setGeometryName(this.geometryName_);const u=transformGeometryWithOptions(c,!1,d);g.setGeometry(u),void 0!==_&&g.setId(_),g.setProperties(f,!0)}return g}getType(){return"arraybuffer"}readFeatures(c,u){const d=this.layers_,p=get$2((u=this.adaptOptions(u)).dataProjection);p.setWorldExtent(u.extent),u.dataProjection=p;const g=new Pbf(c),f=g.readFields(layersPBFReader,{}),_=[];for(const c in f){if(d&&!d.includes(c))continue;const y=f[c],x=y?[0,0,y.extent,y.extent]:null;p.setExtent(x);for(let c=0,d=y.length;c<d;++c){const d=readRawFeature(g,y,c),p=this.createFeature_(g,d,u);null!==p&&_.push(p)}}return _}readProjection(c){return this.dataProjection}setLayers(c){this.layers_=c}};class XML{read(c){if(!c)return null;if("string"==typeof c){const u=parse$1(c);return this.readFromDocument(u)}return isDocument(c)?this.readFromDocument(c):this.readFromNode(c)}readFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readFromNode(u);return null}readFromNode(c){abstract()}}const pc="http://www.w3.org/1999/xlink";function readHref(c){return c.getAttributeNS(pc,"href")}const gc=[null,"http://www.opengis.net/ows/1.1"],mc=makeStructureNS(gc,{ServiceIdentification:makeObjectPropertySetter((function readServiceIdentification(c,u){return pushParseAndPop({},Mc,c,u)})),ServiceProvider:makeObjectPropertySetter((function readServiceProvider(c,u){return pushParseAndPop({},Tc,c,u)})),OperationsMetadata:makeObjectPropertySetter((function readOperationsMetadata(c,u){return pushParseAndPop({},Cc,c,u)}))});const fc=makeStructureNS(gc,{DeliveryPoint:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),AdministrativeArea:makeObjectPropertySetter(readString),PostalCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString),ElectronicMailAddress:makeObjectPropertySetter(readString)}),_c=makeStructureNS(gc,{Value:makeObjectPropertyPusher((function readValue(c,u){return readString(c)}))}),yc=makeStructureNS(gc,{AllowedValues:makeObjectPropertySetter((function readAllowedValues(c,u){return pushParseAndPop({},_c,c,u)}))}),xc=makeStructureNS(gc,{Phone:makeObjectPropertySetter((function readPhone(c,u){return pushParseAndPop({},Ec,c,u)})),Address:makeObjectPropertySetter((function readAddress(c,u){return pushParseAndPop({},fc,c,u)}))}),vc=makeStructureNS(gc,{HTTP:makeObjectPropertySetter((function readHttp(c,u){return pushParseAndPop({},Sc,c,u)}))}),Sc=makeStructureNS(gc,{Get:makeObjectPropertyPusher((function readGet(c,u){const d=readHref(c);if(!d)return;return pushParseAndPop({href:d},Pc,c,u)})),Post:void 0}),wc=makeStructureNS(gc,{DCP:makeObjectPropertySetter((function readDcp(c,u){return pushParseAndPop({},vc,c,u)}))}),Cc=makeStructureNS(gc,{Operation:function readOperation(c,u){const d=c.getAttribute("name"),p=pushParseAndPop({},wc,c,u);if(!p)return;u[u.length-1][d]=p}}),Ec=makeStructureNS(gc,{Voice:makeObjectPropertySetter(readString),Facsimile:makeObjectPropertySetter(readString)}),Pc=makeStructureNS(gc,{Constraint:makeObjectPropertyPusher((function readConstraint(c,u){const d=c.getAttribute("name");if(!d)return;return pushParseAndPop({name:d},yc,c,u)}))}),bc=makeStructureNS(gc,{IndividualName:makeObjectPropertySetter(readString),PositionName:makeObjectPropertySetter(readString),ContactInfo:makeObjectPropertySetter((function readContactInfo(c,u){return pushParseAndPop({},xc,c,u)}))}),Mc=makeStructureNS(gc,{Abstract:makeObjectPropertySetter(readString),AccessConstraints:makeObjectPropertySetter(readString),Fees:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),ServiceTypeVersion:makeObjectPropertySetter(readString),ServiceType:makeObjectPropertySetter(readString)}),Tc=makeStructureNS(gc,{ProviderName:makeObjectPropertySetter(readString),ProviderSite:makeObjectPropertySetter(readHref),ServiceContact:makeObjectPropertySetter((function readServiceContact(c,u){return pushParseAndPop({},bc,c,u)}))});var Rc=class OWS extends XML{constructor(){super()}readFromNode(c){const u=pushParseAndPop({},mc,c,[]);return u||null}};function flipXY(c,u,d,p,g,f){void 0!==g?f=void 0!==f?f:0:(g=[],f=0);let _=u;for(;_<d;){const u=c[_++];g[f++]=c[_++],g[f++]=u;for(let u=2;u<p;++u)g[f++]=c[_++]}return g.length=f,g}function encodeUnsignedInteger(c){let u,d="";for(;c>=32;)u=63+(32|31&c),d+=String.fromCharCode(u),c>>=5;return u=c+63,d+=String.fromCharCode(u),d}var Lc=class Polyline extends TextFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.factor_=c.factor?c.factor:1e5,this.geometryLayout_=c.geometryLayout?c.geometryLayout:"XY"}readFeatureFromText(c,u){const d=this.readGeometryFromText(c,u);return new ki(d)}readFeaturesFromText(c,u){return[this.readFeatureFromText(c,u)]}readGeometryFromText(c,u){const d=getStrideForLayout(this.geometryLayout_),p=function decodeDeltas(c,u,d){let p;d=d||1e5;const g=new Array(u);for(p=0;p<u;++p)g[p]=0;const f=function decodeFloats(c,u){u=u||1e5;const d=function decodeSignedIntegers(c){const u=function decodeUnsignedIntegers(c){const u=[];let d=0,p=0;for(let g=0,f=c.length;g<f;++g){const f=c.charCodeAt(g)-63;d|=(31&f)<<p,f<32?(u.push(d),d=0,p=0):p+=5}return u}(c);for(let c=0,d=u.length;c<d;++c){const d=u[c];u[c]=1&d?~(d>>1):d>>1}return u}(c);for(let c=0,p=d.length;c<p;++c)d[c]/=u;return d}(c,d);for(let c=0,d=f.length;c<d;)for(p=0;p<u;++p,++c)g[p]+=f[c],f[c]=g[p];return f}(c,d,this.factor_);flipXY(p,0,p.length,d,p);const g=inflateCoordinates(p,0,p.length,d);return transformGeometryWithOptions(new tn(g,this.geometryLayout_),!1,this.adaptOptions(u))}writeFeatureText(c,u){const d=c.getGeometry();if(d)return this.writeGeometryText(d,u);throw new Error("Expected `feature` to have a geometry")}writeFeaturesText(c,u){return this.writeFeatureText(c[0],u)}writeGeometryText(c,u){const d=(c=transformGeometryWithOptions(c,!0,this.adaptOptions(u))).getFlatCoordinates(),p=c.getStride();return flipXY(d,0,d.length,p,d),function encodeDeltas(c,u,d){let p;d=d||1e5;const g=new Array(u);for(p=0;p<u;++p)g[p]=0;for(let d=0,f=c.length;d<f;)for(p=0;p<u;++p,++d){const u=c[d],f=u-g[p];g[p]=u,c[d]=f}return function encodeFloats(c,u){u=u||1e5;for(let d=0,p=c.length;d<p;++d)c[d]=Math.round(c[d]*u);return function encodeSignedIntegers(c){for(let u=0,d=c.length;u<d;++u){const d=c[u];c[u]=d<0?~(d<<1):d<<1}return function encodeUnsignedIntegers(c){let u="";for(let d=0,p=c.length;d<p;++d)u+=encodeUnsignedInteger(c[d]);return u}(c)}(c)}(c,d)}(d,p,this.factor_)}};const Ac={Point:function readPointGeometry(c,u,d){const p=c.coordinates;u&&d&&transformVertex(p,u,d);return new ar(p)},LineString:function readLineStringGeometry(c,u){const d=concatenateArcs(c.arcs,u);return new tn(d)},Polygon:function readPolygonGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p)d[p]=concatenateArcs(c.arcs[p],u);return new lr(d)},MultiPoint:function readMultiPointGeometry(c,u,d){const p=c.coordinates;if(u&&d)for(let c=0,g=p.length;c<g;++c)transformVertex(p[c],u,d);return new Ys(p)},MultiLineString:function readMultiLineStringGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p)d[p]=concatenateArcs(c.arcs[p],u);return new qs(d)},MultiPolygon:function readMultiPolygonGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p){const g=c.arcs[p],f=[];for(let c=0,d=g.length;c<d;++c)f[c]=concatenateArcs(g[c],u);d[p]=f}return new Zs(d)}};function concatenateArcs(c,u){const d=[];let p;for(let g=0,f=c.length;g<f;++g)if(p=c[g],g>0&&d.pop(),p>=0){const c=u[p];for(let u=0,p=c.length;u<p;++u)d.push(c[u].slice(0))}else{const c=u[~p];for(let u=c.length-1;u>=0;--u)d.push(c[u].slice(0))}return d}function readFeaturesFromGeometryCollection(c,u,d,p,g,f,_){const y=c.geometries,x=[];for(let c=0,v=y.length;c<v;++c)x[c]=readFeatureFromGeometry(y[c],u,d,p,g,f,_);return x}function readFeatureFromGeometry(c,u,d,p,g,f,_){let y=null;const x=c.type;if(x){const g=Ac[x];y="Point"===x||"MultiPoint"===x?g(c,d,p):g(c,u),y=transformGeometryWithOptions(y,!1,_)}const v=new ki({geometry:y});void 0!==c.id&&v.setId(c.id);let C=c.properties;return g&&(C||(C={}),C[g]=f),C&&v.setProperties(C,!0),v}function transformArc(c,u,d){let p=0,g=0;for(let f=0,_=c.length;f<_;++f){const _=c[f];p+=_[0],g+=_[1],_[0]=p,_[1]=g,transformVertex(_,u,d)}}function transformVertex(c,u,d){c[0]=c[0]*u[0]+d[0],c[1]=c[1]*u[1]+d[1]}var Ic=class TopoJSON extends JSONFeature{constructor(c){super(),c=c||{},this.layerName_=c.layerName,this.layers_=c.layers?c.layers:null,this.dataProjection=get$2(c.dataProjection?c.dataProjection:"EPSG:4326")}readFeaturesFromObject(c,u){if("Topology"==c.type){const d=c;let p,g=null,f=null;d.transform&&(p=d.transform,g=p.scale,f=p.translate);const _=d.arcs;p&&function transformArcs(c,u,d){for(let p=0,g=c.length;p<g;++p)transformArc(c[p],u,d)}(_,g,f);const y=[],x=d.objects,v=this.layerName_;let C;for(const c in x)this.layers_&&!this.layers_.includes(c)||("GeometryCollection"===x[c].type?(C=x[c],y.push.apply(y,readFeaturesFromGeometryCollection(C,_,g,f,v,c,u))):(C=x[c],y.push(readFeatureFromGeometry(C,_,g,f,v,c,u))));return y}return[]}readProjectionFromObject(c){return this.dataProjection}};class GML32 extends GML3{constructor(c){super(c=c||{}),this.schemaLocation=c.schemaLocation?c.schemaLocation:this.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd"}writeGeometryElement(c,u,d){const p=d[d.length-1];d[d.length-1]=Object.assign({multiCurve:!0,multiSurface:!0},p),super.writeGeometryElement(c,u,d)}}GML32.prototype.namespace="http://www.opengis.net/gml/3.2",GML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:makeReplacer(GML3.prototype.readFlatPos),posList:makeReplacer(GML3.prototype.readFlatPosList),coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML32.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:GML3.prototype.interiorParser,exterior:GML3.prototype.exteriorParser}},GML32.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Surface:makeReplacer(GML32.prototype.readSurface),MultiSurface:makeReplacer(GML3.prototype.readMultiSurface),Curve:makeReplacer(GML32.prototype.readCurve),MultiCurve:makeReplacer(GML3.prototype.readMultiCurve),Envelope:makeReplacer(GML32.prototype.readEnvelope)}},GML32.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:makeArrayPusher(GML3.prototype.curveMemberParser),curveMembers:makeArrayPusher(GML3.prototype.curveMemberParser)}},GML32.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:makeArrayPusher(GML3.prototype.surfaceMemberParser),surfaceMembers:makeArrayPusher(GML3.prototype.surfaceMemberParser)}},GML32.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:makeArrayPusher(GMLBase.prototype.readLineString),Curve:makeArrayPusher(GML3.prototype.readCurve)}},GML32.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon),Surface:makeArrayPusher(GML3.prototype.readSurface)}},GML32.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:makeReplacer(GML3.prototype.readPatch)}},GML32.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:makeReplacer(GML3.prototype.readSegment)}},GML32.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:makeArrayPusher(GML3.prototype.readFlatPosList),upperCorner:makeArrayPusher(GML3.prototype.readFlatPosList)}},GML32.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:makeReplacer(GML3.prototype.readPolygonPatch)}},GML32.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:makeArrayExtender(GML3.prototype.readLineStringSegment)}},GML32.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:makeArrayPusher(GMLBase.prototype.pointMemberParser),pointMembers:makeArrayPusher(GMLBase.prototype.pointMemberParser)}},GML32.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:makeArrayPusher(GMLBase.prototype.lineStringMemberParser),lineStringMembers:makeArrayPusher(GMLBase.prototype.lineStringMemberParser)}},GML32.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:makeArrayPusher(GMLBase.prototype.polygonMemberParser),polygonMembers:makeArrayPusher(GMLBase.prototype.polygonMemberParser)}},GML32.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode)}},GML32.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:makeArrayPusher(GMLBase.prototype.readLineString)}},GML32.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon)}},GML32.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing),Ring:makeReplacer(GML32.prototype.readFlatCurveRing)}},GML32.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:makeChildAppender(GML3.prototype.writeRing),interior:makeChildAppender(GML3.prototype.writeRing)}},GML32.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}},GML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember)}},GML32.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:makeChildAppender(GML3.prototype.writePointMember)}},GML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember)}},GML32.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML32.prototype.writePoint),MultiPoint:makeChildAppender(GML3.prototype.writeMultiPoint),LineString:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML3.prototype.writeLinearRing),Polygon:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML3.prototype.writeEnvelope)}};class Filter{constructor(c){this.tagName_=c}getTagName(){return this.tagName_}}class LogicalNary extends Filter{constructor(c,u){super(c),this.conditions=u,assert(this.conditions.length>=2,"At least 2 conditions are required")}}class And extends LogicalNary{constructor(c){super("And",Array.prototype.slice.call(arguments))}}class Bbox extends Filter{constructor(c,u,d){if(super("BBOX"),this.geometryName=c,this.extent=u,4!==u.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=d}}const Fc={"http://www.opengis.net/gml":{boundedBy:makeObjectPropertySetter(GMLBase.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:makeArrayPusher(GMLBase.prototype.readFeaturesInternal)}},kc={"http://www.opengis.net/wfs":{totalInserted:makeObjectPropertySetter(readPositiveInteger),totalUpdated:makeObjectPropertySetter(readPositiveInteger),totalDeleted:makeObjectPropertySetter(readPositiveInteger)},"http://www.opengis.net/wfs/2.0":{totalInserted:makeObjectPropertySetter(readPositiveInteger),totalUpdated:makeObjectPropertySetter(readPositiveInteger),totalDeleted:makeObjectPropertySetter(readPositiveInteger)}},Oc={"http://www.opengis.net/wfs":{TransactionSummary:makeObjectPropertySetter(readTransactionSummary,"transactionSummary"),InsertResults:makeObjectPropertySetter(readInsertResults,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:makeObjectPropertySetter(readTransactionSummary,"transactionSummary"),InsertResults:makeObjectPropertySetter(readInsertResults,"insertIds")}},Nc={"http://www.opengis.net/wfs":{PropertyName:makeChildAppender(writeStringTextNode)},"http://www.opengis.net/wfs/2.0":{PropertyName:makeChildAppender(writeStringTextNode)}},Dc={"http://www.opengis.net/wfs":{Insert:makeChildAppender(writeFeature),Update:makeChildAppender(writeUpdate),Delete:makeChildAppender(writeDelete),Property:makeChildAppender(writeProperty),Native:makeChildAppender(writeNative)},"http://www.opengis.net/wfs/2.0":{Insert:makeChildAppender(writeFeature),Update:makeChildAppender(writeUpdate),Delete:makeChildAppender(writeDelete),Property:makeChildAppender(writeProperty),Native:makeChildAppender(writeNative)}},Gc="feature",jc="http://www.w3.org/2000/xmlns/",zc={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},Bc={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},Uc={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},$c={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},Wc={"2.0.0":GML32,"1.1.0":GML3,"1.0.0":GML2};function serializeTransactionRequest(c,u,d,p){pushSerializeAndPop(p,Dc,makeSimpleNodeFactory(c),u,d)}function readTransactionSummary(c,u){return pushParseAndPop({},kc,c,u)}const Xc={"http://www.opengis.net/ogc":{FeatureId:makeArrayPusher((function(c,u){return c.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:makeArrayPusher((function(c,u){return c.getAttribute("fid")}))}};function fidParser(c,u){parseNode(Xc,c,u)}const Vc={"http://www.opengis.net/wfs":{Feature:fidParser},"http://www.opengis.net/wfs/2.0":{Feature:fidParser}};function readInsertResults(c,u){return pushParseAndPop([],Vc,c,u)}function writeFeature(c,u,d){const p=d[d.length-1],g=p.featureType,f=p.featureNS,_=p.gmlVersion,y=createElementNS(f,g);c.appendChild(y),2===_?GML2.prototype.writeFeatureElement(y,u,d):3===_?GML3.prototype.writeFeatureElement(y,u,d):GML32.prototype.writeFeatureElement(y,u,d)}function writeOgcFidFilter(c,u,d){const p=d[d.length-1].version,g=zc[p],f=createElementNS(g,"Filter"),_=createElementNS(g,"FeatureId");f.appendChild(_),_.setAttribute("fid",u),c.appendChild(f)}function getTypeName(c,u){const d=(c=c||Gc)+":";return u.startsWith(d)?u:d+u}function writeDelete(c,u,d){const p=d[d.length-1];assert(void 0!==u.getId(),"Features must have an id set");const g=p.featureType,f=p.featurePrefix,_=p.featureNS,y=getTypeName(f,g);c.setAttribute("typeName",y),c.setAttributeNS(jc,"xmlns:"+f,_);const x=u.getId();void 0!==x&&writeOgcFidFilter(c,x,d)}function writeUpdate(c,u,d){const p=d[d.length-1];assert(void 0!==u.getId(),"Features must have an id set");const g=p.version,f=p.featureType,_=p.featurePrefix,y=p.featureNS,x=getTypeName(_,f),v=u.getGeometryName();c.setAttribute("typeName",x),c.setAttributeNS(jc,"xmlns:"+_,y);const C=u.getId();if(void 0!==C){const f=u.getKeys(),_=[];for(let c=0,d=f.length;c<d;c++){const d=u.get(f[c]);if(void 0!==d){let u=f[c];d&&"function"==typeof d.getSimplifiedGeometry&&(u=v),_.push({name:u,value:d})}}pushSerializeAndPop({version:g,gmlVersion:p.gmlVersion,node:c,hasZ:p.hasZ,srsName:p.srsName},Dc,makeSimpleNodeFactory("Property"),_,d),writeOgcFidFilter(c,C,d)}}function writeProperty(c,u,d){const p=d[d.length-1],g=p.version,f=Bc[g],_=createElementNS(f,"2.0.0"===g?"ValueReference":"Name"),y=p.gmlVersion;if(c.appendChild(_),writeStringTextNode(_,u.name),void 0!==u.value&&null!==u.value){const p=createElementNS(f,"Value");c.appendChild(p),u.value&&"function"==typeof u.value.getSimplifiedGeometry?2===y?GML2.prototype.writeGeometryElement(p,u.value,d):3===y?GML3.prototype.writeGeometryElement(p,u.value,d):GML32.prototype.writeGeometryElement(p,u.value,d):writeStringTextNode(p,u.value)}}function writeNative(c,u,d){u.vendorId&&c.setAttribute("vendorId",u.vendorId),void 0!==u.safeToIgnore&&c.setAttribute("safeToIgnore",String(u.safeToIgnore)),void 0!==u.value&&writeStringTextNode(c,u.value)}const qc={"http://www.opengis.net/wfs":{Query:makeChildAppender(writeQuery)},"http://www.opengis.net/wfs/2.0":{Query:makeChildAppender(writeQuery)},"http://www.opengis.net/ogc":{During:makeChildAppender(writeDuringFilter),And:makeChildAppender(writeLogicalFilter),Or:makeChildAppender(writeLogicalFilter),Not:makeChildAppender(writeNotFilter),BBOX:makeChildAppender(writeBboxFilter),Contains:makeChildAppender(writeSpatialFilter),Intersects:makeChildAppender(writeSpatialFilter),Within:makeChildAppender(writeSpatialFilter),DWithin:makeChildAppender(writeDWithinFilter),PropertyIsEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNotEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsLessThan:makeChildAppender(writeComparisonFilter),PropertyIsLessThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThan:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNull:makeChildAppender(writeIsNullFilter),PropertyIsBetween:makeChildAppender(writeIsBetweenFilter),PropertyIsLike:makeChildAppender(writeIsLikeFilter)},"http://www.opengis.net/fes/2.0":{During:makeChildAppender(writeDuringFilter),And:makeChildAppender(writeLogicalFilter),Or:makeChildAppender(writeLogicalFilter),Not:makeChildAppender(writeNotFilter),BBOX:makeChildAppender(writeBboxFilter),Contains:makeChildAppender(writeSpatialFilter),Disjoint:makeChildAppender(writeSpatialFilter),Intersects:makeChildAppender(writeSpatialFilter),ResourceId:makeChildAppender((function writeResourceIdFilter(c,u,d){c.setAttribute("rid",u.rid)})),Within:makeChildAppender(writeSpatialFilter),DWithin:makeChildAppender(writeDWithinFilter),PropertyIsEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNotEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsLessThan:makeChildAppender(writeComparisonFilter),PropertyIsLessThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThan:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNull:makeChildAppender(writeIsNullFilter),PropertyIsBetween:makeChildAppender(writeIsBetweenFilter),PropertyIsLike:makeChildAppender(writeIsLikeFilter)}};function writeQuery(c,u,d){const p=d[d.length-1],g=p.version,f=p.featurePrefix,_=p.featureNS,y=p.propertyNames,x=p.srsName;let v,C;v=f?getTypeName(f,u):u,C="2.0.0"===g?"typeNames":"typeName",c.setAttribute(C,v),x&&c.setAttribute("srsName",x),_&&c.setAttributeNS(jc,"xmlns:"+f,_);const M=Object.assign({},p);M.node=c,pushSerializeAndPop(M,Nc,makeSimpleNodeFactory("PropertyName"),y,d);const T=p.filter;if(T){const u=createElementNS(getFilterNS(g),"Filter");c.appendChild(u),function writeFilterCondition(c,u,d){const p=d[d.length-1],g={node:c};Object.assign(g,{context:p}),pushSerializeAndPop(g,qc,makeSimpleNodeFactory(u.getTagName()),[u],d)}(u,T,d)}}function writeBboxFilter(c,u,d){const p=d[d.length-1],g=p.context.version;p.srsName=u.srsName;const f=Wc[g];writePropertyName(g,c,u.geometryName),f.prototype.writeGeometryElement(c,u.extent,d)}function writeSpatialFilter(c,u,d){const p=d[d.length-1],g=p.context.version;p.srsName=u.srsName;const f=Wc[g];writePropertyName(g,c,u.geometryName),f.prototype.writeGeometryElement(c,u.geometry,d)}function writeDWithinFilter(c,u,d){const p=d[d.length-1].context.version;writeSpatialFilter(c,u,d);const g=createElementNS(getFilterNS(p),"Distance");writeStringTextNode(g,u.distance.toString()),"2.0.0"===p?g.setAttribute("uom",u.unit):g.setAttribute("units",u.unit),c.appendChild(g)}function writeDuringFilter(c,u,d){const p=d[d.length-1].context.version;writeExpression(Uc[p],"ValueReference",c,u.propertyName);const g=createElementNS($a,"TimePeriod");c.appendChild(g);const f=createElementNS($a,"begin");g.appendChild(f),writeTimeInstant(f,u.begin);const _=createElementNS($a,"end");g.appendChild(_),writeTimeInstant(_,u.end)}function writeLogicalFilter(c,u,d){const p=d[d.length-1].context,g={node:c};Object.assign(g,{context:p});const f=u.conditions;for(let c=0,u=f.length;c<u;++c){const u=f[c];pushSerializeAndPop(g,qc,makeSimpleNodeFactory(u.getTagName()),[u],d)}}function writeNotFilter(c,u,d){const p=d[d.length-1].context,g={node:c};Object.assign(g,{context:p});const f=u.condition;pushSerializeAndPop(g,qc,makeSimpleNodeFactory(f.getTagName()),[f],d)}function writeComparisonFilter(c,u,d){const p=d[d.length-1].context.version;void 0!==u.matchCase&&c.setAttribute("matchCase",u.matchCase.toString()),writePropertyName(p,c,u.propertyName),writeLiteral(p,c,""+u.expression)}function writeIsNullFilter(c,u,d){writePropertyName(d[d.length-1].context.version,c,u.propertyName)}function writeIsBetweenFilter(c,u,d){const p=d[d.length-1].context.version,g=getFilterNS(p);writePropertyName(p,c,u.propertyName);const f=createElementNS(g,"LowerBoundary");c.appendChild(f),writeLiteral(p,f,""+u.lowerBoundary);const _=createElementNS(g,"UpperBoundary");c.appendChild(_),writeLiteral(p,_,""+u.upperBoundary)}function writeIsLikeFilter(c,u,d){const p=d[d.length-1].context.version;c.setAttribute("wildCard",u.wildCard),c.setAttribute("singleChar",u.singleChar),c.setAttribute("escapeChar",u.escapeChar),void 0!==u.matchCase&&c.setAttribute("matchCase",u.matchCase.toString()),writePropertyName(p,c,u.propertyName),writeLiteral(p,c,""+u.pattern)}function writeExpression(c,u,d,p){const g=createElementNS(c,u);writeStringTextNode(g,p),d.appendChild(g)}function writeLiteral(c,u,d){writeExpression(getFilterNS(c),"Literal",u,d)}function writePropertyName(c,u,d){"2.0.0"===c?writeExpression(Uc[c],"ValueReference",u,d):writeExpression(zc[c],"PropertyName",u,d)}function writeTimeInstant(c,u){const d=createElementNS($a,"TimeInstant");c.appendChild(d);const p=createElementNS($a,"timePosition");d.appendChild(p),writeStringTextNode(p,u)}function writeGetFeature(c,u,d){const p=d[d.length-1],g=Object.assign({},p);g.node=c,pushSerializeAndPop(g,qc,makeSimpleNodeFactory("Query"),u,d)}function getFilterNS(c){let u;return u="2.0.0"===c?Uc[c]:zc[c],u}var Yc=class WFS extends XMLFeature{constructor(c){super(),c=c||{},this.version_=c.version?c.version:"1.1.0",this.featureType_=c.featureType,this.featureNS_=c.featureNS,this.gmlFormat_=c.gmlFormat?c.gmlFormat:new Wc[this.version_],this.schemaLocation_=c.schemaLocation?c.schemaLocation:$c[this.version_]}getFeatureType(){return this.featureType_}setFeatureType(c){this.featureType_=c}readFeaturesFromNode(c,u){const d={node:c};Object.assign(d,{featureType:this.featureType_,featureNS:this.featureNS_}),Object.assign(d,this.getReadOptions(c,u||{}));const p=[d];let g;g="2.0.0"===this.version_?Fc:this.gmlFormat_.FEATURE_COLLECTION_PARSERS;let f=pushParseAndPop([],g,c,p,this.gmlFormat_);return f||(f=[]),f}readTransactionResponse(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readTransactionResponseFromDocument(u)}return isDocument(c)?this.readTransactionResponseFromDocument(c):this.readTransactionResponseFromNode(c)}}readFeatureCollectionMetadata(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readFeatureCollectionMetadataFromDocument(u)}return isDocument(c)?this.readFeatureCollectionMetadataFromDocument(c):this.readFeatureCollectionMetadataFromNode(c)}}readFeatureCollectionMetadataFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(u)}readFeatureCollectionMetadataFromNode(c){const u={},d=readNonNegativeIntegerString(c.getAttribute("numberOfFeatures"));return u.numberOfFeatures=d,pushParseAndPop(u,Fc,c,[],this.gmlFormat_)}readTransactionResponseFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(u)}readTransactionResponseFromNode(c){return pushParseAndPop({},Oc,c,[])}writeGetFeature(c){const u=createElementNS(Bc[this.version_],"GetFeature");u.setAttribute("service","WFS"),u.setAttribute("version",this.version_),c.handle&&u.setAttribute("handle",c.handle),c.outputFormat&&u.setAttribute("outputFormat",c.outputFormat),void 0!==c.maxFeatures&&u.setAttribute("maxFeatures",String(c.maxFeatures)),c.resultType&&u.setAttribute("resultType",c.resultType),void 0!==c.startIndex&&u.setAttribute("startIndex",String(c.startIndex)),void 0!==c.count&&u.setAttribute("count",String(c.count)),void 0!==c.viewParams&&u.setAttribute("viewParams",c.viewParams),u.setAttributeNS(ja,"xsi:schemaLocation",this.schemaLocation_);const d={node:u};if(Object.assign(d,{version:this.version_,srsName:c.srsName,featureNS:c.featureNS?c.featureNS:this.featureNS_,featurePrefix:c.featurePrefix,propertyNames:c.propertyNames?c.propertyNames:[]}),assert(Array.isArray(c.featureTypes),"`options.featureTypes` must be an Array"),"string"==typeof c.featureTypes[0]){let p=c.filter;c.bbox&&(assert(c.geometryName,"`options.geometryName` must also be provided when `options.bbox` is set"),p=this.combineBboxAndFilter(c.geometryName,c.bbox,c.srsName,p)),Object.assign(d,{geometryName:c.geometryName,filter:p}),writeGetFeature(u,c.featureTypes,[d])}else c.featureTypes.forEach((p=>{const g=this.combineBboxAndFilter(p.geometryName,p.bbox,c.srsName,c.filter);Object.assign(d,{geometryName:p.geometryName,filter:g}),writeGetFeature(u,[p.name],[d])}));return u}combineBboxAndFilter(c,u,d,p){const g=function bbox(c,u,d){return new Bbox(c,u,d)}(c,u,d);return p?function and(c){const u=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(And,u))}(p,g):g}writeTransaction(c,u,d,p){const g=[],f=p.version?p.version:this.version_,_=createElementNS(Bc[f],"Transaction");let y;_.setAttribute("service","WFS"),_.setAttribute("version",f),p&&(y=p.gmlOptions?p.gmlOptions:{},p.handle&&_.setAttribute("handle",p.handle)),_.setAttributeNS(ja,"xsi:schemaLocation",$c[f]);const x=function createTransactionRequest(c,u,d,p){const g=p.featurePrefix?p.featurePrefix:Gc;let f;"1.0.0"===d?f=2:"1.1.0"===d?f=3:"2.0.0"===d&&(f=3.2);const _=Object.assign({node:c},{version:d,featureNS:p.featureNS,featureType:p.featureType,featurePrefix:g,gmlVersion:f,hasZ:p.hasZ,srsName:p.srsName},u);return _}(_,y,f,p);return c&&serializeTransactionRequest("Insert",c,g,x),u&&serializeTransactionRequest("Update",u,g,x),d&&serializeTransactionRequest("Delete",d,g,x),p.nativeElements&&serializeTransactionRequest("Native",p.nativeElements,g,x),_}readProjectionFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(u);return null}readProjectionFromNode(c){if(c.firstElementChild&&c.firstElementChild.firstElementChild)for(let u=(c=c.firstElementChild.firstElementChild).firstElementChild;u;u=u.nextElementSibling)if(0!==u.childNodes.length&&(1!==u.childNodes.length||3!==u.firstChild.nodeType)){const c=[{}];return this.gmlFormat_.readGeometryElement(u,c),get$2(c.pop().srsName)}return null}};const Zc=1,Kc=2,Hc=3,Jc=4,Qc=5,tu=6,eu=7,iu=15,ru=16,nu=17;class WkbReader{constructor(c){this.view_=c,this.pos_=0,this.initialized_=!1,this.isLittleEndian_=!1,this.hasZ_=!1,this.hasM_=!1,this.srid_=null,this.layout_="XY"}readUint8(){return this.view_.getUint8(this.pos_++)}readUint32(c){return this.view_.getUint32((this.pos_+=4)-4,void 0!==c?c:this.isLittleEndian_)}readDouble(c){return this.view_.getFloat64((this.pos_+=8)-8,void 0!==c?c:this.isLittleEndian_)}readPoint(){const c=[];return c.push(this.readDouble()),c.push(this.readDouble()),this.hasZ_&&c.push(this.readDouble()),this.hasM_&&c.push(this.readDouble()),c}readLineString(){const c=this.readUint32(),u=[];for(let d=0;d<c;d++)u.push(this.readPoint());return u}readPolygon(){const c=this.readUint32(),u=[];for(let d=0;d<c;d++)u.push(this.readLineString());return u}readWkbHeader(c){const u=this.readUint8()>0,d=this.readUint32(u),p=Math.floor((268435455&d)/1e3),g=Boolean(2147483648&d)||1===p||3===p,f=Boolean(1073741824&d)||2===p||3===p,_=Boolean(536870912&d),y=(268435455&d)%1e3,x=["XY",g?"Z":"",f?"M":""].join(""),v=_?this.readUint32(u):null;if(void 0!==c&&c!==y)throw new Error("Unexpected WKB geometry type "+y);if(this.initialized_){if(this.isLittleEndian_!==u)throw new Error("Inconsistent endian");if(this.layout_!==x)throw new Error("Inconsistent geometry layout");if(v&&this.srid_!==v)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=u,this.hasZ_=g,this.hasM_=f,this.layout_=x,this.srid_=v,this.initialized_=!0;return y}readWkbPayload(c){switch(c){case Zc:return this.readPoint();case Kc:return this.readLineString();case Hc:case nu:return this.readPolygon();case Jc:return this.readMultiPoint();case Qc:return this.readMultiLineString();case tu:case iu:case ru:return this.readMultiPolygon();case eu:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+c+" is found")}}readWkbBlock(c){return this.readWkbPayload(this.readWkbHeader(c))}readWkbCollection(c,u){const d=this.readUint32(),p=[];for(let g=0;g<d;g++){const d=c.call(this,u);d&&p.push(d)}return p}readMultiPoint(){return this.readWkbCollection(this.readWkbBlock,Zc)}readMultiLineString(){return this.readWkbCollection(this.readWkbBlock,Kc)}readMultiPolygon(){return this.readWkbCollection(this.readWkbBlock,Hc)}readGeometryCollection(){return this.readWkbCollection(this.readGeometry)}readGeometry(){const c=this.readWkbHeader(),u=this.readWkbPayload(c);switch(c){case Zc:return new ar(u,this.layout_);case Kc:return new tn(u,this.layout_);case Hc:case nu:return new lr(u,this.layout_);case Jc:return new Ys(u,this.layout_);case Qc:return new qs(u,this.layout_);case tu:case iu:case ru:return new Zs(u,this.layout_);case eu:return new Vs(u);default:return null}}getSrid(){return this.srid_}}class WkbWriter{constructor(c){c=c||{},this.layout_=c.layout,this.isLittleEndian_=!1!==c.littleEndian,this.isEWKB_=!1!==c.ewkb,this.writeQueue_=[],this.nodata_=Object.assign({X:0,Y:0,Z:0,M:0},c.nodata)}writeUint8(c){this.writeQueue_.push([1,c])}writeUint32(c){this.writeQueue_.push([4,c])}writeDouble(c){this.writeQueue_.push([8,c])}writePoint(c,u){const d=Object.assign.apply(null,u.split("").map(((u,d)=>({[u]:c[d]}))));for(const c of this.layout_)this.writeDouble(c in d?d[c]:this.nodata_[c])}writeLineString(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writePoint(c[d],u)}writePolygon(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeLineString(c[d],u)}writeWkbHeader(c,u){c%=1e3,this.layout_.includes("Z")&&(c+=this.isEWKB_?2147483648:1e3),this.layout_.includes("M")&&(c+=this.isEWKB_?1073741824:2e3),this.isEWKB_&&Number.isInteger(u)&&(c|=536870912),this.writeUint8(this.isLittleEndian_?1:0),this.writeUint32(c),this.isEWKB_&&Number.isInteger(u)&&this.writeUint32(u)}writeMultiPoint(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(1),this.writePoint(c[d],u)}writeMultiLineString(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(2),this.writeLineString(c[d],u)}writeMultiPolygon(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(3),this.writePolygon(c[d],u)}writeGeometryCollection(c){this.writeUint32(c.length);for(let u=0;u<c.length;u++)this.writeGeometry(c[u])}findMinimumLayout(c,u="XYZM"){if(c instanceof sr)return((c,u)=>c===u?c:"XYZM"===c?u:"XYZM"===u?c:"XY")(c.getLayout(),u);if(c instanceof Vs){const d=c.getGeometriesArray();for(let c=0;c<d.length&&"XY"!==u;c++)u=this.findMinimumLayout(d[c],u)}return u}writeGeometry(c,u){const d={Point:Zc,LineString:Kc,Polygon:Hc,MultiPoint:Jc,MultiLineString:Qc,MultiPolygon:tu,GeometryCollection:eu},p=c.getType(),g=d[p];if(!g)throw new Error("GeometryType "+p+" is not supported");if(this.layout_||(this.layout_=this.findMinimumLayout(c)),this.writeWkbHeader(g,u),c instanceof sr){({Point:this.writePoint,LineString:this.writeLineString,Polygon:this.writePolygon,MultiPoint:this.writeMultiPoint,MultiLineString:this.writeMultiLineString,MultiPolygon:this.writeMultiPolygon})[p].call(this,c.getCoordinates(),c.getLayout())}else c instanceof Vs&&this.writeGeometryCollection(c.getGeometriesArray())}getBuffer(){const c=this.writeQueue_.reduce(((c,u)=>c+u[0]),0),u=new ArrayBuffer(c),d=new DataView(u);let p=0;return this.writeQueue_.forEach((c=>{switch(c[0]){case 1:d.setUint8(p,c[1]);break;case 4:d.setUint32(p,c[1],this.isLittleEndian_);break;case 8:d.setFloat64(p,c[1],this.isLittleEndian_)}p+=c[0]})),u}}function getDataView(c){return"string"==typeof c?function decodeHexString(c){const u=new Uint8Array(c.length/2);for(let d=0;d<c.length/2;d++)u[d]=parseInt(c.substr(2*d,2),16);return new DataView(u.buffer)}(c):ArrayBuffer.isView(c)?c instanceof DataView?c:new DataView(c.buffer,c.byteOffset,c.byteLength):c instanceof ArrayBuffer?new DataView(c):null}var su=class WKB extends Fa{constructor(c){super(),c=c||{},this.splitCollection=Boolean(c.splitCollection),this.viewCache_=null,this.hex_=!1!==c.hex,this.littleEndian_=!1!==c.littleEndian,this.ewkb_=!1!==c.ewkb,this.layout_=c.geometryLayout,this.nodataZ_=c.nodataZ||0,this.nodataM_=c.nodataM||0,this.srid_=c.srid}getType(){return this.hex_?"text":"arraybuffer"}readFeature(c,u){return new ki({geometry:this.readGeometry(c,u)})}readFeatures(c,u){let d=[];const p=this.readGeometry(c,u);return d=this.splitCollection&&p instanceof Vs?p.getGeometriesArray():[p],d.map((c=>new ki({geometry:c})))}readGeometry(c,u){const d=getDataView(c);if(!d)return null;const p=new WkbReader(d).readGeometry();return this.viewCache_=d,u=this.getReadOptions(c,u),this.viewCache_=null,transformGeometryWithOptions(p,!1,u)}readProjection(c){const u=this.viewCache_||getDataView(c);if(!u)return;const d=new WkbReader(u);return d.readWkbHeader(),d.getSrid()&&get$2("EPSG:"+d.getSrid())||void 0}writeFeature(c,u){return this.writeGeometry(c.getGeometry(),u)}writeFeatures(c,u){return this.writeGeometry(new Vs(c.map((c=>c.getGeometry()))),u)}writeGeometry(c,u){u=this.adaptOptions(u);const d=new WkbWriter({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}});let p=Number.isInteger(this.srid_)?Number(this.srid_):null;if(!1!==this.srid_&&!Number.isInteger(this.srid_)){const c=u.dataProjection&&get$2(u.dataProjection);if(c){const u=c.getCode();u.startsWith("EPSG:")&&(p=Number(u.substring(5)))}}d.writeGeometry(transformGeometryWithOptions(c,!0,u),p);const g=d.getBuffer();return this.hex_?function encodeHexString(c){const u=new Uint8Array(c);return Array.from(u.values()).map((c=>(c<16?"0":"")+Number(c).toString(16).toUpperCase())).join("")}(g):g}};const ou={POINT:ar,LINESTRING:tn,POLYGON:lr,MULTIPOINT:Ys,MULTILINESTRING:qs,MULTIPOLYGON:Zs},au="EMPTY",lu="Z",hu="M",cu=0,uu=1,du=2,pu=3,gu=4,mu=5,fu=6,_u={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"};class Lexer{constructor(c){this.wkt=c,this.index_=-1}isAlpha_(c){return c>="a"&&c<="z"||c>="A"&&c<="Z"}isNumeric_(c,u){return u=void 0!==u&&u,c>="0"&&c<="9"||"."==c&&!u}isWhiteSpace_(c){return" "==c||"\t"==c||"\r"==c||"\n"==c}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const c=this.nextChar_(),u=this.index_;let d,p=c;if("("==c)d=du;else if(","==c)d=mu;else if(")"==c)d=pu;else if(this.isNumeric_(c)||"-"==c)d=gu,p=this.readNumber_();else if(this.isAlpha_(c))d=uu,p=this.readText_();else{if(this.isWhiteSpace_(c))return this.nextToken();if(""!==c)throw new Error("Unexpected character: "+c);d=fu}return{position:u,value:p,type:d}}readNumber_(){let c;const u=this.index_;let d=!1,p=!1;do{"."==c?d=!0:"e"!=c&&"E"!=c||(p=!0),c=this.nextChar_()}while(this.isNumeric_(c,d)||!p&&("e"==c||"E"==c)||p&&("-"==c||"+"==c));return parseFloat(this.wkt.substring(u,this.index_--))}readText_(){let c;const u=this.index_;do{c=this.nextChar_()}while(this.isAlpha_(c));return this.wkt.substring(u,this.index_--).toUpperCase()}}let yu=class Parser{constructor(c){this.lexer_=c,this.token_={position:0,type:cu},this.layout_="XY"}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(c){return this.token_.type==c}match(c){const u=this.isTokenType(c);return u&&this.consume_(),u}parse(){return this.consume_(),this.parseGeometry_()}parseGeometryLayout_(){let c="XY";const u=this.token_;if(this.isTokenType(uu)){const d=u.value;d===lu?c="XYZ":d===hu?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&this.consume_()}return c}parseGeometryCollectionText_(){if(this.match(du)){const c=[];do{c.push(this.parseGeometry_())}while(this.match(mu));if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(du)){const c=this.parsePoint_();if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(du)){const c=this.parsePointList_();if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(du)){const c=this.parseLineStringTextList_();if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(du)){let c;if(c=this.token_.type==du?this.parsePointTextList_():this.parsePointList_(),this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(du)){const c=this.parseLineStringTextList_();if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(du)){const c=this.parsePolygonTextList_();if(this.match(pu))return c}throw new Error(this.formatErrorMessage_())}parsePoint_(){const c=[],u=this.layout_.length;for(let d=0;d<u;++d){const u=this.token_;if(!this.match(gu))break;c.push(u.value)}if(c.length==u)return c;throw new Error(this.formatErrorMessage_())}parsePointList_(){const c=[this.parsePoint_()];for(;this.match(mu);)c.push(this.parsePoint_());return c}parsePointTextList_(){const c=[this.parsePointText_()];for(;this.match(mu);)c.push(this.parsePointText_());return c}parseLineStringTextList_(){const c=[this.parseLineStringText_()];for(;this.match(mu);)c.push(this.parseLineStringText_());return c}parsePolygonTextList_(){const c=[this.parsePolygonText_()];for(;this.match(mu);)c.push(this.parsePolygonText_());return c}isEmptyGeometry_(){const c=this.isTokenType(uu)&&this.token_.value==au;return c&&this.consume_(),c}formatErrorMessage_(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}parseGeometry_(){const c=this.token_;if(this.match(uu)){const u=c.value;this.layout_=this.parseGeometryLayout_();const d=this.isEmptyGeometry_();if("GEOMETRYCOLLECTION"==u){if(d)return new Vs([]);const c=this.parseGeometryCollectionText_();return new Vs(c)}const p=ou[u];if(!p)throw new Error("Invalid geometry type: "+u);let g;if(d)g="POINT"==u?[NaN,NaN]:[];else switch(u){case"POINT":g=this.parsePointText_();break;case"LINESTRING":g=this.parseLineStringText_();break;case"POLYGON":g=this.parsePolygonText_();break;case"MULTIPOINT":g=this.parseMultiPointText_();break;case"MULTILINESTRING":g=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":g=this.parseMultiPolygonText_()}return new p(g,this.layout_)}throw new Error(this.formatErrorMessage_())}};function encodePointGeometry(c){const u=c.getCoordinates();return 0===u.length?"":u.join(" ")}function encodeLineStringGeometry(c){const u=c.getCoordinates(),d=[];for(let c=0,p=u.length;c<p;++c)d.push(u[c].join(" "));return d.join(",")}function encodePolygonGeometry(c){const u=[],d=c.getLinearRings();for(let c=0,p=d.length;c<p;++c)u.push("("+encodeLineStringGeometry(d[c])+")");return u.join(",")}const xu={Point:encodePointGeometry,LineString:encodeLineStringGeometry,Polygon:encodePolygonGeometry,MultiPoint:function encodeMultiPointGeometry(c){const u=[],d=c.getPoints();for(let c=0,p=d.length;c<p;++c)u.push("("+encodePointGeometry(d[c])+")");return u.join(",")},MultiLineString:function encodeMultiLineStringGeometry(c){const u=[],d=c.getLineStrings();for(let c=0,p=d.length;c<p;++c)u.push("("+encodeLineStringGeometry(d[c])+")");return u.join(",")},MultiPolygon:function encodeMultiPolygonGeometry(c){const u=[],d=c.getPolygons();for(let c=0,p=d.length;c<p;++c)u.push("("+encodePolygonGeometry(d[c])+")");return u.join(",")},GeometryCollection:function encodeGeometryCollectionGeometry(c){const u=[],d=c.getGeometries();for(let c=0,p=d.length;c<p;++c)u.push(encode$1(d[c]));return u.join(",")}};function encode$1(c){const u=c.getType(),d=(0,xu[u])(c);let p=_u[u];if("function"==typeof c.getFlatCoordinates){const u=function encodeGeometryLayout(c){const u=c.getLayout();let d="";return"XYZ"!==u&&"XYZM"!==u||(d+=lu),"XYM"!==u&&"XYZM"!==u||(d+=hu),d}(c);u.length>0&&(p+=" "+u)}return 0===d.length?p+" "+au:p+"("+d+")"}var vu=class WKT extends TextFeature{constructor(c){super(),c=c||{},this.splitCollection_=void 0!==c.splitCollection&&c.splitCollection}parse_(c){const u=new Lexer(c);return new yu(u).parse()}readFeatureFromText(c,u){const d=this.readGeometryFromText(c,u),p=new ki;return p.setGeometry(d),p}readFeaturesFromText(c,u){let d=[];const p=this.readGeometryFromText(c,u);d=this.splitCollection_&&"GeometryCollection"==p.getType()?p.getGeometriesArray():[p];const g=[];for(let c=0,u=d.length;c<u;++c){const u=new ki;u.setGeometry(d[c]),g.push(u)}return g}readGeometryFromText(c,u){return transformGeometryWithOptions(this.parse_(c),!1,u)}writeFeatureText(c,u){const d=c.getGeometry();return d?this.writeGeometryText(d,u):""}writeFeaturesText(c,u){if(1==c.length)return this.writeFeatureText(c[0],u);const d=[];for(let u=0,p=c.length;u<p;++u)d.push(c[u].getGeometry());const p=new Vs(d);return this.writeGeometryText(p,u)}writeGeometryText(c,u){return encode$1(transformGeometryWithOptions(c,!0,u))}};const Su=[null,"http://www.opengis.net/wms"],wu=makeStructureNS(Su,{Service:makeObjectPropertySetter((function readService(c,u){return pushParseAndPop({},Eu,c,u)})),Capability:makeObjectPropertySetter((function readCapability(c,u){return pushParseAndPop({},Cu,c,u)}))}),Cu=makeStructureNS(Su,{Request:makeObjectPropertySetter((function readRequest(c,u){return pushParseAndPop({},Iu,c,u)})),Exception:makeObjectPropertySetter((function readException(c,u){return pushParseAndPop([],Tu,c,u)})),Layer:makeObjectPropertySetter((function readCapabilityLayer(c,u){const d=pushParseAndPop({},Ru,c,u);if(void 0===d.Layer)return Object.assign(d,readLayer$1(c,u));return d}))});const Eu=makeStructureNS(Su,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),OnlineResource:makeObjectPropertySetter(readHref),ContactInformation:makeObjectPropertySetter((function readContactInformation(c,u){return pushParseAndPop({},Pu,c,u)})),Fees:makeObjectPropertySetter(readString),AccessConstraints:makeObjectPropertySetter(readString),LayerLimit:makeObjectPropertySetter(readPositiveInteger),MaxWidth:makeObjectPropertySetter(readPositiveInteger),MaxHeight:makeObjectPropertySetter(readPositiveInteger)}),Pu=makeStructureNS(Su,{ContactPersonPrimary:makeObjectPropertySetter((function readContactPersonPrimary(c,u){return pushParseAndPop({},bu,c,u)})),ContactPosition:makeObjectPropertySetter(readString),ContactAddress:makeObjectPropertySetter((function readContactAddress(c,u){return pushParseAndPop({},Mu,c,u)})),ContactVoiceTelephone:makeObjectPropertySetter(readString),ContactFacsimileTelephone:makeObjectPropertySetter(readString),ContactElectronicMailAddress:makeObjectPropertySetter(readString)}),bu=makeStructureNS(Su,{ContactPerson:makeObjectPropertySetter(readString),ContactOrganization:makeObjectPropertySetter(readString)}),Mu=makeStructureNS(Su,{AddressType:makeObjectPropertySetter(readString),Address:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),StateOrProvince:makeObjectPropertySetter(readString),PostCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString)}),Tu=makeStructureNS(Su,{Format:makeArrayPusher(readString)}),Ru=makeStructureNS(Su,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),CRS:makeObjectPropertyPusher(readString),EX_GeographicBoundingBox:makeObjectPropertySetter((function readEXGeographicBoundingBox(c,u){const d=pushParseAndPop({},Au,c,u);if(!d)return;const p=d.westBoundLongitude,g=d.southBoundLatitude,f=d.eastBoundLongitude,_=d.northBoundLatitude;if(void 0===p||void 0===g||void 0===f||void 0===_)return;return[p,g,f,_]})),BoundingBox:makeObjectPropertyPusher((function readBoundingBox$1(c,u){const d=[readDecimalString(c.getAttribute("minx")),readDecimalString(c.getAttribute("miny")),readDecimalString(c.getAttribute("maxx")),readDecimalString(c.getAttribute("maxy"))],p=[readDecimalString(c.getAttribute("resx")),readDecimalString(c.getAttribute("resy"))];return{crs:c.getAttribute("CRS"),extent:d,res:p}})),Dimension:makeObjectPropertyPusher((function readDimension(c,u){return{name:c.getAttribute("name"),units:c.getAttribute("units"),unitSymbol:c.getAttribute("unitSymbol"),default:c.getAttribute("default"),multipleValues:readBooleanString(c.getAttribute("multipleValues")),nearestValue:readBooleanString(c.getAttribute("nearestValue")),current:readBooleanString(c.getAttribute("current")),values:readString(c)}})),Attribution:makeObjectPropertySetter((function readAttribution(c,u){return pushParseAndPop({},Lu,c,u)})),AuthorityURL:makeObjectPropertyPusher((function readAuthorityURL(c,u){const d=readFormatOnlineresource(c,u);if(d)return d.name=c.getAttribute("name"),d;return})),Identifier:makeObjectPropertyPusher(readString),MetadataURL:makeObjectPropertyPusher((function readMetadataURL(c,u){const d=readFormatOnlineresource(c,u);if(d)return d.type=c.getAttribute("type"),d;return})),DataURL:makeObjectPropertyPusher(readFormatOnlineresource),FeatureListURL:makeObjectPropertyPusher(readFormatOnlineresource),Style:makeObjectPropertyPusher((function readStyle$1(c,u){return pushParseAndPop({},Nu,c,u)})),MinScaleDenominator:makeObjectPropertySetter(readDecimal),MaxScaleDenominator:makeObjectPropertySetter(readDecimal),Layer:makeObjectPropertyPusher(readLayer$1)}),Lu=makeStructureNS(Su,{Title:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref),LogoURL:makeObjectPropertySetter(readSizedFormatOnlineresource)}),Au=makeStructureNS(Su,{westBoundLongitude:makeObjectPropertySetter(readDecimal),eastBoundLongitude:makeObjectPropertySetter(readDecimal),southBoundLatitude:makeObjectPropertySetter(readDecimal),northBoundLatitude:makeObjectPropertySetter(readDecimal)}),Iu=makeStructureNS(Su,{GetCapabilities:makeObjectPropertySetter(readOperationType),GetMap:makeObjectPropertySetter(readOperationType),GetFeatureInfo:makeObjectPropertySetter(readOperationType)}),Fu=makeStructureNS(Su,{Format:makeObjectPropertyPusher(readString),DCPType:makeObjectPropertyPusher((function readDCPType(c,u){return pushParseAndPop({},ku,c,u)}))}),ku=makeStructureNS(Su,{HTTP:makeObjectPropertySetter((function readHTTP(c,u){return pushParseAndPop({},Ou,c,u)}))}),Ou=makeStructureNS(Su,{Get:makeObjectPropertySetter(readFormatOnlineresource),Post:makeObjectPropertySetter(readFormatOnlineresource)}),Nu=makeStructureNS(Su,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),LegendURL:makeObjectPropertyPusher(readSizedFormatOnlineresource),StyleSheetURL:makeObjectPropertySetter(readFormatOnlineresource),StyleURL:makeObjectPropertySetter(readFormatOnlineresource)}),Du=makeStructureNS(Su,{Format:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref)}),Gu=makeStructureNS(Su,{Keyword:makeArrayPusher(readString)});function readLayer$1(c,u){const d=u[u.length-1],p=pushParseAndPop({},Ru,c,u);if(!p)return;let g=readBooleanString(c.getAttribute("queryable"));void 0===g&&(g=d.queryable),p.queryable=void 0!==g&&g;let f=readNonNegativeIntegerString(c.getAttribute("cascaded"));void 0===f&&(f=d.cascaded),p.cascaded=f;let _=readBooleanString(c.getAttribute("opaque"));void 0===_&&(_=d.opaque),p.opaque=void 0!==_&&_;let y=readBooleanString(c.getAttribute("noSubsets"));void 0===y&&(y=d.noSubsets),p.noSubsets=void 0!==y&&y;let x=readDecimalString(c.getAttribute("fixedWidth"));x||(x=d.fixedWidth),p.fixedWidth=x;let v=readDecimalString(c.getAttribute("fixedHeight"));v||(v=d.fixedHeight),p.fixedHeight=v;["Style","CRS","AuthorityURL"].forEach((function(c){if(c in d){const u=p[c]||[];p[c]=u.concat(d[c])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(c){if(!(c in p)){const u=d[c];p[c]=u}})),p}function readFormatOnlineresource(c,u){return pushParseAndPop({},Du,c,u)}function readOperationType(c,u){return pushParseAndPop({},Fu,c,u)}function readSizedFormatOnlineresource(c,u){const d=readFormatOnlineresource(c,u);if(d){const u=[readNonNegativeIntegerString(c.getAttribute("width")),readNonNegativeIntegerString(c.getAttribute("height"))];return d.size=u,d}}function readKeywordList(c,u){return pushParseAndPop([],Gu,c,u)}var ju=class WMSCapabilities extends XML{constructor(){super(),this.version=void 0}readFromNode(c){this.version=c.getAttribute("version").trim();const u=pushParseAndPop({version:this.version},wu,c,[]);return u||null}};var zu=class WMSGetFeatureInfo extends XMLFeature{constructor(c){super(),c=c||{},this.featureNS_="http://mapserver.gis.umn.edu/mapserver",this.gmlFormat_=new GML2,this.layers_=c.layers?c.layers:null}getLayers(){return this.layers_}setLayers(c){this.layers_=c}readFeatures_(c,u){c.setAttribute("namespaceURI",this.featureNS_);const d=c.localName;let p=[];if(0===c.childNodes.length)return p;if("msGMLOutput"==d)for(let d=0,g=c.childNodes.length;d<g;d++){const g=c.childNodes[d];if(g.nodeType!==Node.ELEMENT_NODE)continue;const f=g,_=u[0],y="_layer",x=f.localName.replace(y,"");if(this.layers_&&!this.layers_.includes(x))continue;const v=x+"_feature";_.featureType=v,_.featureNS=this.featureNS_;const C={};C[v]=makeArrayPusher(this.gmlFormat_.readFeatureElement,this.gmlFormat_);const M=makeStructureNS([_.featureNS,null],C);f.setAttribute("namespaceURI",this.featureNS_);const T=pushParseAndPop([],M,f,u,this.gmlFormat_);T&&extend$3(p,T)}if("FeatureCollection"==d){const u=pushParseAndPop([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,c,[{}],this.gmlFormat_);u&&(p=u)}return p}readFeaturesFromNode(c,u){const d={};return u&&Object.assign(d,this.getReadOptions(c,u)),this.readFeatures_(c,[d])}};const Bu=[null,"http://www.opengis.net/wmts/1.0"],Uu=[null,"http://www.opengis.net/ows/1.1"],$u=makeStructureNS(Bu,{Contents:makeObjectPropertySetter((function readContents(c,u){return pushParseAndPop({},Wu,c,u)}))});const Wu=makeStructureNS(Bu,{Layer:makeObjectPropertyPusher((function readLayer(c,u){return pushParseAndPop({},Xu,c,u)})),TileMatrixSet:makeObjectPropertyPusher((function readTileMatrixSet(c,u){return pushParseAndPop({},Ju,c,u)}))}),Xu=makeStructureNS(Bu,{Style:makeObjectPropertyPusher((function readStyle(c,u){const d=pushParseAndPop({},Vu,c,u);if(!d)return;const p="true"===c.getAttribute("isDefault");return d.isDefault=p,d})),Format:makeObjectPropertyPusher(readString),TileMatrixSetLink:makeObjectPropertyPusher((function readTileMatrixSetLink(c,u){return pushParseAndPop({},qu,c,u)})),Dimension:makeObjectPropertyPusher((function readDimensions(c,u){return pushParseAndPop({},Ku,c,u)})),ResourceURL:makeObjectPropertyPusher((function readResourceUrl(c,u){const d=c.getAttribute("format"),p=c.getAttribute("template"),g=c.getAttribute("resourceType"),f={};d&&(f.format=d);p&&(f.template=p);g&&(f.resourceType=g);return f}))},makeStructureNS(Uu,{Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),WGS84BoundingBox:makeObjectPropertySetter(readBoundingBox),BoundingBox:makeObjectPropertyPusher((function readBoundingBoxWithCrs(c,u){const d=c.getAttribute("crs"),p=pushParseAndPop([],Hu,c,u);if(2!=p.length)return;return{extent:boundingExtent(p),crs:d}})),Identifier:makeObjectPropertySetter(readString)})),Vu=makeStructureNS(Bu,{LegendURL:makeObjectPropertyPusher((function readLegendUrl(c,u){const d={};return d.format=c.getAttribute("format"),d.href=readHref(c),d}))},makeStructureNS(Uu,{Title:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString)})),qu=makeStructureNS(Bu,{TileMatrixSet:makeObjectPropertySetter(readString),TileMatrixSetLimits:makeObjectPropertySetter((function readTileMatrixLimitsList(c,u){return pushParseAndPop([],Yu,c,u)}))}),Yu=makeStructureNS(Bu,{TileMatrixLimits:makeArrayPusher((function readTileMatrixLimits(c,u){return pushParseAndPop({},Zu,c,u)}))}),Zu=makeStructureNS(Bu,{TileMatrix:makeObjectPropertySetter(readString),MinTileRow:makeObjectPropertySetter(readPositiveInteger),MaxTileRow:makeObjectPropertySetter(readPositiveInteger),MinTileCol:makeObjectPropertySetter(readPositiveInteger),MaxTileCol:makeObjectPropertySetter(readPositiveInteger)}),Ku=makeStructureNS(Bu,{Default:makeObjectPropertySetter(readString),Value:makeObjectPropertyPusher(readString)},makeStructureNS(Uu,{Identifier:makeObjectPropertySetter(readString)})),Hu=makeStructureNS(Uu,{LowerCorner:makeArrayPusher(readCoordinates),UpperCorner:makeArrayPusher(readCoordinates)}),Ju=makeStructureNS(Bu,{WellKnownScaleSet:makeObjectPropertySetter(readString),TileMatrix:makeObjectPropertyPusher((function readTileMatrix(c,u){return pushParseAndPop({},Qu,c,u)}))},makeStructureNS(Uu,{SupportedCRS:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString),BoundingBox:makeObjectPropertySetter(readBoundingBox)})),Qu=makeStructureNS(Bu,{TopLeftCorner:makeObjectPropertySetter(readCoordinates),ScaleDenominator:makeObjectPropertySetter(readDecimal),TileWidth:makeObjectPropertySetter(readPositiveInteger),TileHeight:makeObjectPropertySetter(readPositiveInteger),MatrixWidth:makeObjectPropertySetter(readPositiveInteger),MatrixHeight:makeObjectPropertySetter(readPositiveInteger)},makeStructureNS(Uu,{Identifier:makeObjectPropertySetter(readString)}));function readBoundingBox(c,u){const d=pushParseAndPop([],Hu,c,u);if(2==d.length)return boundingExtent(d)}function readCoordinates(c,u){const d=readString(c).split(/\s+/);if(!d||2!=d.length)return;const p=+d[0],g=+d[1];return isNaN(p)||isNaN(g)?void 0:[p,g]}var td=class WMTSCapabilities extends XML{constructor(){super(),this.owsParser_=new Rc}readFromNode(c){let u=c.getAttribute("version");u&&(u=u.trim());let d=this.owsParser_.readFromNode(c);return d?(d.version=u,d=pushParseAndPop(d,$u,c,[]),d||null):null}},ed=Object.freeze({__proto__:null,EsriJSON:Da,GML:Ka,GPX:Cl,GeoJSON:Ga,IGC:Rl,IIIFInfo:Gl,KML:lc,MVT:dc,OWS:Rc,Polyline:Lc,TopoJSON:Ic,WFS:Yc,WKB:su,WKT:vu,WMSCapabilities:ju,WMSGetFeatureInfo:zu,WMTSCapabilities:td});const id=34962,rd=34963,nd=35044,sd=35048,od=["experimental-webgl","webgl","webkit-3d","moz-webgl"];const ad=nd;class WebGLArrayBuffer{constructor(c,u){this.array_=null,this.type_=c,assert(c===id||c===rd,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==u?u:ad}ofSize(c){return this.array_=new(getArrayClassForType(this.type_))(c),this}fromArray(c){return this.array_=getArrayClassForType(this.type_).from(c),this}fromArrayBuffer(c){return this.array_=new(getArrayClassForType(this.type_))(c),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function getArrayClassForType(c){switch(c){case id:return Float32Array;case rd:return Uint32Array;default:return Float32Array}}var ld="webglcontextlost",hd="webglcontextrestored";class WebGLPostProcessingPass{constructor(c){this.gl_=c.webGlContext;const u=this.gl_;this.scaleRatio_=c.scaleRatio||1,this.renderTargetTexture_=u.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=u.createFramebuffer(),this.depthBuffer_=u.createRenderbuffer();const d=u.createShader(u.VERTEX_SHADER);u.shaderSource(d,c.vertexShader||"\n  precision mediump float;\n\n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n\n  uniform vec2 u_screenSize;\n\n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),u.compileShader(d);const p=u.createShader(u.FRAGMENT_SHADER);u.shaderSource(p,c.fragmentShader||"\n  precision mediump float;\n\n  uniform sampler2D u_image;\n  uniform float u_opacity;\n\n  varying vec2 v_texCoord;\n\n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),u.compileShader(p),this.renderTargetProgram_=u.createProgram(),u.attachShader(this.renderTargetProgram_,d),u.attachShader(this.renderTargetProgram_,p),u.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),u.STATIC_DRAW),this.renderTargetAttribLocation_=u.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],c.uniforms&&Object.keys(c.uniforms).forEach((d=>{this.uniforms_.push({value:c.uniforms[d],location:u.getUniformLocation(this.renderTargetProgram_,d)})}))}getGL(){return this.gl_}init(c){const u=this.getGL(),d=[u.drawingBufferWidth*this.scaleRatio_,u.drawingBufferHeight*this.scaleRatio_];if(u.bindFramebuffer(u.FRAMEBUFFER,this.getFrameBuffer()),u.bindRenderbuffer(u.RENDERBUFFER,this.getDepthBuffer()),u.viewport(0,0,d[0],d[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==d[0]||this.renderTargetTextureSize_[1]!==d[1]){this.renderTargetTextureSize_=d;const c=0,p=u.RGBA,g=0,f=u.RGBA,_=u.UNSIGNED_BYTE,y=null;u.bindTexture(u.TEXTURE_2D,this.renderTargetTexture_),u.texImage2D(u.TEXTURE_2D,c,p,d[0],d[1],g,f,_,y),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,this.renderTargetTexture_,0),u.renderbufferStorage(u.RENDERBUFFER,u.DEPTH_COMPONENT16,d[0],d[1]),u.framebufferRenderbuffer(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.RENDERBUFFER,this.depthBuffer_)}}apply(c,u,d,p){const g=this.getGL(),f=c.size;if(g.bindFramebuffer(g.FRAMEBUFFER,u?u.getFrameBuffer():null),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,this.renderTargetTexture_),!u){const u=getUid(g.canvas);if(!c.renderTargets[u]){const d=g.getContextAttributes();d&&d.preserveDrawingBuffer&&(g.clearColor(0,0,0,0),g.clearDepth(1),g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT)),c.renderTargets[u]=!0}}g.disable(g.DEPTH_TEST),g.enable(g.BLEND),g.blendFunc(g.ONE,g.ONE_MINUS_SRC_ALPHA),g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.bindBuffer(g.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),g.useProgram(this.renderTargetProgram_),g.enableVertexAttribArray(this.renderTargetAttribLocation_),g.vertexAttribPointer(this.renderTargetAttribLocation_,2,g.FLOAT,!1,0,0),g.uniform2f(this.renderTargetUniformLocation_,f[0],f[1]),g.uniform1i(this.renderTargetTextureLocation_,0);const _=c.layerStatesArray[c.layerIndex].opacity;g.uniform1f(this.renderTargetOpacityLocation_,_),this.applyUniforms(c),d&&d(g,c),g.drawArrays(g.TRIANGLES,0,6),p&&p(g,c)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(c){const u=this.getGL();let d,p=1;this.uniforms_.forEach((function(g){if(d="function"==typeof g.value?g.value(c):g.value,d instanceof HTMLCanvasElement||d instanceof ImageData)g.texture||(g.texture=u.createTexture()),u.activeTexture(u[`TEXTURE${p}`]),u.bindTexture(u.TEXTURE_2D,g.texture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),d instanceof ImageData?u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,d.width,d.height,0,u.UNSIGNED_BYTE,new Uint8Array(d.data)):u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,d),u.uniform1i(g.location,p++);else if(Array.isArray(d))switch(d.length){case 2:return void u.uniform2f(g.location,d[0],d[1]);case 3:return void u.uniform3f(g.location,d[0],d[1],d[2]);case 4:return void u.uniform4f(g.location,d[0],d[1],d[2],d[3]);default:return}else"number"==typeof d&&u.uniform1f(g.location,d)}))}}function fromTransform(c,u){return c[0]=u[0],c[1]=u[1],c[4]=u[2],c[5]=u[3],c[12]=u[4],c[13]=u[5],c}const cd="u_projectionMatrix",ud="u_time",dd="u_zoom",pd="u_resolution",gd="u_rotation",md="u_viewportSizePx",fd="u_pixelRatio",_d="u_hitDetection",yd={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126},xd={};function getSharedCanvasCacheKey(c){return"shared/"+c}let vd=0;function getOrCreateContext(c){let u=xd[c];if(!u){const d=document.createElement("canvas");d.width=1,d.height=1,d.style.position="absolute",d.style.left="0";const p=function getContext(c,u){u=Object.assign({preserveDrawingBuffer:!0,antialias:!zr},u);const d=od.length;for(let p=0;p<d;++p)try{const d=c.getContext(od[p],u);if(d)return d}catch(c){}return null}(d);u={users:0,context:p},xd[c]=u}return u.users+=1,u.context}class WebGLHelper extends fi{constructor(c){super(),c=c||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=c.canvasCacheKey?getSharedCanvasCacheKey(c.canvasCacheKey):function getUniqueCanvasCacheKey(){const c="unique/"+vd;return vd+=1,c}(),this.gl_=getOrCreateContext(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const u=this.gl_.canvas;u.addEventListener(ld,this.boundHandleWebGLContextLost_),u.addEventListener(hd,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=[1,0,0,1,0,0],this.offsetScaleMatrix_=[1,0,0,1,0,0],this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],c.uniforms&&this.setUniforms(c.uniforms),this.postProcessPasses_=c.postProcesses?c.postProcesses.map((c=>new WebGLPostProcessingPass({webGlContext:this.gl_,scaleRatio:c.scaleRatio,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms}))):[new WebGLPostProcessingPass({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(c){this.uniforms_=[],this.addUniforms(c)}addUniforms(c){for(const u in c)this.uniforms_.push({name:u,value:c[u]})}canvasCacheKeyMatches(c){return this.canvasCacheKey_===getSharedCanvasCacheKey(c)}getExtension(c){if(c in this.extensionCache_)return this.extensionCache_[c];const u=this.gl_.getExtension(c);return this.extensionCache_[c]=u,u}bindBuffer(c){const u=this.gl_,d=getUid(c);let p=this.bufferCache_[d];if(!p){p={buffer:c,webGlBuffer:u.createBuffer()},this.bufferCache_[d]=p}u.bindBuffer(c.getType(),p.webGlBuffer)}flushBufferData(c){const u=this.gl_;this.bindBuffer(c),u.bufferData(c.getType(),c.getArray(),c.getUsage())}deleteBuffer(c){const u=this.gl_,d=getUid(c),p=this.bufferCache_[d];p&&!u.isContextLost()&&u.deleteBuffer(p.webGlBuffer),delete this.bufferCache_[d]}disposeInternal(){const c=this.gl_.canvas;c.removeEventListener(ld,this.boundHandleWebGLContextLost_),c.removeEventListener(hd,this.boundHandleWebGLContextRestored_),function releaseCanvas(c){const u=xd[c];if(!u)return;if(u.users-=1,u.users>0)return;const d=u.context,p=d.getExtension("WEBGL_lose_context");p&&p.loseContext();const g=d.canvas;g.width=1,g.height=1,delete xd[c]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(c,u,d){const p=this.gl_,g=this.getCanvas(),f=c.size,_=c.pixelRatio;g.width===f[0]*_&&g.height===f[1]*_||(g.width=f[0]*_,g.height=f[1]*_,g.style.width=f[0]+"px",g.style.height=f[1]+"px");for(let u=this.postProcessPasses_.length-1;u>=0;u--)this.postProcessPasses_[u].init(c);p.bindTexture(p.TEXTURE_2D,null),p.clearColor(0,0,0,0),p.depthRange(0,1),p.clearDepth(1),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),p.enable(p.BLEND),p.blendFunc(p.ONE,u?p.ZERO:p.ONE_MINUS_SRC_ALPHA),d?(p.enable(p.DEPTH_TEST),p.depthFunc(p.LEQUAL)):p.disable(p.DEPTH_TEST)}bindTexture(c,u,d){const p=this.gl_;p.activeTexture(p.TEXTURE0+u),p.bindTexture(p.TEXTURE_2D,c),p.uniform1i(this.getUniformLocation(d),u)}prepareDrawToRenderTarget(c,u,d,p){const g=this.gl_,f=u.getSize();g.bindFramebuffer(g.FRAMEBUFFER,u.getFramebuffer()),g.bindRenderbuffer(g.RENDERBUFFER,u.getDepthbuffer()),g.viewport(0,0,f[0],f[1]),g.bindTexture(g.TEXTURE_2D,u.getTexture()),g.clearColor(0,0,0,0),g.depthRange(0,1),g.clearDepth(1),g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.enable(g.BLEND),g.blendFunc(g.ONE,d?g.ZERO:g.ONE_MINUS_SRC_ALPHA),p?(g.enable(g.DEPTH_TEST),g.depthFunc(g.LEQUAL)):g.disable(g.DEPTH_TEST)}drawElements(c,u){const d=this.gl_;this.getExtension("OES_element_index_uint");const p=d.UNSIGNED_INT,g=u-c,f=4*c;d.drawElements(d.TRIANGLES,g,p,f)}finalizeDraw(c,u,d){for(let p=0,g=this.postProcessPasses_.length;p<g;p++)p===g-1?this.postProcessPasses_[p].apply(c,null,u,d):this.postProcessPasses_[p].apply(c,this.postProcessPasses_[p+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(c){const u=c.size,d=c.viewState.rotation,p=c.pixelRatio;this.setUniformFloatValue(ud,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(dd,c.viewState.zoom),this.setUniformFloatValue(pd,c.viewState.resolution),this.setUniformFloatValue(fd,p),this.setUniformFloatVec2(md,[u[0],u[1]]),this.setUniformFloatValue(gd,d)}applyHitDetectionUniform(c){const u=this.getUniformLocation(_d);this.getGL().uniform1i(u,c?1:0),c&&this.setUniformFloatValue(fd,.5)}applyUniforms(c){const u=this.gl_;let d,p=0;this.uniforms_.forEach((g=>{if(d="function"==typeof g.value?g.value(c):g.value,d instanceof HTMLCanvasElement||d instanceof HTMLImageElement||d instanceof ImageData||d instanceof WebGLTexture){d instanceof WebGLTexture&&!g.texture?(g.prevValue=void 0,g.texture=d):g.texture||(g.prevValue=void 0,g.texture=u.createTexture()),this.bindTexture(g.texture,p,g.name),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE);const c=!(d instanceof HTMLImageElement)||d.complete;d instanceof WebGLTexture||!c||g.prevValue===d||(g.prevValue=d,u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,d)),p++}else if(Array.isArray(d)&&6===d.length)this.setUniformMatrixValue(g.name,fromTransform(this.tmpMat4_,d));else if(Array.isArray(d)&&d.length<=4)switch(d.length){case 2:return void u.uniform2f(this.getUniformLocation(g.name),d[0],d[1]);case 3:return void u.uniform3f(this.getUniformLocation(g.name),d[0],d[1],d[2]);case 4:return void u.uniform4f(this.getUniformLocation(g.name),d[0],d[1],d[2],d[3]);default:return}else"number"==typeof d&&u.uniform1f(this.getUniformLocation(g.name),d)}))}useProgram(c,u){this.gl_.useProgram(c),this.currentProgram_=c,this.applyFrameState(u),this.applyUniforms(u)}compileShader(c,u){const d=this.gl_,p=d.createShader(u);return d.shaderSource(p,c),d.compileShader(p),p}getProgram(c,u){const d=this.gl_,p=this.compileShader(c,d.FRAGMENT_SHADER),g=this.compileShader(u,d.VERTEX_SHADER),f=d.createProgram();if(d.attachShader(f,p),d.attachShader(f,g),d.linkProgram(f),!d.getShaderParameter(p,d.COMPILE_STATUS)){const c=`Fragment shader compilation failed: ${d.getShaderInfoLog(p)}`;throw new Error(c)}if(d.deleteShader(p),!d.getShaderParameter(g,d.COMPILE_STATUS)){const c=`Vertex shader compilation failed: ${d.getShaderInfoLog(g)}`;throw new Error(c)}if(d.deleteShader(g),!d.getProgramParameter(f,d.LINK_STATUS)){const c=`GL program linking failed: ${d.getProgramInfoLog(f)}`;throw new Error(c)}return f}getUniformLocation(c){const u=getUid(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[u]&&(this.uniformLocationsByProgram_[u]={}),void 0===this.uniformLocationsByProgram_[u][c]&&(this.uniformLocationsByProgram_[u][c]=this.gl_.getUniformLocation(this.currentProgram_,c)),this.uniformLocationsByProgram_[u][c]}getAttributeLocation(c){const u=getUid(this.currentProgram_);return void 0===this.attribLocationsByProgram_[u]&&(this.attribLocationsByProgram_[u]={}),void 0===this.attribLocationsByProgram_[u][c]&&(this.attribLocationsByProgram_[u][c]=this.gl_.getAttribLocation(this.currentProgram_,c)),this.attribLocationsByProgram_[u][c]}makeProjectionTransform(c,u){const d=c.size,p=c.viewState.rotation,g=c.viewState.resolution,f=c.viewState.center;return compose(u,0,0,2/(g*d[0]),2/(g*d[1]),-p,-f[0],-f[1]),u}setUniformFloatValue(c,u){this.gl_.uniform1f(this.getUniformLocation(c),u)}setUniformFloatVec2(c,u){this.gl_.uniform2fv(this.getUniformLocation(c),u)}setUniformFloatVec4(c,u){this.gl_.uniform4fv(this.getUniformLocation(c),u)}setUniformMatrixValue(c,u){this.gl_.uniformMatrix4fv(this.getUniformLocation(c),!1,u)}enableAttributeArray_(c,u,d,p,g){const f=this.getAttributeLocation(c);f<0||(this.gl_.enableVertexAttribArray(f),this.gl_.vertexAttribPointer(f,u,d,!1,p,g))}enableAttributes(c){const u=function computeAttributesStride(c){let u=0;for(let d=0;d<c.length;d++){const p=c[d];u+=p.size*getByteSizeFromType(p.type)}return u}(c);let d=0;for(let p=0;p<c.length;p++){const g=c[p];this.enableAttributeArray_(g.name,g.size,g.type||5126,u,d),d+=g.size*getByteSizeFromType(g.type)}}handleWebGLContextLost(c){clear$2(this.bufferCache_),this.currentProgram_=null,c.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(c,u,d){const p=this.gl_;d=d||p.createTexture();const g=p.RGBA,f=p.RGBA,_=p.UNSIGNED_BYTE;return p.bindTexture(p.TEXTURE_2D,d),u?p.texImage2D(p.TEXTURE_2D,0,g,f,_,u):p.texImage2D(p.TEXTURE_2D,0,g,c[0],c[1],0,f,_,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),d}}function getByteSizeFromType(c){switch(c){case yd.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case yd.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case yd.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case yd.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class WebGLLayerRenderer extends LayerRenderer{constructor(c,u){super(c),u=u||{},this.inversePixelTransform_=[1,0,0,1,0,0],this.postProcesses_=u.postProcesses,this.uniforms_=u.uniforms,this.helper,this.onMapChanged_=()=>{this.clearCache(),this.removeHelper()},c.addChangeListener(zn,this.onMapChanged_),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(c,u){const d=this.getLayer();if(d.hasListener(Cr)){const p=new RenderEvent(Cr,void 0,u,c);d.dispatchEvent(p)}}dispatchPostComposeEvent(c,u){const d=this.getLayer();if(d.hasListener(Er)){const p=new RenderEvent(Er,void 0,u,c);d.dispatchEvent(p)}}reset(c){this.uniforms_=c.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(c){if(this.getLayer().getRenderSource()){let u,d=!0,p=-1;for(let g=0,f=c.layerStatesArray.length;g<f;g++){const f=c.layerStatesArray[g].layer,_=f.getRenderer();if(!(_ instanceof WebGLLayerRenderer)){d=!0;continue}const y=f.getClassName();if((d||y!==u)&&(p+=1,d=!1),u=y,_===this)break}const g="map/"+c.mapId+"/group/"+p;this.helper&&this.helper.canvasCacheKeyMatches(g)&&!this.helper.needsToBeRecreated()||(this.removeHelper(),this.helper=new WebGLHelper({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:g}),u&&(this.helper.getCanvas().className=u),this.afterHelperCreated())}return this.prepareFrameInternal(c)}afterHelperCreated(){}prepareFrameInternal(c){return!0}clearCache(){}disposeInternal(){this.clearCache(),this.removeHelper(),this.getLayer()?.removeChangeListener(zn,this.onMapChanged_),super.disposeInternal()}dispatchRenderEvent_(c,u,d){const p=this.getLayer();if(p.hasListener(c)){compose(this.inversePixelTransform_,0,0,d.pixelRatio,-d.pixelRatio,0,0,-d.size[1]);const g=new RenderEvent(c,this.inversePixelTransform_,d,u);p.dispatchEvent(g)}}preRender(c,u){this.dispatchRenderEvent_(Sr,c,u)}postRender(c,u){this.dispatchRenderEvent_(wr,c,u)}}const Sd=new Uint8Array(4);class WebGLRenderTarget{constructor(c,u){this.helper_=c;const d=c.getGL();this.texture_=d.createTexture(),this.framebuffer_=d.createFramebuffer(),this.depthbuffer_=d.createRenderbuffer(),this.size_=u||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(c){equals$2(c,this.size_)||(this.size_[0]=c[0],this.size_[1]=c[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const c=this.size_,u=this.helper_.getGL();u.bindFramebuffer(u.FRAMEBUFFER,this.framebuffer_),u.readPixels(0,0,c[0],c[1],u.RGBA,u.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(c,u){if(c<0||u<0||c>this.size_[0]||u>=this.size_[1])return Sd[0]=0,Sd[1]=0,Sd[2]=0,Sd[3]=0,Sd;this.readAll();const d=Math.floor(c)+(this.size_[1]-Math.floor(u)-1)*this.size_[0];return Sd[0]=this.data_[4*d],Sd[1]=this.data_[4*d+1],Sd[2]=this.data_[4*d+2],Sd[3]=this.data_[4*d+3],Sd}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const c=this.size_,u=this.helper_.getGL();this.texture_=this.helper_.createTexture(c,null,this.texture_),u.bindFramebuffer(u.FRAMEBUFFER,this.framebuffer_),u.viewport(0,0,c[0],c[1]),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,this.texture_,0),u.bindRenderbuffer(u.RENDERBUFFER,this.depthbuffer_),u.renderbufferStorage(u.RENDERBUFFER,u.DEPTH_COMPONENT16,c[0],c[1]),u.framebufferRenderbuffer(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(c[0]*c[1]*4)}}const wd="GENERATE_POINT_BUFFERS";function colorEncodeId(c,u){const d=256,p=255;return(u=u||[])[0]=Math.floor(c/d/d/d)/p,u[1]=Math.floor(c/d/d)%d/p,u[2]=Math.floor(c/d)%d/p,u[3]=c%d/p,u}class WebGLPointsLayerRenderer extends WebGLLayerRenderer{constructor(c,u){const d=u.uniforms||{},p=[1,0,0,1,0,0];d[cd]=p,super(c,{uniforms:d,postProcesses:u.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new WebGLArrayBuffer(id,sd),this.indicesBuffer_=new WebGLArrayBuffer(rd,sd),this.vertexShader_=u.vertexShader,this.fragmentShader_=u.fragmentShader,this.program_,this.hitDetectionEnabled_=u.hitDetectionEnabled??!0;const g=u.attributes?u.attributes.map((function(c){return{name:"a_prop_"+c.name,size:1,type:yd.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:yd.FLOAT},{name:"a_index",size:1,type:yd.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:yd.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:yd.FLOAT})),this.attributes.push(...g),this.customAttributes=u.attributes?u.attributes:[],this.previousExtent_=[1/0,1/0,-1/0,-1/0],this.currentTransform_=p,this.renderTransform_=[1,0,0,1,0,0],this.invertRenderTransform_=[1,0,0,1,0,0],this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function create(){const c='const t="GENERATE_POLYGON_BUFFERS",e="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function x(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,"Transformation matrix cannot be inverted");const x=e[0],o=e[1],u=e[2],i=e[3],f=e[4],s=e[5];return t[0]=i/n,t[1]=-o/n,t[2]=-u/n,t[3]=x/n,t[4]=(u*s-i*f)/n,t[5]=-(x*s-o*f)/n,t}function o(t,e,n=2){const r=e&&e.length,x=r?e[0]*n:t.length;let o=u(t,0,x,n,!0);const i=[];if(!o||o.next===o.prev)return i;let s,l,c;if(r&&(o=function(t,e,n,r){const x=[];for(let n=0,o=e.length;n<o;n++){const i=u(t,e[n]*r,n<o-1?e[n+1]*r:t.length,r,!1);i===i.next&&(i.steiner=!0),x.push(g(i))}x.sort(y);for(let t=0;t<x.length;t++)n=h(x[t],n);return n}(t,e,o,n)),t.length>80*n){s=1/0,l=1/0;let e=-1/0,r=-1/0;for(let o=n;o<x;o+=n){const n=t[o],x=t[o+1];n<s&&(s=n),x<l&&(l=x),n>e&&(e=n),x>r&&(r=x)}c=Math.max(e-s,r-l),c=0!==c?32767/c:0}return f(o,i,n,s,l,c,0),i}function u(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,u=n-r;o<n;o+=r)x+=(t[u]-t[o])*(t[o+1]+t[u+1]),u=o;return x}(t,e,n,r)>0)for(let x=e;x<n;x+=r)o=z(x/r|0,t[x],t[x+1],o);else for(let x=n-r;x>=e;x-=r)o=z(x/r|0,t[x],t[x+1],o);return o&&M(o,o.next)&&(F(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==d(r.prev,r,r.next))r=r.next;else{if(F(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function f(t,e,n,r,x,o,u){if(!t)return;!u&&o&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=v(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let u=x,i=0;for(let t=0;t<n&&(i++,u=u.nextZ,u);t++);let f=n;for(;i>0||f>0&&u;)0!==i&&(0===f||!u||x.z<=u.z)?(r=x,x=x.nextZ,i--):(r=u,u=u.nextZ,f--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=u}o.nextZ=null,n*=2}while(e>1)}(x)}(t,r,x,o);let y=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(o?l(t,r,x,o):s(t))e.push(h.i,t.i,p.i),F(t),t=p.next,y=p.next;else if((t=p)===y){u?1===u?f(t=c(i(t),e),e,n,r,x,o,2):2===u&&a(t,e,n,r,x,o):f(i(t),e,n,r,x,o,1);break}}}function s(t){const e=t.prev,n=t,r=t.next;if(d(e,n,r)>=0)return!1;const x=e.x,o=n.x,u=r.x,i=e.y,f=n.y,s=r.y,l=x<o?x<u?x:u:o<u?o:u,c=i<f?i<s?i:s:f<s?f:s,a=x>o?x>u?x:u:o>u?o:u,y=i>f?i>s?i:s:f>s?f:s;let h=r.next;for(;h!==e;){if(h.x>=l&&h.x<=a&&h.y>=c&&h.y<=y&&b(x,i,o,f,u,s,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function l(t,e,n,r){const x=t.prev,o=t,u=t.next;if(d(x,o,u)>=0)return!1;const i=x.x,f=o.x,s=u.x,l=x.y,c=o.y,a=u.y,y=i<f?i<s?i:s:f<s?f:s,h=l<c?l<a?l:a:c<a?c:a,p=i>f?i>s?i:s:f>s?f:s,g=l>c?l>a?l:a:c>a?c:a,Z=v(y,h,e,n,r),M=v(p,g,e,n,r);let w=t.prevZ,m=t.nextZ;for(;w&&w.z>=Z&&m&&m.z<=M;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;w&&w.z>=Z;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;m&&m.z<=M;){if(m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(t,e){let n=t;do{const r=n.prev,x=n.next.next;!M(r,x)&&w(r,n,n.next,x)&&E(r,x)&&E(x,r)&&(e.push(r.i,n.i,x.i),F(n),F(n.next),n=t=x),n=n.next}while(n!==t);return i(n)}function a(t,e,n,r,x,o){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&Z(u,t)){let s=I(u,t);return u=i(u,u.next),s=i(s,s.next),f(u,e,n,r,x,o,0),void f(s,e,n,r,x,o,0)}t=t.next}u=u.next}while(u!==t)}function y(t,e){return t.x-e.x}function h(t,e){const n=function(t,e){let n=e;const r=t.x,x=t.y;let o,u=-1/0;do{if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>u&&(u=t,o=n.x<n.next.x?n:n.next,t===r))return o}n=n.next}while(n!==e);if(!o)return null;const i=o,f=o.x,s=o.y;let l=1/0;n=o;do{if(r>=n.x&&n.x>=f&&r!==n.x&&b(x<s?r:u,x,f,s,x<s?u:r,x,n.x,n.y)){const e=Math.abs(x-n.y)/(r-n.x);E(n,t)&&(e<l||e===l&&(n.x>o.x||n.x===o.x&&p(o,n)))&&(o=n,l=e)}n=n.next}while(n!==i);return o}(t,e);if(!n)return e;const r=I(n,t);return i(r,r.next),i(n,n.next)}function p(t,e){return d(t.prev,t,e.prev)<0&&d(e.next,t,t.next)<0}function v(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function b(t,e,n,r,x,o,u,i){return(x-u)*(e-i)>=(t-u)*(o-i)&&(t-u)*(r-i)>=(n-u)*(e-i)&&(n-u)*(o-i)>=(x-u)*(r-i)}function Z(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(d(t.prev,t,e.prev)||d(t,e.prev,e))||M(t,e)&&d(t.prev,t,t.next)>0&&d(e.prev,e,e.next)>0)}function d(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){const x=A(d(t,e,n)),o=A(d(t,e,r)),u=A(d(n,r,t)),i=A(d(n,r,e));return x!==o&&u!==i||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==u||!m(n,t,r))||!(0!==i||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function E(t,e){return d(t.prev,t,t.next)<0?d(t,e,t.next)>=0&&d(t,t.prev,e)>=0:d(t,e,t.prev)<0||d(t,t.next,e)<0}function I(t,e){const n=P(t.i,t.x,t.y),r=P(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function z(t,e,n,r){const x=P(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function F(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 P(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}new Array(6);const B=[],N={vertexPosition:0,indexPosition:0};function R(t,e,n,r,x){t[e+0]=n,t[e+1]=r,t[e+2]=x}function S(t,e,n,r,x,o){const u=3+x,i=t[e+0],f=t[e+1],s=B;s.length=x;for(let n=0;n<s.length;n++)s[n]=t[e+2+n];let l=o?o.vertexPosition:0,c=o?o.indexPosition:0;const a=l/u;return R(n,l,i,f,0),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,1),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,2),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,3),s.length&&n.set(s,l+3),l+=u,r[c++]=a,r[c++]=a+1,r[c++]=a+3,r[c++]=a+1,r[c++]=a+2,r[c++]=a+3,N.vertexPosition=l,N.indexPosition=c,N}function T(t,e,n,x,o,u,i,f,s,l,c){const a=10+f.length,y=u.length/a,h=[t[e+0],t[e+1]],p=[t[n],t[n+1]],v=t[e+2],g=t[n+2],b=r(s,[...h]),Z=r(s,[...p]);function d(t,e,n){const r=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),x=[(e[0]-t[0])/r,(e[1]-t[1])/r],o=[-x[1],x[0]],u=Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])),i=[(n[0]-t[0])/u,(n[1]-t[1])/u],f=0===r||0===u?0:Math.acos((s=i[0]*x[0]+i[1]*x[1],l=-1,c=1,Math.min(Math.max(s,l),c)));var s,l,c;return i[0]*o[0]+i[1]*o[1]>0?f:2*Math.PI-f}let M=-1,w=-1,m=c;const A=null!==o;if(null!==x){M=d(b,Z,r(s,[...[t[x],t[x+1]]])),Math.cos(M)<=.985&&(m+=Math.tan((M-Math.PI)/2))}if(A){w=d(Z,b,r(s,[...[t[o],t[o+1]]])),Math.cos(w)<=.985&&(m+=Math.tan((Math.PI-w)/2))}function E(t,e){return 0===e?1e4*t:Math.sign(e)*(1e4*t+Math.abs(e))}return u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(0,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(1,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(2,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(3,c)),u.push(...f),i.push(y,y+1,y+2,y+1,y+3,y+2),{length:l+Math.sqrt((Z[0]-b[0])*(Z[0]-b[0])+(Z[1]-b[1])*(Z[1]-b[1])),angle:m}}function _(t,e,n,r,x){const u=2+x;let i=e;const f=t.slice(i,i+x);i+=x;const s=t[i++];let l=0;const c=new Array(s-1);for(let e=0;e<s;e++)l+=t[i++],e<s-1&&(c[e]=l);const a=t.slice(i,i+2*l),y=o(a,c,2);for(let t=0;t<y.length;t++)r.push(y[t]+n.length/u);for(let t=0;t<a.length;t+=2)n.push(a[t],a[t+1],...f);return i+2*l}const O=self;O.onmessage=r=>{const o=r.data;switch(o.type){case e:{const t=3,e=2,n=o.customAttributesSize,r=e+n,x=new Float32Array(o.renderInstructions),u=x.length/r,i=4*u*(n+t),f=new Uint32Array(6*u),s=new Float32Array(i);let l;for(let t=0;t<x.length;t+=r)l=S(x,t,s,f,n,l);const c=Object.assign({vertexBuffer:s.buffer,indexBuffer:f.buffer,renderInstructions:x.buffer},o);O.postMessage(c,[s.buffer,f.buffer,x.buffer]);break}case n:{const t=[],e=[],n=o.customAttributesSize,r=3,u=new Float32Array(o.renderInstructions);let i=0;const f=[1,0,0,1,0,0];let s,l;for(x(f,o.renderInstructionsTransform);i<u.length;){l=Array.from(u.slice(i,i+n)),i+=n,s=u[i++];const x=i,o=i+(s-1)*r,c=u[x]===u[o]&&u[x+1]===u[o+1];let a=0,y=0;for(let n=0;n<s-1;n++){let h=null;n>0?h=i+(n-1)*r:c&&(h=o-r);let p=null;n<s-2?p=i+(n+2)*r:c&&(p=x+r);const v=T(u,i+n*r,i+(n+1)*r,h,p,t,e,l,f,a,y);a=v.length,y=v.angle}i+=s*r}const c=Uint32Array.from(e),a=Float32Array.from(t),y=Object.assign({vertexBuffer:a.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},o);O.postMessage(y,[a.buffer,c.buffer,u.buffer]);break}case t:{const t=[],e=[],n=o.customAttributesSize,r=new Float32Array(o.renderInstructions);let x=0;for(;x<r.length;)x=_(r,x,t,e,n);const u=Uint32Array.from(e),i=Float32Array.from(t),f=Object.assign({vertexBuffer:i.buffer,indexBuffer:u.buffer,renderInstructions:r.buffer},o);O.postMessage(f,[i.buffer,u.buffer,r.buffer]);break}}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(c,"binary").toString("base64"):URL.createObjectURL(new Blob([c],{type:"application/javascript"})))}(),this.worker_.addEventListener("message",(c=>{const u=c.data;if(u.type===wd){const d=u.projectionTransform;this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=d,makeInverse(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(c.data.renderInstructions),u.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const f=this.getLayer().getSource();this.sourceListenKeys_=[listen(f,Qs,this.handleSourceFeatureAdded_,this),listen(f,to,this.handleSourceFeatureChanged_,this),listen(f,io,this.handleSourceFeatureDelete_,this),listen(f,eo,this.handleSourceFeatureClear_,this)],f.forEachFeature((c=>{this.featureCache_[getUid(c)]={feature:c,properties:c.getProperties(),geometry:c.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new WebGLRenderTarget(this.helper)),this.verticesBuffer_.getArray()&&this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.getArray()&&this.helper.flushBufferData(this.indicesBuffer_)}handleSourceFeatureAdded_(c){const u=c.feature;this.featureCache_[getUid(u)]={feature:u,properties:u.getProperties(),geometry:u.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(c){const u=c.feature;this.featureCache_[getUid(u)]={feature:u,properties:u.getProperties(),geometry:u.getGeometry()}}handleSourceFeatureDelete_(c){const u=c.feature;delete this.featureCache_[getUid(u)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(c){const u=this.helper.getGL();this.preRender(u,c);const[d,p,g]=function getWorldParameters(c,u){const d=c.viewState.projection,p=u.getSource().getWrapX()&&d.canWrapX(),g=d.getExtent(),f=c.extent,_=p?getWidth(g):null,y=p?Math.ceil((f[2]-g[2])/_)+1:1;return[p?Math.floor((f[0]-g[0])/_):0,y,_]}(c,this.getLayer());this.renderWorlds(c,!1,d,p,g),this.helper.finalizeDraw(c,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(c,!0,d,p,g),this.hitRenderTarget_.clearCachedData()),this.postRender(u,c);return this.helper.getCanvas()}prepareFrameInternal(c){const u=this.getLayer(),d=u.getSource(),p=c.viewState,g=!c.viewHints[Bn]&&!c.viewHints[Un],f=!equals$1(this.previousExtent_,c.extent),_=this.sourceRevision_<d.getRevision();if(_&&(this.sourceRevision_=d.getRevision()),g&&(f||_)){const g=p.projection,f=p.resolution,_=u instanceof BaseVectorLayer?u.getRenderBuffer():0,y=buffer(c.extent,_*f);d.loadFeatures(y,f,g),this.rebuildBuffers_(c),this.previousExtent_=c.extent.slice()}return this.helper.useProgram(this.program_,c),this.helper.prepareDraw(c),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(c){const u=[1,0,0,1,0,0];this.helper.makeProjectionTransform(c,u);const d=getUserProjection(),p=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,g=p*this.featureCount_;let f,_;this.renderInstructions_&&this.renderInstructions_.length===g||(this.renderInstructions_=new Float32Array(g));const y=[],x=[];let v=-1;for(const p in this.featureCache_)if(f=this.featureCache_[p],_=f.geometry,_&&"Point"===_.getType()){if(d){const u=fromUserCoordinate(_.getFlatCoordinates(),c.viewState.projection);y[0]=u[0],y[1]=u[1]}else y[0]=_.getFlatCoordinates()[0],y[1]=_.getFlatCoordinates()[1];if(apply(u,y),this.renderInstructions_[++v]=y[0],this.renderInstructions_[++v]=y[1],this.hitDetectionEnabled_){const c=colorEncodeId(v+5,x);this.renderInstructions_[++v]=c[0],this.renderInstructions_[++v]=c[1],this.renderInstructions_[++v]=c[2],this.renderInstructions_[++v]=c[3],this.renderInstructions_[++v]=Number(p)}for(let c=0;c<this.customAttributes.length;c++){const u=this.customAttributes[c].callback(f.feature,f.properties);this.renderInstructions_[++v]=u}}const C={id:++this.lastSentId,type:wd,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:p-2};C.projectionTransform=u,this.ready=!1,this.worker_.postMessage(C,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(c,u,d,p,g){if(assert(this.hitDetectionEnabled_,"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option."),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const f=apply(u.coordinateToPixelTransform,c.slice()),_=this.hitRenderTarget_.readPixel(f[0]/2,f[1]/2),y=function colorDecodeId(c){let u=0;const d=256,p=255;return u+=Math.round(c[0]*d*d*d*p),u+=Math.round(c[1]*d*d*p),u+=Math.round(c[2]*d*p),u+=Math.round(c[3]*p),u}([_[0]/255,_[1]/255,_[2]/255,_[3]/255]),x=this.renderInstructions_[y],v=Math.floor(x).toString(),C=this.getLayer().getSource().getFeatureByUid(v);return C?p(C,this.getLayer(),null):void 0}renderWorlds(c,u,d,p,g){let f=d;this.helper.useProgram(this.program_,c),u&&(this.hitRenderTarget_.setSize([Math.floor(c.size[0]/2),Math.floor(c.size[1]/2)]),this.helper.prepareDrawToRenderTarget(c,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(c,this.currentTransform_),translate$1(this.currentTransform_,f*g,0),multiply(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(c),this.helper.applyHitDetectionUniform(u);const d=this.indicesBuffer_.getSize();this.helper.drawElements(0,d)}while(++f<p)}disposeInternal(){this.worker_.terminate(),this.sourceListenKeys_.forEach((function(c){unlistenByKey(c)})),this.sourceListenKeys_=null,super.disposeInternal()}renderDeclutter(){}}class PaletteTexture{constructor(c,u){this.name=c,this.data=u,this.texture_=null}getTexture(c){if(!this.texture_){const u=c.createTexture();c.bindTexture(c.TEXTURE_2D,u),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.NEAREST),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,this.data.length/4,1,0,c.RGBA,c.UNSIGNED_BYTE,this.data),this.texture_=u}return this.texture_}delete(c){this.texture_&&c.deleteTexture(this.texture_),this.texture_=null}}function asImageLike(c){return c instanceof Image||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageBitmap?c:null}function asArrayLike(c){return c instanceof Uint8Array||c instanceof Uint8ClampedArray||c instanceof Float32Array||c instanceof DataView?c:null}const Cd=new Error("disposed");let Ed=null;const Pd=[256,256];class DataTile extends yo{constructor(c){const u=po;super(c.tileCoord,u,{transition:c.transition,interpolate:c.interpolate}),this.loader_=c.loader,this.data_=null,this.error_=null,this.size_=c.size||null,this.controller_=c.controller||null}getSize(){if(this.size_)return this.size_;const c=asImageLike(this.data_);return c?[c.width,c.height]:Pd}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==po&&this.state!==fo)return;this.state=go,this.changed();const c=this;this.loader_().then((function(u){c.data_=u,c.state=mo,c.changed()})).catch((function(u){c.error_=u,c.state=fo,c.changed()}))}disposeInternal(){this.controller_&&(this.controller_.abort(Cd),this.controller_=null),super.disposeInternal()}}class Triangulation{constructor(c,u,d,p,g,f){this.sourceProj_=c,this.targetProj_=u;let _={};const y=getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(c){const u=c[0]+"/"+c[1];return _[u]||(_[u]=y(c)),_[u]},this.maxSourceExtent_=p,this.errorThresholdSquared_=g*g,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!p&&!!this.sourceProj_.getExtent()&&getWidth(p)>=getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?getWidth(this.targetProj_.getExtent()):null;const x=getTopLeft(d),v=getTopRight(d),C=getBottomRight(d),M=getBottomLeft(d),T=this.transformInv_(x),L=this.transformInv_(v),A=this.transformInv_(C),I=this.transformInv_(M),k=10+(f?Math.max(0,Math.ceil(Math.log2(getArea(d)/(f*f*256*256)))):0);if(this.addQuad_(x,v,C,M,T,L,A,I,k),this.wrapsXInSource_){let c=1/0;this.triangles_.forEach((function(u,d,p){c=Math.min(c,u.source[0][0],u.source[1][0],u.source[2][0])})),this.triangles_.forEach((u=>{if(Math.max(u.source[0][0],u.source[1][0],u.source[2][0])-c>this.sourceWorldWidth_/2){const d=[[u.source[0][0],u.source[0][1]],[u.source[1][0],u.source[1][1]],[u.source[2][0],u.source[2][1]]];d[0][0]-c>this.sourceWorldWidth_/2&&(d[0][0]-=this.sourceWorldWidth_),d[1][0]-c>this.sourceWorldWidth_/2&&(d[1][0]-=this.sourceWorldWidth_),d[2][0]-c>this.sourceWorldWidth_/2&&(d[2][0]-=this.sourceWorldWidth_);const p=Math.min(d[0][0],d[1][0],d[2][0]);Math.max(d[0][0],d[1][0],d[2][0])-p<this.sourceWorldWidth_/2&&(u.source=d)}}))}_={}}addTriangle_(c,u,d,p,g,f){this.triangles_.push({source:[p,g,f],target:[c,u,d]})}addQuad_(c,u,d,p,g,f,_,y,x){const v=boundingExtent([g,f,_,y]),C=this.sourceWorldWidth_?getWidth(v)/this.sourceWorldWidth_:null,M=this.sourceWorldWidth_,T=this.sourceProj_.canWrapX()&&C>.5&&C<1;let L=!1;if(x>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){L=getWidth(boundingExtent([c,u,d,p]))/this.targetWorldWidth_>.25||L}!T&&this.sourceProj_.isGlobal()&&C&&(L=C>.25||L)}if(!L&&this.maxSourceExtent_&&isFinite(v[0])&&isFinite(v[1])&&isFinite(v[2])&&isFinite(v[3])&&!intersects$1(v,this.maxSourceExtent_))return;let A=0;if(!(L||isFinite(g[0])&&isFinite(g[1])&&isFinite(f[0])&&isFinite(f[1])&&isFinite(_[0])&&isFinite(_[1])&&isFinite(y[0])&&isFinite(y[1])))if(x>0)L=!0;else if(A=(isFinite(g[0])&&isFinite(g[1])?0:8)+(isFinite(f[0])&&isFinite(f[1])?0:4)+(isFinite(_[0])&&isFinite(_[1])?0:2)+(isFinite(y[0])&&isFinite(y[1])?0:1),1!=A&&2!=A&&4!=A&&8!=A)return;if(x>0){if(!L){const u=[(c[0]+d[0])/2,(c[1]+d[1])/2],p=this.transformInv_(u);let f;if(T){f=(modulo(g[0],M)+modulo(_[0],M))/2-modulo(p[0],M)}else f=(g[0]+_[0])/2-p[0];const y=(g[1]+_[1])/2-p[1];L=f*f+y*y>this.errorThresholdSquared_}if(L){if(Math.abs(c[0]-d[0])<=Math.abs(c[1]-d[1])){const v=[(u[0]+d[0])/2,(u[1]+d[1])/2],C=this.transformInv_(v),M=[(p[0]+c[0])/2,(p[1]+c[1])/2],T=this.transformInv_(M);this.addQuad_(c,u,v,M,g,f,C,T,x-1),this.addQuad_(M,v,d,p,T,C,_,y,x-1)}else{const v=[(c[0]+u[0])/2,(c[1]+u[1])/2],C=this.transformInv_(v),M=[(d[0]+p[0])/2,(d[1]+p[1])/2],T=this.transformInv_(M);this.addQuad_(c,v,M,p,g,C,T,y,x-1),this.addQuad_(v,u,d,M,C,f,_,T,x-1)}return}}if(T){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&A||this.addTriangle_(c,d,p,g,_,y),14&A||this.addTriangle_(c,d,u,g,_,f),A&&(13&A||this.addTriangle_(u,p,c,f,y,g),7&A||this.addTriangle_(u,p,d,f,y,_))}calculateSourceExtent(){const c=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(u,d,p){const g=u.source;extendCoordinate(c,g[0]),extendCoordinate(c,g[1]),extendCoordinate(c,g[2])})),c}getTriangles(){return this.triangles_}}let bd;const Md=[];function drawTestTriangle(c,u,d,p,g){c.beginPath(),c.moveTo(0,0),c.lineTo(u,d),c.lineTo(p,g),c.closePath(),c.save(),c.clip(),c.fillRect(0,0,Math.max(u,p)+1,Math.max(d,g)),c.restore()}function verifyBrokenDiagonalRendering(c,u){return Math.abs(c[4*u]-210)>2||Math.abs(c[4*u+3]-191.25)>2}function calculateSourceResolution(c,u,d,p){const g=transform$1(d,u,c);let f=getPointResolution(u,p,d);const _=u.getMetersPerUnit();void 0!==_&&(f*=_);const y=c.getMetersPerUnit();void 0!==y&&(f/=y);const x=c.getExtent();if(!x||containsCoordinate(x,g)){const u=getPointResolution(c,f,g)/f;isFinite(u)&&u>0&&(f/=u)}return f}function calculateSourceExtentResolution(c,u,d,p){const g=getCenter(d);let f=calculateSourceResolution(c,u,g,p);return(!isFinite(f)||f<=0)&&forEachCorner(d,(function(d){return f=calculateSourceResolution(c,u,d,p),isFinite(f)&&f>0})),f}function render$1(c,u,d,p,g,f,_,y,x,v,C,M,T,L){const A=createCanvasContext2D(Math.round(d*c),Math.round(d*u),Md);if(M||(A.imageSmoothingEnabled=!1),0===x.length)return A.canvas;function pixelRound(c){return Math.round(c*d)/d}A.scale(d,d),A.globalCompositeOperation="lighter";const I=[1/0,1/0,-1/0,-1/0];let k;x.forEach((function(c,u,d){extend$2(I,c.extent)}));const O=d/p,N=(M?1:1+Math.pow(2,-24))/O;if(!T||1!==x.length||0!==v){if(k=createCanvasContext2D(Math.round(getWidth(I)*O),Math.round(getHeight(I)*O),Md),M||(k.imageSmoothingEnabled=!1),g&&L){const c=(g[0]-I[0])*O,u=-(g[3]-I[3])*O,d=getWidth(g)*O,p=getHeight(g)*O;k.rect(c,u,d,p),k.clip()}x.forEach((function(c,u,d){if(c.image.width>0&&c.image.height>0){if(c.clipExtent){k.save();const u=(c.clipExtent[0]-I[0])*O,d=-(c.clipExtent[3]-I[3])*O,p=getWidth(c.clipExtent)*O,g=getHeight(c.clipExtent)*O;k.rect(M?u:Math.round(u),M?d:Math.round(d),M?p:Math.round(u+p)-Math.round(u),M?g:Math.round(d+g)-Math.round(d)),k.clip()}const u=(c.extent[0]-I[0])*O,d=-(c.extent[3]-I[3])*O,p=getWidth(c.extent)*O,g=getHeight(c.extent)*O;k.drawImage(c.image,v,v,c.image.width-2*v,c.image.height-2*v,M?u:Math.round(u),M?d:Math.round(d),M?p:Math.round(u+p)-Math.round(u),M?g:Math.round(d+g)-Math.round(d)),c.clipExtent&&k.restore()}}))}const G=getTopLeft(_);return y.getTriangles().forEach((function(c,u,d){const p=c.source,g=c.target;let _=p[0][0],y=p[0][1],v=p[1][0],C=p[1][1],T=p[2][0],L=p[2][1];const O=pixelRound((g[0][0]-G[0])/f),j=pixelRound(-(g[0][1]-G[1])/f),B=pixelRound((g[1][0]-G[0])/f),V=pixelRound(-(g[1][1]-G[1])/f),q=pixelRound((g[2][0]-G[0])/f),Z=pixelRound(-(g[2][1]-G[1])/f),K=_,J=y;_=0,y=0,v-=K,C-=J,T-=K,L-=J;const ct=function solveLinearSystem(c){const u=c.length;for(let d=0;d<u;d++){let p=d,g=Math.abs(c[d][d]);for(let f=d+1;f<u;f++){const u=Math.abs(c[f][d]);u>g&&(g=u,p=f)}if(0===g)return null;const f=c[p];c[p]=c[d],c[d]=f;for(let p=d+1;p<u;p++){const g=-c[p][d]/c[d][d];for(let f=d;f<u+1;f++)d==f?c[p][f]=0:c[p][f]+=g*c[d][f]}}const d=new Array(u);for(let p=u-1;p>=0;p--){d[p]=c[p][u]/c[p][p];for(let g=p-1;g>=0;g--)c[g][u]-=c[g][p]*d[p]}return d}([[v,C,0,0,B-O],[T,L,0,0,q-O],[0,0,v,C,V-j],[0,0,T,L,Z-j]]);if(!ct)return;if(A.save(),A.beginPath(),function isBrokenDiagonalRendering(){if(void 0===bd){const c=createCanvasContext2D(6,6,Md);c.globalCompositeOperation="lighter",c.fillStyle="rgba(210, 0, 0, 0.75)",drawTestTriangle(c,4,5,4,0),drawTestTriangle(c,4,5,0,5);const u=c.getImageData(0,0,3,3).data;bd=verifyBrokenDiagonalRendering(u,0)||verifyBrokenDiagonalRendering(u,4)||verifyBrokenDiagonalRendering(u,8),releaseCanvas$1(c),Md.push(c.canvas)}return bd}()||!M){A.moveTo(B,V);const c=4,u=O-B,d=j-V;for(let p=0;p<c;p++)A.lineTo(B+pixelRound((p+1)*u/c),V+pixelRound(p*d/(c-1))),p!=c-1&&A.lineTo(B+pixelRound((p+1)*u/c),V+pixelRound((p+1)*d/(c-1)));A.lineTo(q,Z)}else A.moveTo(B,V),A.lineTo(O,j),A.lineTo(q,Z);let ft;if(A.clip(),A.transform(ct[0],ct[2],ct[1],ct[3],O,j),A.translate(I[0]-K,I[3]-J),k)ft=k.canvas,A.scale(N,-N);else{const c=x[0],u=c.extent;ft=c.image,A.scale(getWidth(u)/ft.width,-getHeight(u)/ft.height)}A.drawImage(ft,0,0),A.restore()})),k&&(releaseCanvas$1(k),Md.push(k.canvas)),C&&(A.save(),A.globalCompositeOperation="source-over",A.strokeStyle="black",A.lineWidth=1,y.getTriangles().forEach((function(c,u,d){const p=c.target,g=(p[0][0]-G[0])/f,_=-(p[0][1]-G[1])/f,y=(p[1][0]-G[0])/f,x=-(p[1][1]-G[1])/f,v=(p[2][0]-G[0])/f,C=-(p[2][1]-G[1])/f;A.beginPath(),A.moveTo(y,x),A.lineTo(g,_),A.lineTo(v,C),A.closePath(),A.stroke()})),A.restore()),A.canvas}class ReprojDataTile extends DataTile{constructor(c){super({tileCoord:c.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:c.interpolate,transition:c.transition}),this.pixelRatio_=c.pixelRatio,this.gutter_=c.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=c.sourceTileGrid,this.targetTileGrid_=c.targetTileGrid,this.wrappedTileCoord_=c.wrappedTileCoord||c.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const u=c.sourceProj,d=u.getExtent(),p=c.sourceTileGrid.getExtent();this.clipExtent_=u.canWrapX()?p?getIntersection(d,p):d:p;const g=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const y=f?getIntersection(g,f):g;if(0===getArea(y))return void(this.state=_o);d&&(_=_?getIntersection(_,d):d);const x=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),v=c.targetProj,C=calculateSourceExtentResolution(u,v,y,x);if(!isFinite(C)||C<=0)return void(this.state=_o);const M=void 0!==c.errorThreshold?c.errorThreshold:.5;if(this.triangulation_=new Triangulation(u,v,y,_,C*M,x),0===this.triangulation_.getTriangles().length)return void(this.state=_o);this.sourceZ_=this.sourceTileGrid_.getZForResolution(C);let T=this.triangulation_.calculateSourceExtent();if(_&&(u.canWrapX()?(T[1]=clamp(T[1],_[1],_[3]),T[3]=clamp(T[3],_[1],_[3])):T=getIntersection(T,_)),getArea(T)){let p=0,g=0;u.canWrapX()&&(p=getWidth(d),g=Math.floor((T[0]-d[0])/p));wrapAndSliceX(T.slice(),u,!0).forEach((u=>{const d=this.sourceTileGrid_.getTileRangeForExtentAndZ(u,this.sourceZ_),f=c.getTileFunction;for(let c=d.minX;c<=d.maxX;c++)for(let u=d.minY;u<=d.maxY;u++){const d=f(this.sourceZ_,c,u,this.pixelRatio_);if(d){const c=g*p;this.sourceTiles_.push({tile:d,offset:c})}}++g})),0===this.sourceTiles_.length&&(this.state=_o)}else this.state=_o}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const c=[];let u=!1;if(this.sourceTiles_.forEach((d=>{const p=d.tile;if(!p||p.getState()!==mo)return;const g=p.getSize(),f=this.gutter_;let _;const y=asArrayLike(p.getData());y?_=y:(u=!0,_=function toArray(c){Ed||(Ed=createCanvasContext2D(c.width,c.height,void 0,{willReadFrequently:!0}));const u=Ed.canvas,d=c.width;u.width!==d&&(u.width=d);const p=c.height;return u.height!==p&&(u.height=p),Ed.clearRect(0,0,d,p),Ed.drawImage(c,0,0),Ed.getImageData(0,0,d,p).data}(asImageLike(p.getData())));const x=[g[0]+2*f,g[1]+2*f],v=_ instanceof Float32Array,C=x[0]*x[1],M=v?Float32Array:Uint8ClampedArray,T=new M(_.buffer),L=M.BYTES_PER_ELEMENT,A=L*T.length/C,I=T.byteLength/x[1],k=Math.floor(I/L/x[0]),O=C*k;let N=T;if(T.length!==O){N=new M(O);let c=0,u=0;const d=x[0]*k;for(let p=0;p<x[1];++p){for(let p=0;p<d;++p)N[c++]=T[u+p];u+=I/L}}const G=this.sourceTileGrid_.getTileCoordExtent(p.tileCoord);G[0]+=d.offset,G[2]+=d.offset;const j=this.clipExtent_?.slice();j&&(j[0]+=d.offset,j[2]+=d.offset),c.push({extent:G,clipExtent:j,data:new Uint8ClampedArray(N.buffer),dataType:M,bytesPerPixel:A,pixelSize:x})})),this.sourceTiles_.length=0,0===c.length)return this.state=fo,void this.changed();const d=this.wrappedTileCoord_[0],p=this.targetTileGrid_.getTileSize(d),g="number"==typeof p?p:p[0],f="number"==typeof p?p:p[1],_=this.targetTileGrid_.getResolution(d),y=this.sourceTileGrid_.getResolution(this.sourceZ_),x=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);let v,C;const M=c[0].bytesPerPixel;for(let u=Math.ceil(M/3)-1;u>=0;--u){const d=[];for(let p=0,g=c.length;p<g;++p){const g=c[p],f=g.data,_=g.pixelSize,y=_[0],x=_[1],v=createCanvasContext2D(y,x,Md),C=v.createImageData(y,x),T=C.data;let L=3*u;for(let c=0,u=T.length;c<u;c+=4)T[c]=f[L],T[c+1]=f[L+1],T[c+2]=f[L+2],T[c+3]=255,L+=M;v.putImageData(C,0,0),d.push({extent:g.extent,clipExtent:g.clipExtent,image:v.canvas})}const p=render$1(g,f,this.pixelRatio_,y,this.sourceTileGrid_.getExtent(),_,x,this.triangulation_,d,this.gutter_,!1,!1,!1);for(let c=0,u=d.length;c<u;++c){const u=d[c].image.getContext("2d");releaseCanvas$1(u),Md.push(u.canvas)}const T=p.getContext("2d"),L=T.getImageData(0,0,p.width,p.height);releaseCanvas$1(T),Md.push(p),v||(C=new Uint8ClampedArray(M*L.width*L.height),v=new c[0].dataType(C.buffer));const A=L.data;let I=3*u;for(let c=0,u=A.length;c<u;c+=4)255===A[c+3]?(C[I]=A[c],C[I+1]=A[c+1],C[I+2]=A[c+2]):(C[I]=0,C[I+1]=0,C[I+2]=0),I+=M}if(u){const c=createCanvasContext2D(g,f),u=new ImageData(v,g);c.putImageData(u,0,0),this.reprojData_=c.canvas}else this.reprojData_=v;this.reprojSize_=[Math.round(g*this.pixelRatio_),Math.round(f*this.pixelRatio_)],this.state=mo,this.changed()}load(){if(this.state!==po&&this.state!==fo)return;this.state=go,this.changed();let c=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:u})=>{const d=u.getState();if(d!==po&&d!==go)return;c++;const p=listen(u,_i,(()=>{const d=u.getState();d!=mo&&d!=fo&&d!=_o||(unlistenByKey(p),c--,0===c&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(p)})),0===c?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:c}){c.getState()==po&&c.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}}class ReprojTile extends yo{constructor(c,u,d,p,g,f,_,y,x,v,C,M){super(g,po,M),this.renderEdges_=void 0!==C&&C,this.pixelRatio_=_,this.gutter_=y,this.canvas_=null,this.sourceTileGrid_=u,this.targetTileGrid_=p,this.wrappedTileCoord_=f||g,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=c.canWrapX()?c.getExtent():void 0;const T=p.getTileCoordExtent(this.wrappedTileCoord_),L=this.targetTileGrid_.getExtent();let A=this.sourceTileGrid_.getExtent();const I=L?getIntersection(T,L):T;if(0===getArea(I))return void(this.state=_o);const k=c.getExtent();k&&(A=A?getIntersection(A,k):k);const O=p.getResolution(this.wrappedTileCoord_[0]),N=calculateSourceExtentResolution(c,d,I,O);if(!isFinite(N)||N<=0)return void(this.state=_o);const G=void 0!==v?v:.5;if(this.triangulation_=new Triangulation(c,d,I,A,N*G,O),0===this.triangulation_.getTriangles().length)return void(this.state=_o);this.sourceZ_=u.getZForResolution(N);let j=this.triangulation_.calculateSourceExtent();if(A&&(c.canWrapX()?(j[1]=clamp(j[1],A[1],A[3]),j[3]=clamp(j[3],A[1],A[3])):j=getIntersection(j,A)),getArea(j)){let d=0,p=0;c.canWrapX()&&(d=getWidth(k),p=Math.floor((j[0]-k[0])/d));wrapAndSliceX(j.slice(),c,!0).forEach((c=>{const g=u.getTileRangeForExtentAndZ(c,this.sourceZ_);for(let c=g.minX;c<=g.maxX;c++)for(let u=g.minY;u<=g.maxY;u++){const g=x(this.sourceZ_,c,u,_);if(g){const c=p*d;this.sourceTiles_.push({tile:g,offset:c})}}++p})),0===this.sourceTiles_.length&&(this.state=_o)}else this.state=_o}getImage(){return this.canvas_}reproject_(){const c=[];if(this.sourceTiles_.forEach((u=>{const d=u.tile;if(d&&d.getState()==mo){const p=this.sourceTileGrid_.getTileCoordExtent(d.tileCoord);p[0]+=u.offset,p[2]+=u.offset;const g=this.clipExtent_?.slice();g&&(g[0]+=u.offset,g[2]+=u.offset),c.push({extent:p,clipExtent:g,image:d.getImage()})}})),this.sourceTiles_.length=0,0===c.length)this.state=fo;else{const u=this.wrappedTileCoord_[0],d=this.targetTileGrid_.getTileSize(u),p="number"==typeof d?d:d[0],g="number"==typeof d?d:d[1],f=this.targetTileGrid_.getResolution(u),_=this.sourceTileGrid_.getResolution(this.sourceZ_),y=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=render$1(p,g,this.pixelRatio_,_,this.sourceTileGrid_.getExtent(),f,y,this.triangulation_,c,this.gutter_,this.renderEdges_,this.interpolate),this.state=mo}this.changed()}load(){if(this.state==po){this.state=go,this.changed();let c=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:u})=>{const d=u.getState();if(d==po||d==go){c++;const d=listen(u,_i,(p=>{const g=u.getState();g!=mo&&g!=fo&&g!=_o||(unlistenByKey(d),c--,0===c&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(d)}})),0===c?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:c},u,d){c.getState()==po&&c.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&(releaseCanvas$1(this.canvas_.getContext("2d")),Md.push(this.canvas_),this.canvas_=null),super.release()}}class BaseTileRepresentation extends Target{constructor(c){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter=c.gutter||0,this.helper=c.helper,this.loaded=!1,this.ready=!1}setTile(c){if(c!==this.tile)if(this.tile&&this.tile.removeEventListener(_i,this.handleTileChange_),this.tile=c,this.loaded=c.getState()===mo,this.loaded)this.uploadTile();else{if(c instanceof xo){const u=c.getImage();u instanceof Image&&!u.crossOrigin&&(u.crossOrigin="anonymous")}c.addEventListener(_i,this.handleTileChange_)}}uploadTile(){abstract()}setReady(){this.ready=!0,this.dispatchEvent(_i)}handleTileChange_(){this.tile.getState()===mo&&(this.loaded=!0,this.uploadTile())}setHelper(c){this.helper=c,this.helper&&this.loaded&&this.uploadTile()}disposeInternal(){this.setHelper(null),this.tile.removeEventListener(_i,this.handleTileChange_)}}function bindAndConfigure(c,u,d){const p=d?c.LINEAR:c.NEAREST;c.bindTexture(c.TEXTURE_2D,u),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,p),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,p)}function uploadDataTexture(c,u,d,p,g,f){const _=c.getGL();let y,x;if(d instanceof Float32Array){y=_.FLOAT,c.getExtension("OES_texture_float");x=null!==c.getExtension("OES_texture_float_linear")}else y=_.UNSIGNED_BYTE,x=!0;bindAndConfigure(_,u,f&&x);const v=d.byteLength/p[1];let C,M=1;switch(v%8==0?M=8:v%4==0?M=4:v%2==0&&(M=2),g){case 1:C=_.LUMINANCE;break;case 2:C=_.LUMINANCE_ALPHA;break;case 3:C=_.RGB;break;case 4:C=_.RGBA;break;default:throw new Error(`Unsupported number of bands: ${g}`)}const T=_.getParameter(_.UNPACK_ALIGNMENT);_.pixelStorei(_.UNPACK_ALIGNMENT,M),_.texImage2D(_.TEXTURE_2D,0,C,p[0],p[1],0,C,y,d),_.pixelStorei(_.UNPACK_ALIGNMENT,T)}let Td=null;class TileTexture extends BaseTileRepresentation{constructor(c){super(c),this.textures=[],this.renderSize_=toSize(c.grid.getTileSize(c.tile.tileCoord[0])),this.bandCount=NaN;const u=new WebGLArrayBuffer(id,nd);u.fromArray([0,1,1,1,1,0,0,0]),this.helper.flushBufferData(u),this.coords=u,this.setTile(c.tile)}setHelper(c){const u=this.helper?.getGL();if(u){this.helper.deleteBuffer(this.coords);for(let c=0;c<this.textures.length;++c)u.deleteTexture(this.textures[c])}super.setHelper(c),c&&c.flushBufferData(this.coords)}uploadTile(){const c=this.helper,u=c.getGL(),d=this.tile;let p;this.textures.length=0,p=d instanceof xo||d instanceof ReprojTile?d.getImage():d.getData();const g=asImageLike(p);if(g){const c=u.createTexture();return this.textures.push(c),this.bandCount=4,function uploadImageTexture(c,u,d,p){bindAndConfigure(c,u,p),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d)}(u,c,g,d.interpolate),void this.setReady()}p=asArrayLike(p);const f=d.getSize(),_=[f[0]+2*this.gutter,f[1]+2*this.gutter],y=p instanceof Float32Array,x=_[0]*_[1],v=y?Float32Array:Uint8Array,C=v.BYTES_PER_ELEMENT,M=p.byteLength/_[1];this.bandCount=Math.floor(M/C/_[0]);const T=Math.ceil(this.bandCount/4);if(1===T){const g=u.createTexture();return this.textures.push(g),uploadDataTexture(c,g,p,_,this.bandCount,d.interpolate),void this.setReady()}const L=new Array(T);for(let c=0;c<T;++c){const d=u.createTexture();this.textures.push(d);const p=c<T-1?4:(this.bandCount-1)%4+1;L[c]=new v(x*p)}let A=0,I=0;const k=_[0]*this.bandCount;for(let c=0;c<_[1];++c){for(let c=0;c<k;++c){const u=p[I+c],d=Math.floor(A/this.bandCount),g=c%this.bandCount,f=L[Math.floor(g/4)];f[d*(f.length/x)+g%4]=u,++A}I+=M/C}for(let u=0;u<T;++u){const p=this.textures[u],g=L[u];uploadDataTexture(c,p,g,_,g.length/x,d.interpolate)}this.setReady()}getImagePixelData_(c,u,d){const p=this.gutter,g=this.renderSize_[0],f=this.renderSize_[1];Td||function createPixelContext(){Td=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}(),Td.clearRect(0,0,1,1);const _=c.width-2*p,y=c.height-2*p,x=p+Math.floor(_*(u/g)),v=p+Math.floor(y*(d/f));let C;try{Td.drawImage(c,x,v,1,1,0,0,1,1),C=Td.getImageData(0,0,1,1).data}catch(c){return Td=null,null}return C}getArrayPixelData_(c,u,d,p){const g=this.gutter,f=this.renderSize_[0],_=this.renderSize_[1],y=u[0],x=u[1],v=y+2*g,C=x+2*g,M=g+Math.floor(y*(d/f)),T=g+Math.floor(x*(p/_));if(c instanceof DataView){const u=c.byteLength/(v*C),d=u*(T*v+M),p=c.buffer.slice(d,d+u);return new DataView(p)}const L=this.bandCount*(T*v+M);return c.slice(L,L+this.bandCount)}getPixelData(c,u){if(!this.loaded)return null;if(this.tile instanceof DataTile){const d=this.tile.getData(),p=asArrayLike(d);if(p){const d=this.tile.getSize();return this.getArrayPixelData_(p,d,c,u)}return this.getImagePixelData_(asImageLike(d),c,u)}return this.getImagePixelData_(this.tile.getImage(),c,u)}}const Rd={};function depthForZ(c){return 1/(c+2)}function lookupHasTile(c,u){return c.tileIds.has(getUid(u))}function addTileRepresentationToLookup(c,u,d){const p=c.representationsByZ;d in p||(p[d]=new Set),p[d].add(u),c.tileIds.add(getUid(u.tile))}function getRenderExtent$1(c,u){const d=c.layerStatesArray[c.layerIndex];d.extent&&(u=getIntersection(u,fromUserExtent(d.extent,c.viewState.projection)));const p=d.layer.getRenderSource();if(!p.getWrapX()){const d=p.getTileGridForProjection(c.viewState.projection).getExtent();d&&(u=getIntersection(u,d))}return u}function getCacheKey$1(c,u){return`${c.getKey()},${getKey(u)}`}class WebGLBaseTileLayerRenderer extends WebGLLayerRenderer{constructor(c,u){super(c,{uniforms:u.uniforms,postProcesses:u.postProcesses}),this.renderComplete=!1,this.tileTransform_=[1,0,0,1,0,0],this.tempMat4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.tempTileRange_=new ha(0,0,0,0),this.tempTileCoord_=createOrUpdate$1(0,0,0),this.tempSize_=[0,0];const d=void 0!==u.cacheSize?u.cacheSize:512;this.tileRepresentationCache=new LRUCache(d),this.frameState=null,this.projection_=void 0}reset(c){super.reset({uniforms:c.uniforms})}prepareFrameInternal(c){this.projection_?c.viewState.projection!==this.projection_&&(this.clearCache(),this.projection_=c.viewState.projection):this.projection_=c.viewState.projection;const u=this.getLayer().getRenderSource();return!!u&&(!isEmpty(getRenderExtent$1(c,c.extent))&&"ready"===u.getState())}createTileRepresentation(c){return abstract()}enqueueTiles(c,u,d,p,g){const f=c.viewState,_=this.getLayer(),y=_.getRenderSource(),x=y.getTileGridForProjection(f.projection),v=y.getGutterForProjection(f.projection),C=getUid(y);C in c.wantedTiles||(c.wantedTiles[C]={});const M=c.wantedTiles[C],T=this.tileRepresentationCache,L=_.getMapInternal(),A=Math.max(d-g,x.getMinZoom(),x.getZForResolution(Math.min(_.getMaxResolution(),L?L.getView().getResolutionForZoom(Math.max(_.getMinZoom(),0)):x.getResolution(0)),y.zDirection));for(let g=d;g>=A;--g){const d=x.getTileRangeForExtentAndZ(u,g,this.tempTileRange_),_=x.getResolution(g);for(let u=d.minX;u<=d.maxX;++u)for(let L=d.minY;L<=d.maxY;++L){const d=createOrUpdate$1(g,u,L,this.tempTileCoord_),A=getCacheKey$1(y,d);let I,k;if(T.containsKey(A)&&(I=T.get(A),k=I.tile),!(I&&I.tile.key===y.getKey()||(k=y.getTile(g,u,L,c.pixelRatio,f.projection),k)))continue;if(lookupHasTile(p,k))continue;I?I.setTile(k):(I=this.createTileRepresentation({tile:k,grid:x,helper:this.helper,gutter:v}),T.set(A,I)),addTileRepresentationToLookup(p,I,g);const O=k.getKey();M[O]=!0,k.getState()===po&&(c.tileQueue.isKeyQueued(O)||c.tileQueue.enqueue([k,C,x.getTileCoordCenter(d),_]))}}}beforeTilesRender(c,u){this.helper.prepareDraw(this.frameState,!u,!0)}beforeTilesMaskRender(c){return!1}renderTile(c,u,d,p,g,f,_,y,x,v,C){}renderTileMask(c,u,d,p){}drawTile_(c,u,d,p,g,f,_){if(!u.ready)return;const y=u.tile.tileCoord,x=getKey(y),v=x in f?f[x]:1,C=_.getResolution(d),M=toSize(_.getTileSize(d),this.tempSize_),T=_.getOrigin(d),L=_.getTileCoordExtent(y),A=v<1?-1:depthForZ(d);v<1&&(c.animate=!0);const I=c.viewState,k=I.center[0],O=I.center[1],N=M[0]+2*p,G=M[1]+2*p,j=N/G,B=(k-T[0])/(M[0]*C),V=(T[1]-O)/(M[1]*C),q=I.resolution/C,Z=y[1],K=y[2];reset(this.tileTransform_),scale$3(this.tileTransform_,2/(c.size[0]*q/N),-2/(c.size[1]*q/N)),function rotate$2(c,u){const d=Math.cos(u),p=Math.sin(u);return multiply(c,set(Oi,d,p,-p,d,0,0))}(this.tileTransform_,I.rotation),scale$3(this.tileTransform_,1,1/j),translate$1(this.tileTransform_,(M[0]*(Z-B)-p)/N,(M[1]*(K-V)-p)/G),this.renderTile(u,this.tileTransform_,c,g,C,M,T,L,A,p,v)}renderFrame(c){this.frameState=c,this.renderComplete=!0;const u=this.helper.getGL();this.preRender(u,c);const d=c.viewState,p=this.getLayer(),g=p.getRenderSource(),f=g.getTileGridForProjection(d.projection),_=g.getGutterForProjection(d.projection),y=getRenderExtent$1(c,c.extent),x=f.getZForResolution(d.resolution,g.zDirection),v=function newTileRepresentationLookup(){return{tileIds:new Set,representationsByZ:{}}}(),C=p.getPreload();if(c.nextExtent){const u=f.getZForResolution(d.nextResolution,g.zDirection),p=getRenderExtent$1(c,c.nextExtent);this.enqueueTiles(c,p,u,v,C)}this.enqueueTiles(c,y,x,v,0),C>0&&setTimeout((()=>{this.enqueueTiles(c,y,x-1,v,C-1)}),0);const M={},T=getUid(this),L=c.time;let A=!1;const I=v.representationsByZ;if(x in I)for(const c of I[x]){const u=c.tile;if((u instanceof ReprojTile||u instanceof ReprojDataTile)&&u.getState()===_o)continue;const d=u.tileCoord;if(c.ready){const c=u.getAlpha(T,L);if(1===c){u.endTransition(T);continue}A=!0;M[getKey(d)]=c}this.renderComplete=!1;if(this.findAltTiles_(f,d,x+1,v))continue;const p=f.getMinZoom();for(let c=x-1;c>=p;--c){if(this.findAltTiles_(f,d,c,v))break}}const k=Object.keys(I).map(Number).sort(descending);if(this.beforeTilesMaskRender(c))for(let c=0,u=k.length;c<u;++c){const u=k[c];for(const c of I[u]){const d=c.tile.tileCoord;if(getKey(d)in M)continue;const p=f.getTileCoordExtent(d);this.renderTileMask(c,u,p,depthForZ(u))}}this.beforeTilesRender(c,A);for(let u=0,d=k.length;u<d;++u){const d=k[u];for(const u of I[d]){getKey(u.tile.tileCoord)in M||this.drawTile_(c,u,d,_,y,M,f)}}if(x in I)for(const u of I[x]){getKey(u.tile.tileCoord)in M&&this.drawTile_(c,u,x,_,y,M,f)}this.helper.finalizeDraw(c,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const O=this.helper.getCanvas(),N=this.tileRepresentationCache;for(;N.canExpireCache();){N.pop().dispose()}return c.postRenderFunctions.push((function(c,u){g.expireCache(u.viewState.projection,Rd)})),this.postRender(u,c),O}findAltTiles_(c,u,d,p){const g=c.getTileRangeForTileCoordAndZ(u,d,this.tempTileRange_);if(!g)return!1;let f=!0;const _=this.tileRepresentationCache,y=this.getLayer().getRenderSource();for(let c=g.minX;c<=g.maxX;++c)for(let u=g.minY;u<=g.maxY;++u){const g=getCacheKey$1(y,[d,c,u]);let x=!1;if(_.containsKey(g)){const c=_.get(g);c.ready&&!lookupHasTile(p,c.tile)&&(addTileRepresentationToLookup(p,c,d),x=!0)}x||(f=!1)}return f}clearCache(){super.clearCache();const c=this.tileRepresentationCache;c.forEach((c=>c.dispose())),c.clear()}afterHelperCreated(){super.afterHelperCreated(),this.tileRepresentationCache.forEach((c=>c.setHelper(this.helper)))}disposeInternal(){super.disposeInternal(),delete this.frameState}}const Ld={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},Ad="a_textureCoord",Id=[{name:Ad,size:2,type:yd.FLOAT}];class WebGLTileLayerRenderer extends WebGLBaseTileLayerRenderer{constructor(c,u){super(c,u),this.program_,this.vertexShader_=u.vertexShader,this.fragmentShader_=u.fragmentShader,this.indices_=new WebGLArrayBuffer(rd,nd),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=u.paletteTextures||[]}reset(c){if(super.reset(c),this.helper){const c=this.helper.getGL();for(const u of this.paletteTextures_)u.delete(c)}this.vertexShader_=c.vertexShader,this.fragmentShader_=c.fragmentShader,this.paletteTextures_=c.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){super.afterHelperCreated(),this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const c=this.helper.getGL();for(const u of this.paletteTextures_)u.delete(c)}super.removeHelper()}createTileRepresentation(c){return new TileTexture(c)}beforeTilesRender(c,u){super.beforeTilesRender(c,u),this.helper.useProgram(this.program_,c)}renderTile(c,u,d,p,g,f,_,y,x,v,C){const M=this.helper.getGL();this.helper.bindBuffer(c.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(Id);let T=0;for(;T<c.textures.length;){const u=`${Ld.TILE_TEXTURE_ARRAY}[${T}]`;this.helper.bindTexture(c.textures[T],T,u),++T}for(let c=0;c<this.paletteTextures_.length;++c){const u=this.paletteTextures_[c],d=u.getTexture(M);this.helper.bindTexture(d,T,u.name),++T}const L=d.viewState,A=f[0]+2*v,I=f[1]+2*v,k=c.tile.tileCoord,O=k[1],N=k[2];this.helper.setUniformMatrixValue(Ld.TILE_TRANSFORM,fromTransform(this.tempMat4,u)),this.helper.setUniformFloatValue(Ld.TRANSITION_ALPHA,C),this.helper.setUniformFloatValue(Ld.DEPTH,x);let G=p;v>0&&(G=y,getIntersection(G,p,G)),this.helper.setUniformFloatVec4(Ld.RENDER_EXTENT,G),this.helper.setUniformFloatValue(Ld.RESOLUTION,L.resolution),this.helper.setUniformFloatValue(Ld.ZOOM,L.zoom),this.helper.setUniformFloatValue(Ld.TEXTURE_PIXEL_WIDTH,A),this.helper.setUniformFloatValue(Ld.TEXTURE_PIXEL_HEIGHT,I),this.helper.setUniformFloatValue(Ld.TEXTURE_RESOLUTION,g),this.helper.setUniformFloatValue(Ld.TEXTURE_ORIGIN_X,_[0]+O*f[0]*g-v*g),this.helper.setUniformFloatValue(Ld.TEXTURE_ORIGIN_Y,_[1]-N*f[1]*g+v*g),this.helper.drawElements(0,this.indices_.getSize())}getData(c){if(!this.helper.getGL())return null;const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=u.viewState,f=d.getExtent();if(f&&!containsCoordinate(fromUserExtent(f,g.projection),p))return null;const _=d.getSources(boundingExtent([p]),g.resolution);let y,x,v;for(y=_.length-1;y>=0;--y)if(x=_[y],"ready"===x.getState()){if(v=x.getTileGridForProjection(g.projection),x.getWrapX())break;const c=v.getExtent();if(!c||containsCoordinate(c,p))break}if(y<0)return null;const C=this.tileRepresentationCache;for(let c=v.getZForResolution(g.resolution);c>=v.getMinZoom();--c){const u=v.getTileCoordForCoordAndZ(p,c),d=getCacheKey$1(x,u);if(!C.containsKey(d))continue;const g=C.get(d),f=g.tile;if((f instanceof ReprojTile||f instanceof ReprojDataTile)&&f.getState()===_o)return null;if(!g.loaded)continue;const _=v.getOrigin(c),y=toSize(v.getTileSize(c)),M=v.getResolution(c),T=(p[0]-_[0])/M-u[1]*y[0],L=(_[1]-p[1])/M-u[2]*y[1];return g.getPixelData(T,L)}return null}disposeInternal(){const c=this.helper;if(c){const u=c.getGL();for(const c of this.paletteTextures_)c.delete(u);this.paletteTextures_.length=0,u.deleteProgram(this.program_),delete this.program_,c.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}function numberToGlsl(c){const u=c.toString();return u.includes(".")?u:u+".0"}function arrayToGlsl(c){if(c.length<2||c.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${c.length}(${c.map(numberToGlsl).join(", ")})`}function colorToGlsl(c){const u=asArray(c),d=u.length>3?u[3]:1;return arrayToGlsl([u[0]/255,u[1]/255,u[2]/255,d])}const Fd={};let kd=0;function getStringNumberEquivalent(c){return c in Fd||(Fd[c]=kd++),Fd[c]}function stringToGlsl(c){return numberToGlsl(getStringNumberEquivalent(c))}function uniformNameForVariable(c){return"u_var_"+c}const Od="getBandValue",Nd="u_paletteTextures";function createCompiler(c){return(u,d,p)=>{const g=d.args.length,f=new Array(g);for(let c=0;c<g;++c)f[c]=compile(d.args[c],p,u);return c(f,u)}}const Dd={[os.Get]:(c,u)=>{const d=u.args[0].value;d in c.properties||(c.properties[d]={name:d,type:u.type});return(c.inFragmentShader?"v_prop_":"a_prop_")+d},[os.GeometryType]:(c,u,d)=>{const p="geometryType";p in c.properties||(c.properties[p]={name:p,type:Qn,evaluator:c=>computeGeometryType(c.getGeometry())});return(c.inFragmentShader?"v_prop_":"a_prop_")+p},[os.LineMetric]:()=>"currentLineMetric",[os.Var]:(c,u)=>{const d=u.args[0].value;return d in c.variables||(c.variables[d]={name:d,type:u.type}),uniformNameForVariable(d)},[os.Resolution]:()=>"u_resolution",[os.Zoom]:()=>"u_zoom",[os.Time]:()=>"u_time",[os.Any]:createCompiler((c=>`(${c.join(" || ")})`)),[os.All]:createCompiler((c=>`(${c.join(" && ")})`)),[os.Not]:createCompiler((([c])=>`(!${c})`)),[os.Equal]:createCompiler((([c,u])=>`(${c} == ${u})`)),[os.NotEqual]:createCompiler((([c,u])=>`(${c} != ${u})`)),[os.GreaterThan]:createCompiler((([c,u])=>`(${c} > ${u})`)),[os.GreaterThanOrEqualTo]:createCompiler((([c,u])=>`(${c} >= ${u})`)),[os.LessThan]:createCompiler((([c,u])=>`(${c} < ${u})`)),[os.LessThanOrEqualTo]:createCompiler((([c,u])=>`(${c} <= ${u})`)),[os.Multiply]:createCompiler((c=>`(${c.join(" * ")})`)),[os.Divide]:createCompiler((([c,u])=>`(${c} / ${u})`)),[os.Add]:createCompiler((c=>`(${c.join(" + ")})`)),[os.Subtract]:createCompiler((([c,u])=>`(${c} - ${u})`)),[os.Clamp]:createCompiler((([c,u,d])=>`clamp(${c}, ${u}, ${d})`)),[os.Mod]:createCompiler((([c,u])=>`mod(${c}, ${u})`)),[os.Pow]:createCompiler((([c,u])=>`pow(${c}, ${u})`)),[os.Abs]:createCompiler((([c])=>`abs(${c})`)),[os.Floor]:createCompiler((([c])=>`floor(${c})`)),[os.Ceil]:createCompiler((([c])=>`ceil(${c})`)),[os.Round]:createCompiler((([c])=>`floor(${c} + 0.5)`)),[os.Sin]:createCompiler((([c])=>`sin(${c})`)),[os.Cos]:createCompiler((([c])=>`cos(${c})`)),[os.Atan]:createCompiler((([c,u])=>void 0!==u?`atan(${c}, ${u})`:`atan(${c})`)),[os.Sqrt]:createCompiler((([c])=>`sqrt(${c})`)),[os.Match]:createCompiler((c=>{const u=c[0],d=c[c.length-1];let p=null;for(let g=c.length-3;g>=1;g-=2){p=`(${u} == ${c[g]} ? ${c[g+1]} : ${p||d})`}return p})),[os.Between]:createCompiler((([c,u,d])=>`(${c} >= ${u} && ${c} <= ${d})`)),[os.Interpolate]:createCompiler((([c,u,...d])=>{let p="";for(let g=0;g<d.length-2;g+=2){const f=d[g],_=p||d[g+1],y=d[g+2],x=d[g+3];let v;v=c===numberToGlsl(1)?`(${u} - ${f}) / (${y} - ${f})`:`(pow(${c}, (${u} - ${f})) - 1.0) / (pow(${c}, (${y} - ${f})) - 1.0)`,p=`mix(${_}, ${x}, clamp(${v}, 0.0, 1.0))`}return p})),[os.Case]:createCompiler((c=>{const u=c[c.length-1];let d=null;for(let p=c.length-3;p>=0;p-=2){d=`(${c[p]} ? ${c[p+1]} : ${d||u})`}return d})),[os.In]:createCompiler((([c,...u],d)=>{const p=function computeOperatorFunctionName(c,u){return`operator_${c}_${Object.keys(u.functions).length}`}("in",d),g=[];for(let c=0;c<u.length;c+=1)g.push(`  if (inputValue == ${u[c]}) { return true; }`);return d.functions[p]=`bool ${p}(float inputValue) {\n${g.join("\n")}\n  return false;\n}`,`${p}(${c})`})),[os.Array]:createCompiler((c=>`vec${c.length}(${c.join(", ")})`)),[os.Color]:createCompiler((c=>{if(1===c.length)return`vec4(vec3(${c[0]} / 255.0), 1.0)`;if(2===c.length)return`vec4(vec3(${c[0]} / 255.0), ${c[1]})`;const u=c.slice(0,3).map((c=>`${c} / 255.0`));if(3===c.length)return`vec4(${u.join(", ")}, 1.0)`;const d=c[3];return`vec4(${u.join(", ")}, ${d})`})),[os.Band]:createCompiler((([c,u,d],p)=>{if(!(Od in p.functions)){let c="";const u=p.bandCount||1;for(let d=0;d<u;d++){const p=Math.floor(d/4);let g=d%4;d===u-1&&1===g&&(g=3);c+=`  if (band == ${d+1}.0) {\n    return texture2D(${`${Ld.TILE_TEXTURE_ARRAY}[${p}]`}, v_textureCoord + vec2(dx, dy))[${g}];\n  }\n`}p.functions[Od]=`float getBandValue(float band, float xOffset, float yOffset) {\n  float dx = xOffset / ${Ld.TEXTURE_PIXEL_WIDTH};\n  float dy = yOffset / ${Ld.TEXTURE_PIXEL_HEIGHT};\n${c}\n}`}return`${Od}(${c}, ${u??"0.0"}, ${d??"0.0"})`})),[os.Palette]:(c,u)=>{const[d,...p]=u.args,g=p.length,f=new Uint8Array(4*g);for(let c=0;c<p.length;c++){const u=asArray(p[c].value),d=4*c;f[d]=u[0],f[d+1]=u[1],f[d+2]=u[2],f[d+3]=255*u[3]}c.paletteTextures||(c.paletteTextures=[]);const _=`${Nd}[${c.paletteTextures.length}]`,y=new PaletteTexture(_,f);c.paletteTextures.push(y);return`texture2D(${_}, vec2((${compile(d,Jn,c)} + 0.5) / ${g}.0, 0.5))`}};function compile(c,u,d){if(c instanceof CallExpression){const p=Dd[c.operator];if(void 0===p)throw new Error(`No compiler defined for this operator: ${JSON.stringify(c.operator)}`);return p(d,c,u)}if((c.type&Jn)>0)return numberToGlsl(c.value);if((c.type&Hn)>0)return c.value.toString();if((c.type&Qn)>0)return stringToGlsl(c.value.toString());if((c.type&ts)>0)return colorToGlsl(c.value);if((c.type&es)>0)return arrayToGlsl(c.value);if((c.type&is)>0)return function sizeToGlsl(c){return arrayToGlsl(toSize(c))}(c.value);throw new Error(`Unexpected expression ${c.value} (expected type ${typeName(u)})`)}const Gd="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_screenToWorldMatrix;\nuniform vec2 u_viewportSizePx;\nuniform float u_pixelRatio;\nuniform float u_globalAlpha;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform float u_rotation;\nuniform vec4 u_renderExtent;\nuniform vec2 u_patternOrigin;\nuniform float u_depth;\nuniform mediump int u_hitDetection;\n\nconst float PI = 3.141592653589793238;\nconst float TWO_PI = 2.0 * PI;\nfloat currentLineMetric = 0.; // an actual value will be used in the stroke shaders\n",jd={"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"};class ShaderBuilder{constructor(){this.uniforms_=[],this.attributes_=[],this.varyings_=[],this.hasSymbol_=!1,this.symbolSizeExpression_=`vec2(${numberToGlsl(jd["circle-radius"])} + ${numberToGlsl(.5*jd["circle-stroke-width"])})`,this.symbolRotationExpression_="0.0",this.symbolOffsetExpression_="vec2(0.0)",this.symbolColorExpression_=colorToGlsl(jd["circle-fill-color"]),this.texCoordExpression_="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression_="false",this.symbolRotateWithView_=!1,this.hasStroke_=!1,this.strokeWidthExpression_=numberToGlsl(jd["stroke-width"]),this.strokeColorExpression_=colorToGlsl(jd["stroke-color"]),this.strokeOffsetExpression_="0.",this.strokeCapExpression_=stringToGlsl("round"),this.strokeJoinExpression_=stringToGlsl("round"),this.strokeMiterLimitExpression_="10.",this.strokeDistanceFieldExpression_="-1000.",this.hasFill_=!1,this.fillColorExpression_=colorToGlsl(jd["fill-color"]),this.vertexShaderFunctions_=[],this.fragmentShaderFunctions_=[]}addUniform(c){return this.uniforms_.push(c),this}addAttribute(c){return this.attributes_.push(c),this}addVarying(c,u,d){return this.varyings_.push({name:c,type:u,expression:d}),this}setSymbolSizeExpression(c){return this.hasSymbol_=!0,this.symbolSizeExpression_=c,this}getSymbolSizeExpression(){return this.symbolSizeExpression_}setSymbolRotationExpression(c){return this.symbolRotationExpression_=c,this}setSymbolOffsetExpression(c){return this.symbolOffsetExpression_=c,this}getSymbolOffsetExpression(){return this.symbolOffsetExpression_}setSymbolColorExpression(c){return this.hasSymbol_=!0,this.symbolColorExpression_=c,this}getSymbolColorExpression(){return this.symbolColorExpression_}setTextureCoordinateExpression(c){return this.texCoordExpression_=c,this}setFragmentDiscardExpression(c){return this.discardExpression_=c,this}getFragmentDiscardExpression(){return this.discardExpression_}setSymbolRotateWithView(c){return this.symbolRotateWithView_=c,this}setStrokeWidthExpression(c){return this.hasStroke_=!0,this.strokeWidthExpression_=c,this}setStrokeColorExpression(c){return this.hasStroke_=!0,this.strokeColorExpression_=c,this}getStrokeColorExpression(){return this.strokeColorExpression_}setStrokeOffsetExpression(c){return this.strokeOffsetExpression_=c,this}setStrokeCapExpression(c){return this.strokeCapExpression_=c,this}setStrokeJoinExpression(c){return this.strokeJoinExpression_=c,this}setStrokeMiterLimitExpression(c){return this.strokeMiterLimitExpression_=c,this}setStrokeDistanceFieldExpression(c){return this.strokeDistanceFieldExpression_=c,this}setFillColorExpression(c){return this.hasFill_=!0,this.fillColorExpression_=c,this}getFillColorExpression(){return this.fillColorExpression_}addVertexShaderFunction(c){this.vertexShaderFunctions_.includes(c)||this.vertexShaderFunctions_.push(c)}addFragmentShaderFunction(c){this.fragmentShaderFunctions_.includes(c)||this.fragmentShaderFunctions_.push(c)}getSymbolVertexShader(){return this.hasSymbol_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_prop_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 pxToScreen(vec2 coordPx) {\n  vec2 scaled = coordPx / u_viewportSizePx / 0.5;\n  return scaled;\n}\n\nvec2 screenToPx(vec2 coordScreen) {\n  return (coordScreen * 0.5 + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n  v_quadSizePx = ${this.symbolSizeExpression_};\n  vec2 halfSizePx = v_quadSizePx * 0.5;\n  vec2 centerOffsetPx = ${this.symbolOffsetExpression_};\n  vec2 offsetPx = centerOffsetPx;\n  if (a_index == 0.0) {\n    offsetPx -= halfSizePx;\n  } else if (a_index == 1.0) {\n    offsetPx += halfSizePx * vec2(1., -1.);\n  } else if (a_index == 2.0) {\n    offsetPx += halfSizePx;\n  } else {\n    offsetPx += halfSizePx * vec2(-1., 1.);\n  }\n  float angle = ${this.symbolRotationExpression_};\n  ${this.symbolRotateWithView_?"angle += u_rotation;":""}\n  float c = cos(-angle);\n  float s = sin(-angle);\n  offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y);\n  vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.);\n  vec4 texCoord = ${this.texCoordExpression_};\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  v_prop_hitColor = a_prop_hitColor;\n  v_angle = angle;\n  c = cos(-v_angle);\n  s = sin(-v_angle);\n  centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y); \n  v_centerPx = screenToPx(center.xy) + centerOffsetPx;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getSymbolFragmentShader(){return this.hasSymbol_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec4 v_prop_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvoid main(void) {\n  if (${this.discardExpression_}) { discard; }\n  vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center\n  float c = cos(v_angle);\n  float s = sin(v_angle);\n  coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y);\n  gl_FragColor = ${this.symbolColorExpression_};\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.05) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_measureStart;\nattribute float a_measureEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n  vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n  return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n  return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n  float halfAngle = joinAngle / 2.0;\n  float c = cos(halfAngle);\n  float s = sin(halfAngle);\n  vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n  float length = 1.0 / s;\n  return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n  // if on a cap or the join angle is too high, offset the line along the segment normal\n  if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n    return point - normal * offsetPx;\n  }\n  // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n  return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n  v_angleStart = a_joinAngles.x;\n  v_angleEnd = a_joinAngles.y;\n  float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n  currentLineMetric = vertexNumber < 1.5 ? a_measureStart : a_measureEnd;\n  // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n  float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n  float lineWidth = ${this.strokeWidthExpression_};\n  float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n  // compute segment start/end in px with offset\n  vec2 segmentStartPx = worldToPx(a_segmentStart);\n  vec2 segmentEndPx = worldToPx(a_segmentEnd);\n  vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n  vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n  segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n  segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n  \n  // compute current vertex position\n  float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n  float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n  float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n  vec2 joinDirection;\n  vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n  // if angle is too high, do not make a proper join\n  if (cos(angle) > 0.985 || isCap(angle)) {\n    joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n  } else {\n    joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n  }\n  positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n  gl_Position = pxToScreen(positionPx);\n\n  v_segmentStart = segmentStartPx;\n  v_segmentEnd = segmentEndPx;\n  v_width = lineWidth;\n  v_prop_hitColor = a_prop_hitColor;\n  v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n  v_measureStart = a_measureStart;\n  v_measureEnd = a_measureEnd;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n  return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  vec2 tangent = normalize(end - start);\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 startToPoint = point - start;\n  return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n  vec2 startToPoint = point - start;\n  vec2 tangent = normalize(end - start);\n  return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n  return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n  vec2 startToPoint = point - start;\n  vec2 tangent = normalize(end - start);\n  float c = cos(joinAngle * 0.5);\n  float s = sin(joinAngle * 0.5);\n  float direction = -sign(sin(joinAngle));\n  vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n  float radius = width * 0.5 * s;\n  return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n  if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n    return bevelJoinField(point, start, end, width, joinAngle);\n  }\n  float miterLength = 1. / sin(joinAngle * 0.5);\n  float miterLimit = ${this.strokeMiterLimitExpression_};\n  if (miterLength > miterLimit) {\n    return bevelJoinField(point, start, end, width, joinAngle);\n  }\n  return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n   if (capType == ${stringToGlsl("butt")}) {\n    return buttCapDistanceField(point, start, end);\n  } else if (capType == ${stringToGlsl("square")}) {\n    return squareCapDistanceField(point, start, end, width);\n  }\n  return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n  if (joinType == ${stringToGlsl("bevel")}) {\n    return bevelJoinField(point, start, end, width, joinAngle);\n  } else if (joinType == ${stringToGlsl("miter")}) {\n    return miterJoinDistanceField(point, start, end, width, joinAngle);\n  }\n  return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n  if (isCap(joinAngle)) {\n    return capDistanceField(point, start, end, width, capType);\n  }\n  return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n  vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 worldPos = pxToWorld(currentPoint);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      worldPos[0] < u_renderExtent[0] ||\n      worldPos[1] < u_renderExtent[1] ||\n      worldPos[0] > u_renderExtent[2] ||\n      worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n\n  float segmentLength = length(v_segmentEnd - v_segmentStart);\n  vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n  vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n  vec2 startToPoint = currentPoint - v_segmentStart;\n  float lengthToPoint = max(0., min(dot(segmentTangent, startToPoint), segmentLength));\n  float currentLengthPx = lengthToPoint + v_distanceOffsetPx; \n  float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n  float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n  currentLineMetric = mix(v_measureStart, v_measureEnd, lengthToPoint / segmentLength);\n\n  if (${this.discardExpression_}) { discard; }\n\n  vec4 color = ${this.strokeColorExpression_};\n  float capType = ${this.strokeCapExpression_};\n  float joinType = ${this.strokeJoinExpression_};\n  float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n  float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n  float distance = max(\n    segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n    max(segmentStartDistance, segmentEndDistance)\n  );\n  distance = max(distance, ${this.strokeDistanceFieldExpression_});\n  color.a *= smoothstep(0.5, -0.5, distance);\n  gl_FragColor = color;\n  gl_FragColor.a *= u_globalAlpha;\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}getFillVertexShader(){return this.hasFill_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n  v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${Gd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n  vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n  return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n  vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n  vec2 pxOrigin = worldToPx(u_patternOrigin);\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 worldPos = pxToWorld(pxPos);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      worldPos[0] < u_renderExtent[0] ||\n      worldPos[1] < u_renderExtent[1] ||\n      worldPos[0] > u_renderExtent[2] ||\n      worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n  if (${this.discardExpression_}) { discard; }\n  gl_FragColor = ${this.fillColorExpression_};\n  gl_FragColor.a *= u_globalAlpha;\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}}const zd="blur",Bd="gradient",Ud="radius",$d=["#00f","#0ff","#0f0","#ff0","#f00"];var Wd=class Heatmap extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.gradient,delete u.radius,delete u.blur,delete u.weight,super(u),this.gradient_=null,this.addChangeListener(Bd,this.handleGradientChanged_),this.setGradient(c.gradient?c.gradient:$d),this.setBlur(void 0!==c.blur?c.blur:15),this.setRadius(void 0!==c.radius?c.radius:8);const d=c.weight?c.weight:"weight";this.weightFunction_="string"==typeof d?c=>c.get(d):d,this.setRenderOrder(null)}getBlur(){return this.get(zd)}getGradient(){return this.get(Bd)}getRadius(){return this.get(Ud)}handleGradientChanged_(){this.gradient_=function createGradient(c){const u=1,d=256,p=createCanvasContext2D(u,d),g=p.createLinearGradient(0,0,u,d),f=1/(c.length-1);for(let u=0,d=c.length;u<d;++u)g.addColorStop(u*f,c[u]);return p.fillStyle=g,p.fillRect(0,0,u,d),p.canvas}(this.getGradient())}setBlur(c){this.set(zd,c)}setGradient(c){this.set(Bd,c)}setRadius(c){this.set(Ud,c)}createRenderer(){const c=(new ShaderBuilder).addAttribute("float a_prop_weight").addVarying("v_prop_weight","float","a_prop_weight").addUniform("float u_size").addUniform("float u_blurSlope").setSymbolSizeExpression("vec2(u_size)").setSymbolColorExpression("vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * u_blurSlope) * v_prop_weight)");return new WebGLPointsLayerRenderer(this,{className:this.getClassName(),attributes:[{name:"weight",callback:c=>{const u=this.weightFunction_(c);return void 0!==u?clamp(u,0,1):1}}],uniforms:{u_size:()=>2*(this.get(Ud)+this.get(zd)),u_blurSlope:()=>this.get(Ud)/Math.max(1,this.get(zd))},hitDetectionEnabled:!0,vertexShader:c.getSymbolVertexShader(),fragmentShader:c.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}};class BaseImageLayer extends qn{constructor(c){super(c=c||{})}}class CanvasImageLayerRenderer extends CanvasLayerRenderer{constructor(c){super(c),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(c){const u=c.layerStatesArray[c.layerIndex],d=c.pixelRatio,p=c.viewState,g=p.resolution,f=this.getLayer().getSource(),_=c.viewHints;let y=c.extent;if(void 0!==u.extent&&(y=getIntersection(y,fromUserExtent(u.extent,p.projection))),!_[Bn]&&!_[Un]&&!isEmpty(y))if(f){const c=p.projection,u=f.getImage(y,g,d,c);u&&(this.loadImage(u)?this.image=u:u.getState()===br.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(c){const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=d.getExtent();if(g&&!containsCoordinate(g,p))return null;const f=this.image.getExtent(),_=this.image.getImage(),y=getWidth(f),x=Math.floor(_.width*((p[0]-f[0])/y));if(x<0||x>=_.width)return null;const v=getHeight(f),C=Math.floor(_.height*((f[3]-p[1])/v));return C<0||C>=_.height?null:this.getImageData(_,x,C)}renderFrame(c,u){const d=this.image,p=d.getExtent(),g=d.getResolution(),[f,_]=Array.isArray(g)?g:[g,g],y=d.getPixelRatio(),x=c.layerStatesArray[c.layerIndex],v=c.pixelRatio,C=c.viewState,M=C.center,T=C.resolution,L=v*f/(T*y),A=v*_/(T*y);this.prepareContainer(c,u);const I=this.context.canvas.width,k=this.context.canvas.height,O=this.getRenderContext(c);let N=!1,G=!0;if(x.extent){const u=fromUserExtent(x.extent,C.projection);G=intersects$1(u,c.extent),N=G&&!containsExtent(u,c.extent),N&&this.clipUnrotated(O,c,u)}const j=d.getImage(),B=compose(this.tempTransform,I/2,k/2,L,A,0,y*(p[0]-M[0])/f,y*(M[1]-p[3])/_);this.renderedResolution=_*v/y;const V=j.width*B[0],q=j.height*B[3];if(this.getLayer().getSource().getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,c),G&&V>=.5&&q>=.5){const c=B[4],u=B[5],d=x.opacity;1!==d&&(O.save(),O.globalAlpha=d),O.drawImage(j,0,0,+j.width,+j.height,c,u,V,q),1!==d&&O.restore()}return this.postRender(this.context,c),N&&O.restore(),O.imageSmoothingEnabled=!0,this.container}}var Xd=class ImageLayer extends BaseImageLayer{constructor(c){super(c)}createRenderer(){return new CanvasImageLayerRenderer(this)}getData(c){return super.getData(c)}},Vd="preload",qd="useInterimTilesOnError";class BaseTileLayer extends qn{constructor(c){c=c||{};const u=Object.assign({},c),d=c.cacheSize;delete c.cacheSize,delete u.preload,delete u.useInterimTilesOnError,super(u),this.on,this.once,this.un,this.cacheSize_=d,this.setPreload(void 0!==c.preload?c.preload:0),this.setUseInterimTilesOnError(void 0===c.useInterimTilesOnError||c.useInterimTilesOnError)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Vd)}setPreload(c){this.set(Vd,c)}getUseInterimTilesOnError(){return this.get(qd)}setUseInterimTilesOnError(c){this.set(qd,c)}getData(c){return super.getData(c)}}function getCacheKey(c,u,d,p){return`${c},${getKeyZXY(u,d,p)}`}function addTileToLookup(c,u,d){if(!(d in c))return c[d]=new Set([u]),!0;const p=c[d],g=p.has(u);return g||p.add(u),!g}function removeTileFromLookup(c,u,d){const p=c[d];return!!p&&p.delete(u)}function getRenderExtent(c,u){const d=c.layerStatesArray[c.layerIndex];d.extent&&(u=getIntersection(u,fromUserExtent(d.extent,c.viewState.projection)));const p=d.layer.getRenderSource();if(!p.getWrapX()){const d=p.getTileGridForProjection(c.viewState.projection).getExtent();d&&(u=getIntersection(u,d))}return u}class CanvasTileLayerRenderer extends CanvasLayerRenderer{constructor(c,u){super(c),u=u||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=[1/0,1/0,-1/0,-1/0],this.tempTileRange_=new ha(0,0,0,0),this.tempTileCoord_=createOrUpdate$1(0,0,0);const d=void 0!==u.cacheSize?u.cacheSize:512;this.tileCache_=new LRUCache(d),this.maxStaleKeys=.5*d}getTileCache(){return this.tileCache_}getOrCreateTile(c,u,d,p){const g=this.tileCache_,f=this.getLayer().getSource(),_=getCacheKey(f.getKey(),c,u,d);let y;if(g.containsKey(_))y=g.get(_);else{if(y=f.getTile(c,u,d,p.pixelRatio,p.viewState.projection),!y)return null;g.set(_,y)}return y}getTile(c,u,d,p){const g=this.getOrCreateTile(c,u,d,p);return g||null}getData(c){const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=d.getExtent();if(g&&!containsCoordinate(g,p))return null;const f=u.viewState,_=d.getRenderSource(),y=_.getTileGridForProjection(f.projection),x=_.getTilePixelRatio(u.pixelRatio);for(let c=y.getZForResolution(f.resolution);c>=y.getMinZoom();--c){const d=y.getTileCoordForCoordAndZ(p,c),g=this.getTile(c,d[1],d[2],u);if(!g||g.getState()!==mo)continue;const v=y.getOrigin(c),C=toSize(y.getTileSize(c)),M=y.getResolution(c);let T;if(g instanceof xo)T=g.getImage();else{if(!(g instanceof DataTile))continue;if(T=asImageLike(g.getData()),!T)continue}const L=Math.floor(x*((p[0]-v[0])/M-d[1]*C[0])),A=Math.floor(x*((v[1]-p[1])/M-d[2]*C[1])),I=Math.round(x*_.getGutterForProjection(f.projection));return this.getImageData(T,L+I,A+I)}return null}prepareFrame(c){const u=this.getLayer().getSource();if(!u)return!1;const d=u.getRevision();return this.renderedRevision_?this.renderedRevision_!==d&&(this.renderedRevision_=d,this.renderedSourceKey_===u.getKey()&&this.tileCache_.clear()):this.renderedRevision_=d,!0}enqueueTiles(c,u,d,p,g){const f=c.viewState,_=this.getLayer(),y=_.getRenderSource(),x=y.getTileGridForProjection(f.projection),v=getUid(y);v in c.wantedTiles||(c.wantedTiles[v]={});const C=c.wantedTiles[v],M=_.getMapInternal(),T=Math.max(d-g,x.getMinZoom(),x.getZForResolution(Math.min(_.getMaxResolution(),M?M.getView().getResolutionForZoom(Math.max(_.getMinZoom(),0)):x.getResolution(0)),y.zDirection));for(let g=d;g>=T;--g){const d=x.getTileRangeForExtentAndZ(u,g,this.tempTileRange_),f=x.getResolution(g);for(let u=d.minX;u<=d.maxX;++u)for(let _=d.minY;_<=d.maxY;++_){const d=this.getTile(g,u,_,c);if(!d)continue;if(!addTileToLookup(p,d,g))continue;const y=d.getKey();if(C[y]=!0,d.getState()===po&&!c.tileQueue.isKeyQueued(y)){const p=createOrUpdate$1(g,u,_,this.tempTileCoord_);c.tileQueue.enqueue([d,v,x.getTileCoordCenter(p),f])}}}}findStaleTile_(c,u){const d=this.tileCache_,p=c[0],g=c[1],f=c[2],_=this.getStaleKeys();for(let c=0;c<_.length;++c){const y=getCacheKey(_[c],p,g,f);if(d.containsKey(y)){const c=d.get(y);if(c.getState()===mo)return c.endTransition(getUid(this)),addTileToLookup(u,c,p),!0}}return!1}findAltTiles_(c,u,d,p){const g=c.getTileRangeForTileCoordAndZ(u,d,this.tempTileRange_);if(!g)return!1;let f=!0;const _=this.tileCache_,y=this.getLayer().getRenderSource().getKey();for(let c=g.minX;c<=g.maxX;++c)for(let u=g.minY;u<=g.maxY;++u){const g=getCacheKey(y,d,c,u);let x=!1;if(_.containsKey(g)){const c=_.get(g);c.getState()===mo&&(addTileToLookup(p,c,d),x=!0)}x||(f=!1)}return f}renderFrame(c,u){this.renderComplete=!0;const d=c.layerStatesArray[c.layerIndex],p=c.viewState,g=p.projection,f=p.resolution,_=p.center,y=c.pixelRatio,x=this.getLayer(),v=x.getSource(),C=v.getRevision(),M=v.getTileGridForProjection(g),T=M.getZForResolution(f,v.zDirection),L=M.getResolution(T),A=v.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==A&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=A):this.renderedSourceKey_=A;let I=c.extent;const k=v.getTilePixelRatio(y);this.prepareContainer(c,u);const O=this.context.canvas.width,N=this.context.canvas.height,G=d.extent&&fromUserExtent(d.extent,g);G&&(I=getIntersection(I,fromUserExtent(d.extent,g)));const j=L*O/2/k,B=L*N/2/k,V=[_[0]-j,_[1]-B,_[0]+j,_[1]+B],q={};this.renderedTiles.length=0;const Z=x.getPreload();if(c.nextExtent){const u=M.getZForResolution(p.nextResolution,v.zDirection),d=getRenderExtent(c,c.nextExtent);this.enqueueTiles(c,d,u,q,Z)}const K=getRenderExtent(c,I);if(this.enqueueTiles(c,K,T,q,0),Z>0&&setTimeout((()=>{this.enqueueTiles(c,K,T-1,q,Z-1)}),0),!(T in q))return this.container;const J=getUid(this),ct=c.time;for(const u of q[T]){const d=u.getState();if((u instanceof ReprojTile||u instanceof ReprojDataTile)&&d===_o)continue;const p=u.tileCoord;if(d===mo){if(1===u.getAlpha(J,ct)){u.endTransition(J);continue}}this.renderComplete=!1;if(this.findStaleTile_(p,q)){removeTileFromLookup(q,u,T),c.animate=!0;continue}if(this.findAltTiles_(M,p,T+1,q))continue;const g=M.getMinZoom();for(let c=T-1;c>=g;--c){if(this.findAltTiles_(M,p,c,q))break}}const ft=L/f*y/k,pe=this.getRenderContext(c);compose(this.tempTransform,O/2,N/2,ft,ft,0,-O/2,-N/2),d.extent&&this.clipUnrotated(pe,c,G),v.getInterpolate()||(pe.imageSmoothingEnabled=!1),this.preRender(pe,c);const me=Object.keys(q).map(Number);let fe;me.sort(ascending);const _e=[],xe=[];for(let u=me.length-1;u>=0;--u){const d=me[u],p=v.getTilePixelSize(d,y,g),f=M.getResolution(d)/L,_=p[0]*f*ft,x=p[1]*f*ft,C=M.getTileCoordForCoordAndZ(getTopLeft(V),d),T=M.getTileCoordExtent(C),A=apply(this.tempTransform,[k*(T[0]-V[0])/L,k*(V[3]-T[3])/L]),I=k*v.getGutterForProjection(g);for(const u of q[d]){if(u.getState()!==mo)continue;const p=u.tileCoord,g=C[1]-p[1],f=Math.round(A[0]-(g-1)*_),y=C[2]-p[2],M=Math.round(A[1]-(y-1)*x),T=Math.round(A[0]-g*_),L=Math.round(A[1]-y*x),k=f-T,O=M-L,N=1===me.length;let G=!1;fe=[T,L,T+k,L,T+k,L+O,T,L+O];for(let c=0,u=_e.length;c<u;++c)if(!N&&d<xe[c]){const u=_e[c];intersects$1([T,L,T+k,L+O],[u[0],u[3],u[4],u[7]])&&(G||(pe.save(),G=!0),pe.beginPath(),pe.moveTo(fe[0],fe[1]),pe.lineTo(fe[2],fe[3]),pe.lineTo(fe[4],fe[5]),pe.lineTo(fe[6],fe[7]),pe.moveTo(u[6],u[7]),pe.lineTo(u[4],u[5]),pe.lineTo(u[2],u[3]),pe.lineTo(u[0],u[1]),pe.clip())}_e.push(fe),xe.push(d),this.drawTile(u,c,T,L,k,O,I,N),G&&pe.restore(),this.renderedTiles.unshift(u),this.updateUsedTiles(c.usedTiles,v,u)}}this.renderedRevision=C,this.renderedResolution=L,this.extentChanged=!this.renderedExtent_||!equals$1(this.renderedExtent_,V),this.renderedExtent_=V,this.renderedPixelRatio=y,this.renderedProjection=g,this.postRender(this.context,c),d.extent&&pe.restore(),pe.imageSmoothingEnabled=!0;return c.postRenderFunctions.push(((c,u)=>{const d=getUid(v),p=u.wantedTiles[d],g=p?Object.keys(p).length:0;this.updateCacheSize(g),this.tileCache_.expireCache()})),this.container}updateCacheSize(c){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,2*c)}drawTile(c,u,d,p,g,f,_,y){let x;if(c instanceof DataTile){if(x=asImageLike(c.getData()),!x)throw new Error("Rendering array data is not yet supported")}else x=this.getTileImage(c);if(!x)return;const v=this.getRenderContext(u),C=getUid(this),M=u.layerStatesArray[u.layerIndex],T=M.opacity*(y?c.getAlpha(C,u.time):1),L=T!==v.globalAlpha;L&&(v.save(),v.globalAlpha=T),v.drawImage(x,_,_,x.width-2*_,x.height-2*_,d,p,g,f),L&&v.restore(),T!==M.opacity?u.animate=!0:y&&c.endTransition(C)}getImage(){const c=this.context;return c?c.canvas:null}getTileImage(c){return c.getImage()}updateUsedTiles(c,u,d){const p=getUid(u);p in c||(c[p]={}),c[p][d.getKey()]=!0}}class TileLayer extends BaseTileLayer{constructor(c){super(c)}createRenderer(){return new CanvasTileLayerRenderer(this,{cacheSize:this.getCacheSize()})}}function fromResolutionLike(c){return Array.isArray(c)?Math.min(...c):c}class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer{constructor(c){super(c),this.vectorRenderer_=new CanvasVectorLayerRenderer(c),this.layerImageRatio_=c.getImageRatio(),this.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],this.renderedPixelToCoordinateTransform_=null}disposeInternal(){this.vectorRenderer_.dispose(),super.disposeInternal()}getFeatures(c){if(!this.vectorRenderer_)return Promise.resolve([]);const u=apply(this.coordinateToVectorPixelTransform_,apply(this.renderedPixelToCoordinateTransform_,c.slice()));return this.vectorRenderer_.getFeatures(u)}handleFontsChanged(){this.vectorRenderer_.handleFontsChanged()}prepareFrame(c){const u=c.pixelRatio,d=c.viewState,p=d.resolution,g=c.viewHints,f=this.vectorRenderer_;let _=c.extent;1!==this.layerImageRatio_&&(_=_.slice(0),scaleFromCenter(_,this.layerImageRatio_));const y=getWidth(_)/p,x=getHeight(_)/p;if(!g[Bn]&&!g[Un]&&!isEmpty(_)){f.useContainer(null,null);const g=f.context,v=c.layerStatesArray[c.layerIndex],C=Object.assign({},v,{opacity:1}),M=Object.assign({},c,{extent:_,size:[y,x],viewState:Object.assign({},c.viewState,{rotation:0}),layerStatesArray:[C],layerIndex:0,declutter:null}),T=this.getLayer().getDeclutter();T&&(M.declutter={[T]:new Yn(9)});let L=!0;const A=new uo(_,p,u,g.canvas,(function(c){f.prepareFrame(M)&&f.replayGroupChanged&&(f.clipping=!1,f.renderFrame(M,null)&&(f.renderDeclutter(M),f.renderDeferred(M),L=!1),c())}));A.addEventListener(_i,(()=>{if(A.getState()!==br.LOADED)return;this.image=L?null:A;const c=A.getPixelRatio(),p=fromResolutionLike(A.getResolution())*u/c;this.renderedResolution=p,this.coordinateToVectorPixelTransform_=compose(this.coordinateToVectorPixelTransform_,y/2,x/2,1/p,-1/p,0,-d.center[0],-d.center[1])})),A.load()}return this.image&&(this.renderedPixelToCoordinateTransform_=c.pixelToCoordinateTransform.slice()),!!this.image}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(c,u,d,p,g){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(c,u,d,p,g):super.forEachFeatureAtCoordinate(c,u,d,p,g)}}var Yd=class VectorImageLayer extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.imageRatio,super(u),this.imageRatio_=void 0!==c.imageRatio?c.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new CanvasVectorImageLayerRenderer(this)}};const Zd={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Kd={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer{constructor(c,u){super(c,u),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=[1,0,0,1,0,0],this.tileClipContexts_=null}drawTile(c,u,d,p,g,f,_,y){this.updateExecutorGroup_(c,u.pixelRatio,u.viewState.projection),this.tileImageNeedsRender_(c)&&this.renderTileImage_(c,u),super.drawTile(c,u,d,p,g,f,_,y)}getTile(c,u,d,p){const g=this.getOrCreateTile(c,u,d,p);if(!g)return null;const f=p.viewState.resolution,_=p.viewHints;return!!(_[Bn]||_[Un])&&g.wantedResolution||(g.wantedResolution=f),g}prepareFrame(c){const u=this.getLayer().getRevision();return this.renderedLayerRevision_!==u&&(this.renderedLayerRevision_=u,this.renderedTiles.length=0),super.prepareFrame(c)}updateExecutorGroup_(c,u,d){const p=this.getLayer(),g=p.getRevision(),f=p.getRenderOrder()||null,_=c.wantedResolution,y=c.getReplayState(p);if(!y.dirty&&y.renderedResolution===_&&y.renderedRevision==g&&y.renderedRenderOrder==f)return;const x=p.getSource(),v=!!p.getDeclutter(),C=x.getTileGrid(),M=x.getTileGridForProjection(d).getTileCoordExtent(c.wrappedTileCoord),T=x.getSourceTiles(u,d,c),L=getUid(p);delete c.hitDetectionImageData[L],c.executorGroups[L]=[],y.dirty=!1;for(let d=0,g=T.length;d<g;++d){const g=T[d];if(g.getState()!=mo)continue;const A=g.tileCoord,I=C.getTileCoordExtent(A),k=getIntersection(M,I),O=buffer(k,p.getRenderBuffer()*_,this.tempExtent),N=equals$1(I,k)?null:O,G=new BuilderGroup(0,k,_,u),j=getSquaredTolerance(_,u),render=function(c,u){let d;const g=c.getStyleFunction()||p.getStyleFunction();if(g&&(d=g(c,_)),d){const p=this.renderFeature(c,j,d,G,v,u);y.dirty=y.dirty||p}},B=g.getFeatures();f&&f!==y.renderedRenderOrder&&B.sort(f);for(let c=0,u=B.length;c<u;++c){const u=B[c];N&&!intersects$1(N,u.getGeometry().getExtent())||render.call(this,u,c)}const V=G.finish(),q="vector"!==p.getRenderMode()&&v&&1===T.length?null:k,Z=new ExecutorGroup(q,_,u,x.getOverlaps(),V,p.getRenderBuffer(),!0);c.executorGroups[L].push(Z)}y.renderedRevision=g,y.renderedRenderOrder=f,y.renderedResolution=_}forEachFeatureAtCoordinate(c,u,d,p,g){const f=u.viewState.resolution,_=u.viewState.rotation;d=null==d?0:d;const y=this.getLayer(),x=y.getSource().getTileGridForProjection(u.viewState.projection),v=boundingExtent([c]);buffer(v,f*d,v);const C={},featureCallback=function(c,u,d){let f=c.getId();void 0===f&&(f=getUid(c));const _=C[f];if(_){if(!0!==_&&d<_.distanceSq){if(0===d)return C[f]=!0,g.splice(g.lastIndexOf(_),1),p(c,y,u);_.geometry=u,_.distanceSq=d}}else{if(0===d)return C[f]=!0,p(c,y,u);g.push(C[f]={feature:c,layer:y,geometry:u,distanceSq:d,callback:p})}},M=this.renderedTiles;let T;for(let p=0,g=M.length;!T&&p<g;++p){const g=M[p];if(!intersects$1(x.getTileCoordExtent(g.wrappedTileCoord),v))continue;const C=getUid(y),L=[g.executorGroups[C]],A=y.getDeclutter();L.some((p=>{const g=A?u.declutter[A].all().map((c=>c.value)):null;for(let u=0,y=p.length;u<y;++u){const y=p[u];if(T=y.forEachFeatureAtCoordinate(c,f,_,d,featureCallback,g),T)return!0}}))}return T}getFeatures(c){return new Promise(((u,d)=>{const p=this.getLayer(),g=getUid(p),f=p.getSource(),_=this.renderedProjection,y=_.getExtent(),x=this.renderedResolution,v=f.getTileGridForProjection(_),C=apply(this.renderedPixelToCoordinateTransform_,c.slice()),M=v.getTileCoordForCoordAndResolution(C,x);let T;for(let c=0,u=this.renderedTiles.length;c<u;++c)if(M.toString()===this.renderedTiles[c].tileCoord.toString()){if(T=this.renderedTiles[c],T.getState()===mo){const c=v.getTileCoordExtent(T.tileCoord);f.getWrapX()&&_.canWrapX()&&!containsExtent(y,c)&&wrapX$1(C,_);break}T=void 0}if(!T||T.loadingSourceTiles>0)return void u([]);const L=getTopLeft(v.getTileCoordExtent(T.wrappedTileCoord)),A=[(C[0]-L[0])/x,(L[1]-C[1])/x],I=T.getSourceTiles().reduce((function(c,u){return c.concat(u.getFeatures())}),[]);let k=T.hitDetectionImageData[g];if(!k){const c=toSize(v.getTileSize(v.getZForResolution(x,f.zDirection))),u=this.renderedRotation_;k=createHitDetectionImageData(c,[this.getRenderTransform(v.getTileCoordCenter(T.wrappedTileCoord),x,0,Bs,c[0]*Bs,c[1]*Bs,0)],I,p.getStyleFunction(),v.getTileCoordExtent(T.wrappedTileCoord),T.getReplayState(p).renderedResolution,u),T.hitDetectionImageData[g]=k}u(hitDetect(A,I,k))}))}getFeaturesInExtent(c){const u=[],d=this.getTileCache();if(0===d.getCount())return u;const p=this.getLayer().getSource().tileGrid,g=p.getZForResolution(this.renderedResolution);return d.forEach((d=>{if(d.tileCoord[0]!==g||d.getState()!==mo)return;const f=d.getSourceTiles();for(let d=0,g=f.length;d<g;++d){const g=f[d],_=g.tileCoord;if(intersects$1(c,p.getTileCoordExtent(_))){const d=g.getFeatures();if(d)for(let p=0,g=d.length;p<g;++p){const g=d[p],f=g.getGeometry();intersects$1(c,f.getExtent())&&u.push(g)}}}})),u}handleFontsChanged(){const c=this.getLayer();c.getVisible()&&void 0!==this.renderedLayerRevision_&&c.changed()}handleStyleImageChange_(c){this.renderIfReadyAndVisible()}renderDeclutter(c,u){const d=this.context,p=d.globalAlpha;d.globalAlpha=u.opacity;const g=c.viewHints,f=!(g[Bn]||g[Un]),_=this.renderedTiles;for(let u=0,d=_.length;u<d;++u){const d=_[u],p=d.executorGroups[getUid(this.getLayer())],g=this.getLayer().getDeclutter();if(p)for(let u=p.length-1;u>=0;--u)p[u].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(d,c),c.viewState.rotation,f,Ds,g?c.declutter[g]:void 0)}d.globalAlpha=p}renderDeferredInternal(c){const u=this.renderedTiles.reduce(((c,u,d)=>(u.executorGroups[getUid(this.getLayer())].forEach((u=>c.push({executorGroup:u,index:d}))),c)),[]),d=u.map((({executorGroup:c})=>c.getDeferredZIndexContexts())),p={};for(let c=0,d=u.length;c<d;++c){const d=u[c].executorGroup.getDeferredZIndexContexts();for(const c in d)p[c]=!0}Object.keys(p).sort(ascending).map(Number).forEach((c=>{d.forEach(((d,p)=>{d[c]&&(d[c].forEach((c=>{const{executorGroup:d,index:g}=u[p],f=d.getRenderedContext(),_=f.globalAlpha;f.globalAlpha=this.renderedOpacity_;const y=this.tileClipContexts_[g];y&&y.draw(f),c.draw(f),y&&f.restore(),f.globalAlpha=_,c.clear()})),d[c].length=0)}))}))}getTileRenderTransform(c,u){const d=u.pixelRatio,p=u.viewState,g=p.center,f=p.resolution,_=p.rotation,y=u.size,x=Math.round(y[0]*d),v=Math.round(y[1]*d),C=this.getLayer().getSource().getTileGridForProjection(u.viewState.projection),M=c.tileCoord,T=C.getTileCoordExtent(c.wrappedTileCoord),L=C.getTileCoordExtent(M,this.tempExtent)[0]-T[0];return multiply(scale$3(this.inversePixelTransform.slice(),1/d,1/d),this.getRenderTransform(g,f,_,d,x,v,L))}postRender(c,u){const d=u.viewHints,p=!(d[Bn]||d[Un]);this.renderedPixelToCoordinateTransform_=u.pixelToCoordinateTransform.slice(),this.renderedRotation_=u.viewState.rotation,this.renderedOpacity_=u.layerStatesArray[u.layerIndex].opacity;const g=this.getLayer(),f=g.getRenderMode(),_=c.globalAlpha;c.globalAlpha=this.renderedOpacity_;const y=g.getDeclutter(),x=y?Kd[f].filter((c=>!Ds.includes(c))):Kd[f],v=u.viewState,C=v.rotation,M=g.getSource(),T=M.getTileGridForProjection(v.projection).getZForResolution(v.resolution,M.zDirection),L=this.renderedTiles,A=[],I=[],k=[];let O=!0;for(let d=L.length-1;d>=0;--d){const f=L[d];O=O&&!f.getReplayState(g).dirty;const _=f.executorGroups[getUid(g)].filter((c=>c.hasExecutors(x)));if(0===_.length)continue;const v=this.getTileRenderTransform(f,u),M=f.tileCoord[0];let N=!1;const G=_[0].getClipCoords(v);let j,B=c;if(G){j=new ZIndexContext,B=j.getContext();for(let c=0,u=A.length;c<u;++c)if(T!==M&&M<I[c]){const u=A[c];intersects$1([G[0],G[3],G[4],G[7]],[u[0],u[3],u[4],u[7]])&&(N||(B.save(),N=!0),B.beginPath(),B.moveTo(G[0],G[1]),B.lineTo(G[2],G[3]),B.lineTo(G[4],G[5]),B.lineTo(G[6],G[7]),B.moveTo(u[6],u[7]),B.lineTo(u[4],u[5]),B.lineTo(u[2],u[3]),B.lineTo(u[0],u[1]),B.clip())}A.push(G),I.push(M)}for(let d=0,g=_.length;d<g;++d){_[d].execute(c,[c.canvas.width,c.canvas.height],v,C,p,x,u.declutter?.[y])}N&&(B===c?B.restore():k[d]=j)}c.globalAlpha=_,this.ready=O,this.tileClipContexts_=k,u.declutter||this.renderDeferredInternal(u),super.postRender(c,u)}renderFeature(c,u,d,p,g,f){if(!d)return!1;let _=!1;if(Array.isArray(d))for(let y=0,x=d.length;y<x;++y)_=renderFeature(p,c,d[y],u,this.boundHandleStyleImageChange_,void 0,g,f)||_;else _=renderFeature(p,c,d,u,this.boundHandleStyleImageChange_,void 0,g,f);return _}tileImageNeedsRender_(c){const u=this.getLayer();if("vector"===u.getRenderMode())return!1;const d=c.getReplayState(u),p=u.getRevision(),g=c.wantedResolution;return d.renderedTileResolution!==g||d.renderedTileRevision!==p}renderTileImage_(c,u){const d=this.getLayer(),p=c.getReplayState(d),g=d.getRevision(),f=c.executorGroups[getUid(d)];p.renderedTileRevision=g;const _=c.wrappedTileCoord,y=_[0],x=d.getSource();let v=u.pixelRatio;const C=u.viewState.projection,M=x.getTileGridForProjection(C),T=M.getResolution(c.tileCoord[0]),L=u.pixelRatio/c.wantedResolution*T,A=M.getResolution(y),I=c.getContext();v=Math.round(Math.max(v,L/v));const k=x.getTilePixelSize(y,v,C);I.canvas.width=k[0],I.canvas.height=k[1];const O=v/L;if(1!==O){const c=reset(this.tmpTransform_);scale$3(c,O,O),I.setTransform.apply(I,c)}const N=M.getTileCoordExtent(_,this.tempExtent),G=L/A,j=reset(this.tmpTransform_);scale$3(j,G,-G),translate$1(j,-N[0],-N[3]);for(let c=0,u=f.length;c<u;++c){f[c].execute(I,[I.canvas.width*O,I.canvas.height*O],j,0,!0,Zd[d.getRenderMode()],null)}p.renderedTileResolution=c.wantedResolution}}var Hd=class VectorTileLayer extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.preload;const d=void 0===c.cacheSize?0:c.cacheSize;delete c.cacheSize,delete u.useInterimTilesOnError,super(u),this.on,this.once,this.un,this.cacheSize_=d;const p=c.renderMode||"hybrid";assert("hybrid"==p||"vector"==p,"`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=p,this.setPreload(c.preload?c.preload:0),this.setUseInterimTilesOnError(void 0===c.useInterimTilesOnError||c.useInterimTilesOnError),this.getBackground,this.setBackground}createRenderer(){return new CanvasVectorTileLayerRenderer(this,{cacheSize:this.cacheSize_})}getFeatures(c){return super.getFeatures(c)}getFeaturesInExtent(c){return this.getRenderer().getFeaturesInExtent(c)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(Vd)}getUseInterimTilesOnError(){return this.get(qd)}setPreload(c){this.set(Vd,c)}setUseInterimTilesOnError(c){this.set(qd,c)}};function expressionToGlsl(c,u,d){return function buildExpression(c,u,d,p){return compile(parse$2(c,u,d),u,p)}(u,d,newParsingContext(),c)}function packColor(c){const u=asArray(c);return[256*u[0]+u[1],256*u[2]+Math.round(255*u[3])]}function getGlslSizeFromType(c){return c===ts||c===is?2:c===es?4:1}function getGlslTypeFromType(c){const u=getGlslSizeFromType(c);return u>1?`vec${u}`:"float"}function computeHash(c){return(JSON.stringify(c).split("").reduce(((c,u)=>(c<<5)-c+u.charCodeAt(0)),0)>>>0).toString()}function parseCommonSymbolProperties(c,u,d,p){if(`${p}radius`in c&&"icon-"!==p){let g=expressionToGlsl(d,c[`${p}radius`],Jn);if(`${p}radius2`in c){g=`max(${g}, ${expressionToGlsl(d,c[`${p}radius2`],Jn)})`}`${p}stroke-width`in c&&(g=`(${g} + ${expressionToGlsl(d,c[`${p}stroke-width`],Jn)} * 0.5)`),u.setSymbolSizeExpression(`vec2(${g} * 2. + 0.5)`)}if(`${p}scale`in c){const g=expressionToGlsl(d,c[`${p}scale`],is);u.setSymbolSizeExpression(`${u.getSymbolSizeExpression()} * ${g}`)}`${p}displacement`in c&&u.setSymbolOffsetExpression(expressionToGlsl(d,c[`${p}displacement`],es)),`${p}rotation`in c&&u.setSymbolRotationExpression(expressionToGlsl(d,c[`${p}rotation`],Jn)),`${p}rotate-with-view`in c&&u.setSymbolRotateWithView(!!c[`${p}rotate-with-view`])}function getColorFromDistanceField(c,u,d,p,g){let f="vec4(0.)";if(null!==u&&(f=u),null!==d&&null!==p){f=`mix(${d}, ${f}, ${`smoothstep(-${p} + 0.63, -${p} - 0.58, ${c})`})`}let _=`${f} * vec4(1.0, 1.0, 1.0, ${`(1.0 - smoothstep(-0.63, 0.58, ${c}))`})`;return null!==g&&(_=`${_} * vec4(1.0, 1.0, 1.0, ${g})`),_}function parseImageProperties(c,u,d,p,g){const f=new Image;f.crossOrigin=void 0===c[`${p}cross-origin`]?"anonymous":c[`${p}cross-origin`],f.src=c[`${p}src`],d[`u_texture${g}_size`]=()=>f.complete?[f.width,f.height]:[0,0],u.addUniform(`vec2 u_texture${g}_size`);const _=`u_texture${g}_size`;return d[`u_texture${g}`]=f,u.addUniform(`sampler2D u_texture${g}`),_}function parseImageOffsetProperties(c,u,d,p,g){let f=expressionToGlsl(d,c[`${u}offset`],es);if(`${u}offset-origin`in c)switch(c[`${u}offset-origin`]){case"top-right":f=`vec2(${p}.x, 0.) + ${g} * vec2(-1., 0.) + ${f} * vec2(-1., 1.)`;break;case"bottom-left":f=`vec2(0., ${p}.y) + ${g} * vec2(0., -1.) + ${f} * vec2(1., -1.)`;break;case"bottom-right":f=`${p} - ${g} - ${f}`}return f}function parseLiteralStyle(c){const u={inFragmentShader:!1,properties:{},variables:{},functions:{},style:c},d={inFragmentShader:!0,variables:u.variables,properties:{},functions:{},style:c},p=new ShaderBuilder,g={};if("icon-src"in c?function parseIconProperties(c,u,d,p,g){let f="vec4(1.0)";"icon-color"in c&&(f=expressionToGlsl(g,c["icon-color"],ts)),"icon-opacity"in c&&(f=`${f} * vec4(1.0, 1.0, 1.0, ${expressionToGlsl(g,c["icon-opacity"],Jn)})`);const _=computeHash(c["icon-src"]),y=parseImageProperties(c,u,d,"icon-",_);if(u.setSymbolColorExpression(`${f} * texture2D(u_texture${_}, v_texCoord)`).setSymbolSizeExpression(y),"icon-width"in c&&"icon-height"in c&&u.setSymbolSizeExpression(`vec2(${expressionToGlsl(p,c["icon-width"],Jn)}, ${expressionToGlsl(p,c["icon-height"],Jn)})`),"icon-offset"in c&&"icon-size"in c){const d=expressionToGlsl(p,c["icon-size"],es),g=u.getSymbolSizeExpression();u.setSymbolSizeExpression(d);const f=parseImageOffsetProperties(c,"icon-",p,"v_quadSizePx",d);u.setTextureCoordinateExpression(`(vec4((${f}).xyxy) + vec4(0., 0., ${d})) / (${g}).xyxy`)}if(parseCommonSymbolProperties(c,u,p,"icon-"),"icon-anchor"in c){const d=expressionToGlsl(p,c["icon-anchor"],es);let g,f="1.0";"icon-scale"in c&&(f=expressionToGlsl(p,c["icon-scale"],is)),g="pixels"===c["icon-anchor-x-units"]&&"pixels"===c["icon-anchor-y-units"]?`${d} * ${f}`:"pixels"===c["icon-anchor-x-units"]?`${d} * vec2(vec2(${f}).x, v_quadSizePx.y)`:"pixels"===c["icon-anchor-y-units"]?`${d} * vec2(v_quadSizePx.x, vec2(${f}).x)`:`${d} * v_quadSizePx`;let _=`v_quadSizePx * vec2(0.5, -0.5) + ${g} * vec2(-1., 1.)`;if("icon-anchor-origin"in c)switch(c["icon-anchor-origin"]){case"top-right":_=`v_quadSizePx * -0.5 + ${g}`;break;case"bottom-left":_=`v_quadSizePx * 0.5 - ${g}`;break;case"bottom-right":_=`v_quadSizePx * vec2(-0.5, 0.5) + ${g} * vec2(1., -1.)`}u.setSymbolOffsetExpression(`${u.getSymbolOffsetExpression()} + ${_}`)}}(c,p,g,u,d):"shape-points"in c?function parseShapeProperties(c,u,d,p,g){g.functions.round="float round(float v) {\n  return sign(v) * floor(abs(v) + 0.5);\n}",g.functions.starDistanceField="float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) {\n  float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n  float c = cos(startAngle);\n  float s = sin(startAngle);\n  vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n  float alpha = TWO_PI / numPoints; // the angle of one sector\n  float beta = atan(pointRotated.y, pointRotated.x);\n  float gamma = round(beta / alpha) * alpha; // angle in sector\n  c = cos(-gamma);\n  s = sin(-gamma);\n  vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n  vec2 tipToPoint = inSector + vec2(-radius, 0.);\n  vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius);\n  return dot(normalize(edgeNormal), tipToPoint);\n}",g.functions.regularDistanceField="float regularDistanceField(vec2 point, float numPoints, float radius, float angle) {\n  float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n  float c = cos(startAngle);\n  float s = sin(startAngle);\n  vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n  float alpha = TWO_PI / numPoints; // the angle of one sector\n  float radiusIn = radius * cos(PI / numPoints);\n  float beta = atan(pointRotated.y, pointRotated.x);\n  float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid\n  c = cos(-gamma);\n  s = sin(-gamma);\n  vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n  return inSector.x - radiusIn;\n}",parseCommonSymbolProperties(c,u,p,"shape-");let f=null;"shape-opacity"in c&&(f=expressionToGlsl(g,c["shape-opacity"],Jn));let _="coordsPx";"shape-scale"in c&&(_=`coordsPx / ${expressionToGlsl(g,c["shape-scale"],is)}`);let y=null;"shape-fill-color"in c&&(y=expressionToGlsl(g,c["shape-fill-color"],ts));let x=null;"shape-stroke-color"in c&&(x=expressionToGlsl(g,c["shape-stroke-color"],ts));let v=null;"shape-stroke-width"in c&&(v=expressionToGlsl(g,c["shape-stroke-width"],Jn));const C=expressionToGlsl(g,c["shape-points"],Jn);let M,T="0.";"shape-angle"in c&&(T=expressionToGlsl(g,c["shape-angle"],Jn));let L=expressionToGlsl(g,c["shape-radius"],Jn);if(null!==v&&(L=`${L} + ${v} * 0.5`),"shape-radius2"in c){let u=expressionToGlsl(g,c["shape-radius2"],Jn);null!==v&&(u=`${u} + ${v} * 0.5`),M=`starDistanceField(${_}, ${C}, ${L}, ${u}, ${T})`}else M=`regularDistanceField(${_}, ${C}, ${L}, ${T})`;const A=getColorFromDistanceField(M,y,x,v,f);u.setSymbolColorExpression(A)}(c,p,0,u,d):"circle-radius"in c&&function parseCircleProperties(c,u,d,p,g){g.functions.circleDistanceField="float circleDistanceField(vec2 point, float radius) {\n  return length(point) - radius;\n}",parseCommonSymbolProperties(c,u,p,"circle-");let f=null;"circle-opacity"in c&&(f=expressionToGlsl(g,c["circle-opacity"],Jn));let _="coordsPx";"circle-scale"in c&&(_=`coordsPx / ${expressionToGlsl(g,c["circle-scale"],is)}`);let y=null;"circle-fill-color"in c&&(y=expressionToGlsl(g,c["circle-fill-color"],ts));let x=null;"circle-stroke-color"in c&&(x=expressionToGlsl(g,c["circle-stroke-color"],ts));let v=expressionToGlsl(g,c["circle-radius"],Jn),C=null;"circle-stroke-width"in c&&(C=expressionToGlsl(g,c["circle-stroke-width"],Jn),v=`(${v} + ${C} * 0.5)`);const M=getColorFromDistanceField(`circleDistanceField(${_}, ${v})`,y,x,C,f);u.setSymbolColorExpression(M)}(c,p,0,u,d),function parseStrokeProperties(c,u,d,p,g){if("stroke-color"in c&&u.setStrokeColorExpression(expressionToGlsl(g,c["stroke-color"],ts)),"stroke-pattern-src"in c){const p=computeHash(c["stroke-pattern-src"]),f=parseImageProperties(c,u,d,"stroke-pattern-",p);let _=f,y="vec2(0.)";"stroke-pattern-offset"in c&&"stroke-pattern-size"in c&&(_=expressionToGlsl(g,c["stroke-pattern-size"],es),y=parseImageOffsetProperties(c,"stroke-pattern-",g,f,_));let x="0.";"stroke-pattern-spacing"in c&&(x=expressionToGlsl(g,c["stroke-pattern-spacing"],Jn)),g.functions.sampleStrokePattern="vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) {\n  float currentLengthScaled = currentLengthPx * sampleSize.y / lineWidth;\n  float spacingScaled = spacingPx * sampleSize.y / lineWidth;\n  float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled));\n  // make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n  uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5);\n  float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y;\n  vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize;\n  return texture2D(texture, texCoord);\n}";const v=`u_texture${p}`;let C="1.";"stroke-color"in c&&(C=u.getStrokeColorExpression()),u.setStrokeColorExpression(`${C} * sampleStrokePattern(${v}, ${f}, ${y}, ${_}, ${x}, currentLengthPx, currentRadiusRatio, v_width)`)}if("stroke-width"in c&&u.setStrokeWidthExpression(expressionToGlsl(p,c["stroke-width"],Jn)),"stroke-offset"in c&&u.setStrokeOffsetExpression(expressionToGlsl(p,c["stroke-offset"],Jn)),"stroke-line-cap"in c&&u.setStrokeCapExpression(expressionToGlsl(p,c["stroke-line-cap"],Qn)),"stroke-line-join"in c&&u.setStrokeJoinExpression(expressionToGlsl(p,c["stroke-line-join"],Qn)),"stroke-miter-limit"in c&&u.setStrokeMiterLimitExpression(expressionToGlsl(p,c["stroke-miter-limit"],Jn)),"stroke-line-dash"in c){g.functions.getSingleDashDistance=`float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType) {\n  float localDistance = mod(distance, dashLengthTotal);\n  float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5;\n  distanceSegment = min(distanceSegment, dashLengthTotal - localDistance);\n  if (capType == ${stringToGlsl("square")}) {\n    distanceSegment -= v_width * 0.5;\n  } else if (capType == ${stringToGlsl("round")}) {\n    distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - v_width * 0.5);\n  }\n  return distanceSegment;\n}`;let d=c["stroke-line-dash"].map((c=>expressionToGlsl(g,c,Jn)));d.length%2==1&&(d=[...d,...d]);let f="0.";"stroke-line-dash-offset"in c&&(f=expressionToGlsl(p,c["stroke-line-dash-offset"],Jn));const _=`dashDistanceField_${computeHash(c["stroke-line-dash"])}`,y=d.map(((c,u)=>`float dashLength${u} = ${c};`)),x=d.map(((c,u)=>`dashLength${u}`)).join(" + ");let v="0.",C=`getSingleDashDistance(distance, radius, ${v}, dashLength0, totalDashLength, capType)`;for(let c=2;c<d.length;c+=2)v=`${v} + dashLength${c-2} + dashLength${c-1}`,C=`min(${C}, getSingleDashDistance(distance, radius, ${v}, dashLength${c}, totalDashLength, capType))`;g.functions[_]=`float ${_}(float distance, float radius, float capType) {\n  ${y.join("\n  ")}\n  float totalDashLength = ${x};\n  return ${C};\n}`,u.setStrokeDistanceFieldExpression(`${_}(currentLengthPx + ${f}, currentRadiusPx, capType)`)}}(c,p,g,u,d),function parseFillProperties(c,u,d,p,g){if("fill-color"in c&&u.setFillColorExpression(expressionToGlsl(g,c["fill-color"],ts)),"fill-pattern-src"in c){const p=computeHash(c["fill-pattern-src"]),f=parseImageProperties(c,u,d,"fill-pattern-",p);let _=f,y="vec2(0.)";"fill-pattern-offset"in c&&"fill-pattern-size"in c&&(_=expressionToGlsl(g,c["fill-pattern-size"],es),y=parseImageOffsetProperties(c,"fill-pattern-",g,f,_)),g.functions.sampleFillPattern="vec4 sampleFillPattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, vec2 pxOrigin, vec2 pxPosition) {\n  float scaleRatio = pow(2., mod(u_zoom + 0.5, 1.) - 0.5);\n  vec2 pxRelativePos = pxPosition - pxOrigin;\n  // rotate the relative position from origin by the current view rotation\n  pxRelativePos = vec2(pxRelativePos.x * cos(u_rotation) - pxRelativePos.y * sin(u_rotation), pxRelativePos.x * sin(u_rotation) + pxRelativePos.y * cos(u_rotation));\n  // sample position is computed according to the sample offset & size\n  vec2 samplePos = mod(pxRelativePos / scaleRatio, sampleSize);\n  // also make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n  samplePos = clamp(samplePos, vec2(0.5), sampleSize - vec2(0.5));\n  samplePos.y = sampleSize.y - samplePos.y; // invert y axis so that images appear upright\n  return texture2D(texture, (samplePos + textureOffset) / textureSize);\n}";const x=`u_texture${p}`;let v="1.";"fill-color"in c&&(v=u.getFillColorExpression()),u.setFillColorExpression(`${v} * sampleFillPattern(${x}, ${f}, ${y}, ${_}, pxOrigin, pxPos)`)}}(c,p,g,0,d),c.filter){const u=expressionToGlsl(d,c.filter,Hn);p.setFragmentDiscardExpression(`!${u}`)}for(const u in d.variables){const f=d.variables[u],_=uniformNameForVariable(f.name);p.addUniform(`${getGlslTypeFromType(f.type)} ${_}`),g[_]=()=>{const u=c.variables[f.name];return"number"==typeof u?u:"boolean"==typeof u?u?1:0:f.type===ts?packColor([...asArray(u||"#eee")]):"string"==typeof u?getStringNumberEquivalent(u):u}}for(const c in d.properties){const g=d.properties[c];u.properties[c]||(u.properties[c]=g);let f=getGlslTypeFromType(g.type),_=`a_prop_${g.name}`;g.type===ts&&(f="vec4",_=`unpackColor(${_})`,p.addVertexShaderFunction("vec4 unpackColor(vec2 packedColor) {\n  return vec4(\n    fract(floor(packedColor[0] / 256.0) / 256.0),\n    fract(packedColor[0] / 256.0),\n    fract(floor(packedColor[1] / 256.0) / 256.0),\n    fract(packedColor[1] / 256.0)\n  );\n}")),p.addVarying(`v_prop_${g.name}`,f,_)}for(const c in u.properties){const d=u.properties[c];p.addAttribute(`${getGlslTypeFromType(d.type)} a_prop_${d.name}`)}for(const c in u.functions)p.addVertexShaderFunction(u.functions[c]);for(const c in d.functions)p.addFragmentShaderFunction(d.functions[c]);const f={};for(const c in u.properties){const d=u.properties[c];let p;p=d.evaluator?d.evaluator:c=>{const u=c.get(d.name);return d.type===ts?packColor([...asArray(u||"#eee")]):"string"==typeof u?getStringNumberEquivalent(u):"boolean"==typeof u?u?1:0:u},f[d.name]={size:getGlslSizeFromType(d.type),callback:p}}return{builder:p,attributes:f,uniforms:g}}var Jd=class WebGLPointsLayer extends qn{constructor(c){super(Object.assign({},c)),this.parseResult_=parseLiteralStyle(c.style),this.styleVariables_=c.style.variables||{},this.hitDetectionDisabled_=!!c.disableHitDetection}createRenderer(){const c=Object.keys(this.parseResult_.attributes).map((c=>({name:c,...this.parseResult_.attributes[c]})));return new WebGLPointsLayerRenderer(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitDetectionEnabled:!this.hitDetectionDisabled_,uniforms:this.parseResult_.uniforms,attributes:c})}updateStyleVariables(c){Object.assign(this.styleVariables_,c),this.changed()}};function parseStyle(c,u){const d=`\n    attribute vec2 ${Ad};\n    uniform mat4 ${Ld.TILE_TRANSFORM};\n    uniform float ${Ld.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Ld.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Ld.TEXTURE_RESOLUTION};\n    uniform float ${Ld.TEXTURE_ORIGIN_X};\n    uniform float ${Ld.TEXTURE_ORIGIN_Y};\n    uniform float ${Ld.DEPTH};\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = ${Ad};\n      v_mapCoord = vec2(\n        ${Ld.TEXTURE_ORIGIN_X} + ${Ld.TEXTURE_RESOLUTION} * ${Ld.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n        ${Ld.TEXTURE_ORIGIN_Y} - ${Ld.TEXTURE_RESOLUTION} * ${Ld.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n      );\n      gl_Position = ${Ld.TILE_TRANSFORM} * vec4(${Ad}, ${Ld.DEPTH}, 1.0);\n    }\n  `,p={inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{},inFragmentShader:!0,bandCount:u,style:c},g=[];if(void 0!==c.color){const u=expressionToGlsl(p,c.color,ts);g.push(`color = ${u};`)}if(void 0!==c.contrast){const u=expressionToGlsl(p,c.contrast,Jn);g.push(`color.rgb = clamp((${u} + 1.0) * color.rgb - (${u} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==c.exposure){const u=expressionToGlsl(p,c.exposure,Jn);g.push(`color.rgb = clamp((${u} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==c.saturation){const u=expressionToGlsl(p,c.saturation,Jn);g.push(`\n      float saturation = ${u} + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    `)}if(void 0!==c.gamma){const u=expressionToGlsl(p,c.gamma,Jn);g.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${u}));`)}if(void 0!==c.brightness){const u=expressionToGlsl(p,c.brightness,Jn);g.push(`color.rgb = clamp(color.rgb + ${u}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const f={},_=Object.keys(p.variables).length;if(_>1&&!c.variables)throw new Error(`Missing variables in style (expected ${p.variables})`);for(let u=0;u<_;++u){const d=p.variables[Object.keys(p.variables)[u]];if(!(d.name in c.variables))throw new Error(`Missing '${d.name}' in style variables`);f[uniformNameForVariable(d.name)]=function(){let u=c.variables[d.name];return"string"==typeof u&&(u=getStringNumberEquivalent(u)),void 0!==u?u:-9999999}}const y=Object.keys(f).map((function(c){return`uniform float ${c};`})),x=Math.ceil(u/4);y.push(`uniform sampler2D ${Ld.TILE_TEXTURE_ARRAY}[${x}];`),p.paletteTextures&&y.push(`uniform sampler2D ${Nd}[${p.paletteTextures.length}];`);const v=Object.keys(p.functions).map((function(c){return p.functions[c]}));return{vertexShader:d,fragmentShader:`\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ${Ld.RENDER_EXTENT};\n    uniform float ${Ld.TRANSITION_ALPHA};\n    uniform float ${Ld.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Ld.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Ld.RESOLUTION};\n    uniform float ${Ld.ZOOM};\n\n    ${y.join("\n")}\n\n    ${v.join("\n")}\n\n    void main() {\n      if (\n        v_mapCoord[0] < ${Ld.RENDER_EXTENT}[0] ||\n        v_mapCoord[1] < ${Ld.RENDER_EXTENT}[1] ||\n        v_mapCoord[0] > ${Ld.RENDER_EXTENT}[2] ||\n        v_mapCoord[1] > ${Ld.RENDER_EXTENT}[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(${Ld.TILE_TEXTURE_ARRAY}[0],  v_textureCoord);\n\n      ${g.join("\n")}\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ${Ld.TRANSITION_ALPHA};\n    }`,uniforms:f,paletteTextures:p.paletteTextures}}class WebGLTileLayer extends BaseTileLayer{constructor(c){const u=(c=c?Object.assign({},c):{}).style||{};delete c.style,super(c),this.sources_=c.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=u,this.styleVariables_=this.style_.variables||{},this.addChangeListener(jn,this.handleSourceUpdate_)}getSources(c,u){const d=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(c,u):this.sources_:d?[d]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const c=this.getRenderSource();return c?c.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const c=Number.MAX_SAFE_INTEGER,u=this.getSources([-c,-c,c,c],c);return u&&u.length&&"bandCount"in u[0]?u[0].bandCount:4}createRenderer(){const c=parseStyle(this.style_,this.getSourceBandCount_());return new WebGLTileLayerRenderer(this,{vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms,cacheSize:this.getCacheSize(),paletteTextures:c.paletteTextures})}renderSources(c,u){const d=this.getRenderer();let p;for(let g=0,f=u.length;g<f;++g)this.renderedSource_=u[g],d.prepareFrame(c)&&(p=d.renderFrame(c));return p}render(c,u){this.rendered=!0;const d=c.viewState,p=this.getSources(c.extent,d.resolution);let g=!0;for(let c=0,u=p.length;c<u;++c){const u=p[c],d=u.getState();if("loading"==d){const onChange=()=>{"ready"==u.getState()&&(u.removeEventListener("change",onChange),this.changed())};u.addEventListener("change",onChange)}g=g&&"ready"==d}const f=this.renderSources(c,p);if(this.getRenderer().renderComplete&&g)return this.renderedResolution_=d.resolution,f;if(this.renderedResolution_>.5*d.resolution){const u=this.getSources(c.extent,this.renderedResolution_).filter((c=>!p.includes(c)));if(u.length>0)return this.renderSources(c,u)}return f}setStyle(c){if(this.styleVariables_=c.variables||{},this.style_=c,this.hasRenderer()){const c=parseStyle(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms,paletteTextures:c.paletteTextures}),this.changed()}}updateStyleVariables(c){Object.assign(this.styleVariables_,c),this.changed()}}WebGLTileLayer.prototype.dispose;var Qd=WebGLTileLayer,tp=Object.freeze({__proto__:null,Graticule:co,Group:wo,Heatmap:Wd,Image:Xd,Layer:qn,Tile:TileLayer,Vector:Ws,VectorImage:Yd,VectorTile:Hd,WebGLPoints:Jd,WebGLTile:Qd}),ep="tileloadstart",ip="tileloadend",rp="tileloaderror";const np=[0,0,0];class TileGrid{constructor(c){let u;if(this.minZoom=void 0!==c.minZoom?c.minZoom:0,this.resolutions_=c.resolutions,assert(function isSorted(c,u,d){const p=u||ascending;return c.every((function(u,d){if(0===d)return!0;const g=p(c[d-1],u);return!(g>0||0===g)}))}(this.resolutions_,((c,u)=>u-c)),"`resolutions` must be sorted in descending order"),!c.origins)for(let c=0,d=this.resolutions_.length-1;c<d;++c)if(u){if(this.resolutions_[c]/this.resolutions_[c+1]!==u){u=void 0;break}}else u=this.resolutions_[c]/this.resolutions_[c+1];this.zoomFactor_=u,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==c.origin?c.origin:null,this.origins_=null,void 0!==c.origins&&(this.origins_=c.origins,assert(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const d=c.extent;void 0===d||this.origin_||this.origins_||(this.origin_=getTopLeft(d)),assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,void 0!==c.tileSizes&&(this.tileSizes_=c.tileSizes,assert(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=void 0!==c.tileSize?c.tileSize:this.tileSizes_?null:Xn,assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=void 0!==d?d:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==c.sizes?this.fullTileRanges_=c.sizes.map(((c,u)=>{const p=new ha(Math.min(0,c[0]),Math.max(c[0]-1,-1),Math.min(0,c[1]),Math.max(c[1]-1,-1));if(d){const c=this.getTileRangeForExtentAndZ(d,u);p.minX=Math.max(c.minX,p.minX),p.maxX=Math.min(c.maxX,p.maxX),p.minY=Math.max(c.minY,p.minY),p.maxY=Math.min(c.maxY,p.maxY)}return p})):d&&this.calculateTileRanges_(d)}forEachTileCoord(c,u,d){const p=this.getTileRangeForExtentAndZ(c,u);for(let c=p.minX,g=p.maxX;c<=g;++c)for(let g=p.minY,f=p.maxY;g<=f;++g)d([u,c,g])}forEachTileCoordParentTileRange(c,u,d,p){let g,f,_,y=null,x=c[0]-1;for(2===this.zoomFactor_?(f=c[1],_=c[2]):y=this.getTileCoordExtent(c,p);x>=this.minZoom;){if(void 0!==f&&void 0!==_?(f=Math.floor(f/2),_=Math.floor(_/2),g=createOrUpdate(f,f,_,_,d)):g=this.getTileRangeForExtentAndZ(y,x,d),u(x,g))return!0;--x}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(c){return this.origin_?this.origin_:this.origins_[c]}getResolution(c){return this.resolutions_[c]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(c,u,d){if(c[0]<this.maxZoom){if(2===this.zoomFactor_){const d=2*c[1],p=2*c[2];return createOrUpdate(d,d+1,p,p+1,u)}const p=this.getTileCoordExtent(c,d||this.tmpExtent_);return this.getTileRangeForExtentAndZ(p,c[0]+1,u)}return null}getTileRangeForTileCoordAndZ(c,u,d){if(u>this.maxZoom||u<this.minZoom)return null;const p=c[0],g=c[1],f=c[2];if(u===p)return createOrUpdate(g,f,g,f,d);if(this.zoomFactor_){const c=Math.pow(this.zoomFactor_,u-p),_=Math.floor(g*c),y=Math.floor(f*c);if(u<p)return createOrUpdate(_,_,y,y,d);return createOrUpdate(_,Math.floor(c*(g+1))-1,y,Math.floor(c*(f+1))-1,d)}const _=this.getTileCoordExtent(c,this.tmpExtent_);return this.getTileRangeForExtentAndZ(_,u,d)}getTileRangeForExtentAndZ(c,u,d){this.getTileCoordForXYAndZ_(c[0],c[3],u,!1,np);const p=np[1],g=np[2];this.getTileCoordForXYAndZ_(c[2],c[1],u,!0,np);return createOrUpdate(p,np[1],g,np[2],d)}getTileCoordCenter(c){const u=this.getOrigin(c[0]),d=this.getResolution(c[0]),p=toSize(this.getTileSize(c[0]),this.tmpSize_);return[u[0]+(c[1]+.5)*p[0]*d,u[1]-(c[2]+.5)*p[1]*d]}getTileCoordExtent(c,u){const d=this.getOrigin(c[0]),p=this.getResolution(c[0]),g=toSize(this.getTileSize(c[0]),this.tmpSize_),f=d[0]+c[1]*g[0]*p,_=d[1]-(c[2]+1)*g[1]*p;return createOrUpdate$2(f,_,f+g[0]*p,_+g[1]*p,u)}getTileCoordForCoordAndResolution(c,u,d){return this.getTileCoordForXYAndResolution_(c[0],c[1],u,!1,d)}getTileCoordForXYAndResolution_(c,u,d,p,g){const f=this.getZForResolution(d),_=d/this.getResolution(f),y=this.getOrigin(f),x=toSize(this.getTileSize(f),this.tmpSize_);let v=_*(c-y[0])/d/x[0],C=_*(y[1]-u)/d/x[1];return p?(v=ceil(v,5)-1,C=ceil(C,5)-1):(v=floor(v,5),C=floor(C,5)),createOrUpdate$1(f,v,C,g)}getTileCoordForXYAndZ_(c,u,d,p,g){const f=this.getOrigin(d),_=this.getResolution(d),y=toSize(this.getTileSize(d),this.tmpSize_);let x=(c-f[0])/_/y[0],v=(f[1]-u)/_/y[1];return p?(x=ceil(x,5)-1,v=ceil(v,5)-1):(x=floor(x,5),v=floor(v,5)),createOrUpdate$1(d,x,v,g)}getTileCoordForCoordAndZ(c,u,d){return this.getTileCoordForXYAndZ_(c[0],c[1],u,!1,d)}getTileCoordResolution(c){return this.resolutions_[c[0]]}getTileSize(c){return this.tileSize_?this.tileSize_:this.tileSizes_[c]}getFullTileRange(c){return this.fullTileRanges_?this.fullTileRanges_[c]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,c):null}getZForResolution(c,u){return clamp(linearFindNearest(this.resolutions_,c,u||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(c,u){return intersectsLinearRing(u,0,u.length,2,this.getTileCoordExtent(c))}calculateTileRanges_(c){const u=this.resolutions_.length,d=new Array(u);for(let p=this.minZoom;p<u;++p)d[p]=this.getTileRangeForExtentAndZ(c,p);this.fullTileRanges_=d}}function getForProjection(c){let u=c.getDefaultTileGrid();return u||(u=function createForProjection(c,u,d,p){const g=extentFromProjection(c);return function createForExtent(c,u,d,p){p=void 0!==p?p:"top-left";const g=resolutionsFromExtent(c,u,d);return new TileGrid({extent:c,origin:getCorner(c,p),resolutions:g,tileSize:d})}(g,u,d,p)}(c),c.setDefaultTileGrid(u)),u}function createXYZ(c){const u=c||{},d=u.extent||get$2("EPSG:3857").getExtent(),p={extent:d,minZoom:u.minZoom,tileSize:u.tileSize,resolutions:resolutionsFromExtent(d,u.maxZoom,u.tileSize,u.maxResolution)};return new TileGrid(p)}function resolutionsFromExtent(c,u,d,p){u=void 0!==u?u:Wn,d=toSize(void 0!==d?d:Xn);const g=getHeight(c),f=getWidth(c);p=p>0?p:Math.max(f/d[0],g/d[1]);const _=u+1,y=new Array(_);for(let c=0;c<_;++c)y[c]=p/Math.pow(2,c);return y}function extentFromProjection(c){let u=(c=get$2(c)).getExtent();if(!u){const d=180*Gi.degrees/c.getMetersPerUnit();u=createOrUpdate$2(-d,-d,d,d)}return u}class TileSourceEvent extends BaseEvent{constructor(c,u){super(c),this.tile=u}}var sp=class TileSource extends Js{constructor(c){super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,projection:c.projection,state:c.state,wrapX:c.wrapX,interpolate:c.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=void 0!==c.tilePixelRatio?c.tilePixelRatio:1,this.tileGrid=void 0!==c.tileGrid?c.tileGrid:null;const u=[256,256];this.tileGrid&&toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),u),this.tileCache=new la(c.cacheSize||0),this.tmpSize=[0,0],this.key_=c.key||"",this.tileOptions={transition:c.transition,interpolate:c.interpolate},this.zDirection=c.zDirection?c.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(c,u){const d=this.getTileCacheForProjection(c);d&&d.expireCache(u)}getGutterForProjection(c){return 0}getKey(){return this.key_}setKey(c){this.key_!==c&&(this.key_=c,this.changed())}getResolutions(c){const u=c?this.getTileGridForProjection(c):this.tileGrid;return u?u.getResolutions():null}getTile(c,u,d,p,g){return abstract()}getTileGrid(){return this.tileGrid}getTileGridForProjection(c){return this.tileGrid?this.tileGrid:getForProjection(c)}getTileCacheForProjection(c){const u=this.getProjection();return assert(null===u||equivalent(u,c),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(c){return this.tilePixelRatio_}getTilePixelSize(c,u,d){const p=this.getTileGridForProjection(d),g=this.getTilePixelRatio(u),f=toSize(p.getTileSize(c),this.tmpSize);return 1==g?f:scale(f,g,this.tmpSize)}getTileCoordForTileUrlFunction(c,u){u=void 0!==u?u:this.getProjection();const d=this.getTileGridForProjection(u);return this.getWrapX()&&u.isGlobal()&&(c=function wrapX(c,u,d){const p=u[0],g=c.getTileCoordCenter(u),f=extentFromProjection(d);if(!containsCoordinate(f,g)){const u=getWidth(f),d=Math.ceil((f[0]-g[0])/u);return g[0]+=u*d,c.getTileCoordForCoordAndZ(g,p)}return u}(d,c,u)),function withinExtentAndZ(c,u){const d=c[0],p=c[1],g=c[2];if(u.getMinZoom()>d||d>u.getMaxZoom())return!1;const f=u.getFullTileRange(d);return!f||f.containsXY(p,g)}(c,d)?c:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}useTile(c,u,d,p){}};function appendParams(c,u){const d=[];Object.keys(u).forEach((function(c){null!==u[c]&&void 0!==u[c]&&d.push(c+"="+encodeURIComponent(u[c]))}));const p=d.join("&");return c=c.replace(/[?&]$/,""),(c+=c.includes("?")?"&":"?")+p}const op=/\{z\}/g,ap=/\{x\}/g,lp=/\{y\}/g,hp=/\{-y\}/g;function renderXYZTemplate(c,u,d,p,g){return c.replace(op,u.toString()).replace(ap,d.toString()).replace(lp,p.toString()).replace(hp,(function(){if(void 0===g)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(g-p).toString()}))}function expandUrl(c){const u=[];let d=/\{([a-z])-([a-z])\}/.exec(c);if(d){const p=d[1].charCodeAt(0),g=d[2].charCodeAt(0);let f;for(f=p;f<=g;++f)u.push(c.replace(d[0],String.fromCharCode(f)));return u}if(d=/\{(\d+)-(\d+)\}/.exec(c),d){const p=parseInt(d[2],10);for(let g=parseInt(d[1],10);g<=p;g++)u.push(c.replace(d[0],g.toString()));return u}return u.push(c),u}function createFromTemplate(c,u){return function(d,p,g){if(!d)return;let f;const _=d[0];if(u){const c=u.getFullTileRange(_);c&&(f=c.getHeight()-1)}return renderXYZTemplate(c,_,d[1],d[2],f)}}function createFromTemplates(c,u){const d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=createFromTemplate(c[g],u);return createFromTileUrlFunctions(p)}function createFromTileUrlFunctions(c){return 1===c.length?c[0]:function(u,d,p){if(!u)return;const g=modulo(hash(u),c.length);return c[g](u,d,p)}}function nullTileUrlFunction(c,u,d){}class UrlTile extends sp{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,projection:c.projection,state:c.state,tileGrid:c.tileGrid,tilePixelRatio:c.tilePixelRatio,wrapX:c.wrapX,transition:c.transition,interpolate:c.interpolate,key:c.key,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===UrlTile.prototype.tileUrlFunction,this.tileLoadFunction=c.tileLoadFunction,c.tileUrlFunction&&(this.tileUrlFunction=c.tileUrlFunction),this.urls=null,c.urls?this.setUrls(c.urls):c.url&&this.setUrl(c.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(c){const u=c.target,d=getUid(u),p=u.getState();let g;p==go?(this.tileLoadingKeys_[d]=!0,g=ep):d in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[d],g=p==fo?rp:p==mo?ip:void 0),null!=g&&this.dispatchEvent(new TileSourceEvent(g,u))}setTileLoadFunction(c){this.tileCache.clear(),this.tileLoadFunction=c,this.changed()}setTileUrlFunction(c,u){this.tileUrlFunction=c,this.tileCache.pruneExceptNewestZ(),void 0!==u?this.setKey(u):this.changed()}setUrl(c){const u=expandUrl(c);this.urls=u,this.setUrls(u)}setUrls(c){this.urls=c;const u=c.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(createFromTemplates(c,this.tileGrid),u):this.setKey(u)}tileUrlFunction(c,u,d){}useTile(c,u,d){const p=getKeyZXY(c,u,d);this.tileCache.containsKey(p)&&this.tileCache.get(p)}}var cp=UrlTile;function defaultTileLoadFunction(c,u){c.getImage().src=u}var up=class TileImage extends cp{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,projection:c.projection,state:c.state,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction?c.tileLoadFunction:defaultTileLoadFunction,tilePixelRatio:c.tilePixelRatio,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:c.wrapX,transition:c.transition,interpolate:void 0===c.interpolate||c.interpolate,key:c.key,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.crossOrigin=void 0!==c.crossOrigin?c.crossOrigin:null,this.tileClass=void 0!==c.tileClass?c.tileClass:xo,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=c.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const c in this.tileCacheForProjection)if(this.tileCacheForProjection[c].canExpireCache())return!0;return!1}expireCache(c,u){const d=this.getTileCacheForProjection(c);this.tileCache.expireCache(this.tileCache==d?u:{});for(const c in this.tileCacheForProjection){const p=this.tileCacheForProjection[c];p.expireCache(p==d?u:{})}}getGutterForProjection(c){return this.getProjection()&&c&&!equivalent(this.getProjection(),c)?0:this.getGutter()}getGutter(){return 0}getKey(){let c=super.getKey();return this.getInterpolate()||(c+=":disable-interpolation"),c}getTileGridForProjection(c){const u=this.getProjection();if(this.tileGrid&&(!u||equivalent(u,c)))return this.tileGrid;const d=getUid(c);return d in this.tileGridForProjection||(this.tileGridForProjection[d]=getForProjection(c)),this.tileGridForProjection[d]}getTileCacheForProjection(c){const u=this.getProjection();if(!u||equivalent(u,c))return this.tileCache;const d=getUid(c);return d in this.tileCacheForProjection||(this.tileCacheForProjection[d]=new la(this.tileCache.highWaterMark)),this.tileCacheForProjection[d]}createTile_(c,u,d,p,g,f){const _=[c,u,d],y=this.getTileCoordForTileUrlFunction(_,g),x=y?this.tileUrlFunction(y,p,g):void 0,v=new this.tileClass(_,void 0!==x?po:_o,void 0!==x?x:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return v.key=f,v.addEventListener(_i,this.handleTileChange.bind(this)),v}getTile(c,u,d,p,g){const f=this.getProjection();if(!f||!g||equivalent(f,g))return this.getTileInternal(c,u,d,p,f||g);const _=this.getTileCacheForProjection(g),y=[c,u,d];let x;const v=getKey(y);_.containsKey(v)&&(x=_.get(v));const C=this.getKey();if(x&&x.key==C)return x;const M=this.getTileGridForProjection(f),T=this.getTileGridForProjection(g),L=this.getTileCoordForTileUrlFunction(y,g),A=new ReprojTile(f,M,g,T,y,L,this.getTilePixelRatio(p),this.getGutter(),((c,u,d,p)=>this.getTileInternal(c,u,d,p,f)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return A.key=C,x?_.replace(v,A):_.set(v,A),A}getTileInternal(c,u,d,p,g){const f=getKeyZXY(c,u,d),_=this.getKey();if(!this.tileCache.containsKey(f)){const y=this.createTile_(c,u,d,p,g,_);return this.tileCache.set(f,y),y}let y=this.tileCache.get(f);return y.key!=_&&(y=this.createTile_(c,u,d,p,g,_),this.tileCache.replace(f,y)),y}setRenderReprojectionEdges(c){if(this.renderReprojectionEdges_!=c){this.renderReprojectionEdges_=c;for(const c in this.tileCacheForProjection)this.tileCacheForProjection[c].clear();this.changed()}}setTileGridForProjection(c,u){const d=get$2(c);if(d){const c=getUid(d);c in this.tileGridForProjection||(this.tileGridForProjection[c]=u)}}clear(){super.clear();for(const c in this.tileCacheForProjection)this.tileCacheForProjection[c].clear()}};var dp=class BingMaps extends up{constructor(c){const u=void 0!==c.hidpi&&c.hidpi;super({cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,projection:get$2("EPSG:3857"),reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,tilePixelRatio:u?2:1,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.hidpi_=u,this.culture_=void 0!==c.culture?c.culture:"en-us",this.maxZoom_=void 0!==c.maxZoom?c.maxZoom:-1,this.apiKey_=c.key,this.imagerySet_=c.imagerySet,this.placeholderTiles_=c.placeholderTiles;const d="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_;fetch(d).then((c=>c.json())).then((c=>this.handleImageryMetadataResponse(c)))}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(c){if(200!=c.statusCode||"OK"!=c.statusDescription||"ValidCredentials"!=c.authenticationResultCode||1!=c.resourceSets.length||1!=c.resourceSets[0].resources.length)return void this.setState("error");const u=c.resourceSets[0].resources[0],d=-1==this.maxZoom_?u.zoomMax:this.maxZoom_,p=extentFromProjection(this.getProjection()),g=this.hidpi_?2:1,f=u.imageWidth==u.imageHeight?u.imageWidth/g:[u.imageWidth/g,u.imageHeight/g],_=createXYZ({extent:p,minZoom:u.zoomMin,maxZoom:d,tileSize:f});this.tileGrid=_;const y=this.culture_,x=this.hidpi_,v=this.placeholderTiles_;if(this.tileUrlFunction=createFromTileUrlFunctions(u.imageUrlSubdomains.map((function(c){const d=[0,0,0],p=u.imageUrl.replace("{subdomain}",c).replace("{culture}",y);return function(c,u,g){if(!c)return;createOrUpdate$1(c[0],c[1],c[2],d);const f=new URL(p.replace("{quadkey}",function quadKey(c){const u=c[0],d=new Array(u);let p,g,f=1<<u-1;for(p=0;p<u;++p)g=48,c[1]&f&&(g+=1),c[2]&f&&(g+=2),d[p]=String.fromCharCode(g),f>>=1;return d.join("")}(d))),_=f.searchParams;return x&&(_.set("dpi","d1"),_.set("device","mobile")),!0===v?_.delete("n"):!1===v&&_.set("n","z"),f.toString()}}))),u.imageryProviders){const c=getTransformFromProjections(get$2("EPSG:4326"),this.getProjection());this.setAttributions((d=>{const p=[],g=d.viewState,f=this.getTileGrid(),_=f.getZForResolution(g.resolution,this.zDirection),y=f.getTileCoordForCoordAndZ(g.center,_)[0];return u.imageryProviders.map((function(u){let g=!1;const f=u.coverageAreas;for(let u=0,p=f.length;u<p;++u){const p=f[u];if(y>=p.zoomMin&&y<=p.zoomMax){const u=p.bbox;if(intersects$1(applyTransform([u[1],u[0],u[3],u[2]],c),d.extent)){g=!0;break}}}g&&p.push(u.attribution)})),p.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),p}))}this.setState("ready")}};class XYZ extends up{constructor(c){const u=void 0!==(c=c||{}).projection?c.projection:"EPSG:3857",d=void 0!==c.tileGrid?c.tileGrid:createXYZ({extent:extentFromProjection(u),maxResolution:c.maxResolution,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize});super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:u,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileGrid:d,tileLoadFunction:c.tileLoadFunction,tilePixelRatio:c.tilePixelRatio,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.gutter_=void 0!==c.gutter?c.gutter:0}getGutter(){return this.gutter_}}var pp=class CartoDB extends XYZ{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,maxZoom:void 0!==c.maxZoom?c.maxZoom:18,minZoom:c.minZoom,projection:c.projection,transition:c.transition,wrapX:c.wrapX,zDirection:c.zDirection}),this.account_=c.account,this.mapId_=c.map||"",this.config_=c.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(c){Object.assign(this.config_,c),this.initializeMap_()}setConfig(c){this.config_=c||{},this.initializeMap_()}initializeMap_(){const c=JSON.stringify(this.config_);if(this.templateCache_[c])return void this.applyTemplate_(this.templateCache_[c]);let u="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(u+="/named/"+this.mapId_);const d=new XMLHttpRequest;d.addEventListener("load",this.handleInitResponse_.bind(this,c)),d.addEventListener("error",this.handleInitError_.bind(this)),d.open("POST",u),d.setRequestHeader("Content-type","application/json"),d.send(JSON.stringify(this.config_))}handleInitResponse_(c,u){const d=u.target;if(!d.status||d.status>=200&&d.status<300){let u;try{u=JSON.parse(d.responseText)}catch(c){return void this.setState("error")}this.applyTemplate_(u),this.templateCache_[c]=u,this.setState("ready")}else this.setState("error")}handleInitError_(c){this.setState("error")}applyTemplate_(c){const u="https://"+c.cdn_url.https+"/"+this.account_+"/api/v1/map/"+c.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(u)}};var gp=class Cluster extends ao{constructor(c){super({attributions:(c=c||{}).attributions,wrapX:c.wrapX}),this.resolution=void 0,this.distance=void 0!==c.distance?c.distance:20,this.minDistance=c.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=c.geometryFunction||function(c){const u=c.getGeometry();return assert(!u||"Point"===u.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),u},this.createCustomCluster_=c.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(c.source||null)}clear(c){this.features.length=0,super.clear(c)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(c,u,d){this.source?.loadFeatures(c,u,d),u!==this.resolution&&(this.resolution=u,this.refresh())}setDistance(c){this.updateDistance(c,this.minDistance)}setMinDistance(c){this.updateDistance(this.distance,c)}getMinDistance(){return this.minDistance}setSource(c){this.source&&this.source.removeEventListener(_i,this.boundRefresh_),this.source=c,c&&c.addEventListener(_i,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(c,u){const d=0===c?0:Math.min(u,c)/c,p=c!==this.distance||this.interpolationRatio!==d;this.distance=c,this.minDistance=u,this.interpolationRatio=d,p&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const c=[1/0,1/0,-1/0,-1/0],u=this.distance*this.resolution,d=this.source.getFeatures(),p={};for(let g=0,f=d.length;g<f;g++){const f=d[g];if(!(getUid(f)in p)){const d=this.geometryFunction(f);if(d){createOrUpdateFromCoordinate(d.getCoordinates(),c),buffer(c,u,c);const g=this.source.getFeaturesInExtent(c).filter((function(c){const u=getUid(c);return!(u in p)&&(p[u]=!0,!0)}));this.features.push(this.createCluster(g,c))}}}}createCluster(c,u){const d=[0,0];for(let u=c.length-1;u>=0;--u){const p=this.geometryFunction(c[u]);p?add$1(d,p.getCoordinates()):c.splice(u,1)}scale$2(d,1/c.length);const p=getCenter(u),g=this.interpolationRatio,f=new ar([d[0]*(1-g)+p[0]*g,d[1]*(1-g)+p[1]*g]);return this.createCustomCluster_?this.createCustomCluster_(f,c):new ki({geometry:f,features:c})}};var mp=class DataTileSource extends sp{constructor(c){const u=void 0===c.projection?"EPSG:3857":c.projection;let d=c.tileGrid;void 0===d&&u&&(d=createXYZ({extent:extentFromProjection(u),maxResolution:c.maxResolution,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize})),super({cacheSize:.1,attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,projection:u,tileGrid:d,state:c.state,wrapX:c.wrapX,transition:c.transition,interpolate:c.interpolate,key:c.key}),this.gutter_=void 0!==c.gutter?c.gutter:0,this.tileSize_=c.tileSize?toSize(c.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=c.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===c.bandCount?4:c.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={},this.crossOrigin_=c.crossOrigin||"anonymous"}setTileSizes(c){this.tileSizes_=c}getTileSize(c){if(this.tileSizes_)return this.tileSizes_[c];if(this.tileSize_)return this.tileSize_;const u=this.getTileGrid();return u?toSize(u.getTileSize(c)):[256,256]}getGutterForProjection(c){const u=this.getProjection();return!u||equivalent(u,c)?this.gutter_:0}setLoader(c){this.loader_=c}getReprojTile_(c,u,d,p,g){const f=this.getTileCacheForProjection(p),_=getKeyZXY(c,u,d);if(f.containsKey(_)){const c=f.get(_);if(c&&c.key==this.getKey())return c}const y=this.getTileGrid(),x=Math.max.apply(null,y.getResolutions().map(((c,u)=>{const d=toSize(y.getTileSize(u)),p=this.getTileSize(u);return Math.max(p[0]/d[0],p[1]/d[1])}))),v=this.getTileGridForProjection(g),C=this.getTileGridForProjection(p),M=[c,u,d],T=this.getTileCoordForTileUrlFunction(M,p),L=Object.assign({sourceProj:g,sourceTileGrid:v,targetProj:p,targetTileGrid:C,tileCoord:M,wrappedTileCoord:T,pixelRatio:x,gutter:this.getGutterForProjection(g),getTileFunction:(c,u,d,p)=>this.getTile(c,u,d,p,g)},this.tileOptions),A=new ReprojDataTile(L);return A.key=this.getKey(),A}getTile(c,u,d,p,g){const f=this.getProjection();if(f&&g&&!equivalent(f,g))return this.getReprojTile_(c,u,d,g,f);const _=this.getTileSize(c),y=getKeyZXY(c,u,d);if(this.tileCache.containsKey(y))return this.tileCache.get(y);const x=this.loader_,v=new AbortController,C={signal:v.signal,crossOrigin:this.crossOrigin_},M=this.getTileCoordForTileUrlFunction([c,u,d]);if(!M)return null;const T=M[0],L=M[1],A=M[2];const I=Object.assign({tileCoord:[c,u,d],loader:function loader(){return toPromise((function(){return x(T,L,A,C)}))},size:_,controller:v},this.tileOptions),k=new DataTile(I);return k.key=this.getKey(),k.addEventListener(_i,this.handleTileChange_),this.tileCache.set(y,k),k}handleTileChange_(c){const u=c.target,d=getUid(u),p=u.getState();let g;p==go?(this.tileLoadingKeys_[d]=!0,g=ep):d in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[d],g=p==fo?rp:p==mo?ip:void 0),g&&this.dispatchEvent(new TileSourceEvent(g,u))}getTileGridForProjection(c){const u=this.getProjection();if(this.tileGrid&&(!u||equivalent(u,c)))return this.tileGrid;const d=getUid(c);return d in this.tileGridForProjection_||(this.tileGridForProjection_[d]=getForProjection(c)),this.tileGridForProjection_[d]}setTileGridForProjection(c,u){const d=get$2(c);if(d){const c=getUid(d);c in this.tileGridForProjection_||(this.tileGridForProjection_[c]=u)}}getTileCacheForProjection(c){const u=this.getProjection();if(!u||equivalent(u,c))return this.tileCache;const d=getUid(c);return d in this.tileCacheForProjection_||(this.tileCacheForProjection_[d]=new la(.1)),this.tileCacheForProjection_[d]}expireCache(c,u){const d=this.getTileCacheForProjection(c);this.tileCache.expireCache(this.tileCache==d?u:{});for(const c in this.tileCacheForProjection_){const p=this.tileCacheForProjection_[c];p.expireCache(p==d?u:{})}}clear(){super.clear();for(const c in this.tileCacheForProjection_)this.tileCacheForProjection_[c].clear()}};var fp=class Google extends up{constructor(c){const u=!!c.highDpi;super({attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,projection:"EPSG:3857",reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,tilePixelRatio:u?2:1,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.apiKey_=c.key,this.error_=null;const d={mapType:c.mapType||"roadmap",language:c.language||"en-US",region:c.region||"US"};c.imageFormat&&(d.imageFormat=c.imageFormat),c.scale&&(d.scale=c.scale),u&&(d.highDpi=!0),c.layerTypes&&(d.layerTypes=c.layerTypes),c.styles&&(d.styles=c.styles),!0===c.overlay&&(d.overlay=!0),c.apiOptions&&(d.apiOptions=c.apiOptions),this.sessionTokenRequest_=d,this.sessionTokenValue_,this.sessionRefreshId_,this.previousViewportAttribution_,this.previousViewportExtent_,this.createSession_()}getError(){return this.error_}fetchSessionToken(c,u){return fetch(c,u)}async createSession_(){const c="https://tile.googleapis.com/v1/createSession?key="+this.apiKey_,u={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.sessionTokenRequest_)},d=await this.fetchSessionToken(c,u);if(!d.ok){try{const c=await d.json();this.error_=new Error(c.error.message)}catch{this.error_=new Error("Error fetching session token")}return void this.setState("error")}const p=await d.json(),g=this.getTilePixelRatio(1),f=[p.tileWidth/g,p.tileHeight/g];this.tileGrid=createXYZ({extent:extentFromProjection(this.getProjection()),maxZoom:22,tileSize:f});const _=p.session;this.sessionTokenValue_=_;const y=this.apiKey_;this.tileUrlFunction=function(c,u,d){return`https://tile.googleapis.com/v1/2dtiles/${c[0]}/${c[1]}/${c[2]}?session=${_}&key=${y}`};const x=1e3*parseInt(p.expiry,10),v=Math.max(x-Date.now()-6e4,1);this.sessionRefreshId_=setTimeout((()=>this.createSession_()),v),this.setAttributions(this.fetchAttributions_.bind(this)),this.setState("ready")}async fetchAttributions_(c){if(c.viewHints[Bn]||c.viewHints[Un]||c.animate)return this.previousViewportAttribution_;const[u,d]=toLonLat(getBottomLeft(c.extent),c.viewState.projection),[p,g]=toLonLat(getTopRight(c.extent),c.viewState.projection),f=`zoom=${this.getTileGrid().getZForResolution(c.viewState.resolution,this.zDirection)}&north=${g}&south=${d}&east=${p}&west=${u}`;if(this.previousViewportExtent_==f)return this.previousViewportAttribution_;this.previousViewportExtent_=f;const _=`https://tile.googleapis.com/tile/v1/viewport?session=${this.sessionTokenValue_}&key=${this.apiKey_}&${f}`;return this.previousViewportAttribution_=await fetch(_).then((c=>c.json())).then((c=>c.copyright)),this.previousViewportAttribution_}disposeInternal(){clearTimeout(this.sessionRefreshId_),super.disposeInternal()}};let _p=class CustomTile extends xo{constructor(c,u,d,p,g,f,_){super(u,d,p,g,f,_),this.zoomifyImage_=null,this.tileSize_=c}getImage(){if(this.zoomifyImage_)return this.zoomifyImage_;const c=super.getImage();if(this.state==mo){const u=this.tileSize_;if(c.width==u[0]&&c.height==u[1])return this.zoomifyImage_=c,c;const d=createCanvasContext2D(u[0],u[1]);return d.drawImage(c,0,0),this.zoomifyImage_=d.canvas,d.canvas}return c}};var yp=class Zoomify extends up{constructor(c){const u=c.size,d=void 0!==c.tierSizeCalculation?c.tierSizeCalculation:"default",p=c.tilePixelRatio||1,g=u[0],f=u[1],_=[],y=c.tileSize||Xn;let x=y*p;switch(d){case"default":for(;g>x||f>x;)_.push([Math.ceil(g/x),Math.ceil(f/x)]),x+=x;break;case"truncated":let c=g,u=f;for(;c>x||u>x;)_.push([Math.ceil(c/x),Math.ceil(u/x)]),c>>=1,u>>=1;break;default:throw new Error("Unknown `tierSizeCalculation` configured")}_.push([1,1]),_.reverse();const v=[p],C=[0];for(let c=1,u=_.length;c<u;c++)v.push(p<<c),C.push(_[c-1][0]*_[c-1][1]+C[c-1]);v.reverse();const M=new TileGrid({tileSize:y,extent:c.extent||[0,-f,g,0],resolutions:v});let T=c.url;!T||T.includes("{TileGroup}")||T.includes("{tileIndex}")||(T+="{TileGroup}/{z}-{x}-{y}.jpg");const L=expandUrl(T);let A=y*p;const I=createFromTileUrlFunctions(L.map((function createFromTemplate(c){return function(u,d,p){if(!u)return;const g=u[0],f=u[1],y=u[2],x=f+y*_[g][0],v={z:g,x:f,y:y,tileIndex:x,TileGroup:"TileGroup"+((x+C[g])/A|0)};return c.replace(/\{(\w+?)\}/g,(function(c,u){return v[u]}))}}))),k=_p.bind(null,toSize(y*p));super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,tilePixelRatio:p,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:k,tileGrid:M,tileUrlFunction:I,transition:c.transition}),this.zDirection=c.zDirection;const O=I(M.getTileCoordForCoordAndResolution(getCenter(M.getExtent()),v[v.length-1]),1,null),N=new Image;N.addEventListener("error",(()=>{A=y,this.changed()})),N.src=O}};function formatPercentage(c){return c.toLocaleString("en",{maximumFractionDigits:10})}var xp=class IIIF extends up{constructor(c){const u=c||{};let d=u.url||"";d+=d.lastIndexOf("/")===d.length-1||""===d?"":"/";const p=u.version||Al,g=u.sizes||[],f=u.size;assert(null!=f&&Array.isArray(f)&&2==f.length&&!isNaN(f[0])&&f[0]>0&&!isNaN(f[1])&&f[1]>0,"Missing or invalid `size`");const _=f[0],y=f[1],x=u.tileSize,v=u.tilePixelRatio||1,C=u.format||"jpg",M=u.quality||(u.version==Ll?"native":"default");let T=u.resolutions||[];const L=u.supports||[],A=u.extent||[0,-y,_,0],I=null!=g&&Array.isArray(g)&&g.length>0,k=void 0!==x&&("number"==typeof x&&Number.isInteger(x)&&x>0||Array.isArray(x)&&x.length>0),O=null!=L&&Array.isArray(L)&&(L.includes("regionByPx")||L.includes("regionByPct"))&&(L.includes("sizeByWh")||L.includes("sizeByH")||L.includes("sizeByW")||L.includes("sizeByPct"));let N,G,j;if(T.sort((function(c,u){return u-c})),k||O)if(null!=x&&("number"==typeof x&&Number.isInteger(x)&&x>0?(N=x,G=x):Array.isArray(x)&&x.length>0&&((1==x.length||null==x[1]&&Number.isInteger(x[0]))&&(N=x[0],G=x[0]),2==x.length&&(Number.isInteger(x[0])&&Number.isInteger(x[1])?(N=x[0],G=x[1]):null==x[0]&&Number.isInteger(x[1])&&(N=x[1],G=x[1])))),void 0!==N&&void 0!==G||(N=Xn,G=Xn),0==T.length){j=Math.max(Math.ceil(Math.log(_/N)/Math.LN2),Math.ceil(Math.log(y/G)/Math.LN2));for(let c=j;c>=0;c--)T.push(Math.pow(2,c))}else{const c=Math.max(...T);j=Math.round(Math.log(c)/Math.LN2)}else if(N=_,G=y,T=[],I){g.sort((function(c,u){return c[0]-u[0]})),j=-1;const c=[];for(let u=0;u<g.length;u++){const d=_/g[u][0];T.length>0&&T[T.length-1]==d?c.push(u):(T.push(d),j++)}if(c.length>0)for(let u=0;u<c.length;u++)g.splice(c[u]-u,1)}else T.push(1),g.push([_,y]),j=0;const B=new TileGrid({tileSize:[N,G],extent:A,origin:getTopLeft(A),resolutions:T}),V=_p.bind(null,toSize(x||256).map((function(c){return c*v})));super({attributions:u.attributions,attributionsCollapsible:u.attributionsCollapsible,cacheSize:u.cacheSize,crossOrigin:u.crossOrigin,interpolate:u.interpolate,projection:u.projection,reprojectionErrorThreshold:u.reprojectionErrorThreshold,state:u.state,tileClass:V,tileGrid:B,tilePixelRatio:u.tilePixelRatio,tileUrlFunction:function(c,u,f){let x,v;const A=c[0];if(A>j)return;const B=c[1],V=c[2],q=T[A];if(!(void 0===B||void 0===V||void 0===q||B<0||Math.ceil(_/q/N)<=B||V<0||Math.ceil(y/q/G)<=V)){if(O||k){const c=B*N*q,u=V*G*q;let d=N*q,g=G*q,f=N,C=G;if(c+d>_&&(d=_-c),u+g>y&&(g=y-u),c+N*q>_&&(f=Math.floor((_-c+q-1)/q)),u+G*q>y&&(C=Math.floor((y-u+q-1)/q)),0==c&&d==_&&0==u&&g==y)x="full";else if(!O||L.includes("regionByPx"))x=c+","+u+","+d+","+g;else if(L.includes("regionByPct")){x="pct:"+formatPercentage(c/_*100)+","+formatPercentage(u/y*100)+","+formatPercentage(d/_*100)+","+formatPercentage(g/y*100)}p!=Il||O&&!L.includes("sizeByWh")?!O||L.includes("sizeByW")?v=f+",":L.includes("sizeByH")?v=","+C:L.includes("sizeByWh")?v=f+","+C:L.includes("sizeByPct")&&(v="pct:"+formatPercentage(100/q)):v=f+","+C}else if(x="full",I){const c=g[A][0],u=g[A][1];v=p==Il?c==_&&u==y?"max":c+","+u:c==_?"full":c+","}else v=p==Il?"max":"full";return d+x+"/"+v+"/0/"+M+"."+C}},transition:u.transition}),this.zDirection=u.zDirection}};class ReprojImage extends Zr{constructor(c,u,d,p,g,f,_){let y=c.getExtent();y&&c.canWrapX()&&(y=y.slice(),y[0]=-1/0,y[2]=1/0);let x=u.getExtent();x&&u.canWrapX()&&(x=x.slice(),x[0]=-1/0,x[2]=1/0);const v=x?getIntersection(d,x):d,C=calculateSourceResolution(c,u,getCenter(v),p),M=new Triangulation(c,u,v,y,.5*C,p),T=M.calculateSourceExtent(),L=isEmpty(T)?null:f(T,C,g),A=L?br.IDLE:br.EMPTY,I=L?L.getPixelRatio():1;super(d,p,I,A),this.targetProj_=u,this.maxSourceExtent_=y,this.triangulation_=M,this.targetResolution_=p,this.targetExtent_=d,this.sourceImage_=L,this.sourcePixelRatio_=I,this.interpolate_=_,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==br.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const c=this.sourceImage_.getState();if(c==br.LOADED){const c=getWidth(this.targetExtent_)/this.targetResolution_,u=getHeight(this.targetExtent_)/this.targetResolution_;this.canvas_=render$1(c,u,this.sourcePixelRatio_,fromResolutionLike(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=c,this.changed()}load(){if(this.state==br.IDLE){this.state=br.LOADING,this.changed();const c=this.sourceImage_.getState();c==br.LOADED||c==br.ERROR?this.reproject_():(this.sourceListenerKey_=listen(this.sourceImage_,_i,(c=>{const u=this.sourceImage_.getState();u!=br.LOADED&&u!=br.ERROR||(this.unlistenSource_(),this.reproject_())})),this.sourceImage_.load())}}unlistenSource_(){unlistenByKey(this.sourceListenerKey_),this.sourceListenerKey_=null}}const vp=4,Sp="imageloadstart",wp="imageloadend",Cp="imageloaderror";class ImageSourceEvent extends BaseEvent{constructor(c,u){super(c),this.image=u}}function defaultImageLoadFunction(c,u){c.getImage().src=u}function getRequestExtent(c,u,d,p){const g=u/d,f=getCenter(c),_=ceil(getWidth(c)/g,vp),y=ceil(getHeight(c)/g,vp);return getForViewAndSize(f,g,0,[_+2*ceil((p-1)*_/2,vp),y+2*ceil((p-1)*y/2,vp)])}var Ep=class ImageSource extends Js{constructor(c){super({attributions:c.attributions,projection:c.projection,state:c.state,interpolate:void 0===c.interpolate||c.interpolate}),this.on,this.once,this.un,this.loader=c.loader||null,this.resolutions_=void 0!==c.resolutions?c.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!c.loader&&0===c.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(c){this.resolutions_=c}findNearestResolution(c){const u=this.getResolutions();if(u){c=u[linearFindNearest(u,c,0)]}return c}getImage(c,u,d,p){const g=this.getProjection();if(!g||!p||equivalent(g,p))return g&&(p=g),this.getImageInternal(c,u,d,p);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&equivalent(this.reprojectedImage_.getProjection(),p)&&this.reprojectedImage_.getResolution()==u&&equals$1(this.reprojectedImage_.getExtent(),c))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new ReprojImage(g,p,c,u,d,((c,u,d)=>this.getImageInternal(c,u,d,g)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(c,u,d,p){if(this.loader){const g=getRequestExtent(c,u,d,1),f=this.findNearestResolution(u);if(this.image&&(this.static_||this.wantedProjection_===p&&(this.wantedExtent_&&containsExtent(this.wantedExtent_,g)||containsExtent(this.image.getExtent(),g))&&(this.wantedResolution_&&fromResolutionLike(this.wantedResolution_)===f||fromResolutionLike(this.image.getResolution())===f)))return this.image;this.wantedProjection_=p,this.wantedExtent_=g,this.wantedResolution_=f,this.image=new Zr(g,f,d,this.loader),this.image.addEventListener(_i,this.handleImageChange.bind(this))}return this.image}handleImageChange(c){const u=c.target;let d;switch(u.getState()){case br.LOADING:this.loading=!0,d=Sp;break;case br.LOADED:this.loading=!1,d=wp;break;case br.ERROR:this.loading=!1,d=Cp;break;default:return}this.hasListener(d)&&this.dispatchEvent(new ImageSourceEvent(d,u))}};function getRequestUrl$1(c,u,d,p,g,f){const _=g.getCode().split(/:(?=\d+$)/).pop(),y=d/p,x=[round(getWidth(u)/y,vp),round(getHeight(u)/y,vp)];f.SIZE=x[0]+","+x[1],f.BBOX=u.join(","),f.BBOXSR=_,f.IMAGESR=_,f.DPI=Math.round(f.DPI?f.DPI*p:90*p);return appendParams(c.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),f)}function createLoader$3(c){const u=c.load?c.load:decode$1,d=get$2(c.projection||"EPSG:3857"),p=c.ratio??1.5,g=c.crossOrigin??null;return function(f,_,y){y=c.hidpi?y:1;const x={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(x,c.params),f=getRequestExtent(f,_,y,p);const v=getRequestUrl$1(c.url,f,_,y,d,x),C=new Image;return C.crossOrigin=g,u(C,v).then((c=>{const u=getWidth(f)/c.width*y;return{image:c,extent:f,resolution:u,pixelRatio:y}}))}}var Pp=class ImageArcGISRest extends Ep{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.hidpi_=void 0===c.hidpi||c.hidpi,this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.params_=Object.assign({},c.params),this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader$3({crossOrigin:this.crossOrigin_,params:this.params_,projection:p,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}setUrl(c){c!=this.url_&&(this.url_=c,this.loader=null,this.changed())}updateParams(c){Object.assign(this.params_,c),this.changed()}changed(){this.image=null,super.changed()}};var bp=class ImageCanvasSource extends Ep{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions,state:c.state}),this.canvasFunction_=c.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5}getImageInternal(c,u,d,p){u=this.findNearestResolution(u);let g=this.canvas_;if(g&&this.renderedRevision_==this.getRevision()&&g.getResolution()==u&&g.getPixelRatio()==d&&containsExtent(g.getExtent(),c))return g;scaleFromCenter(c=c.slice(),this.ratio_);const f=[getWidth(c)/u*d,getHeight(c)/u*d],_=this.canvasFunction_.call(this,c,u,d,f,p);return _&&(g=new uo(c,u,d,_)),this.canvas_=g,this.renderedRevision_=this.getRevision(),g}};function getUrl(c,u,d,p,g,f,_){const y=function getScale(c,u,d,p){const g=getWidth(c),f=getHeight(c),_=u[0],y=u[1],x=.0254/p;return y*g>_*f?g*d/(_*x):f*d/(y*x)}(d,p,f,_),x=getCenter(d),v={OPERATION:g?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:_,SETDISPLAYWIDTH:Math.round(p[0]),SETDISPLAYHEIGHT:Math.round(p[1]),SETVIEWSCALE:y,SETVIEWCENTERX:x[0],SETVIEWCENTERY:x[1]};return Object.assign(v,u),appendParams(c,v)}function createLoader$2(c){const u=c.load||decode$1,d=c.useOverlay??!1,p=c.metersPerUnit||1,g=c.displayDpi||96,f=c.ratio??1,_=c.crossOrigin??null;return function(y,x,v){const C=new Image;C.crossOrigin=_;const M=getWidth(y=getRequestExtent(y,x,v,f))/x,T=getHeight(y)/x,L=[M*v,T*v],A=getUrl(c.url,c.params,y,L,d,p,g);return u(C,A).then((c=>({image:c,extent:y,pixelRatio:v})))}}var Mp=class ImageMapGuide extends Ep{constructor(c){super({interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.displayDpi_=void 0!==c.displayDpi?c.displayDpi:96,this.params_=Object.assign({},c.params),this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.hidpi_=void 0===c.hidpi||c.hidpi,this.metersPerUnit_=void 0!==c.metersPerUnit?c.metersPerUnit:1,this.ratio_=void 0!==c.ratio?c.ratio:1,this.useOverlay_=void 0!==c.useOverlay&&c.useOverlay,this.renderedRevision_=0,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader$2({crossOrigin:this.crossOrigin_,params:this.params_,hidpi:this.hidpi_,metersPerUnit:this.metersPerUnit_,url:this.url_,useOverlay:this.useOverlay_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(c){Object.assign(this.params_,c),this.changed()}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}changed(){this.image=null,super.changed()}};function createLoader$1(c){const u=c.load||decode$1,d=c.imageExtent,p=c.crossOrigin??null;return()=>{const g=new Image;return g.crossOrigin=p,u(g,c.url).then((c=>{const u=getWidth(d)/c.width,p=getHeight(d)/c.height;return{image:c,extent:d,resolution:u!==p?[u,p]:p,pixelRatio:1}}))}}var Tp=class Static extends Ep{constructor(c){const u=void 0!==c.crossOrigin?c.crossOrigin:null,d=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction;super({attributions:c.attributions,interpolate:c.interpolate,projection:get$2(c.projection)}),this.url_=c.url,this.imageExtent_=c.imageExtent,this.image=null,this.image=new Zr(this.imageExtent_,void 0,1,createLoader$1({url:c.url,imageExtent:c.imageExtent,crossOrigin:u,load:(c,u)=>(this.image.setImage(c),d(this.image,u),decode$1(c))})),this.image.addEventListener(_i,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(c,u,d,p){return intersects$1(c,this.image.getExtent())?this.image:null}getUrl(){return this.url_}};const Rp=new Error("Image failed to load");function loadImage(c,u,d,p,g){return new Promise(((f,_)=>{const y=new Image;y.crossOrigin=g.crossOrigin??null,y.addEventListener("load",(()=>f(y))),y.addEventListener("error",(()=>_(Rp))),y.src=renderXYZTemplate(c,u,d,p,g.maxY)}))}function makeLoaderFromTemplates(c){return function(u,d,p,g){const f=function pickUrl(c,u,d,p){return c[modulo(hashZXY(u,d,p),c.length)]}(c,u,d,p);return loadImage(f,u,d,p,g)}}function makeLoaderFromUrlLike(c){let u;if(Array.isArray(c))u=makeLoaderFromTemplates(c);else if("string"==typeof c){u=makeLoaderFromTemplates(expandUrl(c))}else{if("function"!=typeof c)throw new Error("The url option must be a single template, an array of templates, or a function for getting a URL");u=function makeLoaderFromGetter(c){return function(u,d,p,g){return loadImage(c(u,d,p,g),u,d,p,g)}}(c)}return u}let Lp=0;function keyFromUrlLike(c){return Array.isArray(c)?c.join("\n"):"string"==typeof c?c:(++Lp,"url-function-key-"+Lp)}var Ap=class ImageTileSource extends mp{constructor(c){let u,d=(c=c||{}).loader;c.url&&(d=makeLoaderFromUrlLike(c.url),u=keyFromUrlLike(c.url));const p=d?c.state:"loading",g=void 0===c.wrapX||c.wrapX;super({loader:d,key:u,attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize,gutter:c.gutter,maxResolution:c.maxResolution,projection:c.projection,tileGrid:c.tileGrid,state:p,wrapX:g,transition:c.transition,interpolate:!1!==c.interpolate,crossOrigin:c.crossOrigin})}setUrl(c){const u=makeLoaderFromUrlLike(c);this.setLoader(u),this.setKey(keyFromUrlLike(c)),"ready"!==this.getState()&&this.setState("ready")}};const Ip="1.3.0",Fp=[101,101];function getRequestUrl(c,u,d,p,g){g.WIDTH=d[0],g.HEIGHT=d[1];const f=p.getAxisOrientation(),_=compareVersions(g.VERSION,"1.3")>=0;g[_?"CRS":"SRS"]=p.getCode();const y=_&&f.startsWith("ne")?[u[1],u[0],u[3],u[2]]:u;return g.BBOX=y.join(","),appendParams(c,g)}function getImageSrc(c,u,d,p,g,f,_){f=Object.assign({REQUEST:"GetMap"},f);const y=u/d,x=[round(getWidth(c)/y,vp),round(getHeight(c)/y,vp)];if(1!=d)switch(_){case"geoserver":const c=90*d+.5|0;"FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+=";dpi:"+c:f.FORMAT_OPTIONS="dpi:"+c;break;case"mapserver":f.MAP_RESOLUTION=90*d;break;case"carmentaserver":case"qgis":f.DPI=90*d;break;default:throw new Error("Unknown `serverType` configured")}return getRequestUrl(g,c,x,p,f)}function getRequestParams(c,u){return Object.assign({REQUEST:u,SERVICE:"WMS",VERSION:Ip,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},c)}function createLoader(c){const u=void 0===c.hidpi||c.hidpi,d=get$2(c.projection||"EPSG:3857"),p=c.ratio||1.5,g=c.load||decode$1,f=c.crossOrigin??null;return(_,y,x)=>{_=getRequestExtent(_,y,x,p),1==x||u&&void 0!==c.serverType||(x=1);const v=getImageSrc(_,y,x,d,c.url,getRequestParams(c.params,"GetMap"),c.serverType),C=new Image;return C.crossOrigin=f,g(C,v).then((c=>({image:c,extent:_,pixelRatio:x})))}}var kp=class ImageWMS extends Ep{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.params_=Object.assign({},c.params),this.serverType_=c.serverType,this.hidpi_=void 0===c.hidpi||c.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(c,u,d,p){const g=get$2(d),f=this.getProjection();f&&f!==g&&(u=calculateSourceResolution(f,g,c,u),c=transform$1(c,g,f));return function getFeatureInfoUrl(c,u,d){if(void 0===c.url)return;const p=get$2(c.projection||"EPSG:3857"),g=getForViewAndSize(u,d,0,Fp),f={QUERY_LAYERS:c.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(f,getRequestParams(c.params,"GetFeatureInfo"),c.params);const _=floor((u[0]-g[0])/d,vp),y=floor((g[3]-u[1])/d,vp),x=compareVersions(f.VERSION,"1.3")>=0;return f[x?"I":"X"]=_,f[x?"J":"Y"]=y,getRequestUrl(c.url,g,Fp,p,f)}({url:this.url_,params:{...this.params_,...p},projection:f||g},c,u)}getLegendUrl(c,u){return function getLegendUrl(c,u){if(void 0===c.url)return;const d={SERVICE:"WMS",VERSION:Ip,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0!==u){const p=get$2(c.projection||"EPSG:3857").getMetersPerUnit()||1,g=28e-5;d.SCALE=u*p/g}if(Object.assign(d,c.params),void 0!==c.params&&void 0===d.LAYER){const c=d.LAYERS;if(Array.isArray(c)&&1===c.length)return;d.LAYER=c}return appendParams(c.url,d)}({url:this.url_,params:{...this.params_,...u}},c)}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader({crossOrigin:this.crossOrigin_,params:this.params_,projection:p,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}setUrl(c){c!=this.url_&&(this.url_=c,this.loader=null,this.changed())}updateParams(c){Object.assign(this.params_,c),this.changed()}changed(){this.image=null,super.changed()}};function jsonp(c,u,d,p){const g=document.createElement("script"),f="olc_"+getUid(u);function cleanup(){delete window[f],g.parentNode.removeChild(g)}g.async=!0,g.src=c+(c.includes("?")?"&":"?")+"callback="+f;const _=setTimeout((function(){cleanup(),d&&d()}),1e4);window[f]=function(c){clearTimeout(_),cleanup(),u(c)},document.head.appendChild(g)}class ResponseError extends Error{constructor(c){super("Unexpected response status: "+c.status),this.name="ResponseError",this.response=c}}class ClientError extends Error{constructor(c){super("Failed to issue request"),this.name="ClientError",this.client=c}}function getJSON(c){return new Promise((function(u,d){const p=new XMLHttpRequest;p.addEventListener("load",(function onLoad(c){const p=c.target;if(!p.status||p.status>=200&&p.status<300){let c;try{c=JSON.parse(p.responseText)}catch(c){const u="Error parsing response text as JSON: "+c.message;return void d(new Error(u))}u(c)}else d(new ResponseError(p))})),p.addEventListener("error",(function onError(c){d(new ClientError(c.target))})),p.open("GET",c),p.setRequestHeader("Accept","application/json"),p.send()}))}function resolveUrl(c,u){return u.includes("://")?u:new URL(u,c).href}const Op={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},Np={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function appendCollectionsQueryParam(c,u){if(!u.length)return c;const d=new URL(c,"file:/");if(d.pathname.split("/").includes("collections"))return error('The "collections" query parameter cannot be added to collection endpoints'),c;const p=u.map((c=>encodeURIComponent(c))).join(",");d.searchParams.append("collections",p);return`${c.split("?")[0]}?${decodeURIComponent(d.searchParams.toString())}`}function parseTileMatrixSet(c,u,d,p){let g=c.projection;if(!g&&(g=get$2(u.crs),!g))throw new Error(`Unsupported CRS: ${u.crs}`);const f=u.orderedAxes,_=!(f?f.slice(0,2).map((c=>c.replace(/E|X|Lon/i,"e").replace(/N|Y|Lat/i,"n"))).join(""):g.getAxisOrientation()).startsWith("en"),y=u.tileMatrices,x={};for(let c=0;c<y.length;++c){const u=y[c];x[u.id]=u}const v={},C=[];if(p)for(let c=0;c<p.length;++c){const u=p[c],d=u.tileMatrix;C.push(d),v[d]=u}else for(let c=0;c<y.length;++c){const u=y[c].id;C.push(u)}const M=C.length,T=new Array(M),L=new Array(M),A=new Array(M),I=new Array(M),k=[-1/0,-1/0,1/0,1/0];for(let c=0;c<M;++c){const u=C[c],d=x[u],p=d.pointOfOrigin;T[c]=_?[p[1],p[0]]:p,L[c]=d.cellSize,A[c]=[d.matrixWidth,d.matrixHeight],I[c]=[d.tileWidth,d.tileHeight];const g=v[u];if(g){const u=d.cellSize*d.tileWidth,p=T[c][0]+g.minTileCol*u,f=T[c][0]+(g.maxTileCol+1)*u,_=d.cellSize*d.tileHeight;let y,x;"bottomLeft"===d.cornerOfOrigin?(y=T[c][1]+g.minTileRow*_,x=T[c][1]+(g.maxTileRow+1)*_):(y=T[c][1]-(g.maxTileRow+1)*_,x=T[c][1]-g.minTileRow*_),getIntersection(k,[p,y,f,x],k)}}const O=new TileGrid({origins:T,resolutions:L,sizes:A,tileSizes:I,extent:p?k:void 0}),N=c.context,G=c.url;return{grid:O,urlTemplate:d,urlFunction:function tileUrlFunction(c,u,g){if(!c)return;const f=C[c[0]],_=x[f],y="bottomLeft"===_.cornerOfOrigin,M={tileMatrix:f,tileCol:c[1],tileRow:y?-c[2]-1:c[2]};if(p){const c=v[_.id];if(M.tileCol<c.minTileCol||M.tileCol>c.maxTileCol||M.tileRow<c.minTileRow||M.tileRow>c.maxTileRow)return}Object.assign(M,N);const T=d.replace(/\{(\w+?)\}/g,(function(c,u){return M[u]}));return resolveUrl(G,T)}}}function parseTileSetMetadata(c,u){const d=u.tileMatrixSetLimits;let p;if("map"===u.dataType)p=function getMapTileUrlTemplate(c,u,d){let p,g;for(let d=0;d<c.length;++d){const f=c[d];if("item"===f.rel){if(f.type===u){p=f.href;break}(Op[f.type]||!g&&f.type.startsWith("image/"))&&(g=f.href)}}if(!p){if(!g)throw new Error('Could not find "item" link');p=g}return d&&(p=appendCollectionsQueryParam(p,d)),p}(u.links,c.mediaType,c.collections);else{if("vector"!==u.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');p=function getVectorTileUrlTemplate(c,u,d,p){let g,f;const _={};for(let d=0;d<c.length;++d){const p=c[d];if(_[p.type]=p.href,"item"===p.rel){if(p.type===u){g=p.href;break}Np[p.type]&&(f=p.href)}}if(!g&&d)for(let c=0;c<d.length;++c){const u=d[c];if(_[u]){g=_[u];break}}if(!g){if(!f)throw new Error('Could not find "item" link');g=f}return p&&(g=appendCollectionsQueryParam(g,p)),g}(u.links,c.mediaType,c.supportedMediaTypes,c.collections)}if(u.tileMatrixSet)return parseTileMatrixSet(c,u.tileMatrixSet,p,d);const g=u.links.find((c=>"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===c.rel));if(!g)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const f=g.href;return getJSON(resolveUrl(c.url,f)).then((function(u){return parseTileMatrixSet(c,u,p,d)}))}function getTileSetInfo(c){return getJSON(c.url).then((function(u){return parseTileSetMetadata(c,u)}))}var Dp=class OGCMapTile extends up{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition});getTileSetInfo({url:c.url,projection:this.getProjection(),mediaType:c.mediaType,context:c.context||null,collections:c.collections}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(c){this.tileGrid=c.grid,this.setTileUrlFunction(c.urlFunction,c.urlTemplate),this.setState("ready")}handleError_(c){error(c),this.setState("error")}};var Gp=class VectorTile extends cp{constructor(c){const u=c.projection||"EPSG:3857",d=c.extent||extentFromProjection(u),p=c.tileGrid||createXYZ({extent:d,maxResolution:c.maxResolution,maxZoom:void 0!==c.maxZoom?c.maxZoom:22,minZoom:c.minZoom,tileSize:c.tileSize||512});super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,interpolate:!0,projection:u,state:c.state,tileGrid:p,tileLoadFunction:c.tileLoadFunction?c.tileLoadFunction:defaultLoadFunction,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:void 0===c.zDirection?1:c.zDirection}),this.format_=c.format?c.format:null,this.sourceTileCache_=new la(128),this.overlaps_=null==c.overlaps||c.overlaps,this.tileClass=c.tileClass?c.tileClass:da,this.tileGrids_={}}getOverlaps(){return this.overlaps_}clear(){this.sourceTileCache_.clear()}expireCache(c,u){const d=this.getTileCacheForProjection(c),p=Object.keys(u).reduce(((c,u)=>{const p=function getCacheKeyForTileKey(c){const[u,d,p]=c.substring(c.lastIndexOf("/")+1,c.length).split(",").map(Number);return getKeyZXY(u,d,p)}(u),g=d.peek(p);if(g){const u=g.sourceTiles;for(let d=0,p=u.length;d<p;++d)c[u[d].getKey()]=!0}return c}),{});super.expireCache(c,u),this.sourceTileCache_.expireCache(p)}getSourceTiles(c,u,d){if(d.getState()===po){d.setState(go);const p=d.wrappedTileCoord,g=this.getTileGridForProjection(u),f=g.getTileCoordExtent(p),_=p[0],y=g.getResolution(_);buffer(f,-y,f);const x=this.tileGrid,v=x.getExtent();v&&getIntersection(f,v,f);const C=x.getZForResolution(y,this.zDirection);x.forEachTileCoord(f,C,(p=>{const g=this.tileUrlFunction(p,c,u),f=this.sourceTileCache_.containsKey(g)?this.sourceTileCache_.get(g):new this.tileClass(p,g?po:_o,g,this.format_,this.tileLoadFunction);d.sourceTiles.push(f);const _=f.getState();if(_<mo){const listenChange=c=>{this.handleTileChange(c);const u=f.getState();if(u===mo||u===fo){const c=f.getKey();c in d.errorTileKeys?f.getState()===mo&&delete d.errorTileKeys[c]:d.loadingSourceTiles--,u===fo?d.errorTileKeys[c]=!0:f.removeEventListener(_i,listenChange),0===d.loadingSourceTiles&&d.setState(isEmpty$1(d.errorTileKeys)?mo:fo)}};f.addEventListener(_i,listenChange),d.loadingSourceTiles++}_===po&&(f.extent=x.getTileCoordExtent(p),f.projection=u,f.resolution=x.getResolution(p[0]),this.sourceTileCache_.set(g,f),f.load())})),d.loadingSourceTiles||d.setState(d.sourceTiles.some((c=>c.getState()===fo))?fo:mo)}return d.sourceTiles}getTile(c,u,d,p,g){const f=[c,u,d];let _=this.getTileCoordForTileUrlFunction(f,g);const y=this.getTileGrid().getExtent(),x=this.getTileGridForProjection(g);if(_&&y){const u=x.getTileCoordExtent(_);buffer(u,-x.getResolution(c),u),intersects$1(y,u)||(_=null)}let v=!0;if(null!==_){const u=this.tileGrid,d=x.getResolution(c),f=u.getZForResolution(d,1),y=x.getTileCoordExtent(_);buffer(y,-d,y),u.forEachTileCoord(y,f,(c=>{v=v&&!this.tileUrlFunction(c,p,g)}))}const C=new ua(f,v?_o:po,_,this.getSourceTiles.bind(this,p,g));return C.key=this.getKey(),C}getTileGridForProjection(c){const u=c.getCode();let d=this.tileGrids_[u];if(!d){const c=this.tileGrid,p=c.getResolutions().slice(),g=p.map((function(u,d){return c.getOrigin(d)})),f=p.map((function(u,d){return c.getTileSize(d)})),_=Wn+1;for(let c=p.length;c<_;++c)p.push(p[c-1]/2),g.push(g[c-1]),f.push(f[c-1]);d=new TileGrid({extent:c.getExtent(),origins:g,resolutions:p,tileSizes:f}),this.tileGrids_[u]=d}return d}getTilePixelRatio(c){return c}getTilePixelSize(c,u,d){const p=toSize(this.getTileGridForProjection(d).getTileSize(c),this.tmpSize);return[Math.round(p[0]*u),Math.round(p[1]*u)]}};function defaultLoadFunction(c,u){c.setLoader((function(d,p,g){loadFeaturesXhr(u,c.getFormat(),d,p,g,c.onLoad.bind(c),c.onError.bind(c))}))}var jp=class OGCVectorTile extends Gp{constructor(c){super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,format:c.format,overlaps:c.overlaps,projection:c.projection,tileClass:c.tileClass,transition:c.transition,wrapX:c.wrapX,zDirection:c.zDirection,state:"loading"});getTileSetInfo({url:c.url,projection:this.getProjection(),mediaType:c.mediaType,supportedMediaTypes:c.format.supportedMediaTypes,context:c.context||null,collections:c.collections}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(c){this.tileGrid=c.grid,this.setTileUrlFunction(c.urlFunction,c.urlTemplate),this.setState("ready")}handleError_(c){error(c),this.setState("error")}};const zp='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class OSM extends XYZ{constructor(c){let u;u=void 0!==(c=c||{}).attributions?c.attributions:[zp];const d=void 0!==c.crossOrigin?c.crossOrigin:"anonymous",p=void 0!==c.url?c.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:u,attributionsCollapsible:!1,cacheSize:c.cacheSize,crossOrigin:d,interpolate:c.interpolate,maxZoom:void 0!==c.maxZoom?c.maxZoom:19,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileLoadFunction:c.tileLoadFunction,transition:c.transition,url:p,wrapX:c.wrapX,zDirection:c.zDirection})}}function createMinion(c){return function(u){const d=u.buffers,p=u.meta,g=u.imageOps,f=u.width,_=u.height,y=d.length,x=d[0].byteLength;if(g){const u=new Array(y);for(let c=0;c<y;++c)u[c]=new ImageData(new Uint8ClampedArray(d[c]),f,_);return c(u,p).data.buffer}const v=new Uint8ClampedArray(x),C=new Array(y),M=new Array(y);for(let c=0;c<y;++c)C[c]=new Uint8ClampedArray(d[c]),M[c]=[0,0,0,0];for(let u=0;u<x;u+=4){for(let c=0;c<y;++c){const d=C[c];M[c][0]=d[u],M[c][1]=d[u+1],M[c][2]=d[u+2],M[c][3]=d[u+3]}const d=c(M,p);v[u]=d[0],v[u+1]=d[1],v[u+2]=d[2],v[u+3]=d[3]}return v.buffer}}function createWorker(c,u){const d=Object.keys(c.lib||{}).map((function(u){return"const "+u+" = "+c.lib[u].toString()+";"})).concat(["const __minion__ = ("+createMinion.toString()+")(",c.operation.toString(),");",'self.addEventListener("message", function(event) {',"  const buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),p=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(d.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(d,{type:"text/javascript"})));return p.addEventListener("message",u),p}class Processor extends fi{constructor(c){let u;super(),this.imageOps_=!!c.imageOps,u=0===c.threads?0:this.imageOps_?1:c.threads||1;const d=new Array(u);if(u)for(let p=0;p<u;++p)d[p]=createWorker(c,this.onWorkerMessage_.bind(this,p));else d[0]=function createFauxWorker(c,u){const d=createMinion(c.operation);let p=!1;return{postMessage:function(c){setTimeout((function(){p||u({data:{buffer:d(c),meta:c.meta}})}),0)},terminate:function(){p=!0}}}(c,this.onWorkerMessage_.bind(this,0));this.workers_=d,this.queue_=[],this.maxQueueLength_=c.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(c,u,d){this.enqueue_({inputs:c,meta:u,callback:d}),this.dispatch_()}enqueue_(c){for(this.queue_.push(c);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||0===this.queue_.length)return;const c=this.queue_.shift();this.job_=c;const u=c.inputs[0].width,d=c.inputs[0].height,p=c.inputs.map((function(c){return c.data.buffer})),g=this.workers_.length;if(this.running_=g,1===g)return void this.workers_[0].postMessage({buffers:p,meta:c.meta,imageOps:this.imageOps_,width:u,height:d},p);const f=c.inputs[0].data.length,_=4*Math.ceil(f/4/g);for(let f=0;f<g;++f){const g=f*_,y=[];for(let c=0,u=p.length;c<u;++c)y.push(p[c].slice(g,g+_));this.workers_[f].postMessage({buffers:y,meta:c.meta,imageOps:this.imageOps_,width:u,height:d},y)}}onWorkerMessage_(c,u){this.disposed||(this.dataLookup_[c]=u.data,--this.running_,0===this.running_&&this.resolveJob_())}resolveJob_(){const c=this.job_,u=this.workers_.length;let d,p;if(1===u)d=new Uint8ClampedArray(this.dataLookup_[0].buffer),p=this.dataLookup_[0].meta;else{const g=c.inputs[0].data.length;d=new Uint8ClampedArray(g),p=new Array(u);const f=4*Math.ceil(g/4/u);for(let c=0;c<u;++c){const u=this.dataLookup_[c].buffer,g=c*f;d.set(new Uint8ClampedArray(u),g),p[c]=this.dataLookup_[c].meta}}this.job_=null,this.dataLookup_={},c.callback(null,new ImageData(d,c.inputs[0].width,c.inputs[0].height),p),this.dispatch_()}disposeInternal(){for(let c=0;c<this.workers_.length;++c)this.workers_[c].terminate();this.workers_.length=0}}const Bp="beforeoperations",Up="afteroperations";class RasterSourceEvent extends BaseEvent{constructor(c,u,d){super(c),this.extent=u.extent,this.resolution=u.viewState.resolution/u.pixelRatio,this.data=d}}class RasterSource extends Ep{constructor(c){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=void 0!==c.operationType?c.operationType:"pixel",this.threads_=void 0!==c.threads?c.threads:1,this.layers_=function createLayers(c){const u=c.length,d=new Array(u);for(let p=0;p<u;++p)d[p]=createLayer(c[p]);return d}(c.sources);const u=this.changed.bind(this);for(let c=0,d=this.layers_.length;c<d;++c)this.layers_[c].addEventListener(_i,u);var d;this.useResolutions_=null!==c.resolutions,this.tileQueue_=new Bo((function(){return 1}),this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:(d=this.layers_,d.map((function(c){return c.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:getUid(this),renderTargets:{}},this.setAttributions((function(u){const d=[];for(let p=0,g=c.sources.length;p<g;++p){const g=c.sources[p],f=g instanceof Js?g:g.getSource();if(!f)continue;const _=f.getAttributions()?.(u);"string"==typeof _?d.push(_):void 0!==_&&d.push(..._)}return d})),void 0!==c.operation&&this.setOperation(c.operation,c.lib)}setOperation(c,u){this.processor_&&this.processor_.dispose(),this.processor_=new Processor({operation:c,imageOps:"image"===this.operationType_,queue:1,lib:u,threads:this.threads_}),this.changed()}updateFrameState_(c,u,d){const p=Object.assign({},this.frameState_);p.viewState=Object.assign({},p.viewState);const g=getCenter(c);p.size[0]=Math.ceil(getWidth(c)/u),p.size[1]=Math.ceil(getHeight(c)/u),p.extent=[g[0]-p.size[0]*u/2,g[1]-p.size[1]*u/2,g[0]+p.size[0]*u/2,g[1]+p.size[1]*u/2],p.time=Date.now();const f=p.viewState;return f.center=g,f.projection=d,f.resolution=u,p}allSourcesReady_(){let c,u=!0;for(let d=0,p=this.layers_.length;d<p;++d)if(c=this.layers_[d].getSource(),!c||"ready"!==c.getState()){u=!1;break}return u}getImage(c,u,d,p){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),u=this.findNearestResolution(u);const g=this.updateFrameState_(c,u,p);if(this.requestedFrameState_=g,this.renderedImageCanvas_){const c=this.renderedImageCanvas_.getResolution(),d=this.renderedImageCanvas_.getExtent();u===c&&equals$1(g.extent,d)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),g.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const c=this.requestedFrameState_,u=this.layers_.length,d=new Array(u);for(let p=0;p<u;++p){c.layerIndex=p,c.renderTargets={};const u=getImageData(this.layers_[p],c);if(!u)return;d[p]=u}const p={};this.dispatchEvent(new RasterSourceEvent(Bp,c,p)),this.processor_.process(d,p,this.onWorkerComplete_.bind(this,c))}onWorkerComplete_(c,u,d,p){if(u||!d)return;const g=c.extent,f=c.viewState.resolution;if(f!==this.requestedFrameState_.viewState.resolution||!equals$1(g,this.requestedFrameState_.extent))return;let _;if(this.renderedImageCanvas_)_=this.renderedImageCanvas_.getImage().getContext("2d");else{_=createCanvasContext2D(Math.round(getWidth(g)/f),Math.round(getHeight(g)/f)),this.renderedImageCanvas_=new uo(g,f,1,_.canvas)}_.putImageData(d,0,0),c.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new RasterSourceEvent(Up,c,p))}getResolutions(c){if(!this.useResolutions_)return null;let u=super.getResolutions();if(!u)for(let d=0,p=this.layers_.length;d<p;++d){if(u=this.layers_[d].getSource().getResolutions(c),u)break}return u}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}RasterSource.prototype.dispose;let $p=null;function getImageData(c,u){const d=c.getRenderer();if(!d)throw new Error("Unsupported layer type: "+c);if(!d.prepareFrame(u))return null;const p=u.size[0],g=u.size[1];if(0===p||0===g)return null;const f=d.renderFrame(u,null);let _;if(f instanceof HTMLCanvasElement)_=f;else{if(f&&(_=f.firstElementChild),!(_ instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+_);if(_.width===p&&_.height===g){return _.getContext("2d").getImageData(0,0,p,g)}}if($p){const c=$p.canvas;c.width!==p||c.height!==g?$p=createCanvasContext2D(p,g,void 0,{willReadFrequently:!0}):$p.clearRect(0,0,p,g)}else $p=createCanvasContext2D(p,g,void 0,{willReadFrequently:!0});return $p.drawImage(_,0,0,p,g),$p.getImageData(0,0,p,g)}function createLayer(c){let u;return c instanceof Js?c instanceof sp?u=new TileLayer({source:c}):c instanceof Ep&&(u=new Xd({source:c})):u=c,u}var Wp=RasterSource;const Xp={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},Vp={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};var qp=class StadiaMaps extends XYZ{constructor(c){const u=c.layer.indexOf("-"),d=-1==u?c.layer:c.layer.slice(0,u),p=Vp[d]||{minZoom:0,maxZoom:20,retina:!0},g=Xp[c.layer],f=c.apiKey?"?api_key="+c.apiKey:"",_=p.retina&&c.retina?"@2x":"",y=void 0!==c.url?c.url:"https://tiles.stadiamaps.com/tiles/"+c.layer+"/{z}/{x}/{y}"+_+"."+g.extension+f,x=['&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>','&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>',zp];c.layer.startsWith("stamen_")&&x.splice(1,0,'&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>'),super({attributions:x,cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,maxZoom:void 0!==c.maxZoom?c.maxZoom:p.maxZoom,minZoom:void 0!==c.minZoom?c.minZoom:p.minZoom,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileLoadFunction:c.tileLoadFunction,transition:c.transition,url:y,tilePixelRatio:_?2:1,wrapX:c.wrapX,zDirection:c.zDirection})}};var Yp=class TileArcGISRest extends up{constructor(c){super({attributions:(c=c||{}).attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.params_=Object.assign({},c.params),this.hidpi_=void 0===c.hidpi||c.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.setKey(this.getKeyForParams_())}getKeyForParams_(){let c=0;const u=[];for(const d in this.params_)u[c++]=d+"-"+this.params_[d];return u.join("/")}getParams(){return this.params_}getRequestUrl_(c,u,d,p,g,f){const _=this.urls;if(!_)return;let y;if(1==_.length)y=_[0];else{y=_[modulo(hash(c),_.length)]}return getRequestUrl$1(y,d,(this.tileGrid||this.getTileGridForProjection(g)).getResolution(c[0]),p,g,f)}getTilePixelRatio(c){return this.hidpi_?c:1}updateParams(c){Object.assign(this.params_,c),this.setKey(this.getKeyForParams_())}tileUrlFunction(c,u,d){let p=this.getTileGrid();if(p||(p=this.getTileGridForProjection(d)),p.getResolutions().length<=c[0])return;1==u||this.hidpi_||(u=1);const g=p.getTileCoordExtent(c,this.tmpExtent_);let f=toSize(p.getTileSize(c[0]),this.tmpSize);1!=u&&(f=scale(f,u,this.tmpSize));const _={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(_,this.params_),this.getRequestUrl_(c,f,g,u,d,_)}};var Zp=class TileDebug extends XYZ{constructor(c){super({projection:(c=c||{}).projection,tileGrid:c.tileGrid,wrapX:void 0===c.wrapX||c.wrapX,zDirection:c.zDirection,url:c.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(c,u)=>{const d=c.getTileCoord()[0],p=toSize(this.tileGrid.getTileSize(d)),g=createCanvasContext2D(p[0],p[1]);g.strokeStyle="grey",g.strokeRect(.5,.5,p[0]+.5,p[1]+.5),g.fillStyle="grey",g.strokeStyle="white",g.textAlign="center",g.textBaseline="middle",g.font="24px sans-serif",g.lineWidth=4,g.strokeText(u,p[0]/2,p[1]/2,p[0]),g.fillText(u,p[0]/2,p[1]/2,p[0]),c.setImage(g.canvas)}})}};var Kp=class TileJSON extends up{constructor(c){if(super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:get$2("EPSG:3857"),reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.tileJSON_=null,this.tileSize_=c.tileSize,c.url)if(c.jsonp)jsonp(c.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const u=new XMLHttpRequest;u.addEventListener("load",this.onXHRLoad_.bind(this)),u.addEventListener("error",this.onXHRError_.bind(this)),u.open("GET",c.url),u.send()}else{if(!c.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(c.tileJSON)}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleTileJSONError()}this.handleTileJSONResponse(c)}else this.handleTileJSONError()}onXHRError_(c){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(c){const u=get$2("EPSG:4326"),d=this.getProjection();let p;if(void 0!==c.bounds){const g=getTransformFromProjections(u,d);p=applyTransform(c.bounds,g)}const g=extentFromProjection(d),f=c.minzoom||0,_=createXYZ({extent:g,maxZoom:c.maxzoom||22,minZoom:f,tileSize:this.tileSize_});if(this.tileGrid=_,this.tileUrlFunction=createFromTemplates(c.tiles,_),c.attribution&&!this.getAttributions()){const u=void 0!==p?p:g;this.setAttributions((function(d){return intersects$1(u,d.extent)?[c.attribution]:null}))}this.tileJSON_=c,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var Hp=class TileWMS extends up{constructor(c){c=c||{};const u=Object.assign({},c.params);super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:c.tileClass,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.gutter_=void 0!==c.gutter?c.gutter:0,this.params_=u,this.v13_=!0,this.serverType_=c.serverType,this.hidpi_=void 0===c.hidpi||c.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(c,u,d,p){const g=get$2(d),f=this.getProjection()||g;let _=this.getTileGrid();_||(_=this.getTileGridForProjection(f));const y=transform$1(c,g,f),x=calculateSourceResolution(f,g,c,u),v=_.getZForResolution(x,this.zDirection),C=_.getResolution(v),M=_.getTileCoordForCoordAndZ(y,v);if(_.getResolutions().length<=M[0])return;let T=_.getTileCoordExtent(M,this.tmpExtent_);const L=this.gutter_;0!==L&&(T=buffer(T,C*L,T));const A={QUERY_LAYERS:this.params_.LAYERS};Object.assign(A,getRequestParams(this.params_,"GetFeatureInfo"),p);const I=Math.floor((y[0]-T[0])/C),k=Math.floor((T[3]-y[1])/C);return A[this.v13_?"I":"X"]=I,A[this.v13_?"J":"Y"]=k,this.getRequestUrl_(M,T,1,f||g,A)}getLegendUrl(c,u){if(void 0===this.urls[0])return;const d={SERVICE:"WMS",VERSION:Ip,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===u||void 0===u.LAYER){const c=this.params_.LAYERS;if(!(!Array.isArray(c)||1===c.length))return;d.LAYER=c}if(void 0!==c){const u=this.getProjection()?this.getProjection().getMetersPerUnit():1,p=28e-5;d.SCALE=c*u/p}return Object.assign(d,u),appendParams(this.urls[0],d)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(c,u,d,p,g){const f=this.urls;if(!f)return;let _;if(1==f.length)_=f[0];else{_=f[modulo(hash(c),f.length)]}return getImageSrc(u,(this.tileGrid||this.getTileGridForProjection(p)).getResolution(c[0]),d,p,_,g,this.serverType_)}getTilePixelRatio(c){return this.hidpi_&&void 0!==this.serverType_?c:1}getKeyForParams_(){let c=0;const u=[];for(const d in this.params_)u[c++]=d+"-"+this.params_[d];return u.join("/")}updateParams(c){Object.assign(this.params_,c),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const c=this.params_.VERSION||Ip;this.v13_=compareVersions(c,"1.3")>=0}tileUrlFunction(c,u,d){let p=this.getTileGrid();if(p||(p=this.getTileGridForProjection(d)),p.getResolutions().length<=c[0])return;1==u||this.hidpi_&&void 0!==this.serverType_||(u=1);const g=p.getResolution(c[0]);let f=p.getTileCoordExtent(c,this.tmpExtent_);const _=this.gutter_;0!==_&&(f=buffer(f,g*_,f));const y=Object.assign({},getRequestParams(this.params_,"GetMap"));return this.getRequestUrl_(c,f,u,d,y)}};class CustomTile extends yo{constructor(c,u,d,p,g,f){super(c,u),this.src_=d,this.extent_=p,this.preemptive_=g,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=f}getImage(){return null}getData(c){if(!this.grid_||!this.keys_)return null;const u=(c[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),d=(c[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),p=this.grid_[Math.floor((1-d)*this.grid_.length)];if("string"!=typeof p)return null;let g=p.charCodeAt(Math.floor(u*p.length));g>=93&&g--,g>=35&&g--,g-=32;let f=null;if(g in this.keys_){const c=this.keys_[g];f=this.data_&&c in this.data_?this.data_[c]:c}return f}forDataAtCoordinate(c,u,d){this.state==_o&&!0===d?(this.state=po,listenOnce(this,_i,(d=>{u(this.getData(c))})),this.loadInternal_()):!0===d?setTimeout((()=>{u(this.getData(c))}),0):u(this.getData(c))}getKey(){return this.src_}handleError_(){this.state=fo,this.changed()}handleLoad_(c){this.grid_=c.grid,this.keys_=c.keys,this.data_=c.data,this.state=mo,this.changed()}loadInternal_(){if(this.state==po)if(this.state=go,this.jsonp_)jsonp(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const c=new XMLHttpRequest;c.addEventListener("load",this.onXHRLoad_.bind(this)),c.addEventListener("error",this.onXHRError_.bind(this)),c.open("GET",this.src_),c.send()}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleError_()}this.handleLoad_(c)}else this.handleError_()}onXHRError_(c){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(_o)}}var Jp=class UTFGrid extends sp{constructor(c){if(super({projection:get$2("EPSG:3857"),state:"loading",wrapX:void 0===c.wrapX||c.wrapX,zDirection:c.zDirection}),this.preemptive_=void 0===c.preemptive||c.preemptive,this.tileUrlFunction_=nullTileUrlFunction,this.template_=void 0,this.jsonp_=c.jsonp||!1,c.url)if(this.jsonp_)jsonp(c.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const u=new XMLHttpRequest;u.addEventListener("load",this.onXHRLoad_.bind(this)),u.addEventListener("error",this.onXHRError_.bind(this)),u.open("GET",c.url),u.send()}else{if(!c.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(c.tileJSON)}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleTileJSONError()}this.handleTileJSONResponse(c)}else this.handleTileJSONError()}onXHRError_(c){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(c,u,d,p){if(this.tileGrid){const g=this.tileGrid.getZForResolution(u,this.zDirection),f=this.tileGrid.getTileCoordForCoordAndZ(c,g);this.getTile(f[0],f[1],f[2],1,this.getProjection()).forDataAtCoordinate(c,d,p)}else!0===p?setTimeout((function(){d(null)}),0):d(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(c){const u=get$2("EPSG:4326"),d=this.getProjection();let p;if(void 0!==c.bounds){const g=getTransformFromProjections(u,d);p=applyTransform(c.bounds,g)}const g=extentFromProjection(d),f=c.minzoom||0,_=createXYZ({extent:g,maxZoom:c.maxzoom||22,minZoom:f});this.tileGrid=_,this.template_=c.template;const y=c.grids;if(y){if(this.tileUrlFunction_=createFromTemplates(y,_),c.attribution){const u=void 0!==p?p:g;this.setAttributions((function(d){return intersects$1(u,d.extent)?[c.attribution]:null}))}this.setState("ready")}else this.setState("error")}getTile(c,u,d,p,g){const f=getKeyZXY(c,u,d);if(this.tileCache.containsKey(f))return this.tileCache.get(f);const _=[c,u,d],y=this.getTileCoordForTileUrlFunction(_,g),x=this.tileUrlFunction_(y,p,g),v=new CustomTile(_,void 0!==x?po:_o,void 0!==x?x:"",this.tileGrid.getTileCoordExtent(_),this.preemptive_,this.jsonp_);return this.tileCache.set(f,v),v}useTile(c,u,d){const p=getKeyZXY(c,u,d);this.tileCache.containsKey(p)&&this.tileCache.get(p)}};var Qp=class WMTS extends up{constructor(c){const u=void 0!==c.requestEncoding?c.requestEncoding:"KVP",d=c.tileGrid;let p=c.urls;void 0===p&&void 0!==c.url&&(p=expandUrl(c.url)),super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:c.tileClass,tileGrid:d,tileLoadFunction:c.tileLoadFunction,tilePixelRatio:c.tilePixelRatio,urls:p,wrapX:void 0!==c.wrapX&&c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.version_=void 0!==c.version?c.version:"1.0.0",this.format_=void 0!==c.format?c.format:"image/jpeg",this.dimensions_=void 0!==c.dimensions?c.dimensions:{},this.layer_=c.layer,this.matrixSet_=c.matrixSet,this.style_=c.style,this.requestEncoding_=u,this.setKey(this.getKeyForDimensions_()),p&&p.length>0&&(this.tileUrlFunction=createFromTileUrlFunctions(p.map(this.createFromWMTSTemplate.bind(this))))}setUrls(c){this.urls=c;const u=c.join("\n");this.setTileUrlFunction(createFromTileUrlFunctions(c.map(this.createFromWMTSTemplate.bind(this))),u)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const c=this.urls?this.urls.slice(0):[];for(const u in this.dimensions_)c.push(u+"-"+this.dimensions_[u]);return c.join("/")}updateDimensions(c){Object.assign(this.dimensions_,c),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(c){const u=this.requestEncoding_,d={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==u&&Object.assign(d,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),c="KVP"==u?appendParams(c,d):c.replace(/\{(\w+?)\}/g,(function(c,u){return u.toLowerCase()in d?d[u.toLowerCase()]:c}));const p=this.tileGrid,g=this.dimensions_;return function(d,f,_){if(!d)return;const y={TileMatrix:p.getMatrixId(d[0]),TileCol:d[1],TileRow:d[2]};Object.assign(y,g);let x=c;return x="KVP"==u?appendParams(x,y):x.replace(/\{(\w+?)\}/g,(function(c,u){return y[u]})),x}}};var tg=Object.freeze({__proto__:null,BingMaps:dp,CartoDB:pp,Cluster:gp,DataTile:mp,Google:fp,IIIF:xp,Image:Ep,ImageArcGISRest:Pp,ImageCanvas:bp,ImageMapGuide:Mp,ImageStatic:Tp,ImageTile:Ap,ImageWMS:kp,OGCMapTile:Dp,OGCVectorTile:jp,OSM:OSM,Raster:Wp,Source:Js,StadiaMaps:qp,Tile:sp,TileArcGISRest:Yp,TileDebug:Zp,TileImage:up,TileJSON:Kp,TileWMS:Hp,UTFGrid:Jp,UrlTile:cp,Vector:ao,VectorTile:Gp,WMTS:Qp,XYZ:XYZ,Zoomify:yp,createArcGISRestLoader:createLoader$3,createMapGuideLoader:createLoader$2,createStaticLoader:createLoader$1,createWMSLoader:createLoader,sourcesFromTileGrid:function sourcesFromTileGrid(c,u){const d=new LRUCache(32),p=c.getExtent();return function(g,f){d.expireCache(),p&&(g=getIntersection(p,g));const _=c.getZForResolution(f),y=[];return c.forEachTileCoord(g,_,(c=>{const p=c.toString();if(!d.containsKey(p)){const g=u(c);d.set(p,g)}y.push(d.get(p))})),y}}});var eg=1,ig=2,rg=3,ng=4,sg=5,og=6378137,ag=6356752.314,lg=.0066943799901413165,hg=484813681109536e-20,cg=Math.PI/2,ug=.16666666666666666,dg=.04722222222222222,pg=.022156084656084655,gg=1e-10,mg=.017453292519943295,fg=57.29577951308232,_g=Math.PI/4,yg=2*Math.PI,xg=3.14159265359,vg={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Sg={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},wg=/[\s_\-\/\(\)]/g;function match(c,u){if(c[u])return c[u];for(var d,p=Object.keys(c),g=u.toLowerCase().replace(wg,""),f=-1;++f<p.length;)if((d=p[f]).toLowerCase().replace(wg,"")===g)return c[d]}function projStr(c){var u,d,p,g={},f=c.split("+").map((function(c){return c.trim()})).filter((function(c){return c})).reduce((function(c,u){var d=u.split("=");return d.push(!0),c[d[0].toLowerCase()]=d[1],c}),{}),_={proj:"projName",datum:"datumCode",rf:function(c){g.rf=parseFloat(c)},lat_0:function(c){g.lat0=c*mg},lat_1:function(c){g.lat1=c*mg},lat_2:function(c){g.lat2=c*mg},lat_ts:function(c){g.lat_ts=c*mg},lon_0:function(c){g.long0=c*mg},lon_1:function(c){g.long1=c*mg},lon_2:function(c){g.long2=c*mg},alpha:function(c){g.alpha=parseFloat(c)*mg},gamma:function(c){g.rectified_grid_angle=parseFloat(c)},lonc:function(c){g.longc=c*mg},x_0:function(c){g.x0=parseFloat(c)},y_0:function(c){g.y0=parseFloat(c)},k_0:function(c){g.k0=parseFloat(c)},k:function(c){g.k0=parseFloat(c)},a:function(c){g.a=parseFloat(c)},b:function(c){g.b=parseFloat(c)},r:function(c){g.a=g.b=parseFloat(c)},r_a:function(){g.R_A=!0},zone:function(c){g.zone=parseInt(c,10)},south:function(){g.utmSouth=!0},towgs84:function(c){g.datum_params=c.split(",").map((function(c){return parseFloat(c)}))},to_meter:function(c){g.to_meter=parseFloat(c)},units:function(c){g.units=c;var u=match(Sg,c);u&&(g.to_meter=u.to_meter)},from_greenwich:function(c){g.from_greenwich=c*mg},pm:function(c){var u=match(vg,c);g.from_greenwich=(u||parseFloat(c))*mg},nadgrids:function(c){"@null"===c?g.datumCode="none":g.nadgrids=c},axis:function(c){var u="ewnsud";3===c.length&&-1!==u.indexOf(c.substr(0,1))&&-1!==u.indexOf(c.substr(1,1))&&-1!==u.indexOf(c.substr(2,1))&&(g.axis=c)},approx:function(){g.approx=!0}};for(u in f)d=f[u],u in _?"function"==typeof(p=_[u])?p(d):g[p]=d:g[u]=d;return"string"==typeof g.datumCode&&"WGS84"!==g.datumCode&&(g.datumCode=g.datumCode.toLowerCase()),g}var Cg=1,Eg=/\s/,Pg=/[A-Za-z]/,bg=/[A-Za-z84_]/,Mg=/[,\]]/,Tg=/[\d\.E\-\+]/;function Parser(c){if("string"!=typeof c)throw new Error("not a string");this.text=c.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Cg}function mapit(c,u,d){Array.isArray(u)&&(d.unshift(u),u=null);var p=u?{}:c,g=d.reduce((function(c,u){return sExpr(u,c),c}),p);u&&(c[u]=g)}function sExpr(c,u){if(Array.isArray(c)){var d=c.shift();if("PARAMETER"===d&&(d=c.shift()),1===c.length)return Array.isArray(c[0])?(u[d]={},void sExpr(c[0],u[d])):void(u[d]=c[0]);if(c.length)if("TOWGS84"!==d){if("AXIS"===d)return d in u||(u[d]=[]),void u[d].push(c);var p;switch(Array.isArray(d)||(u[d]={}),d){case"UNIT":case"PRIMEM":case"VERT_DATUM":return u[d]={name:c[0].toLowerCase(),convert:c[1]},void(3===c.length&&sExpr(c[2],u[d]));case"SPHEROID":case"ELLIPSOID":return u[d]={name:c[0],a:c[1],rf:c[2]},void(4===c.length&&sExpr(c[3],u[d]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return c[0]=["name",c[0]],void mapit(u,d,c);default:for(p=-1;++p<c.length;)if(!Array.isArray(c[p]))return sExpr(c,u[d]);return mapit(u,d,c)}}else u[d]=c;else u[d]=!0}else u[c]=!0}Parser.prototype.readCharicter=function(){var c=this.text[this.place++];if(4!==this.state)for(;Eg.test(c);){if(this.place>=this.text.length)return;c=this.text[this.place++]}switch(this.state){case Cg:return this.neutral(c);case 2:return this.keyword(c);case 4:return this.quoted(c);case 5:return this.afterquote(c);case 3:return this.number(c);case-1:return}},Parser.prototype.afterquote=function(c){if('"'===c)return this.word+='"',void(this.state=4);if(Mg.test(c))return this.word=this.word.trim(),void this.afterItem(c);throw new Error("havn't handled \""+c+'" in afterquote yet, index '+this.place)},Parser.prototype.afterItem=function(c){return","===c?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Cg)):"]"===c?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Cg,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},Parser.prototype.number=function(c){if(!Tg.test(c)){if(Mg.test(c))return this.word=parseFloat(this.word),void this.afterItem(c);throw new Error("havn't handled \""+c+'" in number yet, index '+this.place)}this.word+=c},Parser.prototype.quoted=function(c){'"'!==c?this.word+=c:this.state=5},Parser.prototype.keyword=function(c){if(bg.test(c))this.word+=c;else{if("["===c){var u=[];return u.push(this.word),this.level++,null===this.root?this.root=u:this.currentObject.push(u),this.stack.push(this.currentObject),this.currentObject=u,void(this.state=Cg)}if(!Mg.test(c))throw new Error("havn't handled \""+c+'" in keyword yet, index '+this.place);this.afterItem(c)}},Parser.prototype.neutral=function(c){if(Pg.test(c))return this.word=c,void(this.state=2);if('"'===c)return this.word="",void(this.state=4);if(Tg.test(c))return this.word=c,void(this.state=3);if(!Mg.test(c))throw new Error("havn't handled \""+c+'" in neutral yet, index '+this.place);this.afterItem(c)},Parser.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Rg=.017453292519943295;function d2r(c){return c*Rg}function wkt(c){var u=function parseString(c){return new Parser(c).output()}(c),d=u.shift(),p=u.shift();u.unshift(["name",p]),u.unshift(["type",d]);var g={};return sExpr(u,g),function cleanWKT(c){if("GEOGCS"===c.type?c.projName="longlat":"LOCAL_CS"===c.type?(c.projName="identity",c.local=!0):"object"==typeof c.PROJECTION?c.projName=Object.keys(c.PROJECTION)[0]:c.projName=c.PROJECTION,c.AXIS){for(var u="",d=0,p=c.AXIS.length;d<p;++d){var g=[c.AXIS[d][0].toLowerCase(),c.AXIS[d][1].toLowerCase()];-1!==g[0].indexOf("north")||("y"===g[0]||"lat"===g[0])&&"north"===g[1]?u+="n":-1!==g[0].indexOf("south")||("y"===g[0]||"lat"===g[0])&&"south"===g[1]?u+="s":-1!==g[0].indexOf("east")||("x"===g[0]||"lon"===g[0])&&"east"===g[1]?u+="e":-1===g[0].indexOf("west")&&("x"!==g[0]&&"lon"!==g[0]||"west"!==g[1])||(u+="w")}2===u.length&&(u+="u"),3===u.length&&(c.axis=u)}c.UNIT&&(c.units=c.UNIT.name.toLowerCase(),"metre"===c.units&&(c.units="meter"),c.UNIT.convert&&("GEOGCS"===c.type?c.DATUM&&c.DATUM.SPHEROID&&(c.to_meter=c.UNIT.convert*c.DATUM.SPHEROID.a):c.to_meter=c.UNIT.convert));var f=c.GEOGCS;function toMeter(u){return u*(c.to_meter||1)}"GEOGCS"===c.type&&(f=c),f&&(f.DATUM?c.datumCode=f.DATUM.name.toLowerCase():c.datumCode=f.name.toLowerCase(),"d_"===c.datumCode.slice(0,2)&&(c.datumCode=c.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==c.datumCode&&"new_zealand_1949"!==c.datumCode||(c.datumCode="nzgd49"),"wgs_1984"!==c.datumCode&&"world_geodetic_system_1984"!==c.datumCode||("Mercator_Auxiliary_Sphere"===c.PROJECTION&&(c.sphere=!0),c.datumCode="wgs84"),"_ferro"===c.datumCode.slice(-6)&&(c.datumCode=c.datumCode.slice(0,-6)),"_jakarta"===c.datumCode.slice(-8)&&(c.datumCode=c.datumCode.slice(0,-8)),~c.datumCode.indexOf("belge")&&(c.datumCode="rnb72"),f.DATUM&&f.DATUM.SPHEROID&&(c.ellps=f.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===c.ellps.toLowerCase().slice(0,13)&&(c.ellps="intl"),c.a=f.DATUM.SPHEROID.a,c.rf=parseFloat(f.DATUM.SPHEROID.rf,10)),f.DATUM&&f.DATUM.TOWGS84&&(c.datum_params=f.DATUM.TOWGS84),~c.datumCode.indexOf("osgb_1936")&&(c.datumCode="osgb36"),~c.datumCode.indexOf("osni_1952")&&(c.datumCode="osni52"),(~c.datumCode.indexOf("tm65")||~c.datumCode.indexOf("geodetic_datum_of_1965"))&&(c.datumCode="ire65"),"ch1903+"===c.datumCode&&(c.datumCode="ch1903"),~c.datumCode.indexOf("israel")&&(c.datumCode="isr93")),c.b&&!isFinite(c.b)&&(c.b=c.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",d2r],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",d2r],["x0","false_easting",toMeter],["y0","false_northing",toMeter],["long0","central_meridian",d2r],["lat0","latitude_of_origin",d2r],["lat0","standard_parallel_1",d2r],["lat1","standard_parallel_1",d2r],["lat2","standard_parallel_2",d2r],["azimuth","Azimuth"],["alpha","azimuth",d2r],["srsCode","name"]].forEach((function(u){return function rename(c,u){var d=u[0],p=u[1];!(d in c)&&p in c&&(c[d]=c[p],3===u.length&&(c[d]=u[2](c[d])))}(c,u)})),c.long0||!c.longc||"Albers_Conic_Equal_Area"!==c.projName&&"Lambert_Azimuthal_Equal_Area"!==c.projName||(c.long0=c.longc),c.lat_ts||!c.lat1||"Stereographic_South_Pole"!==c.projName&&"Polar Stereographic (variant B)"!==c.projName?!c.lat_ts&&c.lat0&&"Polar_Stereographic"===c.projName&&(c.lat_ts=c.lat0,c.lat0=d2r(c.lat0>0?90:-90)):(c.lat0=d2r(c.lat1>0?90:-90),c.lat_ts=c.lat1)}(g),g}function defs(c){var u=this;if(2===arguments.length){var d=arguments[1];"string"==typeof d?"+"===d.charAt(0)?defs[c]=projStr(arguments[1]):defs[c]=wkt(arguments[1]):defs[c]=d}else if(1===arguments.length){if(Array.isArray(c))return c.map((function(c){Array.isArray(c)?defs.apply(u,c):defs(c)}));if("string"==typeof c){if(c in defs)return defs[c]}else"EPSG"in c?defs["EPSG:"+c.EPSG]=c:"ESRI"in c?defs["ESRI:"+c.ESRI]=c:"IAU2000"in c?defs["IAU2000:"+c.IAU2000]=c:console.log(c);return}}!function globals(c){c("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),c("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),c("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),c.WGS84=c["EPSG:4326"],c["EPSG:3785"]=c["EPSG:3857"],c.GOOGLE=c["EPSG:3857"],c["EPSG:900913"]=c["EPSG:3857"],c["EPSG:102113"]=c["EPSG:3857"]}(defs);var Lg=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Ag=["3857","900913","3785","102113"];function parse(c){if(!function testObj(c){return"string"==typeof c}(c))return c;if(function testDef(c){return c in defs}(c))return defs[c];if(function testWKT(c){return Lg.some((function(u){return c.indexOf(u)>-1}))}(c)){var u=wkt(c);if(function checkMercator(c){var u=match(c,"authority");if(u){var d=match(u,"epsg");return d&&Ag.indexOf(d)>-1}}(u))return defs["EPSG:3857"];var d=function checkProjStr(c){var u=match(c,"extension");if(u)return match(u,"proj4")}(u);return d?projStr(d):u}return function testProj(c){return"+"===c[0]}(c)?projStr(c):void 0}function extend(c,u){var d,p;if(c=c||{},!u)return c;for(p in u)void 0!==(d=u[p])&&(c[p]=d);return c}function msfnz(c,u,d){var p=c*u;return d/Math.sqrt(1-p*p)}function sign(c){return c<0?-1:1}function adjust_lon(c){return Math.abs(c)<=xg?c:c-sign(c)*yg}function tsfnz(c,u,d){var p=c*d,g=.5*c;return p=Math.pow((1-p)/(1+p),g),Math.tan(.5*(cg-u))/p}function phi2z(c,u){for(var d,p,g=.5*c,f=cg-2*Math.atan(u),_=0;_<=15;_++)if(d=c*Math.sin(f),f+=p=cg-2*Math.atan(u*Math.pow((1-d)/(1+d),g))-f,Math.abs(p)<=1e-10)return f;return-9999}var Ig={init:function init$x(){var c=this.b/this.a;this.es=1-c*c,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function forward$v(c){var u,d,p=c.x,g=c.y;if(g*fg>90&&g*fg<-90&&p*fg>180&&p*fg<-180)return null;if(Math.abs(Math.abs(g)-cg)<=gg)return null;if(this.sphere)u=this.x0+this.a*this.k0*adjust_lon(p-this.long0),d=this.y0+this.a*this.k0*Math.log(Math.tan(_g+.5*g));else{var f=Math.sin(g),_=tsfnz(this.e,g,f);u=this.x0+this.a*this.k0*adjust_lon(p-this.long0),d=this.y0-this.a*this.k0*Math.log(_)}return c.x=u,c.y=d,c},inverse:function inverse$v(c){var u,d,p=c.x-this.x0,g=c.y-this.y0;if(this.sphere)d=cg-2*Math.atan(Math.exp(-g/(this.a*this.k0)));else{var f=Math.exp(-g/(this.a*this.k0));if(-9999===(d=phi2z(this.e,f)))return null}return u=adjust_lon(this.long0+p/(this.a*this.k0)),c.x=u,c.y=d,c},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function identity(c){return c}var Fg=[Ig,{init:function init$w(){},forward:identity,inverse:identity,names:["longlat","identity"]}],kg={},Og=[];function add(c,u){var d=Og.length;return c.names?(Og[d]=c,c.names.forEach((function(c){kg[c.toLowerCase()]=d})),this):(console.log(u),!0)}var Ng={start:function start(){Fg.forEach(add)},add:add,get:function get(c){if(!c)return!1;var u=c.toLowerCase();return void 0!==kg[u]&&Og[kg[u]]?Og[kg[u]]:void 0}},Dg={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Gg=Dg.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Dg.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var jg={};jg.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},jg.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},jg.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},jg.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},jg.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},jg.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},jg.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},jg.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},jg.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},jg.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},jg.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},jg.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},jg.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},jg.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},jg.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},jg.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},jg.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},jg.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var zg={};function parseNadgridString(c){if(0===c.length)return null;var u="@"===c[0];return u&&(c=c.slice(1)),"null"===c?{name:"null",mandatory:!u,grid:null,isNull:!0}:{name:c,mandatory:!u,grid:zg[c]||null,isNull:!1}}function secondsToRadians(c){return c/3600*Math.PI/180}function decodeString(c,u,d){return String.fromCharCode.apply(null,new Uint8Array(c.buffer.slice(u,d)))}function mapNodes(c){return c.map((function(c){return[secondsToRadians(c.longitudeShift),secondsToRadians(c.latitudeShift)]}))}function readGridHeader(c,u,d){return{name:decodeString(c,u+8,u+16).trim(),parent:decodeString(c,u+24,u+24+8).trim(),lowerLatitude:c.getFloat64(u+72,d),upperLatitude:c.getFloat64(u+88,d),lowerLongitude:c.getFloat64(u+104,d),upperLongitude:c.getFloat64(u+120,d),latitudeInterval:c.getFloat64(u+136,d),longitudeInterval:c.getFloat64(u+152,d),gridNodeCount:c.getInt32(u+168,d)}}function readGridNodes(c,u,d,p){for(var g=u+176,f=[],_=0;_<d.gridNodeCount;_++){var y={latitudeShift:c.getFloat32(g+16*_,p),longitudeShift:c.getFloat32(g+16*_+4,p),latitudeAccuracy:c.getFloat32(g+16*_+8,p),longitudeAccuracy:c.getFloat32(g+16*_+12,p)};f.push(y)}return f}function Projection(c,u){if(!(this instanceof Projection))return new Projection(c);u=u||function(c){if(c)throw c};var d=parse(c);if("object"==typeof d){var p=Projection.projections.get(d.projName);if(p){if(d.datumCode&&"none"!==d.datumCode){var g=match(jg,d.datumCode);g&&(d.datum_params=d.datum_params||(g.towgs84?g.towgs84.split(","):null),d.ellps=g.ellipse,d.datumName=g.datumName?g.datumName:d.datumCode)}d.k0=d.k0||1,d.axis=d.axis||"enu",d.ellps=d.ellps||"wgs84",d.lat1=d.lat1||d.lat0;var f=function sphere(c,u,d,p,g){if(!c){var f=match(Dg,p);f||(f=Gg),c=f.a,u=f.b,d=f.rf}return d&&!u&&(u=(1-1/d)*c),(0===d||Math.abs(c-u)<gg)&&(g=!0,u=c),{a:c,b:u,rf:d,sphere:g}}(d.a,d.b,d.rf,d.ellps,d.sphere),_=function eccentricity(c,u,d,p){var g=c*c,f=u*u,_=(g-f)/g,y=0;return p?(g=(c*=1-_*(ug+_*(dg+_*pg)))*c,_=0):y=Math.sqrt(_),{es:_,e:y,ep2:(g-f)/f}}(f.a,f.b,f.rf,d.R_A),y=function getNadgrids(c){return void 0===c?null:c.split(",").map(parseNadgridString)}(d.nadgrids),x=d.datum||function datum(c,u,d,p,g,f,_){var y={};return y.datum_type=void 0===c||"none"===c?sg:ng,u&&(y.datum_params=u.map(parseFloat),0===y.datum_params[0]&&0===y.datum_params[1]&&0===y.datum_params[2]||(y.datum_type=eg),y.datum_params.length>3&&(0===y.datum_params[3]&&0===y.datum_params[4]&&0===y.datum_params[5]&&0===y.datum_params[6]||(y.datum_type=ig,y.datum_params[3]*=hg,y.datum_params[4]*=hg,y.datum_params[5]*=hg,y.datum_params[6]=y.datum_params[6]/1e6+1))),_&&(y.datum_type=rg,y.grids=_),y.a=d,y.b=p,y.es=g,y.ep2=f,y}(d.datumCode,d.datum_params,f.a,f.b,_.es,_.ep2,y);extend(this,d),extend(this,p),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=_.es,this.e=_.e,this.ep2=_.ep2,this.datum=x,this.init(),u(null,this)}else u("Could not get projection name from: "+c)}else u("Could not parse to valid json: "+c)}function geodeticToGeocentric(c,u,d){var p,g,f,_,y=c.x,x=c.y,v=c.z?c.z:0;if(x<-cg&&x>-1.001*cg)x=-cg;else if(x>cg&&x<1.001*cg)x=cg;else{if(x<-cg)return{x:-1/0,y:-1/0,z:c.z};if(x>cg)return{x:1/0,y:1/0,z:c.z}}return y>Math.PI&&(y-=2*Math.PI),g=Math.sin(x),_=Math.cos(x),f=g*g,{x:((p=d/Math.sqrt(1-u*f))+v)*_*Math.cos(y),y:(p+v)*_*Math.sin(y),z:(p*(1-u)+v)*g}}function geocentricToGeodetic(c,u,d,p){var g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G=1e-12,j=c.x,B=c.y,V=c.z?c.z:0;if(g=Math.sqrt(j*j+B*B),f=Math.sqrt(j*j+B*B+V*V),g/d<G){if(O=0,f/d<G)return N=-p,{x:c.x,y:c.y,z:c.z}}else O=Math.atan2(B,j);_=V/f,M=(y=g/f)*(1-u)*(x=1/Math.sqrt(1-u*(2-u)*y*y)),T=_*x,k=0;do{k++,v=u*(C=d/Math.sqrt(1-u*T*T))/(C+(N=g*M+V*T-C*(1-u*T*T))),I=(A=_*(x=1/Math.sqrt(1-v*(2-v)*y*y)))*M-(L=y*(1-v)*x)*T,M=L,T=A}while(I*I>1e-24&&k<30);return{x:O,y:Math.atan(A/Math.abs(L)),z:N}}function checkParams(c){return c===eg||c===ig}function datum_transform(c,u,d){if(function compareDatums(c,u){return c.datum_type===u.datum_type&&!(c.a!==u.a||Math.abs(c.es-u.es)>5e-11)&&(c.datum_type===eg?c.datum_params[0]===u.datum_params[0]&&c.datum_params[1]===u.datum_params[1]&&c.datum_params[2]===u.datum_params[2]:c.datum_type!==ig||c.datum_params[0]===u.datum_params[0]&&c.datum_params[1]===u.datum_params[1]&&c.datum_params[2]===u.datum_params[2]&&c.datum_params[3]===u.datum_params[3]&&c.datum_params[4]===u.datum_params[4]&&c.datum_params[5]===u.datum_params[5]&&c.datum_params[6]===u.datum_params[6])}(c,u))return d;if(c.datum_type===sg||u.datum_type===sg)return d;var p=c.a,g=c.es;if(c.datum_type===rg){if(0!==applyGridShift(c,!1,d))return;p=og,g=lg}var f=u.a,_=u.b,y=u.es;if(u.datum_type===rg&&(f=og,_=ag,y=lg),g===y&&p===f&&!checkParams(c.datum_type)&&!checkParams(u.datum_type))return d;if((d=geodeticToGeocentric(d,g,p),checkParams(c.datum_type)&&(d=function geocentricToWgs84(c,u,d){if(u===eg)return{x:c.x+d[0],y:c.y+d[1],z:c.z+d[2]};if(u===ig){var p=d[0],g=d[1],f=d[2],_=d[3],y=d[4],x=d[5],v=d[6];return{x:v*(c.x-x*c.y+y*c.z)+p,y:v*(x*c.x+c.y-_*c.z)+g,z:v*(-y*c.x+_*c.y+c.z)+f}}}(d,c.datum_type,c.datum_params)),checkParams(u.datum_type)&&(d=function geocentricFromWgs84(c,u,d){if(u===eg)return{x:c.x-d[0],y:c.y-d[1],z:c.z-d[2]};if(u===ig){var p=d[0],g=d[1],f=d[2],_=d[3],y=d[4],x=d[5],v=d[6],C=(c.x-p)/v,M=(c.y-g)/v,T=(c.z-f)/v;return{x:C+x*M-y*T,y:-x*C+M+_*T,z:y*C-_*M+T}}}(d,u.datum_type,u.datum_params)),d=geocentricToGeodetic(d,y,f,_),u.datum_type===rg)&&0!==applyGridShift(u,!0,d))return;return d}function applyGridShift(c,u,d){if(null===c.grids||0===c.grids.length)return console.log("Grid shift grids not found"),-1;var p={x:-d.x,y:d.y},g={x:Number.NaN,y:Number.NaN},f=[];t:for(var _=0;_<c.grids.length;_++){var y=c.grids[_];if(f.push(y.name),y.isNull){g=p;break}if(y.mandatory,null!==y.grid)for(var x=y.grid.subgrids,v=0,C=x.length;v<C;v++){var M=x[v],T=(Math.abs(M.del[1])+Math.abs(M.del[0]))/1e4,L=M.ll[0]-T,A=M.ll[1]-T,I=M.ll[0]+(M.lim[0]-1)*M.del[0]+T,k=M.ll[1]+(M.lim[1]-1)*M.del[1]+T;if(!(A>p.y||L>p.x||k<p.y||I<p.x)&&(g=applySubgridShift(p,u,M),!isNaN(g.x)))break t}else if(y.mandatory)return console.log("Unable to find mandatory grid '"+y.name+"'"),-1}return isNaN(g.x)?(console.log("Failed to find a grid shift table for location '"+-p.x*fg+" "+p.y*fg+" tried: '"+f+"'"),-1):(d.x=-g.x,d.y=g.y,0)}function applySubgridShift(c,u,d){var p={x:Number.NaN,y:Number.NaN};if(isNaN(c.x))return p;var g={x:c.x,y:c.y};g.x-=d.ll[0],g.y-=d.ll[1],g.x=adjust_lon(g.x-Math.PI)+Math.PI;var f=nadInterpolate(g,d);if(u){if(isNaN(f.x))return p;f.x=g.x-f.x,f.y=g.y-f.y;var _,y,x=9;do{if(y=nadInterpolate(f,d),isNaN(y.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}_={x:g.x-(y.x+f.x),y:g.y-(y.y+f.y)},f.x+=_.x,f.y+=_.y}while(x--&&Math.abs(_.x)>1e-12&&Math.abs(_.y)>1e-12);if(x<0)return console.log("Inverse grid shift iterator failed to converge."),p;p.x=adjust_lon(f.x+d.ll[0]),p.y=f.y+d.ll[1]}else isNaN(f.x)||(p.x=c.x+f.x,p.y=c.y+f.y);return p}function nadInterpolate(c,u){var d,p={x:c.x/u.del[0],y:c.y/u.del[1]},g=Math.floor(p.x),f=Math.floor(p.y),_=p.x-1*g,y=p.y-1*f,x={x:Number.NaN,y:Number.NaN};if(g<0||g>=u.lim[0])return x;if(f<0||f>=u.lim[1])return x;d=f*u.lim[0]+g;var v=u.cvs[d][0],C=u.cvs[d][1];d++;var M=u.cvs[d][0],T=u.cvs[d][1];d+=u.lim[0];var L=u.cvs[d][0],A=u.cvs[d][1];d--;var I=u.cvs[d][0],k=u.cvs[d][1],O=_*y,N=_*(1-y),G=(1-_)*(1-y),j=(1-_)*y;return x.x=G*v+N*M+j*I+O*L,x.y=G*C+N*T+j*k+O*A,x}function adjust_axis(c,u,d){var p,g,f,_=d.x,y=d.y,x=d.z||0,v={};for(f=0;f<3;f++)if(!u||2!==f||void 0!==d.z)switch(0===f?(p=_,g=-1!=="ew".indexOf(c.axis[f])?"x":"y"):1===f?(p=y,g=-1!=="ns".indexOf(c.axis[f])?"y":"x"):(p=x,g="z"),c.axis[f]){case"e":case"n":v[g]=p;break;case"w":case"s":v[g]=-p;break;case"u":void 0!==d[g]&&(v.z=p);break;case"d":void 0!==d[g]&&(v.z=-p);break;default:return null}return v}function common(c){var u={x:c[0],y:c[1]};return c.length>2&&(u.z=c[2]),c.length>3&&(u.m=c[3]),u}function checkCoord(c){if("function"==typeof Number.isFinite){if(Number.isFinite(c))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof c||c!=c||!isFinite(c))throw new TypeError("coordinates must be finite numbers")}function transform(c,u,d,p){var g,f=void 0!==(d=Array.isArray(d)?common(d):{x:d.x,y:d.y,z:d.z,m:d.m}).z;if(function checkSanity(c){checkCoord(c.x),checkCoord(c.y)}(d),c.datum&&u.datum&&function checkNotWGS(c,u){return(c.datum.datum_type===eg||c.datum.datum_type===ig||c.datum.datum_type===rg)&&"WGS84"!==u.datumCode||(u.datum.datum_type===eg||u.datum.datum_type===ig||u.datum.datum_type===rg)&&"WGS84"!==c.datumCode}(c,u)&&(d=transform(c,g=new Projection("WGS84"),d,p),c=g),p&&"enu"!==c.axis&&(d=adjust_axis(c,!1,d)),"longlat"===c.projName)d={x:d.x*mg,y:d.y*mg,z:d.z||0};else if(c.to_meter&&(d={x:d.x*c.to_meter,y:d.y*c.to_meter,z:d.z||0}),!(d=c.inverse(d)))return;if(c.from_greenwich&&(d.x+=c.from_greenwich),d=datum_transform(c.datum,u.datum,d))return u.from_greenwich&&(d={x:d.x-u.from_greenwich,y:d.y,z:d.z||0}),"longlat"===u.projName?d={x:d.x*fg,y:d.y*fg,z:d.z||0}:(d=u.forward(d),u.to_meter&&(d={x:d.x/u.to_meter,y:d.y/u.to_meter,z:d.z||0})),p&&"enu"!==u.axis?adjust_axis(u,!0,d):(d&&!f&&delete d.z,d)}Projection.projections=Ng,Projection.projections.start();var Bg=Projection("WGS84");function transformer(c,u,d,p){var g,f,_;return Array.isArray(d)?(g=transform(c,u,d,p)||{x:NaN,y:NaN},d.length>2?void 0!==c.name&&"geocent"===c.name||void 0!==u.name&&"geocent"===u.name?"number"==typeof g.z?[g.x,g.y,g.z].concat(d.splice(3)):[g.x,g.y,d[2]].concat(d.splice(3)):[g.x,g.y].concat(d.splice(2)):[g.x,g.y]):(f=transform(c,u,d,p),2===(_=Object.keys(d)).length||_.forEach((function(p){if(void 0!==c.name&&"geocent"===c.name||void 0!==u.name&&"geocent"===u.name){if("x"===p||"y"===p||"z"===p)return}else if("x"===p||"y"===p)return;f[p]=d[p]})),f)}function checkProj(c){return c instanceof Projection?c:c.oProj?c.oProj:Projection(c)}function proj4(c,u,d){c=checkProj(c);var p,g=!1;return void 0===u?(u=c,c=Bg,g=!0):(void 0!==u.x||Array.isArray(u))&&(d=u,u=c,c=Bg,g=!0),u=checkProj(u),d?transformer(c,u,d):(p={forward:function(d,p){return transformer(c,u,d,p)},inverse:function(d,p){return transformer(u,c,d,p)}},g&&(p.oProj=u),p)}var Ug=6,$g="AJSAJS",Wg="AFAFAF",Xg=65,Vg=73,qg=79,Yg=86,Zg=90,Kg={forward:forward$u,inverse:function inverse$u(c){var u=UTMtoLL(decode(c.toUpperCase()));if(u.lat&&u.lon)return[u.lon,u.lat,u.lon,u.lat];return[u.left,u.bottom,u.right,u.top]},toPoint:toPoint};function forward$u(c,u){return u=u||5,function encode(c,u){var d="00000"+c.easting,p="00000"+c.northing;return c.zoneNumber+c.zoneLetter+function get100kID(c,u,d){var p=get100kSetForZone(d),g=Math.floor(c/1e5),f=Math.floor(u/1e5)%20;return function getLetter100kID(c,u,d){var p=d-1,g=$g.charCodeAt(p),f=Wg.charCodeAt(p),_=g+c-1,y=f+u,x=!1;_>Zg&&(_=_-Zg+Xg-1,x=!0);(_===Vg||g<Vg&&_>Vg||(_>Vg||g<Vg)&&x)&&_++;(_===qg||g<qg&&_>qg||(_>qg||g<qg)&&x)&&++_===Vg&&_++;_>Zg&&(_=_-Zg+Xg-1);y>Yg?(y=y-Yg+Xg-1,x=!0):x=!1;(y===Vg||f<Vg&&y>Vg||(y>Vg||f<Vg)&&x)&&y++;(y===qg||f<qg&&y>qg||(y>qg||f<qg)&&x)&&++y===Vg&&y++;y>Yg&&(y=y-Yg+Xg-1);return String.fromCharCode(_)+String.fromCharCode(y)}(g,f,p)}(c.easting,c.northing,c.zoneNumber)+d.substr(d.length-5,u)+p.substr(p.length-5,u)}(function LLtoUTM(c){var u,d,p,g,f,_,y,x,v=c.lat,C=c.lon,M=6378137,T=.00669438,L=.9996,A=degToRad(v),I=degToRad(C);x=Math.floor((C+180)/6)+1,180===C&&(x=60);v>=56&&v<64&&C>=3&&C<12&&(x=32);v>=72&&v<84&&(C>=0&&C<9?x=31:C>=9&&C<21?x=33:C>=21&&C<33?x=35:C>=33&&C<42&&(x=37));y=degToRad(6*(x-1)-180+3),u=T/(1-T),d=M/Math.sqrt(1-T*Math.sin(A)*Math.sin(A)),p=Math.tan(A)*Math.tan(A),g=u*Math.cos(A)*Math.cos(A),f=Math.cos(A)*(I-y),_=M*((1-T/4-3*T*T/64-5*T*T*T/256)*A-(3*T/8+3*T*T/32+45*T*T*T/1024)*Math.sin(2*A)+(15*T*T/256+45*T*T*T/1024)*Math.sin(4*A)-35*T*T*T/3072*Math.sin(6*A));var k=L*d*(f+(1-p+g)*f*f*f/6+(5-18*p+p*p+72*g-58*u)*f*f*f*f*f/120)+5e5,O=L*(_+d*Math.tan(A)*(f*f/2+(5-p+9*g+4*g*g)*f*f*f*f/24+(61-58*p+p*p+600*g-330*u)*f*f*f*f*f*f/720));v<0&&(O+=1e7);return{northing:Math.round(O),easting:Math.round(k),zoneNumber:x,zoneLetter:getLetterDesignator(v)}}({lat:c[1],lon:c[0]}),u)}function toPoint(c){var u=UTMtoLL(decode(c.toUpperCase()));return u.lat&&u.lon?[u.lon,u.lat]:[(u.left+u.right)/2,(u.top+u.bottom)/2]}function degToRad(c){return c*(Math.PI/180)}function radToDeg(c){return c/Math.PI*180}function UTMtoLL(c){var u=c.northing,d=c.easting,p=c.zoneLetter,g=c.zoneNumber;if(g<0||g>60)return null;var f,_,y,x,v,C,M,T,L,A=.9996,I=6378137,k=.00669438,O=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),N=d-5e5,G=u;p<"N"&&(G-=1e7),M=6*(g-1)-180+3,f=.006739496752268451,L=(T=G/A/6367449.145945056)+(3*O/2-27*O*O*O/32)*Math.sin(2*T)+(21*O*O/16-55*O*O*O*O/32)*Math.sin(4*T)+151*O*O*O/96*Math.sin(6*T),_=I/Math.sqrt(1-k*Math.sin(L)*Math.sin(L)),y=Math.tan(L)*Math.tan(L),x=f*Math.cos(L)*Math.cos(L),v=.99330562*I/Math.pow(1-k*Math.sin(L)*Math.sin(L),1.5),C=N/(_*A);var j=L-_*Math.tan(L)/v*(C*C/2-(5+3*y+10*x-4*x*x-9*f)*C*C*C*C/24+(61+90*y+298*x+45*y*y-1.6983531815716497-3*x*x)*C*C*C*C*C*C/720);j=radToDeg(j);var B,V=(C-(1+2*y+x)*C*C*C/6+(5-2*x+28*y-3*x*x+8*f+24*y*y)*C*C*C*C*C/120)/Math.cos(L);if(V=M+radToDeg(V),c.accuracy){var q=UTMtoLL({northing:c.northing+c.accuracy,easting:c.easting+c.accuracy,zoneLetter:c.zoneLetter,zoneNumber:c.zoneNumber});B={top:q.lat,right:q.lon,bottom:j,left:V}}else B={lat:j,lon:V};return B}function getLetterDesignator(c){var u="Z";return 84>=c&&c>=72?u="X":72>c&&c>=64?u="W":64>c&&c>=56?u="V":56>c&&c>=48?u="U":48>c&&c>=40?u="T":40>c&&c>=32?u="S":32>c&&c>=24?u="R":24>c&&c>=16?u="Q":16>c&&c>=8?u="P":8>c&&c>=0?u="N":0>c&&c>=-8?u="M":-8>c&&c>=-16?u="L":-16>c&&c>=-24?u="K":-24>c&&c>=-32?u="J":-32>c&&c>=-40?u="H":-40>c&&c>=-48?u="G":-48>c&&c>=-56?u="F":-56>c&&c>=-64?u="E":-64>c&&c>=-72?u="D":-72>c&&c>=-80&&(u="C"),u}function get100kSetForZone(c){var u=c%Ug;return 0===u&&(u=Ug),u}function decode(c){if(c&&0===c.length)throw"MGRSPoint coverting from nothing";for(var u,d=c.length,p=null,g="",f=0;!/[A-Z]/.test(u=c.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+c;g+=u,f++}var _=parseInt(g,10);if(0===f||f+3>d)throw"MGRSPoint bad conversion from: "+c;var y=c.charAt(f++);if(y<="A"||"B"===y||"Y"===y||y>="Z"||"I"===y||"O"===y)throw"MGRSPoint zone letter "+y+" not handled: "+c;p=c.substring(f,f+=2);for(var x=get100kSetForZone(_),v=function getEastingFromChar(c,u){var d=$g.charCodeAt(u-1),p=1e5,g=!1;for(;d!==c.charCodeAt(0);){if(++d===Vg&&d++,d===qg&&d++,d>Zg){if(g)throw"Bad character: "+c;d=Xg,g=!0}p+=1e5}return p}(p.charAt(0),x),C=function getNorthingFromChar(c,u){if(c>"V")throw"MGRSPoint given invalid Northing "+c;var d=Wg.charCodeAt(u-1),p=0,g=!1;for(;d!==c.charCodeAt(0);){if(++d===Vg&&d++,d===qg&&d++,d>Yg){if(g)throw"Bad character: "+c;d=Xg,g=!0}p+=1e5}return p}(p.charAt(1),x);C<getMinNorthing(y);)C+=2e6;var M=d-f;if(M%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+c;var T,L,A,I=M/2,k=0,O=0;return I>0&&(T=1e5/Math.pow(10,I),L=c.substring(f,f+I),k=parseFloat(L)*T,A=c.substring(f+I),O=parseFloat(A)*T),{easting:k+v,northing:O+C,zoneLetter:y,zoneNumber:_,accuracy:T}}function getMinNorthing(c){var u;switch(c){case"C":u=11e5;break;case"D":u=2e6;break;case"E":u=28e5;break;case"F":u=37e5;break;case"G":u=46e5;break;case"H":u=55e5;break;case"J":u=64e5;break;case"K":u=73e5;break;case"L":u=82e5;break;case"M":u=91e5;break;case"N":u=0;break;case"P":u=8e5;break;case"Q":u=17e5;break;case"R":u=26e5;break;case"S":u=35e5;break;case"T":u=44e5;break;case"U":u=53e5;break;case"V":u=62e5;break;case"W":u=7e6;break;case"X":u=79e5;break;default:u=-1}if(u>=0)return u;throw"Invalid zone letter: "+c}function Point(c,u,d){if(!(this instanceof Point))return new Point(c,u,d);if(Array.isArray(c))this.x=c[0],this.y=c[1],this.z=c[2]||0;else if("object"==typeof c)this.x=c.x,this.y=c.y,this.z=c.z||0;else if("string"==typeof c&&void 0===u){var p=c.split(",");this.x=parseFloat(p[0],10),this.y=parseFloat(p[1],10),this.z=parseFloat(p[2],10)||0}else this.x=c,this.y=u,this.z=d||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Point.fromMGRS=function(c){return new Point(toPoint(c))},Point.prototype.toMGRS=function(c){return forward$u([this.x,this.y],c)};var Hg=1,Jg=.25,Qg=.046875,tm=.01953125,em=.01068115234375,im=.75,rm=.46875,nm=.013020833333333334,sm=.007120768229166667,om=.3645833333333333,am=.005696614583333333,lm=.3076171875;function pj_enfn(c){var u=[];u[0]=Hg-c*(Jg+c*(Qg+c*(tm+c*em))),u[1]=c*(im-c*(Qg+c*(tm+c*em)));var d=c*c;return u[2]=d*(rm-c*(nm+c*sm)),d*=c,u[3]=d*(om-c*am),u[4]=d*c*lm,u}function pj_mlfn(c,u,d,p){return d*=u,u*=u,p[0]*c-d*(p[1]+u*(p[2]+u*(p[3]+u*p[4])))}var hm=20;function pj_inv_mlfn(c,u,d){for(var p=1/(1-u),g=c,f=hm;f;--f){var _=Math.sin(g),y=1-u*_*_;if(g-=y=(pj_mlfn(g,_,Math.cos(g),d)-c)*(y*Math.sqrt(y))*p,Math.abs(y)<gg)return g}return g}var cm={init:function init$v(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=pj_enfn(this.es),this.ml0=pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function forward$t(c){var u,d,p,g=c.x,f=c.y,_=adjust_lon(g-this.long0),y=Math.sin(f),x=Math.cos(f);if(this.es){var v=x*_,C=Math.pow(v,2),M=this.ep2*Math.pow(x,2),T=Math.pow(M,2),L=Math.abs(x)>gg?Math.tan(f):0,A=Math.pow(L,2),I=Math.pow(A,2);u=1-this.es*Math.pow(y,2),v/=Math.sqrt(u);var k=pj_mlfn(f,y,x,this.en);d=this.a*(this.k0*v*(1+C/6*(1-A+M+C/20*(5-18*A+I+14*M-58*A*M+C/42*(61+179*I-I*A-479*A)))))+this.x0,p=this.a*(this.k0*(k-this.ml0+y*_*v/2*(1+C/12*(5-A+9*M+4*T+C/30*(61+I-58*A+270*M-330*A*M+C/56*(1385+543*I-I*A-3111*A))))))+this.y0}else{var O=x*Math.sin(_);if(Math.abs(Math.abs(O)-1)<gg)return 93;if(d=.5*this.a*this.k0*Math.log((1+O)/(1-O))+this.x0,p=x*Math.cos(_)/Math.sqrt(1-Math.pow(O,2)),(O=Math.abs(p))>=1){if(O-1>gg)return 93;p=0}else p=Math.acos(p);f<0&&(p=-p),p=this.a*this.k0*(p-this.lat0)+this.y0}return c.x=d,c.y=p,c},inverse:function inverse$t(c){var u,d,p,g,f=(c.x-this.x0)*(1/this.a),_=(c.y-this.y0)*(1/this.a);if(this.es)if(d=pj_inv_mlfn(u=this.ml0+_/this.k0,this.es,this.en),Math.abs(d)<cg){var y=Math.sin(d),x=Math.cos(d),v=Math.abs(x)>gg?Math.tan(d):0,C=this.ep2*Math.pow(x,2),M=Math.pow(C,2),T=Math.pow(v,2),L=Math.pow(T,2);u=1-this.es*Math.pow(y,2);var A=f*Math.sqrt(u)/this.k0,I=Math.pow(A,2);p=d-(u*=v)*I/(1-this.es)*.5*(1-I/12*(5+3*T-9*C*T+C-4*M-I/30*(61+90*T-252*C*T+45*L+46*C-I/56*(1385+3633*T+4095*L+1574*L*T)))),g=adjust_lon(this.long0+A*(1-I/6*(1+2*T+C-I/20*(5+28*T+24*L+8*C*T+6*C-I/42*(61+662*T+1320*L+720*L*T))))/x)}else p=cg*sign(_),g=0;else{var k=Math.exp(f/this.k0),O=.5*(k-1/k),N=this.lat0+_/this.k0,G=Math.cos(N);u=Math.sqrt((1-Math.pow(G,2))/(1+Math.pow(O,2))),p=Math.asin(u),_<0&&(p=-p),g=0===O&&0===G?0:adjust_lon(Math.atan2(O,G)+this.long0)}return c.x=g,c.y=p,c},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function sinh(c){var u=Math.exp(c);return u=(u-1/u)/2}function hypot(c,u){c=Math.abs(c),u=Math.abs(u);var d=Math.max(c,u),p=Math.min(c,u)/(d||1);return d*Math.sqrt(1+Math.pow(p,2))}function asinhy(c){var u=Math.abs(c);return u=function log1py(c){var u=1+c,d=u-1;return 0===d?c:c*Math.log(u)/d}(u*(1+u/(hypot(1,u)+1))),c<0?-u:u}function gatg(c,u){for(var d,p=2*Math.cos(2*u),g=c.length-1,f=c[g],_=0;--g>=0;)d=p*f-_+c[g],_=f,f=d;return u+d*Math.sin(2*u)}function clens_cmplx(c,u,d){for(var p,g,f=Math.sin(u),_=Math.cos(u),y=sinh(d),x=function cosh(c){var u=Math.exp(c);return(u+1/u)/2}(d),v=2*_*x,C=-2*f*y,M=c.length-1,T=c[M],L=0,A=0,I=0;--M>=0;)p=A,g=L,T=v*(A=T)-p-C*(L=I)+c[M],I=C*A-g+v*L;return[(v=f*x)*T-(C=_*y)*I,v*I+C*T]}var um={init:function init$u(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(cm.init.apply(this),this.forward=cm.forward,this.inverse=cm.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var c=this.es/(1+Math.sqrt(1-this.es)),u=c/(2-c),d=u;this.cgb[0]=u*(2+u*(-2/3+u*(u*(116/45+u*(26/45+u*(-2854/675)))-2))),this.cbg[0]=u*(u*(2/3+u*(4/3+u*(-82/45+u*(32/45+u*(4642/4725)))))-2),d*=u,this.cgb[1]=d*(7/3+u*(u*(-227/45+u*(2704/315+u*(2323/945)))-1.6)),this.cbg[1]=d*(5/3+u*(-16/15+u*(-13/9+u*(904/315+u*(-1522/945))))),d*=u,this.cgb[2]=d*(56/15+u*(-136/35+u*(-1262/105+u*(73814/2835)))),this.cbg[2]=d*(-26/15+u*(34/21+u*(1.6+u*(-12686/2835)))),d*=u,this.cgb[3]=d*(4279/630+u*(-332/35+u*(-399572/14175))),this.cbg[3]=d*(1237/630+u*(u*(-24832/14175)-2.4)),d*=u,this.cgb[4]=d*(4174/315+u*(-144838/6237)),this.cbg[4]=d*(-734/315+u*(109598/31185)),d*=u,this.cgb[5]=d*(601676/22275),this.cbg[5]=d*(444337/155925),d=Math.pow(u,2),this.Qn=this.k0/(1+u)*(1+d*(1/4+d*(1/64+d/256))),this.utg[0]=u*(u*(2/3+u*(-37/96+u*(1/360+u*(81/512+u*(-96199/604800)))))-.5),this.gtu[0]=u*(.5+u*(-2/3+u*(5/16+u*(41/180+u*(-127/288+u*(7891/37800)))))),this.utg[1]=d*(-1/48+u*(-1/15+u*(437/1440+u*(-46/105+u*(1118711/3870720))))),this.gtu[1]=d*(13/48+u*(u*(557/1440+u*(281/630+u*(-1983433/1935360)))-.6)),d*=u,this.utg[2]=d*(-17/480+u*(37/840+u*(209/4480+u*(-5569/90720)))),this.gtu[2]=d*(61/240+u*(-103/140+u*(15061/26880+u*(167603/181440)))),d*=u,this.utg[3]=d*(-4397/161280+u*(11/504+u*(830251/7257600))),this.gtu[3]=d*(49561/161280+u*(-179/168+u*(6601661/7257600))),d*=u,this.utg[4]=d*(-4583/161280+u*(108847/3991680)),this.gtu[4]=d*(34729/80640+u*(-3418889/1995840)),d*=u,this.utg[5]=d*(-20648693/638668800),this.gtu[5]=.6650675310896665*d;var p=gatg(this.cbg,this.lat0);this.Zb=-this.Qn*(p+function clens(c,u){for(var d,p=2*Math.cos(u),g=c.length-1,f=c[g],_=0;--g>=0;)d=p*f-_+c[g],_=f,f=d;return Math.sin(u)*d}(this.gtu,2*p))},forward:function forward$s(c){var u=adjust_lon(c.x-this.long0),d=c.y;d=gatg(this.cbg,d);var p=Math.sin(d),g=Math.cos(d),f=Math.sin(u),_=Math.cos(u);d=Math.atan2(p,_*g),u=Math.atan2(f*g,hypot(p,g*_)),u=asinhy(Math.tan(u));var y,x,v=clens_cmplx(this.gtu,2*d,2*u);return d+=v[0],u+=v[1],Math.abs(u)<=2.623395162778?(y=this.a*(this.Qn*u)+this.x0,x=this.a*(this.Qn*d+this.Zb)+this.y0):(y=1/0,x=1/0),c.x=y,c.y=x,c},inverse:function inverse$s(c){var u,d,p=(c.x-this.x0)*(1/this.a),g=(c.y-this.y0)*(1/this.a);if(g=(g-this.Zb)/this.Qn,p/=this.Qn,Math.abs(p)<=2.623395162778){var f=clens_cmplx(this.utg,2*g,2*p);g+=f[0],p+=f[1],p=Math.atan(sinh(p));var _=Math.sin(g),y=Math.cos(g),x=Math.sin(p),v=Math.cos(p);g=Math.atan2(_*v,hypot(x,v*y)),u=adjust_lon((p=Math.atan2(x,v*y))+this.long0),d=gatg(this.cgb,g)}else u=1/0,d=1/0;return c.x=u,c.y=d,c},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};var dm={init:function init$t(){var c=function adjust_zone(c,u){if(void 0===c){if((c=Math.floor(30*(adjust_lon(u)+Math.PI)/Math.PI)+1)<0)return 0;if(c>60)return 60}return c}(this.zone,this.long0);if(void 0===c)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(c)-183)*mg,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,um.init.apply(this),this.forward=um.forward,this.inverse=um.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function srat(c,u){return Math.pow((1-c)/(1+c),u)}var pm={init:function init$s(){var c=Math.sin(this.lat0),u=Math.cos(this.lat0);u*=u,this.rc=Math.sqrt(1-this.es)/(1-this.es*c*c),this.C=Math.sqrt(1+this.es*u*u/(1-this.es)),this.phic0=Math.asin(c/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+_g)/(Math.pow(Math.tan(.5*this.lat0+_g),this.C)*srat(this.e*c,this.ratexp))},forward:function forward$r(c){var u=c.x,d=c.y;return c.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*d+_g),this.C)*srat(this.e*Math.sin(d),this.ratexp))-cg,c.x=this.C*u,c},inverse:function inverse$r(c){for(var u=c.x/this.C,d=c.y,p=Math.pow(Math.tan(.5*d+_g)/this.K,1/this.C),g=20;g>0&&(d=2*Math.atan(p*srat(this.e*Math.sin(c.y),-.5*this.e))-cg,!(Math.abs(d-c.y)<1e-14));--g)c.y=d;return g?(c.x=u,c.y=d,c):null},names:["gauss"]};var gm={init:function init$r(){pm.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function forward$q(c){var u,d,p,g;return c.x=adjust_lon(c.x-this.long0),pm.forward.apply(this,[c]),u=Math.sin(c.y),d=Math.cos(c.y),p=Math.cos(c.x),g=this.k0*this.R2/(1+this.sinc0*u+this.cosc0*d*p),c.x=g*d*Math.sin(c.x),c.y=g*(this.cosc0*u-this.sinc0*d*p),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function inverse$q(c){var u,d,p,g,f;if(c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,c.x/=this.k0,c.y/=this.k0,f=hypot(c.x,c.y)){var _=2*Math.atan2(f,this.R2);u=Math.sin(_),d=Math.cos(_),g=Math.asin(d*this.sinc0+c.y*u*this.cosc0/f),p=Math.atan2(c.x*u,f*this.cosc0*d-c.y*this.sinc0*u)}else g=this.phic0,p=0;return c.x=p,c.y=g,pm.inverse.apply(this,[c]),c.x=adjust_lon(c.x+this.long0),c},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var mm={init:function init$q(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=gg&&(this.k0=.5*(1+sign(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=gg&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=gg&&Math.abs(Math.cos(this.lat_ts))>gg&&(this.k0=.5*this.cons*msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tsfnz(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=msfnz(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-cg,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function forward$p(c){var u,d,p,g,f,_,y=c.x,x=c.y,v=Math.sin(x),C=Math.cos(x),M=adjust_lon(y-this.long0);return Math.abs(Math.abs(y-this.long0)-Math.PI)<=gg&&Math.abs(x+this.lat0)<=gg?(c.x=NaN,c.y=NaN,c):this.sphere?(u=2*this.k0/(1+this.sinlat0*v+this.coslat0*C*Math.cos(M)),c.x=this.a*u*C*Math.sin(M)+this.x0,c.y=this.a*u*(this.coslat0*v-this.sinlat0*C*Math.cos(M))+this.y0,c):(d=2*Math.atan(this.ssfn_(x,v,this.e))-cg,g=Math.cos(d),p=Math.sin(d),Math.abs(this.coslat0)<=gg?(f=tsfnz(this.e,x*this.con,this.con*v),_=2*this.a*this.k0*f/this.cons,c.x=this.x0+_*Math.sin(y-this.long0),c.y=this.y0-this.con*_*Math.cos(y-this.long0),c):(Math.abs(this.sinlat0)<gg?(u=2*this.a*this.k0/(1+g*Math.cos(M)),c.y=u*p):(u=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*p+this.cosX0*g*Math.cos(M))),c.y=u*(this.cosX0*p-this.sinX0*g*Math.cos(M))+this.y0),c.x=u*g*Math.sin(M)+this.x0,c))},inverse:function inverse$p(c){var u,d,p,g,f;c.x-=this.x0,c.y-=this.y0;var _=Math.sqrt(c.x*c.x+c.y*c.y);if(this.sphere){var y=2*Math.atan(_/(2*this.a*this.k0));return u=this.long0,d=this.lat0,_<=gg?(c.x=u,c.y=d,c):(d=Math.asin(Math.cos(y)*this.sinlat0+c.y*Math.sin(y)*this.coslat0/_),u=Math.abs(this.coslat0)<gg?this.lat0>0?adjust_lon(this.long0+Math.atan2(c.x,-1*c.y)):adjust_lon(this.long0+Math.atan2(c.x,c.y)):adjust_lon(this.long0+Math.atan2(c.x*Math.sin(y),_*this.coslat0*Math.cos(y)-c.y*this.sinlat0*Math.sin(y))),c.x=u,c.y=d,c)}if(Math.abs(this.coslat0)<=gg){if(_<=gg)return d=this.lat0,u=this.long0,c.x=u,c.y=d,c;c.x*=this.con,c.y*=this.con,p=_*this.cons/(2*this.a*this.k0),d=this.con*phi2z(this.e,p),u=this.con*adjust_lon(this.con*this.long0+Math.atan2(c.x,-1*c.y))}else g=2*Math.atan(_*this.cosX0/(2*this.a*this.k0*this.ms1)),u=this.long0,_<=gg?f=this.X0:(f=Math.asin(Math.cos(g)*this.sinX0+c.y*Math.sin(g)*this.cosX0/_),u=adjust_lon(this.long0+Math.atan2(c.x*Math.sin(g),_*this.cosX0*Math.cos(g)-c.y*this.sinX0*Math.sin(g)))),d=-1*phi2z(this.e,Math.tan(.5*(cg+f)));return c.x=u,c.y=d,c},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function ssfn_(c,u,d){return u*=d,Math.tan(.5*(cg+c))*Math.pow((1-u)/(1+u),.5*d)}};var fm={init:function init$p(){var c=this.lat0;this.lambda0=this.long0;var u=Math.sin(c),d=this.a,p=1/this.rf,g=2*p-Math.pow(p,2),f=this.e=Math.sqrt(g);this.R=this.k0*d*Math.sqrt(1-g)/(1-g*Math.pow(u,2)),this.alpha=Math.sqrt(1+g/(1-g)*Math.pow(Math.cos(c),4)),this.b0=Math.asin(u/this.alpha);var _=Math.log(Math.tan(Math.PI/4+this.b0/2)),y=Math.log(Math.tan(Math.PI/4+c/2)),x=Math.log((1+f*u)/(1-f*u));this.K=_-this.alpha*y+this.alpha*f/2*x},forward:function forward$o(c){var u=Math.log(Math.tan(Math.PI/4-c.y/2)),d=this.e/2*Math.log((1+this.e*Math.sin(c.y))/(1-this.e*Math.sin(c.y))),p=-this.alpha*(u+d)+this.K,g=2*(Math.atan(Math.exp(p))-Math.PI/4),f=this.alpha*(c.x-this.lambda0),_=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(g)+Math.cos(this.b0)*Math.cos(f))),y=Math.asin(Math.cos(this.b0)*Math.sin(g)-Math.sin(this.b0)*Math.cos(g)*Math.cos(f));return c.y=this.R/2*Math.log((1+Math.sin(y))/(1-Math.sin(y)))+this.y0,c.x=this.R*_+this.x0,c},inverse:function inverse$o(c){for(var u=c.x-this.x0,d=c.y-this.y0,p=u/this.R,g=2*(Math.atan(Math.exp(d/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(g)+Math.sin(this.b0)*Math.cos(g)*Math.cos(p)),_=Math.atan(Math.sin(p)/(Math.cos(this.b0)*Math.cos(p)-Math.sin(this.b0)*Math.tan(g))),y=this.lambda0+_/this.alpha,x=0,v=f,C=-1e3,M=0;Math.abs(v-C)>1e-7;){if(++M>20)return;x=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(v))/2)),C=v,v=2*Math.atan(Math.exp(x))-Math.PI/2}return c.x=y,c.y=v,c},names:["somerc"]},_m=1e-7;var ym={init:function init$o(){var c,u,d,p,g,f,_,y,x,v,C,M=0,T=0,L=0,A=0,I=0,k=0,O=0;this.no_off=function isTypeA(c){var u="object"==typeof c.PROJECTION?Object.keys(c.PROJECTION)[0]:c.PROJECTION;return"no_uoff"in c||"no_off"in c||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(u)}(this),this.no_rot="no_rot"in this;var N=!1;"alpha"in this&&(N=!0);var G=!1;if("rectified_grid_angle"in this&&(G=!0),N&&(O=this.alpha),G&&(M=this.rectified_grid_angle*mg),N||G)T=this.longc;else if(L=this.long1,I=this.lat1,A=this.long2,k=this.lat2,Math.abs(I-k)<=_m||(c=Math.abs(I))<=_m||Math.abs(c-cg)<=_m||Math.abs(Math.abs(this.lat0)-cg)<=_m||Math.abs(Math.abs(k)-cg)<=_m)throw new Error;var j=1-this.es;u=Math.sqrt(j),Math.abs(this.lat0)>gg?(y=Math.sin(this.lat0),d=Math.cos(this.lat0),c=1-this.es*y*y,this.B=d*d,this.B=Math.sqrt(1+this.es*this.B*this.B/j),this.A=this.B*this.k0*u/c,(g=(p=this.B*u/(d*Math.sqrt(c)))*p-1)<=0?g=0:(g=Math.sqrt(g),this.lat0<0&&(g=-g)),this.E=g+=p,this.E*=Math.pow(tsfnz(this.e,this.lat0,y),this.B)):(this.B=1/u,this.A=this.k0,this.E=p=g=1),N||G?(N?(C=Math.asin(Math.sin(O)/p),G||(M=O)):(C=M,O=Math.asin(p*Math.sin(C))),this.lam0=T-Math.asin(.5*(g-1/g)*Math.tan(C))/this.B):(f=Math.pow(tsfnz(this.e,I,Math.sin(I)),this.B),_=Math.pow(tsfnz(this.e,k,Math.sin(k)),this.B),g=this.E/f,x=(_-f)/(_+f),v=((v=this.E*this.E)-_*f)/(v+_*f),(c=L-A)<-Math.pi?A-=yg:c>Math.pi&&(A+=yg),this.lam0=adjust_lon(.5*(L+A)-Math.atan(v*Math.tan(.5*this.B*(L-A))/x)/this.B),C=Math.atan(2*Math.sin(this.B*adjust_lon(L-this.lam0))/(g-1/g)),M=O=Math.asin(p*Math.sin(C))),this.singam=Math.sin(C),this.cosgam=Math.cos(C),this.sinrot=Math.sin(M),this.cosrot=Math.cos(M),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(p*p-1)/Math.cos(O))),this.lat0<0&&(this.u_0=-this.u_0)),g=.5*C,this.v_pole_n=this.ArB*Math.log(Math.tan(_g-g)),this.v_pole_s=this.ArB*Math.log(Math.tan(_g+g))},forward:function forward$n(c){var u,d,p,g,f,_,y,x,v={};if(c.x=c.x-this.lam0,Math.abs(Math.abs(c.y)-cg)>gg){if(u=.5*((f=this.E/Math.pow(tsfnz(this.e,c.y,Math.sin(c.y)),this.B))-(_=1/f)),d=.5*(f+_),g=Math.sin(this.B*c.x),p=(u*this.singam-g*this.cosgam)/d,Math.abs(Math.abs(p)-1)<gg)throw new Error;x=.5*this.ArB*Math.log((1-p)/(1+p)),_=Math.cos(this.B*c.x),y=Math.abs(_)<_m?this.A*c.x:this.ArB*Math.atan2(u*this.cosgam+g*this.singam,_)}else x=c.y>0?this.v_pole_n:this.v_pole_s,y=this.ArB*c.y;return this.no_rot?(v.x=y,v.y=x):(y-=this.u_0,v.x=x*this.cosrot+y*this.sinrot,v.y=y*this.cosrot-x*this.sinrot),v.x=this.a*v.x+this.x0,v.y=this.a*v.y+this.y0,v},inverse:function inverse$n(c){var u,d,p,g,f,_,y,x={};if(c.x=(c.x-this.x0)*(1/this.a),c.y=(c.y-this.y0)*(1/this.a),this.no_rot?(d=c.y,u=c.x):(d=c.x*this.cosrot-c.y*this.sinrot,u=c.y*this.cosrot+c.x*this.sinrot+this.u_0),g=.5*((p=Math.exp(-this.BrA*d))-1/p),f=.5*(p+1/p),y=((_=Math.sin(this.BrA*u))*this.cosgam+g*this.singam)/f,Math.abs(Math.abs(y)-1)<gg)x.x=0,x.y=y<0?-cg:cg;else{if(x.y=this.E/Math.sqrt((1+y)/(1-y)),x.y=phi2z(this.e,Math.pow(x.y,1/this.B)),x.y===1/0)throw new Error;x.x=-this.rB*Math.atan2(g*this.cosgam-_*this.singam,Math.cos(this.BrA*u))}return x.x+=this.lam0,x},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};var xm={init:function init$n(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<gg)){var c=this.b/this.a;this.e=Math.sqrt(1-c*c);var u=Math.sin(this.lat1),d=Math.cos(this.lat1),p=msfnz(this.e,u,d),g=tsfnz(this.e,this.lat1,u),f=Math.sin(this.lat2),_=Math.cos(this.lat2),y=msfnz(this.e,f,_),x=tsfnz(this.e,this.lat2,f),v=tsfnz(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>gg?this.ns=Math.log(p/y)/Math.log(g/x):this.ns=u,isNaN(this.ns)&&(this.ns=u),this.f0=p/(this.ns*Math.pow(g,this.ns)),this.rh=this.a*this.f0*Math.pow(v,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function forward$m(c){var u=c.x,d=c.y;Math.abs(2*Math.abs(d)-Math.PI)<=gg&&(d=sign(d)*(cg-2*gg));var p,g,f=Math.abs(Math.abs(d)-cg);if(f>gg)p=tsfnz(this.e,d,Math.sin(d)),g=this.a*this.f0*Math.pow(p,this.ns);else{if((f=d*this.ns)<=0)return null;g=0}var _=this.ns*adjust_lon(u-this.long0);return c.x=this.k0*(g*Math.sin(_))+this.x0,c.y=this.k0*(this.rh-g*Math.cos(_))+this.y0,c},inverse:function inverse$m(c){var u,d,p,g,f,_=(c.x-this.x0)/this.k0,y=this.rh-(c.y-this.y0)/this.k0;this.ns>0?(u=Math.sqrt(_*_+y*y),d=1):(u=-Math.sqrt(_*_+y*y),d=-1);var x=0;if(0!==u&&(x=Math.atan2(d*_,d*y)),0!==u||this.ns>0){if(d=1/this.ns,p=Math.pow(u/(this.a*this.f0),d),-9999===(g=phi2z(this.e,p)))return null}else g=-cg;return f=adjust_lon(x/this.ns+this.long0),c.x=f,c.y=g,c},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var vm={init:function init$m(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function forward$l(c){var u,d,p,g,f,_,y,x=c.x,v=c.y,C=adjust_lon(x-this.long0);return u=Math.pow((1+this.e*Math.sin(v))/(1-this.e*Math.sin(v)),this.alfa*this.e/2),d=2*(Math.atan(this.k*Math.pow(Math.tan(v/2+this.s45),this.alfa)/u)-this.s45),p=-C*this.alfa,g=Math.asin(Math.cos(this.ad)*Math.sin(d)+Math.sin(this.ad)*Math.cos(d)*Math.cos(p)),f=Math.asin(Math.cos(d)*Math.sin(p)/Math.cos(g)),_=this.n*f,y=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(g/2+this.s45),this.n),c.y=y*Math.cos(_)/1,c.x=y*Math.sin(_)/1,this.czech||(c.y*=-1,c.x*=-1),c},inverse:function inverse$l(c){var u,d,p,g,f,_,y,x=c.x;c.x=c.y,c.y=x,this.czech||(c.y*=-1,c.x*=-1),f=Math.sqrt(c.x*c.x+c.y*c.y),g=Math.atan2(c.y,c.x)/Math.sin(this.s0),p=2*(Math.atan(Math.pow(this.ro0/f,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),u=Math.asin(Math.cos(this.ad)*Math.sin(p)-Math.sin(this.ad)*Math.cos(p)*Math.cos(g)),d=Math.asin(Math.cos(p)*Math.sin(g)/Math.cos(u)),c.x=this.long0-d/this.alfa,_=u,y=0;var v=0;do{c.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(u/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(_))/(1-this.e*Math.sin(_)),this.e/2))-this.s45),Math.abs(_-c.y)<1e-10&&(y=1),_=c.y,v+=1}while(0===y&&v<15);return v>=15?null:c},names:["Krovak","krovak"]};function mlfn(c,u,d,p,g){return c*g-u*Math.sin(2*g)+d*Math.sin(4*g)-p*Math.sin(6*g)}function e0fn(c){return 1-.25*c*(1+c/16*(3+1.25*c))}function e1fn(c){return.375*c*(1+.25*c*(1+.46875*c))}function e2fn(c){return.05859375*c*c*(1+.75*c)}function e3fn(c){return c*c*c*(35/3072)}function gN(c,u,d){var p=u*d;return c/Math.sqrt(1-p*p)}function adjust_lat(c){return Math.abs(c)<cg?c:c-sign(c)*Math.PI}function imlfn(c,u,d,p,g){var f,_;f=c/u;for(var y=0;y<15;y++)if(f+=_=(c-(u*f-d*Math.sin(2*f)+p*Math.sin(4*f)-g*Math.sin(6*f)))/(u-2*d*Math.cos(2*f)+4*p*Math.cos(4*f)-6*g*Math.cos(6*f)),Math.abs(_)<=1e-10)return f;return NaN}var Sm={init:function init$l(){this.sphere||(this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function forward$k(c){var u,d,p=c.x,g=c.y;if(p=adjust_lon(p-this.long0),this.sphere)u=this.a*Math.asin(Math.cos(g)*Math.sin(p)),d=this.a*(Math.atan2(Math.tan(g),Math.cos(p))-this.lat0);else{var f=Math.sin(g),_=Math.cos(g),y=gN(this.a,this.e,f),x=Math.tan(g)*Math.tan(g),v=p*Math.cos(g),C=v*v,M=this.es*_*_/(1-this.es);u=y*v*(1-C*x*(1/6-(8-x+8*M)*C/120)),d=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,g)-this.ml0+y*f/_*C*(.5+(5-x+6*M)*C/24)}return c.x=u+this.x0,c.y=d+this.y0,c},inverse:function inverse$k(c){c.x-=this.x0,c.y-=this.y0;var u,d,p=c.x/this.a,g=c.y/this.a;if(this.sphere){var f=g+this.lat0;u=Math.asin(Math.sin(f)*Math.cos(p)),d=Math.atan2(Math.tan(p),Math.cos(f))}else{var _=imlfn(this.ml0/this.a+g,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(_)-cg)<=gg)return c.x=this.long0,c.y=cg,g<0&&(c.y*=-1),c;var y=gN(this.a,this.e,Math.sin(_)),x=y*y*y/this.a/this.a*(1-this.es),v=Math.pow(Math.tan(_),2),C=p*this.a/y,M=C*C;u=_-y*Math.tan(_)/x*C*C*(.5-(1+3*v)*C*C/24),d=C*(1-M*(v/3+(1+3*v)*v*M/15))/Math.cos(_)}return c.x=adjust_lon(d+this.long0),c.y=adjust_lat(u),c},names:["Cassini","Cassini_Soldner","cass"]};function qsfnz(c,u){var d;return c>1e-7?(1-c*c)*(u/(1-(d=c*u)*d)-.5/c*Math.log((1-d)/(1+d))):2*u}var wm=.3333333333333333,Cm=.17222222222222222,Em=.10257936507936508,Pm=.06388888888888888,bm=.0664021164021164,Mm=.016415012942191543;var Tm={init:function init$k(){var c,u=Math.abs(this.lat0);if(Math.abs(u-cg)<gg?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(u)<gg?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=qsfnz(this.e,1),this.mmf=.5/(1-this.es),this.apa=function authset(c){var u,d=[];return d[0]=c*wm,u=c*c,d[0]+=u*Cm,d[1]=u*Pm,u*=c,d[0]+=u*Em,d[1]+=u*bm,d[2]=u*Mm,d}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),c=Math.sin(this.lat0),this.sinb1=qsfnz(this.e,c)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*c*c)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function forward$j(c){var u,d,p,g,f,_,y,x,v,C,M=c.x,T=c.y;if(M=adjust_lon(M-this.long0),this.sphere){if(f=Math.sin(T),C=Math.cos(T),p=Math.cos(M),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((d=this.mode===this.EQUIT?1+C*p:1+this.sinph0*f+this.cosph0*C*p)<=gg)return null;u=(d=Math.sqrt(2/d))*C*Math.sin(M),d*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*C*p}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),Math.abs(T+this.lat0)<gg)return null;d=_g-.5*T,u=(d=2*(this.mode===this.S_POLE?Math.cos(d):Math.sin(d)))*Math.sin(M),d*=p}}else{switch(y=0,x=0,v=0,p=Math.cos(M),g=Math.sin(M),f=Math.sin(T),_=qsfnz(this.e,f),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=_/this.qp,x=Math.sqrt(1-y*y)),this.mode){case this.OBLIQ:v=1+this.sinb1*y+this.cosb1*x*p;break;case this.EQUIT:v=1+x*p;break;case this.N_POLE:v=cg+T,_=this.qp-_;break;case this.S_POLE:v=T-cg,_=this.qp+_}if(Math.abs(v)<gg)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:v=Math.sqrt(2/v),d=this.mode===this.OBLIQ?this.ymf*v*(this.cosb1*y-this.sinb1*x*p):(v=Math.sqrt(2/(1+x*p)))*y*this.ymf,u=this.xmf*v*x*g;break;case this.N_POLE:case this.S_POLE:_>=0?(u=(v=Math.sqrt(_))*g,d=p*(this.mode===this.S_POLE?v:-v)):u=d=0}}return c.x=this.a*u+this.x0,c.y=this.a*d+this.y0,c},inverse:function inverse$j(c){c.x-=this.x0,c.y-=this.y0;var u,d,p,g,f,_,y,x=c.x/this.a,v=c.y/this.a;if(this.sphere){var C,M=0,T=0;if((d=.5*(C=Math.sqrt(x*x+v*v)))>1)return null;switch(d=2*Math.asin(d),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(T=Math.sin(d),M=Math.cos(d)),this.mode){case this.EQUIT:d=Math.abs(C)<=gg?0:Math.asin(v*T/C),x*=T,v=M*C;break;case this.OBLIQ:d=Math.abs(C)<=gg?this.lat0:Math.asin(M*this.sinph0+v*T*this.cosph0/C),x*=T*this.cosph0,v=(M-Math.sin(d)*this.sinph0)*C;break;case this.N_POLE:v=-v,d=cg-d;break;case this.S_POLE:d-=cg}u=0!==v||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(x,v):0}else{if(y=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(x/=this.dd,v*=this.dd,(_=Math.sqrt(x*x+v*v))<gg)return c.x=this.long0,c.y=this.lat0,c;g=2*Math.asin(.5*_/this.rq),p=Math.cos(g),x*=g=Math.sin(g),this.mode===this.OBLIQ?(y=p*this.sinb1+v*g*this.cosb1/_,f=this.qp*y,v=_*this.cosb1*p-v*this.sinb1*g):(y=v*g/_,f=this.qp*y,v=_*p)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(v=-v),!(f=x*x+v*v))return c.x=this.long0,c.y=this.lat0,c;y=1-f/this.qp,this.mode===this.S_POLE&&(y=-y)}u=Math.atan2(x,v),d=function authlat(c,u){var d=c+c;return c+u[0]*Math.sin(d)+u[1]*Math.sin(d+d)+u[2]*Math.sin(d+d+d)}(Math.asin(y),this.apa)}return c.x=adjust_lon(this.long0+u),c.y=d,c},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function asinz(c){return Math.abs(c)>1&&(c=c>1?1:-1),Math.asin(c)}var Rm={init:function init$j(){Math.abs(this.lat1+this.lat2)<gg||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=msfnz(this.e3,this.sin_po,this.cos_po),this.qs1=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=msfnz(this.e3,this.sin_po,this.cos_po),this.qs2=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qsfnz(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>gg?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function forward$i(c){var u=c.x,d=c.y;this.sin_phi=Math.sin(d),this.cos_phi=Math.cos(d);var p=qsfnz(this.e3,this.sin_phi),g=this.a*Math.sqrt(this.c-this.ns0*p)/this.ns0,f=this.ns0*adjust_lon(u-this.long0),_=g*Math.sin(f)+this.x0,y=this.rh-g*Math.cos(f)+this.y0;return c.x=_,c.y=y,c},inverse:function inverse$i(c){var u,d,p,g,f,_;return c.x-=this.x0,c.y=this.rh-c.y+this.y0,this.ns0>=0?(u=Math.sqrt(c.x*c.x+c.y*c.y),p=1):(u=-Math.sqrt(c.x*c.x+c.y*c.y),p=-1),g=0,0!==u&&(g=Math.atan2(p*c.x,p*c.y)),p=u*this.ns0/this.a,this.sphere?_=Math.asin((this.c-p*p)/(2*this.ns0)):(d=(this.c-p*p)/this.ns0,_=this.phi1z(this.e3,d)),f=adjust_lon(g/this.ns0+this.long0),c.x=f,c.y=_,c},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function phi1z(c,u){var d,p,g,f,_=asinz(.5*u);if(c<gg)return _;for(var y=c*c,x=1;x<=25;x++)if(_+=f=.5*(g=1-(p=c*(d=Math.sin(_)))*p)*g/Math.cos(_)*(u/(1-y)-d/g+.5/c*Math.log((1-p)/(1+p))),Math.abs(f)<=1e-7)return _;return null}};var Lm={init:function init$i(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function forward$h(c){var u,d,p,g,f,_,y,x=c.x,v=c.y;return p=adjust_lon(x-this.long0),u=Math.sin(v),d=Math.cos(v),g=Math.cos(p),(f=this.sin_p14*u+this.cos_p14*d*g)>0||Math.abs(f)<=gg?(_=this.x0+1*this.a*d*Math.sin(p)/f,y=this.y0+1*this.a*(this.cos_p14*u-this.sin_p14*d*g)/f):(_=this.x0+this.infinity_dist*d*Math.sin(p),y=this.y0+this.infinity_dist*(this.cos_p14*u-this.sin_p14*d*g)),c.x=_,c.y=y,c},inverse:function inverse$h(c){var u,d,p,g,f,_;return c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,c.x/=this.k0,c.y/=this.k0,(u=Math.sqrt(c.x*c.x+c.y*c.y))?(g=Math.atan2(u,this.rc),d=Math.sin(g),_=asinz((p=Math.cos(g))*this.sin_p14+c.y*d*this.cos_p14/u),f=Math.atan2(c.x*d,u*this.cos_p14*p-c.y*this.sin_p14*d),f=adjust_lon(this.long0+f)):(_=this.phic0,f=0),c.x=f,c.y=_,c},names:["gnom"]};var Am={init:function init$h(){this.sphere||(this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function forward$g(c){var u,d,p=c.x,g=c.y,f=adjust_lon(p-this.long0);if(this.sphere)u=this.x0+this.a*f*Math.cos(this.lat_ts),d=this.y0+this.a*Math.sin(g)/Math.cos(this.lat_ts);else{var _=qsfnz(this.e,Math.sin(g));u=this.x0+this.a*this.k0*f,d=this.y0+this.a*_*.5/this.k0}return c.x=u,c.y=d,c},inverse:function inverse$g(c){var u,d;return c.x-=this.x0,c.y-=this.y0,this.sphere?(u=adjust_lon(this.long0+c.x/this.a/Math.cos(this.lat_ts)),d=Math.asin(c.y/this.a*Math.cos(this.lat_ts))):(d=function iqsfnz(c,u){var d=1-(1-c*c)/(2*c)*Math.log((1-c)/(1+c));if(Math.abs(Math.abs(u)-d)<1e-6)return u<0?-1*cg:cg;for(var p,g,f,_,y=Math.asin(.5*u),x=0;x<30;x++)if(g=Math.sin(y),f=Math.cos(y),_=c*g,y+=p=Math.pow(1-_*_,2)/(2*f)*(u/(1-c*c)-g/(1-_*_)+.5/c*Math.log((1-_)/(1+_))),Math.abs(p)<=1e-10)return y;return NaN}(this.e,2*c.y*this.k0/this.a),u=adjust_lon(this.long0+c.x/(this.a*this.k0))),c.x=u,c.y=d,c},names:["cea"]};var Im={init:function init$g(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function forward$f(c){var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=adjust_lat(d-this.lat0);return c.x=this.x0+this.a*p*this.rc,c.y=this.y0+this.a*g,c},inverse:function inverse$f(c){var u=c.x,d=c.y;return c.x=adjust_lon(this.long0+(u-this.x0)/(this.a*this.rc)),c.y=adjust_lat(this.lat0+(d-this.y0)/this.a),c},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Fm={init:function init$f(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function forward$e(c){var u,d,p,g=c.x,f=c.y,_=adjust_lon(g-this.long0);if(p=_*Math.sin(f),this.sphere)Math.abs(f)<=gg?(u=this.a*_,d=-1*this.a*this.lat0):(u=this.a*Math.sin(p)/Math.tan(f),d=this.a*(adjust_lat(f-this.lat0)+(1-Math.cos(p))/Math.tan(f)));else if(Math.abs(f)<=gg)u=this.a*_,d=-1*this.ml0;else{var y=gN(this.a,this.e,Math.sin(f))/Math.tan(f);u=y*Math.sin(p),d=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,f)-this.ml0+y*(1-Math.cos(p))}return c.x=u+this.x0,c.y=d+this.y0,c},inverse:function inverse$e(c){var u,d,p,g,f,_,y,x,v;if(p=c.x-this.x0,g=c.y-this.y0,this.sphere)if(Math.abs(g+this.a*this.lat0)<=gg)u=adjust_lon(p/this.a+this.long0),d=0;else{var C;for(_=this.lat0+g/this.a,y=p*p/this.a/this.a+_*_,x=_,f=20;f;--f)if(x+=v=-1*(_*(x*(C=Math.tan(x))+1)-x-.5*(x*x+y)*C)/((x-_)/C-1),Math.abs(v)<=gg){d=x;break}u=adjust_lon(this.long0+Math.asin(p*Math.tan(x)/this.a)/Math.sin(d))}else if(Math.abs(g+this.ml0)<=gg)d=0,u=adjust_lon(this.long0+p/this.a);else{var M,T,L,A,I;for(_=(this.ml0+g)/this.a,y=p*p/this.a/this.a+_*_,x=_,f=20;f;--f)if(I=this.e*Math.sin(x),M=Math.sqrt(1-I*I)*Math.tan(x),T=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,x),L=this.e0-2*this.e1*Math.cos(2*x)+4*this.e2*Math.cos(4*x)-6*this.e3*Math.cos(6*x),x-=v=(_*(M*(A=T/this.a)+1)-A-.5*M*(A*A+y))/(this.es*Math.sin(2*x)*(A*A+y-2*_*A)/(4*M)+(_-A)*(M*L-2/Math.sin(2*x))-L),Math.abs(v)<=gg){d=x;break}M=Math.sqrt(1-this.es*Math.pow(Math.sin(d),2))*Math.tan(d),u=adjust_lon(this.long0+Math.asin(p*M/this.a)/Math.sin(d))}return c.x=u,c.y=d,c},names:["Polyconic","poly"]};var km={init:function init$e(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function forward$d(c){var u,d=c.x,p=c.y-this.lat0,g=d-this.long0,f=p/hg*1e-5,_=g,y=1,x=0;for(u=1;u<=10;u++)y*=f,x+=this.A[u]*y;var v,C=x,M=_,T=1,L=0,A=0,I=0;for(u=1;u<=6;u++)v=L*C+T*M,T=T*C-L*M,L=v,A=A+this.B_re[u]*T-this.B_im[u]*L,I=I+this.B_im[u]*T+this.B_re[u]*L;return c.x=I*this.a+this.x0,c.y=A*this.a+this.y0,c},inverse:function inverse$d(c){var u,d,p=c.x,g=c.y,f=p-this.x0,_=(g-this.y0)/this.a,y=f/this.a,x=1,v=0,C=0,M=0;for(u=1;u<=6;u++)d=v*_+x*y,x=x*_-v*y,v=d,C=C+this.C_re[u]*x-this.C_im[u]*v,M=M+this.C_im[u]*x+this.C_re[u]*v;for(var T=0;T<this.iterations;T++){var L,A=C,I=M,k=_,O=y;for(u=2;u<=6;u++)L=I*C+A*M,A=A*C-I*M,I=L,k+=(u-1)*(this.B_re[u]*A-this.B_im[u]*I),O+=(u-1)*(this.B_im[u]*A+this.B_re[u]*I);A=1,I=0;var N=this.B_re[1],G=this.B_im[1];for(u=2;u<=6;u++)L=I*C+A*M,A=A*C-I*M,I=L,N+=u*(this.B_re[u]*A-this.B_im[u]*I),G+=u*(this.B_im[u]*A+this.B_re[u]*I);var j=N*N+G*G;C=(k*N+O*G)/j,M=(O*N-k*G)/j}var B=C,V=M,q=1,Z=0;for(u=1;u<=9;u++)q*=B,Z+=this.D[u]*q;var K=this.lat0+Z*hg*1e5,J=this.long0+V;return c.x=J,c.y=K,c},names:["New_Zealand_Map_Grid","nzmg"]};var Om={init:function init$d(){},forward:function forward$c(c){var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=this.x0+this.a*p,f=this.y0+this.a*Math.log(Math.tan(Math.PI/4+d/2.5))*1.25;return c.x=g,c.y=f,c},inverse:function inverse$c(c){c.x-=this.x0,c.y-=this.y0;var u=adjust_lon(this.long0+c.x/this.a),d=2.5*(Math.atan(Math.exp(.8*c.y/this.a))-Math.PI/4);return c.x=u,c.y=d,c},names:["Miller_Cylindrical","mill"]};var Nm={init:function init$c(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=pj_enfn(this.es)},forward:function forward$b(c){var u,d,p=c.x,g=c.y;if(p=adjust_lon(p-this.long0),this.sphere){if(this.m)for(var f=this.n*Math.sin(g),_=20;_;--_){var y=(this.m*g+Math.sin(g)-f)/(this.m+Math.cos(g));if(g-=y,Math.abs(y)<gg)break}else g=1!==this.n?Math.asin(this.n*Math.sin(g)):g;u=this.a*this.C_x*p*(this.m+Math.cos(g)),d=this.a*this.C_y*g}else{var x=Math.sin(g),v=Math.cos(g);d=this.a*pj_mlfn(g,x,v,this.en),u=this.a*p*v/Math.sqrt(1-this.es*x*x)}return c.x=u,c.y=d,c},inverse:function inverse$b(c){var u,d,p;return c.x-=this.x0,d=c.x/this.a,c.y-=this.y0,u=c.y/this.a,this.sphere?(u/=this.C_y,d/=this.C_x*(this.m+Math.cos(u)),this.m?u=asinz((this.m*u+Math.sin(u))/this.n):1!==this.n&&(u=asinz(Math.sin(u)/this.n)),d=adjust_lon(d+this.long0),u=adjust_lat(u)):(u=pj_inv_mlfn(c.y/this.a,this.es,this.en),(p=Math.abs(u))<cg?(p=Math.sin(u),d=adjust_lon(this.long0+c.x*Math.sqrt(1-this.es*p*p)/(this.a*Math.cos(u)))):p-gg<cg&&(d=this.long0)),c.x=d,c.y=u,c},names:["Sinusoidal","sinu"]};var Dm={init:function init$b(){},forward:function forward$a(c){for(var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=d,f=Math.PI*Math.sin(d);;){var _=-(g+Math.sin(g)-f)/(1+Math.cos(g));if(g+=_,Math.abs(_)<gg)break}g/=2,Math.PI/2-Math.abs(d)<gg&&(p=0);var y=.900316316158*this.a*p*Math.cos(g)+this.x0,x=1.4142135623731*this.a*Math.sin(g)+this.y0;return c.x=y,c.y=x,c},inverse:function inverse$a(c){var u,d;c.x-=this.x0,c.y-=this.y0,d=c.y/(1.4142135623731*this.a),Math.abs(d)>.999999999999&&(d=.999999999999),u=Math.asin(d);var p=adjust_lon(this.long0+c.x/(.900316316158*this.a*Math.cos(u)));p<-Math.PI&&(p=-Math.PI),p>Math.PI&&(p=Math.PI),d=(2*u+Math.sin(2*u))/Math.PI,Math.abs(d)>1&&(d=1);var g=Math.asin(d);return c.x=p,c.y=g,c},names:["Mollweide","moll"]};var Gm={init:function init$a(){Math.abs(this.lat1+this.lat2)<gg||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=msfnz(this.e,this.sinphi,this.cosphi),this.ml1=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<gg?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=msfnz(this.e,this.sinphi,this.cosphi),this.ml2=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function forward$9(c){var u,d=c.x,p=c.y;if(this.sphere)u=this.a*(this.g-p);else{var g=mlfn(this.e0,this.e1,this.e2,this.e3,p);u=this.a*(this.g-g)}var f=this.ns*adjust_lon(d-this.long0),_=this.x0+u*Math.sin(f),y=this.y0+this.rh-u*Math.cos(f);return c.x=_,c.y=y,c},inverse:function inverse$9(c){var u,d,p,g;c.x-=this.x0,c.y=this.rh-c.y+this.y0,this.ns>=0?(d=Math.sqrt(c.x*c.x+c.y*c.y),u=1):(d=-Math.sqrt(c.x*c.x+c.y*c.y),u=-1);var f=0;return 0!==d&&(f=Math.atan2(u*c.x,u*c.y)),this.sphere?(g=adjust_lon(this.long0+f/this.ns),p=adjust_lat(this.g-d/this.a),c.x=g,c.y=p,c):(p=imlfn(this.g-d/this.a,this.e0,this.e1,this.e2,this.e3),g=adjust_lon(this.long0+f/this.ns),c.x=g,c.y=p,c)},names:["Equidistant_Conic","eqdc"]};var jm={init:function init$9(){this.R=this.a},forward:function forward$8(c){var u,d,p=c.x,g=c.y,f=adjust_lon(p-this.long0);Math.abs(g)<=gg&&(u=this.x0+this.R*f,d=this.y0);var _=asinz(2*Math.abs(g/Math.PI));(Math.abs(f)<=gg||Math.abs(Math.abs(g)-cg)<=gg)&&(u=this.x0,d=g>=0?this.y0+Math.PI*this.R*Math.tan(.5*_):this.y0+Math.PI*this.R*-Math.tan(.5*_));var y=.5*Math.abs(Math.PI/f-f/Math.PI),x=y*y,v=Math.sin(_),C=Math.cos(_),M=C/(v+C-1),T=M*M,L=M*(2/v-1),A=L*L,I=Math.PI*this.R*(y*(M-A)+Math.sqrt(x*(M-A)*(M-A)-(A+x)*(T-A)))/(A+x);f<0&&(I=-I),u=this.x0+I;var k=x+M;return I=Math.PI*this.R*(L*k-y*Math.sqrt((A+x)*(x+1)-k*k))/(A+x),d=g>=0?this.y0+I:this.y0-I,c.x=u,c.y=d,c},inverse:function inverse$8(c){var u,d,p,g,f,_,y,x,v,C,M,T;return c.x-=this.x0,c.y-=this.y0,M=Math.PI*this.R,f=(p=c.x/M)*p+(g=c.y/M)*g,M=3*(g*g/(x=-2*(_=-Math.abs(g)*(1+f))+1+2*g*g+f*f)+(2*(y=_-2*g*g+p*p)*y*y/x/x/x-9*_*y/x/x)/27)/(v=(_-y*y/3/x)/x)/(C=2*Math.sqrt(-v/3)),Math.abs(M)>1&&(M=M>=0?1:-1),T=Math.acos(M)/3,d=c.y>=0?(-C*Math.cos(T+Math.PI/3)-y/3/x)*Math.PI:-(-C*Math.cos(T+Math.PI/3)-y/3/x)*Math.PI,u=Math.abs(p)<gg?this.long0:adjust_lon(this.long0+Math.PI*(f-1+Math.sqrt(1+2*(p*p-g*g)+f*f))/2/p),c.x=u,c.y=d,c},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var zm={init:function init$8(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function forward$7(c){var u,d,p,g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G,j,B,V,q=c.x,Z=c.y,K=Math.sin(c.y),J=Math.cos(c.y),ct=adjust_lon(q-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=gg?(c.x=this.x0+this.a*(cg-Z)*Math.sin(ct),c.y=this.y0-this.a*(cg-Z)*Math.cos(ct),c):Math.abs(this.sin_p12+1)<=gg?(c.x=this.x0+this.a*(cg+Z)*Math.sin(ct),c.y=this.y0+this.a*(cg+Z)*Math.cos(ct),c):(N=this.sin_p12*K+this.cos_p12*J*Math.cos(ct),O=(k=Math.acos(N))?k/Math.sin(k):1,c.x=this.x0+this.a*O*J*Math.sin(ct),c.y=this.y0+this.a*O*(this.cos_p12*K-this.sin_p12*J*Math.cos(ct)),c):(u=e0fn(this.es),d=e1fn(this.es),p=e2fn(this.es),g=e3fn(this.es),Math.abs(this.sin_p12-1)<=gg?(f=this.a*mlfn(u,d,p,g,cg),_=this.a*mlfn(u,d,p,g,Z),c.x=this.x0+(f-_)*Math.sin(ct),c.y=this.y0-(f-_)*Math.cos(ct),c):Math.abs(this.sin_p12+1)<=gg?(f=this.a*mlfn(u,d,p,g,cg),_=this.a*mlfn(u,d,p,g,Z),c.x=this.x0+(f+_)*Math.sin(ct),c.y=this.y0+(f+_)*Math.cos(ct),c):(y=K/J,x=gN(this.a,this.e,this.sin_p12),v=gN(this.a,this.e,K),C=Math.atan((1-this.es)*y+this.es*x*this.sin_p12/(v*J)),G=0===(M=Math.atan2(Math.sin(ct),this.cos_p12*Math.tan(C)-this.sin_p12*Math.cos(ct)))?Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):Math.abs(Math.abs(M)-Math.PI)<=gg?-Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):Math.asin(Math.sin(ct)*Math.cos(C)/Math.sin(M)),T=this.e*this.sin_p12/Math.sqrt(1-this.es),k=x*G*(1-(j=G*G)*(I=(L=this.e*this.cos_p12*Math.cos(M)/Math.sqrt(1-this.es))*L)*(1-I)/6+(B=j*G)/8*(A=T*L)*(1-2*I)+(V=B*G)/120*(I*(4-7*I)-3*T*T*(1-7*I))-V*G/48*A),c.x=this.x0+k*Math.sin(M),c.y=this.y0+k*Math.cos(M),c))},inverse:function inverse$7(c){var u,d,p,g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G,j,B,V,q;if(c.x-=this.x0,c.y-=this.y0,this.sphere){if((u=Math.sqrt(c.x*c.x+c.y*c.y))>2*cg*this.a)return;return d=u/this.a,p=Math.sin(d),g=Math.cos(d),f=this.long0,Math.abs(u)<=gg?_=this.lat0:(_=asinz(g*this.sin_p12+c.y*p*this.cos_p12/u),y=Math.abs(this.lat0)-cg,f=Math.abs(y)<=gg?this.lat0>=0?adjust_lon(this.long0+Math.atan2(c.x,-c.y)):adjust_lon(this.long0-Math.atan2(-c.x,c.y)):adjust_lon(this.long0+Math.atan2(c.x*p,u*this.cos_p12*g-c.y*this.sin_p12*p))),c.x=f,c.y=_,c}return x=e0fn(this.es),v=e1fn(this.es),C=e2fn(this.es),M=e3fn(this.es),Math.abs(this.sin_p12-1)<=gg?(_=imlfn(((T=this.a*mlfn(x,v,C,M,cg))-(u=Math.sqrt(c.x*c.x+c.y*c.y)))/this.a,x,v,C,M),f=adjust_lon(this.long0+Math.atan2(c.x,-1*c.y)),c.x=f,c.y=_,c):Math.abs(this.sin_p12+1)<=gg?(T=this.a*mlfn(x,v,C,M,cg),_=imlfn(((u=Math.sqrt(c.x*c.x+c.y*c.y))-T)/this.a,x,v,C,M),f=adjust_lon(this.long0+Math.atan2(c.x,c.y)),c.x=f,c.y=_,c):(u=Math.sqrt(c.x*c.x+c.y*c.y),I=Math.atan2(c.x,c.y),L=gN(this.a,this.e,this.sin_p12),k=Math.cos(I),N=-(O=this.e*this.cos_p12*k)*O/(1-this.es),G=3*this.es*(1-N)*this.sin_p12*this.cos_p12*k/(1-this.es),V=1-N*(B=(j=u/L)-N*(1+N)*Math.pow(j,3)/6-G*(1+3*N)*Math.pow(j,4)/24)*B/2-j*B*B*B/6,A=Math.asin(this.sin_p12*Math.cos(B)+this.cos_p12*Math.sin(B)*k),f=adjust_lon(this.long0+Math.asin(Math.sin(I)*Math.sin(B)/Math.cos(A))),q=Math.sin(A),_=Math.atan2((q-this.es*V*this.sin_p12)*Math.tan(A),q*(1-this.es)),c.x=f,c.y=_,c)},names:["Azimuthal_Equidistant","aeqd"]};var Bm={init:function init$7(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function forward$6(c){var u,d,p,g,f,_,y,x=c.x,v=c.y;return p=adjust_lon(x-this.long0),u=Math.sin(v),d=Math.cos(v),g=Math.cos(p),((f=this.sin_p14*u+this.cos_p14*d*g)>0||Math.abs(f)<=gg)&&(_=1*this.a*d*Math.sin(p),y=this.y0+1*this.a*(this.cos_p14*u-this.sin_p14*d*g)),c.x=_,c.y=y,c},inverse:function inverse$6(c){var u,d,p,g,f,_,y;return c.x-=this.x0,c.y-=this.y0,d=asinz((u=Math.sqrt(c.x*c.x+c.y*c.y))/this.a),p=Math.sin(d),g=Math.cos(d),_=this.long0,Math.abs(u)<=gg?(y=this.lat0,c.x=_,c.y=y,c):(y=asinz(g*this.sin_p14+c.y*p*this.cos_p14/u),f=Math.abs(this.lat0)-cg,Math.abs(f)<=gg?(_=this.lat0>=0?adjust_lon(this.long0+Math.atan2(c.x,-c.y)):adjust_lon(this.long0-Math.atan2(-c.x,c.y)),c.x=_,c.y=y,c):(_=adjust_lon(this.long0+Math.atan2(c.x*p,u*this.cos_p14*g-c.y*this.sin_p14*p)),c.x=_,c.y=y,c))},names:["ortho"]},Um=1,$m=2,Wm=3,Xm=4,Vm=5,qm=6,Ym={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function qsc_fwd_equat_face_theta(c,u,d,p){var g;return c<gg?(p.value=Ym.AREA_0,g=0):(g=Math.atan2(u,d),Math.abs(g)<=_g?p.value=Ym.AREA_0:g>_g&&g<=cg+_g?(p.value=Ym.AREA_1,g-=cg):g>cg+_g||g<=-(cg+_g)?(p.value=Ym.AREA_2,g=g>=0?g-xg:g+xg):(p.value=Ym.AREA_3,g+=cg)),g}function qsc_shift_lon_origin(c,u){var d=c+u;return d<-xg?d+=yg:d>+xg&&(d-=yg),d}var Zm={init:function init$6(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=cg-_g/2?this.face=Vm:this.lat0<=-(cg-_g/2)?this.face=qm:Math.abs(this.long0)<=_g?this.face=Um:Math.abs(this.long0)<=cg+_g?this.face=this.long0>0?$m:Xm:this.face=Wm,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function forward$5(c){var u,d,p,g,f,_,y={x:0,y:0},x={value:0};if(c.x-=this.long0,u=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(c.y)):c.y,d=c.x,this.face===Vm)g=cg-u,d>=_g&&d<=cg+_g?(x.value=Ym.AREA_0,p=d-cg):d>cg+_g||d<=-(cg+_g)?(x.value=Ym.AREA_1,p=d>0?d-xg:d+xg):d>-(cg+_g)&&d<=-_g?(x.value=Ym.AREA_2,p=d+cg):(x.value=Ym.AREA_3,p=d);else if(this.face===qm)g=cg+u,d>=_g&&d<=cg+_g?(x.value=Ym.AREA_0,p=-d+cg):d<_g&&d>=-_g?(x.value=Ym.AREA_1,p=-d):d<-_g&&d>=-(cg+_g)?(x.value=Ym.AREA_2,p=-d-cg):(x.value=Ym.AREA_3,p=d>0?-d+xg:-d-xg);else{var v,C,M,T,L,A;this.face===$m?d=qsc_shift_lon_origin(d,+cg):this.face===Wm?d=qsc_shift_lon_origin(d,+xg):this.face===Xm&&(d=qsc_shift_lon_origin(d,-cg)),T=Math.sin(u),L=Math.cos(u),A=Math.sin(d),v=L*Math.cos(d),C=L*A,M=T,this.face===Um?p=qsc_fwd_equat_face_theta(g=Math.acos(v),M,C,x):this.face===$m?p=qsc_fwd_equat_face_theta(g=Math.acos(C),M,-v,x):this.face===Wm?p=qsc_fwd_equat_face_theta(g=Math.acos(-v),M,-C,x):this.face===Xm?p=qsc_fwd_equat_face_theta(g=Math.acos(-C),M,v,x):(g=p=0,x.value=Ym.AREA_0)}return _=Math.atan(12/xg*(p+Math.acos(Math.sin(p)*Math.cos(_g))-cg)),f=Math.sqrt((1-Math.cos(g))/(Math.cos(_)*Math.cos(_))/(1-Math.cos(Math.atan(1/Math.cos(p))))),x.value===Ym.AREA_1?_+=cg:x.value===Ym.AREA_2?_+=xg:x.value===Ym.AREA_3&&(_+=1.5*xg),y.x=f*Math.cos(_),y.y=f*Math.sin(_),y.x=y.x*this.a+this.x0,y.y=y.y*this.a+this.y0,c.x=y.x,c.y=y.y,c},inverse:function inverse$5(c){var u,d,p,g,f,_,y,x,v,C,M,T,L={lam:0,phi:0},A={value:0};if(c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,d=Math.atan(Math.sqrt(c.x*c.x+c.y*c.y)),u=Math.atan2(c.y,c.x),c.x>=0&&c.x>=Math.abs(c.y)?A.value=Ym.AREA_0:c.y>=0&&c.y>=Math.abs(c.x)?(A.value=Ym.AREA_1,u-=cg):c.x<0&&-c.x>=Math.abs(c.y)?(A.value=Ym.AREA_2,u=u<0?u+xg:u-xg):(A.value=Ym.AREA_3,u+=cg),v=xg/12*Math.tan(u),f=Math.sin(v)/(Math.cos(v)-1/Math.sqrt(2)),_=Math.atan(f),(y=1-(p=Math.cos(u))*p*(g=Math.tan(d))*g*(1-Math.cos(Math.atan(1/Math.cos(_)))))<-1?y=-1:y>1&&(y=1),this.face===Vm)x=Math.acos(y),L.phi=cg-x,A.value===Ym.AREA_0?L.lam=_+cg:A.value===Ym.AREA_1?L.lam=_<0?_+xg:_-xg:A.value===Ym.AREA_2?L.lam=_-cg:L.lam=_;else if(this.face===qm)x=Math.acos(y),L.phi=x-cg,A.value===Ym.AREA_0?L.lam=-_+cg:A.value===Ym.AREA_1?L.lam=-_:A.value===Ym.AREA_2?L.lam=-_-cg:L.lam=_<0?-_-xg:-_+xg;else{var I,k,O;v=(I=y)*I,k=(v+=(O=v>=1?0:Math.sqrt(1-v)*Math.sin(_))*O)>=1?0:Math.sqrt(1-v),A.value===Ym.AREA_1?(v=k,k=-O,O=v):A.value===Ym.AREA_2?(k=-k,O=-O):A.value===Ym.AREA_3&&(v=k,k=O,O=-v),this.face===$m?(v=I,I=-k,k=v):this.face===Wm?(I=-I,k=-k):this.face===Xm&&(v=I,I=k,k=-v),L.phi=Math.acos(-O)-cg,L.lam=Math.atan2(k,I),this.face===$m?L.lam=qsc_shift_lon_origin(L.lam,-cg):this.face===Wm?L.lam=qsc_shift_lon_origin(L.lam,-xg):this.face===Xm&&(L.lam=qsc_shift_lon_origin(L.lam,+cg))}return 0!==this.es&&(C=L.phi<0?1:0,M=Math.tan(L.phi),T=this.b/Math.sqrt(M*M+this.one_minus_f_squared),L.phi=Math.atan(Math.sqrt(this.a*this.a-T*T)/(this.one_minus_f*T)),C&&(L.phi=-L.phi)),L.lam+=this.long0,c.x=L.lam,c.y=L.phi,c},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Km=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Hm=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Jm=.8487,Qm=1.3523,tf=fg/5,ef=1/tf,rf=18,poly3_val=function(c,u){return c[0]+u*(c[1]+u*(c[2]+u*c[3]))};var nf={init:function init$5(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function forward$4(c){var u=adjust_lon(c.x-this.long0),d=Math.abs(c.y),p=Math.floor(d*tf);p<0?p=0:p>=rf&&(p=17);var g={x:poly3_val(Km[p],d=fg*(d-ef*p))*u,y:poly3_val(Hm[p],d)};return c.y<0&&(g.y=-g.y),g.x=g.x*this.a*Jm+this.x0,g.y=g.y*this.a*Qm+this.y0,g},inverse:function inverse$4(c){var u={x:(c.x-this.x0)/(this.a*Jm),y:Math.abs(c.y-this.y0)/(this.a*Qm)};if(u.y>=1)u.x/=Km[18][0],u.y=c.y<0?-cg:cg;else{var d=Math.floor(u.y*rf);for(d<0?d=0:d>=rf&&(d=17);;)if(Hm[d][0]>u.y)--d;else{if(!(Hm[d+1][0]<=u.y))break;++d}var p=Hm[d],g=5*(u.y-p[0])/(Hm[d+1][0]-p[0]);g=function newton_rapshon(c,u,d,p){for(var g=u;p;--p){var f=c(g);if(g-=f,Math.abs(f)<d)break}return g}((function(c){return(poly3_val(p,c)-u.y)/function(c,u){return c[1]+u*(2*c[2]+3*u*c[3])}(p,c)}),g,gg,100),u.x/=poly3_val(Km[d],g),u.y=(5*d+g)*mg,c.y<0&&(u.y=-u.y)}return u.x=adjust_lon(u.x+this.long0),u},names:["Robinson","robin"]};var sf={init:function init$4(){this.name="geocent"},forward:function forward$3(c){return geodeticToGeocentric(c,this.es,this.a)},inverse:function inverse$3(c){return geocentricToGeodetic(c,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},of=0,af=1,lf=2,hf=3,cf={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};var uf={init:function init$3(){if(Object.keys(cf).forEach(function(c){if(void 0===this[c])this[c]=cf[c].def;else{if(cf[c].num&&isNaN(this[c]))throw new Error("Invalid parameter value, must be numeric "+c+" = "+this[c]);cf[c].num&&(this[c]=parseFloat(this[c]))}cf[c].degrees&&(this[c]=this[c]*mg)}.bind(this)),Math.abs(Math.abs(this.lat0)-cg)<gg?this.mode=this.lat0<0?af:of:Math.abs(this.lat0)<gg?this.mode=lf:(this.mode=hf,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var c=this.tilt,u=this.azi;this.cg=Math.cos(u),this.sg=Math.sin(u),this.cw=Math.cos(c),this.sw=Math.sin(c)},forward:function forward$2(c){c.x-=this.long0;var u,d,p,g,f=Math.sin(c.y),_=Math.cos(c.y),y=Math.cos(c.x);switch(this.mode){case hf:d=this.sinph0*f+this.cosph0*_*y;break;case lf:d=_*y;break;case af:d=-f;break;case of:d=f}switch(u=(d=this.pn1/(this.p-d))*_*Math.sin(c.x),this.mode){case hf:d*=this.cosph0*f-this.sinph0*_*y;break;case lf:d*=f;break;case of:d*=-_*y;break;case af:d*=_*y}return g=1/((p=d*this.cg+u*this.sg)*this.sw*this.h1+this.cw),u=(u*this.cg-d*this.sg)*this.cw*g,d=p*g,c.x=u*this.a,c.y=d*this.a,c},inverse:function inverse$2(c){c.x/=this.a,c.y/=this.a;var u,d,p,g={x:c.x,y:c.y};p=1/(this.pn1-c.y*this.sw),u=this.pn1*c.x*p,d=this.pn1*c.y*this.cw*p,c.x=u*this.cg+d*this.sg,c.y=d*this.cg-u*this.sg;var f=hypot(c.x,c.y);if(Math.abs(f)<gg)g.x=0,g.y=c.y;else{var _,y;switch(y=1-f*f*this.pfact,y=(this.p-Math.sqrt(y))/(this.pn1/f+f/this.pn1),_=Math.sqrt(1-y*y),this.mode){case hf:g.y=Math.asin(_*this.sinph0+c.y*y*this.cosph0/f),c.y=(_-this.sinph0*Math.sin(g.y))*f,c.x*=y*this.cosph0;break;case lf:g.y=Math.asin(c.y*y/f),c.y=_*f,c.x*=y;break;case of:g.y=Math.asin(_),c.y=-c.y;break;case af:g.y=-Math.asin(_)}g.x=Math.atan2(c.x,c.y)}return c.x=g.x+this.long0,c.y=g.y,c},names:["Tilted_Perspective","tpers"]};var df={init:function init$2(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var c=1-this.es,u=1/c;this.radius_p=Math.sqrt(c),this.radius_p2=c,this.radius_p_inv2=u,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function forward$1(c){var u,d,p,g,f=c.x,_=c.y;if(f-=this.long0,"ellipse"===this.shape){_=Math.atan(this.radius_p2*Math.tan(_));var y=this.radius_p/hypot(this.radius_p*Math.cos(_),Math.sin(_));if(d=y*Math.cos(f)*Math.cos(_),p=y*Math.sin(f)*Math.cos(_),g=y*Math.sin(_),(this.radius_g-d)*d-p*p-g*g*this.radius_p_inv2<0)return c.x=Number.NaN,c.y=Number.NaN,c;u=this.radius_g-d,this.flip_axis?(c.x=this.radius_g_1*Math.atan(p/hypot(g,u)),c.y=this.radius_g_1*Math.atan(g/u)):(c.x=this.radius_g_1*Math.atan(p/u),c.y=this.radius_g_1*Math.atan(g/hypot(p,u)))}else"sphere"===this.shape&&(u=Math.cos(_),d=Math.cos(f)*u,p=Math.sin(f)*u,g=Math.sin(_),u=this.radius_g-d,this.flip_axis?(c.x=this.radius_g_1*Math.atan(p/hypot(g,u)),c.y=this.radius_g_1*Math.atan(g/u)):(c.x=this.radius_g_1*Math.atan(p/u),c.y=this.radius_g_1*Math.atan(g/hypot(p,u))));return c.x=c.x*this.a,c.y=c.y*this.a,c},inverse:function inverse$1(c){var u,d,p,g,f=-1,_=0,y=0;if(c.x=c.x/this.a,c.y=c.y/this.a,"ellipse"===this.shape){this.flip_axis?(y=Math.tan(c.y/this.radius_g_1),_=Math.tan(c.x/this.radius_g_1)*hypot(1,y)):(_=Math.tan(c.x/this.radius_g_1),y=Math.tan(c.y/this.radius_g_1)*hypot(1,_));var x=y/this.radius_p;if(u=_*_+x*x+f*f,(p=(d=2*this.radius_g*f)*d-4*u*this.C)<0)return c.x=Number.NaN,c.y=Number.NaN,c;g=(-d-Math.sqrt(p))/(2*u),f=this.radius_g+g*f,_*=g,y*=g,c.x=Math.atan2(_,f),c.y=Math.atan(y*Math.cos(c.x)/f),c.y=Math.atan(this.radius_p_inv2*Math.tan(c.y))}else if("sphere"===this.shape){if(this.flip_axis?(y=Math.tan(c.y/this.radius_g_1),_=Math.tan(c.x/this.radius_g_1)*Math.sqrt(1+y*y)):(_=Math.tan(c.x/this.radius_g_1),y=Math.tan(c.y/this.radius_g_1)*Math.sqrt(1+_*_)),u=_*_+y*y+f*f,(p=(d=2*this.radius_g*f)*d-4*u*this.C)<0)return c.x=Number.NaN,c.y=Number.NaN,c;g=(-d-Math.sqrt(p))/(2*u),f=this.radius_g+g*f,_*=g,y*=g,c.x=Math.atan2(_,f),c.y=Math.atan(y*Math.cos(c.x)/f)}return c.x=c.x+this.long0,c},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},pf=1.340264,gf=-.081106,mf=893e-6,ff=.003796,_f=Math.sqrt(3)/2;var yf={init:function init$1(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function forward(c){var u=adjust_lon(c.x-this.long0),d=c.y,p=Math.asin(_f*Math.sin(d)),g=p*p,f=g*g*g;return c.x=u*Math.cos(p)/(_f*(pf+3*gf*g+f*(7*mf+9*ff*g))),c.y=p*(pf+gf*g+f*(mf+ff*g)),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function inverse(c){c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a;var u,d,p,g,f=c.y;for(g=0;g<12&&(f-=p=(f*(pf+gf*(u=f*f)+(d=u*u*u)*(mf+ff*u))-c.y)/(pf+3*gf*u+d*(7*mf+9*ff*u)),!(Math.abs(p)<1e-9));++g);return d=(u=f*f)*u*u,c.x=_f*c.x*(pf+3*gf*u+d*(7*mf+9*ff*u))/Math.cos(f),c.y=Math.asin(Math.sin(f)/_f),c.x=adjust_lon(c.x+this.long0),c},names:["eqearth","Equal Earth","Equal_Earth"]},xf=1e-10;function e_fwd(c){var u,d,p,g=adjust_lon(c.x-(this.long0||0)),f=c.y;return u=this.am1+this.m1-pj_mlfn(f,d=Math.sin(f),p=Math.cos(f),this.en),d=p*g/(u*Math.sqrt(1-this.es*d*d)),c.x=u*Math.sin(d),c.y=this.am1-u*Math.cos(d),c.x=this.a*c.x+(this.x0||0),c.y=this.a*c.y+(this.y0||0),c}function e_inv(c){var u,d,p,g;if(c.x=(c.x-(this.x0||0))/this.a,c.y=(c.y-(this.y0||0))/this.a,d=hypot(c.x,c.y=this.am1-c.y),g=pj_inv_mlfn(this.am1+this.m1-d,this.es,this.en),(u=Math.abs(g))<cg)u=Math.sin(g),p=d*Math.atan2(c.x,c.y)*Math.sqrt(1-this.es*u*u)/Math.cos(g);else{if(!(Math.abs(u-cg)<=xf))throw new Error;p=0}return c.x=adjust_lon(p+(this.long0||0)),c.y=adjust_lat(g),c}function s_fwd(c){var u,d,p=adjust_lon(c.x-(this.long0||0)),g=c.y;return d=this.cphi1+this.phi1-g,Math.abs(d)>xf?(c.x=d*Math.sin(u=p*Math.cos(g)/d),c.y=this.cphi1-d*Math.cos(u)):c.x=c.y=0,c.x=this.a*c.x+(this.x0||0),c.y=this.a*c.y+(this.y0||0),c}function s_inv(c){var u,d;c.x=(c.x-(this.x0||0))/this.a,c.y=(c.y-(this.y0||0))/this.a;var p=hypot(c.x,c.y=this.cphi1-c.y);if(d=this.cphi1+this.phi1-p,Math.abs(d)>cg)throw new Error;return u=Math.abs(Math.abs(d)-cg)<=xf?0:p*Math.atan2(c.x,c.y)/Math.cos(d),c.x=adjust_lon(u+(this.long0||0)),c.y=adjust_lat(d),c}var vf={init:function init(){var c;if(this.phi1=this.lat1,Math.abs(this.phi1)<xf)throw new Error;this.es?(this.en=pj_enfn(this.es),this.m1=pj_mlfn(this.phi1,this.am1=Math.sin(this.phi1),c=Math.cos(this.phi1),this.en),this.am1=c/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=e_inv,this.forward=e_fwd):(Math.abs(this.phi1)+xf>=cg?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=s_inv,this.forward=s_fwd)},names:["bonne","Bonne (Werner lat_1=90)"]};proj4.defaultDatum="WGS84",proj4.Proj=Projection,proj4.WGS84=new proj4.Proj("WGS84"),proj4.Point=Point,proj4.toPoint=common,proj4.defs=defs,proj4.nadgrid=function nadgrid(c,u){var d=new DataView(u),p=function detectLittleEndian(c){var u=c.getInt32(8,!1);if(11===u)return!1;u=c.getInt32(8,!0),11!==u&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(d),g=function readHeader(c,u){return{nFields:c.getInt32(8,u),nSubgridFields:c.getInt32(24,u),nSubgrids:c.getInt32(40,u),shiftType:decodeString(c,56,64).trim(),fromSemiMajorAxis:c.getFloat64(120,u),fromSemiMinorAxis:c.getFloat64(136,u),toSemiMajorAxis:c.getFloat64(152,u),toSemiMinorAxis:c.getFloat64(168,u)}}(d,p),f=function readSubgrids(c,u,d){for(var p=176,g=[],f=0;f<u.nSubgrids;f++){var _=readGridHeader(c,p,d),y=readGridNodes(c,p,_,d),x=Math.round(1+(_.upperLongitude-_.lowerLongitude)/_.longitudeInterval),v=Math.round(1+(_.upperLatitude-_.lowerLatitude)/_.latitudeInterval);g.push({ll:[secondsToRadians(_.lowerLongitude),secondsToRadians(_.lowerLatitude)],del:[secondsToRadians(_.longitudeInterval),secondsToRadians(_.latitudeInterval)],lim:[x,v],count:_.gridNodeCount,cvs:mapNodes(y)}),p+=176+16*_.gridNodeCount}return g}(d,g,p),_={header:g,subgrids:f};return zg[c]=_,_},proj4.transform=transform,proj4.mgrs=Kg,proj4.version="__VERSION__",function includedProjections(c){c.Proj.projections.add(cm),c.Proj.projections.add(um),c.Proj.projections.add(dm),c.Proj.projections.add(gm),c.Proj.projections.add(mm),c.Proj.projections.add(fm),c.Proj.projections.add(ym),c.Proj.projections.add(xm),c.Proj.projections.add(vm),c.Proj.projections.add(Sm),c.Proj.projections.add(Tm),c.Proj.projections.add(Rm),c.Proj.projections.add(Lm),c.Proj.projections.add(Am),c.Proj.projections.add(Im),c.Proj.projections.add(Fm),c.Proj.projections.add(km),c.Proj.projections.add(Om),c.Proj.projections.add(Nm),c.Proj.projections.add(Dm),c.Proj.projections.add(Gm),c.Proj.projections.add(jm),c.Proj.projections.add(zm),c.Proj.projections.add(Bm),c.Proj.projections.add(Zm),c.Proj.projections.add(nf),c.Proj.projections.add(sf),c.Proj.projections.add(uf),c.Proj.projections.add(df),c.Proj.projections.add(yf),c.Proj.projections.add(vf)}(proj4);let Sf=null;function register(c){Sf=c;const u=Object.keys(c.defs),d=u.length;let p,g;for(p=0;p<d;++p){const d=u[p];if(!get$2(d)){const u=c.defs(d);let p=u.units;p||"longlat"!==u.projName||(p="degrees"),addProjection(new ji({code:d,axisOrientation:u.axis,metersPerUnit:u.to_meter,units:p}))}}for(p=0;p<d;++p){const f=u[p],_=get$2(f);for(g=0;g<d;++g){const d=u[g],p=get$2(d);if(!get$3(f,d))if(c.defs[f]===c.defs[d])addEquivalentProjections([_,p]);else{const u=c(f,d);addCoordinateTransforms(_,p,createSafeCoordinateTransform(_,p,u.forward),createSafeCoordinateTransform(p,_,u.inverse))}}}}let epsgLookup=async function(c){const u=await fetch(`https://epsg.io/${c}.proj4`);if(!u.ok)throw new Error(`Unexpected response from epsg.io: ${u.status}`);return u.text()};var wf=Object.freeze({__proto__:null,epsgLookupMapTiler:function epsgLookupMapTiler(c){return async function(u){const d=await fetch(`https://api.maptiler.com/coordinates/search/code:${u}.json?transformations=true&exports=true&key=${c}`);if(!d.ok)throw new Error(`Unexpected response from maptiler.com: ${d.status}`);return d.json().then((c=>{const d=c.results;if(d?.length>0){const c=d.filter((c=>"EPSG"===c.id?.authority&&c.id?.code===u))[0];if(c){const u=c.transformations;if(u?.length>0){const d=c.default_transformation;if(u.filter((c=>c.id?.authority===d?.authority&&c.id?.code===d?.code&&0===c.grids?.length)).length>0)return c.exports?.proj4;const p=u.filter((c=>0===c.grids?.length&&"EPSG"===c.target_crs?.authority&&4326===c.target_crs?.code&&!1===c.deprecated&&!0===c.usable)).sort(((c,u)=>c.accuracy-u.accuracy))[0]?.exports?.proj4;if(p)return p}return c.exports?.proj4}}}))}},fromEPSGCode:async function fromEPSGCode(c){"string"==typeof c&&(c=parseInt(c.split(":").pop(),10));const u=Sf;if(!u)throw new Error("Proj4 must be registered first with register(proj4)");const d="EPSG:"+c;return u.defs(d)||(u.defs(d,await epsgLookup(c)),register(u)),get$2(d)},getEPSGLookup:function getEPSGLookup(){return epsgLookup},isRegistered:function isRegistered(){return!!Sf},register:register,setEPSGLookup:function setEPSGLookup(c){epsgLookup=c},unregister:function unregister(){Sf=null}});(c=>{if(document.head.querySelector(`link[href="${c}"]`))return;const u=document.createElement("link");Object.assign(u,{rel:"stylesheet",href:c,onerror:()=>console.warn("Fail to load stylesheet:",c)}),document.head.appendChild(u)})("https://cdn.jsdelivr.net/npm/ol@10.1.0/ol.css");const Cf=class extends defaultExport{id="openlayers";crs="EPSG:4326";control={fullscreen:!1,scale:!1};ol={...pa,control:Ia,format:ed,geom:Ks,layer:tp,source:tg,style:zs,proj:{...ir,proj4:wf}};proj4=proj4;get steps(){return[this.setCoordinateSystem,...super.steps,this.setCursor]}static validOptions=super.validOptions.concat([new MapOption({name:"crs",desc:"Coordinate Reference System",example:"EPSG:3826",exampleDesc:"Taiwan TM2",isValid:c=>!!c?.toString()?.match(/^EPSG:\d+$|^\d+$/)})]);async setCoordinateSystem({proj4:c,ol:u,crs:d}){c.defs("EPSG:3826","+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"),u.proj.proj4.register(c);const p=(this.validateOption("crs",d)||console.warn(`Invalid Coordinate System: ${d}, set "EPSG:4326" instead`),d),g=await u.proj.proj4.fromEPSGCode(p).catch((()=>{console.warn(`Fail to retrieve Coordinate System ${p}, Use ${d} instead`)}));return u.proj.setUserProjection(g),u.proj.getUserProjection()}async addMap({ol:c,target:u,center:d,zoom:p}){return this.map=new c.Map({target:u,view:new c.View({constrainResolution:!0,center:d,zoom:p})}),this.map}getTerraDrawAdapter({map:c,ol:u,draw:d}){return d?(this.terraDrawAdapter=new W({lib:{Feature:u.Feature,GeoJSON:u.format.GeoJSON,Style:u.style.Style,VectorLayer:u.layer.Vector,VectorSource:u.source.Vector,Stroke:u.style.Stroke,Circle:u.style.Circle,Fill:u.style.Fill,getUserProjection:u.proj.getUserProjection},map:c,coordinatePrecision:9}),this.terraDrawAdapter):{state:"skip"}}setCursor({map:c}){c.getViewport().style.cursor="grab",c.on("pointerdrag",(u=>{c.getViewport().style.cursor="grabbing"})),c.on("pointerup",(()=>{c.getViewport().style.cursor="grab"}))}setOptionsAliases(c){super.handleAliases(c),c.STYLE&&(c.data.push({type:"style",url:c.STYLE}),delete c.STYLE)}setControl({map:c,control:u,ol:d}){if(!u||0===Object.values(u).filter((c=>c)).length)return{state:"skip"};!0===u.fullscreen&&c.addControl(new d.control.FullScreen),!0===u.scale&&c.addControl(new d.control.ScaleLine({units:"metric"}))}setExtra(c){const{map:u,debug:d,ol:p}=c;if(!d&&!c.eval)return{state:"skip"};!0===d&&u.addLayer(new TileLayer({source:new p.source.TileDebug})),c.eval&&this.evalScript(c.eval,[["map",u],["ol",p]])}addMarker(c){const u=document.createElement("div");u.innerHTML="circle"===c.type?this.svgForAnchor.html:this.svgForMarker.html,u.title=c.title,u.classList.add("marker");const d=new Overlay({element:u,position:c.xy,positioning:"circle"===c.type?"center-center":"bottom-center"});return this.map.addOverlay(d),u}async addTileData({map:c,data:u}){const d=u.filter((c=>"tile"===c.type)),p=d.filter((c=>"style"===c.type))[0];if(p||0!==d.length)d.forEach((u=>{const d=new TileLayer({source:new XYZ({url:u.url}),title:u.title?u.title:"Anonymous"});c.addLayer(d)}));else{const u=new TileLayer({source:new OSM,title:"OSM Carto"});c.addLayer(u)}return d.filter((c=>"wmts"===c.type))[0],new Promise((u=>{c.on("rendercomplete",(()=>{u(c)}))}))}addGPXFile({map:c,ol:u,data:d}){const p=d.find((c=>"gpx"===c.type));if(!p)return{state:"skip"};const g={MultiLineString:new u.style.Style({stroke:new u.style.Stroke({color:"red",width:3})})};c.addLayer(new u.layer.Vector({source:new u.source.Vector({url:p,format:new u.format.GPX}),style:()=>g.MultiLineString}))}updateCamera(c,u){const d=this.map,p=d.getView();u?function flyTo(c,u,d){const p=2500,g=c.getView(),f=u.zoom?u.zoom:g.getZoom(),_=u.center?u.center:g.center;let y=2,x=!1;function callback(c){--y,x||0!==y&&c||(x=!0,d(c))}g.animate({center:_,duration:p},callback),g.animate({zoom:(g.getZoom()+f)/2-1,duration:p/2},{zoom:f,duration:p/2},callback)}(d,{center:c.center,zoom:c.zoom}):p.animate({center:c.center,zoom:c.zoom,duration:300})}project([c,u]){return this.map.getPixelFromCoordinate([c,u])}unproject([c,u]){return this.map.getCoordinateFromPixel([c,u])}};const converter=c=>({...c,use:Cf}),Ef=renderWith(converter),Pf=renderByYamlWith(converter),bf=((c=null)=>async()=>{const u=document.currentScript,d=u?.getAttribute("data-target")??URL.parse(u?.src)?.searchParams?.get("target"),p=document.querySelectorAll(d);d&&p&&p.forEach((u=>renderByYamlWith(c)(u)))})(converter);globalThis.mapclay={render:Ef,renderByYaml:Pf},c.default=Cf,c.render=Ef,c.renderByScriptTarget=bf,c.renderByYaml=Pf,Object.defineProperty(c,"__esModule",{value:!0}),bf()}));
diff --git a/dist/renderers/openlayers.mjs b/dist/renderers/openlayers.mjs
new file mode 100644
index 0000000..f949c04
--- /dev/null
+++ b/dist/renderers/openlayers.mjs
@@ -0,0 +1,2 @@
+function t(){return t=Object.assign?Object.assign.bind():function(c){for(var u=1;u<arguments.length;u++){var d=arguments[u];for(var p in d)({}).hasOwnProperty.call(d,p)&&(c[p]=d[p])}return c},t.apply(null,arguments)}function e(c,u=9){const d=Math.pow(10,u);return Math.round(c*d)/d}const i$1=(c,u)=>{const{x:d,y:p}=c,{x:g,y:f}=u,_=g-d,y=f-p;return Math.sqrt(y*y+_*_)};class o{constructor({name:c,callback:u,unregister:d,register:p}){this.name=void 0,this.callback=void 0,this.registered=!1,this.register=void 0,this.unregister=void 0,this.name=c,this.register=()=>{this.registered||(this.registered=!0,p(u))},this.unregister=()=>{this.register&&(this.registered=!1,d(u))},this.callback=u}}class r{constructor(c){this._minPixelDragDistance=void 0,this._minPixelDragDistanceDrawing=void 0,this._minPixelDragDistanceSelecting=void 0,this._lastDrawEvent=void 0,this._coordinatePrecision=void 0,this._heldKeys=new Set,this._listeners=[],this._dragState="not-dragging",this._currentModeCallbacks=void 0,this._minPixelDragDistance="number"==typeof c.minPixelDragDistance?c.minPixelDragDistance:1,this._minPixelDragDistanceSelecting="number"==typeof c.minPixelDragDistanceSelecting?c.minPixelDragDistanceSelecting:1,this._minPixelDragDistanceDrawing="number"==typeof c.minPixelDragDistanceDrawing?c.minPixelDragDistanceDrawing:8,this._coordinatePrecision="number"==typeof c.coordinatePrecision?c.coordinatePrecision:9}getButton(c){return-1===c.button?"neither":0===c.button?"left":1===c.button?"middle":2===c.button?"right":"neither"}getMapElementXYPosition(c){const u=this.getMapEventElement(),{left:d,top:p}=u.getBoundingClientRect();return{containerX:c.clientX-d,containerY:c.clientY-p}}getDrawEventFromEvent(c){const u=this.getLngLatFromEvent(c);if(!u)return null;const{lng:d,lat:p}=u,{containerX:g,containerY:f}=this.getMapElementXYPosition(c),_=this.getButton(c),y=Array.from(this._heldKeys);return{lng:e(d,this._coordinatePrecision),lat:e(p,this._coordinatePrecision),containerX:g,containerY:f,button:_,heldKeys:y}}register(c){this._currentModeCallbacks=c,this._listeners=this.getAdapterListeners(),this._listeners.forEach((c=>{c.register()}))}getCoordinatePrecision(){return this._coordinatePrecision}getAdapterListeners(){return[new o({name:"pointerdown",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;const u=this.getDrawEventFromEvent(c);u&&(this._dragState="pre-dragging",this._lastDrawEvent=u)},register:c=>{this.getMapEventElement().addEventListener("pointerdown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerdown",c)}}),new o({name:"pointermove",callback:c=>{if(!this._currentModeCallbacks)return;if(!c.isPrimary)return;c.preventDefault();const u=this.getDrawEventFromEvent(c);if(u)if("not-dragging"===this._dragState)this._currentModeCallbacks.onMouseMove(u),this._lastDrawEvent=u;else if("pre-dragging"===this._dragState){if(!this._lastDrawEvent)return;const c={x:this._lastDrawEvent.containerX,y:this._lastDrawEvent.containerY},d={x:u.containerX,y:u.containerY},p=this._currentModeCallbacks.getState(),g=i$1(c,d);let f=!1;if(f="drawing"===p?g<this._minPixelDragDistanceDrawing:"selecting"===p?g<this._minPixelDragDistanceSelecting:g<this._minPixelDragDistance,f)return;this._dragState="dragging",this._currentModeCallbacks.onDragStart(u,(c=>{this.setDraggability.bind(this)(c)}))}else"dragging"===this._dragState&&this._currentModeCallbacks.onDrag(u,(c=>{this.setDraggability.bind(this)(c)}))},register:c=>{this.getMapEventElement().addEventListener("pointermove",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointermove",c)}}),new o({name:"contextmenu",callback:c=>{this._currentModeCallbacks&&c.preventDefault()},register:c=>{this.getMapEventElement().addEventListener("contextmenu",c)},unregister:c=>{this.getMapEventElement().removeEventListener("contextmenu",c)}}),new o({name:"pointerup",callback:c=>{if(!this._currentModeCallbacks)return;if(c.target!==this.getMapEventElement())return;if(!c.isPrimary)return;const u=this.getDrawEventFromEvent(c);u&&("dragging"===this._dragState?this._currentModeCallbacks.onDragEnd(u,(c=>{this.setDraggability.bind(this)(c)})):"not-dragging"!==this._dragState&&"pre-dragging"!==this._dragState||this._currentModeCallbacks.onClick(u),this._dragState="not-dragging",this.setDraggability(!0))},register:c=>{this.getMapEventElement().addEventListener("pointerup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("pointerup",c)}}),new o({name:"keyup",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.delete(c.key),this._currentModeCallbacks.onKeyUp({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keyup",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keyup",c)}}),new o({name:"keydown",callback:c=>{this._currentModeCallbacks&&(this._heldKeys.add(c.key),this._currentModeCallbacks.onKeyDown({key:c.key,heldKeys:Array.from(this._heldKeys),preventDefault:()=>c.preventDefault()}))},register:c=>{this.getMapEventElement().addEventListener("keydown",c)},unregister:c=>{this.getMapEventElement().removeEventListener("keydown",c)}})]}unregister(){this._listeners.forEach((c=>{c.unregister()})),this.clear()}}const c={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var u=class{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||c[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const d=6378137,p=Math.PI*d,g=[-p,-p,p,p],f=[-180,-85,180,85],_=d*Math.log(Math.tan(Math.PI/2));class m extends u{constructor(c){super({code:c,units:"m",extent:g,global:!0,worldExtent:f,getPointResolution:function(c,u){return c/Math.cosh(u[1]/d)}})}}const y=[new m("EPSG:3857"),new m("EPSG:102100"),new m("EPSG:102113"),new m("EPSG:900913"),new m("http://www.opengis.net/def/crs/EPSG/0/3857"),new m("http://www.opengis.net/gml/srs/epsg.xml#3857")],x=[-180,-90,180,90],v=6378137*Math.PI/180;class P extends u{constructor(c,u){super({code:c,units:"degrees",extent:x,axisOrientation:u,global:!0,metersPerUnit:v,worldExtent:x})}}const C=[new P("CRS:84"),new P("EPSG:4326","neu"),new P("urn:ogc:def:crs:OGC:1.3:CRS84"),new P("urn:ogc:def:crs:OGC:2:84"),new P("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new P("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new P("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let M={},T={};function b(c,u,d){const p=c.getCode(),g=u.getCode();p in T||(T[p]={}),T[p][g]=d}function S(c,u){if(void 0!==u)for(let d=0,p=c.length;d<p;++d)u[d]=c[d];else u=c.slice();return u}function E(c,u){if(void 0!==u&&c!==u){for(let d=0,p=c.length;d<p;++d)u[d]=c[d];c=u}return c}function w(c){!function(c,u){M[c]=u}(c.getCode(),c),b(c,c,S)}function I$1(c){return"string"==typeof c?M[u=c]||M[u.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null:c||null;var u}function F(c){!function(c){c.forEach(w)}(c),c.forEach((function(u){c.forEach((function(c){u!==c&&b(u,c,S)}))}))}function D(c,u,d){const p=function(c,u){return function(c,u){let d=function(c,u){let d;return c in T&&u in T[c]&&(d=T[c][u]),d}(c.getCode(),u.getCode());return d||(d=E),d}(I$1(c),I$1(u))}(u,d);return p(c,void 0,c.length)}var L,A,I,k;F(y),F(C),L=y,A=function(c,u,g){const f=c.length;g=g>1?g:2,void 0===u&&(u=g>2?c.slice():new Array(f));for(let y=0;y<f;y+=g){u[y]=p*c[y]/180;let g=d*Math.log(Math.tan(Math.PI*(+c[y+1]+90)/360));g>_?g=_:g<-_&&(g=-_),u[y+1]=g}return u},I=function(c,u,g){const f=c.length;g=g>1?g:2,void 0===u&&(u=g>2?c.slice():new Array(f));for(let _=0;_<f;_+=g)u[_]=180*c[_]/p,u[_+1]=360*Math.atan(Math.exp(c[_+1]/d))/Math.PI-90;return u},C.forEach((function(c){L.forEach((function(u){b(c,u,A),b(u,c,I)}))}));class W extends r{constructor(c){super(c),this.stylingFunction=()=>({}),this._lib=void 0,this._map=void 0,this._container=void 0,this._projection=void 0,this._vectorSource=void 0,this._geoJSONReader=void 0,this._map=c.map,this._lib=c.lib,this._geoJSONReader=new this._lib.GeoJSON,this._projection=()=>{var c;return null!=(c=this._lib.getUserProjection())?c:new u({code:"EPSG:3857"})},this._container=this._map.getViewport(),this._container.setAttribute("tabindex","0");const d=new this._lib.VectorSource({features:[]});this._vectorSource=d;const p=new this._lib.VectorLayer({source:d,style:c=>this.getStyles(c,this.stylingFunction())});this._map.addLayer(p)}hexToRGB(c){return{r:parseInt(c.slice(1,3),16),g:parseInt(c.slice(3,5),16),b:parseInt(c.slice(5,7),16)}}getStyles(c,u){const d=c.getGeometry();if(d)return{Point:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"Point",coordinates:[]},properties:d});return new this._lib.Style({image:new this._lib.Circle({radius:p.pointWidth,fill:new this._lib.Fill({color:p.pointColor}),stroke:new this._lib.Stroke({color:p.pointOutlineColor,width:p.pointOutlineWidth})})})},LineString:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"LineString",coordinates:[]},properties:d});return new this._lib.Style({stroke:new this._lib.Stroke({color:p.lineStringColor,width:p.lineStringWidth})})},Polygon:c=>{const d=c.getProperties(),p=u[d.mode]({type:"Feature",geometry:{type:"Polygon",coordinates:[]},properties:d}),{r:g,g:f,b:_}=this.hexToRGB(p.polygonFillColor);return new this._lib.Style({stroke:new this._lib.Stroke({color:p.polygonOutlineColor,width:p.polygonOutlineWidth}),fill:new this._lib.Fill({color:`rgba(${g},${f},${_},${p.polygonFillOpacity})`})})}}[d.getType()](c)}clearLayers(){this._vectorSource&&this._vectorSource.clear()}addFeature(c){const u=this._geoJSONReader.readFeature(c,{dataProjection:"EPSG:4326",featureProjection:this._projection()});this._vectorSource.addFeature(u)}removeFeature(c){const u=this._vectorSource.getFeatureById(c);u&&this._vectorSource.removeFeature(u)}getLngLatFromEvent(c){const{containerX:u,containerY:d}=this.getMapElementXYPosition(c);try{return this.unproject(u,d)}catch(c){return null}}getMapEventElement(){const c=this._container.querySelectorAll("canvas");if(c.length>1)throw Error("Terra Draw currently only supports 1 canvas with OpenLayers");return c[0]}setDraggability(c){this._map.getInteractions().forEach((u=>{"DragPan"===u.constructor.name&&u.setActive(c)}))}project(c,u){const[d,p]=this._map.getPixelFromCoordinate(D([c,u],"EPSG:4326",void 0!==(g=this._projection())?g:"EPSG:3857"));var g;return{x:d,y:p}}unproject(c,u){const[d,p]=function(c,u){const d=D(c,void 0!==u?u:"EPSG:3857","EPSG:4326"),p=d[0];return(p<-180||p>180)&&(d[0]=function(c){const u=c%360;return 360*u<0?u+360:u}(p+180)-180),d}(this._map.getCoordinateFromPixel([c,u]),this._projection());return{lng:d,lat:p}}setCursor(c){"unset"===c?this.getMapEventElement().style.removeProperty("cursor"):this.getMapEventElement().style.cursor=c}setDoubleClickToZoom(c){this._map.getInteractions().forEach((function(u){"DoubleClickZoom"===u.constructor.name&&u.setActive(c)}))}render(c,u){this.stylingFunction=()=>u,c.deletedIds.forEach((c=>{this.removeFeature(c)})),c.updated.forEach((c=>{this.removeFeature(c.id),this.addFeature(c)})),c.created.forEach((c=>{this.addFeature(c)}))}clear(){this._currentModeCallbacks&&(this._currentModeCallbacks.onClear(),this.clearLayers())}register(c){super.register(c),this._currentModeCallbacks&&this._currentModeCallbacks.onReady&&this._currentModeCallbacks.onReady()}getCoordinatePrecision(){return super.getCoordinatePrecision()}unregister(){return super.unregister()}}!function(c){c.Commit="commit",c.Provisional="provisional",c.Finish="finish"}(k||(k={}));const O="selected",N="midPoint",G="closingPoint";function A$1(c){return Boolean(c&&"object"==typeof c&&null!==c&&!Array.isArray(c))}function R(c){if(!function(c){return"number"==typeof c&&!isNaN(new Date(c).valueOf())}(c))throw new Error("updatedAt and createdAt are not valid timestamps");return!0}var j;!function(c){c.Drawing="drawing",c.Select="select",c.Static="static",c.Render="render"}(j||(j={}));class X{get state(){return this._state}set state(c){throw new Error("Please use the modes lifecycle methods")}get styles(){return this._styles}set styles(c){if("object"!=typeof c)throw new Error("Styling must be an object");this.onStyleChange([],"styling"),this._styles=c}registerBehaviors(c){}constructor(c){this._state=void 0,this._styles=void 0,this.behaviors=[],this.validate=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.onStyleChange=void 0,this.store=void 0,this.setDoubleClickToZoom=void 0,this.unproject=void 0,this.project=void 0,this.setCursor=void 0,this.projection=void 0,this.type=j.Drawing,this.mode="base",this._state="unregistered",this._styles=c&&c.styles?t({},c.styles):{},this.pointerDistance=c&&c.pointerDistance||40,this.validate=c&&c.validation,this.projection=c&&c.projection||"web-mercator"}setDrawing(){if("started"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="drawing"}setStarted(){if("stopped"!==this._state&&"registered"!==this._state&&"drawing"!==this._state&&"selecting"!==this._state)throw new Error("Mode must be unregistered or stopped to start");this._state="started",this.setDoubleClickToZoom(!1)}setStopped(){if("started"!==this._state)throw new Error("Mode must be started to be stopped");this._state="stopped",this.setDoubleClickToZoom(!0)}register(c){if("unregistered"!==this._state)throw new Error("Can not register unless mode is unregistered");this._state="registered",this.store=c.store,this.store.registerOnChange(c.onChange),this.setDoubleClickToZoom=c.setDoubleClickToZoom,this.project=c.project,this.unproject=c.unproject,this.onSelect=c.onSelect,this.onDeselect=c.onDeselect,this.setCursor=c.setCursor,this.onStyleChange=c.onChange,this.onFinish=c.onFinish,this.coordinatePrecision=c.coordinatePrecision,this.registerBehaviors({mode:c.mode,store:this.store,project:this.project,unproject:this.unproject,pointerDistance:this.pointerDistance,coordinatePrecision:c.coordinatePrecision,projection:this.projection})}validateFeature(c){if("unregistered"===this._state)throw new Error("Mode must be registered");const u=function(c,u){let d;if(A$1(c))if(null==c.id)d="Feature has no id";else if("string"!=typeof c.id&&"number"!=typeof c.id)d="Feature must be string or number as per GeoJSON spec";else if(u(c.id))if(A$1(c.geometry))if(A$1(c.properties))if("string"==typeof c.geometry.type&&["Polygon","LineString","Point"].includes(c.geometry.type))if(Array.isArray(c.geometry.coordinates)){if(!c.properties.mode||"string"!=typeof c.properties.mode)throw new Error("Feature does not have a valid mode property")}else d="Feature coordinates is not an array";else d="Feature is not Point, LineString or Polygon";else d="Feature has no properties";else d="Feature has no geometry";else d="Feature must match the id strategy (default is UUID4)";else d="Feature is not object";if(d)throw new Error(d);return!0}(c,this.store.idStrategy.isValidId);return this.validate?this.validate(c,{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:k.Provisional}):u}onFinish(c,u){}onDeselect(c){}onSelect(c){}onKeyDown(c){}onKeyUp(c){}onMouseMove(c){}onClick(c){}onDragStart(c,u){}onDrag(c,u){}onDragEnd(c,u){}getHexColorStylingValue(c,u,d){return this.getStylingValue(c,u,d)}getNumericStylingValue(c,u,d){return this.getStylingValue(c,u,d)}getStylingValue(c,u,d){return void 0===c?u:"function"==typeof c?c(d):c}}class U extends X{constructor(...c){super(...c),this.type=j.Select}}function Y(c,u){const i=c=>c*Math.PI/180,d=i(c[1]),p=i(c[0]),g=i(u[1]),f=g-d,_=i(u[0])-p,y=Math.sin(f/2)*Math.sin(f/2)+Math.cos(d)*Math.cos(g)*Math.sin(_/2)*Math.sin(_/2);return 2*Math.atan2(Math.sqrt(y),Math.sqrt(1-y))*6371e3/1e3}const B=6371008.8;function z(c){return c%360*Math.PI/180}function H(c){return c/(B/1e3)}function $(c){return c%(2*Math.PI)*180/Math.PI}const V=57.29577951308232,q=.017453292519943295,Z=6378137,Q=(c,u)=>({x:0===c?0:c*q*Z,y:0===u?0:Math.log(Math.tan(Math.PI/4+u*q/2))*Z}),tt=(c,u)=>({lng:0===c?0:V*(c/Z),lat:0===u?0:(2*Math.atan(Math.exp(u/Z))-Math.PI/2)*V});function et(c,u,d){const p=z(c[0]),g=z(c[1]),f=z(d),_=H(u),y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(f));return[$(p+Math.atan2(Math.sin(f)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),$(y)]}function it(c){const{center:u,radiusKilometers:d,coordinatePrecision:p}=c,g=c.steps?c.steps:64,f=[];for(let c=0;c<g;c++){const _=et(u,d,-360*c/g);f.push([e(_[0],p),e(_[1],p)])}return f.push(f[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[f]},properties:{}}}function ot(c){const u={epsilon:0};let d;if("Polygon"===c.geometry.type)d=c.geometry.coordinates;else{if("LineString"!==c.geometry.type)throw new Error("Self intersects only accepts Polygons and LineStrings");d=[c.geometry.coordinates]}const p=[];for(let c=0;c<d.length;c++)for(let u=0;u<d[c].length-1;u++)for(let p=0;p<d.length;p++)for(let g=0;g<d[p].length-1;g++)s(c,u,p,g);return p.length>0;function r(c){return c<0-u.epsilon||c>1+u.epsilon}function s(c,u,g,f){const _=d[c][u],y=d[c][u+1],x=d[g][f],v=d[g][f+1],C=function(c,u,d,p){if(rt(c,d)||rt(c,p)||rt(u,d)||rt(p,d))return null;const g=c[0],f=c[1],_=u[0],y=u[1],x=d[0],v=d[1],C=p[0],M=p[1],T=(g-_)*(v-M)-(f-y)*(x-C);return 0===T?null:[((g*y-f*_)*(x-C)-(g-_)*(x*M-v*C))/T,((g*y-f*_)*(v-M)-(f-y)*(x*M-v*C))/T]}(_,y,x,v);if(null===C)return;let M,T;M=y[0]!==_[0]?(C[0]-_[0])/(y[0]-_[0]):(C[1]-_[1])/(y[1]-_[1]),T=v[0]!==x[0]?(C[0]-x[0])/(v[0]-x[0]):(C[1]-x[1])/(v[1]-x[1]),r(M)||r(T)||(C.toString(),p.push(C))}}function rt(c,u){return c[0]===u[0]&&c[1]===u[1]}function st(c,u){return 2===c.length&&"number"==typeof c[0]&&"number"==typeof c[1]&&1/0!==c[0]&&1/0!==c[1]&&(p=c[0])>=-180&&p<=180&&(d=c[1])>=-90&&d<=90&&nt(c[0])<=u&&nt(c[1])<=u;var d,p}function nt(c){let u=1,d=0;for(;Math.round(c*u)/u!==c;)u*=10,d++;return d}function at(c,u){return"Polygon"===c.geometry.type&&1===c.geometry.coordinates.length&&c.geometry.coordinates[0].length>=4&&c.geometry.coordinates[0].every((c=>st(c,u)))&&(d=c.geometry.coordinates[0][0])[0]===(p=c.geometry.coordinates[0][c.geometry.coordinates[0].length-1])[0]&&d[1]===p[1];var d,p}function lt(c,u){return at(c,u)&&!ot(c)}class ht extends X{constructor(c){var u;super(c),this.mode="circle",this.center=void 0,this.clickCount=0,this.currentCircleId=void 0,this.keyEvents=void 0,this.cursors=void 0,this.startingRadiusKilometers=1e-5;const d={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}this.startingRadiusKilometers=null!=(u=null==c?void 0:c.startingRadiusKilometers)?u:1e-5,this.validate=null==c?void 0:c.validation}close(){if(void 0===this.currentCircleId)return;const c=this.currentCircleId;if(this.validate&&c){const u=this.store.getGeometryCopy(c);if(!this.validate({type:"Feature",id:c,geometry:u,properties:{}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:k.Finish}))return}this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const u=it({center:this.center,radiusKilometers:this.startingRadiusKilometers,coordinatePrecision:this.coordinatePrecision}),[d]=this.store.create([{geometry:u.geometry,properties:{mode:this.mode,radiusKilometers:this.startingRadiusKilometers}}]);this.currentCircleId=d,this.clickCount++,this.setDrawing()}else 1===this.clickCount&&this.center&&void 0!==this.currentCircleId&&this.updateCircle(c),this.close()}onMouseMove(c){this.updateCircle(c)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentCircleId;this.center=void 0,this.currentCircleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c])}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u):u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}updateCircle(c){if(1===this.clickCount&&this.center&&this.currentCircleId){const u=Y(this.center,[c.lng,c.lat]);let d;if("web-mercator"===this.projection){const p=function(c,u){const d=1e3*Y(c,u);if(0===d)return 1;const{x:p,y:g}=Q(c[0],c[1]),{x:f,y:_}=Q(u[0],u[1]);return Math.sqrt(Math.pow(f-p,2)+Math.pow(_-g,2))/d}(this.center,[c.lng,c.lat]);d=function(c){const{center:u,radiusKilometers:d,coordinatePrecision:p}=c,g=c.steps?c.steps:64,f=1e3*d,[_,y]=u,{x:x,y:v}=Q(_,y),C=[];for(let c=0;c<g;c++){const u=360*c/g*Math.PI/180,d=f*Math.cos(u),_=f*Math.sin(u),[y,M]=[x+d,v+_],{lng:T,lat:L}=tt(y,M);C.push([e(T,p),e(L,p)])}return C.push(C[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[C]},properties:{}}}({center:this.center,radiusKilometers:u*p,coordinatePrecision:this.coordinatePrecision})}else{if("globe"!==this.projection)throw new Error("Invalid projection");d=it({center:this.center,radiusKilometers:u,coordinatePrecision:this.coordinatePrecision})}if(this.validate&&!this.validate({type:"Feature",id:this.currentCircleId,geometry:d.geometry,properties:{radiusKilometers:u}},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:k.Provisional}))return;this.store.updateGeometry([{id:this.currentCircleId,geometry:d.geometry}]),this.store.updateProperty([{id:this.currentCircleId,property:"radiusKilometers",value:u}])}}}class dt{constructor({store:c,mode:u,project:d,unproject:p,pointerDistance:g,coordinatePrecision:f,projection:_}){this.store=void 0,this.mode=void 0,this.project=void 0,this.unproject=void 0,this.pointerDistance=void 0,this.coordinatePrecision=void 0,this.projection=void 0,this.store=c,this.mode=u,this.project=d,this.unproject=p,this.pointerDistance=g,this.coordinatePrecision=f,this.projection=_}}function ut({unproject:c,point:u,pointerDistance:d}){const p=d/2,{x:g,y:f}=u;return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[c(g-p,f-p),c(g+p,f-p),c(g+p,f+p),c(g-p,f+p),c(g-p,f-p)].map((c=>[c.lng,c.lat]))]}}}class gt extends dt{constructor(c){super(c)}create(c){const{containerX:u,containerY:d}=c;return ut({unproject:this.unproject,point:{x:u,y:d},pointerDistance:this.pointerDistance})}}class pt extends dt{constructor(c){super(c)}measure(c,u){const{x:d,y:p}=this.project(u[0],u[1]);return i$1({x:d,y:p},{x:c.containerX,y:c.containerY})}}class yt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.getSnappableCoordinateFirstClick=c=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode))),this.getSnappableCoordinate=(c,u)=>this.getSnappable(c,(c=>Boolean(c.properties&&c.properties.mode===this.mode&&c.id!==u))),this.config=c,this.pixelDistance=u,this.clickBoundingBox=d}getSnappable(c,u){const d=this.clickBoundingBox.create(c),p=this.store.search(d,u),g={coord:void 0,minDist:1/0};return p.forEach((u=>{let d;if("Polygon"===u.geometry.type)d=u.geometry.coordinates[0];else{if("LineString"!==u.geometry.type)return;d=u.geometry.coordinates}d.forEach((u=>{const d=this.pixelDistance.measure(c,u);d<g.minDist&&d<this.pointerDistance&&(g.coord=u,g.minDist=d)}))})),g.coord}}function mt(c,u,d){const p=z(c[0]),g=z(c[1]),f=z(d),_=H(u),y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(f));return[$(p+Math.atan2(Math.sin(f)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),$(y)]}function Ct(c,u){const d=z(c[0]),p=z(u[0]),g=z(c[1]),f=z(u[1]),_=Math.sin(p-d)*Math.cos(f),y=Math.cos(g)*Math.sin(f)-Math.sin(g)*Math.cos(f)*Math.cos(p-d);return $(Math.atan2(_,y))}function Pt(c,u,d){const p=[],g=c.length;let f,_,y,x=0;for(let g=0;g<c.length&&!(u>=x&&g===c.length-1);g++){if(x>u&&0===p.length){if(f=u-x,!f)return p.push(c[g]),p;_=Ct(c[g],c[g-1])-180,y=mt(c[g],f,_),p.push(y)}if(x>=d)return f=d-x,f?(_=Ct(c[g],c[g-1])-180,y=mt(c[g],f,_),p.push(y),p):(p.push(c[g]),p);if(x>=u&&p.push(c[g]),g===c.length-1)return p;x+=Y(c[g],c[g+1])}if(x<u&&c.length===g)throw new Error("Start position is beyond line");const v=c[c.length-1];return[v,v]}function _t(c){return c*(Math.PI/180)}function xt(c){return c*(180/Math.PI)}class Mt extends dt{constructor(c){super(c),this.config=void 0,this.config=c}generateInsertionCoordinates(c,u,d){const p=[c,u];let g=0;for(let c=0;c<p.length-1;c++)g+=Y(p[0],p[1]);if(g<=d)return p;let f=g/d-1;Number.isInteger(f)||(f=Math.floor(f)+1);const _=[];for(let c=0;c<f;c++){const u=Pt(p,d*c,d*(c+1));_.push(u)}const y=[];for(let c=0;c<_.length;c++)y.push(_[c][1]);return this.limitCoordinates(y)}generateInsertionGeodesicCoordinates(c,u,d){const p=Y(c,u),g=function(c,u,d){const p=[],g=_t(c[1]),f=_t(c[0]),_=_t(u[1]),y=_t(u[0]);d+=1;const x=2*Math.asin(Math.sqrt(Math.sin((_-g)/2)**2+Math.cos(g)*Math.cos(_)*Math.sin((y-f)/2)**2));if(0===x||isNaN(x))return p;for(let c=0;c<=d;c++){const u=c/d,v=Math.sin((1-u)*x)/Math.sin(x),C=Math.sin(u*x)/Math.sin(x),M=v*Math.cos(g)*Math.cos(f)+C*Math.cos(_)*Math.cos(y),T=v*Math.cos(g)*Math.sin(f)+C*Math.cos(_)*Math.sin(y),L=v*Math.sin(g)+C*Math.sin(_);if(isNaN(M)||isNaN(T)||isNaN(L))continue;const A=Math.atan2(L,Math.sqrt(M**2+T**2)),I=Math.atan2(T,M);isNaN(A)||isNaN(I)||p.push([xt(I),xt(A)])}return p.slice(1,-1)}(c,u,Math.floor(p/d));return this.limitCoordinates(g)}limitCoordinates(c){return c.map((c=>[e(c[0],this.config.coordinatePrecision),e(c[1],this.config.coordinatePrecision)]))}}function bt(c,u){return c[0]===u[0]&&c[1]===u[1]}class St extends X{constructor(c){super(c),this.mode="linestring",this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.cursors=void 0,this.mouseMove=!1,this.insertCoordinates=void 0,this.lastCommitedCoordinates=void 0,this.snapping=void 0,this.insertPoint=void 0;const u={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}this.validate=null==c?void 0:c.validation,this.insertCoordinates=null==c?void 0:c.insertCoordinates}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId);c.coordinates.pop(),this.updateGeometries([...c.coordinates],void 0,k.Commit);const u=this.currentId;this.closingPointId&&this.store.delete([this.closingPointId]),this.currentCoordinate=0,this.currentId=void 0,this.closingPointId=void 0,this.lastCommitedCoordinates=void 0,"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}updateGeometries(c,u,d){if(!this.currentId)return;const p={type:"LineString",coordinates:c};if(this.validate&&!this.validate({type:"Feature",geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:d}))return;const g=[{id:this.currentId,geometry:p}];this.closingPointId&&u&&g.push({id:this.closingPointId,geometry:{type:"Point",coordinates:u}}),"commit"===d&&(this.lastCommitedCoordinates=p.coordinates),this.store.updateGeometry(g)}generateInsertCoordinates(c,u){if(!this.insertCoordinates||!this.lastCommitedCoordinates)throw new Error("Not able to insert coordinates");if("amount"!==this.insertCoordinates.strategy)throw new Error("Strategy does not exist");const d=Y(c,u)/(this.insertCoordinates.value+1);let p=[];return"globe"===this.projection?p=this.insertPoint.generateInsertionGeodesicCoordinates(c,u,d):"web-mercator"===this.projection&&(p=this.insertPoint.generateInsertionCoordinates(c,u,d)),p}createLine(c){const[u]=this.store.create([{geometry:{type:"LineString",coordinates:[c,c]},properties:{mode:this.mode}}]);this.lastCommitedCoordinates=[c,c],this.currentId=u,this.currentCoordinate++,this.setDrawing()}firstUpdateToLine(c){if(!this.currentId)return;const u=this.store.getGeometryCopy(this.currentId).coordinates,[d]=this.store.create([{geometry:{type:"Point",coordinates:[...c]},properties:{mode:this.mode}}]);this.closingPointId=d,this.setCursor(this.cursors.close);const p=[...u,c];this.updateGeometries(p,void 0,k.Commit),this.currentCoordinate++}updateToLine(c,u){if(!this.currentId)return;const d=this.store.getGeometryCopy(this.currentId).coordinates,[p,g]=this.lastCommitedCoordinates?this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1]:d[d.length-2],{x:f,y:_}=this.project(p,g);if(i$1({x:f,y:_},{x:u.x,y:u.y})<this.pointerDistance)return void this.close();this.setCursor(this.cursors.close);const y=[...d,c];this.updateGeometries(y,d[d.length-1],k.Commit),this.currentCoordinate++}registerBehaviors(c){this.snapping=new yt(c,new pt(c),new gt(c)),this.insertPoint=new Mt(c)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const u=this.store.getGeometryCopy(this.currentId).coordinates;u.pop();const d=this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];if(this.closingPointId){const[d,p]=u[u.length-1],{x:g,y:f}=this.project(d,p);i$1({x:g,y:f},{x:c.containerX,y:c.containerY})<this.pointerDistance&&this.setCursor(this.cursors.close)}let p=[...u,d];if(this.insertCoordinates&&this.currentId&&this.lastCommitedCoordinates){const c=this.lastCommitedCoordinates[this.lastCommitedCoordinates.length-1],u=d;if(!bt(c,u)){const g=this.generateInsertCoordinates(c,u);p=[...this.lastCommitedCoordinates.slice(0,-1),...g,d]}}this.updateGeometries(p,void 0,k.Provisional)}onClick(c){this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1;const u=this.currentId&&this.snappingEnabled&&this.snapping.getSnappableCoordinate(c,this.currentId)||[c.lng,c.lat];0===this.currentCoordinate?this.createLine(u):1===this.currentCoordinate&&this.currentId?this.firstUpdateToLine(u):this.currentId&&this.updateToLine(u,{x:c.containerX,y:c.containerY})}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel&&this.cleanUp(),c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentId;this.closingPointId=void 0,this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),void 0!==this.closingPointId&&this.store.delete([this.closingPointId])}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"LineString"===c.geometry.type&&c.properties.mode===this.mode?(u.lineStringColor=this.getHexColorStylingValue(this.styles.lineStringColor,u.lineStringColor,c),u.lineStringWidth=this.getNumericStylingValue(this.styles.lineStringWidth,u.lineStringWidth,c),u.zIndex=10,u):"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode?(u.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,u.pointColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,u.pointWidth,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,"#ffffff",c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),u.zIndex=40,u):u}validateFeature(c){return!!super.validateFeature(c)&&"LineString"===c.geometry.type&&c.properties.mode===this.mode&&c.geometry.coordinates.length>=2}}function Et(c,u){return"Point"===c.geometry.type&&st(c.geometry.coordinates,u)}class wt extends X{constructor(c){super(c),this.mode="point",this.cursors=void 0;const u={create:"crosshair"};this.cursors=c&&c.cursors?t({},u,c.cursors):u}start(){this.setStarted(),this.setCursor(this.cursors.create)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(!this.store)throw new Error("Mode must be registered first");const u={type:"Point",coordinates:[c.lng,c.lat]},d={mode:this.mode};if(this.validate&&!this.validate({type:"Feature",geometry:u,properties:d},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:k.Finish}))return;const[p]=this.store.create([{geometry:u,properties:d}]);this.onFinish(p,{mode:this.mode,action:"draw"})}onMouseMove(){}onKeyDown(){}onKeyUp(){}cleanUp(){}onDragStart(){}onDrag(){}onDragEnd(){}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Point"===c.geometry.type&&c.properties.mode===this.mode&&(u.pointWidth=this.getNumericStylingValue(this.styles.pointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.pointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.pointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.pointOutlineWidth,2,c),u.zIndex=30),u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&Et(c,this.coordinatePrecision)}}class It extends dt{constructor(c,u){super(c),this.config=void 0,this.pixelDistance=void 0,this._startEndPoints=[],this.config=c,this.pixelDistance=u}get ids(){return this._startEndPoints.concat()}set ids(c){}create(c,u){if(this.ids.length)throw new Error("Opening and closing points already created");if(c.length<=3)throw new Error("Requires at least 4 coordinates");this._startEndPoints=this.store.create([{geometry:{type:"Point",coordinates:c[0]},properties:{mode:u,[G]:!0}},{geometry:{type:"Point",coordinates:c[c.length-2]},properties:{mode:u,[G]:!0}}])}delete(){this.ids.length&&(this.store.delete(this.ids),this._startEndPoints=[])}update(c){if(2!==this.ids.length)throw new Error("No closing points to update");this.store.updateGeometry([{id:this.ids[0],geometry:{type:"Point",coordinates:c[0]}},{id:this.ids[1],geometry:{type:"Point",coordinates:c[c.length-3]}}])}isClosingPoint(c){const u=this.store.getGeometryCopy(this.ids[0]),d=this.store.getGeometryCopy(this.ids[1]),p=this.pixelDistance.measure(c,u.coordinates),g=this.pixelDistance.measure(c,d.coordinates);return{isClosing:p<this.pointerDistance,isPreviousClosing:g<this.pointerDistance}}}class Ft extends X{constructor(c){super(c),this.mode="polygon",this.currentCoordinate=0,this.currentId=void 0,this.keyEvents=void 0,this.snappingEnabled=void 0,this.snapping=void 0,this.pixelDistance=void 0,this.closingPoints=void 0,this.cursors=void 0,this.mouseMove=!1;const u={start:"crosshair",close:"pointer"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,this.snappingEnabled=!(!c||void 0===c.snapping)&&c.snapping,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}}close(){if(void 0===this.currentId)return;const c=this.store.getGeometryCopy(this.currentId).coordinates[0];if(c.length<5)return;if(!this.updatePolygonGeometry([...c.slice(0,-2),c[0]],k.Finish))return;const u=this.currentId;this.currentCoordinate=0,this.currentId=void 0,this.closingPoints.delete(),"drawing"===this.state&&this.setStarted(),this.onFinish(u,{mode:this.mode,action:"draw"})}registerBehaviors(c){this.pixelDistance=new pt(c),this.snapping=new yt(c,this.pixelDistance,new gt(c)),this.closingPoints=new It(c,this.pixelDistance)}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onMouseMove(c){if(this.mouseMove=!0,this.setCursor(this.cursors.start),void 0===this.currentId||0===this.currentCoordinate)return;const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,d=this.store.getGeometryCopy(this.currentId).coordinates[0];let p;if(u&&(c.lng=u[0],c.lat=u[1]),1===this.currentCoordinate){const u=1/Math.pow(10,this.coordinatePrecision-1),g=Math.max(1e-6,u);p=[d[0],[c.lng,c.lat],[c.lng,c.lat-g],d[0]]}else if(2===this.currentCoordinate)p=[d[0],d[1],[c.lng,c.lat],d[0]];else{const{isClosing:u,isPreviousClosing:g}=this.closingPoints.isClosingPoint(c);g||u?(this.setCursor(this.cursors.close),p=[...d.slice(0,-2),d[0],d[0]]):p=[...d.slice(0,-2),[c.lng,c.lat],d[0]]}this.updatePolygonGeometry(p,k.Provisional)}updatePolygonGeometry(c,u){if(!this.currentId)return!1;const d={type:"Polygon",coordinates:[c]};return!(this.validate&&!this.validate({type:"Feature",geometry:d},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:u})||(this.store.updateGeometry([{id:this.currentId,geometry:d}]),0))}onClick(c){if(this.currentCoordinate>0&&!this.mouseMove&&this.onMouseMove(c),this.mouseMove=!1,0===this.currentCoordinate){const u=this.snappingEnabled?this.snapping.getSnappableCoordinateFirstClick(c):void 0;u&&(c.lng=u[0],c.lat=u[1]);const[d]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentId=d,this.currentCoordinate++,this.setDrawing()}else if(1===this.currentCoordinate&&this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;u&&(c.lng=u[0],c.lat=u[1]);const d=this.store.getGeometryCopy(this.currentId);if(bt([c.lng,c.lat],d.coordinates[0][0]))return;if(!this.updatePolygonGeometry([d.coordinates[0][0],[c.lng,c.lat],[c.lng,c.lat],d.coordinates[0][0]],k.Commit))return;this.currentCoordinate++}else if(2===this.currentCoordinate&&this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0;u&&(c.lng=u[0],c.lat=u[1]);const d=this.store.getGeometryCopy(this.currentId).coordinates[0];if(bt([c.lng,c.lat],d[1]))return;if(!this.updatePolygonGeometry([d[0],d[1],[c.lng,c.lat],[c.lng,c.lat],d[0]],k.Commit))return;2===this.currentCoordinate&&this.closingPoints.create(d,"polygon"),this.currentCoordinate++}else if(this.currentId){const u=this.snappingEnabled?this.snapping.getSnappableCoordinate(c,this.currentId):void 0,d=this.store.getGeometryCopy(this.currentId).coordinates[0],{isClosing:p,isPreviousClosing:g}=this.closingPoints.isClosingPoint(c);if(g||p)this.close();else{if(u&&(c.lng=u[0],c.lat=u[1]),bt([c.lng,c.lat],d[this.currentCoordinate-1]))return;const p=function(c=[[[0,0],[0,1],[1,1],[1,0],[0,0]]]){return{type:"Feature",geometry:{type:"Polygon",coordinates:c},properties:{}}}([[...d.slice(0,-1),[c.lng,c.lat],d[0]]]);if(!this.updatePolygonGeometry(p.geometry.coordinates[0],k.Commit))return;this.currentCoordinate++,this.closingPoints.ids.length&&this.closingPoints.update(p.geometry.coordinates[0])}}}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onKeyDown(){}onDragStart(){this.setCursor("unset")}onDrag(){}onDragEnd(){this.setCursor(this.cursors.start)}cleanUp(){const c=this.currentId;this.currentId=void 0,this.currentCoordinate=0,"drawing"===this.state&&this.setStarted();try{void 0!==c&&this.store.delete([c]),this.closingPoints.ids.length&&this.closingPoints.delete()}catch(c){}}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode){if("Polygon"===c.geometry.type)return u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u;if("Point"===c.geometry.type)return u.pointWidth=this.getNumericStylingValue(this.styles.closingPointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.closingPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.closingPointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.closingPointOutlineWidth,2,c),u.zIndex=30,u}return u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&at(c,this.coordinatePrecision)}}class Dt extends X{constructor(c){super(c),this.mode="rectangle",this.center=void 0,this.clickCount=0,this.currentRectangleId=void 0,this.keyEvents=void 0,this.cursors=void 0;const u={start:"crosshair"};if(this.cursors=c&&c.cursors?t({},u,c.cursors):u,null===(null==c?void 0:c.keyEvents))this.keyEvents={cancel:null,finish:null};else{const u={cancel:"Escape",finish:"Enter"};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}}updateRectangle(c,u){if(1===this.clickCount&&this.center&&this.currentRectangleId){const d=this.store.getGeometryCopy(this.currentRectangleId).coordinates[0][0],p={type:"Polygon",coordinates:[[d,[c.lng,d[1]],[c.lng,c.lat],[d[0],c.lat],d]]};if(this.validate&&!this.validate({id:this.currentRectangleId,geometry:p},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:u}))return;this.store.updateGeometry([{id:this.currentRectangleId,geometry:p}])}}close(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),c&&this.onFinish(c,{mode:this.mode,action:"draw"})}start(){this.setStarted(),this.setCursor(this.cursors.start)}stop(){this.cleanUp(),this.setStopped(),this.setCursor("unset")}onClick(c){if(0===this.clickCount){this.center=[c.lng,c.lat];const[u]=this.store.create([{geometry:{type:"Polygon",coordinates:[[[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat],[c.lng,c.lat]]]},properties:{mode:this.mode}}]);this.currentRectangleId=u,this.clickCount++,this.setDrawing()}else this.updateRectangle(c,k.Finish),this.close()}onMouseMove(c){this.updateRectangle(c,k.Provisional)}onKeyDown(){}onKeyUp(c){c.key===this.keyEvents.cancel?this.cleanUp():c.key===this.keyEvents.finish&&this.close()}onDragStart(){}onDrag(){}onDragEnd(){}cleanUp(){const c=this.currentRectangleId;this.center=void 0,this.currentRectangleId=void 0,this.clickCount=0,"drawing"===this.state&&this.setStarted(),void 0!==c&&this.store.delete([c])}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});return"Feature"===c.type&&"Polygon"===c.geometry.type&&c.properties.mode===this.mode?(u.polygonFillColor=this.getHexColorStylingValue(this.styles.fillColor,u.polygonFillColor,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.outlineColor,u.polygonOutlineColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.outlineWidth,u.polygonOutlineWidth,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.fillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u):u}validateFeature(c){return!!super.validateFeature(c)&&c.properties.mode===this.mode&&lt(c,this.coordinatePrecision)}}class kt extends X{constructor(c){super({styles:c.styles}),this.type=j.Render,this.mode="render",this.mode=c.modeName}registerBehaviors(c){this.mode=c.mode}start(){this.setStarted()}stop(){this.setStopped()}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(c){return{pointColor:this.getHexColorStylingValue(this.styles.pointColor,"#3f97e0",c),pointWidth:this.getNumericStylingValue(this.styles.pointWidth,6,c),pointOutlineColor:this.getHexColorStylingValue(this.styles.pointOutlineColor,"#ffffff",c),pointOutlineWidth:this.getNumericStylingValue(this.styles.pointOutlineWidth,0,c),polygonFillColor:this.getHexColorStylingValue(this.styles.polygonFillColor,"#3f97e0",c),polygonFillOpacity:this.getNumericStylingValue(this.styles.polygonFillOpacity,.3,c),polygonOutlineColor:this.getHexColorStylingValue(this.styles.polygonOutlineColor,"#3f97e0",c),polygonOutlineWidth:this.getNumericStylingValue(this.styles.polygonOutlineWidth,4,c),lineStringWidth:this.getNumericStylingValue(this.styles.lineStringWidth,4,c),lineStringColor:this.getHexColorStylingValue(this.styles.lineStringColor,"#3f97e0",c),zIndex:this.getNumericStylingValue(this.styles.zIndex,0,c)}}validateFeature(c){return super.validateFeature(c)&&(Et(c,this.coordinatePrecision)||at(c,this.coordinatePrecision)||function(c,u){return"LineString"===c.geometry.type&&c.geometry.coordinates.length>=2&&c.geometry.coordinates.every((c=>st(c,u)))}(c,this.coordinatePrecision))}}function Ot(c,u){const d=c,p=u,g=z(d[1]),f=z(p[1]);let _=z(p[0]-d[0]);_>Math.PI&&(_-=2*Math.PI),_<-Math.PI&&(_+=2*Math.PI);const y=Math.log(Math.tan(f/2+Math.PI/4)/Math.tan(g/2+Math.PI/4)),x=($(Math.atan2(_,y))+360)%360;return x>180?-(360-x):x}function jt(c,u,d){let p=u;u<0&&(p=-Math.abs(p));const g=p/B,f=c[0]*Math.PI/180,_=z(c[1]),y=z(d),x=g*Math.cos(y);let v=_+x;Math.abs(v)>Math.PI/2&&(v=v>0?Math.PI-v:-Math.PI-v);const C=Math.log(Math.tan(v/2+Math.PI/4)/Math.tan(_/2+Math.PI/4)),M=Math.abs(C)>1e-11?x/C:Math.cos(_),T=[(180*(f+g*Math.sin(y)/M)/Math.PI+540)%360-180,180*v/Math.PI];return T[0]+=T[0]-c[0]>180?-360:c[0]-T[0]>180?360:0,T}function Lt(c,u,d,p,g){const f=p(c[0],c[1]),_=p(u[0],u[1]),{lng:y,lat:x}=g((f.x+_.x)/2,(f.y+_.y)/2);return[e(y,d),e(x,d)]}function Wt(c,u,d){const p=jt(c,1e3*Y(c,u)/2,Ot(c,u));return[e(p[0],d),e(p[1],d)]}function Bt({featureCoords:c,precision:u,unproject:d,project:p,projection:g}){const f=[];for(let _=0;_<c.length-1;_++){let y;if("web-mercator"===g)y=Lt(c[_],c[_+1],u,p,d);else{if("globe"!==g)throw new Error("Invalid projection");y=Wt(c[_],c[_+1],u)}f.push(y)}return f}class Gt extends dt{constructor(c,u){super(c),this.config=void 0,this.selectionPointBehavior=void 0,this._midPoints=[],this.config=c,this.selectionPointBehavior=u}get ids(){return this._midPoints.concat()}set ids(c){}insert(c,u){const d=this.store.getGeometryCopy(c),{midPointFeatureId:p,midPointSegment:g}=this.store.getPropertiesCopy(c),f=this.store.getGeometryCopy(p),_="Polygon"===f.type?f.coordinates[0]:f.coordinates;_.splice(g+1,0,d.coordinates),f.coordinates="Polygon"===f.type?[_]:_,this.store.updateGeometry([{id:p,geometry:f}]),this.store.delete([...this._midPoints,...this.selectionPointBehavior.ids]),this.create(_,p,u),this.selectionPointBehavior.create(_,f.type,p)}create(c,u,d){if(!this.store.has(u))throw new Error("Store does not have feature with this id");this._midPoints=this.store.create(function(c,u,d,p,g,f){return Bt({featureCoords:c,precision:d,project:p,unproject:g,projection:f}).map(((c,d)=>({geometry:{type:"Point",coordinates:c},properties:u(d)})))}(c,(c=>({mode:this.mode,[N]:!0,midPointSegment:c,midPointFeatureId:u})),d,this.config.project,this.config.unproject,this.projection))}delete(){this._midPoints.length&&(this.store.delete(this._midPoints),this._midPoints=[])}getUpdated(c){if(0!==this._midPoints.length)return Bt({featureCoords:c,precision:this.coordinatePrecision,project:this.config.project,unproject:this.config.unproject,projection:this.config.projection}).map(((c,u)=>({id:this._midPoints[u],geometry:{type:"Point",coordinates:c}})))}}class Nt extends dt{constructor(c){super(c),this._selectionPoints=[]}get ids(){return this._selectionPoints.concat()}set ids(c){}create(c,u,d){this._selectionPoints=this.store.create(function(c,u,d){const p=[],g="Polygon"===u?c.length-1:c.length;for(let u=0;u<g;u++)p.push({geometry:{type:"Point",coordinates:c[u]},properties:d(u)});return p}(c,u,(c=>({mode:this.mode,selectionPoint:!0,selectionPointFeatureId:d,index:c}))))}delete(){this.ids.length&&(this.store.delete(this.ids),this._selectionPoints=[])}getUpdated(c){if(0!==this._selectionPoints.length)return this._selectionPoints.map(((u,d)=>({id:u,geometry:{type:"Point",coordinates:c[d]}})))}getOneUpdated(c,u){if(void 0!==this._selectionPoints[c])return{id:this._selectionPoints[c],geometry:{type:"Point",coordinates:u}}}}function Vt(c,u){let d=!1;for(let _=0,y=u.length;_<y;_++){const y=u[_];for(let u=0,_=y.length,x=_-1;u<_;x=u++)(g=y[u])[1]>(p=c)[1]!=(f=y[x])[1]>p[1]&&p[0]<(f[0]-g[0])*(p[1]-g[1])/(f[1]-g[1])+g[0]&&(d=!d)}var p,g,f;return d}const At=(c,u,d)=>{const o=c=>c*c,r=(c,u)=>o(c.x-u.x)+o(c.y-u.y);return Math.sqrt(((c,u,d)=>{const p=r(u,d);if(0===p)return r(c,u);let g=((c.x-u.x)*(d.x-u.x)+(c.y-u.y)*(d.y-u.y))/p;return g=Math.max(0,Math.min(1,g)),r(c,{x:u.x+g*(d.x-u.x),y:u.y+g*(d.y-u.y)})})(c,u,d))};class Rt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.createClickBoundingBox=void 0,this.pixelDistance=void 0,this.config=c,this.createClickBoundingBox=u,this.pixelDistance=d}find(c,u){let d,p,g,f,_=1/0,y=1/0,x=1/0;const v=this.createClickBoundingBox.create(c),C=this.store.search(v);for(let v=0;v<C.length;v++){const M=C[v],T=M.geometry;if("Point"===T.type){if(M.properties.selectionPoint||!u&&M.properties[N])continue;const p=this.pixelDistance.measure(c,T.coordinates);M.properties[N]&&p<this.pointerDistance&&p<x?(x=p,g=M):!M.properties[N]&&p<this.pointerDistance&&p<_&&(_=p,d=M)}else if("LineString"===T.type){if(d)continue;for(let u=0;u<T.coordinates.length-1;u++){const d=T.coordinates[u],g=T.coordinates[u+1],f=At({x:c.containerX,y:c.containerY},this.project(d[0],d[1]),this.project(g[0],g[1]));f<this.pointerDistance&&f<y&&(y=f,p=M)}}else if("Polygon"===T.type){if(d||p)continue;Vt([c.lng,c.lat],T.coordinates)&&(f=M)}}return{clickedFeature:d||p||f,clickedMidPoint:g}}}class Tt extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.featuresAtMouseEvent=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedFeatureId=null,this.dragPosition=void 0,this.config=c,this.featuresAtMouseEvent=u,this.selectionPoints=d,this.midPoints=p}startDragging(c,u){this.draggedFeatureId=u,this.dragPosition=[c.lng,c.lat]}stopDragging(){this.draggedFeatureId=null,this.dragPosition=void 0}isDragging(){return null!==this.draggedFeatureId}canDrag(c,u){const{clickedFeature:d}=this.featuresAtMouseEvent.find(c,!0);return!(!d||d.id!==u)}drag(c,u){if(!this.draggedFeatureId)return;const d=this.store.getGeometryCopy(this.draggedFeatureId),p=[c.lng,c.lat];if("Polygon"===d.type||"LineString"===d.type){let g,f;if("Polygon"===d.type?(g=d.coordinates[0],f=g.length-1):(g=d.coordinates,f=g.length),!this.dragPosition)return!1;for(let c=0;c<f;c++){const u=g[c],d=[this.dragPosition[0]-p[0],this.dragPosition[1]-p[1]],f=e(u[0]-d[0],this.config.coordinatePrecision),_=e(u[1]-d[1],this.config.coordinatePrecision);if(f>180||f<-180||_>90||_<-90)return!1;g[c]=[f,_]}"Polygon"===d.type&&(g[g.length-1]=[g[0][0],g[0][1]]);const _=this.selectionPoints.getUpdated(g)||[],y=this.midPoints.getUpdated(g)||[];if(u&&!u({type:"Feature",id:this.draggedFeatureId,geometry:d,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:k.Provisional}))return!1;this.store.updateGeometry([{id:this.draggedFeatureId,geometry:d},..._,...y]),this.dragPosition=[c.lng,c.lat]}else"Point"===d.type&&(this.store.updateGeometry([{id:this.draggedFeatureId,geometry:{type:"Point",coordinates:p}}]),this.dragPosition=[c.lng,c.lat])}}class Xt extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.draggedCoordinate={id:null,index:-1},this.config=c,this.pixelDistance=u,this.selectionPoints=d,this.midPoints=p}getClosestCoordinate(c,u){const d={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let p;if("LineString"===u.type)p=u.coordinates;else{if("Polygon"!==u.type)return d;p=u.coordinates[0]}for(let g=0;g<p.length;g++){const f=this.pixelDistance.measure(c,p[g]);if(f<this.pointerDistance&&f<d.dist){const c="Polygon"===u.type&&(g===p.length-1||0===g);d.dist=f,d.index=c?0:g,d.isFirstOrLastPolygonCoord=c}}return d}getDraggableIndex(c,u){const d=this.store.getGeometryCopy(u),p=this.getClosestCoordinate(c,d);return-1===p.index?-1:p.index}drag(c,u,d){if(!this.draggedCoordinate.id)return!1;const p=this.draggedCoordinate.index,g=this.store.getGeometryCopy(this.draggedCoordinate.id),f="LineString"===g.type?g.coordinates:g.coordinates[0],_=[c.lng,c.lat];if(c.lng>180||c.lng<-180||c.lat>90||c.lat<-90)return!1;if("Polygon"!==g.type||p!==f.length-1&&0!==p)f[p]=_;else{const c=f.length-1;f[0]=_,f[c]=_}const y=this.selectionPoints.getOneUpdated(p,_),x=y?[y]:[],v=this.midPoints.getUpdated(f)||[];return!("Point"!==g.type&&!u&&ot({type:"Feature",geometry:g,properties:{}})||d&&!d({type:"Feature",id:this.draggedCoordinate.id,geometry:g,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:k.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:g},...x,...v]),0))}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,u){this.draggedCoordinate={id:c,index:u}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}}function Ut(c){let u=0,d=0,p=0;return("Polygon"===c.geometry.type?c.geometry.coordinates[0].slice(0,-1):c.geometry.coordinates).forEach((c=>{u+=c[0],d+=c[1],p++}),!0),[u/p,d/p]}function Yt(c,u){c[0]+=c[0]-u[0]>180?-360:u[0]-c[0]>180?360:0;const d=B,p=u[1]*Math.PI/180,g=c[1]*Math.PI/180,f=g-p;let _=Math.abs(c[0]-u[0])*Math.PI/180;_>Math.PI&&(_-=2*Math.PI);const y=Math.log(Math.tan(g/2+Math.PI/4)/Math.tan(p/2+Math.PI/4)),x=Math.abs(y)>1e-11?f/y:Math.cos(p);return Math.sqrt(f*f+x*x*_*_)*d}function Kt(c){const u=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((c=>{const{x:u,y:d}=Q(c[0],c[1]);return[u,d]}));return"Polygon"===c.geometry.type?function(c){let u=0,d=0,p=0;const g=c.length;for(let f=0;f<g-1;f++){const[g,_]=c[f],[y,x]=c[f+1],v=g*x-y*_;u+=v,d+=(g+y)*v,p+=(_+x)*v}return u/=2,d/=6*u,p/=6*u,{x:d,y:p}}(u):function(c){const u=c.length;let d=0,p=0;for(let g=0;g<u;g++){const[u,f]=c[g];d+=u,p+=f}return{x:d/u,y:p/u}}(u)}class zt extends dt{constructor(c,u,d){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastBearing=void 0,this.config=c,this.selectionPoints=u,this.midPoints=d}reset(){this.lastBearing=void 0}rotate(c,u,d){const p=this.store.getGeometryCopy(u);if("Polygon"!==p.type&&"LineString"!==p.type)return;const g=[c.lng,c.lat];let f;const _={type:"Feature",geometry:p,properties:{}};if("web-mercator"===this.config.projection){if(f=function vt({x:c,y:u},{x:d,y:p}){let g=Math.atan2(p-u,d-c);return g*=180/Math.PI,g>180?g-=360:g<-180&&(g+=360),g}(Kt(_),Q(c.lng,c.lat)),!this.lastBearing)return void(this.lastBearing=f);((c,u)=>{if(0===u||360===u||-360===u)return c;const d=.017453292519943295*u,p=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,u])=>Q(c,u))),g=p.reduce(((c,u)=>({x:c.x+u.x,y:c.y+u.y})),{x:0,y:0});g.x/=p.length,g.y/=p.length;const f=p.map((c=>({x:g.x+(c.x-g.x)*Math.cos(d)-(c.y-g.y)*Math.sin(d),y:g.y+(c.x-g.x)*Math.sin(d)+(c.y-g.y)*Math.cos(d)}))).map((({x:c,y:u})=>[tt(c,u).lng,tt(c,u).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=f:(console.log("rotatedCoordinates linestring",f),c.geometry.coordinates=f)})(_,-(this.lastBearing-f))}else{if("globe"!==this.config.projection)throw new Error("Unsupported projection");if(f=Ot(Ut({type:"Feature",geometry:p,properties:{}}),g),!this.lastBearing)return void(this.lastBearing=f+180);!function(c,u){if(0===u||360===u||-360===u)return c;const d=Ut(c);("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const p=Ot(d,c)+u,g=Yt(d,c),f=jt(d,g,p);c[0]=f[0],c[1]=f[1]}))}(_,-(this.lastBearing-(f+180)))}const y="Polygon"===p.type?p.coordinates[0]:p.coordinates;y.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const x=this.midPoints.getUpdated(y)||[],v=this.selectionPoints.getUpdated(y)||[];if(d&&!d({id:u,type:"Feature",geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:k.Provisional}))return!1;this.store.updateGeometry([{id:u,geometry:p},...v,...x]),"web-mercator"===this.projection?this.lastBearing=f:"globe"===this.projection&&(this.lastBearing=f+180)}}class Ht extends dt{constructor(c,u,d){super(c),this.config=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.lastDistance=void 0,this.config=c,this.selectionPoints=u,this.midPoints=d}reset(){this.lastDistance=void 0}scale(c,u,d){const p=this.store.getGeometryCopy(u);if("Polygon"!==p.type&&"LineString"!==p.type)return;const g=[c.lng,c.lat],f={type:"Feature",geometry:p,properties:{}};let _;const y=Kt(f);if("web-mercator"===this.config.projection){const u=Q(c.lng,c.lat);_=i$1(y,u)}else{if("globe"!==this.config.projection)throw new Error("Invalid projection");_=Y(Ut({type:"Feature",geometry:p,properties:{}}),g)}if(!this.lastDistance)return void(this.lastDistance=_);const x=1-(this.lastDistance-_)/_;if("web-mercator"===this.config.projection){const{lng:c,lat:u}=tt(y.x,y.y);!function(c,u,d){if(1===u)return c;const p=("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).map((([c,u])=>Q(c,u))),g=Q(d[0],d[1]),f=p.map((c=>({x:g.x+(c.x-g.x)*u,y:g.y+(c.y-g.y)*u}))).map((({x:c,y:u})=>[tt(c,u).lng,tt(c,u).lat]));"Polygon"===c.geometry.type?c.geometry.coordinates[0]=f:c.geometry.coordinates=f}(f,x,[c,u])}else"globe"===this.config.projection&&function(c,u,d,p="xy"){1===u||("Polygon"===c.geometry.type?c.geometry.coordinates[0]:c.geometry.coordinates).forEach((c=>{const g=Yt(d,c),f=Ot(d,c),_=jt(d,g*u,f);"x"!==p&&"xy"!==p||(c[0]=_[0]),"y"!==p&&"xy"!==p||(c[1]=_[1])}))}(f,x,Ut(f));const v="Polygon"===p.type?p.coordinates[0]:p.coordinates;v.forEach((c=>{c[0]=e(c[0],this.coordinatePrecision),c[1]=e(c[1],this.coordinatePrecision)}));const C=this.midPoints.getUpdated(v)||[],M=this.selectionPoints.getUpdated(v)||[];if(d&&!d({id:u,type:"Feature",geometry:p,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:k.Provisional}))return!1;this.store.updateGeometry([{id:u,geometry:p},...M,...C]),this.lastDistance=_}}class $t extends dt{constructor(c,u,d,p){super(c),this.config=void 0,this.pixelDistance=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.minimumScale=1e-4,this.draggedCoordinate={id:null,index:-1},this.boundingBoxMaps={opposite:{0:4,1:5,2:6,3:7,4:0,5:1,6:2,7:3}},this.config=c,this.pixelDistance=u,this.selectionPoints=d,this.midPoints=p}getClosestCoordinate(c,u){const d={dist:1/0,index:-1,isFirstOrLastPolygonCoord:!1};let p;if("LineString"===u.type)p=u.coordinates;else{if("Polygon"!==u.type)return d;p=u.coordinates[0]}for(let g=0;g<p.length;g++){const f=this.pixelDistance.measure(c,p[g]);if(f<this.pointerDistance&&f<d.dist){const c="Polygon"===u.type&&(g===p.length-1||0===g);d.dist=f,d.index=c?0:g,d.isFirstOrLastPolygonCoord=c}}return d}isValidDragWebMercator(c,u,d){switch(c){case 0:if(u<=0||d>=0)return!1;break;case 1:if(d>=0)return!1;break;case 2:if(u>=0||d>=0)return!1;break;case 3:if(u>=0)return!1;break;case 4:if(u>=0||d<=0)return!1;break;case 5:if(d<=0)return!1;break;case 6:if(u<=0||d<=0)return!1;break;case 7:if(u<=0)return!1}return!0}getSelectedFeatureDataWebMercator(){if(!this.draggedCoordinate.id||-1===this.draggedCoordinate.index)return null;const c=this.getFeature(this.draggedCoordinate.id);if(!c)return null;const u=this.getNormalisedCoordinates(c.geometry);return{boundingBox:this.getBBoxWebMercator(u),feature:c,updatedCoords:u,selectedCoordinate:u[this.draggedCoordinate.index]}}centerWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{feature:d,boundingBox:p,updatedCoords:g,selectedCoordinate:f}=u,_=Kt(d);if(!_)return null;const y=Q(f[0],f[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(p,y),v=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:x,updatedCoords:g,webMercatorCursor:v,webMercatorSelected:y,webMercatorOrigin:_}),g}centerFixedWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{feature:d,boundingBox:p,updatedCoords:g,selectedCoordinate:f}=u,_=Kt(d);if(!_)return null;const y=Q(f[0],f[1]),{closestBBoxIndex:x}=this.getIndexesWebMercator(p,y),v=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:x,updatedCoords:g,webMercatorCursor:v,webMercatorSelected:y,webMercatorOrigin:_}),g}scaleFixedWebMercator({closestBBoxIndex:c,webMercatorOrigin:u,webMercatorSelected:d,webMercatorCursor:p,updatedCoords:g}){if(!this.isValidDragWebMercator(c,u.x-p.x,u.y-p.y))return null;let f=i$1(u,p)/i$1(u,d);return f<0&&(f=this.minimumScale),this.performWebMercatorScale(g,u.x,u.y,f,f),g}oppositeFixedWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{boundingBox:d,updatedCoords:p,selectedCoordinate:g}=u,f=Q(g[0],g[1]),{oppositeBboxIndex:_,closestBBoxIndex:y}=this.getIndexesWebMercator(d,f),x={x:d[_][0],y:d[_][1]},v=Q(c.lng,c.lat);return this.scaleFixedWebMercator({closestBBoxIndex:y,updatedCoords:p,webMercatorCursor:v,webMercatorSelected:f,webMercatorOrigin:x}),p}oppositeWebMercatorDrag(c){const u=this.getSelectedFeatureDataWebMercator();if(!u)return null;const{boundingBox:d,updatedCoords:p,selectedCoordinate:g}=u,f=Q(g[0],g[1]),{oppositeBboxIndex:_,closestBBoxIndex:y}=this.getIndexesWebMercator(d,f),x={x:d[_][0],y:d[_][1]},v=Q(c.lng,c.lat);return this.scaleWebMercator({closestBBoxIndex:y,updatedCoords:p,webMercatorCursor:v,webMercatorSelected:f,webMercatorOrigin:x}),p}scaleWebMercator({closestBBoxIndex:c,webMercatorOrigin:u,webMercatorSelected:d,webMercatorCursor:p,updatedCoords:g}){const f=u.x-p.x,_=u.y-p.y;if(!this.isValidDragWebMercator(c,f,_))return null;let y=1;0!==f&&1!==c&&5!==c&&(y=1-(u.x-d.x-f)/f);let x=1;return 0!==_&&3!==c&&7!==c&&(x=1-(u.y-d.y-_)/_),this.validateScale(y,x)?(y<0&&(y=this.minimumScale),x<0&&(x=this.minimumScale),this.performWebMercatorScale(g,u.x,u.y,y,x),g):null}getFeature(c){if(null===this.draggedCoordinate.id)return null;const u=this.store.getGeometryCopy(c);return"Polygon"!==u.type&&"LineString"!==u.type?null:{type:"Feature",geometry:u,properties:{}}}getNormalisedCoordinates(c){return"Polygon"===c.type?c.coordinates[0]:c.coordinates}validateScale(c,u){const d=!isNaN(c)&&u<Number.MAX_SAFE_INTEGER,p=!isNaN(u)&&u<Number.MAX_SAFE_INTEGER;return d&&p}performWebMercatorScale(c,u,d,p,g){c.forEach((c=>{const{x:f,y:_}=Q(c[0],c[1]),y=u+(f-u)*p,x=d+(_-d)*g,{lng:v,lat:C}=tt(y,x);c[0]=v,c[1]=C}))}getBBoxWebMercator(c){const u=[1/0,1/0,-1/0,-1/0];(c=c.map((c=>{const{x:u,y:d}=Q(c[0],c[1]);return[u,d]}))).forEach((([c,d])=>{c<u[0]&&(u[0]=c),d<u[1]&&(u[1]=d),c>u[2]&&(u[2]=c),d>u[3]&&(u[3]=d)}));const[d,p,g,f]=u;return[[d,f],[(d+g)/2,f],[g,f],[g,f+(p-f)/2],[g,p],[(d+g)/2,p],[d,p],[d,f+(p-f)/2]]}getIndexesWebMercator(c,u){let d,p=1/0;for(let g=0;g<c.length;g++){const f=i$1({x:u.x,y:u.y},{x:c[g][0],y:c[g][1]});f<p&&(d=g,p=f)}if(void 0===d)throw new Error("No closest coordinate found");return{oppositeBboxIndex:this.boundingBoxMaps.opposite[d],closestBBoxIndex:d}}isDragging(){return null!==this.draggedCoordinate.id}startDragging(c,u){this.draggedCoordinate={id:c,index:u}}stopDragging(){this.draggedCoordinate={id:null,index:-1}}getDraggableIndex(c,u){const d=this.store.getGeometryCopy(u),p=this.getClosestCoordinate(c,d);return-1===p.index?-1:p.index}drag(c,u,d){if(!this.draggedCoordinate.id)return!1;const p=this.getFeature(this.draggedCoordinate.id);if(!p)return!1;let g=null;if("center"===u?g=this.centerWebMercatorDrag(c):"opposite"===u?g=this.oppositeWebMercatorDrag(c):"center-fixed"===u?g=this.centerFixedWebMercatorDrag(c):"opposite-fixed"===u&&(g=this.oppositeFixedWebMercatorDrag(c)),!g)return!1;for(let c=0;c<g.length;c++){const u=g[c];if(u[0]=e(u[0],this.coordinatePrecision),u[1]=e(u[1],this.coordinatePrecision),!st(u,this.coordinatePrecision))return!1}const f=this.midPoints.getUpdated(g)||[],_=this.selectionPoints.getUpdated(g)||[],y={type:p.geometry.type,coordinates:"Polygon"===p.geometry.type?[g]:g};return!(d&&!d({id:this.draggedCoordinate.id,type:"Feature",geometry:y,properties:{}},{project:this.config.project,unproject:this.config.unproject,coordinatePrecision:this.config.coordinatePrecision,updateType:k.Provisional})||(this.store.updateGeometry([{id:this.draggedCoordinate.id,geometry:y},..._,...f]),0))}}class Jt extends U{constructor(c){var u;super(c),this.mode="select",this.allowManualDeselection=!0,this.dragEventThrottle=5,this.dragEventCount=0,this.selected=[],this.flags=void 0,this.keyEvents=void 0,this.selectionPoints=void 0,this.midPoints=void 0,this.featuresAtMouseEvent=void 0,this.pixelDistance=void 0,this.clickBoundingBox=void 0,this.dragFeature=void 0,this.dragCoordinate=void 0,this.rotateFeature=void 0,this.scaleFeature=void 0,this.dragCoordinateResizeFeature=void 0,this.cursors=void 0,this.validations={},this.flags=c&&c.flags?c.flags:{};const d={pointerOver:"move",dragStart:"move",dragEnd:"move",insertMidpoint:"crosshair"};if(this.cursors=c&&c.cursors?t({},d,c.cursors):d,null===(null==c?void 0:c.keyEvents))this.keyEvents={deselect:null,delete:null,rotate:null,scale:null};else{const u={deselect:"Escape",delete:"Delete",rotate:["Control","r"],scale:["Control","s"]};this.keyEvents=c&&c.keyEvents?t({},u,c.keyEvents):u}if(this.dragEventThrottle=c&&void 0!==c.dragEventThrottle&&c.dragEventThrottle||5,this.allowManualDeselection=null==(u=null==c?void 0:c.allowManualDeselection)||u,c&&c.flags&&c.flags)for(const u in c.flags){const d=c.flags[u].feature;d&&d.validation&&(this.validations[u]=d.validation)}}selectFeature(c){this.select(c,!1)}setSelecting(){if("started"!==this._state)throw new Error("Mode must be started to move to selecting state");this._state="selecting"}registerBehaviors(c){this.pixelDistance=new pt(c),this.clickBoundingBox=new gt(c),this.featuresAtMouseEvent=new Rt(c,this.clickBoundingBox,this.pixelDistance),this.selectionPoints=new Nt(c),this.midPoints=new Gt(c,this.selectionPoints),this.rotateFeature=new zt(c,this.selectionPoints,this.midPoints),this.scaleFeature=new Ht(c,this.selectionPoints,this.midPoints),this.dragFeature=new Tt(c,this.featuresAtMouseEvent,this.selectionPoints,this.midPoints),this.dragCoordinate=new Xt(c,this.pixelDistance,this.selectionPoints,this.midPoints),this.dragCoordinateResizeFeature=new $t(c,this.pixelDistance,this.selectionPoints,this.midPoints)}deselectFeature(){this.deselect()}deselect(){const c=this.selected.filter((c=>this.store.has(c))).map((c=>({id:c,property:O,value:!1})));this.store.updateProperty(c),this.onDeselect(this.selected[0]),this.selected=[],this.selectionPoints.delete(),this.midPoints.delete()}deleteSelected(){this.store.delete(this.selected),this.selected=[]}onRightClick(c){if(!this.selectionPoints.ids.length)return;let u,d=1/0;if(this.selectionPoints.ids.forEach((p=>{const g=this.store.getGeometryCopy(p),f=this.pixelDistance.measure(c,g.coordinates);f<this.pointerDistance&&f<d&&(d=f,u=this.store.getPropertiesCopy(p))})),!u)return;const p=u.selectionPointFeatureId,g=u.index,f=this.store.getPropertiesCopy(p),_=this.flags[f.mode],y=this.validations[f.mode];if(!(_&&_.feature&&_.feature.coordinates&&_.feature.coordinates.deletable))return;const x=this.store.getGeometryCopy(p);let v;if("Polygon"===x.type){if(v=x.coordinates[0],v.length<=4)return}else if("LineString"===x.type&&(v=x.coordinates,v.length<=3))return;if(v){if("Polygon"===x.type&&0===g||g===v.length-1?(v.shift(),v.pop(),v.push([v[0][0],v[0][1]])):v.splice(g,1),y&&!y({id:p,type:"Feature",geometry:x,properties:f},{project:this.project,unproject:this.unproject,coordinatePrecision:this.coordinatePrecision,updateType:k.Commit}))return;this.store.delete([...this.midPoints.ids,...this.selectionPoints.ids]),this.store.updateGeometry([{id:p,geometry:x}]),this.selectionPoints.create(v,x.type,p),_&&_.feature&&_.feature.coordinates&&_.feature.coordinates.midpoints&&this.midPoints.create(v,p,this.coordinatePrecision)}}select(c,u=!0){if(this.selected[0]===c)return;const{mode:d}=this.store.getPropertiesCopy(c),p=this.flags[d];if(!p||!p.feature)return;const g=this.selected[0];if(g){if(g===c)return;this.deselect()}u&&this.setCursor(this.cursors.pointerOver),this.selected=[c],this.store.updateProperty([{id:c,property:"selected",value:!0}]),this.onSelect(c);const{type:f,coordinates:_}=this.store.getGeometryCopy(c);if("LineString"!==f&&"Polygon"!==f)return;const y="LineString"===f?_:_[0];y&&p&&p.feature.coordinates&&(this.selectionPoints.create(y,f,c),p.feature.coordinates.midpoints&&this.midPoints.create(y,c,this.coordinatePrecision))}onLeftClick(c){const{clickedFeature:u,clickedMidPoint:d}=this.featuresAtMouseEvent.find(c,this.selected.length>0);if(this.selected.length&&d)this.midPoints.insert(d.id,this.coordinatePrecision);else if(u&&u.id)this.select(u.id,!0);else if(this.selected.length&&this.allowManualDeselection)return void this.deselect()}start(){this.setStarted(),this.setSelecting()}stop(){this.cleanUp(),this.setStarted(),this.setStopped()}onClick(c){"right"!==c.button?"left"===c.button&&this.onLeftClick(c):this.onRightClick(c)}canScale(c){return this.keyEvents.scale&&this.keyEvents.scale.every((u=>c.heldKeys.includes(u)))}canRotate(c){return this.keyEvents.rotate&&this.keyEvents.rotate.every((u=>c.heldKeys.includes(u)))}preventDefaultKeyEvent(c){const u=this.canRotate(c),d=this.canScale(c);(u||d)&&c.preventDefault()}onKeyDown(c){this.preventDefaultKeyEvent(c)}onKeyUp(c){if(this.preventDefaultKeyEvent(c),this.keyEvents.delete&&c.key===this.keyEvents.delete){if(!this.selected.length)return;this.onDeselect(this.selected[0]),this.deleteSelected(),this.selectionPoints.delete(),this.midPoints.delete()}else this.keyEvents.deselect&&c.key===this.keyEvents.deselect&&this.cleanUp()}cleanUp(){this.selected.length&&this.deselect()}onDragStart(c,u){if(!this.selected.length)return;const d=this.store.getPropertiesCopy(this.selected[0]),p=this.flags[d.mode];if(!(p&&p.feature&&(p.feature.draggable||p.feature.coordinates&&p.feature.coordinates.draggable||p.feature.coordinates&&p.feature.coordinates.resizable)))return;this.dragEventCount=0;const g=this.selected[0],f=this.dragCoordinate.getDraggableIndex(c,g);return p&&p.feature&&p.feature.coordinates&&(p.feature.coordinates.draggable||p.feature.coordinates.resizable)&&-1!==f?(this.setCursor(this.cursors.dragStart),p.feature.coordinates.resizable?this.dragCoordinateResizeFeature.startDragging(g,f):this.dragCoordinate.startDragging(g,f),void u(!1)):p&&p.feature&&p.feature.draggable&&this.dragFeature.canDrag(c,g)?(this.setCursor(this.cursors.dragStart),this.dragFeature.startDragging(c,g),void u(!1)):void 0}onDrag(c,u){const d=this.selected[0];if(!d)return;const p=this.store.getPropertiesCopy(d),g=this.flags[p.mode],f=!0===(g&&g.feature&&g.feature.selfIntersectable);if(this.dragEventCount++,this.dragEventCount%this.dragEventThrottle==0)return;const _=this.validations[p.mode];if(g&&g.feature&&g.feature.rotateable&&this.canRotate(c))return u(!1),void this.rotateFeature.rotate(c,d,_);if(g&&g.feature&&g.feature.scaleable&&this.canScale(c))return u(!1),void this.scaleFeature.scale(c,d,_);if(this.dragCoordinateResizeFeature.isDragging()&&g.feature&&g.feature.coordinates&&g.feature.coordinates.resizable){if("globe"===this.projection)throw new Error("Globe is currently unsupported projection for resizable");return u(!1),void this.dragCoordinateResizeFeature.drag(c,g.feature.coordinates.resizable,_)}this.dragCoordinate.isDragging()?this.dragCoordinate.drag(c,f,_):this.dragFeature.isDragging()?this.dragFeature.drag(c,_):u(!0)}onDragEnd(c,u){this.setCursor(this.cursors.dragEnd),this.dragCoordinate.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinate"}):this.dragFeature.isDragging()?this.onFinish(this.selected[0],{mode:this.mode,action:"dragFeature"}):this.dragCoordinateResizeFeature.isDragging()&&this.onFinish(this.selected[0],{mode:this.mode,action:"dragCoordinateResize"}),this.dragCoordinate.stopDragging(),this.dragFeature.stopDragging(),this.dragCoordinateResizeFeature.stopDragging(),this.rotateFeature.reset(),this.scaleFeature.reset(),u(!0)}onMouseMove(c){if(!this.selected.length)return void this.setCursor("unset");if(this.dragFeature.isDragging())return;let u=!1;this.midPoints.ids.forEach((d=>{if(u)return;const p=this.store.getGeometryCopy(d);this.pixelDistance.measure(c,p.coordinates)<this.pointerDistance&&(u=!0)}));let d=!1;if(this.selectionPoints.ids.forEach((p=>{const g=this.store.getGeometryCopy(p);this.pixelDistance.measure(c,g.coordinates)<this.pointerDistance&&(u=!1,d=!0)})),u)return void this.setCursor(this.cursors.insertMidpoint);const{clickedFeature:p}=this.featuresAtMouseEvent.find(c,!0);this.setCursor(this.selected.length>0&&(p&&p.id===this.selected[0]||d)?this.cursors.pointerOver:"unset")}styleFeature(c){const u=t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0});if(c.properties.mode===this.mode&&"Point"===c.geometry.type){if(c.properties.selectionPoint)return u.pointColor=this.getHexColorStylingValue(this.styles.selectionPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectionPointOutlineColor,u.pointOutlineColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.selectionPointWidth,u.pointWidth,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectionPointOutlineWidth,2,c),u.zIndex=30,u;if(c.properties.midPoint)return u.pointColor=this.getHexColorStylingValue(this.styles.midPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.midPointOutlineColor,u.pointOutlineColor,c),u.pointWidth=this.getNumericStylingValue(this.styles.midPointWidth,4,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.midPointOutlineWidth,2,c),u.zIndex=40,u}else if(c.properties[O]){if("Polygon"===c.geometry.type)return u.polygonFillColor=this.getHexColorStylingValue(this.styles.selectedPolygonColor,u.polygonFillColor,c),u.polygonOutlineWidth=this.getNumericStylingValue(this.styles.selectedPolygonOutlineWidth,u.polygonOutlineWidth,c),u.polygonOutlineColor=this.getHexColorStylingValue(this.styles.selectedPolygonOutlineColor,u.polygonOutlineColor,c),u.polygonFillOpacity=this.getNumericStylingValue(this.styles.selectedPolygonFillOpacity,u.polygonFillOpacity,c),u.zIndex=10,u;if("LineString"===c.geometry.type)return u.lineStringColor=this.getHexColorStylingValue(this.styles.selectedLineStringColor,u.lineStringColor,c),u.lineStringWidth=this.getNumericStylingValue(this.styles.selectedLineStringWidth,u.lineStringWidth,c),u.zIndex=10,u;if("Point"===c.geometry.type)return u.pointWidth=this.getNumericStylingValue(this.styles.selectedPointWidth,u.pointWidth,c),u.pointColor=this.getHexColorStylingValue(this.styles.selectedPointColor,u.pointColor,c),u.pointOutlineColor=this.getHexColorStylingValue(this.styles.selectedPointOutlineColor,u.pointOutlineColor,c),u.pointOutlineWidth=this.getNumericStylingValue(this.styles.selectedPointOutlineWidth,u.pointOutlineWidth,c),u.zIndex=10,u}return u}}class Zt extends X{constructor(...c){super(...c),this.type=j.Static,this.mode="static"}start(){}stop(){}onKeyUp(){}onKeyDown(){}onClick(){}onDragStart(){}onDrag(){}onDragEnd(){}onMouseMove(){}cleanUp(){}styleFeature(){return t({},{polygonFillColor:"#3f97e0",polygonOutlineColor:"#3f97e0",polygonOutlineWidth:4,polygonFillOpacity:.3,pointColor:"#3f97e0",pointOutlineColor:"#ffffff",pointOutlineWidth:0,pointWidth:6,lineStringColor:"#3f97e0",lineStringWidth:4,zIndex:0})}}function qt(c,u,d,p,g){for(;p>d;){if(p-d>600){const f=p-d+1,_=u-d+1,y=Math.log(f),x=.5*Math.exp(2*y/3),v=.5*Math.sqrt(y*x*(f-x)/f)*(_-f/2<0?-1:1);qt(c,u,Math.max(d,Math.floor(u-_*x/f+v)),Math.min(p,Math.floor(u+(f-_)*x/f+v)),g)}const f=c[u];let _=d,y=p;for(Qt(c,d,u),g(c[p],f)>0&&Qt(c,d,p);_<y;){for(Qt(c,_,y),_++,y--;g(c[_],f)<0;)_++;for(;g(c[y],f)>0;)y--}0===g(c[d],f)?Qt(c,d,y):(y++,Qt(c,y,p)),y<=u&&(d=y+1),u<=y&&(p=y-1)}}function Qt(c,u,d){const p=c[u];c[u]=c[d],c[d]=p}function te(c,u){ee(c,0,c.children.length,u,c)}function ee(c,u,d,p,g){g||(g=ce([])),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let f=u;f<d;f++){const u=c.children[f];ie(g,c.leaf?p(u):u)}return g}function ie(c,u){return c.minX=Math.min(c.minX,u.minX),c.minY=Math.min(c.minY,u.minY),c.maxX=Math.max(c.maxX,u.maxX),c.maxY=Math.max(c.maxY,u.maxY),c}function oe(c,u){return c.minX-u.minX}function re(c,u){return c.minY-u.minY}function se(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function ne(c){return c.maxX-c.minX+(c.maxY-c.minY)}function ae(c,u){const d=Math.max(c.minX,u.minX),p=Math.max(c.minY,u.minY),g=Math.min(c.maxX,u.maxX),f=Math.min(c.maxY,u.maxY);return Math.max(0,g-d)*Math.max(0,f-p)}function le(c,u){return c.minX<=u.minX&&c.minY<=u.minY&&u.maxX<=c.maxX&&u.maxY<=c.maxY}function he(c,u){return u.minX<=c.maxX&&u.minY<=c.maxY&&u.maxX>=c.minX&&u.maxY>=c.minY}function ce(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function de(c,u,d,p,g){const f=[u,d];for(;f.length;){if((d=f.pop())-(u=f.pop())<=p)continue;const _=u+Math.ceil((d-u)/p/2)*p;qt(c,_,u,d,g),f.push(u,_,_,d)}}class ue{constructor(c){this._maxEntries=void 0,this._minEntries=void 0,this.data=void 0,this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}search(c){let u=this.data;const d=[];if(!he(c,u))return d;const p=this.toBBox,g=[];for(;u;){for(let f=0;f<u.children.length;f++){const _=u.children[f],y=u.leaf?p(_):_;he(c,y)&&(u.leaf?d.push(_):le(c,y)?this._all(_,d):g.push(_))}u=g.pop()}return d}collides(c){let u=this.data;if(he(c,u)){const d=[];for(;u;){for(let p=0;p<u.children.length;p++){const g=u.children[p],f=u.leaf?this.toBBox(g):g;if(he(c,f)){if(u.leaf||le(c,f))return!0;d.push(g)}}u=d.pop()}}return!1}load(c){if(c.length<this._minEntries){for(let u=0;u<c.length;u++)this.insert(c[u]);return}let u=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===u.height)this._splitRoot(this.data,u);else{if(this.data.height<u.height){const c=this.data;this.data=u,u=c}this._insert(u,this.data.height-u.height-1,!0)}else this.data=u}insert(c){this._insert(c,this.data.height-1)}clear(){this.data=ce([])}remove(c){let u=this.data;const d=this.toBBox(c),p=[],g=[];let f,_,y=!1;for(;u||p.length;){if(u||(u=p.pop(),_=p[p.length-1],f=g.pop(),y=!0),u.leaf){const d=u.children.indexOf(c);-1!==d&&(u.children.splice(d,1),p.push(u),this._condense(p))}y||u.leaf||!le(u,d)?_?(f++,u=_.children[f],y=!1):u=null:(p.push(u),g.push(f),f=0,_=u,u=u.children[0])}}toBBox(c){return c}compareMinX(c,u){return c.minX-u.minX}compareMinY(c,u){return c.minY-u.minY}_all(c,u){const d=[];for(;c;)c.leaf?u.push(...c.children):d.push(...c.children),c=d.pop();return u}_build(c,u,d,p){const g=d-u+1;let f,_=this._maxEntries;if(g<=_)return f=ce(c.slice(u,d+1)),te(f,this.toBBox),f;p||(p=Math.ceil(Math.log(g)/Math.log(_)),_=Math.ceil(g/Math.pow(_,p-1))),f=ce([]),f.leaf=!1,f.height=p;const y=Math.ceil(g/_),x=y*Math.ceil(Math.sqrt(_));de(c,u,d,x,this.compareMinX);for(let g=u;g<=d;g+=x){const u=Math.min(g+x-1,d);de(c,g,u,y,this.compareMinY);for(let d=g;d<=u;d+=y){const g=Math.min(d+y-1,u);f.children.push(this._build(c,d,g,p-1))}}return te(f,this.toBBox),f}_chooseSubtree(c,u,d,p){for(;p.push(u),!u.leaf&&p.length-1!==d;){let d,p=1/0,_=1/0;for(let y=0;y<u.children.length;y++){const x=u.children[y],v=se(x),C=(g=c,f=x,(Math.max(f.maxX,g.maxX)-Math.min(f.minX,g.minX))*(Math.max(f.maxY,g.maxY)-Math.min(f.minY,g.minY))-v);C<_?(_=C,p=v<p?v:p,d=x):C===_&&v<p&&(p=v,d=x)}u=d||u.children[0]}var g,f;return u}_insert(c,u,d){const p=d?c:this.toBBox(c),g=[],f=this._chooseSubtree(p,this.data,u,g);for(f.children.push(c),ie(f,p);u>=0&&g[u].children.length>this._maxEntries;)this._split(g,u),u--;this._adjustParentBBoxes(p,g,u)}_split(c,u){const d=c[u],p=d.children.length,g=this._minEntries;this._chooseSplitAxis(d,g,p);const f=this._chooseSplitIndex(d,g,p),_=ce(d.children.splice(f,d.children.length-f));_.height=d.height,_.leaf=d.leaf,te(d,this.toBBox),te(_,this.toBBox),u?c[u-1].children.push(_):this._splitRoot(d,_)}_splitRoot(c,u){this.data=ce([c,u]),this.data.height=c.height+1,this.data.leaf=!1,te(this.data,this.toBBox)}_chooseSplitIndex(c,u,d){let p,g=1/0,f=1/0;for(let _=u;_<=d-u;_++){const u=ee(c,0,_,this.toBBox),y=ee(c,_,d,this.toBBox),x=ae(u,y),v=se(u)+se(y);x<g?(g=x,p=_,f=v<f?v:f):x===g&&v<f&&(f=v,p=_)}return p||d-u}_chooseSplitAxis(c,u,d){const p=c.leaf?this.compareMinX:oe,g=c.leaf?this.compareMinY:re;this._allDistMargin(c,u,d,p)<this._allDistMargin(c,u,d,g)&&c.children.sort(p)}_allDistMargin(c,u,d,p){c.children.sort(p);const g=this.toBBox,f=ee(c,0,u,g),_=ee(c,d-u,d,g);let y=ne(f)+ne(_);for(let p=u;p<d-u;p++){const u=c.children[p];ie(f,c.leaf?g(u):u),y+=ne(f)}for(let p=d-u-1;p>=u;p--){const u=c.children[p];ie(_,c.leaf?g(u):u),y+=ne(_)}return y}_adjustParentBBoxes(c,u,d){for(let p=d;p>=0;p--)ie(u[p],c)}_condense(c){for(let u,d=c.length-1;d>=0;d--)0===c[d].children.length?d>0?(u=c[d-1].children,u.splice(u.indexOf(c[d]),1)):this.clear():te(c[d],this.toBBox)}}class ge{constructor(c){this.tree=void 0,this.idToNode=void 0,this.nodeToId=void 0,this.tree=new ue(c&&c.maxEntries?c.maxEntries:9),this.idToNode=new Map,this.nodeToId=new Map}setMaps(c,u){this.idToNode.set(c.id,u),this.nodeToId.set(u,c.id)}toBBox(c){const u=[],d=[];let p;if("Polygon"===c.geometry.type)p=c.geometry.coordinates[0];else if("LineString"===c.geometry.type)p=c.geometry.coordinates;else{if("Point"!==c.geometry.type)throw new Error("Not a valid feature to turn into a bounding box");p=[c.geometry.coordinates]}for(let c=0;c<p.length;c++)d.push(p[c][1]),u.push(p[c][0]);const g=Math.min(...d),f=Math.max(...d);return{minX:Math.min(...u),minY:g,maxX:Math.max(...u),maxY:f}}insert(c){if(this.idToNode.get(String(c.id)))throw new Error("Feature already exists");const u=this.toBBox(c);this.setMaps(c,u),this.tree.insert(u)}load(c){const u=[],d=new Set;c.forEach((c=>{const p=this.toBBox(c);if(this.setMaps(c,p),d.has(String(c.id)))throw new Error(`Duplicate feature ID found ${c.id}`);d.add(String(c.id)),u.push(p)})),this.tree.load(u)}update(c){this.remove(c.id);const u=this.toBBox(c);this.setMaps(c,u),this.tree.insert(u)}remove(c){const u=this.idToNode.get(c);if(!u)throw new Error(`${c} not inserted into the spatial index`);this.tree.remove(u)}clear(){this.tree.clear()}search(c){return this.tree.search(this.toBBox(c)).map((c=>this.nodeToId.get(c)))}collides(c){return this.tree.collides(this.toBBox(c))}}const K={getId:()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(c){const u=16*Math.random()|0;return("x"==c?u:3&u|8).toString(16)})),isValidId:c=>"string"==typeof c&&36===c.length};class ye{constructor(c){this.idStrategy=void 0,this.tracked=void 0,this.spatialIndex=void 0,this.store=void 0,this._onChange=()=>{},this.store={},this.spatialIndex=new ge,this.tracked=!c||!1!==c.tracked,this.idStrategy=c&&c.idStrategy?c.idStrategy:K}clone(c){return JSON.parse(JSON.stringify(c))}getId(){return this.idStrategy.getId()}has(c){return Boolean(this.store[c])}load(c,u){if(0===c.length)return;const d=this.clone(c);d.forEach((c=>{null==c.id&&(c.id=this.idStrategy.getId()),this.tracked&&(c.properties.createdAt?R(c.properties.createdAt):c.properties.createdAt=+new Date,c.properties.updatedAt?R(c.properties.updatedAt):c.properties.updatedAt=+new Date)}));const p=[];d.forEach((c=>{const d=c.id;if(u&&!u(c))throw new Error(`Feature ${d} is not valid: ${JSON.stringify(c)}`);if(this.has(d))throw new Error(`Feature already exists with this id: ${d}`);this.store[d]=c,p.push(d)})),this.spatialIndex.load(d),this._onChange(p,"create")}search(c,u){const d=this.spatialIndex.search(c).map((c=>this.store[c]));return this.clone(u?d.filter(u):d)}registerOnChange(c){this._onChange=(u,d)=>{c(u,d)}}getGeometryCopy(c){const u=this.store[c];if(!u)throw new Error(`No feature with this id (${c}), can not get geometry copy`);return this.clone(u.geometry)}getPropertiesCopy(c){const u=this.store[c];if(!u)throw new Error(`No feature with this id (${c}), can not get properties copy`);return this.clone(u.properties)}updateProperty(c){const u=[];c.forEach((({id:c,property:d,value:p})=>{const g=this.store[c];if(!g)throw new Error(`No feature with this (${c}), can not update geometry`);u.push(c),g.properties[d]=p,this.tracked&&(g.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(u,"update")}updateGeometry(c){const u=[];c.forEach((({id:c,geometry:d})=>{u.push(c);const p=this.store[c];if(!p)throw new Error(`No feature with this (${c}), can not update geometry`);p.geometry=this.clone(d),this.spatialIndex.update(p),this.tracked&&(p.properties.updatedAt=+new Date)})),this._onChange&&this._onChange(u,"update")}create(c){const u=[];return c.forEach((({geometry:c,properties:d})=>{let p,g=t({},d);this.tracked&&(p=+new Date,d?(g.createdAt="number"==typeof d.createdAt?d.createdAt:p,g.updatedAt="number"==typeof d.updatedAt?d.updatedAt:p):g={createdAt:p,updatedAt:p});const f=this.getId(),_={id:f,type:"Feature",geometry:c,properties:g};this.store[f]=_,this.spatialIndex.insert(_),u.push(f)})),this._onChange&&this._onChange([...u],"create"),u}delete(c){c.forEach((c=>{if(!this.store[c])throw new Error("No feature with this id, can not delete");delete this.store[c],this.spatialIndex.remove(c)})),this._onChange&&this._onChange([...c],"delete")}copyAll(){return this.clone(Object.keys(this.store).map((c=>this.store[c])))}clear(){this.store={},this.spatialIndex.clear()}size(){return Object.keys(this.store).length}}class Se{constructor(c){this._modes=void 0,this._mode=void 0,this._adapter=void 0,this._enabled=!1,this._store=void 0,this._eventListeners=void 0,this._instanceSelectMode=void 0,this._adapter=c.adapter,this._mode=new Zt;const u=new Set,d=c.modes.reduce(((c,d)=>{if(u.has(d.mode))throw new Error(`There is already a ${d.mode} mode provided`);return u.add(d.mode),c[d.mode]=d,c}),{}),p=Object.keys(d);if(0===p.length)throw new Error("No modes provided");p.forEach((c=>{if(d[c].type===j.Select){if(this._instanceSelectMode)throw new Error("only one type of select mode can be provided");this._instanceSelectMode=c}})),this._modes=t({},d,{static:this._mode}),this._eventListeners={change:[],select:[],deselect:[],finish:[],ready:[]},this._store=new ye({tracked:!!c.tracked,idStrategy:c.idStrategy?c.idStrategy:void 0});const s=c=>{const u=[],d=this._store.copyAll().filter((d=>!c.includes(d.id)||(u.push(d),!1)));return{changed:u,unchanged:d}},n=(c,u)=>{this._enabled&&this._eventListeners.finish.forEach((d=>{d(c,u)}))},a=(c,u)=>{if(!this._enabled)return;this._eventListeners.change.forEach((d=>{d(c,u)}));const{changed:d,unchanged:p}=s(c);"create"===u?this._adapter.render({created:d,deletedIds:[],unchanged:p,updated:[]},this.getModeStyles()):"update"===u?this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:d},this.getModeStyles()):"delete"===u?this._adapter.render({created:[],deletedIds:c,unchanged:p,updated:[]},this.getModeStyles()):"styling"===u&&this._adapter.render({created:[],deletedIds:[],unchanged:p,updated:[]},this.getModeStyles())},l=c=>{if(!this._enabled)return;this._eventListeners.select.forEach((u=>{u(c)}));const{changed:u,unchanged:d}=s([c]);this._adapter.render({created:[],deletedIds:[],unchanged:d,updated:u},this.getModeStyles())},h=c=>{if(!this._enabled)return;this._eventListeners.deselect.forEach((c=>{c()}));const{changed:u,unchanged:d}=s([c]);u&&this._adapter.render({created:[],deletedIds:[],unchanged:d,updated:u},this.getModeStyles())};Object.keys(this._modes).forEach((c=>{this._modes[c].register({mode:c,store:this._store,setCursor:this._adapter.setCursor.bind(this._adapter),project:this._adapter.project.bind(this._adapter),unproject:this._adapter.unproject.bind(this._adapter),setDoubleClickToZoom:this._adapter.setDoubleClickToZoom.bind(this._adapter),onChange:a,onSelect:l,onDeselect:h,onFinish:n,coordinatePrecision:this._adapter.getCoordinatePrecision()})}))}checkEnabled(){if(!this._enabled)throw new Error("Terra Draw is not enabled")}getModeStyles(){const c={};return Object.keys(this._modes).forEach((u=>{c[u]=c=>this._instanceSelectMode&&c.properties[O]?this._modes[this._instanceSelectMode].styleFeature.bind(this._modes[this._instanceSelectMode])(c):this._modes[u].styleFeature.bind(this._modes[u])(c)})),c}featuresAtLocation({lng:c,lat:u},d){const p=d&&void 0!==d.pointerDistance?d.pointerDistance:30,g=!d||void 0===d.ignoreSelectFeatures||d.ignoreSelectFeatures,f=this._adapter.unproject.bind(this._adapter),_=this._adapter.project.bind(this._adapter),y=_(c,u),x=ut({unproject:f,point:y,pointerDistance:p});return this._store.search(x).filter((d=>{if(g&&(d.properties[N]||d.properties.selectionPoint))return!1;if("Point"===d.geometry.type){const c=d.geometry.coordinates,u=_(c[0],c[1]);return i$1(y,u)<p}if("LineString"===d.geometry.type){const c=d.geometry.coordinates;for(let u=0;u<c.length-1;u++){const d=c[u],g=c[u+1];if(At(y,_(d[0],d[1]),_(g[0],g[1]))<p)return!0}return!1}return!!Vt([c,u],d.geometry.coordinates)||void 0}))}getSelectMode(){if(this.checkEnabled(),!this._instanceSelectMode)throw new Error("No select mode defined in instance");return this.getMode()!==this._instanceSelectMode&&this.setMode(this._instanceSelectMode),this._modes[this._instanceSelectMode]}setModeStyles(c,u){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._modes[c].styles=u}getSnapshot(){return this._store.copyAll()}clear(){this.checkEnabled(),this._adapter.clear()}get enabled(){return this._enabled}set enabled(c){throw new Error("Enabled is read only")}getMode(){return this._mode.mode}setMode(c){if(this.checkEnabled(),!this._modes[c])throw new Error("No mode with this name present");this._mode.stop(),this._mode=this._modes[c],this._mode.start()}removeFeatures(c){this.checkEnabled(),this._store.delete(c)}selectFeature(c){this.getSelectMode().selectFeature(c)}deselectFeature(c){this.getSelectMode().deselectFeature(c)}getFeatureId(){return this._store.getId()}hasFeature(c){return this._store.has(c)}addFeatures(c){this.checkEnabled(),0!==c.length&&this._store.load(c,(c=>{if(Boolean(c&&"object"==typeof c&&"properties"in c&&"object"==typeof c.properties&&null!==c.properties&&"mode"in c.properties)){const u=this._modes[c.properties.mode];return!!u&&u.validateFeature.bind(u)(c)}return!1}))}start(){this._enabled=!0,this._adapter.register({onReady:()=>{this._eventListeners.ready.forEach((c=>{c()}))},getState:()=>this._mode.state,onClick:c=>{this._mode.onClick(c)},onMouseMove:c=>{this._mode.onMouseMove(c)},onKeyDown:c=>{this._mode.onKeyDown(c)},onKeyUp:c=>{this._mode.onKeyUp(c)},onDragStart:(c,u)=>{this._mode.onDragStart(c,u)},onDrag:(c,u)=>{this._mode.onDrag(c,u)},onDragEnd:(c,u)=>{this._mode.onDragEnd(c,u)},onClear:()=>{this._mode.cleanUp(),this._store.clear()}})}getFeaturesAtLngLat(c,u){const{lng:d,lat:p}=c;return this.featuresAtLocation({lng:d,lat:p},u)}getFeaturesAtPointerEvent(c,u){const d=this._adapter.getLngLatFromEvent.bind(this._adapter)(c);return null===d?[]:this.featuresAtLocation(d,u)}stop(){this._enabled=!1,this._adapter.unregister()}on(c,u){const d=this._eventListeners[c];d.includes(u)||d.push(u)}off(c,u){const d=this._eventListeners[c];d.includes(u)&&d.splice(d.indexOf(u),1)}}class MapOption{constructor({name:c,desc:u,example:d,exampleDesc:p,isValid:g}){this.name=c,this.desc=u,this.example=d,this.exampleDesc=p,this.isValid=g}valueOf(){return this.name}}class defaultExport{width="300px";height="300px";center=[121,24];zoom=7;control={scale:!1,fullscreen:!1};layers=[];data=[];aliases=[];svgForAnchor={html:'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg"> <circle r="8" cx="10" cy="10" fill="red" stroke="white" stroke-width="2" /> </svg>',size:[20,20],anchor:[10,10]};svgForMarker={html:'<svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#3FB1CE"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg>',size:[27,41],anchor:[13.5,41]};get map(){if(void 0===this._map)throw Error("map is not set in current Renderer");return this._map}set map(c){if(this._map)throw Error("map cannot be reassigned");this._map=c}get steps(){return[this.setOptionAliases,this.createView,this.addMap,this.setControl,this.addTileData,this.addGPXFile,this.getTerraDrawAdapter,{valueOf:()=>this.setDraw,depends:this.getTerraDrawAdapter},this.setExtra]}validateOption(c,u){const d=this.constructor.validOptions.find((u=>u.valueOf()===c))?.isValid;if(!d)throw Error(`Cannot find inValid method for option ${c}`);return d(u)}static validOptions=Object.freeze([new MapOption({name:"id",desc:"id of map HTML element",isValid:c=>!!c?.match(/\w+/)}),new MapOption({name:"width",desc:"CSS width of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`width: ${c}`)}),new MapOption({name:"height",desc:"CSS height of map HTML element",example:"200px",exampleDesc:"",isValid:c=>window.CSS.supports(`height: ${c}`)}),new MapOption({name:"center",desc:"Center of camera map, value: [lon, lat]",example:"[121, 24]",exampleDesc:"Center of Taiwan",isValid:c=>{try{const[u,d]=JSON.parse(c);return!isNaN(u)&&!isNaN(d)}catch{return!1}}}),new MapOption({name:"zoom",desc:"Zoom level for map camera, number between: 0-22",example:"7.0",exampleDesc:"Small country / US state",isValid:c=>{const u=Number(c);return!isNaN(u)&&u>=0&&u<=22}}),new MapOption({name:"control",desc:"Object of control options, supports: fullscreen, scale",example:"\n  scale: true",exampleDesc:"Add Scale bar",isValid:c=>"object"==typeof c}),new MapOption({name:"debug",desc:"Set true to show tile boundary",example:"true",exampleDesc:"",isValid:c=>"true"===c}),new MapOption({name:"XYZ",desc:"Raster tile format with {x}, {y} and {z}",example:"https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png",exampleDesc:"Tile from OSM Japan!",isValid:c=>URL.parse(c)&&c.includes("{x}")&&c.includes("{y}")&&c.includes("z")}),new MapOption({name:"GPX",desc:"URL of GPX file",example:"https://raw.githubusercontent.com/openlayers/openlayers/main/examples/data/gpx/fells_loop.gpx",exampleDesc:"Example from topografix",isValid:c=>URL.parse(c)}),new MapOption({name:"WMTS",desc:"URL of WMTS document",example:"https://gis.sinica.edu.tw/tileserver/wmts",exampleDesc:"SINICA Taiwan",isValid:c=>URL.parse(c)}),new MapOption({name:"draw",desc:"Draw Something on map",example:"true",exampleDesc:"Enable Draw Tools",isValid:c=>"true"===c}),new MapOption({name:"eval",desc:"Custom Script",example:"console.log('this', this)",exampleDesc:"Print Renderer info",isValid:()=>!0})]);setOptionAliases(c){if(c.XYZ){("string"==typeof c.XYZ?[c.XYZ]:c.XYZ).forEach((u=>{let d,p;if("string"==typeof u)p=new URL(u),d={type:"tile",url:u,title:`${p.host}${p.pathname.split("%7B")[0]}`};else{if("object"!=typeof u)return;p=new URL(u.url),d={type:"tile",url:u.url,title:u.title?u.title:`${p.host}${p.pathname.split("%7B")[0]}`}}c.data.push(d)})),delete c.XYZ}c.WMTS&&(c.data.push({type:"wmts",url:c.aliases[c.WMTS]??c.WMTS}),delete c.WMTS),c.GPX&&(c.data.push({type:"gpx",url:c.GPX}),delete c.GPX),"string"==typeof c.center&&Object.prototype.hasOwnProperty.call(c.aliases,c.center)&&(c.center=c.aliases[c.center]),c.data?.forEach((u=>{Object.prototype.hasOwnProperty.call(c.aliases,u.url)&&(u.title=u.url,u.url=c.aliases[u.url])}))}createView({target:c,width:u,height:d}){c.style.width=u,c.style.height=d,"flex"===window.getComputedStyle(c.parentElement).display&&(c.style.flexBasis=`calc(${u})`)}setDraw=({target:c,terraDrawAdapter:u})=>{const d=c?.id?c.id+"-":"",p={idStrategy:{isValidId:c=>!0,getId:function(){let c=d+window.crypto.randomUUID();return function(){return c=d+window.crypto.randomUUID(),c}}()}};return this.terraDraw=((c,u={})=>new Se({adapter:c,modes:[new Jt({modename:"modify",flags:{render:{feature:{coordinates:{midpoints:!0,draggable:!0,deletable:!0,validation:()=>!0}}}}}),new wt,new St,new Ft,new ht,new Dt,new kt({modeName:"render",styles:{pointColor:"red",pointOutlineWidth:2,lineStringColor:"red",lineStringWidth:2,polygonFillColor:"#00FFFF",polygonFillOpacity:0,polygonOutlineColor:"red",polygonOutlineWidth:2}})],...u}))(u,p),((c,u,d={})=>{const p=document.createElement("select");c.appendChild(p),p.name="Draw",p.style="position: absolute; top: 0.5rem; right: 0.5rem; z-index: 1000;",p.innerHTML='\n      <option class="bold-option" value="nothing">Draw Something</option>\n      <optgroup label="Edit Features">\n        <option class="bold-option" value="modify">✎ MODIFY</option>\n        <option class="bold-option" value="delete">🗑 DELETE</option>\n        <option class="bold-option" value="clear"> 🧹 CLEAR</option>\n      </optgroup>\n      <optgroup label="Draw">\n        <option value="point">⢌ Points</option>\n        <option value="linestring">☇ linestring</option>\n        <option value="polygon">⬠ Polygon</option>\n        <option value="circle">⃝  Circle</option>\n        <option value="rectangle">◻ Rectangle</option>\n      </optgroup>\n      <optgroup label="Extra">\n        <option value="features">View Features</option>\n      </optgroup>\n    ',u.start(),u.setMode("render");const g=c.id?`terra-draw-data-${c.id}`:"terra-draw-data",f=window.localStorage.getItem(g);if(f)try{const c=JSON.parse(f);c.forEach((c=>c.properties={mode:"render"})),u.addFeatures(c)}catch(c){console.warn("Fail to drawn features from Local Storage.",f,c),window.localStorage.removeItem(g)}const _=c.querySelector("canvas")??c;p.onchange=()=>{p.children[0].textContent="--STOP--",_.style.removeProperty("cursor");const c=u.getSnapshot();switch(p.value){case"nothing":u.setMode("render"),p.children[0].textContent="Draw Something";break;case"modify":u.setMode("select");break;case"delete":u.setMode("render"),_.style.cursor="not-allowed";break;case"clear":window.localStorage.removeItem(g),p.value="nothing",p.onchange(),u.clear();break;case"features":window.alert(`${c.length} features\n\n${JSON.stringify(c,null,4)}`);break;default:u.setMode(p.value)}},u.on("change",(()=>{})),u.on("finish",((c,f)=>{if("draw"===f.action){const d=u.getSnapshot().find((u=>u.id===c));d&&(u.removeFeatures([c]),d.properties.mode="render",u.addFeatures([d]))}const _=d.idFilter??(()=>!0),y=u.getSnapshot().filter(_);window.localStorage.setItem(g,JSON.stringify(y)),"point"!==f.mode&&"draw"===f.action&&(p.value="nothing",p.onchange())})),document.onclick=c=>{if("delete"===p.value){const d=u.getFeaturesAtPointerEvent(c,{pointerDistance:40});d.length>0&&(u.removeFeatures([d[0].id]),0===u.getSnapshot().length&&(p.value="nothing",p.onchange()))}}})(c,this.terraDraw,{idFilter:c=>c.id.startsWith(d)}),this.terraDraw};getTerraDrawAdapter(){return{state:"skip"}}addTileData(){return{state:"skip"}}addGPXFile(){return{state:"skip"}}addMarker(){return{state:"skip"}}setControl(){return{state:"skip"}}setExtra(){return{state:"skip"}}updateCamera(){return{state:"skip"}}project(){return{state:"skip"}}unproject(){return{state:"skip"}}restoreCamera(){this.updateCamera({center:this.center,zoom:this.zoom})}showLayerSwitcher(c){const u=c.filter((c=>"wmts"===c.type)),d=c.filter((c=>"tile"===c.type));return u.length>0||d.length>1}propsForEval(){let c=this,u=[],d=[];for(;c!==Object.prototype;)u=u.concat(Object.getOwnPropertyNames(c)),d=d.concat(Object.entries(c)),c=Object.getPrototypeOf(c);return u}evalScript(c,u=[]){const d=this.propsForEval(),p=u.map((([c,u])=>c)),g=[...d.map((c=>this[c])),...u.map((([c,u])=>u))],f=Function([...d,...p],c).bind(this,...g);try{return f()}catch(c){return console.warn("Fail to run custom script:",c),null}}}
+/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function isNothing(c){return null==c}var J=function extend$4(c,u){var d,p,g,f;if(u)for(d=0,p=(f=Object.keys(u)).length;d<p;d+=1)c[g=f[d]]=u[g];return c},ct={isNothing:isNothing,isObject:function isObject(c){return"object"==typeof c&&null!==c},toArray:function toArray$1(c){return Array.isArray(c)?c:isNothing(c)?[]:[c]},repeat:function repeat(c,u){var d,p="";for(d=0;d<u;d+=1)p+=c;return p},isNegativeZero:function isNegativeZero(c){return 0===c&&Number.NEGATIVE_INFINITY===1/c},extend:J};function formatError(c,u){var d="",p=c.reason||"(unknown reason)";return c.mark?(c.mark.name&&(d+='in "'+c.mark.name+'" '),d+="("+(c.mark.line+1)+":"+(c.mark.column+1)+")",!u&&c.mark.snippet&&(d+="\n\n"+c.mark.snippet),p+" "+d):p}function YAMLException$1(c,u){Error.call(this),this.name="YAMLException",this.reason=c,this.mark=u,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(c){return this.name+": "+formatError(this,c)};var ft=YAMLException$1;function getLine(c,u,d,p,g){var f="",_="",y=Math.floor(g/2)-1;return p-u>y&&(u=p-y+(f=" ... ").length),d-p>y&&(d=p+y-(_=" ...").length),{str:f+c.slice(u,d).replace(/\t/g,"→")+_,pos:p-u+f.length}}function padStart(c,u){return ct.repeat(" ",u-c.length)+c}var pe=function makeSnippet(c,u){if(u=Object.create(u||null),!c.buffer)return null;u.maxLength||(u.maxLength=79),"number"!=typeof u.indent&&(u.indent=1),"number"!=typeof u.linesBefore&&(u.linesBefore=3),"number"!=typeof u.linesAfter&&(u.linesAfter=2);for(var d,p=/\r?\n|\r|\0/g,g=[0],f=[],_=-1;d=p.exec(c.buffer);)f.push(d.index),g.push(d.index+d[0].length),c.position<=d.index&&_<0&&(_=g.length-2);_<0&&(_=g.length-1);var y,x,v="",C=Math.min(c.line+u.linesAfter,f.length).toString().length,M=u.maxLength-(u.indent+C+3);for(y=1;y<=u.linesBefore&&!(_-y<0);y++)x=getLine(c.buffer,g[_-y],f[_-y],c.position-(g[_]-g[_-y]),M),v=ct.repeat(" ",u.indent)+padStart((c.line-y+1).toString(),C)+" | "+x.str+"\n"+v;for(x=getLine(c.buffer,g[_],f[_],c.position,M),v+=ct.repeat(" ",u.indent)+padStart((c.line+1).toString(),C)+" | "+x.str+"\n",v+=ct.repeat("-",u.indent+C+3+x.pos)+"^\n",y=1;y<=u.linesAfter&&!(_+y>=f.length);y++)x=getLine(c.buffer,g[_+y],f[_+y],c.position-(g[_]-g[_+y]),M),v+=ct.repeat(" ",u.indent)+padStart((c.line+y+1).toString(),C)+" | "+x.str+"\n";return v.replace(/\n$/,"")},me=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fe=["scalar","sequence","mapping"];var _e=function Type$1(c,u){if(u=u||{},Object.keys(u).forEach((function(u){if(-1===me.indexOf(u))throw new ft('Unknown option "'+u+'" is met in definition of "'+c+'" YAML type.')})),this.options=u,this.tag=c,this.kind=u.kind||null,this.resolve=u.resolve||function(){return!0},this.construct=u.construct||function(c){return c},this.instanceOf=u.instanceOf||null,this.predicate=u.predicate||null,this.represent=u.represent||null,this.representName=u.representName||null,this.defaultStyle=u.defaultStyle||null,this.multi=u.multi||!1,this.styleAliases=function compileStyleAliases(c){var u={};return null!==c&&Object.keys(c).forEach((function(d){c[d].forEach((function(c){u[String(c)]=d}))})),u}(u.styleAliases||null),-1===fe.indexOf(this.kind))throw new ft('Unknown kind "'+this.kind+'" is specified for "'+c+'" YAML type.')};function compileList(c,u){var d=[];return c[u].forEach((function(c){var u=d.length;d.forEach((function(d,p){d.tag===c.tag&&d.kind===c.kind&&d.multi===c.multi&&(u=p)})),d[u]=c})),d}function Schema$1(c){return this.extend(c)}Schema$1.prototype.extend=function extend(c){var u=[],d=[];if(c instanceof _e)d.push(c);else if(Array.isArray(c))d=d.concat(c);else{if(!c||!Array.isArray(c.implicit)&&!Array.isArray(c.explicit))throw new ft("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");c.implicit&&(u=u.concat(c.implicit)),c.explicit&&(d=d.concat(c.explicit))}u.forEach((function(c){if(!(c instanceof _e))throw new ft("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(c.loadKind&&"scalar"!==c.loadKind)throw new ft("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(c.multi)throw new ft("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),d.forEach((function(c){if(!(c instanceof _e))throw new ft("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var p=Object.create(Schema$1.prototype);return p.implicit=(this.implicit||[]).concat(u),p.explicit=(this.explicit||[]).concat(d),p.compiledImplicit=compileList(p,"implicit"),p.compiledExplicit=compileList(p,"explicit"),p.compiledTypeMap=function compileMap(){var c,u,d={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(c){c.multi?(d.multi[c.kind].push(c),d.multi.fallback.push(c)):d[c.kind][c.tag]=d.fallback[c.tag]=c}for(c=0,u=arguments.length;c<u;c+=1)arguments[c].forEach(collectType);return d}(p.compiledImplicit,p.compiledExplicit),p};var xe=new Schema$1({explicit:[new _e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(c){return null!==c?c:""}}),new _e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(c){return null!==c?c:[]}}),new _e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(c){return null!==c?c:{}}})]});var ve=new _e("tag:yaml.org,2002:null",{kind:"scalar",resolve:function resolveYamlNull(c){if(null===c)return!0;var u=c.length;return 1===u&&"~"===c||4===u&&("null"===c||"Null"===c||"NULL"===c)},construct:function constructYamlNull(){return null},predicate:function isNull(c){return null===c},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});var we=new _e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function resolveYamlBoolean(c){if(null===c)return!1;var u=c.length;return 4===u&&("true"===c||"True"===c||"TRUE"===c)||5===u&&("false"===c||"False"===c||"FALSE"===c)},construct:function constructYamlBoolean(c){return"true"===c||"True"===c||"TRUE"===c},predicate:function isBoolean(c){return"[object Boolean]"===Object.prototype.toString.call(c)},represent:{lowercase:function(c){return c?"true":"false"},uppercase:function(c){return c?"TRUE":"FALSE"},camelcase:function(c){return c?"True":"False"}},defaultStyle:"lowercase"});function isHexCode(c){return 48<=c&&c<=57||65<=c&&c<=70||97<=c&&c<=102}function isOctCode(c){return 48<=c&&c<=55}function isDecCode(c){return 48<=c&&c<=57}var Ce=new _e("tag:yaml.org,2002:int",{kind:"scalar",resolve:function resolveYamlInteger(c){if(null===c)return!1;var u,d=c.length,p=0,g=!1;if(!d)return!1;if("-"!==(u=c[p])&&"+"!==u||(u=c[++p]),"0"===u){if(p+1===d)return!0;if("b"===(u=c[++p])){for(p++;p<d;p++)if("_"!==(u=c[p])){if("0"!==u&&"1"!==u)return!1;g=!0}return g&&"_"!==u}if("x"===u){for(p++;p<d;p++)if("_"!==(u=c[p])){if(!isHexCode(c.charCodeAt(p)))return!1;g=!0}return g&&"_"!==u}if("o"===u){for(p++;p<d;p++)if("_"!==(u=c[p])){if(!isOctCode(c.charCodeAt(p)))return!1;g=!0}return g&&"_"!==u}}if("_"===u)return!1;for(;p<d;p++)if("_"!==(u=c[p])){if(!isDecCode(c.charCodeAt(p)))return!1;g=!0}return!(!g||"_"===u)},construct:function constructYamlInteger(c){var u,d=c,p=1;if(-1!==d.indexOf("_")&&(d=d.replace(/_/g,"")),"-"!==(u=d[0])&&"+"!==u||("-"===u&&(p=-1),u=(d=d.slice(1))[0]),"0"===d)return 0;if("0"===u){if("b"===d[1])return p*parseInt(d.slice(2),2);if("x"===d[1])return p*parseInt(d.slice(2),16);if("o"===d[1])return p*parseInt(d.slice(2),8)}return p*parseInt(d,10)},predicate:function isInteger(c){return"[object Number]"===Object.prototype.toString.call(c)&&c%1==0&&!ct.isNegativeZero(c)},represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ee=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var Pe=/^[-+]?[0-9]+e/;var be=new _e("tag:yaml.org,2002:float",{kind:"scalar",resolve:function resolveYamlFloat(c){return null!==c&&!(!Ee.test(c)||"_"===c[c.length-1])},construct:function constructYamlFloat(c){var u,d;return d="-"===(u=c.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(u[0])>=0&&(u=u.slice(1)),".inf"===u?1===d?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===u?NaN:d*parseFloat(u,10)},predicate:function isFloat(c){return"[object Number]"===Object.prototype.toString.call(c)&&(c%1!=0||ct.isNegativeZero(c))},represent:function representYamlFloat(c,u){var d;if(isNaN(c))switch(u){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(u){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(u){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ct.isNegativeZero(c))return"-0.0";return d=c.toString(10),Pe.test(d)?d.replace("e",".e"):d},defaultStyle:"lowercase"}),Me=xe.extend({implicit:[ve,we,Ce,be]}),Te=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Re=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Le=new _e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function resolveYamlTimestamp(c){return null!==c&&(null!==Te.exec(c)||null!==Re.exec(c))},construct:function constructYamlTimestamp(c){var u,d,p,g,f,_,y,x,v=0,C=null;if(null===(u=Te.exec(c))&&(u=Re.exec(c)),null===u)throw new Error("Date resolve error");if(d=+u[1],p=+u[2]-1,g=+u[3],!u[4])return new Date(Date.UTC(d,p,g));if(f=+u[4],_=+u[5],y=+u[6],u[7]){for(v=u[7].slice(0,3);v.length<3;)v+="0";v=+v}return u[9]&&(C=6e4*(60*+u[10]+ +(u[11]||0)),"-"===u[9]&&(C=-C)),x=new Date(Date.UTC(d,p,g,f,_,y,v)),C&&x.setTime(x.getTime()-C),x},instanceOf:Date,represent:function representYamlTimestamp(c){return c.toISOString()}});var Ae=new _e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function resolveYamlMerge(c){return"<<"===c||null===c}}),Ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Fe=new _e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function resolveYamlBinary(c){if(null===c)return!1;var u,d,p=0,g=c.length,f=Ie;for(d=0;d<g;d++)if(!((u=f.indexOf(c.charAt(d)))>64)){if(u<0)return!1;p+=6}return p%8==0},construct:function constructYamlBinary(c){var u,d,p=c.replace(/[\r\n=]/g,""),g=p.length,f=Ie,_=0,y=[];for(u=0;u<g;u++)u%4==0&&u&&(y.push(_>>16&255),y.push(_>>8&255),y.push(255&_)),_=_<<6|f.indexOf(p.charAt(u));return 0===(d=g%4*6)?(y.push(_>>16&255),y.push(_>>8&255),y.push(255&_)):18===d?(y.push(_>>10&255),y.push(_>>2&255)):12===d&&y.push(_>>4&255),new Uint8Array(y)},predicate:function isBinary(c){return"[object Uint8Array]"===Object.prototype.toString.call(c)},represent:function representYamlBinary(c){var u,d,p="",g=0,f=c.length,_=Ie;for(u=0;u<f;u++)u%3==0&&u&&(p+=_[g>>18&63],p+=_[g>>12&63],p+=_[g>>6&63],p+=_[63&g]),g=(g<<8)+c[u];return 0===(d=f%3)?(p+=_[g>>18&63],p+=_[g>>12&63],p+=_[g>>6&63],p+=_[63&g]):2===d?(p+=_[g>>10&63],p+=_[g>>4&63],p+=_[g<<2&63],p+=_[64]):1===d&&(p+=_[g>>2&63],p+=_[g<<4&63],p+=_[64],p+=_[64]),p}}),ke=Object.prototype.hasOwnProperty,Oe=Object.prototype.toString;var Ne=new _e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function resolveYamlOmap(c){if(null===c)return!0;var u,d,p,g,f,_=[],y=c;for(u=0,d=y.length;u<d;u+=1){if(p=y[u],f=!1,"[object Object]"!==Oe.call(p))return!1;for(g in p)if(ke.call(p,g)){if(f)return!1;f=!0}if(!f)return!1;if(-1!==_.indexOf(g))return!1;_.push(g)}return!0},construct:function constructYamlOmap(c){return null!==c?c:[]}}),De=Object.prototype.toString;var Ge=new _e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function resolveYamlPairs(c){if(null===c)return!0;var u,d,p,g,f,_=c;for(f=new Array(_.length),u=0,d=_.length;u<d;u+=1){if(p=_[u],"[object Object]"!==De.call(p))return!1;if(1!==(g=Object.keys(p)).length)return!1;f[u]=[g[0],p[g[0]]]}return!0},construct:function constructYamlPairs(c){if(null===c)return[];var u,d,p,g,f,_=c;for(f=new Array(_.length),u=0,d=_.length;u<d;u+=1)p=_[u],g=Object.keys(p),f[u]=[g[0],p[g[0]]];return f}}),je=Object.prototype.hasOwnProperty;var ze=new _e("tag:yaml.org,2002:set",{kind:"mapping",resolve:function resolveYamlSet(c){if(null===c)return!0;var u,d=c;for(u in d)if(je.call(d,u)&&null!==d[u])return!1;return!0},construct:function constructYamlSet(c){return null!==c?c:{}}}),Be=Me.extend({implicit:[Le,Ae],explicit:[Fe,Ne,Ge,ze]}),Ue=Object.prototype.hasOwnProperty,$e=1,We=2,Xe=3,Ve=4,qe=1,Ye=2,Ze=3,Ke=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,He=/[\x85\u2028\u2029]/,Je=/[,\[\]\{\}]/,Qe=/^(?:!|!!|![a-z\-]+!)$/i,ti=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(c){return Object.prototype.toString.call(c)}function is_EOL(c){return 10===c||13===c}function is_WHITE_SPACE(c){return 9===c||32===c}function is_WS_OR_EOL(c){return 9===c||32===c||10===c||13===c}function is_FLOW_INDICATOR(c){return 44===c||91===c||93===c||123===c||125===c}function fromHexCode(c){var u;return 48<=c&&c<=57?c-48:97<=(u=32|c)&&u<=102?u-97+10:-1}function escapedHexLen(c){return 120===c?2:117===c?4:85===c?8:0}function fromDecimalCode(c){return 48<=c&&c<=57?c-48:-1}function simpleEscapeSequence(c){return 48===c?"\0":97===c?"":98===c?"\b":116===c||9===c?"\t":110===c?"\n":118===c?"\v":102===c?"\f":114===c?"\r":101===c?"":32===c?" ":34===c?'"':47===c?"/":92===c?"\\":78===c?"…":95===c?" ":76===c?"\u2028":80===c?"\u2029":""}function charFromCodepoint(c){return c<=65535?String.fromCharCode(c):String.fromCharCode(55296+(c-65536>>10),56320+(c-65536&1023))}for(var ei=new Array(256),ii=new Array(256),ri=0;ri<256;ri++)ei[ri]=simpleEscapeSequence(ri)?1:0,ii[ri]=simpleEscapeSequence(ri);function State$1(c,u){this.input=c,this.filename=u.filename||null,this.schema=u.schema||Be,this.onWarning=u.onWarning||null,this.legacy=u.legacy||!1,this.json=u.json||!1,this.listener=u.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=c.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(c,u){var d={name:c.filename,buffer:c.input.slice(0,-1),position:c.position,line:c.line,column:c.position-c.lineStart};return d.snippet=pe(d),new ft(u,d)}function throwError(c,u){throw generateError(c,u)}function throwWarning(c,u){c.onWarning&&c.onWarning.call(null,generateError(c,u))}var ni={YAML:function handleYamlDirective(c,u,d){var p,g,f;null!==c.version&&throwError(c,"duplication of %YAML directive"),1!==d.length&&throwError(c,"YAML directive accepts exactly one argument"),null===(p=/^([0-9]+)\.([0-9]+)$/.exec(d[0]))&&throwError(c,"ill-formed argument of the YAML directive"),g=parseInt(p[1],10),f=parseInt(p[2],10),1!==g&&throwError(c,"unacceptable YAML version of the document"),c.version=d[0],c.checkLineBreaks=f<2,1!==f&&2!==f&&throwWarning(c,"unsupported YAML version of the document")},TAG:function handleTagDirective(c,u,d){var p,g;2!==d.length&&throwError(c,"TAG directive accepts exactly two arguments"),p=d[0],g=d[1],Qe.test(p)||throwError(c,"ill-formed tag handle (first argument) of the TAG directive"),Ue.call(c.tagMap,p)&&throwError(c,'there is a previously declared suffix for "'+p+'" tag handle'),ti.test(g)||throwError(c,"ill-formed tag prefix (second argument) of the TAG directive");try{g=decodeURIComponent(g)}catch(u){throwError(c,"tag prefix is malformed: "+g)}c.tagMap[p]=g}};function captureSegment(c,u,d,p){var g,f,_,y;if(u<d){if(y=c.input.slice(u,d),p)for(g=0,f=y.length;g<f;g+=1)9===(_=y.charCodeAt(g))||32<=_&&_<=1114111||throwError(c,"expected valid JSON character");else Ke.test(y)&&throwError(c,"the stream contains non-printable characters");c.result+=y}}function mergeMappings(c,u,d,p){var g,f,_,y;for(ct.isObject(d)||throwError(c,"cannot merge mappings; the provided source object is unacceptable"),_=0,y=(g=Object.keys(d)).length;_<y;_+=1)f=g[_],Ue.call(u,f)||(u[f]=d[f],p[f]=!0)}function storeMappingPair(c,u,d,p,g,f,_,y,x){var v,C;if(Array.isArray(g))for(v=0,C=(g=Array.prototype.slice.call(g)).length;v<C;v+=1)Array.isArray(g[v])&&throwError(c,"nested arrays are not supported inside keys"),"object"==typeof g&&"[object Object]"===_class(g[v])&&(g[v]="[object Object]");if("object"==typeof g&&"[object Object]"===_class(g)&&(g="[object Object]"),g=String(g),null===u&&(u={}),"tag:yaml.org,2002:merge"===p)if(Array.isArray(f))for(v=0,C=f.length;v<C;v+=1)mergeMappings(c,u,f[v],d);else mergeMappings(c,u,f,d);else c.json||Ue.call(d,g)||!Ue.call(u,g)||(c.line=_||c.line,c.lineStart=y||c.lineStart,c.position=x||c.position,throwError(c,"duplicated mapping key")),"__proto__"===g?Object.defineProperty(u,g,{configurable:!0,enumerable:!0,writable:!0,value:f}):u[g]=f,delete d[g];return u}function readLineBreak(c){var u;10===(u=c.input.charCodeAt(c.position))?c.position++:13===u?(c.position++,10===c.input.charCodeAt(c.position)&&c.position++):throwError(c,"a line break is expected"),c.line+=1,c.lineStart=c.position,c.firstTabInLine=-1}function skipSeparationSpace(c,u,d){for(var p=0,g=c.input.charCodeAt(c.position);0!==g;){for(;is_WHITE_SPACE(g);)9===g&&-1===c.firstTabInLine&&(c.firstTabInLine=c.position),g=c.input.charCodeAt(++c.position);if(u&&35===g)do{g=c.input.charCodeAt(++c.position)}while(10!==g&&13!==g&&0!==g);if(!is_EOL(g))break;for(readLineBreak(c),g=c.input.charCodeAt(c.position),p++,c.lineIndent=0;32===g;)c.lineIndent++,g=c.input.charCodeAt(++c.position)}return-1!==d&&0!==p&&c.lineIndent<d&&throwWarning(c,"deficient indentation"),p}function testDocumentSeparator(c){var u,d=c.position;return!(45!==(u=c.input.charCodeAt(d))&&46!==u||u!==c.input.charCodeAt(d+1)||u!==c.input.charCodeAt(d+2)||(d+=3,0!==(u=c.input.charCodeAt(d))&&!is_WS_OR_EOL(u)))}function writeFoldedLines(c,u){1===u?c.result+=" ":u>1&&(c.result+=ct.repeat("\n",u-1))}function readBlockSequence(c,u){var d,p,g=c.tag,f=c.anchor,_=[],y=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=_),p=c.input.charCodeAt(c.position);0!==p&&(-1!==c.firstTabInLine&&(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),45===p)&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1));)if(y=!0,c.position++,skipSeparationSpace(c,!0,-1)&&c.lineIndent<=u)_.push(null),p=c.input.charCodeAt(c.position);else if(d=c.line,composeNode(c,u,Xe,!1,!0),_.push(c.result),skipSeparationSpace(c,!0,-1),p=c.input.charCodeAt(c.position),(c.line===d||c.lineIndent>u)&&0!==p)throwError(c,"bad indentation of a sequence entry");else if(c.lineIndent<u)break;return!!y&&(c.tag=g,c.anchor=f,c.kind="sequence",c.result=_,!0)}function readTagProperty(c){var u,d,p,g,f=!1,_=!1;if(33!==(g=c.input.charCodeAt(c.position)))return!1;if(null!==c.tag&&throwError(c,"duplication of a tag property"),60===(g=c.input.charCodeAt(++c.position))?(f=!0,g=c.input.charCodeAt(++c.position)):33===g?(_=!0,d="!!",g=c.input.charCodeAt(++c.position)):d="!",u=c.position,f){do{g=c.input.charCodeAt(++c.position)}while(0!==g&&62!==g);c.position<c.length?(p=c.input.slice(u,c.position),g=c.input.charCodeAt(++c.position)):throwError(c,"unexpected end of the stream within a verbatim tag")}else{for(;0!==g&&!is_WS_OR_EOL(g);)33===g&&(_?throwError(c,"tag suffix cannot contain exclamation marks"):(d=c.input.slice(u-1,c.position+1),Qe.test(d)||throwError(c,"named tag handle cannot contain such characters"),_=!0,u=c.position+1)),g=c.input.charCodeAt(++c.position);p=c.input.slice(u,c.position),Je.test(p)&&throwError(c,"tag suffix cannot contain flow indicator characters")}p&&!ti.test(p)&&throwError(c,"tag name cannot contain such characters: "+p);try{p=decodeURIComponent(p)}catch(u){throwError(c,"tag name is malformed: "+p)}return f?c.tag=p:Ue.call(c.tagMap,d)?c.tag=c.tagMap[d]+p:"!"===d?c.tag="!"+p:"!!"===d?c.tag="tag:yaml.org,2002:"+p:throwError(c,'undeclared tag handle "'+d+'"'),!0}function readAnchorProperty(c){var u,d;if(38!==(d=c.input.charCodeAt(c.position)))return!1;for(null!==c.anchor&&throwError(c,"duplication of an anchor property"),d=c.input.charCodeAt(++c.position),u=c.position;0!==d&&!is_WS_OR_EOL(d)&&!is_FLOW_INDICATOR(d);)d=c.input.charCodeAt(++c.position);return c.position===u&&throwError(c,"name of an anchor node must contain at least one character"),c.anchor=c.input.slice(u,c.position),!0}function composeNode(c,u,d,p,g){var f,_,y,x,v,C,M,T,L,A=1,I=!1,k=!1;if(null!==c.listener&&c.listener("open",c),c.tag=null,c.anchor=null,c.kind=null,c.result=null,f=_=y=Ve===d||Xe===d,p&&skipSeparationSpace(c,!0,-1)&&(I=!0,c.lineIndent>u?A=1:c.lineIndent===u?A=0:c.lineIndent<u&&(A=-1)),1===A)for(;readTagProperty(c)||readAnchorProperty(c);)skipSeparationSpace(c,!0,-1)?(I=!0,y=f,c.lineIndent>u?A=1:c.lineIndent===u?A=0:c.lineIndent<u&&(A=-1)):y=!1;if(y&&(y=I||g),1!==A&&Ve!==d||(T=$e===d||We===d?u:u+1,L=c.position-c.lineStart,1===A?y&&(readBlockSequence(c,L)||function readBlockMapping(c,u,d){var p,g,f,_,y,x,v,C=c.tag,M=c.anchor,T={},L=Object.create(null),A=null,I=null,k=null,O=!1,N=!1;if(-1!==c.firstTabInLine)return!1;for(null!==c.anchor&&(c.anchorMap[c.anchor]=T),v=c.input.charCodeAt(c.position);0!==v;){if(O||-1===c.firstTabInLine||(c.position=c.firstTabInLine,throwError(c,"tab characters must not be used in indentation")),p=c.input.charCodeAt(c.position+1),f=c.line,63!==v&&58!==v||!is_WS_OR_EOL(p)){if(_=c.line,y=c.lineStart,x=c.position,!composeNode(c,d,We,!1,!0))break;if(c.line===f){for(v=c.input.charCodeAt(c.position);is_WHITE_SPACE(v);)v=c.input.charCodeAt(++c.position);if(58===v)is_WS_OR_EOL(v=c.input.charCodeAt(++c.position))||throwError(c,"a whitespace character is expected after the key-value separator within a block mapping"),O&&(storeMappingPair(c,T,L,A,I,null,_,y,x),A=I=k=null),N=!0,O=!1,g=!1,A=c.tag,I=c.result;else{if(!N)return c.tag=C,c.anchor=M,!0;throwError(c,"can not read an implicit mapping pair; a colon is missed")}}else{if(!N)return c.tag=C,c.anchor=M,!0;throwError(c,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===v?(O&&(storeMappingPair(c,T,L,A,I,null,_,y,x),A=I=k=null),N=!0,O=!0,g=!0):O?(O=!1,g=!0):throwError(c,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),c.position+=1,v=p;if((c.line===f||c.lineIndent>u)&&(O&&(_=c.line,y=c.lineStart,x=c.position),composeNode(c,u,Ve,!0,g)&&(O?I=c.result:k=c.result),O||(storeMappingPair(c,T,L,A,I,k,_,y,x),A=I=k=null),skipSeparationSpace(c,!0,-1),v=c.input.charCodeAt(c.position)),(c.line===f||c.lineIndent>u)&&0!==v)throwError(c,"bad indentation of a mapping entry");else if(c.lineIndent<u)break}return O&&storeMappingPair(c,T,L,A,I,null,_,y,x),N&&(c.tag=C,c.anchor=M,c.kind="mapping",c.result=T),N}(c,L,T))||function readFlowCollection(c,u){var d,p,g,f,_,y,x,v,C,M,T,L,A=!0,I=c.tag,k=c.anchor,O=Object.create(null);if(91===(L=c.input.charCodeAt(c.position)))_=93,v=!1,f=[];else{if(123!==L)return!1;_=125,v=!0,f={}}for(null!==c.anchor&&(c.anchorMap[c.anchor]=f),L=c.input.charCodeAt(++c.position);0!==L;){if(skipSeparationSpace(c,!0,u),(L=c.input.charCodeAt(c.position))===_)return c.position++,c.tag=I,c.anchor=k,c.kind=v?"mapping":"sequence",c.result=f,!0;A?44===L&&throwError(c,"expected the node content, but found ','"):throwError(c,"missed comma between flow collection entries"),T=null,y=x=!1,63===L&&is_WS_OR_EOL(c.input.charCodeAt(c.position+1))&&(y=x=!0,c.position++,skipSeparationSpace(c,!0,u)),d=c.line,p=c.lineStart,g=c.position,composeNode(c,u,$e,!1,!0),M=c.tag,C=c.result,skipSeparationSpace(c,!0,u),L=c.input.charCodeAt(c.position),!x&&c.line!==d||58!==L||(y=!0,L=c.input.charCodeAt(++c.position),skipSeparationSpace(c,!0,u),composeNode(c,u,$e,!1,!0),T=c.result),v?storeMappingPair(c,f,O,M,C,T,d,p,g):y?f.push(storeMappingPair(c,null,O,M,C,T,d,p,g)):f.push(C),skipSeparationSpace(c,!0,u),44===(L=c.input.charCodeAt(c.position))?(A=!0,L=c.input.charCodeAt(++c.position)):A=!1}throwError(c,"unexpected end of the stream within a flow collection")}(c,T)?k=!0:(_&&function readBlockScalar(c,u){var d,p,g,f,_=qe,y=!1,x=!1,v=u,C=0,M=!1;if(124===(f=c.input.charCodeAt(c.position)))p=!1;else{if(62!==f)return!1;p=!0}for(c.kind="scalar",c.result="";0!==f;)if(43===(f=c.input.charCodeAt(++c.position))||45===f)qe===_?_=43===f?Ze:Ye:throwError(c,"repeat of a chomping mode identifier");else{if(!((g=fromDecimalCode(f))>=0))break;0===g?throwError(c,"bad explicit indentation width of a block scalar; it cannot be less than one"):x?throwError(c,"repeat of an indentation width identifier"):(v=u+g-1,x=!0)}if(is_WHITE_SPACE(f)){do{f=c.input.charCodeAt(++c.position)}while(is_WHITE_SPACE(f));if(35===f)do{f=c.input.charCodeAt(++c.position)}while(!is_EOL(f)&&0!==f)}for(;0!==f;){for(readLineBreak(c),c.lineIndent=0,f=c.input.charCodeAt(c.position);(!x||c.lineIndent<v)&&32===f;)c.lineIndent++,f=c.input.charCodeAt(++c.position);if(!x&&c.lineIndent>v&&(v=c.lineIndent),is_EOL(f))C++;else{if(c.lineIndent<v){_===Ze?c.result+=ct.repeat("\n",y?1+C:C):_===qe&&y&&(c.result+="\n");break}for(p?is_WHITE_SPACE(f)?(M=!0,c.result+=ct.repeat("\n",y?1+C:C)):M?(M=!1,c.result+=ct.repeat("\n",C+1)):0===C?y&&(c.result+=" "):c.result+=ct.repeat("\n",C):c.result+=ct.repeat("\n",y?1+C:C),y=!0,x=!0,C=0,d=c.position;!is_EOL(f)&&0!==f;)f=c.input.charCodeAt(++c.position);captureSegment(c,d,c.position,!1)}}return!0}(c,T)||function readSingleQuotedScalar(c,u){var d,p,g;if(39!==(d=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,p=g=c.position;0!==(d=c.input.charCodeAt(c.position));)if(39===d){if(captureSegment(c,p,c.position,!0),39!==(d=c.input.charCodeAt(++c.position)))return!0;p=c.position,c.position++,g=c.position}else is_EOL(d)?(captureSegment(c,p,g,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,u)),p=g=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a single quoted scalar"):(c.position++,g=c.position);throwError(c,"unexpected end of the stream within a single quoted scalar")}(c,T)||function readDoubleQuotedScalar(c,u){var d,p,g,f,_,y;if(34!==(y=c.input.charCodeAt(c.position)))return!1;for(c.kind="scalar",c.result="",c.position++,d=p=c.position;0!==(y=c.input.charCodeAt(c.position));){if(34===y)return captureSegment(c,d,c.position,!0),c.position++,!0;if(92===y){if(captureSegment(c,d,c.position,!0),is_EOL(y=c.input.charCodeAt(++c.position)))skipSeparationSpace(c,!1,u);else if(y<256&&ei[y])c.result+=ii[y],c.position++;else if((_=escapedHexLen(y))>0){for(g=_,f=0;g>0;g--)(_=fromHexCode(y=c.input.charCodeAt(++c.position)))>=0?f=(f<<4)+_:throwError(c,"expected hexadecimal character");c.result+=charFromCodepoint(f),c.position++}else throwError(c,"unknown escape sequence");d=p=c.position}else is_EOL(y)?(captureSegment(c,d,p,!0),writeFoldedLines(c,skipSeparationSpace(c,!1,u)),d=p=c.position):c.position===c.lineStart&&testDocumentSeparator(c)?throwError(c,"unexpected end of the document within a double quoted scalar"):(c.position++,p=c.position)}throwError(c,"unexpected end of the stream within a double quoted scalar")}(c,T)?k=!0:!function readAlias(c){var u,d,p;if(42!==(p=c.input.charCodeAt(c.position)))return!1;for(p=c.input.charCodeAt(++c.position),u=c.position;0!==p&&!is_WS_OR_EOL(p)&&!is_FLOW_INDICATOR(p);)p=c.input.charCodeAt(++c.position);return c.position===u&&throwError(c,"name of an alias node must contain at least one character"),d=c.input.slice(u,c.position),Ue.call(c.anchorMap,d)||throwError(c,'unidentified alias "'+d+'"'),c.result=c.anchorMap[d],skipSeparationSpace(c,!0,-1),!0}(c)?function readPlainScalar(c,u,d){var p,g,f,_,y,x,v,C,M=c.kind,T=c.result;if(is_WS_OR_EOL(C=c.input.charCodeAt(c.position))||is_FLOW_INDICATOR(C)||35===C||38===C||42===C||33===C||124===C||62===C||39===C||34===C||37===C||64===C||96===C)return!1;if((63===C||45===C)&&(is_WS_OR_EOL(p=c.input.charCodeAt(c.position+1))||d&&is_FLOW_INDICATOR(p)))return!1;for(c.kind="scalar",c.result="",g=f=c.position,_=!1;0!==C;){if(58===C){if(is_WS_OR_EOL(p=c.input.charCodeAt(c.position+1))||d&&is_FLOW_INDICATOR(p))break}else if(35===C){if(is_WS_OR_EOL(c.input.charCodeAt(c.position-1)))break}else{if(c.position===c.lineStart&&testDocumentSeparator(c)||d&&is_FLOW_INDICATOR(C))break;if(is_EOL(C)){if(y=c.line,x=c.lineStart,v=c.lineIndent,skipSeparationSpace(c,!1,-1),c.lineIndent>=u){_=!0,C=c.input.charCodeAt(c.position);continue}c.position=f,c.line=y,c.lineStart=x,c.lineIndent=v;break}}_&&(captureSegment(c,g,f,!1),writeFoldedLines(c,c.line-y),g=f=c.position,_=!1),is_WHITE_SPACE(C)||(f=c.position+1),C=c.input.charCodeAt(++c.position)}return captureSegment(c,g,f,!1),!!c.result||(c.kind=M,c.result=T,!1)}(c,T,$e===d)&&(k=!0,null===c.tag&&(c.tag="?")):(k=!0,null===c.tag&&null===c.anchor||throwError(c,"alias node should not have any properties")),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):0===A&&(k=y&&readBlockSequence(c,L))),null===c.tag)null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);else if("?"===c.tag){for(null!==c.result&&"scalar"!==c.kind&&throwError(c,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+c.kind+'"'),x=0,v=c.implicitTypes.length;x<v;x+=1)if((M=c.implicitTypes[x]).resolve(c.result)){c.result=M.construct(c.result),c.tag=M.tag,null!==c.anchor&&(c.anchorMap[c.anchor]=c.result);break}}else if("!"!==c.tag){if(Ue.call(c.typeMap[c.kind||"fallback"],c.tag))M=c.typeMap[c.kind||"fallback"][c.tag];else for(M=null,x=0,v=(C=c.typeMap.multi[c.kind||"fallback"]).length;x<v;x+=1)if(c.tag.slice(0,C[x].tag.length)===C[x].tag){M=C[x];break}M||throwError(c,"unknown tag !<"+c.tag+">"),null!==c.result&&M.kind!==c.kind&&throwError(c,"unacceptable node kind for !<"+c.tag+'> tag; it should be "'+M.kind+'", not "'+c.kind+'"'),M.resolve(c.result,c.tag)?(c.result=M.construct(c.result,c.tag),null!==c.anchor&&(c.anchorMap[c.anchor]=c.result)):throwError(c,"cannot resolve a node with !<"+c.tag+"> explicit tag")}return null!==c.listener&&c.listener("close",c),null!==c.tag||null!==c.anchor||k}function readDocument(c){var u,d,p,g,f=c.position,_=!1;for(c.version=null,c.checkLineBreaks=c.legacy,c.tagMap=Object.create(null),c.anchorMap=Object.create(null);0!==(g=c.input.charCodeAt(c.position))&&(skipSeparationSpace(c,!0,-1),g=c.input.charCodeAt(c.position),!(c.lineIndent>0||37!==g));){for(_=!0,g=c.input.charCodeAt(++c.position),u=c.position;0!==g&&!is_WS_OR_EOL(g);)g=c.input.charCodeAt(++c.position);for(p=[],(d=c.input.slice(u,c.position)).length<1&&throwError(c,"directive name must not be less than one character in length");0!==g;){for(;is_WHITE_SPACE(g);)g=c.input.charCodeAt(++c.position);if(35===g){do{g=c.input.charCodeAt(++c.position)}while(0!==g&&!is_EOL(g));break}if(is_EOL(g))break;for(u=c.position;0!==g&&!is_WS_OR_EOL(g);)g=c.input.charCodeAt(++c.position);p.push(c.input.slice(u,c.position))}0!==g&&readLineBreak(c),Ue.call(ni,d)?ni[d](c,d,p):throwWarning(c,'unknown document directive "'+d+'"')}skipSeparationSpace(c,!0,-1),0===c.lineIndent&&45===c.input.charCodeAt(c.position)&&45===c.input.charCodeAt(c.position+1)&&45===c.input.charCodeAt(c.position+2)?(c.position+=3,skipSeparationSpace(c,!0,-1)):_&&throwError(c,"directives end mark is expected"),composeNode(c,c.lineIndent-1,Ve,!1,!0),skipSeparationSpace(c,!0,-1),c.checkLineBreaks&&He.test(c.input.slice(f,c.position))&&throwWarning(c,"non-ASCII line breaks are interpreted as content"),c.documents.push(c.result),c.position===c.lineStart&&testDocumentSeparator(c)?46===c.input.charCodeAt(c.position)&&(c.position+=3,skipSeparationSpace(c,!0,-1)):c.position<c.length-1&&throwError(c,"end of the stream or a document separator is expected")}function loadDocuments(c,u){u=u||{},0!==(c=String(c)).length&&(10!==c.charCodeAt(c.length-1)&&13!==c.charCodeAt(c.length-1)&&(c+="\n"),65279===c.charCodeAt(0)&&(c=c.slice(1)));var d=new State$1(c,u),p=c.indexOf("\0");for(-1!==p&&(d.position=p,throwError(d,"null byte is not allowed in input")),d.input+="\0";32===d.input.charCodeAt(d.position);)d.lineIndent+=1,d.position+=1;for(;d.position<d.length-1;)readDocument(d);return d.documents}var si={loadAll:function loadAll$1(c,u,d){null!==u&&"object"==typeof u&&void 0===d&&(d=u,u=null);var p=loadDocuments(c,d);if("function"!=typeof u)return p;for(var g=0,f=p.length;g<f;g+=1)u(p[g])},load:function load$1(c,u){var d=loadDocuments(c,u);if(0!==d.length){if(1===d.length)return d[0];throw new ft("expected a single document in the stream, but found more")}}},oi=si.load,ai=si.loadAll;const li=new URL("./",import.meta.url),hi=Object.freeze({use:{Leaflet:{value:li+"renderers/leaflet.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicLeafletRenderer.mjs",description:"Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. It has all the mapping features most developers ever need."},Maplibre:{value:li+"renderers/maplibre.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicMaplibreRenderer.mjs",description:"MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser. The customization of the map comply with the MapLibre Style Spec."},Openlayers:{value:li+"renderers/openlayers.mjs",url:"https://github.com/outdoorsafetylab/mapclay/blob/HEAD/src/BasicOpenlayersRenderer.mjs",description:"OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds."}}}),applyDefaultAliases=c=>({use:c.use??"Leaflet",width:"100%",...c,aliases:{...hi,...c.aliases??{}}}),ci={},setValueByAliases=c=>c.aliases?(Object.entries(c).filter((([c,u])=>"aliases"!==c&&"string"==typeof u&&u.match(/^[A-Z]/))).forEach((([u,d])=>{const p=c.aliases?.[u]?.[d],g="object"!=typeof p||Array.isArray(p)?p:p.value;g&&(c[u]=g,"use"===u&&(c.url=p.url,c.desc=p.desc))})),c):c,applyOtherConfig=async c=>{if(!c.apply)return c;await(async c=>{c&&!ci[c]&&(ci[c]=await fetch(c).then((c=>{if(200!==c.status)throw Error();return c.text()})).then((c=>oi(c))).catch((u=>{throw Error(`Fail to fetch applied config ${c}`,u)})))})(c.apply);const u=ci[c.apply];if(!u)throw Error("Fail to fetch remote config "+c.aply);return{...u,...c,aliases:{...u.aliases,...c.aliases??{}}}},prepareRenderer=async c=>{let u;if(c.use)if(c.use.steps)u=c.use;else{const d=(await import(c.use)).default;u=new d}else u=c;return Object.entries(c).forEach((([c,d])=>u[c]=d)),u},healthCheck=c=>{if(!c.steps)throw c.steps=[],Error("not health");return c},renderWithConfig=async c=>{c.results=[];const u=[setValueByAliases,applyOtherConfig,setValueByAliases,prepareRenderer,healthCheck],d=(c=>{let u=c;return c=>c.reduce(((c,d)=>c.then((async()=>u.results.at(-1)?.state?.match(/fail|stop/)?{state:"stop",reason:"stop by previous step"}:(u=await d(u),u))).then((c=>u.results.push({type:"prepare",func:d.valueOf(),state:c?.state??"success",result:c?.reason??u}))).catch((c=>{u.results.push({type:"prepare",func:d.valueOf(),state:"fail",result:c})})).then((()=>{u.prepareCallback?.(u,u.results)}))),Promise.resolve(u)).then((()=>u))})(c)(u).then((c=>(c=>(c.steps??[]).reduce(((u,d)=>u.then((()=>{if("stop"===c.results.at(-1).state)return{state:"stop",reason:"stop by previous step"};if(d.depends){const u=c.results.findLast((c=>c.func===d.depends))?.state;if(u.match(/skip|fail/))return{state:"skip"}}return d.valueOf().bind(c)(c)})).then((u=>c.results.push({type:"render",func:d.valueOf(),state:u?.state??"success",result:u?.reason??u}))).catch((u=>c.results.push({type:"render",func:d.valueOf(),state:"fail",result:u}))).then((()=>{c.stepCallback?.(c,c)}))),Promise.resolve()).then((()=>c)))(c))).then((c=>{const u=!c.results||0===c.results.length||!c.results.find((c=>c.state.match(/success/)))||c.results.find((c=>c.state.match(/fail|stop/))),d=u?"unfulfilled":"fulfilled";return c?.target?.setAttribute("data-render",d),c}));return d.valueOf=()=>c.results,d},setValueOf=c=>(c.valueOf=()=>JSON.stringify(c,((c,u)=>c.match(/aliases|target/)?void 0:u)),c),shouldRender=c=>!(c.target instanceof window.HTMLElement&&c.target.classList.contains("mapclay")&&c.valueOf()===c.target.getAttribute("data-mapclay")&&"fulfilled"===c.target.getAttribute("data-render")),renderWith=c=>(u,d)=>{c=c??(c=>c);const p="object"==typeof d?Array.isArray(d)?d.map(c):[d].map(c):null;if(!p)throw Error(`Invalid config files: ${d}`);u.innerHTML="";return p.map(setValueOf).map((c=>{if(shouldRender(c)){const u=document.createElement("div");c.id&&(u.id=c.id.replaceAll(" ","_"),u.title=`ID: ${u.id}`),u.classList.add("mapclay"),c.target=u,u.dataset.render="rendering",u.dataset.mapclay=c.valueOf()}return u.append(c.target),window.CSS.supports(`width: ${c.width}`)&&(c.target.style.width=c.width),window.CSS.supports(`height: ${c.height}`)&&(c.target.style.height=c.height),c})).filter(shouldRender).map(renderWithConfig)},renderByYamlWith=(c=null)=>async(u,d=null)=>{const p=(c=>{const u=[];return ai(c,(c=>{"object"!=typeof c||Array.isArray(c)?u.length>0&&(u.at(-1).eval=c.toString()):u.push(c??{})})),0===u.length?[{}]:u})(d??u.textContent);return renderWith(c)(u,p)},ui=renderWith(applyDefaultAliases),di=renderByYamlWith(applyDefaultAliases);document.currentScript&&(globalThis.mapclay={render:ui,renderWith:renderWith,renderByYaml:di,renderByYamlWith:renderByYamlWith});class BaseEvent{constructor(c){this.propagationStopped,this.defaultPrevented,this.type=c,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}function stopPropagation(c){c.stopPropagation()}var pi="propertychange";var gi=class Disposable{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function ascending(c,u){return c>u?1:c<u?-1:0}function descending(c,u){return c<u?1:c>u?-1:0}function linearFindNearest(c,u,d){if(c[0]<=u)return 0;const p=c.length;if(u<=c[p-1])return p-1;if("function"==typeof d){for(let g=1;g<p;++g){const p=c[g];if(p===u)return g;if(p<u)return d(u,c[g-1],p)>0?g-1:g}return p-1}if(d>0){for(let d=1;d<p;++d)if(c[d]<u)return d-1;return p-1}if(d<0){for(let d=1;d<p;++d)if(c[d]<=u)return d;return p-1}for(let d=1;d<p;++d){if(c[d]==u)return d;if(c[d]<u)return c[d-1]-u<u-c[d]?d-1:d}return p-1}function reverseSubArray(c,u,d){for(;u<d;){const p=c[u];c[u]=c[d],c[d]=p,++u,--d}}function extend$3(c,u){const d=Array.isArray(u)?u:[u],p=d.length;for(let u=0;u<p;u++)c[c.length]=d[u]}function equals$2(c,u){const d=c.length;if(d!==u.length)return!1;for(let p=0;p<d;p++)if(c[p]!==u[p])return!1;return!0}function TRUE(){return!0}function FALSE(){return!1}function VOID(){}function memoizeOne(c){let u,d,p;return function(){const g=Array.prototype.slice.call(arguments);return d&&this===p&&equals$2(g,d)||(p=this,d=g,u=c.apply(this,arguments)),u}}function toPromise(c){return function promiseGetter(){let u;try{u=c()}catch(c){return Promise.reject(c)}return u instanceof Promise?u:Promise.resolve(u)}()}function clear$2(c){for(const u in c)delete c[u]}function isEmpty$1(c){let u;for(u in c)return!1;return!u}class Target extends gi{constructor(c){super(),this.eventTarget_=c,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(c,u){if(!c||!u)return;const d=this.listeners_||(this.listeners_={}),p=d[c]||(d[c]=[]);p.includes(u)||p.push(u)}dispatchEvent(c){const u="string"==typeof c,d=u?c:c.type,p=this.listeners_&&this.listeners_[d];if(!p)return;const g=u?new BaseEvent(c):c;g.target||(g.target=this.eventTarget_||this);const f=this.dispatching_||(this.dispatching_={}),_=this.pendingRemovals_||(this.pendingRemovals_={});let y;d in f||(f[d]=0,_[d]=0),++f[d];for(let c=0,u=p.length;c<u;++c)if(y="handleEvent"in p[c]?p[c].handleEvent(g):p[c].call(this,g),!1===y||g.propagationStopped){y=!1;break}if(0==--f[d]){let c=_[d];for(delete _[d];c--;)this.removeEventListener(d,VOID);delete f[d]}return y}disposeInternal(){this.listeners_&&clear$2(this.listeners_)}getListeners(c){return this.listeners_&&this.listeners_[c]||void 0}hasListener(c){return!!this.listeners_&&(c?c in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(c,u){if(!this.listeners_)return;const d=this.listeners_[c];if(!d)return;const p=d.indexOf(u);-1!==p&&(this.pendingRemovals_&&c in this.pendingRemovals_?(d[p]=VOID,++this.pendingRemovals_[c]):(d.splice(p,1),0===d.length&&delete this.listeners_[c]))}}var mi="change",fi="error",_i="contextmenu",yi="click",xi="dblclick",vi="keydown",Si="keypress",wi="load",Ci="touchmove",Ei="wheel";function listen(c,u,d,p,g){if(g){const g=d;d=function(){c.removeEventListener(u,d),g.apply(p??this,arguments)}}else p&&p!==c&&(d=d.bind(p));const f={target:c,type:u,listener:d};return c.addEventListener(u,d),f}function listenOnce(c,u,d,p){return listen(c,u,d,p,!0)}function unlistenByKey(c){c&&c.target&&(c.target.removeEventListener(c.type,c.listener),clear$2(c))}class Observable extends Target{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(mi)}getRevision(){return this.revision_}onInternal(c,u){if(Array.isArray(c)){const d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=listen(this,c[g],u);return p}return listen(this,c,u)}onceInternal(c,u){let d;if(Array.isArray(c)){const p=c.length;d=new Array(p);for(let g=0;g<p;++g)d[g]=listenOnce(this,c[g],u)}else d=listenOnce(this,c,u);return u.ol_key=d,d}unInternal(c,u){const d=u.ol_key;if(d)!function unByKey(c){if(Array.isArray(c))for(let u=0,d=c.length;u<d;++u)unlistenByKey(c[u]);else unlistenByKey(c)}(d);else if(Array.isArray(c))for(let d=0,p=c.length;d<p;++d)this.removeEventListener(c[d],u);else this.removeEventListener(c,u)}}Observable.prototype.on,Observable.prototype.once,Observable.prototype.un;var Pi=Observable;function abstract(){throw new Error("Unimplemented abstract method.")}let bi=0;function getUid(c){return c.ol_uid||(c.ol_uid=String(++bi))}class ObjectEvent extends BaseEvent{constructor(c,u,d){super(c),this.key=u,this.oldValue=d}}var Mi=class BaseObject extends Pi{constructor(c){super(),this.on,this.once,this.un,getUid(this),this.values_=null,void 0!==c&&this.setProperties(c)}get(c){let u;return this.values_&&this.values_.hasOwnProperty(c)&&(u=this.values_[c]),u}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(c,u){let d;d=`change:${c}`,this.hasListener(d)&&this.dispatchEvent(new ObjectEvent(d,c,u)),d=pi,this.hasListener(d)&&this.dispatchEvent(new ObjectEvent(d,c,u))}addChangeListener(c,u){this.addEventListener(`change:${c}`,u)}removeChangeListener(c,u){this.removeEventListener(`change:${c}`,u)}set(c,u,d){const p=this.values_||(this.values_={});if(d)p[c]=u;else{const d=p[c];p[c]=u,d!==u&&this.notify(c,d)}}setProperties(c,u){for(const d in c)this.set(d,c[d],u)}applyProperties(c){c.values_&&Object.assign(this.values_||(this.values_={}),c.values_)}unset(c,u){if(this.values_&&c in this.values_){const d=this.values_[c];delete this.values_[c],isEmpty$1(this.values_)&&(this.values_=null),u||this.notify(c,d)}}},Ti="add",Ri="remove";const Li="length";class CollectionEvent extends BaseEvent{constructor(c,u,d){super(c),this.element=u,this.index=d}}var Ai=class Collection extends Mi{constructor(c,u){if(super(),this.on,this.once,this.un,u=u||{},this.unique_=!!u.unique,this.array_=c||[],this.unique_)for(let c=0,u=this.array_.length;c<u;++c)this.assertUnique_(this.array_[c],c);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(c){for(let u=0,d=c.length;u<d;++u)this.push(c[u]);return this}forEach(c){const u=this.array_;for(let d=0,p=u.length;d<p;++d)c(u[d],d,u)}getArray(){return this.array_}item(c){return this.array_[c]}getLength(){return this.get(Li)}insertAt(c,u){if(c<0||c>this.getLength())throw new Error("Index out of bounds: "+c);this.unique_&&this.assertUnique_(u),this.array_.splice(c,0,u),this.updateLength_(),this.dispatchEvent(new CollectionEvent(Ti,u,c))}pop(){return this.removeAt(this.getLength()-1)}push(c){this.unique_&&this.assertUnique_(c);const u=this.getLength();return this.insertAt(u,c),this.getLength()}remove(c){const u=this.array_;for(let d=0,p=u.length;d<p;++d)if(u[d]===c)return this.removeAt(d)}removeAt(c){if(c<0||c>=this.getLength())return;const u=this.array_[c];return this.array_.splice(c,1),this.updateLength_(),this.dispatchEvent(new CollectionEvent(Ri,u,c)),u}setAt(c,u){if(c>=this.getLength())return void this.insertAt(c,u);if(c<0)throw new Error("Index out of bounds: "+c);this.unique_&&this.assertUnique_(u,c);const d=this.array_[c];this.array_[c]=u,this.dispatchEvent(new CollectionEvent(Ri,d,c)),this.dispatchEvent(new CollectionEvent(Ti,u,c))}updateLength_(){this.set(Li,this.array_.length)}assertUnique_(c,u){for(let d=0,p=this.array_.length;d<p;++d)if(this.array_[d]===c&&d!==u)throw new Error("Duplicate item added to a unique collection")}};function assert(c,u){if(!c)throw new Error(u)}class Feature extends Mi{constructor(c){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),c)if("function"==typeof c.getSimplifiedGeometry){const u=c;this.setGeometry(u)}else{const u=c;this.setProperties(u)}}clone(){const c=new Feature(this.hasProperties()?this.getProperties():null);c.setGeometryName(this.getGeometryName());const u=this.getGeometry();u&&c.setGeometry(u.clone());const d=this.getStyle();return d&&c.setStyle(d),c}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(unlistenByKey(this.geometryChangeKey_),this.geometryChangeKey_=null);const c=this.getGeometry();c&&(this.geometryChangeKey_=listen(c,mi,this.handleGeometryChange_,this)),this.changed()}setGeometry(c){this.set(this.geometryName_,c)}setStyle(c){this.style_=c,this.styleFunction_=c?function createStyleFunction(c){if("function"==typeof c)return c;let u;if(Array.isArray(c))u=c;else{assert("function"==typeof c.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`");u=[c]}return function(){return u}}(c):void 0,this.changed()}setId(c){this.id_=c,this.changed()}setGeometryName(c){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=c,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}var Ii=Feature;const Fi=new Array(6);function reset(c){return set(c,1,0,0,1,0,0)}function multiply(c,u){const d=c[0],p=c[1],g=c[2],f=c[3],_=c[4],y=c[5],x=u[0],v=u[1],C=u[2],M=u[3],T=u[4],L=u[5];return c[0]=d*x+g*v,c[1]=p*x+f*v,c[2]=d*C+g*M,c[3]=p*C+f*M,c[4]=d*T+g*L+_,c[5]=p*T+f*L+y,c}function set(c,u,d,p,g,f,_){return c[0]=u,c[1]=d,c[2]=p,c[3]=g,c[4]=f,c[5]=_,c}function apply(c,u){const d=u[0],p=u[1];return u[0]=c[0]*d+c[2]*p+c[4],u[1]=c[1]*d+c[3]*p+c[5],u}function scale$3(c,u,d){return multiply(c,set(Fi,u,0,0,d,0,0))}function translate$1(c,u,d){return multiply(c,set(Fi,1,0,0,1,u,d))}function compose(c,u,d,p,g,f,_,y){const x=Math.sin(f),v=Math.cos(f);return c[0]=p*v,c[1]=g*x,c[2]=-p*x,c[3]=g*v,c[4]=_*p*v-y*p*x+u,c[5]=_*g*x+y*g*v+d,c}function makeInverse(c,u){const d=function determinant(c){return c[0]*c[3]-c[1]*c[2]}(u);assert(0!==d,"Transformation matrix cannot be inverted");const p=u[0],g=u[1],f=u[2],_=u[3],y=u[4],x=u[5];return c[0]=_/d,c[1]=-g/d,c[2]=-f/d,c[3]=p/d,c[4]=(f*x-_*y)/d,c[5]=-(p*x-g*y)/d,c}const ki=[1e6,1e6,1e6,1e6,2,2];var Oi={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function boundingExtent(c){const u=createEmpty();for(let d=0,p=c.length;d<p;++d)extendCoordinate(u,c[d]);return u}function buffer(c,u,d){return d?(d[0]=c[0]-u,d[1]=c[1]-u,d[2]=c[2]+u,d[3]=c[3]+u,d):[c[0]-u,c[1]-u,c[2]+u,c[3]+u]}function clone(c,u){return u?(u[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u):c.slice()}function closestSquaredDistanceXY(c,u,d){let p,g;return p=u<c[0]?c[0]-u:c[2]<u?u-c[2]:0,g=d<c[1]?c[1]-d:c[3]<d?d-c[3]:0,p*p+g*g}function containsCoordinate(c,u){return containsXY(c,u[0],u[1])}function containsExtent(c,u){return c[0]<=u[0]&&u[2]<=c[2]&&c[1]<=u[1]&&u[3]<=c[3]}function containsXY(c,u,d){return c[0]<=u&&u<=c[2]&&c[1]<=d&&d<=c[3]}function coordinateRelationship(c,u){const d=c[0],p=c[1],g=c[2],f=c[3],_=u[0],y=u[1];let x=Oi.UNKNOWN;return _<d?x|=Oi.LEFT:_>g&&(x|=Oi.RIGHT),y<p?x|=Oi.BELOW:y>f&&(x|=Oi.ABOVE),x===Oi.UNKNOWN&&(x=Oi.INTERSECTING),x}function createEmpty(){return[1/0,1/0,-1/0,-1/0]}function createOrUpdate$2(c,u,d,p,g){return g?(g[0]=c,g[1]=u,g[2]=d,g[3]=p,g):[c,u,d,p]}function createOrUpdateEmpty(c){return createOrUpdate$2(1/0,1/0,-1/0,-1/0,c)}function createOrUpdateFromCoordinate(c,u){const d=c[0],p=c[1];return createOrUpdate$2(d,p,d,p,u)}function createOrUpdateFromFlatCoordinates(c,u,d,p,g){return extendFlatCoordinates(createOrUpdateEmpty(g),c,u,d,p)}function equals$1(c,u){return c[0]==u[0]&&c[2]==u[2]&&c[1]==u[1]&&c[3]==u[3]}function extend$2(c,u){return u[0]<c[0]&&(c[0]=u[0]),u[2]>c[2]&&(c[2]=u[2]),u[1]<c[1]&&(c[1]=u[1]),u[3]>c[3]&&(c[3]=u[3]),c}function extendCoordinate(c,u){u[0]<c[0]&&(c[0]=u[0]),u[0]>c[2]&&(c[2]=u[0]),u[1]<c[1]&&(c[1]=u[1]),u[1]>c[3]&&(c[3]=u[1])}function extendFlatCoordinates(c,u,d,p,g){for(;d<p;d+=g)extendXY(c,u[d],u[d+1]);return c}function extendXY(c,u,d){c[0]=Math.min(c[0],u),c[1]=Math.min(c[1],d),c[2]=Math.max(c[2],u),c[3]=Math.max(c[3],d)}function forEachCorner(c,u){let d;return d=u(getBottomLeft(c)),d||(d=u(getBottomRight(c)),d||(d=u(getTopRight(c)),d||(d=u(getTopLeft(c)),d||!1)))}function getArea(c){let u=0;return isEmpty(c)||(u=getWidth(c)*getHeight(c)),u}function getBottomLeft(c){return[c[0],c[1]]}function getBottomRight(c){return[c[2],c[1]]}function getCenter(c){return[(c[0]+c[2])/2,(c[1]+c[3])/2]}function getCorner(c,u){let d;if("bottom-left"===u)d=getBottomLeft(c);else if("bottom-right"===u)d=getBottomRight(c);else if("top-left"===u)d=getTopLeft(c);else{if("top-right"!==u)throw new Error("Invalid corner");d=getTopRight(c)}return d}function getForViewAndSize(c,u,d,p,g){const[f,_,y,x,v,C,M,T]=function getRotatedViewport(c,u,d,p){const g=u*p[0]/2,f=u*p[1]/2,_=Math.cos(d),y=Math.sin(d),x=g*_,v=g*y,C=f*_,M=f*y,T=c[0],L=c[1];return[T-x+M,L-v-C,T-x-M,L-v+C,T+x-M,L+v+C,T+x+M,L+v-C,T-x+M,L-v-C]}(c,u,d,p);return createOrUpdate$2(Math.min(f,y,v,M),Math.min(_,x,C,T),Math.max(f,y,v,M),Math.max(_,x,C,T),g)}function getHeight(c){return c[3]-c[1]}function getIntersection(c,u,d){const p=d||[1/0,1/0,-1/0,-1/0];return intersects$1(c,u)?(c[0]>u[0]?p[0]=c[0]:p[0]=u[0],c[1]>u[1]?p[1]=c[1]:p[1]=u[1],c[2]<u[2]?p[2]=c[2]:p[2]=u[2],c[3]<u[3]?p[3]=c[3]:p[3]=u[3]):createOrUpdateEmpty(p),p}function getTopLeft(c){return[c[0],c[3]]}function getTopRight(c){return[c[2],c[3]]}function getWidth(c){return c[2]-c[0]}function intersects$1(c,u){return c[0]<=u[2]&&c[2]>=u[0]&&c[1]<=u[3]&&c[3]>=u[1]}function isEmpty(c){return c[2]<c[0]||c[3]<c[1]}function scaleFromCenter(c,u){const d=(c[2]-c[0])/2*(u-1),p=(c[3]-c[1])/2*(u-1);c[0]-=d,c[2]+=d,c[1]-=p,c[3]+=p}function applyTransform(c,u,d,p){if(isEmpty(c))return createOrUpdateEmpty(d);let g=[];if(p>1){const u=c[2]-c[0],d=c[3]-c[1];for(let f=0;f<p;++f)g.push(c[0]+u*f/p,c[1],c[2],c[1]+d*f/p,c[2]-u*f/p,c[3],c[0],c[3]-d*f/p)}else g=[c[0],c[1],c[2],c[1],c[2],c[3],c[0],c[3]];u(g,g,2);const f=[],_=[];for(let c=0,u=g.length;c<u;c+=2)f.push(g[c]),_.push(g[c+1]);return function _boundingExtentXYs(c,u,d){return createOrUpdate$2(Math.min.apply(null,c),Math.min.apply(null,u),Math.max.apply(null,c),Math.max.apply(null,u),d)}(f,_,d)}function wrapX$2(c,u){const d=u.getExtent(),p=getCenter(c);if(u.canWrapX()&&(p[0]<d[0]||p[0]>=d[2])){const u=getWidth(d),g=Math.floor((p[0]-d[0])/u)*u;c[0]-=g,c[2]-=g}return c}function wrapAndSliceX(c,u,d){if(u.canWrapX()){const p=u.getExtent();if(!isFinite(c[0])||!isFinite(c[2]))return[[p[0],c[1],p[2],c[3]]];wrapX$2(c,u);const g=getWidth(p);if(getWidth(c)>g&&!d)return[[p[0],c[1],p[2],c[3]]];if(c[0]<p[0])return[[c[0]+g,c[1],p[2],c[3]],[p[0],c[1],c[2],c[3]]];if(c[2]>p[2])return[[c[0],c[1],p[2],c[3]],[p[0],c[1],c[2]-g,c[3]]]}return[c]}const Ni={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Di=class Projection{constructor(c){this.code_=c.code,this.units_=c.units,this.extent_=void 0!==c.extent?c.extent:null,this.worldExtent_=void 0!==c.worldExtent?c.worldExtent:null,this.axisOrientation_=void 0!==c.axisOrientation?c.axisOrientation:"enu",this.global_=void 0!==c.global&&c.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=c.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=c.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Ni[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(c){this.global_=c,this.canWrapX_=!(!c||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(c){this.defaultTileGrid_=c}setExtent(c){this.extent_=c,this.canWrapX_=!(!this.global_||!c)}setWorldExtent(c){this.worldExtent_=c}setGetPointResolution(c){this.getPointResolutionFunc_=c}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const Gi=6378137,ji=Math.PI*Gi,zi=[-ji,-ji,ji,ji],Bi=[-180,-85,180,85],Ui=Gi*Math.log(Math.tan(Math.PI/2));class EPSG3857Projection extends Di{constructor(c){super({code:c,units:"m",extent:zi,global:!0,worldExtent:Bi,getPointResolution:function(c,u){return c/Math.cosh(u[1]/Gi)}})}}const $i=[new EPSG3857Projection("EPSG:3857"),new EPSG3857Projection("EPSG:102100"),new EPSG3857Projection("EPSG:102113"),new EPSG3857Projection("EPSG:900913"),new EPSG3857Projection("http://www.opengis.net/def/crs/EPSG/0/3857"),new EPSG3857Projection("http://www.opengis.net/gml/srs/epsg.xml#3857")];function fromEPSG4326(c,u,d,p){const g=c.length;d=d>1?d:2,p=p??d,void 0===u&&(u=d>2?c.slice():new Array(g));for(let d=0;d<g;d+=p){u[d]=ji*c[d]/180;let p=Gi*Math.log(Math.tan(Math.PI*(+c[d+1]+90)/360));p>Ui?p=Ui:p<-Ui&&(p=-Ui),u[d+1]=p}return u}function toEPSG4326(c,u,d,p){const g=c.length;d=d>1?d:2,p=p??d,void 0===u&&(u=d>2?c.slice():new Array(g));for(let d=0;d<g;d+=p)u[d]=180*c[d]/ji,u[d+1]=360*Math.atan(Math.exp(c[d+1]/Gi))/Math.PI-90;return u}const Wi=[-180,-90,180,90],Xi=6378137*Math.PI/180;class EPSG4326Projection extends Di{constructor(c,u){super({code:c,units:"degrees",extent:Wi,axisOrientation:u,global:!0,metersPerUnit:Xi,worldExtent:Wi})}}const Vi=[new EPSG4326Projection("CRS:84"),new EPSG4326Projection("EPSG:4326","neu"),new EPSG4326Projection("urn:ogc:def:crs:OGC:1.3:CRS84"),new EPSG4326Projection("urn:ogc:def:crs:OGC:2:84"),new EPSG4326Projection("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new EPSG4326Projection("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new EPSG4326Projection("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let qi={};let Yi={};function add$2(c,u,d){const p=c.getCode(),g=u.getCode();p in Yi||(Yi[p]={}),Yi[p][g]=d}function get$3(c,u){let d;return c in Yi&&u in Yi[c]&&(d=Yi[c][u]),d}function clamp(c,u,d){return Math.min(Math.max(c,u),d)}function squaredSegmentDistance(c,u,d,p,g,f){const _=g-d,y=f-p;if(0!==_||0!==y){const x=((c-d)*_+(u-p)*y)/(_*_+y*y);x>1?(d=g,p=f):x>0&&(d+=_*x,p+=y*x)}return squaredDistance(c,u,d,p)}function squaredDistance(c,u,d,p){const g=d-c,f=p-u;return g*g+f*f}function toDegrees(c){return 180*c/Math.PI}function toRadians(c){return c*Math.PI/180}function modulo(c,u){const d=c%u;return d*u<0?d+u:d}function lerp(c,u,d){return c+d*(u-c)}function toFixed(c,u){const d=Math.pow(10,u);return Math.round(c*d)/d}function round(c,u){return Math.round(toFixed(c,u))}function floor(c,u){return Math.floor(toFixed(c,u))}function ceil(c,u){return Math.ceil(toFixed(c,u))}function padNumber(c,u,d){const p=void 0!==d?c.toFixed(d):""+c;let g=p.indexOf(".");return g=-1===g?p.length:g,g>u?p:new Array(1+u-g).join("0")+p}function compareVersions(c,u){const d=(""+c).split("."),p=(""+u).split(".");for(let c=0;c<Math.max(d.length,p.length);c++){const u=parseInt(d[c]||"0",10),g=parseInt(p[c]||"0",10);if(u>g)return 1;if(g>u)return-1}return 0}function add$1(c,u){return c[0]+=+u[0],c[1]+=+u[1],c}function degreesToStringHDMS(c,u,d){const p=modulo(u+180,360)-180,g=Math.abs(3600*p),f=d||0;let _=Math.floor(g/3600),y=Math.floor((g-3600*_)/60),x=toFixed(g-3600*_-60*y,f);x>=60&&(x=0,y+=1),y>=60&&(y=0,_+=1);let v=_+"°";return 0===y&&0===x||(v+=" "+padNumber(y,2)+"′"),0!==x&&(v+=" "+padNumber(x,2,f)+"″"),0!==p&&(v+=" "+c.charAt(p<0?1:0)),v}function equals(c,u){let d=!0;for(let p=c.length-1;p>=0;--p)if(c[p]!=u[p]){d=!1;break}return d}function rotate$1(c,u){const d=Math.cos(u),p=Math.sin(u),g=c[0]*d-c[1]*p,f=c[1]*d+c[0]*p;return c[0]=g,c[1]=f,c}function scale$2(c,u){return c[0]*=u,c[1]*=u,c}function wrapX$1(c,u){if(u.canWrapX()){const d=getWidth(u.getExtent()),p=getWorldsAway(c,u,d);p&&(c[0]-=p*d)}return c}function getWorldsAway(c,u,d){const p=u.getExtent();let g=0;return u.canWrapX()&&(c[0]<p[0]||c[0]>p[2])&&(d=d||getWidth(p),g=Math.floor((c[0]-p[0])/d)),g}const Zi=6371008.8;function getDistance(c,u,d){d=d||Zi;const p=toRadians(c[1]),g=toRadians(u[1]),f=(g-p)/2,_=toRadians(u[0]-c[0])/2,y=Math.sin(f)*Math.sin(f)+Math.sin(_)*Math.sin(_)*Math.cos(p)*Math.cos(g);return 2*d*Math.atan2(Math.sqrt(y),Math.sqrt(1-y))}function offset(c,u,d,p){p=p||Zi;const g=toRadians(c[1]),f=toRadians(c[0]),_=u/p,y=Math.asin(Math.sin(g)*Math.cos(_)+Math.cos(g)*Math.sin(_)*Math.cos(d));return[toDegrees(f+Math.atan2(Math.sin(d)*Math.sin(_)*Math.cos(g),Math.cos(_)-Math.sin(g)*Math.sin(y))),toDegrees(y)]}const Ki={info:1,warn:2,error:3,none:4};let Hi=Ki.info;function warn(...c){console.warn(...c)}function error(...c){Hi>Ki.error||console.error(...c)}let Ji=!0;function disableCoordinateWarning(c){Ji=!(void 0===c||c)}function cloneTransform(c,u){if(void 0!==u)for(let d=0,p=c.length;d<p;++d)u[d]=c[d];else u=c.slice();return u}function identityTransform(c,u){if(void 0!==u&&c!==u){for(let d=0,p=c.length;d<p;++d)u[d]=c[d];c=u}return c}function addProjection(c){!function add$3(c,u){qi[c]=u}(c.getCode(),c),add$2(c,c,cloneTransform)}function addProjections(c){c.forEach(addProjection)}function get$2(c){return"string"==typeof c?function get$4(c){return qi[c]||qi[c.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}(c):c||null}function getPointResolution(c,u,d,p){let g;const f=(c=get$2(c)).getPointResolutionFunc();if(f){if(g=f(u,d),p&&p!==c.getUnits()){const u=c.getMetersPerUnit();u&&(g=g*u/Ni[p])}}else{const f=c.getUnits();if("degrees"==f&&!p||"degrees"==p)g=u;else{const _=getTransformFromProjections(c,get$2("EPSG:4326"));if(_===identityTransform&&"degrees"!==f)g=u*c.getMetersPerUnit();else{let c=[d[0]-u/2,d[1],d[0]+u/2,d[1],d[0],d[1]-u/2,d[0],d[1]+u/2];c=_(c,c,2);g=(getDistance(c.slice(0,2),c.slice(2,4))+getDistance(c.slice(4,6),c.slice(6,8)))/2}const y=p?Ni[p]:c.getMetersPerUnit();void 0!==y&&(g/=y)}}return g}function addEquivalentProjections(c){addProjections(c),c.forEach((function(u){c.forEach((function(c){u!==c&&add$2(u,c,cloneTransform)}))}))}function addEquivalentTransforms(c,u,d,p){c.forEach((function(c){u.forEach((function(u){add$2(c,u,d),add$2(u,c,p)}))}))}function createProjection(c,u){return c?"string"==typeof c?get$2(c):c:get$2(u)}function createTransformFromCoordinateTransform(c){return function(u,d,p,g){const f=u.length;p=void 0!==p?p:2,g=g??p,d=void 0!==d?d:new Array(f);for(let _=0;_<f;_+=g){const f=c(u.slice(_,_+p)),y=f.length;for(let c=0,p=g;c<p;++c)d[_+c]=c>=y?u[_+c]:f[c]}return d}}function addCoordinateTransforms(c,u,d,p){const g=get$2(c),f=get$2(u);add$2(g,f,createTransformFromCoordinateTransform(d)),add$2(f,g,createTransformFromCoordinateTransform(p))}function toLonLat(c,u){const d=transform$1(c,void 0!==u?u:"EPSG:3857","EPSG:4326"),p=d[0];return(p<-180||p>180)&&(d[0]=modulo(p+180,360)-180),d}function equivalent(c,u){if(c===u)return!0;const d=c.getUnits()===u.getUnits();if(c.getCode()===u.getCode())return d;return getTransformFromProjections(c,u)===cloneTransform&&d}function getTransformFromProjections(c,u){let d=get$3(c.getCode(),u.getCode());return d||(d=identityTransform),d}function getTransform(c,u){return getTransformFromProjections(get$2(c),get$2(u))}function transform$1(c,u,d){return getTransform(u,d)(c,void 0,c.length)}function transformExtent(c,u,d,p){return applyTransform(c,getTransform(u,d),void 0,p)}let Qi=null;function setUserProjection(c){Qi=get$2(c)}function getUserProjection(){return Qi}function toUserCoordinate(c,u){return Qi?transform$1(c,u,Qi):c}function fromUserCoordinate(c,u){return Qi?transform$1(c,Qi,u):(Ji&&!equals(c,[0,0])&&c[0]>=-180&&c[0]<=180&&c[1]>=-90&&c[1]<=90&&(Ji=!1,warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),c)}function toUserExtent(c,u){return Qi?transformExtent(c,u,Qi):c}function fromUserExtent(c,u){return Qi?transformExtent(c,Qi,u):c}function toUserResolution(c,u){if(!Qi)return c;const d=get$2(u).getMetersPerUnit(),p=Qi.getMetersPerUnit();return d&&p?c*d/p:c}function createSafeCoordinateTransform(c,u,d){return function(p){let g,f;if(c.canWrapX()){const u=c.getExtent(),_=getWidth(u);f=getWorldsAway(p=p.slice(0),c,_),f&&(p[0]=p[0]-f*_),p[0]=clamp(p[0],u[0],u[2]),p[1]=clamp(p[1],u[1],u[3]),g=d(p)}else g=d(p);return f&&u.canWrapX()&&(g[0]+=f*getWidth(u.getExtent())),g}}function addCommon(){addEquivalentProjections($i),addEquivalentProjections(Vi),addEquivalentTransforms(Vi,$i,fromEPSG4326,toEPSG4326)}addCommon();var tr=Object.freeze({__proto__:null,METERS_PER_UNIT:Ni,Projection:Di,addCommon:addCommon,addCoordinateTransforms:addCoordinateTransforms,addEquivalentProjections:addEquivalentProjections,addEquivalentTransforms:addEquivalentTransforms,addProjection:addProjection,addProjections:addProjections,clearAllProjections:function clearAllProjections(){!function clear$1(){qi={}}(),function clear(){Yi={}}()},clearUserProjection:function clearUserProjection(){Qi=null},cloneTransform:cloneTransform,createProjection:createProjection,createSafeCoordinateTransform:createSafeCoordinateTransform,createTransformFromCoordinateTransform:createTransformFromCoordinateTransform,disableCoordinateWarning:disableCoordinateWarning,equivalent:equivalent,fromLonLat:function fromLonLat(c,u){return disableCoordinateWarning(),transform$1(c,"EPSG:4326",void 0!==u?u:"EPSG:3857")},fromUserCoordinate:fromUserCoordinate,fromUserExtent:fromUserExtent,fromUserResolution:function fromUserResolution(c,u){if(!Qi)return c;const d=get$2(u).getMetersPerUnit(),p=Qi.getMetersPerUnit();return d&&p?c*p/d:c},get:get$2,getPointResolution:getPointResolution,getTransform:getTransform,getTransformFromProjections:getTransformFromProjections,getUserProjection:getUserProjection,identityTransform:identityTransform,setUserProjection:setUserProjection,toLonLat:toLonLat,toUserCoordinate:toUserCoordinate,toUserExtent:toUserExtent,toUserResolution:toUserResolution,transform:transform$1,transformExtent:transformExtent,transformWithProjections:function transformWithProjections(c,u,d){return getTransformFromProjections(u,d)(c)},useGeographic:function useGeographic(){setUserProjection("EPSG:4326")}});function transform2D(c,u,d,p,g,f,_){f=f||[],_=_||2;let y=0;for(let x=u;x<d;x+=p){const u=c[x],d=c[x+1];f[y++]=g[0]*u+g[2]*d+g[4],f[y++]=g[1]*u+g[3]*d+g[5];for(let u=2;u<_;u++)f[y++]=c[x+u]}return f&&f.length!=y&&(f.length=y),f}function rotate(c,u,d,p,g,f,_){_=_||[];const y=Math.cos(g),x=Math.sin(g),v=f[0],C=f[1];let M=0;for(let g=u;g<d;g+=p){const u=c[g]-v,d=c[g+1]-C;_[M++]=v+u*y-d*x,_[M++]=C+u*x+d*y;for(let u=g+2;u<g+p;++u)_[M++]=c[u]}return _&&_.length!=M&&(_.length=M),_}const er=[1,0,0,1,0,0];var ir=class Geometry extends Mi{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=memoizeOne(((c,u,d)=>{if(!d)return this.getSimplifiedGeometry(u);const p=this.clone();return p.applyTransform(d),p.getSimplifiedGeometry(u)}))}simplifyTransformed(c,u){return this.simplifyTransformedInternal(this.getRevision(),c,u)}clone(){return abstract()}closestPointXY(c,u,d,p){return abstract()}containsXY(c,u){const d=this.getClosestPoint([c,u]);return d[0]===c&&d[1]===u}getClosestPoint(c,u){return u=u||[NaN,NaN],this.closestPointXY(c[0],c[1],u,1/0),u}intersectsCoordinate(c){return this.containsXY(c[0],c[1])}computeExtent(c){return abstract()}getExtent(c){if(this.extentRevision_!=this.getRevision()){const c=this.computeExtent(this.extent_);(isNaN(c[0])||isNaN(c[1]))&&createOrUpdateEmpty(c),this.extentRevision_=this.getRevision()}return function returnOrUpdate(c,u){return u?(u[0]=c[0],u[1]=c[1],u[2]=c[2],u[3]=c[3],u):c}(this.extent_,c)}rotate(c,u){abstract()}scale(c,u,d){abstract()}simplify(c){return this.getSimplifiedGeometry(c*c)}getSimplifiedGeometry(c){return abstract()}getType(){return abstract()}applyTransform(c){abstract()}intersectsExtent(c){return abstract()}translate(c,u){abstract()}transform(c,u){const d=get$2(c),p="tile-pixels"==d.getUnits()?function(c,p,g){const f=d.getExtent(),_=d.getWorldExtent(),y=getHeight(_)/getHeight(f);return compose(er,_[0],_[3],y,-y,0,0,0),transform2D(c,0,c.length,g,er,p),getTransform(d,u)(c,p,g)}:getTransform(d,u);return this.applyTransform(p),this}};function getLayoutForStride(c){let u;return 2==c?u="XY":3==c?u="XYZ":4==c&&(u="XYZM"),u}function getStrideForLayout(c){let u;return"XY"==c?u=2:"XYZ"==c||"XYM"==c?u=3:"XYZM"==c&&(u=4),u}var rr=class SimpleGeometry extends ir{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(c){return createOrUpdateFromFlatCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}getCoordinates(){return abstract()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(c){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),c<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&c<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const u=this.getSimplifiedGeometryInternal(c);return u.getFlatCoordinates().length<this.flatCoordinates.length?u:(this.simplifiedGeometryMaxMinSquaredTolerance=c,this)}getSimplifiedGeometryInternal(c){return this}getStride(){return this.stride}setFlatCoordinates(c,u){this.stride=getStrideForLayout(c),this.layout=c,this.flatCoordinates=u}setCoordinates(c,u){abstract()}setLayout(c,u,d){let p;if(c)p=getStrideForLayout(c);else{for(let c=0;c<d;++c){if(0===u.length)return this.layout="XY",void(this.stride=2);u=u[0]}p=u.length,c=getLayoutForStride(p)}this.layout=c,this.stride=p}applyTransform(c){this.flatCoordinates&&(c(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(c,u){const d=this.getFlatCoordinates();if(d){const p=this.getStride();rotate(d,0,d.length,p,c,u,d),this.changed()}}scale(c,u,d){void 0===u&&(u=c),d||(d=getCenter(this.getExtent()));const p=this.getFlatCoordinates();if(p){const g=this.getStride();!function scale$1(c,u,d,p,g,f,_,y){y=y||[];const x=_[0],v=_[1];let C=0;for(let _=u;_<d;_+=p){const u=c[_]-x,d=c[_+1]-v;y[C++]=x+g*u,y[C++]=v+f*d;for(let u=_+2;u<_+p;++u)y[C++]=c[u]}return y&&y.length!=C&&(y.length=C),y}(p,0,p.length,g,c,u,d,p),this.changed()}}translate(c,u){const d=this.getFlatCoordinates();if(d){const p=this.getStride();!function translate(c,u,d,p,g,f,_){_=_||[];let y=0;for(let x=u;x<d;x+=p){_[y++]=c[x]+g,_[y++]=c[x+1]+f;for(let u=x+2;u<x+p;++u)_[y++]=c[u]}return _&&_.length!=y&&(_.length=y),_}(d,0,d.length,p,c,u,d),this.changed()}}};function assignClosest(c,u,d,p,g,f,_){const y=c[u],x=c[u+1],v=c[d]-y,C=c[d+1]-x;let M;if(0===v&&0===C)M=u;else{const T=((g-y)*v+(f-x)*C)/(v*v+C*C);if(T>1)M=d;else{if(T>0){for(let g=0;g<p;++g)_[g]=lerp(c[u+g],c[d+g],T);return void(_.length=p)}M=u}}for(let u=0;u<p;++u)_[u]=c[M+u];_.length=p}function maxSquaredDelta(c,u,d,p,g){let f=c[u],_=c[u+1];for(u+=p;u<d;u+=p){const d=c[u],p=c[u+1],y=squaredDistance(f,_,d,p);y>g&&(g=y),f=d,_=p}return g}function arrayMaxSquaredDelta(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];g=maxSquaredDelta(c,u,_,p,g),u=_}return g}function assignClosestPoint(c,u,d,p,g,f,_,y,x,v,C){if(u==d)return v;let M,T;if(0===g){if(T=squaredDistance(_,y,c[u],c[u+1]),T<v){for(M=0;M<p;++M)x[M]=c[u+M];return x.length=p,T}return v}C=C||[NaN,NaN];let L=u+p;for(;L<d;)if(assignClosest(c,L-p,L,p,_,y,C),T=squaredDistance(_,y,C[0],C[1]),T<v){for(v=T,M=0;M<p;++M)x[M]=C[M];x.length=p,L+=p}else L+=p*Math.max((Math.sqrt(T)-Math.sqrt(v))/g|0,1);if(f&&(assignClosest(c,d-p,u,p,_,y,C),T=squaredDistance(_,y,C[0],C[1]),T<v)){for(v=T,M=0;M<p;++M)x[M]=C[M];x.length=p}return v}function assignClosestArrayPoint(c,u,d,p,g,f,_,y,x,v,C){C=C||[NaN,NaN];for(let M=0,T=d.length;M<T;++M){const T=d[M];v=assignClosestPoint(c,u,T,p,g,f,_,y,x,v,C),u=T}return v}function deflateCoordinate(c,u,d,p){for(let p=0,g=d.length;p<g;++p)c[u++]=d[p];return u}function deflateCoordinates(c,u,d,p){for(let g=0,f=d.length;g<f;++g){const f=d[g];for(let d=0;d<p;++d)c[u++]=f[d]}return u}function deflateCoordinatesArray(c,u,d,p,g){g=g||[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=deflateCoordinates(c,u,d[_],p);g[f++]=y,u=y}return g.length=f,g}function deflateMultiCoordinatesArray(c,u,d,p,g){g=g||[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=deflateCoordinatesArray(c,u,d[_],p,g[f]);0===y.length&&(y[0]=u),g[f++]=y,u=y[y.length-1]}return g.length=f,g}function douglasPeucker(c,u,d,p,g,f,_){const y=(d-u)/p;if(y<3){for(;u<d;u+=p)f[_++]=c[u],f[_++]=c[u+1];return _}const x=new Array(y);x[0]=1,x[y-1]=1;const v=[u,d-p];let C=0;for(;v.length>0;){const d=v.pop(),f=v.pop();let _=0;const y=c[f],M=c[f+1],T=c[d],L=c[d+1];for(let u=f+p;u<d;u+=p){const d=squaredSegmentDistance(c[u],c[u+1],y,M,T,L);d>_&&(C=u,_=d)}_>g&&(x[(C-u)/p]=1,f+p<C&&v.push(f,C),C+p<d&&v.push(C,d))}for(let d=0;d<y;++d)x[d]&&(f[_++]=c[u+d*p],f[_++]=c[u+d*p+1]);return _}function douglasPeuckerArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x];_=douglasPeucker(c,u,v,p,g,f,_),y.push(_),u=v}return _}function snap(c,u){return u*Math.round(c/u)}function quantize(c,u,d,p,g,f,_){if(u==d)return _;let y,x,v=snap(c[u],g),C=snap(c[u+1],g);u+=p,f[_++]=v,f[_++]=C;do{if(y=snap(c[u],g),x=snap(c[u+1],g),(u+=p)==d)return f[_++]=y,f[_++]=x,_}while(y==v&&x==C);for(;u<d;){const d=snap(c[u],g),M=snap(c[u+1],g);if(u+=p,d==y&&M==x)continue;const T=y-v,L=x-C,A=d-v,I=M-C;T*I==L*A&&(T<0&&A<T||T==A||T>0&&A>T)&&(L<0&&I<L||L==I||L>0&&I>L)?(y=d,x=M):(f[_++]=y,f[_++]=x,v=y,C=x,y=d,x=M)}return f[_++]=y,f[_++]=x,_}function quantizeArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x];_=quantize(c,u,v,p,g,f,_),y.push(_),u=v}return _}function inflateCoordinates(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=u;_<d;_+=p)g[f++]=c.slice(_,_+p);return g.length=f,g}function inflateCoordinatesArray(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=d[_];g[f++]=inflateCoordinates(c,u,y,p,g[f]),u=y}return g.length=f,g}function inflateMultiCoordinatesArray(c,u,d,p,g){g=void 0!==g?g:[];let f=0;for(let _=0,y=d.length;_<y;++_){const y=d[_];g[f++]=1===y.length&&y[0]===u?[]:inflateCoordinatesArray(c,u,y,p,g[f]),u=y[y.length-1]}return g.length=f,g}function linearRing(c,u,d,p){let g=0;const f=c[d-p],_=c[d-p+1];let y=0,x=0;for(;u<d;u+=p){const d=c[u]-f,p=c[u+1]-_;g+=x*d-y*p,y=d,x=p}return g/2}function linearRings(c,u,d,p){let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f];g+=linearRing(c,u,_,p),u=_}return g}class LinearRing extends rr{constructor(c,u){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===u||Array.isArray(c[0])?this.setCoordinates(c,u):this.setFlatCoordinates(u,c)}clone(){return new LinearRing(this.flatCoordinates.slice(),this.layout)}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,c,u,d,p))}getArea(){return linearRing(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(c){const u=[];return u.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,0),new LinearRing(u,"XY")}getType(){return"LinearRing"}intersectsExtent(c){return!1}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var nr=LinearRing;var sr=class Point extends rr{constructor(c,u){super(),this.setCoordinates(c,u)}clone(){const c=new Point(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){const g=this.flatCoordinates,f=squaredDistance(c,u,g[0],g[1]);if(f<p){const c=this.stride;for(let u=0;u<c;++u)d[u]=g[u];return d.length=c,f}return p}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(c){return createOrUpdateFromCoordinate(this.flatCoordinates,c)}getType(){return"Point"}intersectsExtent(c){return containsXY(c,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(c,u){this.setLayout(u,c,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinate(this.flatCoordinates,0,c,this.stride),this.changed()}};function linearRingContainsExtent(c,u,d,p,g){return!forEachCorner(g,(function(g){return!linearRingContainsXY(c,u,d,p,g[0],g[1])}))}function linearRingContainsXY(c,u,d,p,g,f){let _=0,y=c[d-p],x=c[d-p+1];for(;u<d;u+=p){const d=c[u],p=c[u+1];x<=f?p>f&&(d-y)*(f-x)-(g-y)*(p-x)>0&&_++:p<=f&&(d-y)*(f-x)-(g-y)*(p-x)<0&&_--,y=d,x=p}return 0!==_}function linearRingsContainsXY(c,u,d,p,g,f){if(0===d.length)return!1;if(!linearRingContainsXY(c,u,d[0],p,g,f))return!1;for(let u=1,_=d.length;u<_;++u)if(linearRingContainsXY(c,d[u-1],d[u],p,g,f))return!1;return!0}function getInteriorPointOfArray(c,u,d,p,g,f,_){let y,x,v,C,M,T,L;const A=g[f+1],I=[];for(let g=0,f=d.length;g<f;++g){const f=d[g];for(C=c[f-p],T=c[f-p+1],y=u;y<f;y+=p)M=c[y],L=c[y+1],(A<=T&&L<=A||T<=A&&A<=L)&&(v=(A-T)/(L-T)*(M-C)+C,I.push(v)),C=M,T=L}let k=NaN,O=-1/0;for(I.sort(ascending),C=I[0],y=1,x=I.length;y<x;++y){M=I[y];const g=Math.abs(M-C);g>O&&(v=(C+M)/2,linearRingsContainsXY(c,u,d,p,v,A)&&(k=v,O=g)),C=M}return isNaN(k)&&(k=g[f]),_?(_.push(k,A,O),_):[k,A,O]}function getInteriorPointsOfMultiArray(c,u,d,p,g){let f=[];for(let _=0,y=d.length;_<y;++_){const y=d[_];f=getInteriorPointOfArray(c,u,y,p,g,2*_,f),u=y[y.length-1]}return f}function forEach(c,u,d,p,g){let f;for(u+=p;u<d;u+=p)if(f=g(c.slice(u-p,u),c.slice(u,u+p)),f)return f;return!1}function intersectsLineString(c,u,d,p,g){const f=extendFlatCoordinates([1/0,1/0,-1/0,-1/0],c,u,d,p);return!!intersects$1(g,f)&&(!!containsExtent(g,f)||(f[0]>=g[0]&&f[2]<=g[2]||(f[1]>=g[1]&&f[3]<=g[3]||forEach(c,u,d,p,(function(c,u){return function intersectsSegment(c,u,d){let p=!1;const g=coordinateRelationship(c,u),f=coordinateRelationship(c,d);if(g===Oi.INTERSECTING||f===Oi.INTERSECTING)p=!0;else{const _=c[0],y=c[1],x=c[2],v=c[3],C=u[0],M=u[1],T=d[0],L=d[1],A=(L-M)/(T-C);let I,k;f&Oi.ABOVE&&!(g&Oi.ABOVE)&&(I=T-(L-v)/A,p=I>=_&&I<=x),p||!(f&Oi.RIGHT)||g&Oi.RIGHT||(k=L-(T-x)*A,p=k>=y&&k<=v),p||!(f&Oi.BELOW)||g&Oi.BELOW||(I=T-(L-y)/A,p=I>=_&&I<=x),p||!(f&Oi.LEFT)||g&Oi.LEFT||(k=L-(T-_)*A,p=k>=y&&k<=v)}return p}(g,c,u)})))))}function intersectsLinearRing(c,u,d,p,g){return!!intersectsLineString(c,u,d,p,g)||(!!linearRingContainsXY(c,u,d,p,g[0],g[1])||(!!linearRingContainsXY(c,u,d,p,g[0],g[3])||(!!linearRingContainsXY(c,u,d,p,g[2],g[1])||!!linearRingContainsXY(c,u,d,p,g[2],g[3]))))}function intersectsLinearRingArray(c,u,d,p,g){if(!intersectsLinearRing(c,u,d[0],p,g))return!1;if(1===d.length)return!0;for(let u=1,f=d.length;u<f;++u)if(linearRingContainsExtent(c,d[u-1],d[u],p,g)&&!intersectsLineString(c,d[u-1],d[u],p,g))return!1;return!0}function coordinates(c,u,d,p){for(;u<d-p;){for(let g=0;g<p;++g){const f=c[u+g];c[u+g]=c[d-p+g],c[d-p+g]=f}u+=p,d-=p}}function linearRingIsClockwise(c,u,d,p){let g=0,f=c[d-p],_=c[d-p+1];for(;u<d;u+=p){const d=c[u],p=c[u+1];g+=(d-f)*(p+_),f=d,_=p}return 0===g?void 0:g>0}function linearRingsAreOriented(c,u,d,p,g){g=void 0!==g&&g;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=linearRingIsClockwise(c,u,_,p);if(0===f){if(g&&y||!g&&!y)return!1}else if(g&&!y||!g&&y)return!1;u=_}return!0}function linearRingssAreOriented(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];if(!linearRingsAreOriented(c,u,_,p,g))return!1;_.length&&(u=_[_.length-1])}return!0}function orientLinearRings(c,u,d,p,g){g=void 0!==g&&g;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=linearRingIsClockwise(c,u,_,p);(0===f?g&&y||!g&&!y:g&&!y||!g&&y)&&coordinates(c,u,_,p),u=_}return u}function orientLinearRingsArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f)u=orientLinearRings(c,u,d[f],p,g);return u}function inflateEnds(c,u){const d=[];let p,g=0,f=0;for(let _=0,y=u.length;_<y;++_){const y=u[_],x=linearRingIsClockwise(c,g,y,2);if(void 0===p&&(p=x),x===p)d.push(u.slice(f,_+1));else{if(0===d.length)continue;d[d.length-1].push(u[f])}f=_+1,g=y}return d}class Polygon extends rr{constructor(c,u,d){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==u&&d?(this.setFlatCoordinates(u,c),this.ends_=d):this.setCoordinates(c,u)}appendLinearRing(c){this.flatCoordinates?extend$3(this.flatCoordinates,c.getFlatCoordinates()):this.flatCoordinates=c.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const c=new Polygon(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,c,u,d,p))}containsXY(c,u){return linearRingsContainsXY(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c,u)}getArea(){return linearRings(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(c){let u;return void 0!==c?(u=this.getOrientedFlatCoordinates().slice(),orientLinearRings(u,0,this.ends_,this.stride,c)):u=this.flatCoordinates,inflateCoordinatesArray(u,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const c=getCenter(this.getExtent());this.flatInteriorPoint_=getInteriorPointOfArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new sr(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(c){return c<0||this.ends_.length<=c?null:new nr(this.flatCoordinates.slice(0===c?0:this.ends_[c-1],this.ends_[c]),this.layout)}getLinearRings(){const c=this.layout,u=this.flatCoordinates,d=this.ends_,p=[];let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f],y=new nr(u.slice(g,_),c);p.push(y),g=_}return p}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const c=this.flatCoordinates;linearRingsAreOriented(c,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=c:(this.orientedFlatCoordinates_=c.slice(),this.orientedFlatCoordinates_.length=orientLinearRings(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=quantizeArray(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(c),u,0,d),new Polygon(u,"XY",d)}getType(){return"Polygon"}intersectsExtent(c){return intersectsLinearRingArray(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,2),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.ends_);this.flatCoordinates.length=0===d.length?0:d[d.length-1],this.changed()}}var or=Polygon;function fromExtent(c){if(isEmpty(c))throw new Error("Cannot create polygon from empty extent");const u=c[0],d=c[1],p=c[2],g=c[3],f=[u,d,u,g,p,g,p,d,u,d];return new Polygon(f,"XY",[f.length])}const ar="accuracy",lr="accuracyGeometry",hr="altitude",cr="altitudeAccuracy",ur="heading",dr="position",pr="projection",gr="speed",mr="tracking",fr="trackingOptions",_r="error";class GeolocationError extends BaseEvent{constructor(c){super(_r),this.code=c.code,this.message=c.message}}var yr=class Geolocation extends Mi{constructor(c){super(),this.on,this.once,this.un,c=c||{},this.position_=null,this.transform_=identityTransform,this.watchId_=void 0,this.addChangeListener(pr,this.handleProjectionChanged_),this.addChangeListener(mr,this.handleTrackingChanged_),void 0!==c.projection&&this.setProjection(c.projection),void 0!==c.trackingOptions&&this.setTrackingOptions(c.trackingOptions),this.setTracking(void 0!==c.tracking&&c.tracking)}disposeInternal(){this.setTracking(!1),super.disposeInternal()}handleProjectionChanged_(){const c=this.getProjection();c&&(this.transform_=getTransformFromProjections(get$2("EPSG:4326"),c),this.position_&&this.set(dr,this.transform_(this.position_)))}handleTrackingChanged_(){if("geolocation"in navigator){const c=this.getTracking();c&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):c||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}}positionChange_(c){const u=c.coords;this.set(ar,u.accuracy),this.set(hr,null===u.altitude?void 0:u.altitude),this.set(cr,null===u.altitudeAccuracy?void 0:u.altitudeAccuracy),this.set(ur,null===u.heading?void 0:toRadians(u.heading)),this.position_?(this.position_[0]=u.longitude,this.position_[1]=u.latitude):this.position_=[u.longitude,u.latitude];const d=this.transform_(this.position_);this.set(dr,d.slice()),this.set(gr,null===u.speed?void 0:u.speed);const p=function circular(c,u,d,p){d=d||32;const g=[];for(let f=0;f<d;++f)extend$3(g,offset(c,u,2*Math.PI*f/d,p));return g.push(g[0],g[1]),new Polygon(g,"XY",[g.length])}(this.position_,u.accuracy);p.applyTransform(this.transform_),this.set(lr,p),this.changed()}positionError_(c){this.dispatchEvent(new GeolocationError(c))}getAccuracy(){return this.get(ar)}getAccuracyGeometry(){return this.get(lr)||null}getAltitude(){return this.get(hr)}getAltitudeAccuracy(){return this.get(cr)}getHeading(){return this.get(ur)}getPosition(){return this.get(dr)}getProjection(){return this.get(pr)}getSpeed(){return this.get(gr)}getTracking(){return this.get(mr)}getTrackingOptions(){return this.get(fr)}setProjection(c){this.set(pr,get$2(c))}setTracking(c){this.set(mr,c)}setTrackingOptions(c){this.set(fr,c)}},xr="prerender",vr="postrender",Sr="precompose",wr="postcompose",Cr="rendercomplete",Er={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},Pr={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},br={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};br.max=br.whitepoint[2].D65,br.rgb=function(c,u){u=u||br.whitepoint[2].E;var d,p,g,f=c[0]/u[0],_=c[1]/u[1],y=c[2]/u[2];return p=-.96924363628087*f+1.87596750150772*_+.041555057407175*y,g=.055630079696993*f+-.20397695888897*_+1.056971514242878*y,d=(d=3.240969941904521*f+-1.537383177570093*_+-.498610760293*y)>.0031308?1.055*Math.pow(d,1/2.4)-.055:d*=12.92,p=p>.0031308?1.055*Math.pow(p,1/2.4)-.055:p*=12.92,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*=12.92,[255*(d=Math.min(Math.max(0,d),1)),255*(p=Math.min(Math.max(0,p),1)),255*(g=Math.min(Math.max(0,g),1))]},Pr.xyz=function(c,u){var d=c[0]/255,p=c[1]/255,g=c[2]/255,f=.21263900587151*(d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92)+.71516867876775*(p=p>.04045?Math.pow((p+.055)/1.055,2.4):p/12.92)+.072192315360733*(g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92),_=.019330818715591*d+.11919477979462*p+.95053215224966*g;return[(.41239079926595*d+.35758433938387*p+.18048078840183*g)*(u=u||br.whitepoint[2].E)[0],f*u[1],_*u[2]]};var Mr={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(c,u,d){var p,g,f,_,y,x,v,C,M;if(f=c[0],_=c[1],y=c[2],0===f)return[0,0,0];return u=u||"D65",d=d||2,p=_/(13*f)+4*(v=br.whitepoint[d][u][0])/(v+15*(C=br.whitepoint[d][u][1])+3*(M=br.whitepoint[d][u][2]))||0,g=y/(13*f)+9*C/(v+15*C+3*M)||0,[9*(x=f>8?C*Math.pow((f+16)/116,3):C*f*.0011070564598794539)*p/(4*g)||0,x,x*(12-3*p-20*g)/(4*g)||0]}};br.luv=function(c,u,d){var p,g,f,_,y,x,v,C,M,T,L;u=u||"D65",d=d||2,T=4*(v=br.whitepoint[d][u][0])/(v+15*(C=br.whitepoint[d][u][1])+3*(M=br.whitepoint[d][u][2])),L=9*C/(v+15*C+3*M),p=4*(_=c[0])/(_+15*(y=c[1])+3*(x=c[2]))||0,g=9*y/(_+15*y+3*x)||0;var A=y/C;return[f=A<=.008856451679035631?903.2962962962961*A:116*Math.pow(A,1/3)-16,13*f*(p-T),13*f*(g-L)]};var Tr={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(c){var u,d=c[0],p=c[1];return u=c[2]/360*2*Math.PI,[d,p*Math.cos(u),p*Math.sin(u)]},xyz:function(c){return Mr.xyz(Tr.luv(c))}};Mr.lchuv=function(c){var u=c[0],d=c[1],p=c[2],g=Math.sqrt(d*d+p*p),f=360*Math.atan2(p,d)/2/Math.PI;return f<0&&(f+=360),[u,g,f]},br.lchuv=function(c){return Mr.lchuv(br.luv(c))};var Rr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Lr={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var Ar={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(c){var u,d,p,g,f,_=c[0]/360,y=c[1]/100,x=c[2]/100,v=0;if(0===y)return[f=255*x,f,f];for(u=2*x-(d=x<.5?x*(1+y):x+y-x*y),g=[0,0,0];v<3;)(p=_+1/3*-(v-1))<0?p++:p>1&&p--,f=6*p<1?u+6*(d-u)*p:2*p<1?d:3*p<2?u+(d-u)*(2/3-p)*6:u,g[v++]=255*f;return g}};function rgba(c){var u;Array.isArray(c)&&c.raw&&(c=String.raw(...arguments)),c instanceof Number&&(c=+c);var d=function parse$3(c){var u,d,p=[],g=1;if("number"==typeof c)return{space:"rgb",values:[c>>>16,(65280&c)>>>8,255&c],alpha:1};if("number"==typeof c)return{space:"rgb",values:[c>>>16,(65280&c)>>>8,255&c],alpha:1};if(c=String(c).toLowerCase(),Rr[c])p=Rr[c].slice(),d="rgb";else if("transparent"===c)g=0,d="rgb",p=[0,0,0];else if("#"===c[0]){var f=c.slice(1),_=f.length;g=1,_<=4?(p=[parseInt(f[0]+f[0],16),parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16)],4===_&&(g=parseInt(f[3]+f[3],16)/255)):(p=[parseInt(f[0]+f[1],16),parseInt(f[2]+f[3],16),parseInt(f[4]+f[5],16)],8===_&&(g=parseInt(f[6]+f[7],16)/255)),p[0]||(p[0]=0),p[1]||(p[1]=0),p[2]||(p[2]=0),d="rgb"}else if(u=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(c)){var y=u[1],x="cmyk"===(d=y.replace(/a$/,""))?4:"gray"===d?1:3;p=u[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===d&&(d=p.shift()),p=p.map((function(c,u){if("%"===c[c.length-1])return c=parseFloat(c)/100,3===u?c:"rgb"===d?255*c:"h"===d[0]?100*c:"l"!==d[0]||u?"lab"===d?125*c:"lch"===d?u<2?150*c:360*c:"o"!==d[0]||u?"oklab"===d?.4*c:"oklch"===d?u<2?.4*c:360*c:c:c:100*c;if("h"===d[u]||2===u&&"h"===d[d.length-1]){if(void 0!==Lr[c])return Lr[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return 360*parseFloat(c);if(c.endsWith("grad"))return 360*parseFloat(c)/400;if(c.endsWith("rad"))return 180*parseFloat(c)/Math.PI}return"none"===c?0:parseFloat(c)})),g=p.length>x?p.pop():1}else/[0-9](?:\s|\/|,)/.test(c)&&(p=c.match(/([0-9]+)/g).map((function(c){return parseFloat(c)})),d=c.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:d,values:p,alpha:g}}(c);if(!d.space)return[];const p="h"===d.space[0]?Ar.min:Pr.min,g="h"===d.space[0]?Ar.max:Pr.max;return(u=Array(3))[0]=Math.min(Math.max(d.values[0],p[0]),g[0]),u[1]=Math.min(Math.max(d.values[1],p[1]),g[1]),u[2]=Math.min(Math.max(d.values[2],p[2]),g[2]),"h"===d.space[0]&&(u=Ar.rgb(u)),u.push(Math.min(Math.max(d.alpha,0),1)),u}Pr.hsl=function(c){var u,d,p=c[0]/255,g=c[1]/255,f=c[2]/255,_=Math.min(p,g,f),y=Math.max(p,g,f),x=y-_;return y===_?u=0:p===y?u=(g-f)/x:g===y?u=2+(f-p)/x:f===y&&(u=4+(p-g)/x),(u=Math.min(60*u,360))<0&&(u+=360),d=(_+y)/2,[u,100*(y===_?0:d<=.5?x/(y+_):x/(2-y-_)),100*d]};const Ir=[NaN,NaN,NaN,0];const Fr=1024,kr={};let Or=0;function withAlpha(c){if(4===c.length)return c;const u=c.slice();return u[3]=1,u}function rgbaToLcha(c){const u=br.lchuv(Pr.xyz(c));return u[3]=c[3],u}function fromString(c){if("none"===c)return Ir;if(kr.hasOwnProperty(c))return kr[c];if(Or>=Fr){let c=0;for(const u in kr)3&c++||(delete kr[u],--Or)}const u=rgba(c);if(4!==u.length)throw new Error('failed to parse "'+c+'" as color');for(const d of u)if(isNaN(d))throw new Error('failed to parse "'+c+'" as color');return normalize(u),kr[c]=u,++Or,u}function asArray(c){return Array.isArray(c)?c:fromString(c)}function normalize(c){return c[0]=clamp(c[0]+.5|0,0,255),c[1]=clamp(c[1]+.5|0,0,255),c[2]=clamp(c[2]+.5|0,0,255),c[3]=clamp(c[3],0,1),c}function toString(c){let u=c[0];u!=(0|u)&&(u=u+.5|0);let d=c[1];d!=(0|d)&&(d=d+.5|0);let p=c[2];p!=(0|p)&&(p=p+.5|0);return"rgba("+u+","+d+","+p+","+(void 0===c[3]?1:Math.round(1e3*c[3])/1e3)+")"}const Nr="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Dr=Nr.includes("firefox"),Gr=Nr.includes("safari")&&!Nr.includes("chrom")&&(Nr.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Nr)),jr=Nr.includes("webkit")&&!Nr.includes("edge"),zr=Nr.includes("macintosh"),Br="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Ur="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,$r="undefined"!=typeof Image&&Image.prototype.decode,Wr="function"==typeof createImageBitmap,Xr=function(){let c=!1;try{const u=Object.defineProperty({},"passive",{get:function(){c=!0}});window.addEventListener("_",null,u),window.removeEventListener("_",null,u)}catch(c){}return c}();function createCanvasContext2D(c,u,d,p){let g;return g=d&&d.length?d.shift():Ur?new OffscreenCanvas(c||300,u||300):document.createElement("canvas"),c&&(g.width=c),u&&(g.height=u),g.getContext("2d",p)}let Vr;function getSharedCanvasContext2D(){return Vr||(Vr=createCanvasContext2D(1,1)),Vr}function releaseCanvas$1(c){const u=c.canvas;u.width=1,u.height=1,c.clearRect(0,0,1,1)}function outerWidth(c){let u=c.offsetWidth;const d=getComputedStyle(c);return u+=parseInt(d.marginLeft,10)+parseInt(d.marginRight,10),u}function outerHeight(c){let u=c.offsetHeight;const d=getComputedStyle(c);return u+=parseInt(d.marginTop,10)+parseInt(d.marginBottom,10),u}function replaceNode(c,u){const d=u.parentNode;d&&d.replaceChild(c,u)}function removeChildren(c){for(;c.lastChild;)c.lastChild.remove()}function decodeFallback(c,u){return u&&(c.src=u),c.src&&$r?new Promise(((u,d)=>c.decode().then((()=>u(c))).catch((p=>c.complete&&c.width?u(c):d(p))))):function load(c,u){return new Promise(((u,d)=>{function handleLoad(){unlisten(),u(c)}function handleError(){unlisten(),d(new Error("Image load error"))}function unlisten(){c.removeEventListener("load",handleLoad),c.removeEventListener("error",handleError)}c.addEventListener("load",handleLoad),c.addEventListener("error",handleError)}))}(c)}function decode$1(c,u){return u&&(c.src=u),c.src&&$r&&Wr?c.decode().then((()=>createImageBitmap(c))).catch((u=>{if(c.complete&&c.width)return c;throw u})):decodeFallback(c)}var qr=class ImageWrapper extends Target{constructor(c,u,d,p){super(),this.extent=c,this.pixelRatio_=d,this.resolution=u,this.state="function"==typeof p?Er.IDLE:p,this.image_=null,this.loader="function"==typeof p?p:null}changed(){this.dispatchEvent(mi)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==Er.IDLE&&this.loader){this.state=Er.LOADING,this.changed();const c=this.getResolution(),u=Array.isArray(c)?c[0]:c;toPromise((()=>this.loader(this.getExtent(),u,this.getPixelRatio()))).then((c=>{"image"in c&&(this.image_=c.image),"extent"in c&&(this.extent=c.extent),"resolution"in c&&(this.resolution=c.resolution),"pixelRatio"in c&&(this.pixelRatio_=c.pixelRatio),(c instanceof HTMLImageElement||c instanceof ImageBitmap||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement)&&(this.image_=c),this.state=Er.LOADED})).catch((c=>{this.state=Er.ERROR,console.error(c)})).finally((()=>this.changed()))}}setImage(c){this.image_=c}setResolution(c){this.resolution=c}};function getCacheKey$2(c,u,d){return u+":"+c+":"+(d?asArray(d):"null")}const Yr=new class IconImageCache{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let c=0;for(const u in this.cache_){const d=this.cache_[u];3&c++||d.hasListener()||(delete this.cache_[u],delete this.patternCache_[u],--this.cacheSize_)}}}get(c,u,d){const p=getCacheKey$2(c,u,d);return p in this.cache_?this.cache_[p]:null}getPattern(c,u,d){const p=getCacheKey$2(c,u,d);return p in this.patternCache_?this.patternCache_[p]:null}set(c,u,d,p,g){const f=getCacheKey$2(c,u,d),_=f in this.cache_;this.cache_[f]=p,g&&(p.getImageState()===Er.IDLE&&p.load(),p.getImageState()===Er.LOADING?p.ready().then((()=>{this.patternCache_[f]=getSharedCanvasContext2D().createPattern(p.getImage(1),"repeat")})):this.patternCache_[f]=getSharedCanvasContext2D().createPattern(p.getImage(1),"repeat")),_||++this.cacheSize_}setSize(c){this.maxCacheSize_=c,this.expire()}};let Zr=null;class IconImage extends Target{constructor(c,u,d,p,g){super(),this.hitDetectionImage_=null,this.image_=c,this.crossOrigin_=d,this.canvas_={},this.color_=g,this.imageState_=void 0===p?Er.IDLE:p,this.size_=c&&c.width&&c.height?[c.width,c.height]:null,this.src_=u,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===Er.LOADED){Zr||(Zr=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})),Zr.drawImage(this.image_,0,0);try{Zr.getImageData(0,0,1,1),this.tainted_=!1}catch(c){Zr=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(mi)}handleImageError_(){this.imageState_=Er.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Er.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(c){return this.image_||this.initializeImage_(),this.replaceColor_(c),this.canvas_[c]?this.canvas_[c]:this.image_}getPixelRatio(c){return this.replaceColor_(c),this.canvas_[c]?c:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const c=this.size_[0],u=this.size_[1],d=createCanvasContext2D(c,u);d.fillRect(0,0,c,u),this.hitDetectionImage_=d.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Er.IDLE){this.image_||this.initializeImage_(),this.imageState_=Er.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(c){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&decodeFallback(this.image_,this.src_).then((c=>{this.image_=c,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(c){if(!this.color_||this.canvas_[c]||this.imageState_!==Er.LOADED)return;const u=this.image_,d=document.createElement("canvas");d.width=Math.ceil(u.width*c),d.height=Math.ceil(u.height*c);const p=d.getContext("2d");p.scale(c,c),p.drawImage(u,0,0),p.globalCompositeOperation="multiply",p.fillStyle=function asString(c){return"string"==typeof c?c:toString(c)}(this.color_),p.fillRect(0,0,d.width/c,d.height/c),p.globalCompositeOperation="destination-in",p.drawImage(u,0,0),this.canvas_[c]=d}ready(){return this.ready_||(this.ready_=new Promise((c=>{if(this.imageState_===Er.LOADED||this.imageState_===Er.ERROR)c();else{const onChange=()=>{this.imageState_!==Er.LOADED&&this.imageState_!==Er.ERROR||(this.removeEventListener(mi,onChange),c())};this.addEventListener(mi,onChange)}}))),this.ready_}}function get$1(c,u,d,p,g,f){let _=void 0===u?void 0:Yr.get(u,d,g);return _||(_=new IconImage(c,c&&"src"in c?c.src||void 0:u,d,p,g),Yr.set(u,d,g,_,f)),f&&_&&!Yr.getPattern(u,d,g)&&Yr.set(u,d,g,_,f),_}var Kr=IconImage;class Fill{constructor(c){c=c||{},this.patternImage_=null,this.color_=null,void 0!==c.color&&this.setColor(c.color)}clone(){const c=this.getColor();return new Fill({color:Array.isArray(c)?c.slice():c||void 0})}getColor(){return this.color_}setColor(c){if(null!==c&&"object"==typeof c&&"src"in c){const u=get$1(null,c.src,"anonymous",void 0,c.offset?null:c.color?c.color:null,!(c.offset&&c.size));u.ready().then((()=>{this.patternImage_=null})),u.getImageState()===Er.IDLE&&u.load(),u.getImageState()===Er.LOADING&&(this.patternImage_=u)}this.color_=c}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}var Hr=Fill;function interpolatePoint(c,u,d,p,g,f,_){let y,x;const v=(d-u)/p;if(1===v)y=u;else if(2===v)y=u,x=g;else if(0!==v){let f=c[u],_=c[u+1],v=0;const C=[0];for(let g=u+p;g<d;g+=p){const u=c[g],d=c[g+1];v+=Math.sqrt((u-f)*(u-f)+(d-_)*(d-_)),C.push(v),f=u,_=d}const M=g*v,T=function binarySearch(c,u,d){let p,g;d=d||ascending;let f=0,_=c.length,y=!1;for(;f<_;)p=f+(_-f>>1),g=+d(c[p],u),g<0?f=p+1:(_=p,y=!g);return y?f:~f}(C,M);T<0?(x=(M-C[-T-2])/(C[-T-1]-C[-T-2]),y=u+(-T-2)*p):y=u+T*p}_=_>1?_:2,f=f||new Array(_);for(let u=0;u<_;++u)f[u]=void 0===y?NaN:void 0===x?c[y+u]:lerp(c[y+u],c[y+p+u],x);return f}function lineStringCoordinateAtM(c,u,d,p,g,f){if(d==u)return null;let _;if(g<c[u+p-1])return f?(_=c.slice(u,u+p),_[p-1]=g,_):null;if(c[d-1]<g)return f?(_=c.slice(d-p,d),_[p-1]=g,_):null;if(g==c[u+p-1])return c.slice(u,u+p);let y=u/p,x=d/p;for(;y<x;){const u=y+x>>1;g<c[(u+1)*p-1]?x=u:y=u+1}const v=c[y*p-1];if(g==v)return c.slice((y-1)*p,(y-1)*p+p);const C=(g-v)/(c[(y+1)*p-1]-v);_=[];for(let u=0;u<p-1;++u)_.push(lerp(c[(y-1)*p+u],c[y*p+u],C));return _.push(g),_}function lineStringLength(c,u,d,p){let g=c[u],f=c[u+1],_=0;for(let y=u+p;y<d;y+=p){const u=c[y],d=c[y+1];_+=Math.sqrt((u-g)*(u-g)+(d-f)*(d-f)),g=u,f=d}return _}class LineString extends rr{constructor(c,u){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===u||Array.isArray(c[0])?this.setCoordinates(c,u):this.setFlatCoordinates(u,c)}appendCoordinate(c){extend$3(this.flatCoordinates,c),this.changed()}clone(){const c=new LineString(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(maxSquaredDelta(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestPoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,c,u,d,p))}forEachSegment(c){return forEach(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}getCoordinateAtM(c,u){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(u=void 0!==u&&u,lineStringCoordinateAtM(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u))}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(c,u){return interpolatePoint(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,this.stride)}getLength(){return lineStringLength(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(c){const u=[];return u.length=douglasPeucker(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c,u,0),new LineString(u,"XY")}getType(){return"LineString"}intersectsExtent(c){return intersectsLineString(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var Jr=LineString;class Stroke{constructor(c){c=c||{},this.color_=void 0!==c.color?c.color:null,this.lineCap_=c.lineCap,this.lineDash_=void 0!==c.lineDash?c.lineDash:null,this.lineDashOffset_=c.lineDashOffset,this.lineJoin_=c.lineJoin,this.miterLimit_=c.miterLimit,this.width_=c.width}clone(){const c=this.getColor();return new Stroke({color:Array.isArray(c)?c.slice():c||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(c){this.color_=c}setLineCap(c){this.lineCap_=c}setLineDash(c){this.lineDash_=c}setLineDashOffset(c){this.lineDashOffset_=c}setLineJoin(c){this.lineJoin_=c}setMiterLimit(c){this.miterLimit_=c}setWidth(c){this.width_=c}}var Qr=Stroke;function hasArea(c){return c[0]>0&&c[1]>0}function scale(c,u,d){return void 0===d&&(d=[0,0]),d[0]=c[0]*u+.5|0,d[1]=c[1]*u+.5|0,d}function toSize(c,u){return Array.isArray(c)?c:(void 0===u?u=[c,c]:(u[0]=c,u[1]=c),u)}class ImageStyle{constructor(c){this.opacity_=c.opacity,this.rotateWithView_=c.rotateWithView,this.rotation_=c.rotation,this.scale_=c.scale,this.scaleArray_=toSize(c.scale),this.displacement_=c.displacement,this.declutterMode_=c.declutterMode}clone(){const c=this.getScale();return new ImageStyle({opacity:this.getOpacity(),scale:Array.isArray(c)?c.slice():c,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return abstract()}getImage(c){return abstract()}getHitDetectionImage(){return abstract()}getPixelRatio(c){return 1}getImageState(){return abstract()}getImageSize(){return abstract()}getOrigin(){return abstract()}getSize(){return abstract()}setDisplacement(c){this.displacement_=c}setOpacity(c){this.opacity_=c}setRotateWithView(c){this.rotateWithView_=c}setRotation(c){this.rotation_=c}setScale(c){this.scale_=c,this.scaleArray_=toSize(c)}listenImageChange(c){abstract()}load(){abstract()}unlistenImageChange(c){abstract()}ready(){return Promise.resolve()}}var tn=ImageStyle;function asColorLike(c){return c?Array.isArray(c)?toString(c):"object"==typeof c&&"src"in c?function asCanvasPattern(c){if(!c.offset||!c.size)return Yr.getPattern(c.src,"anonymous",c.color);const u=c.src+":"+c.offset,d=Yr.getPattern(u,void 0,c.color);if(d)return d;const p=Yr.get(c.src,"anonymous",null);if(p.getImageState()!==Er.LOADED)return null;const g=createCanvasContext2D(c.size[0],c.size[1]);return g.drawImage(p.getImage(1),c.offset[0],c.offset[1],c.size[0],c.size[1],0,0,c.size[0],c.size[1]),get$1(g.canvas,u,void 0,Er.LOADED,c.color,!0),Yr.getPattern(u,void 0,c.color)}(c):c:null}const en="ol-hidden",rn="ol-unselectable",nn="ol-unsupported",sn="ol-control",on="ol-collapsed",an=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),ln=["style","variant","weight","size","lineHeight","family"],getFontParameters=function(c){const u=c.match(an);if(!u)return null;const d={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let c=0,p=ln.length;c<p;++c){const p=u[c+1];void 0!==p&&(d[ln[c]]=p)}return d.families=d.family.split(/,\s?/),d},hn="10px sans-serif",cn="#000",un="round",dn=[],pn="round",gn="#000",mn="center",fn="middle",_n=[0,0,0,0],yn=new Mi;let xn,vn=null;const Sn={},wn=function(){const c="32px ",u=["monospace","serif"],d=u.length,p="wmytzilWMYTZIL@#/&?$%10";let g,f;function isAvailable(g,_,y){let x=!0;for(let v=0;v<d;++v){const d=u[v];if(f=measureTextWidth(g+" "+_+" "+c+d,p),y!=d){const u=measureTextWidth(g+" "+_+" "+c+y+","+d,p);x=x&&u!=f}}return!!x}function check(){let c=!0;const u=yn.getKeys();for(let d=0,p=u.length;d<p;++d){const p=u[d];if(yn.get(p)<100){const[u,d,g]=p.split("\n");isAvailable(u,d,g)?(clear$2(Sn),vn=null,xn=void 0,yn.set(p,100)):(yn.set(p,yn.get(p)+1,!0),c=!1)}}c&&(clearInterval(g),g=void 0)}return function(c){const u=getFontParameters(c);if(!u)return;const d=u.families;for(let c=0,p=d.length;c<p;++c){const p=d[c],f=u.style+"\n"+u.weight+"\n"+p;void 0===yn.get(f)&&(yn.set(f,100,!0),isAvailable(u.style,u.weight,p)||(yn.set(f,0,!0),void 0===g&&(g=setInterval(check,32))))}}}(),Cn=function(){let c;return function(u){let d=Sn[u];if(null==d){if(Ur){const c=getFontParameters(u),p=measureText(u,"Žg");d=(isNaN(Number(c.lineHeight))?1.2:Number(c.lineHeight))*(p.actualBoundingBoxAscent+p.actualBoundingBoxDescent)}else c||(c=document.createElement("div"),c.innerHTML="M",c.style.minHeight="0",c.style.maxHeight="none",c.style.height="auto",c.style.padding="0",c.style.border="none",c.style.position="absolute",c.style.display="block",c.style.left="-99999px"),c.style.font=u,document.body.appendChild(c),d=c.offsetHeight,document.body.removeChild(c);Sn[u]=d}return d}}();function measureText(c,u){return vn||(vn=createCanvasContext2D(1,1)),c!=xn&&(vn.font=c,xn=vn.font),vn.measureText(u)}function measureTextWidth(c,u){return measureText(c,u).width}function measureAndCacheTextWidth(c,u,d){if(u in d)return d[u];const p=u.split("\n").reduce(((u,d)=>Math.max(u,measureTextWidth(c,d))),0);return d[u]=p,p}function drawImageOrLabel(c,u,d,p,g,f,_,y,x,v,C){c.save(),1!==d&&(void 0===c.globalAlpha?c.globalAlpha=c=>c.globalAlpha*=d:c.globalAlpha*=d),u&&c.transform.apply(c,u),p.contextInstructions?(c.translate(x,v),c.scale(C[0],C[1]),function executeLabelInstructions(c,u){const d=c.contextInstructions;for(let c=0,p=d.length;c<p;c+=2)Array.isArray(d[c+1])?u[d[c]].apply(u,d[c+1]):u[d[c]]=d[c+1]}(p,c)):C[0]<0||C[1]<0?(c.translate(x,v),c.scale(C[0],C[1]),c.drawImage(p,g,f,_,y,0,0,_,y)):c.drawImage(p,g,f,_,y,x,v,_*C[0],y*C[1]),c.restore()}class RegularShape extends tn{constructor(c){super({opacity:1,rotateWithView:void 0!==c.rotateWithView&&c.rotateWithView,rotation:void 0!==c.rotation?c.rotation:0,scale:void 0!==c.scale?c.scale:1,displacement:void 0!==c.displacement?c.displacement:[0,0],declutterMode:c.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==c.fill?c.fill:null,this.origin_=[0,0],this.points_=c.points,this.radius=c.radius,this.radius2_=c.radius2,this.angle_=void 0!==c.angle?c.angle:0,this.stroke_=void 0!==c.stroke?c.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?Er.LOADING:Er.LOADED,this.imageState_===Er.LOADING&&this.ready().then((()=>this.imageState_=Er.LOADED)),this.render()}clone(){const c=this.getScale(),u=new RegularShape({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(c)?c.slice():c,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return u.setOpacity(this.getOpacity()),u}getAnchor(){const c=this.size_,u=this.getDisplacement(),d=this.getScaleArray();return[c[0]/2-u[0]/d[0],c[1]/2+u[1]/d[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(c){this.fill_=c,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(c){let u=this.canvases_[c];if(!u){const d=this.renderOptions_,p=createCanvasContext2D(d.size*c,d.size*c);this.draw_(d,p,c),u=p.canvas,this.canvases_[c]=u}return u}getPixelRatio(c){return c}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(c){this.stroke_=c,this.render()}listenImageChange(c){}load(){}unlistenImageChange(c){}calculateLineJoinSize_(c,u,d){if(0===u||this.points_===1/0||"bevel"!==c&&"miter"!==c)return u;let p=this.radius,g=void 0===this.radius2_?p:this.radius2_;if(p<g){const c=p;p=g,g=c}const f=void 0===this.radius2_?this.points_:2*this.points_,_=2*Math.PI/f,y=g*Math.sin(_),x=p-Math.sqrt(g*g-y*y),v=Math.sqrt(y*y+x*x),C=v/y;if("miter"===c&&C<=d)return C*u;const M=u/2/C,T=u/2*(x/v),L=Math.sqrt((p+M)*(p+M)+T*T)-p;if(void 0===this.radius2_||"bevel"===c)return 2*L;const A=p*Math.sin(_),I=g-Math.sqrt(p*p-A*A),k=Math.sqrt(A*A+I*I)/A;if(k<=d){const c=k*u/2-g-p;return 2*Math.max(L,c)}return 2*L}createRenderOptions(){let c,u=un,d=pn,p=0,g=null,f=0,_=0;this.stroke_&&(c=asColorLike(this.stroke_.getColor()??gn),_=this.stroke_.getWidth()??1,g=this.stroke_.getLineDash(),f=this.stroke_.getLineDashOffset()??0,d=this.stroke_.getLineJoin()??pn,u=this.stroke_.getLineCap()??un,p=this.stroke_.getMiterLimit()??10);const y=this.calculateLineJoinSize_(d,_,p),x=Math.max(this.radius,this.radius2_||0);return{strokeStyle:c,strokeWidth:_,size:Math.ceil(2*x+y),lineCap:u,lineDash:g,lineDashOffset:f,lineJoin:d,miterLimit:p}}render(){this.renderOptions_=this.createRenderOptions();const c=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[c,c]}draw_(c,u,d){if(u.scale(d,d),u.translate(c.size/2,c.size/2),this.createPath_(u),this.fill_){let c=this.fill_.getColor();null===c&&(c=cn),u.fillStyle=asColorLike(c),u.fill()}c.strokeStyle&&(u.strokeStyle=c.strokeStyle,u.lineWidth=c.strokeWidth,c.lineDash&&(u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset),u.lineCap=c.lineCap,u.lineJoin=c.lineJoin,u.miterLimit=c.miterLimit,u.stroke())}createHitDetectionCanvas_(c){let u;if(this.fill_){let d=this.fill_.getColor(),p=0;"string"==typeof d&&(d=asArray(d)),null===d?p=1:Array.isArray(d)&&(p=4===d.length?d[3]:1),0===p&&(u=createCanvasContext2D(c.size,c.size),this.drawHitDetectionCanvas_(c,u))}return u?u.canvas:this.getImage(1)}createPath_(c){let u=this.points_;const d=this.radius;if(u===1/0)c.arc(0,0,d,0,2*Math.PI);else{const p=void 0===this.radius2_?d:this.radius2_;void 0!==this.radius2_&&(u*=2);const g=this.angle_-Math.PI/2,f=2*Math.PI/u;for(let _=0;_<u;_++){const u=g+_*f,y=_%2==0?d:p;c.lineTo(y*Math.cos(u),y*Math.sin(u))}c.closePath()}}drawHitDetectionCanvas_(c,u){u.translate(c.size/2,c.size/2),this.createPath_(u),u.fillStyle=cn,u.fill(),c.strokeStyle&&(u.strokeStyle=c.strokeStyle,u.lineWidth=c.strokeWidth,c.lineDash&&(u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset),u.lineJoin=c.lineJoin,u.miterLimit=c.miterLimit,u.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}var En=RegularShape;class CircleStyle extends En{constructor(c){super({points:1/0,fill:(c=c||{radius:5}).fill,radius:c.radius,stroke:c.stroke,scale:void 0!==c.scale?c.scale:1,rotation:void 0!==c.rotation?c.rotation:0,rotateWithView:void 0!==c.rotateWithView&&c.rotateWithView,displacement:void 0!==c.displacement?c.displacement:[0,0],declutterMode:c.declutterMode})}clone(){const c=this.getScale(),u=new CircleStyle({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(c)?c.slice():c,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return u.setOpacity(this.getOpacity()),u}setRadius(c){this.radius=c,this.render()}}var Pn=CircleStyle;class Style{constructor(c){c=c||{},this.geometry_=null,this.geometryFunction_=defaultGeometryFunction,void 0!==c.geometry&&this.setGeometry(c.geometry),this.fill_=void 0!==c.fill?c.fill:null,this.image_=void 0!==c.image?c.image:null,this.renderer_=void 0!==c.renderer?c.renderer:null,this.hitDetectionRenderer_=void 0!==c.hitDetectionRenderer?c.hitDetectionRenderer:null,this.stroke_=void 0!==c.stroke?c.stroke:null,this.text_=void 0!==c.text?c.text:null,this.zIndex_=c.zIndex}clone(){let c=this.getGeometry();return c&&"object"==typeof c&&(c=c.clone()),new Style({geometry:c??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(c){this.renderer_=c}setHitDetectionRenderer(c){this.hitDetectionRenderer_=c}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(c){this.fill_=c}getImage(){return this.image_}setImage(c){this.image_=c}getStroke(){return this.stroke_}setStroke(c){this.stroke_=c}getText(){return this.text_}setText(c){this.text_=c}getZIndex(){return this.zIndex_}setGeometry(c){"function"==typeof c?this.geometryFunction_=c:"string"==typeof c?this.geometryFunction_=function(u){return u.get(c)}:c?void 0!==c&&(this.geometryFunction_=function(){return c}):this.geometryFunction_=defaultGeometryFunction,this.geometry_=c}setZIndex(c){this.zIndex_=c}}let bn=null;function createDefaultStyle$1(c,u){if(!bn){const c=new Hr({color:"rgba(255,255,255,0.4)"}),u=new Qr({color:"#3399CC",width:1.25});bn=[new Style({image:new Pn({fill:c,stroke:u,radius:5}),fill:c,stroke:u})]}return bn}function defaultGeometryFunction(c){return c.getGeometry()}var Mn=Style;class Text{constructor(c){c=c||{},this.font_=c.font,this.rotation_=c.rotation,this.rotateWithView_=c.rotateWithView,this.scale_=c.scale,this.scaleArray_=toSize(void 0!==c.scale?c.scale:1),this.text_=c.text,this.textAlign_=c.textAlign,this.justify_=c.justify,this.repeat_=c.repeat,this.textBaseline_=c.textBaseline,this.fill_=void 0!==c.fill?c.fill:new Hr({color:"#333"}),this.maxAngle_=void 0!==c.maxAngle?c.maxAngle:Math.PI/4,this.placement_=void 0!==c.placement?c.placement:"point",this.overflow_=!!c.overflow,this.stroke_=void 0!==c.stroke?c.stroke:null,this.offsetX_=void 0!==c.offsetX?c.offsetX:0,this.offsetY_=void 0!==c.offsetY?c.offsetY:0,this.backgroundFill_=c.backgroundFill?c.backgroundFill:null,this.backgroundStroke_=c.backgroundStroke?c.backgroundStroke:null,this.padding_=void 0===c.padding?null:c.padding,this.declutterMode_=c.declutterMode}clone(){const c=this.getScale();return new Text({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(c)?c.slice():c,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(c){this.overflow_=c}setFont(c){this.font_=c}setMaxAngle(c){this.maxAngle_=c}setOffsetX(c){this.offsetX_=c}setOffsetY(c){this.offsetY_=c}setPlacement(c){this.placement_=c}setRepeat(c){this.repeat_=c}setRotateWithView(c){this.rotateWithView_=c}setFill(c){this.fill_=c}setRotation(c){this.rotation_=c}setScale(c){this.scale_=c,this.scaleArray_=toSize(void 0!==c?c:1)}setStroke(c){this.stroke_=c}setText(c){this.text_=c}setTextAlign(c){this.textAlign_=c}setJustify(c){this.justify_=c}setTextBaseline(c){this.textBaseline_=c}setBackgroundFill(c){this.backgroundFill_=c}setBackgroundStroke(c){this.backgroundStroke_=c}setPadding(c){this.padding_=c}}var Tn=Text,Rn="opacity",Ln="visible",An="extent",In="zIndex",Fn="maxResolution",kn="minResolution",On="maxZoom",Nn="minZoom",Dn="source",Gn="map";class BaseLayer extends Mi{constructor(c){super(),this.on,this.once,this.un,this.background_=c.background;const u=Object.assign({},c);"object"==typeof c.properties&&(delete u.properties,Object.assign(u,c.properties)),u[Rn]=void 0!==c.opacity?c.opacity:1,assert("number"==typeof u[Rn],"Layer opacity must be a number"),u[Ln]=void 0===c.visible||c.visible,u[In]=c.zIndex,u[Fn]=void 0!==c.maxResolution?c.maxResolution:1/0,u[kn]=void 0!==c.minResolution?c.minResolution:0,u[Nn]=void 0!==c.minZoom?c.minZoom:-1/0,u[On]=void 0!==c.maxZoom?c.maxZoom:1/0,this.className_=void 0!==u.className?u.className:"ol-layer",delete u.className,this.setProperties(u),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(c){const u=this.state_||{layer:this,managed:void 0===c||c},d=this.getZIndex();return u.opacity=clamp(Math.round(100*this.getOpacity())/100,0,1),u.visible=this.getVisible(),u.extent=this.getExtent(),u.zIndex=void 0!==d||u.managed?d:1/0,u.maxResolution=this.getMaxResolution(),u.minResolution=Math.max(this.getMinResolution(),0),u.minZoom=this.getMinZoom(),u.maxZoom=this.getMaxZoom(),this.state_=u,u}getLayersArray(c){return abstract()}getLayerStatesArray(c){return abstract()}getExtent(){return this.get(An)}getMaxResolution(){return this.get(Fn)}getMinResolution(){return this.get(kn)}getMinZoom(){return this.get(Nn)}getMaxZoom(){return this.get(On)}getOpacity(){return this.get(Rn)}getSourceState(){return abstract()}getVisible(){return this.get(Ln)}getZIndex(){return this.get(In)}setBackground(c){this.background_=c,this.changed()}setExtent(c){this.set(An,c)}setMaxResolution(c){this.set(Fn,c)}setMinResolution(c){this.set(kn,c)}setMaxZoom(c){this.set(On,c)}setMinZoom(c){this.set(Nn,c)}setOpacity(c){assert("number"==typeof c,"Layer opacity must be a number"),this.set(Rn,c)}setVisible(c){this.set(Ln,c)}setZIndex(c){this.set(In,c)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var jn=0,zn=1,Bn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const Un=42,$n=256;function createExtent(c,u,d){return function(p,g,f,_,y){if(!p)return;if(!g&&!u)return p;const x=u?0:f[0]*g,v=u?0:f[1]*g,C=y?y[0]:0,M=y?y[1]:0;let T=c[0]+x/2+C,L=c[2]-x/2+C,A=c[1]+v/2+M,I=c[3]-v/2+M;T>L&&(T=(L+T)/2,L=T),A>I&&(A=(I+A)/2,I=A);let k=clamp(p[0],T,L),O=clamp(p[1],A,I);if(_&&d&&g){const c=30*g;k+=-c*Math.log(1+Math.max(0,T-p[0])/c)+c*Math.log(1+Math.max(0,p[0]-L)/c),O+=-c*Math.log(1+Math.max(0,A-p[1])/c)+c*Math.log(1+Math.max(0,p[1]-I)/c)}return[k,O]}}function none$1(c){return c}function getViewportClampedResolution(c,u,d,p){const g=getWidth(u)/d[0],f=getHeight(u)/d[1];return p?Math.min(c,Math.max(g,f)):Math.min(c,Math.min(g,f))}function getSmoothClampedResolution(c,u,d){let p=Math.min(c,u);return p*=Math.log(1+50*Math.max(0,c/u-1))/50+1,d&&(p=Math.max(p,d),p/=Math.log(1+50*Math.max(0,d/c-1))/50+1),clamp(p,d/2,2*u)}function createMinMaxResolution(c,u,d,p,g){return d=void 0===d||d,function(f,_,y,x){if(void 0!==f){const _=p?getViewportClampedResolution(c,p,y,g):c;return d&&x?getSmoothClampedResolution(f,_,u):clamp(f,u,_)}}}function disable(c){if(void 0!==c)return 0}function none(c){if(void 0!==c)return c}function easeIn(c){return Math.pow(c,3)}function easeOut(c){return 1-easeIn(1-c)}function inAndOut(c){return 3*c*c-2*c*c*c}function linear(c){return c}function animationCallback(c,u){setTimeout((function(){c(u)}),0)}function isNoopAnimation(c){return!(c.sourceCenter&&c.targetCenter&&!equals(c.sourceCenter,c.targetCenter))&&(c.sourceResolution===c.targetResolution&&c.sourceRotation===c.targetRotation)}function calculateCenterOn(c,u,d,p,g){const f=Math.cos(-g);let _=Math.sin(-g),y=c[0]*f-c[1]*_,x=c[1]*f+c[0]*_;y+=(u[0]/2-d[0])*p,x+=(d[1]-u[1]/2)*p,_=-_;return[y*f-x*_,x*f+y*_]}var Wn=class View extends Mi{constructor(c){super(),this.on,this.once,this.un,c=Object.assign({},c),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=createProjection(c.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,c.projection&&disableCoordinateWarning(),c.center&&(c.center=fromUserCoordinate(c.center,this.projection_)),c.extent&&(c.extent=fromUserExtent(c.extent,this.projection_)),this.applyOptions_(c)}applyOptions_(c){const u=Object.assign({},c);for(const c in Bn)delete u[c];this.setProperties(u,!0);const d=function createResolutionConstraint(c){let u,d,p;const g=28,f=2;let _=void 0!==c.minZoom?c.minZoom:0,y=void 0!==c.maxZoom?c.maxZoom:g;const x=void 0!==c.zoomFactor?c.zoomFactor:f,v=void 0!==c.multiWorld&&c.multiWorld,C=void 0===c.smoothResolutionConstraint||c.smoothResolutionConstraint,M=void 0!==c.showFullExtent&&c.showFullExtent,T=createProjection(c.projection,"EPSG:3857"),L=T.getExtent();let A=c.constrainOnlyCenter,I=c.extent;v||I||!T.isGlobal()||(A=!1,I=L);if(void 0!==c.resolutions){const g=c.resolutions;d=g[_],p=void 0!==g[y]?g[y]:g[g.length-1],u=c.constrainResolution?function createSnapToResolutions(c,u,d,p){return u=void 0===u||u,function(g,f,_,y){if(void 0!==g){const x=c[0],v=c[c.length-1],C=d?getViewportClampedResolution(x,d,_,p):x;if(y)return u?getSmoothClampedResolution(g,C,v):clamp(g,v,C);const M=Math.min(C,g),T=Math.floor(linearFindNearest(c,M,f));return c[T]>C&&T<c.length-1?c[T+1]:c[T]}}}(g,C,!A&&I,M):createMinMaxResolution(d,p,C,!A&&I,M)}else{const v=(L?Math.max(getWidth(L),getHeight(L)):360*Ni.degrees/T.getMetersPerUnit())/$n/Math.pow(f,0),k=v/Math.pow(f,g-0);d=c.maxResolution,void 0!==d?_=0:d=v/Math.pow(x,_),p=c.minResolution,void 0===p&&(p=void 0!==c.maxZoom?void 0!==c.maxResolution?d/Math.pow(x,y):v/Math.pow(x,y):k),y=_+Math.floor(Math.log(d/p)/Math.log(x)),p=d/Math.pow(x,y-_),u=c.constrainResolution?function createSnapToPower(c,u,d,p,g,f){return p=void 0===p||p,d=void 0!==d?d:0,function(_,y,x,v){if(void 0!==_){const C=g?getViewportClampedResolution(u,g,x,f):u;if(v)return p?getSmoothClampedResolution(_,C,d):clamp(_,d,C);const M=1e-9,T=Math.ceil(Math.log(u/C)/Math.log(c)-M),L=-y*(.5-M)+.5,A=Math.min(C,_),I=Math.floor(Math.log(u/A)/Math.log(c)+L),k=Math.max(T,I);return clamp(u/Math.pow(c,k),d,C)}}}(x,d,p,C,!A&&I,M):createMinMaxResolution(d,p,C,!A&&I,M)}return{constraint:u,maxResolution:d,minResolution:p,minZoom:_,zoomFactor:x}}(c);this.maxResolution_=d.maxResolution,this.minResolution_=d.minResolution,this.zoomFactor_=d.zoomFactor,this.resolutions_=c.resolutions,this.padding_=c.padding,this.minZoom_=d.minZoom;const p=function createCenterConstraint(c){if(void 0!==c.extent){const u=void 0===c.smoothExtentConstraint||c.smoothExtentConstraint;return createExtent(c.extent,c.constrainOnlyCenter,u)}const u=createProjection(c.projection,"EPSG:3857");if(!0!==c.multiWorld&&u.isGlobal()){const c=u.getExtent().slice();return c[0]=-1/0,c[2]=1/0,createExtent(c,!1,!1)}return none$1}(c),g=d.constraint,f=function createRotationConstraint(c){const u=void 0===c.enableRotation||c.enableRotation;if(u){const u=c.constrainRotation;return void 0===u||!0===u?function createSnapToZero(c){const u=toRadians(5);return function(c,d){return d||void 0===c?c:Math.abs(c)<=u?0:c}}():!1===u?none:"number"==typeof u?function createSnapToN(c){const u=2*Math.PI/c;return function(c,d){return d?c:void 0!==c?c=Math.floor(c/u+.5)*u:void 0}}(u):none}return disable}(c);this.constraints_={center:p,resolution:g,rotation:f},this.setRotation(void 0!==c.rotation?c.rotation:0),this.setCenterInternal(void 0!==c.center?c.center:null),void 0!==c.resolution?this.setResolution(c.resolution):void 0!==c.zoom&&this.setZoom(c.zoom)}get padding(){return this.padding_}set padding(c){let u=this.padding_;this.padding_=c;const d=this.getCenterInternal();if(d){const p=c||[0,0,0,0];u=u||[0,0,0,0];const g=this.getResolution(),f=g/2*(p[3]-u[3]+u[1]-p[1]),_=g/2*(p[0]-u[0]+u[2]-p[2]);this.setCenterInternal([d[0]+f,d[1]-_])}}getUpdatedOptions_(c){const u=this.getProperties();return void 0!==u.resolution?u.resolution=this.getResolution():u.zoom=this.getZoom(),u.center=this.getCenterInternal(),u.rotation=this.getRotation(),Object.assign({},u,c)}animate(c){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const u=new Array(arguments.length);for(let c=0;c<u.length;++c){let d=arguments[c];d.center&&(d=Object.assign({},d),d.center=fromUserCoordinate(d.center,this.getProjection())),d.anchor&&(d=Object.assign({},d),d.anchor=fromUserCoordinate(d.anchor,this.getProjection())),u[c]=d}this.animateInternal.apply(this,u)}animateInternal(c){let u,d=arguments.length;d>1&&"function"==typeof arguments[d-1]&&(u=arguments[d-1],--d);let p=0;for(;p<d&&!this.isDef();++p){const c=arguments[p];c.center&&this.setCenterInternal(c.center),void 0!==c.zoom?this.setZoom(c.zoom):c.resolution&&this.setResolution(c.resolution),void 0!==c.rotation&&this.setRotation(c.rotation)}if(p===d)return void(u&&animationCallback(u,!0));let g=Date.now(),f=this.targetCenter_.slice(),_=this.targetResolution_,y=this.targetRotation_;const x=[];for(;p<d;++p){const c=arguments[p],d={start:g,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||inAndOut,callback:u};if(c.center&&(d.sourceCenter=f,d.targetCenter=c.center.slice(),f=d.targetCenter),void 0!==c.zoom?(d.sourceResolution=_,d.targetResolution=this.getResolutionForZoom(c.zoom),_=d.targetResolution):c.resolution&&(d.sourceResolution=_,d.targetResolution=c.resolution,_=d.targetResolution),void 0!==c.rotation){d.sourceRotation=y;const u=modulo(c.rotation-y+Math.PI,2*Math.PI)-Math.PI;d.targetRotation=y+u,y=d.targetRotation}isNoopAnimation(d)?d.complete=!0:g+=d.duration,x.push(d)}this.animations_.push(x),this.setHint(jn,1),this.updateAnimations_()}getAnimating(){return this.hints_[jn]>0}getInteracting(){return this.hints_[zn]>0}cancelAnimations(){let c;this.setHint(jn,-this.hints_[jn]);for(let u=0,d=this.animations_.length;u<d;++u){const d=this.animations_[u];if(d[0].callback&&animationCallback(d[0].callback,!1),!c)for(let u=0,p=d.length;u<p;++u){const p=d[u];if(!p.complete){c=p.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=c,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const c=Date.now();let u=!1;for(let d=this.animations_.length-1;d>=0;--d){const p=this.animations_[d];let g=!0;for(let d=0,f=p.length;d<f;++d){const f=p[d];if(f.complete)continue;const _=c-f.start;let y=f.duration>0?_/f.duration:1;y>=1?(f.complete=!0,y=1):g=!1;const x=f.easing(y);if(f.sourceCenter){const c=f.sourceCenter[0],u=f.sourceCenter[1],d=f.targetCenter[0],p=f.targetCenter[1];this.nextCenter_=f.targetCenter;const g=c+x*(d-c),_=u+x*(p-u);this.targetCenter_=[g,_]}if(f.sourceResolution&&f.targetResolution){const c=1===x?f.targetResolution:f.sourceResolution+x*(f.targetResolution-f.sourceResolution);if(f.anchor){const u=this.getViewportSize_(this.getRotation()),d=this.constraints_.resolution(c,0,u,!0);this.targetCenter_=this.calculateCenterZoom(d,f.anchor)}this.nextResolution_=f.targetResolution,this.targetResolution_=c,this.applyTargetState_(!0)}if(void 0!==f.sourceRotation&&void 0!==f.targetRotation){const c=1===x?modulo(f.targetRotation+Math.PI,2*Math.PI)-Math.PI:f.sourceRotation+x*(f.targetRotation-f.sourceRotation);if(f.anchor){const u=this.constraints_.rotation(c,!0);this.targetCenter_=this.calculateCenterRotate(u,f.anchor)}this.nextRotation_=f.targetRotation,this.targetRotation_=c}if(this.applyTargetState_(!0),u=!0,!f.complete)break}if(g){this.animations_[d]=null,this.setHint(jn,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const c=p[0].callback;c&&animationCallback(c,!0)}}this.animations_=this.animations_.filter(Boolean),u&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(c,u){let d;const p=this.getCenterInternal();return void 0!==p&&(d=[p[0]-u[0],p[1]-u[1]],rotate$1(d,c-this.getRotation()),add$1(d,u)),d}calculateCenterZoom(c,u){let d;const p=this.getCenterInternal(),g=this.getResolution();if(void 0!==p&&void 0!==g){d=[u[0]-c*(u[0]-p[0])/g,u[1]-c*(u[1]-p[1])/g]}return d}getViewportSize_(c){const u=this.viewportSize_;if(c){const d=u[0],p=u[1];return[Math.abs(d*Math.cos(c))+Math.abs(p*Math.sin(c)),Math.abs(d*Math.sin(c))+Math.abs(p*Math.cos(c))]}return u}setViewportSize(c){this.viewportSize_=Array.isArray(c)?c.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const c=this.getCenterInternal();return c?toUserCoordinate(c,this.getProjection()):c}getCenterInternal(){return this.get(Bn.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(c){return void 0!==c?(c[0]=this.hints_[0],c[1]=this.hints_[1],c):this.hints_.slice()}calculateExtent(c){return toUserExtent(this.calculateExtentInternal(c),this.getProjection())}calculateExtentInternal(c){c=c||this.getViewportSizeMinusPadding_();const u=this.getCenterInternal();assert(u,"The view center is not defined");const d=this.getResolution();assert(void 0!==d,"The view resolution is not defined");const p=this.getRotation();return assert(void 0!==p,"The view rotation is not defined"),getForViewAndSize(u,d,p,c)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(c){this.applyOptions_(this.getUpdatedOptions_({maxZoom:c}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(c){this.applyOptions_(this.getUpdatedOptions_({minZoom:c}))}setConstrainResolution(c){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:c}))}getProjection(){return this.projection_}getResolution(){return this.get(Bn.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(c,u){return this.getResolutionForExtentInternal(fromUserExtent(c,this.getProjection()),u)}getResolutionForExtentInternal(c,u){u=u||this.getViewportSizeMinusPadding_();const d=getWidth(c)/u[0],p=getHeight(c)/u[1];return Math.max(d,p)}getResolutionForValueFunction(c){c=c||2;const u=this.getConstrainedResolution(this.maxResolution_),d=this.minResolution_,p=Math.log(u/d)/Math.log(c);return function(d){return u/Math.pow(c,d*p)}}getRotation(){return this.get(Bn.ROTATION)}getValueForResolutionFunction(c){const u=Math.log(c||2),d=this.getConstrainedResolution(this.maxResolution_),p=this.minResolution_,g=Math.log(d/p)/u;return function(c){return Math.log(d/c)/u/g}}getViewportSizeMinusPadding_(c){let u=this.getViewportSize_(c);const d=this.padding_;return d&&(u=[u[0]-d[1]-d[3],u[1]-d[0]-d[2]]),u}getState(){const c=this.getProjection(),u=this.getResolution(),d=this.getRotation();let p=this.getCenterInternal();const g=this.padding_;if(g){const c=this.getViewportSizeMinusPadding_();p=calculateCenterOn(p,this.getViewportSize_(),[c[0]/2+g[3],c[1]/2+g[0]],u,d)}return{center:p.slice(0),projection:void 0!==c?c:null,resolution:u,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:d,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let c;const u=this.getResolution();return void 0!==u&&(c=this.getZoomForResolution(u)),c}getZoomForResolution(c){let u,d,p=this.minZoom_||0;if(this.resolutions_){const g=linearFindNearest(this.resolutions_,c,1);p=g,u=this.resolutions_[g],d=g==this.resolutions_.length-1?2:u/this.resolutions_[g+1]}else u=this.maxResolution_,d=this.zoomFactor_;return p+Math.log(u/c)/Math.log(d)}getResolutionForZoom(c){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const u=clamp(Math.floor(c),0,this.resolutions_.length-2),d=this.resolutions_[u]/this.resolutions_[u+1];return this.resolutions_[u]/Math.pow(d,clamp(c-u,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,c-this.minZoom_)}fit(c,u){let d;if(assert(Array.isArray(c)||"function"==typeof c.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(c)){assert(!isEmpty(c),"Cannot fit empty extent provided as `geometry`");d=fromExtent(fromUserExtent(c,this.getProjection()))}else if("Circle"===c.getType()){const u=fromUserExtent(c.getExtent(),this.getProjection());d=fromExtent(u),d.rotate(this.getRotation(),getCenter(u))}else{const u=getUserProjection();d=u?c.clone().transform(u,this.getProjection()):c}this.fitInternal(d,u)}rotatedExtentForGeometry(c){const u=this.getRotation(),d=Math.cos(u),p=Math.sin(-u),g=c.getFlatCoordinates(),f=c.getStride();let _=1/0,y=1/0,x=-1/0,v=-1/0;for(let c=0,u=g.length;c<u;c+=f){const u=g[c]*d-g[c+1]*p,f=g[c]*p+g[c+1]*d;_=Math.min(_,u),y=Math.min(y,f),x=Math.max(x,u),v=Math.max(v,f)}return[_,y,x,v]}fitInternal(c,u){let d=(u=u||{}).size;d||(d=this.getViewportSizeMinusPadding_());const p=void 0!==u.padding?u.padding:[0,0,0,0],g=void 0!==u.nearest&&u.nearest;let f;f=void 0!==u.minResolution?u.minResolution:void 0!==u.maxZoom?this.getResolutionForZoom(u.maxZoom):0;const _=this.rotatedExtentForGeometry(c);let y=this.getResolutionForExtentInternal(_,[d[0]-p[1]-p[3],d[1]-p[0]-p[2]]);y=isNaN(y)?f:Math.max(y,f),y=this.getConstrainedResolution(y,g?0:1);const x=this.getRotation(),v=Math.sin(x),C=Math.cos(x),M=getCenter(_);M[0]+=(p[1]-p[3])/2*y,M[1]+=(p[0]-p[2])/2*y;const T=M[0]*C-M[1]*v,L=M[1]*C+M[0]*v,A=this.getConstrainedCenter([T,L],y),I=u.callback?u.callback:VOID;void 0!==u.duration?this.animateInternal({resolution:y,center:A,duration:u.duration,easing:u.easing},I):(this.targetResolution_=y,this.targetCenter_=A,this.applyTargetState_(!1,!0),animationCallback(I,!0))}centerOn(c,u,d){this.centerOnInternal(fromUserCoordinate(c,this.getProjection()),u,d)}centerOnInternal(c,u,d){this.setCenterInternal(calculateCenterOn(c,u,d,this.getResolution(),this.getRotation()))}calculateCenterShift(c,u,d,p){let g;const f=this.padding_;if(f&&c){const _=this.getViewportSizeMinusPadding_(-d),y=calculateCenterOn(c,p,[_[0]/2+f[3],_[1]/2+f[0]],u,d);g=[c[0]-y[0],c[1]-y[1]]}return g}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(c){const u=toUserCoordinate(this.targetCenter_,this.getProjection());this.setCenter([u[0]+c[0],u[1]+c[1]])}adjustCenterInternal(c){const u=this.targetCenter_;this.setCenterInternal([u[0]+c[0],u[1]+c[1]])}adjustResolution(c,u){u=u&&fromUserCoordinate(u,this.getProjection()),this.adjustResolutionInternal(c,u)}adjustResolutionInternal(c,u){const d=this.getAnimating()||this.getInteracting(),p=this.getViewportSize_(this.getRotation()),g=this.constraints_.resolution(this.targetResolution_*c,0,p,d);u&&(this.targetCenter_=this.calculateCenterZoom(g,u)),this.targetResolution_*=c,this.applyTargetState_()}adjustZoom(c,u){this.adjustResolution(Math.pow(this.zoomFactor_,-c),u)}adjustRotation(c,u){u&&(u=fromUserCoordinate(u,this.getProjection())),this.adjustRotationInternal(c,u)}adjustRotationInternal(c,u){const d=this.getAnimating()||this.getInteracting(),p=this.constraints_.rotation(this.targetRotation_+c,d);u&&(this.targetCenter_=this.calculateCenterRotate(p,u)),this.targetRotation_+=c,this.applyTargetState_()}setCenter(c){this.setCenterInternal(c?fromUserCoordinate(c,this.getProjection()):c)}setCenterInternal(c){this.targetCenter_=c,this.applyTargetState_()}setHint(c,u){return this.hints_[c]+=u,this.changed(),this.hints_[c]}setResolution(c){this.targetResolution_=c,this.applyTargetState_()}setRotation(c){this.targetRotation_=c,this.applyTargetState_()}setZoom(c){this.setResolution(this.getResolutionForZoom(c))}applyTargetState_(c,u){const d=this.getAnimating()||this.getInteracting()||u,p=this.constraints_.rotation(this.targetRotation_,d),g=this.getViewportSize_(p),f=this.constraints_.resolution(this.targetResolution_,0,g,d),_=this.constraints_.center(this.targetCenter_,f,g,d,this.calculateCenterShift(this.targetCenter_,f,p,g));this.get(Bn.ROTATION)!==p&&this.set(Bn.ROTATION,p),this.get(Bn.RESOLUTION)!==f&&(this.set(Bn.RESOLUTION,f),this.set("zoom",this.getZoom(),!0)),_&&this.get(Bn.CENTER)&&equals(this.get(Bn.CENTER),_)||this.set(Bn.CENTER,_),this.getAnimating()&&!c&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(c,u,d){c=void 0!==c?c:200;const p=u||0,g=this.constraints_.rotation(this.targetRotation_),f=this.getViewportSize_(g),_=this.constraints_.resolution(this.targetResolution_,p,f),y=this.constraints_.center(this.targetCenter_,_,f,!1,this.calculateCenterShift(this.targetCenter_,_,g,f));if(0===c&&!this.cancelAnchor_)return this.targetResolution_=_,this.targetRotation_=g,this.targetCenter_=y,void this.applyTargetState_();d=d||(0===c?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===_&&this.getRotation()===g&&this.getCenterInternal()&&equals(this.getCenterInternal(),y)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:g,center:y,resolution:_,duration:c,easing:easeOut,anchor:d}))}beginInteraction(){this.resolveConstraints(0),this.setHint(zn,1)}endInteraction(c,u,d){d=d&&fromUserCoordinate(d,this.getProjection()),this.endInteractionInternal(c,u,d)}endInteractionInternal(c,u,d){this.getInteracting()&&(this.setHint(zn,-1),this.resolveConstraints(c,u,d))}getConstrainedCenter(c,u){const d=this.getViewportSize_(this.getRotation());return this.constraints_.center(c,u||this.getResolution(),d)}getConstrainedZoom(c,u){const d=this.getResolutionForZoom(c);return this.getZoomForResolution(this.getConstrainedResolution(d,u))}getConstrainedResolution(c,u){u=u||0;const d=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(c,u,d)}};function inView(c,u){if(!c.visible)return!1;const d=u.resolution;if(d<c.minResolution||d>=c.maxResolution)return!1;const p=u.zoom;return p>c.minZoom&&p<=c.maxZoom}var Xn=class Layer extends BaseLayer{constructor(c){const u=Object.assign({},c);delete u.source,super(u),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,c.render&&(this.render=c.render),c.map&&this.setMap(c.map),this.addChangeListener(Dn,this.handleSourcePropertyChange_);const d=c.source?c.source:null;this.setSource(d)}getLayersArray(c){return(c=c||[]).push(this),c}getLayerStatesArray(c){return(c=c||[]).push(this.getLayerState()),c}getSource(){return this.get(Dn)||null}getRenderSource(){return this.getSource()}getSourceState(){const c=this.getSource();return c?c.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(unlistenByKey(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const c=this.getSource();c&&(this.sourceChangeKey_=listen(c,mi,this.handleSourceChange_,this),"ready"===c.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(c){return this.renderer_?this.renderer_.getFeatures(c):Promise.resolve([])}getData(c){return this.renderer_&&this.rendered?this.renderer_.getData(c):null}isVisible(c){let u;const d=this.getMapInternal();let p;!c&&d&&(c=d.getView()),u=c instanceof Wn?{viewState:c.getState(),extent:c.calculateExtent()}:c,!u.layerStatesArray&&d&&(u.layerStatesArray=d.getLayerGroup().getLayerStatesArray()),p=u.layerStatesArray?u.layerStatesArray.find((c=>c.layer===this)):this.getLayerState();const g=this.getExtent();return inView(p,u.viewState)&&(!g||intersects$1(g,u.extent))}getAttributions(c){if(!this.isVisible(c))return[];const u=this.getSource()?.getAttributions();if(!u)return[];let d=u(c instanceof Wn?c.getViewStateAndExtent():c);return Array.isArray(d)||(d=[d]),d}render(c,u){const d=this.getRenderer();return d.prepareFrame(c)?(this.rendered=!0,d.renderFrame(c,u)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(c,u){}renderDeferred(c){const u=this.getRenderer();u&&u.renderDeferred(c)}setMapInternal(c){c||this.unrender(),this.set(Gn,c)}getMapInternal(){return this.get(Gn)}setMap(c){this.mapPrecomposeKey_&&(unlistenByKey(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),c||this.changed(),this.mapRenderKey_&&(unlistenByKey(this.mapRenderKey_),this.mapRenderKey_=null),c&&(this.mapPrecomposeKey_=listen(c,Sr,(c=>{const u=c.frameState.layerStatesArray,d=this.getLayerState(!1);assert(!u.some((function(c){return c.layer===d.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),u.push(d)})),this.mapRenderKey_=listen(this,mi,c.render,c),this.changed())}setSource(c){this.set(Dn,c)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}};function quickselect(c,u,d=0,p=c.length-1,g=defaultCompare){for(;p>d;){if(p-d>600){const f=p-d+1,_=u-d+1,y=Math.log(f),x=.5*Math.exp(2*y/3),v=.5*Math.sqrt(y*x*(f-x)/f)*(_-f/2<0?-1:1);quickselect(c,u,Math.max(d,Math.floor(u-_*x/f+v)),Math.min(p,Math.floor(u+(f-_)*x/f+v)),g)}const f=c[u];let _=d,y=p;for(swap(c,d,u),g(c[p],f)>0&&swap(c,d,p);_<y;){for(swap(c,_,y),_++,y--;g(c[_],f)<0;)_++;for(;g(c[y],f)>0;)y--}0===g(c[d],f)?swap(c,d,y):(y++,swap(c,y,p)),y<=u&&(d=y+1),u<=y&&(p=y-1)}}function swap(c,u,d){const p=c[u];c[u]=c[d],c[d]=p}function defaultCompare(c,u){return c<u?-1:c>u?1:0}let Vn=class RBush{constructor(c=9){this._maxEntries=Math.max(4,c),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(c){let u=this.data;const d=[];if(!intersects(c,u))return d;const p=this.toBBox,g=[];for(;u;){for(let f=0;f<u.children.length;f++){const _=u.children[f],y=u.leaf?p(_):_;intersects(c,y)&&(u.leaf?d.push(_):contains(c,y)?this._all(_,d):g.push(_))}u=g.pop()}return d}collides(c){let u=this.data;if(!intersects(c,u))return!1;const d=[];for(;u;){for(let p=0;p<u.children.length;p++){const g=u.children[p],f=u.leaf?this.toBBox(g):g;if(intersects(c,f)){if(u.leaf||contains(c,f))return!0;d.push(g)}}u=d.pop()}return!1}load(c){if(!c||!c.length)return this;if(c.length<this._minEntries){for(let u=0;u<c.length;u++)this.insert(c[u]);return this}let u=this._build(c.slice(),0,c.length-1,0);if(this.data.children.length)if(this.data.height===u.height)this._splitRoot(this.data,u);else{if(this.data.height<u.height){const c=this.data;this.data=u,u=c}this._insert(u,this.data.height-u.height-1,!0)}else this.data=u;return this}insert(c){return c&&this._insert(c,this.data.height-1),this}clear(){return this.data=createNode([]),this}remove(c,u){if(!c)return this;let d=this.data;const p=this.toBBox(c),g=[],f=[];let _,y,x;for(;d||g.length;){if(d||(d=g.pop(),y=g[g.length-1],_=f.pop(),x=!0),d.leaf){const p=findItem(c,d.children,u);if(-1!==p)return d.children.splice(p,1),g.push(d),this._condense(g),this}x||d.leaf||!contains(d,p)?y?(_++,d=y.children[_],x=!1):d=null:(g.push(d),f.push(_),_=0,y=d,d=d.children[0])}return this}toBBox(c){return c}compareMinX(c,u){return c.minX-u.minX}compareMinY(c,u){return c.minY-u.minY}toJSON(){return this.data}fromJSON(c){return this.data=c,this}_all(c,u){const d=[];for(;c;)c.leaf?u.push(...c.children):d.push(...c.children),c=d.pop();return u}_build(c,u,d,p){const g=d-u+1;let f,_=this._maxEntries;if(g<=_)return f=createNode(c.slice(u,d+1)),calcBBox(f,this.toBBox),f;p||(p=Math.ceil(Math.log(g)/Math.log(_)),_=Math.ceil(g/Math.pow(_,p-1))),f=createNode([]),f.leaf=!1,f.height=p;const y=Math.ceil(g/_),x=y*Math.ceil(Math.sqrt(_));multiSelect(c,u,d,x,this.compareMinX);for(let g=u;g<=d;g+=x){const u=Math.min(g+x-1,d);multiSelect(c,g,u,y,this.compareMinY);for(let d=g;d<=u;d+=y){const g=Math.min(d+y-1,u);f.children.push(this._build(c,d,g,p-1))}}return calcBBox(f,this.toBBox),f}_chooseSubtree(c,u,d,p){for(;p.push(u),!u.leaf&&p.length-1!==d;){let d,p=1/0,g=1/0;for(let f=0;f<u.children.length;f++){const _=u.children[f],y=bboxArea(_),x=enlargedArea(c,_)-y;x<g?(g=x,p=y<p?y:p,d=_):x===g&&y<p&&(p=y,d=_)}u=d||u.children[0]}return u}_insert(c,u,d){const p=d?c:this.toBBox(c),g=[],f=this._chooseSubtree(p,this.data,u,g);for(f.children.push(c),extend$1(f,p);u>=0&&g[u].children.length>this._maxEntries;)this._split(g,u),u--;this._adjustParentBBoxes(p,g,u)}_split(c,u){const d=c[u],p=d.children.length,g=this._minEntries;this._chooseSplitAxis(d,g,p);const f=this._chooseSplitIndex(d,g,p),_=createNode(d.children.splice(f,d.children.length-f));_.height=d.height,_.leaf=d.leaf,calcBBox(d,this.toBBox),calcBBox(_,this.toBBox),u?c[u-1].children.push(_):this._splitRoot(d,_)}_splitRoot(c,u){this.data=createNode([c,u]),this.data.height=c.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)}_chooseSplitIndex(c,u,d){let p,g=1/0,f=1/0;for(let _=u;_<=d-u;_++){const u=distBBox(c,0,_,this.toBBox),y=distBBox(c,_,d,this.toBBox),x=intersectionArea(u,y),v=bboxArea(u)+bboxArea(y);x<g?(g=x,p=_,f=v<f?v:f):x===g&&v<f&&(f=v,p=_)}return p||d-u}_chooseSplitAxis(c,u,d){const p=c.leaf?this.compareMinX:compareNodeMinX,g=c.leaf?this.compareMinY:compareNodeMinY;this._allDistMargin(c,u,d,p)<this._allDistMargin(c,u,d,g)&&c.children.sort(p)}_allDistMargin(c,u,d,p){c.children.sort(p);const g=this.toBBox,f=distBBox(c,0,u,g),_=distBBox(c,d-u,d,g);let y=bboxMargin(f)+bboxMargin(_);for(let p=u;p<d-u;p++){const u=c.children[p];extend$1(f,c.leaf?g(u):u),y+=bboxMargin(f)}for(let p=d-u-1;p>=u;p--){const u=c.children[p];extend$1(_,c.leaf?g(u):u),y+=bboxMargin(_)}return y}_adjustParentBBoxes(c,u,d){for(let p=d;p>=0;p--)extend$1(u[p],c)}_condense(c){for(let u,d=c.length-1;d>=0;d--)0===c[d].children.length?d>0?(u=c[d-1].children,u.splice(u.indexOf(c[d]),1)):this.clear():calcBBox(c[d],this.toBBox)}};function findItem(c,u,d){if(!d)return u.indexOf(c);for(let p=0;p<u.length;p++)if(d(c,u[p]))return p;return-1}function calcBBox(c,u){distBBox(c,0,c.children.length,u,c)}function distBBox(c,u,d,p,g){g||(g=createNode(null)),g.minX=1/0,g.minY=1/0,g.maxX=-1/0,g.maxY=-1/0;for(let f=u;f<d;f++){const u=c.children[f];extend$1(g,c.leaf?p(u):u)}return g}function extend$1(c,u){return c.minX=Math.min(c.minX,u.minX),c.minY=Math.min(c.minY,u.minY),c.maxX=Math.max(c.maxX,u.maxX),c.maxY=Math.max(c.maxY,u.maxY),c}function compareNodeMinX(c,u){return c.minX-u.minX}function compareNodeMinY(c,u){return c.minY-u.minY}function bboxArea(c){return(c.maxX-c.minX)*(c.maxY-c.minY)}function bboxMargin(c){return c.maxX-c.minX+(c.maxY-c.minY)}function enlargedArea(c,u){return(Math.max(u.maxX,c.maxX)-Math.min(u.minX,c.minX))*(Math.max(u.maxY,c.maxY)-Math.min(u.minY,c.minY))}function intersectionArea(c,u){const d=Math.max(c.minX,u.minX),p=Math.max(c.minY,u.minY),g=Math.min(c.maxX,u.maxX),f=Math.min(c.maxY,u.maxY);return Math.max(0,g-d)*Math.max(0,f-p)}function contains(c,u){return c.minX<=u.minX&&c.minY<=u.minY&&u.maxX<=c.maxX&&u.maxY<=c.maxY}function intersects(c,u){return u.minX<=c.maxX&&u.minY<=c.maxY&&u.maxX>=c.minX&&u.maxY>=c.minY}function createNode(c){return{children:c,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(c,u,d,p,g){const f=[u,d];for(;f.length;){if((d=f.pop())-(u=f.pop())<=p)continue;const _=u+Math.ceil((d-u)/p/2)*p;quickselect(c,_,u,d,g),f.push(u,_,_,d)}}function calculateScale(c,u,d,p){return void 0!==d&&void 0!==p?[d/c,p/u]:void 0!==d?d/c:void 0!==p?p/u:1}class Icon extends tn{constructor(c){const u=void 0!==(c=c||{}).opacity?c.opacity:1,d=void 0!==c.rotation?c.rotation:0,p=void 0!==c.scale?c.scale:1,g=void 0!==c.rotateWithView&&c.rotateWithView;super({opacity:u,rotation:d,scale:p,displacement:void 0!==c.displacement?c.displacement:[0,0],rotateWithView:g,declutterMode:c.declutterMode}),this.anchor_=void 0!==c.anchor?c.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==c.anchorOrigin?c.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==c.anchorXUnits?c.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==c.anchorYUnits?c.anchorYUnits:"fraction",this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null;const f=void 0!==c.img?c.img:null;let _,y=c.src;if(assert(!(void 0!==y&&f),"`image` and `src` cannot be provided at the same time"),void 0!==y&&0!==y.length||!f||(y=f.src||getUid(f)),assert(void 0!==y&&y.length>0,"A defined and non-empty `src` or `image` must be provided"),assert(!((void 0!==c.width||void 0!==c.height)&&void 0!==c.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==c.src?_=Er.IDLE:void 0!==f&&(_="complete"in f?f.complete?f.src?Er.LOADED:Er.IDLE:Er.LOADING:Er.LOADED),this.color_=void 0!==c.color?asArray(c.color):null,this.iconImage_=get$1(f,y,this.crossOrigin_,_,this.color_),this.offset_=void 0!==c.offset?c.offset:[0,0],this.offsetOrigin_=void 0!==c.offsetOrigin?c.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==c.size?c.size:null,this.initialOptions_,void 0!==c.width||void 0!==c.height){let u,d;if(c.size)[u,d]=c.size;else{const p=this.getImage(1);if(p.width&&p.height)u=p.width,d=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=c;const onload=()=>{if(this.unlistenImageChange(onload),!this.initialOptions_)return;const u=this.iconImage_.getSize();this.setScale(calculateScale(u[0],u[1],c.width,c.height))};return void this.listenImageChange(onload)}}void 0!==u&&this.setScale(calculateScale(u,d,c.width,c.height))}}clone(){let c,u,d;return this.initialOptions_?(u=this.initialOptions_.width,d=this.initialOptions_.height):(c=this.getScale(),c=Array.isArray(c)?c.slice():c),new Icon({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:c,width:u,height:d,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let c=this.normalizedAnchor_;if(!c){c=this.anchor_;const u=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!u)return null;c=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(c[0]*=u[0]),"fraction"==this.anchorYUnits_&&(c[1]*=u[1])}if("top-left"!=this.anchorOrigin_){if(!u)return null;c===this.anchor_&&(c=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(c[0]=-c[0]+u[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(c[1]=-c[1]+u[1])}this.normalizedAnchor_=c}const u=this.getDisplacement(),d=this.getScaleArray();return[c[0]-u[0]/d[0],c[1]+u[1]/d[1]]}setAnchor(c){this.anchor_=c,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(c){return this.iconImage_.getImage(c)}getPixelRatio(c){return this.iconImage_.getPixelRatio(c)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let c=this.offset_;if("top-left"!=this.offsetOrigin_){const u=this.getSize(),d=this.iconImage_.getSize();if(!u||!d)return null;c=c.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(c[0]=d[0]-u[0]-c[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(c[1]=d[1]-u[1]-c[1])}return this.origin_=c,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const c=this.getScaleArray();return this.size_?this.size_[0]*c[0]:this.iconImage_.getImageState()==Er.LOADED?this.iconImage_.getSize()[0]*c[0]:void 0}getHeight(){const c=this.getScaleArray();return this.size_?this.size_[1]*c[1]:this.iconImage_.getImageState()==Er.LOADED?this.iconImage_.getSize()[1]*c[1]:void 0}setScale(c){delete this.initialOptions_,super.setScale(c)}listenImageChange(c){this.iconImage_.addEventListener(mi,c)}load(){this.iconImage_.load()}unlistenImageChange(c){this.iconImage_.removeEventListener(mi,c)}ready(){return this.iconImage_.ready()}}var qn=Icon;let Yn=0;const Zn=1<<Yn++,Kn=1<<Yn++,Hn=1<<Yn++,Jn=1<<Yn++,Qn=1<<Yn++,ts=1<<Yn++,es=Math.pow(2,6)-1,is={[Zn]:"boolean",[Kn]:"number",[Hn]:"string",[Jn]:"color",[Qn]:"number[]",[ts]:"size"},rs=Object.keys(is).map(Number).sort(ascending);function typeName(c){const u=[];for(const d of rs)includesType(c,d)&&u.push(is[d]);return 0===u.length?"untyped":u.length<3?u.join(" or "):u.slice(0,-1).join(", ")+", or "+u[u.length-1]}function includesType(c,u){return(c&u)===u}function isType(c,u){return c===u}class LiteralExpression{constructor(c,u){if(!function isSpecific(c){return c in is}(c))throw new Error(`literal expressions must have a specific type, got ${typeName(c)}`);this.type=c,this.value=u}}class CallExpression{constructor(c,u,...d){this.type=c,this.operator=u,this.args=d}}function newParsingContext(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1}}function parse$2(c,u,d){switch(typeof c){case"boolean":if(isType(u,Hn))return new LiteralExpression(Hn,c?"true":"false");if(!includesType(u,Zn))throw new Error(`got a boolean, but expected ${typeName(u)}`);return new LiteralExpression(Zn,c);case"number":if(isType(u,ts))return new LiteralExpression(ts,toSize(c));if(isType(u,Zn))return new LiteralExpression(Zn,!!c);if(isType(u,Hn))return new LiteralExpression(Hn,c.toString());if(!includesType(u,Kn))throw new Error(`got a number, but expected ${typeName(u)}`);return new LiteralExpression(Kn,c);case"string":if(isType(u,Jn))return new LiteralExpression(Jn,fromString(c));if(isType(u,Zn))return new LiteralExpression(Zn,!!c);if(!includesType(u,Hn))throw new Error(`got a string, but expected ${typeName(u)}`);return new LiteralExpression(Hn,c)}if(!Array.isArray(c))throw new Error("expression must be an array or a primitive value");if(0===c.length)throw new Error("empty expression");if("string"==typeof c[0])return function parseCallExpression(c,u,d){const p=c[0],g=ss[p];if(!g)throw new Error(`unknown operator: ${p}`);return g(c,u,d)}(c,u,d);for(const u of c)if("number"!=typeof u)throw new Error("expected an array of numbers");if(isType(u,ts)){if(2!==c.length)throw new Error(`expected an array of two values for a size, got ${c.length}`);return new LiteralExpression(ts,c)}if(isType(u,Jn)){if(3===c.length)return new LiteralExpression(Jn,[...c,1]);if(4===c.length)return new LiteralExpression(Jn,c);throw new Error(`expected an array of 3 or 4 values for a color, got ${c.length}`)}if(!includesType(u,Qn))throw new Error(`got an array of numbers, but expected ${typeName(u)}`);return new LiteralExpression(Qn,c)}const ns={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},ss={[ns.Get]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[ns.Var]:createCallExpressionParser(hasArgsCount(1,1),(function withVarArgs(c,u,d){const p=c[1];if("string"!=typeof p)throw new Error("expected a string argument for var operation");return d.variables.add(p),[new LiteralExpression(Hn,p)]})),[ns.Has]:createCallExpressionParser(hasArgsCount(1,1/0),withGetArgs),[ns.Id]:createCallExpressionParser((function usesFeatureId(c,u,d){d.featureId=!0}),withNoArgs),[ns.Concat]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Hn)),[ns.GeometryType]:createCallExpressionParser((function usesGeometryType(c,u,d){d.geometryType=!0}),withNoArgs),[ns.LineMetric]:createCallExpressionParser(withNoArgs),[ns.Resolution]:createCallExpressionParser(withNoArgs),[ns.Zoom]:createCallExpressionParser(withNoArgs),[ns.Time]:createCallExpressionParser(withNoArgs),[ns.Any]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Zn)),[ns.All]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Zn)),[ns.Not]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Zn)),[ns.Equal]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(es)),[ns.NotEqual]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(es)),[ns.GreaterThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.GreaterThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.LessThan]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.LessThanOrEqualTo]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.Multiply]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[ns.Coalesce]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfReturnType),[ns.Divide]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.Add]:createCallExpressionParser(hasArgsCount(2,1/0),withArgsOfType(Kn)),[ns.Subtract]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.Clamp]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(Kn)),[ns.Mod]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.Pow]:createCallExpressionParser(hasArgsCount(2,2),withArgsOfType(Kn)),[ns.Abs]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Floor]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Ceil]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Round]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Sin]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Cos]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Atan]:createCallExpressionParser(hasArgsCount(1,2),withArgsOfType(Kn)),[ns.Sqrt]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Kn)),[ns.Match]:createCallExpressionParser(hasArgsCount(4,1/0),hasEvenArgs,(function withMatchArgs(c,u,d){const p=c.length-1,g=Hn|Kn|Zn,f=parse$2(c[1],g,d),_=parse$2(c[c.length-1],u,d),y=new Array(p-2);for(let u=0;u<p-2;u+=2){try{const p=parse$2(c[u+2],f.type,d);y[u]=p}catch(c){throw new Error(`failed to parse argument ${u+1} of match expression: ${c.message}`)}try{const p=parse$2(c[u+3],_.type,d);y[u+1]=p}catch(c){throw new Error(`failed to parse argument ${u+2} of match expression: ${c.message}`)}}return[f,...y,_]})),[ns.Between]:createCallExpressionParser(hasArgsCount(3,3),withArgsOfType(Kn)),[ns.Interpolate]:createCallExpressionParser(hasArgsCount(6,1/0),hasEvenArgs,(function withInterpolateArgs(c,u,d){const p=c[1];let g;switch(p[0]){case"linear":g=1;break;case"exponential":const c=p[1];if("number"!=typeof c||c<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(c)} instead`);g=c;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(p)}`)}const f=new LiteralExpression(Kn,g);let _;try{_=parse$2(c[2],Kn,d)}catch(c){throw new Error(`failed to parse argument 1 in interpolate expression: ${c.message}`)}const y=new Array(c.length-3);for(let p=0;p<y.length;p+=2){try{const u=parse$2(c[p+3],Kn,d);y[p]=u}catch(c){throw new Error(`failed to parse argument ${p+2} for interpolate expression: ${c.message}`)}try{const g=parse$2(c[p+4],u,d);y[p+1]=g}catch(c){throw new Error(`failed to parse argument ${p+3} for interpolate expression: ${c.message}`)}}return[f,_,...y]})),[ns.Case]:createCallExpressionParser(hasArgsCount(3,1/0),(function hasOddArgs(c,u,d){const p=c[0],g=c.length-1;if(g%2==0)throw new Error(`expected an odd number of arguments for ${p}, got ${g} instead`)}),(function withCaseArgs(c,u,d){const p=parse$2(c[c.length-1],u,d),g=new Array(c.length-1);for(let u=0;u<g.length-1;u+=2){try{const p=parse$2(c[u+1],Zn,d);g[u]=p}catch(c){throw new Error(`failed to parse argument ${u} of case expression: ${c.message}`)}try{const f=parse$2(c[u+2],p.type,d);g[u+1]=f}catch(c){throw new Error(`failed to parse argument ${u+1} of case expression: ${c.message}`)}}return g[g.length-1]=p,g})),[ns.In]:createCallExpressionParser(hasArgsCount(2,2),(function withInArgs(c,u,d){let p,g=c[2];if(!Array.isArray(g))throw new Error('the second argument for the "in" operator must be an array');if("string"==typeof g[0]){if("literal"!==g[0])throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(g[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');g=g[1],p=Hn}else p=Kn;const f=new Array(g.length);for(let c=0;c<f.length;c++)try{const u=parse$2(g[c],p,d);f[c]=u}catch(u){throw new Error(`failed to parse haystack item ${c} for "in" expression: ${u.message}`)}return[parse$2(c[1],p,d),...f]})),[ns.Number]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(es)),[ns.String]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(es)),[ns.Array]:createCallExpressionParser(hasArgsCount(1,1/0),withArgsOfType(Kn)),[ns.Color]:createCallExpressionParser(hasArgsCount(1,4),withArgsOfType(Kn)),[ns.Band]:createCallExpressionParser(hasArgsCount(1,3),withArgsOfType(Kn)),[ns.Palette]:createCallExpressionParser(hasArgsCount(2,2),(function withPaletteArgs(c,u,d){let p;try{p=parse$2(c[1],Kn,d)}catch(c){throw new Error(`failed to parse first argument in palette expression: ${c.message}`)}const g=c[2];if(!Array.isArray(g))throw new Error("the second argument of palette must be an array");const f=new Array(g.length);for(let c=0;c<f.length;c++){let u;try{u=parse$2(g[c],Jn,d)}catch(u){throw new Error(`failed to parse color at index ${c} in palette expression: ${u.message}`)}if(!(u instanceof LiteralExpression))throw new Error(`the palette color at index ${c} must be a literal value`);f[c]=u}return[p,...f]})),[ns.ToString]:createCallExpressionParser(hasArgsCount(1,1),withArgsOfType(Zn|Kn|Hn|Jn))};function withGetArgs(c,u,d){const p=c.length-1,g=new Array(p);for(let u=0;u<p;++u){const p=c[u+1];switch(typeof p){case"number":g[u]=new LiteralExpression(Kn,p);break;case"string":g[u]=new LiteralExpression(Hn,p);break;default:throw new Error(`expected a string key or numeric array index for a get operation, got ${p}`)}0===u&&d.properties.add(String(p))}return g}function withNoArgs(c,u,d){const p=c[0];if(1!==c.length)throw new Error(`expected no arguments for ${p} operation`);return[]}function hasArgsCount(c,u){return function(d,p,g){const f=d[0],_=d.length-1;if(c===u){if(_!==c){throw new Error(`expected ${c} argument${1===c?"":"s"} for ${f}, got ${_}`)}}else if(_<c||_>u){throw new Error(`expected ${u===1/0?`${c} or more`:`${c} to ${u}`} arguments for ${f}, got ${_}`)}}}function withArgsOfReturnType(c,u,d){const p=c.length-1,g=new Array(p);for(let f=0;f<p;++f){const p=parse$2(c[f+1],u,d);g[f]=p}return g}function withArgsOfType(c){return function(u,d,p){const g=u.length-1,f=new Array(g);for(let d=0;d<g;++d){const g=parse$2(u[d+1],c,p);f[d]=g}return f}}function hasEvenArgs(c,u,d){const p=c[0],g=c.length-1;if(g%2==1)throw new Error(`expected an even number of arguments for operation ${p}, got ${g} instead`)}function createCallExpressionParser(...c){return function(u,d,p){const g=u[0];let f;for(let g=0;g<c.length;g++){const _=c[g](u,d,p);if(g==c.length-1){if(!_)throw new Error("expected last argument validator to return the parsed args");f=_}}return new CallExpression(d,g,...f)}}function computeGeometryType(c){if(!c)return"";const u=c.getType();switch(u){case"Point":case"LineString":case"Polygon":return u;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return u.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return computeGeometryType(c.getGeometries()[0]);default:return""}}function buildExpression$1(c,u,d){return compileExpression(parse$2(c,u,d))}function compileExpression(c,u){if(c instanceof LiteralExpression){if(c.type===Jn&&"string"==typeof c.value){const u=fromString(c.value);return function(){return u}}return function(){return c.value}}const d=c.operator;switch(d){case ns.Number:case ns.String:case ns.Coalesce:return function compileAssertionExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case ns.Coalesce:return c=>{for(let u=0;u<p;++u){const d=g[u](c);if(null!=d)return d}throw new Error("Expected one of the values to be non-null")};case ns.Number:case ns.String:return c=>{for(let u=0;u<p;++u){const p=g[u](c);if(typeof p===d)return p}throw new Error(`Expected one of the values to be a ${d}`)};default:throw new Error(`Unsupported assertion operator ${d}`)}}(c);case ns.Get:case ns.Var:case ns.Has:return function compileAccessorExpression(c,u){const d=c.args[0],p=d.value;switch(c.operator){case ns.Get:return u=>{const d=c.args;let g=u.properties[p];for(let c=1,u=d.length;c<u;++c){g=g[d[c].value]}return g};case ns.Var:return c=>c.variables[p];case ns.Has:return u=>{const d=c.args;if(!(p in u.properties))return!1;let g=u.properties[p];for(let c=1,u=d.length;c<u;++c){const u=d[c].value;if(!g||!Object.hasOwn(g,u))return!1;g=g[u]}return!0};default:throw new Error(`Unsupported accessor operator ${c.operator}`)}}(c);case ns.Id:return c=>c.featureId;case ns.GeometryType:return c=>c.geometryType;case ns.Concat:{const u=c.args.map((c=>compileExpression(c)));return c=>"".concat(...u.map((u=>u(c).toString())))}case ns.Resolution:return c=>c.resolution;case ns.Any:case ns.All:case ns.Between:case ns.In:case ns.Not:return function compileLogicalExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case ns.Any:return c=>{for(let u=0;u<p;++u)if(g[u](c))return!0;return!1};case ns.All:return c=>{for(let u=0;u<p;++u)if(!g[u](c))return!1;return!0};case ns.Between:return c=>{const u=g[0](c),d=g[1](c),p=g[2](c);return u>=d&&u<=p};case ns.In:return c=>{const u=g[0](c);for(let d=1;d<p;++d)if(u===g[d](c))return!0;return!1};case ns.Not:return c=>!g[0](c);default:throw new Error(`Unsupported logical operator ${d}`)}}(c);case ns.Equal:case ns.NotEqual:case ns.LessThan:case ns.LessThanOrEqualTo:case ns.GreaterThan:case ns.GreaterThanOrEqualTo:return function compileComparisonExpression(c,u){const d=c.operator,p=compileExpression(c.args[0]),g=compileExpression(c.args[1]);switch(d){case ns.Equal:return c=>p(c)===g(c);case ns.NotEqual:return c=>p(c)!==g(c);case ns.LessThan:return c=>p(c)<g(c);case ns.LessThanOrEqualTo:return c=>p(c)<=g(c);case ns.GreaterThan:return c=>p(c)>g(c);case ns.GreaterThanOrEqualTo:return c=>p(c)>=g(c);default:throw new Error(`Unsupported comparison operator ${d}`)}}(c);case ns.Multiply:case ns.Divide:case ns.Add:case ns.Subtract:case ns.Clamp:case ns.Mod:case ns.Pow:case ns.Abs:case ns.Floor:case ns.Ceil:case ns.Round:case ns.Sin:case ns.Cos:case ns.Atan:case ns.Sqrt:return function compileNumericExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);switch(d){case ns.Multiply:return c=>{let u=1;for(let d=0;d<p;++d)u*=g[d](c);return u};case ns.Divide:return c=>g[0](c)/g[1](c);case ns.Add:return c=>{let u=0;for(let d=0;d<p;++d)u+=g[d](c);return u};case ns.Subtract:return c=>g[0](c)-g[1](c);case ns.Clamp:return c=>{const u=g[0](c),d=g[1](c);if(u<d)return d;const p=g[2](c);return u>p?p:u};case ns.Mod:return c=>g[0](c)%g[1](c);case ns.Pow:return c=>Math.pow(g[0](c),g[1](c));case ns.Abs:return c=>Math.abs(g[0](c));case ns.Floor:return c=>Math.floor(g[0](c));case ns.Ceil:return c=>Math.ceil(g[0](c));case ns.Round:return c=>Math.round(g[0](c));case ns.Sin:return c=>Math.sin(g[0](c));case ns.Cos:return c=>Math.cos(g[0](c));case ns.Atan:return 2===p?c=>Math.atan2(g[0](c),g[1](c)):c=>Math.atan(g[0](c));case ns.Sqrt:return c=>Math.sqrt(g[0](c));default:throw new Error(`Unsupported numeric operator ${d}`)}}(c);case ns.Case:return function compileCaseExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{for(let u=0;u<d-1;u+=2){if(p[u](c))return p[u+1](c)}return p[d-1](c)}}(c);case ns.Match:return function compileMatchExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{const u=p[0](c);for(let g=1;g<d;g+=2)if(u===p[g](c))return p[g+1](c);return p[d-1](c)}}(c);case ns.Interpolate:return function compileInterpolateExpression(c,u){const d=c.args.length,p=new Array(d);for(let u=0;u<d;++u)p[u]=compileExpression(c.args[u]);return c=>{const u=p[0](c),g=p[1](c);let f,_;for(let y=2;y<d;y+=2){const d=p[y](c);let x=p[y+1](c);const v=Array.isArray(x);if(v&&(x=withAlpha(x)),d>=g)return 2===y?x:v?interpolateColor(u,g,f,_,d,x):interpolateNumber(u,g,f,_,d,x);f=d,_=x}return _}}(c);case ns.ToString:return function compileConvertExpression(c,u){const d=c.operator,p=c.args.length,g=new Array(p);for(let u=0;u<p;++u)g[u]=compileExpression(c.args[u]);if(d===ns.ToString)return u=>{const d=g[0](u);return c.args[0].type===Jn?toString(d):d.toString()};throw new Error(`Unsupported convert operator ${d}`)}(c);default:throw new Error(`Unsupported operator ${d}`)}}function interpolateNumber(c,u,d,p,g,f){const _=g-d;if(0===_)return p;const y=u-d;return p+(1===c?y/_:(Math.pow(c,y)-1)/(Math.pow(c,_)-1))*(f-p)}function interpolateColor(c,u,d,p,g,f){if(0===g-d)return p;const _=rgbaToLcha(p),y=rgbaToLcha(f);let x=y[2]-_[2];x>180?x-=360:x<-180&&(x+=360);return normalize(function lchaToRgba(c){const u=br.rgb(Tr.xyz(c));return u[3]=c[3],u}([interpolateNumber(c,u,d,_[0],g,y[0]),interpolateNumber(c,u,d,_[1],g,y[1]),_[2]+interpolateNumber(c,u,d,0,g,x),interpolateNumber(c,u,d,p[3],g,f[3])]))}function always$1(c){return!0}function rulesToStyleFunction(c){const u=newParsingContext(),d=function buildRuleSet(c,u){const d=c.length,p=new Array(d);for(let g=0;g<d;++g){const d=c[g],f="filter"in d?buildExpression$1(d.filter,Zn,u):always$1;let _;if(Array.isArray(d.style)){const c=d.style.length;_=new Array(c);for(let p=0;p<c;++p)_[p]=buildStyle(d.style[p],u)}else _=[buildStyle(d.style,u)];p[g]={filter:f,styles:_}}return function(u){const g=[];let f=!1;for(let _=0;_<d;++_){if((0,p[_].filter)(u)&&(!c[_].else||!f)){f=!0;for(const c of p[_].styles){const d=c(u);d&&g.push(d)}}}return g}}(c,u),p={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""};return function(c,g){if(p.properties=c.getPropertiesInternal(),p.resolution=g,u.featureId){const u=c.getId();p.featureId=void 0!==u?u:null}return u.geometryType&&(p.geometryType=computeGeometryType(c.getGeometry())),d(p)}}function flatStylesToStyleFunction(c){const u=newParsingContext(),d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=buildStyle(c[g],u);const g={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""},f=new Array(d);return function(c,_){if(g.properties=c.getPropertiesInternal(),g.resolution=_,u.featureId){const u=c.getId();g.featureId=void 0!==u?u:null}let y=0;for(let c=0;c<d;++c){const u=p[c](g);u&&(f[y]=u,y+=1)}return f.length=y,f}}function buildStyle(c,u){const d=buildFill(c,"",u),p=buildStroke(c,"",u),g=function buildText(c,u){const d="text-",p=stringEvaluator(c,d+"value",u);if(!p)return null;const g=buildFill(c,d,u),f=buildFill(c,d+"background-",u),_=buildStroke(c,d,u),y=buildStroke(c,d+"background-",u),x=stringEvaluator(c,d+"font",u),v=numberEvaluator(c,d+"max-angle",u),C=numberEvaluator(c,d+"offset-x",u),M=numberEvaluator(c,d+"offset-y",u),T=booleanEvaluator(c,d+"overflow",u),L=stringEvaluator(c,d+"placement",u),A=numberEvaluator(c,d+"repeat",u),I=sizeLikeEvaluator(c,d+"scale",u),k=booleanEvaluator(c,d+"rotate-with-view",u),O=numberEvaluator(c,d+"rotation",u),N=stringEvaluator(c,d+"align",u),G=stringEvaluator(c,d+"justify",u),j=stringEvaluator(c,d+"baseline",u),B=numberArrayEvaluator(c,d+"padding",u),V=optionalDeclutterMode(c,d+"declutter-mode"),q=new Tn({declutterMode:V});return function(c){if(q.setText(p(c)),g&&q.setFill(g(c)),f&&q.setBackgroundFill(f(c)),_&&q.setStroke(_(c)),y&&q.setBackgroundStroke(y(c)),x&&q.setFont(x(c)),v&&q.setMaxAngle(v(c)),C&&q.setOffsetX(C(c)),M&&q.setOffsetY(M(c)),T&&q.setOverflow(T(c)),L){const u=L(c);if("point"!==u&&"line"!==u)throw new Error("Expected point or line for text-placement");q.setPlacement(u)}if(A&&q.setRepeat(A(c)),I&&q.setScale(I(c)),k&&q.setRotateWithView(k(c)),O&&q.setRotation(O(c)),N){const u=N(c);if("left"!==u&&"center"!==u&&"right"!==u&&"end"!==u&&"start"!==u)throw new Error("Expected left, right, center, start, or end for text-align");q.setTextAlign(u)}if(G){const u=G(c);if("left"!==u&&"right"!==u&&"center"!==u)throw new Error("Expected left, right, or center for text-justify");q.setJustify(u)}if(j){const u=j(c);if("bottom"!==u&&"top"!==u&&"middle"!==u&&"alphabetic"!==u&&"hanging"!==u)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");q.setTextBaseline(u)}return B&&q.setPadding(B(c)),q}}(c,u),f=function buildImage(c,u){if("icon-src"in c)return function buildIcon(c,u){const d="icon-",p=d+"src",g=requireString(c[p],p),f=coordinateEvaluator(c,d+"anchor",u),_=sizeLikeEvaluator(c,d+"scale",u),y=numberEvaluator(c,d+"opacity",u),x=coordinateEvaluator(c,d+"displacement",u),v=numberEvaluator(c,d+"rotation",u),C=booleanEvaluator(c,d+"rotate-with-view",u),M=optionalIconOrigin(c,d+"anchor-origin"),T=optionalIconAnchorUnits(c,d+"anchor-x-units"),L=optionalIconAnchorUnits(c,d+"anchor-y-units"),A=function optionalColorLike(c,u){const d=c[u];if(void 0===d)return;return requireColorLike(d,u)}(c,d+"color"),I=function optionalString(c,u){const d=c[u];if(void 0===d)return;if("string"!=typeof d)throw new Error(`Expected a string for ${u}`);return d}(c,d+"cross-origin"),k=function optionalNumberArray(c,u){const d=c[u];if(void 0===d)return;return requireNumberArray(d,u)}(c,d+"offset"),O=optionalIconOrigin(c,d+"offset-origin"),N=optionalNumber(c,d+"width"),G=optionalNumber(c,d+"height"),j=function optionalSize(c,u){const d=c[u];if(void 0===d)return;if("number"==typeof d)return toSize(d);if(!Array.isArray(d))throw new Error(`Expected a number or size array for ${u}`);if(2!==d.length||"number"!=typeof d[0]||"number"!=typeof d[1])throw new Error(`Expected a number or size array for ${u}`);return d}(c,d+"size"),B=optionalDeclutterMode(c,d+"declutter-mode"),V=new qn({src:g,anchorOrigin:M,anchorXUnits:T,anchorYUnits:L,color:A,crossOrigin:I,offset:k,offsetOrigin:O,height:G,width:N,size:j,declutterMode:B});return function(c){return y&&V.setOpacity(y(c)),x&&V.setDisplacement(x(c)),v&&V.setRotation(v(c)),C&&V.setRotateWithView(C(c)),_&&V.setScale(_(c)),f&&V.setAnchor(f(c)),V}}(c,u);if("shape-points"in c)return function buildShape(c,u){const d="shape-",p=d+"points",g=d+"radius",f=requireNumber(c[p],p),_=requireNumber(c[g],g),y=buildFill(c,d,u),x=buildStroke(c,d,u),v=sizeLikeEvaluator(c,d+"scale",u),C=coordinateEvaluator(c,d+"displacement",u),M=numberEvaluator(c,d+"rotation",u),T=booleanEvaluator(c,d+"rotate-with-view",u),L=optionalNumber(c,d+"radius2"),A=optionalNumber(c,d+"angle"),I=optionalDeclutterMode(c,d+"declutter-mode"),k=new En({points:f,radius:_,radius2:L,angle:A,declutterMode:I});return function(c){return y&&k.setFill(y(c)),x&&k.setStroke(x(c)),C&&k.setDisplacement(C(c)),M&&k.setRotation(M(c)),T&&k.setRotateWithView(T(c)),v&&k.setScale(v(c)),k}}(c,u);if("circle-radius"in c)return function buildCircle(c,u){const d="circle-",p=buildFill(c,d,u),g=buildStroke(c,d,u),f=numberEvaluator(c,d+"radius",u),_=sizeLikeEvaluator(c,d+"scale",u),y=coordinateEvaluator(c,d+"displacement",u),x=numberEvaluator(c,d+"rotation",u),v=booleanEvaluator(c,d+"rotate-with-view",u),C=optionalDeclutterMode(c,d+"declutter-mode"),M=new Pn({radius:5,declutterMode:C});return function(c){return f&&M.setRadius(f(c)),p&&M.setFill(p(c)),g&&M.setStroke(g(c)),y&&M.setDisplacement(y(c)),x&&M.setRotation(x(c)),v&&M.setRotateWithView(v(c)),_&&M.setScale(_(c)),M}}(c,u);return null}(c,u),_=numberEvaluator(c,"z-index",u);if(!(d||p||g||f||isEmpty$1(c)))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(c));const y=new Mn;return function(c){let u=!0;if(d){const p=d(c);p&&(u=!1),y.setFill(p)}if(p){const d=p(c);d&&(u=!1),y.setStroke(d)}if(g){const d=g(c);d&&(u=!1),y.setText(d)}if(f){const d=f(c);d&&(u=!1),y.setImage(d)}return _&&y.setZIndex(_(c)),u?null:y}}function buildFill(c,u,d){let p;if(u+"fill-pattern-src"in c)p=function patternEvaluator(c,u,d){const p=stringEvaluator(c,u+"pattern-src",d),g=sizeEvaluator(c,u+"pattern-offset",d),f=sizeEvaluator(c,u+"pattern-size",d),_=colorLikeEvaluator(c,u+"color",d);return function(c){return{src:p(c),offset:g&&g(c),size:f&&f(c),color:_&&_(c)}}}(c,u+"fill-",d);else{if("none"===c[u+"fill-color"])return c=>null;p=colorLikeEvaluator(c,u+"fill-color",d)}if(!p)return null;const g=new Hr;return function(c){const u=p(c);return u===Ir?null:(g.setColor(u),g)}}function buildStroke(c,u,d){const p=numberEvaluator(c,u+"stroke-width",d),g=colorLikeEvaluator(c,u+"stroke-color",d);if(!p&&!g)return null;const f=stringEvaluator(c,u+"stroke-line-cap",d),_=stringEvaluator(c,u+"stroke-line-join",d),y=numberArrayEvaluator(c,u+"stroke-line-dash",d),x=numberEvaluator(c,u+"stroke-line-dash-offset",d),v=numberEvaluator(c,u+"stroke-miter-limit",d),C=new Qr;return function(c){if(g){const u=g(c);if(u===Ir)return null;C.setColor(u)}if(p&&C.setWidth(p(c)),f){const u=f(c);if("butt"!==u&&"round"!==u&&"square"!==u)throw new Error("Expected butt, round, or square line cap");C.setLineCap(u)}if(_){const u=_(c);if("bevel"!==u&&"round"!==u&&"miter"!==u)throw new Error("Expected bevel, round, or miter line join");C.setLineJoin(u)}return y&&C.setLineDash(y(c)),x&&C.setLineDashOffset(x(c)),v&&C.setMiterLimit(v(c)),C}}function numberEvaluator(c,u,d){if(!(u in c))return;const p=buildExpression$1(c[u],Kn,d);return function(c){return requireNumber(p(c),u)}}function stringEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Hn,d);return function(c){return requireString(p(c),u)}}function booleanEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Zn,d);return function(c){const d=p(c);if("boolean"!=typeof d)throw new Error(`Expected a boolean for ${u}`);return d}}function colorLikeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Jn,d);return function(c){return requireColorLike(p(c),u)}}function numberArrayEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Qn,d);return function(c){return requireNumberArray(p(c),u)}}function coordinateEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Qn,d);return function(c){const d=requireNumberArray(p(c),u);if(2!==d.length)throw new Error(`Expected two numbers for ${u}`);return d}}function sizeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Qn,d);return function(c){return requireSize(p(c),u)}}function sizeLikeEvaluator(c,u,d){if(!(u in c))return null;const p=buildExpression$1(c[u],Qn|Kn,d);return function(c){return function requireSizeLike(c,u){if("number"==typeof c)return c;return requireSize(c,u)}(p(c),u)}}function optionalNumber(c,u){const d=c[u];if(void 0!==d){if("number"!=typeof d)throw new Error(`Expected a number for ${u}`);return d}}function optionalIconOrigin(c,u){const d=c[u];if(void 0!==d){if("bottom-left"!==d&&"bottom-right"!==d&&"top-left"!==d&&"top-right"!==d)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${u}`);return d}}function optionalIconAnchorUnits(c,u){const d=c[u];if(void 0!==d){if("pixels"!==d&&"fraction"!==d)throw new Error(`Expected pixels or fraction for ${u}`);return d}}function optionalDeclutterMode(c,u){const d=c[u];if(void 0!==d){if("string"!=typeof d)throw new Error(`Expected a string for ${u}`);if("declutter"!==d&&"obstacle"!==d&&"none"!==d)throw new Error(`Expected declutter, obstacle, or none for ${u}`);return d}}function requireNumberArray(c,u){if(!Array.isArray(c))throw new Error(`Expected an array for ${u}`);const d=c.length;for(let p=0;p<d;++p)if("number"!=typeof c[p])throw new Error(`Expected an array of numbers for ${u}`);return c}function requireString(c,u){if("string"!=typeof c)throw new Error(`Expected a string for ${u}`);return c}function requireNumber(c,u){if("number"!=typeof c)throw new Error(`Expected a number for ${u}`);return c}function requireColorLike(c,u){if("string"==typeof c)return c;const d=requireNumberArray(c,u),p=d.length;if(p<3||p>4)throw new Error(`Expected a color with 3 or 4 values for ${u}`);return d}function requireSize(c,u){const d=requireNumberArray(c,u);if(2!==d.length)throw new Error(`Expected an array of two numbers for ${u}`);return d}const os="renderOrder";class BaseVectorLayer extends Xn{constructor(c){c=c||{};const u=Object.assign({},c);delete u.style,delete u.renderBuffer,delete u.updateWhileAnimating,delete u.updateWhileInteracting,super(u),this.declutter_=c.declutter?String(c.declutter):void 0,this.renderBuffer_=void 0!==c.renderBuffer?c.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(c.style),this.updateWhileAnimating_=void 0!==c.updateWhileAnimating&&c.updateWhileAnimating,this.updateWhileInteracting_=void 0!==c.updateWhileInteracting&&c.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(c){return super.getFeatures(c)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(os)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(c,u){const d=this.getDeclutter();d in c.declutter==!1&&(c.declutter[d]=new Vn(9)),this.getRenderer().renderDeclutter(c,u)}setRenderOrder(c){this.set(os,c)}setStyle(c){this.style_=void 0===c?createDefaultStyle$1:c;const u=function toStyleLike(c){if(void 0===c)return createDefaultStyle$1;if(!c)return null;if("function"==typeof c)return c;if(c instanceof Mn)return c;if(!Array.isArray(c))return flatStylesToStyleFunction([c]);if(0===c.length)return[];const u=c.length,d=c[0];if(d instanceof Mn){const d=new Array(u);for(let p=0;p<u;++p){const u=c[p];if(!(u instanceof Mn))throw new Error("Expected a list of style instances");d[p]=u}return d}if("style"in d){const d=new Array(u);for(let p=0;p<u;++p){const u=c[p];if(!("style"in u))throw new Error("Expected a list of rules with a style property");d[p]=u}return rulesToStyleFunction(d)}const p=c;return flatStylesToStyleFunction(p)}(c);this.styleFunction_=null===c?void 0:function toFunction(c){let u;if("function"==typeof c)u=c;else{let d;Array.isArray(c)?d=c:(assert("function"==typeof c.getZIndex,"Expected an `Style` or an array of `Style`"),d=[c]),u=function(){return d}}return u}(u),this.changed()}}const as=0,ls=1,hs=2,cs=3,us=4,ds=5,ps=6,gs=7,ms=8,fs=9,_s=10,ys=11,xs=12,vs=[ms],Ss=[xs],ws=[ls],Cs=[cs];class VectorContext{drawCustom(c,u,d,p,g){}drawGeometry(c){}setStyle(c){}drawCircle(c,u,d){}drawFeature(c,u,d){}drawGeometryCollection(c,u,d){}drawLineString(c,u,d){}drawMultiLineString(c,u,d){}drawMultiPoint(c,u,d){}drawMultiPolygon(c,u,d){}drawPoint(c,u,d){}drawPolygon(c,u,d){}drawText(c,u,d){}setFillStrokeStyle(c,u){}setImageStyle(c,u){}setTextStyle(c,u){}}class CanvasBuilder extends VectorContext{constructor(c,u,d,p){super(),this.tolerance=c,this.maxExtent=u,this.pixelRatio=p,this.maxLineWidth=0,this.resolution=d,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(c){const u=this.pixelRatio;return 1==u?c:c.map((function(c){return c*u}))}appendFlatPointCoordinates(c,u){const d=this.getBufferedMaxExtent(),p=this.tmpCoordinate_,g=this.coordinates;let f=g.length;for(let _=0,y=c.length;_<y;_+=u)p[0]=c[_],p[1]=c[_+1],containsCoordinate(d,p)&&(g[f++]=p[0],g[f++]=p[1]);return f}appendFlatLineCoordinates(c,u,d,p,g,f){const _=this.coordinates;let y=_.length;const x=this.getBufferedMaxExtent();f&&(u+=p);let v=c[u],C=c[u+1];const M=this.tmpCoordinate_;let T,L,A,I=!0;for(T=u+p;T<d;T+=p)M[0]=c[T],M[1]=c[T+1],A=coordinateRelationship(x,M),A!==L?(I&&(_[y++]=v,_[y++]=C,I=!1),_[y++]=M[0],_[y++]=M[1]):A===Oi.INTERSECTING?(_[y++]=M[0],_[y++]=M[1],I=!1):I=!0,v=M[0],C=M[1],L=A;return(g&&I||T===u+p)&&(_[y++]=v,_[y++]=C),y}drawCustomCoordinates_(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f],y=this.appendFlatLineCoordinates(c,u,_,p,!1,!1);g.push(y),u=_}return u}drawCustom(c,u,d,p,g){this.beginGeometry(c,u,g);const f=c.getType(),_=c.getStride(),y=this.coordinates.length;let x,v,C,M,T;switch(f){case"MultiPolygon":x=c.getOrientedFlatCoordinates(),M=[];const u=c.getEndss();T=0;for(let c=0,d=u.length;c<d;++c){const d=[];T=this.drawCustomCoordinates_(x,T,u[c],_,d),M.push(d)}this.instructions.push([us,y,M,c,d,inflateMultiCoordinatesArray,g]),this.hitDetectionInstructions.push([us,y,M,c,p||d,inflateMultiCoordinatesArray,g]);break;case"Polygon":case"MultiLineString":C=[],x="Polygon"==f?c.getOrientedFlatCoordinates():c.getFlatCoordinates(),T=this.drawCustomCoordinates_(x,0,c.getEnds(),_,C),this.instructions.push([us,y,C,c,d,inflateCoordinatesArray,g]),this.hitDetectionInstructions.push([us,y,C,c,p||d,inflateCoordinatesArray,g]);break;case"LineString":case"Circle":x=c.getFlatCoordinates(),v=this.appendFlatLineCoordinates(x,0,x.length,_,!1,!1),this.instructions.push([us,y,v,c,d,inflateCoordinates,g]),this.hitDetectionInstructions.push([us,y,v,c,p||d,inflateCoordinates,g]);break;case"MultiPoint":x=c.getFlatCoordinates(),v=this.appendFlatPointCoordinates(x,_),v>y&&(this.instructions.push([us,y,v,c,d,inflateCoordinates,g]),this.hitDetectionInstructions.push([us,y,v,c,p||d,inflateCoordinates,g]));break;case"Point":x=c.getFlatCoordinates(),this.coordinates.push(x[0],x[1]),v=this.coordinates.length,this.instructions.push([us,y,v,c,d,void 0,g]),this.hitDetectionInstructions.push([us,y,v,c,p||d,void 0,g])}this.endGeometry(u)}beginGeometry(c,u,d){this.beginGeometryInstruction1_=[as,u,0,c,d],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[as,u,0,c,d],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const c=this.hitDetectionInstructions;let u;c.reverse();const d=c.length;let p,g,f=-1;for(u=0;u<d;++u)p=c[u],g=p[0],g==gs?f=u:g==as&&(p[2]=u,reverseSubArray(this.hitDetectionInstructions,f,u),f=-1)}setFillStrokeStyle(c,u){const d=this.state;if(c){const u=c.getColor();d.fillPatternScale=u&&"object"==typeof u&&"src"in u?this.pixelRatio:1,d.fillStyle=asColorLike(u||cn)}else d.fillStyle=void 0;if(u){const c=u.getColor();d.strokeStyle=asColorLike(c||gn);const p=u.getLineCap();d.lineCap=void 0!==p?p:un;const g=u.getLineDash();d.lineDash=g?g.slice():dn;const f=u.getLineDashOffset();d.lineDashOffset=f||0;const _=u.getLineJoin();d.lineJoin=void 0!==_?_:pn;const y=u.getWidth();d.lineWidth=void 0!==y?y:1;const x=u.getMiterLimit();d.miterLimit=void 0!==x?x:10,d.lineWidth>this.maxLineWidth&&(this.maxLineWidth=d.lineWidth,this.bufferedMaxExtent_=null)}else d.strokeStyle=void 0,d.lineCap=void 0,d.lineDash=null,d.lineDashOffset=void 0,d.lineJoin=void 0,d.lineWidth=void 0,d.miterLimit=void 0}createFill(c){const u=c.fillStyle,d=[_s,u];return"string"!=typeof u&&d.push(c.fillPatternScale),d}applyStroke(c){this.instructions.push(this.createStroke(c))}createStroke(c){return[ys,c.strokeStyle,c.lineWidth*this.pixelRatio,c.lineCap,c.lineJoin,c.miterLimit,this.applyPixelRatio(c.lineDash),c.lineDashOffset*this.pixelRatio]}updateFillStyle(c,u){const d=c.fillStyle;"string"==typeof d&&c.currentFillStyle==d||(void 0!==d&&this.instructions.push(u.call(this,c)),c.currentFillStyle=d)}updateStrokeStyle(c,u){const d=c.strokeStyle,p=c.lineCap,g=c.lineDash,f=c.lineDashOffset,_=c.lineJoin,y=c.lineWidth,x=c.miterLimit;(c.currentStrokeStyle!=d||c.currentLineCap!=p||g!=c.currentLineDash&&!equals$2(c.currentLineDash,g)||c.currentLineDashOffset!=f||c.currentLineJoin!=_||c.currentLineWidth!=y||c.currentMiterLimit!=x)&&(void 0!==d&&u.call(this,c),c.currentStrokeStyle=d,c.currentLineCap=p,c.currentLineDash=g,c.currentLineDashOffset=f,c.currentLineJoin=_,c.currentLineWidth=y,c.currentMiterLimit=x)}endGeometry(c){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const u=[gs,c];this.instructions.push(u),this.hitDetectionInstructions.push(u)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=clone(this.maxExtent),this.maxLineWidth>0)){const c=this.resolution*(this.maxLineWidth+1)/2;buffer(this.bufferedMaxExtent_,c,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}class CanvasPolygonBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p)}drawFlatCoordinatess_(c,u,d,p){const g=this.state,f=void 0!==g.fillStyle,_=void 0!==g.strokeStyle,y=d.length;this.instructions.push(ws),this.hitDetectionInstructions.push(ws);for(let g=0;g<y;++g){const f=d[g],y=this.coordinates.length,x=this.appendFlatLineCoordinates(c,u,f,p,!0,!_),v=[fs,y,x];this.instructions.push(v),this.hitDetectionInstructions.push(v),_&&(this.instructions.push(Cs),this.hitDetectionInstructions.push(Cs)),u=f}return f&&(this.instructions.push(vs),this.hitDetectionInstructions.push(vs)),_&&(this.instructions.push(Ss),this.hitDetectionInstructions.push(Ss)),u}drawCircle(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([_s,cn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([ys,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,dn,0]);const _=c.getFlatCoordinates(),y=c.getStride(),x=this.coordinates.length;this.appendFlatLineCoordinates(_,0,_.length,y,!1,!1);const v=[hs,x];this.instructions.push(ws,v),this.hitDetectionInstructions.push(ws,v),void 0!==p.fillStyle&&(this.instructions.push(vs),this.hitDetectionInstructions.push(vs)),void 0!==p.strokeStyle&&(this.instructions.push(Ss),this.hitDetectionInstructions.push(Ss)),this.endGeometry(u)}drawPolygon(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([_s,cn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([ys,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,dn,0]);const _=c.getEnds(),y=c.getOrientedFlatCoordinates(),x=c.getStride();this.drawFlatCoordinatess_(y,0,_,x),this.endGeometry(u)}drawMultiPolygon(c,u,d){const p=this.state,g=p.fillStyle,f=p.strokeStyle;if(void 0===g&&void 0===f)return;this.setFillStrokeStyles_(),this.beginGeometry(c,u,d),void 0!==p.fillStyle&&this.hitDetectionInstructions.push([_s,cn]),void 0!==p.strokeStyle&&this.hitDetectionInstructions.push([ys,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,dn,0]);const _=c.getEndss(),y=c.getOrientedFlatCoordinates(),x=c.getStride();let v=0;for(let c=0,u=_.length;c<u;++c)v=this.drawFlatCoordinatess_(y,v,_[c],x);this.endGeometry(u)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const c=this.tolerance;if(0!==c){const u=this.coordinates;for(let d=0,p=u.length;d<p;++d)u[d]=snap(u[d],c)}return super.finish()}setFillStrokeStyles_(){const c=this.state;void 0!==c.fillStyle&&this.updateFillStyle(c,this.createFill),void 0!==c.strokeStyle&&this.updateStrokeStyle(c,this.applyStroke)}}function lineChunk(c,u,d,p,g){const f=[];let _=d,y=0,x=u.slice(d,2);for(;y<c&&_+g<p;){const[d,p]=x.slice(-2),v=u[_+g],C=u[_+g+1],M=Math.sqrt((v-d)*(v-d)+(C-p)*(C-p));if(y+=M,y>=c){const u=(c-y+M)/M,T=lerp(d,v,u),L=lerp(p,C,u);x.push(T,L),f.push(x),x=[T,L],y==c&&(_+=g),y=0}else if(y<c)x.push(u[_+g],u[_+g+1]),_+=g;else{const c=M-y,u=lerp(d,v,c/M),T=lerp(p,C,c/M);x.push(u,T),f.push(x),x=[u,T],y=0,_+=g}}return y>0&&f.push(x),f}function matchingChunk(c,u,d,p,g){let f,_,y,x,v,C,M,T,L,A,I=d,k=d,O=0,N=0,G=d;for(_=d;_<p;_+=g){const d=u[_],p=u[_+1];void 0!==v&&(L=d-v,A=p-C,x=Math.sqrt(L*L+A*A),void 0!==M&&(N+=y,f=Math.acos((M*L+T*A)/(y*x)),f>c&&(N>O&&(O=N,I=G,k=_),N=0,G=_-g)),y=x,M=L,T=A),v=d,C=p}return N+=x,N>O?[G,_]:[I,k]}const Es={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};const Ps={Circle:CanvasPolygonBuilder,Default:CanvasBuilder,Image:class CanvasImageBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(c,u,d){if(!this.image_||this.maxExtent&&!containsCoordinate(this.maxExtent,c.getFlatCoordinates()))return;this.beginGeometry(c,u,d);const p=c.getFlatCoordinates(),g=c.getStride(),f=this.coordinates.length,_=this.appendFlatPointCoordinates(p,g);this.instructions.push([ps,f,_,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ps,f,_,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(u)}drawMultiPoint(c,u,d){if(!this.image_)return;this.beginGeometry(c,u,d);const p=c.getFlatCoordinates(),g=[];for(let u=0,d=p.length;u<d;u+=c.getStride())this.maxExtent&&!containsCoordinate(this.maxExtent,p.slice(u,u+2))||g.push(p[u],p[u+1]);const f=this.coordinates.length,_=this.appendFlatPointCoordinates(g,2);this.instructions.push([ps,f,_,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([ps,f,_,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(u)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(c,u){const d=c.getAnchor(),p=c.getSize(),g=c.getOrigin();this.imagePixelRatio_=c.getPixelRatio(this.pixelRatio),this.anchorX_=d[0],this.anchorY_=d[1],this.hitDetectionImage_=c.getHitDetectionImage(),this.image_=c.getImage(this.pixelRatio),this.height_=p[1],this.opacity_=c.getOpacity(),this.originX_=g[0],this.originY_=g[1],this.rotateWithView_=c.getRotateWithView(),this.rotation_=c.getRotation(),this.scale_=c.getScaleArray(),this.width_=p[0],this.declutterMode_=c.getDeclutterMode(),this.declutterImageWithText_=u}},LineString:class CanvasLineStringBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p)}drawFlatCoordinates_(c,u,d,p){const g=this.coordinates.length,f=this.appendFlatLineCoordinates(c,u,d,p,!1,!1),_=[fs,g,f];return this.instructions.push(_),this.hitDetectionInstructions.push(_),d}drawLineString(c,u,d){const p=this.state,g=p.strokeStyle,f=p.lineWidth;if(void 0===g||void 0===f)return;this.updateStrokeStyle(p,this.applyStroke),this.beginGeometry(c,u,d),this.hitDetectionInstructions.push([ys,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,dn,0],ws);const _=c.getFlatCoordinates(),y=c.getStride();this.drawFlatCoordinates_(_,0,_.length,y),this.hitDetectionInstructions.push(Ss),this.endGeometry(u)}drawMultiLineString(c,u,d){const p=this.state,g=p.strokeStyle,f=p.lineWidth;if(void 0===g||void 0===f)return;this.updateStrokeStyle(p,this.applyStroke),this.beginGeometry(c,u,d),this.hitDetectionInstructions.push([ys,p.strokeStyle,p.lineWidth,p.lineCap,p.lineJoin,p.miterLimit,dn,0],ws);const _=c.getEnds(),y=c.getFlatCoordinates(),x=c.getStride();let v=0;for(let c=0,u=_.length;c<u;++c)v=this.drawFlatCoordinates_(y,v,_[c],x);this.hitDetectionInstructions.push(Ss),this.endGeometry(u)}finish(){const c=this.state;return null!=c.lastStroke&&c.lastStroke!=this.coordinates.length&&this.instructions.push(Ss),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(c){null!=c.lastStroke&&c.lastStroke!=this.coordinates.length&&(this.instructions.push(Ss),c.lastStroke=this.coordinates.length),c.lastStroke=0,super.applyStroke(c),this.instructions.push(ws)}},Polygon:CanvasPolygonBuilder,Text:class CanvasTextBuilder extends CanvasBuilder{constructor(c,u,d,p){super(c,u,d,p),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[cn]={fillStyle:cn},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const c=super.finish();return c.textStates=this.textStates,c.fillStates=this.fillStates,c.strokeStates=this.strokeStates,c}drawText(c,u,d){const p=this.textFillState_,g=this.textStrokeState_,f=this.textState_;if(""===this.text_||!f||!p&&!g)return;const _=this.coordinates;let y=_.length;const x=c.getType();let v=null,C=c.getStride();if("line"!==f.placement||"LineString"!=x&&"MultiLineString"!=x&&"Polygon"!=x&&"MultiPolygon"!=x){let p=f.overflow?null:[];switch(x){case"Point":case"MultiPoint":v=c.getFlatCoordinates();break;case"LineString":v=c.getFlatMidpoint();break;case"Circle":v=c.getCenter();break;case"MultiLineString":v=c.getFlatMidpoints(),C=2;break;case"Polygon":v=c.getFlatInteriorPoint(),f.overflow||p.push(v[2]/this.resolution),C=3;break;case"MultiPolygon":const u=c.getFlatInteriorPoints();v=[];for(let c=0,d=u.length;c<d;c+=3)f.overflow||p.push(u[c+2]/this.resolution),v.push(u[c],u[c+1]);if(0===v.length)return;C=2}const g=this.appendFlatPointCoordinates(v,C);if(g===y)return;if(p&&(g-y)/2!=v.length/C){let c=y/2;p=p.filter(((u,d)=>{const p=_[2*(c+d)]===v[d*C]&&_[2*(c+d)+1]===v[d*C+1];return p||--c,p}))}this.saveTextStates_(),(f.backgroundFill||f.backgroundStroke)&&(this.setFillStrokeStyle(f.backgroundFill,f.backgroundStroke),f.backgroundFill&&this.updateFillStyle(this.state,this.createFill),f.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(c,u,d);let M=f.padding;if(M!=_n&&(f.scale[0]<0||f.scale[1]<0)){let c=f.padding[0],u=f.padding[1],d=f.padding[2],p=f.padding[3];f.scale[0]<0&&(u=-u,p=-p),f.scale[1]<0&&(c=-c,d=-d),M=[c,u,d,p]}const T=this.pixelRatio;this.instructions.push([ps,y,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,M==_n?_n:M.map((function(c){return c*T})),!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]);const L=1/T,A=this.state.fillStyle;f.backgroundFill&&(this.state.fillStyle=cn,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([ps,y,g,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[L,L],NaN,this.declutterMode_,this.declutterImageWithText_,M,!!f.backgroundFill,!!f.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?cn:this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]),f.backgroundFill&&(this.state.fillStyle=A,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(u)}else{if(!intersects$1(this.maxExtent,c.getExtent()))return;let p;if(v=c.getFlatCoordinates(),"LineString"==x)p=[v.length];else if("MultiLineString"==x)p=c.getEnds();else if("Polygon"==x)p=c.getEnds().slice(0,1);else if("MultiPolygon"==x){const u=c.getEndss();p=[];for(let c=0,d=u.length;c<d;++c)p.push(u[c][0])}this.beginGeometry(c,u,d);const g=f.repeat,M=g?void 0:f.textAlign;let T=0;for(let c=0,u=p.length;c<u;++c){let u;u=g?lineChunk(g*this.resolution,v,T,p[c],C):[v.slice(T,p[c])];for(let d=0,g=u.length;d<g;++d){const g=u[d];let x=0,v=g.length;if(null==M){const c=matchingChunk(f.maxAngle,g,0,g.length,2);x=c[0],v=c[1]}for(let c=x;c<v;c+=C)_.push(g[c],g[c+1]);const L=_.length;T=p[c],this.drawChars_(y,L),y=L}}this.endGeometry(u)}}saveTextStates_(){const c=this.textStrokeState_,u=this.textState_,d=this.textFillState_,p=this.strokeKey_;c&&(p in this.strokeStates||(this.strokeStates[p]={strokeStyle:c.strokeStyle,lineCap:c.lineCap,lineDashOffset:c.lineDashOffset,lineWidth:c.lineWidth,lineJoin:c.lineJoin,miterLimit:c.miterLimit,lineDash:c.lineDash}));const g=this.textKey_;g in this.textStates||(this.textStates[g]={font:u.font,textAlign:u.textAlign||mn,justify:u.justify,textBaseline:u.textBaseline||fn,scale:u.scale});const f=this.fillKey_;d&&(f in this.fillStates||(this.fillStates[f]={fillStyle:d.fillStyle}))}drawChars_(c,u){const d=this.textStrokeState_,p=this.textState_,g=this.strokeKey_,f=this.textKey_,_=this.fillKey_;this.saveTextStates_();const y=this.pixelRatio,x=Es[p.textBaseline],v=this.textOffsetY_*y,C=this.text_,M=d?d.lineWidth*Math.abs(p.scale[0])/2:0;this.instructions.push([ds,c,u,x,p.overflow,_,p.maxAngle,y,v,g,M*y,C,f,1,this.declutterMode_]),this.hitDetectionInstructions.push([ds,c,u,x,p.overflow,_?cn:_,p.maxAngle,y,v,g,M*y,C,f,1/y,this.declutterMode_])}setTextStyle(c,u){let d,p,g;if(c){const u=c.getFill();u?(p=this.textFillState_,p||(p={},this.textFillState_=p),p.fillStyle=asColorLike(u.getColor()||cn)):(p=null,this.textFillState_=p);const f=c.getStroke();if(f){g=this.textStrokeState_,g||(g={},this.textStrokeState_=g);const c=f.getLineDash(),u=f.getLineDashOffset(),d=f.getWidth(),p=f.getMiterLimit();g.lineCap=f.getLineCap()||un,g.lineDash=c?c.slice():dn,g.lineDashOffset=void 0===u?0:u,g.lineJoin=f.getLineJoin()||pn,g.lineWidth=void 0===d?1:d,g.miterLimit=void 0===p?10:p,g.strokeStyle=asColorLike(f.getColor()||gn)}else g=null,this.textStrokeState_=g;d=this.textState_;const _=c.getFont()||hn;wn(_);const y=c.getScaleArray();d.overflow=c.getOverflow(),d.font=_,d.maxAngle=c.getMaxAngle(),d.placement=c.getPlacement(),d.textAlign=c.getTextAlign(),d.repeat=c.getRepeat(),d.justify=c.getJustify(),d.textBaseline=c.getTextBaseline()||fn,d.backgroundFill=c.getBackgroundFill(),d.backgroundStroke=c.getBackgroundStroke(),d.padding=c.getPadding()||_n,d.scale=void 0===y?[1,1]:y;const x=c.getOffsetX(),v=c.getOffsetY(),C=c.getRotateWithView(),M=c.getRotation();this.text_=c.getText()||"",this.textOffsetX_=void 0===x?0:x,this.textOffsetY_=void 0===v?0:v,this.textRotateWithView_=void 0!==C&&C,this.textRotation_=void 0===M?0:M,this.strokeKey_=g?("string"==typeof g.strokeStyle?g.strokeStyle:getUid(g.strokeStyle))+g.lineCap+g.lineDashOffset+"|"+g.lineWidth+g.lineJoin+g.miterLimit+"["+g.lineDash.join()+"]":"",this.textKey_=d.font+d.scale+(d.textAlign||"?")+(d.repeat||"?")+(d.justify||"?")+(d.textBaseline||"?"),this.fillKey_=p&&p.fillStyle?"string"==typeof p.fillStyle?p.fillStyle:"|"+getUid(p.fillStyle):""}else this.text_="";this.declutterMode_=c.getDeclutterMode(),this.declutterImageWithText_=u}}};class BuilderGroup{constructor(c,u,d,p){this.tolerance_=c,this.maxExtent_=u,this.pixelRatio_=p,this.resolution_=d,this.buildersByZIndex_={}}finish(){const c={};for(const u in this.buildersByZIndex_){c[u]=c[u]||{};const d=this.buildersByZIndex_[u];for(const p in d){const g=d[p].finish();c[u][p]=g}}return c}getBuilder(c,u){const d=void 0!==c?c.toString():"0";let p=this.buildersByZIndex_[d];void 0===p&&(p={},this.buildersByZIndex_[d]=p);let g=p[u];if(void 0===g){g=new(0,Ps[u])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),p[u]=g}return g}}class LayerRenderer extends Pi{constructor(c){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=c,this.staleKeys_=new Array,this.maxStaleKeys=5}getStaleKeys(){return this.staleKeys_}prependStaleKey(c){this.staleKeys_.unshift(c),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(c){return abstract()}getData(c){return null}prepareFrame(c){return abstract()}renderFrame(c,u){return abstract()}forEachFeatureAtCoordinate(c,u,d,p,g){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(c){const u=c.target;u.getState()!==Er.LOADED&&u.getState()!==Er.ERROR||this.renderIfReadyAndVisible()}loadImage(c){let u=c.getState();return u!=Er.LOADED&&u!=Er.ERROR&&c.addEventListener(mi,this.boundHandleImageChange_),u==Er.IDLE&&(c.load(),u=c.getState()),u==Er.LOADED}renderIfReadyAndVisible(){const c=this.getLayer();c&&c.getVisible()&&"ready"===c.getSourceState()&&c.changed()}renderDeferred(c){}disposeInternal(){delete this.layer_,super.disposeInternal()}}class RenderEvent extends BaseEvent{constructor(c,u,d,p){super(c),this.inversePixelTransform=u,this.frameState=d,this.context=p}}class ZIndexContext{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(getSharedCanvasContext2D(),{get:(c,u)=>{if("function"==typeof getSharedCanvasContext2D()[u])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(u),this.pushMethodArgs_},set:(c,u,d)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(u,d),!0)})}pushMethodArgs_=(...c)=>(this.instructions_[this.zIndex+this.offset_].push(c),this);pushFunction(c){this.instructions_[this.zIndex+this.offset_].push(c)}getContext(){return this.context_}draw(c){this.instructions_.forEach((u=>{for(let d=0,p=u.length;d<p;++d){const p=u[d];if("function"==typeof p){p(c);continue}const g=u[++d];if("function"==typeof c[p])c[p](...g);else{if("function"==typeof g){c[p]=g(c);continue}c[p]=g}}}))}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}const bs=[];let Ms=null;class CanvasLayerRenderer extends LayerRenderer{constructor(c){super(c),this.container=null,this.renderedResolution,this.tempTransform=[1,0,0,1,0,0],this.pixelTransform=[1,0,0,1,0,0],this.inversePixelTransform=[1,0,0,1,0,0],this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(c,u,d){let p;Ms||function createPixelContext$1(){Ms=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}(),Ms.clearRect(0,0,1,1);try{Ms.drawImage(c,u,d,1,1,0,0,1,1),p=Ms.getImageData(0,0,1,1).data}catch(c){return Ms=null,null}return p}getBackground(c){let u=this.getLayer().getBackground();return"function"==typeof u&&(u=u(c.viewState.resolution)),u||void 0}useContainer(c,u,d){const p=this.getLayer().getClassName();let g,f;if(c&&c.className===p&&(!d||c&&c.style.backgroundColor&&equals$2(asArray(c.style.backgroundColor),asArray(d)))){const u=c.firstElementChild;u instanceof HTMLCanvasElement&&(f=u.getContext("2d"))}if(f&&f.canvas.style.transform===u?(this.container=c,this.context=f,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){g=document.createElement("div"),g.className=p;let c=g.style;c.position="absolute",c.width="100%",c.height="100%",f=createCanvasContext2D();const u=f.canvas;g.appendChild(u),c=u.style,c.position="absolute",c.left="0",c.transformOrigin="top left",this.container=g,this.context=f}this.containerReused||!d||this.container.style.backgroundColor||(this.container.style.backgroundColor=d)}clipUnrotated(c,u,d){const p=getTopLeft(d),g=getTopRight(d),f=getBottomRight(d),_=getBottomLeft(d);apply(u.coordinateToPixelTransform,p),apply(u.coordinateToPixelTransform,g),apply(u.coordinateToPixelTransform,f),apply(u.coordinateToPixelTransform,_);const y=this.inversePixelTransform;apply(y,p),apply(y,g),apply(y,f),apply(y,_),c.save(),c.beginPath(),c.moveTo(Math.round(p[0]),Math.round(p[1])),c.lineTo(Math.round(g[0]),Math.round(g[1])),c.lineTo(Math.round(f[0]),Math.round(f[1])),c.lineTo(Math.round(_[0]),Math.round(_[1])),c.clip()}prepareContainer(c,u){const d=c.extent,p=c.viewState.resolution,g=c.viewState.rotation,f=c.pixelRatio,_=Math.round(getWidth(d)/p*f),y=Math.round(getHeight(d)/p*f);compose(this.pixelTransform,c.size[0]/2,c.size[1]/2,1/f,1/f,g,-_/2,-y/2),makeInverse(this.inversePixelTransform,this.pixelTransform);const x=function toString$1(c){const u="matrix("+c.map(((c,u)=>Math.round(c*ki[u])/ki[u])).join(", ")+")";return u}(this.pixelTransform);if(this.useContainer(u,x,this.getBackground(c)),!this.containerReused){const c=this.context.canvas;c.width!=_||c.height!=y?(c.width=_,c.height=y):this.context.clearRect(0,0,_,y),x!==c.style.transform&&(c.style.transform=x)}}dispatchRenderEvent_(c,u,d){const p=this.getLayer();if(p.hasListener(c)){const g=new RenderEvent(c,this.inversePixelTransform,d,u);p.dispatchEvent(g)}}preRender(c,u){this.frameState=u,u.declutter||this.dispatchRenderEvent_(xr,c,u)}postRender(c,u){u.declutter||this.dispatchRenderEvent_(vr,c,u)}renderDeferredInternal(c){}getRenderContext(c){return c.declutter&&!this.deferredContext_&&(this.deferredContext_=new ZIndexContext),c.declutter?this.deferredContext_.getContext():this.context}renderDeferred(c){c.declutter&&(this.dispatchRenderEvent_(xr,this.context,c),c.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(c),this.dispatchRenderEvent_(vr,this.context,c))}getRenderTransform(c,u,d,p,g,f,_){const y=g/2,x=f/2,v=p/u,C=-v,M=-c[0]+_,T=-c[1];return compose(this.tempTransform,y,x,v,C,-d,M,T)}disposeInternal(){delete this.frameState,super.disposeInternal()}}function drawTextOnPath(c,u,d,p,g,f,_,y,x,v,C,M){let T=c[u],L=c[u+1],A=0,I=0,k=0,O=0;function advance(){A=T,I=L,T=c[u+=p],L=c[u+1],O+=k,k=Math.sqrt((T-A)*(T-A)+(L-I)*(L-I))}do{advance()}while(u<d-p&&O+k<f);let N=0===k?0:(f-O)/k;const G=lerp(A,T,N),j=lerp(I,L,N),B=u-p,V=O,q=f+y*x(v,g,C);for(;u<d-p&&O+k<q;)advance();N=0===k?0:(q-O)/k;const Z=lerp(A,T,N),K=lerp(I,L,N);let J;if(M){const c=[G,j,Z,K];rotate(c,0,4,2,M,c,c),J=c[0]>c[2]}else J=G>Z;const ct=Math.PI,ft=[],pe=B+p===u;let me;if(k=0,O=V,T=c[u=B],L=c[u+1],pe){advance(),me=Math.atan2(L-I,T-A),J&&(me+=me>0?-ct:ct);const c=(Z+G)/2,u=(K+j)/2;return ft[0]=[c,u,(q-f)/2,me,g],ft}for(let c=0,M=(g=g.replace(/\n/g," ")).length;c<M;){advance();let G=Math.atan2(L-I,T-A);if(J&&(G+=G>0?-ct:ct),void 0!==me){let c=G-me;if(c+=c>ct?-2*ct:c<-ct?2*ct:0,Math.abs(c)>_)return null}me=G;const j=c;let B=0;for(;c<M;++c){const _=y*x(v,g[J?M-c-1:c],C);if(u+p<d&&O+k<f+B+_/2)break;B+=_}if(c===j)continue;const V=J?g.substring(M-j,M-c):g.substring(j,c);N=0===k?0:(f+B/2-O)/k;const q=lerp(A,T,N),Z=lerp(I,L,N);ft.push([q,Z,B/2,G,V]),f+=B}return ft}const Ts=[1/0,1/0,-1/0,-1/0],Rs=[],Ls=[],As=[],Is=[];function getDeclutterBox(c){return c[3].declutterBox}const Fs=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function horizontalTextAlign(c,u){return"start"===u?u=Fs.test(c)?"right":"left":"end"===u&&(u=Fs.test(c)?"left":"right"),Es[u]}function createTextChunks(c,u,d){return d>0&&c.push("\n",""),c.push(u,""),c}class Executor{constructor(c,u,d,p,g){this.overlaps=d,this.pixelRatio=u,this.resolution=c,this.alignAndScaleFill_,this.instructions=p.instructions,this.coordinates=p.coordinates,this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=p.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=p.fillStates||{},this.strokeStates=p.strokeStates||{},this.textStates=p.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=g?new ZIndexContext:null}getZIndexContext(){return this.zIndexContext_}createLabel(c,u,d,p){const g=c+u+d+p;if(this.labels_[g])return this.labels_[g];const f=p?this.strokeStates[p]:null,_=d?this.fillStates[d]:null,y=this.textStates[u],x=this.pixelRatio,v=[y.scale[0]*x,y.scale[1]*x],C=y.justify?Es[y.justify]:horizontalTextAlign(Array.isArray(c)?c[0]:c,y.textAlign||mn),M=p&&f.lineWidth?f.lineWidth:0,T=Array.isArray(c)?c:String(c).split("\n").reduce(createTextChunks,[]),{width:L,height:A,widths:I,heights:k,lineWidths:O}=function getTextDimensions(c,u){const d=[],p=[],g=[];let f=0,_=0,y=0,x=0;for(let v=0,C=u.length;v<=C;v+=2){const M=u[v];if("\n"===M||v===C){f=Math.max(f,_),g.push(_),_=0,y+=x,x=0;continue}const T=u[v+1]||c.font,L=measureTextWidth(T,M);d.push(L),_+=L;const A=Cn(T);p.push(A),x=Math.max(x,A)}return{width:f,height:y,widths:d,heights:p,lineWidths:g}}(y,T),N=L+M,G=[],j=(N+2)*v[0],B=(A+M)*v[1],V={width:j<0?Math.floor(j):Math.ceil(j),height:B<0?Math.floor(B):Math.ceil(B),contextInstructions:G};1==v[0]&&1==v[1]||G.push("scale",v),p&&(G.push("strokeStyle",f.strokeStyle),G.push("lineWidth",M),G.push("lineCap",f.lineCap),G.push("lineJoin",f.lineJoin),G.push("miterLimit",f.miterLimit),G.push("setLineDash",[f.lineDash]),G.push("lineDashOffset",f.lineDashOffset)),d&&G.push("fillStyle",_.fillStyle),G.push("textBaseline","middle"),G.push("textAlign","center");const q=.5-C;let Z=C*N+q*M;const K=[],J=[];let ct,ft=0,pe=0,me=0,fe=0;for(let c=0,u=T.length;c<u;c+=2){const u=T[c];if("\n"===u){pe+=ft,ft=0,Z=C*N+q*M,++fe;continue}const g=T[c+1]||y.font;g!==ct&&(p&&K.push("font",g),d&&J.push("font",g),ct=g),ft=Math.max(ft,k[me]);const f=[u,Z+q*I[me]+C*(I[me]-O[fe]),.5*(M+ft)+pe];Z+=I[me],p&&K.push("strokeText",f),d&&J.push("fillText",f),++me}return Array.prototype.push.apply(G,K),Array.prototype.push.apply(G,J),this.labels_[g]=V,V}replayTextBackground_(c,u,d,p,g,f,_){c.beginPath(),c.moveTo.apply(c,u),c.lineTo.apply(c,d),c.lineTo.apply(c,p),c.lineTo.apply(c,g),c.lineTo.apply(c,u),f&&(this.alignAndScaleFill_=f[2],this.fill_(c)),_&&(this.setStrokeStyle_(c,_),c.stroke())}calculateImageOrLabelDimensions_(c,u,d,p,g,f,_,y,x,v,C,M,T,L,A,I){let k=d-(_*=M[0]),O=p-(y*=M[1]);const N=g+x>c?c-x:g,G=f+v>u?u-v:f,j=L[3]+N*M[0]+L[1],B=L[0]+G*M[1]+L[2],V=k-L[3],q=O-L[0];let Z;return(A||0!==C)&&(Rs[0]=V,Is[0]=V,Rs[1]=q,Ls[1]=q,Ls[0]=V+j,As[0]=Ls[0],As[1]=q+B,Is[1]=As[1]),0!==C?(Z=compose([1,0,0,1,0,0],d,p,1,1,C,-d,-p),apply(Z,Rs),apply(Z,Ls),apply(Z,As),apply(Z,Is),createOrUpdate$2(Math.min(Rs[0],Ls[0],As[0],Is[0]),Math.min(Rs[1],Ls[1],As[1],Is[1]),Math.max(Rs[0],Ls[0],As[0],Is[0]),Math.max(Rs[1],Ls[1],As[1],Is[1]),Ts)):createOrUpdate$2(Math.min(V,V+j),Math.min(q,q+B),Math.max(V,V+j),Math.max(q,q+B),Ts),T&&(k=Math.round(k),O=Math.round(O)),{drawImageX:k,drawImageY:O,drawImageW:N,drawImageH:G,originX:x,originY:v,declutterBox:{minX:Ts[0],minY:Ts[1],maxX:Ts[2],maxY:Ts[3],value:I},canvasTransform:Z,scale:M}}replayImageOrLabel_(c,u,d,p,g,f,_){const y=!(!f&&!_),x=p.declutterBox,v=_?_[2]*p.scale[0]/2:0;return x.minX-v<=u[0]&&x.maxX+v>=0&&x.minY-v<=u[1]&&x.maxY+v>=0&&(y&&this.replayTextBackground_(c,Rs,Ls,As,Is,f,_),drawImageOrLabel(c,p.canvasTransform,g,d,p.originX,p.originY,p.drawImageW,p.drawImageH,p.drawImageX,p.drawImageY,p.scale)),!0}fill_(c){const u=this.alignAndScaleFill_;if(u){const d=apply(this.renderedTransform_,[0,0]),p=512*this.pixelRatio;c.save(),c.translate(d[0]%p,d[1]%p),1!==u&&c.scale(u,u),c.rotate(this.viewRotation_)}c.fill(),u&&c.restore()}setStrokeStyle_(c,u){c.strokeStyle=u[1],c.lineWidth=u[2],c.lineCap=u[3],c.lineJoin=u[4],c.miterLimit=u[5],c.lineDashOffset=u[7],c.setLineDash(u[6])}drawLabelWithPointPlacement_(c,u,d,p){const g=this.textStates[u],f=this.createLabel(c,u,p,d),_=this.strokeStates[d],y=this.pixelRatio,x=horizontalTextAlign(Array.isArray(c)?c[0]:c,g.textAlign||mn),v=Es[g.textBaseline||fn],C=_&&_.lineWidth?_.lineWidth:0;return{label:f,anchorX:x*(f.width/y-2*g.scale[0])+2*(.5-x)*C,anchorY:v*f.height/y+2*(.5-v)*C}}execute_(c,u,d,p,g,f,_,y){const x=this.zIndexContext_;let v;this.pixelCoordinates_&&equals$2(d,this.renderedTransform_)?v=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),v=transform2D(this.coordinates,0,this.coordinates.length,2,d,this.pixelCoordinates_),function setFromArray(c,u){return c[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5],c}(this.renderedTransform_,d));let C=0;const M=p.length;let T,L,A,I,k,O,N,G,j,B,V,q,Z,K=0,J=0,ct=0,ft=null,pe=null;const me=this.coordinateCache_,fe=this.viewRotation_,_e=Math.round(1e12*Math.atan2(-d[1],d[0]))/1e12,xe={context:c,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:fe},ve=this.instructions!=p||this.overlaps?0:200;let we,Ce,Ee,Pe;for(;C<M;){const d=p[C];switch(d[0]){case as:we=d[1],Pe=d[3],we.getGeometry()?void 0===_||intersects$1(_,Pe.getExtent())?++C:C=d[2]+1:C=d[2],x&&(x.zIndex=d[4]);break;case ls:J>ve&&(this.fill_(c),J=0),ct>ve&&(c.stroke(),ct=0),J||ct||(c.beginPath(),k=NaN,O=NaN),++C;break;case hs:K=d[1];const p=v[K],M=v[K+1],be=v[K+2]-p,Me=v[K+3]-M,Te=Math.sqrt(be*be+Me*Me);c.moveTo(p+Te,M),c.arc(p,M,Te,0,2*Math.PI,!0),++C;break;case cs:c.closePath(),++C;break;case us:K=d[1],T=d[2];const Re=d[3],Le=d[4],Ae=d[5];xe.geometry=Re,xe.feature=we,C in me||(me[C]=[]);const Ie=me[C];Ae?Ae(v,K,T,2,Ie):(Ie[0]=v[K],Ie[1]=v[K+1],Ie.length=2),x&&(x.zIndex=d[6]),Le(Ie,xe),++C;break;case ps:K=d[1],T=d[2],j=d[3],L=d[4],A=d[5];let Fe=d[6];const ke=d[7],Oe=d[8],Ne=d[9],De=d[10];let Ge=d[11];const je=d[12];let ze=d[13];I=d[14]||"declutter";const Be=d[15];if(!j&&d.length>=20){B=d[19],V=d[20],q=d[21],Z=d[22];const c=this.drawLabelWithPointPlacement_(B,V,q,Z);j=c.label,d[3]=j;const u=d[23];L=(c.anchorX-u)*this.pixelRatio,d[4]=L;const p=d[24];A=(c.anchorY-p)*this.pixelRatio,d[5]=A,Fe=j.height,d[6]=Fe,ze=j.width,d[13]=ze}let Ue,$e,We,Xe;d.length>25&&(Ue=d[25]),d.length>17?($e=d[16],We=d[17],Xe=d[18]):($e=_n,We=!1,Xe=!1),De&&_e?Ge+=fe:De||_e||(Ge-=fe);let Ve=0;for(;K<T;K+=2){if(Ue&&Ue[Ve++]<ze/this.pixelRatio)continue;const d=this.calculateImageOrLabelDimensions_(j.width,j.height,v[K],v[K+1],ze,Fe,L,A,Oe,Ne,Ge,je,g,$e,We||Xe,we),p=[c,u,j,d,ke,We?ft:null,Xe?pe:null];if(y){let c,u,g,f,_;if(Be){const d=T-K;if(!Be[d]){Be[d]={args:p,declutterMode:I};continue}const f=Be[d];c=f.args,u=f.declutterMode,delete Be[d],g=getDeclutterBox(c)}if(!c||"declutter"===u&&y.collides(g)||(f=!0),"declutter"===I&&y.collides(d.declutterBox)||(_=!0),"declutter"===u&&"declutter"===I){const c=f&&_;f=c,_=c}f&&("none"!==u&&y.insert(g),this.replayImageOrLabel_.apply(this,c)),_&&("none"!==I&&y.insert(d.declutterBox),this.replayImageOrLabel_.apply(this,p))}else this.replayImageOrLabel_.apply(this,p)}++C;break;case ds:const qe=d[1],Ye=d[2],Ze=d[3],Ke=d[4];Z=d[5];const He=d[6],Je=d[7],Qe=d[8];q=d[9];const ti=d[10];B=d[11],V=d[12];const ei=[d[13],d[13]];I=d[14]||"declutter";const ii=this.textStates[V],ri=ii.font,ni=[ii.scale[0]*Je,ii.scale[1]*Je];let si;ri in this.widths_?si=this.widths_[ri]:(si={},this.widths_[ri]=si);const oi=lineStringLength(v,qe,Ye,2),ai=Math.abs(ni[0])*measureAndCacheTextWidth(ri,B,si);if(Ke||ai<=oi){const d=drawTextOnPath(v,qe,Ye,2,B,(oi-ai)*horizontalTextAlign(B,this.textStates[V].textAlign),He,Math.abs(ni[0]),measureAndCacheTextWidth,ri,si,_e?0:this.viewRotation_);t:if(d){const p=[];let g,f,_,x,v;if(q)for(g=0,f=d.length;g<f;++g){v=d[g],_=v[4],x=this.createLabel(_,V,"",q),L=v[2]+(ni[0]<0?-ti:ti),A=Ze*x.height+2*(.5-Ze)*ti*ni[1]/ni[0]-Qe;const f=this.calculateImageOrLabelDimensions_(x.width,x.height,v[0],v[1],x.width,x.height,L,A,0,0,v[3],ei,!1,_n,!1,we);if(y&&"declutter"===I&&y.collides(f.declutterBox))break t;p.push([c,u,x,f,1,null,null])}if(Z)for(g=0,f=d.length;g<f;++g){v=d[g],_=v[4],x=this.createLabel(_,V,Z,""),L=v[2],A=Ze*x.height-Qe;const f=this.calculateImageOrLabelDimensions_(x.width,x.height,v[0],v[1],x.width,x.height,L,A,0,0,v[3],ei,!1,_n,!1,we);if(y&&"declutter"===I&&y.collides(f.declutterBox))break t;p.push([c,u,x,f,1,null,null])}y&&"none"!==I&&y.load(p.map(getDeclutterBox));for(let c=0,u=p.length;c<u;++c)this.replayImageOrLabel_.apply(this,p[c])}}++C;break;case gs:if(void 0!==f){we=d[1];const c=f(we,Pe,I);if(c)return c}++C;break;case ms:ve?J++:this.fill_(c),++C;break;case fs:for(K=d[1],T=d[2],Ce=v[K],Ee=v[K+1],c.moveTo(Ce,Ee),k=Ce+.5|0,O=Ee+.5|0,K+=2;K<T;K+=2)Ce=v[K],Ee=v[K+1],N=Ce+.5|0,G=Ee+.5|0,K!=T-2&&N===k&&G===O||(c.lineTo(Ce,Ee),k=N,O=G);++C;break;case _s:ft=d,this.alignAndScaleFill_=d[2],J&&(this.fill_(c),J=0,ct&&(c.stroke(),ct=0)),c.fillStyle=d[1],++C;break;case ys:pe=d,ct&&(c.stroke(),ct=0),this.setStrokeStyle_(c,d),++C;break;case xs:ve?ct++:c.stroke(),++C;break;default:++C}}J&&this.fill_(c),ct&&c.stroke()}execute(c,u,d,p,g,f){this.viewRotation_=p,this.execute_(c,u,d,this.instructions,g,void 0,void 0,f)}executeHitDetection(c,u,d,p,g){return this.viewRotation_=d,this.execute_(c,[c.canvas.width,c.canvas.height],u,this.hitDetectionInstructions,!0,p,g)}}const ks=["Polygon","Circle","LineString","Image","Text","Default"],Os=["Image","Text"],Ns=ks.filter((c=>!Os.includes(c)));class ExecutorGroup{constructor(c,u,d,p,g,f,_){this.maxExtent_=c,this.overlaps_=p,this.pixelRatio_=d,this.resolution_=u,this.renderBuffer_=f,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=[1,0,0,1,0,0],this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(g,_)}clip(c,u){const d=this.getClipCoords(u);c.beginPath(),c.moveTo(d[0],d[1]),c.lineTo(d[2],d[3]),c.lineTo(d[4],d[5]),c.lineTo(d[6],d[7]),c.clip()}createExecutors_(c,u){for(const d in c){let p=this.executorsByZIndex_[d];void 0===p&&(p={},this.executorsByZIndex_[d]=p);const g=c[d];for(const c in g){const d=g[c];p[c]=new Executor(this.resolution_,this.pixelRatio_,this.overlaps_,d,u)}}}hasExecutors(c){for(const u in this.executorsByZIndex_){const d=this.executorsByZIndex_[u];for(let u=0,p=c.length;u<p;++u)if(c[u]in d)return!0}return!1}forEachFeatureAtCoordinate(c,u,d,p,g,f){const _=2*(p=Math.round(p))+1,y=compose(this.hitDetectionTransform_,p+.5,p+.5,1/u,-1/u,-d,-c[0],-c[1]),x=!this.hitDetectionContext_;x&&(this.hitDetectionContext_=createCanvasContext2D(_,_,void 0,{willReadFrequently:!0}));const v=this.hitDetectionContext_;let C;v.canvas.width!==_||v.canvas.height!==_?(v.canvas.width=_,v.canvas.height=_):x||v.clearRect(0,0,_,_),void 0!==this.renderBuffer_&&(C=[1/0,1/0,-1/0,-1/0],extendCoordinate(C,c),buffer(C,u*(this.renderBuffer_+p),C));const M=function getPixelIndexArray(c){if(void 0!==Ds[c])return Ds[c];const u=2*c+1,d=c*c,p=new Array(d+1);for(let g=0;g<=c;++g)for(let f=0;f<=c;++f){const _=g*g+f*f;if(_>d)break;let y=p[_];y||(y=[],p[_]=y),y.push(4*((c+g)*u+(c+f))+3),g>0&&y.push(4*((c-g)*u+(c+f))+3),f>0&&(y.push(4*((c+g)*u+(c-f))+3),g>0&&y.push(4*((c-g)*u+(c-f))+3))}const g=[];for(let c=0,u=p.length;c<u;++c)p[c]&&g.push(...p[c]);return Ds[c]=g,g}(p);let T;function featureCallback(c,u,d){const y=v.getImageData(0,0,_,_).data;for(let x=0,C=M.length;x<C;x++)if(y[M[x]]>0){if(!f||"none"===d||"Image"!==T&&"Text"!==T||f.includes(c)){const d=(M[x]-3)/4,f=p-d%_,y=p-(d/_|0),v=g(c,u,f*f+y*y);if(v)return v}v.clearRect(0,0,_,_);break}}const L=Object.keys(this.executorsByZIndex_).map(Number);let A,I,k,O,N;for(L.sort(ascending),A=L.length-1;A>=0;--A){const c=L[A].toString();for(k=this.executorsByZIndex_[c],I=ks.length-1;I>=0;--I)if(T=ks[I],O=k[T],void 0!==O&&(N=O.executeHitDetection(v,y,d,featureCallback,C),N))return N}}getClipCoords(c){const u=this.maxExtent_;if(!u)return null;const d=u[0],p=u[1],g=u[2],f=u[3],_=[d,p,d,f,g,f,g,p];return transform2D(_,0,8,2,c,_),_}isEmpty(){return isEmpty$1(this.executorsByZIndex_)}execute(c,u,d,p,g,f,_){const y=Object.keys(this.executorsByZIndex_).map(Number);y.sort(ascending),f=f||ks;const x=ks.length;let v,C,M,T,L;for(_&&y.reverse(),v=0,C=y.length;v<C;++v){const C=y[v].toString();for(L=this.executorsByZIndex_[C],M=0,T=f.length;M<T;++M){const C=f[M],T=L[C];if(void 0!==T){const f=null===_?void 0:T.getZIndexContext(),L=f?f.getContext():c,A=this.maxExtent_&&"Image"!==C&&"Text"!==C;if(A&&(L.save(),this.clip(L,d)),f&&"Text"!==C&&"Image"!==C?f.pushFunction((c=>T.execute(c,u,d,p,g,_))):T.execute(L,u,d,p,g,_),A&&L.restore(),f){f.offset();const c=y[v]*x+M;this.deferredZIndexContexts_[c]||(this.deferredZIndexContexts_[c]=[]),this.deferredZIndexContexts_[c].push(f)}}}}this.renderedContext_=c}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const c=this.deferredZIndexContexts_,u=Object.keys(c).map(Number).sort(ascending);for(let d=0,p=u.length;d<p;++d)c[u[d]].forEach((c=>{c.draw(this.renderedContext_),c.clear()})),c[u[d]].length=0}}const Ds={};class CanvasImmediateRenderer extends VectorContext{constructor(c,u,d,p,g,f,_){super(),this.context_=c,this.pixelRatio_=u,this.extent_=d,this.transform_=p,this.transformRotation_=p?toFixed(Math.atan2(p[1],p[0]),10):0,this.viewRotation_=g,this.squaredTolerance_=f,this.userTransform_=_,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}drawImages_(c,u,d,p){if(!this.image_)return;const g=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_),f=this.context_,_=this.tmpLocalTransform_,y=f.globalAlpha;1!=this.imageOpacity_&&(f.globalAlpha=y*this.imageOpacity_);let x=this.imageRotation_;0===this.transformRotation_&&(x-=this.viewRotation_),this.imageRotateWithView_&&(x+=this.viewRotation_);for(let c=0,u=g.length;c<u;c+=2){const u=g[c]-this.imageAnchorX_,d=g[c+1]-this.imageAnchorY_;if(0!==x||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const c=u+this.imageAnchorX_,p=d+this.imageAnchorY_;compose(_,c,p,1,1,x,-c,-p),f.save(),f.transform.apply(f,_),f.translate(c,p),f.scale(this.imageScale_[0],this.imageScale_[1]),f.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),f.restore()}else f.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,u,d,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(f.globalAlpha=y)}drawText_(c,u,d,p){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const g=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_),f=this.context_;let _=this.textRotation_;for(0===this.transformRotation_&&(_-=this.viewRotation_),this.textRotateWithView_&&(_+=this.viewRotation_);u<d;u+=p){const c=g[u]+this.textOffsetX_,d=g[u+1]+this.textOffsetY_;0!==_||1!=this.textScale_[0]||1!=this.textScale_[1]?(f.save(),f.translate(c-this.textOffsetX_,d-this.textOffsetY_),f.rotate(_),f.translate(this.textOffsetX_,this.textOffsetY_),f.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&f.strokeText(this.text_,0,0),this.textFillState_&&f.fillText(this.text_,0,0),f.restore()):(this.textStrokeState_&&f.strokeText(this.text_,c,d),this.textFillState_&&f.fillText(this.text_,c,d))}}moveToLineTo_(c,u,d,p,g){const f=this.context_,_=transform2D(c,u,d,p,this.transform_,this.pixelCoordinates_);f.moveTo(_[0],_[1]);let y=_.length;g&&(y-=2);for(let c=2;c<y;c+=2)f.lineTo(_[c],_[c+1]);return g&&f.closePath(),d}drawRings_(c,u,d,p){for(let g=0,f=d.length;g<f;++g)u=this.moveToLineTo_(c,u,d[g],p,!0);return u}drawCircle(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=function transformGeom2D(c,u,d){const p=c.getFlatCoordinates();if(!p)return null;const g=c.getStride();return transform2D(p,0,p.length,g,u,d)}(c,this.transform_,this.pixelCoordinates_),d=u[2]-u[0],p=u[3]-u[1],g=Math.sqrt(d*d+p*p),f=this.context_;f.beginPath(),f.arc(u[0],u[1],g,0,2*Math.PI),this.fillState_&&f.fill(),this.strokeState_&&f.stroke()}""!==this.text_&&this.drawText_(c.getCenter(),0,2,2)}}setStyle(c){this.setFillStrokeStyle(c.getFill(),c.getStroke()),this.setImageStyle(c.getImage()),this.setTextStyle(c.getText())}setTransform(c){this.transform_=c}drawGeometry(c){switch(c.getType()){case"Point":this.drawPoint(c);break;case"LineString":this.drawLineString(c);break;case"Polygon":this.drawPolygon(c);break;case"MultiPoint":this.drawMultiPoint(c);break;case"MultiLineString":this.drawMultiLineString(c);break;case"MultiPolygon":this.drawMultiPolygon(c);break;case"GeometryCollection":this.drawGeometryCollection(c);break;case"Circle":this.drawCircle(c)}}drawFeature(c,u){const d=u.getGeometryFunction()(c);d&&(this.setStyle(u),this.drawGeometry(d))}drawGeometryCollection(c){const u=c.getGeometriesArray();for(let c=0,d=u.length;c<d;++c)this.drawGeometry(u[c])}drawPoint(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getFlatCoordinates(),d=c.getStride();this.image_&&this.drawImages_(u,0,u.length,d),""!==this.text_&&this.drawText_(u,0,u.length,d)}drawMultiPoint(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getFlatCoordinates(),d=c.getStride();this.image_&&this.drawImages_(u,0,u.length,d),""!==this.text_&&this.drawText_(u,0,u.length,d)}drawLineString(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getFlatCoordinates();u.beginPath(),this.moveToLineTo_(d,0,d.length,c.getStride(),!1),u.stroke()}if(""!==this.text_){const u=c.getFlatMidpoint();this.drawText_(u,0,2,2)}}}drawMultiLineString(c){this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const u=c.getExtent();if(intersects$1(this.extent_,u)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getFlatCoordinates();let p=0;const g=c.getEnds(),f=c.getStride();u.beginPath();for(let c=0,u=g.length;c<u;++c)p=this.moveToLineTo_(d,p,g[c],f,!1);u.stroke()}if(""!==this.text_){const u=c.getFlatMidpoints();this.drawText_(u,0,u.length,2)}}}drawPolygon(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=this.context_;u.beginPath(),this.drawRings_(c.getOrientedFlatCoordinates(),0,c.getEnds(),c.getStride()),this.fillState_&&u.fill(),this.strokeState_&&u.stroke()}if(""!==this.text_){const u=c.getFlatInteriorPoint();this.drawText_(u,0,2,2)}}}drawMultiPolygon(c){if(this.squaredTolerance_&&(c=c.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),intersects$1(this.extent_,c.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const u=this.context_,d=c.getOrientedFlatCoordinates();let p=0;const g=c.getEndss(),f=c.getStride();u.beginPath();for(let c=0,u=g.length;c<u;++c){const u=g[c];p=this.drawRings_(d,p,u,f)}this.fillState_&&u.fill(),this.strokeState_&&u.stroke()}if(""!==this.text_){const u=c.getFlatInteriorPoints();this.drawText_(u,0,u.length,2)}}}setContextFillState_(c){const u=this.context_,d=this.contextFillState_;d?d.fillStyle!=c.fillStyle&&(d.fillStyle=c.fillStyle,u.fillStyle=c.fillStyle):(u.fillStyle=c.fillStyle,this.contextFillState_={fillStyle:c.fillStyle})}setContextStrokeState_(c){const u=this.context_,d=this.contextStrokeState_;d?(d.lineCap!=c.lineCap&&(d.lineCap=c.lineCap,u.lineCap=c.lineCap),equals$2(d.lineDash,c.lineDash)||u.setLineDash(d.lineDash=c.lineDash),d.lineDashOffset!=c.lineDashOffset&&(d.lineDashOffset=c.lineDashOffset,u.lineDashOffset=c.lineDashOffset),d.lineJoin!=c.lineJoin&&(d.lineJoin=c.lineJoin,u.lineJoin=c.lineJoin),d.lineWidth!=c.lineWidth&&(d.lineWidth=c.lineWidth,u.lineWidth=c.lineWidth),d.miterLimit!=c.miterLimit&&(d.miterLimit=c.miterLimit,u.miterLimit=c.miterLimit),d.strokeStyle!=c.strokeStyle&&(d.strokeStyle=c.strokeStyle,u.strokeStyle=c.strokeStyle)):(u.lineCap=c.lineCap,u.setLineDash(c.lineDash),u.lineDashOffset=c.lineDashOffset,u.lineJoin=c.lineJoin,u.lineWidth=c.lineWidth,u.miterLimit=c.miterLimit,u.strokeStyle=c.strokeStyle,this.contextStrokeState_={lineCap:c.lineCap,lineDash:c.lineDash,lineDashOffset:c.lineDashOffset,lineJoin:c.lineJoin,lineWidth:c.lineWidth,miterLimit:c.miterLimit,strokeStyle:c.strokeStyle})}setContextTextState_(c){const u=this.context_,d=this.contextTextState_,p=c.textAlign?c.textAlign:mn;d?(d.font!=c.font&&(d.font=c.font,u.font=c.font),d.textAlign!=p&&(d.textAlign=p,u.textAlign=p),d.textBaseline!=c.textBaseline&&(d.textBaseline=c.textBaseline,u.textBaseline=c.textBaseline)):(u.font=c.font,u.textAlign=p,u.textBaseline=c.textBaseline,this.contextTextState_={font:c.font,textAlign:p,textBaseline:c.textBaseline})}setFillStrokeStyle(c,u){if(c){const u=c.getColor();this.fillState_={fillStyle:asColorLike(u||cn)}}else this.fillState_=null;if(u){const c=u.getColor(),d=u.getLineCap(),p=u.getLineDash(),g=u.getLineDashOffset(),f=u.getLineJoin(),_=u.getWidth(),y=u.getMiterLimit(),x=p||dn;this.strokeState_={lineCap:void 0!==d?d:un,lineDash:1===this.pixelRatio_?x:x.map((c=>c*this.pixelRatio_)),lineDashOffset:(g||0)*this.pixelRatio_,lineJoin:void 0!==f?f:pn,lineWidth:(void 0!==_?_:1)*this.pixelRatio_,miterLimit:void 0!==y?y:10,strokeStyle:asColorLike(c||gn)}}else this.strokeState_=null}setImageStyle(c){let u;if(!c||!(u=c.getSize()))return void(this.image_=null);const d=c.getPixelRatio(this.pixelRatio_),p=c.getAnchor(),g=c.getOrigin();this.image_=c.getImage(this.pixelRatio_),this.imageAnchorX_=p[0]*d,this.imageAnchorY_=p[1]*d,this.imageHeight_=u[1]*d,this.imageOpacity_=c.getOpacity(),this.imageOriginX_=g[0],this.imageOriginY_=g[1],this.imageRotateWithView_=c.getRotateWithView(),this.imageRotation_=c.getRotation();const f=c.getScaleArray();this.imageScale_=[f[0]*this.pixelRatio_/d,f[1]*this.pixelRatio_/d],this.imageWidth_=u[0]*d}setTextStyle(c){if(c){const u=c.getFill();if(u){const c=u.getColor();this.textFillState_={fillStyle:asColorLike(c||cn)}}else this.textFillState_=null;const d=c.getStroke();if(d){const c=d.getColor(),u=d.getLineCap(),p=d.getLineDash(),g=d.getLineDashOffset(),f=d.getLineJoin(),_=d.getWidth(),y=d.getMiterLimit();this.textStrokeState_={lineCap:void 0!==u?u:un,lineDash:p||dn,lineDashOffset:g||0,lineJoin:void 0!==f?f:pn,lineWidth:void 0!==_?_:1,miterLimit:void 0!==y?y:10,strokeStyle:asColorLike(c||gn)}}else this.textStrokeState_=null;const p=c.getFont(),g=c.getOffsetX(),f=c.getOffsetY(),_=c.getRotateWithView(),y=c.getRotation(),x=c.getScaleArray(),v=c.getText(),C=c.getTextAlign(),M=c.getTextBaseline();this.textState_={font:void 0!==p?p:hn,textAlign:void 0!==C?C:mn,textBaseline:void 0!==M?M:fn},this.text_=void 0!==v?Array.isArray(v)?v.reduce(((c,u,d)=>c+(d%2?" ":u)),""):v:"",this.textOffsetX_=void 0!==g?this.pixelRatio_*g:0,this.textOffsetY_=void 0!==f?this.pixelRatio_*f:0,this.textRotateWithView_=void 0!==_&&_,this.textRotation_=void 0!==y?y:0,this.textScale_=[this.pixelRatio_*x[0],this.pixelRatio_*x[1]]}else this.text_=""}}var Gs=Object.freeze({__proto__:null,Circle:Pn,Fill:Hr,Icon:qn,IconImage:Kr,Image:tn,RegularShape:En,Stroke:Qr,Style:Mn,Text:Tn});const js=.5;function createHitDetectionImageData(c,u,d,p,g,f,_,y,x){const v=x?toUserExtent(g,x):g,C=createCanvasContext2D(c[0]*js,c[1]*js);C.imageSmoothingEnabled=!1;const M=C.canvas,T=new CanvasImmediateRenderer(C,js,g,null,_,y,x?getTransformFromProjections(getUserProjection(),x):null),L=d.length,A=Math.floor(16777215/L),I={};for(let c=1;c<=L;++c){const u=d[c-1],g=u.getStyleFunction()||p;if(!g)continue;let _=g(u,f);if(!_)continue;Array.isArray(_)||(_=[_]);const y=(c*A).toString(16).padStart(7,"#00000");for(let c=0,d=_.length;c<d;++c){const d=_[c],p=d.getGeometryFunction()(u);if(!p||!intersects$1(v,p.getExtent()))continue;const g=d.clone(),f=g.getFill();f&&f.setColor(y);const x=g.getStroke();x&&(x.setColor(y),x.setLineDash(null)),g.setText(void 0);const C=d.getImage();if(C){const c=C.getImageSize();if(!c)continue;const u=createCanvasContext2D(c[0],c[1],void 0,{alpha:!1}),d=u.canvas;u.fillStyle=y,u.fillRect(0,0,d.width,d.height),g.setImage(new qn({img:d,anchor:C.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:C.getOrigin(),opacity:1,size:C.getSize(),scale:C.getScale(),rotation:C.getRotation(),rotateWithView:C.getRotateWithView()}))}const M=g.getZIndex()||0;let T=I[M];T||(T={},I[M]=T,T.Polygon=[],T.Circle=[],T.LineString=[],T.Point=[]);const L=p.getType();if("GeometryCollection"===L){const c=p.getGeometriesArrayRecursive();for(let u=0,d=c.length;u<d;++u){const d=c[u];T[d.getType().replace("Multi","")].push(d,g)}}else T[L.replace("Multi","")].push(p,g)}}const k=Object.keys(I).map(Number).sort(ascending);for(let c=0,d=k.length;c<d;++c){const d=I[k[c]];for(const c in d){const p=d[c];for(let c=0,d=p.length;c<d;c+=2){T.setStyle(p[c+1]);for(let d=0,g=u.length;d<g;++d)T.setTransform(u[d]),T.drawGeometry(p[c])}}}return C.getImageData(0,0,M.width,M.height)}function hitDetect(c,u,d){const p=[];if(d){const g=Math.floor(Math.round(c[0])*js),f=Math.floor(Math.round(c[1])*js),_=4*(clamp(g,0,d.width-1)+clamp(f,0,d.height-1)*d.width),y=d.data[_],x=d.data[_+1],v=d.data[_+2]+256*(x+256*y),C=Math.floor(16777215/u.length);v&&v%C==0&&p.push(u[v/C-1])}return p}const zs=.5,Bs={Point:function renderPointGeometry(c,u,d,p,g,f){const _=d.getImage(),y=d.getText(),x=y&&y.getText(),v=f&&_&&x?{}:void 0;if(_){if(_.getImageState()!=Er.LOADED)return;const f=c.getBuilder(d.getZIndex(),"Image");f.setImageStyle(_,v),f.drawPoint(u,p,g)}if(x){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y,v),f.drawText(u,p,g)}},LineString:function renderLineStringGeometry(c,u,d,p,g){const f=d.getStroke();if(f){const _=c.getBuilder(d.getZIndex(),"LineString");_.setFillStrokeStyle(null,f),_.drawLineString(u,p,g)}const _=d.getText();if(_&&_.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(_),f.drawText(u,p,g)}},Polygon:function renderPolygonGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(f||_){const y=c.getBuilder(d.getZIndex(),"Polygon");y.setFillStrokeStyle(f,_),y.drawPolygon(u,p,g)}const y=d.getText();if(y&&y.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y),f.drawText(u,p,g)}},MultiPoint:function renderMultiPointGeometry(c,u,d,p,g,f){const _=d.getImage(),y=_&&0!==_.getOpacity(),x=d.getText(),v=x&&x.getText(),C=f&&y&&v?{}:void 0;if(y){if(_.getImageState()!=Er.LOADED)return;const f=c.getBuilder(d.getZIndex(),"Image");f.setImageStyle(_,C),f.drawMultiPoint(u,p,g)}if(v){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(x,C),f.drawText(u,p,g)}},MultiLineString:function renderMultiLineStringGeometry(c,u,d,p,g){const f=d.getStroke();if(f){const _=c.getBuilder(d.getZIndex(),"LineString");_.setFillStrokeStyle(null,f),_.drawMultiLineString(u,p,g)}const _=d.getText();if(_&&_.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(_),f.drawText(u,p,g)}},MultiPolygon:function renderMultiPolygonGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(_||f){const y=c.getBuilder(d.getZIndex(),"Polygon");y.setFillStrokeStyle(f,_),y.drawMultiPolygon(u,p,g)}const y=d.getText();if(y&&y.getText()){const f=c.getBuilder(d.getZIndex(),"Text");f.setTextStyle(y),f.drawText(u,p,g)}},GeometryCollection:function renderGeometryCollectionGeometry(c,u,d,p,g,f){const _=u.getGeometriesArray();let y,x;for(y=0,x=_.length;y<x;++y){(0,Bs[_[y].getType()])(c,_[y],d,p,g,f)}},Circle:function renderCircleGeometry(c,u,d,p,g){const f=d.getFill(),_=d.getStroke();if(f||_){const y=c.getBuilder(d.getZIndex(),"Circle");y.setFillStrokeStyle(f,_),y.drawCircle(u,p,g)}const y=d.getText();if(y&&y.getText()){const g=c.getBuilder(d.getZIndex(),"Text");g.setTextStyle(y),g.drawText(u,p)}}};function defaultOrder(c,u){return parseInt(getUid(c),10)-parseInt(getUid(u),10)}function getSquaredTolerance(c,u){const d=getTolerance(c,u);return d*d}function getTolerance(c,u){return zs*c/u}function renderFeature(c,u,d,p,g,f,_,y){const x=[],v=d.getImage();if(v){let c=!0;const u=v.getImageState();u==Er.LOADED||u==Er.ERROR?c=!1:u==Er.IDLE&&v.load(),c&&x.push(v.ready())}const C=d.getFill();C&&C.loading()&&x.push(C.ready());const M=x.length>0;return M&&Promise.all(x).then((()=>g(null))),function renderFeatureInternal(c,u,d,p,g,f,_){const y=d.getGeometryFunction()(u);if(!y)return;const x=y.simplifyTransformed(p,g),v=d.getRenderer();if(v)renderGeometry(c,x,d,u,_);else{(0,Bs[x.getType()])(c,x,d,u,_,f)}}(c,u,d,p,f,_,y),M}function renderGeometry(c,u,d,p,g){if("GeometryCollection"==u.getType()){const f=u.getGeometries();for(let u=0,_=f.length;u<_;++u)renderGeometry(c,f[u],d,p,g);return}c.getBuilder(d.getZIndex(),"Default").drawCustom(u,p,d.getRenderer(),d.getHitDetectionRenderer(),g)}class CanvasVectorLayerRenderer extends CanvasLayerRenderer{constructor(c){super(c),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(c,u,d){const p=u.extent,g=u.viewState,f=g.center,_=g.resolution,y=g.projection,x=g.rotation,v=y.getExtent(),C=this.getLayer().getSource(),M=this.getLayer().getDeclutter(),T=u.pixelRatio,L=u.viewHints,A=!(L[jn]||L[zn]),I=this.context,k=Math.round(getWidth(p)/_*T),O=Math.round(getHeight(p)/_*T),N=C.getWrapX()&&y.canWrapX(),G=N?getWidth(v):null,j=N?Math.ceil((p[2]-v[2])/G)+1:1;let B=N?Math.floor((p[0]-v[0])/G):0;do{let p=this.getRenderTransform(f,_,0,T,k,O,B*G);u.declutter&&(p=p.slice(0)),c.execute(I,[I.canvas.width,I.canvas.height],p,x,A,void 0===d?ks:d?Os:Ns,d?M&&u.declutter[M]:void 0)}while(++B<j)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=createCanvasContext2D(this.context.canvas.width,this.context.canvas.height,bs))}resetDrawContext_(){if(1!==this.opacity_){const c=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=c,releaseCanvas$1(this.context),bs.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(c){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,c,!0)}renderDeferredInternal(c){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(c,u){const d=c.layerStatesArray[c.layerIndex];this.opacity_=d.opacity;const p=c.viewState;this.prepareContainer(c,u);const g=this.context,f=this.replayGroup_;let _=f&&!f.isEmpty();if(!_){if(!(this.getLayer().hasListener(xr)||this.getLayer().hasListener(vr)))return null}this.setDrawContext_(),this.preRender(g,c);const y=p.projection;if(this.clipped_=!1,_&&d.extent&&this.clipping){const u=fromUserExtent(d.extent,y);_=intersects$1(u,c.extent),this.clipped_=_&&!containsExtent(u,c.extent),this.clipped_&&this.clipUnrotated(g,c,u)}return _&&this.renderWorlds(f,c,!this.getLayer().getDeclutter()&&void 0),!c.declutter&&this.clipped_&&g.restore(),this.postRender(g,c),this.renderedRotation_!==p.rotation&&(this.renderedRotation_=p.rotation,this.hitDetectionImageData_=null),c.declutter||this.resetDrawContext_(),this.container}getFeatures(c){return new Promise((u=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const c=this.frameState.size.slice(),u=this.renderedCenter_,d=this.renderedResolution_,p=this.renderedRotation_,g=this.renderedProjection_,f=this.wrappedRenderedExtent_,_=this.getLayer(),y=[],x=c[0]*js,v=c[1]*js;y.push(this.getRenderTransform(u,d,p,js,x,v,0).slice());const C=_.getSource(),M=g.getExtent();if(C.getWrapX()&&g.canWrapX()&&!containsExtent(M,f)){let c=f[0];const g=getWidth(M);let _,C=0;for(;c<M[0];)--C,_=g*C,y.push(this.getRenderTransform(u,d,p,js,x,v,_).slice()),c+=g;for(C=0,c=f[2];c>M[2];)++C,_=g*C,y.push(this.getRenderTransform(u,d,p,js,x,v,_).slice()),c-=g}const T=getUserProjection();this.hitDetectionImageData_=createHitDetectionImageData(c,y,this.renderedFeatures_,_.getStyleFunction(),f,d,p,getSquaredTolerance(d,this.renderedPixelRatio_),T?g:null)}u(hitDetect(c,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(c,u,d,p,g){if(!this.replayGroup_)return;const f=u.viewState.resolution,_=u.viewState.rotation,y=this.getLayer(),x={},featureCallback=function(c,u,d){const f=getUid(c),_=x[f];if(_){if(!0!==_&&d<_.distanceSq){if(0===d)return x[f]=!0,g.splice(g.lastIndexOf(_),1),p(c,y,u);_.geometry=u,_.distanceSq=d}}else{if(0===d)return x[f]=!0,p(c,y,u);g.push(x[f]={feature:c,layer:y,geometry:u,distanceSq:d,callback:p})}};let v;const C=[this.replayGroup_],M=this.getLayer().getDeclutter();return C.some((p=>v=p.forEachFeatureAtCoordinate(c,f,_,d,featureCallback,M&&u.declutter[M]?u.declutter[M].all().map((c=>c.value)):null))),v}handleFontsChanged(){const c=this.getLayer();c.getVisible()&&this.replayGroup_&&c.changed()}handleStyleImageChange_(c){this.renderIfReadyAndVisible()}prepareFrame(c){const u=this.getLayer(),d=u.getSource();if(!d)return!1;const p=c.viewHints[jn],g=c.viewHints[zn],f=u.getUpdateWhileAnimating(),_=u.getUpdateWhileInteracting();if(this.ready&&!f&&p||!_&&g)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const y=c.extent,x=c.viewState,v=x.projection,C=x.resolution,M=c.pixelRatio,T=u.getRevision(),L=u.getRenderBuffer();let A=u.getRenderOrder();void 0===A&&(A=defaultOrder);const I=x.center.slice(),k=buffer(y,L*C),O=k.slice(),N=[k.slice()],G=v.getExtent();if(d.getWrapX()&&v.canWrapX()&&!containsExtent(G,c.extent)){const c=getWidth(G),u=Math.max(getWidth(k)/2,c);k[0]=G[0]-u,k[2]=G[2]+u,wrapX$1(I,v);const d=wrapX$2(N[0],v);d[0]<G[0]&&d[2]<G[2]?N.push([d[0]+c,d[1],d[2]+c,d[3]]):d[0]>G[0]&&d[2]>G[2]&&N.push([d[0]-c,d[1],d[2]-c,d[3]])}if(this.ready&&this.renderedResolution_==C&&this.renderedRevision_==T&&this.renderedRenderOrder_==A&&this.renderedFrameDeclutter_===!!c.declutter&&containsExtent(this.wrappedRenderedExtent_,k))return equals$2(this.renderedExtent_,O)||(this.hitDetectionImageData_=null,this.renderedExtent_=O),this.renderedCenter_=I,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const j=new BuilderGroup(getTolerance(C,M),k,C,M),B=getUserProjection();let V;if(B){for(let c=0,u=N.length;c<u;++c){const u=toUserExtent(N[c],v);d.loadFeatures(u,toUserResolution(C,v),B)}V=getTransformFromProjections(B,v)}else for(let c=0,u=N.length;c<u;++c)d.loadFeatures(N[c],C,v);const q=getSquaredTolerance(C,M);let Z=!0;const render=(c,d)=>{let p;const g=c.getStyleFunction()||u.getStyleFunction();if(g&&(p=g(c,C)),p){const u=this.renderFeature(c,q,p,j,V,this.getLayer().getDeclutter(),d);Z=Z&&!u}},K=toUserExtent(k,v),J=d.getFeaturesInExtent(K);A&&J.sort(A);for(let c=0,u=J.length;c<u;++c)render(J[c],c);this.renderedFeatures_=J,this.ready=Z;const ct=j.finish(),ft=new ExecutorGroup(k,C,M,d.getOverlaps(),ct,u.getRenderBuffer(),!!c.declutter);return this.renderedResolution_=C,this.renderedRevision_=T,this.renderedRenderOrder_=A,this.renderedFrameDeclutter_=!!c.declutter,this.renderedExtent_=O,this.wrappedRenderedExtent_=k,this.renderedCenter_=I,this.renderedProjection_=v,this.renderedPixelRatio_=M,this.replayGroup_=ft,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(c,u,d,p,g,f,_){if(!d)return!1;let y=!1;if(Array.isArray(d))for(let x=0,v=d.length;x<v;++x)y=renderFeature(p,c,d[x],u,this.boundHandleStyleImageChange_,g,f,_)||y;else y=renderFeature(p,c,d,u,this.boundHandleStyleImageChange_,g,f,_);return y}}var Us=class VectorLayer extends BaseVectorLayer{constructor(c){super(c)}createRenderer(){return new CanvasVectorLayerRenderer(this)}};class RBush{constructor(c){this.rbush_=new Vn(c),this.items_={}}insert(c,u){const d={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3],value:u};this.rbush_.insert(d),this.items_[getUid(u)]=d}load(c,u){const d=new Array(u.length);for(let p=0,g=u.length;p<g;p++){const g=c[p],f=u[p],_={minX:g[0],minY:g[1],maxX:g[2],maxY:g[3],value:f};d[p]=_,this.items_[getUid(f)]=_}this.rbush_.load(d)}remove(c){const u=getUid(c),d=this.items_[u];return delete this.items_[u],null!==this.rbush_.remove(d)}update(c,u){const d=this.items_[getUid(u)];equals$1([d.minX,d.minY,d.maxX,d.maxY],c)||(this.remove(u),this.insert(c,u))}getAll(){return this.rbush_.all().map((function(c){return c.value}))}getInExtent(c){const u={minX:c[0],minY:c[1],maxX:c[2],maxY:c[3]};return this.rbush_.search(u).map((function(c){return c.value}))}forEach(c){return this.forEach_(this.getAll(),c)}forEachInExtent(c,u){return this.forEach_(this.getInExtent(c),u)}forEach_(c,u){let d;for(let p=0,g=c.length;p<g;p++)if(d=u(c[p]),d)return d;return d}isEmpty(){return isEmpty$1(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(c){const u=this.rbush_.toJSON();return createOrUpdate$2(u.minX,u.minY,u.maxX,u.maxY,c)}concat(c){this.rbush_.load(c.rbush_.all());for(const u in c.items_)this.items_[u]=c.items_[u]}}class Circle extends rr{constructor(c,u,d){super(),void 0!==d&&void 0===u?this.setFlatCoordinates(d,c):(u=u||0,this.setCenterAndRadius(c,u,d))}clone(){const c=new Circle(this.flatCoordinates.slice(),void 0,this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){const g=this.flatCoordinates,f=c-g[0],_=u-g[1],y=f*f+_*_;if(y<p){if(0===y)for(let c=0;c<this.stride;++c)d[c]=g[c];else{const c=this.getRadius()/Math.sqrt(y);d[0]=g[0]+c*f,d[1]=g[1]+c*_;for(let c=2;c<this.stride;++c)d[c]=g[c]}return d.length=this.stride,y}return p}containsXY(c,u){const d=this.flatCoordinates,p=c-d[0],g=u-d[1];return p*p+g*g<=this.getRadiusSquared_()}getCenter(){return this.flatCoordinates.slice(0,this.stride)}computeExtent(c){const u=this.flatCoordinates,d=u[this.stride]-u[0];return createOrUpdate$2(u[0]-d,u[1]-d,u[0]+d,u[1]+d,c)}getRadius(){return Math.sqrt(this.getRadiusSquared_())}getRadiusSquared_(){const c=this.flatCoordinates[this.stride]-this.flatCoordinates[0],u=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return c*c+u*u}getType(){return"Circle"}intersectsExtent(c){if(intersects$1(c,this.getExtent())){const u=this.getCenter();return c[0]<=u[0]&&c[2]>=u[0]||(c[1]<=u[1]&&c[3]>=u[1]||forEachCorner(c,this.intersectsCoordinate.bind(this)))}return!1}setCenter(c){const u=this.stride,d=this.flatCoordinates[u]-this.flatCoordinates[0],p=c.slice();p[u]=p[0]+d;for(let d=1;d<u;++d)p[u+d]=c[d];this.setFlatCoordinates(this.layout,p),this.changed()}setCenterAndRadius(c,u,d){this.setLayout(d,c,0),this.flatCoordinates||(this.flatCoordinates=[]);const p=this.flatCoordinates;let g=deflateCoordinate(p,0,c,this.stride);p[g++]=p[0]+u;for(let c=1,u=this.stride;c<u;++c)p[g++]=p[c];p.length=g,this.changed()}getCoordinates(){return null}setCoordinates(c,u){}setRadius(c){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+c,this.changed()}rotate(c,u){const d=this.getCenter(),p=this.getStride();this.setCenter(rotate(d,0,d.length,p,c,u,d)),this.changed()}}Circle.prototype.transform;var $s=Circle;class GeometryCollection extends ir{constructor(c){super(),this.geometries_=c,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(unlistenByKey),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const c=this.geometries_;for(let u=0,d=c.length;u<d;++u)this.changeEventsKeys_.push(listen(c[u],mi,this.changed,this))}clone(){const c=new GeometryCollection(cloneGeometries(this.geometries_));return c.applyProperties(this),c}closestPointXY(c,u,d,p){if(p<closestSquaredDistanceXY(this.getExtent(),c,u))return p;const g=this.geometries_;for(let f=0,_=g.length;f<_;++f)p=g[f].closestPointXY(c,u,d,p);return p}containsXY(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)if(d[p].containsXY(c,u))return!0;return!1}computeExtent(c){createOrUpdateEmpty(c);const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)extend$2(c,u[d].getExtent());return c}getGeometries(){return cloneGeometries(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let c=[];const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)u[d].getType()===this.getType()?c=c.concat(u[d].getGeometriesArrayRecursive()):c.push(u[d]);return c}getSimplifiedGeometry(c){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),c<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&c<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const u=[],d=this.geometries_;let p=!1;for(let g=0,f=d.length;g<f;++g){const f=d[g],_=f.getSimplifiedGeometry(c);u.push(_),_!==f&&(p=!0)}if(p){return new GeometryCollection(u)}return this.simplifiedGeometryMaxMinSquaredTolerance=c,this}getType(){return"GeometryCollection"}intersectsExtent(c){const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)if(u[d].intersectsExtent(c))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)d[p].rotate(c,u);this.changed()}scale(c,u,d){d||(d=getCenter(this.getExtent()));const p=this.geometries_;for(let g=0,f=p.length;g<f;++g)p[g].scale(c,u,d);this.changed()}setGeometries(c){this.setGeometriesArray(cloneGeometries(c))}setGeometriesArray(c){this.unlistenGeometriesChange_(),this.geometries_=c,this.listenGeometriesChange_(),this.changed()}applyTransform(c){const u=this.geometries_;for(let d=0,p=u.length;d<p;++d)u[d].applyTransform(c);this.changed()}translate(c,u){const d=this.geometries_;for(let p=0,g=d.length;p<g;++p)d[p].translate(c,u);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function cloneGeometries(c){return c.map((c=>c.clone()))}var Ws=GeometryCollection;class MultiLineString extends rr{constructor(c,u,d){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(c[0]))this.setCoordinates(c,u);else if(void 0!==u&&d)this.setFlatCoordinates(u,c),this.ends_=d;else{const u=c,d=[],p=[];for(let c=0,g=u.length;c<g;++c){extend$3(d,u[c].getFlatCoordinates()),p.push(d.length)}const g=0===u.length?this.getLayout():u[0].getLayout();this.setFlatCoordinates(g,d),this.ends_=p}}appendLineString(c){extend$3(this.flatCoordinates,c.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const c=new MultiLineString(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return c.applyProperties(this),c}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),assignClosestArrayPoint(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,c,u,d,p))}getCoordinateAtM(c,u,d){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(u=void 0!==u&&u,d=void 0!==d&&d,function lineStringsCoordinateAtM(c,u,d,p,g,f,_){if(_)return lineStringCoordinateAtM(c,u,d[d.length-1],p,g,f);let y;if(g<c[p-1])return f?(y=c.slice(0,p),y[p-1]=g,y):null;if(c[c.length-1]<g)return f?(y=c.slice(c.length-p),y[p-1]=g,y):null;for(let f=0,_=d.length;f<_;++f){const _=d[f];if(u!=_){if(g<c[u+p-1])return null;if(g<=c[_-1])return lineStringCoordinateAtM(c,u,_,p,g,!1);u=_}}return null}(this.flatCoordinates,0,this.ends_,this.stride,c,u,d))}getCoordinates(){return inflateCoordinatesArray(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(c){return c<0||this.ends_.length<=c?null:new Jr(this.flatCoordinates.slice(0===c?0:this.ends_[c-1],this.ends_[c]),this.layout)}getLineStrings(){const c=this.flatCoordinates,u=this.ends_,d=this.layout,p=[];let g=0;for(let f=0,_=u.length;f<_;++f){const _=u[f],y=new Jr(c.slice(g,_),d);p.push(y),g=_}return p}getFlatMidpoints(){const c=[],u=this.flatCoordinates;let d=0;const p=this.ends_,g=this.stride;for(let f=0,_=p.length;f<_;++f){const _=p[f];extend$3(c,interpolatePoint(u,d,_,g,.5)),d=_}return c}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=douglasPeuckerArray(this.flatCoordinates,0,this.ends_,this.stride,c,u,0,d),new MultiLineString(u,"XY",d)}getType(){return"MultiLineString"}intersectsExtent(c){return function intersectsLineStringArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){if(intersectsLineString(c,u,d[f],p,g))return!0;u=d[f]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,2),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.ends_);this.flatCoordinates.length=0===d.length?0:d[d.length-1],this.changed()}}var Xs=MultiLineString;class MultiPoint extends rr{constructor(c,u){super(),u&&!Array.isArray(c[0])?this.setFlatCoordinates(u,c):this.setCoordinates(c,u)}appendPoint(c){extend$3(this.flatCoordinates,c.getFlatCoordinates()),this.changed()}clone(){const c=new MultiPoint(this.flatCoordinates.slice(),this.layout);return c.applyProperties(this),c}closestPointXY(c,u,d,p){if(p<closestSquaredDistanceXY(this.getExtent(),c,u))return p;const g=this.flatCoordinates,f=this.stride;for(let _=0,y=g.length;_<y;_+=f){const y=squaredDistance(c,u,g[_],g[_+1]);if(y<p){p=y;for(let c=0;c<f;++c)d[c]=g[_+c];d.length=f}}return p}getCoordinates(){return inflateCoordinates(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(c){const u=this.flatCoordinates.length/this.stride;return c<0||u<=c?null:new sr(this.flatCoordinates.slice(c*this.stride,(c+1)*this.stride),this.layout)}getPoints(){const c=this.flatCoordinates,u=this.layout,d=this.stride,p=[];for(let g=0,f=c.length;g<f;g+=d){const f=new sr(c.slice(g,g+d),u);p.push(f)}return p}getType(){return"MultiPoint"}intersectsExtent(c){const u=this.flatCoordinates,d=this.stride;for(let p=0,g=u.length;p<g;p+=d){if(containsXY(c,u[p],u[p+1]))return!0}return!1}setCoordinates(c,u){this.setLayout(u,c,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=deflateCoordinates(this.flatCoordinates,0,c,this.stride),this.changed()}}var Vs=MultiPoint;function linearRingss(c,u,d,p){const g=[];let f=[1/0,1/0,-1/0,-1/0];for(let _=0,y=d.length;_<y;++_){const y=d[_];f=createOrUpdateFromFlatCoordinates(c,u,y[0],p),g.push((f[0]+f[2])/2,(f[1]+f[3])/2),u=y[y.length-1]}return g}class MultiPolygon extends rr{constructor(c,u,d){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!d&&!Array.isArray(c[0])){const p=c,g=[],f=[];for(let c=0,u=p.length;c<u;++c){const u=p[c],d=g.length,_=u.getEnds();for(let c=0,u=_.length;c<u;++c)_[c]+=d;extend$3(g,u.getFlatCoordinates()),f.push(_)}u=0===p.length?this.getLayout():p[0].getLayout(),c=g,d=f}void 0!==u&&d?(this.setFlatCoordinates(u,c),this.endss_=d):this.setCoordinates(c,u)}appendPolygon(c){let u;if(this.flatCoordinates){const d=this.flatCoordinates.length;extend$3(this.flatCoordinates,c.getFlatCoordinates()),u=c.getEnds().slice();for(let c=0,p=u.length;c<p;++c)u[c]+=d}else this.flatCoordinates=c.getFlatCoordinates().slice(),u=c.getEnds().slice(),this.endss_.push();this.endss_.push(u),this.changed()}clone(){const c=this.endss_.length,u=new Array(c);for(let d=0;d<c;++d)u[d]=this.endss_[d].slice();const d=new MultiPolygon(this.flatCoordinates.slice(),this.layout,u);return d.applyProperties(this),d}closestPointXY(c,u,d,p){return p<closestSquaredDistanceXY(this.getExtent(),c,u)?p:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function multiArrayMaxSquaredDelta(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];g=arrayMaxSquaredDelta(c,u,_,p,g),u=_[_.length-1]}return g}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function assignClosestMultiArrayPoint(c,u,d,p,g,f,_,y,x,v,C){C=C||[NaN,NaN];for(let M=0,T=d.length;M<T;++M){const T=d[M];v=assignClosestArrayPoint(c,u,T,p,g,f,_,y,x,v,C),u=T[T.length-1]}return v}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,c,u,d,p))}containsXY(c,u){return function linearRingssContainsXY(c,u,d,p,g,f){if(0===d.length)return!1;for(let _=0,y=d.length;_<y;++_){const y=d[_];if(linearRingsContainsXY(c,u,y,p,g,f))return!0;u=y[y.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c,u)}getArea(){return function linearRingss$1(c,u,d,p){let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f];g+=linearRings(c,u,_,p),u=_[_.length-1]}return g}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(c){let u;return void 0!==c?(u=this.getOrientedFlatCoordinates().slice(),orientLinearRingsArray(u,0,this.endss_,this.stride,c)):u=this.flatCoordinates,inflateMultiCoordinatesArray(u,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const c=linearRingss(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new Vs(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const c=this.flatCoordinates;linearRingssAreOriented(c,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=c:(this.orientedFlatCoordinates_=c.slice(),this.orientedFlatCoordinates_.length=orientLinearRingsArray(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(c){const u=[],d=[];return u.length=function quantizeMultiArray(c,u,d,p,g,f,_,y){for(let x=0,v=d.length;x<v;++x){const v=d[x],C=[];_=quantizeArray(c,u,v,p,g,f,_,C),y.push(C),u=v[v.length-1]}return _}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(c),u,0,d),new MultiPolygon(u,"XY",d)}getPolygon(c){if(c<0||this.endss_.length<=c)return null;let u;if(0===c)u=0;else{const d=this.endss_[c-1];u=d[d.length-1]}const d=this.endss_[c].slice(),p=d[d.length-1];if(0!==u)for(let c=0,p=d.length;c<p;++c)d[c]-=u;return new or(this.flatCoordinates.slice(u,p),this.layout,d)}getPolygons(){const c=this.layout,u=this.flatCoordinates,d=this.endss_,p=[];let g=0;for(let f=0,_=d.length;f<_;++f){const _=d[f].slice(),y=_[_.length-1];if(0!==g)for(let c=0,u=_.length;c<u;++c)_[c]-=g;const x=new or(u.slice(g,y),c,_);p.push(x),g=y}return p}getType(){return"MultiPolygon"}intersectsExtent(c){return function intersectsLinearRingMultiArray(c,u,d,p,g){for(let f=0,_=d.length;f<_;++f){const _=d[f];if(intersectsLinearRingArray(c,u,_,p,g))return!0;u=_[_.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,c)}setCoordinates(c,u){this.setLayout(u,c,3),this.flatCoordinates||(this.flatCoordinates=[]);const d=deflateMultiCoordinatesArray(this.flatCoordinates,0,c,this.stride,this.endss_);if(0===d.length)this.flatCoordinates.length=0;else{const c=d[d.length-1];this.flatCoordinates.length=0===c.length?0:c[c.length-1]}this.changed()}}var qs=MultiPolygon,Ys=Object.freeze({__proto__:null,Circle:$s,Geometry:ir,GeometryCollection:Ws,LineString:Jr,LinearRing:nr,MultiLineString:Xs,MultiPoint:Vs,MultiPolygon:qs,Point:sr,Polygon:or,SimpleGeometry:rr});const Zs=[1,0,0,1,0,0];class RenderFeature{constructor(c,u,d,p,g,f){this.styleFunction,this.extent_,this.id_=f,this.type_=c,this.flatCoordinates_=u,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=d||null,this.properties_=g,this.squaredTolerance_,this.stride_=p,this.simplifiedGeometry_}get(c){return this.properties_[c]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?createOrUpdateFromCoordinate(this.flatCoordinates_):createOrUpdateFromFlatCoordinates(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const c=getCenter(this.getExtent());this.flatInteriorPoints_=getInteriorPointOfArray(this.flatCoordinates_,0,this.ends_,2,c,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const c=inflateEnds(this.flatCoordinates_,this.ends_),u=linearRingss(this.flatCoordinates_,0,c,2);this.flatInteriorPoints_=getInteriorPointsOfMultiArray(this.flatCoordinates_,0,c,2,u)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=interpolatePoint(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const c=this.flatCoordinates_;let u=0;const d=this.ends_;for(let p=0,g=d.length;p<g;++p){const g=d[p],f=interpolatePoint(c,u,g,2,.5);extend$3(this.flatMidpoints_,f),u=g}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(c){return this}simplifyTransformed(c,u){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(c){const u=(c=get$2(c)).getExtent(),d=c.getWorldExtent();if(u&&d){const c=getHeight(d)/getHeight(u);compose(Zs,d[0],d[3],c,-c,0,0,0),transform2D(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Zs,this.flatCoordinates_)}}applyTransform(c){c(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new RenderFeature(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=memoizeOne(((c,u)=>{if(c===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),u&&this.simplifiedGeometry_.applyTransform(u);const d=this.simplifiedGeometry_.getFlatCoordinates();let p;switch(this.type_){case"LineString":d.length=douglasPeucker(d,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,c,d,0),p=[d.length];break;case"MultiLineString":p=[],d.length=douglasPeuckerArray(d,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,c,d,0,p);break;case"Polygon":p=[],d.length=quantizeArray(d,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(c),d,0,p)}return p&&(this.simplifiedGeometry_=new RenderFeature(this.type_,d,p,2,this.properties_,this.id_)),this.squaredTolerance_=c,this.simplifiedGeometry_})),this}}RenderFeature.prototype.getFlatCoordinates=RenderFeature.prototype.getOrientedFlatCoordinates;function adaptAttributions(c){return c?"function"==typeof c?c:(Array.isArray(c)||(c=[c]),u=>c):null}var Ks=class Source extends Mi{constructor(c){super(),this.projection=get$2(c.projection),this.attributions_=adaptAttributions(c.attributions),this.attributionsCollapsible_=c.attributionsCollapsible??!0,this.loading=!1,this.state_=void 0!==c.state?c.state:"ready",this.wrapX_=void 0!==c.wrapX&&c.wrapX,this.interpolate_=!!c.interpolate,this.viewResolver=null,this.viewRejector=null;const u=this;this.viewPromise_=new Promise((function(c,d){u.viewResolver=c,u.viewRejector=d}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(c){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(c){this.attributions_=adaptAttributions(c),this.changed()}setState(c){this.state_=c,this.changed()}},Hs="addfeature",Js="changefeature",Qs="clear",to="removefeature",eo="featuresloadstart",io="featuresloadend",ro="featuresloaderror";function all$1(c,u){return[[-1/0,-1/0,1/0,1/0]]}let no=!1;function loadFeaturesXhr(c,u,d,p,g,f,_){const y=new XMLHttpRequest;y.open("GET","function"==typeof c?c(d,p,g):c,!0),"arraybuffer"==u.getType()&&(y.responseType="arraybuffer"),y.withCredentials=no,y.onload=function(c){if(!y.status||y.status>=200&&y.status<300){const c=u.getType();try{let p;"text"==c||"json"==c?p=y.responseText:"xml"==c?p=y.responseXML||y.responseText:"arraybuffer"==c&&(p=y.response),p?f(u.readFeatures(p,{extent:d,featureProjection:g}),u.readProjection(p)):_()}catch{_()}}else _()},y.onerror=_,y.send()}function xhr(c,u){return function(d,p,g,f,_){const y=this;loadFeaturesXhr(c,u,d,p,g,(function(c,u){y.addFeatures(c),void 0!==f&&f(c)}),_||VOID)}}class VectorSourceEvent extends BaseEvent{constructor(c,u,d){super(c),this.feature=u,this.features=d}}var so=class VectorSource extends Ks{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===c.wrapX||c.wrapX}),this.on,this.once,this.un,this.loader_=VOID,this.format_=c.format||null,this.overlaps_=void 0===c.overlaps||c.overlaps,this.url_=c.url,void 0!==c.loader?this.loader_=c.loader:void 0!==this.url_&&(assert(this.format_,"`format` must be set when `url` is set"),this.loader_=xhr(this.url_,this.format_)),this.strategy_=void 0!==c.strategy?c.strategy:all$1;const u=void 0===c.useSpatialIndex||c.useSpatialIndex;let d,p;this.featuresRtree_=u?new RBush:null,this.loadedExtentsRtree_=new RBush,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(c.features)?p=c.features:c.features&&(d=c.features,p=d.getArray()),u||void 0!==d||(d=new Ai(p)),void 0!==p&&this.addFeaturesInternal(p),void 0!==d&&this.bindFeaturesCollection_(d)}addFeature(c){this.addFeatureInternal(c),this.changed()}addFeatureInternal(c){const u=getUid(c);if(!this.addToIndex_(u,c))return void(this.featuresCollection_&&this.featuresCollection_.remove(c));this.setupChangeEvents_(u,c);const d=c.getGeometry();if(d){const u=d.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(u,c)}else this.nullGeometryFeatures_[u]=c;this.dispatchEvent(new VectorSourceEvent(Hs,c))}setupChangeEvents_(c,u){u instanceof RenderFeature||(this.featureChangeKeys_[c]=[listen(u,mi,this.handleFeatureChange_,this),listen(u,pi,this.handleFeatureChange_,this)])}addToIndex_(c,u){let d=!0;if(void 0!==u.getId()){const c=String(u.getId());if(c in this.idIndex_)if(u instanceof RenderFeature){const p=this.idIndex_[c];p instanceof RenderFeature?Array.isArray(p)?p.push(u):this.idIndex_[c]=[p,u]:d=!1}else d=!1;else this.idIndex_[c]=u}return d&&(assert(!(c in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[c]=u),d}addFeatures(c){this.addFeaturesInternal(c),this.changed()}addFeaturesInternal(c){const u=[],d=[],p=[];for(let u=0,p=c.length;u<p;u++){const p=c[u],g=getUid(p);this.addToIndex_(g,p)&&d.push(p)}for(let c=0,g=d.length;c<g;c++){const g=d[c],f=getUid(g);this.setupChangeEvents_(f,g);const _=g.getGeometry();if(_){const c=_.getExtent();u.push(c),p.push(g)}else this.nullGeometryFeatures_[f]=g}if(this.featuresRtree_&&this.featuresRtree_.load(u,p),this.hasListener(Hs))for(let c=0,u=d.length;c<u;c++)this.dispatchEvent(new VectorSourceEvent(Hs,d[c]))}bindFeaturesCollection_(c){let u=!1;this.addEventListener(Hs,(function(d){u||(u=!0,c.push(d.feature),u=!1)})),this.addEventListener(to,(function(d){u||(u=!0,c.remove(d.feature),u=!1)})),c.addEventListener(Ti,(c=>{u||(u=!0,this.addFeature(c.element),u=!1)})),c.addEventListener(Ri,(c=>{u||(u=!0,this.removeFeature(c.element),u=!1)})),this.featuresCollection_=c}clear(c){if(c){for(const c in this.featureChangeKeys_){this.featureChangeKeys_[c].forEach(unlistenByKey)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const removeAndIgnoreReturn=c=>{this.removeFeatureInternal(c)};this.featuresRtree_.forEach(removeAndIgnoreReturn);for(const c in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[c])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const u=new VectorSourceEvent(Qs);this.dispatchEvent(u),this.changed()}forEachFeature(c){if(this.featuresRtree_)return this.featuresRtree_.forEach(c);this.featuresCollection_&&this.featuresCollection_.forEach(c)}forEachFeatureAtCoordinateDirect(c,u){const d=[c[0],c[1],c[0],c[1]];return this.forEachFeatureInExtent(d,(function(d){const p=d.getGeometry();if(p instanceof RenderFeature||p.intersectsCoordinate(c))return u(d)}))}forEachFeatureInExtent(c,u){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(c,u);this.featuresCollection_&&this.featuresCollection_.forEach(u)}forEachFeatureIntersectingExtent(c,u){return this.forEachFeatureInExtent(c,(function(d){const p=d.getGeometry();if(p instanceof RenderFeature||p.intersectsExtent(c)){const c=u(d);if(c)return c}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let c;return this.featuresCollection_?c=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(c=this.featuresRtree_.getAll(),isEmpty$1(this.nullGeometryFeatures_)||extend$3(c,Object.values(this.nullGeometryFeatures_))),c}getFeaturesAtCoordinate(c){const u=[];return this.forEachFeatureAtCoordinateDirect(c,(function(c){u.push(c)})),u}getFeaturesInExtent(c,u){if(this.featuresRtree_){if(!(u&&u.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(c);const d=wrapAndSliceX(c,u);return[].concat(...d.map((c=>this.featuresRtree_.getInExtent(c))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(c,u){const d=c[0],p=c[1];let g=null;const f=[NaN,NaN];let _=1/0;const y=[-1/0,-1/0,1/0,1/0];return u=u||TRUE,this.featuresRtree_.forEachInExtent(y,(function(c){if(u(c)){const u=c.getGeometry(),x=_;if(_=u instanceof RenderFeature?0:u.closestPointXY(d,p,f,_),_<x){g=c;const u=Math.sqrt(_);y[0]=d-u,y[1]=p-u,y[2]=d+u,y[3]=p+u}}})),g}getExtent(c){return this.featuresRtree_.getExtent(c)}getFeatureById(c){const u=this.idIndex_[c.toString()];return void 0!==u?u:null}getFeatureByUid(c){const u=this.uidIndex_[c];return void 0!==u?u:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(c){const u=c.target,d=getUid(u),p=u.getGeometry();if(p){const c=p.getExtent();d in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[d],this.featuresRtree_&&this.featuresRtree_.insert(c,u)):this.featuresRtree_&&this.featuresRtree_.update(c,u)}else d in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(u),this.nullGeometryFeatures_[d]=u);const g=u.getId();if(void 0!==g){const c=g.toString();this.idIndex_[c]!==u&&(this.removeFromIdIndex_(u),this.idIndex_[c]=u)}else this.removeFromIdIndex_(u),this.uidIndex_[d]=u;this.changed(),this.dispatchEvent(new VectorSourceEvent(Js,u))}hasFeature(c){const u=c.getId();return void 0!==u?u in this.idIndex_:getUid(c)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&isEmpty$1(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(c,u,d){const p=this.loadedExtentsRtree_,g=this.strategy_(c,u,d);for(let c=0,f=g.length;c<f;++c){const f=g[c];p.forEachInExtent(f,(function(c){return containsExtent(c.extent,f)}))||(++this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(eo)),this.loader_.call(this,f,u,d,(c=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(io,void 0,c))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new VectorSourceEvent(ro))})),p.insert(f,{extent:f.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(c){const u=this.loadedExtentsRtree_;let d;u.forEachInExtent(c,(function(u){if(equals$1(u.extent,c))return d=u,!0})),d&&u.remove(d)}removeFeatures(c){let u=!1;for(let d=0,p=c.length;d<p;++d)u=this.removeFeatureInternal(c[d])||u;u&&this.changed()}removeFeature(c){if(!c)return;this.removeFeatureInternal(c)&&this.changed()}removeFeatureInternal(c){const u=getUid(c);if(!(u in this.uidIndex_))return!1;u in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[u]:this.featuresRtree_&&this.featuresRtree_.remove(c);const d=this.featureChangeKeys_[u];d?.forEach(unlistenByKey),delete this.featureChangeKeys_[u];const p=c.getId();if(void 0!==p){const u=p.toString(),d=this.idIndex_[u];d===c?delete this.idIndex_[u]:Array.isArray(d)&&(d.splice(d.indexOf(c),1),1===d.length&&(this.idIndex_[u]=d[0]))}return delete this.uidIndex_[u],this.hasListener(to)&&this.dispatchEvent(new VectorSourceEvent(to,c)),!0}removeFromIdIndex_(c){for(const u in this.idIndex_)if(this.idIndex_[u]===c){delete this.idIndex_[u];break}}setLoader(c){this.loader_=c}setUrl(c){assert(this.format_,"`format` must be set when `url` is set"),this.url_=c,this.setLoader(xhr(c,this.format_))}};function line(c,u,d){const p=[];let g=c(0),f=c(1),_=u(g),y=u(f);const x=[f,g],v=[y,_],C=[1,0],M={};let T,L,A,I,k,O,N=1e5;for(;--N>0&&C.length>0;)A=C.pop(),g=x.pop(),_=v.pop(),O=A.toString(),O in M||(p.push(_[0],_[1]),M[O]=!0),I=C.pop(),f=x.pop(),y=v.pop(),k=(A+I)/2,T=c(k),L=u(T),squaredSegmentDistance(L[0],L[1],_[0],_[1],y[0],y[1])<d?(p.push(y[0],y[1]),O=I.toString(),M[O]=!0):(C.push(I,k,k,A),v.push(y,L,L,_),x.push(f,T,T,g));return p}const oo=new Qr({color:"rgba(0,0,0,0.2)"}),ao=[90,45,30,20,10,5,2,1,.5,20/60,10/60,5/60,2/60,1/60,30/3600,20/3600,10/3600,5/3600,2/3600,1/3600];var lo=class Graticule extends Us{constructor(c){c=c||{};const u=Object.assign({updateWhileAnimating:!0,updateWhileInteracting:!0,renderBuffer:0},c);delete u.maxLines,delete u.strokeStyle,delete u.targetSize,delete u.showLabels,delete u.lonLabelFormatter,delete u.latLabelFormatter,delete u.lonLabelPosition,delete u.latLabelPosition,delete u.lonLabelStyle,delete u.latLabelStyle,delete u.intervals,super(u),this.projection_=null,this.maxLat_=1/0,this.maxLon_=1/0,this.minLat_=-1/0,this.minLon_=-1/0,this.maxX_=1/0,this.maxY_=1/0,this.minX_=-1/0,this.minY_=-1/0,this.targetSize_=void 0!==c.targetSize?c.targetSize:100,this.maxLines_=void 0!==c.maxLines?c.maxLines:100,this.meridians_=[],this.parallels_=[],this.strokeStyle_=void 0!==c.strokeStyle?c.strokeStyle:oo,this.fromLonLatTransform_=void 0,this.toLonLatTransform_=void 0,this.projectionCenterLonLat_=null,this.bottomLeft_=null,this.bottomRight_=null,this.topLeft_=null,this.topRight_=null,this.meridiansLabels_=null,this.parallelsLabels_=null,c.showLabels&&(this.lonLabelFormatter_=null==c.lonLabelFormatter?degreesToStringHDMS.bind(this,"EW"):c.lonLabelFormatter,this.latLabelFormatter_=null==c.latLabelFormatter?degreesToStringHDMS.bind(this,"NS"):c.latLabelFormatter,this.lonLabelPosition_=null==c.lonLabelPosition?0:c.lonLabelPosition,this.latLabelPosition_=null==c.latLabelPosition?1:c.latLabelPosition,this.lonLabelStyleBase_=new Mn({text:void 0!==c.lonLabelStyle?c.lonLabelStyle.clone():new Tn({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new Hr({color:"rgba(0,0,0,1)"}),stroke:new Qr({color:"rgba(255,255,255,1)",width:3})})}),this.lonLabelStyle_=c=>{const u=c.get("graticule_label");return this.lonLabelStyleBase_.getText().setText(u),this.lonLabelStyleBase_},this.latLabelStyleBase_=new Mn({text:void 0!==c.latLabelStyle?c.latLabelStyle.clone():new Tn({font:"12px Calibri,sans-serif",textAlign:"right",fill:new Hr({color:"rgba(0,0,0,1)"}),stroke:new Qr({color:"rgba(255,255,255,1)",width:3})})}),this.latLabelStyle_=c=>{const u=c.get("graticule_label");return this.latLabelStyleBase_.getText().setText(u),this.latLabelStyleBase_},this.meridiansLabels_=[],this.parallelsLabels_=[],this.addEventListener(vr,this.drawLabels_.bind(this))),this.intervals_=void 0!==c.intervals?c.intervals:ao,this.setSource(new so({loader:this.loaderFunction.bind(this),strategy:this.strategyFunction.bind(this),features:new Ai,overlaps:!1,useSpatialIndex:!1,wrapX:c.wrapX})),this.featurePool_=[],this.lineStyle_=new Mn({stroke:this.strokeStyle_}),this.loadedExtent_=null,this.renderedExtent_=null,this.renderedResolution_=null,this.setRenderOrder(null)}strategyFunction(c,u){let d=c.slice();return this.projection_&&this.getSource().getWrapX()&&wrapX$2(d,this.projection_),this.loadedExtent_&&(!function approximatelyEquals(c,u,d){return Math.abs(c[0]-u[0])<d&&Math.abs(c[2]-u[2])<d&&Math.abs(c[1]-u[1])<d&&Math.abs(c[3]-u[3])<d}(this.loadedExtent_,d,u)?this.getSource().removeLoadedExtent(this.loadedExtent_):d=this.loadedExtent_.slice()),[d]}loaderFunction(c,u,d){this.loadedExtent_=c;const p=this.getSource(),g=getIntersection(this.getExtent()||[-1/0,-1/0,1/0,1/0],c);if(this.renderedExtent_&&equals$1(this.renderedExtent_,g)&&this.renderedResolution_===u)return;if(this.renderedExtent_=g,this.renderedResolution_=u,isEmpty(g))return;const f=getCenter(g),_=u*u/4;(!this.projection_||!equivalent(this.projection_,d))&&this.updateProjectionInfo_(d),this.createGraticule_(g,f,u,_);let y,x=this.meridians_.length+this.parallels_.length;for(this.meridiansLabels_&&(x+=this.meridians_.length),this.parallelsLabels_&&(x+=this.parallels_.length);x>this.featurePool_.length;)y=new Ii,this.featurePool_.push(y);const v=p.getFeaturesCollection();v.clear();let C,M,T=0;for(C=0,M=this.meridians_.length;C<M;++C)y=this.featurePool_[T++],y.setGeometry(this.meridians_[C]),y.setStyle(this.lineStyle_),v.push(y);for(C=0,M=this.parallels_.length;C<M;++C)y=this.featurePool_[T++],y.setGeometry(this.parallels_[C]),y.setStyle(this.lineStyle_),v.push(y)}addMeridian_(c,u,d,p,g,f){const _=this.getMeridian_(c,u,d,p,f);if(intersects$1(_.getExtent(),g)){if(this.meridiansLabels_){const u=this.lonLabelFormatter_(c);f in this.meridiansLabels_?this.meridiansLabels_[f].text=u:this.meridiansLabels_[f]={geom:new sr([]),text:u}}this.meridians_[f++]=_}return f}addParallel_(c,u,d,p,g,f){const _=this.getParallel_(c,u,d,p,f);if(intersects$1(_.getExtent(),g)){if(this.parallelsLabels_){const u=this.latLabelFormatter_(c);f in this.parallelsLabels_?this.parallelsLabels_[f].text=u:this.parallelsLabels_[f]={geom:new sr([]),text:u}}this.parallels_[f++]=_}return f}drawLabels_(c){const u=c.frameState.viewState.rotation,d=c.frameState.viewState.resolution,p=c.frameState.size,g=c.frameState.extent,f=getCenter(g);let _=g;if(u){const c=p[0]*d,u=p[1]*d;_=[f[0]-c/2,f[1]-u/2,f[0]+c/2,f[1]+u/2]}let y=0,x=0,v=this.latLabelPosition_<.5;const C=this.projection_.getExtent(),M=getWidth(C);if(this.getSource().getWrapX()&&this.projection_.canWrapX()&&!containsExtent(C,g)){y=Math.floor((g[0]-C[0])/M),x=Math.ceil((g[2]-C[2])/M);v=v!==Math.abs(u)>Math.PI/2}const T=function getVectorContext(c){if(!(c.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const u=c.inversePixelTransform[0],d=c.inversePixelTransform[1],p=Math.sqrt(u*u+d*d),g=c.frameState,f=multiply(c.inversePixelTransform.slice(),g.coordinateToPixelTransform),_=getSquaredTolerance(g.viewState.resolution,p);let y;const x=getUserProjection();return x&&(y=getTransformFromProjections(x,g.viewState.projection)),new CanvasImmediateRenderer(c.context,p,g.extent,f,g.viewState.rotation,_,y)}(c);for(let c=y;c<=x;++c){let d,p,C,L,A=this.meridians_.length+this.parallels_.length;if(this.meridiansLabels_)for(p=0,C=this.meridiansLabels_.length;p<C;++p){const y=this.meridians_[p];if(u||0!==c){const d=y.clone();d.translate(c*M,0),d.rotate(-u,f),L=this.getMeridianPoint_(d,_,p),L.rotate(u,f)}else L=this.getMeridianPoint_(y,g,p);d=this.featurePool_[A++],d.setGeometry(L),d.set("graticule_label",this.meridiansLabels_[p].text),T.drawFeature(d,this.lonLabelStyle_(d))}if(this.parallelsLabels_&&(c===y&&v||c===x&&!v))for(p=0,C=this.parallels_.length;p<C;++p){const y=this.parallels_[p];if(u||0!==c){const d=y.clone();d.translate(c*M,0),d.rotate(-u,f),L=this.getParallelPoint_(d,_,p),L.rotate(u,f)}else L=this.getParallelPoint_(y,g,p);d=this.featurePool_[A++],d.setGeometry(L),d.set("graticule_label",this.parallelsLabels_[p].text),T.drawFeature(d,this.latLabelStyle_(d))}}}createGraticule_(c,u,d,p){const g=this.getInterval_(d);if(-1==g)return this.meridians_.length=0,this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));let f=!1;const _=this.projection_.getExtent(),y=getWidth(_);this.getSource().getWrapX()&&this.projection_.canWrapX()&&!containsExtent(_,c)&&(getWidth(c)>=y?(c[0]=_[0],c[2]=_[2]):f=!0);const x=[clamp(u[0],this.minX_,this.maxX_),clamp(u[1],this.minY_,this.maxY_)],v=this.toLonLatTransform_(x);isNaN(v[1])&&(v[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_);let C=clamp(v[0],this.minLon_,this.maxLon_),M=clamp(v[1],this.minLat_,this.maxLat_);const T=this.maxLines_;let L,A,I,k,O=c;f||(O=[clamp(c[0],this.minX_,this.maxX_),clamp(c[1],this.minY_,this.maxY_),clamp(c[2],this.minX_,this.maxX_),clamp(c[3],this.minY_,this.maxY_)]);const N=applyTransform(O,this.toLonLatTransform_,void 0,8);let G=N[3],j=N[2],B=N[1],V=N[0];if(f||(containsCoordinate(O,this.bottomLeft_)&&(V=this.minLon_,B=this.minLat_),containsCoordinate(O,this.bottomRight_)&&(j=this.maxLon_,B=this.minLat_),containsCoordinate(O,this.topLeft_)&&(V=this.minLon_,G=this.maxLat_),containsCoordinate(O,this.topRight_)&&(j=this.maxLon_,G=this.maxLat_),G=clamp(G,M,this.maxLat_),j=clamp(j,C,this.maxLon_),B=clamp(B,this.minLat_,M),V=clamp(V,this.minLon_,C)),C=Math.floor(C/g)*g,k=clamp(C,this.minLon_,this.maxLon_),A=this.addMeridian_(k,B,G,p,c,0),L=0,f)for(;(k-=g)>=V&&L++<T;)A=this.addMeridian_(k,B,G,p,c,A);else for(;k!=this.minLon_&&L++<T;)k=Math.max(k-g,this.minLon_),A=this.addMeridian_(k,B,G,p,c,A);if(k=clamp(C,this.minLon_,this.maxLon_),L=0,f)for(;(k+=g)<=j&&L++<T;)A=this.addMeridian_(k,B,G,p,c,A);else for(;k!=this.maxLon_&&L++<T;)k=Math.min(k+g,this.maxLon_),A=this.addMeridian_(k,B,G,p,c,A);for(this.meridians_.length=A,this.meridiansLabels_&&(this.meridiansLabels_.length=A),M=Math.floor(M/g)*g,I=clamp(M,this.minLat_,this.maxLat_),A=this.addParallel_(I,V,j,p,c,0),L=0;I!=this.minLat_&&L++<T;)I=Math.max(I-g,this.minLat_),A=this.addParallel_(I,V,j,p,c,A);for(I=clamp(M,this.minLat_,this.maxLat_),L=0;I!=this.maxLat_&&L++<T;)I=Math.min(I+g,this.maxLat_),A=this.addParallel_(I,V,j,p,c,A);this.parallels_.length=A,this.parallelsLabels_&&(this.parallelsLabels_.length=A)}getInterval_(c){const u=this.projectionCenterLonLat_[0],d=this.projectionCenterLonLat_[1];let p=-1;const g=Math.pow(this.targetSize_*c,2),f=[],_=[];for(let c=0,y=this.intervals_.length;c<y;++c){const y=clamp(this.intervals_[c]/2,0,90),x=clamp(d,-90+y,90-y);f[0]=u-y,f[1]=x-y,_[0]=u+y,_[1]=x+y,this.fromLonLatTransform_(f,f),this.fromLonLatTransform_(_,_);if(Math.pow(_[0]-f[0],2)+Math.pow(_[1]-f[1],2)<=g)break;p=this.intervals_[c]}return p}getMeridian_(c,u,d,p,g){const f=function meridian(c,u,d,p,g){return line((function(p){return[c,u+(d-u)*p]}),getTransform(get$2("EPSG:4326"),p),g)}(c,u,d,this.projection_,p);let _=this.meridians_[g];return _?(_.setFlatCoordinates("XY",f),_.changed()):(_=new Jr(f,"XY"),this.meridians_[g]=_),_}getMeridianPoint_(c,u,d){const p=c.getFlatCoordinates();let g=1,f=p.length-1;p[g]>p[f]&&(g=f,f=1);const _=Math.max(u[1],p[g]),y=Math.min(u[3],p[f]),x=clamp(u[1]+Math.abs(u[1]-u[3])*this.lonLabelPosition_,_,y),v=[p[g-1]+(p[f-1]-p[g-1])*(x-p[g])/(p[f]-p[g]),x],C=this.meridiansLabels_[d].geom;return C.setCoordinates(v),C}getMeridians(){return this.meridians_}getParallel_(c,u,d,p,g){const f=function parallel(c,u,d,p,g){return line((function(p){return[u+(d-u)*p,c]}),getTransform(get$2("EPSG:4326"),p),g)}(c,u,d,this.projection_,p);let _=this.parallels_[g];return _?(_.setFlatCoordinates("XY",f),_.changed()):_=new Jr(f,"XY"),_}getParallelPoint_(c,u,d){const p=c.getFlatCoordinates();let g=0,f=p.length-2;p[g]>p[f]&&(g=f,f=0);const _=Math.max(u[0],p[g]),y=Math.min(u[2],p[f]),x=clamp(u[0]+Math.abs(u[0]-u[2])*this.latLabelPosition_,_,y),v=[x,p[g+1]+(p[f+1]-p[g+1])*(x-p[g])/(p[f]-p[g])],C=this.parallelsLabels_[d].geom;return C.setCoordinates(v),C}getParallels(){return this.parallels_}updateProjectionInfo_(c){const u=get$2("EPSG:4326"),d=c.getWorldExtent();this.maxLat_=d[3],this.maxLon_=d[2],this.minLat_=d[1],this.minLon_=d[0];const p=getTransform(c,u);if(this.minLon_<this.maxLon_)this.toLonLatTransform_=p;else{const c=this.minLon_+this.maxLon_/2;this.maxLon_+=360,this.toLonLatTransform_=function(u,d,g){const f=p(u,d,g=g||2);for(let u=0,d=f.length;u<d;u+=g)f[u]<c&&(f[u]+=360);return f}}this.fromLonLatTransform_=getTransform(u,c);const g=applyTransform([this.minLon_,this.minLat_,this.maxLon_,this.maxLat_],this.fromLonLatTransform_,void 0,8);this.minX_=g[0],this.maxX_=g[2],this.minY_=g[1],this.maxY_=g[3],this.bottomLeft_=this.fromLonLatTransform_([this.minLon_,this.minLat_]),this.bottomRight_=this.fromLonLatTransform_([this.maxLon_,this.minLat_]),this.topLeft_=this.fromLonLatTransform_([this.minLon_,this.maxLat_]),this.topRight_=this.fromLonLatTransform_([this.maxLon_,this.maxLat_]),this.projectionCenterLonLat_=this.toLonLatTransform_(getCenter(c.getExtent())),isNaN(this.projectionCenterLonLat_[1])&&(this.projectionCenterLonLat_[1]=Math.abs(this.maxLat_)>=Math.abs(this.minLat_)?this.maxLat_:this.minLat_),this.projection_=c}};var ho=class ImageCanvas extends qr{constructor(c,u,d,p,g){super(c,u,d,void 0!==g?Er.IDLE:Er.LOADED),this.loader_=void 0!==g?g:null,this.canvas_=p,this.error_=null}getError(){return this.error_}handleLoad_(c){c?(this.error_=c,this.state=Er.ERROR):this.state=Er.LOADED,this.changed()}load(){this.state==Er.IDLE&&(this.state=Er.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))}getImage(){return this.canvas_}},co=0,uo=1,po=2,go=3,mo=4;var fo=class Tile extends Target{constructor(c,u,d){super(),d=d||{},this.tileCoord=c,this.state=u,this.key="",this.transition_=void 0===d.transition?250:d.transition,this.transitionStarts_={},this.interpolate=!!d.interpolate}changed(){this.dispatchEvent(mi)}release(){this.state===go&&this.setState(mo)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(c){if(this.state!==go&&this.state>c)throw new Error("Tile load sequence violation");this.state=c,this.changed()}load(){abstract()}getAlpha(c,u){if(!this.transition_)return 1;let d=this.transitionStarts_[c];if(d){if(-1===d)return 1}else d=u,this.transitionStarts_[c]=d;const p=u-d+1e3/60;return p>=this.transition_?1:easeIn(p/this.transition_)}inTransition(c){return!!this.transition_&&-1!==this.transitionStarts_[c]}endTransition(c){this.transition_&&(this.transitionStarts_[c]=-1)}};var _o=class ImageTile extends fo{constructor(c,u,d,p,g,f){super(c,u,f),this.crossOrigin_=p,this.src_=d,this.key=d,this.image_=new Image,null!==p&&(this.image_.crossOrigin=p),this.unlisten_=null,this.tileLoadFunction_=g}getImage(){return this.image_}setImage(c){this.image_=c,this.state=po,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=go,this.unlistenImage_(),this.image_=function getBlankImage(){const c=createCanvasContext2D(1,1);return c.fillStyle="rgba(0,0,0,0)",c.fillRect(0,0,1,1),c.canvas}(),this.changed()}handleImageLoad_(){const c=this.image_;c.naturalWidth&&c.naturalHeight?this.state=po:this.state=mo,this.unlistenImage_(),this.changed()}load(){this.state==go&&(this.state=co,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==co&&(this.state=uo,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=function listenImage(c,u,d){const p=c;let g=!0,f=!1,_=!1;const y=[listenOnce(p,wi,(function(){_=!0,f||u()}))];return p.src&&$r?(f=!0,p.decode().then((function(){g&&u()})).catch((function(c){g&&(_?u():d())}))):y.push(listenOnce(p,fi,d)),function unlisten(){g=!1,y.forEach(unlistenByKey)}}(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}};var yo=class Kinetic{constructor(c,u,d){this.decay_=c,this.minVelocity_=u,this.delay_=d,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(c,u){this.points_.push(c,u,Date.now())}end(){if(this.points_.length<6)return!1;const c=Date.now()-this.delay_,u=this.points_.length-3;if(this.points_[u+2]<c)return!1;let d=u-3;for(;d>0&&this.points_[d+2]>c;)d-=3;const p=this.points_[u+2]-this.points_[d+2];if(p<1e3/60)return!1;const g=this.points_[u]-this.points_[d],f=this.points_[u+1]-this.points_[d+1];return this.angle_=Math.atan2(f,g),this.initialVelocity_=Math.sqrt(g*g+f*f)/p,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}};class MapRenderer extends gi{constructor(c){super(),this.map_=c}dispatchRenderEvent(c,u){abstract()}calculateMatrices2D(c){const u=c.viewState,d=c.coordinateToPixelTransform,p=c.pixelToCoordinateTransform;compose(d,c.size[0]/2,c.size[1]/2,1/u.resolution,-1/u.resolution,-u.rotation,-u.center[0],-u.center[1]),makeInverse(p,d)}forEachFeatureAtCoordinate(c,u,d,p,g,f,_,y){let x;const v=u.viewState;function forEachFeatureAtCoordinate(c,u,d,p){return g.call(f,u,c?d:null,p)}const C=v.projection,M=wrapX$1(c.slice(),C),T=[[0,0]];if(C.canWrapX()&&p){const c=getWidth(C.getExtent());T.push([-c,0],[c,0])}const L=u.layerStatesArray,A=L.length,I=[],k=[];for(let p=0;p<T.length;p++)for(let g=A-1;g>=0;--g){const f=L[g],C=f.layer;if(C.hasRenderer()&&inView(f,v)&&_.call(y,C)){const g=C.getRenderer(),_=C.getSource();if(g&&_){const y=_.getWrapX()?M:c,v=forEachFeatureAtCoordinate.bind(null,f.managed);k[0]=y[0]+T[p][0],k[1]=y[1]+T[p][1],x=g.forEachFeatureAtCoordinate(k,u,d,v,I)}if(x)return x}}if(0===I.length)return;const O=1/I.length;return I.forEach(((c,u)=>c.distanceSq+=u*O)),I.sort(((c,u)=>c.distanceSq-u.distanceSq)),I.some((c=>x=c.callback(c.feature,c.layer,c.geometry))),x}hasFeatureAtCoordinate(c,u,d,p,g,f){return void 0!==this.forEachFeatureAtCoordinate(c,u,d,p,TRUE,this,g,f)}getMap(){return this.map_}renderFrame(c){abstract()}scheduleExpireIconCache(c){Yr.canExpireCache()&&c.postRenderFunctions.push(expireIconCache)}}function expireIconCache(c,u){Yr.expire()}class CompositeMapRenderer extends MapRenderer{constructor(c){super(c),this.fontChangeListenerKey_=listen(yn,pi,c.redrawText.bind(c)),this.element_=document.createElement("div");const u=this.element_.style;u.position="absolute",u.width="100%",u.height="100%",u.zIndex="0",this.element_.className=rn+" ol-layers";const d=c.getViewport();d.insertBefore(this.element_,d.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(c,u){const d=this.getMap();if(d.hasListener(c)){const p=new RenderEvent(c,void 0,u);d.dispatchEvent(p)}}disposeInternal(){unlistenByKey(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(c){if(!c)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(c),this.dispatchRenderEvent(Sr,c);const u=c.layerStatesArray.sort(((c,u)=>c.zIndex-u.zIndex));u.some((c=>c.layer instanceof BaseVectorLayer&&c.layer.getDeclutter()))&&(c.declutter={});const d=c.viewState;this.children_.length=0;const p=[];let g=null;for(let f=0,_=u.length;f<_;++f){const _=u[f];c.layerIndex=f;const y=_.layer,x=y.getSourceState();if(!inView(_,d)||"ready"!=x&&"undefined"!=x){y.unrender();continue}const v=y.render(c,g);v&&(v!==g&&(this.children_.push(v),g=v),p.push(_))}this.declutter(c,p),function replaceChildren(c,u){const d=c.childNodes;for(let p=0;;++p){const g=d[p],f=u[p];if(!g&&!f)break;g!==f&&(g?f?c.insertBefore(f,g):(c.removeChild(g),--p):c.appendChild(f))}}(this.element_,this.children_),this.dispatchRenderEvent(wr,c),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(c)}declutter(c,u){if(c.declutter){for(let d=u.length-1;d>=0;--d){const p=u[d],g=p.layer;g.getDeclutter()&&g.renderDeclutter(c,p)}u.forEach((u=>u.layer.renderDeferred(c)))}}}class GroupEvent extends BaseEvent{constructor(c,u){super(c),this.layer=u}}const xo="layers";class LayerGroup extends BaseLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.layers;let d=c.layers;super(u),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(xo,this.handleLayersChanged_),d?Array.isArray(d)?d=new Ai(d.slice(),{unique:!0}):assert("function"==typeof d.getArray,"Expected `layers` to be an array or a `Collection`"):d=new Ai(void 0,{unique:!0}),this.setLayers(d)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(unlistenByKey),this.layersListenerKeys_.length=0;const c=this.getLayers();this.layersListenerKeys_.push(listen(c,Ti,this.handleLayersAdd_,this),listen(c,Ri,this.handleLayersRemove_,this));for(const c in this.listenerKeys_)this.listenerKeys_[c].forEach(unlistenByKey);clear$2(this.listenerKeys_);const u=c.getArray();for(let c=0,d=u.length;c<d;c++){const d=u[c];this.registerLayerListeners_(d),this.dispatchEvent(new GroupEvent("addlayer",d))}this.changed()}registerLayerListeners_(c){const u=[listen(c,pi,this.handleLayerChange_,this),listen(c,mi,this.handleLayerChange_,this)];c instanceof LayerGroup&&u.push(listen(c,"addlayer",this.handleLayerGroupAdd_,this),listen(c,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[getUid(c)]=u}handleLayerGroupAdd_(c){this.dispatchEvent(new GroupEvent("addlayer",c.layer))}handleLayerGroupRemove_(c){this.dispatchEvent(new GroupEvent("removelayer",c.layer))}handleLayersAdd_(c){const u=c.element;this.registerLayerListeners_(u),this.dispatchEvent(new GroupEvent("addlayer",u)),this.changed()}handleLayersRemove_(c){const u=c.element,d=getUid(u);this.listenerKeys_[d].forEach(unlistenByKey),delete this.listenerKeys_[d],this.dispatchEvent(new GroupEvent("removelayer",u)),this.changed()}getLayers(){return this.get(xo)}setLayers(c){const u=this.getLayers();if(u){const c=u.getArray();for(let u=0,d=c.length;u<d;++u)this.dispatchEvent(new GroupEvent("removelayer",c[u]))}this.set(xo,c)}getLayersArray(c){return c=void 0!==c?c:[],this.getLayers().forEach((function(u){u.getLayersArray(c)})),c}getLayerStatesArray(c){const u=void 0!==c?c:[],d=u.length;this.getLayers().forEach((function(c){c.getLayerStatesArray(u)}));const p=this.getLayerState();let g=p.zIndex;c||void 0!==p.zIndex||(g=0);for(let c=d,f=u.length;c<f;c++){const d=u[c];d.opacity*=p.opacity,d.visible=d.visible&&p.visible,d.maxResolution=Math.min(d.maxResolution,p.maxResolution),d.minResolution=Math.max(d.minResolution,p.minResolution),d.minZoom=Math.max(d.minZoom,p.minZoom),d.maxZoom=Math.min(d.maxZoom,p.maxZoom),void 0!==p.extent&&(void 0!==d.extent?d.extent=getIntersection(d.extent,p.extent):d.extent=p.extent),void 0===d.zIndex&&(d.zIndex=g)}return u}getSourceState(){return"ready"}}var vo=LayerGroup;var So=class MapEvent extends BaseEvent{constructor(c,u,d){super(c),this.map=u,this.frameState=void 0!==d?d:null}};var wo=class MapBrowserEvent extends So{constructor(c,u,d,p,g,f){super(c,u,g),this.originalEvent=d,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==p&&p,this.activePointers=f}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(c){this.pixel_=c}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(c){this.coordinate_=c}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},Co={SINGLECLICK:"singleclick",CLICK:yi,DBLCLICK:xi,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Eo="pointermove",Po="pointerdown",bo="pointerup",Mo="pointerout";var To=class MapBrowserEventHandler extends Target{constructor(c,u){super(c),this.map_=c,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===u?1:u,this.down_=null;const d=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=d,this.pointerdownListenerKey_=listen(d,Po,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=listen(d,Eo,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(Ci,this.boundHandleTouchMove_,!!Xr&&{passive:!1})}emulateClick_(c){let u=new wo(Co.CLICK,this.map_,c);this.dispatchEvent(u),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,u=new wo(Co.DBLCLICK,this.map_,c),this.dispatchEvent(u)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const u=new wo(Co.SINGLECLICK,this.map_,c);this.dispatchEvent(u)}),250)}updateActivePointers_(c){const u=c,d=u.pointerId;if(u.type==Co.POINTERUP||u.type==Co.POINTERCANCEL){delete this.trackedTouches_[d];for(const c in this.trackedTouches_)if(this.trackedTouches_[c].target!==u.target){delete this.trackedTouches_[c];break}}else u.type!=Co.POINTERDOWN&&u.type!=Co.POINTERMOVE||(this.trackedTouches_[d]=u);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(c){this.updateActivePointers_(c);const u=new wo(Co.POINTERUP,this.map_,c,void 0,void 0,this.activePointers_);this.dispatchEvent(u),this.emulateClicks_&&!u.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(c)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(c){return 0===c.button}handlePointerDown_(c){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(c);const u=new wo(Co.POINTERDOWN,this.map_,c,void 0,void 0,this.activePointers_);if(this.dispatchEvent(u),this.down_=new PointerEvent(c.type,c),Object.defineProperty(this.down_,"target",{writable:!1,value:c.target}),0===this.dragListenerKeys_.length){const c=this.map_.getOwnerDocument();this.dragListenerKeys_.push(listen(c,Co.POINTERMOVE,this.handlePointerMove_,this),listen(c,Co.POINTERUP,this.handlePointerUp_,this),listen(this.element_,Co.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==c&&this.dragListenerKeys_.push(listen(this.element_.getRootNode(),Co.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(c){if(this.isMoving_(c)){this.updateActivePointers_(c),this.dragging_=!0;const u=new wo(Co.POINTERDRAG,this.map_,c,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(u)}}relayMoveEvent_(c){this.originalPointerMoveEvent_=c;const u=!(!this.down_||!this.isMoving_(c));this.dispatchEvent(new wo(Co.POINTERMOVE,this.map_,c,u))}handleTouchMove_(c){const u=this.originalPointerMoveEvent_;u&&!u.defaultPrevented||"boolean"==typeof c.cancelable&&!0!==c.cancelable||c.preventDefault()}isMoving_(c){return this.dragging_||Math.abs(c.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(c.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(unlistenByKey(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Ci,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(unlistenByKey(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},Ro="postrender",Lo="movestart",Ao="moveend",Io="loadstart",Fo="loadend",ko="layergroup",Oo="size",No="target",Do="view";const Go=1/0;class PriorityQueue{constructor(c,u){this.priorityFunction_=c,this.keyFunction_=u,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,clear$2(this.queuedElements_)}dequeue(){const c=this.elements_,u=this.priorities_,d=c[0];1==c.length?(c.length=0,u.length=0):(c[0]=c.pop(),u[0]=u.pop(),this.siftUp_(0));const p=this.keyFunction_(d);return delete this.queuedElements_[p],d}enqueue(c){assert(!(this.keyFunction_(c)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const u=this.priorityFunction_(c);return u!=Go&&(this.elements_.push(c),this.priorities_.push(u),this.queuedElements_[this.keyFunction_(c)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(c){return 2*c+1}getRightChildIndex_(c){return 2*c+2}getParentIndex_(c){return c-1>>1}heapify_(){let c;for(c=(this.elements_.length>>1)-1;c>=0;c--)this.siftUp_(c)}isEmpty(){return 0===this.elements_.length}isKeyQueued(c){return c in this.queuedElements_}isQueued(c){return this.isKeyQueued(this.keyFunction_(c))}siftUp_(c){const u=this.elements_,d=this.priorities_,p=u.length,g=u[c],f=d[c],_=c;for(;c<p>>1;){const g=this.getLeftChildIndex_(c),f=this.getRightChildIndex_(c),_=f<p&&d[f]<d[g]?f:g;u[c]=u[_],d[c]=d[_],c=_}u[c]=g,d[c]=f,this.siftDown_(_,c)}siftDown_(c,u){const d=this.elements_,p=this.priorities_,g=d[u],f=p[u];for(;u>c;){const c=this.getParentIndex_(u);if(!(p[c]>f))break;d[u]=d[c],p[u]=p[c],u=c}d[u]=g,p[u]=f}reprioritize(){const c=this.priorityFunction_,u=this.elements_,d=this.priorities_;let p=0;const g=u.length;let f,_,y;for(_=0;_<g;++_)f=u[_],y=c(f),y==Go?delete this.queuedElements_[this.keyFunction_(f)]:(d[p]=y,u[p++]=f);u.length=p,d.length=p,this.heapify_()}}var jo=class TileQueue extends PriorityQueue{constructor(c,u){super((function(u){return c.apply(null,u)}),(function(c){return c[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=u,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(c){const u=super.enqueue(c);if(u){c[0].addEventListener(mi,this.boundHandleTileChange_)}return u}getTilesLoading(){return this.tilesLoading_}handleTileChange(c){const u=c.target,d=u.getState();if(d===po||d===go||d===mo){d!==go&&u.removeEventListener(mi,this.boundHandleTileChange_);const c=u.getKey();c in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[c],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(c,u){let d=0;for(;this.tilesLoading_<c&&d<u&&this.getCount()>0;){const c=this.dequeue()[0],u=c.getKey();c.getState()!==co||u in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[u]=!0,++this.tilesLoading_,++d,c.load())}}};var zo=class Control extends Mi{constructor(c){super();const u=c.element;!u||c.target||u.style.pointerEvents||(u.style.pointerEvents="auto"),this.element=u||null,this.target_=null,this.map_=null,this.listenerKeys=[],c.render&&(this.render=c.render),c.target&&this.setTarget(c.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(c){this.map_&&this.element?.remove();for(let c=0,u=this.listenerKeys.length;c<u;++c)unlistenByKey(this.listenerKeys[c]);if(this.listenerKeys.length=0,this.map_=c,c){(this.target_??c.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==VOID&&this.listenerKeys.push(listen(c,Ro,this.render,this)),c.render()}}render(c){}setTarget(c){this.target_="string"==typeof c?document.getElementById(c):c}};var Bo=class Attribution extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===c.collapsed||c.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==c.collapsible,this.collapsible_=void 0===c.collapsible||c.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=c.attributions;const u=void 0!==c.className?c.className:"ol-attribution",d=void 0!==c.tipLabel?c.tipLabel:"Attributions",p=void 0!==c.expandClassName?c.expandClassName:u+"-expand",g=void 0!==c.collapseLabel?c.collapseLabel:"›",f=void 0!==c.collapseClassName?c.collapseClassName:u+"-collapse";"string"==typeof g?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=g,this.collapseLabel_.className=f):this.collapseLabel_=g;const _=void 0!==c.label?c.label:"i";"string"==typeof _?(this.label_=document.createElement("span"),this.label_.textContent=_,this.label_.className=p):this.label_=_;const y=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=d,this.toggleButton_.appendChild(y),this.toggleButton_.addEventListener(yi,this.handleClick_.bind(this),!1);const x=u+" "+rn+" "+sn+(this.collapsed_&&this.collapsible_?" "+on:"")+(this.collapsible_?"":" ol-uncollapsible"),v=this.element;v.className=x,v.appendChild(this.toggleButton_),v.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(c){const u=this.getMap().getAllLayers(),d=new Set(u.flatMap((u=>u.getAttributions(c))));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach((c=>d.add(c))):d.add(this.attributions_)),!this.overrideCollapsible_){const c=!u.some((c=>!1===c.getSource()?.getAttributionsCollapsible()));this.setCollapsible(c)}return Array.from(d)}async updateElement_(c){if(!c)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const u=await Promise.all(this.collectSourceAttributions_(c).map((c=>toPromise((()=>c))))),d=u.length>0;if(this.renderedVisible_!=d&&(this.element.style.display=d?"":"none",this.renderedVisible_=d),!equals$2(u,this.renderedAttributions_)){removeChildren(this.ulElement_);for(let c=0,d=u.length;c<d;++c){const d=document.createElement("li");d.innerHTML=u[c],this.ulElement_.appendChild(d)}this.renderedAttributions_=u}}handleClick_(c){c.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(on),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(c){this.collapsible_!==c&&(this.collapsible_=c,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(c){this.userCollapsed_=c,this.collapsible_&&this.collapsed_!==c&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(c){this.updateElement_(c.frameState)}};var Uo=class Rotate extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target});const u=void 0!==c.className?c.className:"ol-rotate",d=void 0!==c.label?c.label:"⇧",p=void 0!==c.compassClassName?c.compassClassName:"ol-compass";this.label_=null,"string"==typeof d?(this.label_=document.createElement("span"),this.label_.className=p,this.label_.textContent=d):(this.label_=d,this.label_.classList.add(p));const g=c.tipLabel?c.tipLabel:"Reset rotation",f=document.createElement("button");f.className=u+"-reset",f.setAttribute("type","button"),f.title=g,f.appendChild(this.label_),f.addEventListener(yi,this.handleClick_.bind(this),!1);const _=u+" "+rn+" "+sn,y=this.element;y.className=_,y.appendChild(f),this.callResetNorth_=c.resetNorth?c.resetNorth:void 0,this.duration_=void 0!==c.duration?c.duration:250,this.autoHide_=void 0===c.autoHide||c.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(en)}handleClick_(c){c.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const c=this.getMap().getView();if(!c)return;const u=c.getRotation();void 0!==u&&(this.duration_>0&&u%(2*Math.PI)!=0?c.animate({rotation:0,duration:this.duration_,easing:easeOut}):c.setRotation(0))}render(c){const u=c.frameState;if(!u)return;const d=u.viewState.rotation;if(d!=this.rotation_){const c="rotate("+d+"rad)";if(this.autoHide_){const c=this.element.classList.contains(en);c||0!==d?c&&0!==d&&this.element.classList.remove(en):this.element.classList.add(en)}this.label_.style.transform=c}this.rotation_=d}};var $o=class Zoom extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target});const u=void 0!==c.className?c.className:"ol-zoom",d=void 0!==c.delta?c.delta:1,p=void 0!==c.zoomInClassName?c.zoomInClassName:u+"-in",g=void 0!==c.zoomOutClassName?c.zoomOutClassName:u+"-out",f=void 0!==c.zoomInLabel?c.zoomInLabel:"+",_=void 0!==c.zoomOutLabel?c.zoomOutLabel:"–",y=void 0!==c.zoomInTipLabel?c.zoomInTipLabel:"Zoom in",x=void 0!==c.zoomOutTipLabel?c.zoomOutTipLabel:"Zoom out",v=document.createElement("button");v.className=p,v.setAttribute("type","button"),v.title=y,v.appendChild("string"==typeof f?document.createTextNode(f):f),v.addEventListener(yi,this.handleClick_.bind(this,d),!1);const C=document.createElement("button");C.className=g,C.setAttribute("type","button"),C.title=x,C.appendChild("string"==typeof _?document.createTextNode(_):_),C.addEventListener(yi,this.handleClick_.bind(this,-d),!1);const M=u+" "+rn+" "+sn,T=this.element;T.className=M,T.appendChild(v),T.appendChild(C),this.duration_=void 0!==c.duration?c.duration:250}handleClick_(c,u){u.preventDefault(),this.zoomByDelta_(c)}zoomByDelta_(c){const u=this.getMap().getView();if(!u)return;const d=u.getZoom();if(void 0!==d){const p=u.getConstrainedZoom(d+c);this.duration_>0?(u.getAnimating()&&u.cancelAnimations(),u.animate({zoom:p,duration:this.duration_,easing:easeOut})):u.setZoom(p)}}};function defaults$1(c){c=c||{};const u=new Ai;(void 0===c.zoom||c.zoom)&&u.push(new $o(c.zoomOptions));(void 0===c.rotate||c.rotate)&&u.push(new Uo(c.rotateOptions));return(void 0===c.attribution||c.attribution)&&u.push(new Bo(c.attributionOptions)),u}var Wo="active";class Interaction extends Mi{constructor(c){super(),this.on,this.once,this.un,c&&c.handleEvent&&(this.handleEvent=c.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Wo)}getMap(){return this.map_}handleEvent(c){return!0}setActive(c){this.set(Wo,c)}setMap(c){this.map_=c}}function zoomByDelta(c,u,d,p){const g=c.getZoom();if(void 0===g)return;const f=c.getConstrainedZoom(g+u),_=c.getResolutionForZoom(f);c.getAnimating()&&c.cancelAnimations(),c.animate({resolution:_,anchor:d,duration:void 0!==p?p:250,easing:easeOut})}class DoubleClickZoom extends Interaction{constructor(c){super(),c=c||{},this.delta_=c.delta?c.delta:1,this.duration_=void 0!==c.duration?c.duration:250}handleEvent(c){let u=!1;if(c.type==Co.DBLCLICK){const d=c.originalEvent,p=c.map,g=c.coordinate,f=d.shiftKey?-this.delta_:this.delta_;zoomByDelta(p.getView(),f,g,this.duration_),d.preventDefault(),u=!0}return!u}}class PointerInteraction extends Interaction{constructor(c){super(c=c||{}),c.handleDownEvent&&(this.handleDownEvent=c.handleDownEvent),c.handleDragEvent&&(this.handleDragEvent=c.handleDragEvent),c.handleMoveEvent&&(this.handleMoveEvent=c.handleMoveEvent),c.handleUpEvent&&(this.handleUpEvent=c.handleUpEvent),c.stopDown&&(this.stopDown=c.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(c){return!1}handleDragEvent(c){}handleEvent(c){if(!c.originalEvent)return!0;let u=!1;if(this.updateTrackedPointers_(c),this.handlingDownUpSequence){if(c.type==Co.POINTERDRAG)this.handleDragEvent(c),c.originalEvent.preventDefault();else if(c.type==Co.POINTERUP){const u=this.handleUpEvent(c);this.handlingDownUpSequence=u&&this.targetPointers.length>0}}else if(c.type==Co.POINTERDOWN){const d=this.handleDownEvent(c);this.handlingDownUpSequence=d,u=this.stopDown(d)}else c.type==Co.POINTERMOVE&&this.handleMoveEvent(c);return!u}handleMoveEvent(c){}handleUpEvent(c){return!1}stopDown(c){return c}updateTrackedPointers_(c){c.activePointers&&(this.targetPointers=c.activePointers)}}function centroid(c){const u=c.length;let d=0,p=0;for(let g=0;g<u;g++)d+=c[g].clientX,p+=c[g].clientY;return{clientX:d/u,clientY:p/u}}function all(c){const u=arguments;return function(c){let d=!0;for(let p=0,g=u.length;p<g&&(d=d&&u[p](c),d);++p);return d}}const altShiftKeysOnly=function(c){const u=c.originalEvent;return u.altKey&&!(u.metaKey||u.ctrlKey)&&u.shiftKey},focusWithTabindex=function(c){const u=c.map.getTargetElement(),d=u.getRootNode();return!(d instanceof ShadowRoot?d.host:u).hasAttribute("tabindex")||function(c){const u=c.map.getTargetElement(),d=u.getRootNode(),p=c.map.getOwnerDocument().activeElement;return d instanceof ShadowRoot?d.host.contains(p):u.contains(p)}(c)},Xo=TRUE,mouseActionButton=function(c){const u=c.originalEvent;return 0==u.button&&!(jr&&zr&&u.ctrlKey)},noModifierKeys=function(c){const u=c.originalEvent;return!u.altKey&&!(u.metaKey||u.ctrlKey)&&!u.shiftKey},shiftKeyOnly=function(c){const u=c.originalEvent;return!u.altKey&&!(u.metaKey||u.ctrlKey)&&u.shiftKey},targetNotEditable=function(c){const u=c.originalEvent,d=u.target.tagName;return"INPUT"!==d&&"SELECT"!==d&&"TEXTAREA"!==d&&!u.target.isContentEditable},mouseOnly=function(c){const u=c.originalEvent;return assert(void 0!==u,"mapBrowserEvent must originate from a pointer event"),"mouse"==u.pointerType},primaryAction=function(c){const u=c.originalEvent;return assert(void 0!==u,"mapBrowserEvent must originate from a pointer event"),u.isPrimary&&0===u.button};class DragPan extends PointerInteraction{constructor(c){super({stopDown:FALSE}),c=c||{},this.kinetic_=c.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const u=c.condition?c.condition:all(noModifierKeys,primaryAction);this.condition_=c.onFocusOnly?all(focusWithTabindex,u):u,this.noKinetic_=!1}handleDragEvent(c){const u=c.map;this.panning_||(this.panning_=!0,u.getView().beginInteraction());const d=this.targetPointers,p=u.getEventPixel(centroid(d));if(d.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(p[0],p[1]),this.lastCentroid){const u=[this.lastCentroid[0]-p[0],p[1]-this.lastCentroid[1]],d=c.map.getView();scale$2(u,d.getResolution()),rotate$1(u,d.getRotation()),d.adjustCenterInternal(u)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=p,this.lastPointersCount_=d.length,c.originalEvent.preventDefault()}handleUpEvent(c){const u=c.map,d=u.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const c=this.kinetic_.getDistance(),p=this.kinetic_.getAngle(),g=d.getCenterInternal(),f=u.getPixelFromCoordinateInternal(g),_=u.getCoordinateFromPixelInternal([f[0]-c*Math.cos(p),f[1]-c*Math.sin(p)]);d.animateInternal({center:d.getConstrainedCenter(_),duration:500,easing:easeOut})}return this.panning_&&(this.panning_=!1,d.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(c){if(this.targetPointers.length>0&&this.condition_(c)){const u=c.map.getView();return this.lastCentroid=null,u.getAnimating()&&u.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}class DragRotate extends PointerInteraction{constructor(c){c=c||{},super({stopDown:FALSE}),this.condition_=c.condition?c.condition:altShiftKeysOnly,this.lastAngle_=void 0,this.duration_=void 0!==c.duration?c.duration:250}handleDragEvent(c){if(!mouseOnly(c))return;const u=c.map,d=u.getView();if(d.getConstraints().rotation===disable)return;const p=u.getSize(),g=c.pixel,f=Math.atan2(p[1]/2-g[1],g[0]-p[0]/2);if(void 0!==this.lastAngle_){const c=f-this.lastAngle_;d.adjustRotationInternal(-c)}this.lastAngle_=f}handleUpEvent(c){if(!mouseOnly(c))return!0;return c.map.getView().endInteraction(this.duration_),!1}handleDownEvent(c){if(!mouseOnly(c))return!1;if(mouseActionButton(c)&&this.condition_(c)){return c.map.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}class RenderBox extends gi{constructor(c){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+c,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const c=this.startPixel_,u=this.endPixel_,d="px",p=this.element_.style;p.left=Math.min(c[0],u[0])+d,p.top=Math.min(c[1],u[1])+d,p.width=Math.abs(u[0]-c[0])+d,p.height=Math.abs(u[1]-c[1])+d}setMap(c){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const c=this.element_.style;c.left="inherit",c.top="inherit",c.width="inherit",c.height="inherit"}this.map_=c,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(c,u){this.startPixel_=c,this.endPixel_=u,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const c=this.startPixel_,u=this.endPixel_,d=[c,[c[0],u[1]],u,[u[0],c[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);d[4]=d[0].slice(),this.geometry_?this.geometry_.setCoordinates([d]):this.geometry_=new or([d])}getGeometry(){return this.geometry_}}const Vo="boxstart",qo="boxdrag",Yo="boxend",Zo="boxcancel";class DragBoxEvent extends BaseEvent{constructor(c,u,d){super(c),this.coordinate=u,this.mapBrowserEvent=d}}class DragBox extends PointerInteraction{constructor(c){super(),this.on,this.once,this.un,c=c??{},this.box_=new RenderBox(c.className||"ol-dragbox"),this.minArea_=c.minArea??64,c.onBoxEnd&&(this.onBoxEnd=c.onBoxEnd),this.startPixel_=null,this.condition_=c.condition??mouseActionButton,this.boxEndCondition_=c.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(c,u,d){const p=d[0]-u[0],g=d[1]-u[1];return p*p+g*g>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(c){this.startPixel_&&(this.box_.setPixels(this.startPixel_,c.pixel),this.dispatchEvent(new DragBoxEvent(qo,c.coordinate,c)))}handleUpEvent(c){if(!this.startPixel_)return!1;const u=this.boxEndCondition_(c,this.startPixel_,c.pixel);return u&&this.onBoxEnd(c),this.dispatchEvent(new DragBoxEvent(u?Yo:Zo,c.coordinate,c)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(c){return!!this.condition_(c)&&(this.startPixel_=c.pixel,this.box_.setMap(c.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new DragBoxEvent(Vo,c.coordinate,c)),!0)}onBoxEnd(c){}setActive(c){c||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(Zo,this.startPixel_,null)),this.startPixel_=null)),super.setActive(c)}setMap(c){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new DragBoxEvent(Zo,this.startPixel_,null)),this.startPixel_=null)),super.setMap(c)}}class DragZoom extends DragBox{constructor(c){super({condition:(c=c||{}).condition?c.condition:shiftKeyOnly,className:c.className||"ol-dragzoom",minArea:c.minArea}),this.duration_=void 0!==c.duration?c.duration:200,this.out_=void 0!==c.out&&c.out}onBoxEnd(c){const u=this.getMap().getView();let d=this.getGeometry();if(this.out_){const c=u.rotatedExtentForGeometry(d),p=u.getResolutionForExtentInternal(c),g=u.getResolution()/p;d=d.clone(),d.scale(g*g)}u.fitInternal(d,{duration:this.duration_,easing:easeOut})}}var Ko="ArrowLeft",Ho="ArrowUp",Jo="ArrowRight",Qo="ArrowDown";class KeyboardPan extends Interaction{constructor(c){super(),c=c||{},this.defaultCondition_=function(c){return noModifierKeys(c)&&targetNotEditable(c)},this.condition_=void 0!==c.condition?c.condition:this.defaultCondition_,this.duration_=void 0!==c.duration?c.duration:100,this.pixelDelta_=void 0!==c.pixelDelta?c.pixelDelta:128}handleEvent(c){let u=!1;if(c.type==vi){const d=c.originalEvent,p=d.key;if(this.condition_(c)&&(p==Qo||p==Ko||p==Jo||p==Ho)){const g=c.map.getView(),f=g.getResolution()*this.pixelDelta_;let _=0,y=0;p==Qo?y=-f:p==Ko?_=-f:p==Jo?_=f:y=f;const x=[_,y];rotate$1(x,g.getRotation()),function pan(c,u,d){const p=c.getCenterInternal();if(p){const g=[p[0]+u[0],p[1]+u[1]];c.animateInternal({duration:void 0!==d?d:250,easing:linear,center:c.getConstrainedCenter(g)})}}(g,x,this.duration_),d.preventDefault(),u=!0}}return!u}}class KeyboardZoom extends Interaction{constructor(c){super(),c=c||{},this.condition_=c.condition?c.condition:function(c){return!function(c){const u=c.originalEvent;return zr?u.metaKey:u.ctrlKey}(c)&&targetNotEditable(c)},this.delta_=c.delta?c.delta:1,this.duration_=void 0!==c.duration?c.duration:100}handleEvent(c){let u=!1;if(c.type==vi||c.type==Si){const d=c.originalEvent,p=d.key;if(this.condition_(c)&&("+"===p||"-"===p)){const g=c.map,f="+"===p?this.delta_:-this.delta_;zoomByDelta(g.getView(),f,void 0,this.duration_),d.preventDefault(),u=!0}}return!u}}class MouseWheelZoom extends Interaction{constructor(c){super(c=c||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==c.maxDelta?c.maxDelta:1,this.duration_=void 0!==c.duration?c.duration:250,this.timeout_=void 0!==c.timeout?c.timeout:80,this.useAnchor_=void 0===c.useAnchor||c.useAnchor,this.constrainResolution_=void 0!==c.constrainResolution&&c.constrainResolution;const u=c.condition?c.condition:Xo;this.condition_=c.onFocusOnly?all(focusWithTabindex,u):u,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const c=this.getMap();if(!c)return;c.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(c){if(!this.condition_(c))return!0;if(c.type!==Ei)return!0;const u=c.map,d=c.originalEvent;let p;if(d.preventDefault(),this.useAnchor_&&(this.lastAnchor_=c.coordinate),c.type==Ei&&(p=d.deltaY,Dr&&d.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(p/=Br),d.deltaMode===WheelEvent.DOM_DELTA_LINE&&(p*=40)),0===p)return!1;this.lastDelta_=p;const g=Date.now();void 0===this.startTime_&&(this.startTime_=g),(!this.mode_||g-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(p)<4?"trackpad":"wheel");const f=u.getView();if("trackpad"===this.mode_&&!f.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(f.getAnimating()&&f.cancelAnimations(),f.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),f.adjustZoom(-p/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=g,!1;this.totalDelta_+=p;const _=Math.max(this.timeout_-(g-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,u),_),!1}handleWheelZoom_(c){const u=c.getView();u.getAnimating()&&u.cancelAnimations();let d=-clamp(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(u.getConstrainResolution()||this.constrainResolution_)&&(d=d?d>0?1:-1:0),zoomByDelta(u,d,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(c){this.useAnchor_=c,c||(this.lastAnchor_=null)}}class PinchRotate extends PointerInteraction{constructor(c){const u=c=c||{};u.stopDown||(u.stopDown=FALSE),super(u),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==c.threshold?c.threshold:.3,this.duration_=void 0!==c.duration?c.duration:250}handleDragEvent(c){let u=0;const d=this.targetPointers[0],p=this.targetPointers[1],g=Math.atan2(p.clientY-d.clientY,p.clientX-d.clientX);if(void 0!==this.lastAngle_){const c=g-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),u=c}this.lastAngle_=g;const f=c.map,_=f.getView();_.getConstraints().rotation!==disable&&(this.anchor_=f.getCoordinateFromPixelInternal(f.getEventPixel(centroid(this.targetPointers))),this.rotating_&&(f.render(),_.adjustRotationInternal(u,this.anchor_)))}handleUpEvent(c){if(this.targetPointers.length<2){return c.map.getView().endInteraction(this.duration_),!1}return!0}handleDownEvent(c){if(this.targetPointers.length>=2){const u=c.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||u.getView().beginInteraction(),!0}return!1}}class PinchZoom extends PointerInteraction{constructor(c){const u=c=c||{};u.stopDown||(u.stopDown=FALSE),super(u),this.anchor_=null,this.duration_=void 0!==c.duration?c.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(c){let u=1;const d=this.targetPointers[0],p=this.targetPointers[1],g=d.clientX-p.clientX,f=d.clientY-p.clientY,_=Math.sqrt(g*g+f*f);void 0!==this.lastDistance_&&(u=this.lastDistance_/_),this.lastDistance_=_;const y=c.map,x=y.getView();1!=u&&(this.lastScaleDelta_=u),this.anchor_=y.getCoordinateFromPixelInternal(y.getEventPixel(centroid(this.targetPointers))),y.render(),x.adjustResolutionInternal(u,this.anchor_)}handleUpEvent(c){if(this.targetPointers.length<2){const u=c.map.getView(),d=this.lastScaleDelta_>1?1:-1;return u.endInteraction(this.duration_,d),!1}return!0}handleDownEvent(c){if(this.targetPointers.length>=2){const u=c.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||u.getView().beginInteraction(),!0}return!1}}function removeLayerMapProperty(c){c instanceof Xn?c.setMapInternal(null):c instanceof vo&&c.getLayers().forEach(removeLayerMapProperty)}function setLayerMapProperty(c,u){if(c instanceof Xn)c.setMapInternal(u);else if(c instanceof vo){const d=c.getLayers().getArray();for(let c=0,p=d.length;c<p;++c)setLayerMapProperty(d[c],u)}}var ta=class Map extends Mi{constructor(c){super(),c=c||{},this.on,this.once,this.un;const u=function createOptionsInternal(c){let u=null;void 0!==c.keyboardEventTarget&&(u="string"==typeof c.keyboardEventTarget?document.getElementById(c.keyboardEventTarget):c.keyboardEventTarget);const d={},p=c.layers&&"function"==typeof c.layers.getLayers?c.layers:new vo({layers:c.layers});let g,f,_;d[ko]=p,d[No]=c.target,d[Do]=c.view instanceof Wn?c.view:new Wn,void 0!==c.controls&&(Array.isArray(c.controls)?g=new Ai(c.controls.slice()):(assert("function"==typeof c.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),g=c.controls));void 0!==c.interactions&&(Array.isArray(c.interactions)?f=new Ai(c.interactions.slice()):(assert("function"==typeof c.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),f=c.interactions));void 0!==c.overlays?Array.isArray(c.overlays)?_=new Ai(c.overlays.slice()):(assert("function"==typeof c.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),_=c.overlays):_=new Ai;return{controls:g,interactions:f,keyboardEventTarget:u,overlays:_,values:d}}(c);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==c.maxTilesLoading?c.maxTilesLoading:16,this.pixelRatio_=void 0!==c.pixelRatio?c.pixelRatio:Br,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=c.moveTolerance,this.keyboardEventTarget_=u.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=u.controls||defaults$1(),this.interactions=u.interactions||function defaults(c){c=c||{};const u=new Ai,d=new yo(-.005,.05,100);return(void 0===c.altShiftDragRotate||c.altShiftDragRotate)&&u.push(new DragRotate),(void 0===c.doubleClickZoom||c.doubleClickZoom)&&u.push(new DoubleClickZoom({delta:c.zoomDelta,duration:c.zoomDuration})),(void 0===c.dragPan||c.dragPan)&&u.push(new DragPan({onFocusOnly:c.onFocusOnly,kinetic:d})),(void 0===c.pinchRotate||c.pinchRotate)&&u.push(new PinchRotate),(void 0===c.pinchZoom||c.pinchZoom)&&u.push(new PinchZoom({duration:c.zoomDuration})),(void 0===c.keyboard||c.keyboard)&&(u.push(new KeyboardPan),u.push(new KeyboardZoom({delta:c.zoomDelta,duration:c.zoomDuration}))),(void 0===c.mouseWheelZoom||c.mouseWheelZoom)&&u.push(new MouseWheelZoom({onFocusOnly:c.onFocusOnly,duration:c.zoomDuration})),(void 0===c.shiftDragZoom||c.shiftDragZoom)&&u.push(new DragZoom({duration:c.zoomDuration})),u}({onFocusOnly:!0}),this.overlays_=u.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new jo(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(ko,this.handleLayerGroupChanged_),this.addChangeListener(Do,this.handleViewChanged_),this.addChangeListener(Oo,this.handleSizeChanged_),this.addChangeListener(No,this.handleTargetChanged_),this.setProperties(u.values);const d=this;!c.view||c.view instanceof Wn||c.view.then((function(c){d.setView(new Wn(c))})),this.controls.addEventListener(Ti,(c=>{c.element.setMap(this)})),this.controls.addEventListener(Ri,(c=>{c.element.setMap(null)})),this.interactions.addEventListener(Ti,(c=>{c.element.setMap(this)})),this.interactions.addEventListener(Ri,(c=>{c.element.setMap(null)})),this.overlays_.addEventListener(Ti,(c=>{this.addOverlayInternal_(c.element)})),this.overlays_.addEventListener(Ri,(c=>{const u=c.element.getId();void 0!==u&&delete this.overlayIdIndex_[u.toString()],c.element.setMap(null)})),this.controls.forEach((c=>{c.setMap(this)})),this.interactions.forEach((c=>{c.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(c){this.getControls().push(c)}addInteraction(c){this.getInteractions().push(c)}addLayer(c){this.getLayerGroup().getLayers().push(c)}handleLayerAdd_(c){setLayerMapProperty(c.layer,this)}addOverlay(c){this.getOverlays().push(c)}addOverlayInternal_(c){const u=c.getId();void 0!==u&&(this.overlayIdIndex_[u.toString()]=c),c.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(c,u,d){if(!this.frameState_||!this.renderer_)return;const p=this.getCoordinateFromPixelInternal(c),g=void 0!==(d=void 0!==d?d:{}).hitTolerance?d.hitTolerance:0,f=void 0!==d.layerFilter?d.layerFilter:TRUE,_=!1!==d.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(p,this.frameState_,g,_,u,null,f,null)}getFeaturesAtPixel(c,u){const d=[];return this.forEachFeatureAtPixel(c,(function(c){d.push(c)}),u),d}getAllLayers(){const c=[];return function addLayersFrom(u){u.forEach((function(u){u instanceof vo?addLayersFrom(u.getLayers()):c.push(u)}))}(this.getLayers()),c}hasFeatureAtPixel(c,u){if(!this.frameState_||!this.renderer_)return!1;const d=this.getCoordinateFromPixelInternal(c),p=void 0!==(u=void 0!==u?u:{}).layerFilter?u.layerFilter:TRUE,g=void 0!==u.hitTolerance?u.hitTolerance:0,f=!1!==u.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(d,this.frameState_,g,f,p,null)}getEventCoordinate(c){return this.getCoordinateFromPixel(this.getEventPixel(c))}getEventCoordinateInternal(c){return this.getCoordinateFromPixelInternal(this.getEventPixel(c))}getEventPixel(c){const u=this.viewport_.getBoundingClientRect(),d=this.getSize(),p=u.width/d[0],g=u.height/d[1],f="changedTouches"in c?c.changedTouches[0]:c;return[(f.clientX-u.left)/p,(f.clientY-u.top)/g]}getTarget(){return this.get(No)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(c){return toUserCoordinate(this.getCoordinateFromPixelInternal(c),this.getView().getProjection())}getCoordinateFromPixelInternal(c){const u=this.frameState_;return u?apply(u.pixelToCoordinateTransform,c.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(c){const u=this.overlayIdIndex_[c.toString()];return void 0!==u?u:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(ko)}setLayers(c){const u=this.getLayerGroup();if(c instanceof Ai)return void u.setLayers(c);const d=u.getLayers();d.clear(),d.extend(c)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const c=this.getLayerGroup().getLayerStatesArray();for(let u=0,d=c.length;u<d;++u){const d=c[u];if(!d.visible)continue;const p=d.layer.getRenderer();if(p&&!p.ready)return!0;const g=d.layer.getSource();if(g&&g.loading)return!0}return!1}getPixelFromCoordinate(c){const u=fromUserCoordinate(c,this.getView().getProjection());return this.getPixelFromCoordinateInternal(u)}getPixelFromCoordinateInternal(c){const u=this.frameState_;return u?apply(u.coordinateToPixelTransform,c.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Oo)}getView(){return this.get(Do)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const c=this.getTargetElement();return c?c.ownerDocument:document}getTilePriority(c,u,d,p){return function getTilePriority(c,u,d,p,g){if(!c||!(d in c.wantedTiles))return Go;if(!c.wantedTiles[d][u.getKey()])return Go;const f=c.viewState.center,_=p[0]-f[0],y=p[1]-f[1];return 65536*Math.log(g)+Math.sqrt(_*_+y*y)/g}(this.frameState_,c,u,d,p)}handleBrowserEvent(c,u){u=u||c.type;const d=new wo(u,this,c);this.handleMapBrowserEvent(d)}handleMapBrowserEvent(c){if(!this.frameState_)return;const u=c.originalEvent,d=u.type;if(d===Po||d===Ei||d===vi){const c=this.getOwnerDocument(),d=this.viewport_.getRootNode?this.viewport_.getRootNode():c,p=u.target,g=d instanceof ShadowRoot?d.host===p?d.host.ownerDocument:d:d===c?c.documentElement:d;if(this.overlayContainerStopEvent_.contains(p)||!g.contains(p))return}if(c.frameState=this.frameState_,!1!==this.dispatchEvent(c)){const u=this.getInteractions().getArray().slice();for(let d=u.length-1;d>=0;d--){const p=u[d];if(p.getMap()!==this||!p.getActive()||!this.getTargetElement())continue;if(!p.handleEvent(c)||c.propagationStopped)break}}}handlePostRender(){const c=this.frameState_,u=this.tileQueue_;if(!u.isEmpty()){let d=this.maxTilesLoading_,p=d;if(c){const u=c.viewHints;if(u[jn]||u[zn]){const u=Date.now()-c.time>8;d=u?0:8,p=u?0:2}}u.getTilesLoading()<d&&(u.reprioritize(),u.loadMoreTiles(d,p))}c&&this.renderer_&&!c.animate&&(this.renderComplete_?(this.hasListener(Cr)&&this.renderer_.dispatchRenderEvent(Cr,c),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new So(Fo,this,c)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new So(Io,this,c))));const d=this.postRenderFunctions_;for(let u=0,p=d.length;u<p;++u)d[u](this,c);d.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let c=0,u=this.targetChangeHandlerKeys_.length;c<u;++c)unlistenByKey(this.targetChangeHandlerKeys_[c]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(_i,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Ei,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const c=this.targetElement_.getRootNode();c instanceof ShadowRoot&&this.resizeObserver_.unobserve(c.host),this.setSize(void 0)}const c=this.getTarget(),u="string"==typeof c?document.getElementById(c):c;if(this.targetElement_=u,u){u.appendChild(this.viewport_),this.renderer_||(this.renderer_=new CompositeMapRenderer(this)),this.mapBrowserEventHandler_=new To(this,this.moveTolerance_);for(const c in Co)this.mapBrowserEventHandler_.addEventListener(Co[c],this.handleMapBrowserEvent.bind(this));let c;if(this.viewport_.addEventListener(_i,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Ei,this.boundHandleBrowserEvent_,!!Xr&&{passive:!1}),this.keyboardEventTarget_)c=this.keyboardEventTarget_;else{const d=u.getRootNode();c=d instanceof ShadowRoot?d.host:u}this.targetChangeHandlerKeys_=[listen(c,vi,this.handleBrowserEvent,this),listen(c,Si,this.handleBrowserEvent,this)];const d=u.getRootNode();d instanceof ShadowRoot&&this.resizeObserver_.observe(d.host),this.resizeObserver_.observe(u)}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(unlistenByKey(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(unlistenByKey(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const c=this.getView();c&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=listen(c,pi,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=listen(c,mi,this.handleViewPropertyChanged_,this),c.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey),this.layerGroupPropertyListenerKeys_=null);const c=this.getLayerGroup();c&&(this.handleLayerAdd_(new GroupEvent("addlayer",c)),this.layerGroupPropertyListenerKeys_=[listen(c,pi,this.render,this),listen(c,mi,this.render,this),listen(c,"addlayer",this.handleLayerAdd_,this),listen(c,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const c=this.getLayerGroup().getLayerStatesArray();for(let u=0,d=c.length;u<d;++u){const d=c[u].layer;d.hasRenderer()&&d.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(c){return this.getControls().remove(c)}removeInteraction(c){return this.getInteractions().remove(c)}removeLayer(c){return this.getLayerGroup().getLayers().remove(c)}handleLayerRemove_(c){removeLayerMapProperty(c.layer)}removeOverlay(c){return this.getOverlays().remove(c)}renderFrame_(c){const u=this.getSize(),d=this.getView(),p=this.frameState_;let g=null;if(void 0!==u&&hasArea(u)&&d&&d.isDef()){const p=d.getHints(this.frameState_?this.frameState_.viewHints:void 0),f=d.getState();if(g={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:getForViewAndSize(f.center,f.resolution,f.rotation,u),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:u,tileQueue:this.tileQueue_,time:c,usedTiles:{},viewState:f,viewHints:p,wantedTiles:{},mapId:getUid(this),renderTargets:{}},f.nextCenter&&f.nextResolution){const c=isNaN(f.nextRotation)?f.rotation:f.nextRotation;g.nextExtent=getForViewAndSize(f.nextCenter,f.nextResolution,c,u)}}if(this.frameState_=g,this.renderer_.renderFrame(g),g){if(g.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,g.postRenderFunctions),p){(!this.previousExtent_||!isEmpty(this.previousExtent_)&&!equals$1(g.extent,this.previousExtent_))&&(this.dispatchEvent(new So(Lo,this,p)),this.previousExtent_=createOrUpdateEmpty(this.previousExtent_))}this.previousExtent_&&!g.viewHints[jn]&&!g.viewHints[zn]&&!equals$1(g.extent,this.previousExtent_)&&(this.dispatchEvent(new So(Ao,this,g)),clone(g.extent,this.previousExtent_))}this.dispatchEvent(new So(Ro,this,g)),this.renderComplete_=(this.hasListener(Io)||this.hasListener(Fo)||this.hasListener(Cr))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(c){const u=this.getLayerGroup();u&&this.handleLayerRemove_(new GroupEvent("removelayer",u)),this.set(ko,c)}setSize(c){this.set(Oo,c)}setTarget(c){this.set(No,c)}setView(c){if(!c||c instanceof Wn)return void this.set(Do,c);this.set(Do,new Wn);const u=this;c.then((function(c){u.setView(new Wn(c))}))}updateSize(){const c=this.getTargetElement();let u;if(c){const d=getComputedStyle(c),p=c.offsetWidth-parseFloat(d.borderLeftWidth)-parseFloat(d.paddingLeft)-parseFloat(d.paddingRight)-parseFloat(d.borderRightWidth),g=c.offsetHeight-parseFloat(d.borderTopWidth)-parseFloat(d.paddingTop)-parseFloat(d.paddingBottom)-parseFloat(d.borderBottomWidth);isNaN(p)||isNaN(g)||(u=[Math.max(0,p),Math.max(0,g)],!hasArea(u)&&(c.offsetWidth||c.offsetHeight||c.getClientRects().length)&&warn("No map visible because the map container's width or height are 0."))}const d=this.getSize();!u||d&&equals$2(u,d)||(this.setSize(u),this.updateViewportSize_(u))}updateViewportSize_(c){const u=this.getView();u&&u.setViewportSize(c)}};const ea="element",ia="map",ra="offset",na="position",sa="positioning";class Overlay extends Mi{constructor(c){super(),this.on,this.once,this.un,this.options=c,this.id=c.id,this.insertFirst=void 0===c.insertFirst||c.insertFirst,this.stopEvent=void 0===c.stopEvent||c.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==c.className?c.className:"ol-overlay-container ol-selectable",this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===c.autoPan?{}:c.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(ea,this.handleElementChanged),this.addChangeListener(ia,this.handleMapChanged),this.addChangeListener(ra,this.handleOffsetChanged),this.addChangeListener(na,this.handlePositionChanged),this.addChangeListener(sa,this.handlePositioningChanged),void 0!==c.element&&this.setElement(c.element),this.setOffset(void 0!==c.offset?c.offset:[0,0]),this.setPositioning(c.positioning||"top-left"),void 0!==c.position&&this.setPosition(c.position)}getElement(){return this.get(ea)}getId(){return this.id}getMap(){return this.get(ia)||null}getOffset(){return this.get(ra)}getPosition(){return this.get(na)}getPositioning(){return this.get(sa)}handleElementChanged(){removeChildren(this.element);const c=this.getElement();c&&this.element.appendChild(c)}handleMapChanged(){this.mapPostrenderListenerKey&&(this.element?.remove(),unlistenByKey(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const c=this.getMap();if(c){this.mapPostrenderListenerKey=listen(c,Ro,this.render,this),this.updatePixelPosition();const u=this.stopEvent?c.getOverlayContainerStopEvent():c.getOverlayContainer();this.insertFirst?u.insertBefore(this.element,u.childNodes[0]||null):u.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(c){this.set(ea,c)}setMap(c){this.set(ia,c)}setOffset(c){this.set(ra,c)}setPosition(c){this.set(na,c)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(c){const u=this.getMap();if(!u||!u.getTargetElement()||!this.get(na))return;const d=this.getRect(u.getTargetElement(),u.getSize()),p=this.getElement(),g=this.getRect(p,[outerWidth(p),outerHeight(p)]),f=void 0===(c=c||{}).margin?20:c.margin;if(!containsExtent(d,g)){const p=g[0]-d[0],_=d[2]-g[2],y=g[1]-d[1],x=d[3]-g[3],v=[0,0];if(p<0?v[0]=p-f:_<0&&(v[0]=Math.abs(_)+f),y<0?v[1]=y-f:x<0&&(v[1]=Math.abs(x)+f),0!==v[0]||0!==v[1]){const d=u.getView().getCenterInternal(),p=u.getPixelFromCoordinateInternal(d);if(!p)return;const g=[p[0]+v[0],p[1]+v[1]],f=c.animation||{};u.getView().animateInternal({center:u.getCoordinateFromPixelInternal(g),duration:f.duration,easing:f.easing})}}}getRect(c,u){const d=c.getBoundingClientRect(),p=d.left+window.pageXOffset,g=d.top+window.pageYOffset;return[p,g,p+u[0],g+u[1]]}setPositioning(c){this.set(sa,c)}setVisible(c){this.rendered.visible!==c&&(this.element.style.display=c?"":"none",this.rendered.visible=c)}updatePixelPosition(){const c=this.getMap(),u=this.getPosition();if(!c||!c.isRendered()||!u)return void this.setVisible(!1);const d=c.getPixelFromCoordinate(u),p=c.getSize();this.updateRenderedPosition(d,p)}updateRenderedPosition(c,u){const d=this.element.style,p=this.getOffset(),g=this.getPositioning();this.setVisible(!0);let f="0%",_="0%";"bottom-right"==g||"center-right"==g||"top-right"==g?f="-100%":"bottom-center"!=g&&"center-center"!=g&&"top-center"!=g||(f="-50%"),"bottom-left"==g||"bottom-center"==g||"bottom-right"==g?_="-100%":"center-left"!=g&&"center-center"!=g&&"center-right"!=g||(_="-50%");const y=`translate(${f}, ${_}) translate(${Math.round(c[0]+p[0])+"px"}, ${Math.round(c[1]+p[1])+"px"})`;this.rendered.transform_!=y&&(this.rendered.transform_=y,d.transform=y)}getOptions(){return this.options}}class LRUCache{constructor(c){this.highWaterMark=void 0!==c?c:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(c){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(c){return this.entries_.hasOwnProperty(c)}forEach(c){let u=this.oldest_;for(;u;)c(u.value_,u.key_,this),u=u.newer}get(c,u){const d=this.entries_[c];return assert(void 0!==d,"Tried to get a value for a key that does not exist in the cache"),d===this.newest_||(d===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(d.newer.older=d.older,d.older.newer=d.newer),d.newer=null,d.older=this.newest_,this.newest_.newer=d,this.newest_=d),d.value_}remove(c){const u=this.entries_[c];return assert(void 0!==u,"Tried to get a value for a key that does not exist in the cache"),u===this.newest_?(this.newest_=u.older,this.newest_&&(this.newest_.newer=null)):u===this.oldest_?(this.oldest_=u.newer,this.oldest_&&(this.oldest_.older=null)):(u.newer.older=u.older,u.older.newer=u.newer),delete this.entries_[c],--this.count_,u.value_}getCount(){return this.count_}getKeys(){const c=new Array(this.count_);let u,d=0;for(u=this.newest_;u;u=u.older)c[d++]=u.key_;return c}getValues(){const c=new Array(this.count_);let u,d=0;for(u=this.newest_;u;u=u.older)c[d++]=u.value_;return c}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(c){return this.entries_[c]?.value_}pop(){const c=this.oldest_;return delete this.entries_[c.key_],c.newer&&(c.newer.older=null),this.oldest_=c.newer,this.oldest_||(this.newest_=null),--this.count_,c.value_}replace(c,u){this.get(c),this.entries_[c].value_=u}set(c,u){assert(!(c in this.entries_),"Tried to set a value for a key that is used already");const d={key_:c,newer:null,older:this.newest_,value_:u};this.newest_?this.newest_.newer=d:this.oldest_=d,this.newest_=d,this.entries_[c]=d,++this.count_}setSize(c){this.highWaterMark=c}}function createOrUpdate$1(c,u,d,p){return void 0!==p?(p[0]=c,p[1]=u,p[2]=d,p):[c,u,d]}function getKeyZXY(c,u,d){return c+"/"+u+"/"+d}function getKey(c){return getKeyZXY(c[0],c[1],c[2])}function hash(c){return hashZXY(c[0],c[1],c[2])}function hashZXY(c,u,d){return(u<<c)+d}var oa=class TileCache extends LRUCache{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(c){for(;this.canExpireCache();){if(this.peekLast().getKey()in c)break;this.pop().release()}}pruneExceptNewestZ(){if(0===this.getCount())return;const c=function fromKey(c){return c.split("/").map(Number)}(this.peekFirstKey()),u=c[0];this.forEach((c=>{c.tileCoord[0]!==u&&(this.remove(getKey(c.tileCoord)),c.release())}))}};class TileRange{constructor(c,u,d,p){this.minX=c,this.maxX=u,this.minY=d,this.maxY=p}contains(c){return this.containsXY(c[1],c[2])}containsTileRange(c){return this.minX<=c.minX&&c.maxX<=this.maxX&&this.minY<=c.minY&&c.maxY<=this.maxY}containsXY(c,u){return this.minX<=c&&c<=this.maxX&&this.minY<=u&&u<=this.maxY}equals(c){return this.minX==c.minX&&this.minY==c.minY&&this.maxX==c.maxX&&this.maxY==c.maxY}extend(c){c.minX<this.minX&&(this.minX=c.minX),c.maxX>this.maxX&&(this.maxX=c.maxX),c.minY<this.minY&&(this.minY=c.minY),c.maxY>this.maxY&&(this.maxY=c.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(c){return this.minX<=c.maxX&&this.maxX>=c.minX&&this.minY<=c.maxY&&this.maxY>=c.minY}}function createOrUpdate(c,u,d,p,g){return void 0!==g?(g.minX=c,g.maxX=u,g.minY=d,g.maxY=p,g):new TileRange(c,u,d,p)}var aa=TileRange;const la=[];var ha=class VectorRenderTile extends fo{constructor(c,u,d,p){super(c,u,{transition:0}),this.context_=null,this.executorGroups=[],this.loadingSourceTiles=0,this.hitDetectionImageData={},this.replayState_={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=p.bind(void 0,this),this.wrappedTileCoord=d}getContext(){return this.context_||(this.context_=createCanvasContext2D(1,1,la)),this.context_}hasContext(){return!!this.context_}getImage(){return this.hasContext()?this.getContext().canvas:null}getReplayState(c){const u=getUid(c);return u in this.replayState_||(this.replayState_[u]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.replayState_[u]}load(){this.getSourceTiles()}release(){releaseCanvas$1(this.context_),la.push(this.context_.canvas),this.context_=null,super.release()}};var ca=class VectorTile extends fo{constructor(c,u,d,p,g,f){super(c,u,f),this.extent=null,this.format_=p,this.features_=null,this.loader_,this.projection=null,this.resolution,this.tileLoadFunction_=g,this.url_=d,this.key=d}getFormat(){return this.format_}getFeatures(){return this.features_}load(){this.state==co&&(this.setState(uo),this.tileLoadFunction_(this,this.url_),this.loader_&&this.loader_(this.extent,this.resolution,this.projection))}onLoad(c,u){this.setFeatures(c)}onError(){this.setState(go)}setFeatures(c){this.features_=c,this.setState(po)}setLoader(c){this.loader_=c}},ua=Object.freeze({__proto__:null,Collection:Ai,Disposable:gi,Feature:Ii,Geolocation:yr,Graticule:lo,Image:qr,ImageCanvas:ho,ImageTile:_o,ImageWrapper:qr,Kinetic:yo,Map:ta,MapBrowserEvent:wo,MapBrowserEventHandler:To,MapEvent:So,Object:Mi,Observable:Pi,Overlay:Overlay,Tile:fo,TileCache:oa,TileQueue:jo,TileRange:aa,VERSION:"10.1.0",VectorRenderTile:ha,VectorTile:ca,View:Wn,getUid:getUid});const da=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],pa="enterfullscreen",ga="leavefullscreen";function isFullScreenSupported(c){const u=c.body;return!!(u.webkitRequestFullscreen||u.requestFullscreen&&c.fullscreenEnabled)}function isFullScreen(c){return!(!c.webkitIsFullScreen&&!c.fullscreenElement)}function requestFullScreen(c){c.requestFullscreen?c.requestFullscreen():c.webkitRequestFullscreen&&c.webkitRequestFullscreen()}var ma=class FullScreen extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target}),this.on,this.once,this.un,this.keys_=void 0!==c.keys&&c.keys,this.source_=c.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==c.className?c.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==c.activeClassName?c.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==c.inactiveClassName?c.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const u=void 0!==c.label?c.label:"⤢";this.labelNode_="string"==typeof u?document.createTextNode(u):u;const d=void 0!==c.labelActive?c.labelActive:"×";this.labelActiveNode_="string"==typeof d?document.createTextNode(d):d;const p=c.tipLabel?c.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=p,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(yi,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${rn} ${sn}`,this.element.appendChild(this.button_)}handleClick_(c){c.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const c=this.getMap();if(!c)return;const u=c.getOwnerDocument();if(isFullScreenSupported(u))if(isFullScreen(u))!function exitFullScreen(c){c.exitFullscreen?c.exitFullscreen():c.webkitExitFullscreen&&c.webkitExitFullscreen()}(u);else{let d;d=this.source_?"string"==typeof this.source_?u.getElementById(this.source_):this.source_:c.getTargetElement(),this.keys_?function requestFullScreenWithKeys(c){c.webkitRequestFullscreen?c.webkitRequestFullscreen():requestFullScreen(c)}(d):requestFullScreen(d)}}handleFullScreenChange_(){const c=this.getMap();if(!c)return;const u=this.isInFullscreen_;this.isInFullscreen_=isFullScreen(c.getOwnerDocument()),u!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(replaceNode(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(pa)):(replaceNode(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(ga)),c.updateSize())}setClassName_(c,u){u?(c.classList.remove(...this.inactiveClassName_),c.classList.add(...this.activeClassName_)):(c.classList.remove(...this.activeClassName_),c.classList.add(...this.inactiveClassName_))}setMap(c){const u=this.getMap();u&&u.removeChangeListener(No,this.boundHandleMapTargetChange_),super.setMap(c),this.handleMapTargetChange_(),c&&c.addChangeListener(No,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const c=this.documentListeners_;for(let u=0,d=c.length;u<d;++u)unlistenByKey(c[u]);c.length=0;const u=this.getMap();if(u){const d=u.getOwnerDocument();isFullScreenSupported(d)?this.element.classList.remove(nn):this.element.classList.add(nn);for(let u=0,p=da.length;u<p;++u)c.push(listen(d,da[u],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}};const fa="projection",_a="coordinateFormat";var ya=class MousePosition extends zo{constructor(c){c=c||{};const u=document.createElement("div");u.className=void 0!==c.className?c.className:"ol-mouse-position",super({element:u,render:c.render,target:c.target}),this.on,this.once,this.un,this.addChangeListener(fa,this.handleProjectionChanged_),c.coordinateFormat&&this.setCoordinateFormat(c.coordinateFormat),c.projection&&this.setProjection(c.projection),this.renderOnMouseOut_=void 0!==c.placeholder,this.placeholder_=this.renderOnMouseOut_?c.placeholder:"&#160;",this.renderedHTML_=u.innerHTML,this.mapProjection_=null,this.transform_=null,this.wrapX_=!1!==c.wrapX}handleProjectionChanged_(){this.transform_=null}getCoordinateFormat(){return this.get(_a)}getProjection(){return this.get(fa)}handleMouseMove(c){const u=this.getMap();this.updateHTML_(u.getEventPixel(c))}handleMouseOut(c){this.updateHTML_(null)}setMap(c){if(super.setMap(c),c){const u=c.getViewport();this.listenerKeys.push(listen(u,Eo,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(listen(u,Mo,this.handleMouseOut,this)),this.updateHTML_(null)}}setCoordinateFormat(c){this.set(_a,c)}setProjection(c){this.set(fa,get$2(c))}updateHTML_(c){let u=this.placeholder_;if(c&&this.mapProjection_){if(!this.transform_){const c=this.getProjection();this.transform_=c?getTransformFromProjections(this.mapProjection_,c):identityTransform}const d=this.getMap().getCoordinateFromPixelInternal(c);if(d){const c=getUserProjection();if(c&&(this.transform_=getTransformFromProjections(this.mapProjection_,c)),this.transform_(d,d),this.wrapX_){wrapX$1(d,c||this.getProjection()||this.mapProjection_)}const p=this.getCoordinateFormat();u=p?p(d):d.toString()}}this.renderedHTML_&&u===this.renderedHTML_||(this.element.innerHTML=u,this.renderedHTML_=u)}render(c){const u=c.frameState;u?this.mapProjection_!=u.viewState.projection&&(this.mapProjection_=u.viewState.projection,this.transform_=null):this.mapProjection_=null}};const xa=.75,va=.1;var Sa=class OverviewMap extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),render:c.render,target:c.target}),this.boundHandleRotationChanged_=this.handleRotationChanged_.bind(this),this.collapsed_=void 0===c.collapsed||c.collapsed,this.collapsible_=void 0===c.collapsible||c.collapsible,this.collapsible_||(this.collapsed_=!1),this.rotateWithView_=void 0!==c.rotateWithView&&c.rotateWithView,this.viewExtent_=void 0;const u=void 0!==c.className?c.className:"ol-overviewmap",d=void 0!==c.tipLabel?c.tipLabel:"Overview map",p=void 0!==c.collapseLabel?c.collapseLabel:"‹";"string"==typeof p?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=p):this.collapseLabel_=p;const g=void 0!==c.label?c.label:"›";"string"==typeof g?(this.label_=document.createElement("span"),this.label_.textContent=g):this.label_=g;const f=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,_=document.createElement("button");_.setAttribute("type","button"),_.title=d,_.appendChild(f),_.addEventListener(yi,this.handleClick_.bind(this),!1),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.view_=c.view;const y=new ta({view:c.view,controls:new Ai,interactions:new Ai});this.ovmap_=y,c.layers&&c.layers.forEach((function(c){y.addLayer(c)}));const x=document.createElement("div");x.className="ol-overviewmap-box",x.style.boxSizing="border-box",this.boxOverlay_=new Overlay({position:[0,0],positioning:"center-center",element:x}),this.ovmap_.addOverlay(this.boxOverlay_);const v=u+" "+rn+" "+sn+(this.collapsed_&&this.collapsible_?" "+on:"")+(this.collapsible_?"":" ol-uncollapsible"),C=this.element;C.className=v,C.appendChild(this.ovmapDiv_),C.appendChild(_);const M=this,T=this.boxOverlay_,L=this.boxOverlay_.getElement(),move=function(c){const u={clientX:(d=c).clientX,clientY:d.clientY};var d;const p=y.getEventCoordinate(u);T.setPosition(p)},endMoving=function(c){const u=y.getEventCoordinateInternal(c);M.getMap().getView().setCenterInternal(u),window.removeEventListener("pointermove",move),window.removeEventListener("pointerup",endMoving)};this.ovmapDiv_.addEventListener("pointerdown",(function(){event.target===L&&window.addEventListener("pointermove",move),window.addEventListener("pointerup",endMoving)}))}setMap(c){const u=this.getMap();if(c!==u){if(u){const c=u.getView();c&&this.unbindView_(c),this.ovmap_.setTarget(null)}if(super.setMap(c),c){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(listen(c,pi,this.handleMapPropertyChange_,this));const u=c.getView();u&&this.bindView_(u),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}}handleMapPropertyChange_(c){if(c.key===Do){const u=c.oldValue;u&&this.unbindView_(u);const d=this.getMap().getView();this.bindView_(d)}else this.ovmap_.isRendered()||c.key!==No&&c.key!==Oo||this.ovmap_.updateSize()}bindView_(c){if(!this.view_){const u=new Wn({projection:c.getProjection()});this.ovmap_.setView(u)}c.addChangeListener(Bn.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_(),c.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())}unbindView_(c){c.removeChangeListener(Bn.ROTATION,this.boundHandleRotationChanged_)}handleRotationChanged_(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())}validateExtent_(){const c=this.getMap(),u=this.ovmap_;if(!c.isRendered()||!u.isRendered())return;const d=c.getSize(),p=c.getView().calculateExtentInternal(d);if(this.viewExtent_&&equals$1(p,this.viewExtent_))return;this.viewExtent_=p;const g=u.getSize(),f=u.getView().calculateExtentInternal(g),_=u.getPixelFromCoordinateInternal(getTopLeft(p)),y=u.getPixelFromCoordinateInternal(getBottomRight(p)),x=Math.abs(_[0]-y[0]),v=Math.abs(_[1]-y[1]),C=g[0],M=g[1];x<C*va||v<M*va||x>C*xa||v>M*xa?this.resetExtent_():containsExtent(f,p)||this.recenter_()}resetExtent_(){const c=this.getMap(),u=this.ovmap_,d=c.getSize(),p=c.getView().calculateExtentInternal(d),g=u.getView(),f=Math.log(7.5)/Math.LN2;scaleFromCenter(p,1/(Math.pow(2,f/2)*va)),g.fitInternal(fromExtent(p))}recenter_(){const c=this.getMap(),u=this.ovmap_,d=c.getView();u.getView().setCenterInternal(d.getCenterInternal())}updateBox_(){const c=this.getMap(),u=this.ovmap_;if(!c.isRendered()||!u.isRendered())return;const d=c.getSize(),p=c.getView(),g=u.getView(),f=this.rotateWithView_?0:-p.getRotation(),_=this.boxOverlay_,y=this.boxOverlay_.getElement(),x=p.getCenter(),v=p.getResolution(),C=g.getResolution(),M=d[0]*v/C,T=d[1]*v/C;if(_.setPosition(x),y){y.style.width=M+"px",y.style.height=T+"px";const c="rotate("+f+"rad)";y.style.transform=c}}updateBoxAfterOvmapIsRendered_(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=listenOnce(this.ovmap_,Ro,(c=>{delete this.ovmapPostrenderKey_,this.updateBox_()})))}handleClick_(c){c.preventDefault(),this.handleToggle_()}handleToggle_(){this.element.classList.toggle(on),this.collapsed_?replaceNode(this.collapseLabel_,this.label_):replaceNode(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;const c=this.ovmap_;if(!this.collapsed_){if(c.isRendered())return this.viewExtent_=void 0,void c.render();c.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}}getCollapsible(){return this.collapsible_}setCollapsible(c){this.collapsible_!==c&&(this.collapsible_=c,this.element.classList.toggle("ol-uncollapsible"),!c&&this.collapsed_&&this.handleToggle_())}setCollapsed(c){this.collapsible_&&this.collapsed_!==c&&this.handleToggle_()}getCollapsed(){return this.collapsed_}getRotateWithView(){return this.rotateWithView_}setRotateWithView(c){this.rotateWithView_!==c&&(this.rotateWithView_=c,0!==this.getMap().getView().getRotation()&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))}getOverviewMap(){return this.ovmap_}render(c){this.validateExtent_(),this.updateBox_()}};const wa="units",Ca=[1,2,5],Ea=25.4/.28;var Pa=class ScaleLine extends zo{constructor(c){c=c||{};const u=document.createElement("div");u.style.pointerEvents="none",super({element:u,render:c.render,target:c.target}),this.on,this.once,this.un;const d=void 0!==c.className?c.className:c.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=d+"-inner",this.element.className=d+" "+rn,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==c.minWidth?c.minWidth:64,this.maxWidth_=c.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(wa,this.handleUnitsChanged_),this.setUnits(c.units||"metric"),this.scaleBar_=c.bar||!1,this.scaleBarSteps_=c.steps||4,this.scaleBarText_=c.text||!1,this.dpi_=c.dpi||void 0}getUnits(){return this.get(wa)}handleUnitsChanged_(){this.updateElement_()}setUnits(c){this.set(wa,c)}setDpi(c){this.dpi_=c}updateElement_(){const c=this.viewState_;if(!c)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const u=c.center,d=c.projection,p=this.getUnits(),g="degrees"==p?"degrees":"m";let f=getPointResolution(d,c.resolution,u,g);const _=this.minWidth_*(this.dpi_||Ea)/Ea,y=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||Ea)/Ea:void 0;let x=_*f,v="";if("degrees"==p){const c=Ni.degrees;x*=c,x<c/60?(v="″",f*=3600):x<c?(v="′",f*=60):v="°"}else if("imperial"==p)x<.9144?(v="in",f/=.0254):x<1609.344?(v="ft",f/=.3048):(v="mi",f/=1609.344);else if("nautical"==p)f/=1852,v="NM";else if("metric"==p)x<1e-6?(v="nm",f*=1e9):x<.001?(v="μm",f*=1e6):x<1?(v="mm",f*=1e3):x<1e3?v="m":(v="km",f/=1e3);else{if("us"!=p)throw new Error("Invalid units");x<.9144?(v="in",f*=39.37):x<1609.344?(v="ft",f/=.30480061):(v="mi",f/=1609.3472)}let C,M,T,L,A,I,k=3*Math.floor(Math.log(_*f)/Math.log(10));for(;;){T=Math.floor(k/3);const c=Math.pow(10,T);if(C=Ca[(k%3+3)%3]*c,M=Math.round(C/f),isNaN(M))return this.element.style.display="none",void(this.renderedVisible_=!1);if(void 0!==y&&M>=y){C=L,M=A,T=I;break}if(M>=_)break;L=C,A=M,I=T,++k}const O=this.scaleBar_?this.createScaleBar(M,C,v):C.toFixed(T<0?-T:0)+" "+v;this.renderedHTML_!=O&&(this.innerElement_.innerHTML=O,this.renderedHTML_=O),this.renderedWidth_!=M&&(this.innerElement_.style.width=M+"px",this.renderedWidth_=M),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(c,u,d){const p=this.getScaleForResolution(),g=p<1?Math.round(1/p).toLocaleString()+" : 1":"1 : "+Math.round(p).toLocaleString(),f=this.scaleBarSteps_,_=c/f,y=[this.createMarker("absolute")];for(let p=0;p<f;++p){const g=p%2==0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";y.push(`<div><div class="ol-scale-singlebar ${g}" style="width: ${_}px;"></div>`+this.createMarker("relative")+(p%2==0||2===f?this.createStepText(p,c,!1,u,d):"")+"</div>")}y.push(this.createStepText(f,c,!0,u,d));return(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${c}px;">`+g+"</div>":"")+y.join("")}createMarker(c){return`<div class="ol-scale-step-marker" style="position: ${c}; top: ${"absolute"===c?3:-10}px;"></div>`}createStepText(c,u,d,p,g){const f=(0===c?0:Math.round(p/this.scaleBarSteps_*c*100)/100)+(0===c?"":" "+g);return`<div class="ol-scale-step-text" style="margin-left: ${0===c?-3:u/this.scaleBarSteps_*-1}px;text-align: ${0===c?"left":"center"};min-width: ${0===c?0:u/this.scaleBarSteps_*2}px;left: ${d?u+"px":"unset"};">`+f+"</div>"}getScaleForResolution(){return getPointResolution(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||Ea)}render(c){const u=c.frameState;this.viewState_=u?u.viewState:null,this.updateElement_()}};const ba=0,Ma=1;var Ta=class ZoomSlider extends zo{constructor(c){super({target:(c=c||{}).target,element:document.createElement("div"),render:c.render}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=ba,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.startX_,this.startY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==c.duration?c.duration:200;const u=void 0!==c.className?c.className:"ol-zoomslider",d=document.createElement("button");d.setAttribute("type","button"),d.className=u+"-thumb "+rn;const p=this.element;p.className=u+" "+rn+" "+sn,p.appendChild(d),p.addEventListener(Po,this.handleDraggerStart_.bind(this),!1),p.addEventListener(Eo,this.handleDraggerDrag_.bind(this),!1),p.addEventListener(bo,this.handleDraggerEnd_.bind(this),!1),p.addEventListener(yi,this.handleContainerClick_.bind(this),!1),d.addEventListener(yi,stopPropagation,!1)}setMap(c){super.setMap(c),c&&c.render()}initSlider_(){const c=this.element;let u=c.offsetWidth,d=c.offsetHeight;if(0===u&&0===d)return this.sliderInitialized_=!1;const p=getComputedStyle(c);u-=parseFloat(p.paddingRight)+parseFloat(p.paddingLeft),d-=parseFloat(p.paddingTop)+parseFloat(p.paddingBottom);const g=c.firstElementChild,f=getComputedStyle(g),_=g.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft),y=g.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);return this.thumbSize_=[_,y],u>d?(this.direction_=Ma,this.widthLimit_=u-_):(this.direction_=ba,this.heightLimit_=d-y),this.sliderInitialized_=!0}handleContainerClick_(c){const u=this.getMap().getView(),d=this.getRelativePosition_(c.offsetX-this.thumbSize_[0]/2,c.offsetY-this.thumbSize_[1]/2),p=this.getResolutionForPosition_(d),g=u.getConstrainedZoom(u.getZoomForResolution(p));u.animateInternal({zoom:g,duration:this.duration_,easing:easeOut})}handleDraggerStart_(c){if(!this.dragging_&&c.target===this.element.firstElementChild){const u=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=c.clientX-parseFloat(u.style.left),this.startY_=c.clientY-parseFloat(u.style.top),this.dragging_=!0,0===this.dragListenerKeys_.length){const c=this.handleDraggerDrag_,u=this.handleDraggerEnd_,d=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(listen(d,Eo,c,this),listen(d,bo,u,this))}}}handleDraggerDrag_(c){if(this.dragging_){const u=c.clientX-this.startX_,d=c.clientY-this.startY_,p=this.getRelativePosition_(u,d);this.currentResolution_=this.getResolutionForPosition_(p),this.getMap().getView().setResolution(this.currentResolution_)}}handleDraggerEnd_(c){if(this.dragging_){this.getMap().getView().endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(unlistenByKey),this.dragListenerKeys_.length=0}}setThumbPosition_(c){const u=this.getPositionForResolution_(c),d=this.element.firstElementChild;this.direction_==Ma?d.style.left=this.widthLimit_*u+"px":d.style.top=this.heightLimit_*u+"px"}getRelativePosition_(c,u){let d;return d=this.direction_===Ma?c/this.widthLimit_:u/this.heightLimit_,clamp(d,0,1)}getResolutionForPosition_(c){return this.getMap().getView().getResolutionForValueFunction()(1-c)}getPositionForResolution_(c){return clamp(1-this.getMap().getView().getValueForResolutionFunction()(c),0,1)}render(c){if(!c.frameState)return;if(!this.sliderInitialized_&&!this.initSlider_())return;const u=c.frameState.viewState.resolution;this.currentResolution_=u,this.setThumbPosition_(u)}};var Ra=class ZoomToExtent extends zo{constructor(c){c=c||{},super({element:document.createElement("div"),target:c.target}),this.extent=c.extent?c.extent:null;const u=void 0!==c.className?c.className:"ol-zoom-extent",d=void 0!==c.label?c.label:"E",p=void 0!==c.tipLabel?c.tipLabel:"Fit to extent",g=document.createElement("button");g.setAttribute("type","button"),g.title=p,g.appendChild("string"==typeof d?document.createTextNode(d):d),g.addEventListener(yi,this.handleClick_.bind(this),!1);const f=u+" "+rn+" "+sn,_=this.element;_.className=f,_.appendChild(g)}handleClick_(c){c.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const c=this.getMap().getView(),u=this.extent?fromUserExtent(this.extent,c.getProjection()):c.getProjection().getExtent();c.fitInternal(fromExtent(u))}},La=Object.freeze({__proto__:null,Attribution:Bo,Control:zo,FullScreen:ma,MousePosition:ya,OverviewMap:Sa,Rotate:Uo,ScaleLine:Pa,Zoom:$o,ZoomSlider:Ta,ZoomToExtent:Ra,defaults:defaults$1});var Aa=class FeatureFormat{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Ii,this.supportedMediaTypes=null}getReadOptions(c,u){if(u){let d=u.dataProjection?get$2(u.dataProjection):this.readProjection(c);u.extent&&d&&"tile-pixels"===d.getUnits()&&(d=get$2(d),d.setWorldExtent(u.extent)),u={dataProjection:d,featureProjection:u.featureProjection}}return this.adaptOptions(u)}adaptOptions(c){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},c)}getType(){return abstract()}readFeature(c,u){return abstract()}readFeatures(c,u){return abstract()}readGeometry(c,u){return abstract()}readProjection(c){return abstract()}writeFeature(c,u){return abstract()}writeFeatures(c,u){return abstract()}writeGeometry(c,u){return abstract()}};function transformGeometryWithOptions(c,u,d){const p=d?get$2(d.featureProjection):null,g=d?get$2(d.dataProjection):null;let f=c;if(p&&g&&!equivalent(p,g)){u&&(f=c.clone());const d=u?p:g,_=u?g:p;"tile-pixels"===d.getUnits()?f.transform(d,_):f.applyTransform(getTransform(d,_))}if(u&&d&&void 0!==d.decimals){const u=Math.pow(10,d.decimals),transform=function(c){for(let d=0,p=c.length;d<p;++d)c[d]=Math.round(c[d]*u)/u;return c};f===c&&(f=c.clone()),f.applyTransform(transform)}return f}function transformExtentWithOptions(c,u){const d=u?get$2(u.featureProjection):null,p=u?get$2(u.dataProjection):null;return d&&p&&!equivalent(d,p)?transformExtent(c,p,d):c}const Ia={Point:sr,LineString:Jr,Polygon:or,MultiPoint:Vs,MultiLineString:Xs,MultiPolygon:qs};function createRenderFeature(c,u){const d=c.geometry;if(!d)return[];if(Array.isArray(d))return d.map((u=>createRenderFeature({...c,geometry:u}))).flat();const p="MultiPolygon"===d.type?"Polygon":d.type;if("GeometryCollection"===p||"Circle"===p)throw new Error("Unsupported geometry type: "+p);const g=d.layout.length;return transformGeometryWithOptions(new RenderFeature(p,"Polygon"===p?function orientFlatCoordinates(c,u,d){return Array.isArray(u[0])?(linearRingssAreOriented(c,0,u,d)||orientLinearRingsArray(c=c.slice(),0,u,d),c):(linearRingsAreOriented(c,0,u,d)||orientLinearRings(c=c.slice(),0,u,d),c)}(d.flatCoordinates,d.ends,g):d.flatCoordinates,d.ends?.flat(),g,c.properties||{},c.id).enableSimplifyTransformed(),!1,u)}function createGeometry(c,u){if(!c)return null;if(Array.isArray(c)){const d=c.map((c=>createGeometry(c,u)));return new Ws(d)}return transformGeometryWithOptions(new(0,Ia[c.type])(c.flatCoordinates,c.layout,c.ends),!1,u)}class JSONFeature extends Aa{constructor(){super()}getType(){return"json"}readFeature(c,u){return this.readFeatureFromObject(getObject(c),this.getReadOptions(c,u))}readFeatures(c,u){return this.readFeaturesFromObject(getObject(c),this.getReadOptions(c,u))}readFeatureFromObject(c,u){return abstract()}readFeaturesFromObject(c,u){return abstract()}readGeometry(c,u){return this.readGeometryFromObject(getObject(c),this.getReadOptions(c,u))}readGeometryFromObject(c,u){return abstract()}readProjection(c){return this.readProjectionFromObject(getObject(c))}readProjectionFromObject(c){return abstract()}writeFeature(c,u){return JSON.stringify(this.writeFeatureObject(c,u))}writeFeatureObject(c,u){return abstract()}writeFeatures(c,u){return JSON.stringify(this.writeFeaturesObject(c,u))}writeFeaturesObject(c,u){return abstract()}writeGeometry(c,u){return JSON.stringify(this.writeGeometryObject(c,u))}writeGeometryObject(c,u){return abstract()}}function getObject(c){if("string"==typeof c){const u=JSON.parse(c);return u||null}return null!==c?c:null}const Fa={Point:function readPointGeometry$2(c){let u;u=void 0!==c.m&&void 0!==c.z?new sr([c.x,c.y,c.z,c.m],"XYZM"):void 0!==c.z?new sr([c.x,c.y,c.z],"XYZ"):void 0!==c.m?new sr([c.x,c.y,c.m],"XYM"):new sr([c.x,c.y]);return u},LineString:function readLineStringGeometry$2(c){const u=getGeometryLayout(c);return new Jr(c.paths[0],u)},Polygon:function readPolygonGeometry$2(c){const u=getGeometryLayout(c);return new or(c.rings,u)},MultiPoint:function readMultiPointGeometry$2(c){const u=getGeometryLayout(c);return new Vs(c.points,u)},MultiLineString:function readMultiLineStringGeometry$2(c){const u=getGeometryLayout(c);return new Xs(c.paths,u)},MultiPolygon:function readMultiPolygonGeometry$2(c){const u=getGeometryLayout(c);return new qs(c.rings,u)}},ka={Point:function writePointGeometry$1(c,u){const d=c.getCoordinates();let p;const g=c.getLayout();if("XYZ"===g)p={x:d[0],y:d[1],z:d[2]};else if("XYM"===g)p={x:d[0],y:d[1],m:d[2]};else if("XYZM"===g)p={x:d[0],y:d[1],z:d[2],m:d[3]};else{if("XY"!==g)throw new Error("Invalid geometry layout");p={x:d[0],y:d[1]}}return p},LineString:function writeLineStringGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,paths:[c.getCoordinates()]}},Polygon:function writePolygonGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,rings:c.getCoordinates(!1)}},MultiPoint:function writeMultiPointGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,points:c.getCoordinates()}},MultiLineString:function writeMultiLineStringGeometry$1(c,u){const d=getHasZM(c);return{hasZ:d.hasZ,hasM:d.hasM,paths:c.getCoordinates()}},MultiPolygon:function writeMultiPolygonGeometry$1(c,u){const d=getHasZM(c),p=c.getCoordinates(!1),g=[];for(let c=0;c<p.length;c++)for(let u=p[c].length-1;u>=0;u--)g.push(p[c][u]);return{hasZ:d.hasZ,hasM:d.hasM,rings:g}}};function readGeometry$1(c,u){if(!c)return null;let d;if("number"==typeof c.x&&"number"==typeof c.y)d="Point";else if(c.points)d="MultiPoint";else if(c.paths){d=1===c.paths.length?"LineString":"MultiLineString"}else if(c.rings){const u=c,p=getGeometryLayout(u),g=function convertRings(c,u){const d=[],p=[],g=[];let f,_;for(f=0,_=c.length;f<_;++f){d.length=0,deflateCoordinates(d,0,c[f],u.length);linearRingIsClockwise(d,0,d.length,u.length)?p.push([c[f]]):g.push(c[f])}for(;g.length;){const c=g.shift();let u=!1;for(f=p.length-1;f>=0;f--){const d=p[f][0];if(containsExtent(new nr(d).getExtent(),new nr(c).getExtent())){p[f].push(c),u=!0;break}}u||p.push([c.reverse()])}return p}(u.rings,p);1===g.length?(d="Polygon",c=Object.assign({},c,{rings:g[0]})):(d="MultiPolygon",c=Object.assign({},c,{rings:g}))}return transformGeometryWithOptions((0,Fa[d])(c),!1,u)}function getGeometryLayout(c){let u="XY";return!0===c.hasZ&&!0===c.hasM?u="XYZM":!0===c.hasZ?u="XYZ":!0===c.hasM&&(u="XYM"),u}function getHasZM(c){const u=c.getLayout();return{hasZ:"XYZ"===u||"XYZM"===u,hasM:"XYM"===u||"XYZM"===u}}function writeGeometry$1(c,u){return(0,ka[c.getType()])(transformGeometryWithOptions(c,!0,u),u)}var Oa=class EsriJSON extends JSONFeature{constructor(c){c=c||{},super(),this.geometryName_=c.geometryName}readFeatureFromObject(c,u,d){const p=c,g=readGeometry$1(p.geometry,u),f=new Ii;if(this.geometryName_&&f.setGeometryName(this.geometryName_),f.setGeometry(g),p.attributes){f.setProperties(p.attributes,!0);const c=p.attributes[d];void 0!==c&&f.setId(c)}return f}readFeaturesFromObject(c,u){if(u=u||{},c.features){const d=[],p=c.features;for(let g=0,f=p.length;g<f;++g)d.push(this.readFeatureFromObject(p[g],u,c.objectIdFieldName));return d}return[this.readFeatureFromObject(c,u)]}readGeometryFromObject(c,u){return readGeometry$1(c,u)}readProjectionFromObject(c){if(c.spatialReference&&void 0!==c.spatialReference.wkid){return get$2("EPSG:"+c.spatialReference.wkid)}return null}writeGeometryObject(c,u){return writeGeometry$1(c,this.adaptOptions(u))}writeFeatureObject(c,u){u=this.adaptOptions(u);const d={};if(!c.hasProperties())return d.attributes={},d;const p=c.getProperties(),g=c.getGeometry();if(g){d.geometry=writeGeometry$1(g,u);const f=u&&(u.dataProjection||u.featureProjection);f&&(d.geometry.spatialReference={wkid:Number(get$2(f).getCode().split(":").pop())}),delete p[c.getGeometryName()]}return isEmpty$1(p)?d.attributes={}:d.attributes=p,d}writeFeaturesObject(c,u){u=this.adaptOptions(u);const d=[];for(let p=0,g=c.length;p<g;++p)d.push(this.writeFeatureObject(c[p],u));return{features:d}}};function readGeometryInternal(c,u){if(!c)return null;let d;switch(c.type){case"Point":d=function readPointGeometry$1(c){const u=c.coordinates;return{type:"Point",flatCoordinates:u,layout:getLayoutForStride(u.length)}}(c);break;case"LineString":d=function readLineStringGeometry$1(c){const u=c.coordinates,d=u.flat();return{type:"LineString",flatCoordinates:d,ends:[d.length],layout:getLayoutForStride(u[0]?.length||2)}}(c);break;case"Polygon":d=function readPolygonGeometry$1(c){const u=c.coordinates,d=[],p=u[0]?.[0]?.length,g=deflateCoordinatesArray(d,0,u,p);return{type:"Polygon",flatCoordinates:d,ends:g,layout:getLayoutForStride(p)}}(c);break;case"MultiPoint":d=function readMultiPointGeometry$1(c){const u=c.coordinates;return{type:"MultiPoint",flatCoordinates:u.flat(),layout:getLayoutForStride(u[0]?.length||2)}}(c);break;case"MultiLineString":d=function readMultiLineStringGeometry$1(c){const u=c.coordinates,d=u[0]?.[0]?.length||2,p=[],g=deflateCoordinatesArray(p,0,u,d);return{type:"MultiLineString",flatCoordinates:p,ends:g,layout:getLayoutForStride(d)}}(c);break;case"MultiPolygon":d=function readMultiPolygonGeometry$1(c){const u=c.coordinates,d=[],p=u[0]?.[0]?.[0].length||2,g=deflateMultiCoordinatesArray(d,0,u,p);return{type:"MultiPolygon",flatCoordinates:d,ends:g,layout:getLayoutForStride(p)}}(c);break;case"GeometryCollection":d=function readGeometryCollectionGeometry(c,u){const d=c.geometries.map((function(c){return readGeometryInternal(c)}));return d}(c);break;default:throw new Error("Unsupported GeoJSON type: "+c.type)}return d}function writeGeometry(c,u){const d=(c=transformGeometryWithOptions(c,!0,u)).getType();let p;switch(d){case"Point":p=function writePointGeometry(c,u){return{type:"Point",coordinates:c.getCoordinates()}}(c);break;case"LineString":p=function writeLineStringGeometry(c,u){return{type:"LineString",coordinates:c.getCoordinates()}}(c);break;case"Polygon":p=function writePolygonGeometry(c,u){let d;u&&(d=u.rightHanded);return{type:"Polygon",coordinates:c.getCoordinates(d)}}(c,u);break;case"MultiPoint":p=function writeMultiPointGeometry(c,u){return{type:"MultiPoint",coordinates:c.getCoordinates()}}(c);break;case"MultiLineString":p=function writeMultiLineStringGeometry(c,u){return{type:"MultiLineString",coordinates:c.getCoordinates()}}(c);break;case"MultiPolygon":p=function writeMultiPolygonGeometry(c,u){let d;u&&(d=u.rightHanded);return{type:"MultiPolygon",coordinates:c.getCoordinates(d)}}(c,u);break;case"GeometryCollection":p=function writeGeometryCollectionGeometry(c,u){u=Object.assign({},u),delete u.featureProjection;const d=c.getGeometriesArray().map((function(c){return writeGeometry(c,u)}));return{type:"GeometryCollection",geometries:d}}(c,u);break;case"Circle":p={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+d)}return p}var Na=class GeoJSON extends JSONFeature{constructor(c){c=c||{},super(),this.dataProjection=get$2(c.dataProjection?c.dataProjection:"EPSG:4326"),c.featureProjection&&(this.defaultFeatureProjection=get$2(c.featureProjection)),c.featureClass&&(this.featureClass=c.featureClass),this.geometryName_=c.geometryName,this.extractGeometryName_=c.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(c,u){let d=null;d="Feature"===c.type?c:{type:"Feature",geometry:c,properties:null};const p=readGeometryInternal(d.geometry);if(this.featureClass===RenderFeature)return createRenderFeature({geometry:p,id:d.id,properties:d.properties},u);const g=new Ii;return this.geometryName_?g.setGeometryName(this.geometryName_):this.extractGeometryName_&&d.geometry_name&&g.setGeometryName(d.geometry_name),g.setGeometry(createGeometry(p,u)),"id"in d&&g.setId(d.id),d.properties&&g.setProperties(d.properties,!0),g}readFeaturesFromObject(c,u){let d=null;if("FeatureCollection"===c.type){d=[];const p=c.features;for(let c=0,g=p.length;c<g;++c){const g=this.readFeatureFromObject(p[c],u);g&&d.push(g)}}else d=[this.readFeatureFromObject(c,u)];return d.flat()}readGeometryFromObject(c,u){return function readGeometry(c,u){const d=readGeometryInternal(c);return createGeometry(d,u)}(c,u)}readProjectionFromObject(c){const u=c.crs;let d;if(u)if("name"==u.type)d=get$2(u.properties.name);else{if("EPSG"!==u.type)throw new Error("Unknown SRS type");d=get$2("EPSG:"+u.properties.code)}else d=this.dataProjection;return d}writeFeatureObject(c,u){u=this.adaptOptions(u);const d={type:"Feature",geometry:null,properties:null},p=c.getId();if(void 0!==p&&(d.id=p),!c.hasProperties())return d;const g=c.getProperties(),f=c.getGeometry();return f&&(d.geometry=writeGeometry(f,u),delete g[c.getGeometryName()]),isEmpty$1(g)||(d.properties=g),d}writeFeaturesObject(c,u){u=this.adaptOptions(u);const d=[];for(let p=0,g=c.length;p<g;++p)d.push(this.writeFeatureObject(c[p],u));return{type:"FeatureCollection",features:d}}writeGeometryObject(c,u){return writeGeometry(c,this.adaptOptions(u))}};const Da="http://www.w3.org/2001/XMLSchema-instance";function createElementNS(c,u){return getDocument().createElementNS(c,u)}function getAllTextContent(c,u){return getAllTextContent_(c,u,[]).join("")}function getAllTextContent_(c,u,d){if(c.nodeType==Node.CDATA_SECTION_NODE||c.nodeType==Node.TEXT_NODE)d.push(c.nodeValue);else{let p;for(p=c.firstChild;p;p=p.nextSibling)getAllTextContent_(p,u,d)}return d}function isDocument(c){return"documentElement"in c}function parse$1(c){return(new DOMParser).parseFromString(c,"application/xml")}function makeArrayExtender(c,u){return function(d,p){const g=c.call(u??this,d,p);if(void 0!==g){extend$3(p[p.length-1],g)}}}function makeArrayPusher(c,u){return function(d,p){const g=c.call(u??this,d,p);if(void 0!==g){p[p.length-1].push(g)}}}function makeReplacer(c,u){return function(d,p){const g=c.call(u??this,d,p);void 0!==g&&(p[p.length-1]=g)}}function makeObjectPropertyPusher(c,u,d){return function(u,d){const p=c.call(this,u,d);if(void 0!==p){const c=d[d.length-1],g=u.localName;let f;g in c?f=c[g]:(f=[],c[g]=f),f.push(p)}}}function makeObjectPropertySetter(c,u,d){return function(d,p){const g=c.call(this,d,p);if(void 0!==g){p[p.length-1][void 0!==u?u:d.localName]=g}}}function makeChildAppender(c,u){return function(d,p,g){c.call(u??this,d,p,g);g[g.length-1].node.appendChild(d)}}function makeArraySerializer(c,u){let d,p;return function(u,g,f){if(void 0===d){d={};const g={};g[u.localName]=c,d[u.namespaceURI]=g,p=makeSimpleNodeFactory(u.localName)}serialize(d,p,g,f)}}function makeSimpleNodeFactory(c,u){return function(d,p,g){const f=p[p.length-1].node;let _=c;void 0===_&&(_=g);return createElementNS(void 0!==u?u:f.namespaceURI,_)}}const Ga=makeSimpleNodeFactory();function makeSequence(c,u){const d=u.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=c[u[g]];return p}function makeStructureNS(c,u,d){let p,g;for(d=void 0!==d?d:{},p=0,g=c.length;p<g;++p)d[c[p]]=u;return d}function parseNode(c,u,d,p){let g;for(g=u.firstElementChild;g;g=g.nextElementSibling){const u=c[g.namespaceURI];if(void 0!==u){const c=u[g.localName];void 0!==c&&c.call(p,g,d)}}}function pushParseAndPop(c,u,d,p,g){return p.push(c),parseNode(u,d,p,g),p.pop()}function serialize(c,u,d,p,g,f){const _=(void 0!==g?g:d).length;let y,x;for(let v=0;v<_;++v)y=d[v],void 0!==y&&(x=u.call(f,y,p,void 0!==g?g[v]:void 0),void 0!==x&&c[x.namespaceURI][x.localName].call(f,x,y,p))}function pushSerializeAndPop(c,u,d,p,g,f,_){return g.push(c),serialize(u,d,p,g,f,_),g.pop()}let ja,za;function getDocument(){return void 0===za&&"undefined"!=typeof document&&(za=document.implementation.createDocument("","",null)),za}class XMLFeature extends Aa{constructor(){super(),this.xmlSerializer_=function getXMLSerializer(){return void 0===ja&&"undefined"!=typeof XMLSerializer&&(ja=new XMLSerializer),ja}()}getType(){return"xml"}readFeature(c,u){if(!c)return null;if("string"==typeof c){const d=parse$1(c);return this.readFeatureFromDocument(d,u)}return isDocument(c)?this.readFeatureFromDocument(c,u):this.readFeatureFromNode(c,u)}readFeatureFromDocument(c,u){const d=this.readFeaturesFromDocument(c,u);return d.length>0?d[0]:null}readFeatureFromNode(c,u){return null}readFeatures(c,u){if(!c)return[];if("string"==typeof c){const d=parse$1(c);return this.readFeaturesFromDocument(d,u)}return isDocument(c)?this.readFeaturesFromDocument(c,u):this.readFeaturesFromNode(c,u)}readFeaturesFromDocument(c,u){const d=[];for(let p=c.firstChild;p;p=p.nextSibling)p.nodeType==Node.ELEMENT_NODE&&extend$3(d,this.readFeaturesFromNode(p,u));return d}readFeaturesFromNode(c,u){return abstract()}readGeometry(c,u){if(!c)return null;if("string"==typeof c){const d=parse$1(c);return this.readGeometryFromDocument(d,u)}return isDocument(c)?this.readGeometryFromDocument(c,u):this.readGeometryFromNode(c,u)}readGeometryFromDocument(c,u){return null}readGeometryFromNode(c,u){return null}readProjection(c){if(!c)return null;if("string"==typeof c){const u=parse$1(c);return this.readProjectionFromDocument(u)}return isDocument(c)?this.readProjectionFromDocument(c):this.readProjectionFromNode(c)}readProjectionFromDocument(c){return this.dataProjection}readProjectionFromNode(c){return this.dataProjection}writeFeature(c,u){const d=this.writeFeatureNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeFeatureNode(c,u){return null}writeFeatures(c,u){const d=this.writeFeaturesNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeFeaturesNode(c,u){return null}writeGeometry(c,u){const d=this.writeGeometryNode(c,u);return this.xmlSerializer_.serializeToString(d)}writeGeometryNode(c,u){return null}}const Ba="http://www.opengis.net/gml",Ua=/^\s*$/;class GMLBase extends XMLFeature{constructor(c){super(),c=c||{},this.featureType=c.featureType,this.featureNS=c.featureNS,this.srsName=c.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:makeArrayPusher(this.readFeaturesInternal),featureMembers:makeReplacer(this.readFeaturesInternal)},this.supportedMediaTypes=["application/gml+xml"]}readFeaturesInternal(c,u){const d=c.localName;let p=null;if("FeatureCollection"==d)p=pushParseAndPop([],this.FEATURE_COLLECTION_PARSERS,c,u,this);else if("featureMembers"==d||"featureMember"==d||"member"==d){const g=u[0];let f=g.featureType,_=g.featureNS;const y="p",x="p0";if(!f&&c.childNodes){f=[],_={};for(let u=0,d=c.childNodes.length;u<d;++u){const d=c.childNodes[u];if(1===d.nodeType){const c=d.nodeName.split(":").pop();if(!f.includes(c)){let u="",p=0;const g=d.namespaceURI;for(const c in _){if(_[c]===g){u=c;break}++p}u||(u=y+p,_[u]=g),f.push(u+":"+c)}}}"featureMember"!=d&&(g.featureType=f,g.featureNS=_)}if("string"==typeof _){const c=_;_={},_[x]=c}const v={},C=Array.isArray(f)?f:[f];for(const c in _){const u={};for(let p=0,g=C.length;p<g;++p){(C[p].includes(":")?C[p].split(":")[0]:x)===c&&(u[C[p].split(":").pop()]="featureMembers"==d?makeArrayPusher(this.readFeatureElement,this):makeReplacer(this.readFeatureElement,this))}v[_[c]]=u}p=pushParseAndPop("featureMember"==d||"member"==d?void 0:[],v,c,u)}return null===p&&(p=[]),p}readGeometryOrExtent(c,u){const d=u[0];return d.srsName=c.firstElementChild.getAttribute("srsName"),d.srsDimension=c.firstElementChild.getAttribute("srsDimension"),pushParseAndPop(null,this.GEOMETRY_PARSERS,c,u,this)}readExtentElement(c,u){const d=u[0],p=this.readGeometryOrExtent(c,u);return p?transformExtentWithOptions(p,d):void 0}readGeometryElement(c,u){const d=u[0],p=this.readGeometryOrExtent(c,u);return p?transformGeometryWithOptions(p,!1,d):void 0}readFeatureElementInternal(c,u,d){let p;const g={};for(let f=c.firstElementChild;f;f=f.nextElementSibling){let c;const _=f.localName;0===f.childNodes.length||1===f.childNodes.length&&(3===f.firstChild.nodeType||4===f.firstChild.nodeType)?(c=getAllTextContent(f,!1),Ua.test(c)&&(c=void 0)):(d&&(c="boundedBy"===_?this.readExtentElement(f,u):this.readGeometryElement(f,u)),c?"boundedBy"!==_&&(p=_):c=this.readFeatureElementInternal(f,u,!1));const y=f.attributes.length;if(y>0&&!(c instanceof ir)){c={_content_:c};for(let u=0;u<y;u++){c[f.attributes[u].name]=f.attributes[u].value}}g[_]?(g[_]instanceof Array||(g[_]=[g[_]]),g[_].push(c)):g[_]=c}if(!d)return g;const f=new Ii(g);p&&f.setGeometryName(p);const _=c.getAttribute("fid")||function getAttributeNS(c,u,d){return c.getAttributeNS(u,d)||""}(c,this.namespace,"id");return _&&f.setId(_),f}readFeatureElement(c,u){return this.readFeatureElementInternal(c,u,!0)}readPoint(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d)return new sr(d,"XYZ")}readMultiPoint(c,u){const d=pushParseAndPop([],this.MULTIPOINT_PARSERS,c,u,this);if(d)return new Vs(d)}readMultiLineString(c,u){const d=pushParseAndPop([],this.MULTILINESTRING_PARSERS,c,u,this);if(d)return new Xs(d)}readMultiPolygon(c,u){const d=pushParseAndPop([],this.MULTIPOLYGON_PARSERS,c,u,this);if(d)return new qs(d)}pointMemberParser(c,u){parseNode(this.POINTMEMBER_PARSERS,c,u,this)}lineStringMemberParser(c,u){parseNode(this.LINESTRINGMEMBER_PARSERS,c,u,this)}polygonMemberParser(c,u){parseNode(this.POLYGONMEMBER_PARSERS,c,u,this)}readLineString(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d){return new Jr(d,"XYZ")}}readFlatLinearRing(c,u){const d=pushParseAndPop(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this);if(d)return d}readLinearRing(c,u){const d=this.readFlatCoordinatesFromNode(c,u);if(d)return new nr(d,"XYZ")}readPolygon(c,u){const d=pushParseAndPop([null],this.FLAT_LINEAR_RINGS_PARSERS,c,u,this);if(d&&d[0]){const c=d[0],u=[c.length];let p,g;for(p=1,g=d.length;p<g;++p)extend$3(c,d[p]),u.push(c.length);return new or(c,"XYZ",u)}}readFlatCoordinatesFromNode(c,u){return pushParseAndPop(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this)}readGeometryFromNode(c,u){const d=this.readGeometryElement(c,[this.getReadOptions(c,u||{})]);return d||null}readFeaturesFromNode(c,u){const d={featureType:this.featureType,featureNS:this.featureNS};d&&Object.assign(d,this.getReadOptions(c,u));return this.readFeaturesInternal(c,[d])||[]}readProjectionFromNode(c){return get$2(this.srsName?this.srsName:c.firstElementChild.getAttribute("srsName"))}}function readBoolean(c){return readBooleanString(getAllTextContent(c,!1))}function readBooleanString(c){const u=/^\s*(true|1)|(false|0)\s*$/.exec(c);if(u)return void 0!==u[1]||!1}function readDateTime(c){const u=getAllTextContent(c,!1),d=Date.parse(u);return isNaN(d)?void 0:d/1e3}function readDecimal(c){return readDecimalString(getAllTextContent(c,!1))}function readDecimalString(c){const u=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(c);if(u)return parseFloat(u[1])}function readPositiveInteger(c){return readNonNegativeIntegerString(getAllTextContent(c,!1))}function readNonNegativeIntegerString(c){const u=/^\s*(\d+)\s*$/.exec(c);if(u)return parseInt(u[1],10)}function readString(c){return getAllTextContent(c,!1).trim()}function writeBooleanTextNode(c,u){writeStringTextNode(c,u?"1":"0")}function writeDecimalTextNode(c,u){const d=u.toPrecision();c.appendChild(getDocument().createTextNode(d))}function writeNonNegativeIntegerTextNode(c,u){const d=u.toString();c.appendChild(getDocument().createTextNode(d))}function writeStringTextNode(c,u){c.appendChild(getDocument().createTextNode(u))}GMLBase.prototype.namespace=Ba,GMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},GMLBase.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:makeArrayPusher(GMLBase.prototype.pointMemberParser),pointMembers:makeArrayPusher(GMLBase.prototype.pointMemberParser)}},GMLBase.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:makeArrayPusher(GMLBase.prototype.lineStringMemberParser),lineStringMembers:makeArrayPusher(GMLBase.prototype.lineStringMemberParser)}},GMLBase.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:makeArrayPusher(GMLBase.prototype.polygonMemberParser),polygonMembers:makeArrayPusher(GMLBase.prototype.polygonMemberParser)}},GMLBase.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode)}},GMLBase.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:makeArrayPusher(GMLBase.prototype.readLineString)}},GMLBase.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon)}},GMLBase.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing)}};const $a=Ba+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Wa={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class GML2 extends GMLBase{constructor(c){super(c=c||{}),this.FEATURE_COLLECTION_PARSERS[Ba].featureMember=makeArrayPusher(this.readFeaturesInternal),this.schemaLocation=c.schemaLocation?c.schemaLocation:$a}readFlatCoordinates(c,u){const d=getAllTextContent(c,!1).replace(/^\s*|\s*$/g,""),p=u[0].srsName;let g="enu";if(p){const c=get$2(p);c&&(g=c.getAxisOrientation())}const f=d.trim().split(/\s+/),_=[];for(let c=0,u=f.length;c<u;c++){const u=f[c].split(/,+/),d=parseFloat(u[0]),p=parseFloat(u[1]),y=3===u.length?parseFloat(u[2]):0;g.startsWith("en")?_.push(d,p,y):_.push(p,d,y)}return _}readBox(c,u){const d=pushParseAndPop([null],this.BOX_PARSERS_,c,u,this);return createOrUpdate$2(d[1][0],d[1][1],d[1][3],d[1][4])}innerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1].push(d)}}outerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1][0]=d}}GEOMETRY_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.multiSurface,f=p.surface,_=p.multiCurve;return Array.isArray(c)?d="Envelope":"MultiPolygon"===(d=c.getType())&&!0===g?d="MultiSurface":"Polygon"===d&&!0===f?d="Surface":"MultiLineString"===d&&!0===_&&(d="MultiCurve"),createElementNS("http://www.opengis.net/gml",d)}writeFeatureElement(c,u,d){const p=u.getId();p&&c.setAttribute("fid",p);const g=d[d.length-1],f=g.featureNS,_=u.getGeometryName();g.serializers||(g.serializers={},g.serializers[f]={});const y=[],x=[];if(u.hasProperties()){const c=u.getProperties();for(const u in c){const d=c[u];null!=d&&(y.push(u),x.push(d),u==_||"function"==typeof d.getSimplifiedGeometry?u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(this.writeGeometryElement,this)):u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(writeStringTextNode)))}}const v=Object.assign({},g);v.node=c,pushSerializeAndPop(v,g.serializers,makeSimpleNodeFactory(void 0,f),x,d,y)}writeCurveOrLineString(c,u,d){const p=d[d.length-1].srsName;if("LineStringSegment"!==c.nodeName&&p&&c.setAttribute("srsName",p),"LineString"===c.nodeName||"LineStringSegment"===c.nodeName){const p=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(p),this.writeCoordinates_(p,u,d)}else if("Curve"===c.nodeName){const p=createElementNS(c.namespaceURI,"segments");c.appendChild(p),this.writeCurveSegments_(p,u,d)}}writeLineStringOrCurveMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeCurveOrLineString(p,u,d))}writeMultiCurveOrLineString(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.curve;f&&c.setAttribute("srsName",f);const y=u.getLineStrings();pushSerializeAndPop({node:c,hasZ:g,srsName:f,curve:_},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeGeometryElement(c,u,d){const p=d[d.length-1],g=Object.assign({},p);let f;g.node=c,f=Array.isArray(u)?transformExtentWithOptions(u,p):transformGeometryWithOptions(u,!0,p),pushSerializeAndPop(g,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[f],d,void 0,this)}createCoordinatesNode_(c){const u=createElementNS(c,"coordinates");return u.setAttribute("decimal","."),u.setAttribute("cs",","),u.setAttribute("ts"," "),u}writeCoordinates_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=u.getCoordinates(),y=_.length,x=new Array(y);for(let c=0;c<y;++c){const u=_[c];x[c]=this.getCoords_(u,f,g)}writeStringTextNode(c,x.join(" "))}writeCurveSegments_(c,u,d){const p=createElementNS(c.namespaceURI,"LineStringSegment");c.appendChild(p),this.writeCurveOrLineString(p,u,d)}writeSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;if("PolygonPatch"!==c.nodeName&&f&&c.setAttribute("srsName",f),"Polygon"===c.nodeName||"PolygonPatch"===c.nodeName){const p=u.getLinearRings();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,p,d,void 0,this)}else if("Surface"===c.nodeName){const p=createElementNS(c.namespaceURI,"patches");c.appendChild(p),this.writeSurfacePatches_(p,u,d)}}RING_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.node,f=p.exteriorWritten;return void 0===f&&(p.exteriorWritten=!0),createElementNS(g.namespaceURI,void 0!==f?"innerBoundaryIs":"outerBoundaryIs")}writeSurfacePatches_(c,u,d){const p=createElementNS(c.namespaceURI,"PolygonPatch");c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d)}writeRing(c,u,d){const p=createElementNS(c.namespaceURI,"LinearRing");c.appendChild(p),this.writeLinearRing(p,u,d)}getCoords_(c,u,d){let p=(u?get$2(u).getAxisOrientation():"enu").startsWith("en")?c[0]+","+c[1]:c[1]+","+c[0];if(d){p+=","+(c[2]||0)}return p}writePoint(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;f&&c.setAttribute("srsName",f);const _=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(_);const y=u.getCoordinates();writeStringTextNode(_,this.getCoords_(y,f,g))}writeMultiPoint(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;f&&c.setAttribute("srsName",f);const _=u.getPoints();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.POINTMEMBER_SERIALIZERS,makeSimpleNodeFactory("pointMember"),_,d,void 0,this)}writePointMember(c,u,d){const p=createElementNS(c.namespaceURI,"Point");c.appendChild(p),this.writePoint(p,u,d)}writeLinearRing(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=this.createCoordinatesNode_(c.namespaceURI);c.appendChild(g),this.writeCoordinates_(g,u,d)}writeMultiSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.surface;f&&c.setAttribute("srsName",f);const y=u.getPolygons();pushSerializeAndPop({node:c,hasZ:g,srsName:f,surface:_},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeSurfaceOrPolygonMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d))}writeEnvelope(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=[u[0]+" "+u[1],u[2]+" "+u[3]];pushSerializeAndPop({node:c},this.ENVELOPE_SERIALIZERS,Ga,g,d,["lowerCorner","upperCorner"],this)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(c,u,d){const p=u[u.length-1].node;return createElementNS("http://www.opengis.net/gml",Wa[p.nodeName])}}GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML2.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:GML2.prototype.innerBoundaryIsParser,outerBoundaryIs:GML2.prototype.outerBoundaryIsParser}},GML2.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:makeArrayPusher(GML2.prototype.readFlatCoordinates)}},GML2.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Box:makeReplacer(GML2.prototype.readBox)}},GML2.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:makeChildAppender(GML2.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML2.prototype.writePoint),MultiPoint:makeChildAppender(GML2.prototype.writeMultiPoint),LineString:makeChildAppender(GML2.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML2.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML2.prototype.writeLinearRing),Polygon:makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML2.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML2.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML2.prototype.writeEnvelope)}},GML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:makeChildAppender(GML2.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML2.prototype.writeLineStringOrCurveMember)}},GML2.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:makeChildAppender(GML2.prototype.writeRing),innerBoundaryIs:makeChildAppender(GML2.prototype.writeRing)}},GML2.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:makeChildAppender(GML2.prototype.writePointMember)}},GML2.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML2.prototype.writeSurfaceOrPolygonMember)}},GML2.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}};const Xa=Ba+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Va={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};class GML3 extends GMLBase{constructor(c){super(c=c||{}),this.surface_=void 0!==c.surface&&c.surface,this.curve_=void 0!==c.curve&&c.curve,this.multiCurve_=void 0===c.multiCurve||c.multiCurve,this.multiSurface_=void 0===c.multiSurface||c.multiSurface,this.schemaLocation=c.schemaLocation?c.schemaLocation:Xa,this.hasZ=void 0!==c.hasZ&&c.hasZ}readMultiCurve(c,u){const d=pushParseAndPop([],this.MULTICURVE_PARSERS,c,u,this);if(d){return new Xs(d)}}readFlatCurveRing(c,u){const d=pushParseAndPop([],this.MULTICURVE_PARSERS,c,u,this),p=[];for(let c=0,u=d.length;c<u;++c)extend$3(p,d[c].getFlatCoordinates());return p}readMultiSurface(c,u){const d=pushParseAndPop([],this.MULTISURFACE_PARSERS,c,u,this);if(d)return new qs(d)}curveMemberParser(c,u){parseNode(this.CURVEMEMBER_PARSERS,c,u,this)}surfaceMemberParser(c,u){parseNode(this.SURFACEMEMBER_PARSERS,c,u,this)}readPatch(c,u){return pushParseAndPop([null],this.PATCHES_PARSERS,c,u,this)}readSegment(c,u){return pushParseAndPop([],this.SEGMENTS_PARSERS,c,u,this)}readPolygonPatch(c,u){return pushParseAndPop([null],this.FLAT_LINEAR_RINGS_PARSERS,c,u,this)}readLineStringSegment(c,u){return pushParseAndPop([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,c,u,this)}interiorParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1].push(d)}}exteriorParser(c,u){const d=pushParseAndPop(void 0,this.RING_PARSERS,c,u,this);if(d){u[u.length-1][0]=d}}readSurface(c,u){const d=pushParseAndPop([null],this.SURFACE_PARSERS,c,u,this);if(d&&d[0]){const c=d[0],u=[c.length];let p,g;for(p=1,g=d.length;p<g;++p)extend$3(c,d[p]),u.push(c.length);return new or(c,"XYZ",u)}}readCurve(c,u){const d=pushParseAndPop([null],this.CURVE_PARSERS,c,u,this);if(d){return new Jr(d,"XYZ")}}readEnvelope(c,u){const d=pushParseAndPop([null],this.ENVELOPE_PARSERS,c,u,this);return createOrUpdate$2(d[1][0],d[1][1],d[2][0],d[2][1])}readFlatPos(c,u){let d=getAllTextContent(c,!1);const p=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,g=[];let f;for(;f=p.exec(d);)g.push(parseFloat(f[1])),d=d.substr(f[0].length);if(""!==d)return;const _=u[0].srsName;if("neu"===(_?get$2(_).getAxisOrientation():"enu"))for(let c=0,u=g.length;c<u;c+=3){const u=g[c],d=g[c+1];g[c]=d,g[c+1]=u}const y=g.length;return 2==y&&g.push(0),0!==y?g:void 0}readFlatPosList(c,u){const d=getAllTextContent(c,!1).replace(/^\s*|\s*$/g,""),p=u[0],g=p.srsName,f=p.srsDimension,_=g?get$2(g).getAxisOrientation():"enu",y=d.split(/\s+/);let x=2;c.getAttribute("srsDimension")?x=readNonNegativeIntegerString(c.getAttribute("srsDimension")):c.getAttribute("dimension")?x=readNonNegativeIntegerString(c.getAttribute("dimension")):c.parentNode.getAttribute("srsDimension")?x=readNonNegativeIntegerString(c.parentNode.getAttribute("srsDimension")):f&&(x=readNonNegativeIntegerString(f));const v=_.startsWith("en");let C,M,T;const L=[];for(let c=0,u=y.length;c<u;c+=x)C=parseFloat(y[c]),M=parseFloat(y[c+1]),T=3===x?parseFloat(y[c+2]):0,v?L.push(C,M,T):L.push(M,C,T);return L}writePos_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=g?"3":"2";c.setAttribute("srsDimension",f);const _=p.srsName,y=_?get$2(_).getAxisOrientation():"enu",x=u.getCoordinates();let v=y.startsWith("en")?x[0]+" "+x[1]:x[1]+" "+x[0];if(g){v+=" "+(x[2]||0)}writeStringTextNode(c,v)}getCoords_(c,u,d){let p=(u?get$2(u).getAxisOrientation():"enu").startsWith("en")?c[0]+" "+c[1]:c[1]+" "+c[0];if(d){p+=" "+(c[2]||0)}return p}writePosList_(c,u,d){const p=d[d.length-1],g=p.hasZ,f=g?"3":"2";c.setAttribute("srsDimension",f);const _=p.srsName,y=u.getCoordinates(),x=y.length,v=new Array(x);let C;for(let c=0;c<x;++c)C=y[c],v[c]=this.getCoords_(C,_,g);writeStringTextNode(c,v.join(" "))}writePoint(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=createElementNS(c.namespaceURI,"pos");c.appendChild(g),this.writePos_(g,u,d)}writeEnvelope(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=[u[0]+" "+u[1],u[2]+" "+u[3]];pushSerializeAndPop({node:c},this.ENVELOPE_SERIALIZERS,Ga,g,d,["lowerCorner","upperCorner"],this)}writeLinearRing(c,u,d){const p=d[d.length-1].srsName;p&&c.setAttribute("srsName",p);const g=createElementNS(c.namespaceURI,"posList");c.appendChild(g),this.writePosList_(g,u,d)}RING_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.node,f=p.exteriorWritten;return void 0===f&&(p.exteriorWritten=!0),createElementNS(g.namespaceURI,void 0!==f?"interior":"exterior")}writeSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName;if("PolygonPatch"!==c.nodeName&&f&&c.setAttribute("srsName",f),"Polygon"===c.nodeName||"PolygonPatch"===c.nodeName){const p=u.getLinearRings();pushSerializeAndPop({node:c,hasZ:g,srsName:f},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,p,d,void 0,this)}else if("Surface"===c.nodeName){const p=createElementNS(c.namespaceURI,"patches");c.appendChild(p),this.writeSurfacePatches_(p,u,d)}}writeCurveOrLineString(c,u,d){const p=d[d.length-1].srsName;if("LineStringSegment"!==c.nodeName&&p&&c.setAttribute("srsName",p),"LineString"===c.nodeName||"LineStringSegment"===c.nodeName){const p=createElementNS(c.namespaceURI,"posList");c.appendChild(p),this.writePosList_(p,u,d)}else if("Curve"===c.nodeName){const p=createElementNS(c.namespaceURI,"segments");c.appendChild(p),this.writeCurveSegments_(p,u,d)}}writeMultiSurfaceOrPolygon(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.surface;f&&c.setAttribute("srsName",f);const y=u.getPolygons();pushSerializeAndPop({node:c,hasZ:g,srsName:f,surface:_},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeMultiPoint(c,u,d){const p=d[d.length-1],g=p.srsName,f=p.hasZ;g&&c.setAttribute("srsName",g);const _=u.getPoints();pushSerializeAndPop({node:c,hasZ:f,srsName:g},this.POINTMEMBER_SERIALIZERS,makeSimpleNodeFactory("pointMember"),_,d,void 0,this)}writeMultiCurveOrLineString(c,u,d){const p=d[d.length-1],g=p.hasZ,f=p.srsName,_=p.curve;f&&c.setAttribute("srsName",f);const y=u.getLineStrings();pushSerializeAndPop({node:c,hasZ:g,srsName:f,curve:_},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,y,d,void 0,this)}writeRing(c,u,d){const p=createElementNS(c.namespaceURI,"LinearRing");c.appendChild(p),this.writeLinearRing(p,u,d)}writeSurfaceOrPolygonMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d))}writePointMember(c,u,d){const p=createElementNS(c.namespaceURI,"Point");c.appendChild(p),this.writePoint(p,u,d)}writeLineStringOrCurveMember(c,u,d){const p=this.GEOMETRY_NODE_FACTORY_(u,d);p&&(c.appendChild(p),this.writeCurveOrLineString(p,u,d))}writeSurfacePatches_(c,u,d){const p=createElementNS(c.namespaceURI,"PolygonPatch");c.appendChild(p),this.writeSurfaceOrPolygon(p,u,d)}writeCurveSegments_(c,u,d){const p=createElementNS(c.namespaceURI,"LineStringSegment");c.appendChild(p),this.writeCurveOrLineString(p,u,d)}writeGeometryElement(c,u,d){const p=d[d.length-1],g=Object.assign({},p);let f;g.node=c,f=Array.isArray(u)?transformExtentWithOptions(u,p):transformGeometryWithOptions(u,!0,p),pushSerializeAndPop(g,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[f],d,void 0,this)}writeFeatureElement(c,u,d){const p=u.getId();p&&c.setAttribute("fid",p);const g=d[d.length-1],f=g.featureNS,_=u.getGeometryName();g.serializers||(g.serializers={},g.serializers[f]={});const y=[],x=[];if(u.hasProperties()){const c=u.getProperties();for(const u in c){const d=c[u];null!=d&&(y.push(u),x.push(d),u==_||"function"==typeof d.getSimplifiedGeometry?u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(this.writeGeometryElement,this)):u in g.serializers[f]||(g.serializers[f][u]=makeChildAppender(writeStringTextNode)))}}const v=Object.assign({},g);v.node=c,pushSerializeAndPop(v,g.serializers,makeSimpleNodeFactory(void 0,f),x,d,y)}writeFeatureMembers_(c,u,d){const p=d[d.length-1],g=p.featureType,f=p.featureNS,_={};_[f]={},_[f][g]=makeChildAppender(this.writeFeatureElement,this);const y=Object.assign({},p);y.node=c,pushSerializeAndPop(y,_,makeSimpleNodeFactory(g,f),u,d)}MULTIGEOMETRY_MEMBER_NODE_FACTORY_(c,u,d){const p=u[u.length-1].node;return createElementNS(this.namespace,Va[p.nodeName])}GEOMETRY_NODE_FACTORY_(c,u,d){const p=u[u.length-1],g=p.multiSurface,f=p.surface,_=p.curve,y=p.multiCurve;return Array.isArray(c)?d="Envelope":"MultiPolygon"===(d=c.getType())&&!0===g?d="MultiSurface":"Polygon"===d&&!0===f?d="Surface":"LineString"===d&&!0===_?d="Curve":"MultiLineString"===d&&!0===y&&(d="MultiCurve"),createElementNS(this.namespace,d)}writeGeometryNode(c,u){u=this.adaptOptions(u);const d=createElementNS(this.namespace,"geom"),p={node:d,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return u&&Object.assign(p,u),this.writeGeometryElement(d,c,[p]),d}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS(this.namespace,"featureMembers");d.setAttributeNS(Da,"xsi:schemaLocation",this.schemaLocation);const p={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return u&&Object.assign(p,u),this.writeFeatureMembers_(d,c,[p]),d}}GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:makeReplacer(GML3.prototype.readFlatPos),posList:makeReplacer(GML3.prototype.readFlatPosList),coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML3.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:GML3.prototype.interiorParser,exterior:GML3.prototype.exteriorParser}},GML3.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Surface:makeReplacer(GML3.prototype.readSurface),MultiSurface:makeReplacer(GML3.prototype.readMultiSurface),Curve:makeReplacer(GML3.prototype.readCurve),MultiCurve:makeReplacer(GML3.prototype.readMultiCurve),Envelope:makeReplacer(GML3.prototype.readEnvelope)}},GML3.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:makeArrayPusher(GML3.prototype.curveMemberParser),curveMembers:makeArrayPusher(GML3.prototype.curveMemberParser)}},GML3.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:makeArrayPusher(GML3.prototype.surfaceMemberParser),surfaceMembers:makeArrayPusher(GML3.prototype.surfaceMemberParser)}},GML3.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:makeArrayPusher(GMLBase.prototype.readLineString),Curve:makeArrayPusher(GML3.prototype.readCurve)}},GML3.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon),Surface:makeArrayPusher(GML3.prototype.readSurface)}},GML3.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:makeReplacer(GML3.prototype.readPatch)}},GML3.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:makeReplacer(GML3.prototype.readSegment)}},GML3.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:makeArrayPusher(GML3.prototype.readFlatPosList),upperCorner:makeArrayPusher(GML3.prototype.readFlatPosList)}},GML3.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:makeReplacer(GML3.prototype.readPolygonPatch)}},GML3.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:makeArrayExtender(GML3.prototype.readLineStringSegment)}},GMLBase.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing),Ring:makeReplacer(GML3.prototype.readFlatCurveRing)}},GML3.prototype.writeFeatures,GML3.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:makeChildAppender(GML3.prototype.writeRing),interior:makeChildAppender(GML3.prototype.writeRing)}},GML3.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}},GML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember)}},GML3.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:makeChildAppender(GML3.prototype.writePointMember)}},GML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember)}},GML3.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML3.prototype.writePoint),MultiPoint:makeChildAppender(GML3.prototype.writeMultiPoint),LineString:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML3.prototype.writeLinearRing),Polygon:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML3.prototype.writeEnvelope)}};const qa=GML3;qa.prototype.writeFeatures,qa.prototype.writeFeaturesNode;var Ya=qa;const Za=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Ka={rte:readRte,trk:readTrk,wpt:readWpt},Ha=makeStructureNS(Za,{rte:makeArrayPusher(readRte),trk:makeArrayPusher(readTrk),wpt:makeArrayPusher(readWpt)}),Ja=makeStructureNS(Za,{text:makeObjectPropertySetter(readString,"linkText"),type:makeObjectPropertySetter(readString,"linkType")}),Qa=makeStructureNS(Za,{name:makeObjectPropertySetter(readString),email:function parseEmail(c,u){const d=u[u.length-1],p=c.getAttribute("id"),g=c.getAttribute("domain");null!==p&&null!==g&&(d.email=`${p}@${g}`)},link:parseLink}),tl=makeStructureNS(Za,{name:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),author:makeObjectPropertySetter((function readAuthor(c,u){const d=pushParseAndPop({},Qa,c,u);if(d)return d;return})),copyright:makeObjectPropertySetter((function readCopyright(c,u){const d=pushParseAndPop({},el,c,u);if(d){const u=c.getAttribute("author");return null!==u&&(d.author=u),d}return})),link:parseLink,time:makeObjectPropertySetter(readDateTime),keywords:makeObjectPropertySetter(readString),bounds:function parseBounds(c,u){const d=u[u.length-1],p=c.getAttribute("minlat"),g=c.getAttribute("minlon"),f=c.getAttribute("maxlat"),_=c.getAttribute("maxlon");null!==g&&null!==p&&null!==_&&null!==f&&(d.bounds=[[parseFloat(g),parseFloat(p)],[parseFloat(_),parseFloat(f)]])},extensions:parseExtensions}),el=makeStructureNS(Za,{year:makeObjectPropertySetter(readPositiveInteger),license:makeObjectPropertySetter(readString)}),il=makeStructureNS(Za,{rte:makeChildAppender((function writeRte(c,u,d){const p=d[0],g=u.getProperties(),f={node:c};f.properties=g;const _=u.getGeometry();if("LineString"==_.getType()){const c=transformGeometryWithOptions(_,!0,p);f.geometryLayout=c.getLayout(),g.rtept=c.getCoordinates()}const y=d[d.length-1].node,x=ul[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(f,dl,Ga,v,d,x)})),trk:makeChildAppender((function writeTrk(c,u,d){const p=d[0],g=u.getProperties(),f={node:c};f.properties=g;const _=u.getGeometry();if("MultiLineString"==_.getType()){const c=transformGeometryWithOptions(_,!0,p);g.trkseg=c.getLineStrings()}const y=d[d.length-1].node,x=gl[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(f,ml,Ga,v,d,x)})),wpt:makeChildAppender((function writeWpt(c,u,d){const p=d[0],g=d[d.length-1];g.properties=u.getProperties();const f=u.getGeometry();if("Point"==f.getType()){const u=transformGeometryWithOptions(f,!0,p);g.geometryLayout=u.getLayout(),writeWptType(c,u.getCoordinates(),d)}}))});const rl=makeStructureNS(Za,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions,type:makeObjectPropertySetter(readString),rtept:function parseRtePt(c,u){const d=pushParseAndPop({},nl,c,u);if(d){const p=u[u.length-1];appendCoordinate(p.flatCoordinates,p.layoutOptions,c,d)}}}),nl=makeStructureNS(Za,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),sl=makeStructureNS(Za,{name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,number:makeObjectPropertySetter(readPositiveInteger),type:makeObjectPropertySetter(readString),extensions:parseExtensions,trkseg:function parseTrkSeg(c,u){const d=u[u.length-1];parseNode(ol,c,u);const p=d.flatCoordinates;d.ends.push(p.length)}}),ol=makeStructureNS(Za,{trkpt:function parseTrkPt(c,u){const d=pushParseAndPop({},al,c,u);if(d){const p=u[u.length-1];appendCoordinate(p.flatCoordinates,p.layoutOptions,c,d)}}}),al=makeStructureNS(Za,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime)}),ll=makeStructureNS(Za,{ele:makeObjectPropertySetter(readDecimal),time:makeObjectPropertySetter(readDateTime),magvar:makeObjectPropertySetter(readDecimal),geoidheight:makeObjectPropertySetter(readDecimal),name:makeObjectPropertySetter(readString),cmt:makeObjectPropertySetter(readString),desc:makeObjectPropertySetter(readString),src:makeObjectPropertySetter(readString),link:parseLink,sym:makeObjectPropertySetter(readString),type:makeObjectPropertySetter(readString),fix:makeObjectPropertySetter(readString),sat:makeObjectPropertySetter(readPositiveInteger),hdop:makeObjectPropertySetter(readDecimal),vdop:makeObjectPropertySetter(readDecimal),pdop:makeObjectPropertySetter(readDecimal),ageofdgpsdata:makeObjectPropertySetter(readDecimal),dgpsid:makeObjectPropertySetter(readPositiveInteger),extensions:parseExtensions}),hl=["text","type"],cl=makeStructureNS(Za,{text:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode)}),ul=makeStructureNS(Za,["name","cmt","desc","src","link","number","type","rtept"]),dl=makeStructureNS(Za,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),rtept:makeArraySerializer(makeChildAppender(writeWptType))}),pl=makeStructureNS(Za,["ele","time"]),gl=makeStructureNS(Za,["name","cmt","desc","src","link","number","type","trkseg"]),ml=makeStructureNS(Za,{name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),number:makeChildAppender(writeNonNegativeIntegerTextNode),type:makeChildAppender(writeStringTextNode),trkseg:makeArraySerializer(makeChildAppender((function writeTrkSeg(c,u,d){const p={node:c};p.geometryLayout=u.getLayout(),p.properties={},pushSerializeAndPop(p,_l,fl,u.getCoordinates(),d)})))}),fl=makeSimpleNodeFactory("trkpt"),_l=makeStructureNS(Za,{trkpt:makeChildAppender(writeWptType)}),yl=makeStructureNS(Za,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),xl=makeStructureNS(Za,{ele:makeChildAppender(writeDecimalTextNode),time:makeChildAppender((function writeDateTimeTextNode(c,u){const d=new Date(1e3*u),p=d.getUTCFullYear()+"-"+padNumber(d.getUTCMonth()+1,2)+"-"+padNumber(d.getUTCDate(),2)+"T"+padNumber(d.getUTCHours(),2)+":"+padNumber(d.getUTCMinutes(),2)+":"+padNumber(d.getUTCSeconds(),2)+"Z";c.appendChild(getDocument().createTextNode(p))})),magvar:makeChildAppender(writeDecimalTextNode),geoidheight:makeChildAppender(writeDecimalTextNode),name:makeChildAppender(writeStringTextNode),cmt:makeChildAppender(writeStringTextNode),desc:makeChildAppender(writeStringTextNode),src:makeChildAppender(writeStringTextNode),link:makeChildAppender(writeLink),sym:makeChildAppender(writeStringTextNode),type:makeChildAppender(writeStringTextNode),fix:makeChildAppender(writeStringTextNode),sat:makeChildAppender(writeNonNegativeIntegerTextNode),hdop:makeChildAppender(writeDecimalTextNode),vdop:makeChildAppender(writeDecimalTextNode),pdop:makeChildAppender(writeDecimalTextNode),ageofdgpsdata:makeChildAppender(writeDecimalTextNode),dgpsid:makeChildAppender(writeNonNegativeIntegerTextNode)}),vl={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function GPX_NODE_FACTORY(c,u,d){const p=c.getGeometry();if(p){const c=vl[p.getType()];if(c){return createElementNS(u[u.length-1].node.namespaceURI,c)}}}function appendCoordinate(c,u,d,p){return c.push(parseFloat(d.getAttribute("lon")),parseFloat(d.getAttribute("lat"))),"ele"in p?(c.push(p.ele),delete p.ele,u.hasZ=!0):c.push(0),"time"in p?(c.push(p.time),delete p.time,u.hasM=!0):c.push(0),c}function applyLayoutOptions(c,u,d){let p="XY",g=2;if(c.hasZ&&c.hasM?(p="XYZM",g=4):c.hasZ?(p="XYZ",g=3):c.hasM&&(p="XYM",g=3),4!==g){for(let d=0,p=u.length/4;d<p;d++)u[d*g]=u[4*d],u[d*g+1]=u[4*d+1],c.hasZ&&(u[d*g+2]=u[4*d+2]),c.hasM&&(u[d*g+2]=u[4*d+3]);if(u.length=u.length/4*g,d)for(let c=0,u=d.length;c<u;c++)d[c]=d[c]/4*g}return p}function parseLink(c,u){const d=u[u.length-1],p=c.getAttribute("href");null!==p&&(d.link=p),parseNode(Ja,c,u)}function parseExtensions(c,u){u[u.length-1].extensionsNode_=c}function readRte(c,u){const d=u[0],p=pushParseAndPop({flatCoordinates:[],layoutOptions:{}},rl,c,u);if(!p)return;const g=p.flatCoordinates;delete p.flatCoordinates;const f=p.layoutOptions;delete p.layoutOptions;const _=applyLayoutOptions(f,g),y=new Jr(g,_);transformGeometryWithOptions(y,!1,d);const x=new Ii(y);return x.setProperties(p,!0),x}function readTrk(c,u){const d=u[0],p=pushParseAndPop({flatCoordinates:[],ends:[],layoutOptions:{}},sl,c,u);if(!p)return;const g=p.flatCoordinates;delete p.flatCoordinates;const f=p.ends;delete p.ends;const _=p.layoutOptions;delete p.layoutOptions;const y=applyLayoutOptions(_,g,f),x=new Xs(g,y,f);transformGeometryWithOptions(x,!1,d);const v=new Ii(x);return v.setProperties(p,!0),v}function readWpt(c,u){const d=u[0],p=pushParseAndPop({},ll,c,u);if(!p)return;const g={},f=appendCoordinate([],g,c,p),_=applyLayoutOptions(g,f),y=new sr(f,_);transformGeometryWithOptions(y,!1,d);const x=new Ii(y);return x.setProperties(p,!0),x}function writeLink(c,u,d){c.setAttribute("href",u);const p=d[d.length-1].properties,g=[p.linkText,p.linkType];pushSerializeAndPop({node:c},cl,Ga,g,d,hl)}function writeWptType(c,u,d){const p=d[d.length-1],g=p.node.namespaceURI,f=p.properties;c.setAttributeNS(null,"lat",String(u[1])),c.setAttributeNS(null,"lon",String(u[0]));switch(p.geometryLayout){case"XYZM":0!==u[3]&&(f.time=u[3]);case"XYZ":0!==u[2]&&(f.ele=u[2]);break;case"XYM":0!==u[2]&&(f.time=u[2])}const _="rtept"==c.nodeName?pl[g]:yl[g],y=makeSequence(f,_);pushSerializeAndPop({node:c,properties:f},xl,Ga,y,d,_)}var Sl=class GPX extends XMLFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.readExtensions_=c.readExtensions}handleReadExtensions_(c){c||(c=[]);for(let u=0,d=c.length;u<d;++u){const d=c[u];if(this.readExtensions_){const c=d.get("extensionsNode_")||null;this.readExtensions_(d,c)}d.set("extensionsNode_",void 0)}}readMetadata(c){return c?"string"==typeof c?this.readMetadataFromDocument(parse$1(c)):isDocument(c)?this.readMetadataFromDocument(c):this.readMetadataFromNode(c):null}readMetadataFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType===Node.ELEMENT_NODE){const c=this.readMetadataFromNode(u);if(c)return c}return null}readMetadataFromNode(c){if(!Za.includes(c.namespaceURI))return null;for(let u=c.firstElementChild;u;u=u.nextElementSibling)if(Za.includes(u.namespaceURI)&&"metadata"===u.localName)return pushParseAndPop({},tl,u,[]);return null}readFeatureFromNode(c,u){if(!Za.includes(c.namespaceURI))return null;const d=Ka[c.localName];if(!d)return null;const p=d(c,[this.getReadOptions(c,u)]);return p?(this.handleReadExtensions_([p]),p):null}readFeaturesFromNode(c,u){if(!Za.includes(c.namespaceURI))return[];if("gpx"==c.localName){const d=pushParseAndPop([],Ha,c,[this.getReadOptions(c,u)]);return d?(this.handleReadExtensions_(d),d):[]}return[]}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS("http://www.topografix.com/GPX/1/1","gpx");return d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",Da),d.setAttributeNS(Da,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),d.setAttribute("version","1.1"),d.setAttribute("creator","OpenLayers"),pushSerializeAndPop({node:d},il,GPX_NODE_FACTORY,c,[u]),d}};class TextFeature extends Aa{constructor(){super()}getType(){return"text"}readFeature(c,u){return this.readFeatureFromText(getText(c),this.adaptOptions(u))}readFeatureFromText(c,u){return abstract()}readFeatures(c,u){return this.readFeaturesFromText(getText(c),this.adaptOptions(u))}readFeaturesFromText(c,u){return abstract()}readGeometry(c,u){return this.readGeometryFromText(getText(c),this.adaptOptions(u))}readGeometryFromText(c,u){return abstract()}readProjection(c){return this.readProjectionFromText(getText(c))}readProjectionFromText(c){return this.dataProjection}writeFeature(c,u){return this.writeFeatureText(c,this.adaptOptions(u))}writeFeatureText(c,u){return abstract()}writeFeatures(c,u){return this.writeFeaturesText(c,this.adaptOptions(u))}writeFeaturesText(c,u){return abstract()}writeGeometry(c,u){return this.writeGeometryText(c,this.adaptOptions(u))}writeGeometryText(c,u){return abstract()}}function getText(c){return"string"==typeof c?c:""}const wl=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Cl=/^H.([A-Z]{3}).*?:(.*)/,El=/^HFDTE(\d{2})(\d{2})(\d{2})/,Pl=/^HFDTEDATE:(\d{2})(\d{2})(\d{2}),(\d{2})/,bl=/\r\n|\r|\n/;var Ml=class IGC extends TextFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.altitudeMode_=c.altitudeMode?c.altitudeMode:"none",this.lad_=!1,this.lod_=!1,this.ladStart_=0,this.ladStop_=0,this.lodStart_=0,this.lodStop_=0}readFeatureFromText(c,u){const d=this.altitudeMode_,p=c.split(bl),g={},f=[];let _,y,x=2e3,v=0,C=1,M=-1;for(_=0,y=p.length;_<y;++_){const c=p[_];let u;if("B"==c.charAt(0)){if(u=wl.exec(c),u){const p=parseInt(u[1],10),g=parseInt(u[2],10),_=parseInt(u[3],10);let y=parseInt(u[4],10)+parseInt(u[5],10)/6e4;this.lad_&&(y+=parseInt(c.slice(this.ladStart_,this.ladStop_),10)/6e4/10**(this.ladStop_-this.ladStart_)),"S"==u[6]&&(y=-y);let T=parseInt(u[7],10)+parseInt(u[8],10)/6e4;if(this.lod_&&(T+=parseInt(c.slice(this.lodStart_,this.lodStop_),10)/6e4/10**(this.lodStop_-this.lodStart_)),"W"==u[9]&&(T=-T),f.push(T,y),"none"!=d){let c;c="gps"==d?parseInt(u[11],10):"barometric"==d?parseInt(u[12],10):0,f.push(c)}let L=Date.UTC(x,v,C,p,g,_);L<M&&(L=Date.UTC(x,v,C+1,p,g,_)),f.push(L/1e3),M=L}}else if("H"==c.charAt(0))u=Pl.exec(c),u?(C=parseInt(u[1],10),v=parseInt(u[2],10)-1,x=2e3+parseInt(u[3],10)):(u=El.exec(c),u?(C=parseInt(u[1],10),v=parseInt(u[2],10)-1,x=2e3+parseInt(u[3],10)):(u=Cl.exec(c),u&&(g[u[1]]=u[2].trim())));else if("I"==c.charAt(0)){const u=parseInt(c.slice(1,3),10);for(let d=0;d<u;d++){const u=c.slice(7+7*d,10+7*d);if("LAD"===u||"LOD"===u){const p=parseInt(c.slice(3+7*d,5+7*d),10)-1,g=parseInt(c.slice(5+7*d,7+7*d),10);"LAD"===u?(this.lad_=!0,this.ladStart_=p,this.ladStop_=g):"LOD"===u&&(this.lod_=!0,this.lodStart_=p,this.lodStop_=g)}}}}if(0===f.length)return null;const T=new Jr(f,"none"==d?"XYM":"XYZM"),L=new Ii(transformGeometryWithOptions(T,!1,u));return L.setProperties(g,!0),L}readFeaturesFromText(c,u){const d=this.readFeatureFromText(c,u);return d?[d]:[]}};const Tl="version1",Rl="version2",Ll="version3",Al={};Al[Tl]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}},Al[Rl]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}},Al[Ll]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}},Al.none={none:{supports:[],formats:[],qualities:[]}};const Il=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,Fl=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,kl=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;const Ol={};Ol[Tl]=function generateVersion1Options(c){let u=c.getComplianceLevelSupportedFeatures();return void 0===u&&(u=Al[Tl].level0),{url:void 0===c.imageInfo["@id"]?void 0:c.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:u.supports,formats:[...u.formats,void 0===c.imageInfo.formats?[]:c.imageInfo.formats],qualities:[...u.qualities,void 0===c.imageInfo.qualities?[]:c.imageInfo.qualities],resolutions:c.imageInfo.scale_factors,tileSize:void 0!==c.imageInfo.tile_width?void 0!==c.imageInfo.tile_height?[c.imageInfo.tile_width,c.imageInfo.tile_height]:[c.imageInfo.tile_width,c.imageInfo.tile_width]:null!=c.imageInfo.tile_height?[c.imageInfo.tile_height,c.imageInfo.tile_height]:void 0}},Ol[Rl]=function generateVersion2Options(c){const u=c.getComplianceLevelSupportedFeatures(),d=Array.isArray(c.imageInfo.profile)&&c.imageInfo.profile.length>1,p=d&&c.imageInfo.profile[1].supports?c.imageInfo.profile[1].supports:[],g=d&&c.imageInfo.profile[1].formats?c.imageInfo.profile[1].formats:[],f=d&&c.imageInfo.profile[1].qualities?c.imageInfo.profile[1].qualities:[];return{url:c.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===c.imageInfo.sizes?void 0:c.imageInfo.sizes.map((function(c){return[c.width,c.height]})),tileSize:void 0===c.imageInfo.tiles?void 0:[c.imageInfo.tiles.map((function(c){return c.width}))[0],c.imageInfo.tiles.map((function(c){return void 0===c.height?c.width:c.height}))[0]],resolutions:void 0===c.imageInfo.tiles?void 0:c.imageInfo.tiles.map((function(c){return c.scaleFactors}))[0],supports:[...u.supports,...p],formats:[...u.formats,...g],qualities:[...u.qualities,...f]}},Ol[Ll]=function generateVersion3Options(c){const u=c.getComplianceLevelSupportedFeatures(),d=void 0===c.imageInfo.extraFormats?u.formats:[...u.formats,...c.imageInfo.extraFormats],p=void 0!==c.imageInfo.preferredFormats&&Array.isArray(c.imageInfo.preferredFormats)&&c.imageInfo.preferredFormats.length>0?c.imageInfo.preferredFormats.filter((function(c){return["jpg","png","gif"].includes(c)})).reduce((function(c,u){return void 0===c&&d.includes(u)?u:c}),void 0):void 0;return{url:c.imageInfo.id,sizes:void 0===c.imageInfo.sizes?void 0:c.imageInfo.sizes.map((function(c){return[c.width,c.height]})),tileSize:void 0===c.imageInfo.tiles?void 0:[c.imageInfo.tiles.map((function(c){return c.width}))[0],c.imageInfo.tiles.map((function(c){return c.height}))[0]],resolutions:void 0===c.imageInfo.tiles?void 0:c.imageInfo.tiles.map((function(c){return c.scaleFactors}))[0],supports:void 0===c.imageInfo.extraFeatures?u.supports:[...u.supports,...c.imageInfo.extraFeatures],formats:d,qualities:void 0===c.imageInfo.extraQualities?u.qualities:[...u.qualities,...c.imageInfo.extraQualities],preferredFormat:p}};var Nl=class IIIFInfo{constructor(c){this.setImageInfo(c)}setImageInfo(c){this.imageInfo="string"==typeof c?JSON.parse(c):c}getImageApiVersion(){if(void 0===this.imageInfo)return;let c=this.imageInfo["@context"]||"ol-no-context";"string"==typeof c&&(c=[c]);for(let u=0;u<c.length;u++)switch(c[u]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return Tl;case"http://iiif.io/api/image/2/context.json":return Rl;case"http://iiif.io/api/image/3/context.json":return Ll;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Tl)&&this.imageInfo.identifier)return Tl}assert(!1,"Cannot determine IIIF Image API version from provided image information JSON")}getComplianceLevelEntryFromProfile(c){if(void 0!==this.imageInfo&&void 0!==this.imageInfo.profile)switch(void 0===c&&(c=this.getImageApiVersion()),c){case Tl:if(Il.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Ll:if(kl.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Rl:if("string"==typeof this.imageInfo.profile&&Fl.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&"string"==typeof this.imageInfo.profile[0]&&Fl.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0]}}getComplianceLevelFromProfile(c){const u=this.getComplianceLevelEntryFromProfile(c);if(void 0===u)return;const d=u.match(/level[0-2](?:\.json)?$/g);return Array.isArray(d)?d[0].replace(".json",""):void 0}getComplianceLevelSupportedFeatures(){if(void 0===this.imageInfo)return;const c=this.getImageApiVersion(),u=this.getComplianceLevelFromProfile(c);return void 0===u?Al.none.none:Al[c][u]}getTileSourceOptions(c){const u=c||{},d=this.getImageApiVersion();if(void 0===d)return;const p=void 0===d?void 0:Ol[d](this);return void 0!==p?{url:p.url,version:d,size:[this.imageInfo.width,this.imageInfo.height],sizes:p.sizes,format:void 0!==u.format&&p.formats.includes(u.format)?u.format:void 0!==p.preferredFormat?p.preferredFormat:"jpg",supports:p.supports,quality:u.quality&&p.qualities.includes(u.quality)?u.quality:p.qualities.includes("native")?"native":"default",resolutions:Array.isArray(p.resolutions)?p.resolutions.sort((function(c,u){return u-c})):void 0,tileSize:p.tileSize}:void 0}};const Dl=["http://www.google.com/kml/ext/2.2"],Gl=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],jl={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},zl=makeStructureNS(Gl,{ExtendedData:extendedDataParser,Region:regionParser,MultiGeometry:makeObjectPropertySetter(readMultiGeometry,"geometry"),LineString:makeObjectPropertySetter(readLineString,"geometry"),LinearRing:makeObjectPropertySetter(readLinearRing,"geometry"),Point:makeObjectPropertySetter(readPoint,"geometry"),Polygon:makeObjectPropertySetter(readPolygon,"geometry"),Style:makeObjectPropertySetter(readStyle$2),StyleMap:function placemarkStyleMapParser(c,u){const d=readStyleMapValue.call(this,c,u);if(!d)return;const p=u[u.length-1];if(Array.isArray(d))p.Style=d;else{if("string"!=typeof d)throw new Error("`styleMapValue` has an unknown type");p.styleUrl=d}},address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL),visibility:makeObjectPropertySetter(readBoolean)},makeStructureNS(Dl,{MultiTrack:makeObjectPropertySetter((function readGxMultiTrack(c,u){const d=pushParseAndPop([],gh,c,u);if(!d)return;return new Xs(d)}),"geometry"),Track:makeObjectPropertySetter(readGxTrack,"geometry")})),Bl=makeStructureNS(Gl,{ExtendedData:extendedDataParser,Region:regionParser,Link:function linkParser(c,u){parseNode(Ul,c,u)},address:makeObjectPropertySetter(readString),description:makeObjectPropertySetter(readString),name:makeObjectPropertySetter(readString),open:makeObjectPropertySetter(readBoolean),phoneNumber:makeObjectPropertySetter(readString),visibility:makeObjectPropertySetter(readBoolean)}),Ul=makeStructureNS(Gl,{href:makeObjectPropertySetter(readURI)}),$l=makeStructureNS(Gl,{Altitude:makeObjectPropertySetter(readDecimal),Longitude:makeObjectPropertySetter(readDecimal),Latitude:makeObjectPropertySetter(readDecimal),Tilt:makeObjectPropertySetter(readDecimal),AltitudeMode:makeObjectPropertySetter(readString),Heading:makeObjectPropertySetter(readDecimal),Roll:makeObjectPropertySetter(readDecimal)}),Wl=makeStructureNS(Gl,{LatLonAltBox:function latLonAltBoxParser(c,u){const d=pushParseAndPop({},bh,c,u);if(!d)return;const p=u[u.length-1],g=[parseFloat(d.west),parseFloat(d.south),parseFloat(d.east),parseFloat(d.north)];p.extent=g,p.altitudeMode=d.altitudeMode,p.minAltitude=parseFloat(d.minAltitude),p.maxAltitude=parseFloat(d.maxAltitude)},Lod:function lodParser(c,u){const d=pushParseAndPop({},Mh,c,u);if(!d)return;const p=u[u.length-1];p.minLodPixels=parseFloat(d.minLodPixels),p.maxLodPixels=parseFloat(d.maxLodPixels),p.minFadeExtent=parseFloat(d.minFadeExtent),p.maxFadeExtent=parseFloat(d.maxFadeExtent)}}),Xl=makeStructureNS(Gl,["Document","Placemark"]),Vl=makeStructureNS(Gl,{Document:makeChildAppender((function writeDocument(c,u,d){pushSerializeAndPop({node:c},Ah,DOCUMENT_NODE_FACTORY,u,d,void 0,this)})),Placemark:makeChildAppender(writePlacemark)});let ql,Yl,Zl,Kl,Hl,Jl,Ql,th,eh,ih=null,rh=null,nh=null,sh=null,oh=null,ah=null;function scaleForSize(c){return 32/Math.min(c[0],c[1])}function defaultIconUrlFunction(c){return c}function findStyle(c,u,d){return Array.isArray(c)?c:"string"==typeof c?findStyle(d[c],u,d):u}function readColor(c){const u=getAllTextContent(c,!1),d=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(u);if(d){const c=d[1];return[parseInt(c.substr(6,2),16),parseInt(c.substr(4,2),16),parseInt(c.substr(2,2),16),parseInt(c.substr(0,2),16)/255]}}function readFlatCoordinates(c){let u=getAllTextContent(c,!1);const d=[];u=u.replace(/\s*,\s*/g,",");const p=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;let g;for(;g=p.exec(u);){const c=parseFloat(g[1]),p=parseFloat(g[2]),f=g[3]?parseFloat(g[3]):0;d.push(c,p,f),u=u.substr(g[0].length)}if(""===u)return d}function readURI(c){const u=getAllTextContent(c,!1).trim();let d=c.baseURI;if(d&&"about:blank"!=d||(d=window.location.href),d){return new URL(u,d).href}return u}function readStyleURL(c){const u=getAllTextContent(c,!1).trim().replace(/^(?!.*#)/,"#");let d=c.baseURI;if(d&&"about:blank"!=d||(d=window.location.href),d){return new URL(u,d).href}return u}function readScale(c){return readDecimal(c)}const lh=makeStructureNS(Gl,{Pair:function pairDataParser(c,u){const d=pushParseAndPop({},Eh,c,u,this);if(!d)return;const p=d.key;if(p&&"normal"==p){const c=d.styleUrl;c&&(u[u.length-1]=c);const p=d.Style;p&&(u[u.length-1]=p)}}});function readStyleMapValue(c,u){return pushParseAndPop(void 0,lh,c,u,this)}const hh=makeStructureNS(Gl,{Icon:makeObjectPropertySetter((function readIcon(c,u){const d=pushParseAndPop({},fh,c,u);if(d)return d;return null})),color:makeObjectPropertySetter(readColor),heading:makeObjectPropertySetter(readDecimal),hotSpot:makeObjectPropertySetter((function readVec2(c){const u=c.getAttribute("xunits"),d=c.getAttribute("yunits");let p;return p="insetPixels"!==u?"insetPixels"!==d?"bottom-left":"top-left":"insetPixels"!==d?"bottom-right":"top-right",{x:parseFloat(c.getAttribute("x")),xunits:jl[u],y:parseFloat(c.getAttribute("y")),yunits:jl[d],origin:p}})),scale:makeObjectPropertySetter(readScale)});const ch=makeStructureNS(Gl,{color:makeObjectPropertySetter(readColor),scale:makeObjectPropertySetter(readScale)});const uh=makeStructureNS(Gl,{color:makeObjectPropertySetter(readColor),width:makeObjectPropertySetter(readDecimal)});const dh=makeStructureNS(Gl,{color:makeObjectPropertySetter(readColor),fill:makeObjectPropertySetter(readBoolean),outline:makeObjectPropertySetter(readBoolean)});const ph=makeStructureNS(Gl,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatLinearRing(c,u){return pushParseAndPop(null,ph,c,u)}const gh=makeStructureNS(Dl,{Track:makeArrayPusher(readGxTrack)});const mh=makeStructureNS(Gl,{when:function whenParser(c,u){const d=u[u.length-1].whens,p=getAllTextContent(c,!1),g=Date.parse(p);d.push(isNaN(g)?0:g)}},makeStructureNS(Dl,{coord:function gxCoordParser(c,u){const d=u[u.length-1].coordinates,p=getAllTextContent(c,!1),g=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(p);if(g){const c=parseFloat(g[1]),u=parseFloat(g[2]),p=parseFloat(g[3]);d.push([c,u,p])}else d.push([])}}));function readGxTrack(c,u){const d=pushParseAndPop({coordinates:[],whens:[]},mh,c,u);if(!d)return;const p=[],g=d.coordinates,f=d.whens;for(let c=0,u=Math.min(g.length,f.length);c<u;++c)3==g[c].length&&p.push(g[c][0],g[c][1],g[c][2],f[c]);return new Jr(p,"XYZM")}const fh=makeStructureNS(Gl,{href:makeObjectPropertySetter(readURI)},makeStructureNS(Dl,{x:makeObjectPropertySetter(readDecimal),y:makeObjectPropertySetter(readDecimal),w:makeObjectPropertySetter(readDecimal),h:makeObjectPropertySetter(readDecimal)}));const _h=makeStructureNS(Gl,{coordinates:makeReplacer(readFlatCoordinates)});function readFlatCoordinatesFromNode(c,u){return pushParseAndPop(null,_h,c,u)}const yh=makeStructureNS(Gl,{extrude:makeObjectPropertySetter(readBoolean),tessellate:makeObjectPropertySetter(readBoolean),altitudeMode:makeObjectPropertySetter(readString)});function readLineString(c,u){const d=pushParseAndPop({},yh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new Jr(p,"XYZ");return c.setProperties(d,!0),c}}function readLinearRing(c,u){const d=pushParseAndPop({},yh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new or(p,"XYZ",[p.length]);return c.setProperties(d,!0),c}}const xh=makeStructureNS(Gl,{LineString:makeArrayPusher(readLineString),LinearRing:makeArrayPusher(readLinearRing),MultiGeometry:makeArrayPusher(readMultiGeometry),Point:makeArrayPusher(readPoint),Polygon:makeArrayPusher(readPolygon)});function readMultiGeometry(c,u){const d=pushParseAndPop([],xh,c,u);if(!d)return null;if(0===d.length)return new Ws(d);let p,g=!0;const f=d[0].getType();let _;for(let c=1,u=d.length;c<u;++c)if(_=d[c],_.getType()!=f){g=!1;break}if(g){let c,u;if("Point"==f){const g=d[0];c=g.getLayout(),u=g.getFlatCoordinates();for(let c=1,p=d.length;c<p;++c)_=d[c],extend$3(u,_.getFlatCoordinates());p=new Vs(u,c),setCommonGeometryProperties(p,d)}else if("LineString"==f)p=new Xs(d),setCommonGeometryProperties(p,d);else if("Polygon"==f)p=new qs(d),setCommonGeometryProperties(p,d);else{if("GeometryCollection"!=f&&!f.startsWith("Multi"))throw new Error("Unknown geometry type found");p=new Ws(d)}}else p=new Ws(d);return p}function readPoint(c,u){const d=pushParseAndPop({},yh,c,u),p=readFlatCoordinatesFromNode(c,u);if(p){const c=new sr(p,"XYZ");return c.setProperties(d,!0),c}}const vh=makeStructureNS(Gl,{innerBoundaryIs:function innerBoundaryIsParser(c,u){const d=pushParseAndPop([],Th,c,u);if(d.length>0){u[u.length-1].push(...d)}},outerBoundaryIs:function outerBoundaryIsParser(c,u){const d=pushParseAndPop(void 0,Rh,c,u);if(d){u[u.length-1][0]=d}}});function readPolygon(c,u){const d=pushParseAndPop({},yh,c,u),p=pushParseAndPop([null],vh,c,u);if(p&&p[0]){const c=p[0],u=[c.length];for(let d=1,g=p.length;d<g;++d)extend$3(c,p[d]),u.push(c.length);const g=new or(c,"XYZ",u);return g.setProperties(d,!0),g}}const Sh=makeStructureNS(Gl,{IconStyle:function iconStyleParser(c,u){const d=pushParseAndPop({},hh,c,u);if(!d)return;const p=u[u.length-1],g="Icon"in d?d.Icon:{},f=!("Icon"in d)||Object.keys(g).length>0;let _;const y=g.href;let x,v,C;y?_=y:f&&(_=Jl);let M="bottom-left";const T=d.hotSpot;let L;T?(x=[T.x,T.y],v=T.xunits,C=T.yunits,M=T.origin):/^https?:\/\/maps\.(?:google|gstatic)\.com\//.test(_)&&(_.includes("pushpin")?(x=Yl,v=Zl,C=Kl):_.includes("arrow-reverse")?(x=[54,42],v=Zl,C=Kl):_.includes("paddle")&&(x=[32,1],v=Zl,C=Kl));const A=g.x,I=g.y;let k;void 0!==A&&void 0!==I&&(L=[A,I]);const O=g.w,N=g.h;let G;void 0!==O&&void 0!==N&&(k=[O,N]);const j=d.heading;void 0!==j&&(G=toRadians(j));const B=d.scale,V=d.color;if(f){_==Jl&&(k=Hl);const c=new qn({anchor:x,anchorOrigin:M,anchorXUnits:v,anchorYUnits:C,crossOrigin:this.crossOrigin_,offset:L,offsetOrigin:"bottom-left",rotation:G,scale:B,size:k,src:this.iconUrlFunction_(_),color:V}),u=c.getScaleArray()[0],d=c.getSize();if(null===d){const d=c.getImageState();if(d===Er.IDLE||d===Er.LOADING){const listener=function(){const d=c.getImageState();if(d!==Er.IDLE&&d!==Er.LOADING){const d=c.getSize();if(d&&2==d.length){const p=scaleForSize(d);c.setScale(u*p)}c.unlistenImageChange(listener)}};c.listenImageChange(listener),d===Er.IDLE&&c.load()}}else if(2==d.length){const p=scaleForSize(d);c.setScale(u*p)}p.imageStyle=c}else p.imageStyle=Ql},LabelStyle:function labelStyleParser(c,u){const d=pushParseAndPop({},ch,c,u);if(!d)return;const p=u[u.length-1],g=new Tn({fill:new Hr({color:"color"in d?d.color:ql}),scale:d.scale});p.textStyle=g},LineStyle:function lineStyleParser(c,u){const d=pushParseAndPop({},uh,c,u);if(!d)return;const p=u[u.length-1],g=new Qr({color:"color"in d?d.color:ql,width:"width"in d?d.width:1});p.strokeStyle=g},PolyStyle:function polyStyleParser(c,u){const d=pushParseAndPop({},dh,c,u);if(!d)return;const p=u[u.length-1],g=new Hr({color:"color"in d?d.color:ql});p.fillStyle=g;const f=d.fill;void 0!==f&&(p.fill=f);const _=d.outline;void 0!==_&&(p.outline=_)}});function readStyle$2(c,u){const d=pushParseAndPop({},Sh,c,u,this);if(!d)return null;let p="fillStyle"in d?d.fillStyle:ih;const g=d.fill;let f;void 0===g||g||(p=null),"imageStyle"in d?d.imageStyle!=Ql&&(f=d.imageStyle):f=rh;const _="textStyle"in d?d.textStyle:sh,y="strokeStyle"in d?d.strokeStyle:nh,x=d.outline;return void 0===x||x?[new Mn({fill:p,image:f,stroke:y,text:_,zIndex:void 0})]:[new Mn({geometry:function(c){const u=c.getGeometry(),d=u.getType();if("GeometryCollection"===d){return new Ws(u.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"!==u&&"MultiPolygon"!==u})))}if("Polygon"!==d&&"MultiPolygon"!==d)return u},fill:p,image:f,stroke:y,text:_,zIndex:void 0}),new Mn({geometry:function(c){const u=c.getGeometry(),d=u.getType();if("GeometryCollection"===d){return new Ws(u.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"===u||"MultiPolygon"===u})))}if("Polygon"===d||"MultiPolygon"===d)return u},fill:p,stroke:null,zIndex:void 0})]}function setCommonGeometryProperties(c,u){const d=u.length,p=new Array(u.length),g=new Array(u.length),f=new Array(u.length);let _,y,x;_=!1,y=!1,x=!1;for(let c=0;c<d;++c){const d=u[c];p[c]=d.get("extrude"),g[c]=d.get("tessellate"),f[c]=d.get("altitudeMode"),_=_||void 0!==p[c],y=y||void 0!==g[c],x=x||f[c]}_&&c.set("extrude",p),y&&c.set("tessellate",g),x&&c.set("altitudeMode",f)}const wh=makeStructureNS(Gl,{displayName:makeObjectPropertySetter(readString),value:makeObjectPropertySetter(readString)});const Ch=makeStructureNS(Gl,{Data:function dataParser(c,u){const d=c.getAttribute("name");parseNode(wh,c,u);const p=u[u.length-1];d&&p.displayName?p[d]={value:p.value,displayName:p.displayName,toString:function(){return p.value}}:null!==d?p[d]=p.value:null!==p.displayName&&(p[p.displayName]=p.value),delete p.value},SchemaData:function schemaDataParser(c,u){parseNode(Ph,c,u)}});function extendedDataParser(c,u){parseNode(Ch,c,u)}function regionParser(c,u){parseNode(Wl,c,u)}const Eh=makeStructureNS(Gl,{Style:makeObjectPropertySetter(readStyle$2),key:makeObjectPropertySetter(readString),styleUrl:makeObjectPropertySetter(readStyleURL)});const Ph=makeStructureNS(Gl,{SimpleData:function simpleDataParser(c,u){const d=c.getAttribute("name");if(null!==d){const p=readString(c);u[u.length-1][d]=p}}});const bh=makeStructureNS(Gl,{altitudeMode:makeObjectPropertySetter(readString),minAltitude:makeObjectPropertySetter(readDecimal),maxAltitude:makeObjectPropertySetter(readDecimal),north:makeObjectPropertySetter(readDecimal),south:makeObjectPropertySetter(readDecimal),east:makeObjectPropertySetter(readDecimal),west:makeObjectPropertySetter(readDecimal)});const Mh=makeStructureNS(Gl,{minLodPixels:makeObjectPropertySetter(readDecimal),maxLodPixels:makeObjectPropertySetter(readDecimal),minFadeExtent:makeObjectPropertySetter(readDecimal),maxFadeExtent:makeObjectPropertySetter(readDecimal)});const Th=makeStructureNS(Gl,{LinearRing:makeArrayPusher(readFlatLinearRing)});const Rh=makeStructureNS(Gl,{LinearRing:makeReplacer(readFlatLinearRing)});function writeColorTextNode(c,u){const d=asArray(u),p=[255*(4==d.length?d[3]:1),d[2],d[1],d[0]];for(let c=0;c<4;++c){const u=Math.floor(p[c]).toString(16);p[c]=1==u.length?"0"+u:u}writeStringTextNode(c,p.join(""))}const Lh=makeStructureNS(Gl,{Data:makeChildAppender((function writeDataNode(c,u,d){c.setAttribute("name",u.name);const p={node:c},g=u.value;"object"==typeof g?(null!==g&&g.displayName&&pushSerializeAndPop(p,Lh,Ga,[g.displayName],d,["displayName"]),null!==g&&g.value&&pushSerializeAndPop(p,Lh,Ga,[g.value],d,["value"])):pushSerializeAndPop(p,Lh,Ga,[g],d,["value"])})),value:makeChildAppender((function writeDataNodeValue(c,u){writeStringTextNode(c,u)})),displayName:makeChildAppender((function writeDataNodeName(c,u){!function writeCDATASection(c,u){c.appendChild(getDocument().createCDATASection(u))}(c,u)}))});const Ah=makeStructureNS(Gl,{Placemark:makeChildAppender(writePlacemark)}),DOCUMENT_NODE_FACTORY=function(c,u,d){return createElementNS(u[u.length-1].node.namespaceURI,"Placemark")};const Ih=makeSimpleNodeFactory("Data");const Fh=makeStructureNS(Gl,["href"],makeStructureNS(Dl,["x","y","w","h"])),kh=makeStructureNS(Gl,{href:makeChildAppender(writeStringTextNode)},makeStructureNS(Dl,{x:makeChildAppender(writeDecimalTextNode),y:makeChildAppender(writeDecimalTextNode),w:makeChildAppender(writeDecimalTextNode),h:makeChildAppender(writeDecimalTextNode)})),GX_NODE_FACTORY=function(c,u,d){return createElementNS(Dl[0],"gx:"+d)};const Oh=makeStructureNS(Gl,["scale","heading","Icon","color","hotSpot"]),Nh=makeStructureNS(Gl,{Icon:makeChildAppender((function writeIcon(c,u,d){const p={node:c},g=d[d.length-1].node;let f=Fh[g.namespaceURI],_=makeSequence(u,f);pushSerializeAndPop(p,kh,Ga,_,d,f),f=Fh[Dl[0]],_=makeSequence(u,f),pushSerializeAndPop(p,kh,GX_NODE_FACTORY,_,d,f)})),color:makeChildAppender(writeColorTextNode),heading:makeChildAppender(writeDecimalTextNode),hotSpot:makeChildAppender((function writeVec2(c,u){c.setAttribute("x",String(u.x)),c.setAttribute("y",String(u.y)),c.setAttribute("xunits",u.xunits),c.setAttribute("yunits",u.yunits)})),scale:makeChildAppender(writeScaleTextNode)});const Dh=makeStructureNS(Gl,["color","scale"]),Gh=makeStructureNS(Gl,{color:makeChildAppender(writeColorTextNode),scale:makeChildAppender(writeScaleTextNode)});const jh=makeStructureNS(Gl,["color","width"]),zh=makeStructureNS(Gl,{color:makeChildAppender(writeColorTextNode),width:makeChildAppender(writeDecimalTextNode)});const Bh={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},GEOMETRY_NODE_FACTORY=function(c,u,d){if(c){return createElementNS(u[u.length-1].node.namespaceURI,Bh[c.getType()])}},Uh=makeSimpleNodeFactory("Point"),$h=makeSimpleNodeFactory("LineString"),Wh=makeSimpleNodeFactory("LinearRing"),Xh=makeSimpleNodeFactory("Polygon"),Vh=makeStructureNS(Gl,{LineString:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),GeometryCollection:makeChildAppender(writeMultiGeometry)});function writeMultiGeometry(c,u,d){const p={node:c},g=u.getType();let f,_=[];if("GeometryCollection"===g)u.getGeometriesArrayRecursive().forEach((function(c){const u=c.getType();if("MultiPoint"===u)_=_.concat(c.getPoints());else if("MultiLineString"===u)_=_.concat(c.getLineStrings());else if("MultiPolygon"===u)_=_.concat(c.getPolygons());else{if("Point"!==u&&"LineString"!==u&&"Polygon"!==u)throw new Error("Unknown geometry type");_.push(c)}})),f=GEOMETRY_NODE_FACTORY;else if("MultiPoint"===g)_=u.getPoints(),f=Uh;else if("MultiLineString"===g)_=u.getLineStrings(),f=$h;else{if("MultiPolygon"!==g)throw new Error("Unknown geometry type");_=u.getPolygons(),f=Xh}pushSerializeAndPop(p,Vh,f,_,d)}const qh=makeStructureNS(Gl,{LinearRing:makeChildAppender(writePrimitiveGeometry)});function writeBoundaryIs(c,u,d){pushSerializeAndPop({node:c},qh,Wh,[u],d)}const Yh=makeStructureNS(Gl,{ExtendedData:makeChildAppender((function writeExtendedData(c,u,d){const p={node:c},g=u.names,f=u.values,_=g.length;for(let c=0;c<_;c++)pushSerializeAndPop(p,Lh,Ih,[{name:g[c],value:f[c]}],d)})),MultiGeometry:makeChildAppender(writeMultiGeometry),LineString:makeChildAppender(writePrimitiveGeometry),LinearRing:makeChildAppender(writePrimitiveGeometry),Point:makeChildAppender(writePrimitiveGeometry),Polygon:makeChildAppender(writePolygon),Style:makeChildAppender((function writeStyle(c,u,d){const p={node:c},g={};if(u.pointStyles.length){const c=u.pointStyles[0].getText();c&&(g.LabelStyle=c);const d=u.pointStyles[0].getImage();d&&"function"==typeof d.getSrc&&(g.IconStyle=d)}if(u.lineStyles.length){const c=u.lineStyles[0].getStroke();c&&(g.LineStyle=c)}if(u.polyStyles.length){const c=u.polyStyles[0].getStroke();c&&!g.LineStyle&&(g.LineStyle=c),g.PolyStyle=u.polyStyles[0]}const f=d[d.length-1].node,_=nc[f.namespaceURI],y=makeSequence(g,_);pushSerializeAndPop(p,sc,Ga,y,d,_)})),address:makeChildAppender(writeStringTextNode),description:makeChildAppender(writeStringTextNode),name:makeChildAppender(writeStringTextNode),open:makeChildAppender(writeBooleanTextNode),phoneNumber:makeChildAppender(writeStringTextNode),styleUrl:makeChildAppender(writeStringTextNode),visibility:makeChildAppender(writeBooleanTextNode)}),Zh=makeStructureNS(Gl,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Kh=makeSimpleNodeFactory("ExtendedData");function writePlacemark(c,u,d){const p={node:c};u.getId()&&c.setAttribute("id",u.getId());const g=u.getProperties(),f={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};f[u.getGeometryName()]=1;const _=Object.keys(g||{}).sort().filter((function(c){return!f[c]})),y=u.getStyleFunction();if(y){const c=y(u,0);if(c){const d=Array.isArray(c)?c:[c];let p=d;if(u.getGeometry()&&(p=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Point"===u||"MultiPoint"===u})).length:"Point"===c||"MultiPoint"===c}}))),this.writeStyles_){let c=d,f=d;u.getGeometry()&&(c=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"LineString"===u||"MultiLineString"===u})).length:"LineString"===c||"MultiLineString"===c}})),f=d.filter((function(c){const d=c.getGeometryFunction()(u);if(d){const c=d.getType();return"GeometryCollection"===c?d.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Polygon"===u||"MultiPolygon"===u})).length:"Polygon"===c||"MultiPolygon"===c}}))),g.Style={pointStyles:p,lineStyles:c,polyStyles:f}}if(p.length&&void 0===g.name){const c=p[0].getText();c&&(g.name=c.getText())}}}const x=d[d.length-1].node,v=Zh[x.namespaceURI],C=makeSequence(g,v);if(pushSerializeAndPop(p,Yh,Ga,C,d,v),_.length>0){const c=makeSequence(g,_);pushSerializeAndPop(p,Yh,Kh,[{names:_,values:c}],d)}const M=d[0];let T=u.getGeometry();T&&(T=transformGeometryWithOptions(T,!0,M)),pushSerializeAndPop(p,Yh,GEOMETRY_NODE_FACTORY,[T],d)}const Hh=makeStructureNS(Gl,["extrude","tessellate","altitudeMode","coordinates"]),Jh=makeStructureNS(Gl,{extrude:makeChildAppender(writeBooleanTextNode),tessellate:makeChildAppender(writeBooleanTextNode),altitudeMode:makeChildAppender(writeStringTextNode),coordinates:makeChildAppender((function writeCoordinatesTextNode(c,u,d){const p=d[d.length-1],g=p.layout,f=p.stride;let _;if("XY"==g||"XYM"==g)_=2;else{if("XYZ"!=g&&"XYZM"!=g)throw new Error("Invalid geometry layout");_=3}const y=u.length;let x="";if(y>0){x+=u[0];for(let c=1;c<_;++c)x+=","+u[c];for(let c=f;c<y;c+=f){x+=" "+u[c];for(let d=1;d<_;++d)x+=","+u[c+d]}}writeStringTextNode(c,x)}))});function writePrimitiveGeometry(c,u,d){const p=u.getFlatCoordinates(),g={node:c};g.layout=u.getLayout(),g.stride=u.getStride();const f=u.getProperties();f.coordinates=p;const _=d[d.length-1].node,y=Hh[_.namespaceURI],x=makeSequence(f,y);pushSerializeAndPop(g,Jh,Ga,x,d,y)}const Qh=makeStructureNS(Gl,["color","fill","outline"]),tc=makeStructureNS(Gl,{outerBoundaryIs:makeChildAppender(writeBoundaryIs),innerBoundaryIs:makeChildAppender(writeBoundaryIs)}),ec=makeSimpleNodeFactory("innerBoundaryIs"),ic=makeSimpleNodeFactory("outerBoundaryIs");function writePolygon(c,u,d){const p=u.getLinearRings(),g=p.shift(),f={node:c};pushSerializeAndPop(f,tc,ec,p,d),pushSerializeAndPop(f,tc,ic,[g],d)}const rc=makeStructureNS(Gl,{color:makeChildAppender(writeColorTextNode),fill:makeChildAppender(writeBooleanTextNode),outline:makeChildAppender(writeBooleanTextNode)});function writeScaleTextNode(c,u){writeDecimalTextNode(c,Math.round(1e6*u)/1e6)}const nc=makeStructureNS(Gl,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),sc=makeStructureNS(Gl,{IconStyle:makeChildAppender((function writeIconStyle(c,u,d){const p={node:c},g={},f=u.getSrc(),_=u.getSize(),y=u.getImageSize(),x={href:f};if(_){x.w=_[0],x.h=_[1];const c=u.getAnchor(),d=u.getOrigin();if(d&&y&&0!==d[0]&&d[1]!==_[1]&&(x.x=d[0],x.y=y[1]-(d[1]+_[1])),c&&(c[0]!==_[0]/2||c[1]!==_[1]/2)){const u={x:c[0],xunits:"pixels",y:_[1]-c[1],yunits:"pixels"};g.hotSpot=u}}g.Icon=x;let v=u.getScaleArray()[0],C=_;if(null===C&&(C=Hl),2==C.length){v/=scaleForSize(C)}1!==v&&(g.scale=v);const M=u.getRotation();0!==M&&(g.heading=M);const T=u.getColor();T&&(g.color=T);const L=d[d.length-1].node,A=Oh[L.namespaceURI],I=makeSequence(g,A);pushSerializeAndPop(p,Nh,Ga,I,d,A)})),LabelStyle:makeChildAppender((function writeLabelStyle(c,u,d){const p={node:c},g={},f=u.getFill();f&&(g.color=f.getColor());const _=u.getScale();_&&1!==_&&(g.scale=_);const y=d[d.length-1].node,x=Dh[y.namespaceURI],v=makeSequence(g,x);pushSerializeAndPop(p,Gh,Ga,v,d,x)})),LineStyle:makeChildAppender((function writeLineStyle(c,u,d){const p={node:c},g={color:u.getColor(),width:Number(u.getWidth())||1},f=d[d.length-1].node,_=jh[f.namespaceURI],y=makeSequence(g,_);pushSerializeAndPop(p,zh,Ga,y,d,_)})),PolyStyle:makeChildAppender((function writePolyStyle(c,u,d){const p={node:c},g=u.getFill(),f=u.getStroke(),_={color:g?g.getColor():void 0,fill:!!g&&void 0,outline:!!f&&void 0},y=d[d.length-1].node,x=Qh[y.namespaceURI],v=makeSequence(_,x);pushSerializeAndPop(p,rc,Ga,v,d,x)}))});var oc=class KML extends XMLFeature{constructor(c){super(),c=c||{},ah||function createStyleDefaults(){ql=[255,255,255,1],ih=new Hr({color:ql}),Yl=[20,2],Zl="pixels",Kl="pixels",Hl=[64,64],Jl="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",rh=new qn({anchor:Yl,anchorOrigin:"bottom-left",anchorXUnits:Zl,anchorYUnits:Kl,crossOrigin:"anonymous",rotation:0,scale:scaleForSize(Hl),size:Hl,src:Jl}),Ql="NO_IMAGE",nh=new Qr({color:ql,width:1}),th=new Qr({color:[51,51,51,1],width:2}),sh=new Tn({font:"bold 16px Helvetica",fill:ih,stroke:th,scale:.8}),oh=new Mn({fill:ih,image:rh,text:sh,stroke:nh,zIndex:0}),ah=[oh]}(),this.dataProjection=get$2("EPSG:4326"),this.defaultStyle_=c.defaultStyle?c.defaultStyle:ah,this.extractStyles_=void 0===c.extractStyles||c.extractStyles,this.writeStyles_=void 0===c.writeStyles||c.writeStyles,this.sharedStyles_={},this.showPointNames_=void 0===c.showPointNames||c.showPointNames,this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:"anonymous",this.iconUrlFunction_=c.iconUrlFunction?c.iconUrlFunction:defaultIconUrlFunction,this.supportedMediaTypes=["application/vnd.google-earth.kml+xml"]}readDocumentOrFolder_(c,u){const d=pushParseAndPop([],makeStructureNS(Gl,{Document:makeArrayExtender(this.readDocumentOrFolder_,this),Folder:makeArrayExtender(this.readDocumentOrFolder_,this),Placemark:makeArrayPusher(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),c,u,this);if(d)return d}readPlacemark_(c,u){const d=pushParseAndPop({geometry:null},zl,c,u,this);if(!d)return;const p=new Ii,g=c.getAttribute("id");null!==g&&p.setId(g);const f=u[0],_=d.geometry;if(_&&transformGeometryWithOptions(_,!1,f),p.setGeometry(_),delete d.geometry,this.extractStyles_){const c=function createFeatureStyleFunction(c,u,d,p,g){return function(f,_){let y=g,x="",v=[];if(y){const c=f.getGeometry();if(c)if(c instanceof Ws)v=c.getGeometriesArrayRecursive().filter((function(c){const u=c.getType();return"Point"===u||"MultiPoint"===u})),y=v.length>0;else{const u=c.getType();y="Point"===u||"MultiPoint"===u}}y&&(x=f.get("name"),y=y&&!!x,y&&/&[^&]+;/.test(x)&&(eh||(eh=document.createElement("textarea")),eh.innerHTML=x,x=eh.value));let C=d;if(c?C=c:u&&(C=findStyle(u,d,p)),y){const c=function createNameStyleFunction(c,u){const d=[0,0];let p="start";const g=c.getImage();if(g){const c=g.getSize();if(c&&2==c.length){const u=g.getScaleArray(),f=g.getAnchor();d[0]=u[0]*(c[0]-f[0]),d[1]=u[1]*(c[1]/2-f[1]),p="left"}}let f=c.getText();f?(f=f.clone(),f.setFont(f.getFont()||sh.getFont()),f.setScale(f.getScale()||sh.getScale()),f.setFill(f.getFill()||sh.getFill()),f.setStroke(f.getStroke()||th)):f=sh.clone();f.setText(u),f.setOffsetX(d[0]),f.setOffsetY(d[1]),f.setTextAlign(p);const _=new Mn({image:g,text:f});return _}(C[0],x);if(v.length>0){c.setGeometry(new Ws(v));return[c,new Mn({geometry:C[0].getGeometry(),image:null,fill:C[0].getFill(),stroke:C[0].getStroke(),text:null})].concat(C.slice(1))}return c}return C}}(d.Style,d.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);p.setStyle(c)}return delete d.Style,p.setProperties(d,!0),p}readSharedStyle_(c,u){const d=c.getAttribute("id");if(null!==d){const p=readStyle$2.call(this,c,u);if(p){let u,g=c.baseURI;if(g&&"about:blank"!=g||(g=window.location.href),g){u=new URL("#"+d,g).href}else u="#"+d;this.sharedStyles_[u]=p}}}readSharedStyleMap_(c,u){const d=c.getAttribute("id");if(null===d)return;const p=readStyleMapValue.call(this,c,u);if(!p)return;let g,f=c.baseURI;if(f&&"about:blank"!=f||(f=window.location.href),f){g=new URL("#"+d,f).href}else g="#"+d;this.sharedStyles_[g]=p}readFeatureFromNode(c,u){if(!Gl.includes(c.namespaceURI))return null;const d=this.readPlacemark_(c,[this.getReadOptions(c,u)]);return d||null}readFeaturesFromNode(c,u){if(!Gl.includes(c.namespaceURI))return[];let d;const p=c.localName;if("Document"==p||"Folder"==p)return d=this.readDocumentOrFolder_(c,[this.getReadOptions(c,u)]),d||[];if("Placemark"==p){const d=this.readPlacemark_(c,[this.getReadOptions(c,u)]);return d?[d]:[]}if("kml"==p){d=[];for(let p=c.firstElementChild;p;p=p.nextElementSibling){const c=this.readFeaturesFromNode(p,u);c&&extend$3(d,c)}return d}return[]}readName(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readNameFromDocument(u)}return isDocument(c)?this.readNameFromDocument(c):this.readNameFromNode(c)}}readNameFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE){const c=this.readNameFromNode(u);if(c)return c}}readNameFromNode(c){for(let u=c.firstElementChild;u;u=u.nextElementSibling)if(Gl.includes(u.namespaceURI)&&"name"==u.localName)return readString(u);for(let u=c.firstElementChild;u;u=u.nextElementSibling){const c=u.localName;if(Gl.includes(u.namespaceURI)&&("Document"==c||"Folder"==c||"Placemark"==c||"kml"==c)){const c=this.readNameFromNode(u);if(c)return c}}}readNetworkLinks(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readNetworkLinksFromDocument(d))}else isDocument(c)?extend$3(u,this.readNetworkLinksFromDocument(c)):extend$3(u,this.readNetworkLinksFromNode(c));return u}readNetworkLinksFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType==Node.ELEMENT_NODE&&extend$3(u,this.readNetworkLinksFromNode(d));return u}readNetworkLinksFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(Gl.includes(d.namespaceURI)&&"NetworkLink"==d.localName){const c=pushParseAndPop({},Bl,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!Gl.includes(d.namespaceURI)||"Document"!=c&&"Folder"!=c&&"kml"!=c||extend$3(u,this.readNetworkLinksFromNode(d))}return u}readRegion(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readRegionFromDocument(d))}else isDocument(c)?extend$3(u,this.readRegionFromDocument(c)):extend$3(u,this.readRegionFromNode(c));return u}readRegionFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType==Node.ELEMENT_NODE&&extend$3(u,this.readRegionFromNode(d));return u}readRegionFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(Gl.includes(d.namespaceURI)&&"Region"==d.localName){const c=pushParseAndPop({},Wl,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!Gl.includes(d.namespaceURI)||"Document"!=c&&"Folder"!=c&&"kml"!=c||extend$3(u,this.readRegionFromNode(d))}return u}readCamera(c){const u=[];if("string"==typeof c){const d=parse$1(c);extend$3(u,this.readCameraFromDocument(d))}else isDocument(c)?extend$3(u,this.readCameraFromDocument(c)):extend$3(u,this.readCameraFromNode(c));return u}readCameraFromDocument(c){const u=[];for(let d=c.firstChild;d;d=d.nextSibling)d.nodeType===Node.ELEMENT_NODE&&extend$3(u,this.readCameraFromNode(d));return u}readCameraFromNode(c){const u=[];for(let d=c.firstElementChild;d;d=d.nextElementSibling)if(Gl.includes(d.namespaceURI)&&"Camera"===d.localName){const c=pushParseAndPop({},$l,d,[]);u.push(c)}for(let d=c.firstElementChild;d;d=d.nextElementSibling){const c=d.localName;!Gl.includes(d.namespaceURI)||"Document"!==c&&"Folder"!==c&&"Placemark"!==c&&"kml"!==c||extend$3(u,this.readCameraFromNode(d))}return u}writeFeaturesNode(c,u){u=this.adaptOptions(u);const d=createElementNS(Gl[4],"kml"),p="http://www.w3.org/2000/xmlns/";d.setAttributeNS(p,"xmlns:gx",Dl[0]),d.setAttributeNS(p,"xmlns:xsi",Da),d.setAttributeNS(Da,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");const g={node:d},f={};c.length>1?f.Document=c:1==c.length&&(f.Placemark=c[0]);const _=Xl[d.namespaceURI],y=makeSequence(f,_);return pushSerializeAndPop(g,Vl,Ga,y,[u],_,this),d}};const ac=4294967296,lc=1/ac,hc="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");class Pbf{constructor(c=new Uint8Array(16)){this.buf=ArrayBuffer.isView(c)?c:new Uint8Array(c),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(c,u,d=this.length){for(;this.pos<d;){const d=this.readVarint(),p=d>>3,g=this.pos;this.type=7&d,c(p,u,this),this.pos===g&&this.skip(d)}return u}readMessage(c,u){return this.readFields(c,u,this.readVarint()+this.pos)}readFixed32(){const c=this.dataView.getUint32(this.pos,!0);return this.pos+=4,c}readSFixed32(){const c=this.dataView.getInt32(this.pos,!0);return this.pos+=4,c}readFixed64(){const c=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*ac;return this.pos+=8,c}readSFixed64(){const c=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*ac;return this.pos+=8,c}readFloat(){const c=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,c}readDouble(){const c=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,c}readVarint(c){const u=this.buf;let d,p;return p=u[this.pos++],d=127&p,p<128?d:(p=u[this.pos++],d|=(127&p)<<7,p<128?d:(p=u[this.pos++],d|=(127&p)<<14,p<128?d:(p=u[this.pos++],d|=(127&p)<<21,p<128?d:(p=u[this.pos],d|=(15&p)<<28,function readVarintRemainder(c,u,d){const p=d.buf;let g,f;if(f=p[d.pos++],g=(112&f)>>4,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<3,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<10,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<17,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(127&f)<<24,f<128)return toNum(c,g,u);if(f=p[d.pos++],g|=(1&f)<<31,f<128)return toNum(c,g,u);throw new Error("Expected varint not more than 10 bytes")}(d,c,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){const c=this.readVarint();return c%2==1?(c+1)/-2:c/2}readBoolean(){return Boolean(this.readVarint())}readString(){const c=this.readVarint()+this.pos,u=this.pos;return this.pos=c,c-u>=12&&hc?hc.decode(this.buf.subarray(u,c)):function readUtf8(c,u,d){let p="",g=u;for(;g<d;){const u=c[g];let f,_,y,x=null,v=u>239?4:u>223?3:u>191?2:1;if(g+v>d)break;1===v?u<128&&(x=u):2===v?(f=c[g+1],128==(192&f)&&(x=(31&u)<<6|63&f,x<=127&&(x=null))):3===v?(f=c[g+1],_=c[g+2],128==(192&f)&&128==(192&_)&&(x=(15&u)<<12|(63&f)<<6|63&_,(x<=2047||x>=55296&&x<=57343)&&(x=null))):4===v&&(f=c[g+1],_=c[g+2],y=c[g+3],128==(192&f)&&128==(192&_)&&128==(192&y)&&(x=(15&u)<<18|(63&f)<<12|(63&_)<<6|63&y,(x<=65535||x>=1114112)&&(x=null))),null===x?(x=65533,v=1):x>65535&&(x-=65536,p+=String.fromCharCode(x>>>10&1023|55296),x=56320|1023&x),p+=String.fromCharCode(x),g+=v}return p}(this.buf,u,c)}readBytes(){const c=this.readVarint()+this.pos,u=this.buf.subarray(this.pos,c);return this.pos=c,u}readPackedVarint(c=[],u){const d=this.readPackedEnd();for(;this.pos<d;)c.push(this.readVarint(u));return c}readPackedSVarint(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSVarint());return c}readPackedBoolean(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readBoolean());return c}readPackedFloat(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFloat());return c}readPackedDouble(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readDouble());return c}readPackedFixed32(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFixed32());return c}readPackedSFixed32(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSFixed32());return c}readPackedFixed64(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readFixed64());return c}readPackedSFixed64(c=[]){const u=this.readPackedEnd();for(;this.pos<u;)c.push(this.readSFixed64());return c}readPackedEnd(){return 2===this.type?this.readVarint()+this.pos:this.pos+1}skip(c){const u=7&c;if(0===u)for(;this.buf[this.pos++]>127;);else if(2===u)this.pos=this.readVarint()+this.pos;else if(5===u)this.pos+=4;else{if(1!==u)throw new Error(`Unimplemented type: ${u}`);this.pos+=8}}writeTag(c,u){this.writeVarint(c<<3|u)}realloc(c){let u=this.length||16;for(;u<this.pos+c;)u*=2;if(u!==this.length){const c=new Uint8Array(u);c.set(this.buf),this.buf=c,this.dataView=new DataView(c.buffer),this.length=u}}finish(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)}writeFixed32(c){this.realloc(4),this.dataView.setInt32(this.pos,c,!0),this.pos+=4}writeSFixed32(c){this.realloc(4),this.dataView.setInt32(this.pos,c,!0),this.pos+=4}writeFixed64(c){this.realloc(8),this.dataView.setInt32(this.pos,-1&c,!0),this.dataView.setInt32(this.pos+4,Math.floor(c*lc),!0),this.pos+=8}writeSFixed64(c){this.realloc(8),this.dataView.setInt32(this.pos,-1&c,!0),this.dataView.setInt32(this.pos+4,Math.floor(c*lc),!0),this.pos+=8}writeVarint(c){(c=+c||0)>268435455||c<0?function writeBigVarint(c,u){let d,p;c>=0?(d=c%4294967296|0,p=c/4294967296|0):(d=~(-c%4294967296),p=~(-c/4294967296),4294967295^d?d=d+1|0:(d=0,p=p+1|0));if(c>=0x10000000000000000||c<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");u.realloc(10),function writeBigVarintLow(c,u,d){d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos++]=127&c|128,c>>>=7,d.buf[d.pos]=127&c}(d,0,u),function writeBigVarintHigh(c,u){const d=(7&c)<<4;if(u.buf[u.pos++]|=d|((c>>>=3)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;if(u.buf[u.pos++]=127&c|((c>>>=7)?128:0),!c)return;u.buf[u.pos++]=127&c}(p,u)}(c,this):(this.realloc(4),this.buf[this.pos++]=127&c|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=127&(c>>>=7)|(c>127?128:0),c<=127||(this.buf[this.pos++]=c>>>7&127))))}writeSVarint(c){this.writeVarint(c<0?2*-c-1:2*c)}writeBoolean(c){this.writeVarint(+c)}writeString(c){c=String(c),this.realloc(4*c.length),this.pos++;const u=this.pos;this.pos=function writeUtf8(c,u,d){for(let p,g,f=0;f<u.length;f++){if(p=u.charCodeAt(f),p>55295&&p<57344){if(!g){p>56319||f+1===u.length?(c[d++]=239,c[d++]=191,c[d++]=189):g=p;continue}if(p<56320){c[d++]=239,c[d++]=191,c[d++]=189,g=p;continue}p=g-55296<<10|p-56320|65536,g=null}else g&&(c[d++]=239,c[d++]=191,c[d++]=189,g=null);p<128?c[d++]=p:(p<2048?c[d++]=p>>6|192:(p<65536?c[d++]=p>>12|224:(c[d++]=p>>18|240,c[d++]=p>>12&63|128),c[d++]=p>>6&63|128),c[d++]=63&p|128)}return d}(this.buf,c,this.pos);const d=this.pos-u;d>=128&&makeRoomForExtraLength(u,d,this),this.pos=u-1,this.writeVarint(d),this.pos+=d}writeFloat(c){this.realloc(4),this.dataView.setFloat32(this.pos,c,!0),this.pos+=4}writeDouble(c){this.realloc(8),this.dataView.setFloat64(this.pos,c,!0),this.pos+=8}writeBytes(c){const u=c.length;this.writeVarint(u),this.realloc(u);for(let d=0;d<u;d++)this.buf[this.pos++]=c[d]}writeRawMessage(c,u){this.pos++;const d=this.pos;c(u,this);const p=this.pos-d;p>=128&&makeRoomForExtraLength(d,p,this),this.pos=d-1,this.writeVarint(p),this.pos+=p}writeMessage(c,u,d){this.writeTag(c,2),this.writeRawMessage(u,d)}writePackedVarint(c,u){u.length&&this.writeMessage(c,writePackedVarint,u)}writePackedSVarint(c,u){u.length&&this.writeMessage(c,writePackedSVarint,u)}writePackedBoolean(c,u){u.length&&this.writeMessage(c,writePackedBoolean,u)}writePackedFloat(c,u){u.length&&this.writeMessage(c,writePackedFloat,u)}writePackedDouble(c,u){u.length&&this.writeMessage(c,writePackedDouble,u)}writePackedFixed32(c,u){u.length&&this.writeMessage(c,writePackedFixed32,u)}writePackedSFixed32(c,u){u.length&&this.writeMessage(c,writePackedSFixed32,u)}writePackedFixed64(c,u){u.length&&this.writeMessage(c,writePackedFixed64,u)}writePackedSFixed64(c,u){u.length&&this.writeMessage(c,writePackedSFixed64,u)}writeBytesField(c,u){this.writeTag(c,2),this.writeBytes(u)}writeFixed32Field(c,u){this.writeTag(c,5),this.writeFixed32(u)}writeSFixed32Field(c,u){this.writeTag(c,5),this.writeSFixed32(u)}writeFixed64Field(c,u){this.writeTag(c,1),this.writeFixed64(u)}writeSFixed64Field(c,u){this.writeTag(c,1),this.writeSFixed64(u)}writeVarintField(c,u){this.writeTag(c,0),this.writeVarint(u)}writeSVarintField(c,u){this.writeTag(c,0),this.writeSVarint(u)}writeStringField(c,u){this.writeTag(c,2),this.writeString(u)}writeFloatField(c,u){this.writeTag(c,5),this.writeFloat(u)}writeDoubleField(c,u){this.writeTag(c,1),this.writeDouble(u)}writeBooleanField(c,u){this.writeVarintField(c,+u)}}function toNum(c,u,d){return d?4294967296*u+(c>>>0):4294967296*(u>>>0)+(c>>>0)}function makeRoomForExtraLength(c,u,d){const p=u<=16383?1:u<=2097151?2:u<=268435455?3:Math.floor(Math.log(u)/(7*Math.LN2));d.realloc(p);for(let u=d.pos-1;u>=c;u--)d.buf[u+p]=d.buf[u]}function writePackedVarint(c,u){for(let d=0;d<c.length;d++)u.writeVarint(c[d])}function writePackedSVarint(c,u){for(let d=0;d<c.length;d++)u.writeSVarint(c[d])}function writePackedFloat(c,u){for(let d=0;d<c.length;d++)u.writeFloat(c[d])}function writePackedDouble(c,u){for(let d=0;d<c.length;d++)u.writeDouble(c[d])}function writePackedBoolean(c,u){for(let d=0;d<c.length;d++)u.writeBoolean(c[d])}function writePackedFixed32(c,u){for(let d=0;d<c.length;d++)u.writeFixed32(c[d])}function writePackedSFixed32(c,u){for(let d=0;d<c.length;d++)u.writeSFixed32(c[d])}function writePackedFixed64(c,u){for(let d=0;d<c.length;d++)u.writeFixed64(c[d])}function writePackedSFixed64(c,u){for(let d=0;d<c.length;d++)u.writeSFixed64(c[d])}function layersPBFReader(c,u,d){if(3===c){const c={keys:[],values:[],features:[]},p=d.readVarint()+d.pos;d.readFields(layerPBFReader,c,p),c.length=c.features.length,c.length&&(u[c.name]=c)}}function layerPBFReader(c,u,d){if(15===c)u.version=d.readVarint();else if(1===c)u.name=d.readString();else if(5===c)u.extent=d.readVarint();else if(2===c)u.features.push(d.pos);else if(3===c)u.keys.push(d.readString());else if(4===c){let p=null;const g=d.readVarint()+d.pos;for(;d.pos<g;)p=1===(c=d.readVarint()>>3)?d.readString():2===c?d.readFloat():3===c?d.readDouble():4===c?d.readVarint64():5===c?d.readVarint():6===c?d.readSVarint():7===c?d.readBoolean():null;u.values.push(p)}}function featurePBFReader(c,u,d){if(1==c)u.id=d.readVarint();else if(2==c){const c=d.readVarint()+d.pos;for(;d.pos<c;){const c=u.layer.keys[d.readVarint()],p=u.layer.values[d.readVarint()];u.properties[c]=p}}else 3==c?u.type=d.readVarint():4==c&&(u.geometry=d.pos)}function readRawFeature(c,u,d){c.pos=u.features[d];const p=c.readVarint()+c.pos,g={layer:u,type:0,properties:{}};return c.readFields(featurePBFReader,g,p),g}var cc=class MVT extends Aa{constructor(c){super(),c=c||{},this.dataProjection=new Di({code:"",units:"tile-pixels"}),this.featureClass=c.featureClass?c.featureClass:RenderFeature,this.geometryName_=c.geometryName,this.layerName_=c.layerName?c.layerName:"layer",this.layers_=c.layers?c.layers:null,this.idProperty_=c.idProperty,this.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"]}readRawGeometry_(c,u,d,p){c.pos=u.geometry;const g=c.readVarint()+c.pos;let f=1,_=0,y=0,x=0,v=0,C=0;for(;c.pos<g;){if(!_){const u=c.readVarint();f=7&u,_=u>>3}if(_--,1===f||2===f)y+=c.readSVarint(),x+=c.readSVarint(),1===f&&v>C&&(p.push(v),C=v),d.push(y,x),v+=2;else{if(7!==f)throw new Error("Invalid command found in the PBF");v>C&&(d.push(d[C],d[C+1]),v+=2)}}v>C&&(p.push(v),C=v)}createFeature_(c,u,d){const p=u.type;if(0===p)return null;let g;const f=u.properties;let _;this.idProperty_?(_=f[this.idProperty_],delete f[this.idProperty_]):_=u.id,f[this.layerName_]=u.layer.name;const y=[],x=[];this.readRawGeometry_(c,u,y,x);const v=function getGeometryType(c,u){let d;1===c?d=1===u?"Point":"MultiPoint":2===c?d=1===u?"LineString":"MultiLineString":3===c&&(d="Polygon");return d}(p,x.length);if(this.featureClass===RenderFeature)g=new this.featureClass(v,y,x,2,f,_),g.transform(d.dataProjection);else{let c;if("Polygon"==v){const u=inflateEnds(y,x);c=u.length>1?new qs(y,"XY",u):new or(y,"XY",x)}else c="Point"===v?new sr(y,"XY"):"LineString"===v?new Jr(y,"XY"):"MultiPoint"===v?new Vs(y,"XY"):"MultiLineString"===v?new Xs(y,"XY",x):null;g=new(0,this.featureClass),this.geometryName_&&g.setGeometryName(this.geometryName_);const u=transformGeometryWithOptions(c,!1,d);g.setGeometry(u),void 0!==_&&g.setId(_),g.setProperties(f,!0)}return g}getType(){return"arraybuffer"}readFeatures(c,u){const d=this.layers_,p=get$2((u=this.adaptOptions(u)).dataProjection);p.setWorldExtent(u.extent),u.dataProjection=p;const g=new Pbf(c),f=g.readFields(layersPBFReader,{}),_=[];for(const c in f){if(d&&!d.includes(c))continue;const y=f[c],x=y?[0,0,y.extent,y.extent]:null;p.setExtent(x);for(let c=0,d=y.length;c<d;++c){const d=readRawFeature(g,y,c),p=this.createFeature_(g,d,u);null!==p&&_.push(p)}}return _}readProjection(c){return this.dataProjection}setLayers(c){this.layers_=c}};class XML{read(c){if(!c)return null;if("string"==typeof c){const u=parse$1(c);return this.readFromDocument(u)}return isDocument(c)?this.readFromDocument(c):this.readFromNode(c)}readFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readFromNode(u);return null}readFromNode(c){abstract()}}const uc="http://www.w3.org/1999/xlink";function readHref(c){return c.getAttributeNS(uc,"href")}const dc=[null,"http://www.opengis.net/ows/1.1"],pc=makeStructureNS(dc,{ServiceIdentification:makeObjectPropertySetter((function readServiceIdentification(c,u){return pushParseAndPop({},Pc,c,u)})),ServiceProvider:makeObjectPropertySetter((function readServiceProvider(c,u){return pushParseAndPop({},bc,c,u)})),OperationsMetadata:makeObjectPropertySetter((function readOperationsMetadata(c,u){return pushParseAndPop({},Sc,c,u)}))});const gc=makeStructureNS(dc,{DeliveryPoint:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),AdministrativeArea:makeObjectPropertySetter(readString),PostalCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString),ElectronicMailAddress:makeObjectPropertySetter(readString)}),mc=makeStructureNS(dc,{Value:makeObjectPropertyPusher((function readValue(c,u){return readString(c)}))}),fc=makeStructureNS(dc,{AllowedValues:makeObjectPropertySetter((function readAllowedValues(c,u){return pushParseAndPop({},mc,c,u)}))}),_c=makeStructureNS(dc,{Phone:makeObjectPropertySetter((function readPhone(c,u){return pushParseAndPop({},wc,c,u)})),Address:makeObjectPropertySetter((function readAddress(c,u){return pushParseAndPop({},gc,c,u)}))}),yc=makeStructureNS(dc,{HTTP:makeObjectPropertySetter((function readHttp(c,u){return pushParseAndPop({},xc,c,u)}))}),xc=makeStructureNS(dc,{Get:makeObjectPropertyPusher((function readGet(c,u){const d=readHref(c);if(!d)return;return pushParseAndPop({href:d},Cc,c,u)})),Post:void 0}),vc=makeStructureNS(dc,{DCP:makeObjectPropertySetter((function readDcp(c,u){return pushParseAndPop({},yc,c,u)}))}),Sc=makeStructureNS(dc,{Operation:function readOperation(c,u){const d=c.getAttribute("name"),p=pushParseAndPop({},vc,c,u);if(!p)return;u[u.length-1][d]=p}}),wc=makeStructureNS(dc,{Voice:makeObjectPropertySetter(readString),Facsimile:makeObjectPropertySetter(readString)}),Cc=makeStructureNS(dc,{Constraint:makeObjectPropertyPusher((function readConstraint(c,u){const d=c.getAttribute("name");if(!d)return;return pushParseAndPop({name:d},fc,c,u)}))}),Ec=makeStructureNS(dc,{IndividualName:makeObjectPropertySetter(readString),PositionName:makeObjectPropertySetter(readString),ContactInfo:makeObjectPropertySetter((function readContactInfo(c,u){return pushParseAndPop({},_c,c,u)}))}),Pc=makeStructureNS(dc,{Abstract:makeObjectPropertySetter(readString),AccessConstraints:makeObjectPropertySetter(readString),Fees:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),ServiceTypeVersion:makeObjectPropertySetter(readString),ServiceType:makeObjectPropertySetter(readString)}),bc=makeStructureNS(dc,{ProviderName:makeObjectPropertySetter(readString),ProviderSite:makeObjectPropertySetter(readHref),ServiceContact:makeObjectPropertySetter((function readServiceContact(c,u){return pushParseAndPop({},Ec,c,u)}))});var Mc=class OWS extends XML{constructor(){super()}readFromNode(c){const u=pushParseAndPop({},pc,c,[]);return u||null}};function flipXY(c,u,d,p,g,f){void 0!==g?f=void 0!==f?f:0:(g=[],f=0);let _=u;for(;_<d;){const u=c[_++];g[f++]=c[_++],g[f++]=u;for(let u=2;u<p;++u)g[f++]=c[_++]}return g.length=f,g}function encodeUnsignedInteger(c){let u,d="";for(;c>=32;)u=63+(32|31&c),d+=String.fromCharCode(u),c>>=5;return u=c+63,d+=String.fromCharCode(u),d}var Tc=class Polyline extends TextFeature{constructor(c){super(),c=c||{},this.dataProjection=get$2("EPSG:4326"),this.factor_=c.factor?c.factor:1e5,this.geometryLayout_=c.geometryLayout?c.geometryLayout:"XY"}readFeatureFromText(c,u){const d=this.readGeometryFromText(c,u);return new Ii(d)}readFeaturesFromText(c,u){return[this.readFeatureFromText(c,u)]}readGeometryFromText(c,u){const d=getStrideForLayout(this.geometryLayout_),p=function decodeDeltas(c,u,d){let p;d=d||1e5;const g=new Array(u);for(p=0;p<u;++p)g[p]=0;const f=function decodeFloats(c,u){u=u||1e5;const d=function decodeSignedIntegers(c){const u=function decodeUnsignedIntegers(c){const u=[];let d=0,p=0;for(let g=0,f=c.length;g<f;++g){const f=c.charCodeAt(g)-63;d|=(31&f)<<p,f<32?(u.push(d),d=0,p=0):p+=5}return u}(c);for(let c=0,d=u.length;c<d;++c){const d=u[c];u[c]=1&d?~(d>>1):d>>1}return u}(c);for(let c=0,p=d.length;c<p;++c)d[c]/=u;return d}(c,d);for(let c=0,d=f.length;c<d;)for(p=0;p<u;++p,++c)g[p]+=f[c],f[c]=g[p];return f}(c,d,this.factor_);flipXY(p,0,p.length,d,p);const g=inflateCoordinates(p,0,p.length,d);return transformGeometryWithOptions(new Jr(g,this.geometryLayout_),!1,this.adaptOptions(u))}writeFeatureText(c,u){const d=c.getGeometry();if(d)return this.writeGeometryText(d,u);throw new Error("Expected `feature` to have a geometry")}writeFeaturesText(c,u){return this.writeFeatureText(c[0],u)}writeGeometryText(c,u){const d=(c=transformGeometryWithOptions(c,!0,this.adaptOptions(u))).getFlatCoordinates(),p=c.getStride();return flipXY(d,0,d.length,p,d),function encodeDeltas(c,u,d){let p;d=d||1e5;const g=new Array(u);for(p=0;p<u;++p)g[p]=0;for(let d=0,f=c.length;d<f;)for(p=0;p<u;++p,++d){const u=c[d],f=u-g[p];g[p]=u,c[d]=f}return function encodeFloats(c,u){u=u||1e5;for(let d=0,p=c.length;d<p;++d)c[d]=Math.round(c[d]*u);return function encodeSignedIntegers(c){for(let u=0,d=c.length;u<d;++u){const d=c[u];c[u]=d<0?~(d<<1):d<<1}return function encodeUnsignedIntegers(c){let u="";for(let d=0,p=c.length;d<p;++d)u+=encodeUnsignedInteger(c[d]);return u}(c)}(c)}(c,d)}(d,p,this.factor_)}};const Rc={Point:function readPointGeometry(c,u,d){const p=c.coordinates;u&&d&&transformVertex(p,u,d);return new sr(p)},LineString:function readLineStringGeometry(c,u){const d=concatenateArcs(c.arcs,u);return new Jr(d)},Polygon:function readPolygonGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p)d[p]=concatenateArcs(c.arcs[p],u);return new or(d)},MultiPoint:function readMultiPointGeometry(c,u,d){const p=c.coordinates;if(u&&d)for(let c=0,g=p.length;c<g;++c)transformVertex(p[c],u,d);return new Vs(p)},MultiLineString:function readMultiLineStringGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p)d[p]=concatenateArcs(c.arcs[p],u);return new Xs(d)},MultiPolygon:function readMultiPolygonGeometry(c,u){const d=[];for(let p=0,g=c.arcs.length;p<g;++p){const g=c.arcs[p],f=[];for(let c=0,d=g.length;c<d;++c)f[c]=concatenateArcs(g[c],u);d[p]=f}return new qs(d)}};function concatenateArcs(c,u){const d=[];let p;for(let g=0,f=c.length;g<f;++g)if(p=c[g],g>0&&d.pop(),p>=0){const c=u[p];for(let u=0,p=c.length;u<p;++u)d.push(c[u].slice(0))}else{const c=u[~p];for(let u=c.length-1;u>=0;--u)d.push(c[u].slice(0))}return d}function readFeaturesFromGeometryCollection(c,u,d,p,g,f,_){const y=c.geometries,x=[];for(let c=0,v=y.length;c<v;++c)x[c]=readFeatureFromGeometry(y[c],u,d,p,g,f,_);return x}function readFeatureFromGeometry(c,u,d,p,g,f,_){let y=null;const x=c.type;if(x){const g=Rc[x];y="Point"===x||"MultiPoint"===x?g(c,d,p):g(c,u),y=transformGeometryWithOptions(y,!1,_)}const v=new Ii({geometry:y});void 0!==c.id&&v.setId(c.id);let C=c.properties;return g&&(C||(C={}),C[g]=f),C&&v.setProperties(C,!0),v}function transformArc(c,u,d){let p=0,g=0;for(let f=0,_=c.length;f<_;++f){const _=c[f];p+=_[0],g+=_[1],_[0]=p,_[1]=g,transformVertex(_,u,d)}}function transformVertex(c,u,d){c[0]=c[0]*u[0]+d[0],c[1]=c[1]*u[1]+d[1]}var Lc=class TopoJSON extends JSONFeature{constructor(c){super(),c=c||{},this.layerName_=c.layerName,this.layers_=c.layers?c.layers:null,this.dataProjection=get$2(c.dataProjection?c.dataProjection:"EPSG:4326")}readFeaturesFromObject(c,u){if("Topology"==c.type){const d=c;let p,g=null,f=null;d.transform&&(p=d.transform,g=p.scale,f=p.translate);const _=d.arcs;p&&function transformArcs(c,u,d){for(let p=0,g=c.length;p<g;++p)transformArc(c[p],u,d)}(_,g,f);const y=[],x=d.objects,v=this.layerName_;let C;for(const c in x)this.layers_&&!this.layers_.includes(c)||("GeometryCollection"===x[c].type?(C=x[c],y.push.apply(y,readFeaturesFromGeometryCollection(C,_,g,f,v,c,u))):(C=x[c],y.push(readFeatureFromGeometry(C,_,g,f,v,c,u))));return y}return[]}readProjectionFromObject(c){return this.dataProjection}};class GML32 extends GML3{constructor(c){super(c=c||{}),this.schemaLocation=c.schemaLocation?c.schemaLocation:this.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd"}writeGeometryElement(c,u,d){const p=d[d.length-1];d[d.length-1]=Object.assign({multiCurve:!0,multiSurface:!0},p),super.writeGeometryElement(c,u,d)}}GML32.prototype.namespace="http://www.opengis.net/gml/3.2",GML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:makeReplacer(GML3.prototype.readFlatPos),posList:makeReplacer(GML3.prototype.readFlatPosList),coordinates:makeReplacer(GML2.prototype.readFlatCoordinates)}},GML32.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:GML3.prototype.interiorParser,exterior:GML3.prototype.exteriorParser}},GML32.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:makeReplacer(GMLBase.prototype.readPoint),MultiPoint:makeReplacer(GMLBase.prototype.readMultiPoint),LineString:makeReplacer(GMLBase.prototype.readLineString),MultiLineString:makeReplacer(GMLBase.prototype.readMultiLineString),LinearRing:makeReplacer(GMLBase.prototype.readLinearRing),Polygon:makeReplacer(GMLBase.prototype.readPolygon),MultiPolygon:makeReplacer(GMLBase.prototype.readMultiPolygon),Surface:makeReplacer(GML32.prototype.readSurface),MultiSurface:makeReplacer(GML3.prototype.readMultiSurface),Curve:makeReplacer(GML32.prototype.readCurve),MultiCurve:makeReplacer(GML3.prototype.readMultiCurve),Envelope:makeReplacer(GML32.prototype.readEnvelope)}},GML32.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:makeArrayPusher(GML3.prototype.curveMemberParser),curveMembers:makeArrayPusher(GML3.prototype.curveMemberParser)}},GML32.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:makeArrayPusher(GML3.prototype.surfaceMemberParser),surfaceMembers:makeArrayPusher(GML3.prototype.surfaceMemberParser)}},GML32.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:makeArrayPusher(GMLBase.prototype.readLineString),Curve:makeArrayPusher(GML3.prototype.readCurve)}},GML32.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon),Surface:makeArrayPusher(GML3.prototype.readSurface)}},GML32.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:makeReplacer(GML3.prototype.readPatch)}},GML32.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:makeReplacer(GML3.prototype.readSegment)}},GML32.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:makeArrayPusher(GML3.prototype.readFlatPosList),upperCorner:makeArrayPusher(GML3.prototype.readFlatPosList)}},GML32.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:makeReplacer(GML3.prototype.readPolygonPatch)}},GML32.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:makeArrayExtender(GML3.prototype.readLineStringSegment)}},GML32.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:makeArrayPusher(GMLBase.prototype.pointMemberParser),pointMembers:makeArrayPusher(GMLBase.prototype.pointMemberParser)}},GML32.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:makeArrayPusher(GMLBase.prototype.lineStringMemberParser),lineStringMembers:makeArrayPusher(GMLBase.prototype.lineStringMemberParser)}},GML32.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:makeArrayPusher(GMLBase.prototype.polygonMemberParser),polygonMembers:makeArrayPusher(GMLBase.prototype.polygonMemberParser)}},GML32.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode)}},GML32.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:makeArrayPusher(GMLBase.prototype.readLineString)}},GML32.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:makeArrayPusher(GMLBase.prototype.readPolygon)}},GML32.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:makeReplacer(GMLBase.prototype.readFlatLinearRing),Ring:makeReplacer(GML32.prototype.readFlatCurveRing)}},GML32.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:makeChildAppender(GML3.prototype.writeRing),interior:makeChildAppender(GML3.prototype.writeRing)}},GML32.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:makeChildAppender(writeStringTextNode),upperCorner:makeChildAppender(writeStringTextNode)}},GML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember),polygonMember:makeChildAppender(GML3.prototype.writeSurfaceOrPolygonMember)}},GML32.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:makeChildAppender(GML3.prototype.writePointMember)}},GML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember),curveMember:makeChildAppender(GML3.prototype.writeLineStringOrCurveMember)}},GML32.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiCurve:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),Point:makeChildAppender(GML32.prototype.writePoint),MultiPoint:makeChildAppender(GML3.prototype.writeMultiPoint),LineString:makeChildAppender(GML3.prototype.writeCurveOrLineString),MultiLineString:makeChildAppender(GML3.prototype.writeMultiCurveOrLineString),LinearRing:makeChildAppender(GML3.prototype.writeLinearRing),Polygon:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiPolygon:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Surface:makeChildAppender(GML3.prototype.writeSurfaceOrPolygon),MultiSurface:makeChildAppender(GML3.prototype.writeMultiSurfaceOrPolygon),Envelope:makeChildAppender(GML3.prototype.writeEnvelope)}};class Filter{constructor(c){this.tagName_=c}getTagName(){return this.tagName_}}class LogicalNary extends Filter{constructor(c,u){super(c),this.conditions=u,assert(this.conditions.length>=2,"At least 2 conditions are required")}}class And extends LogicalNary{constructor(c){super("And",Array.prototype.slice.call(arguments))}}class Bbox extends Filter{constructor(c,u,d){if(super("BBOX"),this.geometryName=c,this.extent=u,4!==u.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=d}}const Ac={"http://www.opengis.net/gml":{boundedBy:makeObjectPropertySetter(GMLBase.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:makeArrayPusher(GMLBase.prototype.readFeaturesInternal)}},Ic={"http://www.opengis.net/wfs":{totalInserted:makeObjectPropertySetter(readPositiveInteger),totalUpdated:makeObjectPropertySetter(readPositiveInteger),totalDeleted:makeObjectPropertySetter(readPositiveInteger)},"http://www.opengis.net/wfs/2.0":{totalInserted:makeObjectPropertySetter(readPositiveInteger),totalUpdated:makeObjectPropertySetter(readPositiveInteger),totalDeleted:makeObjectPropertySetter(readPositiveInteger)}},Fc={"http://www.opengis.net/wfs":{TransactionSummary:makeObjectPropertySetter(readTransactionSummary,"transactionSummary"),InsertResults:makeObjectPropertySetter(readInsertResults,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:makeObjectPropertySetter(readTransactionSummary,"transactionSummary"),InsertResults:makeObjectPropertySetter(readInsertResults,"insertIds")}},kc={"http://www.opengis.net/wfs":{PropertyName:makeChildAppender(writeStringTextNode)},"http://www.opengis.net/wfs/2.0":{PropertyName:makeChildAppender(writeStringTextNode)}},Oc={"http://www.opengis.net/wfs":{Insert:makeChildAppender(writeFeature),Update:makeChildAppender(writeUpdate),Delete:makeChildAppender(writeDelete),Property:makeChildAppender(writeProperty),Native:makeChildAppender(writeNative)},"http://www.opengis.net/wfs/2.0":{Insert:makeChildAppender(writeFeature),Update:makeChildAppender(writeUpdate),Delete:makeChildAppender(writeDelete),Property:makeChildAppender(writeProperty),Native:makeChildAppender(writeNative)}},Nc="feature",Dc="http://www.w3.org/2000/xmlns/",Gc={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},jc={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},zc={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},Bc={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},Uc={"2.0.0":GML32,"1.1.0":GML3,"1.0.0":GML2};function serializeTransactionRequest(c,u,d,p){pushSerializeAndPop(p,Oc,makeSimpleNodeFactory(c),u,d)}function readTransactionSummary(c,u){return pushParseAndPop({},Ic,c,u)}const $c={"http://www.opengis.net/ogc":{FeatureId:makeArrayPusher((function(c,u){return c.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:makeArrayPusher((function(c,u){return c.getAttribute("fid")}))}};function fidParser(c,u){parseNode($c,c,u)}const Wc={"http://www.opengis.net/wfs":{Feature:fidParser},"http://www.opengis.net/wfs/2.0":{Feature:fidParser}};function readInsertResults(c,u){return pushParseAndPop([],Wc,c,u)}function writeFeature(c,u,d){const p=d[d.length-1],g=p.featureType,f=p.featureNS,_=p.gmlVersion,y=createElementNS(f,g);c.appendChild(y),2===_?GML2.prototype.writeFeatureElement(y,u,d):3===_?GML3.prototype.writeFeatureElement(y,u,d):GML32.prototype.writeFeatureElement(y,u,d)}function writeOgcFidFilter(c,u,d){const p=d[d.length-1].version,g=Gc[p],f=createElementNS(g,"Filter"),_=createElementNS(g,"FeatureId");f.appendChild(_),_.setAttribute("fid",u),c.appendChild(f)}function getTypeName(c,u){const d=(c=c||Nc)+":";return u.startsWith(d)?u:d+u}function writeDelete(c,u,d){const p=d[d.length-1];assert(void 0!==u.getId(),"Features must have an id set");const g=p.featureType,f=p.featurePrefix,_=p.featureNS,y=getTypeName(f,g);c.setAttribute("typeName",y),c.setAttributeNS(Dc,"xmlns:"+f,_);const x=u.getId();void 0!==x&&writeOgcFidFilter(c,x,d)}function writeUpdate(c,u,d){const p=d[d.length-1];assert(void 0!==u.getId(),"Features must have an id set");const g=p.version,f=p.featureType,_=p.featurePrefix,y=p.featureNS,x=getTypeName(_,f),v=u.getGeometryName();c.setAttribute("typeName",x),c.setAttributeNS(Dc,"xmlns:"+_,y);const C=u.getId();if(void 0!==C){const f=u.getKeys(),_=[];for(let c=0,d=f.length;c<d;c++){const d=u.get(f[c]);if(void 0!==d){let u=f[c];d&&"function"==typeof d.getSimplifiedGeometry&&(u=v),_.push({name:u,value:d})}}pushSerializeAndPop({version:g,gmlVersion:p.gmlVersion,node:c,hasZ:p.hasZ,srsName:p.srsName},Oc,makeSimpleNodeFactory("Property"),_,d),writeOgcFidFilter(c,C,d)}}function writeProperty(c,u,d){const p=d[d.length-1],g=p.version,f=jc[g],_=createElementNS(f,"2.0.0"===g?"ValueReference":"Name"),y=p.gmlVersion;if(c.appendChild(_),writeStringTextNode(_,u.name),void 0!==u.value&&null!==u.value){const p=createElementNS(f,"Value");c.appendChild(p),u.value&&"function"==typeof u.value.getSimplifiedGeometry?2===y?GML2.prototype.writeGeometryElement(p,u.value,d):3===y?GML3.prototype.writeGeometryElement(p,u.value,d):GML32.prototype.writeGeometryElement(p,u.value,d):writeStringTextNode(p,u.value)}}function writeNative(c,u,d){u.vendorId&&c.setAttribute("vendorId",u.vendorId),void 0!==u.safeToIgnore&&c.setAttribute("safeToIgnore",String(u.safeToIgnore)),void 0!==u.value&&writeStringTextNode(c,u.value)}const Xc={"http://www.opengis.net/wfs":{Query:makeChildAppender(writeQuery)},"http://www.opengis.net/wfs/2.0":{Query:makeChildAppender(writeQuery)},"http://www.opengis.net/ogc":{During:makeChildAppender(writeDuringFilter),And:makeChildAppender(writeLogicalFilter),Or:makeChildAppender(writeLogicalFilter),Not:makeChildAppender(writeNotFilter),BBOX:makeChildAppender(writeBboxFilter),Contains:makeChildAppender(writeSpatialFilter),Intersects:makeChildAppender(writeSpatialFilter),Within:makeChildAppender(writeSpatialFilter),DWithin:makeChildAppender(writeDWithinFilter),PropertyIsEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNotEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsLessThan:makeChildAppender(writeComparisonFilter),PropertyIsLessThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThan:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNull:makeChildAppender(writeIsNullFilter),PropertyIsBetween:makeChildAppender(writeIsBetweenFilter),PropertyIsLike:makeChildAppender(writeIsLikeFilter)},"http://www.opengis.net/fes/2.0":{During:makeChildAppender(writeDuringFilter),And:makeChildAppender(writeLogicalFilter),Or:makeChildAppender(writeLogicalFilter),Not:makeChildAppender(writeNotFilter),BBOX:makeChildAppender(writeBboxFilter),Contains:makeChildAppender(writeSpatialFilter),Disjoint:makeChildAppender(writeSpatialFilter),Intersects:makeChildAppender(writeSpatialFilter),ResourceId:makeChildAppender((function writeResourceIdFilter(c,u,d){c.setAttribute("rid",u.rid)})),Within:makeChildAppender(writeSpatialFilter),DWithin:makeChildAppender(writeDWithinFilter),PropertyIsEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNotEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsLessThan:makeChildAppender(writeComparisonFilter),PropertyIsLessThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThan:makeChildAppender(writeComparisonFilter),PropertyIsGreaterThanOrEqualTo:makeChildAppender(writeComparisonFilter),PropertyIsNull:makeChildAppender(writeIsNullFilter),PropertyIsBetween:makeChildAppender(writeIsBetweenFilter),PropertyIsLike:makeChildAppender(writeIsLikeFilter)}};function writeQuery(c,u,d){const p=d[d.length-1],g=p.version,f=p.featurePrefix,_=p.featureNS,y=p.propertyNames,x=p.srsName;let v,C;v=f?getTypeName(f,u):u,C="2.0.0"===g?"typeNames":"typeName",c.setAttribute(C,v),x&&c.setAttribute("srsName",x),_&&c.setAttributeNS(Dc,"xmlns:"+f,_);const M=Object.assign({},p);M.node=c,pushSerializeAndPop(M,kc,makeSimpleNodeFactory("PropertyName"),y,d);const T=p.filter;if(T){const u=createElementNS(getFilterNS(g),"Filter");c.appendChild(u),function writeFilterCondition(c,u,d){const p=d[d.length-1],g={node:c};Object.assign(g,{context:p}),pushSerializeAndPop(g,Xc,makeSimpleNodeFactory(u.getTagName()),[u],d)}(u,T,d)}}function writeBboxFilter(c,u,d){const p=d[d.length-1],g=p.context.version;p.srsName=u.srsName;const f=Uc[g];writePropertyName(g,c,u.geometryName),f.prototype.writeGeometryElement(c,u.extent,d)}function writeSpatialFilter(c,u,d){const p=d[d.length-1],g=p.context.version;p.srsName=u.srsName;const f=Uc[g];writePropertyName(g,c,u.geometryName),f.prototype.writeGeometryElement(c,u.geometry,d)}function writeDWithinFilter(c,u,d){const p=d[d.length-1].context.version;writeSpatialFilter(c,u,d);const g=createElementNS(getFilterNS(p),"Distance");writeStringTextNode(g,u.distance.toString()),"2.0.0"===p?g.setAttribute("uom",u.unit):g.setAttribute("units",u.unit),c.appendChild(g)}function writeDuringFilter(c,u,d){const p=d[d.length-1].context.version;writeExpression(zc[p],"ValueReference",c,u.propertyName);const g=createElementNS(Ba,"TimePeriod");c.appendChild(g);const f=createElementNS(Ba,"begin");g.appendChild(f),writeTimeInstant(f,u.begin);const _=createElementNS(Ba,"end");g.appendChild(_),writeTimeInstant(_,u.end)}function writeLogicalFilter(c,u,d){const p=d[d.length-1].context,g={node:c};Object.assign(g,{context:p});const f=u.conditions;for(let c=0,u=f.length;c<u;++c){const u=f[c];pushSerializeAndPop(g,Xc,makeSimpleNodeFactory(u.getTagName()),[u],d)}}function writeNotFilter(c,u,d){const p=d[d.length-1].context,g={node:c};Object.assign(g,{context:p});const f=u.condition;pushSerializeAndPop(g,Xc,makeSimpleNodeFactory(f.getTagName()),[f],d)}function writeComparisonFilter(c,u,d){const p=d[d.length-1].context.version;void 0!==u.matchCase&&c.setAttribute("matchCase",u.matchCase.toString()),writePropertyName(p,c,u.propertyName),writeLiteral(p,c,""+u.expression)}function writeIsNullFilter(c,u,d){writePropertyName(d[d.length-1].context.version,c,u.propertyName)}function writeIsBetweenFilter(c,u,d){const p=d[d.length-1].context.version,g=getFilterNS(p);writePropertyName(p,c,u.propertyName);const f=createElementNS(g,"LowerBoundary");c.appendChild(f),writeLiteral(p,f,""+u.lowerBoundary);const _=createElementNS(g,"UpperBoundary");c.appendChild(_),writeLiteral(p,_,""+u.upperBoundary)}function writeIsLikeFilter(c,u,d){const p=d[d.length-1].context.version;c.setAttribute("wildCard",u.wildCard),c.setAttribute("singleChar",u.singleChar),c.setAttribute("escapeChar",u.escapeChar),void 0!==u.matchCase&&c.setAttribute("matchCase",u.matchCase.toString()),writePropertyName(p,c,u.propertyName),writeLiteral(p,c,""+u.pattern)}function writeExpression(c,u,d,p){const g=createElementNS(c,u);writeStringTextNode(g,p),d.appendChild(g)}function writeLiteral(c,u,d){writeExpression(getFilterNS(c),"Literal",u,d)}function writePropertyName(c,u,d){"2.0.0"===c?writeExpression(zc[c],"ValueReference",u,d):writeExpression(Gc[c],"PropertyName",u,d)}function writeTimeInstant(c,u){const d=createElementNS(Ba,"TimeInstant");c.appendChild(d);const p=createElementNS(Ba,"timePosition");d.appendChild(p),writeStringTextNode(p,u)}function writeGetFeature(c,u,d){const p=d[d.length-1],g=Object.assign({},p);g.node=c,pushSerializeAndPop(g,Xc,makeSimpleNodeFactory("Query"),u,d)}function getFilterNS(c){let u;return u="2.0.0"===c?zc[c]:Gc[c],u}var Vc=class WFS extends XMLFeature{constructor(c){super(),c=c||{},this.version_=c.version?c.version:"1.1.0",this.featureType_=c.featureType,this.featureNS_=c.featureNS,this.gmlFormat_=c.gmlFormat?c.gmlFormat:new Uc[this.version_],this.schemaLocation_=c.schemaLocation?c.schemaLocation:Bc[this.version_]}getFeatureType(){return this.featureType_}setFeatureType(c){this.featureType_=c}readFeaturesFromNode(c,u){const d={node:c};Object.assign(d,{featureType:this.featureType_,featureNS:this.featureNS_}),Object.assign(d,this.getReadOptions(c,u||{}));const p=[d];let g;g="2.0.0"===this.version_?Ac:this.gmlFormat_.FEATURE_COLLECTION_PARSERS;let f=pushParseAndPop([],g,c,p,this.gmlFormat_);return f||(f=[]),f}readTransactionResponse(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readTransactionResponseFromDocument(u)}return isDocument(c)?this.readTransactionResponseFromDocument(c):this.readTransactionResponseFromNode(c)}}readFeatureCollectionMetadata(c){if(c){if("string"==typeof c){const u=parse$1(c);return this.readFeatureCollectionMetadataFromDocument(u)}return isDocument(c)?this.readFeatureCollectionMetadataFromDocument(c):this.readFeatureCollectionMetadataFromNode(c)}}readFeatureCollectionMetadataFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(u)}readFeatureCollectionMetadataFromNode(c){const u={},d=readNonNegativeIntegerString(c.getAttribute("numberOfFeatures"));return u.numberOfFeatures=d,pushParseAndPop(u,Ac,c,[],this.gmlFormat_)}readTransactionResponseFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(u)}readTransactionResponseFromNode(c){return pushParseAndPop({},Fc,c,[])}writeGetFeature(c){const u=createElementNS(jc[this.version_],"GetFeature");u.setAttribute("service","WFS"),u.setAttribute("version",this.version_),c.handle&&u.setAttribute("handle",c.handle),c.outputFormat&&u.setAttribute("outputFormat",c.outputFormat),void 0!==c.maxFeatures&&u.setAttribute("maxFeatures",String(c.maxFeatures)),c.resultType&&u.setAttribute("resultType",c.resultType),void 0!==c.startIndex&&u.setAttribute("startIndex",String(c.startIndex)),void 0!==c.count&&u.setAttribute("count",String(c.count)),void 0!==c.viewParams&&u.setAttribute("viewParams",c.viewParams),u.setAttributeNS(Da,"xsi:schemaLocation",this.schemaLocation_);const d={node:u};if(Object.assign(d,{version:this.version_,srsName:c.srsName,featureNS:c.featureNS?c.featureNS:this.featureNS_,featurePrefix:c.featurePrefix,propertyNames:c.propertyNames?c.propertyNames:[]}),assert(Array.isArray(c.featureTypes),"`options.featureTypes` must be an Array"),"string"==typeof c.featureTypes[0]){let p=c.filter;c.bbox&&(assert(c.geometryName,"`options.geometryName` must also be provided when `options.bbox` is set"),p=this.combineBboxAndFilter(c.geometryName,c.bbox,c.srsName,p)),Object.assign(d,{geometryName:c.geometryName,filter:p}),writeGetFeature(u,c.featureTypes,[d])}else c.featureTypes.forEach((p=>{const g=this.combineBboxAndFilter(p.geometryName,p.bbox,c.srsName,c.filter);Object.assign(d,{geometryName:p.geometryName,filter:g}),writeGetFeature(u,[p.name],[d])}));return u}combineBboxAndFilter(c,u,d,p){const g=function bbox(c,u,d){return new Bbox(c,u,d)}(c,u,d);return p?function and(c){const u=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(And,u))}(p,g):g}writeTransaction(c,u,d,p){const g=[],f=p.version?p.version:this.version_,_=createElementNS(jc[f],"Transaction");let y;_.setAttribute("service","WFS"),_.setAttribute("version",f),p&&(y=p.gmlOptions?p.gmlOptions:{},p.handle&&_.setAttribute("handle",p.handle)),_.setAttributeNS(Da,"xsi:schemaLocation",Bc[f]);const x=function createTransactionRequest(c,u,d,p){const g=p.featurePrefix?p.featurePrefix:Nc;let f;"1.0.0"===d?f=2:"1.1.0"===d?f=3:"2.0.0"===d&&(f=3.2);const _=Object.assign({node:c},{version:d,featureNS:p.featureNS,featureType:p.featureType,featurePrefix:g,gmlVersion:f,hasZ:p.hasZ,srsName:p.srsName},u);return _}(_,y,f,p);return c&&serializeTransactionRequest("Insert",c,g,x),u&&serializeTransactionRequest("Update",u,g,x),d&&serializeTransactionRequest("Delete",d,g,x),p.nativeElements&&serializeTransactionRequest("Native",p.nativeElements,g,x),_}readProjectionFromDocument(c){for(let u=c.firstChild;u;u=u.nextSibling)if(u.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(u);return null}readProjectionFromNode(c){if(c.firstElementChild&&c.firstElementChild.firstElementChild)for(let u=(c=c.firstElementChild.firstElementChild).firstElementChild;u;u=u.nextElementSibling)if(0!==u.childNodes.length&&(1!==u.childNodes.length||3!==u.firstChild.nodeType)){const c=[{}];return this.gmlFormat_.readGeometryElement(u,c),get$2(c.pop().srsName)}return null}};const qc=1,Yc=2,Zc=3,Kc=4,Hc=5,Jc=6,Qc=7,tu=15,eu=16,iu=17;class WkbReader{constructor(c){this.view_=c,this.pos_=0,this.initialized_=!1,this.isLittleEndian_=!1,this.hasZ_=!1,this.hasM_=!1,this.srid_=null,this.layout_="XY"}readUint8(){return this.view_.getUint8(this.pos_++)}readUint32(c){return this.view_.getUint32((this.pos_+=4)-4,void 0!==c?c:this.isLittleEndian_)}readDouble(c){return this.view_.getFloat64((this.pos_+=8)-8,void 0!==c?c:this.isLittleEndian_)}readPoint(){const c=[];return c.push(this.readDouble()),c.push(this.readDouble()),this.hasZ_&&c.push(this.readDouble()),this.hasM_&&c.push(this.readDouble()),c}readLineString(){const c=this.readUint32(),u=[];for(let d=0;d<c;d++)u.push(this.readPoint());return u}readPolygon(){const c=this.readUint32(),u=[];for(let d=0;d<c;d++)u.push(this.readLineString());return u}readWkbHeader(c){const u=this.readUint8()>0,d=this.readUint32(u),p=Math.floor((268435455&d)/1e3),g=Boolean(2147483648&d)||1===p||3===p,f=Boolean(1073741824&d)||2===p||3===p,_=Boolean(536870912&d),y=(268435455&d)%1e3,x=["XY",g?"Z":"",f?"M":""].join(""),v=_?this.readUint32(u):null;if(void 0!==c&&c!==y)throw new Error("Unexpected WKB geometry type "+y);if(this.initialized_){if(this.isLittleEndian_!==u)throw new Error("Inconsistent endian");if(this.layout_!==x)throw new Error("Inconsistent geometry layout");if(v&&this.srid_!==v)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=u,this.hasZ_=g,this.hasM_=f,this.layout_=x,this.srid_=v,this.initialized_=!0;return y}readWkbPayload(c){switch(c){case qc:return this.readPoint();case Yc:return this.readLineString();case Zc:case iu:return this.readPolygon();case Kc:return this.readMultiPoint();case Hc:return this.readMultiLineString();case Jc:case tu:case eu:return this.readMultiPolygon();case Qc:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+c+" is found")}}readWkbBlock(c){return this.readWkbPayload(this.readWkbHeader(c))}readWkbCollection(c,u){const d=this.readUint32(),p=[];for(let g=0;g<d;g++){const d=c.call(this,u);d&&p.push(d)}return p}readMultiPoint(){return this.readWkbCollection(this.readWkbBlock,qc)}readMultiLineString(){return this.readWkbCollection(this.readWkbBlock,Yc)}readMultiPolygon(){return this.readWkbCollection(this.readWkbBlock,Zc)}readGeometryCollection(){return this.readWkbCollection(this.readGeometry)}readGeometry(){const c=this.readWkbHeader(),u=this.readWkbPayload(c);switch(c){case qc:return new sr(u,this.layout_);case Yc:return new Jr(u,this.layout_);case Zc:case iu:return new or(u,this.layout_);case Kc:return new Vs(u,this.layout_);case Hc:return new Xs(u,this.layout_);case Jc:case tu:case eu:return new qs(u,this.layout_);case Qc:return new Ws(u);default:return null}}getSrid(){return this.srid_}}class WkbWriter{constructor(c){c=c||{},this.layout_=c.layout,this.isLittleEndian_=!1!==c.littleEndian,this.isEWKB_=!1!==c.ewkb,this.writeQueue_=[],this.nodata_=Object.assign({X:0,Y:0,Z:0,M:0},c.nodata)}writeUint8(c){this.writeQueue_.push([1,c])}writeUint32(c){this.writeQueue_.push([4,c])}writeDouble(c){this.writeQueue_.push([8,c])}writePoint(c,u){const d=Object.assign.apply(null,u.split("").map(((u,d)=>({[u]:c[d]}))));for(const c of this.layout_)this.writeDouble(c in d?d[c]:this.nodata_[c])}writeLineString(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writePoint(c[d],u)}writePolygon(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeLineString(c[d],u)}writeWkbHeader(c,u){c%=1e3,this.layout_.includes("Z")&&(c+=this.isEWKB_?2147483648:1e3),this.layout_.includes("M")&&(c+=this.isEWKB_?1073741824:2e3),this.isEWKB_&&Number.isInteger(u)&&(c|=536870912),this.writeUint8(this.isLittleEndian_?1:0),this.writeUint32(c),this.isEWKB_&&Number.isInteger(u)&&this.writeUint32(u)}writeMultiPoint(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(1),this.writePoint(c[d],u)}writeMultiLineString(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(2),this.writeLineString(c[d],u)}writeMultiPolygon(c,u){this.writeUint32(c.length);for(let d=0;d<c.length;d++)this.writeWkbHeader(3),this.writePolygon(c[d],u)}writeGeometryCollection(c){this.writeUint32(c.length);for(let u=0;u<c.length;u++)this.writeGeometry(c[u])}findMinimumLayout(c,u="XYZM"){if(c instanceof rr)return((c,u)=>c===u?c:"XYZM"===c?u:"XYZM"===u?c:"XY")(c.getLayout(),u);if(c instanceof Ws){const d=c.getGeometriesArray();for(let c=0;c<d.length&&"XY"!==u;c++)u=this.findMinimumLayout(d[c],u)}return u}writeGeometry(c,u){const d={Point:qc,LineString:Yc,Polygon:Zc,MultiPoint:Kc,MultiLineString:Hc,MultiPolygon:Jc,GeometryCollection:Qc},p=c.getType(),g=d[p];if(!g)throw new Error("GeometryType "+p+" is not supported");if(this.layout_||(this.layout_=this.findMinimumLayout(c)),this.writeWkbHeader(g,u),c instanceof rr){({Point:this.writePoint,LineString:this.writeLineString,Polygon:this.writePolygon,MultiPoint:this.writeMultiPoint,MultiLineString:this.writeMultiLineString,MultiPolygon:this.writeMultiPolygon})[p].call(this,c.getCoordinates(),c.getLayout())}else c instanceof Ws&&this.writeGeometryCollection(c.getGeometriesArray())}getBuffer(){const c=this.writeQueue_.reduce(((c,u)=>c+u[0]),0),u=new ArrayBuffer(c),d=new DataView(u);let p=0;return this.writeQueue_.forEach((c=>{switch(c[0]){case 1:d.setUint8(p,c[1]);break;case 4:d.setUint32(p,c[1],this.isLittleEndian_);break;case 8:d.setFloat64(p,c[1],this.isLittleEndian_)}p+=c[0]})),u}}function getDataView(c){return"string"==typeof c?function decodeHexString(c){const u=new Uint8Array(c.length/2);for(let d=0;d<c.length/2;d++)u[d]=parseInt(c.substr(2*d,2),16);return new DataView(u.buffer)}(c):ArrayBuffer.isView(c)?c instanceof DataView?c:new DataView(c.buffer,c.byteOffset,c.byteLength):c instanceof ArrayBuffer?new DataView(c):null}var ru=class WKB extends Aa{constructor(c){super(),c=c||{},this.splitCollection=Boolean(c.splitCollection),this.viewCache_=null,this.hex_=!1!==c.hex,this.littleEndian_=!1!==c.littleEndian,this.ewkb_=!1!==c.ewkb,this.layout_=c.geometryLayout,this.nodataZ_=c.nodataZ||0,this.nodataM_=c.nodataM||0,this.srid_=c.srid}getType(){return this.hex_?"text":"arraybuffer"}readFeature(c,u){return new Ii({geometry:this.readGeometry(c,u)})}readFeatures(c,u){let d=[];const p=this.readGeometry(c,u);return d=this.splitCollection&&p instanceof Ws?p.getGeometriesArray():[p],d.map((c=>new Ii({geometry:c})))}readGeometry(c,u){const d=getDataView(c);if(!d)return null;const p=new WkbReader(d).readGeometry();return this.viewCache_=d,u=this.getReadOptions(c,u),this.viewCache_=null,transformGeometryWithOptions(p,!1,u)}readProjection(c){const u=this.viewCache_||getDataView(c);if(!u)return;const d=new WkbReader(u);return d.readWkbHeader(),d.getSrid()&&get$2("EPSG:"+d.getSrid())||void 0}writeFeature(c,u){return this.writeGeometry(c.getGeometry(),u)}writeFeatures(c,u){return this.writeGeometry(new Ws(c.map((c=>c.getGeometry()))),u)}writeGeometry(c,u){u=this.adaptOptions(u);const d=new WkbWriter({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}});let p=Number.isInteger(this.srid_)?Number(this.srid_):null;if(!1!==this.srid_&&!Number.isInteger(this.srid_)){const c=u.dataProjection&&get$2(u.dataProjection);if(c){const u=c.getCode();u.startsWith("EPSG:")&&(p=Number(u.substring(5)))}}d.writeGeometry(transformGeometryWithOptions(c,!0,u),p);const g=d.getBuffer();return this.hex_?function encodeHexString(c){const u=new Uint8Array(c);return Array.from(u.values()).map((c=>(c<16?"0":"")+Number(c).toString(16).toUpperCase())).join("")}(g):g}};const nu={POINT:sr,LINESTRING:Jr,POLYGON:or,MULTIPOINT:Vs,MULTILINESTRING:Xs,MULTIPOLYGON:qs},su="EMPTY",ou="Z",au="M",lu=0,hu=1,cu=2,uu=3,du=4,pu=5,gu=6,mu={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"};class Lexer{constructor(c){this.wkt=c,this.index_=-1}isAlpha_(c){return c>="a"&&c<="z"||c>="A"&&c<="Z"}isNumeric_(c,u){return u=void 0!==u&&u,c>="0"&&c<="9"||"."==c&&!u}isWhiteSpace_(c){return" "==c||"\t"==c||"\r"==c||"\n"==c}nextChar_(){return this.wkt.charAt(++this.index_)}nextToken(){const c=this.nextChar_(),u=this.index_;let d,p=c;if("("==c)d=cu;else if(","==c)d=pu;else if(")"==c)d=uu;else if(this.isNumeric_(c)||"-"==c)d=du,p=this.readNumber_();else if(this.isAlpha_(c))d=hu,p=this.readText_();else{if(this.isWhiteSpace_(c))return this.nextToken();if(""!==c)throw new Error("Unexpected character: "+c);d=gu}return{position:u,value:p,type:d}}readNumber_(){let c;const u=this.index_;let d=!1,p=!1;do{"."==c?d=!0:"e"!=c&&"E"!=c||(p=!0),c=this.nextChar_()}while(this.isNumeric_(c,d)||!p&&("e"==c||"E"==c)||p&&("-"==c||"+"==c));return parseFloat(this.wkt.substring(u,this.index_--))}readText_(){let c;const u=this.index_;do{c=this.nextChar_()}while(this.isAlpha_(c));return this.wkt.substring(u,this.index_--).toUpperCase()}}let fu=class Parser{constructor(c){this.lexer_=c,this.token_={position:0,type:lu},this.layout_="XY"}consume_(){this.token_=this.lexer_.nextToken()}isTokenType(c){return this.token_.type==c}match(c){const u=this.isTokenType(c);return u&&this.consume_(),u}parse(){return this.consume_(),this.parseGeometry_()}parseGeometryLayout_(){let c="XY";const u=this.token_;if(this.isTokenType(hu)){const d=u.value;d===ou?c="XYZ":d===au?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&this.consume_()}return c}parseGeometryCollectionText_(){if(this.match(cu)){const c=[];do{c.push(this.parseGeometry_())}while(this.match(pu));if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parsePointText_(){if(this.match(cu)){const c=this.parsePoint_();if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parseLineStringText_(){if(this.match(cu)){const c=this.parsePointList_();if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parsePolygonText_(){if(this.match(cu)){const c=this.parseLineStringTextList_();if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parseMultiPointText_(){if(this.match(cu)){let c;if(c=this.token_.type==cu?this.parsePointTextList_():this.parsePointList_(),this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parseMultiLineStringText_(){if(this.match(cu)){const c=this.parseLineStringTextList_();if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parseMultiPolygonText_(){if(this.match(cu)){const c=this.parsePolygonTextList_();if(this.match(uu))return c}throw new Error(this.formatErrorMessage_())}parsePoint_(){const c=[],u=this.layout_.length;for(let d=0;d<u;++d){const u=this.token_;if(!this.match(du))break;c.push(u.value)}if(c.length==u)return c;throw new Error(this.formatErrorMessage_())}parsePointList_(){const c=[this.parsePoint_()];for(;this.match(pu);)c.push(this.parsePoint_());return c}parsePointTextList_(){const c=[this.parsePointText_()];for(;this.match(pu);)c.push(this.parsePointText_());return c}parseLineStringTextList_(){const c=[this.parseLineStringText_()];for(;this.match(pu);)c.push(this.parseLineStringText_());return c}parsePolygonTextList_(){const c=[this.parsePolygonText_()];for(;this.match(pu);)c.push(this.parsePolygonText_());return c}isEmptyGeometry_(){const c=this.isTokenType(hu)&&this.token_.value==su;return c&&this.consume_(),c}formatErrorMessage_(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}parseGeometry_(){const c=this.token_;if(this.match(hu)){const u=c.value;this.layout_=this.parseGeometryLayout_();const d=this.isEmptyGeometry_();if("GEOMETRYCOLLECTION"==u){if(d)return new Ws([]);const c=this.parseGeometryCollectionText_();return new Ws(c)}const p=nu[u];if(!p)throw new Error("Invalid geometry type: "+u);let g;if(d)g="POINT"==u?[NaN,NaN]:[];else switch(u){case"POINT":g=this.parsePointText_();break;case"LINESTRING":g=this.parseLineStringText_();break;case"POLYGON":g=this.parsePolygonText_();break;case"MULTIPOINT":g=this.parseMultiPointText_();break;case"MULTILINESTRING":g=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":g=this.parseMultiPolygonText_()}return new p(g,this.layout_)}throw new Error(this.formatErrorMessage_())}};function encodePointGeometry(c){const u=c.getCoordinates();return 0===u.length?"":u.join(" ")}function encodeLineStringGeometry(c){const u=c.getCoordinates(),d=[];for(let c=0,p=u.length;c<p;++c)d.push(u[c].join(" "));return d.join(",")}function encodePolygonGeometry(c){const u=[],d=c.getLinearRings();for(let c=0,p=d.length;c<p;++c)u.push("("+encodeLineStringGeometry(d[c])+")");return u.join(",")}const _u={Point:encodePointGeometry,LineString:encodeLineStringGeometry,Polygon:encodePolygonGeometry,MultiPoint:function encodeMultiPointGeometry(c){const u=[],d=c.getPoints();for(let c=0,p=d.length;c<p;++c)u.push("("+encodePointGeometry(d[c])+")");return u.join(",")},MultiLineString:function encodeMultiLineStringGeometry(c){const u=[],d=c.getLineStrings();for(let c=0,p=d.length;c<p;++c)u.push("("+encodeLineStringGeometry(d[c])+")");return u.join(",")},MultiPolygon:function encodeMultiPolygonGeometry(c){const u=[],d=c.getPolygons();for(let c=0,p=d.length;c<p;++c)u.push("("+encodePolygonGeometry(d[c])+")");return u.join(",")},GeometryCollection:function encodeGeometryCollectionGeometry(c){const u=[],d=c.getGeometries();for(let c=0,p=d.length;c<p;++c)u.push(encode$1(d[c]));return u.join(",")}};function encode$1(c){const u=c.getType(),d=(0,_u[u])(c);let p=mu[u];if("function"==typeof c.getFlatCoordinates){const u=function encodeGeometryLayout(c){const u=c.getLayout();let d="";return"XYZ"!==u&&"XYZM"!==u||(d+=ou),"XYM"!==u&&"XYZM"!==u||(d+=au),d}(c);u.length>0&&(p+=" "+u)}return 0===d.length?p+" "+su:p+"("+d+")"}var yu=class WKT extends TextFeature{constructor(c){super(),c=c||{},this.splitCollection_=void 0!==c.splitCollection&&c.splitCollection}parse_(c){const u=new Lexer(c);return new fu(u).parse()}readFeatureFromText(c,u){const d=this.readGeometryFromText(c,u),p=new Ii;return p.setGeometry(d),p}readFeaturesFromText(c,u){let d=[];const p=this.readGeometryFromText(c,u);d=this.splitCollection_&&"GeometryCollection"==p.getType()?p.getGeometriesArray():[p];const g=[];for(let c=0,u=d.length;c<u;++c){const u=new Ii;u.setGeometry(d[c]),g.push(u)}return g}readGeometryFromText(c,u){return transformGeometryWithOptions(this.parse_(c),!1,u)}writeFeatureText(c,u){const d=c.getGeometry();return d?this.writeGeometryText(d,u):""}writeFeaturesText(c,u){if(1==c.length)return this.writeFeatureText(c[0],u);const d=[];for(let u=0,p=c.length;u<p;++u)d.push(c[u].getGeometry());const p=new Ws(d);return this.writeGeometryText(p,u)}writeGeometryText(c,u){return encode$1(transformGeometryWithOptions(c,!0,u))}};const xu=[null,"http://www.opengis.net/wms"],vu=makeStructureNS(xu,{Service:makeObjectPropertySetter((function readService(c,u){return pushParseAndPop({},wu,c,u)})),Capability:makeObjectPropertySetter((function readCapability(c,u){return pushParseAndPop({},Su,c,u)}))}),Su=makeStructureNS(xu,{Request:makeObjectPropertySetter((function readRequest(c,u){return pushParseAndPop({},Lu,c,u)})),Exception:makeObjectPropertySetter((function readException(c,u){return pushParseAndPop([],bu,c,u)})),Layer:makeObjectPropertySetter((function readCapabilityLayer(c,u){const d=pushParseAndPop({},Mu,c,u);if(void 0===d.Layer)return Object.assign(d,readLayer$1(c,u));return d}))});const wu=makeStructureNS(xu,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),OnlineResource:makeObjectPropertySetter(readHref),ContactInformation:makeObjectPropertySetter((function readContactInformation(c,u){return pushParseAndPop({},Cu,c,u)})),Fees:makeObjectPropertySetter(readString),AccessConstraints:makeObjectPropertySetter(readString),LayerLimit:makeObjectPropertySetter(readPositiveInteger),MaxWidth:makeObjectPropertySetter(readPositiveInteger),MaxHeight:makeObjectPropertySetter(readPositiveInteger)}),Cu=makeStructureNS(xu,{ContactPersonPrimary:makeObjectPropertySetter((function readContactPersonPrimary(c,u){return pushParseAndPop({},Eu,c,u)})),ContactPosition:makeObjectPropertySetter(readString),ContactAddress:makeObjectPropertySetter((function readContactAddress(c,u){return pushParseAndPop({},Pu,c,u)})),ContactVoiceTelephone:makeObjectPropertySetter(readString),ContactFacsimileTelephone:makeObjectPropertySetter(readString),ContactElectronicMailAddress:makeObjectPropertySetter(readString)}),Eu=makeStructureNS(xu,{ContactPerson:makeObjectPropertySetter(readString),ContactOrganization:makeObjectPropertySetter(readString)}),Pu=makeStructureNS(xu,{AddressType:makeObjectPropertySetter(readString),Address:makeObjectPropertySetter(readString),City:makeObjectPropertySetter(readString),StateOrProvince:makeObjectPropertySetter(readString),PostCode:makeObjectPropertySetter(readString),Country:makeObjectPropertySetter(readString)}),bu=makeStructureNS(xu,{Format:makeArrayPusher(readString)}),Mu=makeStructureNS(xu,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),KeywordList:makeObjectPropertySetter(readKeywordList),CRS:makeObjectPropertyPusher(readString),EX_GeographicBoundingBox:makeObjectPropertySetter((function readEXGeographicBoundingBox(c,u){const d=pushParseAndPop({},Ru,c,u);if(!d)return;const p=d.westBoundLongitude,g=d.southBoundLatitude,f=d.eastBoundLongitude,_=d.northBoundLatitude;if(void 0===p||void 0===g||void 0===f||void 0===_)return;return[p,g,f,_]})),BoundingBox:makeObjectPropertyPusher((function readBoundingBox$1(c,u){const d=[readDecimalString(c.getAttribute("minx")),readDecimalString(c.getAttribute("miny")),readDecimalString(c.getAttribute("maxx")),readDecimalString(c.getAttribute("maxy"))],p=[readDecimalString(c.getAttribute("resx")),readDecimalString(c.getAttribute("resy"))];return{crs:c.getAttribute("CRS"),extent:d,res:p}})),Dimension:makeObjectPropertyPusher((function readDimension(c,u){return{name:c.getAttribute("name"),units:c.getAttribute("units"),unitSymbol:c.getAttribute("unitSymbol"),default:c.getAttribute("default"),multipleValues:readBooleanString(c.getAttribute("multipleValues")),nearestValue:readBooleanString(c.getAttribute("nearestValue")),current:readBooleanString(c.getAttribute("current")),values:readString(c)}})),Attribution:makeObjectPropertySetter((function readAttribution(c,u){return pushParseAndPop({},Tu,c,u)})),AuthorityURL:makeObjectPropertyPusher((function readAuthorityURL(c,u){const d=readFormatOnlineresource(c,u);if(d)return d.name=c.getAttribute("name"),d;return})),Identifier:makeObjectPropertyPusher(readString),MetadataURL:makeObjectPropertyPusher((function readMetadataURL(c,u){const d=readFormatOnlineresource(c,u);if(d)return d.type=c.getAttribute("type"),d;return})),DataURL:makeObjectPropertyPusher(readFormatOnlineresource),FeatureListURL:makeObjectPropertyPusher(readFormatOnlineresource),Style:makeObjectPropertyPusher((function readStyle$1(c,u){return pushParseAndPop({},ku,c,u)})),MinScaleDenominator:makeObjectPropertySetter(readDecimal),MaxScaleDenominator:makeObjectPropertySetter(readDecimal),Layer:makeObjectPropertyPusher(readLayer$1)}),Tu=makeStructureNS(xu,{Title:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref),LogoURL:makeObjectPropertySetter(readSizedFormatOnlineresource)}),Ru=makeStructureNS(xu,{westBoundLongitude:makeObjectPropertySetter(readDecimal),eastBoundLongitude:makeObjectPropertySetter(readDecimal),southBoundLatitude:makeObjectPropertySetter(readDecimal),northBoundLatitude:makeObjectPropertySetter(readDecimal)}),Lu=makeStructureNS(xu,{GetCapabilities:makeObjectPropertySetter(readOperationType),GetMap:makeObjectPropertySetter(readOperationType),GetFeatureInfo:makeObjectPropertySetter(readOperationType)}),Au=makeStructureNS(xu,{Format:makeObjectPropertyPusher(readString),DCPType:makeObjectPropertyPusher((function readDCPType(c,u){return pushParseAndPop({},Iu,c,u)}))}),Iu=makeStructureNS(xu,{HTTP:makeObjectPropertySetter((function readHTTP(c,u){return pushParseAndPop({},Fu,c,u)}))}),Fu=makeStructureNS(xu,{Get:makeObjectPropertySetter(readFormatOnlineresource),Post:makeObjectPropertySetter(readFormatOnlineresource)}),ku=makeStructureNS(xu,{Name:makeObjectPropertySetter(readString),Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),LegendURL:makeObjectPropertyPusher(readSizedFormatOnlineresource),StyleSheetURL:makeObjectPropertySetter(readFormatOnlineresource),StyleURL:makeObjectPropertySetter(readFormatOnlineresource)}),Ou=makeStructureNS(xu,{Format:makeObjectPropertySetter(readString),OnlineResource:makeObjectPropertySetter(readHref)}),Nu=makeStructureNS(xu,{Keyword:makeArrayPusher(readString)});function readLayer$1(c,u){const d=u[u.length-1],p=pushParseAndPop({},Mu,c,u);if(!p)return;let g=readBooleanString(c.getAttribute("queryable"));void 0===g&&(g=d.queryable),p.queryable=void 0!==g&&g;let f=readNonNegativeIntegerString(c.getAttribute("cascaded"));void 0===f&&(f=d.cascaded),p.cascaded=f;let _=readBooleanString(c.getAttribute("opaque"));void 0===_&&(_=d.opaque),p.opaque=void 0!==_&&_;let y=readBooleanString(c.getAttribute("noSubsets"));void 0===y&&(y=d.noSubsets),p.noSubsets=void 0!==y&&y;let x=readDecimalString(c.getAttribute("fixedWidth"));x||(x=d.fixedWidth),p.fixedWidth=x;let v=readDecimalString(c.getAttribute("fixedHeight"));v||(v=d.fixedHeight),p.fixedHeight=v;["Style","CRS","AuthorityURL"].forEach((function(c){if(c in d){const u=p[c]||[];p[c]=u.concat(d[c])}}));return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach((function(c){if(!(c in p)){const u=d[c];p[c]=u}})),p}function readFormatOnlineresource(c,u){return pushParseAndPop({},Ou,c,u)}function readOperationType(c,u){return pushParseAndPop({},Au,c,u)}function readSizedFormatOnlineresource(c,u){const d=readFormatOnlineresource(c,u);if(d){const u=[readNonNegativeIntegerString(c.getAttribute("width")),readNonNegativeIntegerString(c.getAttribute("height"))];return d.size=u,d}}function readKeywordList(c,u){return pushParseAndPop([],Nu,c,u)}var Du=class WMSCapabilities extends XML{constructor(){super(),this.version=void 0}readFromNode(c){this.version=c.getAttribute("version").trim();const u=pushParseAndPop({version:this.version},vu,c,[]);return u||null}};var Gu=class WMSGetFeatureInfo extends XMLFeature{constructor(c){super(),c=c||{},this.featureNS_="http://mapserver.gis.umn.edu/mapserver",this.gmlFormat_=new GML2,this.layers_=c.layers?c.layers:null}getLayers(){return this.layers_}setLayers(c){this.layers_=c}readFeatures_(c,u){c.setAttribute("namespaceURI",this.featureNS_);const d=c.localName;let p=[];if(0===c.childNodes.length)return p;if("msGMLOutput"==d)for(let d=0,g=c.childNodes.length;d<g;d++){const g=c.childNodes[d];if(g.nodeType!==Node.ELEMENT_NODE)continue;const f=g,_=u[0],y="_layer",x=f.localName.replace(y,"");if(this.layers_&&!this.layers_.includes(x))continue;const v=x+"_feature";_.featureType=v,_.featureNS=this.featureNS_;const C={};C[v]=makeArrayPusher(this.gmlFormat_.readFeatureElement,this.gmlFormat_);const M=makeStructureNS([_.featureNS,null],C);f.setAttribute("namespaceURI",this.featureNS_);const T=pushParseAndPop([],M,f,u,this.gmlFormat_);T&&extend$3(p,T)}if("FeatureCollection"==d){const u=pushParseAndPop([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,c,[{}],this.gmlFormat_);u&&(p=u)}return p}readFeaturesFromNode(c,u){const d={};return u&&Object.assign(d,this.getReadOptions(c,u)),this.readFeatures_(c,[d])}};const ju=[null,"http://www.opengis.net/wmts/1.0"],zu=[null,"http://www.opengis.net/ows/1.1"],Bu=makeStructureNS(ju,{Contents:makeObjectPropertySetter((function readContents(c,u){return pushParseAndPop({},Uu,c,u)}))});const Uu=makeStructureNS(ju,{Layer:makeObjectPropertyPusher((function readLayer(c,u){return pushParseAndPop({},$u,c,u)})),TileMatrixSet:makeObjectPropertyPusher((function readTileMatrixSet(c,u){return pushParseAndPop({},Ku,c,u)}))}),$u=makeStructureNS(ju,{Style:makeObjectPropertyPusher((function readStyle(c,u){const d=pushParseAndPop({},Wu,c,u);if(!d)return;const p="true"===c.getAttribute("isDefault");return d.isDefault=p,d})),Format:makeObjectPropertyPusher(readString),TileMatrixSetLink:makeObjectPropertyPusher((function readTileMatrixSetLink(c,u){return pushParseAndPop({},Xu,c,u)})),Dimension:makeObjectPropertyPusher((function readDimensions(c,u){return pushParseAndPop({},Yu,c,u)})),ResourceURL:makeObjectPropertyPusher((function readResourceUrl(c,u){const d=c.getAttribute("format"),p=c.getAttribute("template"),g=c.getAttribute("resourceType"),f={};d&&(f.format=d);p&&(f.template=p);g&&(f.resourceType=g);return f}))},makeStructureNS(zu,{Title:makeObjectPropertySetter(readString),Abstract:makeObjectPropertySetter(readString),WGS84BoundingBox:makeObjectPropertySetter(readBoundingBox),BoundingBox:makeObjectPropertyPusher((function readBoundingBoxWithCrs(c,u){const d=c.getAttribute("crs"),p=pushParseAndPop([],Zu,c,u);if(2!=p.length)return;return{extent:boundingExtent(p),crs:d}})),Identifier:makeObjectPropertySetter(readString)})),Wu=makeStructureNS(ju,{LegendURL:makeObjectPropertyPusher((function readLegendUrl(c,u){const d={};return d.format=c.getAttribute("format"),d.href=readHref(c),d}))},makeStructureNS(zu,{Title:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString)})),Xu=makeStructureNS(ju,{TileMatrixSet:makeObjectPropertySetter(readString),TileMatrixSetLimits:makeObjectPropertySetter((function readTileMatrixLimitsList(c,u){return pushParseAndPop([],Vu,c,u)}))}),Vu=makeStructureNS(ju,{TileMatrixLimits:makeArrayPusher((function readTileMatrixLimits(c,u){return pushParseAndPop({},qu,c,u)}))}),qu=makeStructureNS(ju,{TileMatrix:makeObjectPropertySetter(readString),MinTileRow:makeObjectPropertySetter(readPositiveInteger),MaxTileRow:makeObjectPropertySetter(readPositiveInteger),MinTileCol:makeObjectPropertySetter(readPositiveInteger),MaxTileCol:makeObjectPropertySetter(readPositiveInteger)}),Yu=makeStructureNS(ju,{Default:makeObjectPropertySetter(readString),Value:makeObjectPropertyPusher(readString)},makeStructureNS(zu,{Identifier:makeObjectPropertySetter(readString)})),Zu=makeStructureNS(zu,{LowerCorner:makeArrayPusher(readCoordinates),UpperCorner:makeArrayPusher(readCoordinates)}),Ku=makeStructureNS(ju,{WellKnownScaleSet:makeObjectPropertySetter(readString),TileMatrix:makeObjectPropertyPusher((function readTileMatrix(c,u){return pushParseAndPop({},Hu,c,u)}))},makeStructureNS(zu,{SupportedCRS:makeObjectPropertySetter(readString),Identifier:makeObjectPropertySetter(readString),BoundingBox:makeObjectPropertySetter(readBoundingBox)})),Hu=makeStructureNS(ju,{TopLeftCorner:makeObjectPropertySetter(readCoordinates),ScaleDenominator:makeObjectPropertySetter(readDecimal),TileWidth:makeObjectPropertySetter(readPositiveInteger),TileHeight:makeObjectPropertySetter(readPositiveInteger),MatrixWidth:makeObjectPropertySetter(readPositiveInteger),MatrixHeight:makeObjectPropertySetter(readPositiveInteger)},makeStructureNS(zu,{Identifier:makeObjectPropertySetter(readString)}));function readBoundingBox(c,u){const d=pushParseAndPop([],Zu,c,u);if(2==d.length)return boundingExtent(d)}function readCoordinates(c,u){const d=readString(c).split(/\s+/);if(!d||2!=d.length)return;const p=+d[0],g=+d[1];return isNaN(p)||isNaN(g)?void 0:[p,g]}var Ju=class WMTSCapabilities extends XML{constructor(){super(),this.owsParser_=new Mc}readFromNode(c){let u=c.getAttribute("version");u&&(u=u.trim());let d=this.owsParser_.readFromNode(c);return d?(d.version=u,d=pushParseAndPop(d,Bu,c,[]),d||null):null}},Qu=Object.freeze({__proto__:null,EsriJSON:Oa,GML:Ya,GPX:Sl,GeoJSON:Na,IGC:Ml,IIIFInfo:Nl,KML:oc,MVT:cc,OWS:Mc,Polyline:Tc,TopoJSON:Lc,WFS:Vc,WKB:ru,WKT:yu,WMSCapabilities:Du,WMSGetFeatureInfo:Gu,WMTSCapabilities:Ju});const td=34962,ed=34963,id=35044,rd=35048,nd=["experimental-webgl","webgl","webkit-3d","moz-webgl"];const sd=id;class WebGLArrayBuffer{constructor(c,u){this.array_=null,this.type_=c,assert(c===td||c===ed,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=void 0!==u?u:sd}ofSize(c){return this.array_=new(getArrayClassForType(this.type_))(c),this}fromArray(c){return this.array_=getArrayClassForType(this.type_).from(c),this}fromArrayBuffer(c){return this.array_=new(getArrayClassForType(this.type_))(c),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function getArrayClassForType(c){switch(c){case td:return Float32Array;case ed:return Uint32Array;default:return Float32Array}}var od="webglcontextlost",ad="webglcontextrestored";class WebGLPostProcessingPass{constructor(c){this.gl_=c.webGlContext;const u=this.gl_;this.scaleRatio_=c.scaleRatio||1,this.renderTargetTexture_=u.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=u.createFramebuffer(),this.depthBuffer_=u.createRenderbuffer();const d=u.createShader(u.VERTEX_SHADER);u.shaderSource(d,c.vertexShader||"\n  precision mediump float;\n\n  attribute vec2 a_position;\n  varying vec2 v_texCoord;\n  varying vec2 v_screenCoord;\n\n  uniform vec2 u_screenSize;\n\n  void main() {\n    v_texCoord = a_position * 0.5 + 0.5;\n    v_screenCoord = v_texCoord * u_screenSize;\n    gl_Position = vec4(a_position, 0.0, 1.0);\n  }\n"),u.compileShader(d);const p=u.createShader(u.FRAGMENT_SHADER);u.shaderSource(p,c.fragmentShader||"\n  precision mediump float;\n\n  uniform sampler2D u_image;\n  uniform float u_opacity;\n\n  varying vec2 v_texCoord;\n\n  void main() {\n    gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n  }\n"),u.compileShader(p),this.renderTargetProgram_=u.createProgram(),u.attachShader(this.renderTargetProgram_,d),u.attachShader(this.renderTargetProgram_,p),u.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),u.STATIC_DRAW),this.renderTargetAttribLocation_=u.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=u.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],c.uniforms&&Object.keys(c.uniforms).forEach((d=>{this.uniforms_.push({value:c.uniforms[d],location:u.getUniformLocation(this.renderTargetProgram_,d)})}))}getGL(){return this.gl_}init(c){const u=this.getGL(),d=[u.drawingBufferWidth*this.scaleRatio_,u.drawingBufferHeight*this.scaleRatio_];if(u.bindFramebuffer(u.FRAMEBUFFER,this.getFrameBuffer()),u.bindRenderbuffer(u.RENDERBUFFER,this.getDepthBuffer()),u.viewport(0,0,d[0],d[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==d[0]||this.renderTargetTextureSize_[1]!==d[1]){this.renderTargetTextureSize_=d;const c=0,p=u.RGBA,g=0,f=u.RGBA,_=u.UNSIGNED_BYTE,y=null;u.bindTexture(u.TEXTURE_2D,this.renderTargetTexture_),u.texImage2D(u.TEXTURE_2D,c,p,d[0],d[1],g,f,_,y),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,this.renderTargetTexture_,0),u.renderbufferStorage(u.RENDERBUFFER,u.DEPTH_COMPONENT16,d[0],d[1]),u.framebufferRenderbuffer(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.RENDERBUFFER,this.depthBuffer_)}}apply(c,u,d,p){const g=this.getGL(),f=c.size;if(g.bindFramebuffer(g.FRAMEBUFFER,u?u.getFrameBuffer():null),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,this.renderTargetTexture_),!u){const u=getUid(g.canvas);if(!c.renderTargets[u]){const d=g.getContextAttributes();d&&d.preserveDrawingBuffer&&(g.clearColor(0,0,0,0),g.clearDepth(1),g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT)),c.renderTargets[u]=!0}}g.disable(g.DEPTH_TEST),g.enable(g.BLEND),g.blendFunc(g.ONE,g.ONE_MINUS_SRC_ALPHA),g.viewport(0,0,g.drawingBufferWidth,g.drawingBufferHeight),g.bindBuffer(g.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),g.useProgram(this.renderTargetProgram_),g.enableVertexAttribArray(this.renderTargetAttribLocation_),g.vertexAttribPointer(this.renderTargetAttribLocation_,2,g.FLOAT,!1,0,0),g.uniform2f(this.renderTargetUniformLocation_,f[0],f[1]),g.uniform1i(this.renderTargetTextureLocation_,0);const _=c.layerStatesArray[c.layerIndex].opacity;g.uniform1f(this.renderTargetOpacityLocation_,_),this.applyUniforms(c),d&&d(g,c),g.drawArrays(g.TRIANGLES,0,6),p&&p(g,c)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(c){const u=this.getGL();let d,p=1;this.uniforms_.forEach((function(g){if(d="function"==typeof g.value?g.value(c):g.value,d instanceof HTMLCanvasElement||d instanceof ImageData)g.texture||(g.texture=u.createTexture()),u.activeTexture(u[`TEXTURE${p}`]),u.bindTexture(u.TEXTURE_2D,g.texture),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),d instanceof ImageData?u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,d.width,d.height,0,u.UNSIGNED_BYTE,new Uint8Array(d.data)):u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,d),u.uniform1i(g.location,p++);else if(Array.isArray(d))switch(d.length){case 2:return void u.uniform2f(g.location,d[0],d[1]);case 3:return void u.uniform3f(g.location,d[0],d[1],d[2]);case 4:return void u.uniform4f(g.location,d[0],d[1],d[2],d[3]);default:return}else"number"==typeof d&&u.uniform1f(g.location,d)}))}}function fromTransform(c,u){return c[0]=u[0],c[1]=u[1],c[4]=u[2],c[5]=u[3],c[12]=u[4],c[13]=u[5],c}const ld="u_projectionMatrix",hd="u_time",cd="u_zoom",ud="u_resolution",dd="u_rotation",pd="u_viewportSizePx",gd="u_pixelRatio",md="u_hitDetection",fd={UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126},_d={};function getSharedCanvasCacheKey(c){return"shared/"+c}let yd=0;function getOrCreateContext(c){let u=_d[c];if(!u){const d=document.createElement("canvas");d.width=1,d.height=1,d.style.position="absolute",d.style.left="0";const p=function getContext(c,u){u=Object.assign({preserveDrawingBuffer:!0,antialias:!Gr},u);const d=nd.length;for(let p=0;p<d;++p)try{const d=c.getContext(nd[p],u);if(d)return d}catch(c){}return null}(d);u={users:0,context:p},_d[c]=u}return u.users+=1,u.context}class WebGLHelper extends gi{constructor(c){super(),c=c||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=c.canvasCacheKey?getSharedCanvasCacheKey(c.canvasCacheKey):function getUniqueCanvasCacheKey(){const c="unique/"+yd;return yd+=1,c}(),this.gl_=getOrCreateContext(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const u=this.gl_.canvas;u.addEventListener(od,this.boundHandleWebGLContextLost_),u.addEventListener(ad,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=[1,0,0,1,0,0],this.offsetScaleMatrix_=[1,0,0,1,0,0],this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],c.uniforms&&this.setUniforms(c.uniforms),this.postProcessPasses_=c.postProcesses?c.postProcesses.map((c=>new WebGLPostProcessingPass({webGlContext:this.gl_,scaleRatio:c.scaleRatio,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms}))):[new WebGLPostProcessingPass({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(c){this.uniforms_=[],this.addUniforms(c)}addUniforms(c){for(const u in c)this.uniforms_.push({name:u,value:c[u]})}canvasCacheKeyMatches(c){return this.canvasCacheKey_===getSharedCanvasCacheKey(c)}getExtension(c){if(c in this.extensionCache_)return this.extensionCache_[c];const u=this.gl_.getExtension(c);return this.extensionCache_[c]=u,u}bindBuffer(c){const u=this.gl_,d=getUid(c);let p=this.bufferCache_[d];if(!p){p={buffer:c,webGlBuffer:u.createBuffer()},this.bufferCache_[d]=p}u.bindBuffer(c.getType(),p.webGlBuffer)}flushBufferData(c){const u=this.gl_;this.bindBuffer(c),u.bufferData(c.getType(),c.getArray(),c.getUsage())}deleteBuffer(c){const u=this.gl_,d=getUid(c),p=this.bufferCache_[d];p&&!u.isContextLost()&&u.deleteBuffer(p.webGlBuffer),delete this.bufferCache_[d]}disposeInternal(){const c=this.gl_.canvas;c.removeEventListener(od,this.boundHandleWebGLContextLost_),c.removeEventListener(ad,this.boundHandleWebGLContextRestored_),function releaseCanvas(c){const u=_d[c];if(!u)return;if(u.users-=1,u.users>0)return;const d=u.context,p=d.getExtension("WEBGL_lose_context");p&&p.loseContext();const g=d.canvas;g.width=1,g.height=1,delete _d[c]}(this.canvasCacheKey_),delete this.gl_}prepareDraw(c,u,d){const p=this.gl_,g=this.getCanvas(),f=c.size,_=c.pixelRatio;g.width===f[0]*_&&g.height===f[1]*_||(g.width=f[0]*_,g.height=f[1]*_,g.style.width=f[0]+"px",g.style.height=f[1]+"px");for(let u=this.postProcessPasses_.length-1;u>=0;u--)this.postProcessPasses_[u].init(c);p.bindTexture(p.TEXTURE_2D,null),p.clearColor(0,0,0,0),p.depthRange(0,1),p.clearDepth(1),p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),p.enable(p.BLEND),p.blendFunc(p.ONE,u?p.ZERO:p.ONE_MINUS_SRC_ALPHA),d?(p.enable(p.DEPTH_TEST),p.depthFunc(p.LEQUAL)):p.disable(p.DEPTH_TEST)}bindTexture(c,u,d){const p=this.gl_;p.activeTexture(p.TEXTURE0+u),p.bindTexture(p.TEXTURE_2D,c),p.uniform1i(this.getUniformLocation(d),u)}prepareDrawToRenderTarget(c,u,d,p){const g=this.gl_,f=u.getSize();g.bindFramebuffer(g.FRAMEBUFFER,u.getFramebuffer()),g.bindRenderbuffer(g.RENDERBUFFER,u.getDepthbuffer()),g.viewport(0,0,f[0],f[1]),g.bindTexture(g.TEXTURE_2D,u.getTexture()),g.clearColor(0,0,0,0),g.depthRange(0,1),g.clearDepth(1),g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT),g.enable(g.BLEND),g.blendFunc(g.ONE,d?g.ZERO:g.ONE_MINUS_SRC_ALPHA),p?(g.enable(g.DEPTH_TEST),g.depthFunc(g.LEQUAL)):g.disable(g.DEPTH_TEST)}drawElements(c,u){const d=this.gl_;this.getExtension("OES_element_index_uint");const p=d.UNSIGNED_INT,g=u-c,f=4*c;d.drawElements(d.TRIANGLES,g,p,f)}finalizeDraw(c,u,d){for(let p=0,g=this.postProcessPasses_.length;p<g;p++)p===g-1?this.postProcessPasses_[p].apply(c,null,u,d):this.postProcessPasses_[p].apply(c,this.postProcessPasses_[p+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(c){const u=c.size,d=c.viewState.rotation,p=c.pixelRatio;this.setUniformFloatValue(hd,.001*(Date.now()-this.startTime_)),this.setUniformFloatValue(cd,c.viewState.zoom),this.setUniformFloatValue(ud,c.viewState.resolution),this.setUniformFloatValue(gd,p),this.setUniformFloatVec2(pd,[u[0],u[1]]),this.setUniformFloatValue(dd,d)}applyHitDetectionUniform(c){const u=this.getUniformLocation(md);this.getGL().uniform1i(u,c?1:0),c&&this.setUniformFloatValue(gd,.5)}applyUniforms(c){const u=this.gl_;let d,p=0;this.uniforms_.forEach((g=>{if(d="function"==typeof g.value?g.value(c):g.value,d instanceof HTMLCanvasElement||d instanceof HTMLImageElement||d instanceof ImageData||d instanceof WebGLTexture){d instanceof WebGLTexture&&!g.texture?(g.prevValue=void 0,g.texture=d):g.texture||(g.prevValue=void 0,g.texture=u.createTexture()),this.bindTexture(g.texture,p,g.name),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE);const c=!(d instanceof HTMLImageElement)||d.complete;d instanceof WebGLTexture||!c||g.prevValue===d||(g.prevValue=d,u.texImage2D(u.TEXTURE_2D,0,u.RGBA,u.RGBA,u.UNSIGNED_BYTE,d)),p++}else if(Array.isArray(d)&&6===d.length)this.setUniformMatrixValue(g.name,fromTransform(this.tmpMat4_,d));else if(Array.isArray(d)&&d.length<=4)switch(d.length){case 2:return void u.uniform2f(this.getUniformLocation(g.name),d[0],d[1]);case 3:return void u.uniform3f(this.getUniformLocation(g.name),d[0],d[1],d[2]);case 4:return void u.uniform4f(this.getUniformLocation(g.name),d[0],d[1],d[2],d[3]);default:return}else"number"==typeof d&&u.uniform1f(this.getUniformLocation(g.name),d)}))}useProgram(c,u){this.gl_.useProgram(c),this.currentProgram_=c,this.applyFrameState(u),this.applyUniforms(u)}compileShader(c,u){const d=this.gl_,p=d.createShader(u);return d.shaderSource(p,c),d.compileShader(p),p}getProgram(c,u){const d=this.gl_,p=this.compileShader(c,d.FRAGMENT_SHADER),g=this.compileShader(u,d.VERTEX_SHADER),f=d.createProgram();if(d.attachShader(f,p),d.attachShader(f,g),d.linkProgram(f),!d.getShaderParameter(p,d.COMPILE_STATUS)){const c=`Fragment shader compilation failed: ${d.getShaderInfoLog(p)}`;throw new Error(c)}if(d.deleteShader(p),!d.getShaderParameter(g,d.COMPILE_STATUS)){const c=`Vertex shader compilation failed: ${d.getShaderInfoLog(g)}`;throw new Error(c)}if(d.deleteShader(g),!d.getProgramParameter(f,d.LINK_STATUS)){const c=`GL program linking failed: ${d.getProgramInfoLog(f)}`;throw new Error(c)}return f}getUniformLocation(c){const u=getUid(this.currentProgram_);return void 0===this.uniformLocationsByProgram_[u]&&(this.uniformLocationsByProgram_[u]={}),void 0===this.uniformLocationsByProgram_[u][c]&&(this.uniformLocationsByProgram_[u][c]=this.gl_.getUniformLocation(this.currentProgram_,c)),this.uniformLocationsByProgram_[u][c]}getAttributeLocation(c){const u=getUid(this.currentProgram_);return void 0===this.attribLocationsByProgram_[u]&&(this.attribLocationsByProgram_[u]={}),void 0===this.attribLocationsByProgram_[u][c]&&(this.attribLocationsByProgram_[u][c]=this.gl_.getAttribLocation(this.currentProgram_,c)),this.attribLocationsByProgram_[u][c]}makeProjectionTransform(c,u){const d=c.size,p=c.viewState.rotation,g=c.viewState.resolution,f=c.viewState.center;return compose(u,0,0,2/(g*d[0]),2/(g*d[1]),-p,-f[0],-f[1]),u}setUniformFloatValue(c,u){this.gl_.uniform1f(this.getUniformLocation(c),u)}setUniformFloatVec2(c,u){this.gl_.uniform2fv(this.getUniformLocation(c),u)}setUniformFloatVec4(c,u){this.gl_.uniform4fv(this.getUniformLocation(c),u)}setUniformMatrixValue(c,u){this.gl_.uniformMatrix4fv(this.getUniformLocation(c),!1,u)}enableAttributeArray_(c,u,d,p,g){const f=this.getAttributeLocation(c);f<0||(this.gl_.enableVertexAttribArray(f),this.gl_.vertexAttribPointer(f,u,d,!1,p,g))}enableAttributes(c){const u=function computeAttributesStride(c){let u=0;for(let d=0;d<c.length;d++){const p=c[d];u+=p.size*getByteSizeFromType(p.type)}return u}(c);let d=0;for(let p=0;p<c.length;p++){const g=c[p];this.enableAttributeArray_(g.name,g.size,g.type||5126,u,d),d+=g.size*getByteSizeFromType(g.type)}}handleWebGLContextLost(c){clear$2(this.bufferCache_),this.currentProgram_=null,c.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(c,u,d){const p=this.gl_;d=d||p.createTexture();const g=p.RGBA,f=p.RGBA,_=p.UNSIGNED_BYTE;return p.bindTexture(p.TEXTURE_2D,d),u?p.texImage2D(p.TEXTURE_2D,0,g,f,_,u):p.texImage2D(p.TEXTURE_2D,0,g,c[0],c[1],0,f,_,null),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.LINEAR),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),d}}function getByteSizeFromType(c){switch(c){case fd.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case fd.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case fd.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case fd.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class WebGLLayerRenderer extends LayerRenderer{constructor(c,u){super(c),u=u||{},this.inversePixelTransform_=[1,0,0,1,0,0],this.postProcesses_=u.postProcesses,this.uniforms_=u.uniforms,this.helper,this.onMapChanged_=()=>{this.clearCache(),this.removeHelper()},c.addChangeListener(Gn,this.onMapChanged_),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(c,u){const d=this.getLayer();if(d.hasListener(Sr)){const p=new RenderEvent(Sr,void 0,u,c);d.dispatchEvent(p)}}dispatchPostComposeEvent(c,u){const d=this.getLayer();if(d.hasListener(wr)){const p=new RenderEvent(wr,void 0,u,c);d.dispatchEvent(p)}}reset(c){this.uniforms_=c.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(c){if(this.getLayer().getRenderSource()){let u,d=!0,p=-1;for(let g=0,f=c.layerStatesArray.length;g<f;g++){const f=c.layerStatesArray[g].layer,_=f.getRenderer();if(!(_ instanceof WebGLLayerRenderer)){d=!0;continue}const y=f.getClassName();if((d||y!==u)&&(p+=1,d=!1),u=y,_===this)break}const g="map/"+c.mapId+"/group/"+p;this.helper&&this.helper.canvasCacheKeyMatches(g)&&!this.helper.needsToBeRecreated()||(this.removeHelper(),this.helper=new WebGLHelper({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:g}),u&&(this.helper.getCanvas().className=u),this.afterHelperCreated())}return this.prepareFrameInternal(c)}afterHelperCreated(){}prepareFrameInternal(c){return!0}clearCache(){}disposeInternal(){this.clearCache(),this.removeHelper(),this.getLayer()?.removeChangeListener(Gn,this.onMapChanged_),super.disposeInternal()}dispatchRenderEvent_(c,u,d){const p=this.getLayer();if(p.hasListener(c)){compose(this.inversePixelTransform_,0,0,d.pixelRatio,-d.pixelRatio,0,0,-d.size[1]);const g=new RenderEvent(c,this.inversePixelTransform_,d,u);p.dispatchEvent(g)}}preRender(c,u){this.dispatchRenderEvent_(xr,c,u)}postRender(c,u){this.dispatchRenderEvent_(vr,c,u)}}const xd=new Uint8Array(4);class WebGLRenderTarget{constructor(c,u){this.helper_=c;const d=c.getGL();this.texture_=d.createTexture(),this.framebuffer_=d.createFramebuffer(),this.depthbuffer_=d.createRenderbuffer(),this.size_=u||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(c){equals$2(c,this.size_)||(this.size_[0]=c[0],this.size_[1]=c[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const c=this.size_,u=this.helper_.getGL();u.bindFramebuffer(u.FRAMEBUFFER,this.framebuffer_),u.readPixels(0,0,c[0],c[1],u.RGBA,u.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(c,u){if(c<0||u<0||c>this.size_[0]||u>=this.size_[1])return xd[0]=0,xd[1]=0,xd[2]=0,xd[3]=0,xd;this.readAll();const d=Math.floor(c)+(this.size_[1]-Math.floor(u)-1)*this.size_[0];return xd[0]=this.data_[4*d],xd[1]=this.data_[4*d+1],xd[2]=this.data_[4*d+2],xd[3]=this.data_[4*d+3],xd}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const c=this.size_,u=this.helper_.getGL();this.texture_=this.helper_.createTexture(c,null,this.texture_),u.bindFramebuffer(u.FRAMEBUFFER,this.framebuffer_),u.viewport(0,0,c[0],c[1]),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,this.texture_,0),u.bindRenderbuffer(u.RENDERBUFFER,this.depthbuffer_),u.renderbufferStorage(u.RENDERBUFFER,u.DEPTH_COMPONENT16,c[0],c[1]),u.framebufferRenderbuffer(u.FRAMEBUFFER,u.DEPTH_ATTACHMENT,u.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(c[0]*c[1]*4)}}const vd="GENERATE_POINT_BUFFERS";function colorEncodeId(c,u){const d=256,p=255;return(u=u||[])[0]=Math.floor(c/d/d/d)/p,u[1]=Math.floor(c/d/d)%d/p,u[2]=Math.floor(c/d)%d/p,u[3]=c%d/p,u}class WebGLPointsLayerRenderer extends WebGLLayerRenderer{constructor(c,u){const d=u.uniforms||{},p=[1,0,0,1,0,0];d[ld]=p,super(c,{uniforms:d,postProcesses:u.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new WebGLArrayBuffer(td,rd),this.indicesBuffer_=new WebGLArrayBuffer(ed,rd),this.vertexShader_=u.vertexShader,this.fragmentShader_=u.fragmentShader,this.program_,this.hitDetectionEnabled_=u.hitDetectionEnabled??!0;const g=u.attributes?u.attributes.map((function(c){return{name:"a_prop_"+c.name,size:1,type:fd.FLOAT}})):[];this.attributes=[{name:"a_position",size:2,type:fd.FLOAT},{name:"a_index",size:1,type:fd.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_prop_hitColor",size:4,type:fd.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:fd.FLOAT})),this.attributes.push(...g),this.customAttributes=u.attributes?u.attributes:[],this.previousExtent_=[1/0,1/0,-1/0,-1/0],this.currentTransform_=p,this.renderTransform_=[1,0,0,1,0,0],this.invertRenderTransform_=[1,0,0,1,0,0],this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=function create(){const c='const t="GENERATE_POLYGON_BUFFERS",e="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(t,e){const n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function x(t,e){const n=(r=e)[0]*r[3]-r[1]*r[2];var r;!function(t,e){if(!t)throw new Error(e)}(0!==n,"Transformation matrix cannot be inverted");const x=e[0],o=e[1],u=e[2],i=e[3],f=e[4],s=e[5];return t[0]=i/n,t[1]=-o/n,t[2]=-u/n,t[3]=x/n,t[4]=(u*s-i*f)/n,t[5]=-(x*s-o*f)/n,t}function o(t,e,n=2){const r=e&&e.length,x=r?e[0]*n:t.length;let o=u(t,0,x,n,!0);const i=[];if(!o||o.next===o.prev)return i;let s,l,c;if(r&&(o=function(t,e,n,r){const x=[];for(let n=0,o=e.length;n<o;n++){const i=u(t,e[n]*r,n<o-1?e[n+1]*r:t.length,r,!1);i===i.next&&(i.steiner=!0),x.push(g(i))}x.sort(y);for(let t=0;t<x.length;t++)n=h(x[t],n);return n}(t,e,o,n)),t.length>80*n){s=1/0,l=1/0;let e=-1/0,r=-1/0;for(let o=n;o<x;o+=n){const n=t[o],x=t[o+1];n<s&&(s=n),x<l&&(l=x),n>e&&(e=n),x>r&&(r=x)}c=Math.max(e-s,r-l),c=0!==c?32767/c:0}return f(o,i,n,s,l,c,0),i}function u(t,e,n,r,x){let o;if(x===function(t,e,n,r){let x=0;for(let o=e,u=n-r;o<n;o+=r)x+=(t[u]-t[o])*(t[o+1]+t[u+1]),u=o;return x}(t,e,n,r)>0)for(let x=e;x<n;x+=r)o=z(x/r|0,t[x],t[x+1],o);else for(let x=n-r;x>=e;x-=r)o=z(x/r|0,t[x],t[x+1],o);return o&&M(o,o.next)&&(F(o),o=o.next),o}function i(t,e){if(!t)return t;e||(e=t);let n,r=t;do{if(n=!1,r.steiner||!M(r,r.next)&&0!==d(r.prev,r,r.next))r=r.next;else{if(F(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function f(t,e,n,r,x,o,u){if(!t)return;!u&&o&&function(t,e,n,r){let x=t;do{0===x.z&&(x.z=v(x.x,x.y,e,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==t);x.prevZ.nextZ=null,x.prevZ=null,function(t){let e,n=1;do{let r,x=t;t=null;let o=null;for(e=0;x;){e++;let u=x,i=0;for(let t=0;t<n&&(i++,u=u.nextZ,u);t++);let f=n;for(;i>0||f>0&&u;)0!==i&&(0===f||!u||x.z<=u.z)?(r=x,x=x.nextZ,i--):(r=u,u=u.nextZ,f--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;x=u}o.nextZ=null,n*=2}while(e>1)}(x)}(t,r,x,o);let y=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(o?l(t,r,x,o):s(t))e.push(h.i,t.i,p.i),F(t),t=p.next,y=p.next;else if((t=p)===y){u?1===u?f(t=c(i(t),e),e,n,r,x,o,2):2===u&&a(t,e,n,r,x,o):f(i(t),e,n,r,x,o,1);break}}}function s(t){const e=t.prev,n=t,r=t.next;if(d(e,n,r)>=0)return!1;const x=e.x,o=n.x,u=r.x,i=e.y,f=n.y,s=r.y,l=x<o?x<u?x:u:o<u?o:u,c=i<f?i<s?i:s:f<s?f:s,a=x>o?x>u?x:u:o>u?o:u,y=i>f?i>s?i:s:f>s?f:s;let h=r.next;for(;h!==e;){if(h.x>=l&&h.x<=a&&h.y>=c&&h.y<=y&&b(x,i,o,f,u,s,h.x,h.y)&&d(h.prev,h,h.next)>=0)return!1;h=h.next}return!0}function l(t,e,n,r){const x=t.prev,o=t,u=t.next;if(d(x,o,u)>=0)return!1;const i=x.x,f=o.x,s=u.x,l=x.y,c=o.y,a=u.y,y=i<f?i<s?i:s:f<s?f:s,h=l<c?l<a?l:a:c<a?c:a,p=i>f?i>s?i:s:f>s?f:s,g=l>c?l>a?l:a:c>a?c:a,Z=v(y,h,e,n,r),M=v(p,g,e,n,r);let w=t.prevZ,m=t.nextZ;for(;w&&w.z>=Z&&m&&m.z<=M;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;w&&w.z>=Z;){if(w.x>=y&&w.x<=p&&w.y>=h&&w.y<=g&&w!==x&&w!==u&&b(i,l,f,c,s,a,w.x,w.y)&&d(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;m&&m.z<=M;){if(m.x>=y&&m.x<=p&&m.y>=h&&m.y<=g&&m!==x&&m!==u&&b(i,l,f,c,s,a,m.x,m.y)&&d(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(t,e){let n=t;do{const r=n.prev,x=n.next.next;!M(r,x)&&w(r,n,n.next,x)&&E(r,x)&&E(x,r)&&(e.push(r.i,n.i,x.i),F(n),F(n.next),n=t=x),n=n.next}while(n!==t);return i(n)}function a(t,e,n,r,x,o){let u=t;do{let t=u.next.next;for(;t!==u.prev;){if(u.i!==t.i&&Z(u,t)){let s=I(u,t);return u=i(u,u.next),s=i(s,s.next),f(u,e,n,r,x,o,0),void f(s,e,n,r,x,o,0)}t=t.next}u=u.next}while(u!==t)}function y(t,e){return t.x-e.x}function h(t,e){const n=function(t,e){let n=e;const r=t.x,x=t.y;let o,u=-1/0;do{if(x<=n.y&&x>=n.next.y&&n.next.y!==n.y){const t=n.x+(x-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>u&&(u=t,o=n.x<n.next.x?n:n.next,t===r))return o}n=n.next}while(n!==e);if(!o)return null;const i=o,f=o.x,s=o.y;let l=1/0;n=o;do{if(r>=n.x&&n.x>=f&&r!==n.x&&b(x<s?r:u,x,f,s,x<s?u:r,x,n.x,n.y)){const e=Math.abs(x-n.y)/(r-n.x);E(n,t)&&(e<l||e===l&&(n.x>o.x||n.x===o.x&&p(o,n)))&&(o=n,l=e)}n=n.next}while(n!==i);return o}(t,e);if(!n)return e;const r=I(n,t);return i(r,r.next),i(n,n.next)}function p(t,e){return d(t.prev,t,e.prev)<0&&d(e.next,t,t.next)<0}function v(t,e,n,r,x){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function b(t,e,n,r,x,o,u,i){return(x-u)*(e-i)>=(t-u)*(o-i)&&(t-u)*(r-i)>=(n-u)*(e-i)&&(n-u)*(o-i)>=(x-u)*(r-i)}function Z(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){let n=t,r=!1;const x=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&x<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(d(t.prev,t,e.prev)||d(t,e.prev,e))||M(t,e)&&d(t.prev,t,t.next)>0&&d(e.prev,e,e.next)>0)}function d(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function M(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){const x=A(d(t,e,n)),o=A(d(t,e,r)),u=A(d(n,r,t)),i=A(d(n,r,e));return x!==o&&u!==i||(!(0!==x||!m(t,n,e))||(!(0!==o||!m(t,r,e))||(!(0!==u||!m(n,t,r))||!(0!==i||!m(n,e,r)))))}function m(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function E(t,e){return d(t.prev,t,t.next)<0?d(t,e,t.next)>=0&&d(t,t.prev,e)>=0:d(t,e,t.prev)<0||d(t,t.next,e)<0}function I(t,e){const n=P(t.i,t.x,t.y),r=P(e.i,e.x,e.y),x=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=x,x.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function z(t,e,n,r){const x=P(t,e,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function F(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 P(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}new Array(6);const B=[],N={vertexPosition:0,indexPosition:0};function R(t,e,n,r,x){t[e+0]=n,t[e+1]=r,t[e+2]=x}function S(t,e,n,r,x,o){const u=3+x,i=t[e+0],f=t[e+1],s=B;s.length=x;for(let n=0;n<s.length;n++)s[n]=t[e+2+n];let l=o?o.vertexPosition:0,c=o?o.indexPosition:0;const a=l/u;return R(n,l,i,f,0),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,1),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,2),s.length&&n.set(s,l+3),l+=u,R(n,l,i,f,3),s.length&&n.set(s,l+3),l+=u,r[c++]=a,r[c++]=a+1,r[c++]=a+3,r[c++]=a+1,r[c++]=a+2,r[c++]=a+3,N.vertexPosition=l,N.indexPosition=c,N}function T(t,e,n,x,o,u,i,f,s,l,c){const a=10+f.length,y=u.length/a,h=[t[e+0],t[e+1]],p=[t[n],t[n+1]],v=t[e+2],g=t[n+2],b=r(s,[...h]),Z=r(s,[...p]);function d(t,e,n){const r=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),x=[(e[0]-t[0])/r,(e[1]-t[1])/r],o=[-x[1],x[0]],u=Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1])),i=[(n[0]-t[0])/u,(n[1]-t[1])/u],f=0===r||0===u?0:Math.acos((s=i[0]*x[0]+i[1]*x[1],l=-1,c=1,Math.min(Math.max(s,l),c)));var s,l,c;return i[0]*o[0]+i[1]*o[1]>0?f:2*Math.PI-f}let M=-1,w=-1,m=c;const A=null!==o;if(null!==x){M=d(b,Z,r(s,[...[t[x],t[x+1]]])),Math.cos(M)<=.985&&(m+=Math.tan((M-Math.PI)/2))}if(A){w=d(Z,b,r(s,[...[t[o],t[o+1]]])),Math.cos(w)<=.985&&(m+=Math.tan((Math.PI-w)/2))}function E(t,e){return 0===e?1e4*t:Math.sign(e)*(1e4*t+Math.abs(e))}return u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(0,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(1,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(2,c)),u.push(...f),u.push(h[0],h[1],v,p[0],p[1],g,M,w,l,E(3,c)),u.push(...f),i.push(y,y+1,y+2,y+1,y+3,y+2),{length:l+Math.sqrt((Z[0]-b[0])*(Z[0]-b[0])+(Z[1]-b[1])*(Z[1]-b[1])),angle:m}}function _(t,e,n,r,x){const u=2+x;let i=e;const f=t.slice(i,i+x);i+=x;const s=t[i++];let l=0;const c=new Array(s-1);for(let e=0;e<s;e++)l+=t[i++],e<s-1&&(c[e]=l);const a=t.slice(i,i+2*l),y=o(a,c,2);for(let t=0;t<y.length;t++)r.push(y[t]+n.length/u);for(let t=0;t<a.length;t+=2)n.push(a[t],a[t+1],...f);return i+2*l}const O=self;O.onmessage=r=>{const o=r.data;switch(o.type){case e:{const t=3,e=2,n=o.customAttributesSize,r=e+n,x=new Float32Array(o.renderInstructions),u=x.length/r,i=4*u*(n+t),f=new Uint32Array(6*u),s=new Float32Array(i);let l;for(let t=0;t<x.length;t+=r)l=S(x,t,s,f,n,l);const c=Object.assign({vertexBuffer:s.buffer,indexBuffer:f.buffer,renderInstructions:x.buffer},o);O.postMessage(c,[s.buffer,f.buffer,x.buffer]);break}case n:{const t=[],e=[],n=o.customAttributesSize,r=3,u=new Float32Array(o.renderInstructions);let i=0;const f=[1,0,0,1,0,0];let s,l;for(x(f,o.renderInstructionsTransform);i<u.length;){l=Array.from(u.slice(i,i+n)),i+=n,s=u[i++];const x=i,o=i+(s-1)*r,c=u[x]===u[o]&&u[x+1]===u[o+1];let a=0,y=0;for(let n=0;n<s-1;n++){let h=null;n>0?h=i+(n-1)*r:c&&(h=o-r);let p=null;n<s-2?p=i+(n+2)*r:c&&(p=x+r);const v=T(u,i+n*r,i+(n+1)*r,h,p,t,e,l,f,a,y);a=v.length,y=v.angle}i+=s*r}const c=Uint32Array.from(e),a=Float32Array.from(t),y=Object.assign({vertexBuffer:a.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},o);O.postMessage(y,[a.buffer,c.buffer,u.buffer]);break}case t:{const t=[],e=[],n=o.customAttributesSize,r=new Float32Array(o.renderInstructions);let x=0;for(;x<r.length;)x=_(r,x,t,e,n);const u=Uint32Array.from(e),i=Float32Array.from(t),f=Object.assign({vertexBuffer:i.buffer,indexBuffer:u.buffer,renderInstructions:r.buffer},o);O.postMessage(f,[i.buffer,u.buffer,r.buffer]);break}}};';return new Worker("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(c,"binary").toString("base64"):URL.createObjectURL(new Blob([c],{type:"application/javascript"})))}(),this.worker_.addEventListener("message",(c=>{const u=c.data;if(u.type===vd){const d=u.projectionTransform;this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=d,makeInverse(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(c.data.renderInstructions),u.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}})),this.featureCache_={},this.featureCount_=0;const f=this.getLayer().getSource();this.sourceListenKeys_=[listen(f,Hs,this.handleSourceFeatureAdded_,this),listen(f,Js,this.handleSourceFeatureChanged_,this),listen(f,to,this.handleSourceFeatureDelete_,this),listen(f,Qs,this.handleSourceFeatureClear_,this)],f.forEachFeature((c=>{this.featureCache_[getUid(c)]={feature:c,properties:c.getProperties(),geometry:c.getGeometry()},this.featureCount_++}))}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new WebGLRenderTarget(this.helper)),this.verticesBuffer_.getArray()&&this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.getArray()&&this.helper.flushBufferData(this.indicesBuffer_)}handleSourceFeatureAdded_(c){const u=c.feature;this.featureCache_[getUid(u)]={feature:u,properties:u.getProperties(),geometry:u.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(c){const u=c.feature;this.featureCache_[getUid(u)]={feature:u,properties:u.getProperties(),geometry:u.getGeometry()}}handleSourceFeatureDelete_(c){const u=c.feature;delete this.featureCache_[getUid(u)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(c){const u=this.helper.getGL();this.preRender(u,c);const[d,p,g]=function getWorldParameters(c,u){const d=c.viewState.projection,p=u.getSource().getWrapX()&&d.canWrapX(),g=d.getExtent(),f=c.extent,_=p?getWidth(g):null,y=p?Math.ceil((f[2]-g[2])/_)+1:1;return[p?Math.floor((f[0]-g[0])/_):0,y,_]}(c,this.getLayer());this.renderWorlds(c,!1,d,p,g),this.helper.finalizeDraw(c,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(c,!0,d,p,g),this.hitRenderTarget_.clearCachedData()),this.postRender(u,c);return this.helper.getCanvas()}prepareFrameInternal(c){const u=this.getLayer(),d=u.getSource(),p=c.viewState,g=!c.viewHints[jn]&&!c.viewHints[zn],f=!equals$1(this.previousExtent_,c.extent),_=this.sourceRevision_<d.getRevision();if(_&&(this.sourceRevision_=d.getRevision()),g&&(f||_)){const g=p.projection,f=p.resolution,_=u instanceof BaseVectorLayer?u.getRenderBuffer():0,y=buffer(c.extent,_*f);d.loadFeatures(y,f,g),this.rebuildBuffers_(c),this.previousExtent_=c.extent.slice()}return this.helper.useProgram(this.program_,c),this.helper.prepareDraw(c),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(c){const u=[1,0,0,1,0,0];this.helper.makeProjectionTransform(c,u);const d=getUserProjection(),p=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,g=p*this.featureCount_;let f,_;this.renderInstructions_&&this.renderInstructions_.length===g||(this.renderInstructions_=new Float32Array(g));const y=[],x=[];let v=-1;for(const p in this.featureCache_)if(f=this.featureCache_[p],_=f.geometry,_&&"Point"===_.getType()){if(d){const u=fromUserCoordinate(_.getFlatCoordinates(),c.viewState.projection);y[0]=u[0],y[1]=u[1]}else y[0]=_.getFlatCoordinates()[0],y[1]=_.getFlatCoordinates()[1];if(apply(u,y),this.renderInstructions_[++v]=y[0],this.renderInstructions_[++v]=y[1],this.hitDetectionEnabled_){const c=colorEncodeId(v+5,x);this.renderInstructions_[++v]=c[0],this.renderInstructions_[++v]=c[1],this.renderInstructions_[++v]=c[2],this.renderInstructions_[++v]=c[3],this.renderInstructions_[++v]=Number(p)}for(let c=0;c<this.customAttributes.length;c++){const u=this.customAttributes[c].callback(f.feature,f.properties);this.renderInstructions_[++v]=u}}const C={id:++this.lastSentId,type:vd,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:p-2};C.projectionTransform=u,this.ready=!1,this.worker_.postMessage(C,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(c,u,d,p,g){if(assert(this.hitDetectionEnabled_,"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option."),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const f=apply(u.coordinateToPixelTransform,c.slice()),_=this.hitRenderTarget_.readPixel(f[0]/2,f[1]/2),y=function colorDecodeId(c){let u=0;const d=256,p=255;return u+=Math.round(c[0]*d*d*d*p),u+=Math.round(c[1]*d*d*p),u+=Math.round(c[2]*d*p),u+=Math.round(c[3]*p),u}([_[0]/255,_[1]/255,_[2]/255,_[3]/255]),x=this.renderInstructions_[y],v=Math.floor(x).toString(),C=this.getLayer().getSource().getFeatureByUid(v);return C?p(C,this.getLayer(),null):void 0}renderWorlds(c,u,d,p,g){let f=d;this.helper.useProgram(this.program_,c),u&&(this.hitRenderTarget_.setSize([Math.floor(c.size[0]/2),Math.floor(c.size[1]/2)]),this.helper.prepareDrawToRenderTarget(c,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(c,this.currentTransform_),translate$1(this.currentTransform_,f*g,0),multiply(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(c),this.helper.applyHitDetectionUniform(u);const d=this.indicesBuffer_.getSize();this.helper.drawElements(0,d)}while(++f<p)}disposeInternal(){this.worker_.terminate(),this.sourceListenKeys_.forEach((function(c){unlistenByKey(c)})),this.sourceListenKeys_=null,super.disposeInternal()}renderDeclutter(){}}class PaletteTexture{constructor(c,u){this.name=c,this.data=u,this.texture_=null}getTexture(c){if(!this.texture_){const u=c.createTexture();c.bindTexture(c.TEXTURE_2D,u),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.NEAREST),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.NEAREST),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,this.data.length/4,1,0,c.RGBA,c.UNSIGNED_BYTE,this.data),this.texture_=u}return this.texture_}delete(c){this.texture_&&c.deleteTexture(this.texture_),this.texture_=null}}function asImageLike(c){return c instanceof Image||c instanceof HTMLCanvasElement||c instanceof HTMLVideoElement||c instanceof ImageBitmap?c:null}function asArrayLike(c){return c instanceof Uint8Array||c instanceof Uint8ClampedArray||c instanceof Float32Array||c instanceof DataView?c:null}const Sd=new Error("disposed");let wd=null;const Cd=[256,256];class DataTile extends fo{constructor(c){const u=co;super(c.tileCoord,u,{transition:c.transition,interpolate:c.interpolate}),this.loader_=c.loader,this.data_=null,this.error_=null,this.size_=c.size||null,this.controller_=c.controller||null}getSize(){if(this.size_)return this.size_;const c=asImageLike(this.data_);return c?[c.width,c.height]:Cd}getData(){return this.data_}getError(){return this.error_}load(){if(this.state!==co&&this.state!==go)return;this.state=uo,this.changed();const c=this;this.loader_().then((function(u){c.data_=u,c.state=po,c.changed()})).catch((function(u){c.error_=u,c.state=go,c.changed()}))}disposeInternal(){this.controller_&&(this.controller_.abort(Sd),this.controller_=null),super.disposeInternal()}}class Triangulation{constructor(c,u,d,p,g,f){this.sourceProj_=c,this.targetProj_=u;let _={};const y=getTransform(this.targetProj_,this.sourceProj_);this.transformInv_=function(c){const u=c[0]+"/"+c[1];return _[u]||(_[u]=y(c)),_[u]},this.maxSourceExtent_=p,this.errorThresholdSquared_=g*g,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!p&&!!this.sourceProj_.getExtent()&&getWidth(p)>=getWidth(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?getWidth(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?getWidth(this.targetProj_.getExtent()):null;const x=getTopLeft(d),v=getTopRight(d),C=getBottomRight(d),M=getBottomLeft(d),T=this.transformInv_(x),L=this.transformInv_(v),A=this.transformInv_(C),I=this.transformInv_(M),k=10+(f?Math.max(0,Math.ceil(Math.log2(getArea(d)/(f*f*256*256)))):0);if(this.addQuad_(x,v,C,M,T,L,A,I,k),this.wrapsXInSource_){let c=1/0;this.triangles_.forEach((function(u,d,p){c=Math.min(c,u.source[0][0],u.source[1][0],u.source[2][0])})),this.triangles_.forEach((u=>{if(Math.max(u.source[0][0],u.source[1][0],u.source[2][0])-c>this.sourceWorldWidth_/2){const d=[[u.source[0][0],u.source[0][1]],[u.source[1][0],u.source[1][1]],[u.source[2][0],u.source[2][1]]];d[0][0]-c>this.sourceWorldWidth_/2&&(d[0][0]-=this.sourceWorldWidth_),d[1][0]-c>this.sourceWorldWidth_/2&&(d[1][0]-=this.sourceWorldWidth_),d[2][0]-c>this.sourceWorldWidth_/2&&(d[2][0]-=this.sourceWorldWidth_);const p=Math.min(d[0][0],d[1][0],d[2][0]);Math.max(d[0][0],d[1][0],d[2][0])-p<this.sourceWorldWidth_/2&&(u.source=d)}}))}_={}}addTriangle_(c,u,d,p,g,f){this.triangles_.push({source:[p,g,f],target:[c,u,d]})}addQuad_(c,u,d,p,g,f,_,y,x){const v=boundingExtent([g,f,_,y]),C=this.sourceWorldWidth_?getWidth(v)/this.sourceWorldWidth_:null,M=this.sourceWorldWidth_,T=this.sourceProj_.canWrapX()&&C>.5&&C<1;let L=!1;if(x>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){L=getWidth(boundingExtent([c,u,d,p]))/this.targetWorldWidth_>.25||L}!T&&this.sourceProj_.isGlobal()&&C&&(L=C>.25||L)}if(!L&&this.maxSourceExtent_&&isFinite(v[0])&&isFinite(v[1])&&isFinite(v[2])&&isFinite(v[3])&&!intersects$1(v,this.maxSourceExtent_))return;let A=0;if(!(L||isFinite(g[0])&&isFinite(g[1])&&isFinite(f[0])&&isFinite(f[1])&&isFinite(_[0])&&isFinite(_[1])&&isFinite(y[0])&&isFinite(y[1])))if(x>0)L=!0;else if(A=(isFinite(g[0])&&isFinite(g[1])?0:8)+(isFinite(f[0])&&isFinite(f[1])?0:4)+(isFinite(_[0])&&isFinite(_[1])?0:2)+(isFinite(y[0])&&isFinite(y[1])?0:1),1!=A&&2!=A&&4!=A&&8!=A)return;if(x>0){if(!L){const u=[(c[0]+d[0])/2,(c[1]+d[1])/2],p=this.transformInv_(u);let f;if(T){f=(modulo(g[0],M)+modulo(_[0],M))/2-modulo(p[0],M)}else f=(g[0]+_[0])/2-p[0];const y=(g[1]+_[1])/2-p[1];L=f*f+y*y>this.errorThresholdSquared_}if(L){if(Math.abs(c[0]-d[0])<=Math.abs(c[1]-d[1])){const v=[(u[0]+d[0])/2,(u[1]+d[1])/2],C=this.transformInv_(v),M=[(p[0]+c[0])/2,(p[1]+c[1])/2],T=this.transformInv_(M);this.addQuad_(c,u,v,M,g,f,C,T,x-1),this.addQuad_(M,v,d,p,T,C,_,y,x-1)}else{const v=[(c[0]+u[0])/2,(c[1]+u[1])/2],C=this.transformInv_(v),M=[(d[0]+p[0])/2,(d[1]+p[1])/2],T=this.transformInv_(M);this.addQuad_(c,v,M,p,g,C,T,y,x-1),this.addQuad_(v,u,d,M,C,f,_,T,x-1)}return}}if(T){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&A||this.addTriangle_(c,d,p,g,_,y),14&A||this.addTriangle_(c,d,u,g,_,f),A&&(13&A||this.addTriangle_(u,p,c,f,y,g),7&A||this.addTriangle_(u,p,d,f,y,_))}calculateSourceExtent(){const c=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach((function(u,d,p){const g=u.source;extendCoordinate(c,g[0]),extendCoordinate(c,g[1]),extendCoordinate(c,g[2])})),c}getTriangles(){return this.triangles_}}let Ed;const Pd=[];function drawTestTriangle(c,u,d,p,g){c.beginPath(),c.moveTo(0,0),c.lineTo(u,d),c.lineTo(p,g),c.closePath(),c.save(),c.clip(),c.fillRect(0,0,Math.max(u,p)+1,Math.max(d,g)),c.restore()}function verifyBrokenDiagonalRendering(c,u){return Math.abs(c[4*u]-210)>2||Math.abs(c[4*u+3]-191.25)>2}function calculateSourceResolution(c,u,d,p){const g=transform$1(d,u,c);let f=getPointResolution(u,p,d);const _=u.getMetersPerUnit();void 0!==_&&(f*=_);const y=c.getMetersPerUnit();void 0!==y&&(f/=y);const x=c.getExtent();if(!x||containsCoordinate(x,g)){const u=getPointResolution(c,f,g)/f;isFinite(u)&&u>0&&(f/=u)}return f}function calculateSourceExtentResolution(c,u,d,p){const g=getCenter(d);let f=calculateSourceResolution(c,u,g,p);return(!isFinite(f)||f<=0)&&forEachCorner(d,(function(d){return f=calculateSourceResolution(c,u,d,p),isFinite(f)&&f>0})),f}function render$1(c,u,d,p,g,f,_,y,x,v,C,M,T,L){const A=createCanvasContext2D(Math.round(d*c),Math.round(d*u),Pd);if(M||(A.imageSmoothingEnabled=!1),0===x.length)return A.canvas;function pixelRound(c){return Math.round(c*d)/d}A.scale(d,d),A.globalCompositeOperation="lighter";const I=[1/0,1/0,-1/0,-1/0];let k;x.forEach((function(c,u,d){extend$2(I,c.extent)}));const O=d/p,N=(M?1:1+Math.pow(2,-24))/O;if(!T||1!==x.length||0!==v){if(k=createCanvasContext2D(Math.round(getWidth(I)*O),Math.round(getHeight(I)*O),Pd),M||(k.imageSmoothingEnabled=!1),g&&L){const c=(g[0]-I[0])*O,u=-(g[3]-I[3])*O,d=getWidth(g)*O,p=getHeight(g)*O;k.rect(c,u,d,p),k.clip()}x.forEach((function(c,u,d){if(c.image.width>0&&c.image.height>0){if(c.clipExtent){k.save();const u=(c.clipExtent[0]-I[0])*O,d=-(c.clipExtent[3]-I[3])*O,p=getWidth(c.clipExtent)*O,g=getHeight(c.clipExtent)*O;k.rect(M?u:Math.round(u),M?d:Math.round(d),M?p:Math.round(u+p)-Math.round(u),M?g:Math.round(d+g)-Math.round(d)),k.clip()}const u=(c.extent[0]-I[0])*O,d=-(c.extent[3]-I[3])*O,p=getWidth(c.extent)*O,g=getHeight(c.extent)*O;k.drawImage(c.image,v,v,c.image.width-2*v,c.image.height-2*v,M?u:Math.round(u),M?d:Math.round(d),M?p:Math.round(u+p)-Math.round(u),M?g:Math.round(d+g)-Math.round(d)),c.clipExtent&&k.restore()}}))}const G=getTopLeft(_);return y.getTriangles().forEach((function(c,u,d){const p=c.source,g=c.target;let _=p[0][0],y=p[0][1],v=p[1][0],C=p[1][1],T=p[2][0],L=p[2][1];const O=pixelRound((g[0][0]-G[0])/f),j=pixelRound(-(g[0][1]-G[1])/f),B=pixelRound((g[1][0]-G[0])/f),V=pixelRound(-(g[1][1]-G[1])/f),q=pixelRound((g[2][0]-G[0])/f),Z=pixelRound(-(g[2][1]-G[1])/f),K=_,J=y;_=0,y=0,v-=K,C-=J,T-=K,L-=J;const ct=function solveLinearSystem(c){const u=c.length;for(let d=0;d<u;d++){let p=d,g=Math.abs(c[d][d]);for(let f=d+1;f<u;f++){const u=Math.abs(c[f][d]);u>g&&(g=u,p=f)}if(0===g)return null;const f=c[p];c[p]=c[d],c[d]=f;for(let p=d+1;p<u;p++){const g=-c[p][d]/c[d][d];for(let f=d;f<u+1;f++)d==f?c[p][f]=0:c[p][f]+=g*c[d][f]}}const d=new Array(u);for(let p=u-1;p>=0;p--){d[p]=c[p][u]/c[p][p];for(let g=p-1;g>=0;g--)c[g][u]-=c[g][p]*d[p]}return d}([[v,C,0,0,B-O],[T,L,0,0,q-O],[0,0,v,C,V-j],[0,0,T,L,Z-j]]);if(!ct)return;if(A.save(),A.beginPath(),function isBrokenDiagonalRendering(){if(void 0===Ed){const c=createCanvasContext2D(6,6,Pd);c.globalCompositeOperation="lighter",c.fillStyle="rgba(210, 0, 0, 0.75)",drawTestTriangle(c,4,5,4,0),drawTestTriangle(c,4,5,0,5);const u=c.getImageData(0,0,3,3).data;Ed=verifyBrokenDiagonalRendering(u,0)||verifyBrokenDiagonalRendering(u,4)||verifyBrokenDiagonalRendering(u,8),releaseCanvas$1(c),Pd.push(c.canvas)}return Ed}()||!M){A.moveTo(B,V);const c=4,u=O-B,d=j-V;for(let p=0;p<c;p++)A.lineTo(B+pixelRound((p+1)*u/c),V+pixelRound(p*d/(c-1))),p!=c-1&&A.lineTo(B+pixelRound((p+1)*u/c),V+pixelRound((p+1)*d/(c-1)));A.lineTo(q,Z)}else A.moveTo(B,V),A.lineTo(O,j),A.lineTo(q,Z);let ft;if(A.clip(),A.transform(ct[0],ct[2],ct[1],ct[3],O,j),A.translate(I[0]-K,I[3]-J),k)ft=k.canvas,A.scale(N,-N);else{const c=x[0],u=c.extent;ft=c.image,A.scale(getWidth(u)/ft.width,-getHeight(u)/ft.height)}A.drawImage(ft,0,0),A.restore()})),k&&(releaseCanvas$1(k),Pd.push(k.canvas)),C&&(A.save(),A.globalCompositeOperation="source-over",A.strokeStyle="black",A.lineWidth=1,y.getTriangles().forEach((function(c,u,d){const p=c.target,g=(p[0][0]-G[0])/f,_=-(p[0][1]-G[1])/f,y=(p[1][0]-G[0])/f,x=-(p[1][1]-G[1])/f,v=(p[2][0]-G[0])/f,C=-(p[2][1]-G[1])/f;A.beginPath(),A.moveTo(y,x),A.lineTo(g,_),A.lineTo(v,C),A.closePath(),A.stroke()})),A.restore()),A.canvas}class ReprojDataTile extends DataTile{constructor(c){super({tileCoord:c.tileCoord,loader:()=>Promise.resolve(new Uint8ClampedArray(4)),interpolate:c.interpolate,transition:c.transition}),this.pixelRatio_=c.pixelRatio,this.gutter_=c.gutter,this.reprojData_=null,this.reprojError_=null,this.reprojSize_=void 0,this.sourceTileGrid_=c.sourceTileGrid,this.targetTileGrid_=c.targetTileGrid,this.wrappedTileCoord_=c.wrappedTileCoord||c.tileCoord,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const u=c.sourceProj,d=u.getExtent(),p=c.sourceTileGrid.getExtent();this.clipExtent_=u.canWrapX()?p?getIntersection(d,p):d:p;const g=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let _=this.sourceTileGrid_.getExtent();const y=f?getIntersection(g,f):g;if(0===getArea(y))return void(this.state=mo);d&&(_=_?getIntersection(_,d):d);const x=this.targetTileGrid_.getResolution(this.wrappedTileCoord_[0]),v=c.targetProj,C=calculateSourceExtentResolution(u,v,y,x);if(!isFinite(C)||C<=0)return void(this.state=mo);const M=void 0!==c.errorThreshold?c.errorThreshold:.5;if(this.triangulation_=new Triangulation(u,v,y,_,C*M,x),0===this.triangulation_.getTriangles().length)return void(this.state=mo);this.sourceZ_=this.sourceTileGrid_.getZForResolution(C);let T=this.triangulation_.calculateSourceExtent();if(_&&(u.canWrapX()?(T[1]=clamp(T[1],_[1],_[3]),T[3]=clamp(T[3],_[1],_[3])):T=getIntersection(T,_)),getArea(T)){let p=0,g=0;u.canWrapX()&&(p=getWidth(d),g=Math.floor((T[0]-d[0])/p));wrapAndSliceX(T.slice(),u,!0).forEach((u=>{const d=this.sourceTileGrid_.getTileRangeForExtentAndZ(u,this.sourceZ_),f=c.getTileFunction;for(let c=d.minX;c<=d.maxX;c++)for(let u=d.minY;u<=d.maxY;u++){const d=f(this.sourceZ_,c,u,this.pixelRatio_);if(d){const c=g*p;this.sourceTiles_.push({tile:d,offset:c})}}++g})),0===this.sourceTiles_.length&&(this.state=mo)}else this.state=mo}getSize(){return this.reprojSize_}getData(){return this.reprojData_}getError(){return this.reprojError_}reproject_(){const c=[];let u=!1;if(this.sourceTiles_.forEach((d=>{const p=d.tile;if(!p||p.getState()!==po)return;const g=p.getSize(),f=this.gutter_;let _;const y=asArrayLike(p.getData());y?_=y:(u=!0,_=function toArray(c){wd||(wd=createCanvasContext2D(c.width,c.height,void 0,{willReadFrequently:!0}));const u=wd.canvas,d=c.width;u.width!==d&&(u.width=d);const p=c.height;return u.height!==p&&(u.height=p),wd.clearRect(0,0,d,p),wd.drawImage(c,0,0),wd.getImageData(0,0,d,p).data}(asImageLike(p.getData())));const x=[g[0]+2*f,g[1]+2*f],v=_ instanceof Float32Array,C=x[0]*x[1],M=v?Float32Array:Uint8ClampedArray,T=new M(_.buffer),L=M.BYTES_PER_ELEMENT,A=L*T.length/C,I=T.byteLength/x[1],k=Math.floor(I/L/x[0]),O=C*k;let N=T;if(T.length!==O){N=new M(O);let c=0,u=0;const d=x[0]*k;for(let p=0;p<x[1];++p){for(let p=0;p<d;++p)N[c++]=T[u+p];u+=I/L}}const G=this.sourceTileGrid_.getTileCoordExtent(p.tileCoord);G[0]+=d.offset,G[2]+=d.offset;const j=this.clipExtent_?.slice();j&&(j[0]+=d.offset,j[2]+=d.offset),c.push({extent:G,clipExtent:j,data:new Uint8ClampedArray(N.buffer),dataType:M,bytesPerPixel:A,pixelSize:x})})),this.sourceTiles_.length=0,0===c.length)return this.state=go,void this.changed();const d=this.wrappedTileCoord_[0],p=this.targetTileGrid_.getTileSize(d),g="number"==typeof p?p:p[0],f="number"==typeof p?p:p[1],_=this.targetTileGrid_.getResolution(d),y=this.sourceTileGrid_.getResolution(this.sourceZ_),x=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);let v,C;const M=c[0].bytesPerPixel;for(let u=Math.ceil(M/3)-1;u>=0;--u){const d=[];for(let p=0,g=c.length;p<g;++p){const g=c[p],f=g.data,_=g.pixelSize,y=_[0],x=_[1],v=createCanvasContext2D(y,x,Pd),C=v.createImageData(y,x),T=C.data;let L=3*u;for(let c=0,u=T.length;c<u;c+=4)T[c]=f[L],T[c+1]=f[L+1],T[c+2]=f[L+2],T[c+3]=255,L+=M;v.putImageData(C,0,0),d.push({extent:g.extent,clipExtent:g.clipExtent,image:v.canvas})}const p=render$1(g,f,this.pixelRatio_,y,this.sourceTileGrid_.getExtent(),_,x,this.triangulation_,d,this.gutter_,!1,!1,!1);for(let c=0,u=d.length;c<u;++c){const u=d[c].image.getContext("2d");releaseCanvas$1(u),Pd.push(u.canvas)}const T=p.getContext("2d"),L=T.getImageData(0,0,p.width,p.height);releaseCanvas$1(T),Pd.push(p),v||(C=new Uint8ClampedArray(M*L.width*L.height),v=new c[0].dataType(C.buffer));const A=L.data;let I=3*u;for(let c=0,u=A.length;c<u;c+=4)255===A[c+3]?(C[I]=A[c],C[I+1]=A[c+1],C[I+2]=A[c+2]):(C[I]=0,C[I+1]=0,C[I+2]=0),I+=M}if(u){const c=createCanvasContext2D(g,f),u=new ImageData(v,g);c.putImageData(u,0,0),this.reprojData_=c.canvas}else this.reprojData_=v;this.reprojSize_=[Math.round(g*this.pixelRatio_),Math.round(f*this.pixelRatio_)],this.state=po,this.changed()}load(){if(this.state!==co&&this.state!==go)return;this.state=uo,this.changed();let c=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:u})=>{const d=u.getState();if(d!==co&&d!==uo)return;c++;const p=listen(u,mi,(()=>{const d=u.getState();d!=po&&d!=go&&d!=mo||(unlistenByKey(p),c--,0===c&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(p)})),0===c?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:c}){c.getState()==co&&c.load()}))}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}}class ReprojTile extends fo{constructor(c,u,d,p,g,f,_,y,x,v,C,M){super(g,co,M),this.renderEdges_=void 0!==C&&C,this.pixelRatio_=_,this.gutter_=y,this.canvas_=null,this.sourceTileGrid_=u,this.targetTileGrid_=p,this.wrappedTileCoord_=f||g,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=c.canWrapX()?c.getExtent():void 0;const T=p.getTileCoordExtent(this.wrappedTileCoord_),L=this.targetTileGrid_.getExtent();let A=this.sourceTileGrid_.getExtent();const I=L?getIntersection(T,L):T;if(0===getArea(I))return void(this.state=mo);const k=c.getExtent();k&&(A=A?getIntersection(A,k):k);const O=p.getResolution(this.wrappedTileCoord_[0]),N=calculateSourceExtentResolution(c,d,I,O);if(!isFinite(N)||N<=0)return void(this.state=mo);const G=void 0!==v?v:.5;if(this.triangulation_=new Triangulation(c,d,I,A,N*G,O),0===this.triangulation_.getTriangles().length)return void(this.state=mo);this.sourceZ_=u.getZForResolution(N);let j=this.triangulation_.calculateSourceExtent();if(A&&(c.canWrapX()?(j[1]=clamp(j[1],A[1],A[3]),j[3]=clamp(j[3],A[1],A[3])):j=getIntersection(j,A)),getArea(j)){let d=0,p=0;c.canWrapX()&&(d=getWidth(k),p=Math.floor((j[0]-k[0])/d));wrapAndSliceX(j.slice(),c,!0).forEach((c=>{const g=u.getTileRangeForExtentAndZ(c,this.sourceZ_);for(let c=g.minX;c<=g.maxX;c++)for(let u=g.minY;u<=g.maxY;u++){const g=x(this.sourceZ_,c,u,_);if(g){const c=p*d;this.sourceTiles_.push({tile:g,offset:c})}}++p})),0===this.sourceTiles_.length&&(this.state=mo)}else this.state=mo}getImage(){return this.canvas_}reproject_(){const c=[];if(this.sourceTiles_.forEach((u=>{const d=u.tile;if(d&&d.getState()==po){const p=this.sourceTileGrid_.getTileCoordExtent(d.tileCoord);p[0]+=u.offset,p[2]+=u.offset;const g=this.clipExtent_?.slice();g&&(g[0]+=u.offset,g[2]+=u.offset),c.push({extent:p,clipExtent:g,image:d.getImage()})}})),this.sourceTiles_.length=0,0===c.length)this.state=go;else{const u=this.wrappedTileCoord_[0],d=this.targetTileGrid_.getTileSize(u),p="number"==typeof d?d:d[0],g="number"==typeof d?d:d[1],f=this.targetTileGrid_.getResolution(u),_=this.sourceTileGrid_.getResolution(this.sourceZ_),y=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=render$1(p,g,this.pixelRatio_,_,this.sourceTileGrid_.getExtent(),f,y,this.triangulation_,c,this.gutter_,this.renderEdges_,this.interpolate),this.state=po}this.changed()}load(){if(this.state==co){this.state=uo,this.changed();let c=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:u})=>{const d=u.getState();if(d==co||d==uo){c++;const d=listen(u,mi,(p=>{const g=u.getState();g!=po&&g!=go&&g!=mo||(unlistenByKey(d),c--,0===c&&(this.unlistenSources_(),this.reproject_()))}));this.sourcesListenerKeys_.push(d)}})),0===c?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:c},u,d){c.getState()==co&&c.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(unlistenByKey),this.sourcesListenerKeys_=null}release(){this.canvas_&&(releaseCanvas$1(this.canvas_.getContext("2d")),Pd.push(this.canvas_),this.canvas_=null),super.release()}}class BaseTileRepresentation extends Target{constructor(c){super(),this.tile,this.handleTileChange_=this.handleTileChange_.bind(this),this.gutter=c.gutter||0,this.helper=c.helper,this.loaded=!1,this.ready=!1}setTile(c){if(c!==this.tile)if(this.tile&&this.tile.removeEventListener(mi,this.handleTileChange_),this.tile=c,this.loaded=c.getState()===po,this.loaded)this.uploadTile();else{if(c instanceof _o){const u=c.getImage();u instanceof Image&&!u.crossOrigin&&(u.crossOrigin="anonymous")}c.addEventListener(mi,this.handleTileChange_)}}uploadTile(){abstract()}setReady(){this.ready=!0,this.dispatchEvent(mi)}handleTileChange_(){this.tile.getState()===po&&(this.loaded=!0,this.uploadTile())}setHelper(c){this.helper=c,this.helper&&this.loaded&&this.uploadTile()}disposeInternal(){this.setHelper(null),this.tile.removeEventListener(mi,this.handleTileChange_)}}function bindAndConfigure(c,u,d){const p=d?c.LINEAR:c.NEAREST;c.bindTexture(c.TEXTURE_2D,u),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,p),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,p)}function uploadDataTexture(c,u,d,p,g,f){const _=c.getGL();let y,x;if(d instanceof Float32Array){y=_.FLOAT,c.getExtension("OES_texture_float");x=null!==c.getExtension("OES_texture_float_linear")}else y=_.UNSIGNED_BYTE,x=!0;bindAndConfigure(_,u,f&&x);const v=d.byteLength/p[1];let C,M=1;switch(v%8==0?M=8:v%4==0?M=4:v%2==0&&(M=2),g){case 1:C=_.LUMINANCE;break;case 2:C=_.LUMINANCE_ALPHA;break;case 3:C=_.RGB;break;case 4:C=_.RGBA;break;default:throw new Error(`Unsupported number of bands: ${g}`)}const T=_.getParameter(_.UNPACK_ALIGNMENT);_.pixelStorei(_.UNPACK_ALIGNMENT,M),_.texImage2D(_.TEXTURE_2D,0,C,p[0],p[1],0,C,y,d),_.pixelStorei(_.UNPACK_ALIGNMENT,T)}let bd=null;class TileTexture extends BaseTileRepresentation{constructor(c){super(c),this.textures=[],this.renderSize_=toSize(c.grid.getTileSize(c.tile.tileCoord[0])),this.bandCount=NaN;const u=new WebGLArrayBuffer(td,id);u.fromArray([0,1,1,1,1,0,0,0]),this.helper.flushBufferData(u),this.coords=u,this.setTile(c.tile)}setHelper(c){const u=this.helper?.getGL();if(u){this.helper.deleteBuffer(this.coords);for(let c=0;c<this.textures.length;++c)u.deleteTexture(this.textures[c])}super.setHelper(c),c&&c.flushBufferData(this.coords)}uploadTile(){const c=this.helper,u=c.getGL(),d=this.tile;let p;this.textures.length=0,p=d instanceof _o||d instanceof ReprojTile?d.getImage():d.getData();const g=asImageLike(p);if(g){const c=u.createTexture();return this.textures.push(c),this.bandCount=4,function uploadImageTexture(c,u,d,p){bindAndConfigure(c,u,p),c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d)}(u,c,g,d.interpolate),void this.setReady()}p=asArrayLike(p);const f=d.getSize(),_=[f[0]+2*this.gutter,f[1]+2*this.gutter],y=p instanceof Float32Array,x=_[0]*_[1],v=y?Float32Array:Uint8Array,C=v.BYTES_PER_ELEMENT,M=p.byteLength/_[1];this.bandCount=Math.floor(M/C/_[0]);const T=Math.ceil(this.bandCount/4);if(1===T){const g=u.createTexture();return this.textures.push(g),uploadDataTexture(c,g,p,_,this.bandCount,d.interpolate),void this.setReady()}const L=new Array(T);for(let c=0;c<T;++c){const d=u.createTexture();this.textures.push(d);const p=c<T-1?4:(this.bandCount-1)%4+1;L[c]=new v(x*p)}let A=0,I=0;const k=_[0]*this.bandCount;for(let c=0;c<_[1];++c){for(let c=0;c<k;++c){const u=p[I+c],d=Math.floor(A/this.bandCount),g=c%this.bandCount,f=L[Math.floor(g/4)];f[d*(f.length/x)+g%4]=u,++A}I+=M/C}for(let u=0;u<T;++u){const p=this.textures[u],g=L[u];uploadDataTexture(c,p,g,_,g.length/x,d.interpolate)}this.setReady()}getImagePixelData_(c,u,d){const p=this.gutter,g=this.renderSize_[0],f=this.renderSize_[1];bd||function createPixelContext(){bd=createCanvasContext2D(1,1,void 0,{willReadFrequently:!0})}(),bd.clearRect(0,0,1,1);const _=c.width-2*p,y=c.height-2*p,x=p+Math.floor(_*(u/g)),v=p+Math.floor(y*(d/f));let C;try{bd.drawImage(c,x,v,1,1,0,0,1,1),C=bd.getImageData(0,0,1,1).data}catch(c){return bd=null,null}return C}getArrayPixelData_(c,u,d,p){const g=this.gutter,f=this.renderSize_[0],_=this.renderSize_[1],y=u[0],x=u[1],v=y+2*g,C=x+2*g,M=g+Math.floor(y*(d/f)),T=g+Math.floor(x*(p/_));if(c instanceof DataView){const u=c.byteLength/(v*C),d=u*(T*v+M),p=c.buffer.slice(d,d+u);return new DataView(p)}const L=this.bandCount*(T*v+M);return c.slice(L,L+this.bandCount)}getPixelData(c,u){if(!this.loaded)return null;if(this.tile instanceof DataTile){const d=this.tile.getData(),p=asArrayLike(d);if(p){const d=this.tile.getSize();return this.getArrayPixelData_(p,d,c,u)}return this.getImagePixelData_(asImageLike(d),c,u)}return this.getImagePixelData_(this.tile.getImage(),c,u)}}const Md={};function depthForZ(c){return 1/(c+2)}function lookupHasTile(c,u){return c.tileIds.has(getUid(u))}function addTileRepresentationToLookup(c,u,d){const p=c.representationsByZ;d in p||(p[d]=new Set),p[d].add(u),c.tileIds.add(getUid(u.tile))}function getRenderExtent$1(c,u){const d=c.layerStatesArray[c.layerIndex];d.extent&&(u=getIntersection(u,fromUserExtent(d.extent,c.viewState.projection)));const p=d.layer.getRenderSource();if(!p.getWrapX()){const d=p.getTileGridForProjection(c.viewState.projection).getExtent();d&&(u=getIntersection(u,d))}return u}function getCacheKey$1(c,u){return`${c.getKey()},${getKey(u)}`}class WebGLBaseTileLayerRenderer extends WebGLLayerRenderer{constructor(c,u){super(c,{uniforms:u.uniforms,postProcesses:u.postProcesses}),this.renderComplete=!1,this.tileTransform_=[1,0,0,1,0,0],this.tempMat4=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.tempTileRange_=new aa(0,0,0,0),this.tempTileCoord_=createOrUpdate$1(0,0,0),this.tempSize_=[0,0];const d=void 0!==u.cacheSize?u.cacheSize:512;this.tileRepresentationCache=new LRUCache(d),this.frameState=null,this.projection_=void 0}reset(c){super.reset({uniforms:c.uniforms})}prepareFrameInternal(c){this.projection_?c.viewState.projection!==this.projection_&&(this.clearCache(),this.projection_=c.viewState.projection):this.projection_=c.viewState.projection;const u=this.getLayer().getRenderSource();return!!u&&(!isEmpty(getRenderExtent$1(c,c.extent))&&"ready"===u.getState())}createTileRepresentation(c){return abstract()}enqueueTiles(c,u,d,p,g){const f=c.viewState,_=this.getLayer(),y=_.getRenderSource(),x=y.getTileGridForProjection(f.projection),v=y.getGutterForProjection(f.projection),C=getUid(y);C in c.wantedTiles||(c.wantedTiles[C]={});const M=c.wantedTiles[C],T=this.tileRepresentationCache,L=_.getMapInternal(),A=Math.max(d-g,x.getMinZoom(),x.getZForResolution(Math.min(_.getMaxResolution(),L?L.getView().getResolutionForZoom(Math.max(_.getMinZoom(),0)):x.getResolution(0)),y.zDirection));for(let g=d;g>=A;--g){const d=x.getTileRangeForExtentAndZ(u,g,this.tempTileRange_),_=x.getResolution(g);for(let u=d.minX;u<=d.maxX;++u)for(let L=d.minY;L<=d.maxY;++L){const d=createOrUpdate$1(g,u,L,this.tempTileCoord_),A=getCacheKey$1(y,d);let I,k;if(T.containsKey(A)&&(I=T.get(A),k=I.tile),!(I&&I.tile.key===y.getKey()||(k=y.getTile(g,u,L,c.pixelRatio,f.projection),k)))continue;if(lookupHasTile(p,k))continue;I?I.setTile(k):(I=this.createTileRepresentation({tile:k,grid:x,helper:this.helper,gutter:v}),T.set(A,I)),addTileRepresentationToLookup(p,I,g);const O=k.getKey();M[O]=!0,k.getState()===co&&(c.tileQueue.isKeyQueued(O)||c.tileQueue.enqueue([k,C,x.getTileCoordCenter(d),_]))}}}beforeTilesRender(c,u){this.helper.prepareDraw(this.frameState,!u,!0)}beforeTilesMaskRender(c){return!1}renderTile(c,u,d,p,g,f,_,y,x,v,C){}renderTileMask(c,u,d,p){}drawTile_(c,u,d,p,g,f,_){if(!u.ready)return;const y=u.tile.tileCoord,x=getKey(y),v=x in f?f[x]:1,C=_.getResolution(d),M=toSize(_.getTileSize(d),this.tempSize_),T=_.getOrigin(d),L=_.getTileCoordExtent(y),A=v<1?-1:depthForZ(d);v<1&&(c.animate=!0);const I=c.viewState,k=I.center[0],O=I.center[1],N=M[0]+2*p,G=M[1]+2*p,j=N/G,B=(k-T[0])/(M[0]*C),V=(T[1]-O)/(M[1]*C),q=I.resolution/C,Z=y[1],K=y[2];reset(this.tileTransform_),scale$3(this.tileTransform_,2/(c.size[0]*q/N),-2/(c.size[1]*q/N)),function rotate$2(c,u){const d=Math.cos(u),p=Math.sin(u);return multiply(c,set(Fi,d,p,-p,d,0,0))}(this.tileTransform_,I.rotation),scale$3(this.tileTransform_,1,1/j),translate$1(this.tileTransform_,(M[0]*(Z-B)-p)/N,(M[1]*(K-V)-p)/G),this.renderTile(u,this.tileTransform_,c,g,C,M,T,L,A,p,v)}renderFrame(c){this.frameState=c,this.renderComplete=!0;const u=this.helper.getGL();this.preRender(u,c);const d=c.viewState,p=this.getLayer(),g=p.getRenderSource(),f=g.getTileGridForProjection(d.projection),_=g.getGutterForProjection(d.projection),y=getRenderExtent$1(c,c.extent),x=f.getZForResolution(d.resolution,g.zDirection),v=function newTileRepresentationLookup(){return{tileIds:new Set,representationsByZ:{}}}(),C=p.getPreload();if(c.nextExtent){const u=f.getZForResolution(d.nextResolution,g.zDirection),p=getRenderExtent$1(c,c.nextExtent);this.enqueueTiles(c,p,u,v,C)}this.enqueueTiles(c,y,x,v,0),C>0&&setTimeout((()=>{this.enqueueTiles(c,y,x-1,v,C-1)}),0);const M={},T=getUid(this),L=c.time;let A=!1;const I=v.representationsByZ;if(x in I)for(const c of I[x]){const u=c.tile;if((u instanceof ReprojTile||u instanceof ReprojDataTile)&&u.getState()===mo)continue;const d=u.tileCoord;if(c.ready){const c=u.getAlpha(T,L);if(1===c){u.endTransition(T);continue}A=!0;M[getKey(d)]=c}this.renderComplete=!1;if(this.findAltTiles_(f,d,x+1,v))continue;const p=f.getMinZoom();for(let c=x-1;c>=p;--c){if(this.findAltTiles_(f,d,c,v))break}}const k=Object.keys(I).map(Number).sort(descending);if(this.beforeTilesMaskRender(c))for(let c=0,u=k.length;c<u;++c){const u=k[c];for(const c of I[u]){const d=c.tile.tileCoord;if(getKey(d)in M)continue;const p=f.getTileCoordExtent(d);this.renderTileMask(c,u,p,depthForZ(u))}}this.beforeTilesRender(c,A);for(let u=0,d=k.length;u<d;++u){const d=k[u];for(const u of I[d]){getKey(u.tile.tileCoord)in M||this.drawTile_(c,u,d,_,y,M,f)}}if(x in I)for(const u of I[x]){getKey(u.tile.tileCoord)in M&&this.drawTile_(c,u,x,_,y,M,f)}this.helper.finalizeDraw(c,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);const O=this.helper.getCanvas(),N=this.tileRepresentationCache;for(;N.canExpireCache();){N.pop().dispose()}return c.postRenderFunctions.push((function(c,u){g.expireCache(u.viewState.projection,Md)})),this.postRender(u,c),O}findAltTiles_(c,u,d,p){const g=c.getTileRangeForTileCoordAndZ(u,d,this.tempTileRange_);if(!g)return!1;let f=!0;const _=this.tileRepresentationCache,y=this.getLayer().getRenderSource();for(let c=g.minX;c<=g.maxX;++c)for(let u=g.minY;u<=g.maxY;++u){const g=getCacheKey$1(y,[d,c,u]);let x=!1;if(_.containsKey(g)){const c=_.get(g);c.ready&&!lookupHasTile(p,c.tile)&&(addTileRepresentationToLookup(p,c,d),x=!0)}x||(f=!1)}return f}clearCache(){super.clearCache();const c=this.tileRepresentationCache;c.forEach((c=>c.dispose())),c.clear()}afterHelperCreated(){super.afterHelperCreated(),this.tileRepresentationCache.forEach((c=>c.setHelper(this.helper)))}disposeInternal(){super.disposeInternal(),delete this.frameState}}const Td={TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",RENDER_EXTENT:"u_renderExtent",PATTERN_ORIGIN:"u_patternOrigin",RESOLUTION:"u_resolution",ZOOM:"u_zoom",GLOBAL_ALPHA:"u_globalAlpha",PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TILE_TEXTURE_ARRAY:"u_tileTextures",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY"},Rd="a_textureCoord",Ld=[{name:Rd,size:2,type:fd.FLOAT}];class WebGLTileLayerRenderer extends WebGLBaseTileLayerRenderer{constructor(c,u){super(c,u),this.program_,this.vertexShader_=u.vertexShader,this.fragmentShader_=u.fragmentShader,this.indices_=new WebGLArrayBuffer(ed,id),this.indices_.fromArray([0,1,3,1,2,3]),this.paletteTextures_=u.paletteTextures||[]}reset(c){if(super.reset(c),this.helper){const c=this.helper.getGL();for(const u of this.paletteTextures_)u.delete(c)}this.vertexShader_=c.vertexShader,this.fragmentShader_=c.fragmentShader,this.paletteTextures_=c.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))}afterHelperCreated(){super.afterHelperCreated(),this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)}removeHelper(){if(this.helper){const c=this.helper.getGL();for(const u of this.paletteTextures_)u.delete(c)}super.removeHelper()}createTileRepresentation(c){return new TileTexture(c)}beforeTilesRender(c,u){super.beforeTilesRender(c,u),this.helper.useProgram(this.program_,c)}renderTile(c,u,d,p,g,f,_,y,x,v,C){const M=this.helper.getGL();this.helper.bindBuffer(c.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(Ld);let T=0;for(;T<c.textures.length;){const u=`${Td.TILE_TEXTURE_ARRAY}[${T}]`;this.helper.bindTexture(c.textures[T],T,u),++T}for(let c=0;c<this.paletteTextures_.length;++c){const u=this.paletteTextures_[c],d=u.getTexture(M);this.helper.bindTexture(d,T,u.name),++T}const L=d.viewState,A=f[0]+2*v,I=f[1]+2*v,k=c.tile.tileCoord,O=k[1],N=k[2];this.helper.setUniformMatrixValue(Td.TILE_TRANSFORM,fromTransform(this.tempMat4,u)),this.helper.setUniformFloatValue(Td.TRANSITION_ALPHA,C),this.helper.setUniformFloatValue(Td.DEPTH,x);let G=p;v>0&&(G=y,getIntersection(G,p,G)),this.helper.setUniformFloatVec4(Td.RENDER_EXTENT,G),this.helper.setUniformFloatValue(Td.RESOLUTION,L.resolution),this.helper.setUniformFloatValue(Td.ZOOM,L.zoom),this.helper.setUniformFloatValue(Td.TEXTURE_PIXEL_WIDTH,A),this.helper.setUniformFloatValue(Td.TEXTURE_PIXEL_HEIGHT,I),this.helper.setUniformFloatValue(Td.TEXTURE_RESOLUTION,g),this.helper.setUniformFloatValue(Td.TEXTURE_ORIGIN_X,_[0]+O*f[0]*g-v*g),this.helper.setUniformFloatValue(Td.TEXTURE_ORIGIN_Y,_[1]-N*f[1]*g+v*g),this.helper.drawElements(0,this.indices_.getSize())}getData(c){if(!this.helper.getGL())return null;const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=u.viewState,f=d.getExtent();if(f&&!containsCoordinate(fromUserExtent(f,g.projection),p))return null;const _=d.getSources(boundingExtent([p]),g.resolution);let y,x,v;for(y=_.length-1;y>=0;--y)if(x=_[y],"ready"===x.getState()){if(v=x.getTileGridForProjection(g.projection),x.getWrapX())break;const c=v.getExtent();if(!c||containsCoordinate(c,p))break}if(y<0)return null;const C=this.tileRepresentationCache;for(let c=v.getZForResolution(g.resolution);c>=v.getMinZoom();--c){const u=v.getTileCoordForCoordAndZ(p,c),d=getCacheKey$1(x,u);if(!C.containsKey(d))continue;const g=C.get(d),f=g.tile;if((f instanceof ReprojTile||f instanceof ReprojDataTile)&&f.getState()===mo)return null;if(!g.loaded)continue;const _=v.getOrigin(c),y=toSize(v.getTileSize(c)),M=v.getResolution(c),T=(p[0]-_[0])/M-u[1]*y[0],L=(_[1]-p[1])/M-u[2]*y[1];return g.getPixelData(T,L)}return null}disposeInternal(){const c=this.helper;if(c){const u=c.getGL();for(const c of this.paletteTextures_)c.delete(u);this.paletteTextures_.length=0,u.deleteProgram(this.program_),delete this.program_,c.deleteBuffer(this.indices_)}super.disposeInternal(),delete this.indices_}}function numberToGlsl(c){const u=c.toString();return u.includes(".")?u:u+".0"}function arrayToGlsl(c){if(c.length<2||c.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${c.length}(${c.map(numberToGlsl).join(", ")})`}function colorToGlsl(c){const u=asArray(c),d=u.length>3?u[3]:1;return arrayToGlsl([u[0]/255,u[1]/255,u[2]/255,d])}const Ad={};let Id=0;function getStringNumberEquivalent(c){return c in Ad||(Ad[c]=Id++),Ad[c]}function stringToGlsl(c){return numberToGlsl(getStringNumberEquivalent(c))}function uniformNameForVariable(c){return"u_var_"+c}const Fd="getBandValue",kd="u_paletteTextures";function createCompiler(c){return(u,d,p)=>{const g=d.args.length,f=new Array(g);for(let c=0;c<g;++c)f[c]=compile(d.args[c],p,u);return c(f,u)}}const Od={[ns.Get]:(c,u)=>{const d=u.args[0].value;d in c.properties||(c.properties[d]={name:d,type:u.type});return(c.inFragmentShader?"v_prop_":"a_prop_")+d},[ns.GeometryType]:(c,u,d)=>{const p="geometryType";p in c.properties||(c.properties[p]={name:p,type:Hn,evaluator:c=>computeGeometryType(c.getGeometry())});return(c.inFragmentShader?"v_prop_":"a_prop_")+p},[ns.LineMetric]:()=>"currentLineMetric",[ns.Var]:(c,u)=>{const d=u.args[0].value;return d in c.variables||(c.variables[d]={name:d,type:u.type}),uniformNameForVariable(d)},[ns.Resolution]:()=>"u_resolution",[ns.Zoom]:()=>"u_zoom",[ns.Time]:()=>"u_time",[ns.Any]:createCompiler((c=>`(${c.join(" || ")})`)),[ns.All]:createCompiler((c=>`(${c.join(" && ")})`)),[ns.Not]:createCompiler((([c])=>`(!${c})`)),[ns.Equal]:createCompiler((([c,u])=>`(${c} == ${u})`)),[ns.NotEqual]:createCompiler((([c,u])=>`(${c} != ${u})`)),[ns.GreaterThan]:createCompiler((([c,u])=>`(${c} > ${u})`)),[ns.GreaterThanOrEqualTo]:createCompiler((([c,u])=>`(${c} >= ${u})`)),[ns.LessThan]:createCompiler((([c,u])=>`(${c} < ${u})`)),[ns.LessThanOrEqualTo]:createCompiler((([c,u])=>`(${c} <= ${u})`)),[ns.Multiply]:createCompiler((c=>`(${c.join(" * ")})`)),[ns.Divide]:createCompiler((([c,u])=>`(${c} / ${u})`)),[ns.Add]:createCompiler((c=>`(${c.join(" + ")})`)),[ns.Subtract]:createCompiler((([c,u])=>`(${c} - ${u})`)),[ns.Clamp]:createCompiler((([c,u,d])=>`clamp(${c}, ${u}, ${d})`)),[ns.Mod]:createCompiler((([c,u])=>`mod(${c}, ${u})`)),[ns.Pow]:createCompiler((([c,u])=>`pow(${c}, ${u})`)),[ns.Abs]:createCompiler((([c])=>`abs(${c})`)),[ns.Floor]:createCompiler((([c])=>`floor(${c})`)),[ns.Ceil]:createCompiler((([c])=>`ceil(${c})`)),[ns.Round]:createCompiler((([c])=>`floor(${c} + 0.5)`)),[ns.Sin]:createCompiler((([c])=>`sin(${c})`)),[ns.Cos]:createCompiler((([c])=>`cos(${c})`)),[ns.Atan]:createCompiler((([c,u])=>void 0!==u?`atan(${c}, ${u})`:`atan(${c})`)),[ns.Sqrt]:createCompiler((([c])=>`sqrt(${c})`)),[ns.Match]:createCompiler((c=>{const u=c[0],d=c[c.length-1];let p=null;for(let g=c.length-3;g>=1;g-=2){p=`(${u} == ${c[g]} ? ${c[g+1]} : ${p||d})`}return p})),[ns.Between]:createCompiler((([c,u,d])=>`(${c} >= ${u} && ${c} <= ${d})`)),[ns.Interpolate]:createCompiler((([c,u,...d])=>{let p="";for(let g=0;g<d.length-2;g+=2){const f=d[g],_=p||d[g+1],y=d[g+2],x=d[g+3];let v;v=c===numberToGlsl(1)?`(${u} - ${f}) / (${y} - ${f})`:`(pow(${c}, (${u} - ${f})) - 1.0) / (pow(${c}, (${y} - ${f})) - 1.0)`,p=`mix(${_}, ${x}, clamp(${v}, 0.0, 1.0))`}return p})),[ns.Case]:createCompiler((c=>{const u=c[c.length-1];let d=null;for(let p=c.length-3;p>=0;p-=2){d=`(${c[p]} ? ${c[p+1]} : ${d||u})`}return d})),[ns.In]:createCompiler((([c,...u],d)=>{const p=function computeOperatorFunctionName(c,u){return`operator_${c}_${Object.keys(u.functions).length}`}("in",d),g=[];for(let c=0;c<u.length;c+=1)g.push(`  if (inputValue == ${u[c]}) { return true; }`);return d.functions[p]=`bool ${p}(float inputValue) {\n${g.join("\n")}\n  return false;\n}`,`${p}(${c})`})),[ns.Array]:createCompiler((c=>`vec${c.length}(${c.join(", ")})`)),[ns.Color]:createCompiler((c=>{if(1===c.length)return`vec4(vec3(${c[0]} / 255.0), 1.0)`;if(2===c.length)return`vec4(vec3(${c[0]} / 255.0), ${c[1]})`;const u=c.slice(0,3).map((c=>`${c} / 255.0`));if(3===c.length)return`vec4(${u.join(", ")}, 1.0)`;const d=c[3];return`vec4(${u.join(", ")}, ${d})`})),[ns.Band]:createCompiler((([c,u,d],p)=>{if(!(Fd in p.functions)){let c="";const u=p.bandCount||1;for(let d=0;d<u;d++){const p=Math.floor(d/4);let g=d%4;d===u-1&&1===g&&(g=3);c+=`  if (band == ${d+1}.0) {\n    return texture2D(${`${Td.TILE_TEXTURE_ARRAY}[${p}]`}, v_textureCoord + vec2(dx, dy))[${g}];\n  }\n`}p.functions[Fd]=`float getBandValue(float band, float xOffset, float yOffset) {\n  float dx = xOffset / ${Td.TEXTURE_PIXEL_WIDTH};\n  float dy = yOffset / ${Td.TEXTURE_PIXEL_HEIGHT};\n${c}\n}`}return`${Fd}(${c}, ${u??"0.0"}, ${d??"0.0"})`})),[ns.Palette]:(c,u)=>{const[d,...p]=u.args,g=p.length,f=new Uint8Array(4*g);for(let c=0;c<p.length;c++){const u=asArray(p[c].value),d=4*c;f[d]=u[0],f[d+1]=u[1],f[d+2]=u[2],f[d+3]=255*u[3]}c.paletteTextures||(c.paletteTextures=[]);const _=`${kd}[${c.paletteTextures.length}]`,y=new PaletteTexture(_,f);c.paletteTextures.push(y);return`texture2D(${_}, vec2((${compile(d,Kn,c)} + 0.5) / ${g}.0, 0.5))`}};function compile(c,u,d){if(c instanceof CallExpression){const p=Od[c.operator];if(void 0===p)throw new Error(`No compiler defined for this operator: ${JSON.stringify(c.operator)}`);return p(d,c,u)}if((c.type&Kn)>0)return numberToGlsl(c.value);if((c.type&Zn)>0)return c.value.toString();if((c.type&Hn)>0)return stringToGlsl(c.value.toString());if((c.type&Jn)>0)return colorToGlsl(c.value);if((c.type&Qn)>0)return arrayToGlsl(c.value);if((c.type&ts)>0)return function sizeToGlsl(c){return arrayToGlsl(toSize(c))}(c.value);throw new Error(`Unexpected expression ${c.value} (expected type ${typeName(u)})`)}const Nd="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_screenToWorldMatrix;\nuniform vec2 u_viewportSizePx;\nuniform float u_pixelRatio;\nuniform float u_globalAlpha;\nuniform float u_time;\nuniform float u_zoom;\nuniform float u_resolution;\nuniform float u_rotation;\nuniform vec4 u_renderExtent;\nuniform vec2 u_patternOrigin;\nuniform float u_depth;\nuniform mediump int u_hitDetection;\n\nconst float PI = 3.141592653589793238;\nconst float TWO_PI = 2.0 * PI;\nfloat currentLineMetric = 0.; // an actual value will be used in the stroke shaders\n",Dd={"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"};class ShaderBuilder{constructor(){this.uniforms_=[],this.attributes_=[],this.varyings_=[],this.hasSymbol_=!1,this.symbolSizeExpression_=`vec2(${numberToGlsl(Dd["circle-radius"])} + ${numberToGlsl(.5*Dd["circle-stroke-width"])})`,this.symbolRotationExpression_="0.0",this.symbolOffsetExpression_="vec2(0.0)",this.symbolColorExpression_=colorToGlsl(Dd["circle-fill-color"]),this.texCoordExpression_="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression_="false",this.symbolRotateWithView_=!1,this.hasStroke_=!1,this.strokeWidthExpression_=numberToGlsl(Dd["stroke-width"]),this.strokeColorExpression_=colorToGlsl(Dd["stroke-color"]),this.strokeOffsetExpression_="0.",this.strokeCapExpression_=stringToGlsl("round"),this.strokeJoinExpression_=stringToGlsl("round"),this.strokeMiterLimitExpression_="10.",this.strokeDistanceFieldExpression_="-1000.",this.hasFill_=!1,this.fillColorExpression_=colorToGlsl(Dd["fill-color"]),this.vertexShaderFunctions_=[],this.fragmentShaderFunctions_=[]}addUniform(c){return this.uniforms_.push(c),this}addAttribute(c){return this.attributes_.push(c),this}addVarying(c,u,d){return this.varyings_.push({name:c,type:u,expression:d}),this}setSymbolSizeExpression(c){return this.hasSymbol_=!0,this.symbolSizeExpression_=c,this}getSymbolSizeExpression(){return this.symbolSizeExpression_}setSymbolRotationExpression(c){return this.symbolRotationExpression_=c,this}setSymbolOffsetExpression(c){return this.symbolOffsetExpression_=c,this}getSymbolOffsetExpression(){return this.symbolOffsetExpression_}setSymbolColorExpression(c){return this.hasSymbol_=!0,this.symbolColorExpression_=c,this}getSymbolColorExpression(){return this.symbolColorExpression_}setTextureCoordinateExpression(c){return this.texCoordExpression_=c,this}setFragmentDiscardExpression(c){return this.discardExpression_=c,this}getFragmentDiscardExpression(){return this.discardExpression_}setSymbolRotateWithView(c){return this.symbolRotateWithView_=c,this}setStrokeWidthExpression(c){return this.hasStroke_=!0,this.strokeWidthExpression_=c,this}setStrokeColorExpression(c){return this.hasStroke_=!0,this.strokeColorExpression_=c,this}getStrokeColorExpression(){return this.strokeColorExpression_}setStrokeOffsetExpression(c){return this.strokeOffsetExpression_=c,this}setStrokeCapExpression(c){return this.strokeCapExpression_=c,this}setStrokeJoinExpression(c){return this.strokeJoinExpression_=c,this}setStrokeMiterLimitExpression(c){return this.strokeMiterLimitExpression_=c,this}setStrokeDistanceFieldExpression(c){return this.strokeDistanceFieldExpression_=c,this}setFillColorExpression(c){return this.hasFill_=!0,this.fillColorExpression_=c,this}getFillColorExpression(){return this.fillColorExpression_}addVertexShaderFunction(c){this.vertexShaderFunctions_.includes(c)||this.vertexShaderFunctions_.push(c)}addFragmentShaderFunction(c){this.fragmentShaderFunctions_.includes(c)||this.fragmentShaderFunctions_.push(c)}getSymbolVertexShader(){return this.hasSymbol_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_position;\nattribute float a_index;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec2 v_quadCoord;\nvarying vec4 v_prop_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 pxToScreen(vec2 coordPx) {\n  vec2 scaled = coordPx / u_viewportSizePx / 0.5;\n  return scaled;\n}\n\nvec2 screenToPx(vec2 coordScreen) {\n  return (coordScreen * 0.5 + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n  v_quadSizePx = ${this.symbolSizeExpression_};\n  vec2 halfSizePx = v_quadSizePx * 0.5;\n  vec2 centerOffsetPx = ${this.symbolOffsetExpression_};\n  vec2 offsetPx = centerOffsetPx;\n  if (a_index == 0.0) {\n    offsetPx -= halfSizePx;\n  } else if (a_index == 1.0) {\n    offsetPx += halfSizePx * vec2(1., -1.);\n  } else if (a_index == 2.0) {\n    offsetPx += halfSizePx;\n  } else {\n    offsetPx += halfSizePx * vec2(-1., 1.);\n  }\n  float angle = ${this.symbolRotationExpression_};\n  ${this.symbolRotateWithView_?"angle += u_rotation;":""}\n  float c = cos(-angle);\n  float s = sin(-angle);\n  offsetPx = vec2(c * offsetPx.x - s * offsetPx.y, s * offsetPx.x + c * offsetPx.y);\n  vec4 center = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  gl_Position = center + vec4(pxToScreen(offsetPx), u_depth, 0.);\n  vec4 texCoord = ${this.texCoordExpression_};\n  float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;\n  float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;\n  v_texCoord = vec2(u, v);\n  v_prop_hitColor = a_prop_hitColor;\n  v_angle = angle;\n  c = cos(-v_angle);\n  s = sin(-v_angle);\n  centerOffsetPx = vec2(c * centerOffsetPx.x - s * centerOffsetPx.y, s * centerOffsetPx.x + c * centerOffsetPx.y); \n  v_centerPx = screenToPx(center.xy) + centerOffsetPx;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getSymbolFragmentShader(){return this.hasSymbol_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec2 v_texCoord;\nvarying vec4 v_prop_hitColor;\nvarying vec2 v_centerPx;\nvarying float v_angle;\nvarying vec2 v_quadSizePx;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvoid main(void) {\n  if (${this.discardExpression_}) { discard; }\n  vec2 coordsPx = gl_FragCoord.xy / u_pixelRatio - v_centerPx; // relative to center\n  float c = cos(v_angle);\n  float s = sin(v_angle);\n  coordsPx = vec2(c * coordsPx.x - s * coordsPx.y, s * coordsPx.x + c * coordsPx.y);\n  gl_FragColor = ${this.symbolColorExpression_};\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.05) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}getStrokeVertexShader(){return this.hasStroke_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_segmentStart;\nattribute vec2 a_segmentEnd;\nattribute float a_measureStart;\nattribute float a_measureEnd;\nattribute float a_parameters;\nattribute float a_distance;\nattribute vec2 a_joinAngles;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvec2 worldToPx(vec2 worldPos) {\n  vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n  return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvec4 pxToScreen(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return vec4(screenPos, u_depth, 1.0);\n}\n\nbool isCap(float joinAngle) {\n  return joinAngle < -0.1;\n}\n\nvec2 getJoinOffsetDirection(vec2 normalPx, float joinAngle) {\n  float halfAngle = joinAngle / 2.0;\n  float c = cos(halfAngle);\n  float s = sin(halfAngle);\n  vec2 angleBisectorNormal = vec2(s * normalPx.x + c * normalPx.y, -c * normalPx.x + s * normalPx.y);\n  float length = 1.0 / s;\n  return angleBisectorNormal * length;\n}\n\nvec2 getOffsetPoint(vec2 point, vec2 normal, float joinAngle, float offsetPx) {\n  // if on a cap or the join angle is too high, offset the line along the segment normal\n  if (cos(joinAngle) > 0.998 || isCap(joinAngle)) {\n    return point - normal * offsetPx;\n  }\n  // offset is applied along the inverted normal (positive offset goes "right" relative to line direction)\n  return point - getJoinOffsetDirection(normal, joinAngle) * offsetPx;\n}\n\nvoid main(void) {\n  v_angleStart = a_joinAngles.x;\n  v_angleEnd = a_joinAngles.y;\n  float vertexNumber = floor(abs(a_parameters) / 10000. + 0.5);\n  currentLineMetric = vertexNumber < 1.5 ? a_measureStart : a_measureEnd;\n  // we're reading the fractional part while keeping the sign (so -4.12 gives -0.12, 3.45 gives 0.45)\n  float angleTangentSum = fract(abs(a_parameters) / 10000.) * 10000. * sign(a_parameters);\n\n  float lineWidth = ${this.strokeWidthExpression_};\n  float lineOffsetPx = ${this.strokeOffsetExpression_};\n\n  // compute segment start/end in px with offset\n  vec2 segmentStartPx = worldToPx(a_segmentStart);\n  vec2 segmentEndPx = worldToPx(a_segmentEnd);\n  vec2 tangentPx = normalize(segmentEndPx - segmentStartPx);\n  vec2 normalPx = vec2(-tangentPx.y, tangentPx.x);\n  segmentStartPx = getOffsetPoint(segmentStartPx, normalPx, v_angleStart, lineOffsetPx),\n  segmentEndPx = getOffsetPoint(segmentEndPx, normalPx, v_angleEnd, lineOffsetPx);\n  \n  // compute current vertex position\n  float normalDir = vertexNumber < 0.5 || (vertexNumber > 1.5 && vertexNumber < 2.5) ? 1.0 : -1.0;\n  float tangentDir = vertexNumber < 1.5 ? 1.0 : -1.0;\n  float angle = vertexNumber < 1.5 ? v_angleStart : v_angleEnd;\n  vec2 joinDirection;\n  vec2 positionPx = vertexNumber < 1.5 ? segmentStartPx : segmentEndPx;\n  // if angle is too high, do not make a proper join\n  if (cos(angle) > 0.985 || isCap(angle)) {\n    joinDirection = normalPx * normalDir - tangentPx * tangentDir;\n  } else {\n    joinDirection = getJoinOffsetDirection(normalPx * normalDir, angle);\n  }\n  positionPx = positionPx + joinDirection * (lineWidth * 0.5 + 1.); // adding 1 pixel for antialiasing\n  gl_Position = pxToScreen(positionPx);\n\n  v_segmentStart = segmentStartPx;\n  v_segmentEnd = segmentEndPx;\n  v_width = lineWidth;\n  v_prop_hitColor = a_prop_hitColor;\n  v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);\n  v_measureStart = a_measureStart;\n  v_measureEnd = a_measureEnd;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getStrokeFragmentShader(){return this.hasStroke_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec2 v_segmentStart;\nvarying vec2 v_segmentEnd;\nvarying float v_angleStart;\nvarying float v_angleEnd;\nvarying float v_width;\nvarying vec4 v_prop_hitColor;\nvarying float v_distanceOffsetPx;\nvarying float v_measureStart;\nvarying float v_measureEnd;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\n\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nbool isCap(float joinAngle) {\n  return joinAngle < -0.1;\n}\n\nfloat segmentDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  vec2 tangent = normalize(end - start);\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 startToPoint = point - start;\n  return abs(dot(startToPoint, normal)) - width * 0.5;\n}\n\nfloat buttCapDistanceField(vec2 point, vec2 start, vec2 end) {\n  vec2 startToPoint = point - start;\n  vec2 tangent = normalize(end - start);\n  return dot(startToPoint, -tangent);\n}\n\nfloat squareCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  return buttCapDistanceField(point, start, end) - width * 0.5;\n}\n\nfloat roundCapDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  float onSegment = max(0., 1000. * dot(point - start, end - start)); // this is very high when inside the segment\n  return length(point - start) - width * 0.5 - onSegment;\n}\n\nfloat roundJoinDistanceField(vec2 point, vec2 start, vec2 end, float width) {\n  return roundCapDistanceField(point, start, end, width);\n}\n\nfloat bevelJoinField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n  vec2 startToPoint = point - start;\n  vec2 tangent = normalize(end - start);\n  float c = cos(joinAngle * 0.5);\n  float s = sin(joinAngle * 0.5);\n  float direction = -sign(sin(joinAngle));\n  vec2 bisector = vec2(c * tangent.x - s * tangent.y, s * tangent.x + c * tangent.y);\n  float radius = width * 0.5 * s;\n  return dot(startToPoint, bisector * direction) - radius;\n}\n\nfloat miterJoinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle) {\n  if (cos(joinAngle) > 0.985) { // avoid risking a division by zero\n    return bevelJoinField(point, start, end, width, joinAngle);\n  }\n  float miterLength = 1. / sin(joinAngle * 0.5);\n  float miterLimit = ${this.strokeMiterLimitExpression_};\n  if (miterLength > miterLimit) {\n    return bevelJoinField(point, start, end, width, joinAngle);\n  }\n  return -1000.;\n}\n\nfloat capDistanceField(vec2 point, vec2 start, vec2 end, float width, float capType) {\n   if (capType == ${stringToGlsl("butt")}) {\n    return buttCapDistanceField(point, start, end);\n  } else if (capType == ${stringToGlsl("square")}) {\n    return squareCapDistanceField(point, start, end, width);\n  }\n  return roundCapDistanceField(point, start, end, width);\n}\n\nfloat joinDistanceField(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float joinType) {\n  if (joinType == ${stringToGlsl("bevel")}) {\n    return bevelJoinField(point, start, end, width, joinAngle);\n  } else if (joinType == ${stringToGlsl("miter")}) {\n    return miterJoinDistanceField(point, start, end, width, joinAngle);\n  }\n  return roundJoinDistanceField(point, start, end, width);\n}\n\nfloat computeSegmentPointDistance(vec2 point, vec2 start, vec2 end, float width, float joinAngle, float capType, float joinType) {\n  if (isCap(joinAngle)) {\n    return capDistanceField(point, start, end, width, capType);\n  }\n  return joinDistanceField(point, start, end, width, joinAngle, joinType);\n}\n\nvoid main(void) {\n  vec2 currentPoint = gl_FragCoord.xy / u_pixelRatio;\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 worldPos = pxToWorld(currentPoint);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      worldPos[0] < u_renderExtent[0] ||\n      worldPos[1] < u_renderExtent[1] ||\n      worldPos[0] > u_renderExtent[2] ||\n      worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n\n  float segmentLength = length(v_segmentEnd - v_segmentStart);\n  vec2 segmentTangent = (v_segmentEnd - v_segmentStart) / segmentLength;\n  vec2 segmentNormal = vec2(-segmentTangent.y, segmentTangent.x);\n  vec2 startToPoint = currentPoint - v_segmentStart;\n  float lengthToPoint = max(0., min(dot(segmentTangent, startToPoint), segmentLength));\n  float currentLengthPx = lengthToPoint + v_distanceOffsetPx; \n  float currentRadiusPx = abs(dot(segmentNormal, startToPoint));\n  float currentRadiusRatio = dot(segmentNormal, startToPoint) * 2. / v_width;\n  currentLineMetric = mix(v_measureStart, v_measureEnd, lengthToPoint / segmentLength);\n\n  if (${this.discardExpression_}) { discard; }\n\n  vec4 color = ${this.strokeColorExpression_};\n  float capType = ${this.strokeCapExpression_};\n  float joinType = ${this.strokeJoinExpression_};\n  float segmentStartDistance = computeSegmentPointDistance(currentPoint, v_segmentStart, v_segmentEnd, v_width, v_angleStart, capType, joinType);\n  float segmentEndDistance = computeSegmentPointDistance(currentPoint, v_segmentEnd, v_segmentStart, v_width, v_angleEnd, capType, joinType);\n  float distance = max(\n    segmentDistanceField(currentPoint, v_segmentStart, v_segmentEnd, v_width),\n    max(segmentStartDistance, segmentEndDistance)\n  );\n  distance = max(distance, ${this.strokeDistanceFieldExpression_});\n  color.a *= smoothstep(0.5, -0.5, distance);\n  gl_FragColor = color;\n  gl_FragColor.a *= u_globalAlpha;\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}getFillVertexShader(){return this.hasFill_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nattribute vec2 a_position;\nattribute vec4 a_prop_hitColor;\n${this.attributes_.map((function(c){return"attribute "+c+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.vertexShaderFunctions_.join("\n")}\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);\n  v_prop_hitColor = a_prop_hitColor;\n${this.varyings_.map((function(c){return"  "+c.name+" = "+c.expression+";"})).join("\n")}\n}`:null}getFillFragmentShader(){return this.hasFill_?`${Nd}\n${this.uniforms_.map((function(c){return"uniform "+c+";"})).join("\n")}\nvarying vec4 v_prop_hitColor;\n${this.varyings_.map((function(c){return"varying "+c.type+" "+c.name+";"})).join("\n")}\n${this.fragmentShaderFunctions_.join("\n")}\nvec2 pxToWorld(vec2 pxPos) {\n  vec2 screenPos = 2.0 * pxPos / u_viewportSizePx - 1.0;\n  return (u_screenToWorldMatrix * vec4(screenPos, 0.0, 1.0)).xy;\n}\n\nvec2 worldToPx(vec2 worldPos) {\n  vec4 screenPos = u_projectionMatrix * vec4(worldPos, 0.0, 1.0);\n  return (0.5 * screenPos.xy + 0.5) * u_viewportSizePx;\n}\n\nvoid main(void) {\n  vec2 pxPos = gl_FragCoord.xy / u_pixelRatio;\n  vec2 pxOrigin = worldToPx(u_patternOrigin);\n  #ifdef GL_FRAGMENT_PRECISION_HIGH\n  vec2 worldPos = pxToWorld(pxPos);\n  if (\n    abs(u_renderExtent[0] - u_renderExtent[2]) > 0.0 && (\n      worldPos[0] < u_renderExtent[0] ||\n      worldPos[1] < u_renderExtent[1] ||\n      worldPos[0] > u_renderExtent[2] ||\n      worldPos[1] > u_renderExtent[3]\n    )\n  ) {\n    discard;\n  }\n  #endif\n  if (${this.discardExpression_}) { discard; }\n  gl_FragColor = ${this.fillColorExpression_};\n  gl_FragColor.a *= u_globalAlpha;\n  gl_FragColor.rgb *= gl_FragColor.a;\n  if (u_hitDetection > 0) {\n    if (gl_FragColor.a < 0.1) { discard; };\n    gl_FragColor = v_prop_hitColor;\n  }\n}`:null}}const Gd="blur",jd="gradient",zd="radius",Bd=["#00f","#0ff","#0f0","#ff0","#f00"];var Ud=class Heatmap extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.gradient,delete u.radius,delete u.blur,delete u.weight,super(u),this.gradient_=null,this.addChangeListener(jd,this.handleGradientChanged_),this.setGradient(c.gradient?c.gradient:Bd),this.setBlur(void 0!==c.blur?c.blur:15),this.setRadius(void 0!==c.radius?c.radius:8);const d=c.weight?c.weight:"weight";this.weightFunction_="string"==typeof d?c=>c.get(d):d,this.setRenderOrder(null)}getBlur(){return this.get(Gd)}getGradient(){return this.get(jd)}getRadius(){return this.get(zd)}handleGradientChanged_(){this.gradient_=function createGradient(c){const u=1,d=256,p=createCanvasContext2D(u,d),g=p.createLinearGradient(0,0,u,d),f=1/(c.length-1);for(let u=0,d=c.length;u<d;++u)g.addColorStop(u*f,c[u]);return p.fillStyle=g,p.fillRect(0,0,u,d),p.canvas}(this.getGradient())}setBlur(c){this.set(Gd,c)}setGradient(c){this.set(jd,c)}setRadius(c){this.set(zd,c)}createRenderer(){const c=(new ShaderBuilder).addAttribute("float a_prop_weight").addVarying("v_prop_weight","float","a_prop_weight").addUniform("float u_size").addUniform("float u_blurSlope").setSymbolSizeExpression("vec2(u_size)").setSymbolColorExpression("vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * u_blurSlope) * v_prop_weight)");return new WebGLPointsLayerRenderer(this,{className:this.getClassName(),attributes:[{name:"weight",callback:c=>{const u=this.weightFunction_(c);return void 0!==u?clamp(u,0,1):1}}],uniforms:{u_size:()=>2*(this.get(zd)+this.get(Gd)),u_blurSlope:()=>this.get(zd)/Math.max(1,this.get(Gd))},hitDetectionEnabled:!0,vertexShader:c.getSymbolVertexShader(),fragmentShader:c.getSymbolFragmentShader(),postProcesses:[{fragmentShader:"\n            precision mediump float;\n\n            uniform sampler2D u_image;\n            uniform sampler2D u_gradientTexture;\n            uniform float u_opacity;\n\n            varying vec2 v_texCoord;\n\n            void main() {\n              vec4 color = texture2D(u_image, v_texCoord);\n              gl_FragColor.a = color.a * u_opacity;\n              gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n              gl_FragColor.rgb *= gl_FragColor.a;\n            }",uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}};class BaseImageLayer extends Xn{constructor(c){super(c=c||{})}}class CanvasImageLayerRenderer extends CanvasLayerRenderer{constructor(c){super(c),this.image=null}getImage(){return this.image?this.image.getImage():null}prepareFrame(c){const u=c.layerStatesArray[c.layerIndex],d=c.pixelRatio,p=c.viewState,g=p.resolution,f=this.getLayer().getSource(),_=c.viewHints;let y=c.extent;if(void 0!==u.extent&&(y=getIntersection(y,fromUserExtent(u.extent,p.projection))),!_[jn]&&!_[zn]&&!isEmpty(y))if(f){const c=p.projection,u=f.getImage(y,g,d,c);u&&(this.loadImage(u)?this.image=u:u.getState()===Er.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(c){const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=d.getExtent();if(g&&!containsCoordinate(g,p))return null;const f=this.image.getExtent(),_=this.image.getImage(),y=getWidth(f),x=Math.floor(_.width*((p[0]-f[0])/y));if(x<0||x>=_.width)return null;const v=getHeight(f),C=Math.floor(_.height*((f[3]-p[1])/v));return C<0||C>=_.height?null:this.getImageData(_,x,C)}renderFrame(c,u){const d=this.image,p=d.getExtent(),g=d.getResolution(),[f,_]=Array.isArray(g)?g:[g,g],y=d.getPixelRatio(),x=c.layerStatesArray[c.layerIndex],v=c.pixelRatio,C=c.viewState,M=C.center,T=C.resolution,L=v*f/(T*y),A=v*_/(T*y);this.prepareContainer(c,u);const I=this.context.canvas.width,k=this.context.canvas.height,O=this.getRenderContext(c);let N=!1,G=!0;if(x.extent){const u=fromUserExtent(x.extent,C.projection);G=intersects$1(u,c.extent),N=G&&!containsExtent(u,c.extent),N&&this.clipUnrotated(O,c,u)}const j=d.getImage(),B=compose(this.tempTransform,I/2,k/2,L,A,0,y*(p[0]-M[0])/f,y*(M[1]-p[3])/_);this.renderedResolution=_*v/y;const V=j.width*B[0],q=j.height*B[3];if(this.getLayer().getSource().getInterpolate()||(O.imageSmoothingEnabled=!1),this.preRender(O,c),G&&V>=.5&&q>=.5){const c=B[4],u=B[5],d=x.opacity;1!==d&&(O.save(),O.globalAlpha=d),O.drawImage(j,0,0,+j.width,+j.height,c,u,V,q),1!==d&&O.restore()}return this.postRender(this.context,c),N&&O.restore(),O.imageSmoothingEnabled=!0,this.container}}var $d=class ImageLayer extends BaseImageLayer{constructor(c){super(c)}createRenderer(){return new CanvasImageLayerRenderer(this)}getData(c){return super.getData(c)}},Wd="preload",Xd="useInterimTilesOnError";class BaseTileLayer extends Xn{constructor(c){c=c||{};const u=Object.assign({},c),d=c.cacheSize;delete c.cacheSize,delete u.preload,delete u.useInterimTilesOnError,super(u),this.on,this.once,this.un,this.cacheSize_=d,this.setPreload(void 0!==c.preload?c.preload:0),this.setUseInterimTilesOnError(void 0===c.useInterimTilesOnError||c.useInterimTilesOnError)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(Wd)}setPreload(c){this.set(Wd,c)}getUseInterimTilesOnError(){return this.get(Xd)}setUseInterimTilesOnError(c){this.set(Xd,c)}getData(c){return super.getData(c)}}function getCacheKey(c,u,d,p){return`${c},${getKeyZXY(u,d,p)}`}function addTileToLookup(c,u,d){if(!(d in c))return c[d]=new Set([u]),!0;const p=c[d],g=p.has(u);return g||p.add(u),!g}function removeTileFromLookup(c,u,d){const p=c[d];return!!p&&p.delete(u)}function getRenderExtent(c,u){const d=c.layerStatesArray[c.layerIndex];d.extent&&(u=getIntersection(u,fromUserExtent(d.extent,c.viewState.projection)));const p=d.layer.getRenderSource();if(!p.getWrapX()){const d=p.getTileGridForProjection(c.viewState.projection).getExtent();d&&(u=getIntersection(u,d))}return u}class CanvasTileLayerRenderer extends CanvasLayerRenderer{constructor(c,u){super(c),u=u||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.renderedSourceKey_,this.renderedSourceRevision_,this.tempExtent=[1/0,1/0,-1/0,-1/0],this.tempTileRange_=new aa(0,0,0,0),this.tempTileCoord_=createOrUpdate$1(0,0,0);const d=void 0!==u.cacheSize?u.cacheSize:512;this.tileCache_=new LRUCache(d),this.maxStaleKeys=.5*d}getTileCache(){return this.tileCache_}getOrCreateTile(c,u,d,p){const g=this.tileCache_,f=this.getLayer().getSource(),_=getCacheKey(f.getKey(),c,u,d);let y;if(g.containsKey(_))y=g.get(_);else{if(y=f.getTile(c,u,d,p.pixelRatio,p.viewState.projection),!y)return null;g.set(_,y)}return y}getTile(c,u,d,p){const g=this.getOrCreateTile(c,u,d,p);return g||null}getData(c){const u=this.frameState;if(!u)return null;const d=this.getLayer(),p=apply(u.pixelToCoordinateTransform,c.slice()),g=d.getExtent();if(g&&!containsCoordinate(g,p))return null;const f=u.viewState,_=d.getRenderSource(),y=_.getTileGridForProjection(f.projection),x=_.getTilePixelRatio(u.pixelRatio);for(let c=y.getZForResolution(f.resolution);c>=y.getMinZoom();--c){const d=y.getTileCoordForCoordAndZ(p,c),g=this.getTile(c,d[1],d[2],u);if(!g||g.getState()!==po)continue;const v=y.getOrigin(c),C=toSize(y.getTileSize(c)),M=y.getResolution(c);let T;if(g instanceof _o)T=g.getImage();else{if(!(g instanceof DataTile))continue;if(T=asImageLike(g.getData()),!T)continue}const L=Math.floor(x*((p[0]-v[0])/M-d[1]*C[0])),A=Math.floor(x*((v[1]-p[1])/M-d[2]*C[1])),I=Math.round(x*_.getGutterForProjection(f.projection));return this.getImageData(T,L+I,A+I)}return null}prepareFrame(c){const u=this.getLayer().getSource();if(!u)return!1;const d=u.getRevision();return this.renderedRevision_?this.renderedRevision_!==d&&(this.renderedRevision_=d,this.renderedSourceKey_===u.getKey()&&this.tileCache_.clear()):this.renderedRevision_=d,!0}enqueueTiles(c,u,d,p,g){const f=c.viewState,_=this.getLayer(),y=_.getRenderSource(),x=y.getTileGridForProjection(f.projection),v=getUid(y);v in c.wantedTiles||(c.wantedTiles[v]={});const C=c.wantedTiles[v],M=_.getMapInternal(),T=Math.max(d-g,x.getMinZoom(),x.getZForResolution(Math.min(_.getMaxResolution(),M?M.getView().getResolutionForZoom(Math.max(_.getMinZoom(),0)):x.getResolution(0)),y.zDirection));for(let g=d;g>=T;--g){const d=x.getTileRangeForExtentAndZ(u,g,this.tempTileRange_),f=x.getResolution(g);for(let u=d.minX;u<=d.maxX;++u)for(let _=d.minY;_<=d.maxY;++_){const d=this.getTile(g,u,_,c);if(!d)continue;if(!addTileToLookup(p,d,g))continue;const y=d.getKey();if(C[y]=!0,d.getState()===co&&!c.tileQueue.isKeyQueued(y)){const p=createOrUpdate$1(g,u,_,this.tempTileCoord_);c.tileQueue.enqueue([d,v,x.getTileCoordCenter(p),f])}}}}findStaleTile_(c,u){const d=this.tileCache_,p=c[0],g=c[1],f=c[2],_=this.getStaleKeys();for(let c=0;c<_.length;++c){const y=getCacheKey(_[c],p,g,f);if(d.containsKey(y)){const c=d.get(y);if(c.getState()===po)return c.endTransition(getUid(this)),addTileToLookup(u,c,p),!0}}return!1}findAltTiles_(c,u,d,p){const g=c.getTileRangeForTileCoordAndZ(u,d,this.tempTileRange_);if(!g)return!1;let f=!0;const _=this.tileCache_,y=this.getLayer().getRenderSource().getKey();for(let c=g.minX;c<=g.maxX;++c)for(let u=g.minY;u<=g.maxY;++u){const g=getCacheKey(y,d,c,u);let x=!1;if(_.containsKey(g)){const c=_.get(g);c.getState()===po&&(addTileToLookup(p,c,d),x=!0)}x||(f=!1)}return f}renderFrame(c,u){this.renderComplete=!0;const d=c.layerStatesArray[c.layerIndex],p=c.viewState,g=p.projection,f=p.resolution,_=p.center,y=c.pixelRatio,x=this.getLayer(),v=x.getSource(),C=v.getRevision(),M=v.getTileGridForProjection(g),T=M.getZForResolution(f,v.zDirection),L=M.getResolution(T),A=v.getKey();this.renderedSourceKey_?this.renderedSourceKey_!==A&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=A):this.renderedSourceKey_=A;let I=c.extent;const k=v.getTilePixelRatio(y);this.prepareContainer(c,u);const O=this.context.canvas.width,N=this.context.canvas.height,G=d.extent&&fromUserExtent(d.extent,g);G&&(I=getIntersection(I,fromUserExtent(d.extent,g)));const j=L*O/2/k,B=L*N/2/k,V=[_[0]-j,_[1]-B,_[0]+j,_[1]+B],q={};this.renderedTiles.length=0;const Z=x.getPreload();if(c.nextExtent){const u=M.getZForResolution(p.nextResolution,v.zDirection),d=getRenderExtent(c,c.nextExtent);this.enqueueTiles(c,d,u,q,Z)}const K=getRenderExtent(c,I);if(this.enqueueTiles(c,K,T,q,0),Z>0&&setTimeout((()=>{this.enqueueTiles(c,K,T-1,q,Z-1)}),0),!(T in q))return this.container;const J=getUid(this),ct=c.time;for(const u of q[T]){const d=u.getState();if((u instanceof ReprojTile||u instanceof ReprojDataTile)&&d===mo)continue;const p=u.tileCoord;if(d===po){if(1===u.getAlpha(J,ct)){u.endTransition(J);continue}}this.renderComplete=!1;if(this.findStaleTile_(p,q)){removeTileFromLookup(q,u,T),c.animate=!0;continue}if(this.findAltTiles_(M,p,T+1,q))continue;const g=M.getMinZoom();for(let c=T-1;c>=g;--c){if(this.findAltTiles_(M,p,c,q))break}}const ft=L/f*y/k,pe=this.getRenderContext(c);compose(this.tempTransform,O/2,N/2,ft,ft,0,-O/2,-N/2),d.extent&&this.clipUnrotated(pe,c,G),v.getInterpolate()||(pe.imageSmoothingEnabled=!1),this.preRender(pe,c);const me=Object.keys(q).map(Number);let fe;me.sort(ascending);const _e=[],xe=[];for(let u=me.length-1;u>=0;--u){const d=me[u],p=v.getTilePixelSize(d,y,g),f=M.getResolution(d)/L,_=p[0]*f*ft,x=p[1]*f*ft,C=M.getTileCoordForCoordAndZ(getTopLeft(V),d),T=M.getTileCoordExtent(C),A=apply(this.tempTransform,[k*(T[0]-V[0])/L,k*(V[3]-T[3])/L]),I=k*v.getGutterForProjection(g);for(const u of q[d]){if(u.getState()!==po)continue;const p=u.tileCoord,g=C[1]-p[1],f=Math.round(A[0]-(g-1)*_),y=C[2]-p[2],M=Math.round(A[1]-(y-1)*x),T=Math.round(A[0]-g*_),L=Math.round(A[1]-y*x),k=f-T,O=M-L,N=1===me.length;let G=!1;fe=[T,L,T+k,L,T+k,L+O,T,L+O];for(let c=0,u=_e.length;c<u;++c)if(!N&&d<xe[c]){const u=_e[c];intersects$1([T,L,T+k,L+O],[u[0],u[3],u[4],u[7]])&&(G||(pe.save(),G=!0),pe.beginPath(),pe.moveTo(fe[0],fe[1]),pe.lineTo(fe[2],fe[3]),pe.lineTo(fe[4],fe[5]),pe.lineTo(fe[6],fe[7]),pe.moveTo(u[6],u[7]),pe.lineTo(u[4],u[5]),pe.lineTo(u[2],u[3]),pe.lineTo(u[0],u[1]),pe.clip())}_e.push(fe),xe.push(d),this.drawTile(u,c,T,L,k,O,I,N),G&&pe.restore(),this.renderedTiles.unshift(u),this.updateUsedTiles(c.usedTiles,v,u)}}this.renderedRevision=C,this.renderedResolution=L,this.extentChanged=!this.renderedExtent_||!equals$1(this.renderedExtent_,V),this.renderedExtent_=V,this.renderedPixelRatio=y,this.renderedProjection=g,this.postRender(this.context,c),d.extent&&pe.restore(),pe.imageSmoothingEnabled=!0;return c.postRenderFunctions.push(((c,u)=>{const d=getUid(v),p=u.wantedTiles[d],g=p?Object.keys(p).length:0;this.updateCacheSize(g),this.tileCache_.expireCache()})),this.container}updateCacheSize(c){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,2*c)}drawTile(c,u,d,p,g,f,_,y){let x;if(c instanceof DataTile){if(x=asImageLike(c.getData()),!x)throw new Error("Rendering array data is not yet supported")}else x=this.getTileImage(c);if(!x)return;const v=this.getRenderContext(u),C=getUid(this),M=u.layerStatesArray[u.layerIndex],T=M.opacity*(y?c.getAlpha(C,u.time):1),L=T!==v.globalAlpha;L&&(v.save(),v.globalAlpha=T),v.drawImage(x,_,_,x.width-2*_,x.height-2*_,d,p,g,f),L&&v.restore(),T!==M.opacity?u.animate=!0:y&&c.endTransition(C)}getImage(){const c=this.context;return c?c.canvas:null}getTileImage(c){return c.getImage()}updateUsedTiles(c,u,d){const p=getUid(u);p in c||(c[p]={}),c[p][d.getKey()]=!0}}class TileLayer extends BaseTileLayer{constructor(c){super(c)}createRenderer(){return new CanvasTileLayerRenderer(this,{cacheSize:this.getCacheSize()})}}function fromResolutionLike(c){return Array.isArray(c)?Math.min(...c):c}class CanvasVectorImageLayerRenderer extends CanvasImageLayerRenderer{constructor(c){super(c),this.vectorRenderer_=new CanvasVectorLayerRenderer(c),this.layerImageRatio_=c.getImageRatio(),this.coordinateToVectorPixelTransform_=[1,0,0,1,0,0],this.renderedPixelToCoordinateTransform_=null}disposeInternal(){this.vectorRenderer_.dispose(),super.disposeInternal()}getFeatures(c){if(!this.vectorRenderer_)return Promise.resolve([]);const u=apply(this.coordinateToVectorPixelTransform_,apply(this.renderedPixelToCoordinateTransform_,c.slice()));return this.vectorRenderer_.getFeatures(u)}handleFontsChanged(){this.vectorRenderer_.handleFontsChanged()}prepareFrame(c){const u=c.pixelRatio,d=c.viewState,p=d.resolution,g=c.viewHints,f=this.vectorRenderer_;let _=c.extent;1!==this.layerImageRatio_&&(_=_.slice(0),scaleFromCenter(_,this.layerImageRatio_));const y=getWidth(_)/p,x=getHeight(_)/p;if(!g[jn]&&!g[zn]&&!isEmpty(_)){f.useContainer(null,null);const g=f.context,v=c.layerStatesArray[c.layerIndex],C=Object.assign({},v,{opacity:1}),M=Object.assign({},c,{extent:_,size:[y,x],viewState:Object.assign({},c.viewState,{rotation:0}),layerStatesArray:[C],layerIndex:0,declutter:null}),T=this.getLayer().getDeclutter();T&&(M.declutter={[T]:new Vn(9)});let L=!0;const A=new ho(_,p,u,g.canvas,(function(c){f.prepareFrame(M)&&f.replayGroupChanged&&(f.clipping=!1,f.renderFrame(M,null)&&(f.renderDeclutter(M),f.renderDeferred(M),L=!1),c())}));A.addEventListener(mi,(()=>{if(A.getState()!==Er.LOADED)return;this.image=L?null:A;const c=A.getPixelRatio(),p=fromResolutionLike(A.getResolution())*u/c;this.renderedResolution=p,this.coordinateToVectorPixelTransform_=compose(this.coordinateToVectorPixelTransform_,y/2,x/2,1/p,-1/p,0,-d.center[0],-d.center[1])})),A.load()}return this.image&&(this.renderedPixelToCoordinateTransform_=c.pixelToCoordinateTransform.slice()),!!this.image}preRender(){}postRender(){}renderDeclutter(){}forEachFeatureAtCoordinate(c,u,d,p,g){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(c,u,d,p,g):super.forEachFeatureAtCoordinate(c,u,d,p,g)}}var Vd=class VectorImageLayer extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.imageRatio,super(u),this.imageRatio_=void 0!==c.imageRatio?c.imageRatio:1}getImageRatio(){return this.imageRatio_}createRenderer(){return new CanvasVectorImageLayerRenderer(this)}};const qd={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"],vector:[]},Yd={hybrid:["Image","Text","Default"],vector:["Polygon","Circle","LineString","Image","Text","Default"]};class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer{constructor(c,u){super(c,u),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.renderedLayerRevision_,this.renderedPixelToCoordinateTransform_=null,this.renderedRotation_,this.renderedOpacity_=1,this.tmpTransform_=[1,0,0,1,0,0],this.tileClipContexts_=null}drawTile(c,u,d,p,g,f,_,y){this.updateExecutorGroup_(c,u.pixelRatio,u.viewState.projection),this.tileImageNeedsRender_(c)&&this.renderTileImage_(c,u),super.drawTile(c,u,d,p,g,f,_,y)}getTile(c,u,d,p){const g=this.getOrCreateTile(c,u,d,p);if(!g)return null;const f=p.viewState.resolution,_=p.viewHints;return!!(_[jn]||_[zn])&&g.wantedResolution||(g.wantedResolution=f),g}prepareFrame(c){const u=this.getLayer().getRevision();return this.renderedLayerRevision_!==u&&(this.renderedLayerRevision_=u,this.renderedTiles.length=0),super.prepareFrame(c)}updateExecutorGroup_(c,u,d){const p=this.getLayer(),g=p.getRevision(),f=p.getRenderOrder()||null,_=c.wantedResolution,y=c.getReplayState(p);if(!y.dirty&&y.renderedResolution===_&&y.renderedRevision==g&&y.renderedRenderOrder==f)return;const x=p.getSource(),v=!!p.getDeclutter(),C=x.getTileGrid(),M=x.getTileGridForProjection(d).getTileCoordExtent(c.wrappedTileCoord),T=x.getSourceTiles(u,d,c),L=getUid(p);delete c.hitDetectionImageData[L],c.executorGroups[L]=[],y.dirty=!1;for(let d=0,g=T.length;d<g;++d){const g=T[d];if(g.getState()!=po)continue;const A=g.tileCoord,I=C.getTileCoordExtent(A),k=getIntersection(M,I),O=buffer(k,p.getRenderBuffer()*_,this.tempExtent),N=equals$1(I,k)?null:O,G=new BuilderGroup(0,k,_,u),j=getSquaredTolerance(_,u),render=function(c,u){let d;const g=c.getStyleFunction()||p.getStyleFunction();if(g&&(d=g(c,_)),d){const p=this.renderFeature(c,j,d,G,v,u);y.dirty=y.dirty||p}},B=g.getFeatures();f&&f!==y.renderedRenderOrder&&B.sort(f);for(let c=0,u=B.length;c<u;++c){const u=B[c];N&&!intersects$1(N,u.getGeometry().getExtent())||render.call(this,u,c)}const V=G.finish(),q="vector"!==p.getRenderMode()&&v&&1===T.length?null:k,Z=new ExecutorGroup(q,_,u,x.getOverlaps(),V,p.getRenderBuffer(),!0);c.executorGroups[L].push(Z)}y.renderedRevision=g,y.renderedRenderOrder=f,y.renderedResolution=_}forEachFeatureAtCoordinate(c,u,d,p,g){const f=u.viewState.resolution,_=u.viewState.rotation;d=null==d?0:d;const y=this.getLayer(),x=y.getSource().getTileGridForProjection(u.viewState.projection),v=boundingExtent([c]);buffer(v,f*d,v);const C={},featureCallback=function(c,u,d){let f=c.getId();void 0===f&&(f=getUid(c));const _=C[f];if(_){if(!0!==_&&d<_.distanceSq){if(0===d)return C[f]=!0,g.splice(g.lastIndexOf(_),1),p(c,y,u);_.geometry=u,_.distanceSq=d}}else{if(0===d)return C[f]=!0,p(c,y,u);g.push(C[f]={feature:c,layer:y,geometry:u,distanceSq:d,callback:p})}},M=this.renderedTiles;let T;for(let p=0,g=M.length;!T&&p<g;++p){const g=M[p];if(!intersects$1(x.getTileCoordExtent(g.wrappedTileCoord),v))continue;const C=getUid(y),L=[g.executorGroups[C]],A=y.getDeclutter();L.some((p=>{const g=A?u.declutter[A].all().map((c=>c.value)):null;for(let u=0,y=p.length;u<y;++u){const y=p[u];if(T=y.forEachFeatureAtCoordinate(c,f,_,d,featureCallback,g),T)return!0}}))}return T}getFeatures(c){return new Promise(((u,d)=>{const p=this.getLayer(),g=getUid(p),f=p.getSource(),_=this.renderedProjection,y=_.getExtent(),x=this.renderedResolution,v=f.getTileGridForProjection(_),C=apply(this.renderedPixelToCoordinateTransform_,c.slice()),M=v.getTileCoordForCoordAndResolution(C,x);let T;for(let c=0,u=this.renderedTiles.length;c<u;++c)if(M.toString()===this.renderedTiles[c].tileCoord.toString()){if(T=this.renderedTiles[c],T.getState()===po){const c=v.getTileCoordExtent(T.tileCoord);f.getWrapX()&&_.canWrapX()&&!containsExtent(y,c)&&wrapX$1(C,_);break}T=void 0}if(!T||T.loadingSourceTiles>0)return void u([]);const L=getTopLeft(v.getTileCoordExtent(T.wrappedTileCoord)),A=[(C[0]-L[0])/x,(L[1]-C[1])/x],I=T.getSourceTiles().reduce((function(c,u){return c.concat(u.getFeatures())}),[]);let k=T.hitDetectionImageData[g];if(!k){const c=toSize(v.getTileSize(v.getZForResolution(x,f.zDirection))),u=this.renderedRotation_;k=createHitDetectionImageData(c,[this.getRenderTransform(v.getTileCoordCenter(T.wrappedTileCoord),x,0,js,c[0]*js,c[1]*js,0)],I,p.getStyleFunction(),v.getTileCoordExtent(T.wrappedTileCoord),T.getReplayState(p).renderedResolution,u),T.hitDetectionImageData[g]=k}u(hitDetect(A,I,k))}))}getFeaturesInExtent(c){const u=[],d=this.getTileCache();if(0===d.getCount())return u;const p=this.getLayer().getSource().tileGrid,g=p.getZForResolution(this.renderedResolution);return d.forEach((d=>{if(d.tileCoord[0]!==g||d.getState()!==po)return;const f=d.getSourceTiles();for(let d=0,g=f.length;d<g;++d){const g=f[d],_=g.tileCoord;if(intersects$1(c,p.getTileCoordExtent(_))){const d=g.getFeatures();if(d)for(let p=0,g=d.length;p<g;++p){const g=d[p],f=g.getGeometry();intersects$1(c,f.getExtent())&&u.push(g)}}}})),u}handleFontsChanged(){const c=this.getLayer();c.getVisible()&&void 0!==this.renderedLayerRevision_&&c.changed()}handleStyleImageChange_(c){this.renderIfReadyAndVisible()}renderDeclutter(c,u){const d=this.context,p=d.globalAlpha;d.globalAlpha=u.opacity;const g=c.viewHints,f=!(g[jn]||g[zn]),_=this.renderedTiles;for(let u=0,d=_.length;u<d;++u){const d=_[u],p=d.executorGroups[getUid(this.getLayer())],g=this.getLayer().getDeclutter();if(p)for(let u=p.length-1;u>=0;--u)p[u].execute(this.context,[this.context.canvas.width,this.context.canvas.height],this.getTileRenderTransform(d,c),c.viewState.rotation,f,Os,g?c.declutter[g]:void 0)}d.globalAlpha=p}renderDeferredInternal(c){const u=this.renderedTiles.reduce(((c,u,d)=>(u.executorGroups[getUid(this.getLayer())].forEach((u=>c.push({executorGroup:u,index:d}))),c)),[]),d=u.map((({executorGroup:c})=>c.getDeferredZIndexContexts())),p={};for(let c=0,d=u.length;c<d;++c){const d=u[c].executorGroup.getDeferredZIndexContexts();for(const c in d)p[c]=!0}Object.keys(p).sort(ascending).map(Number).forEach((c=>{d.forEach(((d,p)=>{d[c]&&(d[c].forEach((c=>{const{executorGroup:d,index:g}=u[p],f=d.getRenderedContext(),_=f.globalAlpha;f.globalAlpha=this.renderedOpacity_;const y=this.tileClipContexts_[g];y&&y.draw(f),c.draw(f),y&&f.restore(),f.globalAlpha=_,c.clear()})),d[c].length=0)}))}))}getTileRenderTransform(c,u){const d=u.pixelRatio,p=u.viewState,g=p.center,f=p.resolution,_=p.rotation,y=u.size,x=Math.round(y[0]*d),v=Math.round(y[1]*d),C=this.getLayer().getSource().getTileGridForProjection(u.viewState.projection),M=c.tileCoord,T=C.getTileCoordExtent(c.wrappedTileCoord),L=C.getTileCoordExtent(M,this.tempExtent)[0]-T[0];return multiply(scale$3(this.inversePixelTransform.slice(),1/d,1/d),this.getRenderTransform(g,f,_,d,x,v,L))}postRender(c,u){const d=u.viewHints,p=!(d[jn]||d[zn]);this.renderedPixelToCoordinateTransform_=u.pixelToCoordinateTransform.slice(),this.renderedRotation_=u.viewState.rotation,this.renderedOpacity_=u.layerStatesArray[u.layerIndex].opacity;const g=this.getLayer(),f=g.getRenderMode(),_=c.globalAlpha;c.globalAlpha=this.renderedOpacity_;const y=g.getDeclutter(),x=y?Yd[f].filter((c=>!Os.includes(c))):Yd[f],v=u.viewState,C=v.rotation,M=g.getSource(),T=M.getTileGridForProjection(v.projection).getZForResolution(v.resolution,M.zDirection),L=this.renderedTiles,A=[],I=[],k=[];let O=!0;for(let d=L.length-1;d>=0;--d){const f=L[d];O=O&&!f.getReplayState(g).dirty;const _=f.executorGroups[getUid(g)].filter((c=>c.hasExecutors(x)));if(0===_.length)continue;const v=this.getTileRenderTransform(f,u),M=f.tileCoord[0];let N=!1;const G=_[0].getClipCoords(v);let j,B=c;if(G){j=new ZIndexContext,B=j.getContext();for(let c=0,u=A.length;c<u;++c)if(T!==M&&M<I[c]){const u=A[c];intersects$1([G[0],G[3],G[4],G[7]],[u[0],u[3],u[4],u[7]])&&(N||(B.save(),N=!0),B.beginPath(),B.moveTo(G[0],G[1]),B.lineTo(G[2],G[3]),B.lineTo(G[4],G[5]),B.lineTo(G[6],G[7]),B.moveTo(u[6],u[7]),B.lineTo(u[4],u[5]),B.lineTo(u[2],u[3]),B.lineTo(u[0],u[1]),B.clip())}A.push(G),I.push(M)}for(let d=0,g=_.length;d<g;++d){_[d].execute(c,[c.canvas.width,c.canvas.height],v,C,p,x,u.declutter?.[y])}N&&(B===c?B.restore():k[d]=j)}c.globalAlpha=_,this.ready=O,this.tileClipContexts_=k,u.declutter||this.renderDeferredInternal(u),super.postRender(c,u)}renderFeature(c,u,d,p,g,f){if(!d)return!1;let _=!1;if(Array.isArray(d))for(let y=0,x=d.length;y<x;++y)_=renderFeature(p,c,d[y],u,this.boundHandleStyleImageChange_,void 0,g,f)||_;else _=renderFeature(p,c,d,u,this.boundHandleStyleImageChange_,void 0,g,f);return _}tileImageNeedsRender_(c){const u=this.getLayer();if("vector"===u.getRenderMode())return!1;const d=c.getReplayState(u),p=u.getRevision(),g=c.wantedResolution;return d.renderedTileResolution!==g||d.renderedTileRevision!==p}renderTileImage_(c,u){const d=this.getLayer(),p=c.getReplayState(d),g=d.getRevision(),f=c.executorGroups[getUid(d)];p.renderedTileRevision=g;const _=c.wrappedTileCoord,y=_[0],x=d.getSource();let v=u.pixelRatio;const C=u.viewState.projection,M=x.getTileGridForProjection(C),T=M.getResolution(c.tileCoord[0]),L=u.pixelRatio/c.wantedResolution*T,A=M.getResolution(y),I=c.getContext();v=Math.round(Math.max(v,L/v));const k=x.getTilePixelSize(y,v,C);I.canvas.width=k[0],I.canvas.height=k[1];const O=v/L;if(1!==O){const c=reset(this.tmpTransform_);scale$3(c,O,O),I.setTransform.apply(I,c)}const N=M.getTileCoordExtent(_,this.tempExtent),G=L/A,j=reset(this.tmpTransform_);scale$3(j,G,-G),translate$1(j,-N[0],-N[3]);for(let c=0,u=f.length;c<u;++c){f[c].execute(I,[I.canvas.width*O,I.canvas.height*O],j,0,!0,qd[d.getRenderMode()],null)}p.renderedTileResolution=c.wantedResolution}}var Zd=class VectorTileLayer extends BaseVectorLayer{constructor(c){c=c||{};const u=Object.assign({},c);delete u.preload;const d=void 0===c.cacheSize?0:c.cacheSize;delete c.cacheSize,delete u.useInterimTilesOnError,super(u),this.on,this.once,this.un,this.cacheSize_=d;const p=c.renderMode||"hybrid";assert("hybrid"==p||"vector"==p,"`renderMode` must be `'hybrid'` or `'vector'`"),this.renderMode_=p,this.setPreload(c.preload?c.preload:0),this.setUseInterimTilesOnError(void 0===c.useInterimTilesOnError||c.useInterimTilesOnError),this.getBackground,this.setBackground}createRenderer(){return new CanvasVectorTileLayerRenderer(this,{cacheSize:this.cacheSize_})}getFeatures(c){return super.getFeatures(c)}getFeaturesInExtent(c){return this.getRenderer().getFeaturesInExtent(c)}getRenderMode(){return this.renderMode_}getPreload(){return this.get(Wd)}getUseInterimTilesOnError(){return this.get(Xd)}setPreload(c){this.set(Wd,c)}setUseInterimTilesOnError(c){this.set(Xd,c)}};function expressionToGlsl(c,u,d){return function buildExpression(c,u,d,p){return compile(parse$2(c,u,d),u,p)}(u,d,newParsingContext(),c)}function packColor(c){const u=asArray(c);return[256*u[0]+u[1],256*u[2]+Math.round(255*u[3])]}function getGlslSizeFromType(c){return c===Jn||c===ts?2:c===Qn?4:1}function getGlslTypeFromType(c){const u=getGlslSizeFromType(c);return u>1?`vec${u}`:"float"}function computeHash(c){return(JSON.stringify(c).split("").reduce(((c,u)=>(c<<5)-c+u.charCodeAt(0)),0)>>>0).toString()}function parseCommonSymbolProperties(c,u,d,p){if(`${p}radius`in c&&"icon-"!==p){let g=expressionToGlsl(d,c[`${p}radius`],Kn);if(`${p}radius2`in c){g=`max(${g}, ${expressionToGlsl(d,c[`${p}radius2`],Kn)})`}`${p}stroke-width`in c&&(g=`(${g} + ${expressionToGlsl(d,c[`${p}stroke-width`],Kn)} * 0.5)`),u.setSymbolSizeExpression(`vec2(${g} * 2. + 0.5)`)}if(`${p}scale`in c){const g=expressionToGlsl(d,c[`${p}scale`],ts);u.setSymbolSizeExpression(`${u.getSymbolSizeExpression()} * ${g}`)}`${p}displacement`in c&&u.setSymbolOffsetExpression(expressionToGlsl(d,c[`${p}displacement`],Qn)),`${p}rotation`in c&&u.setSymbolRotationExpression(expressionToGlsl(d,c[`${p}rotation`],Kn)),`${p}rotate-with-view`in c&&u.setSymbolRotateWithView(!!c[`${p}rotate-with-view`])}function getColorFromDistanceField(c,u,d,p,g){let f="vec4(0.)";if(null!==u&&(f=u),null!==d&&null!==p){f=`mix(${d}, ${f}, ${`smoothstep(-${p} + 0.63, -${p} - 0.58, ${c})`})`}let _=`${f} * vec4(1.0, 1.0, 1.0, ${`(1.0 - smoothstep(-0.63, 0.58, ${c}))`})`;return null!==g&&(_=`${_} * vec4(1.0, 1.0, 1.0, ${g})`),_}function parseImageProperties(c,u,d,p,g){const f=new Image;f.crossOrigin=void 0===c[`${p}cross-origin`]?"anonymous":c[`${p}cross-origin`],f.src=c[`${p}src`],d[`u_texture${g}_size`]=()=>f.complete?[f.width,f.height]:[0,0],u.addUniform(`vec2 u_texture${g}_size`);const _=`u_texture${g}_size`;return d[`u_texture${g}`]=f,u.addUniform(`sampler2D u_texture${g}`),_}function parseImageOffsetProperties(c,u,d,p,g){let f=expressionToGlsl(d,c[`${u}offset`],Qn);if(`${u}offset-origin`in c)switch(c[`${u}offset-origin`]){case"top-right":f=`vec2(${p}.x, 0.) + ${g} * vec2(-1., 0.) + ${f} * vec2(-1., 1.)`;break;case"bottom-left":f=`vec2(0., ${p}.y) + ${g} * vec2(0., -1.) + ${f} * vec2(1., -1.)`;break;case"bottom-right":f=`${p} - ${g} - ${f}`}return f}function parseLiteralStyle(c){const u={inFragmentShader:!1,properties:{},variables:{},functions:{},style:c},d={inFragmentShader:!0,variables:u.variables,properties:{},functions:{},style:c},p=new ShaderBuilder,g={};if("icon-src"in c?function parseIconProperties(c,u,d,p,g){let f="vec4(1.0)";"icon-color"in c&&(f=expressionToGlsl(g,c["icon-color"],Jn)),"icon-opacity"in c&&(f=`${f} * vec4(1.0, 1.0, 1.0, ${expressionToGlsl(g,c["icon-opacity"],Kn)})`);const _=computeHash(c["icon-src"]),y=parseImageProperties(c,u,d,"icon-",_);if(u.setSymbolColorExpression(`${f} * texture2D(u_texture${_}, v_texCoord)`).setSymbolSizeExpression(y),"icon-width"in c&&"icon-height"in c&&u.setSymbolSizeExpression(`vec2(${expressionToGlsl(p,c["icon-width"],Kn)}, ${expressionToGlsl(p,c["icon-height"],Kn)})`),"icon-offset"in c&&"icon-size"in c){const d=expressionToGlsl(p,c["icon-size"],Qn),g=u.getSymbolSizeExpression();u.setSymbolSizeExpression(d);const f=parseImageOffsetProperties(c,"icon-",p,"v_quadSizePx",d);u.setTextureCoordinateExpression(`(vec4((${f}).xyxy) + vec4(0., 0., ${d})) / (${g}).xyxy`)}if(parseCommonSymbolProperties(c,u,p,"icon-"),"icon-anchor"in c){const d=expressionToGlsl(p,c["icon-anchor"],Qn);let g,f="1.0";"icon-scale"in c&&(f=expressionToGlsl(p,c["icon-scale"],ts)),g="pixels"===c["icon-anchor-x-units"]&&"pixels"===c["icon-anchor-y-units"]?`${d} * ${f}`:"pixels"===c["icon-anchor-x-units"]?`${d} * vec2(vec2(${f}).x, v_quadSizePx.y)`:"pixels"===c["icon-anchor-y-units"]?`${d} * vec2(v_quadSizePx.x, vec2(${f}).x)`:`${d} * v_quadSizePx`;let _=`v_quadSizePx * vec2(0.5, -0.5) + ${g} * vec2(-1., 1.)`;if("icon-anchor-origin"in c)switch(c["icon-anchor-origin"]){case"top-right":_=`v_quadSizePx * -0.5 + ${g}`;break;case"bottom-left":_=`v_quadSizePx * 0.5 - ${g}`;break;case"bottom-right":_=`v_quadSizePx * vec2(-0.5, 0.5) + ${g} * vec2(1., -1.)`}u.setSymbolOffsetExpression(`${u.getSymbolOffsetExpression()} + ${_}`)}}(c,p,g,u,d):"shape-points"in c?function parseShapeProperties(c,u,d,p,g){g.functions.round="float round(float v) {\n  return sign(v) * floor(abs(v) + 0.5);\n}",g.functions.starDistanceField="float starDistanceField(vec2 point, float numPoints, float radius, float radius2, float angle) {\n  float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n  float c = cos(startAngle);\n  float s = sin(startAngle);\n  vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n  float alpha = TWO_PI / numPoints; // the angle of one sector\n  float beta = atan(pointRotated.y, pointRotated.x);\n  float gamma = round(beta / alpha) * alpha; // angle in sector\n  c = cos(-gamma);\n  s = sin(-gamma);\n  vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n  vec2 tipToPoint = inSector + vec2(-radius, 0.);\n  vec2 edgeNormal = vec2(radius2 * sin(alpha * 0.5), -radius2 * cos(alpha * 0.5) + radius);\n  return dot(normalize(edgeNormal), tipToPoint);\n}",g.functions.regularDistanceField="float regularDistanceField(vec2 point, float numPoints, float radius, float angle) {\n  float startAngle = -PI * 0.5 + angle; // tip starts upwards and rotates clockwise with angle\n  float c = cos(startAngle);\n  float s = sin(startAngle);\n  vec2 pointRotated = vec2(c * point.x - s * point.y, s * point.x + c * point.y);\n  float alpha = TWO_PI / numPoints; // the angle of one sector\n  float radiusIn = radius * cos(PI / numPoints);\n  float beta = atan(pointRotated.y, pointRotated.x);\n  float gamma = round((beta - alpha * 0.5) / alpha) * alpha + alpha * 0.5; // angle in sector from mid\n  c = cos(-gamma);\n  s = sin(-gamma);\n  vec2 inSector = vec2(c * pointRotated.x - s * pointRotated.y, abs(s * pointRotated.x + c * pointRotated.y));\n  return inSector.x - radiusIn;\n}",parseCommonSymbolProperties(c,u,p,"shape-");let f=null;"shape-opacity"in c&&(f=expressionToGlsl(g,c["shape-opacity"],Kn));let _="coordsPx";"shape-scale"in c&&(_=`coordsPx / ${expressionToGlsl(g,c["shape-scale"],ts)}`);let y=null;"shape-fill-color"in c&&(y=expressionToGlsl(g,c["shape-fill-color"],Jn));let x=null;"shape-stroke-color"in c&&(x=expressionToGlsl(g,c["shape-stroke-color"],Jn));let v=null;"shape-stroke-width"in c&&(v=expressionToGlsl(g,c["shape-stroke-width"],Kn));const C=expressionToGlsl(g,c["shape-points"],Kn);let M,T="0.";"shape-angle"in c&&(T=expressionToGlsl(g,c["shape-angle"],Kn));let L=expressionToGlsl(g,c["shape-radius"],Kn);if(null!==v&&(L=`${L} + ${v} * 0.5`),"shape-radius2"in c){let u=expressionToGlsl(g,c["shape-radius2"],Kn);null!==v&&(u=`${u} + ${v} * 0.5`),M=`starDistanceField(${_}, ${C}, ${L}, ${u}, ${T})`}else M=`regularDistanceField(${_}, ${C}, ${L}, ${T})`;const A=getColorFromDistanceField(M,y,x,v,f);u.setSymbolColorExpression(A)}(c,p,0,u,d):"circle-radius"in c&&function parseCircleProperties(c,u,d,p,g){g.functions.circleDistanceField="float circleDistanceField(vec2 point, float radius) {\n  return length(point) - radius;\n}",parseCommonSymbolProperties(c,u,p,"circle-");let f=null;"circle-opacity"in c&&(f=expressionToGlsl(g,c["circle-opacity"],Kn));let _="coordsPx";"circle-scale"in c&&(_=`coordsPx / ${expressionToGlsl(g,c["circle-scale"],ts)}`);let y=null;"circle-fill-color"in c&&(y=expressionToGlsl(g,c["circle-fill-color"],Jn));let x=null;"circle-stroke-color"in c&&(x=expressionToGlsl(g,c["circle-stroke-color"],Jn));let v=expressionToGlsl(g,c["circle-radius"],Kn),C=null;"circle-stroke-width"in c&&(C=expressionToGlsl(g,c["circle-stroke-width"],Kn),v=`(${v} + ${C} * 0.5)`);const M=getColorFromDistanceField(`circleDistanceField(${_}, ${v})`,y,x,C,f);u.setSymbolColorExpression(M)}(c,p,0,u,d),function parseStrokeProperties(c,u,d,p,g){if("stroke-color"in c&&u.setStrokeColorExpression(expressionToGlsl(g,c["stroke-color"],Jn)),"stroke-pattern-src"in c){const p=computeHash(c["stroke-pattern-src"]),f=parseImageProperties(c,u,d,"stroke-pattern-",p);let _=f,y="vec2(0.)";"stroke-pattern-offset"in c&&"stroke-pattern-size"in c&&(_=expressionToGlsl(g,c["stroke-pattern-size"],Qn),y=parseImageOffsetProperties(c,"stroke-pattern-",g,f,_));let x="0.";"stroke-pattern-spacing"in c&&(x=expressionToGlsl(g,c["stroke-pattern-spacing"],Kn)),g.functions.sampleStrokePattern="vec4 sampleStrokePattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, float spacingPx, float currentLengthPx, float currentRadiusRatio, float lineWidth) {\n  float currentLengthScaled = currentLengthPx * sampleSize.y / lineWidth;\n  float spacingScaled = spacingPx * sampleSize.y / lineWidth;\n  float uCoordPx = mod(currentLengthScaled, (sampleSize.x + spacingScaled));\n  // make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n  uCoordPx = clamp(uCoordPx, 0.5, sampleSize.x - 0.5);\n  float vCoordPx = (-currentRadiusRatio * 0.5 + 0.5) * sampleSize.y;\n  vec2 texCoord = (vec2(uCoordPx, vCoordPx) + textureOffset) / textureSize;\n  return texture2D(texture, texCoord);\n}";const v=`u_texture${p}`;let C="1.";"stroke-color"in c&&(C=u.getStrokeColorExpression()),u.setStrokeColorExpression(`${C} * sampleStrokePattern(${v}, ${f}, ${y}, ${_}, ${x}, currentLengthPx, currentRadiusRatio, v_width)`)}if("stroke-width"in c&&u.setStrokeWidthExpression(expressionToGlsl(p,c["stroke-width"],Kn)),"stroke-offset"in c&&u.setStrokeOffsetExpression(expressionToGlsl(p,c["stroke-offset"],Kn)),"stroke-line-cap"in c&&u.setStrokeCapExpression(expressionToGlsl(p,c["stroke-line-cap"],Hn)),"stroke-line-join"in c&&u.setStrokeJoinExpression(expressionToGlsl(p,c["stroke-line-join"],Hn)),"stroke-miter-limit"in c&&u.setStrokeMiterLimitExpression(expressionToGlsl(p,c["stroke-miter-limit"],Kn)),"stroke-line-dash"in c){g.functions.getSingleDashDistance=`float getSingleDashDistance(float distance, float radius, float dashOffset, float dashLength, float dashLengthTotal, float capType) {\n  float localDistance = mod(distance, dashLengthTotal);\n  float distanceSegment = abs(localDistance - dashOffset - dashLength * 0.5) - dashLength * 0.5;\n  distanceSegment = min(distanceSegment, dashLengthTotal - localDistance);\n  if (capType == ${stringToGlsl("square")}) {\n    distanceSegment -= v_width * 0.5;\n  } else if (capType == ${stringToGlsl("round")}) {\n    distanceSegment = min(distanceSegment, sqrt(distanceSegment * distanceSegment + radius * radius) - v_width * 0.5);\n  }\n  return distanceSegment;\n}`;let d=c["stroke-line-dash"].map((c=>expressionToGlsl(g,c,Kn)));d.length%2==1&&(d=[...d,...d]);let f="0.";"stroke-line-dash-offset"in c&&(f=expressionToGlsl(p,c["stroke-line-dash-offset"],Kn));const _=`dashDistanceField_${computeHash(c["stroke-line-dash"])}`,y=d.map(((c,u)=>`float dashLength${u} = ${c};`)),x=d.map(((c,u)=>`dashLength${u}`)).join(" + ");let v="0.",C=`getSingleDashDistance(distance, radius, ${v}, dashLength0, totalDashLength, capType)`;for(let c=2;c<d.length;c+=2)v=`${v} + dashLength${c-2} + dashLength${c-1}`,C=`min(${C}, getSingleDashDistance(distance, radius, ${v}, dashLength${c}, totalDashLength, capType))`;g.functions[_]=`float ${_}(float distance, float radius, float capType) {\n  ${y.join("\n  ")}\n  float totalDashLength = ${x};\n  return ${C};\n}`,u.setStrokeDistanceFieldExpression(`${_}(currentLengthPx + ${f}, currentRadiusPx, capType)`)}}(c,p,g,u,d),function parseFillProperties(c,u,d,p,g){if("fill-color"in c&&u.setFillColorExpression(expressionToGlsl(g,c["fill-color"],Jn)),"fill-pattern-src"in c){const p=computeHash(c["fill-pattern-src"]),f=parseImageProperties(c,u,d,"fill-pattern-",p);let _=f,y="vec2(0.)";"fill-pattern-offset"in c&&"fill-pattern-size"in c&&(_=expressionToGlsl(g,c["fill-pattern-size"],Qn),y=parseImageOffsetProperties(c,"fill-pattern-",g,f,_)),g.functions.sampleFillPattern="vec4 sampleFillPattern(sampler2D texture, vec2 textureSize, vec2 textureOffset, vec2 sampleSize, vec2 pxOrigin, vec2 pxPosition) {\n  float scaleRatio = pow(2., mod(u_zoom + 0.5, 1.) - 0.5);\n  vec2 pxRelativePos = pxPosition - pxOrigin;\n  // rotate the relative position from origin by the current view rotation\n  pxRelativePos = vec2(pxRelativePos.x * cos(u_rotation) - pxRelativePos.y * sin(u_rotation), pxRelativePos.x * sin(u_rotation) + pxRelativePos.y * cos(u_rotation));\n  // sample position is computed according to the sample offset & size\n  vec2 samplePos = mod(pxRelativePos / scaleRatio, sampleSize);\n  // also make sure that we're not sampling too close to the borders to avoid interpolation with outside pixels\n  samplePos = clamp(samplePos, vec2(0.5), sampleSize - vec2(0.5));\n  samplePos.y = sampleSize.y - samplePos.y; // invert y axis so that images appear upright\n  return texture2D(texture, (samplePos + textureOffset) / textureSize);\n}";const x=`u_texture${p}`;let v="1.";"fill-color"in c&&(v=u.getFillColorExpression()),u.setFillColorExpression(`${v} * sampleFillPattern(${x}, ${f}, ${y}, ${_}, pxOrigin, pxPos)`)}}(c,p,g,0,d),c.filter){const u=expressionToGlsl(d,c.filter,Zn);p.setFragmentDiscardExpression(`!${u}`)}for(const u in d.variables){const f=d.variables[u],_=uniformNameForVariable(f.name);p.addUniform(`${getGlslTypeFromType(f.type)} ${_}`),g[_]=()=>{const u=c.variables[f.name];return"number"==typeof u?u:"boolean"==typeof u?u?1:0:f.type===Jn?packColor([...asArray(u||"#eee")]):"string"==typeof u?getStringNumberEquivalent(u):u}}for(const c in d.properties){const g=d.properties[c];u.properties[c]||(u.properties[c]=g);let f=getGlslTypeFromType(g.type),_=`a_prop_${g.name}`;g.type===Jn&&(f="vec4",_=`unpackColor(${_})`,p.addVertexShaderFunction("vec4 unpackColor(vec2 packedColor) {\n  return vec4(\n    fract(floor(packedColor[0] / 256.0) / 256.0),\n    fract(packedColor[0] / 256.0),\n    fract(floor(packedColor[1] / 256.0) / 256.0),\n    fract(packedColor[1] / 256.0)\n  );\n}")),p.addVarying(`v_prop_${g.name}`,f,_)}for(const c in u.properties){const d=u.properties[c];p.addAttribute(`${getGlslTypeFromType(d.type)} a_prop_${d.name}`)}for(const c in u.functions)p.addVertexShaderFunction(u.functions[c]);for(const c in d.functions)p.addFragmentShaderFunction(d.functions[c]);const f={};for(const c in u.properties){const d=u.properties[c];let p;p=d.evaluator?d.evaluator:c=>{const u=c.get(d.name);return d.type===Jn?packColor([...asArray(u||"#eee")]):"string"==typeof u?getStringNumberEquivalent(u):"boolean"==typeof u?u?1:0:u},f[d.name]={size:getGlslSizeFromType(d.type),callback:p}}return{builder:p,attributes:f,uniforms:g}}var Kd=class WebGLPointsLayer extends Xn{constructor(c){super(Object.assign({},c)),this.parseResult_=parseLiteralStyle(c.style),this.styleVariables_=c.style.variables||{},this.hitDetectionDisabled_=!!c.disableHitDetection}createRenderer(){const c=Object.keys(this.parseResult_.attributes).map((c=>({name:c,...this.parseResult_.attributes[c]})));return new WebGLPointsLayerRenderer(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitDetectionEnabled:!this.hitDetectionDisabled_,uniforms:this.parseResult_.uniforms,attributes:c})}updateStyleVariables(c){Object.assign(this.styleVariables_,c),this.changed()}};function parseStyle(c,u){const d=`\n    attribute vec2 ${Rd};\n    uniform mat4 ${Td.TILE_TRANSFORM};\n    uniform float ${Td.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Td.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Td.TEXTURE_RESOLUTION};\n    uniform float ${Td.TEXTURE_ORIGIN_X};\n    uniform float ${Td.TEXTURE_ORIGIN_Y};\n    uniform float ${Td.DEPTH};\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n\n    void main() {\n      v_textureCoord = ${Rd};\n      v_mapCoord = vec2(\n        ${Td.TEXTURE_ORIGIN_X} + ${Td.TEXTURE_RESOLUTION} * ${Td.TEXTURE_PIXEL_WIDTH} * v_textureCoord[0],\n        ${Td.TEXTURE_ORIGIN_Y} - ${Td.TEXTURE_RESOLUTION} * ${Td.TEXTURE_PIXEL_HEIGHT} * v_textureCoord[1]\n      );\n      gl_Position = ${Td.TILE_TRANSFORM} * vec4(${Rd}, ${Td.DEPTH}, 1.0);\n    }\n  `,p={inFragmentShader:!1,variables:{},properties:{},functions:{},bandCount:0,style:{},inFragmentShader:!0,bandCount:u,style:c},g=[];if(void 0!==c.color){const u=expressionToGlsl(p,c.color,Jn);g.push(`color = ${u};`)}if(void 0!==c.contrast){const u=expressionToGlsl(p,c.contrast,Kn);g.push(`color.rgb = clamp((${u} + 1.0) * color.rgb - (${u} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==c.exposure){const u=expressionToGlsl(p,c.exposure,Kn);g.push(`color.rgb = clamp((${u} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}if(void 0!==c.saturation){const u=expressionToGlsl(p,c.saturation,Kn);g.push(`\n      float saturation = ${u} + 1.0;\n      float sr = (1.0 - saturation) * 0.2126;\n      float sg = (1.0 - saturation) * 0.7152;\n      float sb = (1.0 - saturation) * 0.0722;\n      mat3 saturationMatrix = mat3(\n        sr + saturation, sr, sr,\n        sg, sg + saturation, sg,\n        sb, sb, sb + saturation\n      );\n      color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n    `)}if(void 0!==c.gamma){const u=expressionToGlsl(p,c.gamma,Kn);g.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${u}));`)}if(void 0!==c.brightness){const u=expressionToGlsl(p,c.brightness,Kn);g.push(`color.rgb = clamp(color.rgb + ${u}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`)}const f={},_=Object.keys(p.variables).length;if(_>1&&!c.variables)throw new Error(`Missing variables in style (expected ${p.variables})`);for(let u=0;u<_;++u){const d=p.variables[Object.keys(p.variables)[u]];if(!(d.name in c.variables))throw new Error(`Missing '${d.name}' in style variables`);f[uniformNameForVariable(d.name)]=function(){let u=c.variables[d.name];return"string"==typeof u&&(u=getStringNumberEquivalent(u)),void 0!==u?u:-9999999}}const y=Object.keys(f).map((function(c){return`uniform float ${c};`})),x=Math.ceil(u/4);y.push(`uniform sampler2D ${Td.TILE_TEXTURE_ARRAY}[${x}];`),p.paletteTextures&&y.push(`uniform sampler2D ${kd}[${p.paletteTextures.length}];`);const v=Object.keys(p.functions).map((function(c){return p.functions[c]}));return{vertexShader:d,fragmentShader:`\n    #ifdef GL_FRAGMENT_PRECISION_HIGH\n    precision highp float;\n    #else\n    precision mediump float;\n    #endif\n\n    varying vec2 v_textureCoord;\n    varying vec2 v_mapCoord;\n    uniform vec4 ${Td.RENDER_EXTENT};\n    uniform float ${Td.TRANSITION_ALPHA};\n    uniform float ${Td.TEXTURE_PIXEL_WIDTH};\n    uniform float ${Td.TEXTURE_PIXEL_HEIGHT};\n    uniform float ${Td.RESOLUTION};\n    uniform float ${Td.ZOOM};\n\n    ${y.join("\n")}\n\n    ${v.join("\n")}\n\n    void main() {\n      if (\n        v_mapCoord[0] < ${Td.RENDER_EXTENT}[0] ||\n        v_mapCoord[1] < ${Td.RENDER_EXTENT}[1] ||\n        v_mapCoord[0] > ${Td.RENDER_EXTENT}[2] ||\n        v_mapCoord[1] > ${Td.RENDER_EXTENT}[3]\n      ) {\n        discard;\n      }\n\n      vec4 color = texture2D(${Td.TILE_TEXTURE_ARRAY}[0],  v_textureCoord);\n\n      ${g.join("\n")}\n\n      gl_FragColor = color;\n      gl_FragColor.rgb *= gl_FragColor.a;\n      gl_FragColor *= ${Td.TRANSITION_ALPHA};\n    }`,uniforms:f,paletteTextures:p.paletteTextures}}class WebGLTileLayer extends BaseTileLayer{constructor(c){const u=(c=c?Object.assign({},c):{}).style||{};delete c.style,super(c),this.sources_=c.sources,this.renderedSource_=null,this.renderedResolution_=NaN,this.style_=u,this.styleVariables_=this.style_.variables||{},this.addChangeListener(Dn,this.handleSourceUpdate_)}getSources(c,u){const d=this.getSource();return this.sources_?"function"==typeof this.sources_?this.sources_(c,u):this.sources_:d?[d]:[]}getRenderSource(){return this.renderedSource_||this.getSource()}getSourceState(){const c=this.getRenderSource();return c?c.getState():"undefined"}handleSourceUpdate_(){this.hasRenderer()&&this.getRenderer().clearCache(),this.getSource()&&this.setStyle(this.style_)}getSourceBandCount_(){const c=Number.MAX_SAFE_INTEGER,u=this.getSources([-c,-c,c,c],c);return u&&u.length&&"bandCount"in u[0]?u[0].bandCount:4}createRenderer(){const c=parseStyle(this.style_,this.getSourceBandCount_());return new WebGLTileLayerRenderer(this,{vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms,cacheSize:this.getCacheSize(),paletteTextures:c.paletteTextures})}renderSources(c,u){const d=this.getRenderer();let p;for(let g=0,f=u.length;g<f;++g)this.renderedSource_=u[g],d.prepareFrame(c)&&(p=d.renderFrame(c));return p}render(c,u){this.rendered=!0;const d=c.viewState,p=this.getSources(c.extent,d.resolution);let g=!0;for(let c=0,u=p.length;c<u;++c){const u=p[c],d=u.getState();if("loading"==d){const onChange=()=>{"ready"==u.getState()&&(u.removeEventListener("change",onChange),this.changed())};u.addEventListener("change",onChange)}g=g&&"ready"==d}const f=this.renderSources(c,p);if(this.getRenderer().renderComplete&&g)return this.renderedResolution_=d.resolution,f;if(this.renderedResolution_>.5*d.resolution){const u=this.getSources(c.extent,this.renderedResolution_).filter((c=>!p.includes(c)));if(u.length>0)return this.renderSources(c,u)}return f}setStyle(c){if(this.styleVariables_=c.variables||{},this.style_=c,this.hasRenderer()){const c=parseStyle(this.style_,this.getSourceBandCount_());this.getRenderer().reset({vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,uniforms:c.uniforms,paletteTextures:c.paletteTextures}),this.changed()}}updateStyleVariables(c){Object.assign(this.styleVariables_,c),this.changed()}}WebGLTileLayer.prototype.dispose;var Hd=WebGLTileLayer,Jd=Object.freeze({__proto__:null,Graticule:lo,Group:vo,Heatmap:Ud,Image:$d,Layer:Xn,Tile:TileLayer,Vector:Us,VectorImage:Vd,VectorTile:Zd,WebGLPoints:Kd,WebGLTile:Hd}),Qd="tileloadstart",tp="tileloadend",ep="tileloaderror";const ip=[0,0,0];class TileGrid{constructor(c){let u;if(this.minZoom=void 0!==c.minZoom?c.minZoom:0,this.resolutions_=c.resolutions,assert(function isSorted(c,u,d){const p=u||ascending;return c.every((function(u,d){if(0===d)return!0;const g=p(c[d-1],u);return!(g>0||0===g)}))}(this.resolutions_,((c,u)=>u-c)),"`resolutions` must be sorted in descending order"),!c.origins)for(let c=0,d=this.resolutions_.length-1;c<d;++c)if(u){if(this.resolutions_[c]/this.resolutions_[c+1]!==u){u=void 0;break}}else u=this.resolutions_[c]/this.resolutions_[c+1];this.zoomFactor_=u,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==c.origin?c.origin:null,this.origins_=null,void 0!==c.origins&&(this.origins_=c.origins,assert(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const d=c.extent;void 0===d||this.origin_||this.origins_||(this.origin_=getTopLeft(d)),assert(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,void 0!==c.tileSizes&&(this.tileSizes_=c.tileSizes,assert(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=void 0!==c.tileSize?c.tileSize:this.tileSizes_?null:$n,assert(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=void 0!==d?d:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==c.sizes?this.fullTileRanges_=c.sizes.map(((c,u)=>{const p=new aa(Math.min(0,c[0]),Math.max(c[0]-1,-1),Math.min(0,c[1]),Math.max(c[1]-1,-1));if(d){const c=this.getTileRangeForExtentAndZ(d,u);p.minX=Math.max(c.minX,p.minX),p.maxX=Math.min(c.maxX,p.maxX),p.minY=Math.max(c.minY,p.minY),p.maxY=Math.min(c.maxY,p.maxY)}return p})):d&&this.calculateTileRanges_(d)}forEachTileCoord(c,u,d){const p=this.getTileRangeForExtentAndZ(c,u);for(let c=p.minX,g=p.maxX;c<=g;++c)for(let g=p.minY,f=p.maxY;g<=f;++g)d([u,c,g])}forEachTileCoordParentTileRange(c,u,d,p){let g,f,_,y=null,x=c[0]-1;for(2===this.zoomFactor_?(f=c[1],_=c[2]):y=this.getTileCoordExtent(c,p);x>=this.minZoom;){if(void 0!==f&&void 0!==_?(f=Math.floor(f/2),_=Math.floor(_/2),g=createOrUpdate(f,f,_,_,d)):g=this.getTileRangeForExtentAndZ(y,x,d),u(x,g))return!0;--x}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(c){return this.origin_?this.origin_:this.origins_[c]}getResolution(c){return this.resolutions_[c]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(c,u,d){if(c[0]<this.maxZoom){if(2===this.zoomFactor_){const d=2*c[1],p=2*c[2];return createOrUpdate(d,d+1,p,p+1,u)}const p=this.getTileCoordExtent(c,d||this.tmpExtent_);return this.getTileRangeForExtentAndZ(p,c[0]+1,u)}return null}getTileRangeForTileCoordAndZ(c,u,d){if(u>this.maxZoom||u<this.minZoom)return null;const p=c[0],g=c[1],f=c[2];if(u===p)return createOrUpdate(g,f,g,f,d);if(this.zoomFactor_){const c=Math.pow(this.zoomFactor_,u-p),_=Math.floor(g*c),y=Math.floor(f*c);if(u<p)return createOrUpdate(_,_,y,y,d);return createOrUpdate(_,Math.floor(c*(g+1))-1,y,Math.floor(c*(f+1))-1,d)}const _=this.getTileCoordExtent(c,this.tmpExtent_);return this.getTileRangeForExtentAndZ(_,u,d)}getTileRangeForExtentAndZ(c,u,d){this.getTileCoordForXYAndZ_(c[0],c[3],u,!1,ip);const p=ip[1],g=ip[2];this.getTileCoordForXYAndZ_(c[2],c[1],u,!0,ip);return createOrUpdate(p,ip[1],g,ip[2],d)}getTileCoordCenter(c){const u=this.getOrigin(c[0]),d=this.getResolution(c[0]),p=toSize(this.getTileSize(c[0]),this.tmpSize_);return[u[0]+(c[1]+.5)*p[0]*d,u[1]-(c[2]+.5)*p[1]*d]}getTileCoordExtent(c,u){const d=this.getOrigin(c[0]),p=this.getResolution(c[0]),g=toSize(this.getTileSize(c[0]),this.tmpSize_),f=d[0]+c[1]*g[0]*p,_=d[1]-(c[2]+1)*g[1]*p;return createOrUpdate$2(f,_,f+g[0]*p,_+g[1]*p,u)}getTileCoordForCoordAndResolution(c,u,d){return this.getTileCoordForXYAndResolution_(c[0],c[1],u,!1,d)}getTileCoordForXYAndResolution_(c,u,d,p,g){const f=this.getZForResolution(d),_=d/this.getResolution(f),y=this.getOrigin(f),x=toSize(this.getTileSize(f),this.tmpSize_);let v=_*(c-y[0])/d/x[0],C=_*(y[1]-u)/d/x[1];return p?(v=ceil(v,5)-1,C=ceil(C,5)-1):(v=floor(v,5),C=floor(C,5)),createOrUpdate$1(f,v,C,g)}getTileCoordForXYAndZ_(c,u,d,p,g){const f=this.getOrigin(d),_=this.getResolution(d),y=toSize(this.getTileSize(d),this.tmpSize_);let x=(c-f[0])/_/y[0],v=(f[1]-u)/_/y[1];return p?(x=ceil(x,5)-1,v=ceil(v,5)-1):(x=floor(x,5),v=floor(v,5)),createOrUpdate$1(d,x,v,g)}getTileCoordForCoordAndZ(c,u,d){return this.getTileCoordForXYAndZ_(c[0],c[1],u,!1,d)}getTileCoordResolution(c){return this.resolutions_[c[0]]}getTileSize(c){return this.tileSize_?this.tileSize_:this.tileSizes_[c]}getFullTileRange(c){return this.fullTileRanges_?this.fullTileRanges_[c]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,c):null}getZForResolution(c,u){return clamp(linearFindNearest(this.resolutions_,c,u||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(c,u){return intersectsLinearRing(u,0,u.length,2,this.getTileCoordExtent(c))}calculateTileRanges_(c){const u=this.resolutions_.length,d=new Array(u);for(let p=this.minZoom;p<u;++p)d[p]=this.getTileRangeForExtentAndZ(c,p);this.fullTileRanges_=d}}function getForProjection(c){let u=c.getDefaultTileGrid();return u||(u=function createForProjection(c,u,d,p){const g=extentFromProjection(c);return function createForExtent(c,u,d,p){p=void 0!==p?p:"top-left";const g=resolutionsFromExtent(c,u,d);return new TileGrid({extent:c,origin:getCorner(c,p),resolutions:g,tileSize:d})}(g,u,d,p)}(c),c.setDefaultTileGrid(u)),u}function createXYZ(c){const u=c||{},d=u.extent||get$2("EPSG:3857").getExtent(),p={extent:d,minZoom:u.minZoom,tileSize:u.tileSize,resolutions:resolutionsFromExtent(d,u.maxZoom,u.tileSize,u.maxResolution)};return new TileGrid(p)}function resolutionsFromExtent(c,u,d,p){u=void 0!==u?u:Un,d=toSize(void 0!==d?d:$n);const g=getHeight(c),f=getWidth(c);p=p>0?p:Math.max(f/d[0],g/d[1]);const _=u+1,y=new Array(_);for(let c=0;c<_;++c)y[c]=p/Math.pow(2,c);return y}function extentFromProjection(c){let u=(c=get$2(c)).getExtent();if(!u){const d=180*Ni.degrees/c.getMetersPerUnit();u=createOrUpdate$2(-d,-d,d,d)}return u}class TileSourceEvent extends BaseEvent{constructor(c,u){super(c),this.tile=u}}var rp=class TileSource extends Ks{constructor(c){super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,projection:c.projection,state:c.state,wrapX:c.wrapX,interpolate:c.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=void 0!==c.tilePixelRatio?c.tilePixelRatio:1,this.tileGrid=void 0!==c.tileGrid?c.tileGrid:null;const u=[256,256];this.tileGrid&&toSize(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),u),this.tileCache=new oa(c.cacheSize||0),this.tmpSize=[0,0],this.key_=c.key||"",this.tileOptions={transition:c.transition,interpolate:c.interpolate},this.zDirection=c.zDirection?c.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(c,u){const d=this.getTileCacheForProjection(c);d&&d.expireCache(u)}getGutterForProjection(c){return 0}getKey(){return this.key_}setKey(c){this.key_!==c&&(this.key_=c,this.changed())}getResolutions(c){const u=c?this.getTileGridForProjection(c):this.tileGrid;return u?u.getResolutions():null}getTile(c,u,d,p,g){return abstract()}getTileGrid(){return this.tileGrid}getTileGridForProjection(c){return this.tileGrid?this.tileGrid:getForProjection(c)}getTileCacheForProjection(c){const u=this.getProjection();return assert(null===u||equivalent(u,c),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(c){return this.tilePixelRatio_}getTilePixelSize(c,u,d){const p=this.getTileGridForProjection(d),g=this.getTilePixelRatio(u),f=toSize(p.getTileSize(c),this.tmpSize);return 1==g?f:scale(f,g,this.tmpSize)}getTileCoordForTileUrlFunction(c,u){u=void 0!==u?u:this.getProjection();const d=this.getTileGridForProjection(u);return this.getWrapX()&&u.isGlobal()&&(c=function wrapX(c,u,d){const p=u[0],g=c.getTileCoordCenter(u),f=extentFromProjection(d);if(!containsCoordinate(f,g)){const u=getWidth(f),d=Math.ceil((f[0]-g[0])/u);return g[0]+=u*d,c.getTileCoordForCoordAndZ(g,p)}return u}(d,c,u)),function withinExtentAndZ(c,u){const d=c[0],p=c[1],g=c[2];if(u.getMinZoom()>d||d>u.getMaxZoom())return!1;const f=u.getFullTileRange(d);return!f||f.containsXY(p,g)}(c,d)?c:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}useTile(c,u,d,p){}};function appendParams(c,u){const d=[];Object.keys(u).forEach((function(c){null!==u[c]&&void 0!==u[c]&&d.push(c+"="+encodeURIComponent(u[c]))}));const p=d.join("&");return c=c.replace(/[?&]$/,""),(c+=c.includes("?")?"&":"?")+p}const np=/\{z\}/g,sp=/\{x\}/g,op=/\{y\}/g,ap=/\{-y\}/g;function renderXYZTemplate(c,u,d,p,g){return c.replace(np,u.toString()).replace(sp,d.toString()).replace(op,p.toString()).replace(ap,(function(){if(void 0===g)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(g-p).toString()}))}function expandUrl(c){const u=[];let d=/\{([a-z])-([a-z])\}/.exec(c);if(d){const p=d[1].charCodeAt(0),g=d[2].charCodeAt(0);let f;for(f=p;f<=g;++f)u.push(c.replace(d[0],String.fromCharCode(f)));return u}if(d=/\{(\d+)-(\d+)\}/.exec(c),d){const p=parseInt(d[2],10);for(let g=parseInt(d[1],10);g<=p;g++)u.push(c.replace(d[0],g.toString()));return u}return u.push(c),u}function createFromTemplate(c,u){return function(d,p,g){if(!d)return;let f;const _=d[0];if(u){const c=u.getFullTileRange(_);c&&(f=c.getHeight()-1)}return renderXYZTemplate(c,_,d[1],d[2],f)}}function createFromTemplates(c,u){const d=c.length,p=new Array(d);for(let g=0;g<d;++g)p[g]=createFromTemplate(c[g],u);return createFromTileUrlFunctions(p)}function createFromTileUrlFunctions(c){return 1===c.length?c[0]:function(u,d,p){if(!u)return;const g=modulo(hash(u),c.length);return c[g](u,d,p)}}function nullTileUrlFunction(c,u,d){}class UrlTile extends rp{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,projection:c.projection,state:c.state,tileGrid:c.tileGrid,tilePixelRatio:c.tilePixelRatio,wrapX:c.wrapX,transition:c.transition,interpolate:c.interpolate,key:c.key,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===UrlTile.prototype.tileUrlFunction,this.tileLoadFunction=c.tileLoadFunction,c.tileUrlFunction&&(this.tileUrlFunction=c.tileUrlFunction),this.urls=null,c.urls?this.setUrls(c.urls):c.url&&this.setUrl(c.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(c){const u=c.target,d=getUid(u),p=u.getState();let g;p==uo?(this.tileLoadingKeys_[d]=!0,g=Qd):d in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[d],g=p==go?ep:p==po?tp:void 0),null!=g&&this.dispatchEvent(new TileSourceEvent(g,u))}setTileLoadFunction(c){this.tileCache.clear(),this.tileLoadFunction=c,this.changed()}setTileUrlFunction(c,u){this.tileUrlFunction=c,this.tileCache.pruneExceptNewestZ(),void 0!==u?this.setKey(u):this.changed()}setUrl(c){const u=expandUrl(c);this.urls=u,this.setUrls(u)}setUrls(c){this.urls=c;const u=c.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(createFromTemplates(c,this.tileGrid),u):this.setKey(u)}tileUrlFunction(c,u,d){}useTile(c,u,d){const p=getKeyZXY(c,u,d);this.tileCache.containsKey(p)&&this.tileCache.get(p)}}var lp=UrlTile;function defaultTileLoadFunction(c,u){c.getImage().src=u}var hp=class TileImage extends lp{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,projection:c.projection,state:c.state,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction?c.tileLoadFunction:defaultTileLoadFunction,tilePixelRatio:c.tilePixelRatio,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:c.wrapX,transition:c.transition,interpolate:void 0===c.interpolate||c.interpolate,key:c.key,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.crossOrigin=void 0!==c.crossOrigin?c.crossOrigin:null,this.tileClass=void 0!==c.tileClass?c.tileClass:_o,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=c.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const c in this.tileCacheForProjection)if(this.tileCacheForProjection[c].canExpireCache())return!0;return!1}expireCache(c,u){const d=this.getTileCacheForProjection(c);this.tileCache.expireCache(this.tileCache==d?u:{});for(const c in this.tileCacheForProjection){const p=this.tileCacheForProjection[c];p.expireCache(p==d?u:{})}}getGutterForProjection(c){return this.getProjection()&&c&&!equivalent(this.getProjection(),c)?0:this.getGutter()}getGutter(){return 0}getKey(){let c=super.getKey();return this.getInterpolate()||(c+=":disable-interpolation"),c}getTileGridForProjection(c){const u=this.getProjection();if(this.tileGrid&&(!u||equivalent(u,c)))return this.tileGrid;const d=getUid(c);return d in this.tileGridForProjection||(this.tileGridForProjection[d]=getForProjection(c)),this.tileGridForProjection[d]}getTileCacheForProjection(c){const u=this.getProjection();if(!u||equivalent(u,c))return this.tileCache;const d=getUid(c);return d in this.tileCacheForProjection||(this.tileCacheForProjection[d]=new oa(this.tileCache.highWaterMark)),this.tileCacheForProjection[d]}createTile_(c,u,d,p,g,f){const _=[c,u,d],y=this.getTileCoordForTileUrlFunction(_,g),x=y?this.tileUrlFunction(y,p,g):void 0,v=new this.tileClass(_,void 0!==x?co:mo,void 0!==x?x:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return v.key=f,v.addEventListener(mi,this.handleTileChange.bind(this)),v}getTile(c,u,d,p,g){const f=this.getProjection();if(!f||!g||equivalent(f,g))return this.getTileInternal(c,u,d,p,f||g);const _=this.getTileCacheForProjection(g),y=[c,u,d];let x;const v=getKey(y);_.containsKey(v)&&(x=_.get(v));const C=this.getKey();if(x&&x.key==C)return x;const M=this.getTileGridForProjection(f),T=this.getTileGridForProjection(g),L=this.getTileCoordForTileUrlFunction(y,g),A=new ReprojTile(f,M,g,T,y,L,this.getTilePixelRatio(p),this.getGutter(),((c,u,d,p)=>this.getTileInternal(c,u,d,p,f)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return A.key=C,x?_.replace(v,A):_.set(v,A),A}getTileInternal(c,u,d,p,g){const f=getKeyZXY(c,u,d),_=this.getKey();if(!this.tileCache.containsKey(f)){const y=this.createTile_(c,u,d,p,g,_);return this.tileCache.set(f,y),y}let y=this.tileCache.get(f);return y.key!=_&&(y=this.createTile_(c,u,d,p,g,_),this.tileCache.replace(f,y)),y}setRenderReprojectionEdges(c){if(this.renderReprojectionEdges_!=c){this.renderReprojectionEdges_=c;for(const c in this.tileCacheForProjection)this.tileCacheForProjection[c].clear();this.changed()}}setTileGridForProjection(c,u){const d=get$2(c);if(d){const c=getUid(d);c in this.tileGridForProjection||(this.tileGridForProjection[c]=u)}}clear(){super.clear();for(const c in this.tileCacheForProjection)this.tileCacheForProjection[c].clear()}};var cp=class BingMaps extends hp{constructor(c){const u=void 0!==c.hidpi&&c.hidpi;super({cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,projection:get$2("EPSG:3857"),reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,tilePixelRatio:u?2:1,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.hidpi_=u,this.culture_=void 0!==c.culture?c.culture:"en-us",this.maxZoom_=void 0!==c.maxZoom?c.maxZoom:-1,this.apiKey_=c.key,this.imagerySet_=c.imagerySet,this.placeholderTiles_=c.placeholderTiles;const d="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_;fetch(d).then((c=>c.json())).then((c=>this.handleImageryMetadataResponse(c)))}getApiKey(){return this.apiKey_}getImagerySet(){return this.imagerySet_}handleImageryMetadataResponse(c){if(200!=c.statusCode||"OK"!=c.statusDescription||"ValidCredentials"!=c.authenticationResultCode||1!=c.resourceSets.length||1!=c.resourceSets[0].resources.length)return void this.setState("error");const u=c.resourceSets[0].resources[0],d=-1==this.maxZoom_?u.zoomMax:this.maxZoom_,p=extentFromProjection(this.getProjection()),g=this.hidpi_?2:1,f=u.imageWidth==u.imageHeight?u.imageWidth/g:[u.imageWidth/g,u.imageHeight/g],_=createXYZ({extent:p,minZoom:u.zoomMin,maxZoom:d,tileSize:f});this.tileGrid=_;const y=this.culture_,x=this.hidpi_,v=this.placeholderTiles_;if(this.tileUrlFunction=createFromTileUrlFunctions(u.imageUrlSubdomains.map((function(c){const d=[0,0,0],p=u.imageUrl.replace("{subdomain}",c).replace("{culture}",y);return function(c,u,g){if(!c)return;createOrUpdate$1(c[0],c[1],c[2],d);const f=new URL(p.replace("{quadkey}",function quadKey(c){const u=c[0],d=new Array(u);let p,g,f=1<<u-1;for(p=0;p<u;++p)g=48,c[1]&f&&(g+=1),c[2]&f&&(g+=2),d[p]=String.fromCharCode(g),f>>=1;return d.join("")}(d))),_=f.searchParams;return x&&(_.set("dpi","d1"),_.set("device","mobile")),!0===v?_.delete("n"):!1===v&&_.set("n","z"),f.toString()}}))),u.imageryProviders){const c=getTransformFromProjections(get$2("EPSG:4326"),this.getProjection());this.setAttributions((d=>{const p=[],g=d.viewState,f=this.getTileGrid(),_=f.getZForResolution(g.resolution,this.zDirection),y=f.getTileCoordForCoordAndZ(g.center,_)[0];return u.imageryProviders.map((function(u){let g=!1;const f=u.coverageAreas;for(let u=0,p=f.length;u<p;++u){const p=f[u];if(y>=p.zoomMin&&y<=p.zoomMax){const u=p.bbox;if(intersects$1(applyTransform([u[1],u[0],u[3],u[2]],c),d.extent)){g=!0;break}}}g&&p.push(u.attribution)})),p.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>'),p}))}this.setState("ready")}};class XYZ extends hp{constructor(c){const u=void 0!==(c=c||{}).projection?c.projection:"EPSG:3857",d=void 0!==c.tileGrid?c.tileGrid:createXYZ({extent:extentFromProjection(u),maxResolution:c.maxResolution,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize});super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:u,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileGrid:d,tileLoadFunction:c.tileLoadFunction,tilePixelRatio:c.tilePixelRatio,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,attributionsCollapsible:c.attributionsCollapsible,zDirection:c.zDirection}),this.gutter_=void 0!==c.gutter?c.gutter:0}getGutter(){return this.gutter_}}var up=class CartoDB extends XYZ{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,maxZoom:void 0!==c.maxZoom?c.maxZoom:18,minZoom:c.minZoom,projection:c.projection,transition:c.transition,wrapX:c.wrapX,zDirection:c.zDirection}),this.account_=c.account,this.mapId_=c.map||"",this.config_=c.config||{},this.templateCache_={},this.initializeMap_()}getConfig(){return this.config_}updateConfig(c){Object.assign(this.config_,c),this.initializeMap_()}setConfig(c){this.config_=c||{},this.initializeMap_()}initializeMap_(){const c=JSON.stringify(this.config_);if(this.templateCache_[c])return void this.applyTemplate_(this.templateCache_[c]);let u="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(u+="/named/"+this.mapId_);const d=new XMLHttpRequest;d.addEventListener("load",this.handleInitResponse_.bind(this,c)),d.addEventListener("error",this.handleInitError_.bind(this)),d.open("POST",u),d.setRequestHeader("Content-type","application/json"),d.send(JSON.stringify(this.config_))}handleInitResponse_(c,u){const d=u.target;if(!d.status||d.status>=200&&d.status<300){let u;try{u=JSON.parse(d.responseText)}catch(c){return void this.setState("error")}this.applyTemplate_(u),this.templateCache_[c]=u,this.setState("ready")}else this.setState("error")}handleInitError_(c){this.setState("error")}applyTemplate_(c){const u="https://"+c.cdn_url.https+"/"+this.account_+"/api/v1/map/"+c.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(u)}};var dp=class Cluster extends so{constructor(c){super({attributions:(c=c||{}).attributions,wrapX:c.wrapX}),this.resolution=void 0,this.distance=void 0!==c.distance?c.distance:20,this.minDistance=c.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=c.geometryFunction||function(c){const u=c.getGeometry();return assert(!u||"Point"===u.getType(),"The default `geometryFunction` can only handle `Point` or null geometries"),u},this.createCustomCluster_=c.createCluster,this.source=null,this.boundRefresh_=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(c.source||null)}clear(c){this.features.length=0,super.clear(c)}getDistance(){return this.distance}getSource(){return this.source}loadFeatures(c,u,d){this.source?.loadFeatures(c,u,d),u!==this.resolution&&(this.resolution=u,this.refresh())}setDistance(c){this.updateDistance(c,this.minDistance)}setMinDistance(c){this.updateDistance(this.distance,c)}getMinDistance(){return this.minDistance}setSource(c){this.source&&this.source.removeEventListener(mi,this.boundRefresh_),this.source=c,c&&c.addEventListener(mi,this.boundRefresh_),this.refresh()}refresh(){this.clear(),this.cluster(),this.addFeatures(this.features)}updateDistance(c,u){const d=0===c?0:Math.min(u,c)/c,p=c!==this.distance||this.interpolationRatio!==d;this.distance=c,this.minDistance=u,this.interpolationRatio=d,p&&this.refresh()}cluster(){if(void 0===this.resolution||!this.source)return;const c=[1/0,1/0,-1/0,-1/0],u=this.distance*this.resolution,d=this.source.getFeatures(),p={};for(let g=0,f=d.length;g<f;g++){const f=d[g];if(!(getUid(f)in p)){const d=this.geometryFunction(f);if(d){createOrUpdateFromCoordinate(d.getCoordinates(),c),buffer(c,u,c);const g=this.source.getFeaturesInExtent(c).filter((function(c){const u=getUid(c);return!(u in p)&&(p[u]=!0,!0)}));this.features.push(this.createCluster(g,c))}}}}createCluster(c,u){const d=[0,0];for(let u=c.length-1;u>=0;--u){const p=this.geometryFunction(c[u]);p?add$1(d,p.getCoordinates()):c.splice(u,1)}scale$2(d,1/c.length);const p=getCenter(u),g=this.interpolationRatio,f=new sr([d[0]*(1-g)+p[0]*g,d[1]*(1-g)+p[1]*g]);return this.createCustomCluster_?this.createCustomCluster_(f,c):new Ii({geometry:f,features:c})}};var pp=class DataTileSource extends rp{constructor(c){const u=void 0===c.projection?"EPSG:3857":c.projection;let d=c.tileGrid;void 0===d&&u&&(d=createXYZ({extent:extentFromProjection(u),maxResolution:c.maxResolution,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize})),super({cacheSize:.1,attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,projection:u,tileGrid:d,state:c.state,wrapX:c.wrapX,transition:c.transition,interpolate:c.interpolate,key:c.key}),this.gutter_=void 0!==c.gutter?c.gutter:0,this.tileSize_=c.tileSize?toSize(c.tileSize):null,this.tileSizes_=null,this.tileLoadingKeys_={},this.loader_=c.loader,this.handleTileChange_=this.handleTileChange_.bind(this),this.bandCount=void 0===c.bandCount?4:c.bandCount,this.tileGridForProjection_={},this.tileCacheForProjection_={},this.crossOrigin_=c.crossOrigin||"anonymous"}setTileSizes(c){this.tileSizes_=c}getTileSize(c){if(this.tileSizes_)return this.tileSizes_[c];if(this.tileSize_)return this.tileSize_;const u=this.getTileGrid();return u?toSize(u.getTileSize(c)):[256,256]}getGutterForProjection(c){const u=this.getProjection();return!u||equivalent(u,c)?this.gutter_:0}setLoader(c){this.loader_=c}getReprojTile_(c,u,d,p,g){const f=this.getTileCacheForProjection(p),_=getKeyZXY(c,u,d);if(f.containsKey(_)){const c=f.get(_);if(c&&c.key==this.getKey())return c}const y=this.getTileGrid(),x=Math.max.apply(null,y.getResolutions().map(((c,u)=>{const d=toSize(y.getTileSize(u)),p=this.getTileSize(u);return Math.max(p[0]/d[0],p[1]/d[1])}))),v=this.getTileGridForProjection(g),C=this.getTileGridForProjection(p),M=[c,u,d],T=this.getTileCoordForTileUrlFunction(M,p),L=Object.assign({sourceProj:g,sourceTileGrid:v,targetProj:p,targetTileGrid:C,tileCoord:M,wrappedTileCoord:T,pixelRatio:x,gutter:this.getGutterForProjection(g),getTileFunction:(c,u,d,p)=>this.getTile(c,u,d,p,g)},this.tileOptions),A=new ReprojDataTile(L);return A.key=this.getKey(),A}getTile(c,u,d,p,g){const f=this.getProjection();if(f&&g&&!equivalent(f,g))return this.getReprojTile_(c,u,d,g,f);const _=this.getTileSize(c),y=getKeyZXY(c,u,d);if(this.tileCache.containsKey(y))return this.tileCache.get(y);const x=this.loader_,v=new AbortController,C={signal:v.signal,crossOrigin:this.crossOrigin_},M=this.getTileCoordForTileUrlFunction([c,u,d]);if(!M)return null;const T=M[0],L=M[1],A=M[2];const I=Object.assign({tileCoord:[c,u,d],loader:function loader(){return toPromise((function(){return x(T,L,A,C)}))},size:_,controller:v},this.tileOptions),k=new DataTile(I);return k.key=this.getKey(),k.addEventListener(mi,this.handleTileChange_),this.tileCache.set(y,k),k}handleTileChange_(c){const u=c.target,d=getUid(u),p=u.getState();let g;p==uo?(this.tileLoadingKeys_[d]=!0,g=Qd):d in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[d],g=p==go?ep:p==po?tp:void 0),g&&this.dispatchEvent(new TileSourceEvent(g,u))}getTileGridForProjection(c){const u=this.getProjection();if(this.tileGrid&&(!u||equivalent(u,c)))return this.tileGrid;const d=getUid(c);return d in this.tileGridForProjection_||(this.tileGridForProjection_[d]=getForProjection(c)),this.tileGridForProjection_[d]}setTileGridForProjection(c,u){const d=get$2(c);if(d){const c=getUid(d);c in this.tileGridForProjection_||(this.tileGridForProjection_[c]=u)}}getTileCacheForProjection(c){const u=this.getProjection();if(!u||equivalent(u,c))return this.tileCache;const d=getUid(c);return d in this.tileCacheForProjection_||(this.tileCacheForProjection_[d]=new oa(.1)),this.tileCacheForProjection_[d]}expireCache(c,u){const d=this.getTileCacheForProjection(c);this.tileCache.expireCache(this.tileCache==d?u:{});for(const c in this.tileCacheForProjection_){const p=this.tileCacheForProjection_[c];p.expireCache(p==d?u:{})}}clear(){super.clear();for(const c in this.tileCacheForProjection_)this.tileCacheForProjection_[c].clear()}};var gp=class Google extends hp{constructor(c){const u=!!c.highDpi;super({attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,projection:"EPSG:3857",reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,tilePixelRatio:u?2:1,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.apiKey_=c.key,this.error_=null;const d={mapType:c.mapType||"roadmap",language:c.language||"en-US",region:c.region||"US"};c.imageFormat&&(d.imageFormat=c.imageFormat),c.scale&&(d.scale=c.scale),u&&(d.highDpi=!0),c.layerTypes&&(d.layerTypes=c.layerTypes),c.styles&&(d.styles=c.styles),!0===c.overlay&&(d.overlay=!0),c.apiOptions&&(d.apiOptions=c.apiOptions),this.sessionTokenRequest_=d,this.sessionTokenValue_,this.sessionRefreshId_,this.previousViewportAttribution_,this.previousViewportExtent_,this.createSession_()}getError(){return this.error_}fetchSessionToken(c,u){return fetch(c,u)}async createSession_(){const c="https://tile.googleapis.com/v1/createSession?key="+this.apiKey_,u={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(this.sessionTokenRequest_)},d=await this.fetchSessionToken(c,u);if(!d.ok){try{const c=await d.json();this.error_=new Error(c.error.message)}catch{this.error_=new Error("Error fetching session token")}return void this.setState("error")}const p=await d.json(),g=this.getTilePixelRatio(1),f=[p.tileWidth/g,p.tileHeight/g];this.tileGrid=createXYZ({extent:extentFromProjection(this.getProjection()),maxZoom:22,tileSize:f});const _=p.session;this.sessionTokenValue_=_;const y=this.apiKey_;this.tileUrlFunction=function(c,u,d){return`https://tile.googleapis.com/v1/2dtiles/${c[0]}/${c[1]}/${c[2]}?session=${_}&key=${y}`};const x=1e3*parseInt(p.expiry,10),v=Math.max(x-Date.now()-6e4,1);this.sessionRefreshId_=setTimeout((()=>this.createSession_()),v),this.setAttributions(this.fetchAttributions_.bind(this)),this.setState("ready")}async fetchAttributions_(c){if(c.viewHints[jn]||c.viewHints[zn]||c.animate)return this.previousViewportAttribution_;const[u,d]=toLonLat(getBottomLeft(c.extent),c.viewState.projection),[p,g]=toLonLat(getTopRight(c.extent),c.viewState.projection),f=`zoom=${this.getTileGrid().getZForResolution(c.viewState.resolution,this.zDirection)}&north=${g}&south=${d}&east=${p}&west=${u}`;if(this.previousViewportExtent_==f)return this.previousViewportAttribution_;this.previousViewportExtent_=f;const _=`https://tile.googleapis.com/tile/v1/viewport?session=${this.sessionTokenValue_}&key=${this.apiKey_}&${f}`;return this.previousViewportAttribution_=await fetch(_).then((c=>c.json())).then((c=>c.copyright)),this.previousViewportAttribution_}disposeInternal(){clearTimeout(this.sessionRefreshId_),super.disposeInternal()}};let mp=class CustomTile extends _o{constructor(c,u,d,p,g,f,_){super(u,d,p,g,f,_),this.zoomifyImage_=null,this.tileSize_=c}getImage(){if(this.zoomifyImage_)return this.zoomifyImage_;const c=super.getImage();if(this.state==po){const u=this.tileSize_;if(c.width==u[0]&&c.height==u[1])return this.zoomifyImage_=c,c;const d=createCanvasContext2D(u[0],u[1]);return d.drawImage(c,0,0),this.zoomifyImage_=d.canvas,d.canvas}return c}};var fp=class Zoomify extends hp{constructor(c){const u=c.size,d=void 0!==c.tierSizeCalculation?c.tierSizeCalculation:"default",p=c.tilePixelRatio||1,g=u[0],f=u[1],_=[],y=c.tileSize||$n;let x=y*p;switch(d){case"default":for(;g>x||f>x;)_.push([Math.ceil(g/x),Math.ceil(f/x)]),x+=x;break;case"truncated":let c=g,u=f;for(;c>x||u>x;)_.push([Math.ceil(c/x),Math.ceil(u/x)]),c>>=1,u>>=1;break;default:throw new Error("Unknown `tierSizeCalculation` configured")}_.push([1,1]),_.reverse();const v=[p],C=[0];for(let c=1,u=_.length;c<u;c++)v.push(p<<c),C.push(_[c-1][0]*_[c-1][1]+C[c-1]);v.reverse();const M=new TileGrid({tileSize:y,extent:c.extent||[0,-f,g,0],resolutions:v});let T=c.url;!T||T.includes("{TileGroup}")||T.includes("{tileIndex}")||(T+="{TileGroup}/{z}-{x}-{y}.jpg");const L=expandUrl(T);let A=y*p;const I=createFromTileUrlFunctions(L.map((function createFromTemplate(c){return function(u,d,p){if(!u)return;const g=u[0],f=u[1],y=u[2],x=f+y*_[g][0],v={z:g,x:f,y:y,tileIndex:x,TileGroup:"TileGroup"+((x+C[g])/A|0)};return c.replace(/\{(\w+?)\}/g,(function(c,u){return v[u]}))}}))),k=mp.bind(null,toSize(y*p));super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,tilePixelRatio:p,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:k,tileGrid:M,tileUrlFunction:I,transition:c.transition}),this.zDirection=c.zDirection;const O=I(M.getTileCoordForCoordAndResolution(getCenter(M.getExtent()),v[v.length-1]),1,null),N=new Image;N.addEventListener("error",(()=>{A=y,this.changed()})),N.src=O}};function formatPercentage(c){return c.toLocaleString("en",{maximumFractionDigits:10})}var _p=class IIIF extends hp{constructor(c){const u=c||{};let d=u.url||"";d+=d.lastIndexOf("/")===d.length-1||""===d?"":"/";const p=u.version||Rl,g=u.sizes||[],f=u.size;assert(null!=f&&Array.isArray(f)&&2==f.length&&!isNaN(f[0])&&f[0]>0&&!isNaN(f[1])&&f[1]>0,"Missing or invalid `size`");const _=f[0],y=f[1],x=u.tileSize,v=u.tilePixelRatio||1,C=u.format||"jpg",M=u.quality||(u.version==Tl?"native":"default");let T=u.resolutions||[];const L=u.supports||[],A=u.extent||[0,-y,_,0],I=null!=g&&Array.isArray(g)&&g.length>0,k=void 0!==x&&("number"==typeof x&&Number.isInteger(x)&&x>0||Array.isArray(x)&&x.length>0),O=null!=L&&Array.isArray(L)&&(L.includes("regionByPx")||L.includes("regionByPct"))&&(L.includes("sizeByWh")||L.includes("sizeByH")||L.includes("sizeByW")||L.includes("sizeByPct"));let N,G,j;if(T.sort((function(c,u){return u-c})),k||O)if(null!=x&&("number"==typeof x&&Number.isInteger(x)&&x>0?(N=x,G=x):Array.isArray(x)&&x.length>0&&((1==x.length||null==x[1]&&Number.isInteger(x[0]))&&(N=x[0],G=x[0]),2==x.length&&(Number.isInteger(x[0])&&Number.isInteger(x[1])?(N=x[0],G=x[1]):null==x[0]&&Number.isInteger(x[1])&&(N=x[1],G=x[1])))),void 0!==N&&void 0!==G||(N=$n,G=$n),0==T.length){j=Math.max(Math.ceil(Math.log(_/N)/Math.LN2),Math.ceil(Math.log(y/G)/Math.LN2));for(let c=j;c>=0;c--)T.push(Math.pow(2,c))}else{const c=Math.max(...T);j=Math.round(Math.log(c)/Math.LN2)}else if(N=_,G=y,T=[],I){g.sort((function(c,u){return c[0]-u[0]})),j=-1;const c=[];for(let u=0;u<g.length;u++){const d=_/g[u][0];T.length>0&&T[T.length-1]==d?c.push(u):(T.push(d),j++)}if(c.length>0)for(let u=0;u<c.length;u++)g.splice(c[u]-u,1)}else T.push(1),g.push([_,y]),j=0;const B=new TileGrid({tileSize:[N,G],extent:A,origin:getTopLeft(A),resolutions:T}),V=mp.bind(null,toSize(x||256).map((function(c){return c*v})));super({attributions:u.attributions,attributionsCollapsible:u.attributionsCollapsible,cacheSize:u.cacheSize,crossOrigin:u.crossOrigin,interpolate:u.interpolate,projection:u.projection,reprojectionErrorThreshold:u.reprojectionErrorThreshold,state:u.state,tileClass:V,tileGrid:B,tilePixelRatio:u.tilePixelRatio,tileUrlFunction:function(c,u,f){let x,v;const A=c[0];if(A>j)return;const B=c[1],V=c[2],q=T[A];if(!(void 0===B||void 0===V||void 0===q||B<0||Math.ceil(_/q/N)<=B||V<0||Math.ceil(y/q/G)<=V)){if(O||k){const c=B*N*q,u=V*G*q;let d=N*q,g=G*q,f=N,C=G;if(c+d>_&&(d=_-c),u+g>y&&(g=y-u),c+N*q>_&&(f=Math.floor((_-c+q-1)/q)),u+G*q>y&&(C=Math.floor((y-u+q-1)/q)),0==c&&d==_&&0==u&&g==y)x="full";else if(!O||L.includes("regionByPx"))x=c+","+u+","+d+","+g;else if(L.includes("regionByPct")){x="pct:"+formatPercentage(c/_*100)+","+formatPercentage(u/y*100)+","+formatPercentage(d/_*100)+","+formatPercentage(g/y*100)}p!=Ll||O&&!L.includes("sizeByWh")?!O||L.includes("sizeByW")?v=f+",":L.includes("sizeByH")?v=","+C:L.includes("sizeByWh")?v=f+","+C:L.includes("sizeByPct")&&(v="pct:"+formatPercentage(100/q)):v=f+","+C}else if(x="full",I){const c=g[A][0],u=g[A][1];v=p==Ll?c==_&&u==y?"max":c+","+u:c==_?"full":c+","}else v=p==Ll?"max":"full";return d+x+"/"+v+"/0/"+M+"."+C}},transition:u.transition}),this.zDirection=u.zDirection}};class ReprojImage extends qr{constructor(c,u,d,p,g,f,_){let y=c.getExtent();y&&c.canWrapX()&&(y=y.slice(),y[0]=-1/0,y[2]=1/0);let x=u.getExtent();x&&u.canWrapX()&&(x=x.slice(),x[0]=-1/0,x[2]=1/0);const v=x?getIntersection(d,x):d,C=calculateSourceResolution(c,u,getCenter(v),p),M=new Triangulation(c,u,v,y,.5*C,p),T=M.calculateSourceExtent(),L=isEmpty(T)?null:f(T,C,g),A=L?Er.IDLE:Er.EMPTY,I=L?L.getPixelRatio():1;super(d,p,I,A),this.targetProj_=u,this.maxSourceExtent_=y,this.triangulation_=M,this.targetResolution_=p,this.targetExtent_=d,this.sourceImage_=L,this.sourcePixelRatio_=I,this.interpolate_=_,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==Er.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const c=this.sourceImage_.getState();if(c==Er.LOADED){const c=getWidth(this.targetExtent_)/this.targetResolution_,u=getHeight(this.targetExtent_)/this.targetResolution_;this.canvas_=render$1(c,u,this.sourcePixelRatio_,fromResolutionLike(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=c,this.changed()}load(){if(this.state==Er.IDLE){this.state=Er.LOADING,this.changed();const c=this.sourceImage_.getState();c==Er.LOADED||c==Er.ERROR?this.reproject_():(this.sourceListenerKey_=listen(this.sourceImage_,mi,(c=>{const u=this.sourceImage_.getState();u!=Er.LOADED&&u!=Er.ERROR||(this.unlistenSource_(),this.reproject_())})),this.sourceImage_.load())}}unlistenSource_(){unlistenByKey(this.sourceListenerKey_),this.sourceListenerKey_=null}}const yp=4,xp="imageloadstart",vp="imageloadend",Sp="imageloaderror";class ImageSourceEvent extends BaseEvent{constructor(c,u){super(c),this.image=u}}function defaultImageLoadFunction(c,u){c.getImage().src=u}function getRequestExtent(c,u,d,p){const g=u/d,f=getCenter(c),_=ceil(getWidth(c)/g,yp),y=ceil(getHeight(c)/g,yp);return getForViewAndSize(f,g,0,[_+2*ceil((p-1)*_/2,yp),y+2*ceil((p-1)*y/2,yp)])}var wp=class ImageSource extends Ks{constructor(c){super({attributions:c.attributions,projection:c.projection,state:c.state,interpolate:void 0===c.interpolate||c.interpolate}),this.on,this.once,this.un,this.loader=c.loader||null,this.resolutions_=void 0!==c.resolutions?c.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!c.loader&&0===c.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(c){this.resolutions_=c}findNearestResolution(c){const u=this.getResolutions();if(u){c=u[linearFindNearest(u,c,0)]}return c}getImage(c,u,d,p){const g=this.getProjection();if(!g||!p||equivalent(g,p))return g&&(p=g),this.getImageInternal(c,u,d,p);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&equivalent(this.reprojectedImage_.getProjection(),p)&&this.reprojectedImage_.getResolution()==u&&equals$1(this.reprojectedImage_.getExtent(),c))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new ReprojImage(g,p,c,u,d,((c,u,d)=>this.getImageInternal(c,u,d,g)),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(c,u,d,p){if(this.loader){const g=getRequestExtent(c,u,d,1),f=this.findNearestResolution(u);if(this.image&&(this.static_||this.wantedProjection_===p&&(this.wantedExtent_&&containsExtent(this.wantedExtent_,g)||containsExtent(this.image.getExtent(),g))&&(this.wantedResolution_&&fromResolutionLike(this.wantedResolution_)===f||fromResolutionLike(this.image.getResolution())===f)))return this.image;this.wantedProjection_=p,this.wantedExtent_=g,this.wantedResolution_=f,this.image=new qr(g,f,d,this.loader),this.image.addEventListener(mi,this.handleImageChange.bind(this))}return this.image}handleImageChange(c){const u=c.target;let d;switch(u.getState()){case Er.LOADING:this.loading=!0,d=xp;break;case Er.LOADED:this.loading=!1,d=vp;break;case Er.ERROR:this.loading=!1,d=Sp;break;default:return}this.hasListener(d)&&this.dispatchEvent(new ImageSourceEvent(d,u))}};function getRequestUrl$1(c,u,d,p,g,f){const _=g.getCode().split(/:(?=\d+$)/).pop(),y=d/p,x=[round(getWidth(u)/y,yp),round(getHeight(u)/y,yp)];f.SIZE=x[0]+","+x[1],f.BBOX=u.join(","),f.BBOXSR=_,f.IMAGESR=_,f.DPI=Math.round(f.DPI?f.DPI*p:90*p);return appendParams(c.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),f)}function createLoader$3(c){const u=c.load?c.load:decode$1,d=get$2(c.projection||"EPSG:3857"),p=c.ratio??1.5,g=c.crossOrigin??null;return function(f,_,y){y=c.hidpi?y:1;const x={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};Object.assign(x,c.params),f=getRequestExtent(f,_,y,p);const v=getRequestUrl$1(c.url,f,_,y,d,x),C=new Image;return C.crossOrigin=g,u(C,v).then((c=>{const u=getWidth(f)/c.width*y;return{image:c,extent:f,resolution:u,pixelRatio:y}}))}}var Cp=class ImageArcGISRest extends wp{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.hidpi_=void 0===c.hidpi||c.hidpi,this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.params_=Object.assign({},c.params),this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader$3({crossOrigin:this.crossOrigin_,params:this.params_,projection:p,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}setUrl(c){c!=this.url_&&(this.url_=c,this.loader=null,this.changed())}updateParams(c){Object.assign(this.params_,c),this.changed()}changed(){this.image=null,super.changed()}};var Ep=class ImageCanvasSource extends wp{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions,state:c.state}),this.canvasFunction_=c.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5}getImageInternal(c,u,d,p){u=this.findNearestResolution(u);let g=this.canvas_;if(g&&this.renderedRevision_==this.getRevision()&&g.getResolution()==u&&g.getPixelRatio()==d&&containsExtent(g.getExtent(),c))return g;scaleFromCenter(c=c.slice(),this.ratio_);const f=[getWidth(c)/u*d,getHeight(c)/u*d],_=this.canvasFunction_.call(this,c,u,d,f,p);return _&&(g=new ho(c,u,d,_)),this.canvas_=g,this.renderedRevision_=this.getRevision(),g}};function getUrl(c,u,d,p,g,f,_){const y=function getScale(c,u,d,p){const g=getWidth(c),f=getHeight(c),_=u[0],y=u[1],x=.0254/p;return y*g>_*f?g*d/(_*x):f*d/(y*x)}(d,p,f,_),x=getCenter(d),v={OPERATION:g?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:_,SETDISPLAYWIDTH:Math.round(p[0]),SETDISPLAYHEIGHT:Math.round(p[1]),SETVIEWSCALE:y,SETVIEWCENTERX:x[0],SETVIEWCENTERY:x[1]};return Object.assign(v,u),appendParams(c,v)}function createLoader$2(c){const u=c.load||decode$1,d=c.useOverlay??!1,p=c.metersPerUnit||1,g=c.displayDpi||96,f=c.ratio??1,_=c.crossOrigin??null;return function(y,x,v){const C=new Image;C.crossOrigin=_;const M=getWidth(y=getRequestExtent(y,x,v,f))/x,T=getHeight(y)/x,L=[M*v,T*v],A=getUrl(c.url,c.params,y,L,d,p,g);return u(C,A).then((c=>({image:c,extent:y,pixelRatio:v})))}}var Pp=class ImageMapGuide extends wp{constructor(c){super({interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.displayDpi_=void 0!==c.displayDpi?c.displayDpi:96,this.params_=Object.assign({},c.params),this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.hidpi_=void 0===c.hidpi||c.hidpi,this.metersPerUnit_=void 0!==c.metersPerUnit?c.metersPerUnit:1,this.ratio_=void 0!==c.ratio?c.ratio:1,this.useOverlay_=void 0!==c.useOverlay&&c.useOverlay,this.renderedRevision_=0,this.loaderProjection_=null}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader$2({crossOrigin:this.crossOrigin_,params:this.params_,hidpi:this.hidpi_,metersPerUnit:this.metersPerUnit_,url:this.url_,useOverlay:this.useOverlay_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}updateParams(c){Object.assign(this.params_,c),this.changed()}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}changed(){this.image=null,super.changed()}};function createLoader$1(c){const u=c.load||decode$1,d=c.imageExtent,p=c.crossOrigin??null;return()=>{const g=new Image;return g.crossOrigin=p,u(g,c.url).then((c=>{const u=getWidth(d)/c.width,p=getHeight(d)/c.height;return{image:c,extent:d,resolution:u!==p?[u,p]:p,pixelRatio:1}}))}}var bp=class Static extends wp{constructor(c){const u=void 0!==c.crossOrigin?c.crossOrigin:null,d=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction;super({attributions:c.attributions,interpolate:c.interpolate,projection:get$2(c.projection)}),this.url_=c.url,this.imageExtent_=c.imageExtent,this.image=null,this.image=new qr(this.imageExtent_,void 0,1,createLoader$1({url:c.url,imageExtent:c.imageExtent,crossOrigin:u,load:(c,u)=>(this.image.setImage(c),d(this.image,u),decode$1(c))})),this.image.addEventListener(mi,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(c,u,d,p){return intersects$1(c,this.image.getExtent())?this.image:null}getUrl(){return this.url_}};const Mp=new Error("Image failed to load");function loadImage(c,u,d,p,g){return new Promise(((f,_)=>{const y=new Image;y.crossOrigin=g.crossOrigin??null,y.addEventListener("load",(()=>f(y))),y.addEventListener("error",(()=>_(Mp))),y.src=renderXYZTemplate(c,u,d,p,g.maxY)}))}function makeLoaderFromTemplates(c){return function(u,d,p,g){const f=function pickUrl(c,u,d,p){return c[modulo(hashZXY(u,d,p),c.length)]}(c,u,d,p);return loadImage(f,u,d,p,g)}}function makeLoaderFromUrlLike(c){let u;if(Array.isArray(c))u=makeLoaderFromTemplates(c);else if("string"==typeof c){u=makeLoaderFromTemplates(expandUrl(c))}else{if("function"!=typeof c)throw new Error("The url option must be a single template, an array of templates, or a function for getting a URL");u=function makeLoaderFromGetter(c){return function(u,d,p,g){return loadImage(c(u,d,p,g),u,d,p,g)}}(c)}return u}let Tp=0;function keyFromUrlLike(c){return Array.isArray(c)?c.join("\n"):"string"==typeof c?c:(++Tp,"url-function-key-"+Tp)}var Rp=class ImageTileSource extends pp{constructor(c){let u,d=(c=c||{}).loader;c.url&&(d=makeLoaderFromUrlLike(c.url),u=keyFromUrlLike(c.url));const p=d?c.state:"loading",g=void 0===c.wrapX||c.wrapX;super({loader:d,key:u,attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,maxZoom:c.maxZoom,minZoom:c.minZoom,tileSize:c.tileSize,gutter:c.gutter,maxResolution:c.maxResolution,projection:c.projection,tileGrid:c.tileGrid,state:p,wrapX:g,transition:c.transition,interpolate:!1!==c.interpolate,crossOrigin:c.crossOrigin})}setUrl(c){const u=makeLoaderFromUrlLike(c);this.setLoader(u),this.setKey(keyFromUrlLike(c)),"ready"!==this.getState()&&this.setState("ready")}};const Lp="1.3.0",Ap=[101,101];function getRequestUrl(c,u,d,p,g){g.WIDTH=d[0],g.HEIGHT=d[1];const f=p.getAxisOrientation(),_=compareVersions(g.VERSION,"1.3")>=0;g[_?"CRS":"SRS"]=p.getCode();const y=_&&f.startsWith("ne")?[u[1],u[0],u[3],u[2]]:u;return g.BBOX=y.join(","),appendParams(c,g)}function getImageSrc(c,u,d,p,g,f,_){f=Object.assign({REQUEST:"GetMap"},f);const y=u/d,x=[round(getWidth(c)/y,yp),round(getHeight(c)/y,yp)];if(1!=d)switch(_){case"geoserver":const c=90*d+.5|0;"FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+=";dpi:"+c:f.FORMAT_OPTIONS="dpi:"+c;break;case"mapserver":f.MAP_RESOLUTION=90*d;break;case"carmentaserver":case"qgis":f.DPI=90*d;break;default:throw new Error("Unknown `serverType` configured")}return getRequestUrl(g,c,x,p,f)}function getRequestParams(c,u){return Object.assign({REQUEST:u,SERVICE:"WMS",VERSION:Lp,FORMAT:"image/png",STYLES:"",TRANSPARENT:!0},c)}function createLoader(c){const u=void 0===c.hidpi||c.hidpi,d=get$2(c.projection||"EPSG:3857"),p=c.ratio||1.5,g=c.load||decode$1,f=c.crossOrigin??null;return(_,y,x)=>{_=getRequestExtent(_,y,x,p),1==x||u&&void 0!==c.serverType||(x=1);const v=getImageSrc(_,y,x,d,c.url,getRequestParams(c.params,"GetMap"),c.serverType),C=new Image;return C.crossOrigin=f,g(C,v).then((c=>({image:c,extent:_,pixelRatio:x})))}}var Ip=class ImageWMS extends wp{constructor(c){super({attributions:(c=c||{}).attributions,interpolate:c.interpolate,projection:c.projection,resolutions:c.resolutions}),this.crossOrigin_=void 0!==c.crossOrigin?c.crossOrigin:null,this.url_=c.url,this.imageLoadFunction_=void 0!==c.imageLoadFunction?c.imageLoadFunction:defaultImageLoadFunction,this.params_=Object.assign({},c.params),this.serverType_=c.serverType,this.hidpi_=void 0===c.hidpi||c.hidpi,this.renderedRevision_=0,this.ratio_=void 0!==c.ratio?c.ratio:1.5,this.loaderProjection_=null}getFeatureInfoUrl(c,u,d,p){const g=get$2(d),f=this.getProjection();f&&f!==g&&(u=calculateSourceResolution(f,g,c,u),c=transform$1(c,g,f));return function getFeatureInfoUrl(c,u,d){if(void 0===c.url)return;const p=get$2(c.projection||"EPSG:3857"),g=getForViewAndSize(u,d,0,Ap),f={QUERY_LAYERS:c.params.LAYERS,INFO_FORMAT:"application/json"};Object.assign(f,getRequestParams(c.params,"GetFeatureInfo"),c.params);const _=floor((u[0]-g[0])/d,yp),y=floor((g[3]-u[1])/d,yp),x=compareVersions(f.VERSION,"1.3")>=0;return f[x?"I":"X"]=_,f[x?"J":"Y"]=y,getRequestUrl(c.url,g,Ap,p,f)}({url:this.url_,params:{...this.params_,...p},projection:f||g},c,u)}getLegendUrl(c,u){return function getLegendUrl(c,u){if(void 0===c.url)return;const d={SERVICE:"WMS",VERSION:Lp,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0!==u){const p=get$2(c.projection||"EPSG:3857").getMetersPerUnit()||1,g=28e-5;d.SCALE=u*p/g}if(Object.assign(d,c.params),void 0!==c.params&&void 0===d.LAYER){const c=d.LAYERS;if(Array.isArray(c)&&1===c.length)return;d.LAYER=c}return appendParams(c.url,d)}({url:this.url_,params:{...this.params_,...u}},c)}getParams(){return this.params_}getImageInternal(c,u,d,p){return void 0===this.url_?null:(this.loader&&this.loaderProjection_===p||(this.loaderProjection_=p,this.loader=createLoader({crossOrigin:this.crossOrigin_,params:this.params_,projection:p,serverType:this.serverType_,hidpi:this.hidpi_,url:this.url_,ratio:this.ratio_,load:(c,u)=>(this.image.setImage(c),this.imageLoadFunction_(this.image,u),decode$1(c))})),super.getImageInternal(c,u,d,p))}getImageLoadFunction(){return this.imageLoadFunction_}getUrl(){return this.url_}setImageLoadFunction(c){this.imageLoadFunction_=c,this.changed()}setUrl(c){c!=this.url_&&(this.url_=c,this.loader=null,this.changed())}updateParams(c){Object.assign(this.params_,c),this.changed()}changed(){this.image=null,super.changed()}};function jsonp(c,u,d,p){const g=document.createElement("script"),f="olc_"+getUid(u);function cleanup(){delete window[f],g.parentNode.removeChild(g)}g.async=!0,g.src=c+(c.includes("?")?"&":"?")+"callback="+f;const _=setTimeout((function(){cleanup(),d&&d()}),1e4);window[f]=function(c){clearTimeout(_),cleanup(),u(c)},document.head.appendChild(g)}class ResponseError extends Error{constructor(c){super("Unexpected response status: "+c.status),this.name="ResponseError",this.response=c}}class ClientError extends Error{constructor(c){super("Failed to issue request"),this.name="ClientError",this.client=c}}function getJSON(c){return new Promise((function(u,d){const p=new XMLHttpRequest;p.addEventListener("load",(function onLoad(c){const p=c.target;if(!p.status||p.status>=200&&p.status<300){let c;try{c=JSON.parse(p.responseText)}catch(c){const u="Error parsing response text as JSON: "+c.message;return void d(new Error(u))}u(c)}else d(new ResponseError(p))})),p.addEventListener("error",(function onError(c){d(new ClientError(c.target))})),p.open("GET",c),p.setRequestHeader("Accept","application/json"),p.send()}))}function resolveUrl(c,u){return u.includes("://")?u:new URL(u,c).href}const Fp={"image/png":!0,"image/jpeg":!0,"image/gif":!0,"image/webp":!0},kp={"application/vnd.mapbox-vector-tile":!0,"application/geo+json":!0};function appendCollectionsQueryParam(c,u){if(!u.length)return c;const d=new URL(c,"file:/");if(d.pathname.split("/").includes("collections"))return error('The "collections" query parameter cannot be added to collection endpoints'),c;const p=u.map((c=>encodeURIComponent(c))).join(",");d.searchParams.append("collections",p);return`${c.split("?")[0]}?${decodeURIComponent(d.searchParams.toString())}`}function parseTileMatrixSet(c,u,d,p){let g=c.projection;if(!g&&(g=get$2(u.crs),!g))throw new Error(`Unsupported CRS: ${u.crs}`);const f=u.orderedAxes,_=!(f?f.slice(0,2).map((c=>c.replace(/E|X|Lon/i,"e").replace(/N|Y|Lat/i,"n"))).join(""):g.getAxisOrientation()).startsWith("en"),y=u.tileMatrices,x={};for(let c=0;c<y.length;++c){const u=y[c];x[u.id]=u}const v={},C=[];if(p)for(let c=0;c<p.length;++c){const u=p[c],d=u.tileMatrix;C.push(d),v[d]=u}else for(let c=0;c<y.length;++c){const u=y[c].id;C.push(u)}const M=C.length,T=new Array(M),L=new Array(M),A=new Array(M),I=new Array(M),k=[-1/0,-1/0,1/0,1/0];for(let c=0;c<M;++c){const u=C[c],d=x[u],p=d.pointOfOrigin;T[c]=_?[p[1],p[0]]:p,L[c]=d.cellSize,A[c]=[d.matrixWidth,d.matrixHeight],I[c]=[d.tileWidth,d.tileHeight];const g=v[u];if(g){const u=d.cellSize*d.tileWidth,p=T[c][0]+g.minTileCol*u,f=T[c][0]+(g.maxTileCol+1)*u,_=d.cellSize*d.tileHeight;let y,x;"bottomLeft"===d.cornerOfOrigin?(y=T[c][1]+g.minTileRow*_,x=T[c][1]+(g.maxTileRow+1)*_):(y=T[c][1]-(g.maxTileRow+1)*_,x=T[c][1]-g.minTileRow*_),getIntersection(k,[p,y,f,x],k)}}const O=new TileGrid({origins:T,resolutions:L,sizes:A,tileSizes:I,extent:p?k:void 0}),N=c.context,G=c.url;return{grid:O,urlTemplate:d,urlFunction:function tileUrlFunction(c,u,g){if(!c)return;const f=C[c[0]],_=x[f],y="bottomLeft"===_.cornerOfOrigin,M={tileMatrix:f,tileCol:c[1],tileRow:y?-c[2]-1:c[2]};if(p){const c=v[_.id];if(M.tileCol<c.minTileCol||M.tileCol>c.maxTileCol||M.tileRow<c.minTileRow||M.tileRow>c.maxTileRow)return}Object.assign(M,N);const T=d.replace(/\{(\w+?)\}/g,(function(c,u){return M[u]}));return resolveUrl(G,T)}}}function parseTileSetMetadata(c,u){const d=u.tileMatrixSetLimits;let p;if("map"===u.dataType)p=function getMapTileUrlTemplate(c,u,d){let p,g;for(let d=0;d<c.length;++d){const f=c[d];if("item"===f.rel){if(f.type===u){p=f.href;break}(Fp[f.type]||!g&&f.type.startsWith("image/"))&&(g=f.href)}}if(!p){if(!g)throw new Error('Could not find "item" link');p=g}return d&&(p=appendCollectionsQueryParam(p,d)),p}(u.links,c.mediaType,c.collections);else{if("vector"!==u.dataType)throw new Error('Expected tileset data type to be "map" or "vector"');p=function getVectorTileUrlTemplate(c,u,d,p){let g,f;const _={};for(let d=0;d<c.length;++d){const p=c[d];if(_[p.type]=p.href,"item"===p.rel){if(p.type===u){g=p.href;break}kp[p.type]&&(f=p.href)}}if(!g&&d)for(let c=0;c<d.length;++c){const u=d[c];if(_[u]){g=_[u];break}}if(!g){if(!f)throw new Error('Could not find "item" link');g=f}return p&&(g=appendCollectionsQueryParam(g,p)),g}(u.links,c.mediaType,c.supportedMediaTypes,c.collections)}if(u.tileMatrixSet)return parseTileMatrixSet(c,u.tileMatrixSet,p,d);const g=u.links.find((c=>"http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme"===c.rel));if(!g)throw new Error("Expected http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme link or tileMatrixSet");const f=g.href;return getJSON(resolveUrl(c.url,f)).then((function(u){return parseTileMatrixSet(c,u,p,d)}))}function getTileSetInfo(c){return getJSON(c.url).then((function(u){return parseTileSetMetadata(c,u)}))}var Op=class OGCMapTile extends hp{constructor(c){super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition});getTileSetInfo({url:c.url,projection:this.getProjection(),mediaType:c.mediaType,context:c.context||null,collections:c.collections}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(c){this.tileGrid=c.grid,this.setTileUrlFunction(c.urlFunction,c.urlTemplate),this.setState("ready")}handleError_(c){error(c),this.setState("error")}};var Np=class VectorTile extends lp{constructor(c){const u=c.projection||"EPSG:3857",d=c.extent||extentFromProjection(u),p=c.tileGrid||createXYZ({extent:d,maxResolution:c.maxResolution,maxZoom:void 0!==c.maxZoom?c.maxZoom:22,minZoom:c.minZoom,tileSize:c.tileSize||512});super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,interpolate:!0,projection:u,state:c.state,tileGrid:p,tileLoadFunction:c.tileLoadFunction?c.tileLoadFunction:defaultLoadFunction,tileUrlFunction:c.tileUrlFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:void 0===c.zDirection?1:c.zDirection}),this.format_=c.format?c.format:null,this.sourceTileCache_=new oa(128),this.overlaps_=null==c.overlaps||c.overlaps,this.tileClass=c.tileClass?c.tileClass:ca,this.tileGrids_={}}getOverlaps(){return this.overlaps_}clear(){this.sourceTileCache_.clear()}expireCache(c,u){const d=this.getTileCacheForProjection(c),p=Object.keys(u).reduce(((c,u)=>{const p=function getCacheKeyForTileKey(c){const[u,d,p]=c.substring(c.lastIndexOf("/")+1,c.length).split(",").map(Number);return getKeyZXY(u,d,p)}(u),g=d.peek(p);if(g){const u=g.sourceTiles;for(let d=0,p=u.length;d<p;++d)c[u[d].getKey()]=!0}return c}),{});super.expireCache(c,u),this.sourceTileCache_.expireCache(p)}getSourceTiles(c,u,d){if(d.getState()===co){d.setState(uo);const p=d.wrappedTileCoord,g=this.getTileGridForProjection(u),f=g.getTileCoordExtent(p),_=p[0],y=g.getResolution(_);buffer(f,-y,f);const x=this.tileGrid,v=x.getExtent();v&&getIntersection(f,v,f);const C=x.getZForResolution(y,this.zDirection);x.forEachTileCoord(f,C,(p=>{const g=this.tileUrlFunction(p,c,u),f=this.sourceTileCache_.containsKey(g)?this.sourceTileCache_.get(g):new this.tileClass(p,g?co:mo,g,this.format_,this.tileLoadFunction);d.sourceTiles.push(f);const _=f.getState();if(_<po){const listenChange=c=>{this.handleTileChange(c);const u=f.getState();if(u===po||u===go){const c=f.getKey();c in d.errorTileKeys?f.getState()===po&&delete d.errorTileKeys[c]:d.loadingSourceTiles--,u===go?d.errorTileKeys[c]=!0:f.removeEventListener(mi,listenChange),0===d.loadingSourceTiles&&d.setState(isEmpty$1(d.errorTileKeys)?po:go)}};f.addEventListener(mi,listenChange),d.loadingSourceTiles++}_===co&&(f.extent=x.getTileCoordExtent(p),f.projection=u,f.resolution=x.getResolution(p[0]),this.sourceTileCache_.set(g,f),f.load())})),d.loadingSourceTiles||d.setState(d.sourceTiles.some((c=>c.getState()===go))?go:po)}return d.sourceTiles}getTile(c,u,d,p,g){const f=[c,u,d];let _=this.getTileCoordForTileUrlFunction(f,g);const y=this.getTileGrid().getExtent(),x=this.getTileGridForProjection(g);if(_&&y){const u=x.getTileCoordExtent(_);buffer(u,-x.getResolution(c),u),intersects$1(y,u)||(_=null)}let v=!0;if(null!==_){const u=this.tileGrid,d=x.getResolution(c),f=u.getZForResolution(d,1),y=x.getTileCoordExtent(_);buffer(y,-d,y),u.forEachTileCoord(y,f,(c=>{v=v&&!this.tileUrlFunction(c,p,g)}))}const C=new ha(f,v?mo:co,_,this.getSourceTiles.bind(this,p,g));return C.key=this.getKey(),C}getTileGridForProjection(c){const u=c.getCode();let d=this.tileGrids_[u];if(!d){const c=this.tileGrid,p=c.getResolutions().slice(),g=p.map((function(u,d){return c.getOrigin(d)})),f=p.map((function(u,d){return c.getTileSize(d)})),_=Un+1;for(let c=p.length;c<_;++c)p.push(p[c-1]/2),g.push(g[c-1]),f.push(f[c-1]);d=new TileGrid({extent:c.getExtent(),origins:g,resolutions:p,tileSizes:f}),this.tileGrids_[u]=d}return d}getTilePixelRatio(c){return c}getTilePixelSize(c,u,d){const p=toSize(this.getTileGridForProjection(d).getTileSize(c),this.tmpSize);return[Math.round(p[0]*u),Math.round(p[1]*u)]}};function defaultLoadFunction(c,u){c.setLoader((function(d,p,g){loadFeaturesXhr(u,c.getFormat(),d,p,g,c.onLoad.bind(c),c.onError.bind(c))}))}var Dp=class OGCVectorTile extends Np{constructor(c){super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,format:c.format,overlaps:c.overlaps,projection:c.projection,tileClass:c.tileClass,transition:c.transition,wrapX:c.wrapX,zDirection:c.zDirection,state:"loading"});getTileSetInfo({url:c.url,projection:this.getProjection(),mediaType:c.mediaType,supportedMediaTypes:c.format.supportedMediaTypes,context:c.context||null,collections:c.collections}).then(this.handleTileSetInfo_.bind(this)).catch(this.handleError_.bind(this))}handleTileSetInfo_(c){this.tileGrid=c.grid,this.setTileUrlFunction(c.urlFunction,c.urlTemplate),this.setState("ready")}handleError_(c){error(c),this.setState("error")}};const Gp='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class OSM extends XYZ{constructor(c){let u;u=void 0!==(c=c||{}).attributions?c.attributions:[Gp];const d=void 0!==c.crossOrigin?c.crossOrigin:"anonymous",p=void 0!==c.url?c.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:u,attributionsCollapsible:!1,cacheSize:c.cacheSize,crossOrigin:d,interpolate:c.interpolate,maxZoom:void 0!==c.maxZoom?c.maxZoom:19,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileLoadFunction:c.tileLoadFunction,transition:c.transition,url:p,wrapX:c.wrapX,zDirection:c.zDirection})}}function createMinion(c){return function(u){const d=u.buffers,p=u.meta,g=u.imageOps,f=u.width,_=u.height,y=d.length,x=d[0].byteLength;if(g){const u=new Array(y);for(let c=0;c<y;++c)u[c]=new ImageData(new Uint8ClampedArray(d[c]),f,_);return c(u,p).data.buffer}const v=new Uint8ClampedArray(x),C=new Array(y),M=new Array(y);for(let c=0;c<y;++c)C[c]=new Uint8ClampedArray(d[c]),M[c]=[0,0,0,0];for(let u=0;u<x;u+=4){for(let c=0;c<y;++c){const d=C[c];M[c][0]=d[u],M[c][1]=d[u+1],M[c][2]=d[u+2],M[c][3]=d[u+3]}const d=c(M,p);v[u]=d[0],v[u+1]=d[1],v[u+2]=d[2],v[u+3]=d[3]}return v.buffer}}function createWorker(c,u){const d=Object.keys(c.lib||{}).map((function(u){return"const "+u+" = "+c.lib[u].toString()+";"})).concat(["const __minion__ = ("+createMinion.toString()+")(",c.operation.toString(),");",'self.addEventListener("message", function(event) {',"  const buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),p=new Worker("undefined"==typeof Blob?"data:text/javascript;base64,"+Buffer.from(d.join("\n"),"binary").toString("base64"):URL.createObjectURL(new Blob(d,{type:"text/javascript"})));return p.addEventListener("message",u),p}class Processor extends gi{constructor(c){let u;super(),this.imageOps_=!!c.imageOps,u=0===c.threads?0:this.imageOps_?1:c.threads||1;const d=new Array(u);if(u)for(let p=0;p<u;++p)d[p]=createWorker(c,this.onWorkerMessage_.bind(this,p));else d[0]=function createFauxWorker(c,u){const d=createMinion(c.operation);let p=!1;return{postMessage:function(c){setTimeout((function(){p||u({data:{buffer:d(c),meta:c.meta}})}),0)},terminate:function(){p=!0}}}(c,this.onWorkerMessage_.bind(this,0));this.workers_=d,this.queue_=[],this.maxQueueLength_=c.queue||1/0,this.running_=0,this.dataLookup_={},this.job_=null}process(c,u,d){this.enqueue_({inputs:c,meta:u,callback:d}),this.dispatch_()}enqueue_(c){for(this.queue_.push(c);this.queue_.length>this.maxQueueLength_;)this.queue_.shift().callback(null,null)}dispatch_(){if(this.running_||0===this.queue_.length)return;const c=this.queue_.shift();this.job_=c;const u=c.inputs[0].width,d=c.inputs[0].height,p=c.inputs.map((function(c){return c.data.buffer})),g=this.workers_.length;if(this.running_=g,1===g)return void this.workers_[0].postMessage({buffers:p,meta:c.meta,imageOps:this.imageOps_,width:u,height:d},p);const f=c.inputs[0].data.length,_=4*Math.ceil(f/4/g);for(let f=0;f<g;++f){const g=f*_,y=[];for(let c=0,u=p.length;c<u;++c)y.push(p[c].slice(g,g+_));this.workers_[f].postMessage({buffers:y,meta:c.meta,imageOps:this.imageOps_,width:u,height:d},y)}}onWorkerMessage_(c,u){this.disposed||(this.dataLookup_[c]=u.data,--this.running_,0===this.running_&&this.resolveJob_())}resolveJob_(){const c=this.job_,u=this.workers_.length;let d,p;if(1===u)d=new Uint8ClampedArray(this.dataLookup_[0].buffer),p=this.dataLookup_[0].meta;else{const g=c.inputs[0].data.length;d=new Uint8ClampedArray(g),p=new Array(u);const f=4*Math.ceil(g/4/u);for(let c=0;c<u;++c){const u=this.dataLookup_[c].buffer,g=c*f;d.set(new Uint8ClampedArray(u),g),p[c]=this.dataLookup_[c].meta}}this.job_=null,this.dataLookup_={},c.callback(null,new ImageData(d,c.inputs[0].width,c.inputs[0].height),p),this.dispatch_()}disposeInternal(){for(let c=0;c<this.workers_.length;++c)this.workers_[c].terminate();this.workers_.length=0}}const jp="beforeoperations",zp="afteroperations";class RasterSourceEvent extends BaseEvent{constructor(c,u,d){super(c),this.extent=u.extent,this.resolution=u.viewState.resolution/u.pixelRatio,this.data=d}}class RasterSource extends wp{constructor(c){super({projection:null}),this.on,this.once,this.un,this.processor_=null,this.operationType_=void 0!==c.operationType?c.operationType:"pixel",this.threads_=void 0!==c.threads?c.threads:1,this.layers_=function createLayers(c){const u=c.length,d=new Array(u);for(let p=0;p<u;++p)d[p]=createLayer(c[p]);return d}(c.sources);const u=this.changed.bind(this);for(let c=0,d=this.layers_.length;c<d;++c)this.layers_[c].addEventListener(mi,u);var d;this.useResolutions_=null!==c.resolutions,this.tileQueue_=new jo((function(){return 1}),this.processSources_.bind(this)),this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],declutter:null,extent:null,index:0,layerIndex:0,layerStatesArray:(d=this.layers_,d.map((function(c){return c.getLayerState()}))),pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{},mapId:getUid(this),renderTargets:{}},this.setAttributions((function(u){const d=[];for(let p=0,g=c.sources.length;p<g;++p){const g=c.sources[p],f=g instanceof Ks?g:g.getSource();if(!f)continue;const _=f.getAttributions()?.(u);"string"==typeof _?d.push(_):void 0!==_&&d.push(..._)}return d})),void 0!==c.operation&&this.setOperation(c.operation,c.lib)}setOperation(c,u){this.processor_&&this.processor_.dispose(),this.processor_=new Processor({operation:c,imageOps:"image"===this.operationType_,queue:1,lib:u,threads:this.threads_}),this.changed()}updateFrameState_(c,u,d){const p=Object.assign({},this.frameState_);p.viewState=Object.assign({},p.viewState);const g=getCenter(c);p.size[0]=Math.ceil(getWidth(c)/u),p.size[1]=Math.ceil(getHeight(c)/u),p.extent=[g[0]-p.size[0]*u/2,g[1]-p.size[1]*u/2,g[0]+p.size[0]*u/2,g[1]+p.size[1]*u/2],p.time=Date.now();const f=p.viewState;return f.center=g,f.projection=d,f.resolution=u,p}allSourcesReady_(){let c,u=!0;for(let d=0,p=this.layers_.length;d<p;++d)if(c=this.layers_[d].getSource(),!c||"ready"!==c.getState()){u=!1;break}return u}getImage(c,u,d,p){if(!this.allSourcesReady_())return null;this.tileQueue_.loadMoreTiles(16,16),u=this.findNearestResolution(u);const g=this.updateFrameState_(c,u,p);if(this.requestedFrameState_=g,this.renderedImageCanvas_){const c=this.renderedImageCanvas_.getResolution(),d=this.renderedImageCanvas_.getExtent();u===c&&equals$1(g.extent,d)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),g.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_}processSources_(){const c=this.requestedFrameState_,u=this.layers_.length,d=new Array(u);for(let p=0;p<u;++p){c.layerIndex=p,c.renderTargets={};const u=getImageData(this.layers_[p],c);if(!u)return;d[p]=u}const p={};this.dispatchEvent(new RasterSourceEvent(jp,c,p)),this.processor_.process(d,p,this.onWorkerComplete_.bind(this,c))}onWorkerComplete_(c,u,d,p){if(u||!d)return;const g=c.extent,f=c.viewState.resolution;if(f!==this.requestedFrameState_.viewState.resolution||!equals$1(g,this.requestedFrameState_.extent))return;let _;if(this.renderedImageCanvas_)_=this.renderedImageCanvas_.getImage().getContext("2d");else{_=createCanvasContext2D(Math.round(getWidth(g)/f),Math.round(getHeight(g)/f)),this.renderedImageCanvas_=new ho(g,f,1,_.canvas)}_.putImageData(d,0,0),c.animate?requestAnimationFrame(this.changed.bind(this)):this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new RasterSourceEvent(zp,c,p))}getResolutions(c){if(!this.useResolutions_)return null;let u=super.getResolutions();if(!u)for(let d=0,p=this.layers_.length;d<p;++d){if(u=this.layers_[d].getSource().getResolutions(c),u)break}return u}disposeInternal(){this.processor_&&this.processor_.dispose(),super.disposeInternal()}}RasterSource.prototype.dispose;let Bp=null;function getImageData(c,u){const d=c.getRenderer();if(!d)throw new Error("Unsupported layer type: "+c);if(!d.prepareFrame(u))return null;const p=u.size[0],g=u.size[1];if(0===p||0===g)return null;const f=d.renderFrame(u,null);let _;if(f instanceof HTMLCanvasElement)_=f;else{if(f&&(_=f.firstElementChild),!(_ instanceof HTMLCanvasElement))throw new Error("Unsupported rendered element: "+_);if(_.width===p&&_.height===g){return _.getContext("2d").getImageData(0,0,p,g)}}if(Bp){const c=Bp.canvas;c.width!==p||c.height!==g?Bp=createCanvasContext2D(p,g,void 0,{willReadFrequently:!0}):Bp.clearRect(0,0,p,g)}else Bp=createCanvasContext2D(p,g,void 0,{willReadFrequently:!0});return Bp.drawImage(_,0,0,p,g),Bp.getImageData(0,0,p,g)}function createLayer(c){let u;return c instanceof Ks?c instanceof rp?u=new TileLayer({source:c}):c instanceof wp&&(u=new $d({source:c})):u=c,u}var Up=RasterSource;const $p={stamen_terrain:{extension:"png"},stamen_terrain_background:{extension:"png"},stamen_terrain_labels:{extension:"png"},stamen_terrain_lines:{extension:"png"},stamen_toner_background:{extension:"png"},stamen_toner:{extension:"png"},stamen_toner_labels:{extension:"png"},stamen_toner_lines:{extension:"png"},stamen_toner_lite:{extension:"png"},stamen_watercolor:{extension:"jpg"},alidade_smooth:{extension:"png"},alidade_smooth_dark:{extension:"png"},alidade_satellite:{extension:"png"},outdoors:{extension:"png"},osm_bright:{extension:"png"}},Wp={stamen_terrain:{minZoom:0,maxZoom:18,retina:!0},stamen_toner:{minZoom:0,maxZoom:20,retina:!0},stamen_watercolor:{minZoom:1,maxZoom:18,retina:!1}};var Xp=class StadiaMaps extends XYZ{constructor(c){const u=c.layer.indexOf("-"),d=-1==u?c.layer:c.layer.slice(0,u),p=Wp[d]||{minZoom:0,maxZoom:20,retina:!0},g=$p[c.layer],f=c.apiKey?"?api_key="+c.apiKey:"",_=p.retina&&c.retina?"@2x":"",y=void 0!==c.url?c.url:"https://tiles.stadiamaps.com/tiles/"+c.layer+"/{z}/{x}/{y}"+_+"."+g.extension+f,x=['&copy; <a href="https://www.stadiamaps.com/" target="_blank">Stadia Maps</a>','&copy; <a href="https://openmaptiles.org/" target="_blank">OpenMapTiles</a>',Gp];c.layer.startsWith("stamen_")&&x.splice(1,0,'&copy; <a href="https://stamen.com/" target="_blank">Stamen Design</a>'),super({attributions:x,cacheSize:c.cacheSize,crossOrigin:"anonymous",interpolate:c.interpolate,maxZoom:void 0!==c.maxZoom?c.maxZoom:p.maxZoom,minZoom:void 0!==c.minZoom?c.minZoom:p.minZoom,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileLoadFunction:c.tileLoadFunction,transition:c.transition,url:y,tilePixelRatio:_?2:1,wrapX:c.wrapX,zDirection:c.zDirection})}};var Vp=class TileArcGISRest extends hp{constructor(c){super({attributions:(c=c||{}).attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.params_=Object.assign({},c.params),this.hidpi_=void 0===c.hidpi||c.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.setKey(this.getKeyForParams_())}getKeyForParams_(){let c=0;const u=[];for(const d in this.params_)u[c++]=d+"-"+this.params_[d];return u.join("/")}getParams(){return this.params_}getRequestUrl_(c,u,d,p,g,f){const _=this.urls;if(!_)return;let y;if(1==_.length)y=_[0];else{y=_[modulo(hash(c),_.length)]}return getRequestUrl$1(y,d,(this.tileGrid||this.getTileGridForProjection(g)).getResolution(c[0]),p,g,f)}getTilePixelRatio(c){return this.hidpi_?c:1}updateParams(c){Object.assign(this.params_,c),this.setKey(this.getKeyForParams_())}tileUrlFunction(c,u,d){let p=this.getTileGrid();if(p||(p=this.getTileGridForProjection(d)),p.getResolutions().length<=c[0])return;1==u||this.hidpi_||(u=1);const g=p.getTileCoordExtent(c,this.tmpExtent_);let f=toSize(p.getTileSize(c[0]),this.tmpSize);1!=u&&(f=scale(f,u,this.tmpSize));const _={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return Object.assign(_,this.params_),this.getRequestUrl_(c,f,g,u,d,_)}};var qp=class TileDebug extends XYZ{constructor(c){super({projection:(c=c||{}).projection,tileGrid:c.tileGrid,wrapX:void 0===c.wrapX||c.wrapX,zDirection:c.zDirection,url:c.template||"z:{z} x:{x} y:{y}",tileLoadFunction:(c,u)=>{const d=c.getTileCoord()[0],p=toSize(this.tileGrid.getTileSize(d)),g=createCanvasContext2D(p[0],p[1]);g.strokeStyle="grey",g.strokeRect(.5,.5,p[0]+.5,p[1]+.5),g.fillStyle="grey",g.strokeStyle="white",g.textAlign="center",g.textBaseline="middle",g.font="24px sans-serif",g.lineWidth=4,g.strokeText(u,p[0]/2,p[1]/2,p[0]),g.fillText(u,p[0]/2,p[1]/2,p[0]),c.setImage(g.canvas)}})}};var Yp=class TileJSON extends hp{constructor(c){if(super({attributions:c.attributions,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:get$2("EPSG:3857"),reprojectionErrorThreshold:c.reprojectionErrorThreshold,state:"loading",tileLoadFunction:c.tileLoadFunction,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.tileJSON_=null,this.tileSize_=c.tileSize,c.url)if(c.jsonp)jsonp(c.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const u=new XMLHttpRequest;u.addEventListener("load",this.onXHRLoad_.bind(this)),u.addEventListener("error",this.onXHRError_.bind(this)),u.open("GET",c.url),u.send()}else{if(!c.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(c.tileJSON)}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleTileJSONError()}this.handleTileJSONResponse(c)}else this.handleTileJSONError()}onXHRError_(c){this.handleTileJSONError()}getTileJSON(){return this.tileJSON_}handleTileJSONResponse(c){const u=get$2("EPSG:4326"),d=this.getProjection();let p;if(void 0!==c.bounds){const g=getTransformFromProjections(u,d);p=applyTransform(c.bounds,g)}const g=extentFromProjection(d),f=c.minzoom||0,_=createXYZ({extent:g,maxZoom:c.maxzoom||22,minZoom:f,tileSize:this.tileSize_});if(this.tileGrid=_,this.tileUrlFunction=createFromTemplates(c.tiles,_),c.attribution&&!this.getAttributions()){const u=void 0!==p?p:g;this.setAttributions((function(d){return intersects$1(u,d.extent)?[c.attribution]:null}))}this.tileJSON_=c,this.setState("ready")}handleTileJSONError(){this.setState("error")}};var Zp=class TileWMS extends hp{constructor(c){c=c||{};const u=Object.assign({},c.params);super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:c.tileClass,tileGrid:c.tileGrid,tileLoadFunction:c.tileLoadFunction,url:c.url,urls:c.urls,wrapX:void 0===c.wrapX||c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.gutter_=void 0!==c.gutter?c.gutter:0,this.params_=u,this.v13_=!0,this.serverType_=c.serverType,this.hidpi_=void 0===c.hidpi||c.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}getFeatureInfoUrl(c,u,d,p){const g=get$2(d),f=this.getProjection()||g;let _=this.getTileGrid();_||(_=this.getTileGridForProjection(f));const y=transform$1(c,g,f),x=calculateSourceResolution(f,g,c,u),v=_.getZForResolution(x,this.zDirection),C=_.getResolution(v),M=_.getTileCoordForCoordAndZ(y,v);if(_.getResolutions().length<=M[0])return;let T=_.getTileCoordExtent(M,this.tmpExtent_);const L=this.gutter_;0!==L&&(T=buffer(T,C*L,T));const A={QUERY_LAYERS:this.params_.LAYERS};Object.assign(A,getRequestParams(this.params_,"GetFeatureInfo"),p);const I=Math.floor((y[0]-T[0])/C),k=Math.floor((T[3]-y[1])/C);return A[this.v13_?"I":"X"]=I,A[this.v13_?"J":"Y"]=k,this.getRequestUrl_(M,T,1,f||g,A)}getLegendUrl(c,u){if(void 0===this.urls[0])return;const d={SERVICE:"WMS",VERSION:Lp,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===u||void 0===u.LAYER){const c=this.params_.LAYERS;if(!(!Array.isArray(c)||1===c.length))return;d.LAYER=c}if(void 0!==c){const u=this.getProjection()?this.getProjection().getMetersPerUnit():1,p=28e-5;d.SCALE=c*u/p}return Object.assign(d,u),appendParams(this.urls[0],d)}getGutter(){return this.gutter_}getParams(){return this.params_}getRequestUrl_(c,u,d,p,g){const f=this.urls;if(!f)return;let _;if(1==f.length)_=f[0];else{_=f[modulo(hash(c),f.length)]}return getImageSrc(u,(this.tileGrid||this.getTileGridForProjection(p)).getResolution(c[0]),d,p,_,g,this.serverType_)}getTilePixelRatio(c){return this.hidpi_&&void 0!==this.serverType_?c:1}getKeyForParams_(){let c=0;const u=[];for(const d in this.params_)u[c++]=d+"-"+this.params_[d];return u.join("/")}updateParams(c){Object.assign(this.params_,c),this.updateV13_(),this.setKey(this.getKeyForParams_())}updateV13_(){const c=this.params_.VERSION||Lp;this.v13_=compareVersions(c,"1.3")>=0}tileUrlFunction(c,u,d){let p=this.getTileGrid();if(p||(p=this.getTileGridForProjection(d)),p.getResolutions().length<=c[0])return;1==u||this.hidpi_&&void 0!==this.serverType_||(u=1);const g=p.getResolution(c[0]);let f=p.getTileCoordExtent(c,this.tmpExtent_);const _=this.gutter_;0!==_&&(f=buffer(f,g*_,f));const y=Object.assign({},getRequestParams(this.params_,"GetMap"));return this.getRequestUrl_(c,f,u,d,y)}};class CustomTile extends fo{constructor(c,u,d,p,g,f){super(c,u),this.src_=d,this.extent_=p,this.preemptive_=g,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=f}getImage(){return null}getData(c){if(!this.grid_||!this.keys_)return null;const u=(c[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),d=(c[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),p=this.grid_[Math.floor((1-d)*this.grid_.length)];if("string"!=typeof p)return null;let g=p.charCodeAt(Math.floor(u*p.length));g>=93&&g--,g>=35&&g--,g-=32;let f=null;if(g in this.keys_){const c=this.keys_[g];f=this.data_&&c in this.data_?this.data_[c]:c}return f}forDataAtCoordinate(c,u,d){this.state==mo&&!0===d?(this.state=co,listenOnce(this,mi,(d=>{u(this.getData(c))})),this.loadInternal_()):!0===d?setTimeout((()=>{u(this.getData(c))}),0):u(this.getData(c))}getKey(){return this.src_}handleError_(){this.state=go,this.changed()}handleLoad_(c){this.grid_=c.grid,this.keys_=c.keys,this.data_=c.data,this.state=po,this.changed()}loadInternal_(){if(this.state==co)if(this.state=uo,this.jsonp_)jsonp(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{const c=new XMLHttpRequest;c.addEventListener("load",this.onXHRLoad_.bind(this)),c.addEventListener("error",this.onXHRError_.bind(this)),c.open("GET",this.src_),c.send()}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleError_()}this.handleLoad_(c)}else this.handleError_()}onXHRError_(c){this.handleError_()}load(){this.preemptive_?this.loadInternal_():this.setState(mo)}}var Kp=class UTFGrid extends rp{constructor(c){if(super({projection:get$2("EPSG:3857"),state:"loading",wrapX:void 0===c.wrapX||c.wrapX,zDirection:c.zDirection}),this.preemptive_=void 0===c.preemptive||c.preemptive,this.tileUrlFunction_=nullTileUrlFunction,this.template_=void 0,this.jsonp_=c.jsonp||!1,c.url)if(this.jsonp_)jsonp(c.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{const u=new XMLHttpRequest;u.addEventListener("load",this.onXHRLoad_.bind(this)),u.addEventListener("error",this.onXHRError_.bind(this)),u.open("GET",c.url),u.send()}else{if(!c.tileJSON)throw new Error("Either `url` or `tileJSON` options must be provided");this.handleTileJSONResponse(c.tileJSON)}}onXHRLoad_(c){const u=c.target;if(!u.status||u.status>=200&&u.status<300){let c;try{c=JSON.parse(u.responseText)}catch(c){return void this.handleTileJSONError()}this.handleTileJSONResponse(c)}else this.handleTileJSONError()}onXHRError_(c){this.handleTileJSONError()}getTemplate(){return this.template_}forDataAtCoordinateAndResolution(c,u,d,p){if(this.tileGrid){const g=this.tileGrid.getZForResolution(u,this.zDirection),f=this.tileGrid.getTileCoordForCoordAndZ(c,g);this.getTile(f[0],f[1],f[2],1,this.getProjection()).forDataAtCoordinate(c,d,p)}else!0===p?setTimeout((function(){d(null)}),0):d(null)}handleTileJSONError(){this.setState("error")}handleTileJSONResponse(c){const u=get$2("EPSG:4326"),d=this.getProjection();let p;if(void 0!==c.bounds){const g=getTransformFromProjections(u,d);p=applyTransform(c.bounds,g)}const g=extentFromProjection(d),f=c.minzoom||0,_=createXYZ({extent:g,maxZoom:c.maxzoom||22,minZoom:f});this.tileGrid=_,this.template_=c.template;const y=c.grids;if(y){if(this.tileUrlFunction_=createFromTemplates(y,_),c.attribution){const u=void 0!==p?p:g;this.setAttributions((function(d){return intersects$1(u,d.extent)?[c.attribution]:null}))}this.setState("ready")}else this.setState("error")}getTile(c,u,d,p,g){const f=getKeyZXY(c,u,d);if(this.tileCache.containsKey(f))return this.tileCache.get(f);const _=[c,u,d],y=this.getTileCoordForTileUrlFunction(_,g),x=this.tileUrlFunction_(y,p,g),v=new CustomTile(_,void 0!==x?co:mo,void 0!==x?x:"",this.tileGrid.getTileCoordExtent(_),this.preemptive_,this.jsonp_);return this.tileCache.set(f,v),v}useTile(c,u,d){const p=getKeyZXY(c,u,d);this.tileCache.containsKey(p)&&this.tileCache.get(p)}};var Hp=class WMTS extends hp{constructor(c){const u=void 0!==c.requestEncoding?c.requestEncoding:"KVP",d=c.tileGrid;let p=c.urls;void 0===p&&void 0!==c.url&&(p=expandUrl(c.url)),super({attributions:c.attributions,attributionsCollapsible:c.attributionsCollapsible,cacheSize:c.cacheSize,crossOrigin:c.crossOrigin,interpolate:c.interpolate,projection:c.projection,reprojectionErrorThreshold:c.reprojectionErrorThreshold,tileClass:c.tileClass,tileGrid:d,tileLoadFunction:c.tileLoadFunction,tilePixelRatio:c.tilePixelRatio,urls:p,wrapX:void 0!==c.wrapX&&c.wrapX,transition:c.transition,zDirection:c.zDirection}),this.version_=void 0!==c.version?c.version:"1.0.0",this.format_=void 0!==c.format?c.format:"image/jpeg",this.dimensions_=void 0!==c.dimensions?c.dimensions:{},this.layer_=c.layer,this.matrixSet_=c.matrixSet,this.style_=c.style,this.requestEncoding_=u,this.setKey(this.getKeyForDimensions_()),p&&p.length>0&&(this.tileUrlFunction=createFromTileUrlFunctions(p.map(this.createFromWMTSTemplate.bind(this))))}setUrls(c){this.urls=c;const u=c.join("\n");this.setTileUrlFunction(createFromTileUrlFunctions(c.map(this.createFromWMTSTemplate.bind(this))),u)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const c=this.urls?this.urls.slice(0):[];for(const u in this.dimensions_)c.push(u+"-"+this.dimensions_[u]);return c.join("/")}updateDimensions(c){Object.assign(this.dimensions_,c),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(c){const u=this.requestEncoding_,d={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==u&&Object.assign(d,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),c="KVP"==u?appendParams(c,d):c.replace(/\{(\w+?)\}/g,(function(c,u){return u.toLowerCase()in d?d[u.toLowerCase()]:c}));const p=this.tileGrid,g=this.dimensions_;return function(d,f,_){if(!d)return;const y={TileMatrix:p.getMatrixId(d[0]),TileCol:d[1],TileRow:d[2]};Object.assign(y,g);let x=c;return x="KVP"==u?appendParams(x,y):x.replace(/\{(\w+?)\}/g,(function(c,u){return y[u]})),x}}};var Jp=Object.freeze({__proto__:null,BingMaps:cp,CartoDB:up,Cluster:dp,DataTile:pp,Google:gp,IIIF:_p,Image:wp,ImageArcGISRest:Cp,ImageCanvas:Ep,ImageMapGuide:Pp,ImageStatic:bp,ImageTile:Rp,ImageWMS:Ip,OGCMapTile:Op,OGCVectorTile:Dp,OSM:OSM,Raster:Up,Source:Ks,StadiaMaps:Xp,Tile:rp,TileArcGISRest:Vp,TileDebug:qp,TileImage:hp,TileJSON:Yp,TileWMS:Zp,UTFGrid:Kp,UrlTile:lp,Vector:so,VectorTile:Np,WMTS:Hp,XYZ:XYZ,Zoomify:fp,createArcGISRestLoader:createLoader$3,createMapGuideLoader:createLoader$2,createStaticLoader:createLoader$1,createWMSLoader:createLoader,sourcesFromTileGrid:function sourcesFromTileGrid(c,u){const d=new LRUCache(32),p=c.getExtent();return function(g,f){d.expireCache(),p&&(g=getIntersection(p,g));const _=c.getZForResolution(f),y=[];return c.forEachTileCoord(g,_,(c=>{const p=c.toString();if(!d.containsKey(p)){const g=u(c);d.set(p,g)}y.push(d.get(p))})),y}}});var Qp=1,tg=2,eg=3,ig=4,rg=5,ng=6378137,sg=6356752.314,og=.0066943799901413165,ag=484813681109536e-20,lg=Math.PI/2,hg=.16666666666666666,cg=.04722222222222222,ug=.022156084656084655,dg=1e-10,pg=.017453292519943295,gg=57.29577951308232,mg=Math.PI/4,fg=2*Math.PI,_g=3.14159265359,yg={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},xg={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},vg=/[\s_\-\/\(\)]/g;function match(c,u){if(c[u])return c[u];for(var d,p=Object.keys(c),g=u.toLowerCase().replace(vg,""),f=-1;++f<p.length;)if((d=p[f]).toLowerCase().replace(vg,"")===g)return c[d]}function projStr(c){var u,d,p,g={},f=c.split("+").map((function(c){return c.trim()})).filter((function(c){return c})).reduce((function(c,u){var d=u.split("=");return d.push(!0),c[d[0].toLowerCase()]=d[1],c}),{}),_={proj:"projName",datum:"datumCode",rf:function(c){g.rf=parseFloat(c)},lat_0:function(c){g.lat0=c*pg},lat_1:function(c){g.lat1=c*pg},lat_2:function(c){g.lat2=c*pg},lat_ts:function(c){g.lat_ts=c*pg},lon_0:function(c){g.long0=c*pg},lon_1:function(c){g.long1=c*pg},lon_2:function(c){g.long2=c*pg},alpha:function(c){g.alpha=parseFloat(c)*pg},gamma:function(c){g.rectified_grid_angle=parseFloat(c)},lonc:function(c){g.longc=c*pg},x_0:function(c){g.x0=parseFloat(c)},y_0:function(c){g.y0=parseFloat(c)},k_0:function(c){g.k0=parseFloat(c)},k:function(c){g.k0=parseFloat(c)},a:function(c){g.a=parseFloat(c)},b:function(c){g.b=parseFloat(c)},r:function(c){g.a=g.b=parseFloat(c)},r_a:function(){g.R_A=!0},zone:function(c){g.zone=parseInt(c,10)},south:function(){g.utmSouth=!0},towgs84:function(c){g.datum_params=c.split(",").map((function(c){return parseFloat(c)}))},to_meter:function(c){g.to_meter=parseFloat(c)},units:function(c){g.units=c;var u=match(xg,c);u&&(g.to_meter=u.to_meter)},from_greenwich:function(c){g.from_greenwich=c*pg},pm:function(c){var u=match(yg,c);g.from_greenwich=(u||parseFloat(c))*pg},nadgrids:function(c){"@null"===c?g.datumCode="none":g.nadgrids=c},axis:function(c){var u="ewnsud";3===c.length&&-1!==u.indexOf(c.substr(0,1))&&-1!==u.indexOf(c.substr(1,1))&&-1!==u.indexOf(c.substr(2,1))&&(g.axis=c)},approx:function(){g.approx=!0}};for(u in f)d=f[u],u in _?"function"==typeof(p=_[u])?p(d):g[p]=d:g[u]=d;return"string"==typeof g.datumCode&&"WGS84"!==g.datumCode&&(g.datumCode=g.datumCode.toLowerCase()),g}var Sg=1,wg=/\s/,Cg=/[A-Za-z]/,Eg=/[A-Za-z84_]/,Pg=/[,\]]/,bg=/[\d\.E\-\+]/;function Parser(c){if("string"!=typeof c)throw new Error("not a string");this.text=c.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Sg}function mapit(c,u,d){Array.isArray(u)&&(d.unshift(u),u=null);var p=u?{}:c,g=d.reduce((function(c,u){return sExpr(u,c),c}),p);u&&(c[u]=g)}function sExpr(c,u){if(Array.isArray(c)){var d=c.shift();if("PARAMETER"===d&&(d=c.shift()),1===c.length)return Array.isArray(c[0])?(u[d]={},void sExpr(c[0],u[d])):void(u[d]=c[0]);if(c.length)if("TOWGS84"!==d){if("AXIS"===d)return d in u||(u[d]=[]),void u[d].push(c);var p;switch(Array.isArray(d)||(u[d]={}),d){case"UNIT":case"PRIMEM":case"VERT_DATUM":return u[d]={name:c[0].toLowerCase(),convert:c[1]},void(3===c.length&&sExpr(c[2],u[d]));case"SPHEROID":case"ELLIPSOID":return u[d]={name:c[0],a:c[1],rf:c[2]},void(4===c.length&&sExpr(c[3],u[d]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return c[0]=["name",c[0]],void mapit(u,d,c);default:for(p=-1;++p<c.length;)if(!Array.isArray(c[p]))return sExpr(c,u[d]);return mapit(u,d,c)}}else u[d]=c;else u[d]=!0}else u[c]=!0}Parser.prototype.readCharicter=function(){var c=this.text[this.place++];if(4!==this.state)for(;wg.test(c);){if(this.place>=this.text.length)return;c=this.text[this.place++]}switch(this.state){case Sg:return this.neutral(c);case 2:return this.keyword(c);case 4:return this.quoted(c);case 5:return this.afterquote(c);case 3:return this.number(c);case-1:return}},Parser.prototype.afterquote=function(c){if('"'===c)return this.word+='"',void(this.state=4);if(Pg.test(c))return this.word=this.word.trim(),void this.afterItem(c);throw new Error("havn't handled \""+c+'" in afterquote yet, index '+this.place)},Parser.prototype.afterItem=function(c){return","===c?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Sg)):"]"===c?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Sg,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},Parser.prototype.number=function(c){if(!bg.test(c)){if(Pg.test(c))return this.word=parseFloat(this.word),void this.afterItem(c);throw new Error("havn't handled \""+c+'" in number yet, index '+this.place)}this.word+=c},Parser.prototype.quoted=function(c){'"'!==c?this.word+=c:this.state=5},Parser.prototype.keyword=function(c){if(Eg.test(c))this.word+=c;else{if("["===c){var u=[];return u.push(this.word),this.level++,null===this.root?this.root=u:this.currentObject.push(u),this.stack.push(this.currentObject),this.currentObject=u,void(this.state=Sg)}if(!Pg.test(c))throw new Error("havn't handled \""+c+'" in keyword yet, index '+this.place);this.afterItem(c)}},Parser.prototype.neutral=function(c){if(Cg.test(c))return this.word=c,void(this.state=2);if('"'===c)return this.word="",void(this.state=4);if(bg.test(c))return this.word=c,void(this.state=3);if(!Pg.test(c))throw new Error("havn't handled \""+c+'" in neutral yet, index '+this.place);this.afterItem(c)},Parser.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var Mg=.017453292519943295;function d2r(c){return c*Mg}function wkt(c){var u=function parseString(c){return new Parser(c).output()}(c),d=u.shift(),p=u.shift();u.unshift(["name",p]),u.unshift(["type",d]);var g={};return sExpr(u,g),function cleanWKT(c){if("GEOGCS"===c.type?c.projName="longlat":"LOCAL_CS"===c.type?(c.projName="identity",c.local=!0):"object"==typeof c.PROJECTION?c.projName=Object.keys(c.PROJECTION)[0]:c.projName=c.PROJECTION,c.AXIS){for(var u="",d=0,p=c.AXIS.length;d<p;++d){var g=[c.AXIS[d][0].toLowerCase(),c.AXIS[d][1].toLowerCase()];-1!==g[0].indexOf("north")||("y"===g[0]||"lat"===g[0])&&"north"===g[1]?u+="n":-1!==g[0].indexOf("south")||("y"===g[0]||"lat"===g[0])&&"south"===g[1]?u+="s":-1!==g[0].indexOf("east")||("x"===g[0]||"lon"===g[0])&&"east"===g[1]?u+="e":-1===g[0].indexOf("west")&&("x"!==g[0]&&"lon"!==g[0]||"west"!==g[1])||(u+="w")}2===u.length&&(u+="u"),3===u.length&&(c.axis=u)}c.UNIT&&(c.units=c.UNIT.name.toLowerCase(),"metre"===c.units&&(c.units="meter"),c.UNIT.convert&&("GEOGCS"===c.type?c.DATUM&&c.DATUM.SPHEROID&&(c.to_meter=c.UNIT.convert*c.DATUM.SPHEROID.a):c.to_meter=c.UNIT.convert));var f=c.GEOGCS;function toMeter(u){return u*(c.to_meter||1)}"GEOGCS"===c.type&&(f=c),f&&(f.DATUM?c.datumCode=f.DATUM.name.toLowerCase():c.datumCode=f.name.toLowerCase(),"d_"===c.datumCode.slice(0,2)&&(c.datumCode=c.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==c.datumCode&&"new_zealand_1949"!==c.datumCode||(c.datumCode="nzgd49"),"wgs_1984"!==c.datumCode&&"world_geodetic_system_1984"!==c.datumCode||("Mercator_Auxiliary_Sphere"===c.PROJECTION&&(c.sphere=!0),c.datumCode="wgs84"),"_ferro"===c.datumCode.slice(-6)&&(c.datumCode=c.datumCode.slice(0,-6)),"_jakarta"===c.datumCode.slice(-8)&&(c.datumCode=c.datumCode.slice(0,-8)),~c.datumCode.indexOf("belge")&&(c.datumCode="rnb72"),f.DATUM&&f.DATUM.SPHEROID&&(c.ellps=f.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===c.ellps.toLowerCase().slice(0,13)&&(c.ellps="intl"),c.a=f.DATUM.SPHEROID.a,c.rf=parseFloat(f.DATUM.SPHEROID.rf,10)),f.DATUM&&f.DATUM.TOWGS84&&(c.datum_params=f.DATUM.TOWGS84),~c.datumCode.indexOf("osgb_1936")&&(c.datumCode="osgb36"),~c.datumCode.indexOf("osni_1952")&&(c.datumCode="osni52"),(~c.datumCode.indexOf("tm65")||~c.datumCode.indexOf("geodetic_datum_of_1965"))&&(c.datumCode="ire65"),"ch1903+"===c.datumCode&&(c.datumCode="ch1903"),~c.datumCode.indexOf("israel")&&(c.datumCode="isr93")),c.b&&!isFinite(c.b)&&(c.b=c.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",d2r],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",d2r],["x0","false_easting",toMeter],["y0","false_northing",toMeter],["long0","central_meridian",d2r],["lat0","latitude_of_origin",d2r],["lat0","standard_parallel_1",d2r],["lat1","standard_parallel_1",d2r],["lat2","standard_parallel_2",d2r],["azimuth","Azimuth"],["alpha","azimuth",d2r],["srsCode","name"]].forEach((function(u){return function rename(c,u){var d=u[0],p=u[1];!(d in c)&&p in c&&(c[d]=c[p],3===u.length&&(c[d]=u[2](c[d])))}(c,u)})),c.long0||!c.longc||"Albers_Conic_Equal_Area"!==c.projName&&"Lambert_Azimuthal_Equal_Area"!==c.projName||(c.long0=c.longc),c.lat_ts||!c.lat1||"Stereographic_South_Pole"!==c.projName&&"Polar Stereographic (variant B)"!==c.projName?!c.lat_ts&&c.lat0&&"Polar_Stereographic"===c.projName&&(c.lat_ts=c.lat0,c.lat0=d2r(c.lat0>0?90:-90)):(c.lat0=d2r(c.lat1>0?90:-90),c.lat_ts=c.lat1)}(g),g}function defs(c){var u=this;if(2===arguments.length){var d=arguments[1];"string"==typeof d?"+"===d.charAt(0)?defs[c]=projStr(arguments[1]):defs[c]=wkt(arguments[1]):defs[c]=d}else if(1===arguments.length){if(Array.isArray(c))return c.map((function(c){Array.isArray(c)?defs.apply(u,c):defs(c)}));if("string"==typeof c){if(c in defs)return defs[c]}else"EPSG"in c?defs["EPSG:"+c.EPSG]=c:"ESRI"in c?defs["ESRI:"+c.ESRI]=c:"IAU2000"in c?defs["IAU2000:"+c.IAU2000]=c:console.log(c);return}}!function globals(c){c("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),c("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),c("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),c.WGS84=c["EPSG:4326"],c["EPSG:3785"]=c["EPSG:3857"],c.GOOGLE=c["EPSG:3857"],c["EPSG:900913"]=c["EPSG:3857"],c["EPSG:102113"]=c["EPSG:3857"]}(defs);var Tg=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var Rg=["3857","900913","3785","102113"];function parse(c){if(!function testObj(c){return"string"==typeof c}(c))return c;if(function testDef(c){return c in defs}(c))return defs[c];if(function testWKT(c){return Tg.some((function(u){return c.indexOf(u)>-1}))}(c)){var u=wkt(c);if(function checkMercator(c){var u=match(c,"authority");if(u){var d=match(u,"epsg");return d&&Rg.indexOf(d)>-1}}(u))return defs["EPSG:3857"];var d=function checkProjStr(c){var u=match(c,"extension");if(u)return match(u,"proj4")}(u);return d?projStr(d):u}return function testProj(c){return"+"===c[0]}(c)?projStr(c):void 0}function extend(c,u){var d,p;if(c=c||{},!u)return c;for(p in u)void 0!==(d=u[p])&&(c[p]=d);return c}function msfnz(c,u,d){var p=c*u;return d/Math.sqrt(1-p*p)}function sign(c){return c<0?-1:1}function adjust_lon(c){return Math.abs(c)<=_g?c:c-sign(c)*fg}function tsfnz(c,u,d){var p=c*d,g=.5*c;return p=Math.pow((1-p)/(1+p),g),Math.tan(.5*(lg-u))/p}function phi2z(c,u){for(var d,p,g=.5*c,f=lg-2*Math.atan(u),_=0;_<=15;_++)if(d=c*Math.sin(f),f+=p=lg-2*Math.atan(u*Math.pow((1-d)/(1+d),g))-f,Math.abs(p)<=1e-10)return f;return-9999}var Lg={init:function init$x(){var c=this.b/this.a;this.es=1-c*c,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function forward$v(c){var u,d,p=c.x,g=c.y;if(g*gg>90&&g*gg<-90&&p*gg>180&&p*gg<-180)return null;if(Math.abs(Math.abs(g)-lg)<=dg)return null;if(this.sphere)u=this.x0+this.a*this.k0*adjust_lon(p-this.long0),d=this.y0+this.a*this.k0*Math.log(Math.tan(mg+.5*g));else{var f=Math.sin(g),_=tsfnz(this.e,g,f);u=this.x0+this.a*this.k0*adjust_lon(p-this.long0),d=this.y0-this.a*this.k0*Math.log(_)}return c.x=u,c.y=d,c},inverse:function inverse$v(c){var u,d,p=c.x-this.x0,g=c.y-this.y0;if(this.sphere)d=lg-2*Math.atan(Math.exp(-g/(this.a*this.k0)));else{var f=Math.exp(-g/(this.a*this.k0));if(-9999===(d=phi2z(this.e,f)))return null}return u=adjust_lon(this.long0+p/(this.a*this.k0)),c.x=u,c.y=d,c},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]};function identity(c){return c}var Ag=[Lg,{init:function init$w(){},forward:identity,inverse:identity,names:["longlat","identity"]}],Ig={},Fg=[];function add(c,u){var d=Fg.length;return c.names?(Fg[d]=c,c.names.forEach((function(c){Ig[c.toLowerCase()]=d})),this):(console.log(u),!0)}var kg={start:function start(){Ag.forEach(add)},add:add,get:function get(c){if(!c)return!1;var u=c.toLowerCase();return void 0!==Ig[u]&&Fg[Ig[u]]?Fg[Ig[u]]:void 0}},Og={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Ng=Og.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Og.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Dg={};Dg.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Dg.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Dg.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Dg.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Dg.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Dg.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Dg.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Dg.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},Dg.militargeographische_institut={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},Dg.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Dg.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Dg.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Dg.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Dg.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Dg.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Dg.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Dg.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Dg.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var Gg={};function parseNadgridString(c){if(0===c.length)return null;var u="@"===c[0];return u&&(c=c.slice(1)),"null"===c?{name:"null",mandatory:!u,grid:null,isNull:!0}:{name:c,mandatory:!u,grid:Gg[c]||null,isNull:!1}}function secondsToRadians(c){return c/3600*Math.PI/180}function decodeString(c,u,d){return String.fromCharCode.apply(null,new Uint8Array(c.buffer.slice(u,d)))}function mapNodes(c){return c.map((function(c){return[secondsToRadians(c.longitudeShift),secondsToRadians(c.latitudeShift)]}))}function readGridHeader(c,u,d){return{name:decodeString(c,u+8,u+16).trim(),parent:decodeString(c,u+24,u+24+8).trim(),lowerLatitude:c.getFloat64(u+72,d),upperLatitude:c.getFloat64(u+88,d),lowerLongitude:c.getFloat64(u+104,d),upperLongitude:c.getFloat64(u+120,d),latitudeInterval:c.getFloat64(u+136,d),longitudeInterval:c.getFloat64(u+152,d),gridNodeCount:c.getInt32(u+168,d)}}function readGridNodes(c,u,d,p){for(var g=u+176,f=[],_=0;_<d.gridNodeCount;_++){var y={latitudeShift:c.getFloat32(g+16*_,p),longitudeShift:c.getFloat32(g+16*_+4,p),latitudeAccuracy:c.getFloat32(g+16*_+8,p),longitudeAccuracy:c.getFloat32(g+16*_+12,p)};f.push(y)}return f}function Projection(c,u){if(!(this instanceof Projection))return new Projection(c);u=u||function(c){if(c)throw c};var d=parse(c);if("object"==typeof d){var p=Projection.projections.get(d.projName);if(p){if(d.datumCode&&"none"!==d.datumCode){var g=match(Dg,d.datumCode);g&&(d.datum_params=d.datum_params||(g.towgs84?g.towgs84.split(","):null),d.ellps=g.ellipse,d.datumName=g.datumName?g.datumName:d.datumCode)}d.k0=d.k0||1,d.axis=d.axis||"enu",d.ellps=d.ellps||"wgs84",d.lat1=d.lat1||d.lat0;var f=function sphere(c,u,d,p,g){if(!c){var f=match(Og,p);f||(f=Ng),c=f.a,u=f.b,d=f.rf}return d&&!u&&(u=(1-1/d)*c),(0===d||Math.abs(c-u)<dg)&&(g=!0,u=c),{a:c,b:u,rf:d,sphere:g}}(d.a,d.b,d.rf,d.ellps,d.sphere),_=function eccentricity(c,u,d,p){var g=c*c,f=u*u,_=(g-f)/g,y=0;return p?(g=(c*=1-_*(hg+_*(cg+_*ug)))*c,_=0):y=Math.sqrt(_),{es:_,e:y,ep2:(g-f)/f}}(f.a,f.b,f.rf,d.R_A),y=function getNadgrids(c){return void 0===c?null:c.split(",").map(parseNadgridString)}(d.nadgrids),x=d.datum||function datum(c,u,d,p,g,f,_){var y={};return y.datum_type=void 0===c||"none"===c?rg:ig,u&&(y.datum_params=u.map(parseFloat),0===y.datum_params[0]&&0===y.datum_params[1]&&0===y.datum_params[2]||(y.datum_type=Qp),y.datum_params.length>3&&(0===y.datum_params[3]&&0===y.datum_params[4]&&0===y.datum_params[5]&&0===y.datum_params[6]||(y.datum_type=tg,y.datum_params[3]*=ag,y.datum_params[4]*=ag,y.datum_params[5]*=ag,y.datum_params[6]=y.datum_params[6]/1e6+1))),_&&(y.datum_type=eg,y.grids=_),y.a=d,y.b=p,y.es=g,y.ep2=f,y}(d.datumCode,d.datum_params,f.a,f.b,_.es,_.ep2,y);extend(this,d),extend(this,p),this.a=f.a,this.b=f.b,this.rf=f.rf,this.sphere=f.sphere,this.es=_.es,this.e=_.e,this.ep2=_.ep2,this.datum=x,this.init(),u(null,this)}else u("Could not get projection name from: "+c)}else u("Could not parse to valid json: "+c)}function geodeticToGeocentric(c,u,d){var p,g,f,_,y=c.x,x=c.y,v=c.z?c.z:0;if(x<-lg&&x>-1.001*lg)x=-lg;else if(x>lg&&x<1.001*lg)x=lg;else{if(x<-lg)return{x:-1/0,y:-1/0,z:c.z};if(x>lg)return{x:1/0,y:1/0,z:c.z}}return y>Math.PI&&(y-=2*Math.PI),g=Math.sin(x),_=Math.cos(x),f=g*g,{x:((p=d/Math.sqrt(1-u*f))+v)*_*Math.cos(y),y:(p+v)*_*Math.sin(y),z:(p*(1-u)+v)*g}}function geocentricToGeodetic(c,u,d,p){var g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G=1e-12,j=c.x,B=c.y,V=c.z?c.z:0;if(g=Math.sqrt(j*j+B*B),f=Math.sqrt(j*j+B*B+V*V),g/d<G){if(O=0,f/d<G)return N=-p,{x:c.x,y:c.y,z:c.z}}else O=Math.atan2(B,j);_=V/f,M=(y=g/f)*(1-u)*(x=1/Math.sqrt(1-u*(2-u)*y*y)),T=_*x,k=0;do{k++,v=u*(C=d/Math.sqrt(1-u*T*T))/(C+(N=g*M+V*T-C*(1-u*T*T))),I=(A=_*(x=1/Math.sqrt(1-v*(2-v)*y*y)))*M-(L=y*(1-v)*x)*T,M=L,T=A}while(I*I>1e-24&&k<30);return{x:O,y:Math.atan(A/Math.abs(L)),z:N}}function checkParams(c){return c===Qp||c===tg}function datum_transform(c,u,d){if(function compareDatums(c,u){return c.datum_type===u.datum_type&&!(c.a!==u.a||Math.abs(c.es-u.es)>5e-11)&&(c.datum_type===Qp?c.datum_params[0]===u.datum_params[0]&&c.datum_params[1]===u.datum_params[1]&&c.datum_params[2]===u.datum_params[2]:c.datum_type!==tg||c.datum_params[0]===u.datum_params[0]&&c.datum_params[1]===u.datum_params[1]&&c.datum_params[2]===u.datum_params[2]&&c.datum_params[3]===u.datum_params[3]&&c.datum_params[4]===u.datum_params[4]&&c.datum_params[5]===u.datum_params[5]&&c.datum_params[6]===u.datum_params[6])}(c,u))return d;if(c.datum_type===rg||u.datum_type===rg)return d;var p=c.a,g=c.es;if(c.datum_type===eg){if(0!==applyGridShift(c,!1,d))return;p=ng,g=og}var f=u.a,_=u.b,y=u.es;if(u.datum_type===eg&&(f=ng,_=sg,y=og),g===y&&p===f&&!checkParams(c.datum_type)&&!checkParams(u.datum_type))return d;if((d=geodeticToGeocentric(d,g,p),checkParams(c.datum_type)&&(d=function geocentricToWgs84(c,u,d){if(u===Qp)return{x:c.x+d[0],y:c.y+d[1],z:c.z+d[2]};if(u===tg){var p=d[0],g=d[1],f=d[2],_=d[3],y=d[4],x=d[5],v=d[6];return{x:v*(c.x-x*c.y+y*c.z)+p,y:v*(x*c.x+c.y-_*c.z)+g,z:v*(-y*c.x+_*c.y+c.z)+f}}}(d,c.datum_type,c.datum_params)),checkParams(u.datum_type)&&(d=function geocentricFromWgs84(c,u,d){if(u===Qp)return{x:c.x-d[0],y:c.y-d[1],z:c.z-d[2]};if(u===tg){var p=d[0],g=d[1],f=d[2],_=d[3],y=d[4],x=d[5],v=d[6],C=(c.x-p)/v,M=(c.y-g)/v,T=(c.z-f)/v;return{x:C+x*M-y*T,y:-x*C+M+_*T,z:y*C-_*M+T}}}(d,u.datum_type,u.datum_params)),d=geocentricToGeodetic(d,y,f,_),u.datum_type===eg)&&0!==applyGridShift(u,!0,d))return;return d}function applyGridShift(c,u,d){if(null===c.grids||0===c.grids.length)return console.log("Grid shift grids not found"),-1;var p={x:-d.x,y:d.y},g={x:Number.NaN,y:Number.NaN},f=[];t:for(var _=0;_<c.grids.length;_++){var y=c.grids[_];if(f.push(y.name),y.isNull){g=p;break}if(y.mandatory,null!==y.grid)for(var x=y.grid.subgrids,v=0,C=x.length;v<C;v++){var M=x[v],T=(Math.abs(M.del[1])+Math.abs(M.del[0]))/1e4,L=M.ll[0]-T,A=M.ll[1]-T,I=M.ll[0]+(M.lim[0]-1)*M.del[0]+T,k=M.ll[1]+(M.lim[1]-1)*M.del[1]+T;if(!(A>p.y||L>p.x||k<p.y||I<p.x)&&(g=applySubgridShift(p,u,M),!isNaN(g.x)))break t}else if(y.mandatory)return console.log("Unable to find mandatory grid '"+y.name+"'"),-1}return isNaN(g.x)?(console.log("Failed to find a grid shift table for location '"+-p.x*gg+" "+p.y*gg+" tried: '"+f+"'"),-1):(d.x=-g.x,d.y=g.y,0)}function applySubgridShift(c,u,d){var p={x:Number.NaN,y:Number.NaN};if(isNaN(c.x))return p;var g={x:c.x,y:c.y};g.x-=d.ll[0],g.y-=d.ll[1],g.x=adjust_lon(g.x-Math.PI)+Math.PI;var f=nadInterpolate(g,d);if(u){if(isNaN(f.x))return p;f.x=g.x-f.x,f.y=g.y-f.y;var _,y,x=9;do{if(y=nadInterpolate(f,d),isNaN(y.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}_={x:g.x-(y.x+f.x),y:g.y-(y.y+f.y)},f.x+=_.x,f.y+=_.y}while(x--&&Math.abs(_.x)>1e-12&&Math.abs(_.y)>1e-12);if(x<0)return console.log("Inverse grid shift iterator failed to converge."),p;p.x=adjust_lon(f.x+d.ll[0]),p.y=f.y+d.ll[1]}else isNaN(f.x)||(p.x=c.x+f.x,p.y=c.y+f.y);return p}function nadInterpolate(c,u){var d,p={x:c.x/u.del[0],y:c.y/u.del[1]},g=Math.floor(p.x),f=Math.floor(p.y),_=p.x-1*g,y=p.y-1*f,x={x:Number.NaN,y:Number.NaN};if(g<0||g>=u.lim[0])return x;if(f<0||f>=u.lim[1])return x;d=f*u.lim[0]+g;var v=u.cvs[d][0],C=u.cvs[d][1];d++;var M=u.cvs[d][0],T=u.cvs[d][1];d+=u.lim[0];var L=u.cvs[d][0],A=u.cvs[d][1];d--;var I=u.cvs[d][0],k=u.cvs[d][1],O=_*y,N=_*(1-y),G=(1-_)*(1-y),j=(1-_)*y;return x.x=G*v+N*M+j*I+O*L,x.y=G*C+N*T+j*k+O*A,x}function adjust_axis(c,u,d){var p,g,f,_=d.x,y=d.y,x=d.z||0,v={};for(f=0;f<3;f++)if(!u||2!==f||void 0!==d.z)switch(0===f?(p=_,g=-1!=="ew".indexOf(c.axis[f])?"x":"y"):1===f?(p=y,g=-1!=="ns".indexOf(c.axis[f])?"y":"x"):(p=x,g="z"),c.axis[f]){case"e":case"n":v[g]=p;break;case"w":case"s":v[g]=-p;break;case"u":void 0!==d[g]&&(v.z=p);break;case"d":void 0!==d[g]&&(v.z=-p);break;default:return null}return v}function common(c){var u={x:c[0],y:c[1]};return c.length>2&&(u.z=c[2]),c.length>3&&(u.m=c[3]),u}function checkCoord(c){if("function"==typeof Number.isFinite){if(Number.isFinite(c))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof c||c!=c||!isFinite(c))throw new TypeError("coordinates must be finite numbers")}function transform(c,u,d,p){var g,f=void 0!==(d=Array.isArray(d)?common(d):{x:d.x,y:d.y,z:d.z,m:d.m}).z;if(function checkSanity(c){checkCoord(c.x),checkCoord(c.y)}(d),c.datum&&u.datum&&function checkNotWGS(c,u){return(c.datum.datum_type===Qp||c.datum.datum_type===tg||c.datum.datum_type===eg)&&"WGS84"!==u.datumCode||(u.datum.datum_type===Qp||u.datum.datum_type===tg||u.datum.datum_type===eg)&&"WGS84"!==c.datumCode}(c,u)&&(d=transform(c,g=new Projection("WGS84"),d,p),c=g),p&&"enu"!==c.axis&&(d=adjust_axis(c,!1,d)),"longlat"===c.projName)d={x:d.x*pg,y:d.y*pg,z:d.z||0};else if(c.to_meter&&(d={x:d.x*c.to_meter,y:d.y*c.to_meter,z:d.z||0}),!(d=c.inverse(d)))return;if(c.from_greenwich&&(d.x+=c.from_greenwich),d=datum_transform(c.datum,u.datum,d))return u.from_greenwich&&(d={x:d.x-u.from_greenwich,y:d.y,z:d.z||0}),"longlat"===u.projName?d={x:d.x*gg,y:d.y*gg,z:d.z||0}:(d=u.forward(d),u.to_meter&&(d={x:d.x/u.to_meter,y:d.y/u.to_meter,z:d.z||0})),p&&"enu"!==u.axis?adjust_axis(u,!0,d):(d&&!f&&delete d.z,d)}Projection.projections=kg,Projection.projections.start();var jg=Projection("WGS84");function transformer(c,u,d,p){var g,f,_;return Array.isArray(d)?(g=transform(c,u,d,p)||{x:NaN,y:NaN},d.length>2?void 0!==c.name&&"geocent"===c.name||void 0!==u.name&&"geocent"===u.name?"number"==typeof g.z?[g.x,g.y,g.z].concat(d.splice(3)):[g.x,g.y,d[2]].concat(d.splice(3)):[g.x,g.y].concat(d.splice(2)):[g.x,g.y]):(f=transform(c,u,d,p),2===(_=Object.keys(d)).length||_.forEach((function(p){if(void 0!==c.name&&"geocent"===c.name||void 0!==u.name&&"geocent"===u.name){if("x"===p||"y"===p||"z"===p)return}else if("x"===p||"y"===p)return;f[p]=d[p]})),f)}function checkProj(c){return c instanceof Projection?c:c.oProj?c.oProj:Projection(c)}function proj4(c,u,d){c=checkProj(c);var p,g=!1;return void 0===u?(u=c,c=jg,g=!0):(void 0!==u.x||Array.isArray(u))&&(d=u,u=c,c=jg,g=!0),u=checkProj(u),d?transformer(c,u,d):(p={forward:function(d,p){return transformer(c,u,d,p)},inverse:function(d,p){return transformer(u,c,d,p)}},g&&(p.oProj=u),p)}var zg=6,Bg="AJSAJS",Ug="AFAFAF",$g=65,Wg=73,Xg=79,Vg=86,qg=90,Yg={forward:forward$u,inverse:function inverse$u(c){var u=UTMtoLL(decode(c.toUpperCase()));if(u.lat&&u.lon)return[u.lon,u.lat,u.lon,u.lat];return[u.left,u.bottom,u.right,u.top]},toPoint:toPoint};function forward$u(c,u){return u=u||5,function encode(c,u){var d="00000"+c.easting,p="00000"+c.northing;return c.zoneNumber+c.zoneLetter+function get100kID(c,u,d){var p=get100kSetForZone(d),g=Math.floor(c/1e5),f=Math.floor(u/1e5)%20;return function getLetter100kID(c,u,d){var p=d-1,g=Bg.charCodeAt(p),f=Ug.charCodeAt(p),_=g+c-1,y=f+u,x=!1;_>qg&&(_=_-qg+$g-1,x=!0);(_===Wg||g<Wg&&_>Wg||(_>Wg||g<Wg)&&x)&&_++;(_===Xg||g<Xg&&_>Xg||(_>Xg||g<Xg)&&x)&&++_===Wg&&_++;_>qg&&(_=_-qg+$g-1);y>Vg?(y=y-Vg+$g-1,x=!0):x=!1;(y===Wg||f<Wg&&y>Wg||(y>Wg||f<Wg)&&x)&&y++;(y===Xg||f<Xg&&y>Xg||(y>Xg||f<Xg)&&x)&&++y===Wg&&y++;y>Vg&&(y=y-Vg+$g-1);return String.fromCharCode(_)+String.fromCharCode(y)}(g,f,p)}(c.easting,c.northing,c.zoneNumber)+d.substr(d.length-5,u)+p.substr(p.length-5,u)}(function LLtoUTM(c){var u,d,p,g,f,_,y,x,v=c.lat,C=c.lon,M=6378137,T=.00669438,L=.9996,A=degToRad(v),I=degToRad(C);x=Math.floor((C+180)/6)+1,180===C&&(x=60);v>=56&&v<64&&C>=3&&C<12&&(x=32);v>=72&&v<84&&(C>=0&&C<9?x=31:C>=9&&C<21?x=33:C>=21&&C<33?x=35:C>=33&&C<42&&(x=37));y=degToRad(6*(x-1)-180+3),u=T/(1-T),d=M/Math.sqrt(1-T*Math.sin(A)*Math.sin(A)),p=Math.tan(A)*Math.tan(A),g=u*Math.cos(A)*Math.cos(A),f=Math.cos(A)*(I-y),_=M*((1-T/4-3*T*T/64-5*T*T*T/256)*A-(3*T/8+3*T*T/32+45*T*T*T/1024)*Math.sin(2*A)+(15*T*T/256+45*T*T*T/1024)*Math.sin(4*A)-35*T*T*T/3072*Math.sin(6*A));var k=L*d*(f+(1-p+g)*f*f*f/6+(5-18*p+p*p+72*g-58*u)*f*f*f*f*f/120)+5e5,O=L*(_+d*Math.tan(A)*(f*f/2+(5-p+9*g+4*g*g)*f*f*f*f/24+(61-58*p+p*p+600*g-330*u)*f*f*f*f*f*f/720));v<0&&(O+=1e7);return{northing:Math.round(O),easting:Math.round(k),zoneNumber:x,zoneLetter:getLetterDesignator(v)}}({lat:c[1],lon:c[0]}),u)}function toPoint(c){var u=UTMtoLL(decode(c.toUpperCase()));return u.lat&&u.lon?[u.lon,u.lat]:[(u.left+u.right)/2,(u.top+u.bottom)/2]}function degToRad(c){return c*(Math.PI/180)}function radToDeg(c){return c/Math.PI*180}function UTMtoLL(c){var u=c.northing,d=c.easting,p=c.zoneLetter,g=c.zoneNumber;if(g<0||g>60)return null;var f,_,y,x,v,C,M,T,L,A=.9996,I=6378137,k=.00669438,O=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),N=d-5e5,G=u;p<"N"&&(G-=1e7),M=6*(g-1)-180+3,f=.006739496752268451,L=(T=G/A/6367449.145945056)+(3*O/2-27*O*O*O/32)*Math.sin(2*T)+(21*O*O/16-55*O*O*O*O/32)*Math.sin(4*T)+151*O*O*O/96*Math.sin(6*T),_=I/Math.sqrt(1-k*Math.sin(L)*Math.sin(L)),y=Math.tan(L)*Math.tan(L),x=f*Math.cos(L)*Math.cos(L),v=.99330562*I/Math.pow(1-k*Math.sin(L)*Math.sin(L),1.5),C=N/(_*A);var j=L-_*Math.tan(L)/v*(C*C/2-(5+3*y+10*x-4*x*x-9*f)*C*C*C*C/24+(61+90*y+298*x+45*y*y-1.6983531815716497-3*x*x)*C*C*C*C*C*C/720);j=radToDeg(j);var B,V=(C-(1+2*y+x)*C*C*C/6+(5-2*x+28*y-3*x*x+8*f+24*y*y)*C*C*C*C*C/120)/Math.cos(L);if(V=M+radToDeg(V),c.accuracy){var q=UTMtoLL({northing:c.northing+c.accuracy,easting:c.easting+c.accuracy,zoneLetter:c.zoneLetter,zoneNumber:c.zoneNumber});B={top:q.lat,right:q.lon,bottom:j,left:V}}else B={lat:j,lon:V};return B}function getLetterDesignator(c){var u="Z";return 84>=c&&c>=72?u="X":72>c&&c>=64?u="W":64>c&&c>=56?u="V":56>c&&c>=48?u="U":48>c&&c>=40?u="T":40>c&&c>=32?u="S":32>c&&c>=24?u="R":24>c&&c>=16?u="Q":16>c&&c>=8?u="P":8>c&&c>=0?u="N":0>c&&c>=-8?u="M":-8>c&&c>=-16?u="L":-16>c&&c>=-24?u="K":-24>c&&c>=-32?u="J":-32>c&&c>=-40?u="H":-40>c&&c>=-48?u="G":-48>c&&c>=-56?u="F":-56>c&&c>=-64?u="E":-64>c&&c>=-72?u="D":-72>c&&c>=-80&&(u="C"),u}function get100kSetForZone(c){var u=c%zg;return 0===u&&(u=zg),u}function decode(c){if(c&&0===c.length)throw"MGRSPoint coverting from nothing";for(var u,d=c.length,p=null,g="",f=0;!/[A-Z]/.test(u=c.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+c;g+=u,f++}var _=parseInt(g,10);if(0===f||f+3>d)throw"MGRSPoint bad conversion from: "+c;var y=c.charAt(f++);if(y<="A"||"B"===y||"Y"===y||y>="Z"||"I"===y||"O"===y)throw"MGRSPoint zone letter "+y+" not handled: "+c;p=c.substring(f,f+=2);for(var x=get100kSetForZone(_),v=function getEastingFromChar(c,u){var d=Bg.charCodeAt(u-1),p=1e5,g=!1;for(;d!==c.charCodeAt(0);){if(++d===Wg&&d++,d===Xg&&d++,d>qg){if(g)throw"Bad character: "+c;d=$g,g=!0}p+=1e5}return p}(p.charAt(0),x),C=function getNorthingFromChar(c,u){if(c>"V")throw"MGRSPoint given invalid Northing "+c;var d=Ug.charCodeAt(u-1),p=0,g=!1;for(;d!==c.charCodeAt(0);){if(++d===Wg&&d++,d===Xg&&d++,d>Vg){if(g)throw"Bad character: "+c;d=$g,g=!0}p+=1e5}return p}(p.charAt(1),x);C<getMinNorthing(y);)C+=2e6;var M=d-f;if(M%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+c;var T,L,A,I=M/2,k=0,O=0;return I>0&&(T=1e5/Math.pow(10,I),L=c.substring(f,f+I),k=parseFloat(L)*T,A=c.substring(f+I),O=parseFloat(A)*T),{easting:k+v,northing:O+C,zoneLetter:y,zoneNumber:_,accuracy:T}}function getMinNorthing(c){var u;switch(c){case"C":u=11e5;break;case"D":u=2e6;break;case"E":u=28e5;break;case"F":u=37e5;break;case"G":u=46e5;break;case"H":u=55e5;break;case"J":u=64e5;break;case"K":u=73e5;break;case"L":u=82e5;break;case"M":u=91e5;break;case"N":u=0;break;case"P":u=8e5;break;case"Q":u=17e5;break;case"R":u=26e5;break;case"S":u=35e5;break;case"T":u=44e5;break;case"U":u=53e5;break;case"V":u=62e5;break;case"W":u=7e6;break;case"X":u=79e5;break;default:u=-1}if(u>=0)return u;throw"Invalid zone letter: "+c}function Point(c,u,d){if(!(this instanceof Point))return new Point(c,u,d);if(Array.isArray(c))this.x=c[0],this.y=c[1],this.z=c[2]||0;else if("object"==typeof c)this.x=c.x,this.y=c.y,this.z=c.z||0;else if("string"==typeof c&&void 0===u){var p=c.split(",");this.x=parseFloat(p[0],10),this.y=parseFloat(p[1],10),this.z=parseFloat(p[2],10)||0}else this.x=c,this.y=u,this.z=d||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Point.fromMGRS=function(c){return new Point(toPoint(c))},Point.prototype.toMGRS=function(c){return forward$u([this.x,this.y],c)};var Zg=1,Kg=.25,Hg=.046875,Jg=.01953125,Qg=.01068115234375,tm=.75,em=.46875,im=.013020833333333334,rm=.007120768229166667,nm=.3645833333333333,sm=.005696614583333333,om=.3076171875;function pj_enfn(c){var u=[];u[0]=Zg-c*(Kg+c*(Hg+c*(Jg+c*Qg))),u[1]=c*(tm-c*(Hg+c*(Jg+c*Qg)));var d=c*c;return u[2]=d*(em-c*(im+c*rm)),d*=c,u[3]=d*(nm-c*sm),u[4]=d*c*om,u}function pj_mlfn(c,u,d,p){return d*=u,u*=u,p[0]*c-d*(p[1]+u*(p[2]+u*(p[3]+u*p[4])))}var am=20;function pj_inv_mlfn(c,u,d){for(var p=1/(1-u),g=c,f=am;f;--f){var _=Math.sin(g),y=1-u*_*_;if(g-=y=(pj_mlfn(g,_,Math.cos(g),d)-c)*(y*Math.sqrt(y))*p,Math.abs(y)<dg)return g}return g}var lm={init:function init$v(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=pj_enfn(this.es),this.ml0=pj_mlfn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function forward$t(c){var u,d,p,g=c.x,f=c.y,_=adjust_lon(g-this.long0),y=Math.sin(f),x=Math.cos(f);if(this.es){var v=x*_,C=Math.pow(v,2),M=this.ep2*Math.pow(x,2),T=Math.pow(M,2),L=Math.abs(x)>dg?Math.tan(f):0,A=Math.pow(L,2),I=Math.pow(A,2);u=1-this.es*Math.pow(y,2),v/=Math.sqrt(u);var k=pj_mlfn(f,y,x,this.en);d=this.a*(this.k0*v*(1+C/6*(1-A+M+C/20*(5-18*A+I+14*M-58*A*M+C/42*(61+179*I-I*A-479*A)))))+this.x0,p=this.a*(this.k0*(k-this.ml0+y*_*v/2*(1+C/12*(5-A+9*M+4*T+C/30*(61+I-58*A+270*M-330*A*M+C/56*(1385+543*I-I*A-3111*A))))))+this.y0}else{var O=x*Math.sin(_);if(Math.abs(Math.abs(O)-1)<dg)return 93;if(d=.5*this.a*this.k0*Math.log((1+O)/(1-O))+this.x0,p=x*Math.cos(_)/Math.sqrt(1-Math.pow(O,2)),(O=Math.abs(p))>=1){if(O-1>dg)return 93;p=0}else p=Math.acos(p);f<0&&(p=-p),p=this.a*this.k0*(p-this.lat0)+this.y0}return c.x=d,c.y=p,c},inverse:function inverse$t(c){var u,d,p,g,f=(c.x-this.x0)*(1/this.a),_=(c.y-this.y0)*(1/this.a);if(this.es)if(d=pj_inv_mlfn(u=this.ml0+_/this.k0,this.es,this.en),Math.abs(d)<lg){var y=Math.sin(d),x=Math.cos(d),v=Math.abs(x)>dg?Math.tan(d):0,C=this.ep2*Math.pow(x,2),M=Math.pow(C,2),T=Math.pow(v,2),L=Math.pow(T,2);u=1-this.es*Math.pow(y,2);var A=f*Math.sqrt(u)/this.k0,I=Math.pow(A,2);p=d-(u*=v)*I/(1-this.es)*.5*(1-I/12*(5+3*T-9*C*T+C-4*M-I/30*(61+90*T-252*C*T+45*L+46*C-I/56*(1385+3633*T+4095*L+1574*L*T)))),g=adjust_lon(this.long0+A*(1-I/6*(1+2*T+C-I/20*(5+28*T+24*L+8*C*T+6*C-I/42*(61+662*T+1320*L+720*L*T))))/x)}else p=lg*sign(_),g=0;else{var k=Math.exp(f/this.k0),O=.5*(k-1/k),N=this.lat0+_/this.k0,G=Math.cos(N);u=Math.sqrt((1-Math.pow(G,2))/(1+Math.pow(O,2))),p=Math.asin(u),_<0&&(p=-p),g=0===O&&0===G?0:adjust_lon(Math.atan2(O,G)+this.long0)}return c.x=g,c.y=p,c},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function sinh(c){var u=Math.exp(c);return u=(u-1/u)/2}function hypot(c,u){c=Math.abs(c),u=Math.abs(u);var d=Math.max(c,u),p=Math.min(c,u)/(d||1);return d*Math.sqrt(1+Math.pow(p,2))}function asinhy(c){var u=Math.abs(c);return u=function log1py(c){var u=1+c,d=u-1;return 0===d?c:c*Math.log(u)/d}(u*(1+u/(hypot(1,u)+1))),c<0?-u:u}function gatg(c,u){for(var d,p=2*Math.cos(2*u),g=c.length-1,f=c[g],_=0;--g>=0;)d=p*f-_+c[g],_=f,f=d;return u+d*Math.sin(2*u)}function clens_cmplx(c,u,d){for(var p,g,f=Math.sin(u),_=Math.cos(u),y=sinh(d),x=function cosh(c){var u=Math.exp(c);return(u+1/u)/2}(d),v=2*_*x,C=-2*f*y,M=c.length-1,T=c[M],L=0,A=0,I=0;--M>=0;)p=A,g=L,T=v*(A=T)-p-C*(L=I)+c[M],I=C*A-g+v*L;return[(v=f*x)*T-(C=_*y)*I,v*I+C*T]}var hm={init:function init$u(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(lm.init.apply(this),this.forward=lm.forward,this.inverse=lm.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var c=this.es/(1+Math.sqrt(1-this.es)),u=c/(2-c),d=u;this.cgb[0]=u*(2+u*(-2/3+u*(u*(116/45+u*(26/45+u*(-2854/675)))-2))),this.cbg[0]=u*(u*(2/3+u*(4/3+u*(-82/45+u*(32/45+u*(4642/4725)))))-2),d*=u,this.cgb[1]=d*(7/3+u*(u*(-227/45+u*(2704/315+u*(2323/945)))-1.6)),this.cbg[1]=d*(5/3+u*(-16/15+u*(-13/9+u*(904/315+u*(-1522/945))))),d*=u,this.cgb[2]=d*(56/15+u*(-136/35+u*(-1262/105+u*(73814/2835)))),this.cbg[2]=d*(-26/15+u*(34/21+u*(1.6+u*(-12686/2835)))),d*=u,this.cgb[3]=d*(4279/630+u*(-332/35+u*(-399572/14175))),this.cbg[3]=d*(1237/630+u*(u*(-24832/14175)-2.4)),d*=u,this.cgb[4]=d*(4174/315+u*(-144838/6237)),this.cbg[4]=d*(-734/315+u*(109598/31185)),d*=u,this.cgb[5]=d*(601676/22275),this.cbg[5]=d*(444337/155925),d=Math.pow(u,2),this.Qn=this.k0/(1+u)*(1+d*(1/4+d*(1/64+d/256))),this.utg[0]=u*(u*(2/3+u*(-37/96+u*(1/360+u*(81/512+u*(-96199/604800)))))-.5),this.gtu[0]=u*(.5+u*(-2/3+u*(5/16+u*(41/180+u*(-127/288+u*(7891/37800)))))),this.utg[1]=d*(-1/48+u*(-1/15+u*(437/1440+u*(-46/105+u*(1118711/3870720))))),this.gtu[1]=d*(13/48+u*(u*(557/1440+u*(281/630+u*(-1983433/1935360)))-.6)),d*=u,this.utg[2]=d*(-17/480+u*(37/840+u*(209/4480+u*(-5569/90720)))),this.gtu[2]=d*(61/240+u*(-103/140+u*(15061/26880+u*(167603/181440)))),d*=u,this.utg[3]=d*(-4397/161280+u*(11/504+u*(830251/7257600))),this.gtu[3]=d*(49561/161280+u*(-179/168+u*(6601661/7257600))),d*=u,this.utg[4]=d*(-4583/161280+u*(108847/3991680)),this.gtu[4]=d*(34729/80640+u*(-3418889/1995840)),d*=u,this.utg[5]=d*(-20648693/638668800),this.gtu[5]=.6650675310896665*d;var p=gatg(this.cbg,this.lat0);this.Zb=-this.Qn*(p+function clens(c,u){for(var d,p=2*Math.cos(u),g=c.length-1,f=c[g],_=0;--g>=0;)d=p*f-_+c[g],_=f,f=d;return Math.sin(u)*d}(this.gtu,2*p))},forward:function forward$s(c){var u=adjust_lon(c.x-this.long0),d=c.y;d=gatg(this.cbg,d);var p=Math.sin(d),g=Math.cos(d),f=Math.sin(u),_=Math.cos(u);d=Math.atan2(p,_*g),u=Math.atan2(f*g,hypot(p,g*_)),u=asinhy(Math.tan(u));var y,x,v=clens_cmplx(this.gtu,2*d,2*u);return d+=v[0],u+=v[1],Math.abs(u)<=2.623395162778?(y=this.a*(this.Qn*u)+this.x0,x=this.a*(this.Qn*d+this.Zb)+this.y0):(y=1/0,x=1/0),c.x=y,c.y=x,c},inverse:function inverse$s(c){var u,d,p=(c.x-this.x0)*(1/this.a),g=(c.y-this.y0)*(1/this.a);if(g=(g-this.Zb)/this.Qn,p/=this.Qn,Math.abs(p)<=2.623395162778){var f=clens_cmplx(this.utg,2*g,2*p);g+=f[0],p+=f[1],p=Math.atan(sinh(p));var _=Math.sin(g),y=Math.cos(g),x=Math.sin(p),v=Math.cos(p);g=Math.atan2(_*v,hypot(x,v*y)),u=adjust_lon((p=Math.atan2(x,v*y))+this.long0),d=gatg(this.cgb,g)}else u=1/0,d=1/0;return c.x=u,c.y=d,c},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};var cm={init:function init$t(){var c=function adjust_zone(c,u){if(void 0===c){if((c=Math.floor(30*(adjust_lon(u)+Math.PI)/Math.PI)+1)<0)return 0;if(c>60)return 60}return c}(this.zone,this.long0);if(void 0===c)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(c)-183)*pg,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,hm.init.apply(this),this.forward=hm.forward,this.inverse=hm.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function srat(c,u){return Math.pow((1-c)/(1+c),u)}var um={init:function init$s(){var c=Math.sin(this.lat0),u=Math.cos(this.lat0);u*=u,this.rc=Math.sqrt(1-this.es)/(1-this.es*c*c),this.C=Math.sqrt(1+this.es*u*u/(1-this.es)),this.phic0=Math.asin(c/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+mg)/(Math.pow(Math.tan(.5*this.lat0+mg),this.C)*srat(this.e*c,this.ratexp))},forward:function forward$r(c){var u=c.x,d=c.y;return c.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*d+mg),this.C)*srat(this.e*Math.sin(d),this.ratexp))-lg,c.x=this.C*u,c},inverse:function inverse$r(c){for(var u=c.x/this.C,d=c.y,p=Math.pow(Math.tan(.5*d+mg)/this.K,1/this.C),g=20;g>0&&(d=2*Math.atan(p*srat(this.e*Math.sin(c.y),-.5*this.e))-lg,!(Math.abs(d-c.y)<1e-14));--g)c.y=d;return g?(c.x=u,c.y=d,c):null},names:["gauss"]};var dm={init:function init$r(){um.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function forward$q(c){var u,d,p,g;return c.x=adjust_lon(c.x-this.long0),um.forward.apply(this,[c]),u=Math.sin(c.y),d=Math.cos(c.y),p=Math.cos(c.x),g=this.k0*this.R2/(1+this.sinc0*u+this.cosc0*d*p),c.x=g*d*Math.sin(c.x),c.y=g*(this.cosc0*u-this.sinc0*d*p),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function inverse$q(c){var u,d,p,g,f;if(c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,c.x/=this.k0,c.y/=this.k0,f=hypot(c.x,c.y)){var _=2*Math.atan2(f,this.R2);u=Math.sin(_),d=Math.cos(_),g=Math.asin(d*this.sinc0+c.y*u*this.cosc0/f),p=Math.atan2(c.x*u,f*this.cosc0*d-c.y*this.sinc0*u)}else g=this.phic0,p=0;return c.x=p,c.y=g,um.inverse.apply(this,[c]),c.x=adjust_lon(c.x+this.long0),c},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var pm={init:function init$q(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dg&&(this.k0=.5*(1+sign(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=dg&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=dg&&Math.abs(Math.cos(this.lat_ts))>dg&&(this.k0=.5*this.cons*msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/tsfnz(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=msfnz(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-lg,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function forward$p(c){var u,d,p,g,f,_,y=c.x,x=c.y,v=Math.sin(x),C=Math.cos(x),M=adjust_lon(y-this.long0);return Math.abs(Math.abs(y-this.long0)-Math.PI)<=dg&&Math.abs(x+this.lat0)<=dg?(c.x=NaN,c.y=NaN,c):this.sphere?(u=2*this.k0/(1+this.sinlat0*v+this.coslat0*C*Math.cos(M)),c.x=this.a*u*C*Math.sin(M)+this.x0,c.y=this.a*u*(this.coslat0*v-this.sinlat0*C*Math.cos(M))+this.y0,c):(d=2*Math.atan(this.ssfn_(x,v,this.e))-lg,g=Math.cos(d),p=Math.sin(d),Math.abs(this.coslat0)<=dg?(f=tsfnz(this.e,x*this.con,this.con*v),_=2*this.a*this.k0*f/this.cons,c.x=this.x0+_*Math.sin(y-this.long0),c.y=this.y0-this.con*_*Math.cos(y-this.long0),c):(Math.abs(this.sinlat0)<dg?(u=2*this.a*this.k0/(1+g*Math.cos(M)),c.y=u*p):(u=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*p+this.cosX0*g*Math.cos(M))),c.y=u*(this.cosX0*p-this.sinX0*g*Math.cos(M))+this.y0),c.x=u*g*Math.sin(M)+this.x0,c))},inverse:function inverse$p(c){var u,d,p,g,f;c.x-=this.x0,c.y-=this.y0;var _=Math.sqrt(c.x*c.x+c.y*c.y);if(this.sphere){var y=2*Math.atan(_/(2*this.a*this.k0));return u=this.long0,d=this.lat0,_<=dg?(c.x=u,c.y=d,c):(d=Math.asin(Math.cos(y)*this.sinlat0+c.y*Math.sin(y)*this.coslat0/_),u=Math.abs(this.coslat0)<dg?this.lat0>0?adjust_lon(this.long0+Math.atan2(c.x,-1*c.y)):adjust_lon(this.long0+Math.atan2(c.x,c.y)):adjust_lon(this.long0+Math.atan2(c.x*Math.sin(y),_*this.coslat0*Math.cos(y)-c.y*this.sinlat0*Math.sin(y))),c.x=u,c.y=d,c)}if(Math.abs(this.coslat0)<=dg){if(_<=dg)return d=this.lat0,u=this.long0,c.x=u,c.y=d,c;c.x*=this.con,c.y*=this.con,p=_*this.cons/(2*this.a*this.k0),d=this.con*phi2z(this.e,p),u=this.con*adjust_lon(this.con*this.long0+Math.atan2(c.x,-1*c.y))}else g=2*Math.atan(_*this.cosX0/(2*this.a*this.k0*this.ms1)),u=this.long0,_<=dg?f=this.X0:(f=Math.asin(Math.cos(g)*this.sinX0+c.y*Math.sin(g)*this.cosX0/_),u=adjust_lon(this.long0+Math.atan2(c.x*Math.sin(g),_*this.cosX0*Math.cos(g)-c.y*this.sinX0*Math.sin(g)))),d=-1*phi2z(this.e,Math.tan(.5*(lg+f)));return c.x=u,c.y=d,c},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],ssfn_:function ssfn_(c,u,d){return u*=d,Math.tan(.5*(lg+c))*Math.pow((1-u)/(1+u),.5*d)}};var gm={init:function init$p(){var c=this.lat0;this.lambda0=this.long0;var u=Math.sin(c),d=this.a,p=1/this.rf,g=2*p-Math.pow(p,2),f=this.e=Math.sqrt(g);this.R=this.k0*d*Math.sqrt(1-g)/(1-g*Math.pow(u,2)),this.alpha=Math.sqrt(1+g/(1-g)*Math.pow(Math.cos(c),4)),this.b0=Math.asin(u/this.alpha);var _=Math.log(Math.tan(Math.PI/4+this.b0/2)),y=Math.log(Math.tan(Math.PI/4+c/2)),x=Math.log((1+f*u)/(1-f*u));this.K=_-this.alpha*y+this.alpha*f/2*x},forward:function forward$o(c){var u=Math.log(Math.tan(Math.PI/4-c.y/2)),d=this.e/2*Math.log((1+this.e*Math.sin(c.y))/(1-this.e*Math.sin(c.y))),p=-this.alpha*(u+d)+this.K,g=2*(Math.atan(Math.exp(p))-Math.PI/4),f=this.alpha*(c.x-this.lambda0),_=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(g)+Math.cos(this.b0)*Math.cos(f))),y=Math.asin(Math.cos(this.b0)*Math.sin(g)-Math.sin(this.b0)*Math.cos(g)*Math.cos(f));return c.y=this.R/2*Math.log((1+Math.sin(y))/(1-Math.sin(y)))+this.y0,c.x=this.R*_+this.x0,c},inverse:function inverse$o(c){for(var u=c.x-this.x0,d=c.y-this.y0,p=u/this.R,g=2*(Math.atan(Math.exp(d/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(g)+Math.sin(this.b0)*Math.cos(g)*Math.cos(p)),_=Math.atan(Math.sin(p)/(Math.cos(this.b0)*Math.cos(p)-Math.sin(this.b0)*Math.tan(g))),y=this.lambda0+_/this.alpha,x=0,v=f,C=-1e3,M=0;Math.abs(v-C)>1e-7;){if(++M>20)return;x=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(v))/2)),C=v,v=2*Math.atan(Math.exp(x))-Math.PI/2}return c.x=y,c.y=v,c},names:["somerc"]},mm=1e-7;var fm={init:function init$o(){var c,u,d,p,g,f,_,y,x,v,C,M=0,T=0,L=0,A=0,I=0,k=0,O=0;this.no_off=function isTypeA(c){var u="object"==typeof c.PROJECTION?Object.keys(c.PROJECTION)[0]:c.PROJECTION;return"no_uoff"in c||"no_off"in c||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(u)}(this),this.no_rot="no_rot"in this;var N=!1;"alpha"in this&&(N=!0);var G=!1;if("rectified_grid_angle"in this&&(G=!0),N&&(O=this.alpha),G&&(M=this.rectified_grid_angle*pg),N||G)T=this.longc;else if(L=this.long1,I=this.lat1,A=this.long2,k=this.lat2,Math.abs(I-k)<=mm||(c=Math.abs(I))<=mm||Math.abs(c-lg)<=mm||Math.abs(Math.abs(this.lat0)-lg)<=mm||Math.abs(Math.abs(k)-lg)<=mm)throw new Error;var j=1-this.es;u=Math.sqrt(j),Math.abs(this.lat0)>dg?(y=Math.sin(this.lat0),d=Math.cos(this.lat0),c=1-this.es*y*y,this.B=d*d,this.B=Math.sqrt(1+this.es*this.B*this.B/j),this.A=this.B*this.k0*u/c,(g=(p=this.B*u/(d*Math.sqrt(c)))*p-1)<=0?g=0:(g=Math.sqrt(g),this.lat0<0&&(g=-g)),this.E=g+=p,this.E*=Math.pow(tsfnz(this.e,this.lat0,y),this.B)):(this.B=1/u,this.A=this.k0,this.E=p=g=1),N||G?(N?(C=Math.asin(Math.sin(O)/p),G||(M=O)):(C=M,O=Math.asin(p*Math.sin(C))),this.lam0=T-Math.asin(.5*(g-1/g)*Math.tan(C))/this.B):(f=Math.pow(tsfnz(this.e,I,Math.sin(I)),this.B),_=Math.pow(tsfnz(this.e,k,Math.sin(k)),this.B),g=this.E/f,x=(_-f)/(_+f),v=((v=this.E*this.E)-_*f)/(v+_*f),(c=L-A)<-Math.pi?A-=fg:c>Math.pi&&(A+=fg),this.lam0=adjust_lon(.5*(L+A)-Math.atan(v*Math.tan(.5*this.B*(L-A))/x)/this.B),C=Math.atan(2*Math.sin(this.B*adjust_lon(L-this.lam0))/(g-1/g)),M=O=Math.asin(p*Math.sin(C))),this.singam=Math.sin(C),this.cosgam=Math.cos(C),this.sinrot=Math.sin(M),this.cosrot=Math.cos(M),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(p*p-1)/Math.cos(O))),this.lat0<0&&(this.u_0=-this.u_0)),g=.5*C,this.v_pole_n=this.ArB*Math.log(Math.tan(mg-g)),this.v_pole_s=this.ArB*Math.log(Math.tan(mg+g))},forward:function forward$n(c){var u,d,p,g,f,_,y,x,v={};if(c.x=c.x-this.lam0,Math.abs(Math.abs(c.y)-lg)>dg){if(u=.5*((f=this.E/Math.pow(tsfnz(this.e,c.y,Math.sin(c.y)),this.B))-(_=1/f)),d=.5*(f+_),g=Math.sin(this.B*c.x),p=(u*this.singam-g*this.cosgam)/d,Math.abs(Math.abs(p)-1)<dg)throw new Error;x=.5*this.ArB*Math.log((1-p)/(1+p)),_=Math.cos(this.B*c.x),y=Math.abs(_)<mm?this.A*c.x:this.ArB*Math.atan2(u*this.cosgam+g*this.singam,_)}else x=c.y>0?this.v_pole_n:this.v_pole_s,y=this.ArB*c.y;return this.no_rot?(v.x=y,v.y=x):(y-=this.u_0,v.x=x*this.cosrot+y*this.sinrot,v.y=y*this.cosrot-x*this.sinrot),v.x=this.a*v.x+this.x0,v.y=this.a*v.y+this.y0,v},inverse:function inverse$n(c){var u,d,p,g,f,_,y,x={};if(c.x=(c.x-this.x0)*(1/this.a),c.y=(c.y-this.y0)*(1/this.a),this.no_rot?(d=c.y,u=c.x):(d=c.x*this.cosrot-c.y*this.sinrot,u=c.y*this.cosrot+c.x*this.sinrot+this.u_0),g=.5*((p=Math.exp(-this.BrA*d))-1/p),f=.5*(p+1/p),y=((_=Math.sin(this.BrA*u))*this.cosgam+g*this.singam)/f,Math.abs(Math.abs(y)-1)<dg)x.x=0,x.y=y<0?-lg:lg;else{if(x.y=this.E/Math.sqrt((1+y)/(1-y)),x.y=phi2z(this.e,Math.pow(x.y,1/this.B)),x.y===1/0)throw new Error;x.x=-this.rB*Math.atan2(g*this.cosgam-_*this.singam,Math.cos(this.BrA*u))}return x.x+=this.lam0,x},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]};var _m={init:function init$n(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<dg)){var c=this.b/this.a;this.e=Math.sqrt(1-c*c);var u=Math.sin(this.lat1),d=Math.cos(this.lat1),p=msfnz(this.e,u,d),g=tsfnz(this.e,this.lat1,u),f=Math.sin(this.lat2),_=Math.cos(this.lat2),y=msfnz(this.e,f,_),x=tsfnz(this.e,this.lat2,f),v=tsfnz(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>dg?this.ns=Math.log(p/y)/Math.log(g/x):this.ns=u,isNaN(this.ns)&&(this.ns=u),this.f0=p/(this.ns*Math.pow(g,this.ns)),this.rh=this.a*this.f0*Math.pow(v,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function forward$m(c){var u=c.x,d=c.y;Math.abs(2*Math.abs(d)-Math.PI)<=dg&&(d=sign(d)*(lg-2*dg));var p,g,f=Math.abs(Math.abs(d)-lg);if(f>dg)p=tsfnz(this.e,d,Math.sin(d)),g=this.a*this.f0*Math.pow(p,this.ns);else{if((f=d*this.ns)<=0)return null;g=0}var _=this.ns*adjust_lon(u-this.long0);return c.x=this.k0*(g*Math.sin(_))+this.x0,c.y=this.k0*(this.rh-g*Math.cos(_))+this.y0,c},inverse:function inverse$m(c){var u,d,p,g,f,_=(c.x-this.x0)/this.k0,y=this.rh-(c.y-this.y0)/this.k0;this.ns>0?(u=Math.sqrt(_*_+y*y),d=1):(u=-Math.sqrt(_*_+y*y),d=-1);var x=0;if(0!==u&&(x=Math.atan2(d*_,d*y)),0!==u||this.ns>0){if(d=1/this.ns,p=Math.pow(u/(this.a*this.f0),d),-9999===(g=phi2z(this.e,p)))return null}else g=-lg;return f=adjust_lon(x/this.ns+this.long0),c.x=f,c.y=g,c},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var ym={init:function init$m(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function forward$l(c){var u,d,p,g,f,_,y,x=c.x,v=c.y,C=adjust_lon(x-this.long0);return u=Math.pow((1+this.e*Math.sin(v))/(1-this.e*Math.sin(v)),this.alfa*this.e/2),d=2*(Math.atan(this.k*Math.pow(Math.tan(v/2+this.s45),this.alfa)/u)-this.s45),p=-C*this.alfa,g=Math.asin(Math.cos(this.ad)*Math.sin(d)+Math.sin(this.ad)*Math.cos(d)*Math.cos(p)),f=Math.asin(Math.cos(d)*Math.sin(p)/Math.cos(g)),_=this.n*f,y=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(g/2+this.s45),this.n),c.y=y*Math.cos(_)/1,c.x=y*Math.sin(_)/1,this.czech||(c.y*=-1,c.x*=-1),c},inverse:function inverse$l(c){var u,d,p,g,f,_,y,x=c.x;c.x=c.y,c.y=x,this.czech||(c.y*=-1,c.x*=-1),f=Math.sqrt(c.x*c.x+c.y*c.y),g=Math.atan2(c.y,c.x)/Math.sin(this.s0),p=2*(Math.atan(Math.pow(this.ro0/f,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),u=Math.asin(Math.cos(this.ad)*Math.sin(p)-Math.sin(this.ad)*Math.cos(p)*Math.cos(g)),d=Math.asin(Math.cos(p)*Math.sin(g)/Math.cos(u)),c.x=this.long0-d/this.alfa,_=u,y=0;var v=0;do{c.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(u/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(_))/(1-this.e*Math.sin(_)),this.e/2))-this.s45),Math.abs(_-c.y)<1e-10&&(y=1),_=c.y,v+=1}while(0===y&&v<15);return v>=15?null:c},names:["Krovak","krovak"]};function mlfn(c,u,d,p,g){return c*g-u*Math.sin(2*g)+d*Math.sin(4*g)-p*Math.sin(6*g)}function e0fn(c){return 1-.25*c*(1+c/16*(3+1.25*c))}function e1fn(c){return.375*c*(1+.25*c*(1+.46875*c))}function e2fn(c){return.05859375*c*c*(1+.75*c)}function e3fn(c){return c*c*c*(35/3072)}function gN(c,u,d){var p=u*d;return c/Math.sqrt(1-p*p)}function adjust_lat(c){return Math.abs(c)<lg?c:c-sign(c)*Math.PI}function imlfn(c,u,d,p,g){var f,_;f=c/u;for(var y=0;y<15;y++)if(f+=_=(c-(u*f-d*Math.sin(2*f)+p*Math.sin(4*f)-g*Math.sin(6*f)))/(u-2*d*Math.cos(2*f)+4*p*Math.cos(4*f)-6*g*Math.cos(6*f)),Math.abs(_)<=1e-10)return f;return NaN}var xm={init:function init$l(){this.sphere||(this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function forward$k(c){var u,d,p=c.x,g=c.y;if(p=adjust_lon(p-this.long0),this.sphere)u=this.a*Math.asin(Math.cos(g)*Math.sin(p)),d=this.a*(Math.atan2(Math.tan(g),Math.cos(p))-this.lat0);else{var f=Math.sin(g),_=Math.cos(g),y=gN(this.a,this.e,f),x=Math.tan(g)*Math.tan(g),v=p*Math.cos(g),C=v*v,M=this.es*_*_/(1-this.es);u=y*v*(1-C*x*(1/6-(8-x+8*M)*C/120)),d=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,g)-this.ml0+y*f/_*C*(.5+(5-x+6*M)*C/24)}return c.x=u+this.x0,c.y=d+this.y0,c},inverse:function inverse$k(c){c.x-=this.x0,c.y-=this.y0;var u,d,p=c.x/this.a,g=c.y/this.a;if(this.sphere){var f=g+this.lat0;u=Math.asin(Math.sin(f)*Math.cos(p)),d=Math.atan2(Math.tan(p),Math.cos(f))}else{var _=imlfn(this.ml0/this.a+g,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(_)-lg)<=dg)return c.x=this.long0,c.y=lg,g<0&&(c.y*=-1),c;var y=gN(this.a,this.e,Math.sin(_)),x=y*y*y/this.a/this.a*(1-this.es),v=Math.pow(Math.tan(_),2),C=p*this.a/y,M=C*C;u=_-y*Math.tan(_)/x*C*C*(.5-(1+3*v)*C*C/24),d=C*(1-M*(v/3+(1+3*v)*v*M/15))/Math.cos(_)}return c.x=adjust_lon(d+this.long0),c.y=adjust_lat(u),c},names:["Cassini","Cassini_Soldner","cass"]};function qsfnz(c,u){var d;return c>1e-7?(1-c*c)*(u/(1-(d=c*u)*d)-.5/c*Math.log((1-d)/(1+d))):2*u}var vm=.3333333333333333,Sm=.17222222222222222,wm=.10257936507936508,Cm=.06388888888888888,Em=.0664021164021164,Pm=.016415012942191543;var bm={init:function init$k(){var c,u=Math.abs(this.lat0);if(Math.abs(u-lg)<dg?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(u)<dg?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0)switch(this.qp=qsfnz(this.e,1),this.mmf=.5/(1-this.es),this.apa=function authset(c){var u,d=[];return d[0]=c*vm,u=c*c,d[0]+=u*Sm,d[1]=u*Cm,u*=c,d[0]+=u*wm,d[1]+=u*Em,d[2]=u*Pm,d}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),c=Math.sin(this.lat0),this.sinb1=qsfnz(this.e,c)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*c*c)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function forward$j(c){var u,d,p,g,f,_,y,x,v,C,M=c.x,T=c.y;if(M=adjust_lon(M-this.long0),this.sphere){if(f=Math.sin(T),C=Math.cos(T),p=Math.cos(M),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((d=this.mode===this.EQUIT?1+C*p:1+this.sinph0*f+this.cosph0*C*p)<=dg)return null;u=(d=Math.sqrt(2/d))*C*Math.sin(M),d*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*C*p}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),Math.abs(T+this.lat0)<dg)return null;d=mg-.5*T,u=(d=2*(this.mode===this.S_POLE?Math.cos(d):Math.sin(d)))*Math.sin(M),d*=p}}else{switch(y=0,x=0,v=0,p=Math.cos(M),g=Math.sin(M),f=Math.sin(T),_=qsfnz(this.e,f),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=_/this.qp,x=Math.sqrt(1-y*y)),this.mode){case this.OBLIQ:v=1+this.sinb1*y+this.cosb1*x*p;break;case this.EQUIT:v=1+x*p;break;case this.N_POLE:v=lg+T,_=this.qp-_;break;case this.S_POLE:v=T-lg,_=this.qp+_}if(Math.abs(v)<dg)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:v=Math.sqrt(2/v),d=this.mode===this.OBLIQ?this.ymf*v*(this.cosb1*y-this.sinb1*x*p):(v=Math.sqrt(2/(1+x*p)))*y*this.ymf,u=this.xmf*v*x*g;break;case this.N_POLE:case this.S_POLE:_>=0?(u=(v=Math.sqrt(_))*g,d=p*(this.mode===this.S_POLE?v:-v)):u=d=0}}return c.x=this.a*u+this.x0,c.y=this.a*d+this.y0,c},inverse:function inverse$j(c){c.x-=this.x0,c.y-=this.y0;var u,d,p,g,f,_,y,x=c.x/this.a,v=c.y/this.a;if(this.sphere){var C,M=0,T=0;if((d=.5*(C=Math.sqrt(x*x+v*v)))>1)return null;switch(d=2*Math.asin(d),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(T=Math.sin(d),M=Math.cos(d)),this.mode){case this.EQUIT:d=Math.abs(C)<=dg?0:Math.asin(v*T/C),x*=T,v=M*C;break;case this.OBLIQ:d=Math.abs(C)<=dg?this.lat0:Math.asin(M*this.sinph0+v*T*this.cosph0/C),x*=T*this.cosph0,v=(M-Math.sin(d)*this.sinph0)*C;break;case this.N_POLE:v=-v,d=lg-d;break;case this.S_POLE:d-=lg}u=0!==v||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(x,v):0}else{if(y=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(x/=this.dd,v*=this.dd,(_=Math.sqrt(x*x+v*v))<dg)return c.x=this.long0,c.y=this.lat0,c;g=2*Math.asin(.5*_/this.rq),p=Math.cos(g),x*=g=Math.sin(g),this.mode===this.OBLIQ?(y=p*this.sinb1+v*g*this.cosb1/_,f=this.qp*y,v=_*this.cosb1*p-v*this.sinb1*g):(y=v*g/_,f=this.qp*y,v=_*p)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(v=-v),!(f=x*x+v*v))return c.x=this.long0,c.y=this.lat0,c;y=1-f/this.qp,this.mode===this.S_POLE&&(y=-y)}u=Math.atan2(x,v),d=function authlat(c,u){var d=c+c;return c+u[0]*Math.sin(d)+u[1]*Math.sin(d+d)+u[2]*Math.sin(d+d+d)}(Math.asin(y),this.apa)}return c.x=adjust_lon(this.long0+u),c.y=d,c},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function asinz(c){return Math.abs(c)>1&&(c=c>1?1:-1),Math.asin(c)}var Mm={init:function init$j(){Math.abs(this.lat1+this.lat2)<dg||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=msfnz(this.e3,this.sin_po,this.cos_po),this.qs1=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=msfnz(this.e3,this.sin_po,this.cos_po),this.qs2=qsfnz(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=qsfnz(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>dg?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function forward$i(c){var u=c.x,d=c.y;this.sin_phi=Math.sin(d),this.cos_phi=Math.cos(d);var p=qsfnz(this.e3,this.sin_phi),g=this.a*Math.sqrt(this.c-this.ns0*p)/this.ns0,f=this.ns0*adjust_lon(u-this.long0),_=g*Math.sin(f)+this.x0,y=this.rh-g*Math.cos(f)+this.y0;return c.x=_,c.y=y,c},inverse:function inverse$i(c){var u,d,p,g,f,_;return c.x-=this.x0,c.y=this.rh-c.y+this.y0,this.ns0>=0?(u=Math.sqrt(c.x*c.x+c.y*c.y),p=1):(u=-Math.sqrt(c.x*c.x+c.y*c.y),p=-1),g=0,0!==u&&(g=Math.atan2(p*c.x,p*c.y)),p=u*this.ns0/this.a,this.sphere?_=Math.asin((this.c-p*p)/(2*this.ns0)):(d=(this.c-p*p)/this.ns0,_=this.phi1z(this.e3,d)),f=adjust_lon(g/this.ns0+this.long0),c.x=f,c.y=_,c},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function phi1z(c,u){var d,p,g,f,_=asinz(.5*u);if(c<dg)return _;for(var y=c*c,x=1;x<=25;x++)if(_+=f=.5*(g=1-(p=c*(d=Math.sin(_)))*p)*g/Math.cos(_)*(u/(1-y)-d/g+.5/c*Math.log((1-p)/(1+p))),Math.abs(f)<=1e-7)return _;return null}};var Tm={init:function init$i(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function forward$h(c){var u,d,p,g,f,_,y,x=c.x,v=c.y;return p=adjust_lon(x-this.long0),u=Math.sin(v),d=Math.cos(v),g=Math.cos(p),(f=this.sin_p14*u+this.cos_p14*d*g)>0||Math.abs(f)<=dg?(_=this.x0+1*this.a*d*Math.sin(p)/f,y=this.y0+1*this.a*(this.cos_p14*u-this.sin_p14*d*g)/f):(_=this.x0+this.infinity_dist*d*Math.sin(p),y=this.y0+this.infinity_dist*(this.cos_p14*u-this.sin_p14*d*g)),c.x=_,c.y=y,c},inverse:function inverse$h(c){var u,d,p,g,f,_;return c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,c.x/=this.k0,c.y/=this.k0,(u=Math.sqrt(c.x*c.x+c.y*c.y))?(g=Math.atan2(u,this.rc),d=Math.sin(g),_=asinz((p=Math.cos(g))*this.sin_p14+c.y*d*this.cos_p14/u),f=Math.atan2(c.x*d,u*this.cos_p14*p-c.y*this.sin_p14*d),f=adjust_lon(this.long0+f)):(_=this.phic0,f=0),c.x=f,c.y=_,c},names:["gnom"]};var Rm={init:function init$h(){this.sphere||(this.k0=msfnz(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function forward$g(c){var u,d,p=c.x,g=c.y,f=adjust_lon(p-this.long0);if(this.sphere)u=this.x0+this.a*f*Math.cos(this.lat_ts),d=this.y0+this.a*Math.sin(g)/Math.cos(this.lat_ts);else{var _=qsfnz(this.e,Math.sin(g));u=this.x0+this.a*this.k0*f,d=this.y0+this.a*_*.5/this.k0}return c.x=u,c.y=d,c},inverse:function inverse$g(c){var u,d;return c.x-=this.x0,c.y-=this.y0,this.sphere?(u=adjust_lon(this.long0+c.x/this.a/Math.cos(this.lat_ts)),d=Math.asin(c.y/this.a*Math.cos(this.lat_ts))):(d=function iqsfnz(c,u){var d=1-(1-c*c)/(2*c)*Math.log((1-c)/(1+c));if(Math.abs(Math.abs(u)-d)<1e-6)return u<0?-1*lg:lg;for(var p,g,f,_,y=Math.asin(.5*u),x=0;x<30;x++)if(g=Math.sin(y),f=Math.cos(y),_=c*g,y+=p=Math.pow(1-_*_,2)/(2*f)*(u/(1-c*c)-g/(1-_*_)+.5/c*Math.log((1-_)/(1+_))),Math.abs(p)<=1e-10)return y;return NaN}(this.e,2*c.y*this.k0/this.a),u=adjust_lon(this.long0+c.x/(this.a*this.k0))),c.x=u,c.y=d,c},names:["cea"]};var Lm={init:function init$g(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function forward$f(c){var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=adjust_lat(d-this.lat0);return c.x=this.x0+this.a*p*this.rc,c.y=this.y0+this.a*g,c},inverse:function inverse$f(c){var u=c.x,d=c.y;return c.x=adjust_lon(this.long0+(u-this.x0)/(this.a*this.rc)),c.y=adjust_lat(this.lat0+(d-this.y0)/this.a),c},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Am={init:function init$f(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.ml0=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function forward$e(c){var u,d,p,g=c.x,f=c.y,_=adjust_lon(g-this.long0);if(p=_*Math.sin(f),this.sphere)Math.abs(f)<=dg?(u=this.a*_,d=-1*this.a*this.lat0):(u=this.a*Math.sin(p)/Math.tan(f),d=this.a*(adjust_lat(f-this.lat0)+(1-Math.cos(p))/Math.tan(f)));else if(Math.abs(f)<=dg)u=this.a*_,d=-1*this.ml0;else{var y=gN(this.a,this.e,Math.sin(f))/Math.tan(f);u=y*Math.sin(p),d=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,f)-this.ml0+y*(1-Math.cos(p))}return c.x=u+this.x0,c.y=d+this.y0,c},inverse:function inverse$e(c){var u,d,p,g,f,_,y,x,v;if(p=c.x-this.x0,g=c.y-this.y0,this.sphere)if(Math.abs(g+this.a*this.lat0)<=dg)u=adjust_lon(p/this.a+this.long0),d=0;else{var C;for(_=this.lat0+g/this.a,y=p*p/this.a/this.a+_*_,x=_,f=20;f;--f)if(x+=v=-1*(_*(x*(C=Math.tan(x))+1)-x-.5*(x*x+y)*C)/((x-_)/C-1),Math.abs(v)<=dg){d=x;break}u=adjust_lon(this.long0+Math.asin(p*Math.tan(x)/this.a)/Math.sin(d))}else if(Math.abs(g+this.ml0)<=dg)d=0,u=adjust_lon(this.long0+p/this.a);else{var M,T,L,A,I;for(_=(this.ml0+g)/this.a,y=p*p/this.a/this.a+_*_,x=_,f=20;f;--f)if(I=this.e*Math.sin(x),M=Math.sqrt(1-I*I)*Math.tan(x),T=this.a*mlfn(this.e0,this.e1,this.e2,this.e3,x),L=this.e0-2*this.e1*Math.cos(2*x)+4*this.e2*Math.cos(4*x)-6*this.e3*Math.cos(6*x),x-=v=(_*(M*(A=T/this.a)+1)-A-.5*M*(A*A+y))/(this.es*Math.sin(2*x)*(A*A+y-2*_*A)/(4*M)+(_-A)*(M*L-2/Math.sin(2*x))-L),Math.abs(v)<=dg){d=x;break}M=Math.sqrt(1-this.es*Math.pow(Math.sin(d),2))*Math.tan(d),u=adjust_lon(this.long0+Math.asin(p*M/this.a)/Math.sin(d))}return c.x=u,c.y=d,c},names:["Polyconic","poly"]};var Im={init:function init$e(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function forward$d(c){var u,d=c.x,p=c.y-this.lat0,g=d-this.long0,f=p/ag*1e-5,_=g,y=1,x=0;for(u=1;u<=10;u++)y*=f,x+=this.A[u]*y;var v,C=x,M=_,T=1,L=0,A=0,I=0;for(u=1;u<=6;u++)v=L*C+T*M,T=T*C-L*M,L=v,A=A+this.B_re[u]*T-this.B_im[u]*L,I=I+this.B_im[u]*T+this.B_re[u]*L;return c.x=I*this.a+this.x0,c.y=A*this.a+this.y0,c},inverse:function inverse$d(c){var u,d,p=c.x,g=c.y,f=p-this.x0,_=(g-this.y0)/this.a,y=f/this.a,x=1,v=0,C=0,M=0;for(u=1;u<=6;u++)d=v*_+x*y,x=x*_-v*y,v=d,C=C+this.C_re[u]*x-this.C_im[u]*v,M=M+this.C_im[u]*x+this.C_re[u]*v;for(var T=0;T<this.iterations;T++){var L,A=C,I=M,k=_,O=y;for(u=2;u<=6;u++)L=I*C+A*M,A=A*C-I*M,I=L,k+=(u-1)*(this.B_re[u]*A-this.B_im[u]*I),O+=(u-1)*(this.B_im[u]*A+this.B_re[u]*I);A=1,I=0;var N=this.B_re[1],G=this.B_im[1];for(u=2;u<=6;u++)L=I*C+A*M,A=A*C-I*M,I=L,N+=u*(this.B_re[u]*A-this.B_im[u]*I),G+=u*(this.B_im[u]*A+this.B_re[u]*I);var j=N*N+G*G;C=(k*N+O*G)/j,M=(O*N-k*G)/j}var B=C,V=M,q=1,Z=0;for(u=1;u<=9;u++)q*=B,Z+=this.D[u]*q;var K=this.lat0+Z*ag*1e5,J=this.long0+V;return c.x=J,c.y=K,c},names:["New_Zealand_Map_Grid","nzmg"]};var Fm={init:function init$d(){},forward:function forward$c(c){var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=this.x0+this.a*p,f=this.y0+this.a*Math.log(Math.tan(Math.PI/4+d/2.5))*1.25;return c.x=g,c.y=f,c},inverse:function inverse$c(c){c.x-=this.x0,c.y-=this.y0;var u=adjust_lon(this.long0+c.x/this.a),d=2.5*(Math.atan(Math.exp(.8*c.y/this.a))-Math.PI/4);return c.x=u,c.y=d,c},names:["Miller_Cylindrical","mill"]};var km={init:function init$c(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=pj_enfn(this.es)},forward:function forward$b(c){var u,d,p=c.x,g=c.y;if(p=adjust_lon(p-this.long0),this.sphere){if(this.m)for(var f=this.n*Math.sin(g),_=20;_;--_){var y=(this.m*g+Math.sin(g)-f)/(this.m+Math.cos(g));if(g-=y,Math.abs(y)<dg)break}else g=1!==this.n?Math.asin(this.n*Math.sin(g)):g;u=this.a*this.C_x*p*(this.m+Math.cos(g)),d=this.a*this.C_y*g}else{var x=Math.sin(g),v=Math.cos(g);d=this.a*pj_mlfn(g,x,v,this.en),u=this.a*p*v/Math.sqrt(1-this.es*x*x)}return c.x=u,c.y=d,c},inverse:function inverse$b(c){var u,d,p;return c.x-=this.x0,d=c.x/this.a,c.y-=this.y0,u=c.y/this.a,this.sphere?(u/=this.C_y,d/=this.C_x*(this.m+Math.cos(u)),this.m?u=asinz((this.m*u+Math.sin(u))/this.n):1!==this.n&&(u=asinz(Math.sin(u)/this.n)),d=adjust_lon(d+this.long0),u=adjust_lat(u)):(u=pj_inv_mlfn(c.y/this.a,this.es,this.en),(p=Math.abs(u))<lg?(p=Math.sin(u),d=adjust_lon(this.long0+c.x*Math.sqrt(1-this.es*p*p)/(this.a*Math.cos(u)))):p-dg<lg&&(d=this.long0)),c.x=d,c.y=u,c},names:["Sinusoidal","sinu"]};var Om={init:function init$b(){},forward:function forward$a(c){for(var u=c.x,d=c.y,p=adjust_lon(u-this.long0),g=d,f=Math.PI*Math.sin(d);;){var _=-(g+Math.sin(g)-f)/(1+Math.cos(g));if(g+=_,Math.abs(_)<dg)break}g/=2,Math.PI/2-Math.abs(d)<dg&&(p=0);var y=.900316316158*this.a*p*Math.cos(g)+this.x0,x=1.4142135623731*this.a*Math.sin(g)+this.y0;return c.x=y,c.y=x,c},inverse:function inverse$a(c){var u,d;c.x-=this.x0,c.y-=this.y0,d=c.y/(1.4142135623731*this.a),Math.abs(d)>.999999999999&&(d=.999999999999),u=Math.asin(d);var p=adjust_lon(this.long0+c.x/(.900316316158*this.a*Math.cos(u)));p<-Math.PI&&(p=-Math.PI),p>Math.PI&&(p=Math.PI),d=(2*u+Math.sin(2*u))/Math.PI,Math.abs(d)>1&&(d=1);var g=Math.asin(d);return c.x=p,c.y=g,c},names:["Mollweide","moll"]};var Nm={init:function init$a(){Math.abs(this.lat1+this.lat2)<dg||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=e0fn(this.es),this.e1=e1fn(this.es),this.e2=e2fn(this.es),this.e3=e3fn(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=msfnz(this.e,this.sinphi,this.cosphi),this.ml1=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<dg?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=msfnz(this.e,this.sinphi,this.cosphi),this.ml2=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=mlfn(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function forward$9(c){var u,d=c.x,p=c.y;if(this.sphere)u=this.a*(this.g-p);else{var g=mlfn(this.e0,this.e1,this.e2,this.e3,p);u=this.a*(this.g-g)}var f=this.ns*adjust_lon(d-this.long0),_=this.x0+u*Math.sin(f),y=this.y0+this.rh-u*Math.cos(f);return c.x=_,c.y=y,c},inverse:function inverse$9(c){var u,d,p,g;c.x-=this.x0,c.y=this.rh-c.y+this.y0,this.ns>=0?(d=Math.sqrt(c.x*c.x+c.y*c.y),u=1):(d=-Math.sqrt(c.x*c.x+c.y*c.y),u=-1);var f=0;return 0!==d&&(f=Math.atan2(u*c.x,u*c.y)),this.sphere?(g=adjust_lon(this.long0+f/this.ns),p=adjust_lat(this.g-d/this.a),c.x=g,c.y=p,c):(p=imlfn(this.g-d/this.a,this.e0,this.e1,this.e2,this.e3),g=adjust_lon(this.long0+f/this.ns),c.x=g,c.y=p,c)},names:["Equidistant_Conic","eqdc"]};var Dm={init:function init$9(){this.R=this.a},forward:function forward$8(c){var u,d,p=c.x,g=c.y,f=adjust_lon(p-this.long0);Math.abs(g)<=dg&&(u=this.x0+this.R*f,d=this.y0);var _=asinz(2*Math.abs(g/Math.PI));(Math.abs(f)<=dg||Math.abs(Math.abs(g)-lg)<=dg)&&(u=this.x0,d=g>=0?this.y0+Math.PI*this.R*Math.tan(.5*_):this.y0+Math.PI*this.R*-Math.tan(.5*_));var y=.5*Math.abs(Math.PI/f-f/Math.PI),x=y*y,v=Math.sin(_),C=Math.cos(_),M=C/(v+C-1),T=M*M,L=M*(2/v-1),A=L*L,I=Math.PI*this.R*(y*(M-A)+Math.sqrt(x*(M-A)*(M-A)-(A+x)*(T-A)))/(A+x);f<0&&(I=-I),u=this.x0+I;var k=x+M;return I=Math.PI*this.R*(L*k-y*Math.sqrt((A+x)*(x+1)-k*k))/(A+x),d=g>=0?this.y0+I:this.y0-I,c.x=u,c.y=d,c},inverse:function inverse$8(c){var u,d,p,g,f,_,y,x,v,C,M,T;return c.x-=this.x0,c.y-=this.y0,M=Math.PI*this.R,f=(p=c.x/M)*p+(g=c.y/M)*g,M=3*(g*g/(x=-2*(_=-Math.abs(g)*(1+f))+1+2*g*g+f*f)+(2*(y=_-2*g*g+p*p)*y*y/x/x/x-9*_*y/x/x)/27)/(v=(_-y*y/3/x)/x)/(C=2*Math.sqrt(-v/3)),Math.abs(M)>1&&(M=M>=0?1:-1),T=Math.acos(M)/3,d=c.y>=0?(-C*Math.cos(T+Math.PI/3)-y/3/x)*Math.PI:-(-C*Math.cos(T+Math.PI/3)-y/3/x)*Math.PI,u=Math.abs(p)<dg?this.long0:adjust_lon(this.long0+Math.PI*(f-1+Math.sqrt(1+2*(p*p-g*g)+f*f))/2/p),c.x=u,c.y=d,c},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var Gm={init:function init$8(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function forward$7(c){var u,d,p,g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G,j,B,V,q=c.x,Z=c.y,K=Math.sin(c.y),J=Math.cos(c.y),ct=adjust_lon(q-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=dg?(c.x=this.x0+this.a*(lg-Z)*Math.sin(ct),c.y=this.y0-this.a*(lg-Z)*Math.cos(ct),c):Math.abs(this.sin_p12+1)<=dg?(c.x=this.x0+this.a*(lg+Z)*Math.sin(ct),c.y=this.y0+this.a*(lg+Z)*Math.cos(ct),c):(N=this.sin_p12*K+this.cos_p12*J*Math.cos(ct),O=(k=Math.acos(N))?k/Math.sin(k):1,c.x=this.x0+this.a*O*J*Math.sin(ct),c.y=this.y0+this.a*O*(this.cos_p12*K-this.sin_p12*J*Math.cos(ct)),c):(u=e0fn(this.es),d=e1fn(this.es),p=e2fn(this.es),g=e3fn(this.es),Math.abs(this.sin_p12-1)<=dg?(f=this.a*mlfn(u,d,p,g,lg),_=this.a*mlfn(u,d,p,g,Z),c.x=this.x0+(f-_)*Math.sin(ct),c.y=this.y0-(f-_)*Math.cos(ct),c):Math.abs(this.sin_p12+1)<=dg?(f=this.a*mlfn(u,d,p,g,lg),_=this.a*mlfn(u,d,p,g,Z),c.x=this.x0+(f+_)*Math.sin(ct),c.y=this.y0+(f+_)*Math.cos(ct),c):(y=K/J,x=gN(this.a,this.e,this.sin_p12),v=gN(this.a,this.e,K),C=Math.atan((1-this.es)*y+this.es*x*this.sin_p12/(v*J)),G=0===(M=Math.atan2(Math.sin(ct),this.cos_p12*Math.tan(C)-this.sin_p12*Math.cos(ct)))?Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):Math.abs(Math.abs(M)-Math.PI)<=dg?-Math.asin(this.cos_p12*Math.sin(C)-this.sin_p12*Math.cos(C)):Math.asin(Math.sin(ct)*Math.cos(C)/Math.sin(M)),T=this.e*this.sin_p12/Math.sqrt(1-this.es),k=x*G*(1-(j=G*G)*(I=(L=this.e*this.cos_p12*Math.cos(M)/Math.sqrt(1-this.es))*L)*(1-I)/6+(B=j*G)/8*(A=T*L)*(1-2*I)+(V=B*G)/120*(I*(4-7*I)-3*T*T*(1-7*I))-V*G/48*A),c.x=this.x0+k*Math.sin(M),c.y=this.y0+k*Math.cos(M),c))},inverse:function inverse$7(c){var u,d,p,g,f,_,y,x,v,C,M,T,L,A,I,k,O,N,G,j,B,V,q;if(c.x-=this.x0,c.y-=this.y0,this.sphere){if((u=Math.sqrt(c.x*c.x+c.y*c.y))>2*lg*this.a)return;return d=u/this.a,p=Math.sin(d),g=Math.cos(d),f=this.long0,Math.abs(u)<=dg?_=this.lat0:(_=asinz(g*this.sin_p12+c.y*p*this.cos_p12/u),y=Math.abs(this.lat0)-lg,f=Math.abs(y)<=dg?this.lat0>=0?adjust_lon(this.long0+Math.atan2(c.x,-c.y)):adjust_lon(this.long0-Math.atan2(-c.x,c.y)):adjust_lon(this.long0+Math.atan2(c.x*p,u*this.cos_p12*g-c.y*this.sin_p12*p))),c.x=f,c.y=_,c}return x=e0fn(this.es),v=e1fn(this.es),C=e2fn(this.es),M=e3fn(this.es),Math.abs(this.sin_p12-1)<=dg?(_=imlfn(((T=this.a*mlfn(x,v,C,M,lg))-(u=Math.sqrt(c.x*c.x+c.y*c.y)))/this.a,x,v,C,M),f=adjust_lon(this.long0+Math.atan2(c.x,-1*c.y)),c.x=f,c.y=_,c):Math.abs(this.sin_p12+1)<=dg?(T=this.a*mlfn(x,v,C,M,lg),_=imlfn(((u=Math.sqrt(c.x*c.x+c.y*c.y))-T)/this.a,x,v,C,M),f=adjust_lon(this.long0+Math.atan2(c.x,c.y)),c.x=f,c.y=_,c):(u=Math.sqrt(c.x*c.x+c.y*c.y),I=Math.atan2(c.x,c.y),L=gN(this.a,this.e,this.sin_p12),k=Math.cos(I),N=-(O=this.e*this.cos_p12*k)*O/(1-this.es),G=3*this.es*(1-N)*this.sin_p12*this.cos_p12*k/(1-this.es),V=1-N*(B=(j=u/L)-N*(1+N)*Math.pow(j,3)/6-G*(1+3*N)*Math.pow(j,4)/24)*B/2-j*B*B*B/6,A=Math.asin(this.sin_p12*Math.cos(B)+this.cos_p12*Math.sin(B)*k),f=adjust_lon(this.long0+Math.asin(Math.sin(I)*Math.sin(B)/Math.cos(A))),q=Math.sin(A),_=Math.atan2((q-this.es*V*this.sin_p12)*Math.tan(A),q*(1-this.es)),c.x=f,c.y=_,c)},names:["Azimuthal_Equidistant","aeqd"]};var jm={init:function init$7(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function forward$6(c){var u,d,p,g,f,_,y,x=c.x,v=c.y;return p=adjust_lon(x-this.long0),u=Math.sin(v),d=Math.cos(v),g=Math.cos(p),((f=this.sin_p14*u+this.cos_p14*d*g)>0||Math.abs(f)<=dg)&&(_=1*this.a*d*Math.sin(p),y=this.y0+1*this.a*(this.cos_p14*u-this.sin_p14*d*g)),c.x=_,c.y=y,c},inverse:function inverse$6(c){var u,d,p,g,f,_,y;return c.x-=this.x0,c.y-=this.y0,d=asinz((u=Math.sqrt(c.x*c.x+c.y*c.y))/this.a),p=Math.sin(d),g=Math.cos(d),_=this.long0,Math.abs(u)<=dg?(y=this.lat0,c.x=_,c.y=y,c):(y=asinz(g*this.sin_p14+c.y*p*this.cos_p14/u),f=Math.abs(this.lat0)-lg,Math.abs(f)<=dg?(_=this.lat0>=0?adjust_lon(this.long0+Math.atan2(c.x,-c.y)):adjust_lon(this.long0-Math.atan2(-c.x,c.y)),c.x=_,c.y=y,c):(_=adjust_lon(this.long0+Math.atan2(c.x*p,u*this.cos_p14*g-c.y*this.sin_p14*p)),c.x=_,c.y=y,c))},names:["ortho"]},zm=1,Bm=2,Um=3,$m=4,Wm=5,Xm=6,Vm={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function qsc_fwd_equat_face_theta(c,u,d,p){var g;return c<dg?(p.value=Vm.AREA_0,g=0):(g=Math.atan2(u,d),Math.abs(g)<=mg?p.value=Vm.AREA_0:g>mg&&g<=lg+mg?(p.value=Vm.AREA_1,g-=lg):g>lg+mg||g<=-(lg+mg)?(p.value=Vm.AREA_2,g=g>=0?g-_g:g+_g):(p.value=Vm.AREA_3,g+=lg)),g}function qsc_shift_lon_origin(c,u){var d=c+u;return d<-_g?d+=fg:d>+_g&&(d-=fg),d}var qm={init:function init$6(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=lg-mg/2?this.face=Wm:this.lat0<=-(lg-mg/2)?this.face=Xm:Math.abs(this.long0)<=mg?this.face=zm:Math.abs(this.long0)<=lg+mg?this.face=this.long0>0?Bm:$m:this.face=Um,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function forward$5(c){var u,d,p,g,f,_,y={x:0,y:0},x={value:0};if(c.x-=this.long0,u=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(c.y)):c.y,d=c.x,this.face===Wm)g=lg-u,d>=mg&&d<=lg+mg?(x.value=Vm.AREA_0,p=d-lg):d>lg+mg||d<=-(lg+mg)?(x.value=Vm.AREA_1,p=d>0?d-_g:d+_g):d>-(lg+mg)&&d<=-mg?(x.value=Vm.AREA_2,p=d+lg):(x.value=Vm.AREA_3,p=d);else if(this.face===Xm)g=lg+u,d>=mg&&d<=lg+mg?(x.value=Vm.AREA_0,p=-d+lg):d<mg&&d>=-mg?(x.value=Vm.AREA_1,p=-d):d<-mg&&d>=-(lg+mg)?(x.value=Vm.AREA_2,p=-d-lg):(x.value=Vm.AREA_3,p=d>0?-d+_g:-d-_g);else{var v,C,M,T,L,A;this.face===Bm?d=qsc_shift_lon_origin(d,+lg):this.face===Um?d=qsc_shift_lon_origin(d,+_g):this.face===$m&&(d=qsc_shift_lon_origin(d,-lg)),T=Math.sin(u),L=Math.cos(u),A=Math.sin(d),v=L*Math.cos(d),C=L*A,M=T,this.face===zm?p=qsc_fwd_equat_face_theta(g=Math.acos(v),M,C,x):this.face===Bm?p=qsc_fwd_equat_face_theta(g=Math.acos(C),M,-v,x):this.face===Um?p=qsc_fwd_equat_face_theta(g=Math.acos(-v),M,-C,x):this.face===$m?p=qsc_fwd_equat_face_theta(g=Math.acos(-C),M,v,x):(g=p=0,x.value=Vm.AREA_0)}return _=Math.atan(12/_g*(p+Math.acos(Math.sin(p)*Math.cos(mg))-lg)),f=Math.sqrt((1-Math.cos(g))/(Math.cos(_)*Math.cos(_))/(1-Math.cos(Math.atan(1/Math.cos(p))))),x.value===Vm.AREA_1?_+=lg:x.value===Vm.AREA_2?_+=_g:x.value===Vm.AREA_3&&(_+=1.5*_g),y.x=f*Math.cos(_),y.y=f*Math.sin(_),y.x=y.x*this.a+this.x0,y.y=y.y*this.a+this.y0,c.x=y.x,c.y=y.y,c},inverse:function inverse$5(c){var u,d,p,g,f,_,y,x,v,C,M,T,L={lam:0,phi:0},A={value:0};if(c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a,d=Math.atan(Math.sqrt(c.x*c.x+c.y*c.y)),u=Math.atan2(c.y,c.x),c.x>=0&&c.x>=Math.abs(c.y)?A.value=Vm.AREA_0:c.y>=0&&c.y>=Math.abs(c.x)?(A.value=Vm.AREA_1,u-=lg):c.x<0&&-c.x>=Math.abs(c.y)?(A.value=Vm.AREA_2,u=u<0?u+_g:u-_g):(A.value=Vm.AREA_3,u+=lg),v=_g/12*Math.tan(u),f=Math.sin(v)/(Math.cos(v)-1/Math.sqrt(2)),_=Math.atan(f),(y=1-(p=Math.cos(u))*p*(g=Math.tan(d))*g*(1-Math.cos(Math.atan(1/Math.cos(_)))))<-1?y=-1:y>1&&(y=1),this.face===Wm)x=Math.acos(y),L.phi=lg-x,A.value===Vm.AREA_0?L.lam=_+lg:A.value===Vm.AREA_1?L.lam=_<0?_+_g:_-_g:A.value===Vm.AREA_2?L.lam=_-lg:L.lam=_;else if(this.face===Xm)x=Math.acos(y),L.phi=x-lg,A.value===Vm.AREA_0?L.lam=-_+lg:A.value===Vm.AREA_1?L.lam=-_:A.value===Vm.AREA_2?L.lam=-_-lg:L.lam=_<0?-_-_g:-_+_g;else{var I,k,O;v=(I=y)*I,k=(v+=(O=v>=1?0:Math.sqrt(1-v)*Math.sin(_))*O)>=1?0:Math.sqrt(1-v),A.value===Vm.AREA_1?(v=k,k=-O,O=v):A.value===Vm.AREA_2?(k=-k,O=-O):A.value===Vm.AREA_3&&(v=k,k=O,O=-v),this.face===Bm?(v=I,I=-k,k=v):this.face===Um?(I=-I,k=-k):this.face===$m&&(v=I,I=k,k=-v),L.phi=Math.acos(-O)-lg,L.lam=Math.atan2(k,I),this.face===Bm?L.lam=qsc_shift_lon_origin(L.lam,-lg):this.face===Um?L.lam=qsc_shift_lon_origin(L.lam,-_g):this.face===$m&&(L.lam=qsc_shift_lon_origin(L.lam,+lg))}return 0!==this.es&&(C=L.phi<0?1:0,M=Math.tan(L.phi),T=this.b/Math.sqrt(M*M+this.one_minus_f_squared),L.phi=Math.atan(Math.sqrt(this.a*this.a-T*T)/(this.one_minus_f*T)),C&&(L.phi=-L.phi)),L.lam+=this.long0,c.x=L.lam,c.y=L.phi,c},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ym=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Zm=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Km=.8487,Hm=1.3523,Jm=gg/5,Qm=1/Jm,tf=18,poly3_val=function(c,u){return c[0]+u*(c[1]+u*(c[2]+u*c[3]))};var ef={init:function init$5(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function forward$4(c){var u=adjust_lon(c.x-this.long0),d=Math.abs(c.y),p=Math.floor(d*Jm);p<0?p=0:p>=tf&&(p=17);var g={x:poly3_val(Ym[p],d=gg*(d-Qm*p))*u,y:poly3_val(Zm[p],d)};return c.y<0&&(g.y=-g.y),g.x=g.x*this.a*Km+this.x0,g.y=g.y*this.a*Hm+this.y0,g},inverse:function inverse$4(c){var u={x:(c.x-this.x0)/(this.a*Km),y:Math.abs(c.y-this.y0)/(this.a*Hm)};if(u.y>=1)u.x/=Ym[18][0],u.y=c.y<0?-lg:lg;else{var d=Math.floor(u.y*tf);for(d<0?d=0:d>=tf&&(d=17);;)if(Zm[d][0]>u.y)--d;else{if(!(Zm[d+1][0]<=u.y))break;++d}var p=Zm[d],g=5*(u.y-p[0])/(Zm[d+1][0]-p[0]);g=function newton_rapshon(c,u,d,p){for(var g=u;p;--p){var f=c(g);if(g-=f,Math.abs(f)<d)break}return g}((function(c){return(poly3_val(p,c)-u.y)/function(c,u){return c[1]+u*(2*c[2]+3*u*c[3])}(p,c)}),g,dg,100),u.x/=poly3_val(Ym[d],g),u.y=(5*d+g)*pg,c.y<0&&(u.y=-u.y)}return u.x=adjust_lon(u.x+this.long0),u},names:["Robinson","robin"]};var rf={init:function init$4(){this.name="geocent"},forward:function forward$3(c){return geodeticToGeocentric(c,this.es,this.a)},inverse:function inverse$3(c){return geocentricToGeodetic(c,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},nf=0,sf=1,of=2,af=3,lf={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};var hf={init:function init$3(){if(Object.keys(lf).forEach(function(c){if(void 0===this[c])this[c]=lf[c].def;else{if(lf[c].num&&isNaN(this[c]))throw new Error("Invalid parameter value, must be numeric "+c+" = "+this[c]);lf[c].num&&(this[c]=parseFloat(this[c]))}lf[c].degrees&&(this[c]=this[c]*pg)}.bind(this)),Math.abs(Math.abs(this.lat0)-lg)<dg?this.mode=this.lat0<0?sf:nf:Math.abs(this.lat0)<dg?this.mode=of:(this.mode=af,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var c=this.tilt,u=this.azi;this.cg=Math.cos(u),this.sg=Math.sin(u),this.cw=Math.cos(c),this.sw=Math.sin(c)},forward:function forward$2(c){c.x-=this.long0;var u,d,p,g,f=Math.sin(c.y),_=Math.cos(c.y),y=Math.cos(c.x);switch(this.mode){case af:d=this.sinph0*f+this.cosph0*_*y;break;case of:d=_*y;break;case sf:d=-f;break;case nf:d=f}switch(u=(d=this.pn1/(this.p-d))*_*Math.sin(c.x),this.mode){case af:d*=this.cosph0*f-this.sinph0*_*y;break;case of:d*=f;break;case nf:d*=-_*y;break;case sf:d*=_*y}return g=1/((p=d*this.cg+u*this.sg)*this.sw*this.h1+this.cw),u=(u*this.cg-d*this.sg)*this.cw*g,d=p*g,c.x=u*this.a,c.y=d*this.a,c},inverse:function inverse$2(c){c.x/=this.a,c.y/=this.a;var u,d,p,g={x:c.x,y:c.y};p=1/(this.pn1-c.y*this.sw),u=this.pn1*c.x*p,d=this.pn1*c.y*this.cw*p,c.x=u*this.cg+d*this.sg,c.y=d*this.cg-u*this.sg;var f=hypot(c.x,c.y);if(Math.abs(f)<dg)g.x=0,g.y=c.y;else{var _,y;switch(y=1-f*f*this.pfact,y=(this.p-Math.sqrt(y))/(this.pn1/f+f/this.pn1),_=Math.sqrt(1-y*y),this.mode){case af:g.y=Math.asin(_*this.sinph0+c.y*y*this.cosph0/f),c.y=(_-this.sinph0*Math.sin(g.y))*f,c.x*=y*this.cosph0;break;case of:g.y=Math.asin(c.y*y/f),c.y=_*f,c.x*=y;break;case nf:g.y=Math.asin(_),c.y=-c.y;break;case sf:g.y=-Math.asin(_)}g.x=Math.atan2(c.x,c.y)}return c.x=g.x+this.long0,c.y=g.y,c},names:["Tilted_Perspective","tpers"]};var cf={init:function init$2(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var c=1-this.es,u=1/c;this.radius_p=Math.sqrt(c),this.radius_p2=c,this.radius_p_inv2=u,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function forward$1(c){var u,d,p,g,f=c.x,_=c.y;if(f-=this.long0,"ellipse"===this.shape){_=Math.atan(this.radius_p2*Math.tan(_));var y=this.radius_p/hypot(this.radius_p*Math.cos(_),Math.sin(_));if(d=y*Math.cos(f)*Math.cos(_),p=y*Math.sin(f)*Math.cos(_),g=y*Math.sin(_),(this.radius_g-d)*d-p*p-g*g*this.radius_p_inv2<0)return c.x=Number.NaN,c.y=Number.NaN,c;u=this.radius_g-d,this.flip_axis?(c.x=this.radius_g_1*Math.atan(p/hypot(g,u)),c.y=this.radius_g_1*Math.atan(g/u)):(c.x=this.radius_g_1*Math.atan(p/u),c.y=this.radius_g_1*Math.atan(g/hypot(p,u)))}else"sphere"===this.shape&&(u=Math.cos(_),d=Math.cos(f)*u,p=Math.sin(f)*u,g=Math.sin(_),u=this.radius_g-d,this.flip_axis?(c.x=this.radius_g_1*Math.atan(p/hypot(g,u)),c.y=this.radius_g_1*Math.atan(g/u)):(c.x=this.radius_g_1*Math.atan(p/u),c.y=this.radius_g_1*Math.atan(g/hypot(p,u))));return c.x=c.x*this.a,c.y=c.y*this.a,c},inverse:function inverse$1(c){var u,d,p,g,f=-1,_=0,y=0;if(c.x=c.x/this.a,c.y=c.y/this.a,"ellipse"===this.shape){this.flip_axis?(y=Math.tan(c.y/this.radius_g_1),_=Math.tan(c.x/this.radius_g_1)*hypot(1,y)):(_=Math.tan(c.x/this.radius_g_1),y=Math.tan(c.y/this.radius_g_1)*hypot(1,_));var x=y/this.radius_p;if(u=_*_+x*x+f*f,(p=(d=2*this.radius_g*f)*d-4*u*this.C)<0)return c.x=Number.NaN,c.y=Number.NaN,c;g=(-d-Math.sqrt(p))/(2*u),f=this.radius_g+g*f,_*=g,y*=g,c.x=Math.atan2(_,f),c.y=Math.atan(y*Math.cos(c.x)/f),c.y=Math.atan(this.radius_p_inv2*Math.tan(c.y))}else if("sphere"===this.shape){if(this.flip_axis?(y=Math.tan(c.y/this.radius_g_1),_=Math.tan(c.x/this.radius_g_1)*Math.sqrt(1+y*y)):(_=Math.tan(c.x/this.radius_g_1),y=Math.tan(c.y/this.radius_g_1)*Math.sqrt(1+_*_)),u=_*_+y*y+f*f,(p=(d=2*this.radius_g*f)*d-4*u*this.C)<0)return c.x=Number.NaN,c.y=Number.NaN,c;g=(-d-Math.sqrt(p))/(2*u),f=this.radius_g+g*f,_*=g,y*=g,c.x=Math.atan2(_,f),c.y=Math.atan(y*Math.cos(c.x)/f)}return c.x=c.x+this.long0,c},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},uf=1.340264,df=-.081106,pf=893e-6,gf=.003796,mf=Math.sqrt(3)/2;var ff={init:function init$1(){this.es=0,this.long0=void 0!==this.long0?this.long0:0},forward:function forward(c){var u=adjust_lon(c.x-this.long0),d=c.y,p=Math.asin(mf*Math.sin(d)),g=p*p,f=g*g*g;return c.x=u*Math.cos(p)/(mf*(uf+3*df*g+f*(7*pf+9*gf*g))),c.y=p*(uf+df*g+f*(pf+gf*g)),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function inverse(c){c.x=(c.x-this.x0)/this.a,c.y=(c.y-this.y0)/this.a;var u,d,p,g,f=c.y;for(g=0;g<12&&(f-=p=(f*(uf+df*(u=f*f)+(d=u*u*u)*(pf+gf*u))-c.y)/(uf+3*df*u+d*(7*pf+9*gf*u)),!(Math.abs(p)<1e-9));++g);return d=(u=f*f)*u*u,c.x=mf*c.x*(uf+3*df*u+d*(7*pf+9*gf*u))/Math.cos(f),c.y=Math.asin(Math.sin(f)/mf),c.x=adjust_lon(c.x+this.long0),c},names:["eqearth","Equal Earth","Equal_Earth"]},_f=1e-10;function e_fwd(c){var u,d,p,g=adjust_lon(c.x-(this.long0||0)),f=c.y;return u=this.am1+this.m1-pj_mlfn(f,d=Math.sin(f),p=Math.cos(f),this.en),d=p*g/(u*Math.sqrt(1-this.es*d*d)),c.x=u*Math.sin(d),c.y=this.am1-u*Math.cos(d),c.x=this.a*c.x+(this.x0||0),c.y=this.a*c.y+(this.y0||0),c}function e_inv(c){var u,d,p,g;if(c.x=(c.x-(this.x0||0))/this.a,c.y=(c.y-(this.y0||0))/this.a,d=hypot(c.x,c.y=this.am1-c.y),g=pj_inv_mlfn(this.am1+this.m1-d,this.es,this.en),(u=Math.abs(g))<lg)u=Math.sin(g),p=d*Math.atan2(c.x,c.y)*Math.sqrt(1-this.es*u*u)/Math.cos(g);else{if(!(Math.abs(u-lg)<=_f))throw new Error;p=0}return c.x=adjust_lon(p+(this.long0||0)),c.y=adjust_lat(g),c}function s_fwd(c){var u,d,p=adjust_lon(c.x-(this.long0||0)),g=c.y;return d=this.cphi1+this.phi1-g,Math.abs(d)>_f?(c.x=d*Math.sin(u=p*Math.cos(g)/d),c.y=this.cphi1-d*Math.cos(u)):c.x=c.y=0,c.x=this.a*c.x+(this.x0||0),c.y=this.a*c.y+(this.y0||0),c}function s_inv(c){var u,d;c.x=(c.x-(this.x0||0))/this.a,c.y=(c.y-(this.y0||0))/this.a;var p=hypot(c.x,c.y=this.cphi1-c.y);if(d=this.cphi1+this.phi1-p,Math.abs(d)>lg)throw new Error;return u=Math.abs(Math.abs(d)-lg)<=_f?0:p*Math.atan2(c.x,c.y)/Math.cos(d),c.x=adjust_lon(u+(this.long0||0)),c.y=adjust_lat(d),c}var yf={init:function init(){var c;if(this.phi1=this.lat1,Math.abs(this.phi1)<_f)throw new Error;this.es?(this.en=pj_enfn(this.es),this.m1=pj_mlfn(this.phi1,this.am1=Math.sin(this.phi1),c=Math.cos(this.phi1),this.en),this.am1=c/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=e_inv,this.forward=e_fwd):(Math.abs(this.phi1)+_f>=lg?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=s_inv,this.forward=s_fwd)},names:["bonne","Bonne (Werner lat_1=90)"]};proj4.defaultDatum="WGS84",proj4.Proj=Projection,proj4.WGS84=new proj4.Proj("WGS84"),proj4.Point=Point,proj4.toPoint=common,proj4.defs=defs,proj4.nadgrid=function nadgrid(c,u){var d=new DataView(u),p=function detectLittleEndian(c){var u=c.getInt32(8,!1);if(11===u)return!1;u=c.getInt32(8,!0),11!==u&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian");return!0}(d),g=function readHeader(c,u){return{nFields:c.getInt32(8,u),nSubgridFields:c.getInt32(24,u),nSubgrids:c.getInt32(40,u),shiftType:decodeString(c,56,64).trim(),fromSemiMajorAxis:c.getFloat64(120,u),fromSemiMinorAxis:c.getFloat64(136,u),toSemiMajorAxis:c.getFloat64(152,u),toSemiMinorAxis:c.getFloat64(168,u)}}(d,p),f=function readSubgrids(c,u,d){for(var p=176,g=[],f=0;f<u.nSubgrids;f++){var _=readGridHeader(c,p,d),y=readGridNodes(c,p,_,d),x=Math.round(1+(_.upperLongitude-_.lowerLongitude)/_.longitudeInterval),v=Math.round(1+(_.upperLatitude-_.lowerLatitude)/_.latitudeInterval);g.push({ll:[secondsToRadians(_.lowerLongitude),secondsToRadians(_.lowerLatitude)],del:[secondsToRadians(_.longitudeInterval),secondsToRadians(_.latitudeInterval)],lim:[x,v],count:_.gridNodeCount,cvs:mapNodes(y)}),p+=176+16*_.gridNodeCount}return g}(d,g,p),_={header:g,subgrids:f};return Gg[c]=_,_},proj4.transform=transform,proj4.mgrs=Yg,proj4.version="__VERSION__",function includedProjections(c){c.Proj.projections.add(lm),c.Proj.projections.add(hm),c.Proj.projections.add(cm),c.Proj.projections.add(dm),c.Proj.projections.add(pm),c.Proj.projections.add(gm),c.Proj.projections.add(fm),c.Proj.projections.add(_m),c.Proj.projections.add(ym),c.Proj.projections.add(xm),c.Proj.projections.add(bm),c.Proj.projections.add(Mm),c.Proj.projections.add(Tm),c.Proj.projections.add(Rm),c.Proj.projections.add(Lm),c.Proj.projections.add(Am),c.Proj.projections.add(Im),c.Proj.projections.add(Fm),c.Proj.projections.add(km),c.Proj.projections.add(Om),c.Proj.projections.add(Nm),c.Proj.projections.add(Dm),c.Proj.projections.add(Gm),c.Proj.projections.add(jm),c.Proj.projections.add(qm),c.Proj.projections.add(ef),c.Proj.projections.add(rf),c.Proj.projections.add(hf),c.Proj.projections.add(cf),c.Proj.projections.add(ff),c.Proj.projections.add(yf)}(proj4);let xf=null;function register(c){xf=c;const u=Object.keys(c.defs),d=u.length;let p,g;for(p=0;p<d;++p){const d=u[p];if(!get$2(d)){const u=c.defs(d);let p=u.units;p||"longlat"!==u.projName||(p="degrees"),addProjection(new Di({code:d,axisOrientation:u.axis,metersPerUnit:u.to_meter,units:p}))}}for(p=0;p<d;++p){const f=u[p],_=get$2(f);for(g=0;g<d;++g){const d=u[g],p=get$2(d);if(!get$3(f,d))if(c.defs[f]===c.defs[d])addEquivalentProjections([_,p]);else{const u=c(f,d);addCoordinateTransforms(_,p,createSafeCoordinateTransform(_,p,u.forward),createSafeCoordinateTransform(p,_,u.inverse))}}}}let epsgLookup=async function(c){const u=await fetch(`https://epsg.io/${c}.proj4`);if(!u.ok)throw new Error(`Unexpected response from epsg.io: ${u.status}`);return u.text()};var vf=Object.freeze({__proto__:null,epsgLookupMapTiler:function epsgLookupMapTiler(c){return async function(u){const d=await fetch(`https://api.maptiler.com/coordinates/search/code:${u}.json?transformations=true&exports=true&key=${c}`);if(!d.ok)throw new Error(`Unexpected response from maptiler.com: ${d.status}`);return d.json().then((c=>{const d=c.results;if(d?.length>0){const c=d.filter((c=>"EPSG"===c.id?.authority&&c.id?.code===u))[0];if(c){const u=c.transformations;if(u?.length>0){const d=c.default_transformation;if(u.filter((c=>c.id?.authority===d?.authority&&c.id?.code===d?.code&&0===c.grids?.length)).length>0)return c.exports?.proj4;const p=u.filter((c=>0===c.grids?.length&&"EPSG"===c.target_crs?.authority&&4326===c.target_crs?.code&&!1===c.deprecated&&!0===c.usable)).sort(((c,u)=>c.accuracy-u.accuracy))[0]?.exports?.proj4;if(p)return p}return c.exports?.proj4}}}))}},fromEPSGCode:async function fromEPSGCode(c){"string"==typeof c&&(c=parseInt(c.split(":").pop(),10));const u=xf;if(!u)throw new Error("Proj4 must be registered first with register(proj4)");const d="EPSG:"+c;return u.defs(d)||(u.defs(d,await epsgLookup(c)),register(u)),get$2(d)},getEPSGLookup:function getEPSGLookup(){return epsgLookup},isRegistered:function isRegistered(){return!!xf},register:register,setEPSGLookup:function setEPSGLookup(c){epsgLookup=c},unregister:function unregister(){xf=null}});(c=>{if(document.head.querySelector(`link[href="${c}"]`))return;const u=document.createElement("link");Object.assign(u,{rel:"stylesheet",href:c,onerror:()=>console.warn("Fail to load stylesheet:",c)}),document.head.appendChild(u)})("https://cdn.jsdelivr.net/npm/ol@10.1.0/ol.css");const Sf=class extends defaultExport{id="openlayers";crs="EPSG:4326";control={fullscreen:!1,scale:!1};ol={...ua,control:La,format:Qu,geom:Ys,layer:Jd,source:Jp,style:Gs,proj:{...tr,proj4:vf}};proj4=proj4;get steps(){return[this.setCoordinateSystem,...super.steps,this.setCursor]}static validOptions=super.validOptions.concat([new MapOption({name:"crs",desc:"Coordinate Reference System",example:"EPSG:3826",exampleDesc:"Taiwan TM2",isValid:c=>!!c?.toString()?.match(/^EPSG:\d+$|^\d+$/)})]);async setCoordinateSystem({proj4:c,ol:u,crs:d}){c.defs("EPSG:3826","+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"),u.proj.proj4.register(c);const p=(this.validateOption("crs",d)||console.warn(`Invalid Coordinate System: ${d}, set "EPSG:4326" instead`),d),g=await u.proj.proj4.fromEPSGCode(p).catch((()=>{console.warn(`Fail to retrieve Coordinate System ${p}, Use ${d} instead`)}));return u.proj.setUserProjection(g),u.proj.getUserProjection()}async addMap({ol:c,target:u,center:d,zoom:p}){return this.map=new c.Map({target:u,view:new c.View({constrainResolution:!0,center:d,zoom:p})}),this.map}getTerraDrawAdapter({map:c,ol:u,draw:d}){return d?(this.terraDrawAdapter=new W({lib:{Feature:u.Feature,GeoJSON:u.format.GeoJSON,Style:u.style.Style,VectorLayer:u.layer.Vector,VectorSource:u.source.Vector,Stroke:u.style.Stroke,Circle:u.style.Circle,Fill:u.style.Fill,getUserProjection:u.proj.getUserProjection},map:c,coordinatePrecision:9}),this.terraDrawAdapter):{state:"skip"}}setCursor({map:c}){c.getViewport().style.cursor="grab",c.on("pointerdrag",(u=>{c.getViewport().style.cursor="grabbing"})),c.on("pointerup",(()=>{c.getViewport().style.cursor="grab"}))}setOptionsAliases(c){super.handleAliases(c),c.STYLE&&(c.data.push({type:"style",url:c.STYLE}),delete c.STYLE)}setControl({map:c,control:u,ol:d}){if(!u||0===Object.values(u).filter((c=>c)).length)return{state:"skip"};!0===u.fullscreen&&c.addControl(new d.control.FullScreen),!0===u.scale&&c.addControl(new d.control.ScaleLine({units:"metric"}))}setExtra(c){const{map:u,debug:d,ol:p}=c;if(!d&&!c.eval)return{state:"skip"};!0===d&&u.addLayer(new TileLayer({source:new p.source.TileDebug})),c.eval&&this.evalScript(c.eval,[["map",u],["ol",p]])}addMarker(c){const u=document.createElement("div");u.innerHTML="circle"===c.type?this.svgForAnchor.html:this.svgForMarker.html,u.title=c.title,u.classList.add("marker");const d=new Overlay({element:u,position:c.xy,positioning:"circle"===c.type?"center-center":"bottom-center"});return this.map.addOverlay(d),u}async addTileData({map:c,data:u}){const d=u.filter((c=>"tile"===c.type)),p=d.filter((c=>"style"===c.type))[0];if(p||0!==d.length)d.forEach((u=>{const d=new TileLayer({source:new XYZ({url:u.url}),title:u.title?u.title:"Anonymous"});c.addLayer(d)}));else{const u=new TileLayer({source:new OSM,title:"OSM Carto"});c.addLayer(u)}return d.filter((c=>"wmts"===c.type))[0],new Promise((u=>{c.on("rendercomplete",(()=>{u(c)}))}))}addGPXFile({map:c,ol:u,data:d}){const p=d.find((c=>"gpx"===c.type));if(!p)return{state:"skip"};const g={MultiLineString:new u.style.Style({stroke:new u.style.Stroke({color:"red",width:3})})};c.addLayer(new u.layer.Vector({source:new u.source.Vector({url:p,format:new u.format.GPX}),style:()=>g.MultiLineString}))}updateCamera(c,u){const d=this.map,p=d.getView();u?function flyTo(c,u,d){const p=2500,g=c.getView(),f=u.zoom?u.zoom:g.getZoom(),_=u.center?u.center:g.center;let y=2,x=!1;function callback(c){--y,x||0!==y&&c||(x=!0,d(c))}g.animate({center:_,duration:p},callback),g.animate({zoom:(g.getZoom()+f)/2-1,duration:p/2},{zoom:f,duration:p/2},callback)}(d,{center:c.center,zoom:c.zoom}):p.animate({center:c.center,zoom:c.zoom,duration:300})}project([c,u]){return this.map.getPixelFromCoordinate([c,u])}unproject([c,u]){return this.map.getCoordinateFromPixel([c,u])}};const converter=c=>({...c,use:Sf}),wf=renderWith(converter),Cf=renderByYamlWith(converter),Ef=((c=null)=>async()=>{const u=document.currentScript,d=u?.getAttribute("data-target")??URL.parse(u?.src)?.searchParams?.get("target"),p=document.querySelectorAll(d);d&&p&&p.forEach((u=>renderByYamlWith(c)(u)))})(converter);globalThis.mapclay={render:wf,renderByYaml:Cf};export{Sf as default,wf as render,Ef as renderByScriptTarget,Cf as renderByYaml};
diff --git a/doc-coverage/docCoverageReport.json b/doc-coverage/docCoverageReport.json
new file mode 100644
index 0000000..d0d43ed
--- /dev/null
+++ b/doc-coverage/docCoverageReport.json
@@ -0,0 +1,102 @@
+{
+    "jsdocCoverage": {
+        "expectedCount": 54,
+        "actualCount": 54,
+        "coveragePercent": 100
+    },
+    "ComponentFileCoverage": {
+        "totalComponents": 0,
+        "componentsWithStories": 0,
+        "componentsWithStoriesOrPropTypes": 0,
+        "storyBookCoveragePercent": 0,
+        "storyBookOrPropTypesCoveragePercent": 0,
+        "propTypesCoveragePercent": null
+    },
+    "totalCoverage": {
+        "jsDocWithFullyDoc": 100,
+        "jsDocWithStorybook": 100,
+        "jsDocWithPropTypesCoverage": 100
+    },
+    "fileWiseCoverageJSFiles": {
+        "/home/pham/git/dumbymap/src/MenuItem.mjs": {
+            "funcCoverage": {
+                "pickMapItem": true,
+                "pickBlockItem": true,
+                "pickLayoutItem": true,
+                "addGeoLink": true,
+                "renderResults": true,
+                "printObject": true,
+                "toggleBlockFocus": true,
+                "toggleMapFocus": true,
+                "getCoordinatesByPixels": true,
+                "restoreCamera": true,
+                "addRefLink": true
+            },
+            "fileCoverage": "100%"
+        },
+        "/home/pham/git/dumbymap/src/dumbyUtils.mjs": {
+            "funcCoverage": {
+                "focusNextMap": true,
+                "focusNextBlock": true,
+                "scrollToBlock": true,
+                "focusDelay": true,
+                "switchToNextLayout": true,
+                "removeBlockFocus": true,
+                "getMarkersFromMaps": true,
+                "addLeaderLine": true,
+                "createGeoLink": true,
+                "createDocLink": true,
+                "removeLeaderLines": true,
+                "updateMapCameraByMarker": true,
+                "isAnchorVisible": true,
+                "addAnchorByPoint": true
+            },
+            "fileCoverage": "100%"
+        },
+        "/home/pham/git/dumbymap/src/dumbymap.mjs": {
+            "funcCoverage": {
+                "markdown2HTML": true,
+                "generateMaps": true
+            },
+            "fileCoverage": "100%"
+        },
+        "/home/pham/git/dumbymap/src/editor.mjs": {
+            "funcCoverage": {
+                "validateAnchorName": true,
+                "appendRefLink": true,
+                "toggleEditing": true,
+                "getRefLinks": true,
+                "getStateFromHash": true,
+                "getContentFromHash": true,
+                "updateScrollLine": true,
+                "updateCMScrollLine": true,
+                "addClassToCodeLines": true,
+                "completeForCodeBlock": true,
+                "menuForEditor": true,
+                "updateDumbyMap": true,
+                "insideCodeblockForMap": true,
+                "getLineWithRenderer": true,
+                "getSuggestionsForOptions": true,
+                "getSuggestionFromMapOption": true,
+                "getSuggestionsFromAliases": true,
+                "handleTypingInCodeBlock": true,
+                "getSuggestions": true,
+                "addSuggestions": true,
+                "addMapRandomlyByPreset": true
+            },
+            "fileCoverage": "100%"
+        },
+        "/home/pham/git/dumbymap/src/utils.mjs": {
+            "funcCoverage": {
+                "onRemove": true,
+                "animateRectTransition": true,
+                "throttle": true,
+                "shiftByWindow": true,
+                "insideWindow": true,
+                "insideParent": true
+            },
+            "fileCoverage": "100%"
+        }
+    },
+    "fileWiseCoverageJSX": {}
+}
\ No newline at end of file
diff --git a/docs/Folder.html b/docs/Folder.html
new file mode 100644
index 0000000..8175794
--- /dev/null
+++ b/docs/Folder.html
@@ -0,0 +1,232 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: Folder</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: Folder</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>Folder<span class="signature">()</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Folder. Basic Element for menu item, it generate submenu on hover</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="Folder"><span class="type-signature"></span>new Folder<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    constructor.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+
+            <td class="type">
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line44">line 44</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+        <h3 class="subsection-title">Extends</h3>
+
+        
+
+
+    <ul>
+        <li>window.HTMLDivElement</li>
+    </ul>
+
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="Folder.html">Folder</a></dt>
+            <dd></dd>
+        </dl>
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/Item.html b/docs/Item.html
new file mode 100644
index 0000000..db88098
--- /dev/null
+++ b/docs/Item.html
@@ -0,0 +1,237 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: Item</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: Item</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>Item<span class="signature">()</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Item. Basic Element for menu item</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="Item"><span class="type-signature"></span>new Item<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    constructor.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line15">line 15</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+        <h3 class="subsection-title">Extends</h3>
+
+        
+
+
+    <ul>
+        <li>window.HTMLDivElement</li>
+    </ul>
+
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="Item.html">Item</a></dt>
+            <dd></dd>
+        </dl>
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/Layout.html b/docs/Layout.html
new file mode 100644
index 0000000..caf6d5e
--- /dev/null
+++ b/docs/Layout.html
@@ -0,0 +1,291 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: Layout</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: Layout</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>Layout<span class="signature">(options)</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Layout. Basic class for layout</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="Layout"><span class="type-signature"></span>new Layout<span class="signature">(options)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    constructor.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>options</code></td>
+            
+
+            <td class="type">
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line7">line 7</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="Layout.html">Layout</a></dt>
+            <dd></dd>
+        </dl>
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Members</h3>
+
+        
+            
+<h4 class="name" id="valueOf"><span class="type-signature"></span>valueOf<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    valueOf.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line23">line 23</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/Layout.mjs.html b/docs/Layout.mjs.html
new file mode 100644
index 0000000..1bbfd55
--- /dev/null
+++ b/docs/Layout.mjs.html
@@ -0,0 +1,317 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: Layout.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: Layout.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>import PlainDraggable from 'plain-draggable'
+import { onRemove, animateRectTransition } from './utils'
+
+/**
+ * Layout. Basic class for layout
+ */
+export class Layout {
+  /**
+   * constructor.
+   *
+   * @param {} options
+   */
+  constructor (options = {}) {
+    if (!options.name) throw Error('Layout name is not given')
+    this.name = options.name
+    this.enterHandler = options.enterHandler
+    this.leaveHandler = options.leaveHandler
+  }
+
+  /**
+   * valueOf.
+   */
+  valueOf = () => this.name
+}
+
+/**
+ * Side-By-Side Layout, HTML content and Showcase show on left/right side
+ *
+ * @extends {Layout}
+ */
+export class SideBySide extends Layout {
+  /**
+   * @type {}
+   */
+  name = 'side-by-side'
+
+  /**
+   * enterHandler.
+   *
+   * @param {}
+   */
+  enterHandler = ({ container, htmlHolder, showcase }) => {
+    const bar = document.createElement('div')
+    bar.className = 'bar'
+    bar.innerHTML = '&lt;div class="bar-handle">&lt;/div>'
+    const handle = bar.querySelector('.bar-handle')
+    container.appendChild(bar)
+
+    // Resize views by value
+    const resizeByLeft = left => {
+      htmlHolder.style.width = left + 'px'
+      showcase.style.width =
+        parseFloat(window.getComputedStyle(container).width) - left + 'px'
+    }
+
+    const draggable = new PlainDraggable(bar, {
+      handle,
+      containment: { left: '25%', top: 0, right: '75%', height: 0 },
+    })
+    draggable.draggableCursor = 'grab'
+
+    draggable.onDrag = pos => {
+      handle.style.transform = 'unset'
+      resizeByLeft(pos.left)
+    }
+    draggable.onDragEnd = _ => {
+      handle.style.cssText = ''
+    }
+
+    onRemove(bar, () => draggable.remove())
+  }
+
+  /**
+   * leaveHandler.
+   *
+   * @param {}
+   */
+  leaveHandler = ({ container }) => {
+    container.querySelector('.bar')?.remove()
+  }
+}
+
+/**
+ * Overlay Layout, Showcase occupies viewport, and HTML content becomes draggable blocks
+ *
+ * @extends {Layout}
+ */
+export class Overlay extends Layout {
+  /**
+   * @type {}
+   */
+  name = 'overlay'
+
+  /**
+   * saveLeftTopAsData.
+   *
+   * @param {} element
+   */
+  saveLeftTopAsData = element => {
+    const { left, top } = element.getBoundingClientRect()
+    element.dataset.left = left
+    element.dataset.top = top
+  }
+
+  /**
+   * addDraggable.
+   *
+   * @param {} element
+   */
+  addDraggable = element => {
+    // Make sure current element always on top
+    const siblings = Array.from(
+      element.parentElement?.querySelectorAll(':scope > *') ?? [],
+    )
+    let popTimer = null
+    element.onmouseover = () => {
+      popTimer = setTimeout(() => {
+        siblings.forEach(e => e.style.removeProperty('z-index'))
+        element.style.zIndex = '9001'
+      }, 200)
+    }
+    element.onmouseout = () => {
+      clearTimeout(popTimer)
+    }
+
+    // Add draggable part
+    const draggablePart = document.createElement('div')
+    element.appendChild(draggablePart)
+    draggablePart.className = 'draggable-part'
+    draggablePart.innerHTML = '&lt;div class="handle">\u2630&lt;/div>'
+
+    // Add draggable instance
+    const { left, top } = element.getBoundingClientRect()
+    const draggable = new PlainDraggable(element, {
+      top,
+      left,
+      handle: draggablePart,
+      snap: { x: { step: 20 }, y: { step: 20 } },
+    })
+
+    // FIXME use pure CSS to hide utils
+    const utils = element.querySelector('.utils')
+    draggable.onDragStart = () => {
+      utils.style.display = 'none'
+      element.classList.add('drag')
+    }
+
+    draggable.onDragEnd = () => {
+      utils.style = ''
+      element.classList.remove('drag')
+      element.style.zIndex = '9000'
+    }
+
+    // Reposition draggable instance when resized
+    new window.ResizeObserver(() => {
+      try {
+        draggable.position()
+      } catch (err) {
+        console.warn(err)
+      }
+    }).observe(element)
+
+    // Callback for remove
+    onRemove(element, () => {
+      draggable.remove()
+    })
+  }
+
+  /**
+   * enterHandler.
+   *
+   * @param {}
+   */
+  enterHandler = ({ htmlHolder, blocks }) => {
+    // FIXME It is weird rect from this method and this scope are different...
+    blocks.forEach(this.saveLeftTopAsData)
+
+    // Create draggable blocks and set each position by previous one
+    let [left, top] = [20, 20]
+    blocks.forEach(block => {
+      const originLeft = Number(block.dataset.left)
+      const originTop = Number(block.dataset.top)
+
+      // Create draggable block
+      const wrapper = document.createElement('div')
+      wrapper.classList.add('draggable-block')
+      wrapper.innerHTML = `
+        &lt;div class="utils">
+          &lt;div id="close">\u274C&lt;/div>
+          &lt;div id="plus-font-size" ">\u2795&lt;/div>
+          &lt;div id="minus-font-size">\u2796&lt;/div>
+        &lt;/div>
+      `
+      wrapper.title = 'Middle-click to hide block'
+      wrapper.onmouseup = e => {
+        // Hide block with middle click
+        if (e.button === 1) {
+          block.classList.remove('focus')
+        }
+      }
+
+      // Set DOMRect for wrapper
+      wrapper.appendChild(block)
+      wrapper.style.left = left + 'px'
+      wrapper.style.top = top + 'px'
+      htmlHolder.appendChild(wrapper)
+      const { width } = wrapper.getBoundingClientRect()
+      left += width + 30
+      if (left > window.innerWidth) {
+        top += 200
+        left = left % window.innerWidth
+      }
+
+      // Animation for DOMRect
+      animateRectTransition(
+        wrapper,
+        { left: originLeft, top: originTop },
+        { resume: true, duration: 300 },
+      ).finished.finally(() => this.addDraggable(wrapper))
+
+      // Trivial case:
+      // This hack make sure utils remains at the same place even when wrapper resized
+      // Prevent DOMRect changes when user clicking plus/minus button many times
+      const utils = wrapper.querySelector('.utils')
+      utils.onmouseover = () => {
+        const { left, top } = utils.getBoundingClientRect()
+        utils.style.cssText = `visibility: visible; z-index: 9000; position: fixed; transition: unset; left: ${left}px; top: ${top}px;`
+        document.body.appendChild(utils)
+      }
+      utils.onmouseout = () => {
+        wrapper.appendChild(utils)
+        utils.style.cssText = ''
+      }
+
+      // Close button
+      wrapper.querySelector('#close').onclick = () => {
+        block.classList.remove('focus')
+        utils.style.cssText = ''
+      }
+      // Plus/Minus font-size of content
+      wrapper.querySelector('#plus-font-size').onclick = () => {
+        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16
+        block.style.fontSize = `${fontSize + 0.2}rem`
+      }
+      wrapper.querySelector('#minus-font-size').onclick = () => {
+        const fontSize = parseFloat(window.getComputedStyle(block).fontSize) / 16
+        block.style.fontSize = `${fontSize - 0.2}rem`
+      }
+    })
+  }
+
+  /**
+   * leaveHandler.
+   *
+   * @param {}
+   */
+  leaveHandler = ({ htmlHolder, blocks }) => {
+    const resumeFromDraggable = block => {
+      const draggableContainer = block.closest('.draggable-block')
+      if (!draggableContainer) return
+      htmlHolder.appendChild(block)
+      draggableContainer.remove()
+    }
+    blocks.forEach(resumeFromDraggable)
+  }
+}
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/docs/MenuItem.mjs.html b/docs/MenuItem.mjs.html
new file mode 100644
index 0000000..244f09f
--- /dev/null
+++ b/docs/MenuItem.mjs.html
@@ -0,0 +1,450 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: MenuItem.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: MenuItem.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>import { shiftByWindow } from './utils.mjs'
+
+/**
+ * @typedef {Object} RefLink
+ * @property {string} ref -- name of link
+ * @property {string} link -- content of link
+ * @property {string|null} title -- title of link
+ */
+
+/**
+ * Item. Basic Element for menu item
+ *
+ * @extends {window.HTMLDivElement}
+ */
+export class Item extends window.HTMLDivElement {
+  /**
+   * constructor.
+   *
+   * @param {Object}
+   */
+  constructor ({ text, innerHTML, title, onclick, style, className }) {
+    super()
+    this.innerHTML = innerHTML ?? text
+    this.title = title
+    this.onclick = onclick
+    this.style.cssText = style
+    this.classList.add('menu-item')
+    className?.forEach(c => this.classList.add(c))
+
+    this.onmouseover = () => {
+      this.parentElement
+        .querySelectorAll('.sub-menu')
+        .forEach(sub => sub.remove())
+    }
+  }
+}
+window.customElements.define('menu-item', Item, { extends: 'div' })
+
+/**
+ * Folder. Basic Element for menu item, it generate submenu on hover
+ *
+ * @extends {window.HTMLDivElement}
+ */
+export class Folder extends window.HTMLDivElement {
+  /**
+   * constructor.
+   *
+   * @param {}
+   */
+  constructor ({ text, innerHTML, items }) {
+    super()
+    this.innerHTML = innerHTML ?? text
+    this.classList.add('folder', 'menu-item')
+    this.items = items
+    this.onmouseover = () => {
+      if (this.querySelector('.sub-menu')) return
+      // Prepare submenu
+      const submenu = document.createElement('div')
+      submenu.className = 'sub-menu'
+      const offset = this.items.length > 1 ? '-20px' : '0px'
+      submenu.style.cssText = `position: absolute; left: 105%; top: ${offset};`
+      this.items.forEach(item => submenu.appendChild(item))
+      submenu.onmouseleave = () => submenu.remove()
+
+      // hover effect
+      this.parentElement
+        .querySelectorAll('.sub-menu')
+        .forEach(sub => sub.remove())
+      this.appendChild(submenu)
+      shiftByWindow(submenu)
+    }
+  }
+}
+window.customElements.define('menu-folder', Folder, { extends: 'div' })
+
+/**
+ * pickMapItem.
+ *
+ * @param {Function[]} options.utils
+ */
+export const pickMapItem = ({ utils }) =>
+  new Folder({
+    innerHTML: '&lt;span>Maps&lt;span>&lt;span class="info">(Tab)&lt;/span>',
+    items: utils.renderedMaps().map(
+      map =>
+        new Item({
+          text: map.id,
+          onclick: () => {
+            map.classList.add('focus')
+            map.scrollIntoView({ behavior: 'smooth' })
+          },
+        }),
+    ),
+  })
+
+/**
+ * pickBlockItem.
+ *
+ * @param {HTMLElement[]} options.blocks
+ * @param {Function[]} options.utils
+ */
+export const pickBlockItem = ({ blocks, utils }) =>
+  new Folder({
+    innerHTML: '&lt;span>Blocks&lt;span>&lt;span class="info">(n/p)&lt;/span>',
+    items: blocks.map(
+      (block, index) => {
+        const focus = block.classList.contains('focus')
+        const preview = block.querySelector('p')
+          ?.textContent.substring(0, 15)
+          ?.concat(' ', '...  ') ?? ''
+
+        return new Item({
+          className: ['keep-menu', focus ? 'checked' : 'unchecked'],
+          innerHTML:
+            `&lt;strong>(${index})&lt;/strong>&lt;span style='display: inline-block; margin-inline: 1.2em;'>${preview}&lt;/span>`,
+          onclick: (e) => {
+            block.classList.toggle('focus')
+
+            const focus = block.classList.contains('focus')
+            if (focus) utils.scrollToBlock(block)
+            const item = e.target.closest('.menu-item.keep-menu')
+            item.classList.add(focus ? 'checked' : 'unchecked')
+            item.classList.remove(focus ? 'unchecked' : 'checked')
+
+            // UX: remove menu after user select/deselect blocks
+            const submenu = e.target.closest('.sub-menu')
+            submenu.onmouseleave = () => { submenu.closest('.menu').style.display = 'none' }
+          },
+        })
+      },
+    ),
+  })
+
+/**
+ * pickLayoutItem.
+ *
+ * @param {HTEMElement} options.container
+ * @param {String[]} options.layouts
+ */
+export const pickLayoutItem = ({ container, layouts }) =>
+  new Folder({
+    innerHTML: '&lt;span>Layouts&lt;span>&lt;span class="info">(x)&lt;/span>',
+    items: [
+      ...layouts.map(
+        layout =>
+          new Item({
+            text: layout.name,
+            onclick: () => container.setAttribute('data-layout', layout.name),
+          }),
+      ),
+      new Item({
+        innerHTML: '&lt;a href="https://github.com/outdoorsafetylab/dumbymap#layouts" class="external" style="display: block; padding: 0.5rem;">More...&lt;/a>',
+        style: 'padding: 0;',
+      }),
+    ],
+  })
+
+/**
+ * addGeoLink.
+ *
+ * @param {Function[]} options.utils
+ * @param {Range} range
+ */
+export const addGeoLink = ({ utils }, range) =>
+  new Item({
+    text: 'Add GeoLink',
+    onclick: () => {
+      const content = range.toString()
+      // FIXME Apply geolink only on matching sub-range
+      const match = content.match(/(^\D*[\d.]+)\D+([\d.]+)\D*$/)
+      if (!match) return false
+
+      const [x, y] = match.slice(1)
+      const anchor = document.createElement('a')
+      anchor.textContent = content
+      // FIXME apply WGS84
+      anchor.href = `geo:${y},${x}?xy=${x},${y}`
+
+      // FIXME
+      if (utils.createGeoLink(anchor)) {
+        range.deleteContents()
+        range.insertNode(anchor)
+      }
+    },
+  })
+
+/**
+ * Suggestion. Menu Item for editor suggestion
+ *
+ * @extends {Item}
+ */
+export class Suggestion extends Item {
+  /**
+   * constructor.
+   *
+   * @param {}
+   */
+  constructor ({ text, replace, cm }) {
+    super({ text })
+    this.replace = replace
+    this.classList.add('suggestion')
+
+    this.onmouseover = () => {
+      Array.from(this.parentElement?.children)?.forEach(s =>
+        s.classList.remove('focus'),
+      )
+      this.classList.add('focus')
+    }
+    this.onmouseout = () => {
+      this.classList.remove('focus')
+    }
+    this.onclick = () => {
+      const anchor = cm.getCursor()
+      cm.setSelection(anchor, { ...anchor, ch: 0 })
+      cm.replaceSelection(this.replace)
+      cm.focus()
+      const newAnchor = { ...anchor, ch: this.replace.length }
+      cm.setCursor(newAnchor)
+    }
+  }
+}
+window.customElements.define('menu-item-suggestion', Suggestion, { extends: 'div' })
+
+/**
+ * renderResults. return a menu item for reporting render results
+ *
+ * @param {Object} options.modal -- Ojbect of plain-modal
+ * @param {HTMLElement} options.modalContent
+ * @param {HTMLElement} map -- Rendered map element
+ */
+export const renderResults = ({ modal, modalContent }, map) =>
+  new Item({
+    text: 'Render Results',
+    onclick: () => {
+      modal.open()
+      modal.overlayBlur = 3
+      modal.closeByEscKey = false
+      // HACK find another way to override inline style
+      document.querySelector('.plainmodal-overlay-force').style.position =
+        'relative'
+
+      modalContent.innerHTML = ''
+      const sourceCode = document.createElement('div')
+      sourceCode.innerHTML = `&lt;a href="${map.renderer.url ?? map.renderer.use}">Source Code&lt;/a>`
+      modalContent.appendChild(sourceCode)
+      const printDetails = result => {
+        // const funcBody = result.func.toString()
+        // const loc = funcBody.split('\n').length
+        const color =
+          {
+            success: 'green',
+            fail: 'red',
+            skip: 'black',
+            stop: 'chocolate',
+          }[result.state] ?? 'black'
+        printObject(
+          result,
+          modalContent,
+          `${result.func.name} &lt;span style='float: right;'>&lt;span style='display: inline-block; width: 100px; color: ${color};'>${result.state}&lt;/span>&lt;/span>`,
+        )
+      }
+
+      // Add contents about prepare steps
+      const prepareHeading = document.createElement('h3')
+      prepareHeading.textContent = 'Prepare Steps'
+      modalContent.appendChild(prepareHeading)
+      const prepareSteps = map.renderer.results.filter(
+        r => r.type === 'prepare',
+      )
+      prepareSteps.forEach(printDetails)
+
+      // Add contents about render steps
+      const renderHeading = document.createElement('h3')
+      renderHeading.textContent = 'Render Steps'
+      modalContent.appendChild(renderHeading)
+      const renderSteps = map.renderer.results.filter(r => r.type === 'render')
+      renderSteps.forEach(printDetails)
+    },
+  })
+
+/**
+ * printObject. Generate &lt;details> in parent element based on Ojbect properties
+ *
+ * @param {Object} obj
+ * @param {HTMLElement} parentElement
+ * @param {String} name
+ */
+function printObject (obj, parentElement, name = null) {
+  // Create &lt;details> and &lt;summary> inside
+  const detailsEle = document.createElement('details')
+  const details = name ?? (obj instanceof Error ? obj.name : Object.values(obj)[0])
+  detailsEle.innerHTML = `&lt;summary>${details}&lt;/summary>`
+  parentElement.appendChild(detailsEle)
+
+  detailsEle.onclick = () => {
+    // Don't add items if it has contents
+    if (detailsEle.querySelector(':scope > :not(summary)')) return
+
+    if (obj instanceof Error) {
+      // Handle Error objects specially
+      const errorProps = ['name', 'message', 'stack', ...Object.keys(obj)]
+      errorProps.forEach(key => {
+        const value = obj[key]
+        const valueString = key === 'stack' ? `&lt;pre>${value}&lt;/pre>` : value
+        const propertyElement = document.createElement('p')
+        propertyElement.innerHTML = `&lt;strong>${key}&lt;/strong>: ${valueString}`
+        detailsEle.appendChild(propertyElement)
+      })
+    } else {
+      // Handle regular objects
+      Object.entries(obj).forEach(([key, value]) => {
+        if (typeof value === 'object' &amp;&amp; value !== null) {
+          printObject(value, detailsEle, key)
+        } else {
+          const valueString =
+            typeof value === 'function'
+              ? `&lt;pre>${value}&lt;/pre>`
+              : value ?? typeof value
+          const propertyElement = document.createElement('p')
+          propertyElement.innerHTML = `&lt;strong>${key}&lt;/strong>: ${valueString}`
+          detailsEle.appendChild(propertyElement)
+        }
+      })
+    }
+  }
+}
+
+/**
+ * toggleBlockFocus. Menu Item for toggling focus on a block
+ *
+ * @param {HTMLElement} block
+ */
+export const toggleBlockFocus = block =>
+  new Item({
+    text: 'Toggle Focus',
+    onclick: () => block.classList.toggle('focus'),
+  })
+
+/**
+ * toggleMapFocus. Menu Item for toggling focus on a map
+ *
+ * @param {HTMLElement} map
+ */
+export const toggleMapFocus = map =>
+  new Item({
+    text: 'Toggle Focus',
+    onclick: () => map.classList.toggle('focus'),
+  })
+
+/**
+ * getCoordinatesByPixels.
+ *
+ * @param {HTMLElement} map instance
+ * @param {Number[]} xy -- pixel of window
+ */
+export const getCoordinatesByPixels = (map, xy) =>
+  new Item({
+    text: 'Get Coordinates',
+    onclick: () => {
+      const [x, y] = map.renderer.unproject(xy)
+      const xyString = `[${x.toFixed(7)}, ${y.toFixed(7)}]`
+      navigator.clipboard.writeText(xyString)
+      window.alert(`${xyString} copied to clipboard`)
+    },
+  })
+
+/**
+ * restoreCamera.
+ *
+ * @param {HTMLElement} map
+ */
+export const restoreCamera = map =>
+  new Item({
+    text: 'Restore Camera',
+    onclick: () => map.renderer.restoreCamera(),
+  })
+
+/**
+ * addRefLink. replace selected text into markdown link by reference style links
+ *
+ * @param {CodeMirror} cm
+ * @param {RefLink[]} refLinks
+ */
+export const addRefLink = (cm, refLinks) =>
+  new Folder({
+    text: 'Add Link',
+    items: refLinks.map(refLink => new Item({
+      text: refLink.link.startsWith('geo:') ? `@ ${refLink.ref}` : refLink.ref,
+      title: refLink.link,
+      onclick: () => {
+        const selection = cm.getSelection()
+        if (selection === refLink.ref) {
+          cm.replaceSelection(`[${selection}]`)
+        } else {
+          cm.replaceSelection(`[${selection}][${refLink.ref}]`)
+        }
+      },
+    })),
+  })
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/docs/Overlay.html b/docs/Overlay.html
new file mode 100644
index 0000000..fd1a8a8
--- /dev/null
+++ b/docs/Overlay.html
@@ -0,0 +1,568 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: Overlay</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: Overlay</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>Overlay<span class="signature">()</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Overlay Layout, Showcase occupies viewport, and HTML content becomes draggable blocks</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="Overlay"><span class="type-signature"></span>new Overlay<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line88">line 88</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+        <h3 class="subsection-title">Extends</h3>
+
+        
+
+
+    <ul>
+        <li><a href="Layout.html">Layout</a></li>
+    </ul>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Members</h3>
+
+        
+            
+<h4 class="name" id="addDraggable"><span class="type-signature"></span>addDraggable<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    addDraggable.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line110">line 110</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="enterHandler"><span class="type-signature"></span>enterHandler<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    enterHandler.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line174">line 174</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="leaveHandler"><span class="type-signature"></span>leaveHandler<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    leaveHandler.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line257">line 257</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :Object</span></h4>
+
+
+
+
+
+
+    <h5>Type:</h5>
+    <ul>
+        <li>
+            
+<span class="param-type">Object</span>
+
+
+        </li>
+    </ul>
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line92">line 92</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="saveLeftTopAsData"><span class="type-signature"></span>saveLeftTopAsData<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    saveLeftTopAsData.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line99">line 99</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="valueOf"><span class="type-signature"></span>valueOf<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    valueOf.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+    <dt class="inherited-from">Inherited From:</dt>
+    <dd class="inherited-from"><ul class="dummy"><li>
+        <a href="Layout.html#valueOf">Layout#valueOf</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line23">line 23</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/SideBySide.html b/docs/SideBySide.html
new file mode 100644
index 0000000..30320d5
--- /dev/null
+++ b/docs/SideBySide.html
@@ -0,0 +1,444 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: SideBySide</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: SideBySide</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>SideBySide<span class="signature">()</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Side-By-Side Layout, HTML content and Showcase show on left/right side</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="SideBySide"><span class="type-signature"></span>new SideBySide<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line31">line 31</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+        <h3 class="subsection-title">Extends</h3>
+
+        
+
+
+    <ul>
+        <li><a href="Layout.html">Layout</a></li>
+    </ul>
+
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Members</h3>
+
+        
+            
+<h4 class="name" id="enterHandler"><span class="type-signature"></span>enterHandler<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    enterHandler.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line42">line 42</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="leaveHandler"><span class="type-signature"></span>leaveHandler<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    leaveHandler.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line78">line 78</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :Object</span></h4>
+
+
+
+
+
+
+    <h5>Type:</h5>
+    <ul>
+        <li>
+            
+<span class="param-type">Object</span>
+
+
+        </li>
+    </ul>
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line35">line 35</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="valueOf"><span class="type-signature"></span>valueOf<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    valueOf.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+    <dt class="inherited-from">Inherited From:</dt>
+    <dd class="inherited-from"><ul class="dummy"><li>
+        <a href="Layout.html#valueOf">Layout#valueOf</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="Layout.mjs.html">Layout.mjs</a>, <a href="Layout.mjs.html#line23">line 23</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/Suggestion.html b/docs/Suggestion.html
new file mode 100644
index 0000000..505a871
--- /dev/null
+++ b/docs/Suggestion.html
@@ -0,0 +1,232 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Class: Suggestion</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Class: Suggestion</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2><span class="attribs"><span class="type-signature"></span></span>Suggestion<span class="signature">()</span><span class="type-signature"></span></h2>
+        
+            <div class="class-description">Suggestion. Menu Item for editor suggestion</div>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+    
+    <h2>Constructor</h2>
+    
+
+    
+    <h4 class="name" id="Suggestion"><span class="type-signature"></span>new Suggestion<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    constructor.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+
+            <td class="type">
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line192">line 192</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    
+    </div>
+
+    
+        <h3 class="subsection-title">Extends</h3>
+
+        
+
+
+    <ul>
+        <li><a href="Item.html">Item</a></li>
+    </ul>
+
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Classes</h3>
+
+        <dl>
+            <dt><a href="Suggestion.html">Suggestion</a></dt>
+            <dd></dd>
+        </dl>
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/dumbyUtils.mjs.html b/docs/dumbyUtils.mjs.html
new file mode 100644
index 0000000..120ab07
--- /dev/null
+++ b/docs/dumbyUtils.mjs.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: dumbyUtils.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: dumbyUtils.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>import LeaderLine from 'leader-line'
+import { insideWindow, insideParent } from './utils'
+
+/**
+ * focusNextMap.
+ *
+ * @param {Boolean} reverse -- focus previous map
+ */
+export function focusNextMap (reverse = false) {
+  const renderedList = this.utils.renderedMaps()
+  const index = renderedList.findIndex(e => e.classList.contains('focus'))
+  const nextIndex = (index + (reverse ? -1 : 1)) % renderedList.length
+
+  const nextMap = renderedList.at(nextIndex)
+  nextMap.classList.add('focus')
+  nextMap.scrollIntoView({ behavior: 'smooth' })
+}
+
+/**
+ * focusNextBlock.
+ *
+ * @param {Boolean} reverse -- focus previous block
+ */
+export function focusNextBlock (reverse = false) {
+  const blocks = this.blocks.filter(b =>
+    b.checkVisibility({
+      contentVisibilityAuto: true,
+      opacityProperty: true,
+      visibilityProperty: true,
+    }),
+  )
+  const index = blocks.findIndex(e => e.classList.contains('focus'))
+  const nextIndex = (index + (reverse ? -1 : 1)) % blocks.length
+
+  blocks.forEach(b => b.classList.remove('focus'))
+  const nextBlock = blocks.at(nextIndex)
+  nextBlock?.classList?.add('focus')
+  scrollToBlock(nextBlock)
+}
+
+/**
+ * scrollToBlock. Smoothly scroll to target block.
+ * If block is bigger than viewport, then pick strategy wisely.
+ *
+ * @param {HTMLElement} block -- Scroll to this element
+ */
+export const scrollToBlock = block => {
+  const parentRect = block.parentElement.getBoundingClientRect()
+  const scrollBlock =
+    block.getBoundingClientRect().height > parentRect.height * 0.8
+      ? 'nearest'
+      : 'center'
+  block.scrollIntoView({ behavior: 'smooth', block: scrollBlock })
+}
+
+/**
+ * focusDelay. Delay of throttle, value changes by cases
+ */
+export function focusDelay () {
+  return window.window.getComputedStyle(this.showcase).display === 'none' ? 50 : 300
+}
+
+/**
+ * switchToNextLayout.
+ *
+ * @param {Boolean} reverse -- Switch to previous one
+ */
+export function switchToNextLayout (reverse = false) {
+  const layouts = this.layouts
+  const currentLayoutName = this.container.dataset.layout
+  const currentIndex = layouts.map(l => l.name).indexOf(currentLayoutName)
+  const padding = reverse ? -1 : 1
+  const nextIndex =
+    currentIndex === -1
+      ? 0
+      : (currentIndex + padding + layouts.length) % layouts.length
+  const nextLayout = layouts[nextIndex]
+  this.container.dataset.layout = nextLayout.name
+}
+
+/**
+ * removeBlockFocus.
+ */
+export function removeBlockFocus () {
+  this.blocks.forEach(b => b.classList.remove('focus'))
+}
+
+/**
+ * getMarkersFromMaps. Get marker elements by GeoLink
+ *
+ * @param {HTMLAnchorElement} link
+ * @return {HTMLElement[]} markers
+ */
+const getMarkersFromMaps = link => {
+  const maps = Array.from(
+    link.closest('.Dumby')
+      .querySelectorAll('.mapclay[data-render="fulfilled"]'),
+  )
+  return maps
+    .filter(map => link.targets ? link.targets.includes(map.id) : true)
+    .map(map => {
+      const renderer = map.renderer
+      const markerTitle = `${link.targets ?? 'all'}@${link.xy}`
+
+      return map.querySelector(`.marker[title="${markerTitle}"]`) ??
+        renderer.addMarker({
+          xy: link.xy,
+          title: markerTitle,
+          type: link.type,
+        })
+    })
+}
+
+/**
+ * addLeaderLine, from link element to target element
+ *
+ * @param {HTMLAnchorElement} link
+ * @param {Element} target
+ */
+const addLeaderLine = (link, target) => {
+  const line = new LeaderLine({
+    start: link,
+    end: target,
+    hide: true,
+    middleLabel: link.title,
+    path: 'magnet',
+  })
+  line.show('draw', { duration: 300 })
+
+  return line
+}
+
+/**
+ * Create geolinks, which points to map by geo schema and id
+ *
+ * @param {HTMLElement} Elements contains anchor elements for doclinks
+ * @returns {Boolean} ture is link is created, false if coordinates are invalid
+ */
+export const createGeoLink = (link) => {
+  const url = new URL(link.href)
+  const xyInParams = url.searchParams.get('xy')?.split(',')?.map(Number)
+  const xy = xyInParams ?? url?.href
+    ?.match(/^geo:([-]?[0-9.]+),([-]?[0-9.]+)/)
+    ?.splice(1)
+    ?.reverse()
+    ?.map(Number)
+
+  if (!xy || isNaN(xy[0]) || isNaN(xy[1])) return false
+
+  // Geo information in link
+  link.url = url
+  link.xy = xy
+  link.classList.add('with-leader-line', 'geolink')
+  link.targets = link.url.searchParams.get('id')?.split(',') ?? null
+  link.type = link.url.searchParams.get('type') ?? null
+
+  link.lines = []
+
+  // LeaderLine
+  link.onmouseover = () => {
+    const anchors = getMarkersFromMaps(link)
+    anchors
+      .filter(isAnchorVisible)
+      .forEach(anchor => {
+        const line = addLeaderLine(link, anchor)
+        link.lines.push(line)
+      })
+  }
+  link.onmouseout = () => removeLeaderLines(link)
+  link.onclick = (event) => {
+    event.preventDefault()
+    removeLeaderLines(link)
+    getMarkersFromMaps(link).forEach(updateMapCameraByMarker(link.xy))
+  }
+  return true
+}
+
+/**
+ * CreateDocLink.
+ *
+ * @param {HTMLElement} Elements contains anchor elements for doclinks
+ */
+export const createDocLink = link => {
+  link.classList.add('with-leader-line', 'doclink')
+  link.lines = []
+
+  link.onmouseover = () => {
+    const label = decodeURIComponent(link.href.split('#')[1])
+    const selector = link.title.split('=>')[1] ?? '#' + label
+    const targets = document.querySelectorAll(selector)
+
+    targets.forEach(target => {
+      if (!target?.checkVisibility()) return
+
+      const line = new LeaderLine({
+        start: link,
+        end: target,
+        middleLabel: LeaderLine.pathLabel({
+          text: label,
+          fontWeight: 'bold',
+        }),
+        hide: true,
+        path: 'magnet',
+      })
+      link.lines.push(line)
+      line.show('draw', { duration: 300 })
+    })
+  }
+  link.onmouseout = () => {
+    link.lines.forEach(line => line.remove())
+    link.lines.length = 0
+  }
+}
+
+/**
+ * removeLeaderLines. clean lines start from link
+ *
+ * @param {HTMLAnchorElement} link
+ */
+const removeLeaderLines = link => {
+  if (!link.lines) return
+  link.lines.forEach(line => line.remove())
+  link.lines = []
+}
+
+/**
+ * updateMapByMarker. get function for updating map camera by marker
+ *
+ * @param {Number[]} xy
+ * @return {Function} function
+ */
+const updateMapCameraByMarker = xy => marker => {
+  const renderer = marker.closest('.mapclay')?.renderer
+  renderer.updateCamera({ center: xy }, true)
+}
+
+/**
+ * isAnchorVisible. check anchor(marker) is visible for current map camera
+ *
+ * @param {Element} anchor
+ */
+const isAnchorVisible = anchor => {
+  const mapContainer = anchor.closest('.mapclay')
+  return insideWindow(anchor) &amp;&amp; insideParent(anchor, mapContainer)
+}
+
+/**
+ * addAnchorByPoint.
+ *
+ * @param {point} options.point -- object has {x, y} for window coordinates
+ * @param {HTMLElement} options.map
+ * @param {Function} options.validateAnchorName -- validate anchor name is OK to use
+ */
+export const addAnchorByPoint = ({
+  point,
+  map,
+  validateAnchorName = () => true,
+}) => {
+  const rect = map.getBoundingClientRect()
+  const [x, y] = map.renderer
+    .unproject([point.x - rect.left, point.y - rect.top])
+    .map(coord => Number(coord.toFixed(7)))
+
+  let prompt
+  let anchorName
+
+  do {
+    prompt = prompt ? 'Anchor name exists' : 'Name this anchor'
+    anchorName = window.prompt(prompt, `${x},${y}`)
+  }
+  while (anchorName !== null &amp;&amp; !validateAnchorName(anchorName))
+  if (anchorName === null) return
+
+  const desc = window.prompt('Description', anchorName) ?? anchorName
+
+  const link = `geo:${y},${x}?xy=${x},${y}&amp;id=${map.id}&amp;type=circle`
+  map.renderer.addMarker({
+    xy: [x, y],
+    title: `${map.id}@${x},${y}`,
+    type: 'circle',
+  })
+
+  return { ref: anchorName, link, title: desc }
+}
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/docs/dumbymap.mjs.html b/docs/dumbymap.mjs.html
new file mode 100644
index 0000000..b1114b8
--- /dev/null
+++ b/docs/dumbymap.mjs.html
@@ -0,0 +1,563 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: dumbymap.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: dumbymap.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>import MarkdownIt from 'markdown-it'
+import MarkdownItAnchor from 'markdown-it-anchor'
+import MarkdownItFootnote from 'markdown-it-footnote'
+import MarkdownItFrontMatter from 'markdown-it-front-matter'
+import MarkdownItInjectLinenumbers from 'markdown-it-inject-linenumbers'
+import { renderWith, defaultAliases, parseConfigsFromYaml } from 'mapclay'
+import { onRemove, animateRectTransition, throttle, shiftByWindow } from './utils'
+import { Layout, SideBySide, Overlay } from './Layout'
+import * as utils from './dumbyUtils'
+import * as menuItem from './MenuItem'
+import PlainModal from 'plain-modal'
+
+/** Selector of special HTML Elements */
+const mapBlockSelector = 'pre:has(.language-map)'
+const docLinkSelector = 'a[href^="#"][title^="=>"]'
+const geoLinkSelector = 'a[href^="geo:"]'
+
+/** Default Layouts */
+const defaultLayouts = [
+  new Layout({ name: 'normal' }),
+  new SideBySide({ name: 'side-by-side' }),
+  new Overlay({ name: 'overlay' }),
+]
+
+/** Cache across every dumbymap generation */
+const mapCache = {}
+
+/**
+ * markdown2HTML.
+ *
+ * @param {HTMLElement} container -- Target Element to include generated HTML contents
+ * @param {String} mdContent -- Texts in Markdown
+ */
+export const markdown2HTML = (container, mdContent) => {
+  /** Prepare Elements for Container */
+  container.replaceChildren()
+  container.innerHTML = '&lt;div class="SemanticHtml">&lt;/div>'
+  const htmlHolder = container.querySelector('.SemanticHtml')
+
+  /** Prepare MarkdownIt Instance */
+  const md = MarkdownIt({
+    html: true,
+    breaks: true,
+    linkify: true,
+  })
+    .use(MarkdownItAnchor, {
+      permalink: MarkdownItAnchor.permalink.linkInsideHeader({
+        placement: 'before',
+      }),
+    })
+    .use(MarkdownItFootnote)
+    .use(MarkdownItFrontMatter)
+    .use(MarkdownItInjectLinenumbers)
+
+  /** Set up linkify for GeoLinks */
+  const coordinateRegex = /^(\D*)(-?\d+\.?\d*)\s*([,\x2F\uFF0C])\s*(-?\d+\.?\d*)/
+  const coordinateValue = {
+    validate: coordinateRegex,
+    normalize: function (match) {
+      const [, , x, sep, y] = match.text.match(coordinateRegex)
+      match.url = `geo:${y},${x}?xy=${x},${y}`
+      match.text = `${x}${sep} ${y}`
+      match.index += match.text.indexOf(x) + 1
+      return match
+    },
+  }
+  const patterns = ['[', '(', '📍', '\uFF08', '@', 'geo:', 'twd']
+  patterns.forEach(prefix =>
+    md.linkify.add(prefix, coordinateValue),
+  )
+
+  /** Custom rule for Blocks in DumbyMap */
+  // FIXME A better way to generate blocks
+  md.renderer.rules.dumby_block_open = () => '&lt;div>'
+  md.renderer.rules.dumby_block_close = () => '&lt;/div>'
+  md.core.ruler.before('block', 'dumby_block', state => {
+    state.tokens.push(new state.Token('dumby_block_open', '', 1))
+  })
+  // Add close tag for block with more than 2 empty lines
+  md.block.ruler.before('table', 'dumby_block', (state, startLine) => {
+    if (
+      state.src[state.bMarks[startLine - 1]] === '\n' &amp;&amp;
+      state.src[state.bMarks[startLine - 2]] === '\n' &amp;&amp;
+      state.tokens.at(-1).type !== 'list_item_open' // Quick hack for not adding tag after "::marker" for &lt;li>
+    ) {
+      state.push('dumby_block_close', '', -1)
+      state.push('dumby_block_open', '', 1)
+    }
+  })
+
+  md.core.ruler.after('block', 'dumby_block', state => {
+    state.tokens.push(new state.Token('dumby_block_close', '', -1))
+  })
+
+  /** Render HTML */
+  htmlHolder.innerHTML = md.render(mdContent)
+  /** Post HTML rendered */
+  // TODO Do this in markdown-it
+  const blocks = htmlHolder.querySelectorAll(':scope > div:not(:has(nav))')
+  blocks.forEach(b => {
+    b.classList.add('dumby-block')
+    b.dataset.total = blocks.length
+  })
+
+  return container
+}
+
+/**
+ * generateMaps.
+ *
+ * @param {HTMLElement} container -- Target Element contains HTML contents
+ * @param {Number} options.delay -- delay of map generation, milliseconds
+ * @return {Object} dumbymap -- Include and Elements and Methods about managing contents
+ */
+export const generateMaps = (container, { layouts = [], delay, renderCallback } = {}) => {
+  /** Prepare Contaner/HTML Holder/Showcase */
+  container.classList.add('Dumby')
+  delete container.dataset.layout
+  container.dataset.layout = defaultLayouts[0].name
+  const htmlHolder = container.querySelector('.SemanticHtml') ?? container
+  const blocks = Array.from(htmlHolder.querySelectorAll('.dumby-block'))
+  const showcase = document.createElement('div')
+  container.appendChild(showcase)
+  showcase.classList.add('Showcase')
+  const renderPromises = []
+
+  /** Prepare Modal */
+  const modalContent = document.createElement('div')
+  container.appendChild(modalContent)
+  const modal = new PlainModal(modalContent)
+
+  /** Define dumbymap Object */
+  const dumbymap = {
+    layouts: [...defaultLayouts, ...layouts.map(l => typeof l === 'object' ? l : { name: l })],
+    container,
+    htmlHolder,
+    showcase,
+    blocks,
+    modal,
+    modalContent,
+    utils: {
+      ...utils,
+      renderedMaps: () =>
+        Array.from(
+          container.querySelectorAll('.mapclay[data-render=fulfilled]'),
+        ).sort((a, b) => a.style.order > b.style.order),
+      setContextMenu: (menuCallback) => {
+        const originalCallback = container.oncontextmenu
+        container.oncontextmenu = (e) => {
+          const menu = originalCallback(e)
+          menuCallback(e, menu)
+          menu.style.transform = ''
+          shiftByWindow(menu)
+        }
+      },
+      focusNextMap: throttle(utils.focusNextMap, utils.focusDelay),
+      switchToNextLayout: throttle(utils.switchToNextLayout, 300),
+    },
+  }
+  Object.entries(dumbymap.utils).forEach(([util, func]) => {
+    dumbymap.utils[util] = func.bind(dumbymap)
+  })
+
+  /** Create GeoLinks and DocLinks */
+  container.querySelectorAll(docLinkSelector)
+    .forEach(utils.createDocLink)
+  container.querySelectorAll(geoLinkSelector)
+    .forEach(utils.createGeoLink)
+
+  /**
+   * mapFocusObserver. observe for map focus
+   * @return {MutationObserver} observer
+   */
+  const mapFocusObserver = () =>
+    new window.MutationObserver(mutations => {
+      const mutation = mutations.at(-1)
+      const target = mutation.target
+      const focus = target.classList.contains('focus')
+      const shouldBeInShowcase =
+        focus &amp;&amp;
+        showcase.checkVisibility({
+          contentVisibilityAuto: true,
+          opacityProperty: true,
+          visibilityProperty: true,
+        })
+
+      if (focus) {
+        dumbymap.utils
+          .renderedMaps()
+          .filter(map => map.id !== target.id)
+          .forEach(map => map.classList.remove('focus'))
+      }
+
+      if (shouldBeInShowcase) {
+        if (showcase.contains(target)) return
+
+        // Placeholder for map in Showcase, it should has the same DOMRect
+        const placeholder = target.cloneNode(true)
+        delete placeholder.id
+        placeholder.className = ''
+
+        const parent = target.parentElement
+        parent.replaceChild(placeholder, target)
+        onRemove(placeholder, () => {
+          parent.appendChild(target)
+        })
+
+        // FIXME Maybe use @start-style for CSS
+        // Trigger CSS transition, if placeholde is the olny child element in block,
+        // reduce its height to zero.
+        // To make sure the original height of placeholder is applied, DOM changes seems needed
+        // then set data-attribute for CSS selector to change height to 0
+        placeholder.getBoundingClientRect()
+        placeholder.dataset.placeholder = target.id
+
+        // To fit showcase, remove all inline style
+        target.style.cssText = ''
+        target.style.order = placeholder.style.order
+        showcase.appendChild(target)
+
+        // Resume rect from Semantic HTML to Showcase, with animation
+        animateRectTransition(target, placeholder.getBoundingClientRect(), {
+          duration: 300,
+          resume: true,
+        })
+      } else if (showcase.contains(target)) {
+        // Check placeholder is inside Semantic HTML
+        const placeholder = htmlHolder.querySelector(
+          `[data-placeholder="${target.id}"]`,
+        )
+        if (!placeholder) { throw Error(`Cannot find placeholder for map "${target.id}"`) }
+
+        // Consider animation may fail, write callback
+        const afterAnimation = () => {
+          target.style = placeholder.style.cssText
+          placeholder.remove()
+        }
+
+        // animation from Showcase to placeholder
+        animateRectTransition(target, placeholder.getBoundingClientRect(), {
+          duration: 300,
+        }).finished.finally(afterAnimation)
+      }
+    })
+
+  /** Observer for layout changes */
+  const layoutObserver = new window.MutationObserver(mutations => {
+    const mutation = mutations.at(-1)
+    const oldLayout = mutation.oldValue
+    const newLayout = container.dataset.layout
+
+    // Apply handler for leaving/entering layouts
+    if (oldLayout) {
+      dumbymap.layouts
+        .find(l => l.name === oldLayout)
+        ?.leaveHandler?.call(this, dumbymap)
+    }
+
+    Object.values(dumbymap)
+      .flat()
+      .filter(ele => ele instanceof window.HTMLElement)
+      .forEach(ele => { ele.style.cssText = '' })
+
+    if (newLayout) {
+      dumbymap.layouts
+        .find(l => l.name === newLayout)
+        ?.enterHandler?.call(this, dumbymap)
+    }
+
+    // Since layout change may show/hide showcase, the current focused map may need to go into/outside showcase
+    // Reset attribute triggers MutationObserver which is observing it
+    const focusMap =
+      container.querySelector('.mapclay.focus') ??
+      container.querySelector('.mapclay')
+    focusMap?.classList?.add('focus')
+  })
+  layoutObserver.observe(container, {
+    attributes: true,
+    attributeFilter: ['data-layout'],
+    attributeOldValue: true,
+    characterDataOldValue: true,
+  })
+
+  onRemove(htmlHolder, () => layoutObserver.disconnect())
+
+  /**
+   * afterMapRendered. callback of each map rendered
+   *
+   * @param {Object} renderer
+   */
+  const afterMapRendered = renderer => {
+    const mapElement = renderer.target
+    // FIXME
+    mapElement.renderer = renderer
+    mapElement.tabindex = -1
+    if (mapElement.dataset.render === 'fulfilled') {
+      mapCache[mapElement.id] ??= renderer
+    } else {
+      return
+    }
+
+    renderCallback?.(renderer)
+
+    // Work with Mutation Observer
+    const observer = mapFocusObserver()
+    observer.observe(mapElement, {
+      attributes: true,
+      attributeFilter: ['class'],
+      attributeOldValue: true,
+    })
+    onRemove(dumbymap.htmlHolder, () => {
+      observer.disconnect()
+    })
+  }
+
+  // Set unique ID for map container
+  const mapIdList = []
+  const assignMapId = config => {
+    let mapId = config.id?.replaceAll('\x20', '_')
+    if (!mapId) {
+      mapId = config.use?.split('/')?.at(-1)
+      let counter = 1
+      while (!mapId || mapIdList.includes(mapId)) {
+        mapId = `${config.use ?? 'unnamed'}-${counter}`
+        counter++
+      }
+    }
+
+    config.id = mapId
+    mapIdList.push(mapId)
+    return config
+  }
+
+  // Render each code block with "language-map" class
+  const elementsWithMapConfig = Array.from(
+    container.querySelectorAll(mapBlockSelector) ?? [],
+  )
+  /**
+   * updateAttributeByStep.
+   *
+   * @param {Object} -- renderer which is running steps
+   */
+  const updateAttributeByStep = ({ results, target, steps }) => {
+    let passNum = results.filter(
+      r => r.type === 'render' &amp;&amp; r.state.match(/success|skip/),
+    ).length
+    const total = steps.length
+    passNum += `/${total}`
+
+    const final = results.filter(r => r.type === 'render').length === total
+
+    // FIXME HACK use MutationObserver for animation
+    if (!target.animations) target.animations = Promise.resolve()
+    target.animations = target.animations.then(async () => {
+      await new Promise(resolve => setTimeout(resolve, 100))
+      if (final) passNum += '\x20'
+      target.dataset.report = passNum
+
+      if (final) setTimeout(() => delete target.dataset.report, 100)
+    })
+  }
+  /**
+   * config converter for mapclay.renderWith()
+   *
+   * @param {Object} config
+   * @return {Object} -- converted config
+   */
+  const configConverter = config => ({
+    use: config.use ?? 'Leaflet',
+    width: '100%',
+    ...config,
+    aliases: {
+      ...defaultAliases,
+      ...(config.aliases ?? {}),
+    },
+    stepCallback: updateAttributeByStep,
+  })
+
+  /** Get render method by converter */
+  const render = renderWith(configConverter)
+
+  /** Render each taget element for maps */
+  let order = 0
+  elementsWithMapConfig.forEach(target => {
+    // Get text in code block starts with markdown text '```map'
+    const configText = target
+      .querySelector('.language-map')
+      .textContent // BE CAREFUL!!! 0xa0 char is "non-breaking spaces" in HTML text content
+      // replace it by normal space
+      .replace(/\u00A0/g, '\u0020')
+
+    let configList = []
+    try {
+      configList = parseConfigsFromYaml(configText).map(assignMapId)
+    } catch (_) {
+      console.warn('Fail to parse yaml config for element', target)
+      return
+    }
+
+    // If map in cache has the same ID, just put it into target
+    // So user won't feel anything changes when editing markdown
+    configList.forEach(config => {
+      const cachedRenderer = mapCache[config.id]
+      if (!cachedRenderer) return
+
+      target.appendChild(cachedRenderer.target)
+      config.target = cachedRenderer.target
+    })
+
+    // trivial: if map cache is applied, do not show yaml text
+    if (target.querySelector('.mapclay')) {
+      target
+        .querySelectorAll(':scope > :not([data-render=fulfilled])')
+        .forEach(e => e.remove())
+    }
+
+    // TODO Use debounce of user input to decide rendering timing
+    // Render maps with delay
+    const timer = setTimeout(
+      () => {
+        render(target, configList).forEach(renderPromise => {
+          renderPromises.push(renderPromise)
+          renderPromise.then(afterMapRendered)
+        })
+        Array.from(target.children).forEach(e => {
+          e.style.order = order
+          order++
+          if (e.dataset.render === 'fulfilled') {
+            afterMapRendered(e.renderer)
+          }
+        })
+      },
+      delay ?? 1000,
+    )
+    onRemove(htmlHolder, () => {
+      clearTimeout(timer)
+    })
+  })
+
+  /** Prepare Context Menu */
+  const menu = document.createElement('div')
+  menu.className = 'menu'
+  menu.style.display = 'none'
+  menu.onclick = (e) => {
+    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')
+    if (keepMenu) return
+
+    menu.style.display = 'none'
+  }
+  container.appendChild(menu)
+
+  /** Menu Items for Context Menu */
+  container.oncontextmenu = e => {
+    menu.replaceChildren()
+    menu.style.display = 'block'
+    menu.style.cssText = `left: ${e.x - menu.offsetParent.offsetLeft + 10}px; top: ${e.y - menu.offsetParent.offsetTop + 5}px;`
+    e.preventDefault()
+
+    // Menu Items for map
+    const map = e.target.closest('.mapclay')
+    if (map?.renderer?.results) {
+      const rect = map.getBoundingClientRect()
+      const [x, y] = [e.x - rect.left, e.y - rect.top]
+      menu.appendChild(menuItem.toggleMapFocus(map))
+      menu.appendChild(menuItem.renderResults(dumbymap, map))
+      menu.appendChild(menuItem.getCoordinatesByPixels(map, [x, y]))
+      menu.appendChild(menuItem.restoreCamera(map))
+    } else {
+      // Toggle block focus
+      const block = e.target.closest('.dumby-block')
+      if (block) {
+        menu.appendChild(menuItem.toggleBlockFocus(block))
+      }
+    }
+
+    // Menu Items for map/block/layout
+    if (!map || map.closest('.Showcase')) {
+      if (dumbymap.utils.renderedMaps().length > 0) {
+        menu.appendChild(menuItem.pickMapItem(dumbymap))
+      }
+      menu.appendChild(menuItem.pickBlockItem(dumbymap))
+      menu.appendChild(menuItem.pickLayoutItem(dumbymap))
+    }
+
+    shiftByWindow(menu)
+
+    return menu
+  }
+
+  /** Event Handler when clicking outside of Context Manu */
+  const actionOutsideMenu = e => {
+    if (menu.style.display === 'none') return
+    const keepMenu = e.target.closest('.keep-menu') || e.target.classList.contains('.keep-menu')
+    if (keepMenu) return
+
+    const rect = menu.getBoundingClientRect()
+    if (
+      e.clientX &lt; rect.left ||
+      e.clientX > rect.left + rect.width ||
+      e.clientY &lt; rect.top ||
+      e.clientY > rect.top + rect.height
+    ) {
+      menu.style.display = 'none'
+    }
+  }
+  document.addEventListener('click', actionOutsideMenu)
+  onRemove(htmlHolder, () =>
+    document.removeEventListener('click', actionOutsideMenu),
+  )
+
+  return Object.seal(dumbymap)
+}
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/docs/editor.mjs.html b/docs/editor.mjs.html
new file mode 100644
index 0000000..6488134
--- /dev/null
+++ b/docs/editor.mjs.html
@@ -0,0 +1,1242 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: editor.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: editor.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>/* global EasyMDE */
+import { markdown2HTML, generateMaps } from './dumbymap'
+import { defaultAliases, parseConfigsFromYaml } from 'mapclay'
+import * as menuItem from './MenuItem'
+import { addAnchorByPoint } from './dumbyUtils.mjs'
+import { shiftByWindow } from './utils.mjs'
+import LeaderLine from 'leader-line'
+
+/**
+ * @typedef {Object} RefLink
+ * @property {string} ref -- name of link
+ * @property {string} link -- content of link
+ * @property {string|null} title -- title of link
+ */
+
+// Set up Containers {{{
+/** Variables about dumbymap and editor **/
+const url = new URL(window.location)
+const context = document.querySelector('[data-mode]')
+const dumbyContainer = document.querySelector('.DumbyMap')
+dumbyContainer.dataset.scrollLine = ''
+const textArea = document.querySelector('.editor textarea')
+let dumbymap
+
+/** Variables about Reference Style Links in Markdown */
+const refLinkPattern = /\[([^\x5B\x5D]+)\]:\s+(\S+)(\s["'](\S+)["'])?/
+let refLinks = []
+
+/**
+ * validateAnchorName.
+ *
+ * @param {String} anchorName
+ */
+const validateAnchorName = anchorName =>
+  !refLinks.find(obj => obj.ref === anchorName)
+
+/**
+ * appendRefLink.
+ *
+ * @param {CodeMirror} cm
+ * @param {RefLink} refLink -- Reference Style Link of Markdown
+ */
+const appendRefLink = (cm, refLink) => {
+  const { ref, link, title } = refLink
+  let refLinkString = `\n[${ref}]: ${link} "${title ?? ''}"`
+  const lastLineIsRefLink = cm.getLine(cm.lastLine()).match(refLinkPattern)
+  if (!lastLineIsRefLink) refLinkString = '\n' + refLinkString
+  cm.replaceRange(refLinkString, { line: Infinity })
+
+  refLinks.push(refLink)
+}
+/**
+ * Watch for changes of editing mode
+ *
+ * For 'data-mode' attribute of the context element, if the mode is 'editing'
+ * and the layout is not 'normal', it sets the layout to 'normal' and switch to editing mode
+ */
+new window.MutationObserver(() => {
+  const mode = context.dataset.mode
+  const layout = dumbyContainer.dataset.layout
+  if (mode === 'editing' &amp;&amp; layout !== 'normal') {
+    dumbyContainer.dataset.layout = 'normal'
+  }
+}).observe(context, {
+  attributes: true,
+  attributeFilter: ['data-mode'],
+  attributeOldValue: true,
+})
+/**
+ * toggleEditing: toggle editing mode
+ */
+const toggleEditing = () => {
+  const mode = context.dataset.mode
+  if (mode === 'editing') {
+    delete context.dataset.mode
+  } else {
+    context.dataset.mode = 'editing'
+  }
+}
+// }}}
+// Set up EasyMDE {{{
+/** Contents for tutorial **/
+const defaultContent =
+  `&lt;br>
+
+> &lt;big>Hello My Friend! This is DumbyMap!&lt;/big>
+
+&lt;br>
+
+\`\`\`map
+use: Leaflet
+height: 120px
+XYZ: https://tile.openstreetmap.jp/styles/osm-bright/512/{z}/{x}/{y}.png
+\`\`\`
+
+
+DumbyMap generates **interactive document with maps** from raw texts.
+
+You can use it to:
+
+1. [Roll a Dice] for a new map
+2. Hover on [GeoLink][example-geolink] to show point in maps.
+3. Add GeoLink by dragging **selected text**
+4. Change contents by [Editor] with [Markdown] text
+5. **Right click** to call context menu, you can:
+    + Change focus between maps
+    + Select a block for browsing
+    + Switch layouts for various use cases
+
+
+If you want know more, take a look at subjects below:
+1. [How to write Markdown text?](https://www.markdownguide.org/basic-syntax/)
+1. &lt;details>
+      &lt;summary>How can I save contents for next use?&lt;/summary>
+
+      Since All contents come from raw texts, you can:
+      1. Save current page as bookmark by [hash button](#create-hash "=>.mde-hash")
+      2. Copy texts in editor and save as \`.txt\` file
+      3. Use online service for hosting Markdown, for example: [HackMD](https://hackmd.io)
+
+   &lt;/details>
+1. &lt;details>
+      &lt;summary>I want more features in map!&lt;/summary>
+
+      DumbyMap use [mapclay](https://github.com/outdoorsafetylab/mapclay) to render maps.
+      1. You can use \`eval\` options to add custom scripts, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#run-scripts-after-map-is-created) for more details
+      2. You can use custom Renderer indtead of default ones, see [tutoria](https://github.com/outdoorsafetylab/mapclay?tab=readme-ov-file#renderer) for more details
+
+   &lt;/details>
+1. [I am an experienced developer, show me what you got!](https://github.com/outdoorsafetylab/dumbymap)
+
+
+&lt;br>
+
+> &lt;big>Have Fun ~&lt;big>
+
+ &lt;br>
+
+[Roll a dice]: #Click%20it! "=>.mde-roll"
+[example-geolink]: geo:24,121?xy=121,24&amp;text=Use%20yellow%20link%20point%20to%20map
+[Markdown]: https://www.markdownguide.org/basic-syntax/
+[Editor]: #This%20is%20editor! "=>.editor"`
+
+/** Editor from EasyMDE **/
+const editor = new EasyMDE({
+  element: textArea,
+  initialValue: defaultContent,
+  autosave: {
+    enabled: true,
+    uniqueId: 'dumbymap',
+  },
+  indentWithTabs: false,
+  lineNumbers: true,
+  promptURLs: true,
+  uploadImage: true,
+  spellChecker: false,
+  toolbarButtonClassPrefix: 'mde',
+  status: false,
+  shortcuts: {
+    map: 'Ctrl-Alt-M',
+    debug: 'Ctrl-Alt-D',
+    toggleUnorderedList: null,
+    toggleOrderedList: null,
+  },
+  toolbar: [
+    {
+      name: 'roll',
+      title: 'Roll a Dice',
+      text: '\u{2684}',
+      action: () => addMapRandomlyByPreset(),
+    },
+    {
+      name: 'export',
+      title: 'Export current page',
+      text: '\u{1F4BE}',
+      action: () => {
+      },
+    },
+    {
+      name: 'hash',
+      title: 'Save content as URL',
+      // text: '\u{1F4BE}',
+      text: '#',
+      action: () => {
+        const state = { content: editor.value() }
+        window.location.hash = encodeURIComponent(JSON.stringify(state))
+        window.location.search = ''
+        navigator.clipboard.writeText(window.location.href)
+        window.alert('URL updated in address bar, you can save current page as bookmark')
+      },
+    },
+    '|',
+    {
+      name: 'undo',
+      title: 'Undo last editing',
+      text: '\u27F2',
+      action: EasyMDE.undo,
+    },
+    {
+      name: 'redo',
+      text: '\u27F3',
+      title: 'Redo editing',
+      action: EasyMDE.redo,
+    },
+    '|',
+    {
+      name: 'heading-1',
+      text: 'H1',
+      title: 'Big Heading',
+      action: EasyMDE['heading-1'],
+    },
+    {
+      name: 'heading-2',
+      text: 'H2',
+      title: 'Medium Heading',
+      action: EasyMDE['heading-2'],
+    },
+    '|',
+    {
+      name: 'link',
+      text: '\u{1F517}',
+      title: 'Create Link',
+      action: EasyMDE.drawLink,
+    },
+    {
+      name: 'image',
+      text: '\u{1F5BC}',
+      title: 'Create Image',
+      action: EasyMDE.drawImage,
+    },
+    '|',
+    {
+      name: 'Bold',
+      text: '\u{1D401}',
+      title: 'Bold',
+      action: EasyMDE.toggleBold,
+    },
+    {
+      name: 'Italic',
+      text: '\u{1D43C}',
+      title: 'Italic',
+      action: EasyMDE.toggleItalic,
+    },
+    '|',
+    {
+      name: 'tutorial',
+      text: '\u{2753}',
+      title: 'Reset for content for tutorial',
+      action: () => {
+        editor.value(defaultContent)
+        refLinks = getRefLinks()
+        updateDumbyMap()
+      },
+    },
+  ],
+})
+/** CodeMirror Instance **/
+const cm = editor.codemirror
+
+/**
+ * getRefLinks from contents of editor
+ * @return {RefLink[]} refLinks
+ */
+const getRefLinks = () => editor.value()
+  .split('\n')
+  .map(line => {
+    const [, ref, link,, title] = line.match(refLinkPattern) ?? []
+    return { ref, link, title }
+  })
+  .filter(({ ref, link }) => ref &amp;&amp; link)
+
+refLinks = getRefLinks()
+
+/**
+ * get state of website from hash string
+ *
+ * @param {String} hash
+ */
+const getStateFromHash = hash => {
+  const hashValue = hash.substring(1)
+  const stateString = decodeURIComponent(hashValue)
+  try {
+    return JSON.parse(stateString) ?? {}
+  } catch (_) {
+    return {}
+  }
+}
+/**
+ * get editor content from hash string
+ *
+ * @param {String} hash
+ */
+const getContentFromHash = hash => {
+  const state = getStateFromHash(hash)
+  return state.content
+}
+/** Hash and Query Parameters in URL **/
+const contentFromHash = getContentFromHash(window.location.hash)
+window.location.hash = ''
+
+if (url.searchParams.get('content') === 'tutorial') {
+  editor.value(defaultContent)
+} else if (contentFromHash) {
+  // Seems like autosave would overwrite initialValue, set content from hash here
+  editor.cleanup()
+  editor.value(contentFromHash)
+}
+// }}}
+// Set up logic about editor content {{{
+
+/**
+ * updateScrollLine. Update data attribute by scroll on given element
+ *
+ * @param {HTMLElement} ele
+ */
+const updateScrollLine = (ele) => () => {
+  if (textArea.dataset.scrollLine) return
+
+  const threshold = ele.scrollTop + window.innerHeight / 2 + 30
+  const block = Array.from(ele.children)
+    .findLast(e => e.offsetTop &lt; threshold) ??
+    ele.firstChild
+
+  const line = Array.from(block.querySelectorAll('p'))
+    .findLast(e => e.offsetTop + block.offsetTop &lt; threshold)
+  const linenumber = line?.dataset?.sourceLine
+  if (!linenumber) return
+  const offset = (line.offsetTop + block.offsetTop - ele.scrollTop)
+
+  if (linenumber) {
+    ele.closest('[data-scroll-line]').dataset.scrollLine = linenumber + '/' + offset
+  }
+}
+
+new window.MutationObserver(() => {
+  clearTimeout(dumbyContainer.timer)
+  dumbyContainer.timer = setTimeout(
+    () => { dumbyContainer.dataset.scrollLine = '' },
+    50,
+  )
+
+  const line = dumbyContainer.dataset.scrollLine
+  if (line) {
+    const [lineNumber, offset] = line.split('/')
+
+    if (!isNaN(lineNumber)) {
+      cm.scrollIntoView({ line: lineNumber, ch: 0 }, offset)
+    }
+  }
+}).observe(dumbyContainer, {
+  attributes: true,
+  attributeFilter: ['data-scroll-line'],
+})
+
+/**
+ * updateScrollLineByCodeMirror.
+ * @param {CodeMirror} cm
+ */
+const updateCMScrollLine = (cm) => {
+  if (dumbyContainer.dataset.scrollLine) return
+
+  const lineNumber = cm.getCursor()?.line ??
+    cm.lineAtHeight(cm.getScrollInfo().top, 'local')
+  textArea.dataset.scrollLine = lineNumber
+}
+cm.on('scroll', () => {
+  if (cm.hasFocus()) updateCMScrollLine(cm)
+})
+
+/** Sync scroll from CodeMirror to HTML **/
+new window.MutationObserver(() => {
+  clearTimeout(textArea.timer)
+  textArea.timer = setTimeout(
+    () => { textArea.dataset.scrollLine = '' },
+    1000,
+  )
+
+  const line = textArea.dataset.scrollLine
+  let lineNumber = Number(line)
+  let p
+  if (isNaN(lineNumber)) return
+
+  const paragraphs = Array.from(dumbymap.htmlHolder.querySelectorAll('p'))
+  do {
+    p = paragraphs.find(p => Number(p.dataset.sourceLine) === lineNumber)
+    lineNumber++
+  } while (!p &amp;&amp; lineNumber &lt; cm.doc.size)
+  p = p ?? paragraphs.at(-1)
+  if (!p) return
+
+  const coords = cm.charCoords({ line: lineNumber, ch: 0 })
+  p.scrollIntoView({ inline: 'start' })
+  const top = p.getBoundingClientRect().top
+  dumbymap.htmlHolder.scrollBy(0, top - coords.top + 30)
+}).observe(textArea, {
+  attributes: true,
+  attributeFilter: ['data-scroll-line'],
+})
+
+/**
+ * addClassToCodeLines. Quick hack to style lines inside code block
+ */
+const addClassToCodeLines = () => {
+  const lines = cm.getLineHandle(0).parent.lines
+  let insideCodeBlock = false
+  lines.forEach((line, index) => {
+    if (line.text.match(/^[\u0060]{3}/)) {
+      insideCodeBlock = !insideCodeBlock
+    } else if (insideCodeBlock) {
+      cm.addLineClass(index, 'text', 'inside-code-block')
+    } else {
+      cm.removeLineClass(index, 'text', 'inside-code-block')
+    }
+  })
+}
+addClassToCodeLines()
+
+/**
+ * completeForCodeBlock.
+ *
+ * @param {Object} change -- codemirror change object
+ */
+const completeForCodeBlock = change => {
+  const line = change.to.line
+  if (change.origin === '+input') {
+    const text = change.text[0]
+
+    // Completion for YAML doc separator
+    if (
+      text === '-' &amp;&amp;
+      change.to.ch === 0 &amp;&amp;
+      insideCodeblockForMap(cm.getCursor())
+    ) {
+      cm.setSelection({ line, ch: 0 }, { line, ch: 1 })
+      cm.replaceSelection(text.repeat(3) + '\n')
+    }
+
+    // Completion for Code fence
+    if (text === '`' &amp;&amp; change.to.ch === 0) {
+      cm.setSelection({ line, ch: 0 }, { line, ch: 1 })
+      cm.replaceSelection(text.repeat(3))
+      const numberOfFences = cm
+        .getValue()
+        .split('\n')
+        .filter(line => line.match(/[\u0060]{3}/)).length
+      if (numberOfFences % 2 === 1) {
+        cm.replaceSelection('map\n\n```')
+        cm.setCursor({ line: line + 1 })
+      }
+    }
+  }
+
+  // For YAML doc separator, &lt;hr> and code fence
+  // Auto delete to start of line
+  if (change.origin === '+delete') {
+    const match = change.removed[0].match(/^[-\u0060]$/)?.at(0)
+    if (match &amp;&amp; cm.getLine(line) === match.repeat(2) &amp;&amp; match) {
+      cm.setSelection({ line, ch: 0 }, { line, ch: 2 })
+      cm.replaceSelection('')
+    }
+  }
+}
+
+/* Disable debounce temporarily */
+// const debounceForMap = (() => {
+//   const timer = null
+//
+//   return function (...args) {
+//     dumbymap = generateMaps.apply(this, args)
+// clearTimeout(timer);
+// timer = setTimeout(() => {
+//   dumbymap = generateMaps.apply(this, args)
+// }, 10);
+//   }
+// })()
+
+/**
+ * menuForEditor.
+ *
+ * @param {Event} event -- Event for context menu
+ * @param {HTMLElement} menu -- menu of dumbymap
+ */
+const menuForEditor = (event, menu) => {
+  event.preventDefault()
+
+  if (document.getSelection().type === 'Range' &amp;&amp; cm.getSelection() &amp;&amp; refLinks.length > 0) {
+    menu.replaceChildren()
+    menu.appendChild(menuItem.addRefLink(cm, refLinks))
+  }
+
+  if (context.dataset.mode !== 'editing') {
+    const switchToEditingMode = new menuItem.Item({
+      innerHTML: '&lt;strong>EDIT&lt;/strong>',
+      onclick: () => (context.dataset.mode = 'editing'),
+    })
+    menu.appendChild(switchToEditingMode)
+  }
+
+  const map = event.target.closest('.mapclay')
+  if (map) {
+    const item = new menuItem.Item({
+      text: 'Add Anchor',
+      onclick: (event) => {
+        const refLink = addAnchorByPoint({ point: event, map, validateAnchorName })
+        appendRefLink(cm, refLink)
+      },
+    })
+    menu.insertBefore(item, menu.firstChild)
+  }
+}
+
+/**
+ * update content of HTML about Dumbymap
+ */
+const updateDumbyMap = (callback = null) => {
+  markdown2HTML(dumbyContainer, editor.value())
+  // debounceForMap(dumbyContainer, afterMapRendered)
+  dumbymap = generateMaps(dumbyContainer)
+  // Set onscroll callback
+  const htmlHolder = dumbymap.htmlHolder
+  htmlHolder.onscroll = updateScrollLine(htmlHolder)
+  // Set oncontextmenu callback
+  dumbymap.utils.setContextMenu(menuForEditor)
+
+  callback?.(dumbymap)
+}
+updateDumbyMap()
+
+// Re-render HTML by editor content
+cm.on('change', (_, change) => {
+  updateDumbyMap(() => {
+    updateCMScrollLine(cm)
+  })
+  addClassToCodeLines()
+  completeForCodeBlock(change)
+})
+
+// Set class for focus
+cm.on('focus', () => {
+  cm.getWrapperElement().classList.add('focus')
+  dumbyContainer.classList.remove('focus')
+})
+
+cm.on('beforeChange', (_, change) => {
+  textArea.dataset.scrollLine = cm.getCursor().line
+
+  // Don't allow more content after YAML doc separator
+  if (change.origin &amp;&amp; change.origin.match(/^(\+input|paste)$/)) {
+    const line = change.to.line
+    if (cm.getLine(line) === '---' &amp;&amp; change.text[0] !== '') {
+      change.cancel()
+    }
+  }
+})
+
+// Reload editor content by hash value
+window.onhashchange = () => {
+  const content = getContentFromHash(window.location.hash)
+  if (content) editor.value(content)
+}
+
+// }}}
+// Completion in Code Blok {{{
+// Elements about suggestions {{{
+const menu = document.createElement('div')
+menu.className = 'menu editor-menu'
+menu.style.display = 'none'
+menu.onclick = () => (menu.style.display = 'none')
+new window.MutationObserver(() => {
+  if (menu.style.display === 'none') {
+    menu.replaceChildren()
+  }
+}).observe(menu, {
+  attributes: true,
+  attributeFilter: ['style'],
+})
+document.body.append(menu)
+
+const rendererOptions = {}
+
+// }}}
+// Aliases for map options {{{
+const aliasesForMapOptions = {}
+const defaultApply = './assets/default.yml'
+fetch(defaultApply)
+  .then(res => res.text())
+  .then(rawText => {
+    const config = parseConfigsFromYaml(rawText)?.at(0)
+    Object.assign(aliasesForMapOptions, config.aliases ?? {})
+  })
+  .catch(err => console.warn(`Fail to get aliases from ${defaultApply}`, err))
+// }}}
+/**
+ * insideCodeblockForMap. Check if current token is inside code block {{{
+ *
+ * @param {Anchor} anchor
+ */
+const insideCodeblockForMap = anchor => {
+  const token = cm.getTokenAt(anchor)
+  const insideCodeBlock =
+    token.state.overlay.codeBlock &amp;&amp;
+    !cm.getLine(anchor.line).match(/^[\u0060]{3}/)
+  if (!insideCodeBlock) return false
+
+  let line = anchor.line - 1
+  while (line >= 0) {
+    const content = cm.getLine(line)
+    if (content === '```map') {
+      return true
+    } else if (content === '```') {
+      return false
+    }
+    line = line - 1
+  }
+  return false
+}
+// }}}
+/**
+ * getLineWithRenderer. Get Renderer by cursor position in code block {{{
+ *
+ * @param {Object} anchor -- Codemirror Anchor Object
+ */
+const getLineWithRenderer = anchor => {
+  const currentLine = anchor.line
+  if (!cm.getLine) return null
+
+  const match = line => cm.getLine(line).match(/^use: /)
+
+  if (match(currentLine)) return currentLine
+
+  // Look backward/forward for pattern of used renderer: /use: .+/
+  let pl = currentLine - 1
+  while (pl > 0 &amp;&amp; insideCodeblockForMap(anchor)) {
+    const text = cm.getLine(pl)
+    if (match(pl)) {
+      return pl
+    } else if (text.match(/^---|^[\u0060]{3}/)) {
+      break
+    }
+    pl = pl - 1
+  }
+
+  let nl = currentLine + 1
+  while (insideCodeblockForMap(anchor)) {
+    const text = cm.getLine(nl)
+    if (match(nl)) {
+      return nl
+    } else if (text.match(/^---|^[\u0060]{3}/)) {
+      return null
+    }
+    nl = nl + 1
+  }
+
+  return null
+}
+// }}}
+/**
+ * getSuggestionsForOptions. Return suggestions for valid options {{{
+ *
+ * @param {Boolean} optionTyped
+ * @param {Object[]} validOptions
+ */
+const getSuggestionsForOptions = (optionTyped, validOptions) => {
+  let suggestOptions = []
+
+  const matchedOptions = validOptions.filter(o =>
+    o.valueOf().toLowerCase().includes(optionTyped.toLowerCase()),
+  )
+
+  if (matchedOptions.length > 0) {
+    suggestOptions = matchedOptions
+  } else {
+    suggestOptions = validOptions
+  }
+
+  return suggestOptions.map(
+    o =>
+      new menuItem.Suggestion({
+        text: `&lt;span>${o.valueOf()}&lt;/span>&lt;span class='info' title="${o.desc ?? ''}">ⓘ&lt;/span>`,
+        replace: `${o.valueOf()}: `,
+        cm,
+      }),
+  )
+}
+// }}}
+/**
+ * getSuggestionFromMapOption. Return suggestion for example of option value {{{
+ *
+ * @param {Object} option
+ */
+const getSuggestionFromMapOption = option => {
+  if (!option.example) return null
+
+  const text = option.example_desc
+    ? `&lt;span>${option.example_desc}&lt;/span>&lt;span class="truncate"style="color: gray">${option.example}&lt;/span>`
+    : `&lt;span>${option.example}&lt;/span>`
+
+  return new menuItem.Suggestion({
+    text,
+    replace: `${option.valueOf()}: ${option.example ?? ''}`,
+    cm,
+  })
+}
+// }}}
+/**
+ * getSuggestionsFromAliases. Return suggestions from aliases {{{
+ *
+ * @param {Object} option
+ */
+const getSuggestionsFromAliases = option =>
+  Object.entries(aliasesForMapOptions[option.valueOf()] ?? {})?.map(record => {
+    const [alias, value] = record
+    const valueString = JSON.stringify(value).replaceAll('"', '')
+    return new menuItem.Suggestion({
+      text: `&lt;span>${alias}&lt;/span>&lt;span class="truncate" style="color: gray">${valueString}&lt;/span>`,
+      replace: `${option.valueOf()}: ${valueString}`,
+      cm,
+    })
+  }) ?? []
+// }}}
+/**
+ * handleTypingInCodeBlock. Handler for map codeblock {{{
+ *
+ * @param {Object} anchor -- Codemirror Anchor Object
+ */
+const handleTypingInCodeBlock = anchor => {
+  const text = cm.getLine(anchor.line)
+  if (text.match(/^\s\+$/) &amp;&amp; text.length % 2 !== 0) {
+    // TODO Completion for even number of spaces
+  } else if (text.match(/^-/)) {
+    // TODO Completion for YAML doc separator
+  } else {
+    const suggestions = getSuggestions(anchor)
+    addSuggestions(anchor, suggestions)
+  }
+}
+// }}}
+/**
+ * getSuggestions. Get suggestions by current input {{{
+ *
+ * @param {Object} anchor -- Codemirror Anchor Object
+ */
+const getSuggestions = anchor => {
+  const text = cm.getLine(anchor.line)
+
+  // Clear marks on text
+  cm.findMarks({ ...anchor, ch: 0 }, { ...anchor, ch: text.length }).forEach(
+    m => m.clear(),
+  )
+
+  // Mark user input invalid by case
+  const markInputIsInvalid = () =>
+    cm
+      .getDoc()
+      .markText(
+        { ...anchor, ch: 0 },
+        { ...anchor, ch: text.length },
+        { className: 'invalid-input' },
+      )
+
+  // Check if "use: &lt;renderer>" is set
+  const lineWithRenderer = getLineWithRenderer(anchor)
+  const renderer = lineWithRenderer
+    ? cm.getLine(lineWithRenderer).split(' ')[1]
+    : null
+  if (renderer &amp;&amp; anchor.line !== lineWithRenderer) {
+    // Do not check properties
+    if (text.startsWith('  ')) return []
+
+    // If no valid options for current used renderer, go get it!
+    const validOptions = rendererOptions[renderer]
+    if (!validOptions) {
+      // Get list of valid options for current renderer
+      const rendererUrl = defaultAliases.use[renderer]?.value
+      import(rendererUrl)
+        .then(rendererModule => {
+          rendererOptions[renderer] = rendererModule.default.validOptions
+          const currentAnchor = cm.getCursor()
+          if (insideCodeblockForMap(currentAnchor)) {
+            handleTypingInCodeBlock(currentAnchor)
+          }
+        })
+        .catch(_ => {
+          markInputIsInvalid(lineWithRenderer)
+          console.warn(
+            `Fail to get valid options from Renderer typed: ${renderer}`,
+          )
+        })
+      return []
+    }
+
+    // If input is "key:value" (no space left after colon), then it is invalid
+    const isKeyFinished = text.includes(':')
+    const isValidKeyValue = text.match(/^[^:]+:\s+/)
+    if (isKeyFinished &amp;&amp; !isValidKeyValue) {
+      markInputIsInvalid()
+      return []
+    }
+
+    // If user is typing option
+    const keyTyped = text.split(':')[0].trim()
+    if (!isKeyFinished) {
+      markInputIsInvalid()
+      return getSuggestionsForOptions(keyTyped, validOptions)
+    }
+
+    // If user is typing value
+    const matchedOption = validOptions.find(o => o.name === keyTyped)
+    if (isKeyFinished &amp;&amp; !matchedOption) {
+      markInputIsInvalid()
+    }
+
+    if (isKeyFinished &amp;&amp; matchedOption) {
+      const valueTyped = text.substring(text.indexOf(':') + 1).trim()
+      const isValidValue = matchedOption.isValid(valueTyped)
+      if (!valueTyped) {
+        return [
+          getSuggestionFromMapOption(matchedOption),
+          ...getSuggestionsFromAliases(matchedOption),
+        ].filter(s => s instanceof menuItem.Suggestion)
+      }
+      if (valueTyped &amp;&amp; !isValidValue) {
+        markInputIsInvalid()
+        return []
+      }
+    }
+  } else {
+    // Suggestion for "use"
+    const rendererSuggestions = Object.entries(defaultAliases.use)
+      .filter(([renderer]) => {
+        const suggestion = `use: ${renderer}`
+        const suggestionPattern = suggestion.replace(' ', '').toLowerCase()
+        const textPattern = text.replace(' ', '').toLowerCase()
+        return suggestion !== text &amp;&amp; suggestionPattern.includes(textPattern)
+      })
+      .map(
+        ([renderer, info]) =>
+          new menuItem.Suggestion({
+            text: `&lt;span>use: ${renderer}&lt;/span>&lt;span class='info' title="${info.desc}">ⓘ&lt;/span>`,
+            replace: `use: ${renderer}`,
+            cm,
+          }),
+      )
+    return rendererSuggestions.length === 0
+      ? []
+      : [
+          ...rendererSuggestions,
+          new menuItem.Item({
+            innerHTML: '&lt;a href="https://github.com/outdoorsafetylab/mapclay#renderer" class="external" style="display: block;">More...&lt;/a>',
+            className: ['suggestion'],
+            onclick: () => window.open('https://github.com/outdoorsafetylab/mapclay#renderer', '_blank'),
+          }),
+        ]
+  }
+  return []
+}
+// }}}
+/**
+ * addSuggestions.  Show element about suggestions {{{
+ *
+ * @param {Object} anchor -- Codemirror Anchor Object
+ * @param {Suggestion[]} suggestions
+ */
+const addSuggestions = (anchor, suggestions) => {
+  if (suggestions.length === 0) {
+    menu.style.display = 'none'
+    return
+  } else {
+    menu.style.display = 'block'
+  }
+
+  menu.innerHTML = ''
+  suggestions
+    .forEach(option => menu.appendChild(option))
+
+  const widgetAnchor = document.createElement('div')
+  cm.addWidget(anchor, widgetAnchor, true)
+  const rect = widgetAnchor.getBoundingClientRect()
+  menu.style.left = `calc(${rect.left}px + 2rem)`
+  menu.style.top = `calc(${rect.bottom}px + 1rem)`
+  menu.style.display = 'block'
+  shiftByWindow(menu)
+}
+// }}}
+// EVENT: Suggests for current selection {{{
+// FIXME Dont show suggestion when selecting multiple chars
+cm.on('cursorActivity', _ => {
+  menu.style.display = 'none'
+  const anchor = cm.getCursor()
+
+  if (insideCodeblockForMap(anchor)) {
+    handleTypingInCodeBlock(anchor)
+  }
+})
+cm.on('blur', () => {
+  refLinks = getRefLinks()
+
+  if (menu.checkVisibility()) {
+    cm.focus()
+  } else {
+    cm.getWrapperElement().classList.remove('focus')
+    dumbyContainer.classList.add('focus')
+  }
+})
+// }}}
+// EVENT: keydown for suggestions {{{
+const keyForSuggestions = ['Tab', 'Enter', 'Escape']
+cm.on('keydown', (_, e) => {
+  if (
+    !cm.hasFocus ||
+    !keyForSuggestions.includes(e.key) ||
+    menu.style.display === 'none'
+  ) { return }
+
+  // Directly add a newline when no suggestion is selected
+  const currentSuggestion = menu.querySelector('.menu-item.focus')
+  if (!currentSuggestion &amp;&amp; e.key === 'Enter') return
+
+  // Override default behavior
+  e.preventDefault()
+
+  // Suggestion when pressing Tab or Shift + Tab
+  const nextSuggestion =
+    currentSuggestion?.nextSibling ??
+    menu.querySelector('.menu-item:first-child')
+  const previousSuggestion =
+    currentSuggestion?.previousSibling ??
+    menu.querySelector('.menu-item:last-child')
+  const focusSuggestion = e.shiftKey ? previousSuggestion : nextSuggestion
+
+  // Current editor selection state
+  switch (e.key) {
+    case 'Tab':
+      Array.from(menu.children).forEach(s => s.classList.remove('focus'))
+      focusSuggestion.classList.add('focus')
+      focusSuggestion.scrollIntoView({ behavior: 'smooth', block: 'nearest' })
+      break
+    case 'Enter':
+      currentSuggestion.onclick()
+      break
+    case 'Escape':
+      if (!menu.checkVisibility()) break
+      // HACK delay menu display change for blur event, mark cm focus should keep
+      setTimeout(() => (menu.style.display = 'none'), 50)
+      break
+  }
+})
+
+document.onkeydown = e => {
+  if (e.altKey &amp;&amp; e.ctrlKey &amp;&amp; e.key === 'm') {
+    toggleEditing()
+    e.preventDefault()
+    return null
+  }
+
+  if (!cm.hasFocus()) {
+    if (e.key === 'F1') {
+      e.preventDefault()
+      cm.focus()
+    }
+    if (e.key === 'Tab') {
+      e.preventDefault()
+      dumbymap.utils.focusNextMap(e.shiftKey)
+    }
+    if (e.key === 'x' || e.key === 'X') {
+      e.preventDefault()
+      dumbymap.utils.switchToNextLayout(e.shiftKey)
+    }
+    if (e.key === 'n') {
+      e.preventDefault()
+      dumbymap.utils.focusNextBlock()
+    }
+    if (e.key === 'p') {
+      e.preventDefault()
+      dumbymap.utils.focusNextBlock(true)
+    }
+    if (e.key === 'Escape') {
+      e.preventDefault()
+      dumbymap.utils.removeBlockFocus()
+    }
+  }
+}
+
+// }}}
+// }}}
+// Layout Switch {{{
+new window.MutationObserver(mutaions => {
+  const mutation = mutaions.at(-1)
+  const layout = dumbyContainer.dataset.layout
+  if (layout !== 'normal' || mutation.oldValue === 'normal') {
+    delete context.dataset.mode
+  }
+}).observe(dumbyContainer, {
+  attributes: true,
+  attributeFilter: ['data-layout'],
+  attributeOldValue: true,
+})
+// }}}
+
+/**
+ * addMapRandomlyByPreset. insert random text of valid mapclay yaml into editor
+ */
+const addMapRandomlyByPreset = () => {
+  const yamlText = [
+    'apply: ./assets/default.yml',
+    'width: 85%',
+    'height: 200px',
+  ]
+  const order = [
+    'id',
+    'apply',
+    'use',
+    'width',
+    'height',
+    'center',
+    'XYZ',
+    'zoom',
+  ]
+  const aliasesEntries = Object.entries(aliasesForMapOptions)
+    .filter(([key, _]) =>
+      order.includes(key) &amp;&amp;
+      !yamlText.find(text => text.startsWith(key)),
+    )
+  if (aliasesEntries.length === 0) return
+
+  aliasesEntries.forEach(([option, aliases]) => {
+    const entries = Object.entries(aliases)
+    const validEntries = entries
+      .filter(([alias, value]) => {
+        // FIXME logic about picking XYZ data
+        if (option === 'XYZ') {
+          const inTaiwan = yamlText.find(text => text.match(/center: TAIWAN/))
+          if (!inTaiwan) return !alias.includes('TAIWAN')
+        }
+        if (option === 'zoom') {
+          return value > 6 &amp;&amp; value &lt; 15
+        }
+        return true
+      })
+    const randomValue = validEntries
+      .at((Math.random() * validEntries.length) | 0)
+      .at(0)
+
+    yamlText.push(`${option}: ${typeof randomValue === 'object' ? randomValue.value : randomValue}`)
+
+    if (option === 'center') yamlText.push(`id: ${randomValue}`)
+  })
+
+  yamlText.sort((a, b) =>
+    order.indexOf(a.split(':')[0]) > order.indexOf(b.split(':')[0]),
+  )
+  const anchor = cm.getCursor()
+  cm.replaceRange(
+    '\n```map\n' + yamlText.join('\n') + '\n```\n',
+    anchor,
+  )
+}
+
+cm.getWrapperElement().oncontextmenu = e => {
+  if (insideCodeblockForMap(cm.getCursor())) return
+  e.preventDefault()
+
+  if (cm.getSelection() &amp;&amp; refLinks.length > 0) {
+    menu.appendChild(menuItem.addRefLink(cm, refLinks))
+  }
+
+  if (menu.children.length > 0) {
+    menu.style.cssText = `display: block; transform: translate(${e.x}px, ${e.y}px); overflow: visible;`
+  }
+}
+
+/** HACK Sync selection from HTML to CodeMirror */
+document.addEventListener('selectionchange', () => {
+  if (cm.hasFocus() || dumbyContainer.onmousemove) {
+    return
+  }
+
+  const selection = document.getSelection()
+  if (selection.type === 'Range') {
+    const content = selection.getRangeAt(0).toString()
+    const parentWithSourceLine = selection.anchorNode.parentElement.closest('.source-line')
+    const lineStart = Number(parentWithSourceLine?.dataset?.sourceLine ?? NaN)
+    const lineEnd = Number(parentWithSourceLine?.nextSibling?.dataset?.sourceLine ?? NaN)
+    // TODO Also return when range contains anchor element
+    if (content.includes('\n') || isNaN(lineStart)) {
+      cm.setSelection(cm.getCursor())
+      return
+    }
+
+    const texts = [content]
+    let sibling = selection.anchorNode.previousSibling
+    while (sibling) {
+      texts.push(sibling.textContent)
+      sibling = sibling.previousSibling
+    }
+
+    const anchor = { line: lineStart, ch: 0 }
+
+    texts
+      .filter(t => t &amp;&amp; t !== '\n')
+      .map(t => t.replace('\n', ''))
+      .reverse()
+      .forEach(text => {
+        let index = cm.getLine(anchor.line)?.indexOf(text, anchor.ch)
+        while (index === -1) {
+          anchor.line += 1
+          anchor.ch = 0
+          if (anchor.line >= lineEnd) {
+            cm.setSelection(cm.setCursor())
+            return
+          }
+          index = cm.getLine(anchor.line)?.indexOf(text)
+        }
+        anchor.ch = index + text.length
+      })
+
+    cm.setSelection({ line: anchor.line, ch: anchor.ch - content.length }, anchor)
+  }
+})
+
+/** Drag/Drop on map for new reference style link */
+dumbyContainer.onmousedown = (e) => {
+  // Check should start drag event for GeoLink
+  if (e.which !== 1) return
+  const selection = document.getSelection()
+  if (cm.getSelection() === '' || selection.type !== 'Range') return
+  const range = selection.getRangeAt(0)
+  const rect = range.getBoundingClientRect()
+  const mouseInRange = e.x &lt; rect.right &amp;&amp; e.x > rect.left &amp;&amp; e.y &lt; rect.bottom &amp;&amp; e.y > rect.top
+  if (!mouseInRange) return
+
+  const geoLink = document.createElement('a')
+  geoLink.textContent = range.toString()
+  geoLink.classList.add('with-leader-line', 'geolink', 'drag')
+  range.deleteContents()
+  range.insertNode(geoLink)
+
+  const lineEnd = document.createElement('div')
+  lineEnd.style.cssText = `position: absolute; left: ${e.clientX}px; top: ${e.clientY}px;`
+  document.body.appendChild(lineEnd)
+
+  const line = new LeaderLine({
+    start: geoLink,
+    end: lineEnd,
+    path: 'magnet',
+  })
+
+  function onMouseMove (event) {
+    lineEnd.style.left = event.clientX + 'px'
+    lineEnd.style.top = event.clientY + 'px'
+    line.position()
+  }
+
+  context.classList.add('dragging-geolink')
+  dumbyContainer.onmousemove = onMouseMove
+  dumbymap.utils.renderedMaps().forEach(map => { map.style.cursor = 'crosshair' })
+  dumbyContainer.onmouseup = function (e) {
+    context.classList.remove('dragging-geolink')
+    dumbyContainer.onmousemove = null
+    dumbyContainer.onmouseup = null
+    line?.remove()
+    lineEnd.remove()
+    dumbymap.utils.renderedMaps().forEach(map => map.style.removeProperty('cursor'))
+    const resumeContent = () => updateDumbyMap(newDumbymap => {
+      const scrollTop = dumbymap.htmlHolder.scrollTop
+      newDumbymap.htmlHolder.scrollBy(0, scrollTop)
+    })
+
+    const map = document.elementFromPoint(e.clientX, e.clientY).closest('.mapclay')
+    const selection = cm.getSelection()
+    if (!map || !selection) {
+      resumeContent()
+      return
+    }
+
+    const refLink = addAnchorByPoint({ point: e, map, validateAnchorName })
+    if (!refLink) {
+      resumeContent()
+      return
+    }
+
+    appendRefLink(cm, refLink)
+    if (selection === refLink.ref) {
+      cm.replaceSelection(`[${selection}]`)
+    } else {
+      cm.replaceSelection(`[${selection}][${refLink.ref}]`)
+    }
+  }
+}
+
+dumbyContainer.ondragstart = () => false
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/docs/fonts/OpenSans-Bold-webfont.eot b/docs/fonts/OpenSans-Bold-webfont.eot
new file mode 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Vf%k8t@*xCQXn_Nvrt8Q>RE1bI-tVTDC$bxWF)P(~rPOq2-WRFCs(YN`snG
z+z#;qq$pKcq}GCqu{0)1iGl6OiTXueo>emK{@I<wfo=d<2{u*jwtKKu60!EB!E&~6
z4>m9dy-tv2Yfs6y0y)M!esqTLK&lwl^FSZgwyDV*OW&Do7b62)h#&IIj<SF<02MS{
zcRBNU12C_;PQ>OV=O^tZ=HT(~)0R<&6r@VQp%NrXIBR5yf*>G{kVnx$XXKG!b$+0y
z_odiIvn8?}Pg{!R`I6`|9aSRt1iD8s9T#*ABdSYi3=CUn{OCHsyaDeSfzkqv5z5qL
zhV;?~%L4>c%M_s<4w8JkW|SHLF}4ntk)hHGA?L9ExfEv&1Ua3!5{ain#8Cm@-+Ea|
zW4yEmUr0!%p}P%=)+dpJPDWLmPtM2S#aKAI;&DGXI@{;$;=1N-!(?WV%;v-S#dz`o
j!x{jHm-dM!L@tgKC!1~`DFP}XH6$TyA!EyeVAY!l>$s0Q

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Bold-webfont.svg b/docs/fonts/OpenSans-Bold-webfont.svg
new file mode 100644
index 0000000..3ed7be4
--- /dev/null
+++ b/docs/fonts/OpenSans-Bold-webfont.svg
@@ -0,0 +1,1830 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sansbold" horiz-adv-x="1169" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1417" d="M41 0zM778 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM940 1407q0 149 166 149t166 -149q0 -71 -41.5 -110.5t-124.5 -39.5q-166 0 -166 150zM1258 0h-305v1118 h305v-1118z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1417" d="M41 0zM778 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM1258 0h-305v1556h305v-1556z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="2208" d="M41 0zM778 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM1571 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224 q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM1730 1407q0 149 166 149t166 -149q0 -71 -41.5 -110.5t-124.5 -39.5q-166 0 -166 150zM2048 0h-305v1118h305v-1118z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="2208" d="M41 0zM778 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM1571 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224 q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229zM2048 0h-305v1556h305v-1556z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="586" d="M416 485h-244l-51 977h346zM117 143q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5z" />
+<glyph unicode="&#x22;" horiz-adv-x="967" d="M412 1462l-41 -528h-197l-41 528h279zM834 1462l-41 -528h-197l-41 528h279z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M999 844l-47 -232h258v-206h-297l-77 -406h-220l78 406h-194l-76 -406h-215l74 406h-238v206h277l47 232h-252v209h289l77 407h219l-77 -407h198l78 407h215l-78 -407h240v-209h-279zM539 612h196l47 232h-196z" />
+<glyph unicode="$" d="M1092 457q0 -159 -115 -255.5t-322 -115.5v-205h-137v201q-244 5 -428 86v264q87 -43 209.5 -76t218.5 -39v310l-67 26q-198 78 -280.5 169.5t-82.5 226.5q0 145 113.5 238.5t316.5 113.5v153h137v-149q229 -10 414 -92l-94 -234q-156 64 -320 78v-295 q195 -75 277.5 -130t121 -121t38.5 -154zM791 442q0 42 -34 71t-102 60v-249q136 23 136 118zM389 1049q0 -44 30.5 -72.5t98.5 -58.5v235q-129 -19 -129 -104z" />
+<glyph unicode="%" horiz-adv-x="1845" d="M315 1024q0 -127 22.5 -189.5t72.5 -62.5q96 0 96 252q0 250 -96 250q-50 0 -72.5 -61.5t-22.5 -188.5zM758 1026q0 -230 -89 -345.5t-261 -115.5q-165 0 -255 118.5t-90 342.5q0 457 345 457q169 0 259.5 -118.5t90.5 -338.5zM1446 1462l-811 -1462h-240l811 1462h240z M1339 440q0 -127 22.5 -189.5t72.5 -62.5q96 0 96 252q0 250 -96 250q-50 0 -72.5 -61.5t-22.5 -188.5zM1782 442q0 -229 -89 -344.5t-261 -115.5q-165 0 -255 118.5t-90 341.5q0 457 345 457q169 0 259.5 -118.5t90.5 -338.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1536" d="M1536 0h-377l-115 113q-191 -133 -432 -133q-244 0 -387 112t-143 303q0 137 60.5 233.5t207.5 180.5q-75 86 -109 164.5t-34 171.5q0 152 116.5 245t311.5 93q186 0 297.5 -86.5t111.5 -231.5q0 -119 -69 -217.5t-223 -187.5l284 -277q71 117 123 301h318 q-36 -135 -99 -263.5t-143 -227.5zM403 424q0 -86 64.5 -137t165.5 -51q126 0 227 61l-332 330q-58 -44 -91.5 -92t-33.5 -111zM762 1133q0 53 -36 83.5t-93 30.5q-67 0 -105.5 -32t-38.5 -91q0 -88 95 -194q86 48 132 94.5t46 108.5z" />
+<glyph unicode="'" horiz-adv-x="545" d="M412 1462l-41 -528h-197l-41 528h279z" />
+<glyph unicode="(" horiz-adv-x="694" d="M82 561q0 265 77.5 496t223.5 405h250q-141 -193 -213 -424t-72 -475q0 -245 73.5 -473.5t209.5 -413.5h-248q-147 170 -224 397t-77 488z" />
+<glyph unicode=")" horiz-adv-x="694" d="M612 561q0 -263 -77.5 -490t-223.5 -395h-248q135 184 209 412.5t74 474.5q0 244 -72 475t-213 424h250q147 -175 224 -406.5t77 -494.5z" />
+<glyph unicode="*" horiz-adv-x="1116" d="M688 1556l-41 -368l373 104l33 -252l-340 -24l223 -297l-227 -121l-156 313l-137 -311l-236 119l221 297l-338 26l39 250l365 -104l-41 368h262z" />
+<glyph unicode="+" d="M475 612h-387v219h387v390h219v-390h387v-219h-387v-385h-219v385z" />
+<glyph unicode="," horiz-adv-x="594" d="M459 215q-52 -202 -176 -479h-220q65 266 101 502h280z" />
+<glyph unicode="-" horiz-adv-x="659" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="." horiz-adv-x="584" d="M117 143q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5z" />
+<glyph unicode="/" horiz-adv-x="846" d="M836 1462l-545 -1462h-277l545 1462h277z" />
+<glyph unicode="0" d="M1096 731q0 -383 -125.5 -567t-386.5 -184q-253 0 -381.5 190t-128.5 561q0 387 125 570.5t385 183.5q253 0 382.5 -192t129.5 -562zM381 731q0 -269 46.5 -385.5t156.5 -116.5q108 0 156 118t48 384q0 269 -48.5 386.5t-155.5 117.5q-109 0 -156 -117.5t-47 -386.5z" />
+<glyph unicode="1" d="M846 0h-309v846l3 139l5 152q-77 -77 -107 -101l-168 -135l-149 186l471 375h254v-1462z" />
+<glyph unicode="2" d="M1104 0h-1022v215l367 371q163 167 213 231.5t72 119.5t22 114q0 88 -48.5 131t-129.5 43q-85 0 -165 -39t-167 -111l-168 199q108 92 179 130t155 58.5t188 20.5q137 0 242 -50t163 -140t58 -206q0 -101 -35.5 -189.5t-110 -181.5t-262.5 -265l-188 -177v-14h637v-260z " />
+<glyph unicode="3" d="M1047 1135q0 -137 -83 -233t-233 -132v-6q177 -22 268 -107.5t91 -230.5q0 -211 -153 -328.5t-437 -117.5q-238 0 -422 79v263q85 -43 187 -70t202 -27q153 0 226 52t73 167q0 103 -84 146t-268 43h-111v237h113q170 0 248.5 44.5t78.5 152.5q0 166 -208 166 q-72 0 -146.5 -24t-165.5 -83l-143 213q200 144 477 144q227 0 358.5 -92t131.5 -256z" />
+<glyph unicode="4" d="M1137 303h-176v-303h-302v303h-624v215l641 944h285v-919h176v-240zM659 543v248q0 62 5 180t8 137h-8q-37 -82 -89 -160l-268 -405h352z" />
+<glyph unicode="5" d="M614 934q212 0 337.5 -119t125.5 -326q0 -245 -151 -377t-432 -132q-244 0 -394 79v267q79 -42 184 -68.5t199 -26.5q283 0 283 232q0 221 -293 221q-53 0 -117 -10.5t-104 -22.5l-123 66l55 745h793v-262h-522l-27 -287l35 7q61 14 151 14z" />
+<glyph unicode="6" d="M72 621q0 434 183.5 646t549.5 212q125 0 196 -15v-247q-89 20 -176 20q-159 0 -259.5 -48t-150.5 -142t-59 -267h13q99 170 317 170q196 0 307 -123t111 -340q0 -234 -132 -370.5t-366 -136.5q-162 0 -282.5 75t-186 219t-65.5 347zM600 227q99 0 152 66.5t53 189.5 q0 107 -49.5 168.5t-149.5 61.5q-94 0 -160.5 -61t-66.5 -142q0 -119 62.5 -201t158.5 -82z" />
+<glyph unicode="7" d="M227 0l549 1200h-721v260h1049v-194l-553 -1266h-324z" />
+<glyph unicode="8" d="M586 1481q210 0 338.5 -95.5t128.5 -257.5q0 -112 -62 -199.5t-200 -156.5q164 -88 235.5 -183.5t71.5 -209.5q0 -180 -141 -289.5t-371 -109.5q-240 0 -377 102t-137 289q0 125 66.5 222t213.5 171q-125 79 -180 169t-55 197q0 157 130 254t339 97zM358 389 q0 -86 60 -134t164 -48q115 0 172 49.5t57 130.5q0 67 -56.5 125.5t-183.5 124.5q-213 -98 -213 -248zM584 1255q-79 0 -127.5 -40.5t-48.5 -108.5q0 -60 38.5 -107.5t139.5 -97.5q98 46 137 94t39 111q0 69 -50 109t-128 40z" />
+<glyph unicode="9" d="M1098 838q0 -432 -182 -645t-551 -213q-130 0 -197 14v248q84 -21 176 -21q155 0 255 45.5t153 143t61 268.5h-12q-58 -94 -134 -132t-190 -38q-191 0 -301 122.5t-110 340.5q0 235 133.5 371.5t363.5 136.5q162 0 283.5 -76t186.5 -220.5t65 -344.5zM569 1231 q-96 0 -150 -66t-54 -190q0 -106 49 -168t149 -62q94 0 161 61.5t67 141.5q0 119 -62.5 201t-159.5 82z" />
+<glyph unicode=":" horiz-adv-x="584" d="M117 143q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5zM117 969q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -81 -46.5 -125.5t-127.5 -44.5q-84 0 -130 44t-46 126z" />
+<glyph unicode=";" horiz-adv-x="594" d="M444 238l15 -23q-52 -202 -176 -479h-220q65 266 101 502h280zM117 969q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -81 -46.5 -125.5t-127.5 -44.5q-84 0 -130 44t-46 126z" />
+<glyph unicode="&#x3c;" d="M1081 203l-993 438v143l993 496v-240l-684 -317l684 -281v-239z" />
+<glyph unicode="=" d="M88 805v219h993v-219h-993zM88 418v219h993v-219h-993z" />
+<glyph unicode="&#x3e;" d="M88 442l684 281l-684 317v240l993 -496v-143l-993 -438v239z" />
+<glyph unicode="?" horiz-adv-x="977" d="M276 485v74q0 96 41 167t150 151q105 75 138.5 122t33.5 105q0 65 -48 99t-134 34q-150 0 -342 -98l-109 219q223 125 473 125q206 0 327.5 -99t121.5 -264q0 -110 -50 -190t-190 -180q-96 -71 -121.5 -108t-25.5 -97v-60h-265zM244 143q0 84 45 127t131 43 q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5z" />
+<glyph unicode="@" horiz-adv-x="1837" d="M1735 752q0 -144 -46 -263.5t-130 -187.5t-195 -68q-74 0 -131 35.5t-82 93.5h-16q-108 -129 -275 -129q-177 0 -279 106.5t-102 291.5q0 211 134 340t350 129q86 0 189.5 -16.5t170.5 -39.5l-23 -489q0 -139 76 -139q64 0 102 93.5t38 244.5q0 161 -67 284.5 t-188.5 188.5t-277.5 65q-202 0 -351 -83t-228.5 -239.5t-79.5 -361.5q0 -276 147.5 -423.5t427.5 -147.5q106 0 233 23.5t250 68.5v-192q-214 -91 -475 -91q-380 0 -592.5 200t-212.5 556q0 247 108.5 448.5t309 316t461.5 114.5q220 0 393 -90t267 -256t94 -383zM711 627 q0 -211 172 -211q90 0 137 63.5t57 206.5l13 221q-51 11 -115 11q-125 0 -194.5 -78t-69.5 -213z" />
+<glyph unicode="A" horiz-adv-x="1413" d="M1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381z" />
+<glyph unicode="B" horiz-adv-x="1376" d="M184 1462h455q311 0 451.5 -88.5t140.5 -281.5q0 -131 -61.5 -215t-163.5 -101v-10q139 -31 200.5 -116t61.5 -226q0 -200 -144.5 -312t-392.5 -112h-547v1462zM494 883h180q126 0 182.5 39t56.5 129q0 84 -61.5 120.5t-194.5 36.5h-163v-325zM494 637v-381h202 q128 0 189 49t61 150q0 182 -260 182h-192z" />
+<glyph unicode="C" horiz-adv-x="1305" d="M805 1225q-175 0 -271 -131.5t-96 -366.5q0 -489 367 -489q154 0 373 77v-260q-180 -75 -402 -75q-319 0 -488 193.5t-169 555.5q0 228 83 399.5t238.5 263t364.5 91.5q213 0 428 -103l-100 -252q-82 39 -165 68t-163 29z" />
+<glyph unicode="D" horiz-adv-x="1516" d="M1397 745q0 -361 -205.5 -553t-593.5 -192h-414v1462h459q358 0 556 -189t198 -528zM1075 737q0 471 -416 471h-165v-952h133q448 0 448 481z" />
+<glyph unicode="E" horiz-adv-x="1147" d="M1026 0h-842v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256z" />
+<glyph unicode="F" horiz-adv-x="1124" d="M489 0h-305v1462h838v-254h-533v-377h496v-253h-496v-578z" />
+<glyph unicode="G" horiz-adv-x="1483" d="M739 821h580v-758q-141 -46 -265.5 -64.5t-254.5 -18.5q-331 0 -505.5 194.5t-174.5 558.5q0 354 202.5 552t561.5 198q225 0 434 -90l-103 -248q-160 80 -333 80q-201 0 -322 -135t-121 -363q0 -238 97.5 -363.5t283.5 -125.5q97 0 197 20v305h-277v258z" />
+<glyph unicode="H" horiz-adv-x="1567" d="M1382 0h-309v631h-579v-631h-310v1462h310v-573h579v573h309v-1462z" />
+<glyph unicode="I" horiz-adv-x="678" d="M184 0v1462h310v-1462h-310z" />
+<glyph unicode="J" horiz-adv-x="678" d="M31 -430q-105 0 -183 22v258q80 -20 146 -20q102 0 146 63.5t44 198.5v1370h310v-1368q0 -256 -117 -390t-346 -134z" />
+<glyph unicode="K" horiz-adv-x="1360" d="M1360 0h-352l-383 616l-131 -94v-522h-310v1462h310v-669l122 172l396 497h344l-510 -647z" />
+<glyph unicode="L" horiz-adv-x="1157" d="M184 0v1462h310v-1206h593v-256h-903z" />
+<glyph unicode="M" horiz-adv-x="1931" d="M803 0l-352 1147h-9q19 -350 19 -467v-680h-277v1462h422l346 -1118h6l367 1118h422v-1462h-289v692q0 49 1.5 113t13.5 340h-9l-377 -1145h-284z" />
+<glyph unicode="N" horiz-adv-x="1665" d="M1481 0h-394l-636 1106h-9q19 -293 19 -418v-688h-277v1462h391l635 -1095h7q-15 285 -15 403v692h279v-1462z" />
+<glyph unicode="O" horiz-adv-x="1630" d="M1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5z" />
+<glyph unicode="P" horiz-adv-x="1286" d="M494 774h102q143 0 214 56.5t71 164.5q0 109 -59.5 161t-186.5 52h-141v-434zM1194 1006q0 -236 -147.5 -361t-419.5 -125h-133v-520h-310v1462h467q266 0 404.5 -114.5t138.5 -341.5z" />
+<glyph unicode="Q" horiz-adv-x="1630" d="M1511 733q0 -258 -91.5 -432.5t-268.5 -255.5l352 -393h-397l-268 328h-23q-336 0 -516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5z" />
+<glyph unicode="R" horiz-adv-x="1352" d="M494 813h100q147 0 217 49t70 154q0 104 -71.5 148t-221.5 44h-94v-395zM494 561v-561h-310v1462h426q298 0 441 -108.5t143 -329.5q0 -129 -71 -229.5t-201 -157.5q330 -493 430 -637h-344l-349 561h-165z" />
+<glyph unicode="S" horiz-adv-x="1128" d="M1047 406q0 -198 -142.5 -312t-396.5 -114q-234 0 -414 88v288q148 -66 250.5 -93t187.5 -27q102 0 156.5 39t54.5 116q0 43 -24 76.5t-70.5 64.5t-189.5 99q-134 63 -201 121t-107 135t-40 180q0 194 131.5 305t363.5 111q114 0 217.5 -27t216.5 -76l-100 -241 q-117 48 -193.5 67t-150.5 19q-88 0 -135 -41t-47 -107q0 -41 19 -71.5t60.5 -59t196.5 -102.5q205 -98 281 -196.5t76 -241.5z" />
+<glyph unicode="T" horiz-adv-x="1186" d="M748 0h-310v1204h-397v258h1104v-258h-397v-1204z" />
+<glyph unicode="U" horiz-adv-x="1548" d="M1374 1462v-946q0 -162 -72.5 -284t-209.5 -187t-324 -65q-282 0 -438 144.5t-156 395.5v942h309v-895q0 -169 68 -248t225 -79q152 0 220.5 79.5t68.5 249.5v893h309z" />
+<glyph unicode="V" horiz-adv-x="1331" d="M1018 1462h313l-497 -1462h-338l-496 1462h313l275 -870q23 -77 47.5 -179.5t30.5 -142.5q11 92 75 322z" />
+<glyph unicode="W" horiz-adv-x="1980" d="M1608 0h-353l-198 768q-11 41 -37.5 169.5t-30.5 172.5q-6 -54 -30 -173.5t-37 -170.5l-197 -766h-352l-373 1462h305l187 -798q49 -221 71 -383q6 57 27.5 176.5t40.5 185.5l213 819h293l213 -819q14 -55 35 -168t32 -194q10 78 32 194.5t40 188.5l186 798h305z" />
+<glyph unicode="X" horiz-adv-x="1366" d="M1366 0h-354l-340 553l-340 -553h-332l485 754l-454 708h342l315 -526l309 526h334l-459 -725z" />
+<glyph unicode="Y" horiz-adv-x="1278" d="M639 860l305 602h334l-485 -893v-569h-308v559l-485 903h336z" />
+<glyph unicode="Z" horiz-adv-x="1186" d="M1137 0h-1088v201l701 1005h-682v256h1050v-200l-700 -1006h719v-256z" />
+<glyph unicode="[" horiz-adv-x="678" d="M627 -324h-484v1786h484v-211h-224v-1364h224v-211z" />
+<glyph unicode="\" horiz-adv-x="846" d="M289 1462l545 -1462h-277l-545 1462h277z" />
+<glyph unicode="]" horiz-adv-x="678" d="M51 -113h223v1364h-223v211h484v-1786h-484v211z" />
+<glyph unicode="^" horiz-adv-x="1090" d="M8 520l438 950h144l495 -950h-239l-322 643l-280 -643h-236z" />
+<glyph unicode="_" horiz-adv-x="842" d="M846 -324h-850v140h850v-140z" />
+<glyph unicode="`" horiz-adv-x="1243" d="M707 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="a" horiz-adv-x="1237" d="M870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48t-65 -134 q0 -129 148 -129q106 0 169.5 61t63.5 162v92z" />
+<glyph unicode="b" horiz-adv-x="1296" d="M782 1139q198 0 310 -154.5t112 -423.5q0 -277 -115.5 -429t-314.5 -152q-197 0 -309 143h-21l-51 -123h-233v1556h305v-362q0 -69 -12 -221h12q107 166 317 166zM684 895q-113 0 -165 -69.5t-54 -229.5v-33q0 -180 53.5 -258t169.5 -78q94 0 149.5 86.5t55.5 251.5 t-56 247.5t-153 82.5z" />
+<glyph unicode="c" horiz-adv-x="1053" d="M614 -20q-522 0 -522 573q0 285 142 435.5t407 150.5q194 0 348 -76l-90 -236q-72 29 -134 47.5t-124 18.5q-238 0 -238 -338q0 -328 238 -328q88 0 163 23.5t150 73.5v-261q-74 -47 -149.5 -65t-190.5 -18z" />
+<glyph unicode="d" horiz-adv-x="1296" d="M514 -20q-197 0 -309.5 153t-112.5 424q0 275 114.5 428.5t315.5 153.5q211 0 322 -164h10q-23 125 -23 223v358h306v-1556h-234l-59 145h-13q-104 -165 -317 -165zM621 223q117 0 171.5 68t59.5 231v33q0 180 -55.5 258t-180.5 78q-102 0 -158.5 -86.5t-56.5 -251.5 t57 -247.5t163 -82.5z" />
+<glyph unicode="e" horiz-adv-x="1210" d="M623 922q-97 0 -152 -61.5t-63 -174.5h428q-2 113 -59 174.5t-154 61.5zM666 -20q-270 0 -422 149t-152 422q0 281 140.5 434.5t388.5 153.5q237 0 369 -135t132 -373v-148h-721q5 -130 77 -203t202 -73q101 0 191 21t188 67v-236q-80 -40 -171 -59.5t-222 -19.5z" />
+<glyph unicode="f" horiz-adv-x="793" d="M778 889h-264v-889h-305v889h-168v147l168 82v82q0 191 94 279t301 88q158 0 281 -47l-78 -224q-92 29 -170 29q-65 0 -94 -38.5t-29 -98.5v-70h264v-229z" />
+<glyph unicode="g" horiz-adv-x="1157" d="M1133 1118v-155l-175 -45q48 -75 48 -168q0 -180 -125.5 -280.5t-348.5 -100.5l-55 3l-45 5q-47 -36 -47 -80q0 -66 168 -66h190q184 0 280.5 -79t96.5 -232q0 -196 -163.5 -304t-469.5 -108q-234 0 -357.5 81.5t-123.5 228.5q0 101 63 169t185 97q-47 20 -82 65.5 t-35 96.5q0 64 37 106.5t107 83.5q-88 38 -139.5 122t-51.5 198q0 183 119 283t340 100q47 0 111.5 -8.5t82.5 -12.5h390zM270 -158q0 -63 60.5 -99t169.5 -36q164 0 257 45t93 123q0 63 -55 87t-170 24h-158q-84 0 -140.5 -39.5t-56.5 -104.5zM381 752q0 -91 41.5 -144 t126.5 -53q86 0 126 53t40 144q0 202 -166 202q-168 0 -168 -202z" />
+<glyph unicode="h" horiz-adv-x="1346" d="M1192 0h-305v653q0 242 -180 242q-128 0 -185 -87t-57 -282v-526h-305v1556h305v-317q0 -37 -7 -174l-7 -90h16q102 164 324 164q197 0 299 -106t102 -304v-729z" />
+<glyph unicode="i" horiz-adv-x="625" d="M147 1407q0 149 166 149t166 -149q0 -71 -41.5 -110.5t-124.5 -39.5q-166 0 -166 150zM465 0h-305v1118h305v-1118z" />
+<glyph unicode="j" horiz-adv-x="625" d="M70 -492q-117 0 -201 25v240q70 -19 143 -19q77 0 112.5 43t35.5 127v1194h305v-1239q0 -178 -103 -274.5t-292 -96.5zM147 1407q0 149 166 149t166 -149q0 -71 -41.5 -110.5t-124.5 -39.5q-166 0 -166 150z" />
+<glyph unicode="k" horiz-adv-x="1270" d="M453 608l133 170l313 340h344l-444 -485l471 -633h-352l-322 453l-131 -105v-348h-305v1556h305v-694l-16 -254h4z" />
+<glyph unicode="l" horiz-adv-x="625" d="M465 0h-305v1556h305v-1556z" />
+<glyph unicode="m" horiz-adv-x="2011" d="M1161 0h-305v653q0 121 -40.5 181.5t-127.5 60.5q-117 0 -170 -86t-53 -283v-526h-305v1118h233l41 -143h17q45 77 130 120.5t195 43.5q251 0 340 -164h27q45 78 132.5 121t197.5 43q190 0 287.5 -97.5t97.5 -312.5v-729h-306v653q0 121 -40.5 181.5t-127.5 60.5 q-112 0 -167.5 -80t-55.5 -254v-561z" />
+<glyph unicode="n" horiz-adv-x="1346" d="M1192 0h-305v653q0 121 -43 181.5t-137 60.5q-128 0 -185 -85.5t-57 -283.5v-526h-305v1118h233l41 -143h17q51 81 140.5 122.5t203.5 41.5q195 0 296 -105.5t101 -304.5v-729z" />
+<glyph unicode="o" horiz-adv-x="1268" d="M403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z" />
+<glyph unicode="p" horiz-adv-x="1296" d="M774 -20q-197 0 -309 143h-16q16 -140 16 -162v-453h-305v1610h248l43 -145h14q107 166 317 166q198 0 310 -153t112 -425q0 -179 -52.5 -311t-149.5 -201t-228 -69zM684 895q-113 0 -165 -69.5t-54 -229.5v-33q0 -180 53.5 -258t169.5 -78q205 0 205 338 q0 165 -50.5 247.5t-158.5 82.5z" />
+<glyph unicode="q" horiz-adv-x="1296" d="M623 219q116 0 170 66.5t59 232.5v37q0 180 -55.5 258t-178.5 78q-215 0 -215 -338q0 -168 53.5 -251t166.5 -83zM514 -20q-198 0 -310 152.5t-112 424.5q0 274 114.5 428t313.5 154q106 0 185 -40t139 -124h8l27 143h258v-1610h-306v469q0 61 13 168h-13 q-49 -81 -130 -123t-187 -42z" />
+<glyph unicode="r" horiz-adv-x="930" d="M784 1139q62 0 103 -9l-23 -286q-37 10 -90 10q-146 0 -227.5 -75t-81.5 -210v-569h-305v1118h231l45 -188h15q52 94 140.5 151.5t192.5 57.5z" />
+<glyph unicode="s" horiz-adv-x="1018" d="M940 332q0 -172 -119.5 -262t-357.5 -90q-122 0 -208 16.5t-161 48.5v252q85 -40 191.5 -67t187.5 -27q166 0 166 96q0 36 -22 58.5t-76 51t-144 66.5q-129 54 -189.5 100t-88 105.5t-27.5 146.5q0 149 115.5 230.5t327.5 81.5q202 0 393 -88l-92 -220q-84 36 -157 59 t-149 23q-135 0 -135 -73q0 -41 43.5 -71t190.5 -89q131 -53 192 -99t90 -106t29 -143z" />
+<glyph unicode="t" horiz-adv-x="889" d="M631 223q80 0 192 35v-227q-114 -51 -280 -51q-183 0 -266.5 92.5t-83.5 277.5v539h-146v129l168 102l88 236h195v-238h313v-229h-313v-539q0 -65 36.5 -96t96.5 -31z" />
+<glyph unicode="u" horiz-adv-x="1346" d="M952 0l-41 143h-16q-49 -78 -139 -120.5t-205 -42.5q-197 0 -297 105.5t-100 303.5v729h305v-653q0 -121 43 -181.5t137 -60.5q128 0 185 85.5t57 283.5v526h305v-1118h-234z" />
+<glyph unicode="v" horiz-adv-x="1165" d="M426 0l-426 1118h319l216 -637q36 -121 45 -229h6q5 96 45 229l215 637h319l-426 -1118h-313z" />
+<glyph unicode="w" horiz-adv-x="1753" d="M1079 0l-86 391l-116 494h-7l-204 -885h-328l-318 1118h304l129 -495q31 -133 63 -367h6q4 76 35 241l16 85l138 536h336l131 -536q4 -22 12.5 -65t16.5 -91.5t14.5 -95t7.5 -74.5h6q9 72 32 197.5t33 169.5l134 495h299l-322 -1118h-332z" />
+<glyph unicode="x" horiz-adv-x="1184" d="M389 571l-360 547h346l217 -356l219 356h346l-364 -547l381 -571h-347l-235 383l-236 -383h-346z" />
+<glyph unicode="y" horiz-adv-x="1165" d="M0 1118h334l211 -629q27 -82 37 -194h6q11 103 43 194l207 629h327l-473 -1261q-65 -175 -185.5 -262t-281.5 -87q-79 0 -155 17v242q55 -13 120 -13q81 0 141.5 49.5t94.5 149.5l18 55z" />
+<glyph unicode="z" horiz-adv-x="999" d="M938 0h-883v180l518 705h-487v233h834v-198l-504 -687h522v-233z" />
+<glyph unicode="{" horiz-adv-x="807" d="M287 270q0 87 -65.5 133t-190.5 46v239q126 0 191 44t65 126v8v318q0 153 97 215.5t341 62.5v-225q-99 -3 -136.5 -38t-37.5 -103v-299q-6 -188 -234 -222v-12q234 -35 234 -212v-9v-299q0 -68 37 -103t137 -38v-226q-244 0 -341 62.5t-97 216.5v315z" />
+<glyph unicode="|" horiz-adv-x="1128" d="M455 1550h219v-2015h-219v2015z" />
+<glyph unicode="}" horiz-adv-x="807" d="M520 -45q0 -112 -41 -169t-135.5 -83.5t-261.5 -26.5v226q99 2 136.5 36t37.5 105v299v11q0 86 59 139.5t174 70.5v12q-227 34 -233 222v299q0 70 -37 104t-137 37v225q167 0 262 -26.5t135.5 -84t40.5 -167.5v-318v-10q0 -84 61.5 -126t194.5 -42v-239 q-125 0 -190.5 -41t-65.5 -138v-315z" />
+<glyph unicode="~" d="M322 672q-55 0 -117.5 -33.5t-116.5 -87.5v231q103 109 256 109q73 0 137.5 -16t139.5 -48q129 -55 227 -55q53 0 116 32t117 89v-231q-101 -109 -256 -109q-66 0 -126 13t-150 50q-131 56 -227 56z" />
+<glyph unicode="&#xa1;" horiz-adv-x="586" d="M168 606h244l51 -975h-346zM467 948q0 -84 -45 -127t-131 -43q-83 0 -128.5 44t-45.5 126q0 81 46.5 125.5t127.5 44.5q84 0 130 -44t46 -126z" />
+<glyph unicode="&#xa2;" d="M563 176q-420 59 -420 565q0 261 104.5 403t315.5 173v166h178v-158q166 -9 299 -74l-90 -235q-72 29 -134 47t-124 18q-121 0 -179 -83.5t-58 -254.5q0 -327 237 -327q82 0 148 15.5t166 60.5v-254q-127 -61 -265 -70v-188h-178v196z" />
+<glyph unicode="&#xa3;" d="M700 1483q195 0 390 -82l-93 -230q-157 64 -272 64q-78 0 -120 -44.5t-42 -127.5v-193h375v-219h-375v-143q0 -170 -151 -248h718v-260h-1048v248q103 44 141.5 101t38.5 157v145h-178v219h178v195q0 201 114.5 309.5t323.5 108.5z" />
+<glyph unicode="&#xa4;" d="M188 723q0 102 54 197l-129 127l147 147l127 -127q91 53 197 53q105 0 196 -55l127 129l150 -143l-129 -129q53 -89 53 -199q0 -107 -53 -199l125 -125l-146 -145l-127 125q-95 -51 -196 -51q-115 0 -199 51l-125 -123l-145 145l127 125q-54 93 -54 197zM395 723 q0 -77 54.5 -132.5t134.5 -55.5q81 0 136.5 55t55.5 133q0 80 -56.5 135t-135.5 55q-78 0 -133.5 -56t-55.5 -134z" />
+<glyph unicode="&#xa5;" d="M584 860l264 602h313l-383 -747h195v-178h-246v-138h246v-178h-246v-221h-287v221h-247v178h247v138h-247v178h190l-377 747h316z" />
+<glyph unicode="&#xa6;" horiz-adv-x="1128" d="M455 1550h219v-815h-219v815zM455 350h219v-815h-219v815z" />
+<glyph unicode="&#xa7;" horiz-adv-x="995" d="M121 805q0 79 36 144.5t97 105.5q-133 84 -133 233q0 131 111.5 210t293.5 79q170 0 363 -84l-82 -190q-68 32 -138.5 57.5t-148.5 25.5q-81 0 -118 -23t-37 -71q0 -49 49.5 -86t163.5 -82q163 -64 240 -148.5t77 -193.5q0 -177 -125 -260q62 -40 93.5 -92.5t31.5 -126.5 q0 -148 -119.5 -235.5t-320.5 -87.5q-203 0 -349 79v207q81 -41 180 -69.5t169 -28.5q194 0 194 117q0 39 -18.5 63t-63.5 49.5t-125 59.5q-183 74 -252 152.5t-69 195.5zM344 827q0 -67 65 -119t181 -98q78 57 78 146q0 68 -50.5 115t-183.5 96q-37 -14 -63.5 -53.5 t-26.5 -86.5z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1243" d="M279 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM682 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M895 1010q-97 0 -150 -74t-53 -205q0 -280 203 -280q57 0 123 15t123 44v-191q-120 -57 -252 -57q-204 0 -316 125t-112 346q0 220 110.5 342.5t309.5 122.5q149 0 305 -78l-74 -168q-113 58 -217 58zM100 731q0 200 100 375t275 276t377 101q200 0 375 -100t276 -275 t101 -377q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM242 731q0 -164 82 -305.5t224 -223t304 -81.5q164 0 305.5 82t223 224t81.5 304q0 164 -82 305.5t-224 223t-304 81.5q-164 0 -305.5 -82t-223 -224t-81.5 -304z" />
+<glyph unicode="&#xaa;" horiz-adv-x="784" d="M561 764l-31 110q-43 -58 -105 -90t-136 -32q-117 0 -179.5 58.5t-62.5 164.5q0 109 82.5 163.5t267.5 63.5l99 4q0 117 -127 117q-81 0 -217 -61l-66 135q66 32 145.5 57t178.5 25q137 0 211.5 -71t74.5 -202v-442h-135zM252 977q0 -38 23 -56t55 -18q77 0 121.5 41.5 t44.5 106.5v36l-99 -6q-145 -10 -145 -104z" />
+<glyph unicode="&#xab;" horiz-adv-x="1260" d="M82 573l371 455l219 -119l-279 -348l279 -348l-219 -119l-371 453v26zM588 573l370 455l220 -119l-279 -348l279 -348l-220 -119l-370 453v26z" />
+<glyph unicode="&#xac;" d="M1081 248h-219v364h-774v219h993v-583z" />
+<glyph unicode="&#xad;" horiz-adv-x="659" d="M61 424zM61 424v250h537v-250h-537z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M1157 905q0 -170 -143 -233l237 -400h-254l-178 338h-47v-338h-229v916h264q181 0 265.5 -70t84.5 -213zM772 778h31q66 0 94.5 28.5t28.5 94.5q0 65 -28 92t-97 27h-29v-242zM100 731q0 200 100 375t275 276t377 101q200 0 375 -100t276 -275t101 -377q0 -197 -97 -370 t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM242 731q0 -164 82 -305.5t224 -223t304 -81.5q164 0 305.5 82t223 224t81.5 304q0 164 -82 305.5t-224 223t-304 81.5q-164 0 -305.5 -82t-223 -224t-81.5 -304z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M1030 1556h-1036v201h1036v-201z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M92 1137q0 92 46 172t126 127t174 47q92 0 172.5 -46t127 -127t46.5 -173q0 -93 -46.5 -173.5t-126.5 -125.5t-173 -45q-145 0 -245.5 99.5t-100.5 244.5zM283 1137q0 -64 44.5 -109t110.5 -45t111 46t45 108q0 63 -45.5 110t-110.5 47q-64 0 -109.5 -46t-45.5 -111z" />
+<glyph unicode="&#xb1;" d="M475 674h-387v219h387v389h219v-389h387v-219h-387v-385h-219v385zM88 0v219h993v-219h-993z" />
+<glyph unicode="&#xb2;" horiz-adv-x="776" d="M702 586h-647v168l224 219q102 100 130.5 144.5t28.5 94.5q0 38 -24 58t-64 20q-81 0 -180 -88l-123 152q147 129 336 129q137 0 216 -66.5t79 -183.5q0 -85 -47 -160t-176 -192l-105 -95h352v-200z" />
+<glyph unicode="&#xb3;" horiz-adv-x="776" d="M666 1249q0 -143 -170 -198v-13q94 -20 146 -75t52 -134q0 -121 -88 -190.5t-274 -69.5q-143 0 -273 70v190q148 -90 271 -90q143 0 143 107q0 53 -44 79.5t-122 26.5h-112v160h92q83 0 123.5 26t40.5 83q0 38 -25 63t-76 25q-47 0 -89 -19t-99 -59l-101 141 q62 47 137.5 78t178.5 31q127 0 208 -64t81 -168z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1243" d="M332 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1352" d="M465 465q0 -121 44 -181.5t138 -60.5q126 0 183 86.5t57 282.5v526h305v-1118h-231l-43 150h-15q-42 -85 -102 -127.5t-148 -42.5q-62 0 -114 23t-84 67l5 -85l5 -157v-320h-305v1610h305v-653z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1167 -260h-161v1616h-166v-1616h-162v819q-62 -18 -146 -18q-216 0 -317.5 125t-101.5 376q0 260 109 387t341 127h604v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="584" d="M117 723q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -81 -46.5 -125.5t-127.5 -44.5q-84 0 -130 44t-46 126z" />
+<glyph unicode="&#xb8;" horiz-adv-x="420" d="M418 -250q0 -128 -75.5 -185t-233.5 -57q-78 0 -146 21v168q27 -7 72.5 -14t70.5 -7q72 0 72 62q0 83 -166 108l78 154h193l-27 -61q74 -24 118 -74.5t44 -114.5z" />
+<glyph unicode="&#xb9;" horiz-adv-x="776" d="M584 586h-238v446l3 112l5 95q-27 -36 -75 -78l-78 -61l-109 127l301 235h191v-876z" />
+<glyph unicode="&#xba;" horiz-adv-x="795" d="M737 1116q0 -171 -91.5 -267.5t-250.5 -96.5q-153 0 -245.5 98.5t-92.5 265.5q0 169 89.5 266t252.5 97q152 0 245 -98.5t93 -264.5zM260 1116q0 -100 32.5 -150.5t104.5 -50.5t103.5 50.5t31.5 150.5t-31.5 149.5t-103.5 49.5t-104.5 -49.5t-32.5 -149.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1260" d="M1178 547l-371 -453l-219 119l278 348l-278 348l219 119l371 -455v-26zM672 547l-371 -453l-219 119l278 348l-278 348l219 119l371 -455v-26z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1804" d="M46 0zM538 586h-238v446l3 112l5 95q-27 -36 -75 -78l-78 -61l-109 127l301 235h191v-876zM1370 1462l-811 -1462h-239l811 1462h239zM1682 152h-125v-151h-238v151h-383v154l385 577h236v-563h125v-168zM1319 320v164q0 86 6 184q-9 -26 -35.5 -80t-41.5 -77l-127 -191 h198z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1804" d="M46 0zM538 586h-238v446l3 112l5 95q-27 -36 -75 -78l-78 -61l-109 127l301 235h191v-876zM1370 1462l-811 -1462h-239l811 1462h239zM1716 1h-647v168l224 219q102 100 130.5 144.5t28.5 94.5q0 38 -24 58t-64 20q-81 0 -180 -88l-123 152q147 129 336 129 q137 0 216 -66.5t79 -183.5q0 -85 -47 -160t-176 -192l-105 -95h352v-200z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1804" d="M90 0zM697 1249q0 -143 -170 -198v-13q94 -20 146 -75t52 -134q0 -121 -88 -190.5t-274 -69.5q-143 0 -273 70v190q148 -90 271 -90q143 0 143 107q0 53 -44 79.5t-122 26.5h-112v160h92q83 0 123.5 26t40.5 83q0 38 -25 63t-76 25q-47 0 -89 -19t-99 -59l-101 141 q62 47 137.5 78t178.5 31q127 0 208 -64t81 -168zM1441 1462l-811 -1462h-239l811 1462h239zM1712 152h-125v-151h-238v151h-383v154l385 577h236v-563h125v-168zM1349 320v164q0 86 6 184q-9 -26 -35.5 -80t-41.5 -77l-127 -191h198z" />
+<glyph unicode="&#xbf;" horiz-adv-x="977" d="M713 606v-74q0 -98 -44.5 -169t-152.5 -148q-109 -78 -137.5 -122t-28.5 -107q0 -57 43.5 -94t132.5 -37q79 0 169 29t186 71l102 -221q-98 -56 -221.5 -90.5t-229.5 -34.5q-220 0 -345.5 96.5t-125.5 265.5q0 108 48.5 187t191.5 184q95 70 121.5 107t26.5 98v59h264z M745 948q0 -84 -45 -127t-131 -43q-83 0 -128.5 44t-45.5 126q0 81 46.5 125.5t127.5 44.5q84 0 130 -44t46 -126z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM713 1579q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM541 1579v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM938 1579q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM543 1684q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16 q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM365 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM768 1743 q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1413" d="M0 0zM1079 0l-106 348h-533l-106 -348h-334l516 1468h379l518 -1468h-334zM899 608q-147 473 -165.5 535t-26.5 98q-33 -128 -189 -633h381zM959 1567q0 -108 -71 -174t-183 -66t-180 64t-68 174q0 108 67.5 172.5t180.5 64.5q110 0 182 -66t72 -169zM801 1565 q0 45 -27 70.5t-69 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69 26t27 71z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1950" d="M1829 0h-873v348h-491l-150 -348h-315l655 1462h1174v-254h-563v-321h526v-254h-526v-377h563v-256zM578 608h378v590h-127z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1305" d="M119 0zM805 1225q-175 0 -271 -131.5t-96 -366.5q0 -489 367 -489q154 0 373 77v-260q-180 -75 -402 -75q-319 0 -488 193.5t-169 555.5q0 228 83 399.5t238.5 263t364.5 91.5q213 0 428 -103l-100 -252q-82 39 -165 68t-163 29zM959 -250q0 -128 -75.5 -185t-233.5 -57 q-78 0 -146 21v168q27 -7 72.5 -14t70.5 -7q72 0 72 62q0 83 -166 108l78 154h193l-27 -61q74 -24 118 -74.5t44 -114.5z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1147" d="M184 0zM1026 0h-842v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256zM634 1579q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1147" d="M184 0zM1026 0h-842v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256zM424 1579v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xca;" horiz-adv-x="1147" d="M175 0zM1026 0h-842v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256zM841 1579q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1147" d="M184 0zM1026 0h-842v1462h842v-254h-532v-321h495v-254h-495v-377h532v-256zM272 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM675 1743q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99 q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xcc;" horiz-adv-x="678" d="M0 0zM184 0v1462h310v-1462h-310zM317 1579q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xcd;" horiz-adv-x="678" d="M167 0zM184 0v1462h310v-1462h-310zM167 1579v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xce;" horiz-adv-x="678" d="M0 0zM184 0v1462h310v-1462h-310zM570 1579q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xcf;" horiz-adv-x="678" d="M0 0zM184 0v1462h310v-1462h-310zM-3 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM400 1743q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5 t-40.5 100.5z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1516" d="M47 850h137v612h459q358 0 556 -189t198 -528q0 -361 -205.5 -553t-593.5 -192h-414v596h-137v254zM1075 737q0 232 -104 351.5t-314 119.5h-163v-358h237v-254h-237v-340h131q450 0 450 481z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1665" d="M184 0zM1481 0h-394l-636 1106h-9q19 -293 19 -418v-688h-277v1462h391l635 -1095h7q-15 285 -15 403v692h279v-1462zM668 1684q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149 q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1630" d="M119 0zM1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5zM824 1579q-63 44 -185 142.5t-190 164.5v21h342 q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1630" d="M119 0zM1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5zM658 1579v27q172 200 235 301h342v-21 q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1630" d="M119 0zM1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5zM1047 1579q-157 93 -234 176q-78 -81 -229 -176h-203 v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1630" d="M119 0zM1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5zM652 1684q-31 0 -59.5 -26.5t-41.5 -80.5h-149 q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1630" d="M119 0zM1511 733q0 -363 -180 -558t-516 -195t-516 195t-180 560t180.5 557.5t517.5 192.5t515.5 -194t178.5 -558zM444 733q0 -245 93 -369t278 -124q371 0 371 493q0 494 -369 494q-185 0 -279 -124.5t-94 -369.5zM474 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37 t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM877 1743q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xd7;" d="M428 723l-299 301l152 154l301 -299l305 299l153 -150l-305 -305l301 -303l-149 -152l-305 301l-301 -299l-150 152z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1630" d="M1511 733q0 -363 -180 -558t-516 -195q-197 0 -336 65l-90 -135l-162 108l90 136q-198 194 -198 581q0 365 180.5 557.5t517.5 192.5q198 0 344 -70l84 125l160 -104l-88 -131q194 -194 194 -572zM444 733q0 -191 56 -307l506 756q-84 45 -189 45q-185 0 -279 -124.5 t-94 -369.5zM1186 733q0 180 -51 297l-500 -751q76 -39 180 -39q371 0 371 493z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1548" d="M174 0zM1374 1462v-946q0 -162 -72.5 -284t-209.5 -187t-324 -65q-282 0 -438 144.5t-156 395.5v942h309v-895q0 -169 68 -248t225 -79q152 0 220.5 79.5t68.5 249.5v893h309zM750 1579q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xda;" horiz-adv-x="1548" d="M174 0zM1374 1462v-946q0 -162 -72.5 -284t-209.5 -187t-324 -65q-282 0 -438 144.5t-156 395.5v942h309v-895q0 -169 68 -248t225 -79q152 0 220.5 79.5t68.5 249.5v893h309zM602 1579v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1548" d="M174 0zM1374 1462v-946q0 -162 -72.5 -284t-209.5 -187t-324 -65q-282 0 -438 144.5t-156 395.5v942h309v-895q0 -169 68 -248t225 -79q152 0 220.5 79.5t68.5 249.5v893h309zM1006 1579q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357 q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1548" d="M174 0zM1374 1462v-946q0 -162 -72.5 -284t-209.5 -187t-324 -65q-282 0 -438 144.5t-156 395.5v942h309v-895q0 -169 68 -248t225 -79q152 0 220.5 79.5t68.5 249.5v893h309zM433 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5 q-64 0 -101.5 35t-37.5 98zM836 1743q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1278" d="M0 0zM639 860l305 602h334l-485 -893v-569h-308v559l-485 903h336zM461 1579v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xde;" horiz-adv-x="1286" d="M1194 770q0 -229 -142.5 -353t-404.5 -124h-153v-293h-310v1462h310v-229h178q254 0 388 -119t134 -344zM494 543h100q145 0 216 52.5t71 174.5q0 107 -63.5 159t-199.5 52h-124v-438z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1456" d="M1249 1241q0 -64 -21 -112.5t-53 -86.5t-69 -67t-69 -53t-53 -45t-21 -43q0 -27 26.5 -53t92.5 -66q146 -91 198.5 -140t78 -110t25.5 -139q0 -172 -116.5 -259t-343.5 -87q-99 0 -171 14.5t-132 48.5v242q53 -36 135.5 -61t146.5 -25q168 0 168 123q0 41 -16 66.5 t-57 55.5t-115 72q-126 72 -175 131.5t-49 140.5q0 64 35 117t105 102q77 55 108 95t31 86q0 60 -63.5 100.5t-163.5 40.5q-116 0 -181 -52.5t-65 -148.5v-1128h-305v1139q0 201 146.5 314.5t404.5 113.5q244 0 391 -88.5t147 -237.5z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM614 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM441 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM843 1240q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM467 1346q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36 t-73 16.5z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM285 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM688 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36 q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1237" d="M86 0zM870 0l-59 152h-8q-77 -97 -158.5 -134.5t-212.5 -37.5q-161 0 -253.5 92t-92.5 262q0 178 124.5 262.5t375.5 93.5l194 6v49q0 170 -174 170q-134 0 -315 -81l-101 206q193 101 428 101q225 0 345 -98t120 -298v-745h-213zM780 518l-118 -4q-133 -4 -198 -48 t-65 -134q0 -129 148 -129q106 0 169.5 61t63.5 162v92zM883 1479q0 -108 -71 -174t-183 -66t-180 64t-68 174q0 108 67.5 172.5t180.5 64.5q110 0 182 -66t72 -169zM725 1477q0 45 -27 70.5t-69 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69 26t27 71z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1878" d="M1329 -20q-137 0 -249.5 50.5t-184.5 155.5q-98 -117 -196.5 -161.5t-256.5 -44.5q-161 0 -258.5 94.5t-97.5 259.5q0 178 121 262.5t362 93.5l191 6v84q0 69 -44.5 102t-121.5 33q-140 0 -305 -77l-99 202q189 101 422 101q227 0 342 -131q66 64 152.5 96.5t206.5 32.5 q221 0 349 -137.5t128 -370.5v-148h-723q5 -130 77 -203t202 -73q196 0 380 88v-236q-79 -39 -171 -59t-226 -20zM760 518l-113 -4q-124 -4 -186 -47.5t-62 -134.5q0 -129 140 -129q101 0 161 61t60 162v92zM1307 922q-217 0 -234 -236h430q-2 112 -55 174t-141 62z" />
+<glyph unicode="&#xe7;" horiz-adv-x="1053" d="M92 0zM614 -20q-522 0 -522 573q0 285 142 435.5t407 150.5q194 0 348 -76l-90 -236q-72 29 -134 47.5t-124 18.5q-238 0 -238 -338q0 -328 238 -328q88 0 163 23.5t150 73.5v-261q-74 -47 -149.5 -65t-190.5 -18zM805 -250q0 -128 -75.5 -185t-233.5 -57q-78 0 -146 21 v168q27 -7 72.5 -14t70.5 -7q72 0 72 62q0 83 -166 108l78 154h193l-27 -61q74 -24 118 -74.5t44 -114.5z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1210" d="M92 0zM623 922q-97 0 -152 -61.5t-63 -174.5h428q-2 113 -59 174.5t-154 61.5zM666 -20q-270 0 -422 149t-152 422q0 281 140.5 434.5t388.5 153.5q237 0 369 -135t132 -373v-148h-721q5 -130 77 -203t202 -73q101 0 191 21t188 67v-236q-80 -40 -171 -59.5t-222 -19.5z M620 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1210" d="M92 0zM623 922q-97 0 -152 -61.5t-63 -174.5h428q-2 113 -59 174.5t-154 61.5zM666 -20q-270 0 -422 149t-152 422q0 281 140.5 434.5t388.5 153.5q237 0 369 -135t132 -373v-148h-721q5 -130 77 -203t202 -73q101 0 191 21t188 67v-236q-80 -40 -171 -59.5t-222 -19.5z M447 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xea;" horiz-adv-x="1210" d="M92 0zM623 922q-97 0 -152 -61.5t-63 -174.5h428q-2 113 -59 174.5t-154 61.5zM666 -20q-270 0 -422 149t-152 422q0 281 140.5 434.5t388.5 153.5q237 0 369 -135t132 -373v-148h-721q5 -130 77 -203t202 -73q101 0 191 21t188 67v-236q-80 -40 -171 -59.5t-222 -19.5z M860 1241q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1210" d="M92 0zM623 922q-97 0 -152 -61.5t-63 -174.5h428q-2 113 -59 174.5t-154 61.5zM666 -20q-270 0 -422 149t-152 422q0 281 140.5 434.5t388.5 153.5q237 0 369 -135t132 -373v-148h-721q5 -130 77 -203t202 -73q101 0 191 21t188 67v-236q-80 -40 -171 -59.5t-222 -19.5z M297 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM700 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xec;" horiz-adv-x="625" d="M0 0zM465 0h-305v1118h305v-1118zM274 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xed;" horiz-adv-x="625" d="M145 0zM465 0h-305v1118h305v-1118zM145 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xee;" horiz-adv-x="625" d="M0 0zM465 0h-305v1118h305v-1118zM544 1241q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xef;" horiz-adv-x="625" d="M0 0zM465 0h-305v1118h305v-1118zM-29 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM374 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5 t-40.5 100.5z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1268" d="M510 1303q-80 53 -152 92l101 176q144 -65 258 -141l225 139l100 -154l-170 -104q156 -143 230 -324.5t74 -413.5q0 -280 -145 -436.5t-400 -156.5q-245 0 -392 137t-147 372q0 233 130 369.5t351 136.5q205 0 275 -98l8 4q-67 162 -192 281l-230 -142l-100 156zM864 532 q0 108 -61 173t-168 65q-121 0 -176.5 -68.5t-55.5 -214.5q0 -140 60 -211t172 -71q123 0 176 82t53 245z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1346" d="M160 0zM1192 0h-305v653q0 121 -43 181.5t-137 60.5q-128 0 -185 -85.5t-57 -283.5v-526h-305v1118h233l41 -143h17q51 81 140.5 122.5t203.5 41.5q195 0 296 -105.5t101 -304.5v-729zM508 1346q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82 q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1268" d="M92 0zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z M612 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1268" d="M92 0zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z M467 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1268" d="M92 0zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z M864 1241q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1268" d="M92 0zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z M469 1346q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1268" d="M92 0zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1176 561q0 -273 -144 -427t-401 -154q-161 0 -284 70.5t-189 202.5t-66 308q0 274 143 426t402 152q161 0 284 -70t189 -201t66 -307z M291 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM694 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xf7;" d="M88 612v219h993v-219h-993zM444 373q0 76 37 113.5t103 37.5t102.5 -39t36.5 -112q0 -70 -37 -111t-102 -41t-102.5 39t-37.5 113zM444 1071q0 75 37 113.5t103 38.5q67 0 103 -40.5t36 -111.5q0 -70 -37 -110.5t-102 -40.5t-102.5 39t-37.5 112z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1268" d="M1176 561q0 -273 -144 -427t-401 -154q-126 0 -234 45l-67 -101l-154 105l68 100q-152 156 -152 432q0 274 143 426t402 152q132 0 248 -52l55 82l152 -108l-58 -84q142 -155 142 -416zM403 561q0 -94 19 -166l317 475q-43 23 -106 23q-122 0 -176 -82.5t-54 -249.5z M864 561q0 81 -12 141l-309 -462q38 -15 92 -15q122 0 175.5 84.5t53.5 251.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1346" d="M154 0zM952 0l-41 143h-16q-49 -78 -139 -120.5t-205 -42.5q-197 0 -297 105.5t-100 303.5v729h305v-653q0 -121 43 -181.5t137 -60.5q128 0 185 85.5t57 283.5v526h305v-1118h-234zM620 1241q-63 44 -185 142.5t-190 164.5v21h342q63 -101 235 -301v-27h-202z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1346" d="M154 0zM952 0l-41 143h-16q-49 -78 -139 -120.5t-205 -42.5q-197 0 -297 105.5t-100 303.5v729h305v-653q0 -121 43 -181.5t137 -60.5q128 0 185 85.5t57 283.5v526h305v-1118h-234zM498 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5h-203z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1346" d="M154 0zM952 0l-41 143h-16q-49 -78 -139 -120.5t-205 -42.5q-197 0 -297 105.5t-100 303.5v729h305v-653q0 -121 43 -181.5t137 -60.5q128 0 185 85.5t57 283.5v526h305v-1118h-234zM901 1241q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357 q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1346" d="M154 0zM952 0l-41 143h-16q-49 -78 -139 -120.5t-205 -42.5q-197 0 -297 105.5t-100 303.5v729h305v-653q0 -121 43 -181.5t137 -60.5q128 0 185 85.5t57 283.5v526h305v-1118h-234zM326 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5 t-103 -36.5q-64 0 -101.5 35t-37.5 98zM729 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1165" d="M0 0zM0 1118h334l211 -629q27 -82 37 -194h6q11 103 43 194l207 629h327l-473 -1261q-65 -175 -185.5 -262t-281.5 -87q-79 0 -155 17v242q55 -13 120 -13q81 0 141.5 49.5t94.5 149.5l18 55zM393 1241v27q172 200 235 301h342v-21q-52 -52 -177.5 -154.5t-196.5 -152.5 h-203z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1296" d="M465 973q50 81 131 123.5t186 42.5q198 0 310 -154.5t112 -423.5q0 -273 -111.5 -427t-310.5 -154q-213 0 -317 137h-14l7 -62l7 -94v-453h-305v2048h305v-391l-7 -120l-7 -72h14zM684 895q-113 0 -165 -69.5t-54 -229.5v-33q0 -180 53.5 -258t169.5 -78q205 0 205 338 q0 165 -50.5 247.5t-158.5 82.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1165" d="M0 0zM0 1118h334l211 -629q27 -82 37 -194h6q11 103 43 194l207 629h327l-473 -1261q-65 -175 -185.5 -262t-281.5 -87q-79 0 -155 17v242q55 -13 120 -13q81 0 141.5 49.5t94.5 149.5l18 55zM243 1405q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5 t-103 -36.5q-64 0 -101.5 35t-37.5 98zM646 1405q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#x131;" horiz-adv-x="625" d="M465 0h-305v1118h305v-1118z" />
+<glyph unicode="&#x152;" horiz-adv-x="1993" d="M1872 0h-873q-38 -9 -109 -14.5t-116 -5.5q-319 0 -487 197t-168 558q0 363 169.5 556.5t487.5 193.5q61 0 127 -7t101 -16h868v-254h-563v-321h526v-254h-526v-377h563v-256zM776 1227q-166 0 -252 -125.5t-86 -368.5q0 -244 86 -368.5t250 -124.5q65 0 126 10.5 t99 28.5v907q-35 19 -101.5 30t-121.5 11z" />
+<glyph unicode="&#x153;" horiz-adv-x="2003" d="M1446 -20q-271 0 -420 155q-141 -155 -391 -155q-162 0 -286 70t-190.5 202t-66.5 309q0 277 141.5 427.5t399.5 150.5q112 0 212 -39.5t171 -116.5q144 156 383 156q244 0 380 -135t136 -373v-148h-746v-8q7 -127 81.5 -197.5t207.5 -70.5q107 0 200 21t193 67v-236 q-81 -39 -175.5 -59t-229.5 -20zM403 561q0 -166 54.5 -251t177.5 -85q122 0 175.5 84.5t53.5 251.5q0 166 -54 249t-177 83q-122 0 -176 -82.5t-54 -249.5zM1405 922q-94 0 -156 -57.5t-71 -178.5h450q-2 111 -60.5 173.5t-162.5 62.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1278" d="M0 0zM639 860l305 602h334l-485 -893v-569h-308v559l-485 903h336zM297 1743q0 65 37.5 100t101.5 35q66 0 103.5 -37t37.5 -98q0 -60 -38 -96.5t-103 -36.5q-64 0 -101.5 35t-37.5 98zM700 1743q0 70 40.5 102.5t100.5 32.5q65 0 103.5 -36t38.5 -99q0 -61 -39 -97 t-103 -36q-60 0 -100.5 32.5t-40.5 100.5z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1243" d="M852 1241q-157 93 -234 176q-78 -81 -229 -176h-203v27q189 189 256 301h357q31 -52 107.5 -141.5t148.5 -159.5v-27h-203z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M842 1479q0 -108 -71 -174t-183 -66t-180 64t-68 174q0 108 67.5 172.5t180.5 64.5q110 0 182 -66t72 -169zM684 1477q0 45 -27 70.5t-69 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69 26t27 71z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1243" d="M457 1346q-31 0 -59.5 -26.5t-41.5 -80.5h-149q11 145 82.5 227t189.5 82q41 0 80.5 -16.5t78 -36t75.5 -35.5t73 -16q31 0 59.5 26t41.5 80h149q-11 -145 -83.5 -227t-188.5 -82q-41 0 -80.5 16.5t-78 36t-75.5 36t-73 16.5z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="659" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2011;" horiz-adv-x="659" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2012;" horiz-adv-x="659" d="M61 424v250h537v-250h-537z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M82 436v230h860v-230h-860z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M82 436v230h1884v-230h-1884z" />
+<glyph unicode="&#x2018;" horiz-adv-x="444" d="M39 961l-14 22q22 91 72.5 228.5t103.5 250.5h219q-66 -267 -101 -501h-280z" />
+<glyph unicode="&#x2019;" horiz-adv-x="444" d="M406 1462l14 -22q-50 -197 -176 -479h-219q69 296 100 501h281z" />
+<glyph unicode="&#x201a;" horiz-adv-x="596" d="M459 215q-52 -202 -176 -479h-220q65 266 101 502h280z" />
+<glyph unicode="&#x201c;" horiz-adv-x="911" d="M492 983q22 91 72.5 228.5t103.5 250.5h219q-66 -267 -101 -501h-280zM25 983q22 91 72.5 228.5t103.5 250.5h219q-66 -267 -101 -501h-280z" />
+<glyph unicode="&#x201d;" horiz-adv-x="911" d="M420 1440q-50 -197 -176 -479h-219q69 296 100 501h281zM887 1440q-50 -197 -176 -479h-219q69 296 100 501h280z" />
+<glyph unicode="&#x201e;" horiz-adv-x="1061" d="M459 215q-52 -202 -176 -479h-220q65 266 101 502h280zM926 215q-52 -202 -176 -479h-220q65 266 101 502h280z" />
+<glyph unicode="&#x2022;" horiz-adv-x="770" d="M98 748q0 154 74 235.5t213 81.5q137 0 212 -82t75 -235q0 -152 -75.5 -235t-211.5 -83q-138 0 -212.5 83t-74.5 235z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1751" d="M117 143q0 84 45 127t131 43q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5zM700 143q0 84 45 127t132 43q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-85 0 -131 44.5t-46 125.5zM1284 143q0 84 45 127t131 43 q83 0 128.5 -44t45.5 -126q0 -79 -46 -124.5t-128 -45.5q-84 0 -130 44.5t-46 125.5z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="754" d="M82 573l371 455l219 -119l-279 -348l279 -348l-219 -119l-371 453v26z" />
+<glyph unicode="&#x203a;" horiz-adv-x="754" d="M672 547l-371 -453l-219 119l278 348l-278 348l219 119l371 -455v-26z" />
+<glyph unicode="&#x2044;" horiz-adv-x="266" d="M657 1462l-811 -1462h-239l811 1462h239z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="776" d="M758 737h-125v-151h-238v151h-383v154l385 577h236v-563h125v-168zM395 905v164q0 86 6 184q-9 -26 -35.5 -80t-41.5 -77l-127 -191h198z" />
+<glyph unicode="&#x20ac;" d="M803 1225q-122 0 -201 -70.5t-102 -204.5h403v-176h-418l-2 -35v-47l2 -33h355v-178h-338q51 -243 321 -243q143 0 275 57v-256q-116 -59 -293 -59q-245 0 -403 133t-199 368h-137v178h118q-4 23 -4 62l2 53h-116v176h133q37 242 199 382.5t405 140.5q188 0 352 -82 l-98 -232q-69 31 -129 48.5t-125 17.5z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1534" d="M381 741h-168v572h-197v149h564v-149h-199v-572zM956 741l-165 529h-7l4 -111v-418h-163v721h247l160 -510l170 510h240v-721h-168v408l4 121h-6l-174 -529h-142z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1120" d="M0 1120h1120v-1120h-1120v1120z" />
+<glyph horiz-adv-x="1296" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-Bold-webfont.woff b/docs/fonts/OpenSans-Bold-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..1205787b0ed50db71ebd4f8a7f85d106721ff258
GIT binary patch
literal 22432
zcmZsB1B@t5u<qKnZQHhO+qQSl+I!Y#ZQHhO+qV7o&&^BTOYTg*RM*#4J=HTwO-)a`
z%ZrHt00R6T>bU^O|H%}V|Iz<z|Nn=Wn2Ia_0AT4ai}N3hRTkvLMMTAZxxrr@?-vAs
zH~=8x3i8Uo+#vt}NC5x<WHzl6x{$cCst^DGSop8apI?;b8ii-eE7LOp0D!~%>IVNI
zUovCM*w)bDm$Uix&jbJf0&20h={9zAA^05!;@9Ta9)O418En_g!QA$j<N3YD`>%|T
zg7y+LH+25>h2!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uv3PE
zaw_OSPkPatKJ=v@PF(b-5;q<OFpxnEW(Y$W#&AY3l2MFi3}YF`cqTBBNla!6Q<=te
zW-yZ~F>sKztm7)X`M`R%vxPkz=8(j&nYXNAml(ywHZil28@!iT_Hu+@{Ny(WIL2LW
zbDUYsW(U>Wr-nP+<1r6-$Rj?6zxRwMJmmyFez235Jm&>|KJ%4L%pt&B=21%>`>1C=
z4FqW<!~zzwh)*nL2~8|zIm@`nepa%ARjlR<-?+ppPI8LNyyhKmBu?TbK@ufNk|jk_
zB~8*LLoy{xvN_Ee&U1mAoaG$1*uYWA;TqSuBDs<$`D~Q}DU>29mJ%s7`f8gR{F*6L
z7qD0?l@Xm5rOI8p(yFv8E1K2AjY>_aE3HbK(ylC1I+W$gfAgFXH8oe$;=BQ0C|FZn
z)##6ubWcRP(qS{WL&5sy#I5%6xFY+6)s<GI&D?UfuIqmRehj8z086+4$WmCb0RfI#
zxd;FV0AnDq0V71P10!&-7eyc-OSk|IQA@A}Q(9QCG#jueSzu-$id9&!0wrOv0YzgY
zVz2@uM6wG31}d@)1_mm!6b1$=S+WEu2}M#wvJ40ZDzOFuM6o0Rh*4OuK!{ke1_MN~
oCIN_1ShxfLh*+@(0Yq6@Sy{LN|Anvwjj;s)L;wL%uV`KX0H0WG3IG5A

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.eot b/docs/fonts/OpenSans-BoldItalic-webfont.eot
new file mode 100644
index 0000000000000000000000000000000000000000..1f639a15ff3cc66d3b22b55a7f28a8cf0d821b03
GIT binary patch
literal 20133
zcmZ^KWlS8-7wzt1i!bi5xVsd0cXuxoDem6IT^4tDcW;ZkTk+yv97+pq-|zqNCGXwI
z<Rtf;xtR|)nPlcng*pH*tOfvp{u_vZ{}3IFjDUm)0wDr{{UE@9IaSRY5Ma*)3Xo*_
zkN;m30Rhne;WsTEm;d4a9k>7ufE&OT;PRhH2VnIddj2OM1V{s10Zss$|FTK|umAE+
z00+SP{}^I`{(owZ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ldItalic-webfont.svg b/docs/fonts/OpenSans-BoldItalic-webfont.svg
new file mode 100644
index 0000000..6a2607b
--- /dev/null
+++ b/docs/fonts/OpenSans-BoldItalic-webfont.svg
@@ -0,0 +1,1830 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sansbold_italic" horiz-adv-x="1128" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1352" d="M0 0zM-45 -492q-104 0 -174 25v242q61 -21 115 -21q61 0 107 40t65 130l204 965h-163l30 145l183 84l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49l-80 -224q-69 31 -133 31q-57 0 -92 -40t-47 -105l-12 -62h219l-49 -229h-220l-215 -1010q-77 -371 -403 -371z M1065 1380q0 87 47.5 131.5t134.5 44.5q73 0 111 -31t38 -89q0 -80 -44 -129.5t-136 -49.5q-151 0 -151 123zM1081 0h-301l237 1118h301z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1352" d="M0 0zM-45 -492q-104 0 -174 25v242q61 -21 115 -21q61 0 107 40t65 130l204 965h-163l30 145l183 84l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49l-80 -224q-69 31 -133 31q-57 0 -92 -40t-47 -105l-12 -62h219l-49 -229h-220l-215 -1010q-77 -371 -403 -371z M1081 0h-301l330 1556h301z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="2048" d="M-45 -492q-104 0 -174 25v242q61 -21 115 -21q61 0 107 40t65 130l204 965h-163l30 145l183 84l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49l-80 -224q-69 31 -133 31q-57 0 -92 -40t-47 -105l-12 -62h395l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49 l-79 -224q-69 31 -134 31q-57 0 -91.5 -40t-47.5 -105l-12 -62h219l-49 -229h-219l-215 -1010q-77 -371 -404 -371q-104 0 -174 25v242q61 -21 115 -21q136 0 172 170l205 965h-396l-215 -1010q-77 -371 -403 -371zM1778 0h-301l237 1118h301zM1761 1380q0 87 48 131.5 t135 44.5q73 0 111 -31t38 -89q0 -80 -44 -129.5t-136 -49.5q-152 0 -152 123z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="2048" d="M-45 -492q-104 0 -174 25v242q61 -21 115 -21q61 0 107 40t65 130l204 965h-163l30 145l183 84l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49l-80 -224q-69 31 -133 31q-57 0 -92 -40t-47 -105l-12 -62h395l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49 l-79 -224q-69 31 -134 31q-57 0 -91.5 -40t-47.5 -105l-12 -62h219l-49 -229h-219l-215 -1010q-77 -371 -404 -371q-104 0 -174 25v242q61 -21 115 -21q136 0 172 170l205 965h-396l-215 -1010q-77 -371 -403 -371zM1778 0h-301l329 1556h301z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="586" d="M391 485h-241l157 977h340zM25 115q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5z" />
+<glyph unicode="&#x22;" horiz-adv-x="928" d="M549 1462l-152 -528h-196l71 528h277zM954 1462l-151 -528h-199l74 528h276z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M1036 846l-69 -232h258l-19 -206h-297l-116 -408h-220l117 408h-194l-115 -408h-215l113 408h-238l18 206h277l70 232h-252l18 209h289l119 407h217l-117 -407h199l116 407h215l-116 -407h239l-18 -209h-279zM553 614h197l69 232h-196z" />
+<glyph unicode="$" d="M1034 496q0 -184 -125.5 -291.5t-367.5 -124.5l-39 -199h-140l44 201q-209 12 -355 86v266q198 -107 404 -117l71 322q-163 61 -241 151t-78 214q0 173 127 279.5t350 121.5l35 151h139l-33 -151q166 -22 295 -90l-106 -232q-132 65 -242 74l-63 -299q131 -51 195 -99.5 t97 -113t33 -149.5zM594 322q63 9 102 45t39 98q0 46 -24.5 75.5t-59.5 43.5zM633 1157q-62 -7 -96.5 -41t-34.5 -94q0 -79 80 -111z" />
+<glyph unicode="%" horiz-adv-x="1753" d="M518 1274q-63 0 -110.5 -128.5t-47.5 -277.5q0 -96 56 -96q65 0 112 131t47 275q0 96 -57 96zM821 1165q0 -166 -56 -310t-151 -217t-217 -73q-139 0 -210.5 83.5t-71.5 236.5q0 169 55.5 311.5t148.5 214.5t216 72q137 0 211.5 -80t74.5 -238zM1554 1462l-1083 -1462 h-240l1088 1462h235zM1376 690q-39 0 -75 -56t-59 -154t-23 -195t55 -97q41 0 77 55t59.5 154.5t23.5 196.5q0 96 -58 96zM1679 590q0 -167 -54 -313.5t-148 -220.5t-215 -74q-144 0 -216.5 78.5t-72.5 222.5q0 177 53 322.5t148 219.5t219 74q137 0 211.5 -78.5 t74.5 -230.5z" />
+<glyph unicode="&#x26;" horiz-adv-x="1450" d="M1325 0h-350l-72 98q-175 -118 -403 -118q-209 0 -320.5 97.5t-111.5 280.5q0 145 78.5 248.5t273.5 200.5q-76 130 -76 258q0 195 117.5 307.5t316.5 112.5q169 0 266 -82.5t97 -224.5q0 -280 -365 -426l195 -263q44 57 80.5 121.5t78.5 173.5h300q-133 -313 -310 -497z M541 623q-88 -51 -123 -104.5t-35 -131.5q0 -65 45.5 -108t116.5 -43q115 0 221 59zM662 920q113 59 155.5 111t42.5 112q0 57 -30 82.5t-70 25.5q-66 0 -102.5 -46.5t-36.5 -119.5q0 -46 12 -92t29 -73z" />
+<glyph unicode="'" horiz-adv-x="522" d="M549 1462l-152 -528h-196l71 528h277z" />
+<glyph unicode="(" horiz-adv-x="694" d="M74 281q0 339 122.5 626.5t381.5 554.5h262q-255 -278 -377.5 -573.5t-122.5 -618.5q0 -308 117 -594h-234q-149 266 -149 605z" />
+<glyph unicode=")" horiz-adv-x="694" d="M618 858q0 -342 -124 -630.5t-379 -551.5h-262q499 545 499 1192q0 307 -116 594h233q149 -264 149 -604z" />
+<glyph unicode="*" horiz-adv-x="1116" d="M885 1522l-113 -353l387 29l-18 -254l-338 43l160 -336l-246 -73l-90 337l-197 -278l-207 164l275 248l-326 92l86 237l338 -174l33 369z" />
+<glyph unicode="+" d="M475 612h-366v219h366v369h219v-369h367v-219h-367v-364h-219v364z" />
+<glyph unicode="," horiz-adv-x="569" d="M377 238l8 -23q-118 -255 -262 -479h-225q74 167 194 502h285z" />
+<glyph unicode="-" horiz-adv-x="659" d="M41 424l53 250h524l-53 -250h-524z" />
+<glyph unicode="." horiz-adv-x="584" d="M25 115q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5z" />
+<glyph unicode="/" horiz-adv-x="862" d="M1014 1462l-809 -1462h-295l809 1462h295z" />
+<glyph unicode="0" d="M1110 1012q0 -470 -168.5 -751t-472.5 -281q-198 0 -300.5 122t-102.5 365q0 297 84 537t228 360.5t333 120.5q399 0 399 -473zM684 1235q-80 0 -149.5 -104t-117.5 -302t-48 -368q0 -115 27.5 -173.5t97.5 -58.5q81 0 150.5 106t116 301t46.5 386q0 111 -30.5 162 t-92.5 51z" />
+<glyph unicode="1" d="M688 0h-305l180 829q35 152 76 287q-9 -8 -61.5 -47t-262.5 -170l-133 215l566 348h249z" />
+<glyph unicode="2" d="M913 0h-962l43 213l477 424q180 159 248.5 254.5t68.5 179.5q0 75 -41 114.5t-110 39.5q-66 0 -135.5 -33.5t-171.5 -118.5l-146 203q132 112 252 159.5t250 47.5q190 0 301 -98t111 -259q0 -107 -41 -201t-122.5 -188t-266.5 -245l-269 -222v-10h568z" />
+<glyph unicode="3" d="M1104 1149q0 -156 -94.5 -262t-261.5 -135v-4q131 -26 198.5 -106.5t67.5 -201.5q0 -133 -74 -238t-212 -163.5t-327 -58.5q-239 0 -387 79v267q84 -50 182 -75.5t191 -25.5q158 0 243 63.5t85 176.5q0 172 -258 172h-138l46 221h73q167 0 263 62t96 172q0 67 -43 104 t-121 37q-134 0 -287 -100l-127 204q124 81 232.5 113.5t246.5 32.5q190 0 298 -90.5t108 -243.5z" />
+<glyph unicode="4" d="M1028 303h-170l-63 -303h-293l63 303h-590l48 234l770 925h311l-195 -919h170zM616 543l58 248q12 58 40 164t42 141h-6q-35 -63 -132 -181l-313 -372h311z" />
+<glyph unicode="5" d="M623 922q183 0 289 -103t106 -287q0 -167 -71.5 -292t-208.5 -192.5t-330 -67.5q-117 0 -218.5 23t-162.5 58v269q174 -99 352 -99q154 0 241 71t87 194q0 94 -57.5 141t-166.5 47q-102 0 -213 -33l-104 78l207 733h755l-55 -262h-489l-88 -293q72 15 127 15z" />
+<glyph unicode="6" d="M88 469q0 202 61 395.5t167.5 335t256.5 213.5t357 72q125 0 223 -27l-51 -246q-84 25 -191 25q-194 0 -313.5 -108t-185.5 -345h4q115 166 311 166q157 0 242.5 -97t85.5 -273q0 -169 -71 -313.5t-190.5 -215.5t-277.5 -71q-212 0 -320 127t-108 362zM530 227 q99 0 161.5 94t62.5 236q0 71 -33.5 113.5t-102.5 42.5q-60 0 -114.5 -35.5t-87.5 -95.5t-33 -160q0 -91 40 -143t107 -52z" />
+<glyph unicode="7" d="M78 0l737 1202h-629l56 260h975l-41 -194l-752 -1268h-346z" />
+<glyph unicode="8" d="M721 1485q123 0 215.5 -42t141 -118t48.5 -174q0 -134 -80.5 -233.5t-230.5 -151.5q217 -141 217 -365q0 -122 -63.5 -218.5t-181 -149.5t-273.5 -53q-214 0 -336.5 100t-122.5 270q0 298 348 426q-165 132 -165 299q0 119 58 212.5t168 145.5t257 52zM582 643 q-116 -45 -173 -107t-57 -153q0 -81 50 -128.5t135 -47.5q93 0 147.5 53.5t54.5 138.5q0 73 -36.5 131.5t-120.5 112.5zM694 1260q-76 0 -121 -46.5t-45 -119.5q0 -132 123 -201q185 72 185 221q0 68 -39.5 107t-102.5 39z" />
+<glyph unicode="9" d="M1092 1001q0 -280 -99 -533t-264 -370.5t-403 -117.5q-128 0 -240 32v256q111 -41 227 -41q121 0 207.5 49t144 138.5t99.5 257.5h-4q-111 -158 -295 -158q-163 0 -252.5 103.5t-89.5 285.5q0 166 73 305.5t196 208t286 68.5q203 0 308.5 -123t105.5 -361zM645 1237 q-65 0 -115.5 -42t-78 -114t-27.5 -153q0 -87 37.5 -131.5t105.5 -44.5q60 0 111.5 36.5t82 100t30.5 158.5q0 84 -35.5 137t-110.5 53z" />
+<glyph unicode=":" horiz-adv-x="584" d="M207 940q0 92 55.5 145.5t149.5 53.5q68 0 108.5 -38.5t40.5 -107.5q0 -86 -54.5 -140t-144.5 -54q-72 0 -113.5 36.5t-41.5 104.5zM25 115q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5z" />
+<glyph unicode=";" horiz-adv-x="584" d="M385 215q-118 -255 -262 -479h-225q74 167 194 502h285zM207 940q0 92 55.5 145.5t149.5 53.5q68 0 108.5 -38.5t40.5 -107.5q0 -86 -54.5 -140t-144.5 -54q-72 0 -113.5 36.5t-41.5 104.5z" />
+<glyph unicode="&#x3c;" d="M1061 203l-952 438v143l952 496v-240l-643 -317l643 -281v-239z" />
+<glyph unicode="=" d="M109 807v217h952v-217h-952zM109 418v219h952v-219h-952z" />
+<glyph unicode="&#x3e;" d="M109 442l643 281l-643 317v240l952 -496v-143l-952 -438v239z" />
+<glyph unicode="?" horiz-adv-x="940" d="M260 485l14 78q19 103 73.5 177t172.5 155q124 84 157.5 127t33.5 96q0 119 -133 119q-50 0 -106.5 -16t-201.5 -84l-92 221q230 125 445 125q177 0 280 -87.5t103 -244.5q0 -83 -28.5 -149.5t-82.5 -123t-190 -147.5q-64 -43 -96.5 -73t-52.5 -64.5t-38 -108.5h-258z M166 115q0 91 55 144.5t150 53.5q68 0 108.5 -38t40.5 -107q0 -87 -55 -141t-143 -54q-74 0 -115 38t-41 104z" />
+<glyph unicode="@" horiz-adv-x="1753" d="M1733 840q0 -173 -64 -321t-177.5 -231t-254.5 -83q-88 0 -144.5 38.5t-72.5 108.5h-6q-50 -77 -113 -112t-147 -35q-127 0 -198 79.5t-71 229.5q0 147 67.5 276.5t187.5 205t268 75.5q185 0 327 -55l-106 -420q-11 -44 -19 -76.5t-8 -64.5q0 -68 58 -68q66 0 124 64 t92.5 171t34.5 214q0 213 -123.5 325.5t-359.5 112.5q-203 0 -366.5 -94t-255 -266t-91.5 -392q0 -243 134 -380.5t376 -137.5q117 0 219.5 20t221.5 66v-186q-230 -90 -465 -90q-217 0 -378 85.5t-246 241.5t-85 359q0 279 120.5 497t343 341.5t497.5 123.5 q318 0 499 -163.5t181 -458.5zM995 889q-82 0 -145.5 -51.5t-100 -137t-36.5 -174.5q0 -65 24.5 -102t69.5 -37q141 0 213 270l57 222q-36 10 -82 10z" />
+<glyph unicode="A" horiz-adv-x="1286" d="M842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333z" />
+<glyph unicode="B" horiz-adv-x="1270" d="M788 1462q229 0 346 -81.5t117 -243.5q0 -150 -83 -247.5t-236 -129.5v-6q100 -26 159.5 -96.5t59.5 -180.5q0 -229 -153 -353t-423 -124h-522l309 1462h426zM545 883h149q121 0 181.5 48.5t60.5 139.5q0 137 -170 137h-152zM412 256h180q117 0 183.5 58t66.5 161 q0 162 -183 162h-165z" />
+<glyph unicode="C" horiz-adv-x="1253" d="M905 1227q-132 0 -237.5 -81t-169.5 -238.5t-64 -338.5q0 -167 68.5 -248t218.5 -81q146 0 338 77v-260q-199 -77 -400 -77q-254 0 -395 149.5t-141 423.5q0 262 104 482.5t278 335t400 114.5q125 0 222 -22.5t208 -82.5l-118 -250q-106 59 -175 78t-137 19z" />
+<glyph unicode="D" horiz-adv-x="1386" d="M1323 909q0 -280 -98 -486.5t-283.5 -314.5t-437.5 -108h-451l309 1462h396q270 0 417.5 -143t147.5 -410zM518 256q148 0 258 76t172 223.5t62 337.5q0 154 -72.5 234.5t-208.5 80.5h-115l-202 -952h106z" />
+<glyph unicode="E" horiz-adv-x="1110" d="M870 0h-817l309 1462h818l-54 -254h-512l-67 -321h477l-55 -254h-477l-80 -377h512z" />
+<glyph unicode="F" horiz-adv-x="1087" d="M358 0h-305l309 1462h814l-54 -254h-508l-79 -377h473l-56 -253h-473z" />
+<glyph unicode="G" horiz-adv-x="1413" d="M754 821h563l-162 -762q-134 -46 -248.5 -62.5t-242.5 -16.5q-259 0 -400 147t-141 422q0 268 107 484.5t301 334t448 117.5q218 0 410 -99l-115 -251q-74 40 -148 64t-161 24q-153 0 -273.5 -83t-189 -236.5t-68.5 -330.5q0 -172 72.5 -252.5t222.5 -80.5q76 0 170 24 l66 299h-267z" />
+<glyph unicode="H" horiz-adv-x="1434" d="M1135 0h-306l134 631h-471l-134 -631h-305l309 1462h306l-121 -573h471l121 573h305z" />
+<glyph unicode="I" horiz-adv-x="659" d="M53 0l312 1462h305l-312 -1462h-305z" />
+<glyph unicode="J" horiz-adv-x="678" d="M-135 -430q-94 0 -187 27v253q88 -20 164 -20q99 0 160.5 60.5t89.5 191.5l293 1380h305l-303 -1423q-52 -245 -175.5 -357t-346.5 -112z" />
+<glyph unicode="K" horiz-adv-x="1255" d="M1141 0h-338l-211 592l-125 -70l-109 -522h-305l309 1462h306l-152 -702l158 205l409 497h361l-594 -700z" />
+<glyph unicode="L" horiz-adv-x="1061" d="M53 0l309 1462h306l-256 -1206h512l-54 -256h-817z" />
+<glyph unicode="M" horiz-adv-x="1802" d="M838 369l551 1093h423l-309 -1462h-280l145 692q53 247 105 441h-5l-569 -1133h-281l-61 1133h-4q-11 -88 -38 -231t-187 -902h-275l309 1462h404l68 -1093h4z" />
+<glyph unicode="N" horiz-adv-x="1546" d="M1247 0h-342l-356 1106h-6l-4 -32q-32 -216 -66 -386l-145 -688h-275l309 1462h357l340 -1077h4q12 76 39 217t180 860h274z" />
+<glyph unicode="O" horiz-adv-x="1495" d="M1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246t56 357 q0 142 -65 219.5t-183 77.5z" />
+<glyph unicode="P" horiz-adv-x="1188" d="M522 774h56q142 0 223.5 69t81.5 185q0 180 -195 180h-74zM1190 1036q0 -241 -169.5 -378.5t-467.5 -137.5h-86l-109 -520h-305l309 1462h338q242 0 366 -106.5t124 -319.5z" />
+<glyph unicode="Q" horiz-adv-x="1495" d="M1432 938q0 -316 -122.5 -555.5t-334.5 -337.5l254 -393h-359l-178 328h-26q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87 t155.5 246t56 357q0 142 -65 219.5t-183 77.5z" />
+<glyph unicode="R" horiz-adv-x="1247" d="M530 813h78q131 0 204 57t73 174q0 82 -47.5 123t-149.5 41h-74zM477 561l-119 -561h-305l309 1462h359q237 0 356 -102t119 -299q0 -158 -83 -271.5t-239 -168.5l261 -621h-332l-207 561h-119z" />
+<glyph unicode="S" horiz-adv-x="1085" d="M946 432q0 -209 -148 -330.5t-401 -121.5q-221 0 -356 90v274q193 -108 358 -108q112 0 175 42.5t63 116.5q0 43 -13.5 75.5t-38.5 60.5t-124 102q-138 99 -194 196t-56 209q0 129 62 230.5t176.5 158t263.5 56.5q217 0 397 -99l-109 -233q-156 74 -288 74 q-83 0 -136 -45t-53 -119q0 -61 33 -106.5t148 -120.5q121 -80 181 -176.5t60 -225.5z" />
+<glyph unicode="T" horiz-adv-x="1087" d="M571 0h-305l254 1204h-352l55 258h1010l-55 -258h-353z" />
+<glyph unicode="U" horiz-adv-x="1415" d="M1434 1462l-201 -946q-57 -266 -218 -401t-419 -135q-212 0 -333.5 113.5t-121.5 307.5q0 72 15 138l196 923h305l-194 -919q-17 -74 -17 -125q0 -178 189 -178q123 0 195 76.5t104 228.5l194 917h306z" />
+<glyph unicode="V" horiz-adv-x="1208" d="M535 299q78 221 110 283l432 880h316l-748 -1462h-334l-127 1462h295l51 -880q4 -45 4 -133q-2 -103 -6 -150h7z" />
+<glyph unicode="W" horiz-adv-x="1831" d="M1006 1018q-46 -146 -115 -299l-324 -719h-338l-45 1462h287l6 -798q0 -52 -4 -173t-10 -174h6q22 64 67 180.5t60 145.5l369 819h270l21 -873q0 -146 -9 -272h6q43 129 131 349l330 796h309l-647 -1462h-346l-22 721l-2 139q0 88 4 158h-4z" />
+<glyph unicode="X" horiz-adv-x="1241" d="M1124 0h-331l-172 543l-396 -543h-342l576 764l-238 698h320l153 -518l363 518h344l-545 -725z" />
+<glyph unicode="Y" horiz-adv-x="1155" d="M627 870l374 592h342l-618 -903l-119 -559h-303l119 559l-236 903h312z" />
+<glyph unicode="Z" horiz-adv-x="1098" d="M920 0h-981l38 201l777 1005h-543l53 256h936l-41 -202l-782 -1004h596z" />
+<glyph unicode="[" horiz-adv-x="678" d="M436 -324h-473l381 1786h473l-45 -211h-215l-291 -1364h215z" />
+<glyph unicode="\" horiz-adv-x="862" d="M481 1462l224 -1462h-267l-217 1462h260z" />
+<glyph unicode="]" horiz-adv-x="678" d="M-92 -113h213l291 1364h-215l45 211h473l-381 -1786h-471z" />
+<glyph unicode="^" horiz-adv-x="1081" d="M20 520l619 950h147l277 -950h-223l-174 633l-402 -633h-244z" />
+<glyph unicode="_" horiz-adv-x="819" d="M635 -324h-821l30 140h822z" />
+<glyph unicode="`" horiz-adv-x="1135" d="M934 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="a" horiz-adv-x="1217" d="M406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44z" />
+<glyph unicode="b" horiz-adv-x="1219" d="M813 1139q146 0 230.5 -108t84.5 -298t-68 -367.5t-187 -281.5t-263 -104q-194 0 -276 163h-8l-58 -143h-231l330 1556h301l-62 -288q-41 -182 -84 -299h8q78 98 142.5 134t140.5 36zM692 895q-68 0 -130 -65t-102 -180.5t-40 -250.5q0 -80 37 -128t102 -48q67 0 128 69 t98.5 189.5t37.5 237.5q0 176 -131 176z" />
+<glyph unicode="c" horiz-adv-x="989" d="M506 -20q-201 0 -308.5 107.5t-107.5 303.5q0 212 74.5 385.5t209.5 268t308 94.5q182 0 328 -72l-92 -229q-54 23 -106 40t-118 17q-85 0 -153.5 -64t-107 -175.5t-38.5 -239.5q0 -96 45.5 -144.5t126.5 -48.5q76 0 141 23.5t134 58.5v-246q-152 -79 -336 -79z" />
+<glyph unicode="d" horiz-adv-x="1217" d="M406 -20q-147 0 -231.5 107t-84.5 300q0 196 71.5 374.5t188.5 278t258 99.5q82 0 141.5 -37t112.5 -127h8l2 28q6 110 25 195l76 358h301l-330 -1556h-229l14 145h-4q-71 -87 -148.5 -126t-170.5 -39zM532 223q66 0 128.5 68.5t100.5 182.5t38 245q0 80 -37.5 128 t-102.5 48q-68 0 -129.5 -72t-98 -190t-36.5 -234q0 -176 137 -176z" />
+<glyph unicode="e" horiz-adv-x="1141" d="M696 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95zM532 -20q-210 0 -326 113t-116 319q0 207 82.5 377.5t223.5 260t319 89.5q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-477 -101.5h-51l-2 -21v-20q0 -91 51.5 -143.5t147.5 -52.5 q87 0 158 19t172 67v-227q-172 -86 -390 -86z" />
+<glyph unicode="f" horiz-adv-x="764" d="M-45 -492q-104 0 -174 25v242q61 -21 115 -21q61 0 107 40t65 130l204 965h-163l30 145l183 84l18 84q41 190 138.5 277.5t273.5 87.5q131 0 235 -49l-80 -224q-69 31 -133 31q-57 0 -92 -40t-47 -105l-12 -62h219l-49 -229h-220l-215 -1010q-77 -371 -403 -371z" />
+<glyph unicode="g" horiz-adv-x="1108" d="M1186 1116l-35 -166l-174 -41q16 -52 16 -118q0 -195 -121 -308.5t-329 -113.5q-59 0 -99 10q-84 -27 -84 -78q0 -34 30 -49t89 -23l137 -18q163 -21 237.5 -84.5t74.5 -183.5q0 -211 -156 -323t-446 -112q-208 0 -324.5 75.5t-116.5 207.5q0 102 68.5 175.5t214.5 121.5 q-74 47 -74 133q0 71 44.5 122.5t146.5 98.5q-65 49 -96 112t-31 153q0 199 125.5 315.5t341.5 116.5q83 0 166 -23h395zM365 -6q-106 -14 -160.5 -57t-54.5 -109q0 -115 194 -115q151 0 228 45t77 127q0 39 -32.5 60t-137.5 35zM614 948q-77 0 -124.5 -76.5t-47.5 -191.5 q0 -119 103 -119q75 0 121.5 76.5t46.5 193.5t-99 117z" />
+<glyph unicode="h" horiz-adv-x="1237" d="M977 0h-301l137 653q16 68 16 119q0 123 -108 123q-92 0 -167 -114t-118 -318l-98 -463h-301l330 1556h301q-39 -181 -60 -278t-86 -309h8q62 77 138 123.5t176 46.5q138 0 213.5 -83.5t75.5 -238.5q0 -73 -23 -180z" />
+<glyph unicode="i" horiz-adv-x="608" d="M322 1380q0 87 47.5 131.5t134.5 44.5q73 0 111 -31t38 -89q0 -80 -44 -129.5t-136 -49.5q-151 0 -151 123zM338 0h-301l237 1118h301z" />
+<glyph unicode="j" horiz-adv-x="608" d="M-90 -492q-104 0 -174 25v242q61 -21 114 -21q137 0 173 170l253 1194h302l-265 -1239q-77 -371 -403 -371zM324 1380q0 87 47.5 131.5t134.5 44.5q73 0 111 -31t38 -89q0 -80 -44 -129.5t-136 -49.5q-151 0 -151 123z" />
+<glyph unicode="k" horiz-adv-x="1163" d="M920 1118h344l-498 -504l285 -614h-336l-183 420l-120 -72l-74 -348h-301l330 1556h301l-148 -694q-8 -41 -29 -117l-28 -102h4z" />
+<glyph unicode="l" horiz-adv-x="608" d="M338 0h-301l330 1556h301z" />
+<glyph unicode="m" horiz-adv-x="1853" d="M844 1139q219 0 262 -228h6q68 110 160.5 169t197.5 59q136 0 207.5 -85t71.5 -237q0 -76 -23 -180l-133 -637h-301l138 653q16 68 16 119q0 123 -98 123q-92 0 -166.5 -112t-118.5 -318l-96 -465h-301l137 653q16 68 16 119q0 123 -98 123q-92 0 -167 -114t-118 -318 l-98 -463h-301l237 1118h230l-21 -207h6q146 228 355 228z" />
+<glyph unicode="n" horiz-adv-x="1237" d="M977 0h-301l137 653q16 68 16 119q0 123 -108 123q-92 0 -167 -114t-118 -318l-98 -463h-301l237 1118h230l-21 -207h6q146 228 355 228q138 0 213.5 -83.5t75.5 -238.5q0 -73 -23 -180z" />
+<glyph unicode="o" horiz-adv-x="1198" d="M805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5q196 0 310 -118 t114 -325z" />
+<glyph unicode="p" horiz-adv-x="1219" d="M813 1139q146 0 230.5 -107.5t84.5 -300.5q0 -191 -68.5 -367.5t-187.5 -280t-262 -103.5q-83 0 -143 37t-111 126h-8q-12 -159 -43 -295l-72 -340h-301l342 1610h230l-17 -170h9q138 191 317 191zM692 895q-68 0 -131.5 -67.5t-102 -180t-38.5 -248.5q0 -80 37 -128 t102 -48q67 0 128 69t98.5 189.5t37.5 237.5q0 176 -131 176z" />
+<glyph unicode="q" horiz-adv-x="1217" d="M391 -20q-88 0 -156 47.5t-106.5 138.5t-38.5 219q0 198 72 377.5t189 278t257 98.5q86 0 152.5 -37.5t124.5 -126.5h8l57 143h232l-342 -1610h-301q47 218 73 337.5t84 304.5h-8q-72 -94 -143 -132t-154 -38zM535 223q64 0 127.5 70t100 181t36.5 245q0 80 -37.5 128 t-102.5 48q-68 0 -129.5 -72t-98 -190t-36.5 -234q0 -88 36.5 -132t103.5 -44z" />
+<glyph unicode="r" horiz-adv-x="862" d="M842 1139q59 0 96 -11l-66 -290q-45 16 -100 16q-116 0 -203.5 -91.5t-124.5 -262.5l-106 -500h-301l237 1118h230l-21 -207h6q147 228 353 228z" />
+<glyph unicode="s" horiz-adv-x="969" d="M829 369q0 -188 -124.5 -288.5t-346.5 -100.5q-107 0 -186.5 15t-148.5 50v248q157 -90 319 -90q80 0 131 32.5t51 88.5q0 43 -37 77t-131 86q-121 68 -169 135.5t-48 159.5q0 170 110.5 263.5t315.5 93.5q201 0 363 -95l-99 -215q-140 84 -258 84q-57 0 -92 -25.5 t-35 -68.5q0 -39 32 -68.5t120 -74.5q123 -63 178 -137t55 -170z" />
+<glyph unicode="t" horiz-adv-x="840" d="M514 223q65 0 162 35v-225q-111 -53 -266 -53q-150 0 -220.5 63t-70.5 195q0 50 12 112l115 539h-152l29 147l196 84l132 236h194l-49 -238h283l-50 -229h-282l-115 -539q-6 -30 -6 -53q0 -74 88 -74z" />
+<glyph unicode="u" horiz-adv-x="1237" d="M262 1118h301l-137 -653q-16 -68 -16 -119q0 -123 108 -123q92 0 167 114t118 318l98 463h301l-237 -1118h-230l21 207h-6q-145 -227 -355 -227q-138 0 -211 82.5t-73 238.5q0 93 24 213z" />
+<glyph unicode="v" horiz-adv-x="1049" d="M455 301q55 153 92 223l297 594h323l-604 -1118h-323l-138 1118h295l45 -586q7 -133 7 -231h6z" />
+<glyph unicode="w" horiz-adv-x="1614" d="M856 860q-62 -178 -123 -319l-233 -541h-324l-51 1118h281l4 -495l-4 -167l-7 -171h4q6 20 14 41.5t51 136.5t46 119l231 536h328v-536q0 -142 -10 -297h6l28 80q73 208 95 258l219 495h307l-530 -1118h-330l-6 520q0 155 10 340h-6z" />
+<glyph unicode="x" horiz-adv-x="1087" d="M379 573l-225 545h321l115 -334l244 334h354l-467 -561l244 -557h-326l-125 342l-264 -342h-350z" />
+<glyph unicode="y" horiz-adv-x="1063" d="M102 1118h295l56 -518q14 -122 14 -293h6q20 51 44 119.5t65 153.5l260 538h327l-680 -1278q-177 -332 -483 -332q-90 0 -147 19v240q68 -13 116 -13q84 0 147.5 48t117.5 149l26 49z" />
+<glyph unicode="z" horiz-adv-x="932" d="M748 0h-795l35 180l575 705h-397l51 233h750l-43 -200l-566 -685h439z" />
+<glyph unicode="{" horiz-adv-x="727" d="M201 319q0 140 -209 140l45 229q122 0 192.5 41.5t92.5 138.5l61 285q38 170 131 239.5t270 69.5h84l-49 -225q-90 -2 -130.5 -34.5t-55.5 -106.5l-66 -297q-45 -207 -276 -236v-8q85 -26 126.5 -82.5t41.5 -134.5q0 -44 -15 -113l-36 -178q-7 -28 -7 -51q0 -54 33.5 -74 t91.5 -20v-226h-53q-167 0 -253.5 63.5t-86.5 184.5q0 57 14 125l39 184q15 69 15 86z" />
+<glyph unicode="|" d="M455 1550h219v-2015h-219v2015z" />
+<glyph unicode="}" horiz-adv-x="727" d="M256 1462q340 0 340 -248q0 -56 -14 -124l-39 -185q-15 -69 -15 -86q0 -139 209 -139l-45 -229q-122 0 -192.5 -42t-91.5 -139l-62 -284q-37 -170 -130.5 -240t-270.5 -70h-45v226q93 3 137 35.5t59 105.5l66 297q25 111 95 166t181 69v9q-168 51 -168 217q0 43 15 112 l37 179q6 30 6 51q0 54 -36.5 74t-109.5 20l41 225h33z" />
+<glyph unicode="~" d="M342 672q-54 0 -116.5 -33t-116.5 -88v231q101 109 256 109q64 0 117 -14t139 -50q64 -27 111 -41t95 -14q51 0 112 30.5t122 90.5v-231q-103 -109 -256 -109q-59 0 -109 11.5t-147 51.5q-89 38 -127 47t-80 9z" />
+<glyph unicode="&#xa1;" horiz-adv-x="586" d="M182 606h242l-158 -977h-340zM549 977q0 -92 -55.5 -145.5t-149.5 -53.5q-68 0 -108.5 38t-40.5 108q0 85 54 139.5t144 54.5q73 0 114.5 -37t41.5 -104z" />
+<glyph unicode="&#xa2;" d="M575 -20h-188l49 210q-134 36 -203 136t-69 258q0 193 62.5 355t178 262.5t267.5 123.5l33 158h188l-35 -158q118 -14 225 -65l-92 -230q-53 23 -105 40t-118 17q-133 0 -216 -143t-83 -336q0 -96 45 -144t127 -48q75 0 140 23.5t134 58.5v-246q-136 -71 -299 -80z" />
+<glyph unicode="&#xa3;" d="M872 1485q195 0 369 -86l-113 -232q-141 68 -237 68q-75 0 -123 -39.5t-68 -132.5l-47 -229h299l-45 -220h-299l-18 -84q-42 -195 -209 -270h655l-55 -260h-993l49 246q196 48 244 264l22 104h-192l45 220h192l49 247q41 197 162 300.5t313 103.5z" />
+<glyph unicode="&#xa4;" d="M190 723q0 102 54 197l-129 127l147 147l127 -127q91 53 197 53q105 0 196 -55l127 129l150 -143l-129 -129q53 -89 53 -199q0 -107 -53 -199l125 -125l-146 -145l-127 125q-95 -51 -196 -51q-115 0 -199 51l-125 -123l-145 145l127 125q-54 93 -54 197zM397 723 q0 -77 54.5 -132.5t134.5 -55.5q81 0 136.5 55t55.5 133q0 80 -56.5 135t-135.5 55q-78 0 -133.5 -56t-55.5 -134z" />
+<glyph unicode="&#xa5;" d="M608 872l371 590h311l-506 -747h203l-39 -178h-252l-28 -138h252l-37 -178h-252l-47 -221h-291l47 221h-252l37 178h252l29 138h-252l39 178h196l-192 747h297z" />
+<glyph unicode="&#xa6;" d="M455 1550h219v-815h-219v815zM455 350h219v-815h-219v815z" />
+<glyph unicode="&#xa7;" horiz-adv-x="995" d="M150 760q0 89 47.5 163t154.5 142q-42 34 -70 84.5t-28 107.5q0 149 117 234.5t313 85.5q172 0 344 -88l-82 -193q-147 84 -282 84q-144 0 -144 -106q0 -43 40.5 -76t127.5 -72q242 -106 242 -303q0 -188 -193 -303q38 -35 64 -85.5t26 -108.5q0 -161 -126 -253.5 t-345 -92.5q-204 0 -336 75v224q172 -105 345 -105q99 0 144.5 35t45.5 92q0 39 -33 72.5t-127 79.5q-117 57 -181 131t-64 176zM506 967q-51 -25 -82 -70.5t-31 -99.5t43.5 -96.5t143.5 -88.5q49 31 75.5 78.5t26.5 95.5q0 109 -176 181z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1135" d="M397 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM799 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M932 1010q-111 0 -163 -73t-52 -214q0 -134 55.5 -203t159.5 -69q43 0 108.5 15.5t124.5 43.5v-191q-131 -57 -262 -57q-196 0 -307 122.5t-111 336.5q0 225 117.5 351t325.5 126q142 0 284 -72l-75 -174q-114 58 -205 58zM125 731q0 200 100 375t275 276t377 101 q199 0 373.5 -99t276 -275.5t101.5 -377.5q0 -199 -98.5 -373t-272.5 -276t-380 -102q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM266 731q0 -164 81.5 -305t224 -223t305.5 -82q167 0 308 83t221.5 223.5t80.5 303.5t-80.5 303.5t-222 223.5t-307.5 83 q-164 0 -306.5 -82.5t-223.5 -223.5t-81 -304z" />
+<glyph unicode="&#xaa;" horiz-adv-x="772" d="M369 752q-103 0 -160 70t-57 198q0 117 46 228t123 171t177 60q120 0 180 -103h6l39 90h154l-158 -702h-154l8 92h-2q-80 -104 -202 -104zM442 903q45 0 84 41.5t65.5 120t26.5 154.5q0 106 -88 106q-73 0 -123.5 -96t-50.5 -215q0 -111 86 -111z" />
+<glyph unicode="&#xab;" horiz-adv-x="1151" d="M72 569l401 463l191 -155l-279 -334l135 -350l-246 -103l-202 461v18zM559 569l402 463l190 -155l-279 -334l136 -350l-246 -103l-203 461v18z" />
+<glyph unicode="&#xac;" d="M1061 248h-219v364h-733v219h952v-583z" />
+<glyph unicode="&#xad;" horiz-adv-x="659" d="M41 424zM41 424l53 250h524l-53 -250h-524z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M1237 899q0 -86 -44 -149.5t-130 -96.5l197 -360h-254l-138 297h-67v-297h-230v874h308q173 0 265.5 -67.5t92.5 -200.5zM801 758h51q72 0 113 31t41 92q0 59 -35.5 88.5t-116.5 29.5h-53v-241zM125 731q0 200 100 375t275 276t377 101q199 0 373.5 -99t276 -275.5 t101.5 -377.5q0 -199 -98.5 -373t-272.5 -276t-380 -102q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM266 731q0 -164 81.5 -305t224 -223t305.5 -82q167 0 308 83t221.5 223.5t80.5 303.5t-80.5 303.5t-222 223.5t-307.5 83q-164 0 -306.5 -82.5t-223.5 -223.5t-81 -304z " />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M1030 1556h-1036l45 201h1036z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M164 1137q0 93 46.5 173.5t127.5 126.5t172 46q93 0 173.5 -47t126.5 -127t46 -172q0 -93 -46 -173t-126 -125.5t-174 -45.5q-93 0 -173 45t-126.5 125t-46.5 174zM354 1137q0 -63 45.5 -108.5t110.5 -45.5q66 0 111 46t45 108q0 63 -45.5 110t-110.5 47t-110.5 -47.5 t-45.5 -109.5z" />
+<glyph unicode="&#xb1;" d="M475 674h-366v219h366v369h219v-369h367v-219h-367v-365h-219v365zM109 0v219h952v-219h-952z" />
+<glyph unicode="&#xb2;" horiz-adv-x="776" d="M707 586h-648l35 166l273 219q111 91 141 122t44.5 59t14.5 56q0 42 -25.5 62t-60.5 20q-86 0 -188 -82l-100 158q74 57 156 87t192 30q123 0 196.5 -63t73.5 -160q0 -70 -22 -123t-70 -103.5t-189 -152.5l-129 -95h347z" />
+<glyph unicode="&#xb3;" horiz-adv-x="776" d="M813 1270q0 -87 -51 -145.5t-166 -88.5v-4q154 -33 154 -176q0 -131 -107 -209t-285 -78q-75 0 -145.5 15.5t-120.5 40.5v192q125 -72 254 -72q76 0 125 30.5t49 88.5q0 37 -26 62.5t-88 25.5h-127l34 160h90q84 0 132.5 28t48.5 85q0 40 -26 60t-71 20q-86 0 -188 -66 l-82 150q142 92 313 92q130 0 206.5 -55.5t76.5 -155.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1135" d="M483 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1249" d="M424 348q0 -60 31.5 -92.5t79.5 -32.5q90 0 162.5 106.5t117.5 319.5l98 469h301l-237 -1118h-229l18 176h-6q-117 -196 -266 -196q-51 0 -89.5 19.5t-58.5 47.5h-6q-8 -66 -21.5 -139t-82.5 -400h-304l342 1610h301l-135 -645q-16 -70 -16 -125z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1202 -260h-162v1616h-166v-1616h-161v819q-62 -18 -146 -18q-216 0 -318 125t-102 376q0 256 107.5 385t343.5 129h604v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="584" d="M131 553zM131 695q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5z" />
+<glyph unicode="&#xb8;" horiz-adv-x="420" d="M262 -250q0 -116 -83 -179t-234 -63q-86 0 -152 23v168q63 -23 125 -23q102 0 102 82q0 34 -31 56.5t-110 31.5l96 154h185l-39 -72q141 -49 141 -178z" />
+<glyph unicode="&#xb9;" horiz-adv-x="776" d="M528 1462h207l-186 -876h-246l84 397q24 109 55 207q-16 -15 -80 -60l-131 -81l-102 165z" />
+<glyph unicode="&#xba;" horiz-adv-x="754" d="M809 1194q0 -128 -48.5 -232.5t-132.5 -157t-196 -52.5q-134 0 -202 75t-68 211q0 197 104 319t277 122q129 0 197.5 -73.5t68.5 -211.5zM522 1315q-64 0 -107.5 -89.5t-43.5 -199.5q0 -111 80 -111q63 0 105 85.5t42 207.5q0 107 -76 107z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1151" d="M1079 535l-401 -463l-191 155l279 334l-135 350l246 103l202 -461v-18zM592 535l-402 -463l-190 155l279 334l-136 350l246 103l203 -461v-18z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1804" d="M97 0zM1500 1462l-1084 -1462h-239l1087 1462h236zM496 1462h207l-186 -876h-246l84 397q24 109 55 207q-16 -15 -80 -60l-131 -81l-102 165zM1573 152h-119l-32 -151h-238l33 151h-373l31 174l475 557h260l-121 -563h119zM1252 320l58 231l22 74q-13 -20 -43 -58 t-211 -247h174z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1804" d="M97 0zM1588 1h-648l35 166l273 219q111 91 141 122t44.5 59t14.5 56q0 42 -25.5 62t-60.5 20q-86 0 -188 -82l-100 158q74 57 156 87t192 30q123 0 196.5 -63t73.5 -160q0 -70 -22 -123t-70 -103.5t-189 -152.5l-129 -95h347zM496 1462h207l-186 -876h-246l84 397 q24 109 55 207q-16 -15 -80 -60l-131 -81l-102 165zM1500 1462l-1084 -1462h-239l1087 1462h236z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1804" d="M133 0zM1633 1462l-1084 -1462h-239l1087 1462h236zM1634 152h-119l-32 -151h-238l33 151h-373l31 174l475 557h260l-121 -563h119zM1313 320l58 231l22 74q-13 -20 -43 -58t-211 -247h174zM854 1270q0 -87 -51 -145.5t-166 -88.5v-4q154 -33 154 -176q0 -131 -107 -209 t-285 -78q-75 0 -145.5 15.5t-120.5 40.5v192q125 -72 254 -72q76 0 125 30.5t49 88.5q0 37 -26 62.5t-88 25.5h-127l34 160h90q84 0 132.5 28t48.5 85q0 40 -26 60t-71 20q-86 0 -188 -66l-82 150q142 92 313 92q130 0 206.5 -55.5t76.5 -155.5z" />
+<glyph unicode="&#xbf;" horiz-adv-x="940" d="M678 606l-14 -78q-19 -105 -76.5 -180t-169.5 -151q-122 -83 -156.5 -126t-34.5 -98q0 -118 133 -118q50 0 106.5 16t201.5 84l92 -221q-221 -125 -445 -125q-177 0 -280 87.5t-103 244.5q0 82 28.5 148.5t83.5 124t189 146.5q93 62 128 106.5t51 106.5l8 33h258z M772 977q0 -92 -55.5 -145.5t-149.5 -53.5q-68 0 -108.5 38t-40.5 108q0 86 54.5 140t143.5 54q73 0 114.5 -37t41.5 -104z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM965 1579h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM735 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM1235 1579h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z " />
+<glyph unicode="&#xc3;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM999 1579q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5 t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM516 1720q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM918 1720q0 78 42 118t120 40 q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1286" d="M0 0zM842 348h-473l-172 -348h-320l766 1468h373l147 -1468h-297zM827 608l-26 350q-10 131 -10 253v36q-44 -120 -109 -254l-188 -385h333zM1087 1567q0 -107 -70 -173.5t-184 -66.5q-110 0 -179 63.5t-69 174.5q0 109 68.5 173t179.5 64q110 0 182 -65t72 -170z M930 1565q0 45 -27.5 70.5t-69.5 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69.5 26t27.5 71z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1833" d="M1593 0h-817l74 348h-426l-219 -348h-328l922 1462h1104l-54 -254h-512l-67 -321h477l-55 -254h-478l-79 -377h512zM905 608l127 600h-80l-364 -600h317z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1253" d="M123 0zM905 1227q-132 0 -237.5 -81t-169.5 -238.5t-64 -338.5q0 -167 68.5 -248t218.5 -81q146 0 338 77v-260q-199 -77 -400 -77q-254 0 -395 149.5t-141 423.5q0 262 104 482.5t278 335t400 114.5q125 0 222 -22.5t208 -82.5l-118 -250q-106 59 -175 78t-137 19z M825 -250q0 -116 -83 -179t-234 -63q-86 0 -152 23v168q63 -23 125 -23q102 0 102 82q0 34 -31 56.5t-110 31.5l96 154h185l-39 -72q141 -49 141 -178z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1110" d="M53 0zM870 0h-817l309 1462h818l-54 -254h-512l-67 -321h477l-55 -254h-477l-80 -377h512zM906 1579h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1110" d="M53 0zM870 0h-817l309 1462h818l-54 -254h-512l-67 -321h477l-55 -254h-477l-80 -377h512zM608 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xca;" horiz-adv-x="1110" d="M53 0zM870 0h-817l309 1462h818l-54 -254h-512l-67 -321h477l-55 -254h-477l-80 -377h512zM1177 1579h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1110" d="M53 0zM870 0h-817l309 1462h818l-54 -254h-512l-67 -321h477l-55 -254h-477l-80 -377h512zM438 1720q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM840 1720q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5 t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xcc;" horiz-adv-x="659" d="M53 0zM53 0l312 1462h305l-312 -1462h-305zM667 1579h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xcd;" horiz-adv-x="659" d="M53 0zM53 0l312 1462h305l-312 -1462h-305zM414 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xce;" horiz-adv-x="659" d="M53 0zM53 0l312 1462h305l-312 -1462h-305zM937 1579h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xcf;" horiz-adv-x="659" d="M53 0zM53 0l312 1462h305l-312 -1462h-305zM222 1720q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM624 1720q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1386" d="M1323 909q0 -280 -98 -486.5t-283.5 -314.5t-437.5 -108h-451l125 596h-141l55 254h139l131 612h396q270 0 417.5 -143t147.5 -410zM518 256q148 0 258 76t172 223.5t62 337.5q0 154 -72.5 234.5t-208.5 80.5h-115l-75 -358h237l-55 -254h-238l-71 -340h106z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1546" d="M53 0zM1247 0h-342l-356 1106h-6l-4 -32q-32 -216 -66 -386l-145 -688h-275l309 1462h357l340 -1077h4q12 76 39 217t180 860h274zM1114 1579q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36 t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1495" d="M123 0zM1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246 t56 357q0 142 -65 219.5t-183 77.5zM1053 1579h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1495" d="M123 0zM1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246 t56 357q0 142 -65 219.5t-183 77.5zM753 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1495" d="M123 0zM1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246 t56 357q0 142 -65 219.5t-183 77.5zM1308 1579h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1495" d="M123 0zM1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246 t56 357q0 142 -65 219.5t-183 77.5zM1071 1579q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1495" d="M123 0zM1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q255 0 395 -144t140 -403zM872 1227q-121 0 -222 -91.5t-158.5 -251.5t-57.5 -347q0 -147 66.5 -222t187.5 -75t220.5 87t155.5 246 t56 357q0 142 -65 219.5t-183 77.5zM585 1720q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM987 1720q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xd7;" d="M428 723l-299 301l152 154l301 -299l305 299l153 -150l-305 -305l301 -303l-149 -152l-305 301l-301 -299l-150 152z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1495" d="M1432 938q0 -283 -99 -506.5t-271 -337.5t-396 -114q-180 0 -304 71l-108 -137l-154 115l121 151q-98 138 -98 357q0 265 99 487.5t273 341.5t402 119q182 0 305 -76l105 131l151 -117l-117 -145q91 -134 91 -340zM870 1233q-126 0 -229 -91.5t-160 -252.5t-57 -352 q0 -32 8 -101l596 754q-69 43 -158 43zM1133 930l-5 80l-589 -740q59 -37 153 -37q124 0 226 89t158.5 247.5t56.5 360.5z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1415" d="M141 0zM1434 1462l-201 -946q-57 -266 -218 -401t-419 -135q-212 0 -333.5 113.5t-121.5 307.5q0 72 15 138l196 923h305l-194 -919q-17 -74 -17 -125q0 -178 189 -178q123 0 195 76.5t104 228.5l194 917h306zM1002 1579h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311 q36 -148 115 -303v-25z" />
+<glyph unicode="&#xda;" horiz-adv-x="1415" d="M141 0zM1434 1462l-201 -946q-57 -266 -218 -401t-419 -135q-212 0 -333.5 113.5t-121.5 307.5q0 72 15 138l196 923h305l-194 -919q-17 -74 -17 -125q0 -178 189 -178q123 0 195 76.5t104 228.5l194 917h306zM757 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5 t-194 -158.5h-209v25z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1415" d="M141 0zM1434 1462l-201 -946q-57 -266 -218 -401t-419 -135q-212 0 -333.5 113.5t-121.5 307.5q0 72 15 138l196 923h305l-194 -919q-17 -74 -17 -125q0 -178 189 -178q123 0 195 76.5t104 228.5l194 917h306zM1284 1579h-198q-63 53 -162 168q-105 -88 -232 -168h-217 v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1415" d="M141 0zM1434 1462l-201 -946q-57 -266 -218 -401t-419 -135q-212 0 -333.5 113.5t-121.5 307.5q0 72 15 138l196 923h305l-194 -919q-17 -74 -17 -125q0 -178 189 -178q123 0 195 76.5t104 228.5l194 917h306zM565 1720q0 78 42.5 118t119.5 40q133 0 133 -108 q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM967 1720q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1155" d="M186 0zM627 870l374 592h342l-618 -903l-119 -559h-303l119 559l-236 903h312zM606 1604q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xde;" horiz-adv-x="1188" d="M1143 807q0 -243 -170.5 -378.5t-466.5 -135.5h-86l-62 -293h-305l309 1462h306l-50 -229h35q242 0 366 -106.5t124 -319.5zM475 547h55q139 0 222.5 66.5t83.5 185.5q0 180 -195 180h-74z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1350" d="M846 1567q208 0 331 -90t123 -240q0 -114 -49 -192t-178 -152q-73 -42 -96 -68.5t-23 -54.5q0 -23 22 -49.5t79 -69.5q107 -83 144.5 -150.5t37.5 -150.5q0 -170 -123.5 -270t-337.5 -100q-187 0 -297 61v240q128 -78 258 -78q101 0 148 33t47 86q0 40 -26.5 75 t-108.5 97q-94 72 -129 130t-35 126q0 84 45 145t162 127q66 37 104.5 76t38.5 96q0 62 -39.5 98.5t-124.5 36.5q-96 0 -156 -51.5t-85 -171.5l-254 -1219q-43 -198 -147 -288.5t-277 -90.5q-90 0 -160 25v242q61 -21 115 -21q133 0 170 178l254 1207q47 224 182 326 t385 102z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM869 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM598 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM1120 1240h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM884 1241q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM397 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM799 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1217" d="M90 0zM406 -20q-147 0 -231.5 106.5t-84.5 298.5q0 198 72 377.5t189 278t257 98.5q97 0 167.5 -42t109.5 -122h8l57 143h232l-238 -1118h-229l14 145h-4q-134 -165 -319 -165zM524 223q69 0 133 67t103 181.5t39 259.5q0 71 -38.5 117.5t-101.5 46.5q-68 0 -129.5 -72 t-98 -190t-36.5 -234q0 -88 33.5 -132t95.5 -44zM1023 1479q0 -107 -70 -173.5t-184 -66.5q-110 0 -179 63.5t-69 174.5q0 109 68.5 173t179.5 64q110 0 182 -65t72 -170zM866 1477q0 45 -27.5 70.5t-69.5 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69.5 26t27.5 71z " />
+<glyph unicode="&#xe6;" horiz-adv-x="1786" d="M1206 -20q-109 0 -179.5 27t-117.5 87l-16 -94h-188l14 145h-6q-71 -88 -146.5 -126.5t-167.5 -38.5q-146 0 -227.5 109t-81.5 296q0 200 68.5 375.5t185 277t258.5 101.5q96 0 160.5 -38.5t114.5 -125.5h6l57 143h188l-18 -90q44 49 120.5 80t168.5 31 q157 0 246.5 -83.5t89.5 -221.5q0 -187 -167 -288.5t-476 -101.5h-52l-2 -19v-19q0 -96 55.5 -147.5t159.5 -51.5q66 0 152 23t162 63v-227q-179 -86 -361 -86zM518 223q72 0 134 68t99 184.5t37 243.5q0 80 -33 128t-102 48q-68 0 -128 -69t-95 -185.5t-35 -241.5 q0 -84 32.5 -130t90.5 -46zM1341 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95z" />
+<glyph unicode="&#xe7;" horiz-adv-x="989" d="M90 0zM506 -20q-201 0 -308.5 107.5t-107.5 303.5q0 212 74.5 385.5t209.5 268t308 94.5q182 0 328 -72l-92 -229q-54 23 -106 40t-118 17q-85 0 -153.5 -64t-107 -175.5t-38.5 -239.5q0 -96 45.5 -144.5t126.5 -48.5q76 0 141 23.5t134 58.5v-246q-152 -79 -336 -79z M653 -250q0 -116 -83 -179t-234 -63q-86 0 -152 23v168q63 -23 125 -23q102 0 102 82q0 34 -31 56.5t-110 31.5l96 154h185l-39 -72q141 -49 141 -178z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1141" d="M90 0zM696 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95zM532 -20q-210 0 -326 113t-116 319q0 207 82.5 377.5t223.5 260t319 89.5q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-477 -101.5h-51l-2 -21v-20q0 -91 51.5 -143.5 t147.5 -52.5q87 0 158 19t172 67v-227q-172 -86 -390 -86zM849 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1141" d="M90 0zM696 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95zM532 -20q-210 0 -326 113t-116 319q0 207 82.5 377.5t223.5 260t319 89.5q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-477 -101.5h-51l-2 -21v-20q0 -91 51.5 -143.5 t147.5 -52.5q87 0 158 19t172 67v-227q-172 -86 -390 -86zM528 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xea;" horiz-adv-x="1141" d="M90 0zM696 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95zM532 -20q-210 0 -326 113t-116 319q0 207 82.5 377.5t223.5 260t319 89.5q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-477 -101.5h-51l-2 -21v-20q0 -91 51.5 -143.5 t147.5 -52.5q87 0 158 19t172 67v-227q-172 -86 -390 -86zM1101 1241h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1141" d="M90 0zM696 922q-88 0 -166 -80t-102 -195h45q155 0 241.5 48.5t86.5 131.5q0 95 -105 95zM532 -20q-210 0 -326 113t-116 319q0 207 82.5 377.5t223.5 260t319 89.5q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-477 -101.5h-51l-2 -21v-20q0 -91 51.5 -143.5 t147.5 -52.5q87 0 158 19t172 67v-227q-172 -86 -390 -86zM365 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM767 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xec;" horiz-adv-x="608" d="M37 0zM338 0h-301l237 1118h301zM579 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xed;" horiz-adv-x="608" d="M37 0zM338 0h-301l237 1118h301zM291 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xee;" horiz-adv-x="608" d="M36 0zM338 0h-301l237 1118h301zM845 1241h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xef;" horiz-adv-x="608" d="M37 0zM338 0h-301l237 1118h301zM126 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM528 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1182" d="M618 1309q-34 34 -124 80l118 186q134 -61 232 -139l237 131l76 -152l-192 -106q81 -107 113 -235t32 -279q0 -249 -69.5 -432.5t-203.5 -283t-323 -99.5q-216 0 -329 110t-113 316q0 165 64.5 301t180.5 212t265 76q83 0 151.5 -31t114.5 -94h6q-20 213 -117 310 l-231 -131l-88 147zM528 205q66 0 122.5 55.5t89 148.5t32.5 193q0 77 -38.5 122.5t-108.5 45.5q-73 0 -130 -53t-88.5 -143t-31.5 -197q0 -81 39 -126.5t114 -45.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1237" d="M37 0zM977 0h-301l137 653q16 68 16 119q0 123 -108 123q-92 0 -167 -114t-118 -318l-98 -463h-301l237 1118h230l-21 -207h6q146 228 355 228q138 0 213.5 -83.5t75.5 -238.5q0 -73 -23 -180zM909 1241q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28 t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1198" d="M90 0zM805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5 q196 0 310 -118t114 -325zM845 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311q36 -148 115 -303v-25z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1198" d="M90 0zM805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5 q196 0 310 -118t114 -325zM571 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1198" d="M90 0zM805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5 q196 0 310 -118t114 -325zM1109 1241h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1198" d="M90 0zM805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5 q196 0 310 -118t114 -325zM865 1241q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1198" d="M90 0zM805 696q0 197 -143 197q-75 0 -134.5 -61t-97 -179t-37.5 -243q0 -185 150 -185q75 0 135 61.5t93.5 171t33.5 238.5zM1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-195 0 -311.5 117.5t-116.5 312.5q0 213 71.5 379.5t206.5 258t316 91.5 q196 0 310 -118t114 -325zM386 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM788 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xf7;" d="M109 612v219h952v-219h-952zM444 373q0 76 37 113.5t103 37.5t102.5 -39t36.5 -112q0 -70 -37 -111t-102 -41t-102.5 39t-37.5 113zM444 1071q0 75 37 113.5t103 38.5q67 0 103 -40.5t36 -111.5q0 -70 -37 -110.5t-102 -40.5t-102.5 39t-37.5 112z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1198" d="M1108 696q0 -211 -70.5 -374t-203.5 -252.5t-316 -89.5q-123 0 -225 53l-109 -135l-141 108l119 148q-72 107 -72 256q0 213 71.5 379.5t206.5 258t316 91.5q131 0 227 -56l70 88l145 -110l-84 -105q66 -107 66 -260zM662 903q-81 0 -144.5 -62.5t-98 -169.5t-34.5 -233 v-12l365 453q-35 24 -88 24zM543 215q114 0 193 133t79 318v16l-358 -444q11 -8 35.5 -15.5t50.5 -7.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1237" d="M111 0zM262 1118h301l-137 -653q-16 -68 -16 -119q0 -123 108 -123q92 0 167 114t118 318l98 463h301l-237 -1118h-230l21 207h-6q-145 -227 -355 -227q-138 0 -211 82.5t-73 238.5q0 93 24 213zM845 1241h-184q-71 69 -138.5 153.5t-103.5 153.5v21h311 q36 -148 115 -303v-25z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1237" d="M111 0zM262 1118h301l-137 -653q-16 -68 -16 -119q0 -123 108 -123q92 0 167 114t118 318l98 463h301l-237 -1118h-230l21 207h-6q-145 -227 -355 -227q-138 0 -211 82.5t-73 238.5q0 93 24 213zM610 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209 v25z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1237" d="M111 0zM262 1118h301l-137 -653q-16 -68 -16 -119q0 -123 108 -123q92 0 167 114t118 318l98 463h301l-237 -1118h-230l21 207h-6q-145 -227 -355 -227q-138 0 -211 82.5t-73 238.5q0 93 24 213zM1143 1241h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25 q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1237" d="M111 0zM262 1118h301l-137 -653q-16 -68 -16 -119q0 -123 108 -123q92 0 167 114t118 318l98 463h301l-237 -1118h-230l21 207h-6q-145 -227 -355 -227q-138 0 -211 82.5t-73 238.5q0 93 24 213zM411 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5 t-121 -43.5q-135 0 -135 110zM813 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1063" d="M0 0zM102 1118h295l56 -518q14 -122 14 -293h6q20 51 44 119.5t65 153.5l260 538h327l-680 -1278q-177 -332 -483 -332q-90 0 -147 19v240q68 -13 116 -13q84 0 147.5 48t117.5 149l26 49zM497 1266q79 88 222 303h335v-17q-46 -56 -154 -152.5t-194 -158.5h-209v25z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1219" d="M813 1139q150 0 232.5 -106.5t82.5 -301.5q0 -199 -69 -381t-182 -276t-250 -94q-178 0 -271 163h-8q-12 -159 -43 -295l-72 -340h-301l435 2048h301l-66 -307q-29 -131 -80 -280h8q131 170 283 170zM682 895q-71 0 -130 -65t-95.5 -184.5t-36.5 -246.5q0 -80 33.5 -128 t105.5 -48q69 0 129 65t97.5 183.5t37.5 247.5q0 88 -37.5 132t-103.5 44z" />
+<glyph unicode="&#xff;" horiz-adv-x="1063" d="M0 0zM102 1118h295l56 -518q14 -122 14 -293h6q20 51 44 119.5t65 153.5l260 538h327l-680 -1278q-177 -332 -483 -332q-90 0 -147 19v240q68 -13 116 -13q84 0 147.5 48t117.5 149l26 49zM310 1382q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5 q-135 0 -135 110zM712 1382q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5q-135 0 -135 110z" />
+<glyph unicode="&#x131;" horiz-adv-x="608" d="M338 0h-301l237 1118h301z" />
+<glyph unicode="&#x152;" horiz-adv-x="1845" d="M1606 0h-760q-93 -20 -180 -20q-256 0 -399.5 147.5t-143.5 409.5q0 265 99 487.5t273 341.5t402 119q140 0 209 -23h809l-53 -254h-512l-68 -321h477l-55 -254h-477l-80 -377h512zM688 240q88 0 158 32l194 916q-62 39 -168 39q-121 0 -222 -91.5t-158.5 -251.5 t-57.5 -347q0 -147 66.5 -222t187.5 -75z" />
+<glyph unicode="&#x153;" horiz-adv-x="1806" d="M1198 -20q-116 0 -208 38.5t-138 106.5q-63 -68 -147 -106.5t-207 -38.5q-187 0 -297.5 117t-110.5 317q0 216 69 380.5t200 254.5t309 90q209 0 313 -160q154 160 399 160q177 0 276 -81.5t99 -223.5q0 -187 -167 -288.5t-476 -101.5h-51l-2 -21v-20q0 -91 51 -143.5 t147 -52.5q87 0 158 19t172 67v-227q-93 -46 -185.5 -66t-203.5 -20zM645 893q-71 0 -127 -60.5t-90.5 -176.5t-34.5 -242q0 -91 36.5 -140t109.5 -49q109 0 179 134.5t70 336.5q0 96 -37 146.5t-106 50.5zM1362 922q-88 0 -165.5 -78.5t-102.5 -196.5h45q155 0 241 48.5 t86 131.5q0 95 -104 95z" />
+<glyph unicode="&#x178;" horiz-adv-x="1155" d="M186 0zM627 870l374 592h342l-618 -903l-119 -559h-303l119 559l-236 903h312zM432 1720q0 78 42.5 118t119.5 40q133 0 133 -108q0 -73 -39 -116.5t-121 -43.5q-135 0 -135 110zM834 1720q0 78 42 118t120 40q65 0 99 -28t34 -80q0 -73 -39.5 -116.5t-120.5 -43.5 q-135 0 -135 110z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1135" d="M1120 1241h-198q-63 53 -162 168q-105 -88 -232 -168h-217v25q63 57 153 147t142 156h338q22 -54 74 -142.5t102 -160.5v-25z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M1034 1479q0 -107 -70 -173.5t-184 -66.5q-110 0 -179 63.5t-69 174.5q0 109 68.5 173t179.5 64q110 0 182 -65t72 -170zM877 1477q0 45 -27.5 70.5t-69.5 25.5t-69 -25.5t-27 -70.5t24 -71t72 -26q42 0 69.5 26t27.5 71z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1135" d="M866 1241q-49 0 -86.5 16.5t-69.5 36t-61.5 36t-62.5 16.5q-31 0 -55.5 -28t-38.5 -79h-177q59 309 281 309q49 0 87.5 -16.5t71.5 -36t62 -35.5t60 -16q34 0 58 25.5t46 80.5h172q-66 -309 -287 -309z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="659" d="M41 424l53 250h524l-53 -250h-524z" />
+<glyph unicode="&#x2011;" horiz-adv-x="659" d="M41 424l53 250h524l-53 -250h-524z" />
+<glyph unicode="&#x2012;" horiz-adv-x="659" d="M41 424l53 250h524l-53 -250h-524z" />
+<glyph unicode="&#x2013;" horiz-adv-x="983" d="M41 436l49 230h852l-49 -230h-852z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1966" d="M41 436l49 230h1835l-49 -230h-1835z" />
+<glyph unicode="&#x2018;" horiz-adv-x="440" d="M123 961l-8 22q103 227 262 479h225q-91 -213 -194 -501h-285z" />
+<glyph unicode="&#x2019;" horiz-adv-x="440" d="M586 1462l8 -22q-103 -227 -262 -479h-226q89 206 195 501h285z" />
+<glyph unicode="&#x201a;" horiz-adv-x="569" d="M377 238l8 -23q-103 -227 -262 -479h-225q88 207 194 502h285z" />
+<glyph unicode="&#x201c;" horiz-adv-x="887" d="M569 961l-8 22q103 227 262 479h226q-97 -227 -195 -501h-285zM123 961l-8 22q103 227 262 479h225q-91 -213 -194 -501h-285z" />
+<glyph unicode="&#x201d;" horiz-adv-x="887" d="M586 1462l8 -22q-103 -227 -262 -479h-226q89 206 195 501h285zM1032 1462l8 -22q-103 -227 -262 -479h-225q23 53 46.5 111t148.5 390h284z" />
+<glyph unicode="&#x201e;" horiz-adv-x="1018" d="M377 238l8 -23q-103 -227 -262 -479h-225q88 207 194 502h285zM825 238l9 -23q-100 -221 -263 -479h-225q24 57 49 118.5t146 383.5h284z" />
+<glyph unicode="&#x2022;" horiz-adv-x="739" d="M104 686q0 106 42.5 194t120 136.5t182.5 48.5q120 0 182.5 -67t62.5 -191q0 -177 -91.5 -277t-248.5 -100q-117 0 -183.5 67t-66.5 189z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1706" d="M25 0zM25 115q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5zM586 115q0 90 53.5 144t150.5 54q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5zM1147 115q0 90 53.5 144t150.5 54 q68 0 109 -38t41 -107q0 -87 -55 -141t-144 -54q-73 0 -114 37.5t-41 104.5z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="664" d="M72 569l401 463l191 -155l-279 -334l135 -350l-246 -103l-202 461v18z" />
+<glyph unicode="&#x203a;" horiz-adv-x="664" d="M592 535l-402 -463l-190 155l279 334l-136 350l246 103l203 -461v-18z" />
+<glyph unicode="&#x2044;" horiz-adv-x="256" d="M791 1462l-1084 -1462h-239l1087 1462h236z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="776" d="M776 737h-119l-32 -151h-238l33 151h-373l31 174l475 557h260l-121 -563h119zM455 905l58 231l22 74q-13 -20 -43 -58t-211 -247h174z" />
+<glyph unicode="&#x20ac;" d="M899 1237q-97 0 -176 -74.5t-135 -212.5h348l-39 -176h-360q-11 -34 -25 -115h299l-37 -178h-280q0 -120 44.5 -181.5t147.5 -61.5q133 0 283 63v-258q-126 -63 -330 -63q-446 0 -446 501h-152l37 178h127q9 67 22 115h-125l39 176h135q87 252 250.5 393.5t374.5 141.5 q100 0 179 -23t165 -80l-125 -223q-87 49 -131 63.5t-90 14.5z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1534" d="M471 741h-168v572h-197v149h564v-149h-199v-572zM1047 741l-166 529h-7l5 -111v-418h-164v721h248l159 -510l170 510h240v-721h-168v408l4 121h-6l-174 -529h-141z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1120" d="M0 1120h1120v-1120h-1120v1120z" />
+<glyph horiz-adv-x="1217" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.woff b/docs/fonts/OpenSans-BoldItalic-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..ed760c0628b6a0026041f5b8bba466a0471fd2e0
GIT binary patch
literal 23048
zcmZsC18^o?(C!;28{4*R+s4MWZQHh;Y;4=c#x^##ar4z*x9Z-izo(w+)6aCD(=$_Z
zX6j6jo4lA900{6SnvekG|8#os|JeVv|9=q^Q;`J#fXaVZod00t3i={0A}aR74gJ`7
zKOg|Y0f34t$SePFhX4R*5dZ*{OY4X(B(AI~1OR}C|M&#_pgi9&JXc<so(TYefcdd?
zf1qC|n^a_EV_^ToS^vam0|3Clt#;NuMy}2TKm9=d_%Qr{hguzc*VNw3=7;0>8RP9o
zCqzMe3Yr->{lvnt{P_Im`yUX@tUXMBI355%Xb=E!j7Ku=7Be?7Fa`h=e|7`@^JN2q
zNM$nrA%D34Y{DOqz)gX6ncFzK|8VL*d58l5AYC78bV=5BMn8Va`9JwB|6sTJe)7h~
z!2M@j)gNB~!G8cD1g^0)urc}J(tmu`e{wXneoxZ2w{vm^0Dk`f==G;RK#AwolD(tJ
zPprld0P+9fUWDkv&BX90XU!iI0RA7$qZDg@G|+#<6mQ||e|p?V^1t&9m|nvC<-TsD
zZ>+Ds3t|Wbj-YR-4?5r`Fa><f_;cLBKtD(0zFwUwE0ZjaG5Xy}bA@J;&|<L=XKqAM
zz|um=2-I>K0Vs)C0=rl@wBnb6$3m7g`Wx>q@OwcRc|qNB1RiTqRPjk40m`>okPgoi
z7dS*Y4q2`g!l>hOy06fc+9v6Eoc^Bant68A?-*ANQPSjW&McCZwRfceo&USTE3TsF
zV!K(Z*^BSfvX+f9H15vBW5@3vXRW)^s}|{t5<!_I8cGyttKX^Y>QwH~yqMk*{YrFU
zo<>IWq;M^9Y2JAp2qWSXsT02we>!!h_J!7w<x9JZD>sndeI5Sm`s_viR)r`-V&s`T
zaj5gTFFZ8_Oq$<%2v&_t&yiq=QvI<gbrnid-nqg#SL!;n;vLxT4^ywai>EAXe6SdA
zWvRE^^lP+cK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Ovmv$=bEmP+Gl@*^Z%cmyEa0)H004N}
zZO~P0({T{M@$YS2+qt{rPXGV5>xQ?i#oe93R)MjNjsn98u7Qy72Ekr{;2QJ+2yVei
z;2DR9!7Ft1#~YViKDl3Vm-`)2@VhyjUcCG-zJo+bG|?D{!H5YnvBVKi0*NG%ObV%_
zkxmAgWRXn{x#W>g0fiJ%ObMm5qBU)3OFP=rfsS;dGhOIPH@ag%L&u5@J7qX1r-B~z
zq!+#ELtpyg#6^E9apPeC0~y3%hA@<23}*x*8O3PEFqUzQX95$M#AK#0m1#_81~aJ=
z0|!~lI<B&t53FZ9TiC;44oM7~dCMAhiBU{!6EhpR!F!2iFGu)EGru^%G467k<IG|<
zJE-P9HQeDIk9ojD9`P}Jy=Oe(DJSspgPpwOIWO?@nXhbO4guyek6P;3M?LdtAV?!2
z7O;>-d}1+6XksbLS;j^7vyv68Vl`j*#wA{Hl2csfHSc&MaS|^Hk|;@%EGd#IX_77(
zk||k|&1ueXo(tUMEa$kz298P&*SO9V$(20GXR8!Qp%h86lt`)3SKHL!*G!?hfW=~|
zjOer|RqfK1R;688(V`x1RBB3HX;s>kc4e8;p)6Pao9B$EskxdK=MDHm!J6u-Mt|f<
z_e8WS9X5kI6s&J4+-e_>E3!{mU1?R?%zwYF>-rx~rl?c^002w40LW5Uu>k>&S-A)R
z2moUsumK}PumdA-uop!jAWOIa4pB?622)yCurwR6C|O`;Ac|F3umUAvumMG5BVw=u
zBSf+b0R}3v3<d@&vJ?geDp|4wC<#SUM6wJB2P&}!0YtGR0f<pput11du?7P~u_ghC
lQCPSH0Ek$z1_4A_Sy@@Q0sn=t1dXu;07L)*QLku<000joGHd_<

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Italic-webfont.eot b/docs/fonts/OpenSans-Italic-webfont.eot
new file mode 100644
index 0000000000000000000000000000000000000000..0c8a0ae06ed09f6a7be1b84defae7ccda65cc2e0
GIT binary patch
literal 20265
zcmZsBRZtvE(CxCgv$zL$cMI&|?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83gDSz
zYYgF%{*pSmvjy!}0sv=7VREtHp&u#doOr?!n_P$1-#P<Efo@{E{g_#oGQ(UHi1UQA
zq&!*-6J%i?lugto&kMuP&j)xfIX5se&3U#;t3)`oBFUnnlcP7`hztAEMNDtQZ>P0*
z*C<eZ;s%wxkZkBmikiioI5I>=Nt)|G#Tx13g+devX~lQXu}Fy32mOL&6~tz$=%CbY
z;IA!IiRt#ZMNBho0x?G)PHa;vXG>TT$m4_b#<Fc7#~OM|bD;9LavX!89NIQW|NUL}
c3pR|ZqsN9us*c9G)yL`(6B;oO(FbuIAPj;}PXGV_

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Italic-webfont.svg b/docs/fonts/OpenSans-Italic-webfont.svg
new file mode 100644
index 0000000..e1075dc
--- /dev/null
+++ b/docs/fonts/OpenSans-Italic-webfont.svg
@@ -0,0 +1,1830 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sansitalic" horiz-adv-x="1128" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1165" d="M0 0zM-104 -492q-69 0 -125 21v141q64 -22 112 -22q76 0 117 62t66 177l227 1082h-193l13 67l206 66l23 100q46 200 127.5 282.5t241.5 82.5q40 0 98 -11.5t90 -25.5l-43 -129q-76 29 -137 29q-87 0 -133.5 -48.5t-75.5 -177.5l-25 -108h238l-25 -127h-237l-232 -1098 q-39 -189 -120 -276t-213 -87zM870 0h-168l234 1096h168zM983 1376q0 56 32 91.5t83 35.5q88 0 88 -90q0 -55 -33.5 -93t-77.5 -38q-40 0 -66 24.5t-26 69.5z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1165" d="M0 0zM-104 -492q-69 0 -125 21v141q64 -22 112 -22q76 0 117 62t66 177l227 1082h-193l13 67l206 66l23 100q46 200 127.5 282.5t241.5 82.5q40 0 98 -11.5t90 -25.5l-43 -129q-76 29 -137 29q-87 0 -133.5 -48.5t-75.5 -177.5l-25 -108h238l-25 -127h-237l-232 -1098 q-39 -189 -120 -276t-213 -87zM868 0h-168l332 1556h168z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1815" d="M545 -492q-71 0 -125 21v141q61 -22 115 -22q68 0 111 57.5t69 181.5l227 1082h-481l-232 -1098q-39 -189 -120 -276t-213 -87q-69 0 -125 21v141q64 -22 112 -22q70 0 114 58t69 181l227 1082h-193l13 67l206 66l23 100q46 200 127.5 282.5t241.5 82.5q40 0 98 -11.5 t90 -25.5l-43 -129q-76 29 -137 29q-87 0 -133.5 -48.5t-75.5 -177.5l-25 -108h482l24 108q45 197 126 280t243 83q41 0 97.5 -11t92.5 -26l-45 -129q-76 29 -137 29q-89 0 -135 -51t-74 -175l-24 -108h239l-26 -127h-238l-231 -1098q-43 -195 -123.5 -279t-210.5 -84z M1522 0h-168l233 1096h168zM1634 1376q0 54 32 90.5t83 36.5q88 0 88 -90q0 -55 -33.5 -93t-77.5 -38q-38 0 -65 24.5t-27 69.5z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1815" d="M1520 0h-168l331 1556h168zM545 -492q-71 0 -125 21v141q61 -22 115 -22q68 0 111 57.5t69 181.5l227 1082h-481l-232 -1098q-39 -189 -120 -276t-213 -87q-69 0 -125 21v141q64 -22 112 -22q70 0 114 58t69 181l227 1082h-193l13 67l206 66l23 100q46 200 127.5 282.5 t241.5 82.5q40 0 98 -11.5t90 -25.5l-43 -129q-76 29 -137 29q-87 0 -133.5 -48.5t-75.5 -177.5l-25 -108h482l24 108q45 197 126 280t243 83q41 0 97.5 -11t92.5 -26l-45 -129q-76 29 -137 29q-89 0 -135 -51t-74 -175l-24 -108h239l-26 -127h-238l-231 -1098 q-43 -195 -123.5 -279t-210.5 -84z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="530" d="M555 1462l-274 -1059h-109q49 307 176 1059h207zM43 78q0 76 39.5 120t107.5 44q45 0 73 -27.5t28 -81.5q0 -68 -39 -115t-105 -47q-49 0 -76.5 28t-27.5 79z" />
+<glyph unicode="&#x22;" horiz-adv-x="791" d="M485 1462l-153 -528h-107l72 528h188zM834 1462l-154 -528h-107l72 528h189z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M1036 899l-98 -340h285l-13 -129h-309l-125 -430h-139l129 430h-303l-127 -430h-133l121 430h-261l13 129h284l101 340h-277l13 127h301l123 436h139l-125 -436h305l127 436h133l-125 -436h264l-12 -127h-291zM500 559h303l96 340h-303z" />
+<glyph unicode="$" d="M942 492q0 -162 -112.5 -263t-309.5 -123l-49 -225h-133l49 223q-195 14 -315 72v154q82 -41 175.5 -63.5t166.5 -22.5l98 452q-139 49 -201.5 123.5t-62.5 188.5q0 159 108 255t299 113l39 176h133l-39 -178q159 -12 283 -76l-63 -135q-121 63 -248 72l-94 -440 q149 -55 212.5 -125t63.5 -178zM549 250q107 13 170 75t63 154q0 54 -33 96t-114 74zM627 1235q-108 -11 -167 -69t-59 -156q0 -53 34.5 -97.5t107.5 -70.5z" />
+<glyph unicode="%" horiz-adv-x="1624" d="M1468 1462l-1085 -1462h-152l1086 1462h151zM1284 772q-67 0 -119.5 -64.5t-84 -188.5t-31.5 -240q0 -173 106 -173q65 0 117 65t86.5 198.5t34.5 236.5q0 166 -109 166zM1532 621q0 -107 -31.5 -236t-82 -217.5t-121 -138t-156.5 -49.5q-110 0 -171 74.5t-61 219.5 q0 166 50.5 318.5t136.5 228.5t200 76q116 0 176 -71.5t60 -204.5zM543 1358q-66 0 -119 -63t-85 -187.5t-32 -243.5q0 -172 107 -172q52 0 94 39.5t73.5 114t50.5 175t19 171.5q0 166 -108 166zM791 1206q0 -108 -32 -237.5t-82.5 -217.5t-120.5 -137t-157 -49 q-109 0 -170 75t-61 220q0 166 50.5 318.5t136.5 228.5t200 76q116 0 176 -72t60 -205z" />
+<glyph unicode="&#x26;" horiz-adv-x="1372" d="M737 1348q-105 0 -163 -60t-58 -170q0 -120 82 -235q139 71 191 110t83 85t31 104q0 77 -42.5 121.5t-123.5 44.5zM471 119q87 0 168 33t195 124l-306 433q-128 -67 -184 -116t-85.5 -107.5t-29.5 -131.5q0 -106 66.5 -170.5t175.5 -64.5zM66 342q0 148 90 257.5 t303 211.5q-103 165 -103 309q0 164 106 264.5t281 100.5q149 0 236.5 -79t87.5 -212q0 -78 -32.5 -137t-87.5 -108t-127.5 -90t-153.5 -83l278 -389q127 110 199 295h168q-101 -236 -283 -412l203 -270h-201l-117 166q-120 -100 -230 -143t-247 -43q-168 0 -269 96 t-101 266z" />
+<glyph unicode="'" horiz-adv-x="444" d="M485 1462l-153 -528h-107l72 528h188z" />
+<glyph unicode="(" horiz-adv-x="584" d="M82 272q0 339 120 627t384 563h157q-246 -270 -371.5 -570t-125.5 -618q0 -339 114 -598h-131q-147 266 -147 596z" />
+<glyph unicode=")" horiz-adv-x="584" d="M500 864q0 -341 -121.5 -629.5t-382.5 -558.5h-156q496 551 496 1188q0 341 -113 598h131q146 -269 146 -598z" />
+<glyph unicode="*" horiz-adv-x="1130" d="M854 1528l-123 -383l422 18l-8 -157l-393 47l180 -383l-166 -52l-113 406l-258 -344l-116 121l309 284l-373 109l55 154l371 -185l41 400z" />
+<glyph unicode="+" d="M516 651h-389v142h389v391h141v-391h390v-142h-390v-387h-141v387z" />
+<glyph unicode="," horiz-adv-x="492" d="M291 238l8 -23q-113 -235 -270 -479h-129q126 286 204 502h187z" />
+<glyph unicode="-" horiz-adv-x="639" d="M55 469l35 158h479l-34 -158h-480z" />
+<glyph unicode="." horiz-adv-x="518" d="M43 74q0 77 40.5 122.5t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77z" />
+<glyph unicode="/" horiz-adv-x="717" d="M893 1462l-813 -1462h-174l813 1462h174z" />
+<glyph unicode="0" d="M1092 1014q0 -295 -78.5 -539t-214 -369.5t-314.5 -125.5q-176 0 -270 127.5t-94 369.5q0 270 82 514.5t216.5 369t307.5 124.5q365 0 365 -471zM717 1341q-113 0 -209 -115.5t-155.5 -323t-59.5 -423.5q0 -172 50 -264t161 -92q115 0 209 114t150.5 328t56.5 453 q0 323 -203 323z" />
+<glyph unicode="1" d="M588 0h-172l196 913q59 261 88 359q-50 -53 -139 -111l-178 -110l-80 127l449 284h149z" />
+<glyph unicode="2" d="M911 0h-899l31 147l465 420q102 93 176.5 163.5t123 133t72 124t23.5 136.5q0 99 -60 157t-163 58q-77 0 -150.5 -28.5t-162.5 -96.5l-82 115q191 154 413 154q176 0 278.5 -88.5t102.5 -243.5q0 -111 -39.5 -204t-131 -197t-294.5 -281l-352 -307v-8h678z" />
+<glyph unicode="3" d="M1073 1159q0 -156 -101 -264.5t-280 -140.5v-9q124 -23 195 -106.5t71 -208.5q0 -133 -62 -234.5t-181 -158.5t-283 -57q-210 0 -385 79v164q94 -49 199 -75.5t190 -26.5q162 0 252 79.5t90 217.5q0 131 -79 198.5t-220 67.5h-131l31 143h139q165 0 274 87t109 227 q0 92 -58 146t-157 54q-80 0 -157 -27t-175 -93l-80 118q195 144 424 144q179 0 277 -87t98 -237z" />
+<glyph unicode="4" d="M1067 334h-233l-72 -334h-164l74 334h-656l29 158l834 978h196l-207 -983h232zM705 487q46 220 78 373t116 445h-8q-17 -29 -66.5 -96.5t-72.5 -96.5l-533 -625h486z" />
+<glyph unicode="5" d="M598 893q182 0 289.5 -104.5t107.5 -282.5q0 -161 -73 -283t-204 -182.5t-308 -60.5q-193 0 -330 79v164q164 -102 334 -102q191 0 298 96t107 268q0 126 -73.5 199.5t-204.5 73.5q-48 0 -97 -6.5t-139 -30.5l-74 57l197 684h668l-33 -153h-522l-127 -439q87 23 184 23z " />
+<glyph unicode="6" d="M133 424q0 209 60.5 415t163.5 351.5t246 219t327 73.5q111 0 184 -23l-35 -145q-68 22 -170 22q-212 0 -356.5 -149t-212.5 -443h8q59 79 146.5 126t193.5 47q154 0 244 -98.5t90 -270.5q0 -161 -66.5 -294.5t-180.5 -204t-261 -70.5q-182 0 -281.5 115t-99.5 329z M532 121q94 0 167.5 54t114 149t40.5 208q0 248 -221 248q-66 0 -128 -28.5t-110 -76t-72 -104.5t-24 -155q0 -137 60.5 -216t172.5 -79z" />
+<glyph unicode="7" d="M174 0l768 1313h-719l31 149h891l-27 -139l-764 -1323h-180z" />
+<glyph unicode="8" d="M741 1485q174 0 271.5 -86.5t97.5 -235.5q0 -129 -78 -225t-266 -176q127 -78 180 -165t53 -202q0 -122 -60 -217.5t-172.5 -146.5t-264.5 -51q-190 0 -298 98.5t-108 267.5q0 148 95 256t296 184q-95 69 -135.5 144.5t-40.5 171.5q0 111 54.5 198.5t153.5 136t222 48.5z M608 700q-185 -60 -261.5 -143.5t-76.5 -202.5q0 -107 69 -170t181 -63q139 0 222 74t83 196q0 99 -52 174t-165 135zM729 1341q-114 0 -182 -65.5t-68 -175.5q0 -82 39 -144t127 -116q161 60 228 131.5t67 173.5q0 90 -57.5 143t-153.5 53z" />
+<glyph unicode="9" d="M1067 1034q0 -194 -56 -406.5t-147.5 -360t-221.5 -217.5t-302 -70q-136 0 -242 34v158q134 -47 246 -47q202 0 327 141t189 441h-10q-51 -75 -132.5 -118.5t-180.5 -43.5q-169 0 -261 98.5t-92 288.5q0 153 64.5 280.5t180 199t259.5 71.5q180 0 279.5 -114.5 t99.5 -334.5zM682 1341q-150 0 -241 -113t-91 -290q0 -124 54.5 -190t162.5 -66q76 0 140 28.5t108.5 81.5t65 114t20.5 151q0 131 -59 207.5t-160 76.5z" />
+<glyph unicode=":" horiz-adv-x="518" d="M43 74q0 77 40.5 122.5t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77zM203 956q0 77 40 122.5t111 45.5q97 0 97 -104q0 -73 -41.5 -119.5t-106.5 -46.5q-46 0 -73 26.5t-27 75.5z" />
+<glyph unicode=";" horiz-adv-x="518" d="M291 238l8 -23q-113 -235 -270 -479h-129q126 286 204 502h187zM203 956q0 77 40 122.5t111 45.5q97 0 97 -104q0 -73 -41.5 -119.5t-106.5 -46.5q-46 0 -73 26.5t-27 75.5z" />
+<glyph unicode="&#x3c;" d="M1040 242l-919 422v98l919 479v-149l-747 -371l747 -328v-151z" />
+<glyph unicode="=" d="M127 858v139h920v-139h-920zM127 444v142h920v-142h-920z" />
+<glyph unicode="&#x3e;" d="M121 393l745 328l-745 371v149l919 -479v-98l-919 -422v151z" />
+<glyph unicode="?" horiz-adv-x="874" d="M260 403q22 130 72.5 213.5t165.5 174.5q128 100 168 144t63 94t23 112q0 93 -51.5 143.5t-147.5 50.5q-81 0 -155 -25.5t-140 -56.5l-61 129q92 51 192 76t182 25q167 0 259 -84t92 -238q0 -123 -65.5 -226.5t-225.5 -223.5q-125 -91 -169 -147.5t-67 -160.5h-135z M158 74q0 77 40 122.5t111 45.5q44 0 70.5 -26t26.5 -79q0 -73 -41.5 -119.5t-106.5 -46.5q-46 0 -73 26t-27 77z" />
+<glyph unicode="@" horiz-adv-x="1735" d="M1679 852q0 -179 -55 -324t-155 -227t-222 -82q-197 0 -213 184h-8q-111 -184 -291 -184q-115 0 -180.5 75.5t-65.5 209.5q0 157 68 284t188.5 199t260.5 72q65 0 127.5 -12t150.5 -48q-64 -242 -98 -368t-31 -172q0 -117 102 -117q78 0 141.5 67t100.5 183.5t37 243.5 q0 239 -128 367t-370 128q-228 0 -406.5 -107t-277 -295.5t-98.5 -416.5q0 -270 143.5 -418.5t409.5 -148.5q197 0 420 86v-127q-219 -90 -443 -90q-314 0 -494.5 184.5t-180.5 505.5q0 261 126.5 485.5t343.5 347.5t486 123q191 0 329 -75.5t210.5 -213.5t72.5 -319z M985 938q-94 0 -174 -55t-126 -153t-46 -212q0 -93 33 -134.5t98 -41.5q187 0 272 315l70 258q-63 23 -127 23z" />
+<glyph unicode="A" horiz-adv-x="1137" d="M813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394z" />
+<glyph unicode="B" horiz-adv-x="1225" d="M770 1462q432 0 432 -336q0 -141 -87 -238t-245 -126v-10q115 -32 176.5 -110.5t61.5 -188.5q0 -212 -152 -332.5t-407 -120.5h-463l309 1462h375zM434 836h248q156 0 249 73t93 199q0 104 -66.5 155.5t-209.5 51.5h-211zM287 145h266q181 0 278 80.5t97 227.5 q0 116 -74.5 177.5t-214.5 61.5h-236z" />
+<glyph unicode="C" horiz-adv-x="1198" d="M942 1331q-174 0 -311.5 -97t-218 -284.5t-80.5 -408.5q0 -187 97.5 -298.5t268.5 -111.5q139 0 322 57v-149q-86 -31 -164 -45t-188 -14q-242 0 -380 149.5t-138 407.5q0 261 105.5 485.5t283.5 342.5t403 118q197 0 348 -80l-69 -141q-138 69 -279 69z" />
+<glyph unicode="D" horiz-adv-x="1364" d="M1300 877q0 -261 -105 -461t-300 -308t-457 -108h-352l309 1462h342q276 0 419.5 -149.5t143.5 -435.5zM449 147q202 0 355 91.5t234.5 258.5t81.5 382t-103 325.5t-302 110.5h-178l-250 -1168h162z" />
+<glyph unicode="E" horiz-adv-x="1047" d="M821 0h-735l309 1462h735l-32 -153h-566l-98 -469h527l-29 -152h-529l-114 -536h565z" />
+<glyph unicode="F" horiz-adv-x="967" d="M258 0h-172l309 1462h735l-30 -153h-568l-110 -533h528l-32 -153h-529z" />
+<glyph unicode="G" horiz-adv-x="1386" d="M821 766h459l-154 -711q-216 -75 -419 -75q-264 0 -410.5 144.5t-146.5 403.5q0 269 101.5 489.5t281.5 343t399 122.5q117 0 219.5 -20t206.5 -64l-66 -152q-77 34 -165.5 59t-194.5 25q-169 0 -307.5 -101.5t-215.5 -283.5t-77 -407q0 -190 102.5 -299t286.5 -109 q154 0 260 39l96 444h-289z" />
+<glyph unicode="H" horiz-adv-x="1389" d="M1085 0h-167l143 688h-660l-145 -688h-170l309 1462h170l-131 -622h660l133 622h168z" />
+<glyph unicode="I" horiz-adv-x="559" d="M86 0l311 1462h168l-311 -1462h-168z" />
+<glyph unicode="J" horiz-adv-x="547" d="M-166 -385q-105 0 -153 25l6 147q69 -20 145 -20q100 0 165.5 62.5t90.5 182.5l307 1450h170l-309 -1468q-79 -379 -422 -379z" />
+<glyph unicode="K" horiz-adv-x="1141" d="M1034 0h-186q-72 181 -146.5 359.5t-146.5 361.5l-174 -131l-125 -590h-170l309 1462h170l-151 -710l700 710h209l-639 -637z" />
+<glyph unicode="L" horiz-adv-x="971" d="M86 0l309 1462h170l-276 -1308h565l-33 -154h-735z" />
+<glyph unicode="M" horiz-adv-x="1714" d="M676 0l-166 1296h-8q-7 -72 -28.5 -197.5t-37.5 -199.5l-190 -899h-162l309 1462h244l149 -1204h9l659 1204h266l-303 -1462h-174q126 590 193 905.5t94 392.5h-6l-717 -1298h-131z" />
+<glyph unicode="N" horiz-adv-x="1438" d="M1139 0h-181l-460 1223h-6q-32 -221 -74 -418l-172 -805h-162l309 1462h180l459 -1220h6q30 224 72 405l174 815h164z" />
+<glyph unicode="O" horiz-adv-x="1475" d="M1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5t70 403 q0 199 -94 310.5t-261 111.5z" />
+<glyph unicode="P" horiz-adv-x="1159" d="M1159 1085q0 -248 -164 -379t-481 -131h-135l-123 -575h-170l309 1462h330q214 0 324 -94.5t110 -282.5zM410 721h133q216 0 328 91t112 267q0 125 -69.5 180.5t-213.5 55.5h-163z" />
+<glyph unicode="Q" horiz-adv-x="1475" d="M874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q158 0 279 100t187.5 280.5t66.5 399.5q0 199 -94 310.5t-261 111.5zM725 -18l-17 -2h-16q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424 q0 -333 -139 -576t-375 -321l274 -358h-219z" />
+<glyph unicode="R" horiz-adv-x="1165" d="M385 608l-129 -608h-170l309 1462h320q446 0 446 -366q0 -348 -368 -449l239 -647h-186l-209 608h-252zM532 1313q-102 -494 -116 -559h168q193 0 297 85t104 244q0 121 -67.5 175.5t-219.5 54.5h-166z" />
+<glyph unicode="S" horiz-adv-x="1028" d="M913 424q0 -211 -140.5 -327.5t-395.5 -116.5q-106 0 -186.5 14.5t-151.5 48.5v170q162 -84 340 -84q162 0 257 75.5t95 207.5q0 78 -52.5 137.5t-195.5 140.5q-151 85 -209.5 170t-58.5 201q0 187 132 304.5t347 117.5q99 0 184.5 -19t180.5 -65l-66 -150 q-66 38 -148 60t-151 22q-134 0 -215.5 -69.5t-81.5 -188.5q0 -54 17 -92.5t54 -72.5t142 -95q147 -88 198.5 -138t78 -110.5t26.5 -140.5z" />
+<glyph unicode="T" horiz-adv-x="1020" d="M487 0h-172l277 1311h-406l33 151h985l-30 -151h-408z" />
+<glyph unicode="U" horiz-adv-x="1384" d="M1407 1462l-205 -966q-55 -263 -197.5 -389.5t-388.5 -126.5q-230 0 -341 104t-111 299q0 81 24 201l189 878h170l-191 -891q-22 -106 -22 -188q0 -117 73 -184.5t218 -67.5q172 0 267.5 87.5t139.5 289.5l205 954h170z" />
+<glyph unicode="V" horiz-adv-x="1122" d="M479 197q61 144 162 338l479 927h191l-781 -1462h-180l-162 1462h170l97 -930q20 -196 20 -335h4z" />
+<glyph unicode="W" horiz-adv-x="1745" d="M1257 0h-170l-49 965q-8 136 -8 282h-6q-25 -72 -61 -154.5t-504 -1092.5h-174l-62 1462h170l31 -901l2 -88q0 -98 -10 -258h6q89 243 156 383l405 864h178l43 -860q9 -153 9 -304l-1 -83h9q75 224 131 354l387 893h182z" />
+<glyph unicode="X" horiz-adv-x="1063" d="M956 0h-180l-213 641l-481 -641h-186l596 776l-263 686h172l203 -563l443 563h186l-555 -694z" />
+<glyph unicode="Y" horiz-adv-x="1030" d="M537 715l489 747h193l-627 -921l-113 -541h-172l119 549l-238 913h170z" />
+<glyph unicode="Z" horiz-adv-x="1087" d="M885 0h-901l28 137l924 1170h-655l32 155h858l-26 -139l-924 -1169h697z" />
+<glyph unicode="[" horiz-adv-x="586" d="M371 -324h-387l381 1786h387l-31 -141h-227l-318 -1503h227z" />
+<glyph unicode="\" horiz-adv-x="717" d="M375 1462l217 -1462h-154l-217 1462h154z" />
+<glyph unicode="]" horiz-adv-x="586" d="M-119 -182h225l320 1503h-227l30 141h389l-380 -1786h-388z" />
+<glyph unicode="^" horiz-adv-x="1059" d="M53 553l598 920h109l266 -920h-145l-201 747l-467 -747h-160z" />
+<glyph unicode="_" horiz-adv-x="807" d="M623 -324h-811l30 140h811z" />
+<glyph unicode="`" horiz-adv-x="1135" d="M903 1241h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="a" horiz-adv-x="1157" d="M639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233t-51 -310 q0 -114 47 -170.5t132 -56.5z" />
+<glyph unicode="b" horiz-adv-x="1182" d="M545 -20q-97 0 -170.5 51t-110.5 139h-10l-70 -170h-125l330 1556h168q-51 -242 -78.5 -370.5t-75.5 -300.5h9q93 118 183.5 173.5t186.5 55.5q141 0 220 -99t79 -272q0 -209 -68.5 -386.5t-191 -277t-276.5 -99.5zM731 975q-96 0 -195.5 -95t-158 -239t-58.5 -295 q0 -110 55.5 -168.5t160.5 -58.5q99 0 184.5 81t137.5 230.5t52 317.5q0 227 -178 227z" />
+<glyph unicode="c" horiz-adv-x="922" d="M506 -20q-194 0 -301 107t-107 302q0 200 74 369t204.5 263.5t293.5 94.5q137 0 268 -51l-47 -141q-120 51 -219 51q-112 0 -204.5 -76.5t-145 -213t-52.5 -296.5q0 -128 66.5 -199t183.5 -71q72 0 136 20t126 47v-143q-124 -63 -276 -63z" />
+<glyph unicode="d" horiz-adv-x="1182" d="M639 1114q194 0 281 -190h10q17 155 45 274l78 358h166l-330 -1556h-139l22 209h-8q-101 -125 -189 -177t-182 -52q-139 0 -217 98t-78 272q0 214 72 392t194.5 275t274.5 97zM449 119q94 0 194 93.5t158.5 239t58.5 296.5q0 111 -54 169t-157 58q-101 0 -187.5 -82.5 t-139 -232t-52.5 -314.5q0 -227 179 -227z" />
+<glyph unicode="e" horiz-adv-x="1010" d="M492 -20q-184 0 -289 109t-105 302q0 188 74.5 360.5t197.5 268.5t271 96q153 0 230 -66.5t77 -185.5q0 -180 -166 -282.5t-475 -102.5h-33l-4 -80q0 -131 61.5 -204.5t190.5 -73.5q63 0 129.5 18t165.5 66v-146q-94 -44 -166 -61.5t-159 -17.5zM631 973 q-103 0 -193.5 -94t-138.5 -261h12q228 0 349.5 59.5t121.5 172.5q0 53 -36.5 88t-114.5 35z" />
+<glyph unicode="f" horiz-adv-x="641" d="M-104 -492q-69 0 -125 21v141q64 -22 112 -22q76 0 117 62t66 177l227 1082h-193l13 67l206 66l23 100q46 200 127.5 282.5t241.5 82.5q40 0 98 -11.5t90 -25.5l-43 -129q-76 29 -137 29q-87 0 -133.5 -48.5t-75.5 -177.5l-25 -108h238l-25 -127h-237l-232 -1098 q-39 -189 -120 -276t-213 -87z" />
+<glyph unicode="g" horiz-adv-x="1026" d="M1100 1096l-25 -107l-211 -24q41 -62 41 -158q0 -191 -116.5 -304.5t-311.5 -113.5q-55 0 -84 8q-139 -53 -139 -131q0 -41 33 -54.5t96 -21.5l117 -14q181 -22 262.5 -88t81.5 -194q0 -184 -146 -285t-411 -101q-194 0 -304 73.5t-110 207.5q0 105 72 182t233 131 q-78 41 -78 121q0 69 51 118.5t142 92.5q-63 32 -103 94.5t-40 145.5q0 194 119.5 318t305.5 124q78 0 154 -20h371zM35 -195q0 -77 65 -122t193 -45q182 0 284.5 63.5t102.5 179.5q0 62 -54 98t-184 50l-159 16q-120 -25 -184 -88t-64 -152zM313 680q0 -85 45 -129.5 t125 -44.5q79 0 138 42t90.5 115.5t31.5 159.5q0 82 -44 125t-126 43q-78 0 -136.5 -40.5t-91 -113t-32.5 -157.5z" />
+<glyph unicode="h" horiz-adv-x="1182" d="M729 0l148 692q18 94 18 135q0 148 -147 148q-89 0 -173.5 -59t-149 -171.5t-97.5 -271.5l-101 -473h-168l330 1556h168q-18 -82 -34.5 -159t-34 -156.5t-38 -166.5t-47.5 -189h11q94 123 185.5 176t191.5 53q131 0 202.5 -72t71.5 -204q0 -62 -23 -166 q-39 -193 -145 -672h-168z" />
+<glyph unicode="i" horiz-adv-x="520" d="M227 0h-168l234 1096h168zM340 1376q0 56 32 91.5t83 35.5q88 0 88 -90q0 -55 -33.5 -93t-77.5 -38q-40 0 -66 24.5t-26 69.5z" />
+<glyph unicode="j" horiz-adv-x="520" d="M-135 -492q-69 0 -123 21v141q61 -22 119 -22q125 0 168 205l264 1243h166l-266 -1258q-36 -171 -114.5 -250.5t-213.5 -79.5zM340 1376q0 56 32 91.5t83 35.5q86 0 86 -90q0 -55 -33.5 -93t-77.5 -38q-38 0 -64 24.5t-26 69.5z" />
+<glyph unicode="k" horiz-adv-x="999" d="M330 559l526 537h201l-469 -467l295 -629h-187l-235 524l-152 -123l-82 -401h-170l330 1556h170l-129 -602t-102 -395h4z" />
+<glyph unicode="l" horiz-adv-x="520" d="M225 0h-168l332 1556h168z" />
+<glyph unicode="m" horiz-adv-x="1786" d="M696 0l148 692q18 94 18 135q0 70 -31 109t-106 39q-84 0 -163.5 -60t-140 -171.5t-93.5 -268.5l-101 -475h-168l234 1096h139l-22 -203h10q87 119 173.5 171t178.5 52q113 0 174 -65t72 -181h8q86 125 183 185.5t196 60.5q127 0 196.5 -68t69.5 -198q0 -68 -22 -178 l-144 -672h-170l148 692q20 104 20 146q0 62 -34.5 99.5t-108.5 37.5q-81 0 -160 -58t-138.5 -164.5t-90.5 -252.5l-107 -500h-168z" />
+<glyph unicode="n" horiz-adv-x="1182" d="M729 0l148 692q20 104 20 144q0 63 -35.5 101t-113.5 38q-89 0 -173.5 -60t-149 -171t-97.5 -269l-101 -475h-168l234 1096h139l-22 -203h10q96 122 185.5 172.5t185.5 50.5q127 0 200.5 -69.5t73.5 -194.5q0 -79 -23 -180l-143 -672h-170z" />
+<glyph unicode="o" horiz-adv-x="1149" d="M643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5z" />
+<glyph unicode="p" horiz-adv-x="1182" d="M545 -20q-97 0 -170 50t-113 140h-10l-4 -38q-3 -25 -10.5 -70t-114.5 -554h-166l336 1588h139l-26 -209h8q179 227 372 227q137 0 216 -97.5t79 -273.5q0 -212 -69 -389t-191 -275.5t-276 -98.5zM731 975q-96 0 -195.5 -95t-158 -239t-58.5 -295q0 -110 55.5 -168.5 t160.5 -58.5q99 0 184.5 81t137.5 230.5t52 317.5q0 227 -178 227z" />
+<glyph unicode="q" horiz-adv-x="1182" d="M641 1116q94 0 165.5 -50.5t108.5 -141.5h13l67 172h125l-336 -1588h-166l101 480q9 45 57 221h-8q-95 -121 -185 -175t-186 -54q-140 0 -219.5 97.5t-79.5 272.5q0 212 72.5 392t196 277t274.5 97zM449 119q92 0 190 92t158.5 237t60.5 300q0 105 -54.5 166t-152.5 61 q-101 0 -189 -84.5t-140 -233t-52 -311.5q0 -227 179 -227z" />
+<glyph unicode="r" horiz-adv-x="811" d="M752 1116q69 0 120 -14l-36 -150q-53 13 -105 13q-91 0 -170.5 -60t-139 -166.5t-87.5 -236.5l-107 -502h-168l234 1096h139l-22 -203h10q72 95 119 136.5t98.5 64t114.5 22.5z" />
+<glyph unicode="s" horiz-adv-x="877" d="M735 311q0 -156 -110.5 -243.5t-311.5 -87.5q-169 0 -305 69v158q70 -42 151 -65t150 -23q126 0 190 50t64 128q0 57 -35 96t-151 107q-130 73 -184 143t-54 166q0 138 101 222.5t266 84.5q171 0 330 -74l-54 -137l-56 25q-101 43 -220 43q-93 0 -146 -43.5t-53 -112.5 q0 -56 35.5 -96t146.5 -103q107 -60 153.5 -103t69.5 -92.5t23 -111.5z" />
+<glyph unicode="t" horiz-adv-x="664" d="M395 117q55 0 144 26v-129q-34 -14 -84 -24t-80 -10q-125 0 -191.5 59.5t-66.5 177.5q0 66 18 150l127 602h-172l14 73l185 78l125 228h98l-55 -252h274l-26 -127h-273l-129 -604q-18 -87 -18 -132q0 -56 29 -86t81 -30z" />
+<glyph unicode="u" horiz-adv-x="1182" d="M451 1096l-150 -695q-18 -89 -18 -139q0 -143 147 -143q88 0 173 60t150 172t99 270l100 475h166l-231 -1096h-139l22 203h-12q-98 -125 -187 -174t-184 -49q-128 0 -201 69.5t-73 198.5q0 62 22 172l146 676h170z" />
+<glyph unicode="v" horiz-adv-x="946" d="M223 0l-125 1096h168l64 -613q24 -258 24 -362h6q127 275 179 371l325 604h178l-591 -1096h-228z" />
+<glyph unicode="w" horiz-adv-x="1468" d="M831 0l-32 602q-4 94 -4 172v156h-9l-50 -118l-83 -189l-291 -623h-202l-43 1096h164l18 -594v-88q0 -147 -8 -269h6q47 124 137 322l295 629h182l37 -594q6 -168 6 -262v-53l-2 -42h6q28 86 83 218.5t323 732.5h178l-506 -1096h-205z" />
+<glyph unicode="x" horiz-adv-x="979" d="M467 434l-346 -434h-195l475 565l-239 531h170l174 -412l330 412h194l-455 -539l252 -557h-168z" />
+<glyph unicode="y" horiz-adv-x="946" d="M98 1096h168l74 -545q10 -69 19.5 -203.5t9.5 -216.5h6q35 87 87 200t77 156l325 609h178l-696 -1282q-93 -172 -184 -239t-219 -67q-72 0 -140 21v135q63 -18 131 -18q82 0 140.5 50.5t113.5 149.5l76 136z" />
+<glyph unicode="z" horiz-adv-x="909" d="M690 0h-719l23 117l694 854h-479l27 125h657l-29 -140l-680 -831h531z" />
+<glyph unicode="{" horiz-adv-x="715" d="M442 -324q-141 0 -216.5 52.5t-75.5 171.5q0 52 20 141q33 146 51.5 227.5t14.5 102.5q0 143 -209 143l32 143q118 0 189.5 43.5t93.5 147.5l68 326q34 160 117.5 224t254.5 64h33l-31 -141q-105 0 -151 -36.5t-66 -123.5l-71 -321q-28 -123 -91 -184t-167 -78v-5 q151 -41 151 -213q0 -59 -18 -131l-47 -211q-15 -58 -15 -98q0 -53 36.5 -77.5t119.5 -24.5v-142h-23z" />
+<glyph unicode="|" d="M541 1556h139v-2052h-139v2052z" />
+<glyph unicode="}" horiz-adv-x="715" d="M285 1462q144 0 220.5 -52.5t76.5 -170.5q0 -48 -21 -141l-49 -219q-16 -68 -16 -111q0 -143 209 -143l-33 -144q-119 0 -190 -43t-93 -147l-67 -326q-36 -164 -119 -226.5t-264 -62.5h-13v142q115 0 167 36t71 123l72 322q25 117 88 179.5t170 80.5v6q-150 42 -150 211 q0 59 18 131l50 213q14 65 14 99q0 53 -40.5 77.5t-139.5 24.5l28 141h11z" />
+<glyph unicode="~" d="M348 713q-54 0 -118.5 -34.5t-114.5 -86.5v151q98 109 243 109q69 0 127 -14.5t144 -51.5q64 -27 112.5 -41t98.5 -14q55 0 119.5 33t115.5 88v-150q-100 -110 -244 -110q-72 0 -135 16.5t-135 48.5q-75 32 -120 44t-93 12z" />
+<glyph unicode="&#xa1;" horiz-adv-x="530" d="M260 684h109l-176 -1057h-207zM250 950q0 76 40.5 122t110.5 46q44 0 70.5 -26t26.5 -80q0 -71 -40.5 -117.5t-105.5 -46.5q-48 0 -75 25.5t-27 76.5z" />
+<glyph unicode="&#xa2;" d="M582 -20h-125l43 215q-132 34 -203.5 137.5t-71.5 257.5q0 185 63.5 344t178.5 258.5t260 120.5l35 170h123l-37 -168q119 -9 217 -49l-47 -142q-109 52 -219 52q-112 0 -204.5 -76.5t-145 -213t-52.5 -296.5q0 -125 66 -198t184 -73q72 0 136 20t126 48v-143 q-123 -62 -286 -66z" />
+<glyph unicode="&#xa3;" d="M842 1481q184 0 336 -86l-66 -133q-146 79 -278 79q-213 0 -263 -237l-69 -326h370l-26 -127h-371l-47 -219q-22 -98 -66 -166.5t-124 -111.5h725l-33 -154h-953l27 141q205 46 258 289l47 221h-200l26 127h201l76 350q75 353 430 353z" />
+<glyph unicode="&#xa4;" d="M229 723q0 117 68 215l-129 129l92 92l127 -129q103 70 217 70t215 -70l129 129l92 -90l-129 -129q70 -104 70 -217q0 -119 -70 -217l127 -127l-90 -90l-129 127q-98 -68 -215 -68q-119 0 -217 70l-127 -127l-90 90l127 127q-68 96 -68 215zM358 723q0 -103 71.5 -174.5 t174.5 -71.5q104 0 177 71.5t73 174.5q0 104 -73 177t-177 73q-102 0 -174 -72.5t-72 -177.5z" />
+<glyph unicode="&#xa5;" d="M582 715l491 747h187l-533 -770h231l-28 -133h-297l-33 -160h297l-29 -133h-295l-57 -266h-154l56 266h-291l29 133h290l33 160h-291l29 133h225l-202 770h163z" />
+<glyph unicode="&#xa6;" d="M541 1556h139v-776h-139v776zM541 281h139v-777h-139v777z" />
+<glyph unicode="&#xa7;" horiz-adv-x="995" d="M174 770q0 201 238 307q-119 70 -119 203q0 127 103.5 206t279.5 79q189 0 321 -68l-53 -123q-148 60 -266 60q-102 0 -162.5 -40.5t-60.5 -109.5q0 -49 38 -83.5t162 -90.5q100 -44 149 -83.5t75 -89.5t26 -114q0 -97 -61 -180t-172 -139q114 -71 114 -189 q0 -152 -114 -237.5t-318 -85.5q-176 0 -295 61v148q56 -34 136.5 -56t156.5 -22q133 0 204 44.5t71 129.5q0 48 -50.5 89t-152.5 87q-138 61 -194 130.5t-56 166.5zM514 1010q-82 -26 -135 -87.5t-53 -131.5t50.5 -117t198.5 -111q80 44 127.5 107t47.5 131 q0 60 -49.5 105.5t-186.5 103.5z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1135" d="M457 1378q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM821 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M928 1059q-125 0 -191.5 -87t-66.5 -241q0 -169 65 -249.5t193 -80.5q82 0 211 43v-122q-66 -28 -113 -38t-104 -10q-192 0 -297 119.5t-105 339.5q0 208 110 330.5t300 122.5q130 0 248 -60l-60 -120q-106 53 -190 53zM139 731q0 200 100 375t275 276t377 101 q197 0 370 -97t277 -272t104 -383q0 -204 -100.5 -376.5t-273 -273.5t-377.5 -101q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM244 731q0 -173 87 -323.5t237.5 -237t322.5 -86.5q174 0 323 87t236.5 235.5t87.5 324.5q0 174 -87 323t-235.5 236.5t-324.5 87.5 q-174 0 -323 -87t-236.5 -235.5t-87.5 -324.5z" />
+<glyph unicode="&#xaa;" horiz-adv-x="686" d="M498 1479q114 0 153 -103h6l37 90h86l-139 -665h-92l14 117h-4q-40 -56 -90 -93t-123 -37q-77 0 -126.5 60t-49.5 166q0 127 41.5 234.5t116.5 169t170 61.5zM381 891q61 0 112.5 49t86 137.5t34.5 167.5q0 62 -28.5 96.5t-85.5 34.5q-92 0 -154.5 -103t-62.5 -243 q0 -139 98 -139z" />
+<glyph unicode="&#xab;" horiz-adv-x="958" d="M88 584l391 374l78 -81l-297 -328l172 -387l-113 -49l-231 442v29zM483 541l367 405l86 -69l-283 -365l158 -350l-113 -49l-215 397v31z" />
+<glyph unicode="&#xac;" d="M1047 793v-529h-140v387h-780v142h920z" />
+<glyph unicode="&#xad;" horiz-adv-x="639" d="M55 469zM55 469l35 158h479l-34 -158h-480z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M139 731q0 200 100 375t275 276t377 101q197 0 370 -97t277 -272t104 -383q0 -204 -100.5 -376.5t-273 -273.5t-377.5 -101q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM244 731q0 -173 87 -323.5t237.5 -237t322.5 -86.5q174 0 323 87t236.5 235.5t87.5 324.5 q0 174 -87 323t-235.5 236.5t-324.5 87.5q-174 0 -323 -87t-236.5 -235.5t-87.5 -324.5zM1194 915q0 -78 -47.5 -141t-132.5 -98l227 -385h-149l-207 352h-113v-352h-127v880h229q163 0 241.5 -63t78.5 -193zM772 762h92q195 0 195 149q0 76 -47.5 107t-149.5 31h-90v-287z " />
+<glyph unicode="&#xaf;" horiz-adv-x="782" d="M1012 1556h-785l33 132h787z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M215 1171q0 128 90.5 220t220.5 92q83 0 155.5 -41.5t114.5 -114t42 -156.5q0 -128 -90.5 -218.5t-221.5 -90.5t-221 90.5t-90 218.5zM328 1171q0 -80 58 -138t140 -58q83 0 140 58.5t57 137.5q0 82 -57.5 140.5t-139.5 58.5q-80 0 -139 -58.5t-59 -140.5z" />
+<glyph unicode="&#xb1;" d="M516 643h-389v141h389v392h141v-392h390v-141h-390v-387h-141v387zM127 0v141h920v-141h-920z" />
+<glyph unicode="&#xb2;" horiz-adv-x="717" d="M657 586h-561l23 106l264 228q115 100 158.5 149.5t63.5 93t20 90.5q0 53 -31 85t-90 32q-90 0 -195 -80l-59 90q125 101 274 101q109 0 171.5 -56.5t62.5 -150.5q0 -99 -52.5 -179.5t-197.5 -205.5l-221 -187h395z" />
+<glyph unicode="&#xb3;" horiz-adv-x="717" d="M549 1036q69 -17 108 -68t39 -120q0 -132 -91 -205.5t-253 -73.5q-125 0 -233 56v127q125 -72 239 -72q205 0 205 170q0 137 -178 137h-90l22 107h95q97 0 155 41t58 112q0 60 -34.5 90.5t-93.5 30.5q-102 0 -196 -68l-55 93q109 88 268 88q114 0 178 -56t64 -151 q0 -180 -207 -234v-4z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1135" d="M532 1268q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1194" d="M295 266q0 -147 147 -147q89 0 172 59t148.5 171t99.5 269l105 478h163l-233 -1096h-139l24 205h-12q-93 -121 -183 -173t-188 -52q-112 0 -163 96h-9q-11 -78 -22.5 -148t-83.5 -420h-164l336 1588h168l-148 -695q-18 -92 -18 -135z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1206 -260h-114v1661h-213v-1661h-115v819q-62 -18 -146 -18q-216 0 -317.5 125t-101.5 376q0 260 109 387t341 127h557v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="518" d="M170 587zM170 690q0 77 40.5 122.5t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77z" />
+<glyph unicode="&#xb8;" horiz-adv-x="420" d="M211 -276q0 -98 -81 -157t-214 -59q-41 0 -86 9v100q38 -6 68 -6q174 0 174 110q0 46 -39 67.5t-99 29.5l101 182h106l-61 -121q131 -38 131 -155z" />
+<glyph unicode="&#xb9;" horiz-adv-x="717" d="M537 1462h118l-186 -876h-135l112 526q25 103 58 225q-25 -25 -50 -46.5t-145 -100.5l-51 90z" />
+<glyph unicode="&#xba;" horiz-adv-x="688" d="M745 1219q0 -191 -88.5 -311t-240.5 -120q-113 0 -180.5 71t-67.5 196q0 117 42 215.5t117.5 153.5t174.5 55q117 0 180 -67t63 -193zM500 1376q-102 0 -160.5 -87.5t-58.5 -229.5q0 -85 38 -127.5t107 -42.5q94 0 152.5 88.5t58.5 232.5q0 166 -137 166z" />
+<glyph unicode="&#xbb;" horiz-adv-x="958" d="M872 485l-393 -370l-78 82l297 323l-172 391l113 50l233 -447v-29zM477 528l-368 -401l-86 70l282 360l-158 354l113 50l217 -402v-31z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1518" d="M123 0zM1362 1462l-1086 -1462h-153l1085 1462h154zM483 1462h118l-186 -876h-135l112 526q25 103 58 225q-25 -25 -50 -46.5t-145 -100.5l-51 90zM1327 203h-129l-43 -202h-127l43 202h-365l23 101l481 579h133l-121 -563h127zM1095 320q69 322 90 395 q-20 -36 -110 -149l-205 -246h225z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1518" d="M66 0zM427 1462h118l-186 -876h-135l112 526q25 103 58 225q-25 -25 -50 -46.5t-145 -100.5l-51 90zM1305 1462l-1086 -1462h-153l1085 1462h154zM1343 1h-561l23 106l264 228q115 100 158.5 149.5t63.5 93t20 90.5q0 53 -31 85t-90 32q-90 0 -195 -80l-59 90 q125 101 274 101q109 0 171.5 -56.5t62.5 -150.5q0 -99 -52.5 -179.5t-197.5 -205.5l-221 -187h395z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1565" d="M87 0zM517 1036q69 -17 108 -68t39 -120q0 -132 -91 -205.5t-253 -73.5q-125 0 -233 56v127q125 -72 239 -72q205 0 205 170q0 137 -178 137h-90l22 107h95q97 0 155 41t58 112q0 60 -34.5 90.5t-93.5 30.5q-102 0 -196 -68l-55 93q109 88 268 88q114 0 178 -56t64 -151 q0 -180 -207 -234v-4zM1512 1462l-1086 -1462h-153l1085 1462h154zM1477 203h-129l-43 -202h-127l43 202h-365l23 101l481 579h133l-121 -563h127zM1245 320q69 322 90 395q-20 -36 -110 -149l-205 -246h225z" />
+<glyph unicode="&#xbf;" horiz-adv-x="874" d="M657 680q-22 -130 -72 -212t-165 -175l-95 -75q-159 -127 -159 -275q0 -93 51.5 -144t147.5 -51q80 0 154 25.5t140 56.5l62 -129q-90 -48 -189 -74t-186 -26q-168 0 -259 83.5t-91 237.5q0 124 66 228t225 223q132 98 172.5 152.5t62.5 154.5h135zM760 1010 q0 -77 -40.5 -122.5t-111.5 -45.5q-43 0 -69.5 26t-26.5 78q0 71 40 118.5t107 47.5q47 0 74 -25.5t27 -76.5z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM863 1579h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM679 1606q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM1080 1579h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27 z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM934 1581q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18 t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM523 1716q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM887 1716q0 46 28 79.5 t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1137" d="M0 0zM813 465h-496l-245 -465h-189l799 1462h174l184 -1462h-170zM795 621l-35 299q-24 179 -29 350q-37 -88 -80.5 -175t-249.5 -474h394zM991 1585q0 -99 -60 -157t-159 -58q-101 0 -160 57.5t-59 155.5q0 94 62 152.5t157 58.5q101 0 160 -57t59 -152zM887 1583 q0 53 -32 84t-83 31q-49 0 -82 -31t-33 -84q0 -54 29.5 -84.5t85.5 -30.5q51 0 83 30.5t32 84.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1673" d="M1448 0h-737l98 465h-438l-293 -465h-197l938 1462h938l-33 -153h-565l-100 -469h528l-28 -150h-529l-115 -538h566zM840 621l147 688h-84l-434 -688h371z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1198" d="M150 0zM942 1331q-174 0 -311.5 -97t-218 -284.5t-80.5 -408.5q0 -187 97.5 -298.5t268.5 -111.5q139 0 322 57v-149q-86 -31 -164 -45t-188 -14q-242 0 -380 149.5t-138 407.5q0 261 105.5 485.5t283.5 342.5t403 118q197 0 348 -80l-69 -141q-138 69 -279 69zM758 -276 q0 -98 -81 -157t-214 -59q-41 0 -86 9v100q38 -6 68 -6q174 0 174 110q0 46 -39 67.5t-99 29.5l101 182h106l-61 -121q131 -38 131 -155z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1047" d="M86 0zM821 0h-735l309 1462h735l-32 -153h-566l-98 -469h527l-29 -152h-529l-114 -536h565zM898 1579h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1047" d="M86 0zM821 0h-735l309 1462h735l-32 -153h-566l-98 -469h527l-29 -152h-529l-114 -536h565zM657 1606q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xca;" horiz-adv-x="1047" d="M86 0zM821 0h-735l309 1462h735l-32 -153h-566l-98 -469h527l-29 -152h-529l-114 -536h565zM1084 1579h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1047" d="M86 0zM821 0h-735l309 1462h735l-32 -153h-566l-98 -469h527l-29 -152h-529l-114 -536h565zM523 1716q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM887 1716q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34 q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xcc;" horiz-adv-x="559" d="M86 0zM86 0l311 1462h168l-311 -1462h-168zM593 1579h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xcd;" horiz-adv-x="559" d="M86 0zM86 0l311 1462h168l-311 -1462h-168zM412 1606q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xce;" horiz-adv-x="559" d="M86 0zM86 0l311 1462h168l-311 -1462h-168zM808 1579h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xcf;" horiz-adv-x="559" d="M86 0zM86 0l311 1462h168l-311 -1462h-168zM265 1716q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM629 1716q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1364" d="M1300 877q0 -261 -105 -461t-300 -308t-457 -108h-352l135 649h-149l32 150h150l141 663h342q276 0 419.5 -149.5t143.5 -435.5zM449 147q202 0 355 91.5t234.5 258.5t81.5 382t-103 325.5t-302 110.5h-178l-111 -516h330l-33 -150h-330l-106 -502h162z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1438" d="M84 0zM1139 0h-181l-460 1223h-6q-32 -221 -74 -418l-172 -805h-162l309 1462h180l459 -1220h6q30 224 72 405l174 815h164zM1102 1581q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5 t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1475" d="M150 0zM1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5 t70 403q0 199 -94 310.5t-261 111.5zM1007 1579h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1475" d="M150 0zM1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5 t70 403q0 199 -94 310.5t-261 111.5zM821 1606q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1475" d="M150 0zM1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5 t70 403q0 199 -94 310.5t-261 111.5zM1227 1579h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1475" d="M150 0zM1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5 t70 403q0 199 -94 310.5t-261 111.5zM1067 1581q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1475" d="M150 0zM1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q244 0 384 -154t140 -424zM874 1333q-157 0 -281 -101t-192.5 -281t-68.5 -398q0 -199 98 -310.5t266 -111.5q152 0 272.5 97.5t190.5 279.5 t70 403q0 199 -94 310.5t-261 111.5zM664 1716q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM1028 1716q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xd7;" d="M487 723l-319 321l98 99l320 -320l323 320l99 -96l-324 -324l322 -322l-97 -96l-323 320l-320 -318l-96 96z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1475" d="M1411 907q0 -269 -88 -481.5t-252 -329t-379 -116.5q-200 0 -332 96l-129 -160l-112 92l137 170q-106 136 -106 371q0 264 96 482t263.5 336t377.5 118q99 0 178.5 -27t151.5 -84l131 166l114 -92l-149 -184q48 -62 73 -156t25 -201zM874 1333q-157 0 -281 -101 t-192.5 -281t-68.5 -398q0 -135 41 -227l737 919q-90 88 -236 88zM1229 911q0 118 -33 205l-733 -911q91 -74 233 -74q152 0 272.5 97.5t190.5 279.5t70 403z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1384" d="M164 0zM1407 1462l-205 -966q-55 -263 -197.5 -389.5t-388.5 -126.5q-230 0 -341 104t-111 299q0 81 24 201l189 878h170l-191 -891q-22 -106 -22 -188q0 -117 73 -184.5t218 -67.5q172 0 267.5 87.5t139.5 289.5l205 954h170zM991 1579h-104q-61 61 -128.5 154 t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xda;" horiz-adv-x="1384" d="M164 0zM1407 1462l-205 -966q-55 -263 -197.5 -389.5t-388.5 -126.5q-230 0 -341 104t-111 299q0 81 24 201l189 878h170l-191 -891q-22 -106 -22 -188q0 -117 73 -184.5t218 -67.5q172 0 267.5 87.5t139.5 289.5l205 954h170zM823 1606q56 60 125.5 151.5t106.5 149.5 h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1384" d="M164 0zM1407 1462l-205 -966q-55 -263 -197.5 -389.5t-388.5 -126.5q-230 0 -341 104t-111 299q0 81 24 201l189 878h170l-191 -891q-22 -106 -22 -188q0 -117 73 -184.5t218 -67.5q172 0 267.5 87.5t139.5 289.5l205 954h170zM1217 1579h-103q-57 48 -161 189 q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1384" d="M164 0zM1407 1462l-205 -966q-55 -263 -197.5 -389.5t-388.5 -126.5q-230 0 -341 104t-111 299q0 81 24 201l189 878h170l-191 -891q-22 -106 -22 -188q0 -117 73 -184.5t218 -67.5q172 0 267.5 87.5t139.5 289.5l205 954h170zM643 1716q0 46 28 79.5t74 33.5 q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM1007 1716q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1030" d="M188 0zM537 715l489 747h193l-627 -921l-113 -541h-172l119 549l-238 913h170zM616 1606q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xde;" horiz-adv-x="1159" d="M1106 829q0 -248 -164 -379t-483 -131h-133l-70 -319h-170l309 1462h170l-53 -256h160q213 0 323.5 -95t110.5 -282zM354 465h135q215 0 328 91t113 267q0 126 -70 181t-215 55h-166z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1182" d="M-133 -492q-69 0 -123 21v143q61 -22 111 -22q65 0 107 47.5t65 157.5l280 1314q43 200 156 299t307 99q162 0 252 -71t90 -196q0 -57 -21 -106.5t-61.5 -95t-178.5 -150.5q-110 -83 -110 -151q0 -56 95 -122q47 -34 101 -87.5t79.5 -110t25.5 -123.5 q0 -175 -108.5 -274.5t-292.5 -99.5q-175 0 -268 71v160q51 -41 118.5 -66.5t129.5 -25.5q113 0 181 58t68 159q0 40 -10.5 71t-33.5 59t-89 83q-88 69 -122.5 124t-34.5 115q0 53 18.5 96t49.5 78.5t124 104.5q80 56 111 87.5t48 65t17 70.5q0 64 -52.5 100.5t-141.5 36.5 q-119 0 -186 -62.5t-95 -190.5l-274 -1303q-40 -189 -121 -276t-211 -87z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM824 1241h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM600 1268q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM1005 1241h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM856 1243q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM454 1378q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM818 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1157" d="M98 0zM639 1116q92 0 164 -49.5t112 -142.5h11l67 172h127l-233 -1096h-133l26 209h-8q-179 -229 -377 -229q-139 0 -218 99t-79 271q0 208 71 386t196 279t274 101zM449 119q97 0 193 92.5t156 241t60 297.5q0 103 -56 164t-147 61q-104 0 -193.5 -86t-140.5 -233 t-51 -310q0 -114 47 -170.5t132 -56.5zM951 1456q0 -99 -60 -157t-159 -58q-101 0 -160 57.5t-59 155.5q0 94 62 152.5t157 58.5q101 0 160 -57t59 -152zM847 1454q0 53 -32 84t-83 31q-49 0 -82 -31t-33 -84q0 -54 29.5 -84.5t85.5 -30.5q51 0 83 30.5t32 84.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1669" d="M1165 -20q-108 0 -189.5 39.5t-121.5 119.5l-31 -139h-114l26 209h-8q-109 -132 -191.5 -180.5t-177.5 -48.5q-122 0 -191 99t-69 269q0 206 70.5 385t191.5 281t263 102q82 0 145 -48.5t102 -143.5h11l67 172h109l-31 -146q123 166 332 166q119 0 192.5 -68t73.5 -184 q0 -182 -166.5 -283.5t-472.5 -101.5h-39l-4 -80q0 -131 62.5 -204.5t193.5 -73.5q55 0 116.5 16.5t178.5 67.5v-150q-164 -75 -328 -75zM412 119q95 0 188.5 91.5t153 240.5t59.5 299q0 103 -45.5 164t-122.5 61q-99 0 -187 -86.5t-138 -231.5t-50 -309q0 -114 37 -171.5 t105 -57.5zM1325 973q-117 0 -211 -94.5t-141 -260.5h14q226 0 348.5 58.5t122.5 169.5q0 61 -35 94t-98 33z" />
+<glyph unicode="&#xe7;" horiz-adv-x="922" d="M98 0zM506 -20q-194 0 -301 107t-107 302q0 200 74 369t204.5 263.5t293.5 94.5q137 0 268 -51l-47 -141q-120 51 -219 51q-112 0 -204.5 -76.5t-145 -213t-52.5 -296.5q0 -128 66.5 -199t183.5 -71q72 0 136 20t126 47v-143q-124 -63 -276 -63zM592 -276q0 -98 -81 -157 t-214 -59q-41 0 -86 9v100q38 -6 68 -6q174 0 174 110q0 46 -39 67.5t-99 29.5l101 182h106l-61 -121q131 -38 131 -155z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1010" d="M98 0zM492 -20q-184 0 -289 109t-105 302q0 188 74.5 360.5t197.5 268.5t271 96q153 0 230 -66.5t77 -185.5q0 -180 -166 -282.5t-475 -102.5h-33l-4 -80q0 -131 61.5 -204.5t190.5 -73.5q63 0 129.5 18t165.5 66v-146q-94 -44 -166 -61.5t-159 -17.5zM631 973 q-103 0 -193.5 -94t-138.5 -261h12q228 0 349.5 59.5t121.5 172.5q0 53 -36.5 88t-114.5 35zM777 1241h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1010" d="M98 0zM492 -20q-184 0 -289 109t-105 302q0 188 74.5 360.5t197.5 268.5t271 96q153 0 230 -66.5t77 -185.5q0 -180 -166 -282.5t-475 -102.5h-33l-4 -80q0 -131 61.5 -204.5t190.5 -73.5q63 0 129.5 18t165.5 66v-146q-94 -44 -166 -61.5t-159 -17.5zM631 973 q-103 0 -193.5 -94t-138.5 -261h12q228 0 349.5 59.5t121.5 172.5q0 53 -36.5 88t-114.5 35zM585 1268q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xea;" horiz-adv-x="1010" d="M98 0zM492 -20q-184 0 -289 109t-105 302q0 188 74.5 360.5t197.5 268.5t271 96q153 0 230 -66.5t77 -185.5q0 -180 -166 -282.5t-475 -102.5h-33l-4 -80q0 -131 61.5 -204.5t190.5 -73.5q63 0 129.5 18t165.5 66v-146q-94 -44 -166 -61.5t-159 -17.5zM631 973 q-103 0 -193.5 -94t-138.5 -261h12q228 0 349.5 59.5t121.5 172.5q0 53 -36.5 88t-114.5 35zM966 1241h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1010" d="M98 0zM492 -20q-184 0 -289 109t-105 302q0 188 74.5 360.5t197.5 268.5t271 96q153 0 230 -66.5t77 -185.5q0 -180 -166 -282.5t-475 -102.5h-33l-4 -80q0 -131 61.5 -204.5t190.5 -73.5q63 0 129.5 18t165.5 66v-146q-94 -44 -166 -61.5t-159 -17.5zM631 973 q-103 0 -193.5 -94t-138.5 -261h12q228 0 349.5 59.5t121.5 172.5q0 53 -36.5 88t-114.5 35zM413 1378q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM777 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34 q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xec;" horiz-adv-x="520" d="M59 0zM227 0h-168l234 1096h168zM492 1241h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xed;" horiz-adv-x="520" d="M59 0zM227 0h-168l234 1096h168zM324 1268q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xee;" horiz-adv-x="520" d="M59 0zM227 0h-168l234 1096h168zM708 1241h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xef;" horiz-adv-x="520" d="M59 0zM227 0h-168l234 1096h168zM161 1378q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM525 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1165" d="M676 1343q-66 58 -146 113l95 117q118 -84 188 -154l260 146l64 -105l-240 -133q87 -115 126.5 -240.5t39.5 -269.5q0 -253 -71.5 -447t-203 -292t-311.5 -98q-182 0 -284.5 104t-102.5 289q0 160 67.5 298t187 217t267.5 79q105 0 181.5 -45.5t111.5 -124.5l6 2v17 q0 136 -36.5 240t-110.5 197l-270 -149l-56 108zM487 121q107 0 190 56t134 168t51 226q0 118 -65.5 187t-178.5 69q-109 0 -189 -57.5t-123.5 -161t-43.5 -231.5q0 -126 57.5 -191t167.5 -65z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1182" d="M59 0zM729 0l148 692q20 104 20 144q0 63 -35.5 101t-113.5 38q-89 0 -173.5 -60t-149 -171t-97.5 -269l-101 -475h-168l234 1096h139l-22 -203h10q96 122 185.5 172.5t185.5 50.5q127 0 200.5 -69.5t73.5 -194.5q0 -79 -23 -180l-143 -672h-170zM871 1243 q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1149" d="M98 0zM643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5zM798 1241h-104q-61 61 -128.5 154t-95.5 153v21h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1149" d="M98 0zM643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5zM589 1268q56 60 125.5 151.5t106.5 149.5h190v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1149" d="M98 0zM643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5zM997 1241h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1149" d="M98 0zM643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5zM844 1243q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1149" d="M98 0zM643 1110q190 0 300 -112.5t110 -309.5q0 -188 -72 -355t-195 -258t-278 -91q-192 0 -301 113t-109 309q0 190 73 357.5t197 257t275 89.5zM879 711q0 115 -62.5 186.5t-169.5 71.5q-109 0 -195.5 -74t-134 -205.5t-47.5 -292.5q0 -131 63.5 -202.5t182.5 -71.5 q104 0 187 73t129.5 207.5t46.5 307.5zM433 1378q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM797 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xf7;" d="M127 651v142h920v-142h-920zM475 373q0 121 111 121q53 0 82.5 -30.5t29.5 -90.5q0 -58 -30 -89.5t-82 -31.5t-81.5 31t-29.5 90zM475 1071q0 121 111 121q53 0 82.5 -30.5t29.5 -90.5q0 -58 -30 -89.5t-82 -31.5t-81.5 31t-29.5 90z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1149" d="M1047 705q0 -189 -69.5 -360t-191.5 -266t-276 -95q-146 0 -246 65l-98 -125l-105 82l109 135q-68 103 -68 265q0 194 73.5 361t195.5 255t272 88q146 0 252 -68l104 129l105 -79l-119 -129q62 -97 62 -258zM647 971q-108 0 -195.5 -73t-137.5 -202t-50 -280 q0 -92 17 -137l518 645q-54 47 -152 47zM885 688q0 84 -13 119l-514 -641q57 -45 158 -45q103 0 188.5 71.5t133 200.5t47.5 295z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1182" d="M113 0zM451 1096l-150 -695q-18 -89 -18 -139q0 -143 147 -143q88 0 173 60t150 172t99 270l100 475h166l-231 -1096h-139l22 203h-12q-98 -125 -187 -174t-184 -49q-128 0 -201 69.5t-73 198.5q0 62 22 172l146 676h170zM800 1241h-104q-61 61 -128.5 154t-95.5 153v21 h181q43 -136 147 -303v-25z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1182" d="M113 0zM451 1096l-150 -695q-18 -89 -18 -139q0 -143 147 -143q88 0 173 60t150 172t99 270l100 475h166l-231 -1096h-139l22 203h-12q-98 -125 -187 -174t-184 -49q-128 0 -201 69.5t-73 198.5q0 62 22 172l146 676h170zM636 1268q56 60 125.5 151.5t106.5 149.5h190 v-21q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1182" d="M113 0zM451 1096l-150 -695q-18 -89 -18 -139q0 -143 147 -143q88 0 173 60t150 172t99 270l100 475h166l-231 -1096h-139l22 203h-12q-98 -125 -187 -174t-184 -49q-128 0 -201 69.5t-73 198.5q0 62 22 172l146 676h170zM1024 1241h-103q-57 48 -161 189 q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1182" d="M113 0zM451 1096l-150 -695q-18 -89 -18 -139q0 -143 147 -143q88 0 173 60t150 172t99 270l100 475h166l-231 -1096h-139l22 203h-12q-98 -125 -187 -174t-184 -49q-128 0 -201 69.5t-73 198.5q0 62 22 172l146 676h170zM457 1378q0 46 28 79.5t74 33.5q78 0 78 -80 q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM821 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#xfd;" horiz-adv-x="946" d="M0 0zM98 1096h168l74 -545q10 -69 19.5 -203.5t9.5 -216.5h6q35 87 87 200t77 156l325 609h178l-696 -1282q-93 -172 -184 -239t-219 -67q-72 0 -140 21v135q63 -18 131 -18q82 0 140.5 50.5t113.5 149.5l76 136zM500 1268q56 60 125.5 151.5t106.5 149.5h190v-21 q-38 -49 -140 -151t-177 -156h-105v27z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1182" d="M545 -20q-98 0 -172 51t-113 139h-10q-8 -104 -25 -176l-102 -486h-166l432 2048h168q-95 -441 -115 -522t-39 -149h9q101 125 189 177t183 52q139 0 218 -97.5t79 -273.5q0 -212 -69 -389t-191 -275.5t-276 -98.5zM731 975q-96 0 -195.5 -95t-158 -239t-58.5 -295 q0 -110 55.5 -168.5t160.5 -58.5q99 0 184.5 81t137.5 230.5t52 317.5q0 227 -178 227z" />
+<glyph unicode="&#xff;" horiz-adv-x="946" d="M0 0zM98 1096h168l74 -545q10 -69 19.5 -203.5t9.5 -216.5h6q35 87 87 200t77 156l325 609h178l-696 -1282q-93 -172 -184 -239t-219 -67q-72 0 -140 21v135q63 -18 131 -18q82 0 140.5 50.5t113.5 149.5l76 136zM335 1378q0 46 28 79.5t74 33.5q78 0 78 -80 q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM699 1378q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62z" />
+<glyph unicode="&#x131;" horiz-adv-x="520" d="M227 0h-168l234 1096h168z" />
+<glyph unicode="&#x152;" horiz-adv-x="1751" d="M1524 0h-674q-78 -20 -158 -20q-256 0 -399 149.5t-143 419.5q0 264 96 482t263.5 336t377.5 118q152 0 237 -23h709l-31 -153h-565l-100 -469h528l-31 -150h-528l-115 -538h565zM696 131q69 0 123 19l246 1161q-76 22 -191 22q-157 0 -281 -101t-192.5 -281t-68.5 -398 q0 -199 98 -310.5t266 -111.5z" />
+<glyph unicode="&#x153;" horiz-adv-x="1769" d="M1251 -20q-270 0 -356 225q-69 -107 -171.5 -164t-225.5 -57q-184 0 -292 114t-108 308q0 193 75 360t201 255.5t281 88.5q270 0 359 -225q75 109 177.5 170t221.5 61q139 0 217 -65.5t78 -186.5q0 -183 -164.5 -284t-468.5 -101h-41l-4 -80q0 -131 61.5 -204.5 t190.5 -73.5q75 0 145 24.5t150 59.5v-150q-162 -75 -326 -75zM649 969q-109 0 -196 -73t-135 -202t-48 -284q0 -141 62 -214t172 -73q177 0 278 160.5t101 427.5q0 124 -59.5 191t-174.5 67zM1413 973q-125 0 -220.5 -94.5t-139.5 -260.5h18q231 0 351 61t120 177 q0 48 -32 82.5t-97 34.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1030" d="M188 0zM537 715l489 747h193l-627 -921l-113 -541h-172l119 549l-238 913h170zM452 1716q0 46 28 79.5t74 33.5q78 0 78 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22t-23.5 62zM816 1716q0 46 28 79.5t75 33.5q77 0 77 -80q0 -49 -29.5 -83t-68.5 -34q-35 0 -58.5 22 t-23.5 62z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1135" d="M1014 1241h-103q-57 48 -161 189q-134 -119 -242 -189h-109v27q145 133 204.5 197.5t82.5 103.5h158q37 -99 128 -235l42 -66v-27z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M989 1456q0 -99 -60 -157t-159 -58q-101 0 -160 57.5t-59 155.5q0 94 62 152.5t157 58.5q101 0 160 -57t59 -152zM885 1454q0 53 -32 84t-83 31q-49 0 -82 -31t-33 -84q0 -54 29.5 -84.5t85.5 -30.5q51 0 83 30.5t32 84.5z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1135" d="M838 1243q-40 0 -77.5 17.5t-73 39t-69 39t-65.5 17.5q-44 0 -69.5 -28.5t-47.5 -86.5h-100q58 258 231 258q44 0 83.5 -18t75 -39.5t66.5 -39.5t58 -18q44 0 69.5 27t51.5 90h100q-66 -258 -233 -258z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="639" d="M55 469l35 158h479l-34 -158h-480z" />
+<glyph unicode="&#x2011;" horiz-adv-x="639" d="M55 469l35 158h479l-34 -158h-480z" />
+<glyph unicode="&#x2012;" horiz-adv-x="639" d="M55 469l35 158h479l-34 -158h-480z" />
+<glyph unicode="&#x2013;" horiz-adv-x="983" d="M55 469l35 160h823l-34 -160h-824z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1966" d="M55 469l35 160h1806l-34 -160h-1807z" />
+<glyph unicode="&#x2018;" horiz-adv-x="348" d="M129 961l-6 22q98 211 270 479h127q-147 -345 -203 -501h-188z" />
+<glyph unicode="&#x2019;" horiz-adv-x="348" d="M516 1462l8 -22q-40 -91 -111 -218.5t-159 -260.5h-129q134 298 203 501h188z" />
+<glyph unicode="&#x201a;" horiz-adv-x="492" d="M291 238l8 -23q-113 -235 -270 -479h-129q126 286 204 502h187z" />
+<glyph unicode="&#x201c;" horiz-adv-x="719" d="M500 961l-8 22q80 181 272 479h127q-162 -379 -203 -501h-188zM129 961l-6 22q98 211 270 479h127q-147 -345 -203 -501h-188z" />
+<glyph unicode="&#x201d;" horiz-adv-x="719" d="M516 1462l8 -22q-40 -91 -111 -218.5t-159 -260.5h-129q134 298 203 501h188zM885 1462l10 -22q-94 -206 -274 -479h-127q57 126 115.5 272.5t86.5 228.5h189z" />
+<glyph unicode="&#x201e;" horiz-adv-x="858" d="M291 238l8 -23q-113 -235 -270 -479h-129q126 286 204 502h187zM659 238l9 -23q-95 -205 -271 -479h-129q140 316 203 502h188z" />
+<glyph unicode="&#x2022;" horiz-adv-x="774" d="M199 684q0 145 73.5 231t198.5 86q92 0 139 -49t47 -141q0 -141 -74 -230t-202 -89q-89 0 -135.5 49.5t-46.5 142.5z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1563" d="M43 0zM563 74q0 77 40.5 122.5t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77zM1085 74q0 77 40.5 122.5t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77zM43 74q0 77 40.5 122.5 t111.5 45.5q43 0 69.5 -26t26.5 -79q0 -71 -40 -118.5t-108 -47.5q-46 0 -73 26t-27 77z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="580" d="M88 578l391 380l78 -81l-297 -334l172 -381l-113 -49l-231 436v29z" />
+<glyph unicode="&#x203a;" horiz-adv-x="580" d="M492 496l-392 -381l-77 82l296 333l-172 381l113 50l232 -437v-28z" />
+<glyph unicode="&#x2044;" horiz-adv-x="268" d="M752 1462l-1086 -1462h-153l1085 1462h154z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="717" d="M713 788h-129l-43 -202h-127l43 202h-365l23 101l481 579h133l-121 -563h127zM481 905q69 322 90 395q-20 -36 -110 -149l-205 -246h225z" />
+<glyph unicode="&#x20ac;" d="M928 1329q-140 0 -254 -99t-189 -298h426l-26 -133h-441q-21 -65 -32 -164h381l-29 -131h-361q0 -373 297 -373q123 0 256 55v-147q-127 -59 -278 -59q-212 0 -328.5 133.5t-116.5 378.5v12h-170l27 131h154q8 80 30 164h-151l27 133h159q97 267 259.5 408t369.5 141 q89 0 160 -21.5t141 -70.5l-80 -138q-113 78 -231 78z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1534" d="M438 741h-121v617h-196v104h516v-104h-199v-617zM1014 741l-189 551h-6q4 -52 4 -121v-430h-118v721h180l182 -557l193 557h170v-721h-121v430q0 73 4 121h-6l-197 -551h-96z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1095" d="M0 1095h1095v-1095h-1095v1095z" />
+<glyph horiz-adv-x="1182" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-Italic-webfont.woff b/docs/fonts/OpenSans-Italic-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..ff652e64356b538c001423b6aedefcf1ee66cd17
GIT binary patch
literal 23188
zcmZsB1B@t5(Cyl`ZQHu*-MhAJ+qP}nwr%fS+qS*?_RF7_yqEkvIjOEQr@E_WlA2DY
zU1dc@0RRDhn?@1<@_#l3=70SE`u~3u6;+Z3001oeWpVz4p$qV*n6QZGFE{k-<NbmF
z5C;H6OiotumpcRi04W3jfXtzFKo=BKR2BpP01Nxo`2V6T&mb&ER*{|w00123*Vp-l
zUfy*)u%WfS-7jbL8=nOL00h)(Yt>`u;zaN}4#cm9;TJrV-(X@UcBa<99LMh*@4q%a
z658XBslMZHEF8<P=0EL!Krpp(H~Hmw004w!008U=%oK&`&5ZSp0088pe(y8?f(^hu
z>E7&@{N?(7eZpUmz@dN=nOQrz{c^wS0FnX#0PY&N6gaW6HT=~n{pJC<@{8T1$@+6^
zeYf9vRsNfg;6DIk0YTa5TO0p!6u+9~-y8)juwn@9Y#p5d0MvdZfN#I!0Tg>&FWEU5
z|Hi6+{*rP3;X#<_($(1DH)oCi@&o%1rdRT{zZUQp08_jLv;Wy~L-D@<?DP_bmD{?Z
zo{^s3F0cV47=oUG9>{>Jz!cCi<L|n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20GXR8!Qp%h86lt`)3SKHL!*G!?hfW=~|jOer|RqfK1R;688(V`x1
zRBB3HX;s>kc4e8;p)6Pao9B$EskxdK=MDHm!J6u-Mt|f<_e8WS9X5kI6s&J4+-e_>
zE3!{mU1?R?%zwYF>-rx~rl?c^002w40LW5Uu>k>&S-A)R2moUsumK}PumdA-uop!j
zAWOIa4pB?622)yCurwR6C|O`;Ac|F3umUAvumMG5BVw=uBSf+b0R}3v3<d@&vJ?ge
zDp|4wC<#SUM6wJB2P&}!0YtGR0f<pput11du?7P~u_ghCQCPSH0Ek$z1_4A_Sy@@Q
V0sn=t1dXu;07L)*QLkt0007vJ)35*l

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Light-webfont.eot b/docs/fonts/OpenSans-Light-webfont.eot
new file mode 100644
index 0000000000000000000000000000000000000000..14868406aa7d728a88d63963f119635813b5d30e
GIT binary patch
literal 19514
zcmafZRa6{I(Cp$ai#v-g?(Xgmi@Uo^fIx6qd~qkZLvRa8Sc1EI2<{d<gpm9F_w7IT
z;r2Y#oT}<R^Vl=fVj2K|jyeE<_}@YX{D)Xbs7NTth=|At01gDef1HNSH6mcg3<Qv2
z`A`3!_=o@i{ST^c!6^O*|98*;v;p1#2Y}~)CVha-f9Ut$P6OZqZ~{03{QooK0`&gV
zod5v<_y2U?{}?iW;eU+pe@+*G*Z<Ar1#kg)0X+X{T>qbXp#P^D03fHYtn<H51ppuc
z+&cjL{{Zqy02Wh%>C?oqAXB4pXEPtQ@F04-K3@(e4#g+%6N-G)7R69k;^X~m7J7wD
zk*{&>0J#ZSzcl!MiK38*9VMW5cvM44v)>(BjH<8MrZYPjvwjpu&Q3pL>);RR*DKyH
z<jr3);7JwxV2iVMs5hCGiZ<Rcw3;NB{4qciTL3&Jb<^Wz;i=a~amS>@qDZ{afz8PV
zCP0jeS2CRY(H&op+Dlk}ttn~UDB>NE>(cULR}Y&dUzbBYejAQx#)?Oezw-IVIUxx}
z0!hZF>-judJZIiE)ZeEVXM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=NDUTGM01v6T^BO>G0mjsGG&6=O!#SI0|bH5moS628sp<>+rsbNfC&le
zR80;o@s~Vl@j47Od5T>wWHipGVusH>?p9M+LU2exf{@7(iO!s&@eD0=*;OdnkeAvA
zz-t^q2)H$-$wWcmz$8@>CYCUfSXHcKb=+;5?4=KXC=zuVhIY3s%)wBDE3h@LfV~tJ
zRXE7I<|9NoqqouB-NqZ*EKWz02uc?FCg^+>;E!L4mgn6D&E(&*XGDOErc{=`qqP4j
zEvYYKvEJs?ao;2T3OgBV3rSxEj@v*li4IZ?^U2~~dCH<cVFfsiCjH`EEoMdlIB<Q6
zU9&CUMB$Je*ViTq(;X*Og&-;ByN=;3;X5Pkw%4s;vlE;23Rl5{A&8c!9-PUm;wTJx
zO-T0M;n0BucFKVdWb*qfBLJx;QMXq{UeP~8lcxrXs0_wdeCJnY1tHWkulPZ~_o3}G
zzIQ82I2}0Fy8?Ky1PDc)=O!K2R;<CalM;g*l{&_)0qEs=OX1fvE&XXxzJ&I`;0Zf+
ziIj|(KP9o9PMbJJ)Ic+b9mrj&MtatHN8YqHusIDN@P?2CPVD0*r=5IlxJ8ge(7#T?
z{whMsiP(>;Hj8?(DQ~HE#Kr*5Qx?(2S2N850iFkzhxc~ka_}7QW<_H^>Ia<+7w`dt
z(T12zWpKBs3%)W>H*dky2r*(WP62Zja3o%A*l3b`W!@V7VJ4mffDB6!;0(Om%r6|8
zUoa890HR1JEIJ4X<F&bl4Zf0#p1NY;IwS#5sa9*{pW&l9?p1x4`X`n?aGmONqqW2;
nn-@49B<{te17B-Hg+c`-SbX?(XPhh2oUj>iFk9V5t}8)~L_wpP

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Light-webfont.svg b/docs/fonts/OpenSans-Light-webfont.svg
new file mode 100644
index 0000000..11a472c
--- /dev/null
+++ b/docs/fonts/OpenSans-Light-webfont.svg
@@ -0,0 +1,1831 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sanslight" horiz-adv-x="1169" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1077" d="M29 0zM586 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM895 0h-99v1087h99v-1087zM782 1389q0 96 63 96q31 0 48.5 -25t17.5 -71q0 -45 -17.5 -71 t-48.5 -26q-63 0 -63 97z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1077" d="M29 0zM586 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM895 0h-99v1556h99v-1556z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1692" d="M29 0zM586 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM1200 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5 q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM1510 0h-99v1087h99v-1087zM1397 1389q0 96 63 96q31 0 48.5 -25t17.5 -71q0 -45 -17.5 -71t-48.5 -26q-63 0 -63 97z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1692" d="M29 0zM586 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM1200 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5 q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86zM1510 0h-99v1556h99v-1556z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="492" d="M276 377h-61l-29 1085h119zM164 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98z" />
+<glyph unicode="&#x22;" horiz-adv-x="723" d="M260 1462l-33 -528h-61l-33 528h127zM590 1462l-33 -528h-61l-33 528h127z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M967 928l-76 -398h303v-79h-320l-86 -451h-90l88 451h-360l-86 -451h-88l86 451h-283v79h299l76 398h-297v80h311l86 454h91l-89 -454h365l88 454h86l-88 -454h285v-80h-301zM440 530h363l78 398h-363z" />
+<glyph unicode="$" d="M991 440q0 -133 -99 -217t-274 -106v-236h-81v232q-92 2 -200.5 22.5t-172.5 50.5v103q75 -36 179.5 -61t193.5 -25v508q-145 44 -215 88t-102 104t-32 146q0 124 94.5 208.5t254.5 104.5v192h81v-190q197 -9 351 -72l-33 -90q-141 62 -318 72v-486q213 -66 293 -144 t80 -204zM881 444q0 85 -63 140.5t-200 95.5v-471q122 13 192.5 75t70.5 160zM297 1049q0 -86 57 -141t183 -93v453q-119 -16 -179.5 -76t-60.5 -143z" />
+<glyph unicode="%" horiz-adv-x="1653" d="M211 1026q0 -186 45 -279.5t141 -93.5q193 0 193 373q0 184 -49.5 276.5t-143.5 92.5q-96 0 -141 -92.5t-45 -276.5zM688 1026q0 -226 -75 -343.5t-216 -117.5q-133 0 -208.5 120.5t-75.5 340.5q0 223 72 340t212 117q139 0 215 -120.5t76 -336.5zM1063 438 q0 -185 45 -277.5t141 -92.5q193 0 193 370q0 369 -193 369q-96 0 -141 -91.5t-45 -277.5zM1540 438q0 -226 -74 -343.5t-215 -117.5q-136 0 -211 121.5t-75 339.5q0 225 73.5 341t212.5 116q137 0 213 -120t76 -337zM1280 1462l-811 -1462h-96l811 1462h96z" />
+<glyph unicode="&#x26;" horiz-adv-x="1460" d="M123 371q0 138 73.5 235t274.5 205l-75 82q-66 71 -98 139t-32 142q0 143 95.5 227t256.5 84q155 0 245.5 -81t90.5 -224q0 -105 -70 -192.5t-253 -194.5l452 -457q61 72 104 157t75 201h96q-63 -246 -209 -426l266 -268h-135l-193 197q-92 -90 -164 -131.5t-157.5 -63.5 t-194.5 -22q-209 0 -328.5 103t-119.5 288zM578 70q128 0 234.5 43.5t209.5 146.5l-483 485q-136 -72 -196.5 -122.5t-88 -109.5t-27.5 -138q0 -143 93 -224t258 -81zM373 1176q0 -79 40 -146t152 -174q159 85 221 159t62 169q0 94 -62 152.5t-168 58.5q-114 0 -179.5 -58 t-65.5 -161z" />
+<glyph unicode="'" horiz-adv-x="393" d="M260 1462l-33 -528h-61l-33 528h127z" />
+<glyph unicode="(" horiz-adv-x="557" d="M82 561q0 265 77.5 496t223.5 405h113q-148 -182 -227 -412.5t-79 -486.5q0 -483 304 -887h-111q-147 170 -224 397t-77 488z" />
+<glyph unicode=")" horiz-adv-x="557" d="M475 561q0 -263 -77.5 -490t-223.5 -395h-111q304 404 304 887q0 257 -79 487.5t-227 411.5h113q147 -175 224 -406.5t77 -494.5z" />
+<glyph unicode="*" horiz-adv-x="1128" d="M631 1556l-37 -405l405 104l21 -131l-395 -39l247 -340l-124 -71l-191 379l-180 -379l-125 71l242 340l-390 39l19 131l401 -104l-39 405h146z" />
+<glyph unicode="+" d="M625 764h434v-82h-434v-432h-82v432h-432v82h432v434h82v-434z" />
+<glyph unicode="," horiz-adv-x="440" d="M295 238l12 -21q-75 -265 -174 -481h-65q77 275 110 502h117z" />
+<glyph unicode="-" horiz-adv-x="659" d="M92 512v82h475v-82h-475z" />
+<glyph unicode="." horiz-adv-x="487" d="M162 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98z" />
+<glyph unicode="/" horiz-adv-x="698" d="M674 1462l-545 -1462h-104l544 1462h105z" />
+<glyph unicode="0" d="M1055 735q0 -385 -117.5 -570t-355.5 -185q-229 0 -348 190.5t-119 564.5q0 382 115.5 566t351.5 184q231 0 352 -190.5t121 -559.5zM223 735q0 -340 89 -502.5t270 -162.5q189 0 275.5 168t86.5 497q0 324 -86.5 492t-275.5 168t-274 -168t-85 -492z" />
+<glyph unicode="1" d="M682 0h-98v1065q0 145 12 301q-15 -15 -31 -29t-309 -243l-57 71l397 297h86v-1462z" />
+<glyph unicode="2" d="M1028 0h-915v88l389 406q164 170 230 260t97 172t31 172q0 131 -86 213t-223 82q-183 0 -350 -133l-54 69q183 154 406 154q191 0 300.5 -102t109.5 -281q0 -145 -73.5 -280.5t-268.5 -334.5l-375 -385v-4h782v-96z" />
+<glyph unicode="3" d="M979 1118q0 -136 -85.5 -229t-229.5 -119v-6q176 -22 268 -112t92 -242q0 -205 -139.5 -317.5t-401.5 -112.5q-223 0 -389 83v99q84 -44 188.5 -69t196.5 -25q221 0 332 89.5t111 252.5q0 145 -113.5 223t-333.5 78h-158v96h160q182 0 288.5 86.5t106.5 234.5 q0 122 -86.5 195.5t-226.5 73.5q-109 0 -199 -30.5t-202 -104.5l-49 67q85 71 205 112.5t243 41.5q202 0 312 -95.5t110 -269.5z" />
+<glyph unicode="4" d="M1141 373h-252v-373h-94v373h-752v67l725 1030h121v-1011h252v-86zM795 459v418q0 302 14 507h-8q-20 -37 -123 -188l-516 -737h633z" />
+<glyph unicode="5" d="M537 879q234 0 368.5 -113t134.5 -311q0 -225 -140 -350t-386 -125q-109 0 -207 21.5t-164 61.5v103q108 -55 192 -76.5t179 -21.5q192 0 308 101.5t116 274.5q0 163 -113 256t-307 93q-130 0 -272 -39l-60 39l58 669h704v-96h-610l-45 -516q156 29 244 29z" />
+<glyph unicode="6" d="M131 623q0 285 77.5 479.5t220 288.5t343.5 94q94 0 172 -23v-88q-73 27 -176 27q-247 0 -384.5 -178t-154.5 -518h13q76 98 174 148t207 50q205 0 320.5 -117t115.5 -323q0 -224 -121.5 -353.5t-327.5 -129.5q-222 0 -350.5 169.5t-128.5 473.5zM610 68q164 0 255 103 t91 294q0 168 -90 262t-245 94q-102 0 -189.5 -45t-139.5 -119.5t-52 -152.5q0 -111 49.5 -213.5t134 -162.5t186.5 -60z" />
+<glyph unicode="7" d="M334 0l602 1366h-827v96h946v-73l-604 -1389h-117z" />
+<glyph unicode="8" d="M582 1487q186 0 299.5 -95t113.5 -257q0 -112 -70.5 -198t-228.5 -159q192 -79 270 -173t78 -228q0 -181 -126.5 -289t-339.5 -108q-221 0 -339 101t-118 294q0 131 83 230t257 169q-161 76 -227 160.5t-66 202.5q0 105 53 184.5t148.5 122.5t212.5 43zM223 360 q0 -138 93.5 -214t261.5 -76q164 0 264 80.5t100 218.5q0 124 -78.5 201.5t-302.5 162.5q-184 -71 -261 -157t-77 -216zM580 1397q-141 0 -226.5 -69.5t-85.5 -190.5q0 -70 31.5 -123.5t91 -97t199.5 -101.5q163 63 234 139t71 183q0 120 -84.5 190t-230.5 70z" />
+<glyph unicode="9" d="M1036 842q0 -288 -75.5 -482t-220 -287t-349.5 -93q-104 0 -192 26v86q43 -14 103.5 -21.5t92.5 -7.5q247 0 387 178.5t156 520.5h-12q-73 -96 -174 -147.5t-211 -51.5q-203 0 -316.5 112t-113.5 318q0 220 124.5 356t323.5 136q144 0 252 -75.5t166.5 -221.5t58.5 -346z M559 1397q-158 0 -252 -106.5t-94 -291.5q0 -174 87 -264t249 -90q101 0 188.5 45t139 119.5t51.5 151.5q0 117 -46.5 219t-130 159.5t-192.5 57.5z" />
+<glyph unicode=":" horiz-adv-x="487" d="M162 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98zM162 971q0 98 80 98q82 0 82 -98q0 -53 -23.5 -76t-58.5 -23q-34 0 -57 23t-23 76z" />
+<glyph unicode=";" horiz-adv-x="487" d="M303 238l12 -21q-75 -265 -174 -481h-65q29 97 62 245.5t48 256.5h117zM162 971q0 98 80 98q82 0 82 -98q0 -53 -23.5 -76t-58.5 -23q-34 0 -57 23t-23 76z" />
+<glyph unicode="&#x3c;" d="M1059 266l-948 416v61l948 474v-95l-823 -405l823 -355v-96z" />
+<glyph unicode="=" d="M111 885v82h948v-82h-948zM111 477v82h948v-82h-948z" />
+<glyph unicode="&#x3e;" d="M111 362l823 355l-823 405v95l948 -474v-61l-948 -416v96z" />
+<glyph unicode="?" horiz-adv-x="862" d="M293 377v37q0 123 37.5 201t138.5 167l91 79q72 61 103 121t31 138q0 127 -83.5 202t-219.5 75q-79 0 -148 -17.5t-149 -56.5l-37 80q110 48 184.5 64t153.5 16q183 0 288 -98.5t105 -270.5q0 -68 -18 -119t-50.5 -94.5t-78.5 -84t-102 -87.5q-64 -54 -98.5 -98.5 t-50 -93.5t-15.5 -146v-14h-82zM260 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98z" />
+<glyph unicode="@" horiz-adv-x="1815" d="M1702 725q0 -228 -90.5 -366t-245.5 -138q-89 0 -144.5 54t-64.5 147h-4q-43 -100 -124 -150.5t-189 -50.5q-148 0 -229 96.5t-81 270.5q0 202 120.5 330.5t314.5 128.5q138 0 286 -41l-22 -464v-30q0 -104 35 -156.5t116 -52.5q103 0 168.5 116.5t65.5 303.5 q0 194 -79 340t-225.5 224.5t-334.5 78.5q-230 0 -405.5 -99.5t-270 -281.5t-94.5 -418q0 -322 167 -497.5t474 -175.5q93 0 188.5 18t231.5 70v-99q-203 -80 -414 -80q-349 0 -544 200.5t-195 557.5q0 256 108.5 460.5t307 317.5t448.5 113q215 0 380.5 -89t255 -254.5 t89.5 -383.5zM633 590q0 -143 55 -215t174 -72q255 0 273 346l16 291q-79 27 -193 27q-149 0 -237 -102.5t-88 -274.5z" />
+<glyph unicode="A" horiz-adv-x="1229" d="M911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174z" />
+<glyph unicode="B" horiz-adv-x="1284" d="M207 1462h401q271 0 398 -92t127 -278q0 -127 -77.5 -211.5t-226.5 -108.5v-6q175 -26 257.5 -110.5t82.5 -235.5q0 -202 -134 -311t-380 -109h-448v1462zM309 811h322q206 0 299.5 68.5t93.5 214.5t-105.5 212t-314.5 66h-295v-561zM309 721v-631h344q406 0 406 330 q0 301 -428 301h-322z" />
+<glyph unicode="C" horiz-adv-x="1272" d="M831 1391q-275 0 -433 -176t-158 -482q0 -313 149 -486t426 -173q184 0 338 47v-90q-145 -51 -362 -51q-308 0 -485 199t-177 556q0 223 84.5 393t243 262.5t368.5 92.5q214 0 383 -80l-41 -92q-160 80 -336 80z" />
+<glyph unicode="D" horiz-adv-x="1446" d="M1317 745q0 -368 -193 -556.5t-567 -188.5h-350v1462h395q350 0 532.5 -183t182.5 -534zM1206 741q0 314 -159.5 472.5t-468.5 158.5h-269v-1282h242q655 0 655 651z" />
+<glyph unicode="E" horiz-adv-x="1130" d="M1006 0h-799v1462h799v-94h-697v-553h658v-94h-658v-627h697v-94z" />
+<glyph unicode="F" horiz-adv-x="1028" d="M309 0h-102v1462h801v-94h-699v-620h660v-95h-660v-653z" />
+<glyph unicode="G" horiz-adv-x="1481" d="M782 737h539v-667q-212 -90 -477 -90q-346 0 -530.5 195.5t-184.5 553.5q0 223 91.5 395.5t262 266.5t391.5 94q239 0 429 -88l-41 -92q-190 88 -394 88q-289 0 -458.5 -178.5t-169.5 -481.5q0 -330 161 -496.5t473 -166.5q202 0 343 57v514h-435v96z" />
+<glyph unicode="H" horiz-adv-x="1473" d="M1266 0h-103v719h-854v-719h-102v1462h102v-649h854v649h103v-1462z" />
+<glyph unicode="I" horiz-adv-x="516" d="M207 0v1462h102v-1462h-102z" />
+<glyph unicode="J" horiz-adv-x="506" d="M-33 -369q-92 0 -151 27v88q78 -20 149 -20q242 0 242 264v1472h102v-1462q0 -369 -342 -369z" />
+<glyph unicode="K" horiz-adv-x="1190" d="M1190 0h-125l-561 772l-195 -172v-600h-102v1462h102v-760l162 162l573 598h130l-599 -618z" />
+<glyph unicode="L" horiz-adv-x="1051" d="M207 0v1462h102v-1366h697v-96h-799z" />
+<glyph unicode="M" horiz-adv-x="1767" d="M850 0l-545 1350h-8q8 -124 8 -254v-1096h-98v1462h158l518 -1286h6l518 1286h154v-1462h-103v1108q0 116 12 240h-8l-547 -1348h-65z" />
+<glyph unicode="N" horiz-adv-x="1477" d="M1270 0h-103l-866 1298h-8q12 -232 12 -350v-948h-98v1462h102l865 -1296h6q-9 180 -9 342v954h99v-1462z" />
+<glyph unicode="O" horiz-adv-x="1565" d="M1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483z" />
+<glyph unicode="P" horiz-adv-x="1198" d="M1087 1042q0 -212 -144 -325t-408 -113h-226v-604h-102v1462h358q522 0 522 -420zM309 692h201q247 0 357 81.5t110 264.5q0 169 -104 250.5t-322 81.5h-242v-678z" />
+<glyph unicode="Q" horiz-adv-x="1565" d="M1436 733q0 -294 -126 -486.5t-349 -246.5l333 -348h-166l-282 330l-33 -2h-31q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5 t-401.5 168.5q-261 0 -402.5 -170t-141.5 -483z" />
+<glyph unicode="R" horiz-adv-x="1217" d="M309 637v-637h-102v1462h348q272 0 402 -100.5t130 -302.5q0 -147 -77.5 -248t-235.5 -145l397 -666h-122l-377 637h-363zM309 725h279q185 0 287 82.5t102 243.5q0 167 -100 243t-326 76h-242v-645z" />
+<glyph unicode="S" horiz-adv-x="1116" d="M1014 377q0 -183 -134.5 -290t-357.5 -107q-268 0 -411 59v102q158 -67 403 -67q180 0 285.5 82.5t105.5 216.5q0 83 -35 137.5t-114 99.5t-232 97q-224 77 -309.5 166.5t-85.5 238.5q0 164 128.5 267.5t330.5 103.5q206 0 387 -78l-37 -88q-182 76 -348 76 q-162 0 -258 -75t-96 -204q0 -81 29.5 -133t96.5 -93.5t230 -99.5q171 -59 257 -114.5t125.5 -126t39.5 -170.5z" />
+<glyph unicode="T" horiz-adv-x="1073" d="M588 0h-103v1366h-475v96h1053v-96h-475v-1366z" />
+<glyph unicode="U" horiz-adv-x="1473" d="M1282 1462v-946q0 -252 -146 -394t-407 -142q-254 0 -396.5 142.5t-142.5 397.5v942h103v-946q0 -211 117 -328.5t331 -117.5q209 0 324 115.5t115 320.5v956h102z" />
+<glyph unicode="V" horiz-adv-x="1182" d="M1071 1462h111l-547 -1462h-90l-545 1462h109l368 -995q84 -225 113 -338q20 75 79 233z" />
+<glyph unicode="W" horiz-adv-x="1827" d="M1372 0h-84l-321 1128q-40 139 -60 228q-16 -87 -45.5 -200t-322.5 -1156h-86l-402 1462h107l256 -942q15 -57 28 -105.5t23.5 -91t19 -82t15.5 -79.5q24 136 102 413l250 887h113l293 -1018q51 -176 73 -284q13 72 33.5 153t308.5 1149h103z" />
+<glyph unicode="X" horiz-adv-x="1102" d="M1102 0h-117l-432 682l-440 -682h-113l492 762l-447 700h115l395 -626l401 626h109l-453 -698z" />
+<glyph unicode="Y" horiz-adv-x="1081" d="M543 662l428 800h110l-487 -897v-565h-105v557l-489 905h117z" />
+<glyph unicode="Z" horiz-adv-x="1180" d="M1098 0h-1016v76l856 1290h-817v96h954v-76l-858 -1290h881v-96z" />
+<glyph unicode="[" horiz-adv-x="653" d="M602 -324h-428v1786h428v-94h-330v-1597h330v-95z" />
+<glyph unicode="\" horiz-adv-x="698" d="M127 1462l547 -1462h-103l-546 1462h102z" />
+<glyph unicode="]" horiz-adv-x="653" d="M51 -229h330v1597h-330v94h428v-1786h-428v95z" />
+<glyph unicode="^" d="M88 561l465 912h68l460 -912h-100l-395 791l-398 -791h-100z" />
+<glyph unicode="_" horiz-adv-x="842" d="M846 -266h-850v82h850v-82z" />
+<glyph unicode="`" horiz-adv-x="1182" d="M776 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="a" horiz-adv-x="1085" d="M842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5z" />
+<glyph unicode="b" horiz-adv-x="1219" d="M641 1108q228 0 343.5 -143.5t115.5 -419.5q0 -271 -121.5 -418t-341.5 -147q-116 0 -209 48t-147 136h-9l-28 -164h-62v1556h99v-391q0 -88 -4 -162l-3 -85h7q62 98 149.5 144t210.5 46zM639 1018q-192 0 -275 -110t-83 -363v-17q0 -246 86.5 -353t269.5 -107 q178 0 268 124.5t90 354.5q0 471 -356 471z" />
+<glyph unicode="c" horiz-adv-x="973" d="M616 -20q-233 0 -365 147t-132 410q0 270 137 420.5t375 150.5q141 0 270 -49l-27 -88q-141 47 -245 47q-200 0 -303 -123.5t-103 -355.5q0 -220 103 -344.5t288 -124.5q148 0 275 53v-92q-104 -51 -273 -51z" />
+<glyph unicode="d" horiz-adv-x="1219" d="M580 1108q118 0 204 -43t154 -147h6q-6 126 -6 247v391h98v-1556h-65l-25 166h-8q-124 -186 -356 -186q-225 0 -344 140t-119 408q0 282 118 431t343 149zM580 1018q-178 0 -267.5 -125t-89.5 -363q0 -462 359 -462q184 0 270 107t86 353v17q0 252 -84.5 362.5 t-273.5 110.5z" />
+<glyph unicode="e" horiz-adv-x="1124" d="M621 -20q-237 0 -369.5 146t-132.5 409q0 260 128 416.5t345 156.5q192 0 303 -134t111 -364v-80h-783q2 -224 104.5 -342t293.5 -118q93 0 163.5 13t178.5 56v-90q-92 -40 -170 -54.5t-172 -14.5zM592 1020q-157 0 -252 -103.5t-111 -298.5h672q0 189 -82 295.5 t-227 106.5z" />
+<glyph unicode="f" horiz-adv-x="614" d="M586 1001h-256v-1001h-99v1001h-202v58l202 37v84q0 200 73.5 293.5t240.5 93.5q90 0 180 -27l-23 -86q-80 25 -159 25q-116 0 -164.5 -68.5t-48.5 -222.5v-101h256v-86z" />
+<glyph unicode="g" horiz-adv-x="1071" d="M1030 1087v-69l-225 -14q90 -112 90 -246q0 -157 -104.5 -254.5t-280.5 -97.5q-74 0 -104 6q-59 -31 -90 -73t-31 -89q0 -52 39.5 -76t132.5 -24h190q177 0 271 -71.5t94 -211.5q0 -172 -139.5 -265.5t-397.5 -93.5q-205 0 -317.5 79t-112.5 220q0 112 69.5 186 t188.5 101q-49 21 -78.5 59.5t-29.5 88.5q0 109 139 192q-95 39 -148 122.5t-53 191.5q0 163 103.5 261.5t279.5 98.5q107 0 166 -21h348zM150 -184q0 -224 333 -224q428 0 428 273q0 98 -67 142t-217 44h-178q-299 0 -299 -235zM233 748q0 -126 76.5 -195.5t204.5 -69.5 q136 0 208.5 69t72.5 200q0 139 -74.5 208.5t-208.5 69.5q-130 0 -204.5 -74.5t-74.5 -207.5z" />
+<glyph unicode="h" horiz-adv-x="1208" d="M940 0v705q0 164 -69 238.5t-214 74.5q-195 0 -285.5 -98.5t-90.5 -319.5v-600h-99v1556h99v-495l-5 -139h7q61 98 154 142t231 44q370 0 370 -397v-711h-98z" />
+<glyph unicode="i" horiz-adv-x="463" d="M281 0h-99v1087h99v-1087zM168 1389q0 96 63 96q31 0 48.5 -25t17.5 -71q0 -45 -17.5 -71t-48.5 -26q-63 0 -63 97z" />
+<glyph unicode="j" horiz-adv-x="463" d="M37 -492q-80 0 -135 25v86q69 -20 129 -20q151 0 151 176v1312h99v-1298q0 -135 -63.5 -208t-180.5 -73zM168 1389q0 96 63 96q31 0 48.5 -25t17.5 -71q0 -45 -17.5 -71t-48.5 -26q-63 0 -63 97z" />
+<glyph unicode="k" horiz-adv-x="991" d="M279 477l555 610h120l-428 -464l465 -623h-119l-413 549l-178 -162v-387h-99v1556h99v-780l-7 -299h5z" />
+<glyph unicode="l" horiz-adv-x="463" d="M281 0h-99v1556h99v-1556z" />
+<glyph unicode="m" horiz-adv-x="1808" d="M1540 0v713q0 159 -62 232t-190 73q-167 0 -247 -92t-80 -289v-637h-101v743q0 275 -252 275q-171 0 -249 -99.5t-78 -318.5v-600h-99v1087h82l21 -149h6q45 81 128 125.5t183 44.5q257 0 330 -193h4q53 93 142.5 143t203.5 50q178 0 267 -95t89 -302v-711h-98z" />
+<glyph unicode="n" horiz-adv-x="1208" d="M940 0v705q0 164 -69 238.5t-214 74.5q-195 0 -285.5 -98.5t-90.5 -319.5v-600h-99v1087h84l19 -149h6q106 170 377 170q370 0 370 -397v-711h-98z" />
+<glyph unicode="o" horiz-adv-x="1200" d="M1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5t-97.5 -349.5z " />
+<glyph unicode="p" horiz-adv-x="1219" d="M647 -20q-251 0 -366 188h-7l3 -84q4 -74 4 -162v-414h-99v1579h84l19 -155h6q112 176 358 176q220 0 335.5 -144.5t115.5 -420.5q0 -268 -121.5 -415.5t-331.5 -147.5zM645 68q167 0 258.5 124t91.5 347q0 479 -346 479q-190 0 -279 -104.5t-89 -340.5v-32 q0 -255 85.5 -364t278.5 -109z" />
+<glyph unicode="q" horiz-adv-x="1219" d="M569 -20q-214 0 -332 142t-118 410q0 275 118 425.5t338 150.5q236 0 353 -174h6l18 153h84v-1579h-98v414q0 122 6 248h-6q-118 -190 -369 -190zM571 68q198 0 282.5 109t84.5 366v12q0 245 -85 354t-271 109q-176 0 -267.5 -124t-91.5 -364q0 -229 89.5 -345.5 t258.5 -116.5z" />
+<glyph unicode="r" horiz-adv-x="797" d="M610 1108q69 0 148 -14l-19 -95q-68 17 -141 17q-139 0 -228 -118t-89 -298v-600h-99v1087h84l10 -196h7q67 120 143 168.5t184 48.5z" />
+<glyph unicode="s" horiz-adv-x="954" d="M856 283q0 -146 -111 -224.5t-315 -78.5q-218 0 -346 67v107q164 -82 346 -82q161 0 244.5 53.5t83.5 142.5q0 82 -66.5 138t-218.5 110q-163 59 -229 101.5t-99.5 96t-33.5 130.5q0 122 102.5 193t286.5 71q176 0 334 -66l-37 -90q-160 66 -297 66q-133 0 -211 -44 t-78 -122q0 -85 60.5 -136t236.5 -114q147 -53 214 -95.5t100.5 -96.5t33.5 -127z" />
+<glyph unicode="t" horiz-adv-x="686" d="M469 68q94 0 164 16v-80q-72 -24 -166 -24q-144 0 -212.5 77t-68.5 242v702h-161v58l161 45l50 246h51v-263h319v-86h-319v-688q0 -125 44 -185t138 -60z" />
+<glyph unicode="u" horiz-adv-x="1208" d="M268 1087v-704q0 -164 69 -238.5t214 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-106 -170 -377 -170q-371 0 -371 397v710h98z" />
+<glyph unicode="v" horiz-adv-x="940" d="M420 0l-420 1087h102l281 -739q56 -142 84 -248h6q41 136 84 250l281 737h102l-420 -1087h-100z" />
+<glyph unicode="w" horiz-adv-x="1481" d="M1051 0l-238 727q-23 74 -59 217h-6l-21 -74l-45 -145l-242 -725h-98l-311 1087h106l174 -630q61 -234 80 -344h6q59 234 86 311l224 663h90l213 -661q72 -235 88 -311h6q8 65 80 348l166 624h100l-295 -1087h-104z" />
+<glyph unicode="x" horiz-adv-x="1020" d="M449 559l-379 528h114l324 -458l321 458h109l-373 -528l400 -559h-115l-342 485l-344 -485h-109z" />
+<glyph unicode="y" horiz-adv-x="940" d="M0 1087h102l230 -610q105 -281 133 -379h6q42 129 137 385l230 604h102l-487 -1263q-59 -154 -99 -208t-93.5 -81t-129.5 -27q-57 0 -127 21v86q58 -16 125 -16q51 0 90 24t70.5 74.5t73 160t53.5 142.5z" />
+<glyph unicode="z" horiz-adv-x="944" d="M858 0h-776v63l645 936h-598v88h727v-63l-649 -936h651v-88z" />
+<glyph unicode="{" horiz-adv-x="723" d="M389 -27q0 -102 59.5 -152.5t202.5 -53.5v-91q-195 0 -277.5 75t-82.5 231v337q0 205 -230 209v80q122 2 176 51t54 148v350q0 299 360 305v-90q-138 -5 -200 -58t-62 -157v-305q0 -130 -44 -194t-142 -85v-8q97 -20 141.5 -83.5t44.5 -186.5v-322z" />
+<glyph unicode="|" horiz-adv-x="1108" d="M508 1561h92v-2067h-92v2067z" />
+<glyph unicode="}" horiz-adv-x="723" d="M334 295q0 123 44.5 186.5t141.5 83.5v8q-97 20 -141.5 84t-44.5 195v305q0 103 -61.5 156.5t-200.5 58.5v90q174 0 267 -77.5t93 -227.5v-350q0 -100 54.5 -148.5t175.5 -50.5v-80q-230 -4 -230 -209v-337q0 -155 -82.5 -230.5t-277.5 -75.5v91q141 2 201.5 52.5 t60.5 153.5v322z" />
+<glyph unicode="~" d="M334 745q-49 0 -108 -30.5t-115 -89.5v94q108 110 233 110q61 0 115 -13.5t155 -57.5q126 -58 220 -58q56 0 109.5 30.5t115.5 94.5v-96q-48 -49 -104.5 -81t-129.5 -32q-116 0 -270 72q-124 57 -221 57z" />
+<glyph unicode="&#xa1;" horiz-adv-x="492" d="M215 711h61l29 -1086h-119zM166 1010q0 98 80 98q82 0 82 -98q0 -53 -23.5 -76t-58.5 -23q-34 0 -57 23t-23 76z" />
+<glyph unicode="&#xa2;" d="M602 190q-186 30 -288.5 175t-102.5 380q0 232 102.5 381.5t288.5 182.5v174h82v-166h14q131 0 275 -55l-31 -84q-134 51 -237 51q-187 0 -288.5 -122.5t-101.5 -358.5q0 -225 100.5 -349.5t280.5 -124.5q131 0 267 58v-92q-110 -56 -267 -56h-12v-204h-82v210z" />
+<glyph unicode="&#xa3;" d="M412 676v-256q0 -116 -35 -196t-113 -128h809v-96h-995v84q110 21 171.5 110t61.5 224v258h-211v82h211v297q0 204 98 315t281 111q175 0 330 -68l-35 -86q-157 66 -295 66q-141 0 -209.5 -81t-68.5 -253v-301h411v-82h-411z" />
+<glyph unicode="&#xa4;" d="M991 723q0 -151 -90 -256l139 -141l-59 -60l-137 142q-110 -93 -260 -93q-153 0 -260 93l-138 -142l-59 60l139 141q-90 106 -90 256q0 147 90 258l-139 141l59 60l138 -142q103 93 260 93q155 0 260 -93l137 142l59 -60l-139 -141q90 -111 90 -258zM584 395 q134 0 228.5 95.5t94.5 232.5q0 136 -95 233t-228 97q-134 0 -229 -97t-95 -233t94.5 -232t229.5 -96z" />
+<glyph unicode="&#xa5;" d="M586 666l428 796h110l-432 -788h283v-82h-338v-205h338v-82h-338v-305h-105v305h-337v82h337v205h-337v82h278l-430 788h117z" />
+<glyph unicode="&#xa6;" horiz-adv-x="1108" d="M508 1561h92v-764h-92v764zM508 258h92v-764h-92v764z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1057" d="M145 813q0 83 50.5 152.5t138.5 107.5q-86 47 -125 102t-39 136q0 117 101.5 183.5t275.5 66.5q175 0 336 -64l-35 -80q-91 34 -158.5 47t-144.5 13q-134 0 -205.5 -44.5t-71.5 -119.5q0 -54 25.5 -88.5t85.5 -65.5t188 -74q192 -64 264 -132.5t72 -170.5 q0 -173 -186 -274q86 -42 129 -96t43 -136q0 -135 -113 -207.5t-311 -72.5q-92 0 -171 15t-165 52v95q182 -78 332 -78q162 0 247 49.5t85 140.5q0 55 -25 87.5t-88.5 65.5t-190.5 79q-200 73 -272 141.5t-72 169.5zM246 825q0 -65 31.5 -104t105.5 -75t250 -99 q82 41 126 98t44 121q0 62 -32 102t-108.5 77t-236.5 87q-81 -23 -130.5 -79t-49.5 -128z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1182" d="M336 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM717 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M897 1092q-142 0 -222.5 -94.5t-80.5 -264.5q0 -186 74.5 -275t220.5 -89q84 0 198 43v-88q-102 -45 -208 -45q-187 0 -288.5 115t-101.5 331q0 208 111 332.5t297 124.5q119 0 227 -52l-37 -83q-98 45 -190 45zM100 731q0 200 100 375t275 276t377 101q200 0 375 -100 t276 -275t101 -377q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM193 731q0 -178 88.5 -329.5t240.5 -240.5t330 -89t329.5 88.5t240.5 240.5t89 330q0 174 -85.5 325t-239 243t-334.5 92q-176 0 -328.5 -88.5t-241.5 -242.5t-89 -329z " />
+<glyph unicode="&#xaa;" horiz-adv-x="686" d="M512 813l-25 72q-84 -84 -202 -84q-95 0 -151 49t-56 139q0 100 80 151.5t241 59.5l95 4v43q0 77 -38 114.5t-106 37.5q-87 0 -196 -49l-33 73q117 56 231 56q228 0 228 -215v-451h-68zM168 993q0 -54 35 -85t96 -31q90 0 142.5 50t52.5 142v64l-88 -5 q-116 -6 -177 -36.5t-61 -98.5z" />
+<glyph unicode="&#xab;" horiz-adv-x="885" d="M82 543l309 393l62 -43l-254 -363l254 -362l-62 -43l-309 391v27zM442 543l310 393l61 -43l-254 -363l254 -362l-61 -43l-310 391v27z" />
+<glyph unicode="&#xac;" d="M1038 764v-494h-82v412h-845v82h927z" />
+<glyph unicode="&#xad;" horiz-adv-x="659" d="M92 512zM92 512v82h475v-82h-475z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M709 731h112q91 0 143 46.5t52 135.5q0 172 -197 172h-110v-354zM1120 918q0 -79 -38.5 -139.5t-110.5 -94.5l237 -393h-121l-210 360h-168v-360h-101v880h211q143 0 222 -62t79 -191zM100 731q0 200 100 375t275 276t377 101q200 0 375 -100t276 -275t101 -377 q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM193 731q0 -178 88.5 -329.5t240.5 -240.5t330 -89t329.5 88.5t240.5 240.5t89 330q0 174 -85.5 325t-239 243t-334.5 92q-176 0 -328.5 -88.5t-241.5 -242.5t-89 -329z" />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M1030 1556h-1036v82h1036v-82z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M139 1184q0 132 86.5 215.5t212.5 83.5t212.5 -83.5t86.5 -215.5t-86.5 -215.5t-212.5 -83.5q-130 0 -214.5 83t-84.5 216zM229 1184q0 -91 61 -154t148 -63q86 0 147.5 62t61.5 155q0 92 -60 154.5t-149 62.5q-90 0 -149.5 -64t-59.5 -153z" />
+<glyph unicode="&#xb1;" d="M111 1zM111 1v82h948v-82h-948zM625 764h434v-82h-434v-432h-82v432h-432v82h432v434h82v-434z" />
+<glyph unicode="&#xb2;" horiz-adv-x="688" d="M629 586h-576v78l242 237q125 121 172 193t47 149q0 71 -46.5 112.5t-123.5 41.5q-108 0 -217 -82l-49 65q119 103 270 103q124 0 194 -63.5t70 -174.5q0 -47 -13 -89t-40 -85.5t-68.5 -90t-308.5 -306.5h447v-88z" />
+<glyph unicode="&#xb3;" horiz-adv-x="688" d="M616 1260q0 -78 -44 -131.5t-117 -75.5q186 -45 186 -211q0 -130 -88.5 -201.5t-247.5 -71.5q-144 0 -264 60v88q136 -62 266 -62q115 0 174.5 49t59.5 136q0 83 -59.5 122t-178.5 39h-131v84h135q105 0 158 43.5t53 120.5q0 67 -47 107.5t-127 40.5q-128 0 -246 -78 l-47 70q130 94 293 94q127 0 199.5 -60t72.5 -163z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1182" d="M393 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1221" d="M281 1087v-704q0 -164 69 -238.5t213 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-50 -77 -150 -123.5t-217 -46.5q-99 0 -167.5 27.5t-119.5 84.5q5 -92 5 -170v-414h-99v1579h99z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1106 -260h-100v1722h-228v-1722h-100v819q-64 -18 -146 -18q-216 0 -317.5 125t-101.5 376q0 260 109 387t341 127h543v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="487" d="M162 623zM162 721q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98z" />
+<glyph unicode="&#xb8;" horiz-adv-x="420" d="M393 -291q0 -100 -67.5 -150.5t-188.5 -50.5q-68 0 -94 11v88q30 -10 92 -10q78 0 119 28t41 80q0 94 -193 121l93 174h96l-66 -117q168 -37 168 -174z" />
+<glyph unicode="&#xb9;" horiz-adv-x="688" d="M350 1462h92v-876h-98v547q0 99 12 233q-26 -23 -233 -145l-47 77z" />
+<glyph unicode="&#xba;" horiz-adv-x="739" d="M670 1141q0 -161 -80 -250.5t-223 -89.5t-220 86t-77 254q0 162 78 250t223 88q142 0 220.5 -87t78.5 -251zM160 1141q0 -264 209 -264t209 264q0 131 -50 194.5t-159 63.5t-159 -63.5t-50 -194.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="885" d="M803 518l-309 -393l-62 43l254 362l-254 363l62 43l309 -391v-27zM442 518l-309 -393l-61 43l254 362l-254 363l61 43l309 -391v-27z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1516" d="M59 0zM333 1462h92v-876h-98v547q0 99 12 233q-26 -23 -233 -145l-47 77zM1148 1462l-811 -1462h-94l811 1462h94zM1392 242h-129v-241h-90v241h-413v60l407 581h96v-563h129v-78zM1173 320v221q0 132 8 232q-6 -12 -21.5 -35.5t-295.5 -417.5h309z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1516" d="M11 0zM285 1462h92v-876h-98v547q0 99 12 233q-26 -23 -233 -145l-47 77zM1073 1462l-811 -1462h-94l811 1462h94zM1403 1h-576v78l242 237q125 121 172 193t47 149q0 71 -46.5 112.5t-123.5 41.5q-108 0 -217 -82l-49 65q119 103 270 103q124 0 194 -63.5t70 -174.5 q0 -47 -13 -89t-40 -85.5t-68.5 -90t-308.5 -306.5h447v-88z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1516" d="M41 0zM616 1260q0 -78 -44 -131.5t-117 -75.5q186 -45 186 -211q0 -130 -88.5 -201.5t-247.5 -71.5q-144 0 -264 60v88q136 -62 266 -62q115 0 174.5 49t59.5 136q0 83 -59.5 122t-178.5 39h-131v84h135q105 0 158 43.5t53 120.5q0 67 -47 107.5t-127 40.5 q-128 0 -246 -78l-47 70q130 94 293 94q127 0 199.5 -60t72.5 -163zM1300 1462l-811 -1462h-94l811 1462h94zM1495 242h-129v-241h-90v241h-413v60l407 581h96v-563h129v-78zM1276 320v221q0 132 8 232q-6 -12 -21.5 -35.5t-295.5 -417.5h309z" />
+<glyph unicode="&#xbf;" horiz-adv-x="862" d="M569 711v-37q0 -125 -39.5 -204.5t-136.5 -164.5l-90 -79q-73 -61 -104 -120.5t-31 -138.5q0 -124 82 -200t221 -76q125 0 233 46l64 27l37 -79q-111 -48 -185.5 -64t-152.5 -16q-184 0 -288.5 99t-104.5 269q0 70 20 124t58.5 102t171.5 159q64 53 98.5 98.5t49.5 94 t15 145.5v15h82zM440 1010q0 98 80 98q82 0 82 -98q0 -53 -23.5 -76t-58.5 -23q-34 0 -57 23t-23 76z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM720 1579h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM504 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM328 1595q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM784 1581q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59 q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM367 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM748 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1229" d="M0 0zM911 516h-594l-204 -516h-113l588 1468h65l576 -1468h-115zM354 608h523l-199 527q-25 62 -60 172q-27 -96 -59 -174zM836 1610q0 -97 -60 -155t-157 -58t-157 58t-60 155q0 94 60 152.5t157 58.5t157 -59t60 -152zM482 1610q0 -66 37.5 -103.5t99.5 -37.5 t99.5 37.5t37.5 103.5q0 64 -39 101.5t-98 37.5q-62 0 -99.5 -38t-37.5 -101z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1653" d="M1528 0h-717v516h-475l-227 -516h-111l653 1462h877v-94h-615v-553h576v-94h-576v-627h615v-94zM377 608h434v760h-100z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1272" d="M129 0zM831 1391q-275 0 -433 -176t-158 -482q0 -313 149 -486t426 -173q184 0 338 47v-90q-145 -51 -362 -51q-308 0 -485 199t-177 556q0 223 84.5 393t243 262.5t368.5 92.5q214 0 383 -80l-41 -92q-160 80 -336 80zM911 -291q0 -100 -67.5 -150.5t-188.5 -50.5 q-68 0 -94 11v88q30 -10 92 -10q78 0 119 28t41 80q0 94 -193 121l93 174h96l-66 -117q168 -37 168 -174z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1130" d="M207 0zM1006 0h-799v1462h799v-94h-697v-553h658v-94h-658v-627h697v-94zM697 1579h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1130" d="M207 0zM1006 0h-799v1462h799v-94h-697v-553h658v-94h-658v-627h697v-94zM463 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xca;" horiz-adv-x="1130" d="M207 0zM1006 0h-799v1462h799v-94h-697v-553h658v-94h-658v-627h697v-94zM315 1595q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1130" d="M207 0zM1006 0h-799v1462h799v-94h-697v-553h658v-94h-658v-627h697v-94zM354 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM735 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xcc;" horiz-adv-x="516" d="M0 0zM207 0v1462h102v-1462h-102zM320 1579h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xcd;" horiz-adv-x="516" d="M191 0zM207 0v1462h102v-1462h-102zM191 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xce;" horiz-adv-x="516" d="M0 0zM207 0v1462h102v-1462h-102zM-32 1595q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xcf;" horiz-adv-x="516" d="M5 0zM207 0v1462h102v-1462h-102zM5 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM386 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1466" d="M1317 745q0 -368 -193 -556.5t-567 -188.5h-350v678h-160v94h160v690h395q350 0 532.5 -183t182.5 -534zM1206 741q0 314 -159.5 472.5t-468.5 158.5h-269v-600h406v-94h-406v-588h242q655 0 655 651z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1477" d="M207 0zM1270 0h-103l-866 1298h-8q12 -232 12 -350v-948h-98v1462h102l865 -1296h6q-9 180 -9 342v954h99v-1462zM897 1581q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59 q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1565" d="M129 0zM1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483zM885 1579h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1565" d="M129 0zM1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483zM686 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1565" d="M129 0zM1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483zM492 1595q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1565" d="M129 0zM1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483zM940 1581q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1565" d="M129 0zM1436 733q0 -348 -174 -550.5t-480 -202.5q-305 0 -479 202.5t-174 552.5q0 349 175.5 549.5t479.5 200.5q306 0 479 -201.5t173 -550.5zM240 733q0 -314 140 -485.5t402 -171.5q264 0 403.5 170t139.5 487q0 316 -139.5 484.5t-401.5 168.5q-261 0 -402.5 -170 t-141.5 -483zM529 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM910 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xd7;" d="M584 780l409 408l58 -58l-408 -407l406 -408l-58 -57l-407 408l-406 -408l-57 57l405 408l-407 407l57 58z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1565" d="M1436 733q0 -348 -174 -550.5t-480 -202.5q-236 0 -395 120l-86 -120l-74 59l90 127q-188 200 -188 569q0 349 175.5 549.5t479.5 200.5q232 0 392 -121l108 152l72 -60l-111 -153q191 -207 191 -570zM1325 733q0 315 -139 486l-742 -1037q133 -106 338 -106 q264 0 403.5 170t139.5 487zM240 733q0 -312 139 -483l739 1034q-133 102 -334 102q-261 0 -402.5 -170t-141.5 -483z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1473" d="M190 0zM1282 1462v-946q0 -252 -146 -394t-407 -142q-254 0 -396.5 142.5t-142.5 397.5v942h103v-946q0 -211 117 -328.5t331 -117.5q209 0 324 115.5t115 320.5v956h102zM833 1579h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xda;" horiz-adv-x="1473" d="M190 0zM1282 1462v-946q0 -252 -146 -394t-407 -142q-254 0 -396.5 142.5t-142.5 397.5v942h103v-946q0 -211 117 -328.5t331 -117.5q209 0 324 115.5t115 320.5v956h102zM633 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1473" d="M190 0zM1282 1462v-946q0 -252 -146 -394t-407 -142q-254 0 -396.5 142.5t-142.5 397.5v942h103v-946q0 -211 117 -328.5t331 -117.5q209 0 324 115.5t115 320.5v956h102zM444 1595q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207 q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1473" d="M190 0zM1282 1462v-946q0 -252 -146 -394t-407 -142q-254 0 -396.5 142.5t-142.5 397.5v942h103v-946q0 -211 117 -328.5t331 -117.5q209 0 324 115.5t115 320.5v956h102zM481 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM862 1727q0 46 15.5 66 t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1081" d="M0 0zM543 662l428 800h110l-487 -897v-565h-105v557l-489 905h117zM434 1595q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xde;" horiz-adv-x="1198" d="M1087 778q0 -212 -144 -325t-408 -113h-226v-340h-102v1462h102v-264h256q522 0 522 -420zM309 428h201q247 0 357 81.5t110 264.5q0 169 -104 250.5t-322 81.5h-242v-678z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1194" d="M961 1284q0 -139 -139 -250q-81 -64 -110.5 -100.5t-29.5 -75.5q0 -44 14.5 -68t51.5 -57t102 -78q106 -75 151.5 -124.5t68 -103t22.5 -120.5q0 -156 -88 -241.5t-246 -85.5q-95 0 -174.5 18.5t-126.5 48.5v107q65 -38 148.5 -62t152.5 -24q114 0 174.5 54.5t60.5 160.5 q0 83 -39 144t-149 136q-127 87 -175 147t-48 146q0 60 32.5 110t106.5 108q74 57 106.5 105.5t32.5 106.5q0 93 -70 143t-202 50q-145 0 -226 -69t-81 -196v-1214h-99v1206q0 173 103.5 267t292.5 94q188 0 285.5 -72.5t97.5 -210.5z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM638 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM422 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM251 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM697 1243q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5 h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM282 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM663 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1085" d="M98 0zM842 0l-25 172h-8q-82 -105 -168.5 -148.5t-204.5 -43.5q-160 0 -249 82t-89 227q0 159 132.5 247t383.5 93l207 6v72q0 155 -63 234t-203 79q-151 0 -313 -84l-37 86q179 84 354 84q179 0 267.5 -93t88.5 -290v-723h-73zM442 70q174 0 274.5 99.5t100.5 276.5v107 l-190 -8q-229 -11 -326.5 -71.5t-97.5 -188.5q0 -102 62.5 -158.5t176.5 -56.5zM759 1456q0 -97 -60 -155t-157 -58t-157 58t-60 155q0 94 60 152.5t157 58.5t157 -59t60 -152zM405 1456q0 -66 37.5 -103.5t99.5 -37.5t99.5 37.5t37.5 103.5q0 64 -39 101.5t-98 37.5 q-62 0 -99.5 -38t-37.5 -101z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1731" d="M1243 -20q-295 0 -397 256q-68 -133 -168 -194.5t-252 -61.5q-156 0 -242 82.5t-86 226.5q0 154 125 243t377 97l201 6v72q0 155 -61.5 234t-198.5 79q-148 0 -305 -84l-37 86q173 84 346 84q261 0 325 -211q111 213 347 213q184 0 289.5 -134.5t105.5 -363.5v-80h-715 q0 -460 348 -460q85 0 150 12t174 57v-90q-92 -41 -165 -55t-161 -14zM434 70q169 0 266 99.5t97 276.5v107l-187 -8q-219 -11 -313 -71.5t-94 -188.5q0 -102 61 -158.5t170 -56.5zM1217 1020q-284 0 -314 -402h604q0 188 -77.5 295t-212.5 107z" />
+<glyph unicode="&#xe7;" horiz-adv-x="973" d="M119 0zM616 -20q-233 0 -365 147t-132 410q0 270 137 420.5t375 150.5q141 0 270 -49l-27 -88q-141 47 -245 47q-200 0 -303 -123.5t-103 -355.5q0 -220 103 -344.5t288 -124.5q148 0 275 53v-92q-104 -51 -273 -51zM723 -291q0 -100 -67.5 -150.5t-188.5 -50.5 q-68 0 -94 11v88q30 -10 92 -10q78 0 119 28t41 80q0 94 -193 121l93 174h96l-66 -117q168 -37 168 -174z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1124" d="M119 0zM621 -20q-237 0 -369.5 146t-132.5 409q0 260 128 416.5t345 156.5q192 0 303 -134t111 -364v-80h-783q2 -224 104.5 -342t293.5 -118q93 0 163.5 13t178.5 56v-90q-92 -40 -170 -54.5t-172 -14.5zM592 1020q-157 0 -252 -103.5t-111 -298.5h672q0 189 -82 295.5 t-227 106.5zM685 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1124" d="M119 0zM621 -20q-237 0 -369.5 146t-132.5 409q0 260 128 416.5t345 156.5q192 0 303 -134t111 -364v-80h-783q2 -224 104.5 -342t293.5 -118q93 0 163.5 13t178.5 56v-90q-92 -40 -170 -54.5t-172 -14.5zM592 1020q-157 0 -252 -103.5t-111 -298.5h672q0 189 -82 295.5 t-227 106.5zM452 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xea;" horiz-adv-x="1124" d="M119 0zM621 -20q-237 0 -369.5 146t-132.5 409q0 260 128 416.5t345 156.5q192 0 303 -134t111 -364v-80h-783q2 -224 104.5 -342t293.5 -118q93 0 163.5 13t178.5 56v-90q-92 -40 -170 -54.5t-172 -14.5zM592 1020q-157 0 -252 -103.5t-111 -298.5h672q0 189 -82 295.5 t-227 106.5zM290 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1124" d="M119 0zM621 -20q-237 0 -369.5 146t-132.5 409q0 260 128 416.5t345 156.5q192 0 303 -134t111 -364v-80h-783q2 -224 104.5 -342t293.5 -118q93 0 163.5 13t178.5 56v-90q-92 -40 -170 -54.5t-172 -14.5zM592 1020q-157 0 -252 -103.5t-111 -298.5h672q0 189 -82 295.5 t-227 106.5zM331 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM712 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xec;" horiz-adv-x="463" d="M0 0zM281 0h-99v1087h99v-1087zM349 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xed;" horiz-adv-x="463" d="M107 0zM281 0h-99v1087h99v-1087zM107 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xee;" horiz-adv-x="463" d="M0 0zM281 0h-99v1087h99v-1087zM-58 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xef;" horiz-adv-x="463" d="M0 0zM281 0h-99v1087h99v-1087zM-21 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM360 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1174" d="M1055 559q0 -276 -124 -427.5t-349 -151.5q-214 0 -339.5 130t-125.5 361q0 228 126.5 357.5t342.5 129.5q108 0 187.5 -33t148.5 -96l4 2q-64 270 -269 459l-270 -157l-49 77l244 146q-86 62 -199 119l45 81q147 -69 248 -145l225 137l49 -84l-202 -121 q154 -151 230.5 -353t76.5 -431zM950 557q0 146 -97 228.5t-267 82.5q-185 0 -275 -100.5t-90 -304.5q0 -186 94.5 -289.5t268.5 -103.5q179 0 272.5 123t93.5 364z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1208" d="M182 0zM940 0v705q0 164 -69 238.5t-214 74.5q-195 0 -285.5 -98.5t-90.5 -319.5v-600h-99v1087h84l19 -149h6q106 170 377 170q370 0 370 -397v-711h-98zM779 1243q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5 t137 63.5q48 0 88 -25t82 -59q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1200" d="M119 0zM1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5 t-97.5 -349.5zM718 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1200" d="M119 0zM1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5 t-97.5 -349.5zM499 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1200" d="M119 0zM1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5 t-97.5 -349.5zM309 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1200" d="M119 0zM1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5 t-97.5 -349.5zM761 1243q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1200" d="M119 0zM1081 545q0 -266 -129 -415.5t-356 -149.5q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q224 0 351.5 -150.5t127.5 -412.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5t278.5 125.5t98.5 349.5q0 225 -99.5 349t-279.5 124t-277.5 -123.5 t-97.5 -349.5zM346 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM727 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xf7;" d="M111 682v82h948v-82h-948zM504 1075q0 99 80 99q82 0 82 -99q0 -52 -23.5 -75t-58.5 -23q-34 0 -57 23t-23 75zM504 371q0 98 80 98q82 0 82 -98q0 -53 -23.5 -76t-58.5 -23q-34 0 -57 23t-23 76z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1200" d="M1081 545q0 -266 -129 -415.5t-356 -149.5q-173 0 -291 98l-86 -113l-72 58l93 120q-121 153 -121 402q0 266 129 414.5t354 148.5q179 0 301 -104l96 124l74 -55l-104 -137q112 -147 112 -391zM223 545q0 -200 78 -322l543 705q-98 90 -246 90q-180 0 -277.5 -123.5 t-97.5 -349.5zM977 545q0 190 -72 309l-543 -702q94 -82 238 -82q180 0 278.5 125.5t98.5 349.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1208" d="M170 0zM268 1087v-704q0 -164 69 -238.5t214 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-106 -170 -377 -170q-371 0 -371 397v710h98zM687 1241h-69q-96 79 -188.5 171.5t-125.5 139.5v17h142q26 -48 98.5 -142t142.5 -170v-16z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1208" d="M170 0zM268 1087v-704q0 -164 69 -238.5t214 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-106 -170 -377 -170q-371 0 -371 397v710h98zM495 1257q73 79 144.5 171.5t97.5 140.5h141v-17q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1208" d="M170 0zM268 1087v-704q0 -164 69 -238.5t214 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-106 -170 -377 -170q-371 0 -371 397v710h98zM313 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70 v16z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1208" d="M170 0zM268 1087v-704q0 -164 69 -238.5t214 -74.5q194 0 285.5 98t91.5 319v600h98v-1087h-84l-18 150h-6q-106 -170 -377 -170q-371 0 -371 397v710h98zM350 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM731 1389q0 46 15.5 66t47.5 20q64 0 64 -86 t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#xfd;" horiz-adv-x="940" d="M0 0zM0 1087h102l230 -610q105 -281 133 -379h6q42 129 137 385l230 604h102l-487 -1263q-59 -154 -99 -208t-93.5 -81t-129.5 -27q-57 0 -127 21v86q58 -16 125 -16q51 0 90 24t70.5 74.5t73 160t53.5 142.5zM361 1257q73 79 144.5 171.5t97.5 140.5h141v-17 q-36 -52 -122.5 -138t-190.5 -173h-70v16z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1219" d="M281 918q114 190 368 190q220 0 335.5 -144.5t115.5 -420.5q0 -268 -121.5 -415.5t-331.5 -147.5q-251 0 -366 188h-7l3 -84q4 -74 4 -162v-414h-99v2048h99v-391l-7 -247h7zM645 68q167 0 258.5 124t91.5 347q0 479 -348 479q-193 0 -279.5 -105t-86.5 -354v-18 q0 -255 85.5 -364t278.5 -109z" />
+<glyph unicode="&#xff;" horiz-adv-x="940" d="M0 0zM0 1087h102l230 -610q105 -281 133 -379h6q42 129 137 385l230 604h102l-487 -1263q-59 -154 -99 -208t-93.5 -81t-129.5 -27q-57 0 -127 21v86q58 -16 125 -16q51 0 90 24t70.5 74.5t73 160t53.5 142.5zM214 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86 q-63 0 -63 86zM595 1389q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#x131;" horiz-adv-x="463" d="M281 0h-99v1087h99v-1087z" />
+<glyph unicode="&#x152;" horiz-adv-x="1839" d="M1714 0h-756q-76 -16 -176 -16q-305 0 -479 200t-174 551q0 347 174.5 545.5t480.5 198.5q78 0 183 -17h747v-94h-655v-553h616v-94h-616v-627h655v-94zM782 80q109 0 174 18v1266q-62 16 -172 16q-262 0 -403 -167.5t-141 -479.5q0 -315 140.5 -484t401.5 -169z" />
+<glyph unicode="&#x153;" horiz-adv-x="1942" d="M1438 -20q-156 0 -266.5 67.5t-165.5 198.5q-59 -128 -158 -197t-252 -69q-143 0 -252 69t-167 198t-58 298q0 266 129 414.5t354 148.5q151 0 251 -70t157 -209q110 279 399 279q192 0 303 -134t111 -364v-80h-762q2 -230 100.5 -345t276.5 -115q93 0 163.5 13t178.5 56 v-90q-92 -40 -170 -54.5t-172 -14.5zM223 545q0 -224 98.5 -349.5t278.5 -125.5q174 0 265 122.5t91 352.5q0 224 -93 348.5t-265 124.5q-180 0 -277.5 -123.5t-97.5 -349.5zM1409 1020q-155 0 -242 -104t-102 -298h653q0 189 -82 295.5t-227 106.5z" />
+<glyph unicode="&#x178;" horiz-adv-x="1081" d="M0 0zM543 662l428 800h110l-487 -897v-565h-105v557l-489 905h117zM288 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86zM669 1727q0 46 15.5 66t47.5 20q64 0 64 -86t-64 -86q-63 0 -63 86z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1182" d="M299 1257q62 67 131.5 156t110.5 156h98q68 -120 242 -312v-16h-70q-122 101 -221 207q-108 -114 -221 -207h-70v16z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M805 1456q0 -97 -60 -155t-157 -58t-157 58t-60 155q0 94 60 152.5t157 58.5t157 -59t60 -152zM451 1456q0 -66 37.5 -103.5t99.5 -37.5t99.5 37.5t37.5 103.5q0 64 -39 101.5t-98 37.5q-62 0 -99.5 -38t-37.5 -101z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1182" d="M780 1243q-36 0 -75 18.5t-101 71.5q-32 26 -62.5 46t-62.5 20q-45 0 -75 -34.5t-48 -121.5h-73q10 111 63 174.5t137 63.5q48 0 88 -25t82 -59q34 -28 66 -50t61 -22q46 0 77 36.5t48 119.5h76q-16 -116 -69 -177t-132 -61z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="659" d="M92 512v82h475v-82h-475z" />
+<glyph unicode="&#x2011;" horiz-adv-x="659" d="M92 512v82h475v-82h-475z" />
+<glyph unicode="&#x2012;" horiz-adv-x="659" d="M92 512v82h475v-82h-475z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M82 512v82h860v-82h-860z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M82 512v82h1884v-82h-1884z" />
+<glyph unicode="&#x2018;" horiz-adv-x="297" d="M41 961l-12 20q32 112 81.5 251t92.5 230h65q-30 -101 -64.5 -257t-45.5 -244h-117z" />
+<glyph unicode="&#x2019;" horiz-adv-x="297" d="M256 1462l12 -20q-75 -265 -174 -481h-65q29 96 61 241.5t49 259.5h117z" />
+<glyph unicode="&#x201a;" horiz-adv-x="451" d="M68 0zM295 238l12 -20q-75 -265 -174 -481h-65q29 96 61 241.5t49 259.5h117z" />
+<glyph unicode="&#x201c;" horiz-adv-x="614" d="M358 961l-12 20q34 120 83 255t91 226h66q-30 -98 -63 -248.5t-48 -252.5h-117zM41 961l-12 20q32 112 81.5 251t92.5 230h65q-30 -101 -64.5 -257t-45.5 -244h-117z" />
+<glyph unicode="&#x201d;" horiz-adv-x="614" d="M256 1462l12 -20q-75 -265 -174 -481h-65q29 96 61 241.5t49 259.5h117zM573 1462l13 -20q-36 -128 -85 -261t-89 -220h-66q30 98 63 248.5t48 252.5h116z" />
+<glyph unicode="&#x201e;" horiz-adv-x="768" d="M68 0zM295 238l12 -20q-75 -265 -174 -481h-65q29 96 61 241.5t49 259.5h117zM612 238l13 -20q-36 -128 -85 -261t-89 -220h-66q30 98 63 248.5t48 252.5h116z" />
+<glyph unicode="&#x2022;" horiz-adv-x="770" d="M231 748q0 89 40.5 134.5t113.5 45.5t113.5 -47t40.5 -133q0 -85 -41 -133t-113 -48t-113 47t-41 134z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1466" d="M162 0zM162 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98zM651 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98zM1141 78q0 98 80 98q82 0 82 -98t-82 -98q-80 0 -80 98z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="524" d="M82 543l309 393l62 -43l-254 -363l254 -362l-62 -43l-309 391v27z" />
+<glyph unicode="&#x203a;" horiz-adv-x="524" d="M442 518l-309 -393l-61 43l254 362l-254 363l61 43l309 -391v-27z" />
+<glyph unicode="&#x2044;" horiz-adv-x="246" d="M573 1462l-811 -1462h-94l811 1462h94z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="688" d="M657 827h-129v-241h-90v241h-413v60l407 581h96v-563h129v-78zM438 905v221q0 132 8 232q-6 -12 -21.5 -35.5t-295.5 -417.5h309z" />
+<glyph unicode="&#x20ac;" d="M803 1397q-174 0 -288 -125.5t-155 -364.5h502v-82h-510l-4 -104v-24q0 -65 4 -87h449v-82h-443q30 -217 147.5 -338.5t301.5 -121.5q148 0 287 65v-94q-81 -34 -150.5 -46.5t-140.5 -12.5q-228 0 -367.5 140t-181.5 408h-180v82h172q-4 38 -4 113l4 102h-172v82h184 q39 272 183 425t362 153q88 0 161 -17t148 -57l-39 -86q-132 72 -270 72z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1485" d="M313 741h-86v643h-217v78h522v-78h-219v-643zM913 741l-221 609h-6l4 -201v-408h-82v721h125l221 -606l224 606h125v-721h-86v398l4 207h-7l-227 -605h-74z" />
+<glyph unicode="&#x2212;" d="M111 682v82h948v-82h-948z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1085" d="M0 1085h1085v-1085h-1085v1085z" />
+<glyph horiz-adv-x="1219" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-Light-webfont.woff b/docs/fonts/OpenSans-Light-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..e786074813a27d0a7a249047832988d5bf0fe756
GIT binary patch
literal 22248
zcmZsh1B_-}@aEgLZQHi(Y1_7KW7@WDOq<iT-!`UgySKmmcaz;@&&@A&>Pg|;+~g#c
zTn|MF2_RsgpQU~Rg!-RNT>BsYzy1HaBqY@2fq;N3epI~wFj1RzkQ5V__|b-ce1ac{
zfboIAB$X6Zf3!m&Ah2Q}Am}`LXG{@E)n6h&KoF5XF+o366qrO7DylNF00BY5{rLJn
z7#4V@A(_}2IsRz2Klw#KKp-%vH*Cr#?yf{Xb&!5yn10}+rURcbceJqk(S&|_y#3h3
z7+7y%3nQ1GTm-(K7^wdZl7+38`Hv<B1SFUN1Y{G-=J*T4(#*&d2uObOCx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n@Dmh%^
zI#(oD@+6<Fe3t?#lp-mX5-BzMYMUDTnkiHluvjdW5uFyL%3ZqBs<bOBn$^RNN=>ON
ztxB8Ht}IhJl;z5Q^PCYiHCNN(ya8V*SW{iq=#P|iPei-YVKcZx!TRRJt@iP_BKw5Z
zl~$$A+;X<ATmJ$%d8bkU002w40LW5Uu>k>&S-A)R2moUsumK}PumdA-uop!jAWOIa
z4pB?622)yCurwR6C|O`;Ac|F3umUAvumMG5BVw=uBSf+b0R}3v3<d@&vJ?geDp|4w
zC<#SUM6wJB2P&}!0YtGR0f<pput11du?7P~u_ghCQCPSH0Ek$z1_4A_Sy@@Q0sn=t
R1dXu;07L)*QLkr2008v)*B$@>

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-LightItalic-webfont.eot b/docs/fonts/OpenSans-LightItalic-webfont.eot
new file mode 100644
index 0000000000000000000000000000000000000000..8f445929ffb03b50e98c2a2f7d831a0cb1b276a2
GIT binary patch
literal 20535
zcmafZQ+ypx)a^O(iEW<PHX7TuZM#i!V%s*Fq;X^0cG4J)+ZfILfA{UXFL%$wn%R5J
z{{7~0&sw~y0Dzhb008yhf&u)8NYHT5urN?iFhC#^5b$44QS}B2uxCIH5T*OC{y$L&
z1d#s^UUf#R{SW@{AO)xZTme=9=l@6=0JHzl<G-CEzz$#oumyPjM@9z7{fA}%$NzE`
z|DEvx+W+z0|Kr&KT>kGpb^r^29l-Wqjp_f>jr{-V1ptU^$o%)F{~gc(*CGHf4?y-E
zz@Umba~?D9tFJR*Yv3jy<O{awbZ4?*l6s<ff|Y=56Arh<Jl?;jA(V>ddFod66X@Z0
z)6zUH6Vjr5hyB_yGNvf4)aw}K1E&#TQCt}D(zF?Y-wd8MxAavjpjW<INt-@ktkSQj
z=;9|~2;J6v!Lo~<&`)7ZuW%}n4%<LD$1a~#iqRI2J=dsrFyGOK!_CG60>yH)H<$mm
zxurwpRxdtGJjFhQ3#qJnt(hrQl)<;Zhb`-nJ`KW{OrW(;)CJ`y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(L^=Y@ifRI3jtK<M4z;Rk)>2<#!FGHkjER6M_))<^q#?4Alu-io<1EX_tvp
zg3A!%#SprzJSDuTQ_O_))H8Ku+b&%~qAWmWKY>)}6bdueZ&`qVWEZ1=Y!LC_-N+yc
Z%0#`NexefPFV?Xj51H#Y#AC7WXn+Jg($4?@

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-LightItalic-webfont.svg b/docs/fonts/OpenSans-LightItalic-webfont.svg
new file mode 100644
index 0000000..431d7e3
--- /dev/null
+++ b/docs/fonts/OpenSans-LightItalic-webfont.svg
@@ -0,0 +1,1835 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sanslight_italic" horiz-adv-x="1128" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb00;" horiz-adv-x="1155" d="M-131 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h477l35 160q35 168 116.5 244t227.5 76q73 0 166 -31 l-24 -80q-87 27 -148 27q-97 0 -154.5 -54.5t-82.5 -177.5l-35 -164h248l-17 -81h-248l-252 -1190q-34 -165 -105.5 -236.5t-193.5 -71.5q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l244 1166h-477l-252 -1190q-33 -161 -104 -234.5t-195 -73.5z" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1040" d="M0 0zM739 0h-98l231 1087h96zM915 1366q0 55 22 88t60 33q57 0 57 -72q0 -57 -22 -90t-57 -33q-29 0 -44.5 19.5t-15.5 54.5zM-148 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31 l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h248l-16 -81h-248l-252 -1190q-33 -161 -104 -234.5t-195 -73.5z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1042" d="M0 0zM737 0h-94l334 1556h94zM-148 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h248l-16 -81h-248 l-252 -1190q-33 -161 -104 -234.5t-195 -73.5z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1616" d="M0 0zM-148 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h477l35 160q35 168 116.5 244t227.5 76 q73 0 166 -31l-24 -80q-87 27 -148 27q-97 0 -154.5 -54.5t-82.5 -177.5l-35 -164h248l-17 -81h-248l-252 -1190q-34 -165 -105.5 -236.5t-193.5 -71.5q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l244 1166h-477l-252 -1190q-33 -161 -104 -234.5t-195 -73.5z M1315 0h-98l231 1087h96zM1491 1366q0 55 22 88t60 33q57 0 57 -72q0 -57 -22 -90t-57 -33q-29 0 -44.5 19.5t-15.5 54.5z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1626" d="M0 0zM-148 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h477l35 160q35 168 116.5 244t227.5 76 q73 0 166 -31l-24 -80q-87 27 -148 27q-97 0 -154.5 -54.5t-82.5 -177.5l-35 -164h248l-17 -81h-248l-252 -1190q-34 -165 -105.5 -236.5t-193.5 -71.5q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l244 1166h-477l-252 -1190q-33 -161 -104 -234.5t-195 -73.5z M1321 0h-94l334 1556h94z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="502" d="M248 377h-62l203 1085h119zM80 57q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-68 -34.5q-67 0 -67 73z" />
+<glyph unicode="&#x22;" horiz-adv-x="721" d="M455 1462l-146 -528h-61l80 528h127zM784 1462l-145 -528h-61l79 528h127z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M389 530l119 398h-297l8 80h311l134 454h90l-136 -454h365l135 454h86l-135 -454h285l-8 -80h-302l-118 -398h303l-8 -79h-320l-133 -451h-90l135 451h-360l-134 -451h-88l134 451h-283l8 79h299zM475 530h363l120 398h-362z" />
+<glyph unicode="$" d="M928 467q0 -151 -110.5 -243t-297.5 -103l-53 -240h-82l51 240q-79 2 -158 18t-137 43v94q65 -34 153.5 -53.5t160.5 -19.5l110 512q-110 53 -153 91t-66.5 87.5t-23.5 116.5q0 155 105.5 250.5t272.5 99.5l41 192h80l-41 -192q149 -5 277 -68l-35 -78q-110 61 -256 70 l-109 -514q124 -60 172.5 -99.5t73.5 -88.5t25 -115zM537 203q142 7 223.5 74.5t81.5 183.5q0 76 -48 129.5t-157 97.5zM686 1284q-134 -9 -205 -80t-71 -186q0 -78 37 -128.5t137 -96.5z" />
+<glyph unicode="%" horiz-adv-x="1556" d="M1458 1462l-1139 -1462h-106l1135 1462h110zM1520 612q0 -175 -50 -327t-136 -230t-197 -78q-112 0 -172 75.5t-60 223.5q0 160 52 312t138 229.5t193 77.5q121 0 176.5 -71.5t55.5 -211.5zM1284 821q-80 0 -146.5 -72.5t-106.5 -202.5t-40 -263q0 -116 41 -174t113 -58 q130 0 209.5 166.5t79.5 386.5q0 109 -36 163t-114 54zM760 1198q0 -175 -50 -327t-136 -230t-197 -78q-112 0 -172 75.5t-60 223.5q0 160 52 312t138 229.5t193 77.5q232 0 232 -283zM524 1407q-79 0 -145 -71.5t-107 -203t-41 -264.5q0 -115 41 -173t113 -58 q84 0 148.5 72t102.5 204t38 277q0 109 -36 163t-114 54z" />
+<glyph unicode="&#x26;" horiz-adv-x="1331" d="M748 1395q-125 0 -194 -68t-69 -192q0 -132 109 -281q203 89 279.5 163.5t76.5 182.5q0 91 -56.5 143t-145.5 52zM465 63q108 0 211.5 42.5t222.5 146.5l-352 493q-164 -79 -232 -134.5t-103.5 -124t-35.5 -158.5q0 -119 78 -192t211 -73zM78 324q0 162 99 277.5 t325 215.5l-41 67q-78 128 -78 251q0 157 101 253.5t264 96.5q145 0 227 -76.5t82 -206.5q0 -85 -41 -154t-121 -128t-256 -138l330 -463q73 75 135.5 176.5t91.5 186.5h111q-102 -247 -285 -436l184 -246h-123l-131 184q-121 -108 -242 -156t-266 -48q-167 0 -266.5 94 t-99.5 250z" />
+<glyph unicode="'" horiz-adv-x="403" d="M461 1462l-146 -528h-61l80 528h127z" />
+<glyph unicode="(" horiz-adv-x="526" d="M104 270q0 343 122 633t382 559h105q-259 -276 -384.5 -568t-125.5 -618q0 -317 127 -600h-80q-146 262 -146 594z" />
+<glyph unicode=")" horiz-adv-x="526" d="M453 868q0 -345 -123.5 -636t-380.5 -556h-105q257 274 383.5 566.5t126.5 619.5q0 148 -28.5 294t-98.5 306h80q146 -262 146 -594z" />
+<glyph unicode="*" horiz-adv-x="1137" d="M834 1540l-109 -405l438 8l-8 -107l-416 29l181 -401l-115 -37l-135 417l-285 -348l-78 78l318 318l-392 125l39 102l394 -168l47 408z" />
+<glyph unicode="+" d="M563 672h-401v100h401v404h101v-404h401v-100h-401v-400h-101v400z" />
+<glyph unicode="," horiz-adv-x="451" d="M250 238l8 -23q-34 -92 -114 -233.5t-160 -245.5h-74q79 132 141 271t88 231h111z" />
+<glyph unicode="-" horiz-adv-x="629" d="M82 502l18 90h457l-16 -90h-459z" />
+<glyph unicode="." horiz-adv-x="485" d="M82 55q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-67 -34.5q-68 0 -68 73z" />
+<glyph unicode="/" horiz-adv-x="641" d="M827 1462l-817 -1462h-110l815 1462h112z" />
+<glyph unicode="0" d="M1075 1016q0 -201 -41 -405t-116.5 -346t-183.5 -213.5t-242 -71.5q-176 0 -264.5 126.5t-88.5 387.5q0 186 44.5 381.5t124 334t187 207t240.5 68.5q340 0 340 -469zM723 1397q-134 0 -241.5 -113t-173.5 -329t-66 -451q0 -222 62.5 -329t197.5 -107q139 0 244 112 t166 337t61 489q0 199 -59.5 295t-190.5 96z" />
+<glyph unicode="1" d="M537 0h-105l225 1055q19 92 74 293q-42 -36 -75.5 -61t-249.5 -161l-52 78l406 258h90z" />
+<glyph unicode="2" d="M909 0h-870l22 104l449 402q198 177 284 276.5t126.5 186.5t40.5 180q0 112 -66 178t-197 66q-176 0 -333 -129l-54 73q180 146 394 146q173 0 268.5 -85t95.5 -237q0 -110 -43.5 -208.5t-141.5 -211.5t-311 -303l-383 -338v-4h736z" />
+<glyph unicode="3" d="M1049 1174q0 -162 -106 -275t-286 -143v-4q117 -24 185.5 -115.5t68.5 -226.5q0 -134 -64 -233t-179.5 -148t-274.5 -49q-96 0 -184.5 20.5t-153.5 52.5v101q172 -86 344 -86q197 0 303.5 89.5t106.5 252.5q0 145 -89 223t-247 78h-117l21 96h110q209 0 333 95.5 t124 258.5q0 114 -63.5 175t-188.5 61q-167 0 -344 -131l-49 75q84 67 188 104.5t218 37.5q161 0 252.5 -82.5t91.5 -226.5z" />
+<glyph unicode="4" d="M1071 371h-264l-80 -371h-96l80 371h-688l20 96l881 1010h118l-215 -1018h265zM729 459q79 369 119 558.5t86 354.5h-4q-66 -91 -129 -166l-651 -747h579z" />
+<glyph unicode="5" d="M582 879q188 0 292.5 -102t104.5 -279q0 -237 -148 -377.5t-407 -140.5q-84 0 -177.5 20t-158.5 51v107q170 -90 340 -90q208 0 328.5 114.5t120.5 313.5q0 140 -85 219.5t-225 79.5q-133 0 -243 -41l-66 49l193 659h624l-18 -96h-541l-149 -516q98 29 215 29z" />
+<glyph unicode="6" d="M170 428q0 283 105 544.5t269.5 385t383.5 123.5q123 0 182 -21l-18 -90q-86 23 -170 23q-233 0 -393.5 -174t-233.5 -502h8q68 94 164 143t211 49q161 0 250.5 -100.5t89.5 -282.5q0 -156 -60 -281t-171 -195t-257 -70q-171 0 -265.5 119t-94.5 329zM543 68 q112 0 196.5 58.5t130 162t45.5 229.5q0 146 -67 224.5t-195 78.5q-81 0 -154 -31.5t-129 -87t-78 -115t-22 -173.5q0 -164 72.5 -255t200.5 -91z" />
+<glyph unicode="7" d="M244 0l796 1366h-766l23 96h858l-20 -110l-779 -1352h-112z" />
+<glyph unicode="8" d="M737 1485q163 0 258 -85t95 -229q0 -138 -84 -234.5t-285 -172.5q130 -78 190 -170.5t60 -208.5t-58 -208t-165.5 -144.5t-260.5 -52.5q-178 0 -283.5 92.5t-105.5 253.5q0 159 100.5 268.5t321.5 187.5q-100 72 -144 152t-44 180q0 159 114 265t291 106zM610 733 q-218 -73 -313.5 -167.5t-95.5 -225.5q0 -136 77.5 -206.5t219.5 -70.5q168 0 270 91t102 233q0 104 -62 189t-198 157zM727 1399q-130 0 -214.5 -82t-84.5 -203q0 -91 41.5 -159t157.5 -142q192 62 279 144t87 206q0 109 -70.5 172.5t-195.5 63.5z" />
+<glyph unicode="9" d="M1059 1032q0 -288 -101.5 -548t-263.5 -382t-393 -122q-114 0 -186 22v90q87 -29 192 -29q474 0 627 674h-8q-140 -192 -367 -192q-162 0 -255 105t-93 284q0 155 59.5 281t170.5 196t257 70q174 0 267.5 -115.5t93.5 -333.5zM686 1393q-112 0 -197.5 -58.5 t-130.5 -162.5t-45 -230q0 -145 67.5 -225t192.5 -80q83 0 157.5 32.5t129 87.5t76.5 114t22 176q0 166 -71 256t-201 90z" />
+<glyph unicode=":" horiz-adv-x="485" d="M260 989q0 57 25.5 89t68.5 32q66 0 66 -72q0 -55 -25 -89t-67 -34q-68 0 -68 74zM102 55q0 56 25.5 88.5t69.5 32.5q65 0 65 -72q0 -55 -25.5 -88.5t-66.5 -33.5q-68 0 -68 73z" />
+<glyph unicode=";" horiz-adv-x="485" d="M287 238l8 -23q-35 -96 -118.5 -242t-156.5 -237h-73q79 132 141 271t88 231h111zM266 989q0 57 25.5 89t68.5 32q66 0 66 -72q0 -55 -25 -89t-67 -34q-68 0 -68 74z" />
+<glyph unicode="&#x3c;" d="M1051 262l-914 414v74l914 471v-103l-801 -399l801 -350v-107z" />
+<glyph unicode="=" d="M168 885v100h903v-100h-903zM168 461v98h903v-98h-903z" />
+<glyph unicode="&#x3e;" d="M170 369l801 350l-801 399v103l915 -471v-74l-915 -414v107z" />
+<glyph unicode="?" horiz-adv-x="799" d="M242 362l6 29q29 132 82 206.5t157 147.5q118 84 175 145.5t86.5 127.5t29.5 141q0 108 -67.5 170t-182.5 62q-139 0 -307 -101l-39 86q85 49 171.5 78t187.5 29q159 0 250.5 -84.5t91.5 -229.5q0 -127 -66 -234t-231 -226q-85 -61 -132.5 -108.5t-73 -95t-46.5 -143.5 h-92zM170 59q0 56 25 88.5t69 32.5q66 0 66 -71q0 -54 -24.5 -88.5t-67.5 -34.5q-68 0 -68 73z" />
+<glyph unicode="@" horiz-adv-x="1724" d="M1688 858q0 -179 -56 -323.5t-154.5 -227t-211.5 -82.5q-98 0 -154.5 55t-56.5 144h-4q-54 -97 -132.5 -148t-168.5 -51q-112 0 -178 73t-66 202q0 156 63 283t178 198.5t261 71.5q122 0 252 -52l-84 -315q-39 -140 -39 -221q0 -71 34.5 -111.5t100.5 -40.5 q86 0 160 73.5t117.5 198t43.5 251.5q0 156 -65 277t-187 188t-292 67q-235 0 -424.5 -108.5t-295.5 -304t-106 -439.5q0 -288 155 -449t435 -161q207 0 420 82v-90q-210 -82 -428 -82q-203 0 -357.5 82.5t-238.5 239t-84 370.5q0 276 121.5 493.5t337 337t473.5 119.5 q189 0 330.5 -72.5t221 -213t79.5 -314.5zM1008 969q-113 0 -204.5 -59t-142.5 -165.5t-51 -238.5q0 -92 40.5 -142.5t113.5 -50.5q101 0 180.5 89t124.5 255l78 289q-66 23 -139 23z" />
+<glyph unicode="A" horiz-adv-x="1059" d="M805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449z" />
+<glyph unicode="B" horiz-adv-x="1202" d="M412 1462h379q190 0 290.5 -84t100.5 -241q0 -153 -90 -249t-254 -124v-4q125 -31 188.5 -113.5t63.5 -204.5q0 -205 -140.5 -323.5t-390.5 -118.5h-457zM377 811h278q206 0 313 81t107 238q0 119 -78 180.5t-229 61.5h-272zM358 721l-135 -631h342q201 0 309.5 87.5 t108.5 256.5q0 145 -90 216t-275 71h-260z" />
+<glyph unicode="C" horiz-adv-x="1169" d="M961 1389q-197 0 -351.5 -104.5t-245 -304.5t-90.5 -441q0 -225 110.5 -346t317.5 -121q140 0 304 51v-94q-156 -49 -316 -49q-252 0 -386 145t-134 410q0 266 104.5 488t284.5 341t402 119q177 0 307 -68l-45 -90q-55 30 -124.5 47t-137.5 17z" />
+<glyph unicode="D" horiz-adv-x="1350" d="M1288 879q0 -253 -109.5 -461.5t-300.5 -313t-446 -104.5h-330l310 1462h305q282 0 426.5 -147.5t144.5 -435.5zM430 90q226 0 394.5 94.5t261 275.5t92.5 412q0 498 -476 498h-206l-275 -1280h209z" />
+<glyph unicode="E" horiz-adv-x="1067" d="M829 0h-727l310 1462h727l-21 -94h-624l-117 -553h590l-21 -94h-588l-135 -627h627z" />
+<glyph unicode="F" horiz-adv-x="981" d="M205 0h-103l310 1462h708l-20 -94h-604l-134 -620h570l-21 -95h-569z" />
+<glyph unicode="G" horiz-adv-x="1374" d="M856 735h406l-150 -682q-211 -73 -405 -73q-257 0 -397 146t-140 421q0 265 105 483.5t283.5 335.5t395.5 117q113 0 203 -19t184 -59l-38 -94q-110 46 -189.5 62t-167.5 16q-184 0 -339 -107.5t-244 -301.5t-89 -433q0 -229 114.5 -352t326.5 -123q155 0 309 47l117 526 h-303z" />
+<glyph unicode="H" horiz-adv-x="1366" d="M1063 0h-100l151 719h-760l-149 -719h-103l310 1462h102l-139 -649h760l137 649h100z" />
+<glyph unicode="I" horiz-adv-x="504" d="M102 0l310 1462h98l-309 -1462h-99z" />
+<glyph unicode="J" horiz-adv-x="477" d="M-180 -360q-48 0 -88 8t-56 16l11 92q57 -20 137 -20q213 0 262 241l309 1485h105l-314 -1491q-35 -170 -125 -250.5t-241 -80.5z" />
+<glyph unicode="K" horiz-adv-x="1122" d="M979 0h-111l-342 788l-190 -153l-131 -635h-103l310 1462h102l-158 -723l133 121l680 602h138l-699 -610z" />
+<glyph unicode="L" horiz-adv-x="938" d="M102 0l310 1462h102l-289 -1366h621l-23 -96h-721z" />
+<glyph unicode="M" horiz-adv-x="1669" d="M772 205l733 1257h150l-301 -1462h-101l191 901q79 369 100 447h-6l-780 -1348h-51l-222 1348h-6q-20 -154 -78 -426l-196 -922h-96l309 1462h143l205 -1257h6z" />
+<glyph unicode="N" horiz-adv-x="1372" d="M1069 0h-86l-516 1284h-8q-23 -149 -48 -273t-214 -1011h-95l310 1462h80l522 -1294h8q23 176 74 416l188 878h94z" />
+<glyph unicode="O" horiz-adv-x="1464" d="M1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300t79 430.5 q0 240 -104.5 364t-310.5 124z" />
+<glyph unicode="P" horiz-adv-x="1145" d="M1145 1102q0 -500 -610 -500h-201l-129 -602h-103l310 1462h315q202 0 310 -92.5t108 -267.5zM350 694h191q252 0 373.5 96.5t121.5 305.5q0 274 -329 274h-211z" />
+<glyph unicode="Q" horiz-adv-x="1464" d="M1403 911q0 -216 -70 -418t-186.5 -324t-274.5 -167l267 -350h-142l-231 332l-74 -4q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128 q169 0 300 98.5t210 300t79 430.5q0 240 -104.5 364t-310.5 124z" />
+<glyph unicode="R" horiz-adv-x="1145" d="M336 633l-131 -633h-103l310 1462h303q430 0 430 -360q0 -182 -103.5 -303t-281.5 -152q201 -591 221 -647h-111l-211 633h-323zM358 725h252q208 0 317 95.5t109 281.5q0 268 -329 268h-211z" />
+<glyph unicode="S" horiz-adv-x="1020" d="M895 403q0 -126 -65.5 -224.5t-179.5 -148.5t-269 -50q-88 0 -172.5 17t-171.5 58v109q163 -92 348 -92q188 0 295.5 86.5t107.5 232.5q0 61 -17 104.5t-52.5 78.5t-91 68t-131.5 75q-150 76 -209.5 164t-59.5 206t59 207.5t165 139t237 49.5q99 0 180 -17.5t168 -60.5 l-32 -94q-66 40 -151.5 63t-164.5 23q-163 0 -259.5 -82.5t-96.5 -218.5q0 -103 49 -170t182 -133q154 -79 213.5 -130t89 -113t29.5 -147z" />
+<glyph unicode="T" horiz-adv-x="985" d="M438 0h-102l289 1368h-432l20 94h973l-19 -94h-440z" />
+<glyph unicode="U" horiz-adv-x="1370" d="M1395 1462l-207 -977q-58 -270 -197 -387.5t-375 -117.5q-440 0 -440 401q0 83 27 201l186 880h103l-193 -899q-20 -89 -20 -184q0 -309 342 -309q195 0 307.5 96.5t158.5 318.5l207 977h101z" />
+<glyph unicode="V" horiz-adv-x="1079" d="M457 147q51 111 124 247l572 1068h117l-799 -1462h-88l-182 1462h100l117 -950q26 -217 35 -365h4z" />
+<glyph unicode="W" horiz-adv-x="1702" d="M1018 1341q-27 -76 -62 -153.5t-563 -1187.5h-82l-73 1462h100l47 -1031l4 -165l-2 -86h6q85 226 170 398l434 884h105l61 -878q19 -266 19 -410h6q30 86 61.5 163t493.5 1125h108q-169 -365 -330.5 -731t-328.5 -731h-78l-78 1075q-11 142 -11 219l1 47h-8z" />
+<glyph unicode="X" horiz-adv-x="971" d="M879 0h-107l-254 678l-526 -678h-127l608 766l-272 696h106l240 -626l483 626h119l-555 -719z" />
+<glyph unicode="Y" horiz-adv-x="965" d="M494 645l544 817h117l-631 -932l-108 -530h-105l119 545l-237 917h100z" />
+<glyph unicode="Z" d="M913 0h-925l22 92l1069 1276h-764l23 94h887l-19 -88l-1069 -1280h799z" />
+<glyph unicode="[" horiz-adv-x="537" d="M369 -324h-426l376 1786h429l-19 -90h-330l-340 -1605h330z" />
+<glyph unicode="\" horiz-adv-x="641" d="M295 1462l242 -1462h-82l-246 1462h86z" />
+<glyph unicode="]" horiz-adv-x="537" d="M203 1462h426l-377 -1786h-428l18 91h330l340 1605h-330z" />
+<glyph unicode="^" horiz-adv-x="1047" d="M70 569l587 906h91l260 -906h-105l-217 809l-500 -809h-116z" />
+<glyph unicode="_" horiz-adv-x="801" d="M625 -291h-807l18 86h807z" />
+<glyph unicode="`" horiz-adv-x="1135" d="M766 1241h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="a" horiz-adv-x="1133" d="M655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82t-164 -245.5 t-64 -325.5q0 -152 50 -223.5t151 -71.5z" />
+<glyph unicode="b" horiz-adv-x="1151" d="M500 -16q-113 0 -186 59t-97 166h-6l-55 -209h-80l327 1556h95q-131 -628 -162 -751h6q93 156 199 229.5t231 73.5q281 0 281 -375q0 -203 -76 -380t-201 -273t-276 -96zM750 1018q-91 0 -180 -61.5t-160.5 -169.5t-106.5 -235t-35 -206q0 -129 64 -202.5t166 -73.5 q124 0 224 83t164 245t64 325q0 152 -49 223.5t-151 71.5z" />
+<glyph unicode="c" horiz-adv-x="887" d="M477 -20q-174 0 -274.5 110.5t-100.5 306.5q0 193 73.5 361.5t198.5 257t290 88.5q134 0 241 -43l-28 -90q-107 47 -218 47q-129 0 -232.5 -77t-162.5 -222t-59 -320q0 -158 73.5 -243.5t208.5 -85.5q71 0 131.5 13t131.5 46v-92q-116 -57 -273 -57z" />
+<glyph unicode="d" horiz-adv-x="1133" d="M655 1104q230 0 279 -219h4q12 66 143 671h99l-330 -1556h-82l45 274h-6q-173 -294 -424 -294q-281 0 -281 374q0 193 71.5 370t197.5 278.5t284 101.5zM406 70q89 0 178.5 62.5t160 168t106.5 231t36 209.5q0 126 -61.5 201.5t-168.5 75.5q-124 0 -224 -83t-164 -242.5 t-64 -327.5q0 -295 201 -295z" />
+<glyph unicode="e" horiz-adv-x="928" d="M469 -20q-173 0 -270 109.5t-97 305.5q0 181 71 347t195.5 264t274.5 98q114 0 182 -61t68 -166q0 -181 -163.5 -276t-485.5 -95h-33q-6 -44 -6 -98q0 -165 74 -251.5t213 -86.5q132 0 276 73v-94q-140 -69 -299 -69zM631 1018q-131 0 -243.5 -115.5t-162.5 -308.5h49 q517 0 517 270q0 67 -43.5 110.5t-116.5 43.5z" />
+<glyph unicode="f" horiz-adv-x="578" d="M-131 -492q-48 0 -102 19v90q53 -16 100 -16q88 0 134 53t75 186l246 1166h-205l14 67l205 14l35 160q35 168 116.5 244t227.5 76q73 0 166 -31l-25 -80q-87 27 -147 27q-96 0 -153.5 -53.5t-84.5 -178.5l-35 -164h248l-16 -81h-248l-252 -1190q-33 -161 -104 -234.5 t-195 -73.5z" />
+<glyph unicode="g" horiz-adv-x="1040" d="M1100 1087l-17 -79l-243 -11q26 -28 43.5 -84t17.5 -114q0 -109 -54.5 -206.5t-148 -145.5t-213.5 -48q-63 0 -77 9q-80 -33 -124 -73t-44 -81t31.5 -64.5t113.5 -31.5l121 -11q346 -31 346 -264q0 -112 -65 -197.5t-187 -131.5t-291 -46q-186 0 -291.5 72t-105.5 203 q0 236 309 334q-78 42 -78 123q0 123 191 202q-71 36 -110.5 105.5t-39.5 157.5q0 111 53.5 204t148 146t206.5 53q69 0 147 -21h361zM14 -207q0 -101 81 -150t224 -49q203 0 317 74.5t114 204.5q0 85 -62.5 130.5t-218.5 57.5l-160 15q-157 -45 -226 -114.5t-69 -168.5z M285 711q0 -112 58.5 -170t164.5 -58q88 0 154 37t102.5 114t36.5 169q0 104 -56 161.5t-157 57.5q-93 0 -161 -43t-105 -116t-37 -152z" />
+<glyph unicode="h" horiz-adv-x="1143" d="M764 0l149 692q21 92 21 156q0 80 -43.5 125t-134.5 45q-112 0 -210.5 -67t-166 -188t-103.5 -286l-102 -477h-98l332 1556h96l-86 -411q-44 -200 -66 -279h6q78 113 186.5 175.5t229.5 62.5q124 0 192 -65t68 -183q0 -70 -24 -182l-148 -674h-98z" />
+<glyph unicode="i" horiz-adv-x="475" d="M174 0h-98l231 1087h96zM350 1366q0 55 22 88t60 33q57 0 57 -72q0 -57 -22 -90t-57 -33q-29 0 -44.5 19.5t-15.5 54.5z" />
+<glyph unicode="j" horiz-adv-x="475" d="M-166 -492q-62 0 -113 19v92q47 -22 113 -22q82 0 128.5 51.5t72.5 177.5l266 1261h96l-268 -1271q-35 -165 -106.5 -236.5t-188.5 -71.5zM350 1366q0 55 22 88t60 33q57 0 57 -72q0 -57 -22 -90t-57 -33q-29 0 -44.5 19.5t-15.5 54.5z" />
+<glyph unicode="k" horiz-adv-x="944" d="M270 477l609 610h125l-474 -469l297 -618h-106l-264 559l-205 -188l-80 -371h-96l330 1556h96l-166 -780l-70 -299h4z" />
+<glyph unicode="l" horiz-adv-x="475" d="M170 0h-94l334 1556h94z" />
+<glyph unicode="m" horiz-adv-x="1751" d="M711 0l147 674q25 125 25 162q0 182 -154 182q-106 0 -200 -67.5t-159 -188.5t-100 -287l-100 -475h-98l231 1087h80l-33 -210h6q80 113 181.5 170t212.5 57q106 0 163 -67t60 -195h6q77 129 181 195.5t222 66.5q117 0 182.5 -61.5t65.5 -176.5q0 -29 -2.5 -56.5 t-19.5 -119.5l-152 -690h-100l149 680q25 120 25 176q0 77 -43 119.5t-119 42.5q-157 0 -277.5 -137.5t-168.5 -362.5l-109 -518h-102z" />
+<glyph unicode="n" horiz-adv-x="1143" d="M764 0l149 692q21 92 21 156q0 80 -43.5 125t-134.5 45q-112 0 -210.5 -67t-166 -187.5t-103.5 -286.5l-102 -477h-98l231 1087h82l-37 -221h6q164 238 416 238q130 0 195 -64t65 -184q0 -70 -24 -182l-148 -674h-98z" />
+<glyph unicode="o" horiz-adv-x="1124" d="M649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83z" />
+<glyph unicode="p" horiz-adv-x="1149" d="M498 -16q-230 0 -279 219h-4q-13 -72 -149 -695h-99l336 1579h82l-45 -274h6q91 153 195.5 224t228.5 71q135 0 208 -92.5t73 -282.5q0 -195 -72 -371t-197.5 -277t-283.5 -101zM748 1018q-87 0 -174 -58.5t-161.5 -167.5t-110.5 -237.5t-36 -208.5q0 -125 61.5 -200.5 t168.5 -75.5q124 0 225 84t164 243.5t63 325.5q0 295 -200 295z" />
+<glyph unicode="q" horiz-adv-x="1157" d="M651 1104q109 0 183.5 -58t99.5 -167h6l55 208h80l-327 -1556h-95l98 470l64 282h-6q-93 -156 -199 -229.5t-231 -73.5q-281 0 -281 374q0 201 75.5 379t200.5 274.5t277 96.5zM401 70q92 0 182 62.5t160.5 171.5t105 236.5t34.5 200.5q0 130 -63.5 203.5t-166.5 73.5 q-124 0 -224 -83t-164 -245t-64 -325q0 -143 45.5 -219t154.5 -76z" />
+<glyph unicode="r" horiz-adv-x="752" d="M713 1106q69 0 123 -14l-21 -93q-47 15 -113 15q-94 0 -179 -64t-153 -192t-100 -277l-100 -481h-98l231 1087h80l-29 -204h6q73 94 123 135.5t106.5 64.5t123.5 23z" />
+<glyph unicode="s" horiz-adv-x="827" d="M713 295q0 -144 -103 -229.5t-280 -85.5q-173 0 -305 75v107q74 -46 153 -71t148 -25q138 0 211 57.5t73 163.5q0 42 -15.5 74t-50 61.5t-132.5 85.5q-148 80 -200 145.5t-52 159.5q0 128 98.5 209.5t259.5 81.5q75 0 158.5 -17.5t140.5 -46.5l-35 -88q-136 64 -264 64 q-116 0 -186 -53t-70 -138q0 -55 17 -88t60.5 -68.5t119.5 -76.5q114 -63 161.5 -103.5t70 -86.5t22.5 -107z" />
+<glyph unicode="t" horiz-adv-x="616" d="M694 1087l-18 -81h-283l-135 -635q-22 -99 -22 -164q0 -139 126 -139q68 0 152 26v-86q-101 -28 -170 -28q-99 0 -153 54.5t-54 158.5q0 73 29 206l129 607h-182l14 67l184 17l97 253h55l-55 -256h286z" />
+<glyph unicode="u" horiz-adv-x="1143" d="M381 1087l-152 -698q-22 -106 -22 -158q0 -74 47.5 -117.5t138.5 -43.5q110 0 207.5 65.5t164 187t99.5 279.5l105 485h98l-231 -1087h-80l28 205h-6q-167 -221 -403 -221q-131 0 -198.5 62t-67.5 181q0 60 22 170l150 690h100z" />
+<glyph unicode="v" horiz-adv-x="895" d="M276 0l-172 1087h101l108 -735q26 -165 33 -254h6q51 115 129 256l406 733h102l-600 -1087h-113z" />
+<glyph unicode="w" horiz-adv-x="1393" d="M838 0l-60 686q-14 224 -14 266h-6q-34 -92 -144 -290l-356 -662h-117l-20 1087h92l13 -821l-3 -157h6q61 134 150 297l373 681h77l64 -681q14 -147 14 -297h6l24 61l101 236l320 681h96l-508 -1087h-108z" />
+<glyph unicode="x" horiz-adv-x="922" d="M442 483l-393 -483h-121l471 559l-245 528h100l207 -462l373 462h120l-448 -534l258 -553h-98z" />
+<glyph unicode="y" horiz-adv-x="920" d="M123 1087h100l82 -548q51 -351 55 -449h11q43 105 186 367l348 630h103l-713 -1290q-72 -127 -122.5 -178t-114 -81t-146.5 -30q-68 0 -129 21v92q71 -27 137 -27q80 0 147 49.5t130 164.5t100 184z" />
+<glyph unicode="z" horiz-adv-x="887" d="M700 0h-729l15 72l776 932h-543l17 83h659l-18 -83l-762 -920h602z" />
+<glyph unicode="{" horiz-adv-x="709" d="M424 -324q-256 0 -256 199q0 45 16 115l56 252q18 90 18 127q0 159 -199 159l21 78q126 0 191 49t89 158l89 393q30 135 106 195.5t215 60.5h29l-17 -86q-86 -2 -129 -20.5t-69.5 -61.5t-44.5 -120l-74 -338q-30 -134 -91.5 -194.5t-164.5 -78.5v-4q68 -18 105.5 -68.5 t37.5 -121.5q0 -52 -24 -164l-47 -225q-13 -58 -13 -101q0 -61 37.5 -89t138.5 -28v-86h-20z" />
+<glyph unicode="|" d="M584 1561h100v-2071h-100v2071z" />
+<glyph unicode="}" horiz-adv-x="709" d="M332 1462q131 0 189.5 -51t58.5 -147q0 -41 -17 -115l-55 -252q-19 -95 -19 -127q0 -77 49.5 -118.5t149.5 -41.5l-20 -78q-125 0 -191 -48.5t-90 -157.5l-88 -394q-32 -139 -108.5 -197.5t-213.5 -58.5h-18v86q96 2 138 21t68.5 61t43.5 121l74 338q27 126 87.5 189.5 t168.5 82.5v5q-75 20 -109.5 72.5t-34.5 117.5q0 55 18 131l54 258q12 61 12 101q0 44 -18 69t-54 36t-116 11l20 86h21z" />
+<glyph unicode="~" d="M350 745q-49 0 -108 -30.5t-115 -89.5v94q108 110 233 110q61 0 115 -13.5t156 -57.5q126 -58 219 -58q54 0 107.5 29t117.5 96v-96q-111 -113 -233 -113q-117 0 -271 72q-62 29 -112.5 43t-108.5 14z" />
+<glyph unicode="&#xa1;" horiz-adv-x="502" d="M264 711h62l-203 -1086h-119zM432 1030q0 -56 -25 -88.5t-69 -32.5q-66 0 -66 72q0 55 25 89t68 34q67 0 67 -74z" />
+<glyph unicode="&#xa2;" d="M578 -20h-93l45 215q-132 25 -206 132.5t-74 272.5q0 184 63.5 341t178 253t256.5 111l36 178h90l-38 -176q116 -4 217 -43l-29 -90q-107 47 -217 47q-130 0 -233 -76t-162.5 -221t-59.5 -322q0 -164 74.5 -247t208.5 -83q127 0 264 60v-92q-118 -58 -281 -58z" />
+<glyph unicode="&#xa3;" d="M879 1479q170 0 313 -78l-39 -84l-54 26q-108 50 -231 50q-134 0 -220.5 -74.5t-117.5 -220.5l-73 -340h409l-18 -82h-408l-57 -268q-50 -225 -188 -314h759l-20 -94h-938l16 84q93 11 165.5 95.5t107.5 236.5l57 260h-199l17 82h198l76 350q41 187 155 279t290 92z" />
+<glyph unicode="&#xa4;" d="M262 723q0 118 74 225l-129 129l63 64l127 -129q105 78 230 78q118 0 223 -78l131 129l61 -62l-129 -129q78 -106 78 -227q0 -135 -78 -227l129 -127l-61 -62l-131 127q-104 -76 -223 -76q-126 0 -228 80l-129 -129l-61 62l127 127q-74 98 -74 225zM350 723 q0 -116 80 -196.5t197 -80.5t198.5 81t81.5 196q0 75 -36.5 140t-102.5 104t-141 39q-114 0 -195.5 -82t-81.5 -201z" />
+<glyph unicode="&#xa5;" d="M584 645l544 817h117l-559 -823h266l-16 -76h-315l-39 -190h317l-18 -84h-316l-59 -289h-105l64 289h-299l18 84h299l41 190h-301l17 76h258l-215 823h100z" />
+<glyph unicode="&#xa6;" d="M578 1561h100v-756h-100v756zM578 246h100v-756h-100v756z" />
+<glyph unicode="&#xa7;" horiz-adv-x="995" d="M211 778q0 101 69.5 182t198.5 130q-64 31 -103.5 85.5t-39.5 120.5q0 74 46 134.5t132.5 94.5t202.5 34q163 0 289 -58l-31 -80q-138 54 -264 54q-124 0 -202.5 -46.5t-78.5 -123.5q0 -59 46 -104.5t183 -106.5q112 -52 158.5 -89.5t71 -85t24.5 -110.5 q0 -197 -249 -317q122 -64 122 -197q0 -86 -48 -153.5t-139.5 -105.5t-221.5 -38q-157 0 -275 53v99q47 -27 126 -46.5t153 -19.5q149 0 228 52.5t79 150.5q0 62 -42.5 106t-166.5 96q-155 65 -211.5 130t-56.5 159zM559 1038q-119 -30 -187.5 -97.5t-68.5 -154.5 q0 -57 24.5 -96.5t81 -73t187.5 -81.5q103 49 162 113.5t59 156.5q0 72 -57.5 126t-200.5 107z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1135" d="M836 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM492 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M944 1092q-142 0 -222.5 -94.5t-80.5 -264.5q0 -186 74.5 -275t220.5 -89q85 0 199 43v-88q-104 -45 -209 -45q-187 0 -288 116t-101 330q0 207 110 332t297 125q119 0 227 -52l-36 -83q-99 45 -191 45zM147 731q0 200 100 375t275 276t377 101q200 0 375 -100t276 -275 t101 -377q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM240 731q0 -178 88.5 -329.5t240.5 -240.5t330 -89q174 0 325 85.5t243 239t92 334.5q0 178 -89 330t-240.5 241t-330.5 89q-182 0 -335 -92t-238.5 -243t-85.5 -325z" />
+<glyph unicode="&#xaa;" horiz-adv-x="643" d="M487 1485q55 0 97.5 -29t66.5 -86h6l35 103h66l-137 -650h-72l22 125h-4q-96 -137 -223 -137q-80 0 -127 56.5t-47 164.5q0 189 90.5 321t226.5 132zM369 885q66 0 133.5 75.5t97.5 184.5q16 51 16 123q0 58 -36 100.5t-93 42.5q-94 0 -161.5 -111.5t-67.5 -271.5 q0 -143 111 -143z" />
+<glyph unicode="&#xab;" horiz-adv-x="860" d="M426 932l57 -49l-317 -336l213 -385l-64 -39l-254 418l2 26zM786 932l58 -49l-314 -336l209 -385l-63 -39l-254 418l2 26z" />
+<glyph unicode="&#xac;" d="M1028 772v-500h-100v400h-803v100h903z" />
+<glyph unicode="&#xad;" horiz-adv-x="629" d="M77 502zM77 502l18 90h457l-16 -90h-459z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M758 731h112q93 0 144 46.5t51 135.5q0 172 -197 172h-110v-354zM1169 918q0 -80 -39.5 -141t-109.5 -93l237 -393h-120l-211 360h-168v-360h-101v880h211q143 0 222 -62t79 -191zM150 731q0 207 103.5 382t276.5 272.5t371 97.5q200 0 375 -100t276 -275t101 -377 q0 -197 -97 -370t-272 -277t-383 -104q-204 0 -376.5 100.5t-273.5 273t-101 377.5zM242 731q0 -178 88.5 -329.5t240.5 -240.5t330 -89q174 0 325 85.5t243 239t92 334.5q0 178 -89 330t-240.5 241t-330.5 89q-182 0 -335 -92t-238.5 -243t-85.5 -325z" />
+<glyph unicode="&#xaf;" horiz-adv-x="655" d="M1001 1556h-653l53 97h654z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M242 1190q0 120 85 206.5t208 86.5q122 0 207 -86.5t85 -206.5q0 -122 -85.5 -207.5t-206.5 -85.5q-122 0 -207.5 85.5t-85.5 207.5zM315 1190q0 -89 64.5 -153t155.5 -64q92 0 155.5 64t63.5 153q0 90 -64 155.5t-155 65.5q-90 0 -155 -65.5t-65 -155.5z" />
+<glyph unicode="&#xb1;" d="M528 629h-401v98h401v406h101v-406h401v-98h-401v-400h-101v400zM127 0v100h903v-100h-903z" />
+<glyph unicode="&#xb2;" horiz-adv-x="643" d="M604 586h-522l16 80l297 258q137 118 182.5 190.5t45.5 153.5q0 59 -38.5 97t-105.5 38q-95 0 -194 -76l-41 62q108 90 239 90q73 0 125 -27t78.5 -72t26.5 -100q0 -106 -59 -198.5t-183 -194.5l-266 -223h416z" />
+<glyph unicode="&#xb3;" horiz-adv-x="643" d="M705 1276q0 -85 -48.5 -148t-154.5 -88v-4q66 -16 105.5 -68t39.5 -124q0 -77 -39 -141t-109 -99t-161 -35q-59 0 -123.5 15.5t-105.5 40.5v90q46 -28 108 -48t125 -20q99 0 159 52.5t60 142.5q0 162 -196 162h-84l16 79h86q102 0 168.5 49.5t66.5 129.5 q0 68 -37.5 102.5t-105.5 34.5q-100 0 -199 -68l-40 64q109 86 251 86q100 0 159 -56.5t59 -148.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1135" d="M580 1262q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1171" d="M238 242q0 -82 48.5 -127t135.5 -45q110 0 207 64.5t162.5 182.5t101.5 285l104 485h99l-234 -1087h-78l29 205h-6q-164 -221 -404 -221q-85 0 -139 32.5t-76 89.5h-6q-18 -132 -51 -284l-63 -314h-97l338 1579h101l-152 -698q-20 -96 -20 -147z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1208 -260h-100v1722h-227v-1722h-101v819q-64 -18 -145 -18q-216 0 -318 125t-102 376q0 260 109 387t342 127h542v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="485" d="M207 625zM207 698q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-67 -34.5q-68 0 -68 73z" />
+<glyph unicode="&#xb8;" horiz-adv-x="420" d="M197 -289q0 -94 -75.5 -148.5t-217.5 -54.5q-46 0 -78 7v79q30 -6 72 -6q198 0 198 115q0 97 -151 107l110 190h80l-78 -137q140 -30 140 -152z" />
+<glyph unicode="&#xb9;" horiz-adv-x="643" d="M512 1462h80l-186 -876h-84l118 569q5 21 11.5 50.5t14 60t15.5 59t15 49.5q-34 -31 -60 -51.5t-143 -93.5l-39 59z" />
+<glyph unicode="&#xba;" horiz-adv-x="655" d="M518 1479q105 0 165 -64t60 -180q0 -115 -40 -214t-114 -156.5t-175 -57.5q-114 0 -169 67.5t-55 184.5q0 112 41.5 209.5t116 154t170.5 56.5zM508 1405q-70 0 -124 -46.5t-84 -124.5t-30 -167q0 -186 156 -186q73 0 125.5 46.5t81.5 127.5t29 176q0 83 -39 128.5 t-115 45.5z" />
+<glyph unicode="&#xbb;" horiz-adv-x="860" d="M451 123l-58 49l314 336l-209 385l63 39l254 -418l-2 -27zM90 123l-57 49l313 336l-209 385l64 39l254 -418l-2 -27z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1481" d="M129 0zM1319 230h-131l-49 -229h-82l49 229h-391l21 76l506 577h86l-125 -581h133zM1121 302q61 294 79 365.5t29 105.5q-10 -16 -61 -79t-338 -392h291zM1323 1462l-1087 -1462h-107l1086 1462h108zM509 1462h80l-186 -876h-84l118 569q5 21 11.5 50.5t14 60t15.5 59 t15 49.5q-34 -31 -60 -51.5t-143 -93.5l-39 59z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1458" d="M53 0zM1278 1h-522l16 80l297 258q137 118 182.5 190.5t45.5 153.5q0 59 -38.5 97t-105.5 38q-95 0 -194 -76l-41 62q108 90 239 90q73 0 125 -27t78.5 -72t26.5 -100q0 -106 -59 -198.5t-183 -194.5l-266 -223h416zM431 1462h80l-186 -876h-84l118 569q5 21 11.5 50.5 t14 60t15.5 59t15 49.5q-34 -31 -60 -51.5t-143 -93.5l-39 59zM1247 1462l-1087 -1462h-107l1086 1462h108z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1458" d="M71 0zM1380 230h-131l-49 -229h-82l49 229h-391l21 76l506 577h86l-125 -581h133zM1182 302q61 294 79 365.5t29 105.5q-10 -16 -61 -79t-338 -392h291zM667 1276q0 -85 -48.5 -148t-154.5 -88v-4q66 -16 105.5 -68t39.5 -124q0 -77 -39 -141t-109 -99t-161 -35 q-59 0 -123.5 15.5t-105.5 40.5v90q46 -28 108 -48t125 -20q99 0 159 52.5t60 142.5q0 162 -196 162h-84l16 79h86q102 0 168.5 49.5t66.5 129.5q0 68 -37.5 102.5t-105.5 34.5q-100 0 -199 -68l-40 64q109 86 251 86q100 0 159 -56.5t59 -148.5zM1407 1462l-1087 -1462 h-107l1086 1462h108z" />
+<glyph unicode="&#xbf;" horiz-adv-x="799" d="M641 717l-6 -29q-28 -127 -79 -200t-161 -154q-118 -84 -175 -145.5t-86.5 -127.5t-29.5 -141q0 -106 65.5 -168.5t184.5 -62.5q141 0 308 100l38 -86q-85 -49 -170.5 -77.5t-187.5 -28.5q-159 0 -250.5 84.5t-91.5 228.5q0 133 70 240.5t227 220.5q85 61 133.5 109 t73 95t45.5 142h92zM713 1020q0 -56 -25.5 -88.5t-69.5 -32.5q-65 0 -65 72q0 56 25 89.5t67 33.5q68 0 68 -74z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM815 1579h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM668 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM1007 1579h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5 t92.5 -146.5v-29z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM911 1587q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5 q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM879 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM535 1704q0 49 20.5 78t56.5 29q54 0 54 -64 q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1059" d="M0 0zM805 520h-512l-287 -520h-117l822 1468h67l201 -1468h-105zM793 612l-39 291q-31 242 -39 402q-30 -63 -64.5 -130t-306.5 -563h449zM945 1600q0 -92 -57.5 -148.5t-145.5 -56.5q-93 0 -148 52t-55 145q0 88 59.5 144t149.5 56q88 0 142.5 -50t54.5 -142zM867 1598 q0 57 -33.5 90t-87.5 33q-60 0 -93.5 -36t-33.5 -93t33 -90t90 -33q56 0 90.5 36t34.5 93z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1640" d="M1403 0h-727l110 522h-444l-328 -522h-131l946 1462h883l-20 -94h-625l-117 -553h590l-20 -94h-588l-135 -627h626zM408 627h401l156 741h-88z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1169" d="M170 0zM961 1389q-197 0 -351.5 -104.5t-245 -304.5t-90.5 -441q0 -225 110.5 -346t317.5 -121q140 0 304 51v-94q-156 -49 -316 -49q-252 0 -386 145t-134 410q0 266 104.5 488t284.5 341t402 119q177 0 307 -68l-45 -90q-55 30 -124.5 47t-137.5 17zM752 -289 q0 -94 -75.5 -148.5t-217.5 -54.5q-46 0 -78 7v79q30 -6 72 -6q198 0 198 115q0 97 -151 107l110 190h80l-78 -137q140 -30 140 -152z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1067" d="M102 0zM829 0h-727l310 1462h727l-21 -94h-624l-117 -553h590l-21 -94h-588l-135 -627h627zM891 1579h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1067" d="M102 0zM829 0h-727l310 1462h727l-21 -94h-624l-117 -553h590l-21 -94h-588l-135 -627h627zM654 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xca;" horiz-adv-x="1067" d="M102 0zM829 0h-727l310 1462h727l-21 -94h-624l-117 -553h590l-21 -94h-588l-135 -627h627zM1036 1579h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1067" d="M102 0zM829 0h-727l310 1462h727l-21 -94h-624l-117 -553h590l-21 -94h-588l-135 -627h627zM902 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM558 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xcc;" horiz-adv-x="504" d="M102 0zM102 0l310 1462h98l-309 -1462h-99zM525 1579h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xcd;" horiz-adv-x="504" d="M102 0zM102 0l310 1462h98l-309 -1462h-99zM419 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xce;" horiz-adv-x="504" d="M102 0zM102 0l310 1462h98l-309 -1462h-99zM738 1579h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xcf;" horiz-adv-x="504" d="M102 0zM102 0l310 1462h98l-309 -1462h-99zM604 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM260 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1352" d="M1288 879q0 -253 -109.5 -461.5t-300.5 -313t-446 -104.5h-330l144 676h-156l21 96h155l146 690h305q282 0 426.5 -147.5t144.5 -435.5zM430 90q226 0 394.5 94.5t261 275.5t92.5 412q0 498 -476 498h-206l-129 -598h378l-20 -96h-379l-125 -586h209z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1372" d="M102 0zM1069 0h-86l-516 1284h-8q-23 -149 -48 -273t-214 -1011h-95l310 1462h80l522 -1294h8q23 176 74 416l188 878h94zM1062 1587q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14 t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1464" d="M172 0zM1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300 t79 430.5q0 240 -104.5 364t-310.5 124zM989 1579h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1464" d="M172 0zM1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300 t79 430.5q0 240 -104.5 364t-310.5 124zM844 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1464" d="M172 0zM1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300 t79 430.5q0 240 -104.5 364t-310.5 124zM1171 1579h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1464" d="M172 0zM1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300 t79 430.5q0 240 -104.5 364t-310.5 124zM1077 1587q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z " />
+<glyph unicode="&#xd6;" horiz-adv-x="1464" d="M172 0zM1403 911q0 -255 -94 -481.5t-252 -338t-365 -111.5q-250 0 -385 149t-135 430q0 262 93 477.5t255 331t373 115.5q247 0 378.5 -148.5t131.5 -423.5zM879 1389q-174 0 -308.5 -101t-214.5 -298t-80 -417q0 -245 109.5 -373t319.5 -128q169 0 300 98.5t210 300 t79 430.5q0 240 -104.5 364t-310.5 124zM1031 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM687 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xd7;" d="M551 723l-330 332l70 69l330 -329l333 329l68 -67l-332 -334l332 -332l-68 -67l-333 329l-330 -327l-68 67z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1464" d="M1403 911q0 -187 -52 -365.5t-144.5 -304.5t-223 -193.5t-291.5 -67.5q-215 0 -348 112l-139 -170l-66 64l146 172q-113 149 -113 401q0 263 94 479.5t256.5 330.5t370.5 114q219 0 352 -121l133 168l70 -53l-145 -183q45 -51 72.5 -161t27.5 -222zM879 1389 q-134 0 -244 -59.5t-188.5 -170t-124.5 -267.5t-46 -319q0 -105 21.5 -191t56.5 -138l826 1032q-107 113 -301 113zM1294 901q0 85 -17.5 172t-43.5 129l-821 -1030q107 -100 293 -100q170 0 301 100t209.5 296.5t78.5 432.5z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1370" d="M176 0zM1395 1462l-207 -977q-58 -270 -197 -387.5t-375 -117.5q-440 0 -440 401q0 83 27 201l186 880h103l-193 -899q-20 -89 -20 -184q0 -309 342 -309q195 0 307.5 96.5t158.5 318.5l207 977h101zM946 1579h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303 v-25z" />
+<glyph unicode="&#xda;" horiz-adv-x="1370" d="M176 0zM1395 1462l-207 -977q-58 -270 -197 -387.5t-375 -117.5q-440 0 -440 401q0 83 27 201l186 880h103l-193 -899q-20 -89 -20 -184q0 -309 342 -309q195 0 307.5 96.5t158.5 318.5l207 977h101zM838 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5 t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1370" d="M176 0zM1395 1462l-207 -977q-58 -270 -197 -387.5t-375 -117.5q-440 0 -440 401q0 83 27 201l186 880h103l-193 -899q-20 -89 -20 -184q0 -309 342 -309q195 0 307.5 96.5t158.5 318.5l207 977h101zM1148 1579h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54 v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1370" d="M176 0zM1395 1462l-207 -977q-58 -270 -197 -387.5t-375 -117.5q-440 0 -440 401q0 83 27 201l186 880h103l-193 -899q-20 -89 -20 -184q0 -309 342 -309q195 0 307.5 96.5t158.5 318.5l207 977h101zM1022 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29 q-55 0 -55 63zM678 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xdd;" horiz-adv-x="965" d="M193 0zM494 645l544 817h117l-631 -932l-108 -530h-105l119 545l-237 917h100zM563 1600q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xde;" horiz-adv-x="1145" d="M1087 836q0 -247 -153 -373.5t-457 -126.5h-201l-71 -336h-103l310 1462h102l-57 -266h213q200 0 308.5 -92.5t108.5 -267.5zM293 428h190q256 0 376 98.5t120 302.5q0 275 -330 275h-211z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1094" d="M-162 -492q-73 0 -119 23v90q53 -24 115 -24q79 0 123 50.5t66 153.5l305 1409q80 357 405 357q137 0 215 -61.5t78 -174.5q0 -75 -44.5 -140.5t-166.5 -148.5q-107 -76 -141.5 -124.5t-34.5 -106.5q0 -51 34 -88.5t93 -75.5q96 -63 138 -133.5t42 -165.5 q0 -170 -106.5 -269t-286.5 -99q-143 0 -234 65v109q45 -36 112.5 -59t129.5 -23q132 0 208.5 71t76.5 195q0 75 -31.5 129t-109.5 108q-82 58 -119 110.5t-37 121.5q0 57 21 103t60.5 88.5t137.5 113.5q101 70 131.5 116t30.5 101q0 70 -55 110t-150 40q-129 0 -205 -76 t-108 -229l-291 -1377q-33 -152 -103.5 -220.5t-179.5 -68.5z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM809 1241h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM586 1262q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM955 1243h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM858 1249q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173 t-124.5 -55z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM835 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM491 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1133" d="M102 0zM655 1104q232 0 279 -219h6l59 202h80l-229 -1087h-82l45 274h-6q-84 -142 -187 -218t-237 -76q-281 0 -281 374q0 197 75 376t200.5 276.5t277.5 97.5zM406 70q89 0 177.5 62t159 166t107.5 230t37 213q0 79 -26 141.5t-77 99t-127 36.5q-124 0 -224 -82 t-164 -245.5t-64 -325.5q0 -152 50 -223.5t151 -71.5zM927 1448q0 -92 -57.5 -148.5t-145.5 -56.5q-93 0 -148 52t-55 145q0 88 59.5 144t149.5 56q88 0 142.5 -50t54.5 -142zM849 1446q0 57 -33.5 90t-87.5 33q-60 0 -93.5 -36t-33.5 -93t33 -90t90 -33q56 0 90.5 36 t34.5 93z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1602" d="M1155 -20q-123 0 -211 60t-117 165l-39 -205h-77l41 254h-9q-94 -142 -189 -208t-208 -66q-120 0 -182 94t-62 270q0 206 70.5 384.5t192.5 277t274 98.5q106 0 166 -56.5t74 -156.5h10l59 192h66l-35 -186q139 207 350 207q112 0 175 -61.5t63 -172.5 q0 -179 -158.5 -271.5t-470.5 -92.5h-39q-8 -51 -8 -96q0 -161 69.5 -250.5t217.5 -89.5q69 0 133.5 21t130.5 52v-94q-80 -37 -147 -53t-140 -16zM369 70q67 0 138.5 42t134 117.5t106 170.5t63.5 199t20 165q0 118 -49 186t-141 68q-123 0 -223 -86t-156.5 -240 t-56.5 -340q0 -150 42.5 -216t121.5 -66zM1317 1018q-119 0 -232 -115.5t-172 -308.5h48q263 0 383 67t120 203q0 71 -38.5 112.5t-108.5 41.5z" />
+<glyph unicode="&#xe7;" horiz-adv-x="887" d="M102 0zM477 -20q-174 0 -274.5 110.5t-100.5 306.5q0 193 73.5 361.5t198.5 257t290 88.5q134 0 241 -43l-28 -90q-107 47 -218 47q-129 0 -232.5 -77t-162.5 -222t-59 -320q0 -158 73.5 -243.5t208.5 -85.5q71 0 131.5 13t131.5 46v-92q-116 -57 -273 -57zM574 -289 q0 -94 -75.5 -148.5t-217.5 -54.5q-46 0 -78 7v79q30 -6 72 -6q198 0 198 115q0 97 -151 107l110 190h80l-78 -137q140 -30 140 -152z" />
+<glyph unicode="&#xe8;" horiz-adv-x="928" d="M102 0zM469 -20q-173 0 -270 109.5t-97 305.5q0 181 71 347t195.5 264t274.5 98q114 0 182 -61t68 -166q0 -181 -163.5 -276t-485.5 -95h-33q-6 -44 -6 -98q0 -165 74 -251.5t213 -86.5q132 0 276 73v-94q-140 -69 -299 -69zM631 1018q-131 0 -243.5 -115.5 t-162.5 -308.5h49q517 0 517 270q0 67 -43.5 110.5t-116.5 43.5zM751 1241h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xe9;" horiz-adv-x="928" d="M102 0zM469 -20q-173 0 -270 109.5t-97 305.5q0 181 71 347t195.5 264t274.5 98q114 0 182 -61t68 -166q0 -181 -163.5 -276t-485.5 -95h-33q-6 -44 -6 -98q0 -165 74 -251.5t213 -86.5q132 0 276 73v-94q-140 -69 -299 -69zM631 1018q-131 0 -243.5 -115.5 t-162.5 -308.5h49q517 0 517 270q0 67 -43.5 110.5t-116.5 43.5zM532 1262q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xea;" horiz-adv-x="928" d="M102 0zM469 -20q-173 0 -270 109.5t-97 305.5q0 181 71 347t195.5 264t274.5 98q114 0 182 -61t68 -166q0 -181 -163.5 -276t-485.5 -95h-33q-6 -44 -6 -98q0 -165 74 -251.5t213 -86.5q132 0 276 73v-94q-140 -69 -299 -69zM631 1018q-131 0 -243.5 -115.5 t-162.5 -308.5h49q517 0 517 270q0 67 -43.5 110.5t-116.5 43.5zM904 1241h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xeb;" horiz-adv-x="928" d="M102 0zM469 -20q-173 0 -270 109.5t-97 305.5q0 181 71 347t195.5 264t274.5 98q114 0 182 -61t68 -166q0 -181 -163.5 -276t-485.5 -95h-33q-6 -44 -6 -98q0 -165 74 -251.5t213 -86.5q132 0 276 73v-94q-140 -69 -299 -69zM631 1018q-131 0 -243.5 -115.5 t-162.5 -308.5h49q517 0 517 270q0 67 -43.5 110.5t-116.5 43.5zM780 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM436 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xec;" horiz-adv-x="475" d="M76 0zM174 0h-98l231 1087h96zM454 1241h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xed;" horiz-adv-x="475" d="M76 0zM174 0h-98l231 1087h96zM284 1262q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xee;" horiz-adv-x="475" d="M76 0zM174 0h-98l231 1087h96zM642 1241h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xef;" horiz-adv-x="475" d="M76 0zM174 0h-98l231 1087h96zM515 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM171 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1124" d="M713 1364q-54 60 -158 139l59 68q32 -26 81 -66t100 -94l266 150l39 -74l-256 -141q87 -116 131.5 -276t44.5 -335q0 -355 -141.5 -555t-399.5 -200q-177 0 -277 106.5t-100 294.5q0 170 63 301.5t178.5 203.5t262.5 72q107 0 188 -49.5t121 -142.5h5q0 139 -43 289 t-115 243l-295 -163l-39 73zM489 70q118 0 208.5 61t144 186.5t53.5 270.5q0 77 -35 142t-100 101.5t-156 36.5q-124 0 -213.5 -61.5t-137.5 -169.5t-48 -248q0 -153 73.5 -236t210.5 -83z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1143" d="M76 0zM764 0l149 692q21 92 21 156q0 80 -43.5 125t-134.5 45q-112 0 -210.5 -67t-166 -187.5t-103.5 -286.5l-102 -477h-98l231 1087h82l-37 -221h6q164 238 416 238q130 0 195 -64t65 -184q0 -70 -24 -182l-148 -674h-98zM874 1249q-40 0 -77.5 19t-75.5 45 q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1124" d="M98 0zM649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83zM744 1241h-66q-50 52 -114 144.5t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1124" d="M98 0zM649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83zM573 1262q66 51 150.5 142t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1124" d="M98 0zM649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83zM941 1241h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1124" d="M98 0zM649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83zM839 1249q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1124" d="M98 0zM649 1108q180 0 278.5 -108.5t98.5 -299.5q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5 q0 154 -73 237t-210 83zM812 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM468 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xf7;" d="M168 672v100h903v-100h-903zM522 373q0 106 96 106q48 0 73.5 -27.5t25.5 -78.5q0 -57 -29 -82t-70 -25q-96 0 -96 107zM522 1071q0 107 96 107q46 0 72.5 -27.5t26.5 -79.5q0 -57 -29 -81.5t-70 -24.5q-96 0 -96 106z" />
+<glyph unicode="&#xf8;" horiz-adv-x="1124" d="M164 127q-66 106 -66 276q0 191 73 358t197 257t281 90q150 0 250 -82l109 133l65 -53l-117 -143q70 -105 70 -263q0 -197 -71.5 -368.5t-195.5 -261.5t-286 -90q-163 0 -254 83l-110 -135l-64 54zM924 702q0 101 -35 179l-608 -742q67 -73 202 -73q127 0 225.5 77.5 t157 228t58.5 330.5zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -125 32 -197l605 739q-74 72 -197 72z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1143" d="M109 0zM381 1087l-152 -698q-22 -106 -22 -158q0 -74 47.5 -117.5t138.5 -43.5q110 0 207.5 65.5t164 187t99.5 279.5l105 485h98l-231 -1087h-80l28 205h-6q-167 -221 -403 -221q-131 0 -198.5 62t-67.5 181q0 60 22 170l150 690h100zM774 1241h-66q-50 52 -114 144.5 t-99 162.5v21h115q46 -129 164 -303v-25z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1143" d="M109 0zM381 1087l-152 -698q-22 -106 -22 -158q0 -74 47.5 -117.5t138.5 -43.5q110 0 207.5 65.5t164 187t99.5 279.5l105 485h98l-231 -1087h-80l28 205h-6q-167 -221 -403 -221q-131 0 -198.5 62t-67.5 181q0 60 22 170l150 690h100zM627 1262q66 51 150.5 142 t129.5 165h137v-23q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1143" d="M109 0zM381 1087l-152 -698q-22 -106 -22 -158q0 -74 47.5 -117.5t138.5 -43.5q110 0 207.5 65.5t164 187t99.5 279.5l105 485h98l-231 -1087h-80l28 205h-6q-167 -221 -403 -221q-131 0 -198.5 62t-67.5 181q0 60 22 170l150 690h100zM957 1241h-49q-70 60 -161 207 q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1143" d="M109 0zM381 1087l-152 -698q-22 -106 -22 -158q0 -74 47.5 -117.5t138.5 -43.5q110 0 207.5 65.5t164 187t99.5 279.5l105 485h98l-231 -1087h-80l28 205h-6q-167 -221 -403 -221q-131 0 -198.5 62t-67.5 181q0 60 22 170l150 690h100zM827 1366q0 49 20.5 78t56.5 29 q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM483 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#xfd;" horiz-adv-x="920" d="M0 0zM123 1087h100l82 -548q51 -351 55 -449h11q43 105 186 367l348 630h103l-713 -1290q-72 -127 -122.5 -178t-114 -81t-146.5 -30q-68 0 -129 21v92q71 -27 137 -27q80 0 147 49.5t130 164.5t100 184zM505 1262q66 51 150.5 142t129.5 165h137v-23 q-51 -66 -157.5 -158.5t-192.5 -146.5h-67v21z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1163" d="M498 -16q-230 0 -279 219h-4q-13 -72 -149 -695h-99l434 2048h99q-114 -535 -164 -751h6q93 156 199 229.5t231 73.5q133 0 206 -92.5t73 -282.5q0 -195 -72 -371t-197.5 -277t-283.5 -101zM748 1018q-86 0 -172.5 -57.5t-162.5 -169.5t-111.5 -238t-35.5 -207 q0 -125 61.5 -200.5t168.5 -75.5q124 0 225 84t164 243.5t63 325.5q0 295 -200 295z" />
+<glyph unicode="&#xff;" horiz-adv-x="920" d="M0 0zM123 1087h100l82 -548q51 -351 55 -449h11q43 105 186 367l348 630h103l-713 -1290q-72 -127 -122.5 -178t-114 -81t-146.5 -30q-68 0 -129 21v92q71 -27 137 -27q80 0 147 49.5t130 164.5t100 184zM698 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77 t-55 -29q-55 0 -55 63zM354 1366q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#x131;" horiz-adv-x="475" d="M174 0h-98l231 1087h96z" />
+<glyph unicode="&#x152;" horiz-adv-x="1767" d="M1530 0h-666q-25 -6 -77.5 -13t-94.5 -7q-251 0 -385.5 149.5t-134.5 429.5q0 263 96 482t262 330.5t381 111.5q130 0 240 -21h688l-20 -94h-625l-117 -553h590l-20 -94h-588l-135 -627h626zM705 72q68 0 116 12l271 1290q-110 15 -189 15q-182 0 -321.5 -98.5 t-222.5 -293.5t-83 -424q0 -245 109 -373t320 -128z" />
+<glyph unicode="&#x153;" horiz-adv-x="1720" d="M1262 -20q-135 0 -228 69t-125 201q-65 -127 -179 -198.5t-257 -71.5q-184 0 -279.5 109.5t-95.5 313.5q0 191 73 358t197 257t281 90q141 0 237 -74.5t126 -212.5q70 132 182.5 207.5t241.5 75.5q114 0 182 -61t68 -166q0 -181 -163.5 -276t-486.5 -95h-32 q-7 -38 -7 -98q0 -165 74 -251.5t213 -86.5q133 0 277 73v-94q-140 -69 -299 -69zM641 1022q-124 0 -223 -78.5t-158 -225t-59 -310.5q0 -342 282 -342q127 0 225.5 77.5t157 228t58.5 330.5q0 154 -73 237t-210 83zM1423 1018q-131 0 -243 -115t-162 -309h49q516 0 516 270 q0 70 -44.5 112t-115.5 42z" />
+<glyph unicode="&#x178;" horiz-adv-x="965" d="M193 0zM494 645l544 817h117l-631 -932l-108 -530h-105l119 545l-237 917h100zM798 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63zM454 1704q0 49 20.5 78t56.5 29q54 0 54 -64q0 -48 -21 -77t-55 -29q-55 0 -55 63z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1135" d="M958 1241h-49q-70 60 -161 207q-55 -57 -125 -114.5t-125 -92.5h-54v29q68 56 157.5 148.5t127.5 150.5h64q23 -64 72.5 -152.5t92.5 -146.5v-29z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M967 1448q0 -92 -57.5 -148.5t-145.5 -56.5q-93 0 -148 52t-55 145q0 88 59.5 144t149.5 56q88 0 142.5 -50t54.5 -142zM889 1446q0 57 -33.5 90t-87.5 33q-60 0 -93.5 -36t-33.5 -93t33 -90t90 -33q56 0 90.5 36t34.5 93z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1135" d="M831 1249q-40 0 -77.5 19t-75.5 45q-34 23 -64.5 41t-68.5 18q-45 0 -74 -28.5t-51 -100.5h-74q19 108 71 166.5t134 58.5q41 0 73.5 -14t117.5 -72q52 -36 94 -36q43 0 71.5 30.5t46.5 100.5h76q-26 -118 -74.5 -173t-124.5 -55z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="629" d="M82 502l18 90h457l-16 -90h-459z" />
+<glyph unicode="&#x2011;" horiz-adv-x="629" d="M82 502l18 90h457l-16 -90h-459z" />
+<glyph unicode="&#x2012;" horiz-adv-x="629" d="M82 502l18 90h457l-16 -90h-459z" />
+<glyph unicode="&#x2013;" horiz-adv-x="983" d="M66 502l18 90h807l-17 -90h-808z" />
+<glyph unicode="&#x2014;" horiz-adv-x="1966" d="M68 502l18 90h1788l-16 -90h-1790z" />
+<glyph unicode="&#x2018;" horiz-adv-x="299" d="M133 961l-4 22q41 100 116 231t161 248h73q-66 -106 -129.5 -242.5t-103.5 -258.5h-113z" />
+<glyph unicode="&#x2019;" horiz-adv-x="299" d="M475 1462l4 -22q-43 -105 -117.5 -235.5t-158.5 -243.5h-74q66 106 129.5 242.5t103.5 258.5h113z" />
+<glyph unicode="&#x201a;" horiz-adv-x="451" d="M246 238l4 -23q-40 -97 -115.5 -230t-161.5 -249h-73q68 110 131.5 248t101.5 254h113z" />
+<glyph unicode="&#x201c;" horiz-adv-x="631" d="M133 961l-4 22q41 100 116 231t161 248h73q-66 -106 -129.5 -242.5t-103.5 -258.5h-113zM467 961l-4 22q43 104 120 238.5t156 240.5h74q-66 -106 -129.5 -242.5t-103.5 -258.5h-113z" />
+<glyph unicode="&#x201d;" horiz-adv-x="631" d="M809 1462l4 -22q-43 -105 -117.5 -235.5t-158.5 -243.5h-74q66 106 129.5 242.5t103.5 258.5h113zM475 1462l4 -22q-43 -105 -117.5 -235.5t-158.5 -243.5h-74q66 106 129.5 242.5t103.5 258.5h113z" />
+<glyph unicode="&#x201e;" horiz-adv-x="776" d="M561 238l4 -23q-43 -105 -117.5 -235.5t-158.5 -243.5h-74q66 108 129 242.5t105 259.5h112zM227 238l4 -23q-43 -105 -117.5 -235.5t-158.5 -243.5h-74q73 119 135.5 254.5t98.5 247.5h112z" />
+<glyph unicode="&#x2022;" horiz-adv-x="793" d="M248 682q0 137 63 213t172 76q76 0 116 -39.5t40 -118.5q0 -125 -66 -207t-176 -82q-149 0 -149 158z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1489" d="M69 0zM69 55q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-67 -34.5q-68 0 -68 73zM569 55q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-67 -34.5q-68 0 -68 73zM1071 55q0 56 25 88.5t69 32.5q66 0 66 -72q0 -53 -25 -87.5t-67 -34.5q-68 0 -68 73z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="537" d="M451 932l57 -49l-318 -336l213 -385l-63 -39l-254 418l2 26z" />
+<glyph unicode="&#x203a;" horiz-adv-x="537" d="M94 123l-57 49l317 336l-213 385l64 39l254 -418l-2 -27z" />
+<glyph unicode="&#x2044;" horiz-adv-x="274" d="M731 1462l-1087 -1462h-107l1086 1462h108z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="643" d="M657 815h-131l-49 -229h-82l49 229h-391l21 76l506 577h86l-125 -581h133zM459 887q61 294 79 365.5t29 105.5q-10 -16 -61 -79t-338 -392h291z" />
+<glyph unicode="&#x20ac;" d="M991 1389q-186 0 -330.5 -120.5t-226.5 -346.5h457l-21 -82h-460q-30 -98 -39 -217h442l-20 -82h-424q0 -243 89 -356t265 -113q115 0 252 57v-94q-129 -55 -270 -55q-209 0 -325 139.5t-116 394.5v27h-184l16 82h172q5 101 35 217h-170l19 82h174q95 273 270 417 t399 144q166 0 287 -90l-53 -82q-102 78 -238 78z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1534" d="M477 741h-86v643h-217v78h522v-78h-219v-643zM1077 741l-221 609h-6l4 -201v-408h-82v721h125l221 -606l223 606h125v-721h-86v398l4 207h-6l-227 -605h-74z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1085" d="M0 1085h1085v-1085h-1085v1085z" />
+<glyph horiz-adv-x="1133" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+<hkern g1="uniFB00" u2="&#x201d;" k="-123" />
+<hkern g1="uniFB00" u2="&#x2019;" k="-123" />
+<hkern g1="uniFB00" u2="&#x27;" k="-123" />
+<hkern g1="uniFB00" u2="&#x22;" k="-123" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-LightItalic-webfont.woff b/docs/fonts/OpenSans-LightItalic-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..43e8b9e6cc061ff17fd2903075cbde12715512b3
GIT binary patch
literal 23400
zcmZ^}18`?e^d=nJb~3STXQGL1+qNgRZQHhO+n(6?g`2m&|5saEwcEFzI(?pdPWS2V
zs@A=3a$;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3uqatzW*~}HSg-;mVXy&3V<Td)0wYAS3jqcyvJ3_WDzX#?
z1}a&y1SknbQbe*02nQ;$1_4B|Bmsy~Sg=5dSg{5JM6o6Th*4O$1OSLwu?7J|Sy@?G
WxB>r#ump{<1pq_<0a34Kp8x=7I1^|9

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Regular-webfont.eot b/docs/fonts/OpenSans-Regular-webfont.eot
new file mode 100644
index 0000000000000000000000000000000000000000..6bbc3cf58cb011a6b4bf3cb1612ce212608f7274
GIT binary patch
literal 19836
zcmZsgRZtvUw51zpym5DThsL#WcXxNU5Zv8egL^}8cXxMp4*>!Rfh5d-=k3<aJ`bzv
zTdVedJ9Q*b1pug11^{6HTR^~nii&^$2M>gW1;PMQVF3RzW%ci{fFmPHfCS@z{{K`l
z41n@~^u3v|;D7Xg7dAi*;0~|>xc(Q?0$BW~UjGHq0h<3YJAe<s`9J3QA0Y(j{zp9j
za~%L~|2NGAU<YskIREpg|35t_|DO&3fTWh3`v0B|0Kfs9V*y|v0HhnhD2+XT9Y5t~
zs5fnI<e?biM{U*P$!f<c^Nao$yj1ue@mNRv&*wjxNaYfRp87RIL<WR?;`GmJ#09u4
z@IKw+lghFxea^8(2wEyF>Wd?h+ZWM9EYu5@Hs0EOnnkAtTzP9coXJALmS|h&nzJd%
z7?C@cPUEGrLHk-#NysfAePe#dP9_6D5VGbo4fVVs0)83}G7LoWV`e*{V_8RPK>Iqw
z*X0)8;uQ6FzC+dip(fgJU!9*!>pW6;pdJ$jHReX|0V)o@BosG=sN|PYN^-JAOY{e4
z&QjmR91WNK#}_%Ei?QhW{ab*7Eg=}E)Ft4XeyVhoR4<|byJf1$4VGsxP`9bNB<SB0
z-k#kUvW9ZT<zpaWv7B;XSQ0VkL(%r_Wn7K(V?F!1%pNqg#Anuud+s?&>p-((Wawhx
zlK;u}?+b5Ii!k>ELIS<vQi#wGTX;qTuWtP=J_%Cvy9g-KC=3#re_K(T;><N?uOWs3
zC!_eYeql@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BjKG*x$&BJ8m-_)4ksZrbC#k7mq<xTFUexjr
zTM{A+R<}qQ)OK}ks_O_0Lg!<;jhm&P0e+_U;i+Rs0zGkSr{$m7%c<88N|<nVQgF4U
MJVR|eexoq?Fm#!HRsaA1

literal 0
HcmV?d00001

diff --git a/docs/fonts/OpenSans-Regular-webfont.svg b/docs/fonts/OpenSans-Regular-webfont.svg
new file mode 100644
index 0000000..25a3952
--- /dev/null
+++ b/docs/fonts/OpenSans-Regular-webfont.svg
@@ -0,0 +1,1831 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="open_sansregular" horiz-adv-x="1171" >
+<font-face units-per-em="2048" ascent="1638" descent="-410" />
+<missing-glyph horiz-adv-x="532" />
+<glyph unicode="&#xfb01;" horiz-adv-x="1212" d="M29 0zM670 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM1036 0h-166v1096h166v-1096zM856 1393q0 57 28 83.5t70 26.5q40 0 69 -27t29 -83t-29 -83.5t-69 -27.5 q-42 0 -70 27.5t-28 83.5z" />
+<glyph unicode="&#xfb02;" horiz-adv-x="1212" d="M29 0zM670 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM1036 0h-166v1556h166v-1556z" />
+<glyph unicode="&#xfb03;" horiz-adv-x="1909" d="M29 0zM1358 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM670 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31 q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM1731 0h-166v1096h166v-1096zM1551 1393q0 57 28 83.5t70 26.5q40 0 69 -27t29 -83t-29 -83.5t-69 -27.5q-42 0 -70 27.5t-28 83.5z" />
+<glyph unicode="&#xfb04;" horiz-adv-x="1909" d="M29 0zM1358 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM670 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31 q-94 0 -139 -62.5t-45 -200.5v-71h279v-129zM1731 0h-166v1556h166v-1556z" />
+<glyph horiz-adv-x="2048" />
+<glyph horiz-adv-x="2048" />
+<glyph unicode="&#xd;" horiz-adv-x="1044" />
+<glyph unicode=" "  horiz-adv-x="532" />
+<glyph unicode="&#x09;" horiz-adv-x="532" />
+<glyph unicode="&#xa0;" horiz-adv-x="532" />
+<glyph unicode="!" horiz-adv-x="547" d="M326 403h-105l-51 1059h207zM152 106q0 136 120 136q58 0 89.5 -35t31.5 -101q0 -64 -32 -99.5t-89 -35.5q-52 0 -86 31.5t-34 103.5z" />
+<glyph unicode="&#x22;" horiz-adv-x="821" d="M319 1462l-40 -528h-105l-41 528h186zM688 1462l-41 -528h-104l-41 528h186z" />
+<glyph unicode="#" horiz-adv-x="1323" d="M981 899l-66 -340h283v-129h-307l-84 -430h-137l84 430h-303l-82 -430h-136l80 430h-262v129h287l68 340h-277v127h299l82 436h139l-82 -436h305l84 436h134l-84 -436h264v-127h-289zM475 559h303l66 340h-303z" />
+<glyph unicode="$" d="M1036 449q0 -136 -102 -224.5t-285 -111.5v-232h-129v223q-112 0 -217 17.5t-172 48.5v156q83 -37 191.5 -60.5t197.5 -23.5v440q-205 65 -287.5 151t-82.5 222q0 131 101.5 215t268.5 102v182h129v-180q184 -5 355 -74l-52 -131q-149 59 -303 70v-434q157 -50 235 -97.5 t115 -109t37 -149.5zM866 436q0 72 -44.5 116.5t-172.5 88.5v-389q217 30 217 184zM319 1057q0 -76 45 -122t156 -87v387q-99 -16 -150 -62.5t-51 -115.5z" />
+<glyph unicode="%" horiz-adv-x="1686" d="M242 1026q0 -170 37 -255t120 -85q164 0 164 340q0 338 -164 338q-83 0 -120 -84t-37 -254zM700 1026q0 -228 -76.5 -344.5t-224.5 -116.5q-140 0 -217.5 119t-77.5 342q0 227 74.5 342t220.5 115q145 0 223 -119t78 -338zM1122 440q0 -171 37 -255.5t121 -84.5t124 83.5 t40 256.5q0 171 -40 253.5t-124 82.5t-121 -82.5t-37 -253.5zM1581 440q0 -227 -76.5 -343.5t-224.5 -116.5q-142 0 -218.5 119t-76.5 341q0 227 74.5 342t220.5 115q142 0 221.5 -117.5t79.5 -339.5zM1323 1462l-811 -1462h-147l811 1462h147z" />
+<glyph unicode="&#x26;" horiz-adv-x="1495" d="M414 1171q0 -69 36 -131.5t123 -150.5q129 75 179.5 138.5t50.5 146.5q0 77 -51.5 125.5t-137.5 48.5q-89 0 -144.5 -48t-55.5 -129zM569 129q241 0 400 154l-437 424q-111 -68 -157 -112.5t-68 -95.5t-22 -116q0 -117 77.5 -185.5t206.5 -68.5zM113 379q0 130 69.5 230 t249.5 202q-85 95 -115.5 144t-48.5 102t-18 110q0 150 98 234t273 84q162 0 255 -83.5t93 -232.5q0 -107 -68 -197.5t-225 -183.5l407 -391q56 62 89.5 145.5t56.5 182.5h168q-68 -286 -205 -434l299 -291h-229l-185 178q-118 -106 -240 -152t-272 -46q-215 0 -333.5 106 t-118.5 293z" />
+<glyph unicode="'" horiz-adv-x="453" d="M319 1462l-40 -528h-105l-41 528h186z" />
+<glyph unicode="(" horiz-adv-x="606" d="M82 561q0 265 77.5 496t223.5 405h162q-144 -193 -216.5 -424t-72.5 -475q0 -240 74 -469t213 -418h-160q-147 170 -224 397t-77 488z" />
+<glyph unicode=")" horiz-adv-x="606" d="M524 561q0 -263 -77.5 -490t-223.5 -395h-160q139 188 213 417.5t74 469.5q0 244 -72.5 475t-216.5 424h162q147 -175 224 -406.5t77 -494.5z" />
+<glyph unicode="*" horiz-adv-x="1130" d="M657 1556l-43 -395l398 111l26 -182l-381 -31l248 -326l-172 -94l-176 362l-160 -362l-176 94l242 326l-377 31l29 182l391 -111l-43 395h194z" />
+<glyph unicode="+" d="M653 791h412v-138h-412v-426h-139v426h-410v138h410v428h139v-428z" />
+<glyph unicode="," horiz-adv-x="502" d="M350 238l15 -23q-26 -100 -75 -232.5t-102 -246.5h-125q27 104 59.5 257t45.5 245h182z" />
+<glyph unicode="-" horiz-adv-x="659" d="M84 473v152h491v-152h-491z" />
+<glyph unicode="." horiz-adv-x="545" d="M152 106q0 67 30.5 101.5t87.5 34.5q58 0 90.5 -34.5t32.5 -101.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5z" />
+<glyph unicode="/" horiz-adv-x="752" d="M731 1462l-545 -1462h-166l545 1462h166z" />
+<glyph unicode="0" d="M1069 733q0 -379 -119.5 -566t-365.5 -187q-236 0 -359 191.5t-123 561.5q0 382 119 567t363 185q238 0 361.5 -193t123.5 -559zM270 733q0 -319 75 -464.5t239 -145.5q166 0 240.5 147.5t74.5 462.5t-74.5 461.5t-240.5 146.5q-164 0 -239 -144.5t-75 -463.5z" />
+<glyph unicode="1" d="M715 0h-162v1042q0 130 8 246q-21 -21 -47 -44t-238 -195l-88 114l387 299h140v-1462z" />
+<glyph unicode="2" d="M1061 0h-961v143l385 387q176 178 232 254t84 148t28 155q0 117 -71 185.5t-197 68.5q-91 0 -172.5 -30t-181.5 -109l-88 113q202 168 440 168q206 0 323 -105.5t117 -283.5q0 -139 -78 -275t-292 -344l-320 -313v-8h752v-154z" />
+<glyph unicode="3" d="M1006 1118q0 -140 -78.5 -229t-222.5 -119v-8q176 -22 261 -112t85 -236q0 -209 -145 -321.5t-412 -112.5q-116 0 -212.5 17.5t-187.5 61.5v158q95 -47 202.5 -71.5t203.5 -24.5q379 0 379 297q0 266 -418 266h-144v143h146q171 0 271 75.5t100 209.5q0 107 -73.5 168 t-199.5 61q-96 0 -181 -26t-194 -96l-84 112q90 71 207.5 111.5t247.5 40.5q213 0 331 -97.5t118 -267.5z" />
+<glyph unicode="4" d="M1130 336h-217v-336h-159v336h-711v145l694 989h176v-983h217v-151zM754 487v486q0 143 10 323h-8q-48 -96 -90 -159l-457 -650h545z" />
+<glyph unicode="5" d="M557 893q231 0 363.5 -114.5t132.5 -313.5q0 -227 -144.5 -356t-398.5 -129q-247 0 -377 79v160q70 -45 174 -70.5t205 -25.5q176 0 273.5 83t97.5 240q0 306 -375 306q-95 0 -254 -29l-86 55l55 684h727v-153h-585l-37 -439q115 23 229 23z" />
+<glyph unicode="6" d="M117 625q0 431 167.5 644.5t495.5 213.5q113 0 178 -19v-143q-77 25 -176 25q-235 0 -359 -146.5t-136 -460.5h12q110 172 348 172q197 0 310.5 -119t113.5 -323q0 -228 -124.5 -358.5t-336.5 -130.5q-227 0 -360 170.5t-133 474.5zM608 121q142 0 220.5 89.5t78.5 258.5 q0 145 -73 228t-218 83q-90 0 -165 -37t-119.5 -102t-44.5 -135q0 -103 40 -192t113.5 -141t167.5 -52z" />
+<glyph unicode="7" d="M285 0l606 1309h-797v153h973v-133l-598 -1329h-184z" />
+<glyph unicode="8" d="M584 1483q200 0 317 -93t117 -257q0 -108 -67 -197t-214 -162q178 -85 253 -178.5t75 -216.5q0 -182 -127 -290.5t-348 -108.5q-234 0 -360 102.5t-126 290.5q0 251 306 391q-138 78 -198 168.5t-60 202.5q0 159 117.5 253.5t314.5 94.5zM268 369q0 -120 83.5 -187 t234.5 -67q149 0 232 70t83 192q0 97 -78 172.5t-272 146.5q-149 -64 -216 -141.5t-67 -185.5zM582 1348q-125 0 -196 -60t-71 -160q0 -92 59 -158t218 -132q143 60 202.5 129t59.5 161q0 101 -72.5 160.5t-199.5 59.5z" />
+<glyph unicode="9" d="M1061 838q0 -858 -664 -858q-116 0 -184 20v143q80 -26 182 -26q240 0 362.5 148.5t133.5 455.5h-12q-55 -83 -146 -126.5t-205 -43.5q-194 0 -308 116t-114 324q0 228 127.5 360t335.5 132q149 0 260.5 -76.5t171.5 -223t60 -345.5zM569 1341q-143 0 -221 -92t-78 -256 q0 -144 72 -226.5t219 -82.5q91 0 167.5 37t120.5 101t44 134q0 105 -41 194t-114.5 140t-168.5 51z" />
+<glyph unicode=":" horiz-adv-x="545" d="M152 106q0 67 30.5 101.5t87.5 34.5q58 0 90.5 -34.5t32.5 -101.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5zM152 989q0 135 118 135q123 0 123 -135q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5z" />
+<glyph unicode=";" horiz-adv-x="545" d="M350 238l15 -23q-26 -100 -75 -232.5t-102 -246.5h-125q27 104 59.5 257t45.5 245h182zM147 989q0 135 119 135q123 0 123 -135q0 -65 -33 -100t-90 -35q-58 0 -88.5 35t-30.5 100z" />
+<glyph unicode="&#x3c;" d="M1065 242l-961 422v98l961 479v-149l-782 -371l782 -328v-151z" />
+<glyph unicode="=" d="M119 858v137h930v-137h-930zM119 449v137h930v-137h-930z" />
+<glyph unicode="&#x3e;" d="M104 393l783 326l-783 373v149l961 -479v-98l-961 -422v151z" />
+<glyph unicode="?" horiz-adv-x="879" d="M289 403v54q0 117 36 192.5t134 159.5q136 115 171.5 173t35.5 140q0 102 -65.5 157.5t-188.5 55.5q-79 0 -154 -18.5t-172 -67.5l-59 135q189 99 395 99q191 0 297 -94t106 -265q0 -73 -19.5 -128.5t-57.5 -105t-164 -159.5q-101 -86 -133.5 -143t-32.5 -152v-33h-129z M240 106q0 136 120 136q58 0 89.5 -35t31.5 -101q0 -64 -32 -99.5t-89 -35.5q-52 0 -86 31.5t-34 103.5z" />
+<glyph unicode="@" horiz-adv-x="1841" d="M1720 729q0 -142 -44 -260t-124 -183t-184 -65q-86 0 -145 52t-70 133h-8q-40 -87 -114.5 -136t-176.5 -49q-150 0 -234.5 102.5t-84.5 278.5q0 204 118 331.5t310 127.5q68 0 154 -12.5t155 -34.5l-25 -470v-22q0 -178 133 -178q91 0 148 107.5t57 279.5q0 181 -74 317 t-210.5 209.5t-313.5 73.5q-223 0 -388 -92.5t-252 -264t-87 -396.5q0 -305 161 -469t464 -164q210 0 436 86v-133q-192 -84 -436 -84q-363 0 -563.5 199.5t-200.5 557.5q0 260 107 463t305 314.5t454 111.5q215 0 382.5 -90.5t259 -257t91.5 -383.5zM686 598 q0 -254 195 -254q207 0 225 313l14 261q-72 20 -157 20q-130 0 -203.5 -90t-73.5 -250z" />
+<glyph unicode="A" horiz-adv-x="1296" d="M1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473z" />
+<glyph unicode="B" horiz-adv-x="1327" d="M201 1462h413q291 0 421 -87t130 -275q0 -130 -72.5 -214.5t-211.5 -109.5v-10q333 -57 333 -350q0 -196 -132.5 -306t-370.5 -110h-510v1462zM371 836h280q180 0 259 56.5t79 190.5q0 123 -88 177.5t-280 54.5h-250v-479zM371 692v-547h305q177 0 266.5 68.5t89.5 214.5 q0 136 -91.5 200t-278.5 64h-291z" />
+<glyph unicode="C" horiz-adv-x="1292" d="M827 1331q-241 0 -380.5 -160.5t-139.5 -439.5q0 -287 134.5 -443.5t383.5 -156.5q153 0 349 55v-149q-152 -57 -375 -57q-323 0 -498.5 196t-175.5 557q0 226 84.5 396t244 262t375.5 92q230 0 402 -84l-72 -146q-166 78 -332 78z" />
+<glyph unicode="D" horiz-adv-x="1493" d="M1368 745q0 -362 -196.5 -553.5t-565.5 -191.5h-405v1462h448q341 0 530 -189t189 -528zM1188 739q0 286 -143.5 431t-426.5 145h-247v-1168h207q304 0 457 149.5t153 442.5z" />
+<glyph unicode="E" horiz-adv-x="1139" d="M1016 0h-815v1462h815v-151h-645v-471h606v-150h-606v-538h645v-152z" />
+<glyph unicode="F" horiz-adv-x="1057" d="M371 0h-170v1462h815v-151h-645v-535h606v-151h-606v-625z" />
+<glyph unicode="G" horiz-adv-x="1491" d="M844 766h497v-711q-116 -37 -236 -56t-278 -19q-332 0 -517 197.5t-185 553.5q0 228 91.5 399.5t263.5 262t403 90.5q234 0 436 -86l-66 -150q-198 84 -381 84q-267 0 -417 -159t-150 -441q0 -296 144.5 -449t424.5 -153q152 0 297 35v450h-327v152z" />
+<glyph unicode="H" horiz-adv-x="1511" d="M1311 0h-170v688h-770v-688h-170v1462h170v-622h770v622h170v-1462z" />
+<glyph unicode="I" horiz-adv-x="571" d="M201 0v1462h170v-1462h-170z" />
+<glyph unicode="J" horiz-adv-x="547" d="M-12 -385q-94 0 -148 27v145q71 -20 148 -20q99 0 150.5 60t51.5 173v1462h170v-1448q0 -190 -96 -294.5t-276 -104.5z" />
+<glyph unicode="K" horiz-adv-x="1257" d="M1257 0h-200l-533 709l-153 -136v-573h-170v1462h170v-725l663 725h201l-588 -635z" />
+<glyph unicode="L" horiz-adv-x="1063" d="M201 0v1462h170v-1308h645v-154h-815z" />
+<glyph unicode="M" horiz-adv-x="1849" d="M848 0l-496 1296h-8q14 -154 14 -366v-930h-157v1462h256l463 -1206h8l467 1206h254v-1462h-170v942q0 162 14 352h-8l-500 -1294h-137z" />
+<glyph unicode="N" horiz-adv-x="1544" d="M1343 0h-194l-799 1227h-8q16 -216 16 -396v-831h-157v1462h192l797 -1222h8q-2 27 -9 173.5t-5 209.5v839h159v-1462z" />
+<glyph unicode="O" horiz-adv-x="1595" d="M1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5z" />
+<glyph unicode="P" horiz-adv-x="1233" d="M1128 1036q0 -222 -151.5 -341.5t-433.5 -119.5h-172v-575h-170v1462h379q548 0 548 -426zM371 721h153q226 0 327 73t101 234q0 145 -95 216t-296 71h-190v-594z" />
+<glyph unicode="Q" horiz-adv-x="1595" d="M1470 733q0 -281 -113 -467t-319 -252l348 -362h-247l-285 330l-55 -2q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5 q-243 0 -369.5 -153.5t-126.5 -446.5z" />
+<glyph unicode="R" horiz-adv-x="1266" d="M371 608v-608h-170v1462h401q269 0 397.5 -103t128.5 -310q0 -290 -294 -392l397 -657h-201l-354 608h-305zM371 754h233q180 0 264 71.5t84 214.5q0 145 -85.5 209t-274.5 64h-221v-559z" />
+<glyph unicode="S" horiz-adv-x="1124" d="M1026 389q0 -193 -140 -301t-380 -108q-260 0 -400 67v164q90 -38 196 -60t210 -22q170 0 256 64.5t86 179.5q0 76 -30.5 124.5t-102 89.5t-217.5 93q-204 73 -291.5 173t-87.5 261q0 169 127 269t336 100q218 0 401 -80l-53 -148q-181 76 -352 76q-135 0 -211 -58 t-76 -161q0 -76 28 -124.5t94.5 -89t203.5 -89.5q230 -82 316.5 -176t86.5 -244z" />
+<glyph unicode="T" horiz-adv-x="1133" d="M651 0h-170v1311h-463v151h1096v-151h-463v-1311z" />
+<glyph unicode="U" horiz-adv-x="1491" d="M1305 1462v-946q0 -250 -151 -393t-415 -143t-408.5 144t-144.5 396v942h170v-954q0 -183 100 -281t294 -98q185 0 285 98.5t100 282.5v952h170z" />
+<glyph unicode="V" horiz-adv-x="1219" d="M1036 1462h183l-527 -1462h-168l-524 1462h180l336 -946q58 -163 92 -317q36 162 94 323z" />
+<glyph unicode="W" horiz-adv-x="1896" d="M1477 0h-168l-295 979q-21 65 -47 164t-27 119q-22 -132 -70 -289l-286 -973h-168l-389 1462h180l231 -903q48 -190 70 -344q27 183 80 358l262 889h180l275 -897q48 -155 81 -350q19 142 72 346l230 901h180z" />
+<glyph unicode="X" horiz-adv-x="1182" d="M1174 0h-193l-393 643l-400 -643h-180l486 764l-453 698h188l363 -579l366 579h181l-453 -692z" />
+<glyph unicode="Y" horiz-adv-x="1147" d="M573 731l390 731h184l-488 -895v-567h-172v559l-487 903h186z" />
+<glyph unicode="Z" horiz-adv-x="1169" d="M1087 0h-1005v133l776 1176h-752v153h959v-133l-776 -1175h798v-154z" />
+<glyph unicode="[" horiz-adv-x="674" d="M623 -324h-457v1786h457v-141h-289v-1503h289v-142z" />
+<glyph unicode="\" horiz-adv-x="752" d="M186 1462l547 -1462h-166l-544 1462h163z" />
+<glyph unicode="]" horiz-adv-x="674" d="M51 -182h289v1503h-289v141h457v-1786h-457v142z" />
+<glyph unicode="^" horiz-adv-x="1110" d="M49 551l434 922h99l477 -922h-152l-372 745l-334 -745h-152z" />
+<glyph unicode="_" horiz-adv-x="918" d="M922 -315h-926v131h926v-131z" />
+<glyph unicode="`" horiz-adv-x="1182" d="M786 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="a" horiz-adv-x="1139" d="M850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85t88.5 238 v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47z" />
+<glyph unicode="b" horiz-adv-x="1255" d="M686 1114q216 0 335.5 -147.5t119.5 -417.5t-120.5 -419.5t-334.5 -149.5q-107 0 -195.5 39.5t-148.5 121.5h-12l-35 -141h-119v1556h166v-378q0 -127 -8 -228h8q116 164 344 164zM662 975q-170 0 -245 -97.5t-75 -328.5t77 -330.5t247 -99.5q153 0 228 111.5t75 320.5 q0 214 -75 319t-232 105z" />
+<glyph unicode="c" horiz-adv-x="975" d="M614 -20q-238 0 -368.5 146.5t-130.5 414.5q0 275 132.5 425t377.5 150q79 0 158 -17t124 -40l-51 -141q-55 22 -120 36.5t-115 14.5q-334 0 -334 -426q0 -202 81.5 -310t241.5 -108q137 0 281 59v-147q-110 -57 -277 -57z" />
+<glyph unicode="d" horiz-adv-x="1255" d="M922 147h-9q-115 -167 -344 -167q-215 0 -334.5 147t-119.5 418t120 421t334 150q223 0 342 -162h13l-7 79l-4 77v446h166v-1556h-135zM590 119q170 0 246.5 92.5t76.5 298.5v35q0 233 -77.5 332.5t-247.5 99.5q-146 0 -223.5 -113.5t-77.5 -320.5q0 -210 77 -317 t226 -107z" />
+<glyph unicode="e" horiz-adv-x="1149" d="M639 -20q-243 0 -383.5 148t-140.5 411q0 265 130.5 421t350.5 156q206 0 326 -135.5t120 -357.5v-105h-755q5 -193 97.5 -293t260.5 -100q177 0 350 74v-148q-88 -38 -166.5 -54.5t-189.5 -16.5zM594 977q-132 0 -210.5 -86t-92.5 -238h573q0 157 -70 240.5t-200 83.5z " />
+<glyph unicode="f" horiz-adv-x="694" d="M670 967h-279v-967h-166v967h-196v75l196 60v61q0 404 353 404q87 0 204 -35l-43 -133q-96 31 -164 31q-94 0 -139 -62.5t-45 -200.5v-71h279v-129z" />
+<glyph unicode="g" horiz-adv-x="1122" d="M1073 1096v-105l-203 -24q28 -35 50 -91.5t22 -127.5q0 -161 -110 -257t-302 -96q-49 0 -92 8q-106 -56 -106 -141q0 -45 37 -66.5t127 -21.5h194q178 0 273.5 -75t95.5 -218q0 -182 -146 -277.5t-426 -95.5q-215 0 -331.5 80t-116.5 226q0 100 64 173t180 99 q-42 19 -70.5 59t-28.5 93q0 60 32 105t101 87q-85 35 -138.5 119t-53.5 192q0 180 108 277.5t306 97.5q86 0 155 -20h379zM199 -184q0 -89 75 -135t215 -46q209 0 309.5 62.5t100.5 169.5q0 89 -55 123.5t-207 34.5h-199q-113 0 -176 -54t-63 -155zM289 745q0 -115 65 -174 t181 -59q243 0 243 236q0 247 -246 247q-117 0 -180 -63t-63 -187z" />
+<glyph unicode="h" horiz-adv-x="1257" d="M926 0v709q0 134 -61 200t-191 66q-173 0 -252.5 -94t-79.5 -308v-573h-166v1556h166v-471q0 -85 -8 -141h10q49 79 139.5 124.5t206.5 45.5q201 0 301.5 -95.5t100.5 -303.5v-715h-166z" />
+<glyph unicode="i" horiz-adv-x="518" d="M342 0h-166v1096h166v-1096zM162 1393q0 57 28 83.5t70 26.5q40 0 69 -27t29 -83t-29 -83.5t-69 -27.5q-42 0 -70 27.5t-28 83.5z" />
+<glyph unicode="j" horiz-adv-x="518" d="M43 -492q-95 0 -154 25v135q69 -20 136 -20q78 0 114.5 42.5t36.5 129.5v1276h166v-1264q0 -324 -299 -324zM162 1393q0 57 28 83.5t70 26.5q40 0 69 -27t29 -83t-29 -83.5t-69 -27.5q-42 0 -70 27.5t-28 83.5z" />
+<glyph unicode="k" horiz-adv-x="1075" d="M340 561q43 61 131 160l354 375h197l-444 -467l475 -629h-201l-387 518l-125 -108v-410h-164v1556h164v-825q0 -55 -8 -170h8z" />
+<glyph unicode="l" horiz-adv-x="518" d="M342 0h-166v1556h166v-1556z" />
+<glyph unicode="m" horiz-adv-x="1905" d="M1573 0v713q0 131 -56 196.5t-174 65.5q-155 0 -229 -89t-74 -274v-612h-166v713q0 131 -56 196.5t-175 65.5q-156 0 -228.5 -93.5t-72.5 -306.5v-575h-166v1096h135l27 -150h8q47 80 132.5 125t191.5 45q257 0 336 -186h8q49 86 142 136t212 50q186 0 278.5 -95.5 t92.5 -305.5v-715h-166z" />
+<glyph unicode="n" horiz-adv-x="1257" d="M926 0v709q0 134 -61 200t-191 66q-172 0 -252 -93t-80 -307v-575h-166v1096h135l27 -150h8q51 81 143 125.5t205 44.5q198 0 298 -95.5t100 -305.5v-715h-166z" />
+<glyph unicode="o" horiz-adv-x="1237" d="M1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z" />
+<glyph unicode="p" horiz-adv-x="1255" d="M686 -20q-107 0 -195.5 39.5t-148.5 121.5h-12q12 -96 12 -182v-451h-166v1588h135l23 -150h8q64 90 149 130t195 40q218 0 336.5 -149t118.5 -418q0 -270 -120.5 -419.5t-334.5 -149.5zM662 975q-168 0 -243 -93t-77 -296v-37q0 -231 77 -330.5t247 -99.5 q142 0 222.5 115t80.5 317q0 205 -80.5 314.5t-226.5 109.5z" />
+<glyph unicode="q" horiz-adv-x="1255" d="M590 119q166 0 242 89t81 300v37q0 230 -78 331t-247 101q-146 0 -223.5 -113.5t-77.5 -320.5t76.5 -315.5t226.5 -108.5zM565 -20q-212 0 -331 149t-119 416q0 269 120 420t334 151q225 0 346 -170h9l24 150h131v-1588h-166v469q0 100 11 170h-13q-115 -167 -346 -167z " />
+<glyph unicode="r" horiz-adv-x="836" d="M676 1116q73 0 131 -12l-23 -154q-68 15 -120 15q-133 0 -227.5 -108t-94.5 -269v-588h-166v1096h137l19 -203h8q61 107 147 165t189 58z" />
+<glyph unicode="s" horiz-adv-x="977" d="M883 299q0 -153 -114 -236t-320 -83q-218 0 -340 69v154q79 -40 169.5 -63t174.5 -23q130 0 200 41.5t70 126.5q0 64 -55.5 109.5t-216.5 107.5q-153 57 -217.5 99.5t-96 96.5t-31.5 129q0 134 109 211.5t299 77.5q177 0 346 -72l-59 -135q-165 68 -299 68 q-118 0 -178 -37t-60 -102q0 -44 22.5 -75t72.5 -59t192 -81q195 -71 263.5 -143t68.5 -181z" />
+<glyph unicode="t" horiz-adv-x="723" d="M530 117q44 0 85 6.5t65 13.5v-127q-27 -13 -79.5 -21.5t-94.5 -8.5q-318 0 -318 335v652h-157v80l157 69l70 234h96v-254h318v-129h-318v-645q0 -99 47 -152t129 -53z" />
+<glyph unicode="u" horiz-adv-x="1257" d="M332 1096v-711q0 -134 61 -200t191 -66q172 0 251.5 94t79.5 307v576h166v-1096h-137l-24 147h-9q-51 -81 -141.5 -124t-206.5 -43q-200 0 -299.5 95t-99.5 304v717h168z" />
+<glyph unicode="v" horiz-adv-x="1026" d="M416 0l-416 1096h178l236 -650q80 -228 94 -296h8q11 53 69.5 219.5t262.5 726.5h178l-416 -1096h-194z" />
+<glyph unicode="w" horiz-adv-x="1593" d="M1071 0l-201 643q-19 59 -71 268h-8q-40 -175 -70 -270l-207 -641h-192l-299 1096h174q106 -413 161.5 -629t63.5 -291h8q11 57 35.5 147.5t42.5 143.5l201 629h180l196 -629q56 -172 76 -289h8q4 36 21.5 111t208.5 807h172l-303 -1096h-197z" />
+<glyph unicode="x" horiz-adv-x="1073" d="M440 561l-381 535h189l289 -420l288 420h187l-381 -535l401 -561h-188l-307 444l-310 -444h-188z" />
+<glyph unicode="y" horiz-adv-x="1032" d="M2 1096h178l240 -625q79 -214 98 -309h8q13 51 54.5 174.5t271.5 759.5h178l-471 -1248q-70 -185 -163.5 -262.5t-229.5 -77.5q-76 0 -150 17v133q55 -12 123 -12q171 0 244 192l61 156z" />
+<glyph unicode="z" horiz-adv-x="958" d="M877 0h-795v113l598 854h-561v129h743v-129l-590 -838h605v-129z" />
+<glyph unicode="{" horiz-adv-x="776" d="M475 12q0 -102 58.5 -148t171.5 -48v-140q-190 2 -294 87t-104 239v303q0 104 -63 148.5t-183 44.5v141q130 2 188 48t58 142v306q0 155 108 241t290 86v-139q-230 -6 -230 -199v-295q0 -215 -223 -254v-12q223 -39 223 -254v-297z" />
+<glyph unicode="|" horiz-adv-x="1128" d="M494 1556h141v-2052h-141v2052z" />
+<glyph unicode="}" horiz-adv-x="776" d="M522 575q-223 39 -223 254v295q0 193 -227 199v139q184 0 289.5 -87t105.5 -240v-306q0 -97 59 -142.5t189 -47.5v-141q-122 0 -185 -44.5t-63 -148.5v-303q0 -153 -102.5 -238.5t-292.5 -87.5v140q111 2 169 48t58 148v297q0 114 55 174t168 80v12z" />
+<glyph unicode="~" d="M338 713q-53 0 -116.5 -33.5t-117.5 -87.5v151q100 109 244 109q68 0 124.5 -14t145.5 -52q66 -28 115 -41.5t96 -13.5q54 0 118 32t118 89v-150q-102 -110 -244 -110q-72 0 -135 16.5t-135 48.5q-75 32 -120 44t-93 12z" />
+<glyph unicode="&#xa1;" horiz-adv-x="547" d="M219 684h105l51 -1057h-207zM393 983q0 -135 -121 -135q-60 0 -90 35.5t-30 99.5q0 63 31.5 99t88.5 36q51 0 86 -32t35 -103z" />
+<glyph unicode="&#xa2;" d="M971 240q-105 -54 -252 -60v-200h-133v206q-203 32 -299.5 168.5t-96.5 386.5q0 508 396 570v172h135v-164q75 -3 146 -19.5t120 -39.5l-49 -140q-133 51 -242 51q-172 0 -253 -105.5t-81 -322.5q0 -212 79.5 -313.5t246.5 -101.5q141 0 283 59v-147z" />
+<glyph unicode="&#xa3;" d="M682 1481q190 0 360 -84l-61 -133q-154 77 -297 77q-123 0 -185.5 -62t-62.5 -202v-295h422v-127h-422v-221q0 -100 -32.5 -168t-106.5 -112h795v-154h-1029v141q205 47 205 291v223h-198v127h198v316q0 178 112 280.5t302 102.5z" />
+<glyph unicode="&#xa4;" d="M184 723q0 122 74 229l-135 140l94 92l135 -133q104 73 234 73q127 0 229 -73l137 133l95 -92l-134 -138q74 -113 74 -231q0 -131 -74 -234l131 -135l-92 -92l-137 133q-102 -71 -229 -71q-134 0 -234 73l-135 -133l-92 92l133 136q-74 107 -74 231zM313 723 q0 -112 78.5 -192t194.5 -80t195 79.5t79 192.5q0 114 -80 195t-194 81q-116 0 -194.5 -82t-78.5 -194z" />
+<glyph unicode="&#xa5;" d="M584 735l379 727h174l-416 -770h262v-127h-317v-170h317v-127h-317v-268h-164v268h-316v127h316v170h-316v127h256l-411 770h178z" />
+<glyph unicode="&#xa6;" horiz-adv-x="1128" d="M494 1556h141v-776h-141v776zM494 281h141v-777h-141v777z" />
+<glyph unicode="&#xa7;" horiz-adv-x="1057" d="M139 809q0 86 43 154.5t121 105.5q-74 40 -116 95.5t-42 140.5q0 121 103.5 190.5t300.5 69.5q94 0 173.5 -14.5t176.5 -53.5l-53 -131q-98 39 -165.5 52.5t-143.5 13.5q-116 0 -174 -29.5t-58 -93.5q0 -60 61.5 -102t215.5 -97q186 -68 261 -143.5t75 -182.5 q0 -90 -41 -160.5t-115 -111.5q153 -81 153 -227q0 -140 -117 -216.5t-329 -76.5q-218 0 -346 65v148q78 -37 175 -59.5t179 -22.5q134 0 204.5 38t70.5 109q0 46 -24 75t-78 58t-169 72q-142 52 -209 97t-100 102t-33 135zM285 829q0 -77 66 -129.5t233 -113.5l49 -19 q137 80 137 191q0 83 -73.5 139t-258.5 113q-68 -19 -110.5 -69t-42.5 -112z" />
+<glyph unicode="&#xa8;" horiz-adv-x="1182" d="M309 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM690 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xa9;" horiz-adv-x="1704" d="M893 1059q-125 0 -192.5 -87t-67.5 -241q0 -168 63.5 -249t194.5 -81q86 0 211 45v-124q-48 -20 -98.5 -34t-120.5 -14q-194 0 -298 120.5t-104 336.5q0 209 110.5 332t301.5 123q128 0 246 -60l-58 -118q-108 51 -188 51zM100 731q0 200 100 375t275 276t377 101 q200 0 375 -100t276 -275t101 -377q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM205 731q0 -173 87 -323.5t237.5 -237t322.5 -86.5q174 0 323 87t236.5 235.5t87.5 324.5q0 174 -87 323t-235.5 236.5t-324.5 87.5q-174 0 -323 -87 t-236.5 -235.5t-87.5 -324.5z" />
+<glyph unicode="&#xaa;" horiz-adv-x="725" d="M532 801l-24 84q-92 -97 -232 -97q-95 0 -150.5 49.5t-55.5 151.5t77 154.5t242 58.5l117 4v39q0 133 -148 133q-100 0 -204 -51l-43 96q114 56 247 56q130 0 198.5 -52.5t68.5 -173.5v-452h-93zM193 989q0 -100 112 -100q201 0 201 180v49l-98 -4q-112 -4 -163.5 -32.5 t-51.5 -92.5z" />
+<glyph unicode="&#xab;" horiz-adv-x="1018" d="M82 551l342 407l119 -69l-289 -350l289 -351l-119 -71l-342 407v27zM477 551l344 407l117 -69l-287 -350l287 -351l-117 -71l-344 407v27z" />
+<glyph unicode="&#xac;" d="M1065 791v-527h-137v389h-824v138h961z" />
+<glyph unicode="&#xad;" horiz-adv-x="659" d="M84 473zM84 473v152h491v-152h-491z" />
+<glyph unicode="&#xae;" horiz-adv-x="1704" d="M723 762h108q80 0 128.5 41.5t48.5 105.5q0 75 -43 107.5t-136 32.5h-106v-287zM1157 913q0 -80 -42.5 -141.5t-119.5 -91.5l238 -395h-168l-207 354h-135v-354h-148v891h261q166 0 243.5 -65t77.5 -198zM100 731q0 200 100 375t275 276t377 101q200 0 375 -100t276 -275 t101 -377q0 -197 -97 -370t-272 -277t-383 -104q-207 0 -382 103.5t-272.5 276.5t-97.5 371zM205 731q0 -173 87 -323.5t237.5 -237t322.5 -86.5q174 0 323 87t236.5 235.5t87.5 324.5q0 174 -87 323t-235.5 236.5t-324.5 87.5q-174 0 -323 -87t-236.5 -235.5t-87.5 -324.5z " />
+<glyph unicode="&#xaf;" horiz-adv-x="1024" d="M1030 1556h-1036v127h1036v-127z" />
+<glyph unicode="&#xb0;" horiz-adv-x="877" d="M127 1171q0 130 90.5 221t220.5 91t221 -90.5t91 -221.5q0 -84 -41 -155.5t-114 -113.5t-157 -42q-130 0 -220.5 90t-90.5 221zM242 1171q0 -82 58.5 -139t139.5 -57q80 0 137.5 56.5t57.5 139.5q0 84 -56.5 140.5t-138.5 56.5q-83 0 -140.5 -57t-57.5 -140z" />
+<glyph unicode="&#xb1;" d="M104 1zM653 791h412v-138h-412v-426h-139v426h-410v138h410v428h139v-428zM104 1v138h961v-138h-961z" />
+<glyph unicode="&#xb2;" horiz-adv-x="711" d="M653 586h-604v104l236 230q89 86 130 134.5t57.5 86.5t16.5 92q0 68 -40 102.5t-103 34.5q-52 0 -101 -19t-118 -69l-66 88q131 111 283 111q132 0 205.5 -65t73.5 -177q0 -80 -44.5 -155.5t-191.5 -213.5l-174 -165h440v-119z" />
+<glyph unicode="&#xb3;" horiz-adv-x="711" d="M627 1255q0 -80 -41 -131.5t-109 -74.5q176 -47 176 -209q0 -128 -92 -199.5t-260 -71.5q-152 0 -268 56v123q147 -68 270 -68q211 0 211 162q0 145 -231 145h-117v107h119q103 0 152.5 39.5t49.5 107.5q0 61 -40 95t-107 34q-66 0 -122 -21.5t-112 -56.5l-69 90 q63 45 133 72t164 27q136 0 214.5 -59.5t78.5 -166.5z" />
+<glyph unicode="&#xb4;" horiz-adv-x="1182" d="M393 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xb5;" horiz-adv-x="1268" d="M342 381q0 -262 254 -262q171 0 250.5 94.5t79.5 306.5v576h166v-1096h-136l-26 147h-10q-111 -167 -340 -167q-150 0 -238 92h-10q10 -84 10 -244v-320h-166v1588h166v-715z" />
+<glyph unicode="&#xb6;" horiz-adv-x="1341" d="M1120 -260h-114v1712h-213v-1712h-115v819q-62 -18 -146 -18q-216 0 -317.5 125t-101.5 376q0 260 109 387t341 127h557v-1816z" />
+<glyph unicode="&#xb7;" horiz-adv-x="545" d="M152 723q0 66 31 100.5t87 34.5q58 0 90.5 -34.5t32.5 -100.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5z" />
+<glyph unicode="&#xb8;" horiz-adv-x="465" d="M436 -289q0 -97 -76.5 -150t-226.5 -53q-51 0 -96 9v106q45 -8 104 -8q79 0 119.5 20t40.5 74q0 43 -39.5 69.5t-148.5 43.5l88 178h110l-55 -115q180 -39 180 -174z" />
+<glyph unicode="&#xb9;" horiz-adv-x="711" d="M338 1462h143v-876h-133v579q0 91 6 181q-22 -22 -49 -44.5t-162 -117.5l-67 96z" />
+<glyph unicode="&#xba;" horiz-adv-x="768" d="M702 1135q0 -164 -85.5 -255.5t-235.5 -91.5q-146 0 -230.5 93t-84.5 254q0 163 84 253.5t235 90.5q152 0 234.5 -91t82.5 -253zM188 1135q0 -122 45.5 -183t149.5 -61q105 0 151 61t46 183q0 123 -46 182t-151 59q-103 0 -149 -59t-46 -182z" />
+<glyph unicode="&#xbb;" horiz-adv-x="1018" d="M936 524l-344 -407l-117 71l287 351l-287 350l117 69l344 -407v-27zM541 524l-344 -407l-117 71l287 351l-287 350l117 69l344 -407v-27z" />
+<glyph unicode="&#xbc;" horiz-adv-x="1597" d="M75 0zM1298 1462l-903 -1462h-143l903 1462h143zM337 1462h143v-876h-133v579q0 91 6 181q-22 -22 -49 -44.5t-162 -117.5l-67 96zM1489 203h-125v-202h-145v202h-402v101l408 579h139v-563h125v-117zM1219 320v195q0 134 6 209q-5 -12 -17 -31.5t-27 -42l-30 -45 t-26 -39.5l-168 -246h262z" />
+<glyph unicode="&#xbd;" horiz-adv-x="1597" d="M46 0zM1230 1462l-903 -1462h-143l903 1462h143zM308 1462h143v-876h-133v579q0 91 6 181q-22 -22 -49 -44.5t-162 -117.5l-67 96zM1499 1h-604v104l236 230q89 86 130 134.5t57.5 86.5t16.5 92q0 68 -40 102.5t-103 34.5q-52 0 -101 -19t-118 -69l-66 88 q131 111 283 111q132 0 205.5 -65t73.5 -177q0 -80 -44.5 -155.5t-191.5 -213.5l-174 -165h440v-119z" />
+<glyph unicode="&#xbe;" horiz-adv-x="1597" d="M26 0zM620 1255q0 -80 -41 -131.5t-109 -74.5q176 -47 176 -209q0 -128 -92 -199.5t-260 -71.5q-152 0 -268 56v123q147 -68 270 -68q211 0 211 162q0 145 -231 145h-117v107h119q103 0 152.5 39.5t49.5 107.5q0 61 -40 95t-107 34q-66 0 -122 -21.5t-112 -56.5l-69 90 q63 45 133 72t164 27q136 0 214.5 -59.5t78.5 -166.5zM1390 1462l-903 -1462h-143l903 1462h143zM1569 203h-125v-202h-145v202h-402v101l408 579h139v-563h125v-117zM1299 320v195q0 134 6 209q-5 -12 -17 -31.5t-27 -42l-30 -45t-26 -39.5l-168 -246h262z" />
+<glyph unicode="&#xbf;" horiz-adv-x="879" d="M590 684v-51q0 -122 -37.5 -196t-134.5 -158q-121 -106 -151.5 -143.5t-43 -76t-12.5 -94.5q0 -100 66 -156.5t188 -56.5q80 0 155 19t173 67l59 -135q-197 -96 -395 -96q-190 0 -298 93t-108 263q0 70 17.5 122.5t49.5 97t76.5 85.5t98.5 88q101 88 133.5 146t32.5 151 v31h131zM639 983q0 -135 -121 -135q-59 0 -90 34.5t-31 100.5q0 64 33 99.5t88 35.5q51 0 86 -32t35 -103z" />
+<glyph unicode="&#xc0;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM724 1579h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xc1;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM526 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xc2;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM303 1602q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186 h-115v23z" />
+<glyph unicode="&#xc3;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM792 1581q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5 q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xc4;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM364 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5z M745 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xc5;" horiz-adv-x="1296" d="M0 0zM1120 0l-182 465h-586l-180 -465h-172l578 1468h143l575 -1468h-176zM885 618l-170 453q-33 86 -68 211q-22 -96 -63 -211l-172 -453h473zM870 1587q0 -98 -61.5 -157.5t-163.5 -59.5q-101 0 -161 58.5t-60 156.5t60.5 155.5t160.5 57.5q101 0 163 -59.5t62 -151.5z M762 1585q0 56 -33 86.5t-84 30.5t-84 -30.5t-33 -86.5t30 -86.5t87 -30.5q52 0 84.5 30.5t32.5 86.5z" />
+<glyph unicode="&#xc6;" horiz-adv-x="1788" d="M1665 0h-750v465h-514l-227 -465h-176l698 1462h969v-151h-580v-471h541v-150h-541v-538h580v-152zM469 618h446v693h-118z" />
+<glyph unicode="&#xc7;" horiz-adv-x="1292" d="M125 0zM827 1331q-241 0 -380.5 -160.5t-139.5 -439.5q0 -287 134.5 -443.5t383.5 -156.5q153 0 349 55v-149q-152 -57 -375 -57q-323 0 -498.5 196t-175.5 557q0 226 84.5 396t244 262t375.5 92q230 0 402 -84l-72 -146q-166 78 -332 78zM950 -289q0 -97 -76.5 -150 t-226.5 -53q-51 0 -96 9v106q45 -8 104 -8q79 0 119.5 20t40.5 74q0 43 -39.5 69.5t-148.5 43.5l88 178h110l-55 -115q180 -39 180 -174z" />
+<glyph unicode="&#xc8;" horiz-adv-x="1139" d="M201 0zM1016 0h-815v1462h815v-151h-645v-471h606v-150h-606v-538h645v-152zM713 1579h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xc9;" horiz-adv-x="1139" d="M201 0zM1016 0h-815v1462h815v-151h-645v-471h606v-150h-606v-538h645v-152zM456 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xca;" horiz-adv-x="1139" d="M201 0zM1016 0h-815v1462h815v-151h-645v-471h606v-150h-606v-538h645v-152zM263 1602q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xcb;" horiz-adv-x="1139" d="M201 0zM1016 0h-815v1462h815v-151h-645v-471h606v-150h-606v-538h645v-152zM327 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM708 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5 t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xcc;" horiz-adv-x="571" d="M5 0zM201 0v1462h170v-1462h-170zM398 1579h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xcd;" horiz-adv-x="571" d="M179 0zM201 0v1462h170v-1462h-170zM179 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xce;" horiz-adv-x="571" d="M0 0zM201 0v1462h170v-1462h-170zM-57 1602q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xcf;" horiz-adv-x="571" d="M5 0zM201 0v1462h170v-1462h-170zM5 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM386 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xd0;" horiz-adv-x="1479" d="M1352 745q0 -362 -196.5 -553.5t-565.5 -191.5h-389v649h-154v150h154v663h434q337 0 527 -187.5t190 -529.5zM1171 739q0 576 -569 576h-231v-516h379v-150h-379v-502h190q610 0 610 592z" />
+<glyph unicode="&#xd1;" horiz-adv-x="1544" d="M201 0zM1343 0h-194l-799 1227h-8q16 -216 16 -396v-831h-157v1462h192l797 -1222h8q-2 27 -9 173.5t-5 209.5v839h159v-1462zM935 1581q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41 t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xd2;" horiz-adv-x="1595" d="M125 0zM1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5zM907 1579h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xd3;" horiz-adv-x="1595" d="M125 0zM1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5zM659 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xd4;" horiz-adv-x="1595" d="M125 0zM1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5zM448 1602q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xd5;" horiz-adv-x="1595" d="M125 0zM1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5zM942 1581q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xd6;" horiz-adv-x="1595" d="M125 0zM1470 733q0 -351 -177.5 -552t-493.5 -201q-323 0 -498.5 197.5t-175.5 557.5q0 357 176 553.5t500 196.5q315 0 492 -200t177 -552zM305 733q0 -297 126.5 -450.5t367.5 -153.5q243 0 367 153t124 451q0 295 -123.5 447.5t-365.5 152.5q-243 0 -369.5 -153.5 t-126.5 -446.5zM522 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM903 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xd7;" d="M940 1176l96 -99l-352 -354l350 -352l-96 -99l-354 351l-348 -351l-101 99l350 352l-352 352l100 101l353 -355z" />
+<glyph unicode="&#xd8;" horiz-adv-x="1595" d="M1470 733q0 -351 -177.5 -552t-493.5 -201q-235 0 -383 100l-101 -141l-120 79l108 154q-178 198 -178 563q0 357 176 553.5t500 196.5q209 0 366 -94l97 135l120 -80l-106 -148q192 -202 192 -565zM1290 733q0 272 -110 426l-672 -948q115 -82 291 -82q243 0 367 153 t124 451zM305 733q0 -262 101 -416l669 943q-106 73 -274 73q-243 0 -369.5 -153.5t-126.5 -446.5z" />
+<glyph unicode="&#xd9;" horiz-adv-x="1491" d="M186 0zM1305 1462v-946q0 -250 -151 -393t-415 -143t-408.5 144t-144.5 396v942h170v-954q0 -183 100 -281t294 -98q185 0 285 98.5t100 282.5v952h170zM856 1579h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xda;" horiz-adv-x="1491" d="M186 0zM1305 1462v-946q0 -250 -151 -393t-415 -143t-408.5 144t-144.5 396v942h170v-954q0 -183 100 -281t294 -98q185 0 285 98.5t100 282.5v952h170zM600 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xdb;" horiz-adv-x="1491" d="M186 0zM1305 1462v-946q0 -250 -151 -393t-415 -143t-408.5 144t-144.5 396v942h170v-954q0 -183 100 -281t294 -98q185 0 285 98.5t100 282.5v952h170zM393 1602q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186 q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xdc;" horiz-adv-x="1491" d="M186 0zM1305 1462v-946q0 -250 -151 -393t-415 -143t-408.5 144t-144.5 396v942h170v-954q0 -183 100 -281t294 -98q185 0 285 98.5t100 282.5v952h170zM461 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5 t-26.5 74.5zM842 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xdd;" horiz-adv-x="1147" d="M0 0zM573 731l390 731h184l-488 -895v-567h-172v559l-487 903h186zM442 1604q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xde;" horiz-adv-x="1251" d="M1145 784q0 -227 -151.5 -346t-438.5 -119h-184v-319h-170v1462h170v-256h215q281 0 420 -103.5t139 -318.5zM371 465h168q226 0 327 71.5t101 235.5q0 149 -95 218t-297 69h-204v-594z" />
+<glyph unicode="&#xdf;" horiz-adv-x="1274" d="M1049 1266q0 -135 -143 -250q-88 -70 -116 -103.5t-28 -66.5q0 -32 13.5 -53t49 -49.5t113.5 -79.5q140 -95 191 -173.5t51 -179.5q0 -160 -97 -245.5t-276 -85.5q-188 0 -295 69v154q63 -39 141 -62.5t150 -23.5q215 0 215 182q0 75 -41.5 128.5t-151.5 123.5 q-127 82 -175 143.5t-48 145.5q0 63 34.5 116t105.5 106q75 57 107 102t32 98q0 80 -68 122.5t-195 42.5q-276 0 -276 -223v-1204h-166v1202q0 178 110 271.5t332 93.5q206 0 318.5 -78.5t112.5 -222.5z" />
+<glyph unicode="&#xe0;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM672 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xe1;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM436 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xe2;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM228 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xe3;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM721 1243q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99 q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xe4;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM279 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM660 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75 q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xe5;" horiz-adv-x="1139" d="M94 0zM850 0l-33 156h-8q-82 -103 -163.5 -139.5t-203.5 -36.5q-163 0 -255.5 84t-92.5 239q0 332 531 348l186 6v68q0 129 -55.5 190.5t-177.5 61.5q-137 0 -310 -84l-51 127q81 44 177.5 69t193.5 25q196 0 290.5 -87t94.5 -279v-748h-123zM475 117q155 0 243.5 85 t88.5 238v99l-166 -7q-198 -7 -285.5 -61.5t-87.5 -169.5q0 -90 54.5 -137t152.5 -47zM804 1458q0 -98 -61.5 -157.5t-163.5 -59.5q-101 0 -161 58.5t-60 156.5t60.5 155.5t160.5 57.5q101 0 163 -59.5t62 -151.5zM696 1456q0 56 -33 86.5t-84 30.5t-84 -30.5t-33 -86.5 t30 -86.5t87 -30.5q52 0 84.5 30.5t32.5 86.5z" />
+<glyph unicode="&#xe6;" horiz-adv-x="1757" d="M94 303q0 161 124 250.5t378 97.5l184 6v68q0 129 -58 190.5t-177 61.5q-144 0 -307 -84l-52 127q74 41 173.5 67.5t197.5 26.5q130 0 212.5 -43.5t123.5 -138.5q53 88 138.5 136t195.5 48q192 0 308 -133.5t116 -355.5v-107h-701q8 -395 322 -395q91 0 169.5 17.5 t162.5 56.5v-148q-86 -38 -160.5 -54.5t-175.5 -16.5q-289 0 -414 233q-81 -127 -179.5 -180t-232.5 -53q-163 0 -255.5 85t-92.5 238zM268 301q0 -95 53.5 -139.5t141.5 -44.5q145 0 229 84.5t84 238.5v99l-158 -7q-186 -8 -268 -62.5t-82 -168.5zM1225 977 q-121 0 -190.5 -83t-80.5 -241h519q0 156 -64 240t-184 84z" />
+<glyph unicode="&#xe7;" horiz-adv-x="975" d="M115 0zM614 -20q-238 0 -368.5 146.5t-130.5 414.5q0 275 132.5 425t377.5 150q79 0 158 -17t124 -40l-51 -141q-55 22 -120 36.5t-115 14.5q-334 0 -334 -426q0 -202 81.5 -310t241.5 -108q137 0 281 59v-147q-110 -57 -277 -57zM762 -289q0 -97 -76.5 -150t-226.5 -53 q-51 0 -96 9v106q45 -8 104 -8q79 0 119.5 20t40.5 74q0 43 -39.5 69.5t-148.5 43.5l88 178h110l-55 -115q180 -39 180 -174z" />
+<glyph unicode="&#xe8;" horiz-adv-x="1149" d="M115 0zM639 -20q-243 0 -383.5 148t-140.5 411q0 265 130.5 421t350.5 156q206 0 326 -135.5t120 -357.5v-105h-755q5 -193 97.5 -293t260.5 -100q177 0 350 74v-148q-88 -38 -166.5 -54.5t-189.5 -16.5zM594 977q-132 0 -210.5 -86t-92.5 -238h573q0 157 -70 240.5 t-200 83.5zM711 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xe9;" horiz-adv-x="1149" d="M115 0zM639 -20q-243 0 -383.5 148t-140.5 411q0 265 130.5 421t350.5 156q206 0 326 -135.5t120 -357.5v-105h-755q5 -193 97.5 -293t260.5 -100q177 0 350 74v-148q-88 -38 -166.5 -54.5t-189.5 -16.5zM594 977q-132 0 -210.5 -86t-92.5 -238h573q0 157 -70 240.5 t-200 83.5zM471 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xea;" horiz-adv-x="1149" d="M115 0zM639 -20q-243 0 -383.5 148t-140.5 411q0 265 130.5 421t350.5 156q206 0 326 -135.5t120 -357.5v-105h-755q5 -193 97.5 -293t260.5 -100q177 0 350 74v-148q-88 -38 -166.5 -54.5t-189.5 -16.5zM594 977q-132 0 -210.5 -86t-92.5 -238h573q0 157 -70 240.5 t-200 83.5zM259 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xeb;" horiz-adv-x="1149" d="M115 0zM639 -20q-243 0 -383.5 148t-140.5 411q0 265 130.5 421t350.5 156q206 0 326 -135.5t120 -357.5v-105h-755q5 -193 97.5 -293t260.5 -100q177 0 350 74v-148q-88 -38 -166.5 -54.5t-189.5 -16.5zM594 977q-132 0 -210.5 -86t-92.5 -238h573q0 157 -70 240.5 t-200 83.5zM319 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM700 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xec;" horiz-adv-x="518" d="M0 0zM342 0h-166v1096h166v-1096zM355 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xed;" horiz-adv-x="518" d="M169 0zM342 0h-166v1096h166v-1096zM169 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xee;" horiz-adv-x="518" d="M0 0zM342 0h-166v1096h166v-1096zM-77 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xef;" horiz-adv-x="518" d="M0 0zM342 0h-166v1096h166v-1096zM-20 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM361 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xf0;" horiz-adv-x="1221" d="M1122 563q0 -281 -130.5 -432t-377.5 -151q-222 0 -361.5 134.5t-139.5 360.5q0 230 131.5 361t351.5 131q226 0 326 -121l8 4q-57 214 -262 405l-271 -155l-73 108l233 133q-92 62 -186 111l69 117q156 -73 258 -148l238 138l76 -107l-207 -119q152 -143 234.5 -342 t82.5 -428zM954 512q0 147 -90 232t-246 85q-337 0 -337 -360q0 -167 87.5 -258.5t249.5 -91.5q175 0 255.5 100.5t80.5 292.5z" />
+<glyph unicode="&#xf1;" horiz-adv-x="1257" d="M176 0zM926 0v709q0 134 -61 200t-191 66q-172 0 -252 -93t-80 -307v-575h-166v1096h135l27 -150h8q51 81 143 125.5t205 44.5q198 0 298 -95.5t100 -305.5v-715h-166zM802 1243q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98 q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xf2;" horiz-adv-x="1237" d="M115 0zM1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z M742 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xf3;" horiz-adv-x="1237" d="M115 0zM1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z M479 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xf4;" horiz-adv-x="1237" d="M115 0zM1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z M282 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xf5;" horiz-adv-x="1237" d="M115 0zM1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z M773 1243q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#xf6;" horiz-adv-x="1237" d="M115 0zM1122 549q0 -268 -135 -418.5t-373 -150.5q-147 0 -261 69t-176 198t-62 302q0 268 134 417.5t372 149.5q230 0 365.5 -153t135.5 -414zM287 549q0 -210 84 -320t247 -110t247.5 109.5t84.5 320.5q0 209 -84.5 317.5t-249.5 108.5q-163 0 -246 -107t-83 -319z M336 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM717 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xf7;" d="M104 653v138h961v-138h-961zM471 373q0 60 29.5 90.5t83.5 30.5q52 0 81 -31.5t29 -89.5q0 -57 -29.5 -89t-80.5 -32q-52 0 -82.5 31.5t-30.5 89.5zM471 1071q0 60 29.5 90.5t83.5 30.5q52 0 81 -31.5t29 -89.5q0 -57 -29.5 -89t-80.5 -32q-52 0 -82.5 31.5t-30.5 89.5z " />
+<glyph unicode="&#xf8;" horiz-adv-x="1237" d="M1122 549q0 -268 -135 -418.5t-373 -150.5q-154 0 -266 69l-84 -117l-114 78l94 131q-129 152 -129 408q0 268 134 417.5t372 149.5q154 0 270 -76l84 119l117 -76l-97 -133q127 -152 127 -401zM287 549q0 -171 53 -273l465 646q-75 53 -189 53q-163 0 -246 -107 t-83 -319zM950 549q0 164 -51 264l-465 -643q71 -51 184 -51q163 0 247.5 109.5t84.5 320.5z" />
+<glyph unicode="&#xf9;" horiz-adv-x="1257" d="M164 0zM332 1096v-711q0 -134 61 -200t191 -66q172 0 251.5 94t79.5 307v576h166v-1096h-137l-24 147h-9q-51 -81 -141.5 -124t-206.5 -43q-200 0 -299.5 95t-99.5 304v717h168zM726 1241h-110q-65 52 -154 148t-129 159v21h203q32 -69 89 -159.5t101 -143.5v-25z" />
+<glyph unicode="&#xfa;" horiz-adv-x="1257" d="M164 0zM332 1096v-711q0 -134 61 -200t191 -66q172 0 251.5 94t79.5 307v576h166v-1096h-137l-24 147h-9q-51 -81 -141.5 -124t-206.5 -43q-200 0 -299.5 95t-99.5 304v717h168zM506 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147h-111v25z" />
+<glyph unicode="&#xfb;" horiz-adv-x="1257" d="M164 0zM332 1096v-711q0 -134 61 -200t191 -66q172 0 251.5 94t79.5 307v576h166v-1096h-137l-24 147h-9q-51 -81 -141.5 -124t-206.5 -43q-200 0 -299.5 95t-99.5 304v717h168zM286 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119 q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#xfc;" horiz-adv-x="1257" d="M164 0zM332 1096v-711q0 -134 61 -200t191 -66q172 0 251.5 94t79.5 307v576h166v-1096h-137l-24 147h-9q-51 -81 -141.5 -124t-206.5 -43q-200 0 -299.5 95t-99.5 304v717h168zM342 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5 q-37 0 -63.5 24.5t-26.5 74.5zM723 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#xfd;" horiz-adv-x="1032" d="M2 0zM2 1096h178l240 -625q79 -214 98 -309h8q13 51 54.5 174.5t271.5 759.5h178l-471 -1248q-70 -185 -163.5 -262.5t-229.5 -77.5q-76 0 -150 17v133q55 -12 123 -12q171 0 244 192l61 156zM411 1266q48 62 103.5 150t87.5 153h202v-21q-44 -65 -131 -160t-151 -147 h-111v25z" />
+<glyph unicode="&#xfe;" horiz-adv-x="1255" d="M344 948q66 89 151 128.5t191 39.5q215 0 335 -150t120 -417q0 -268 -120.5 -418.5t-334.5 -150.5q-222 0 -344 161h-12l4 -34q8 -77 8 -140v-459h-166v2048h166v-466q0 -52 -6 -142h8zM664 975q-168 0 -244 -92t-78 -293v-41q0 -231 77 -330.5t247 -99.5q303 0 303 432 q0 215 -74 319.5t-231 104.5z" />
+<glyph unicode="&#xff;" horiz-adv-x="1032" d="M2 0zM2 1096h178l240 -625q79 -214 98 -309h8q13 51 54.5 174.5t271.5 759.5h178l-471 -1248q-70 -185 -163.5 -262.5t-229.5 -77.5q-76 0 -150 17v133q55 -12 123 -12q171 0 244 192l61 156zM234 1393q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5 t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM615 1393q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#x131;" horiz-adv-x="518" d="M342 0h-166v1096h166v-1096z" />
+<glyph unicode="&#x152;" horiz-adv-x="1890" d="M1767 0h-768q-102 -20 -194 -20q-327 0 -503.5 196.5t-176.5 558.5q0 360 174 555t494 195q102 0 192 -23h782v-151h-589v-471h551v-150h-551v-538h589v-152zM811 1333q-249 0 -377.5 -152.5t-128.5 -447.5q0 -297 128.5 -450.5t375.5 -153.5q112 0 199 33v1141 q-87 30 -197 30z" />
+<glyph unicode="&#x153;" horiz-adv-x="1929" d="M1430 -20q-293 0 -418 235q-62 -116 -166.5 -175.5t-241.5 -59.5q-223 0 -357 152.5t-134 416.5q0 265 131 415t366 150q131 0 233.5 -59.5t164.5 -173.5q58 112 154 172.5t222 60.5q201 0 320 -132.5t119 -358.5v-105h-729q8 -393 338 -393q94 0 174.5 17.5t167.5 56.5 v-148q-88 -39 -164 -55t-180 -16zM287 549q0 -211 76 -320.5t243 -109.5q163 0 239.5 106.5t76.5 315.5q0 221 -77.5 327.5t-242.5 106.5q-166 0 -240.5 -108t-74.5 -318zM1382 975q-127 0 -199.5 -82t-84.5 -240h544q0 158 -66 240t-194 82z" />
+<glyph unicode="&#x178;" horiz-adv-x="1147" d="M0 0zM573 731l390 731h184l-488 -895v-567h-172v559l-487 903h186zM294 1731q0 52 26.5 75t63.5 23q38 0 65.5 -23t27.5 -75q0 -50 -27.5 -74.5t-65.5 -24.5q-37 0 -63.5 24.5t-26.5 74.5zM675 1731q0 52 26.5 75t63.5 23t64.5 -23t27.5 -75q0 -50 -27.5 -74.5 t-64.5 -24.5t-63.5 24.5t-26.5 74.5z" />
+<glyph unicode="&#x2c6;" horiz-adv-x="1212" d="M268 1264q127 136 178 200t74 105h166q22 -42 76.5 -108.5t179.5 -196.5v-23h-119q-88 55 -221 186q-136 -134 -219 -186h-115v23z" />
+<glyph unicode="&#x2da;" horiz-adv-x="1182" d="M813 1458q0 -98 -61.5 -157.5t-163.5 -59.5q-101 0 -161 58.5t-60 156.5t60.5 155.5t160.5 57.5q101 0 163 -59.5t62 -151.5zM705 1456q0 56 -33 86.5t-84 30.5t-84 -30.5t-33 -86.5t30 -86.5t87 -30.5q52 0 84.5 30.5t32.5 86.5z" />
+<glyph unicode="&#x2dc;" horiz-adv-x="1212" d="M788 1243q-43 0 -84 18.5t-80.5 41t-76 41t-70.5 18.5q-50 0 -75.5 -30t-39.5 -91h-98q13 121 70.5 189.5t148.5 68.5q46 0 89 -18.5t82 -41t75 -41t68 -18.5q49 0 73 29.5t39 91.5h99q-13 -121 -69.5 -189.5t-150.5 -68.5z" />
+<glyph unicode="&#x2000;" horiz-adv-x="953" />
+<glyph unicode="&#x2001;" horiz-adv-x="1907" />
+<glyph unicode="&#x2002;" horiz-adv-x="953" />
+<glyph unicode="&#x2003;" horiz-adv-x="1907" />
+<glyph unicode="&#x2004;" horiz-adv-x="635" />
+<glyph unicode="&#x2005;" horiz-adv-x="476" />
+<glyph unicode="&#x2006;" horiz-adv-x="317" />
+<glyph unicode="&#x2007;" horiz-adv-x="317" />
+<glyph unicode="&#x2008;" horiz-adv-x="238" />
+<glyph unicode="&#x2009;" horiz-adv-x="381" />
+<glyph unicode="&#x200a;" horiz-adv-x="105" />
+<glyph unicode="&#x2010;" horiz-adv-x="659" d="M84 473v152h491v-152h-491z" />
+<glyph unicode="&#x2011;" horiz-adv-x="659" d="M84 473v152h491v-152h-491z" />
+<glyph unicode="&#x2012;" horiz-adv-x="659" d="M84 473v152h491v-152h-491z" />
+<glyph unicode="&#x2013;" horiz-adv-x="1024" d="M82 473v152h860v-152h-860z" />
+<glyph unicode="&#x2014;" horiz-adv-x="2048" d="M82 473v152h1884v-152h-1884z" />
+<glyph unicode="&#x2018;" horiz-adv-x="348" d="M37 961l-12 22q22 90 71 224t105 255h123q-66 -254 -103 -501h-184z" />
+<glyph unicode="&#x2019;" horiz-adv-x="348" d="M309 1462l15 -22q-26 -100 -75 -232.5t-102 -246.5h-122q70 285 102 501h182z" />
+<glyph unicode="&#x201a;" horiz-adv-x="502" d="M63 0zM350 238l15 -23q-26 -100 -75 -232.5t-102 -246.5h-125q27 104 59.5 257t45.5 245h182z" />
+<glyph unicode="&#x201c;" horiz-adv-x="717" d="M406 961l-15 22q56 215 178 479h123q-30 -115 -59.5 -259.5t-42.5 -241.5h-184zM37 961l-12 22q22 90 71 224t105 255h123q-66 -254 -103 -501h-184z" />
+<glyph unicode="&#x201d;" horiz-adv-x="717" d="M309 1462l15 -22q-26 -100 -75 -232.5t-102 -246.5h-122q70 285 102 501h182zM678 1462l14 -22q-24 -91 -72 -224t-104 -255h-125q26 100 59 254t46 247h182z" />
+<glyph unicode="&#x201e;" horiz-adv-x="829" d="M25 0zM309 238l15 -22q-26 -100 -75 -232.5t-102 -246.5h-122q70 285 102 501h182zM678 238l14 -22q-24 -91 -72 -224t-104 -255h-125q26 100 59 254t46 247h182z" />
+<glyph unicode="&#x2022;" horiz-adv-x="770" d="M164 748q0 121 56.5 184t164.5 63q105 0 163 -62t58 -185q0 -119 -57.5 -183.5t-163.5 -64.5q-107 0 -164 65.5t-57 182.5z" />
+<glyph unicode="&#x2026;" horiz-adv-x="1606" d="M152 0zM152 106q0 67 30.5 101.5t87.5 34.5q58 0 90.5 -34.5t32.5 -101.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5zM682 106q0 67 30.5 101.5t87.5 34.5q58 0 90.5 -34.5t32.5 -101.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5zM1213 106 q0 67 30.5 101.5t87.5 34.5q58 0 90.5 -34.5t32.5 -101.5q0 -65 -33 -100t-90 -35q-51 0 -84.5 31.5t-33.5 103.5z" />
+<glyph unicode="&#x202f;" horiz-adv-x="381" />
+<glyph unicode="&#x2039;" horiz-adv-x="623" d="M82 551l342 407l119 -69l-289 -350l289 -351l-119 -71l-342 407v27z" />
+<glyph unicode="&#x203a;" horiz-adv-x="623" d="M541 524l-344 -407l-117 71l287 351l-287 350l117 69l344 -407v-27z" />
+<glyph unicode="&#x2044;" horiz-adv-x="266" d="M655 1462l-903 -1462h-143l903 1462h143z" />
+<glyph unicode="&#x205f;" horiz-adv-x="476" />
+<glyph unicode="&#x2074;" horiz-adv-x="711" d="M692 788h-125v-202h-145v202h-402v101l408 579h139v-563h125v-117zM422 905v195q0 134 6 209q-5 -12 -17 -31.5t-27 -42l-30 -45t-26 -39.5l-168 -246h262z" />
+<glyph unicode="&#x20ac;" horiz-adv-x="1208" d="M795 1333q-319 0 -398 -403h510v-129h-524l-2 -57v-64l2 -45h463v-129h-447q37 -180 138.5 -278.5t271.5 -98.5q156 0 309 66v-150q-146 -65 -317 -65q-237 0 -381.5 134.5t-190.5 391.5h-166v129h152l-2 42v44l2 80h-152v129h164q39 261 185 407t383 146q201 0 366 -97 l-71 -139q-166 86 -295 86z" />
+<glyph unicode="&#x2122;" horiz-adv-x="1589" d="M369 741h-123v615h-209v106h543v-106h-211v-615zM969 741l-201 559h-8l6 -129v-430h-119v721h187l196 -559l203 559h180v-721h-127v420l6 137h-8l-211 -557h-104z" />
+<glyph unicode="&#x2212;" d="M104 653v138h961v-138h-961z" />
+<glyph unicode="&#xe000;" horiz-adv-x="1095" d="M0 1095h1095v-1095h-1095v1095z" />
+<glyph horiz-adv-x="1255" d="M0 0z" />
+<hkern u1="&#x22;" u2="&#x178;" k="-20" />
+<hkern u1="&#x22;" u2="&#x153;" k="123" />
+<hkern u1="&#x22;" u2="&#xfc;" k="61" />
+<hkern u1="&#x22;" u2="&#xfb;" k="61" />
+<hkern u1="&#x22;" u2="&#xfa;" k="61" />
+<hkern u1="&#x22;" u2="&#xf9;" k="61" />
+<hkern u1="&#x22;" u2="&#xf8;" k="123" />
+<hkern u1="&#x22;" u2="&#xf6;" k="123" />
+<hkern u1="&#x22;" u2="&#xf5;" k="123" />
+<hkern u1="&#x22;" u2="&#xf4;" k="123" />
+<hkern u1="&#x22;" u2="&#xf3;" k="123" />
+<hkern u1="&#x22;" u2="&#xf2;" k="123" />
+<hkern u1="&#x22;" u2="&#xeb;" k="123" />
+<hkern u1="&#x22;" u2="&#xea;" k="123" />
+<hkern u1="&#x22;" u2="&#xe9;" k="123" />
+<hkern u1="&#x22;" u2="&#xe8;" k="123" />
+<hkern u1="&#x22;" u2="&#xe7;" k="123" />
+<hkern u1="&#x22;" u2="&#xe6;" k="82" />
+<hkern u1="&#x22;" u2="&#xe5;" k="82" />
+<hkern u1="&#x22;" u2="&#xe4;" k="82" />
+<hkern u1="&#x22;" u2="&#xe3;" k="82" />
+<hkern u1="&#x22;" u2="&#xe2;" k="82" />
+<hkern u1="&#x22;" u2="&#xe1;" k="82" />
+<hkern u1="&#x22;" u2="&#xe0;" k="123" />
+<hkern u1="&#x22;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x22;" u2="&#xc5;" k="143" />
+<hkern u1="&#x22;" u2="&#xc4;" k="143" />
+<hkern u1="&#x22;" u2="&#xc3;" k="143" />
+<hkern u1="&#x22;" u2="&#xc2;" k="143" />
+<hkern u1="&#x22;" u2="&#xc1;" k="143" />
+<hkern u1="&#x22;" u2="&#xc0;" k="143" />
+<hkern u1="&#x22;" u2="u" k="61" />
+<hkern u1="&#x22;" u2="s" k="61" />
+<hkern u1="&#x22;" u2="r" k="61" />
+<hkern u1="&#x22;" u2="q" k="123" />
+<hkern u1="&#x22;" u2="p" k="61" />
+<hkern u1="&#x22;" u2="o" k="123" />
+<hkern u1="&#x22;" u2="n" k="61" />
+<hkern u1="&#x22;" u2="m" k="61" />
+<hkern u1="&#x22;" u2="g" k="61" />
+<hkern u1="&#x22;" u2="e" k="123" />
+<hkern u1="&#x22;" u2="d" k="123" />
+<hkern u1="&#x22;" u2="c" k="123" />
+<hkern u1="&#x22;" u2="a" k="82" />
+<hkern u1="&#x22;" u2="Y" k="-20" />
+<hkern u1="&#x22;" u2="W" k="-41" />
+<hkern u1="&#x22;" u2="V" k="-41" />
+<hkern u1="&#x22;" u2="T" k="-41" />
+<hkern u1="&#x22;" u2="A" k="143" />
+<hkern u1="&#x27;" u2="&#x178;" k="-20" />
+<hkern u1="&#x27;" u2="&#x153;" k="123" />
+<hkern u1="&#x27;" u2="&#xfc;" k="61" />
+<hkern u1="&#x27;" u2="&#xfb;" k="61" />
+<hkern u1="&#x27;" u2="&#xfa;" k="61" />
+<hkern u1="&#x27;" u2="&#xf9;" k="61" />
+<hkern u1="&#x27;" u2="&#xf8;" k="123" />
+<hkern u1="&#x27;" u2="&#xf6;" k="123" />
+<hkern u1="&#x27;" u2="&#xf5;" k="123" />
+<hkern u1="&#x27;" u2="&#xf4;" k="123" />
+<hkern u1="&#x27;" u2="&#xf3;" k="123" />
+<hkern u1="&#x27;" u2="&#xf2;" k="123" />
+<hkern u1="&#x27;" u2="&#xeb;" k="123" />
+<hkern u1="&#x27;" u2="&#xea;" k="123" />
+<hkern u1="&#x27;" u2="&#xe9;" k="123" />
+<hkern u1="&#x27;" u2="&#xe8;" k="123" />
+<hkern u1="&#x27;" u2="&#xe7;" k="123" />
+<hkern u1="&#x27;" u2="&#xe6;" k="82" />
+<hkern u1="&#x27;" u2="&#xe5;" k="82" />
+<hkern u1="&#x27;" u2="&#xe4;" k="82" />
+<hkern u1="&#x27;" u2="&#xe3;" k="82" />
+<hkern u1="&#x27;" u2="&#xe2;" k="82" />
+<hkern u1="&#x27;" u2="&#xe1;" k="82" />
+<hkern u1="&#x27;" u2="&#xe0;" k="123" />
+<hkern u1="&#x27;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x27;" u2="&#xc5;" k="143" />
+<hkern u1="&#x27;" u2="&#xc4;" k="143" />
+<hkern u1="&#x27;" u2="&#xc3;" k="143" />
+<hkern u1="&#x27;" u2="&#xc2;" k="143" />
+<hkern u1="&#x27;" u2="&#xc1;" k="143" />
+<hkern u1="&#x27;" u2="&#xc0;" k="143" />
+<hkern u1="&#x27;" u2="u" k="61" />
+<hkern u1="&#x27;" u2="s" k="61" />
+<hkern u1="&#x27;" u2="r" k="61" />
+<hkern u1="&#x27;" u2="q" k="123" />
+<hkern u1="&#x27;" u2="p" k="61" />
+<hkern u1="&#x27;" u2="o" k="123" />
+<hkern u1="&#x27;" u2="n" k="61" />
+<hkern u1="&#x27;" u2="m" k="61" />
+<hkern u1="&#x27;" u2="g" k="61" />
+<hkern u1="&#x27;" u2="e" k="123" />
+<hkern u1="&#x27;" u2="d" k="123" />
+<hkern u1="&#x27;" u2="c" k="123" />
+<hkern u1="&#x27;" u2="a" k="82" />
+<hkern u1="&#x27;" u2="Y" k="-20" />
+<hkern u1="&#x27;" u2="W" k="-41" />
+<hkern u1="&#x27;" u2="V" k="-41" />
+<hkern u1="&#x27;" u2="T" k="-41" />
+<hkern u1="&#x27;" u2="A" k="143" />
+<hkern u1="&#x28;" u2="J" k="-184" />
+<hkern u1="&#x2c;" u2="&#x178;" k="123" />
+<hkern u1="&#x2c;" u2="&#x152;" k="102" />
+<hkern u1="&#x2c;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2c;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2c;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2c;" u2="&#xda;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2c;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2c;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2c;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2c;" u2="Y" k="123" />
+<hkern u1="&#x2c;" u2="W" k="123" />
+<hkern u1="&#x2c;" u2="V" k="123" />
+<hkern u1="&#x2c;" u2="U" k="41" />
+<hkern u1="&#x2c;" u2="T" k="143" />
+<hkern u1="&#x2c;" u2="Q" k="102" />
+<hkern u1="&#x2c;" u2="O" k="102" />
+<hkern u1="&#x2c;" u2="G" k="102" />
+<hkern u1="&#x2c;" u2="C" k="102" />
+<hkern u1="&#x2d;" u2="T" k="82" />
+<hkern u1="&#x2e;" u2="&#x178;" k="123" />
+<hkern u1="&#x2e;" u2="&#x152;" k="102" />
+<hkern u1="&#x2e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x2e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x2e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x2e;" u2="&#xda;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x2e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x2e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x2e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x2e;" u2="Y" k="123" />
+<hkern u1="&#x2e;" u2="W" k="123" />
+<hkern u1="&#x2e;" u2="V" k="123" />
+<hkern u1="&#x2e;" u2="U" k="41" />
+<hkern u1="&#x2e;" u2="T" k="143" />
+<hkern u1="&#x2e;" u2="Q" k="102" />
+<hkern u1="&#x2e;" u2="O" k="102" />
+<hkern u1="&#x2e;" u2="G" k="102" />
+<hkern u1="&#x2e;" u2="C" k="102" />
+<hkern u1="A" u2="&#x201d;" k="143" />
+<hkern u1="A" u2="&#x2019;" k="143" />
+<hkern u1="A" u2="&#x178;" k="123" />
+<hkern u1="A" u2="&#x152;" k="41" />
+<hkern u1="A" u2="&#xdd;" k="123" />
+<hkern u1="A" u2="&#xd8;" k="41" />
+<hkern u1="A" u2="&#xd6;" k="41" />
+<hkern u1="A" u2="&#xd5;" k="41" />
+<hkern u1="A" u2="&#xd4;" k="41" />
+<hkern u1="A" u2="&#xd3;" k="41" />
+<hkern u1="A" u2="&#xd2;" k="41" />
+<hkern u1="A" u2="&#xc7;" k="41" />
+<hkern u1="A" u2="Y" k="123" />
+<hkern u1="A" u2="W" k="82" />
+<hkern u1="A" u2="V" k="82" />
+<hkern u1="A" u2="T" k="143" />
+<hkern u1="A" u2="Q" k="41" />
+<hkern u1="A" u2="O" k="41" />
+<hkern u1="A" u2="J" k="-266" />
+<hkern u1="A" u2="G" k="41" />
+<hkern u1="A" u2="C" k="41" />
+<hkern u1="A" u2="&#x27;" k="143" />
+<hkern u1="A" u2="&#x22;" k="143" />
+<hkern u1="B" u2="&#x201e;" k="82" />
+<hkern u1="B" u2="&#x201a;" k="82" />
+<hkern u1="B" u2="&#x178;" k="20" />
+<hkern u1="B" u2="&#xdd;" k="20" />
+<hkern u1="B" u2="&#xc5;" k="41" />
+<hkern u1="B" u2="&#xc4;" k="41" />
+<hkern u1="B" u2="&#xc3;" k="41" />
+<hkern u1="B" u2="&#xc2;" k="41" />
+<hkern u1="B" u2="&#xc1;" k="41" />
+<hkern u1="B" u2="&#xc0;" k="41" />
+<hkern u1="B" u2="Z" k="20" />
+<hkern u1="B" u2="Y" k="20" />
+<hkern u1="B" u2="X" k="41" />
+<hkern u1="B" u2="W" k="20" />
+<hkern u1="B" u2="V" k="20" />
+<hkern u1="B" u2="T" k="61" />
+<hkern u1="B" u2="A" k="41" />
+<hkern u1="B" u2="&#x2e;" k="82" />
+<hkern u1="B" u2="&#x2c;" k="82" />
+<hkern u1="C" u2="&#x152;" k="41" />
+<hkern u1="C" u2="&#xd8;" k="41" />
+<hkern u1="C" u2="&#xd6;" k="41" />
+<hkern u1="C" u2="&#xd5;" k="41" />
+<hkern u1="C" u2="&#xd4;" k="41" />
+<hkern u1="C" u2="&#xd3;" k="41" />
+<hkern u1="C" u2="&#xd2;" k="41" />
+<hkern u1="C" u2="&#xc7;" k="41" />
+<hkern u1="C" u2="Q" k="41" />
+<hkern u1="C" u2="O" k="41" />
+<hkern u1="C" u2="G" k="41" />
+<hkern u1="C" u2="C" k="41" />
+<hkern u1="D" u2="&#x201e;" k="82" />
+<hkern u1="D" u2="&#x201a;" k="82" />
+<hkern u1="D" u2="&#x178;" k="20" />
+<hkern u1="D" u2="&#xdd;" k="20" />
+<hkern u1="D" u2="&#xc5;" k="41" />
+<hkern u1="D" u2="&#xc4;" k="41" />
+<hkern u1="D" u2="&#xc3;" k="41" />
+<hkern u1="D" u2="&#xc2;" k="41" />
+<hkern u1="D" u2="&#xc1;" k="41" />
+<hkern u1="D" u2="&#xc0;" k="41" />
+<hkern u1="D" u2="Z" k="20" />
+<hkern u1="D" u2="Y" k="20" />
+<hkern u1="D" u2="X" k="41" />
+<hkern u1="D" u2="W" k="20" />
+<hkern u1="D" u2="V" k="20" />
+<hkern u1="D" u2="T" k="61" />
+<hkern u1="D" u2="A" k="41" />
+<hkern u1="D" u2="&#x2e;" k="82" />
+<hkern u1="D" u2="&#x2c;" k="82" />
+<hkern u1="E" u2="J" k="-123" />
+<hkern u1="F" u2="&#x201e;" k="123" />
+<hkern u1="F" u2="&#x201a;" k="123" />
+<hkern u1="F" u2="&#xc5;" k="41" />
+<hkern u1="F" u2="&#xc4;" k="41" />
+<hkern u1="F" u2="&#xc3;" k="41" />
+<hkern u1="F" u2="&#xc2;" k="41" />
+<hkern u1="F" u2="&#xc1;" k="41" />
+<hkern u1="F" u2="&#xc0;" k="41" />
+<hkern u1="F" u2="A" k="41" />
+<hkern u1="F" u2="&#x3f;" k="-41" />
+<hkern u1="F" u2="&#x2e;" k="123" />
+<hkern u1="F" u2="&#x2c;" k="123" />
+<hkern u1="K" u2="&#x152;" k="41" />
+<hkern u1="K" u2="&#xd8;" k="41" />
+<hkern u1="K" u2="&#xd6;" k="41" />
+<hkern u1="K" u2="&#xd5;" k="41" />
+<hkern u1="K" u2="&#xd4;" k="41" />
+<hkern u1="K" u2="&#xd3;" k="41" />
+<hkern u1="K" u2="&#xd2;" k="41" />
+<hkern u1="K" u2="&#xc7;" k="41" />
+<hkern u1="K" u2="Q" k="41" />
+<hkern u1="K" u2="O" k="41" />
+<hkern u1="K" u2="G" k="41" />
+<hkern u1="K" u2="C" k="41" />
+<hkern u1="L" u2="&#x201d;" k="164" />
+<hkern u1="L" u2="&#x2019;" k="164" />
+<hkern u1="L" u2="&#x178;" k="61" />
+<hkern u1="L" u2="&#x152;" k="41" />
+<hkern u1="L" u2="&#xdd;" k="61" />
+<hkern u1="L" u2="&#xdc;" k="20" />
+<hkern u1="L" u2="&#xdb;" k="20" />
+<hkern u1="L" u2="&#xda;" k="20" />
+<hkern u1="L" u2="&#xd9;" k="20" />
+<hkern u1="L" u2="&#xd8;" k="41" />
+<hkern u1="L" u2="&#xd6;" k="41" />
+<hkern u1="L" u2="&#xd5;" k="41" />
+<hkern u1="L" u2="&#xd4;" k="41" />
+<hkern u1="L" u2="&#xd3;" k="41" />
+<hkern u1="L" u2="&#xd2;" k="41" />
+<hkern u1="L" u2="&#xc7;" k="41" />
+<hkern u1="L" u2="Y" k="61" />
+<hkern u1="L" u2="W" k="41" />
+<hkern u1="L" u2="V" k="41" />
+<hkern u1="L" u2="U" k="20" />
+<hkern u1="L" u2="T" k="41" />
+<hkern u1="L" u2="Q" k="41" />
+<hkern u1="L" u2="O" k="41" />
+<hkern u1="L" u2="G" k="41" />
+<hkern u1="L" u2="C" k="41" />
+<hkern u1="L" u2="&#x27;" k="164" />
+<hkern u1="L" u2="&#x22;" k="164" />
+<hkern u1="O" u2="&#x201e;" k="82" />
+<hkern u1="O" u2="&#x201a;" k="82" />
+<hkern u1="O" u2="&#x178;" k="20" />
+<hkern u1="O" u2="&#xdd;" k="20" />
+<hkern u1="O" u2="&#xc5;" k="41" />
+<hkern u1="O" u2="&#xc4;" k="41" />
+<hkern u1="O" u2="&#xc3;" k="41" />
+<hkern u1="O" u2="&#xc2;" k="41" />
+<hkern u1="O" u2="&#xc1;" k="41" />
+<hkern u1="O" u2="&#xc0;" k="41" />
+<hkern u1="O" u2="Z" k="20" />
+<hkern u1="O" u2="Y" k="20" />
+<hkern u1="O" u2="X" k="41" />
+<hkern u1="O" u2="W" k="20" />
+<hkern u1="O" u2="V" k="20" />
+<hkern u1="O" u2="T" k="61" />
+<hkern u1="O" u2="A" k="41" />
+<hkern u1="O" u2="&#x2e;" k="82" />
+<hkern u1="O" u2="&#x2c;" k="82" />
+<hkern u1="P" u2="&#x201e;" k="266" />
+<hkern u1="P" u2="&#x201a;" k="266" />
+<hkern u1="P" u2="&#xc5;" k="102" />
+<hkern u1="P" u2="&#xc4;" k="102" />
+<hkern u1="P" u2="&#xc3;" k="102" />
+<hkern u1="P" u2="&#xc2;" k="102" />
+<hkern u1="P" u2="&#xc1;" k="102" />
+<hkern u1="P" u2="&#xc0;" k="102" />
+<hkern u1="P" u2="Z" k="20" />
+<hkern u1="P" u2="X" k="41" />
+<hkern u1="P" u2="A" k="102" />
+<hkern u1="P" u2="&#x2e;" k="266" />
+<hkern u1="P" u2="&#x2c;" k="266" />
+<hkern u1="Q" u2="&#x201e;" k="82" />
+<hkern u1="Q" u2="&#x201a;" k="82" />
+<hkern u1="Q" u2="&#x178;" k="20" />
+<hkern u1="Q" u2="&#xdd;" k="20" />
+<hkern u1="Q" u2="&#xc5;" k="41" />
+<hkern u1="Q" u2="&#xc4;" k="41" />
+<hkern u1="Q" u2="&#xc3;" k="41" />
+<hkern u1="Q" u2="&#xc2;" k="41" />
+<hkern u1="Q" u2="&#xc1;" k="41" />
+<hkern u1="Q" u2="&#xc0;" k="41" />
+<hkern u1="Q" u2="Z" k="20" />
+<hkern u1="Q" u2="Y" k="20" />
+<hkern u1="Q" u2="X" k="41" />
+<hkern u1="Q" u2="W" k="20" />
+<hkern u1="Q" u2="V" k="20" />
+<hkern u1="Q" u2="T" k="61" />
+<hkern u1="Q" u2="A" k="41" />
+<hkern u1="Q" u2="&#x2e;" k="82" />
+<hkern u1="Q" u2="&#x2c;" k="82" />
+<hkern u1="T" u2="&#x201e;" k="123" />
+<hkern u1="T" u2="&#x201a;" k="123" />
+<hkern u1="T" u2="&#x2014;" k="82" />
+<hkern u1="T" u2="&#x2013;" k="82" />
+<hkern u1="T" u2="&#x153;" k="143" />
+<hkern u1="T" u2="&#x152;" k="41" />
+<hkern u1="T" u2="&#xfd;" k="41" />
+<hkern u1="T" u2="&#xfc;" k="102" />
+<hkern u1="T" u2="&#xfb;" k="102" />
+<hkern u1="T" u2="&#xfa;" k="102" />
+<hkern u1="T" u2="&#xf9;" k="102" />
+<hkern u1="T" u2="&#xf8;" k="143" />
+<hkern u1="T" u2="&#xf6;" k="143" />
+<hkern u1="T" u2="&#xf5;" k="143" />
+<hkern u1="T" u2="&#xf4;" k="143" />
+<hkern u1="T" u2="&#xf3;" k="143" />
+<hkern u1="T" u2="&#xf2;" k="143" />
+<hkern u1="T" u2="&#xeb;" k="143" />
+<hkern u1="T" u2="&#xea;" k="143" />
+<hkern u1="T" u2="&#xe9;" k="143" />
+<hkern u1="T" u2="&#xe8;" k="143" />
+<hkern u1="T" u2="&#xe7;" k="143" />
+<hkern u1="T" u2="&#xe6;" k="164" />
+<hkern u1="T" u2="&#xe5;" k="164" />
+<hkern u1="T" u2="&#xe4;" k="164" />
+<hkern u1="T" u2="&#xe3;" k="164" />
+<hkern u1="T" u2="&#xe2;" k="164" />
+<hkern u1="T" u2="&#xe1;" k="164" />
+<hkern u1="T" u2="&#xe0;" k="143" />
+<hkern u1="T" u2="&#xd8;" k="41" />
+<hkern u1="T" u2="&#xd6;" k="41" />
+<hkern u1="T" u2="&#xd5;" k="41" />
+<hkern u1="T" u2="&#xd4;" k="41" />
+<hkern u1="T" u2="&#xd3;" k="41" />
+<hkern u1="T" u2="&#xd2;" k="41" />
+<hkern u1="T" u2="&#xc7;" k="41" />
+<hkern u1="T" u2="&#xc5;" k="143" />
+<hkern u1="T" u2="&#xc4;" k="143" />
+<hkern u1="T" u2="&#xc3;" k="143" />
+<hkern u1="T" u2="&#xc2;" k="143" />
+<hkern u1="T" u2="&#xc1;" k="143" />
+<hkern u1="T" u2="&#xc0;" k="143" />
+<hkern u1="T" u2="z" k="82" />
+<hkern u1="T" u2="y" k="41" />
+<hkern u1="T" u2="x" k="41" />
+<hkern u1="T" u2="w" k="41" />
+<hkern u1="T" u2="v" k="41" />
+<hkern u1="T" u2="u" k="102" />
+<hkern u1="T" u2="s" k="123" />
+<hkern u1="T" u2="r" k="102" />
+<hkern u1="T" u2="q" k="143" />
+<hkern u1="T" u2="p" k="102" />
+<hkern u1="T" u2="o" k="143" />
+<hkern u1="T" u2="n" k="102" />
+<hkern u1="T" u2="m" k="102" />
+<hkern u1="T" u2="g" k="143" />
+<hkern u1="T" u2="e" k="143" />
+<hkern u1="T" u2="d" k="143" />
+<hkern u1="T" u2="c" k="143" />
+<hkern u1="T" u2="a" k="164" />
+<hkern u1="T" u2="T" k="-41" />
+<hkern u1="T" u2="Q" k="41" />
+<hkern u1="T" u2="O" k="41" />
+<hkern u1="T" u2="G" k="41" />
+<hkern u1="T" u2="C" k="41" />
+<hkern u1="T" u2="A" k="143" />
+<hkern u1="T" u2="&#x3f;" k="-41" />
+<hkern u1="T" u2="&#x2e;" k="123" />
+<hkern u1="T" u2="&#x2d;" k="82" />
+<hkern u1="T" u2="&#x2c;" k="123" />
+<hkern u1="U" u2="&#x201e;" k="41" />
+<hkern u1="U" u2="&#x201a;" k="41" />
+<hkern u1="U" u2="&#xc5;" k="20" />
+<hkern u1="U" u2="&#xc4;" k="20" />
+<hkern u1="U" u2="&#xc3;" k="20" />
+<hkern u1="U" u2="&#xc2;" k="20" />
+<hkern u1="U" u2="&#xc1;" k="20" />
+<hkern u1="U" u2="&#xc0;" k="20" />
+<hkern u1="U" u2="A" k="20" />
+<hkern u1="U" u2="&#x2e;" k="41" />
+<hkern u1="U" u2="&#x2c;" k="41" />
+<hkern u1="V" u2="&#x201e;" k="102" />
+<hkern u1="V" u2="&#x201a;" k="102" />
+<hkern u1="V" u2="&#x153;" k="41" />
+<hkern u1="V" u2="&#x152;" k="20" />
+<hkern u1="V" u2="&#xfc;" k="20" />
+<hkern u1="V" u2="&#xfb;" k="20" />
+<hkern u1="V" u2="&#xfa;" k="20" />
+<hkern u1="V" u2="&#xf9;" k="20" />
+<hkern u1="V" u2="&#xf8;" k="41" />
+<hkern u1="V" u2="&#xf6;" k="41" />
+<hkern u1="V" u2="&#xf5;" k="41" />
+<hkern u1="V" u2="&#xf4;" k="41" />
+<hkern u1="V" u2="&#xf3;" k="41" />
+<hkern u1="V" u2="&#xf2;" k="41" />
+<hkern u1="V" u2="&#xeb;" k="41" />
+<hkern u1="V" u2="&#xea;" k="41" />
+<hkern u1="V" u2="&#xe9;" k="41" />
+<hkern u1="V" u2="&#xe8;" k="41" />
+<hkern u1="V" u2="&#xe7;" k="41" />
+<hkern u1="V" u2="&#xe6;" k="41" />
+<hkern u1="V" u2="&#xe5;" k="41" />
+<hkern u1="V" u2="&#xe4;" k="41" />
+<hkern u1="V" u2="&#xe3;" k="41" />
+<hkern u1="V" u2="&#xe2;" k="41" />
+<hkern u1="V" u2="&#xe1;" k="41" />
+<hkern u1="V" u2="&#xe0;" k="41" />
+<hkern u1="V" u2="&#xd8;" k="20" />
+<hkern u1="V" u2="&#xd6;" k="20" />
+<hkern u1="V" u2="&#xd5;" k="20" />
+<hkern u1="V" u2="&#xd4;" k="20" />
+<hkern u1="V" u2="&#xd3;" k="20" />
+<hkern u1="V" u2="&#xd2;" k="20" />
+<hkern u1="V" u2="&#xc7;" k="20" />
+<hkern u1="V" u2="&#xc5;" k="82" />
+<hkern u1="V" u2="&#xc4;" k="82" />
+<hkern u1="V" u2="&#xc3;" k="82" />
+<hkern u1="V" u2="&#xc2;" k="82" />
+<hkern u1="V" u2="&#xc1;" k="82" />
+<hkern u1="V" u2="&#xc0;" k="82" />
+<hkern u1="V" u2="u" k="20" />
+<hkern u1="V" u2="s" k="20" />
+<hkern u1="V" u2="r" k="20" />
+<hkern u1="V" u2="q" k="41" />
+<hkern u1="V" u2="p" k="20" />
+<hkern u1="V" u2="o" k="41" />
+<hkern u1="V" u2="n" k="20" />
+<hkern u1="V" u2="m" k="20" />
+<hkern u1="V" u2="g" k="20" />
+<hkern u1="V" u2="e" k="41" />
+<hkern u1="V" u2="d" k="41" />
+<hkern u1="V" u2="c" k="41" />
+<hkern u1="V" u2="a" k="41" />
+<hkern u1="V" u2="Q" k="20" />
+<hkern u1="V" u2="O" k="20" />
+<hkern u1="V" u2="G" k="20" />
+<hkern u1="V" u2="C" k="20" />
+<hkern u1="V" u2="A" k="82" />
+<hkern u1="V" u2="&#x3f;" k="-41" />
+<hkern u1="V" u2="&#x2e;" k="102" />
+<hkern u1="V" u2="&#x2c;" k="102" />
+<hkern u1="W" u2="&#x201e;" k="102" />
+<hkern u1="W" u2="&#x201a;" k="102" />
+<hkern u1="W" u2="&#x153;" k="41" />
+<hkern u1="W" u2="&#x152;" k="20" />
+<hkern u1="W" u2="&#xfc;" k="20" />
+<hkern u1="W" u2="&#xfb;" k="20" />
+<hkern u1="W" u2="&#xfa;" k="20" />
+<hkern u1="W" u2="&#xf9;" k="20" />
+<hkern u1="W" u2="&#xf8;" k="41" />
+<hkern u1="W" u2="&#xf6;" k="41" />
+<hkern u1="W" u2="&#xf5;" k="41" />
+<hkern u1="W" u2="&#xf4;" k="41" />
+<hkern u1="W" u2="&#xf3;" k="41" />
+<hkern u1="W" u2="&#xf2;" k="41" />
+<hkern u1="W" u2="&#xeb;" k="41" />
+<hkern u1="W" u2="&#xea;" k="41" />
+<hkern u1="W" u2="&#xe9;" k="41" />
+<hkern u1="W" u2="&#xe8;" k="41" />
+<hkern u1="W" u2="&#xe7;" k="41" />
+<hkern u1="W" u2="&#xe6;" k="41" />
+<hkern u1="W" u2="&#xe5;" k="41" />
+<hkern u1="W" u2="&#xe4;" k="41" />
+<hkern u1="W" u2="&#xe3;" k="41" />
+<hkern u1="W" u2="&#xe2;" k="41" />
+<hkern u1="W" u2="&#xe1;" k="41" />
+<hkern u1="W" u2="&#xe0;" k="41" />
+<hkern u1="W" u2="&#xd8;" k="20" />
+<hkern u1="W" u2="&#xd6;" k="20" />
+<hkern u1="W" u2="&#xd5;" k="20" />
+<hkern u1="W" u2="&#xd4;" k="20" />
+<hkern u1="W" u2="&#xd3;" k="20" />
+<hkern u1="W" u2="&#xd2;" k="20" />
+<hkern u1="W" u2="&#xc7;" k="20" />
+<hkern u1="W" u2="&#xc5;" k="82" />
+<hkern u1="W" u2="&#xc4;" k="82" />
+<hkern u1="W" u2="&#xc3;" k="82" />
+<hkern u1="W" u2="&#xc2;" k="82" />
+<hkern u1="W" u2="&#xc1;" k="82" />
+<hkern u1="W" u2="&#xc0;" k="82" />
+<hkern u1="W" u2="u" k="20" />
+<hkern u1="W" u2="s" k="20" />
+<hkern u1="W" u2="r" k="20" />
+<hkern u1="W" u2="q" k="41" />
+<hkern u1="W" u2="p" k="20" />
+<hkern u1="W" u2="o" k="41" />
+<hkern u1="W" u2="n" k="20" />
+<hkern u1="W" u2="m" k="20" />
+<hkern u1="W" u2="g" k="20" />
+<hkern u1="W" u2="e" k="41" />
+<hkern u1="W" u2="d" k="41" />
+<hkern u1="W" u2="c" k="41" />
+<hkern u1="W" u2="a" k="41" />
+<hkern u1="W" u2="Q" k="20" />
+<hkern u1="W" u2="O" k="20" />
+<hkern u1="W" u2="G" k="20" />
+<hkern u1="W" u2="C" k="20" />
+<hkern u1="W" u2="A" k="82" />
+<hkern u1="W" u2="&#x3f;" k="-41" />
+<hkern u1="W" u2="&#x2e;" k="102" />
+<hkern u1="W" u2="&#x2c;" k="102" />
+<hkern u1="X" u2="&#x152;" k="41" />
+<hkern u1="X" u2="&#xd8;" k="41" />
+<hkern u1="X" u2="&#xd6;" k="41" />
+<hkern u1="X" u2="&#xd5;" k="41" />
+<hkern u1="X" u2="&#xd4;" k="41" />
+<hkern u1="X" u2="&#xd3;" k="41" />
+<hkern u1="X" u2="&#xd2;" k="41" />
+<hkern u1="X" u2="&#xc7;" k="41" />
+<hkern u1="X" u2="Q" k="41" />
+<hkern u1="X" u2="O" k="41" />
+<hkern u1="X" u2="G" k="41" />
+<hkern u1="X" u2="C" k="41" />
+<hkern u1="Y" u2="&#x201e;" k="123" />
+<hkern u1="Y" u2="&#x201a;" k="123" />
+<hkern u1="Y" u2="&#x153;" k="102" />
+<hkern u1="Y" u2="&#x152;" k="41" />
+<hkern u1="Y" u2="&#xfc;" k="61" />
+<hkern u1="Y" u2="&#xfb;" k="61" />
+<hkern u1="Y" u2="&#xfa;" k="61" />
+<hkern u1="Y" u2="&#xf9;" k="61" />
+<hkern u1="Y" u2="&#xf8;" k="102" />
+<hkern u1="Y" u2="&#xf6;" k="102" />
+<hkern u1="Y" u2="&#xf5;" k="102" />
+<hkern u1="Y" u2="&#xf4;" k="102" />
+<hkern u1="Y" u2="&#xf3;" k="102" />
+<hkern u1="Y" u2="&#xf2;" k="102" />
+<hkern u1="Y" u2="&#xeb;" k="102" />
+<hkern u1="Y" u2="&#xea;" k="102" />
+<hkern u1="Y" u2="&#xe9;" k="102" />
+<hkern u1="Y" u2="&#xe8;" k="102" />
+<hkern u1="Y" u2="&#xe7;" k="102" />
+<hkern u1="Y" u2="&#xe6;" k="102" />
+<hkern u1="Y" u2="&#xe5;" k="102" />
+<hkern u1="Y" u2="&#xe4;" k="102" />
+<hkern u1="Y" u2="&#xe3;" k="102" />
+<hkern u1="Y" u2="&#xe2;" k="102" />
+<hkern u1="Y" u2="&#xe1;" k="102" />
+<hkern u1="Y" u2="&#xe0;" k="102" />
+<hkern u1="Y" u2="&#xd8;" k="41" />
+<hkern u1="Y" u2="&#xd6;" k="41" />
+<hkern u1="Y" u2="&#xd5;" k="41" />
+<hkern u1="Y" u2="&#xd4;" k="41" />
+<hkern u1="Y" u2="&#xd3;" k="41" />
+<hkern u1="Y" u2="&#xd2;" k="41" />
+<hkern u1="Y" u2="&#xc7;" k="41" />
+<hkern u1="Y" u2="&#xc5;" k="123" />
+<hkern u1="Y" u2="&#xc4;" k="123" />
+<hkern u1="Y" u2="&#xc3;" k="123" />
+<hkern u1="Y" u2="&#xc2;" k="123" />
+<hkern u1="Y" u2="&#xc1;" k="123" />
+<hkern u1="Y" u2="&#xc0;" k="123" />
+<hkern u1="Y" u2="z" k="41" />
+<hkern u1="Y" u2="u" k="61" />
+<hkern u1="Y" u2="s" k="82" />
+<hkern u1="Y" u2="r" k="61" />
+<hkern u1="Y" u2="q" k="102" />
+<hkern u1="Y" u2="p" k="61" />
+<hkern u1="Y" u2="o" k="102" />
+<hkern u1="Y" u2="n" k="61" />
+<hkern u1="Y" u2="m" k="61" />
+<hkern u1="Y" u2="g" k="41" />
+<hkern u1="Y" u2="e" k="102" />
+<hkern u1="Y" u2="d" k="102" />
+<hkern u1="Y" u2="c" k="102" />
+<hkern u1="Y" u2="a" k="102" />
+<hkern u1="Y" u2="Q" k="41" />
+<hkern u1="Y" u2="O" k="41" />
+<hkern u1="Y" u2="G" k="41" />
+<hkern u1="Y" u2="C" k="41" />
+<hkern u1="Y" u2="A" k="123" />
+<hkern u1="Y" u2="&#x3f;" k="-41" />
+<hkern u1="Y" u2="&#x2e;" k="123" />
+<hkern u1="Y" u2="&#x2c;" k="123" />
+<hkern u1="Z" u2="&#x152;" k="20" />
+<hkern u1="Z" u2="&#xd8;" k="20" />
+<hkern u1="Z" u2="&#xd6;" k="20" />
+<hkern u1="Z" u2="&#xd5;" k="20" />
+<hkern u1="Z" u2="&#xd4;" k="20" />
+<hkern u1="Z" u2="&#xd3;" k="20" />
+<hkern u1="Z" u2="&#xd2;" k="20" />
+<hkern u1="Z" u2="&#xc7;" k="20" />
+<hkern u1="Z" u2="Q" k="20" />
+<hkern u1="Z" u2="O" k="20" />
+<hkern u1="Z" u2="G" k="20" />
+<hkern u1="Z" u2="C" k="20" />
+<hkern u1="[" u2="J" k="-184" />
+<hkern u1="a" u2="&#x201d;" k="20" />
+<hkern u1="a" u2="&#x2019;" k="20" />
+<hkern u1="a" u2="&#x27;" k="20" />
+<hkern u1="a" u2="&#x22;" k="20" />
+<hkern u1="b" u2="&#x201d;" k="20" />
+<hkern u1="b" u2="&#x2019;" k="20" />
+<hkern u1="b" u2="&#xfd;" k="41" />
+<hkern u1="b" u2="z" k="20" />
+<hkern u1="b" u2="y" k="41" />
+<hkern u1="b" u2="x" k="41" />
+<hkern u1="b" u2="w" k="41" />
+<hkern u1="b" u2="v" k="41" />
+<hkern u1="b" u2="&#x27;" k="20" />
+<hkern u1="b" u2="&#x22;" k="20" />
+<hkern u1="c" u2="&#x201d;" k="-41" />
+<hkern u1="c" u2="&#x2019;" k="-41" />
+<hkern u1="c" u2="&#x27;" k="-41" />
+<hkern u1="c" u2="&#x22;" k="-41" />
+<hkern u1="e" u2="&#x201d;" k="20" />
+<hkern u1="e" u2="&#x2019;" k="20" />
+<hkern u1="e" u2="&#xfd;" k="41" />
+<hkern u1="e" u2="z" k="20" />
+<hkern u1="e" u2="y" k="41" />
+<hkern u1="e" u2="x" k="41" />
+<hkern u1="e" u2="w" k="41" />
+<hkern u1="e" u2="v" k="41" />
+<hkern u1="e" u2="&#x27;" k="20" />
+<hkern u1="e" u2="&#x22;" k="20" />
+<hkern u1="f" u2="&#x201d;" k="-123" />
+<hkern u1="f" u2="&#x2019;" k="-123" />
+<hkern u1="f" u2="&#x27;" k="-123" />
+<hkern u1="f" u2="&#x22;" k="-123" />
+<hkern u1="h" u2="&#x201d;" k="20" />
+<hkern u1="h" u2="&#x2019;" k="20" />
+<hkern u1="h" u2="&#x27;" k="20" />
+<hkern u1="h" u2="&#x22;" k="20" />
+<hkern u1="k" u2="&#x153;" k="41" />
+<hkern u1="k" u2="&#xf8;" k="41" />
+<hkern u1="k" u2="&#xf6;" k="41" />
+<hkern u1="k" u2="&#xf5;" k="41" />
+<hkern u1="k" u2="&#xf4;" k="41" />
+<hkern u1="k" u2="&#xf3;" k="41" />
+<hkern u1="k" u2="&#xf2;" k="41" />
+<hkern u1="k" u2="&#xeb;" k="41" />
+<hkern u1="k" u2="&#xea;" k="41" />
+<hkern u1="k" u2="&#xe9;" k="41" />
+<hkern u1="k" u2="&#xe8;" k="41" />
+<hkern u1="k" u2="&#xe7;" k="41" />
+<hkern u1="k" u2="&#xe0;" k="41" />
+<hkern u1="k" u2="q" k="41" />
+<hkern u1="k" u2="o" k="41" />
+<hkern u1="k" u2="e" k="41" />
+<hkern u1="k" u2="d" k="41" />
+<hkern u1="k" u2="c" k="41" />
+<hkern u1="m" u2="&#x201d;" k="20" />
+<hkern u1="m" u2="&#x2019;" k="20" />
+<hkern u1="m" u2="&#x27;" k="20" />
+<hkern u1="m" u2="&#x22;" k="20" />
+<hkern u1="n" u2="&#x201d;" k="20" />
+<hkern u1="n" u2="&#x2019;" k="20" />
+<hkern u1="n" u2="&#x27;" k="20" />
+<hkern u1="n" u2="&#x22;" k="20" />
+<hkern u1="o" u2="&#x201d;" k="20" />
+<hkern u1="o" u2="&#x2019;" k="20" />
+<hkern u1="o" u2="&#xfd;" k="41" />
+<hkern u1="o" u2="z" k="20" />
+<hkern u1="o" u2="y" k="41" />
+<hkern u1="o" u2="x" k="41" />
+<hkern u1="o" u2="w" k="41" />
+<hkern u1="o" u2="v" k="41" />
+<hkern u1="o" u2="&#x27;" k="20" />
+<hkern u1="o" u2="&#x22;" k="20" />
+<hkern u1="p" u2="&#x201d;" k="20" />
+<hkern u1="p" u2="&#x2019;" k="20" />
+<hkern u1="p" u2="&#xfd;" k="41" />
+<hkern u1="p" u2="z" k="20" />
+<hkern u1="p" u2="y" k="41" />
+<hkern u1="p" u2="x" k="41" />
+<hkern u1="p" u2="w" k="41" />
+<hkern u1="p" u2="v" k="41" />
+<hkern u1="p" u2="&#x27;" k="20" />
+<hkern u1="p" u2="&#x22;" k="20" />
+<hkern u1="r" u2="&#x201d;" k="-82" />
+<hkern u1="r" u2="&#x2019;" k="-82" />
+<hkern u1="r" u2="&#x153;" k="41" />
+<hkern u1="r" u2="&#xf8;" k="41" />
+<hkern u1="r" u2="&#xf6;" k="41" />
+<hkern u1="r" u2="&#xf5;" k="41" />
+<hkern u1="r" u2="&#xf4;" k="41" />
+<hkern u1="r" u2="&#xf3;" k="41" />
+<hkern u1="r" u2="&#xf2;" k="41" />
+<hkern u1="r" u2="&#xeb;" k="41" />
+<hkern u1="r" u2="&#xea;" k="41" />
+<hkern u1="r" u2="&#xe9;" k="41" />
+<hkern u1="r" u2="&#xe8;" k="41" />
+<hkern u1="r" u2="&#xe7;" k="41" />
+<hkern u1="r" u2="&#xe6;" k="41" />
+<hkern u1="r" u2="&#xe5;" k="41" />
+<hkern u1="r" u2="&#xe4;" k="41" />
+<hkern u1="r" u2="&#xe3;" k="41" />
+<hkern u1="r" u2="&#xe2;" k="41" />
+<hkern u1="r" u2="&#xe1;" k="41" />
+<hkern u1="r" u2="&#xe0;" k="41" />
+<hkern u1="r" u2="q" k="41" />
+<hkern u1="r" u2="o" k="41" />
+<hkern u1="r" u2="g" k="20" />
+<hkern u1="r" u2="e" k="41" />
+<hkern u1="r" u2="d" k="41" />
+<hkern u1="r" u2="c" k="41" />
+<hkern u1="r" u2="a" k="41" />
+<hkern u1="r" u2="&#x27;" k="-82" />
+<hkern u1="r" u2="&#x22;" k="-82" />
+<hkern u1="t" u2="&#x201d;" k="-41" />
+<hkern u1="t" u2="&#x2019;" k="-41" />
+<hkern u1="t" u2="&#x27;" k="-41" />
+<hkern u1="t" u2="&#x22;" k="-41" />
+<hkern u1="v" u2="&#x201e;" k="82" />
+<hkern u1="v" u2="&#x201d;" k="-82" />
+<hkern u1="v" u2="&#x201a;" k="82" />
+<hkern u1="v" u2="&#x2019;" k="-82" />
+<hkern u1="v" u2="&#x3f;" k="-41" />
+<hkern u1="v" u2="&#x2e;" k="82" />
+<hkern u1="v" u2="&#x2c;" k="82" />
+<hkern u1="v" u2="&#x27;" k="-82" />
+<hkern u1="v" u2="&#x22;" k="-82" />
+<hkern u1="w" u2="&#x201e;" k="82" />
+<hkern u1="w" u2="&#x201d;" k="-82" />
+<hkern u1="w" u2="&#x201a;" k="82" />
+<hkern u1="w" u2="&#x2019;" k="-82" />
+<hkern u1="w" u2="&#x3f;" k="-41" />
+<hkern u1="w" u2="&#x2e;" k="82" />
+<hkern u1="w" u2="&#x2c;" k="82" />
+<hkern u1="w" u2="&#x27;" k="-82" />
+<hkern u1="w" u2="&#x22;" k="-82" />
+<hkern u1="x" u2="&#x153;" k="41" />
+<hkern u1="x" u2="&#xf8;" k="41" />
+<hkern u1="x" u2="&#xf6;" k="41" />
+<hkern u1="x" u2="&#xf5;" k="41" />
+<hkern u1="x" u2="&#xf4;" k="41" />
+<hkern u1="x" u2="&#xf3;" k="41" />
+<hkern u1="x" u2="&#xf2;" k="41" />
+<hkern u1="x" u2="&#xeb;" k="41" />
+<hkern u1="x" u2="&#xea;" k="41" />
+<hkern u1="x" u2="&#xe9;" k="41" />
+<hkern u1="x" u2="&#xe8;" k="41" />
+<hkern u1="x" u2="&#xe7;" k="41" />
+<hkern u1="x" u2="&#xe0;" k="41" />
+<hkern u1="x" u2="q" k="41" />
+<hkern u1="x" u2="o" k="41" />
+<hkern u1="x" u2="e" k="41" />
+<hkern u1="x" u2="d" k="41" />
+<hkern u1="x" u2="c" k="41" />
+<hkern u1="y" u2="&#x201e;" k="82" />
+<hkern u1="y" u2="&#x201d;" k="-82" />
+<hkern u1="y" u2="&#x201a;" k="82" />
+<hkern u1="y" u2="&#x2019;" k="-82" />
+<hkern u1="y" u2="&#x3f;" k="-41" />
+<hkern u1="y" u2="&#x2e;" k="82" />
+<hkern u1="y" u2="&#x2c;" k="82" />
+<hkern u1="y" u2="&#x27;" k="-82" />
+<hkern u1="y" u2="&#x22;" k="-82" />
+<hkern u1="&#x7b;" u2="J" k="-184" />
+<hkern u1="&#xc0;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc0;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc0;" u2="&#x178;" k="123" />
+<hkern u1="&#xc0;" u2="&#x152;" k="41" />
+<hkern u1="&#xc0;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc0;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc0;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc0;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc0;" u2="Y" k="123" />
+<hkern u1="&#xc0;" u2="W" k="82" />
+<hkern u1="&#xc0;" u2="V" k="82" />
+<hkern u1="&#xc0;" u2="T" k="143" />
+<hkern u1="&#xc0;" u2="Q" k="41" />
+<hkern u1="&#xc0;" u2="O" k="41" />
+<hkern u1="&#xc0;" u2="J" k="-266" />
+<hkern u1="&#xc0;" u2="G" k="41" />
+<hkern u1="&#xc0;" u2="C" k="41" />
+<hkern u1="&#xc0;" u2="&#x27;" k="143" />
+<hkern u1="&#xc0;" u2="&#x22;" k="143" />
+<hkern u1="&#xc1;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc1;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc1;" u2="&#x178;" k="123" />
+<hkern u1="&#xc1;" u2="&#x152;" k="41" />
+<hkern u1="&#xc1;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc1;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc1;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc1;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc1;" u2="Y" k="123" />
+<hkern u1="&#xc1;" u2="W" k="82" />
+<hkern u1="&#xc1;" u2="V" k="82" />
+<hkern u1="&#xc1;" u2="T" k="143" />
+<hkern u1="&#xc1;" u2="Q" k="41" />
+<hkern u1="&#xc1;" u2="O" k="41" />
+<hkern u1="&#xc1;" u2="J" k="-266" />
+<hkern u1="&#xc1;" u2="G" k="41" />
+<hkern u1="&#xc1;" u2="C" k="41" />
+<hkern u1="&#xc1;" u2="&#x27;" k="143" />
+<hkern u1="&#xc1;" u2="&#x22;" k="143" />
+<hkern u1="&#xc2;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc2;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc2;" u2="&#x178;" k="123" />
+<hkern u1="&#xc2;" u2="&#x152;" k="41" />
+<hkern u1="&#xc2;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc2;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc2;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc2;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc2;" u2="Y" k="123" />
+<hkern u1="&#xc2;" u2="W" k="82" />
+<hkern u1="&#xc2;" u2="V" k="82" />
+<hkern u1="&#xc2;" u2="T" k="143" />
+<hkern u1="&#xc2;" u2="Q" k="41" />
+<hkern u1="&#xc2;" u2="O" k="41" />
+<hkern u1="&#xc2;" u2="J" k="-266" />
+<hkern u1="&#xc2;" u2="G" k="41" />
+<hkern u1="&#xc2;" u2="C" k="41" />
+<hkern u1="&#xc2;" u2="&#x27;" k="143" />
+<hkern u1="&#xc2;" u2="&#x22;" k="143" />
+<hkern u1="&#xc3;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc3;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc3;" u2="&#x178;" k="123" />
+<hkern u1="&#xc3;" u2="&#x152;" k="41" />
+<hkern u1="&#xc3;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc3;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc3;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc3;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc3;" u2="Y" k="123" />
+<hkern u1="&#xc3;" u2="W" k="82" />
+<hkern u1="&#xc3;" u2="V" k="82" />
+<hkern u1="&#xc3;" u2="T" k="143" />
+<hkern u1="&#xc3;" u2="Q" k="41" />
+<hkern u1="&#xc3;" u2="O" k="41" />
+<hkern u1="&#xc3;" u2="J" k="-266" />
+<hkern u1="&#xc3;" u2="G" k="41" />
+<hkern u1="&#xc3;" u2="C" k="41" />
+<hkern u1="&#xc3;" u2="&#x27;" k="143" />
+<hkern u1="&#xc3;" u2="&#x22;" k="143" />
+<hkern u1="&#xc4;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc4;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc4;" u2="&#x178;" k="123" />
+<hkern u1="&#xc4;" u2="&#x152;" k="41" />
+<hkern u1="&#xc4;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc4;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc4;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc4;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc4;" u2="Y" k="123" />
+<hkern u1="&#xc4;" u2="W" k="82" />
+<hkern u1="&#xc4;" u2="V" k="82" />
+<hkern u1="&#xc4;" u2="T" k="143" />
+<hkern u1="&#xc4;" u2="Q" k="41" />
+<hkern u1="&#xc4;" u2="O" k="41" />
+<hkern u1="&#xc4;" u2="J" k="-266" />
+<hkern u1="&#xc4;" u2="G" k="41" />
+<hkern u1="&#xc4;" u2="C" k="41" />
+<hkern u1="&#xc4;" u2="&#x27;" k="143" />
+<hkern u1="&#xc4;" u2="&#x22;" k="143" />
+<hkern u1="&#xc5;" u2="&#x201d;" k="143" />
+<hkern u1="&#xc5;" u2="&#x2019;" k="143" />
+<hkern u1="&#xc5;" u2="&#x178;" k="123" />
+<hkern u1="&#xc5;" u2="&#x152;" k="41" />
+<hkern u1="&#xc5;" u2="&#xdd;" k="123" />
+<hkern u1="&#xc5;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc5;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc5;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc5;" u2="Y" k="123" />
+<hkern u1="&#xc5;" u2="W" k="82" />
+<hkern u1="&#xc5;" u2="V" k="82" />
+<hkern u1="&#xc5;" u2="T" k="143" />
+<hkern u1="&#xc5;" u2="Q" k="41" />
+<hkern u1="&#xc5;" u2="O" k="41" />
+<hkern u1="&#xc5;" u2="J" k="-266" />
+<hkern u1="&#xc5;" u2="G" k="41" />
+<hkern u1="&#xc5;" u2="C" k="41" />
+<hkern u1="&#xc5;" u2="&#x27;" k="143" />
+<hkern u1="&#xc5;" u2="&#x22;" k="143" />
+<hkern u1="&#xc6;" u2="J" k="-123" />
+<hkern u1="&#xc7;" u2="&#x152;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd8;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd6;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd5;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd4;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd3;" k="41" />
+<hkern u1="&#xc7;" u2="&#xd2;" k="41" />
+<hkern u1="&#xc7;" u2="&#xc7;" k="41" />
+<hkern u1="&#xc7;" u2="Q" k="41" />
+<hkern u1="&#xc7;" u2="O" k="41" />
+<hkern u1="&#xc7;" u2="G" k="41" />
+<hkern u1="&#xc7;" u2="C" k="41" />
+<hkern u1="&#xc8;" u2="J" k="-123" />
+<hkern u1="&#xc9;" u2="J" k="-123" />
+<hkern u1="&#xca;" u2="J" k="-123" />
+<hkern u1="&#xcb;" u2="J" k="-123" />
+<hkern u1="&#xd0;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd0;" u2="&#x178;" k="20" />
+<hkern u1="&#xd0;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd0;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd0;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd0;" u2="Z" k="20" />
+<hkern u1="&#xd0;" u2="Y" k="20" />
+<hkern u1="&#xd0;" u2="X" k="41" />
+<hkern u1="&#xd0;" u2="W" k="20" />
+<hkern u1="&#xd0;" u2="V" k="20" />
+<hkern u1="&#xd0;" u2="T" k="61" />
+<hkern u1="&#xd0;" u2="A" k="41" />
+<hkern u1="&#xd0;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd0;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd2;" u2="&#x178;" k="20" />
+<hkern u1="&#xd2;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd2;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd2;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd2;" u2="Z" k="20" />
+<hkern u1="&#xd2;" u2="Y" k="20" />
+<hkern u1="&#xd2;" u2="X" k="41" />
+<hkern u1="&#xd2;" u2="W" k="20" />
+<hkern u1="&#xd2;" u2="V" k="20" />
+<hkern u1="&#xd2;" u2="T" k="61" />
+<hkern u1="&#xd2;" u2="A" k="41" />
+<hkern u1="&#xd2;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd2;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd3;" u2="&#x178;" k="20" />
+<hkern u1="&#xd3;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd3;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd3;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd3;" u2="Z" k="20" />
+<hkern u1="&#xd3;" u2="Y" k="20" />
+<hkern u1="&#xd3;" u2="X" k="41" />
+<hkern u1="&#xd3;" u2="W" k="20" />
+<hkern u1="&#xd3;" u2="V" k="20" />
+<hkern u1="&#xd3;" u2="T" k="61" />
+<hkern u1="&#xd3;" u2="A" k="41" />
+<hkern u1="&#xd3;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd3;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd4;" u2="&#x178;" k="20" />
+<hkern u1="&#xd4;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd4;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd4;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd4;" u2="Z" k="20" />
+<hkern u1="&#xd4;" u2="Y" k="20" />
+<hkern u1="&#xd4;" u2="X" k="41" />
+<hkern u1="&#xd4;" u2="W" k="20" />
+<hkern u1="&#xd4;" u2="V" k="20" />
+<hkern u1="&#xd4;" u2="T" k="61" />
+<hkern u1="&#xd4;" u2="A" k="41" />
+<hkern u1="&#xd4;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd4;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd5;" u2="&#x178;" k="20" />
+<hkern u1="&#xd5;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd5;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd5;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd5;" u2="Z" k="20" />
+<hkern u1="&#xd5;" u2="Y" k="20" />
+<hkern u1="&#xd5;" u2="X" k="41" />
+<hkern u1="&#xd5;" u2="W" k="20" />
+<hkern u1="&#xd5;" u2="V" k="20" />
+<hkern u1="&#xd5;" u2="T" k="61" />
+<hkern u1="&#xd5;" u2="A" k="41" />
+<hkern u1="&#xd5;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd5;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd6;" u2="&#x178;" k="20" />
+<hkern u1="&#xd6;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd6;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd6;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd6;" u2="Z" k="20" />
+<hkern u1="&#xd6;" u2="Y" k="20" />
+<hkern u1="&#xd6;" u2="X" k="41" />
+<hkern u1="&#xd6;" u2="W" k="20" />
+<hkern u1="&#xd6;" u2="V" k="20" />
+<hkern u1="&#xd6;" u2="T" k="61" />
+<hkern u1="&#xd6;" u2="A" k="41" />
+<hkern u1="&#xd6;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd6;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x201a;" k="82" />
+<hkern u1="&#xd8;" u2="&#x178;" k="20" />
+<hkern u1="&#xd8;" u2="&#xdd;" k="20" />
+<hkern u1="&#xd8;" u2="&#xc5;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc4;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc3;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc2;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc1;" k="41" />
+<hkern u1="&#xd8;" u2="&#xc0;" k="41" />
+<hkern u1="&#xd8;" u2="Z" k="20" />
+<hkern u1="&#xd8;" u2="Y" k="20" />
+<hkern u1="&#xd8;" u2="X" k="41" />
+<hkern u1="&#xd8;" u2="W" k="20" />
+<hkern u1="&#xd8;" u2="V" k="20" />
+<hkern u1="&#xd8;" u2="T" k="61" />
+<hkern u1="&#xd8;" u2="A" k="41" />
+<hkern u1="&#xd8;" u2="&#x2e;" k="82" />
+<hkern u1="&#xd8;" u2="&#x2c;" k="82" />
+<hkern u1="&#xd9;" u2="&#x201e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x201a;" k="41" />
+<hkern u1="&#xd9;" u2="&#xc5;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc4;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc3;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc2;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc1;" k="20" />
+<hkern u1="&#xd9;" u2="&#xc0;" k="20" />
+<hkern u1="&#xd9;" u2="A" k="20" />
+<hkern u1="&#xd9;" u2="&#x2e;" k="41" />
+<hkern u1="&#xd9;" u2="&#x2c;" k="41" />
+<hkern u1="&#xda;" u2="&#x201e;" k="41" />
+<hkern u1="&#xda;" u2="&#x201a;" k="41" />
+<hkern u1="&#xda;" u2="&#xc5;" k="20" />
+<hkern u1="&#xda;" u2="&#xc4;" k="20" />
+<hkern u1="&#xda;" u2="&#xc3;" k="20" />
+<hkern u1="&#xda;" u2="&#xc2;" k="20" />
+<hkern u1="&#xda;" u2="&#xc1;" k="20" />
+<hkern u1="&#xda;" u2="&#xc0;" k="20" />
+<hkern u1="&#xda;" u2="A" k="20" />
+<hkern u1="&#xda;" u2="&#x2e;" k="41" />
+<hkern u1="&#xda;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdb;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdb;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdb;" u2="A" k="20" />
+<hkern u1="&#xdb;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdb;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x201a;" k="41" />
+<hkern u1="&#xdc;" u2="&#xc5;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc4;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc3;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc2;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc1;" k="20" />
+<hkern u1="&#xdc;" u2="&#xc0;" k="20" />
+<hkern u1="&#xdc;" u2="A" k="20" />
+<hkern u1="&#xdc;" u2="&#x2e;" k="41" />
+<hkern u1="&#xdc;" u2="&#x2c;" k="41" />
+<hkern u1="&#xdd;" u2="&#x201e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x201a;" k="123" />
+<hkern u1="&#xdd;" u2="&#x153;" k="102" />
+<hkern u1="&#xdd;" u2="&#x152;" k="41" />
+<hkern u1="&#xdd;" u2="&#xfc;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfb;" k="61" />
+<hkern u1="&#xdd;" u2="&#xfa;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf9;" k="61" />
+<hkern u1="&#xdd;" u2="&#xf8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xf2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xeb;" k="102" />
+<hkern u1="&#xdd;" u2="&#xea;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe9;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe8;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe7;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe6;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe5;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe4;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe3;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe2;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe1;" k="102" />
+<hkern u1="&#xdd;" u2="&#xe0;" k="102" />
+<hkern u1="&#xdd;" u2="&#xd8;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd6;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd5;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd4;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd3;" k="41" />
+<hkern u1="&#xdd;" u2="&#xd2;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc7;" k="41" />
+<hkern u1="&#xdd;" u2="&#xc5;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc4;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc3;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc2;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc1;" k="123" />
+<hkern u1="&#xdd;" u2="&#xc0;" k="123" />
+<hkern u1="&#xdd;" u2="z" k="41" />
+<hkern u1="&#xdd;" u2="u" k="61" />
+<hkern u1="&#xdd;" u2="s" k="82" />
+<hkern u1="&#xdd;" u2="r" k="61" />
+<hkern u1="&#xdd;" u2="q" k="102" />
+<hkern u1="&#xdd;" u2="p" k="61" />
+<hkern u1="&#xdd;" u2="o" k="102" />
+<hkern u1="&#xdd;" u2="n" k="61" />
+<hkern u1="&#xdd;" u2="m" k="61" />
+<hkern u1="&#xdd;" u2="g" k="41" />
+<hkern u1="&#xdd;" u2="e" k="102" />
+<hkern u1="&#xdd;" u2="d" k="102" />
+<hkern u1="&#xdd;" u2="c" k="102" />
+<hkern u1="&#xdd;" u2="a" k="102" />
+<hkern u1="&#xdd;" u2="Q" k="41" />
+<hkern u1="&#xdd;" u2="O" k="41" />
+<hkern u1="&#xdd;" u2="G" k="41" />
+<hkern u1="&#xdd;" u2="C" k="41" />
+<hkern u1="&#xdd;" u2="A" k="123" />
+<hkern u1="&#xdd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xdd;" u2="&#x2e;" k="123" />
+<hkern u1="&#xdd;" u2="&#x2c;" k="123" />
+<hkern u1="&#xde;" u2="&#x201e;" k="266" />
+<hkern u1="&#xde;" u2="&#x201a;" k="266" />
+<hkern u1="&#xde;" u2="&#xc5;" k="102" />
+<hkern u1="&#xde;" u2="&#xc4;" k="102" />
+<hkern u1="&#xde;" u2="&#xc3;" k="102" />
+<hkern u1="&#xde;" u2="&#xc2;" k="102" />
+<hkern u1="&#xde;" u2="&#xc1;" k="102" />
+<hkern u1="&#xde;" u2="&#xc0;" k="102" />
+<hkern u1="&#xde;" u2="Z" k="20" />
+<hkern u1="&#xde;" u2="X" k="41" />
+<hkern u1="&#xde;" u2="A" k="102" />
+<hkern u1="&#xde;" u2="&#x2e;" k="266" />
+<hkern u1="&#xde;" u2="&#x2c;" k="266" />
+<hkern u1="&#xe0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe0;" u2="&#x27;" k="20" />
+<hkern u1="&#xe0;" u2="&#x22;" k="20" />
+<hkern u1="&#xe1;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe1;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe1;" u2="&#x27;" k="20" />
+<hkern u1="&#xe1;" u2="&#x22;" k="20" />
+<hkern u1="&#xe2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe2;" u2="&#x27;" k="20" />
+<hkern u1="&#xe2;" u2="&#x22;" k="20" />
+<hkern u1="&#xe3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe3;" u2="&#x27;" k="20" />
+<hkern u1="&#xe3;" u2="&#x22;" k="20" />
+<hkern u1="&#xe4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe4;" u2="&#x27;" k="20" />
+<hkern u1="&#xe4;" u2="&#x22;" k="20" />
+<hkern u1="&#xe5;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe5;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe5;" u2="&#x27;" k="20" />
+<hkern u1="&#xe5;" u2="&#x22;" k="20" />
+<hkern u1="&#xe8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe8;" u2="z" k="20" />
+<hkern u1="&#xe8;" u2="y" k="41" />
+<hkern u1="&#xe8;" u2="x" k="41" />
+<hkern u1="&#xe8;" u2="w" k="41" />
+<hkern u1="&#xe8;" u2="v" k="41" />
+<hkern u1="&#xe8;" u2="&#x27;" k="20" />
+<hkern u1="&#xe8;" u2="&#x22;" k="20" />
+<hkern u1="&#xe9;" u2="&#x201d;" k="20" />
+<hkern u1="&#xe9;" u2="&#x2019;" k="20" />
+<hkern u1="&#xe9;" u2="&#xfd;" k="41" />
+<hkern u1="&#xe9;" u2="z" k="20" />
+<hkern u1="&#xe9;" u2="y" k="41" />
+<hkern u1="&#xe9;" u2="x" k="41" />
+<hkern u1="&#xe9;" u2="w" k="41" />
+<hkern u1="&#xe9;" u2="v" k="41" />
+<hkern u1="&#xe9;" u2="&#x27;" k="20" />
+<hkern u1="&#xe9;" u2="&#x22;" k="20" />
+<hkern u1="&#xea;" u2="&#x201d;" k="20" />
+<hkern u1="&#xea;" u2="&#x2019;" k="20" />
+<hkern u1="&#xea;" u2="&#xfd;" k="41" />
+<hkern u1="&#xea;" u2="z" k="20" />
+<hkern u1="&#xea;" u2="y" k="41" />
+<hkern u1="&#xea;" u2="x" k="41" />
+<hkern u1="&#xea;" u2="w" k="41" />
+<hkern u1="&#xea;" u2="v" k="41" />
+<hkern u1="&#xea;" u2="&#x27;" k="20" />
+<hkern u1="&#xea;" u2="&#x22;" k="20" />
+<hkern u1="&#xeb;" u2="&#x201d;" k="20" />
+<hkern u1="&#xeb;" u2="&#x2019;" k="20" />
+<hkern u1="&#xeb;" u2="&#xfd;" k="41" />
+<hkern u1="&#xeb;" u2="z" k="20" />
+<hkern u1="&#xeb;" u2="y" k="41" />
+<hkern u1="&#xeb;" u2="x" k="41" />
+<hkern u1="&#xeb;" u2="w" k="41" />
+<hkern u1="&#xeb;" u2="v" k="41" />
+<hkern u1="&#xeb;" u2="&#x27;" k="20" />
+<hkern u1="&#xeb;" u2="&#x22;" k="20" />
+<hkern u1="&#xf0;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf0;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf0;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf0;" u2="z" k="20" />
+<hkern u1="&#xf0;" u2="y" k="41" />
+<hkern u1="&#xf0;" u2="x" k="41" />
+<hkern u1="&#xf0;" u2="w" k="41" />
+<hkern u1="&#xf0;" u2="v" k="41" />
+<hkern u1="&#xf0;" u2="&#x27;" k="20" />
+<hkern u1="&#xf0;" u2="&#x22;" k="20" />
+<hkern u1="&#xf2;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf2;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf2;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf2;" u2="z" k="20" />
+<hkern u1="&#xf2;" u2="y" k="41" />
+<hkern u1="&#xf2;" u2="x" k="41" />
+<hkern u1="&#xf2;" u2="w" k="41" />
+<hkern u1="&#xf2;" u2="v" k="41" />
+<hkern u1="&#xf2;" u2="&#x27;" k="20" />
+<hkern u1="&#xf2;" u2="&#x22;" k="20" />
+<hkern u1="&#xf3;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf3;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf3;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf3;" u2="z" k="20" />
+<hkern u1="&#xf3;" u2="y" k="41" />
+<hkern u1="&#xf3;" u2="x" k="41" />
+<hkern u1="&#xf3;" u2="w" k="41" />
+<hkern u1="&#xf3;" u2="v" k="41" />
+<hkern u1="&#xf3;" u2="&#x27;" k="20" />
+<hkern u1="&#xf3;" u2="&#x22;" k="20" />
+<hkern u1="&#xf4;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf4;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf4;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf4;" u2="z" k="20" />
+<hkern u1="&#xf4;" u2="y" k="41" />
+<hkern u1="&#xf4;" u2="x" k="41" />
+<hkern u1="&#xf4;" u2="w" k="41" />
+<hkern u1="&#xf4;" u2="v" k="41" />
+<hkern u1="&#xf4;" u2="&#x27;" k="20" />
+<hkern u1="&#xf4;" u2="&#x22;" k="20" />
+<hkern u1="&#xf6;" u2="&#x201d;" k="41" />
+<hkern u1="&#xf6;" u2="&#x2019;" k="41" />
+<hkern u1="&#xf6;" u2="&#x27;" k="41" />
+<hkern u1="&#xf6;" u2="&#x22;" k="41" />
+<hkern u1="&#xf8;" u2="&#x201d;" k="20" />
+<hkern u1="&#xf8;" u2="&#x2019;" k="20" />
+<hkern u1="&#xf8;" u2="&#xfd;" k="41" />
+<hkern u1="&#xf8;" u2="z" k="20" />
+<hkern u1="&#xf8;" u2="y" k="41" />
+<hkern u1="&#xf8;" u2="x" k="41" />
+<hkern u1="&#xf8;" u2="w" k="41" />
+<hkern u1="&#xf8;" u2="v" k="41" />
+<hkern u1="&#xf8;" u2="&#x27;" k="20" />
+<hkern u1="&#xf8;" u2="&#x22;" k="20" />
+<hkern u1="&#xfd;" u2="&#x201e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x201a;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xfd;" u2="&#x2e;" k="82" />
+<hkern u1="&#xfd;" u2="&#x2c;" k="82" />
+<hkern u1="&#xfd;" u2="&#x27;" k="-82" />
+<hkern u1="&#xfd;" u2="&#x22;" k="-82" />
+<hkern u1="&#xfe;" u2="&#x201d;" k="20" />
+<hkern u1="&#xfe;" u2="&#x2019;" k="20" />
+<hkern u1="&#xfe;" u2="&#xfd;" k="41" />
+<hkern u1="&#xfe;" u2="z" k="20" />
+<hkern u1="&#xfe;" u2="y" k="41" />
+<hkern u1="&#xfe;" u2="x" k="41" />
+<hkern u1="&#xfe;" u2="w" k="41" />
+<hkern u1="&#xfe;" u2="v" k="41" />
+<hkern u1="&#xfe;" u2="&#x27;" k="20" />
+<hkern u1="&#xfe;" u2="&#x22;" k="20" />
+<hkern u1="&#xff;" u2="&#x201e;" k="82" />
+<hkern u1="&#xff;" u2="&#x201d;" k="-82" />
+<hkern u1="&#xff;" u2="&#x201a;" k="82" />
+<hkern u1="&#xff;" u2="&#x2019;" k="-82" />
+<hkern u1="&#xff;" u2="&#x3f;" k="-41" />
+<hkern u1="&#xff;" u2="&#x2e;" k="82" />
+<hkern u1="&#xff;" u2="&#x2c;" k="82" />
+<hkern u1="&#xff;" u2="&#x27;" k="-82" />
+<hkern u1="&#xff;" u2="&#x22;" k="-82" />
+<hkern u1="&#x152;" u2="J" k="-123" />
+<hkern u1="&#x178;" u2="&#x201e;" k="123" />
+<hkern u1="&#x178;" u2="&#x201a;" k="123" />
+<hkern u1="&#x178;" u2="&#x153;" k="102" />
+<hkern u1="&#x178;" u2="&#x152;" k="41" />
+<hkern u1="&#x178;" u2="&#xfc;" k="61" />
+<hkern u1="&#x178;" u2="&#xfb;" k="61" />
+<hkern u1="&#x178;" u2="&#xfa;" k="61" />
+<hkern u1="&#x178;" u2="&#xf9;" k="61" />
+<hkern u1="&#x178;" u2="&#xf8;" k="102" />
+<hkern u1="&#x178;" u2="&#xf6;" k="102" />
+<hkern u1="&#x178;" u2="&#xf5;" k="102" />
+<hkern u1="&#x178;" u2="&#xf4;" k="102" />
+<hkern u1="&#x178;" u2="&#xf3;" k="102" />
+<hkern u1="&#x178;" u2="&#xf2;" k="102" />
+<hkern u1="&#x178;" u2="&#xeb;" k="102" />
+<hkern u1="&#x178;" u2="&#xea;" k="102" />
+<hkern u1="&#x178;" u2="&#xe9;" k="102" />
+<hkern u1="&#x178;" u2="&#xe8;" k="102" />
+<hkern u1="&#x178;" u2="&#xe7;" k="102" />
+<hkern u1="&#x178;" u2="&#xe6;" k="102" />
+<hkern u1="&#x178;" u2="&#xe5;" k="102" />
+<hkern u1="&#x178;" u2="&#xe4;" k="102" />
+<hkern u1="&#x178;" u2="&#xe3;" k="102" />
+<hkern u1="&#x178;" u2="&#xe2;" k="102" />
+<hkern u1="&#x178;" u2="&#xe1;" k="102" />
+<hkern u1="&#x178;" u2="&#xe0;" k="102" />
+<hkern u1="&#x178;" u2="&#xd8;" k="41" />
+<hkern u1="&#x178;" u2="&#xd6;" k="41" />
+<hkern u1="&#x178;" u2="&#xd5;" k="41" />
+<hkern u1="&#x178;" u2="&#xd4;" k="41" />
+<hkern u1="&#x178;" u2="&#xd3;" k="41" />
+<hkern u1="&#x178;" u2="&#xd2;" k="41" />
+<hkern u1="&#x178;" u2="&#xc7;" k="41" />
+<hkern u1="&#x178;" u2="&#xc5;" k="123" />
+<hkern u1="&#x178;" u2="&#xc4;" k="123" />
+<hkern u1="&#x178;" u2="&#xc3;" k="123" />
+<hkern u1="&#x178;" u2="&#xc2;" k="123" />
+<hkern u1="&#x178;" u2="&#xc1;" k="123" />
+<hkern u1="&#x178;" u2="&#xc0;" k="123" />
+<hkern u1="&#x178;" u2="z" k="41" />
+<hkern u1="&#x178;" u2="u" k="61" />
+<hkern u1="&#x178;" u2="s" k="82" />
+<hkern u1="&#x178;" u2="r" k="61" />
+<hkern u1="&#x178;" u2="q" k="102" />
+<hkern u1="&#x178;" u2="p" k="61" />
+<hkern u1="&#x178;" u2="o" k="102" />
+<hkern u1="&#x178;" u2="n" k="61" />
+<hkern u1="&#x178;" u2="m" k="61" />
+<hkern u1="&#x178;" u2="g" k="41" />
+<hkern u1="&#x178;" u2="e" k="102" />
+<hkern u1="&#x178;" u2="d" k="102" />
+<hkern u1="&#x178;" u2="c" k="102" />
+<hkern u1="&#x178;" u2="a" k="102" />
+<hkern u1="&#x178;" u2="Q" k="41" />
+<hkern u1="&#x178;" u2="O" k="41" />
+<hkern u1="&#x178;" u2="G" k="41" />
+<hkern u1="&#x178;" u2="C" k="41" />
+<hkern u1="&#x178;" u2="A" k="123" />
+<hkern u1="&#x178;" u2="&#x3f;" k="-41" />
+<hkern u1="&#x178;" u2="&#x2e;" k="123" />
+<hkern u1="&#x178;" u2="&#x2c;" k="123" />
+<hkern u1="&#x2013;" u2="T" k="82" />
+<hkern u1="&#x2014;" u2="T" k="82" />
+<hkern u1="&#x2018;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2018;" u2="&#x153;" k="123" />
+<hkern u1="&#x2018;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2018;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2018;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2018;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2018;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2018;" u2="&#xea;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2018;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2018;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2018;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2018;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2018;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2018;" u2="u" k="61" />
+<hkern u1="&#x2018;" u2="s" k="61" />
+<hkern u1="&#x2018;" u2="r" k="61" />
+<hkern u1="&#x2018;" u2="q" k="123" />
+<hkern u1="&#x2018;" u2="p" k="61" />
+<hkern u1="&#x2018;" u2="o" k="123" />
+<hkern u1="&#x2018;" u2="n" k="61" />
+<hkern u1="&#x2018;" u2="m" k="61" />
+<hkern u1="&#x2018;" u2="g" k="61" />
+<hkern u1="&#x2018;" u2="e" k="123" />
+<hkern u1="&#x2018;" u2="d" k="123" />
+<hkern u1="&#x2018;" u2="c" k="123" />
+<hkern u1="&#x2018;" u2="a" k="82" />
+<hkern u1="&#x2018;" u2="Y" k="-20" />
+<hkern u1="&#x2018;" u2="W" k="-41" />
+<hkern u1="&#x2018;" u2="V" k="-41" />
+<hkern u1="&#x2018;" u2="T" k="-41" />
+<hkern u1="&#x2018;" u2="A" k="143" />
+<hkern u1="&#x2019;" u2="&#x178;" k="-20" />
+<hkern u1="&#x2019;" u2="&#x153;" k="123" />
+<hkern u1="&#x2019;" u2="&#xfc;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfb;" k="61" />
+<hkern u1="&#x2019;" u2="&#xfa;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf9;" k="61" />
+<hkern u1="&#x2019;" u2="&#xf8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf6;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf5;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf4;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf3;" k="123" />
+<hkern u1="&#x2019;" u2="&#xf2;" k="123" />
+<hkern u1="&#x2019;" u2="&#xeb;" k="123" />
+<hkern u1="&#x2019;" u2="&#xea;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe9;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe8;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe7;" k="123" />
+<hkern u1="&#x2019;" u2="&#xe6;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe5;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe4;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe3;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe2;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe1;" k="82" />
+<hkern u1="&#x2019;" u2="&#xe0;" k="123" />
+<hkern u1="&#x2019;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x2019;" u2="&#xc5;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc4;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc3;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc2;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc1;" k="143" />
+<hkern u1="&#x2019;" u2="&#xc0;" k="143" />
+<hkern u1="&#x2019;" u2="u" k="61" />
+<hkern u1="&#x2019;" u2="s" k="61" />
+<hkern u1="&#x2019;" u2="r" k="61" />
+<hkern u1="&#x2019;" u2="q" k="123" />
+<hkern u1="&#x2019;" u2="p" k="61" />
+<hkern u1="&#x2019;" u2="o" k="123" />
+<hkern u1="&#x2019;" u2="n" k="61" />
+<hkern u1="&#x2019;" u2="m" k="61" />
+<hkern u1="&#x2019;" u2="g" k="61" />
+<hkern u1="&#x2019;" u2="e" k="123" />
+<hkern u1="&#x2019;" u2="d" k="123" />
+<hkern u1="&#x2019;" u2="c" k="123" />
+<hkern u1="&#x2019;" u2="a" k="82" />
+<hkern u1="&#x2019;" u2="Y" k="-20" />
+<hkern u1="&#x2019;" u2="W" k="-41" />
+<hkern u1="&#x2019;" u2="V" k="-41" />
+<hkern u1="&#x2019;" u2="T" k="-41" />
+<hkern u1="&#x2019;" u2="A" k="143" />
+<hkern u1="&#x201a;" u2="&#x178;" k="123" />
+<hkern u1="&#x201a;" u2="&#x152;" k="102" />
+<hkern u1="&#x201a;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201a;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201a;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201a;" u2="&#xda;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201a;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201a;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201a;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201a;" u2="Y" k="123" />
+<hkern u1="&#x201a;" u2="W" k="123" />
+<hkern u1="&#x201a;" u2="V" k="123" />
+<hkern u1="&#x201a;" u2="U" k="41" />
+<hkern u1="&#x201a;" u2="T" k="143" />
+<hkern u1="&#x201a;" u2="Q" k="102" />
+<hkern u1="&#x201a;" u2="O" k="102" />
+<hkern u1="&#x201a;" u2="G" k="102" />
+<hkern u1="&#x201a;" u2="C" k="102" />
+<hkern u1="&#x201c;" u2="&#x178;" k="-20" />
+<hkern u1="&#x201c;" u2="&#x153;" k="123" />
+<hkern u1="&#x201c;" u2="&#xfc;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfb;" k="61" />
+<hkern u1="&#x201c;" u2="&#xfa;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf9;" k="61" />
+<hkern u1="&#x201c;" u2="&#xf8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf6;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf5;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf4;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf3;" k="123" />
+<hkern u1="&#x201c;" u2="&#xf2;" k="123" />
+<hkern u1="&#x201c;" u2="&#xeb;" k="123" />
+<hkern u1="&#x201c;" u2="&#xea;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe9;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe8;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe7;" k="123" />
+<hkern u1="&#x201c;" u2="&#xe6;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe5;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe4;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe3;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe2;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe1;" k="82" />
+<hkern u1="&#x201c;" u2="&#xe0;" k="123" />
+<hkern u1="&#x201c;" u2="&#xdd;" k="-20" />
+<hkern u1="&#x201c;" u2="&#xc5;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc4;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc3;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc2;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc1;" k="143" />
+<hkern u1="&#x201c;" u2="&#xc0;" k="143" />
+<hkern u1="&#x201c;" u2="u" k="61" />
+<hkern u1="&#x201c;" u2="s" k="61" />
+<hkern u1="&#x201c;" u2="r" k="61" />
+<hkern u1="&#x201c;" u2="q" k="123" />
+<hkern u1="&#x201c;" u2="p" k="61" />
+<hkern u1="&#x201c;" u2="o" k="123" />
+<hkern u1="&#x201c;" u2="n" k="61" />
+<hkern u1="&#x201c;" u2="m" k="61" />
+<hkern u1="&#x201c;" u2="g" k="61" />
+<hkern u1="&#x201c;" u2="e" k="123" />
+<hkern u1="&#x201c;" u2="d" k="123" />
+<hkern u1="&#x201c;" u2="c" k="123" />
+<hkern u1="&#x201c;" u2="a" k="82" />
+<hkern u1="&#x201c;" u2="Y" k="-20" />
+<hkern u1="&#x201c;" u2="W" k="-41" />
+<hkern u1="&#x201c;" u2="V" k="-41" />
+<hkern u1="&#x201c;" u2="T" k="-41" />
+<hkern u1="&#x201c;" u2="A" k="143" />
+<hkern u1="&#x201e;" u2="&#x178;" k="123" />
+<hkern u1="&#x201e;" u2="&#x152;" k="102" />
+<hkern u1="&#x201e;" u2="&#xdd;" k="123" />
+<hkern u1="&#x201e;" u2="&#xdc;" k="41" />
+<hkern u1="&#x201e;" u2="&#xdb;" k="41" />
+<hkern u1="&#x201e;" u2="&#xda;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd9;" k="41" />
+<hkern u1="&#x201e;" u2="&#xd8;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd6;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd5;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd4;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd3;" k="102" />
+<hkern u1="&#x201e;" u2="&#xd2;" k="102" />
+<hkern u1="&#x201e;" u2="&#xc7;" k="102" />
+<hkern u1="&#x201e;" u2="Y" k="123" />
+<hkern u1="&#x201e;" u2="W" k="123" />
+<hkern u1="&#x201e;" u2="V" k="123" />
+<hkern u1="&#x201e;" u2="U" k="41" />
+<hkern u1="&#x201e;" u2="T" k="143" />
+<hkern u1="&#x201e;" u2="Q" k="102" />
+<hkern u1="&#x201e;" u2="O" k="102" />
+<hkern u1="&#x201e;" u2="G" k="102" />
+<hkern u1="&#x201e;" u2="C" k="102" />
+</font>
+</defs></svg> 
\ No newline at end of file
diff --git a/docs/fonts/OpenSans-Regular-webfont.woff b/docs/fonts/OpenSans-Regular-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..e231183dce4c7b452afc9e7799586fd285e146f4
GIT binary patch
literal 22660
zcmZsBb8u!&^yZs4wmESowrx9^*tTukn%K5&Yhv4(*qAukeD&L{+O67q>#5V{x##IV
z{l`6h>vp@zi-`e10N<B-FaY&Go2>pn{(tTN_YxCRmIVMn%D!3L|6nA35hpGpD)!9{
zef#*|AOyh!fQc)}D}8f^003Aa005ms>xd~NuB0La06>I)#{_(%EYB!BUtWox2>^hE
z`}Xz!L*CzXKO-9h`)|(rTVDVG0AWyXSQL$1oe97DLHdqi_y!N<2n4sOy_wB7C-6PS
z>$gpag7p+MGjRIWBJh02K>cqZnOS?7esdxKfFK_LU}yi!vWwQ-#K0H;kPrTjVg3di
z2-xpH^KbH-Yy0*IzVQ<w8XVi)#@YRwTm8;M6aWD2`-sxmu(mV$j{8OUo!>VPvfrVS
zYieWQ{ynbJ^SADs2M~h(07BXt*q8tS%2?kqOW!$Cm?1=S+1oie0{|*F-`vZ0f57Xy
z;#_-2lW(os#kVg0KirEDU$~hVe&?+2{p~~i2eTH%+HVW;4ZtLC!OVYloRu-^KRdOA
z#p1qhq;IURzYA&z4S}R@s1G*qBrpj)V*H+W90)N0;J#j+A}jM-9BcHeljaJ;CZWY*
zA<o>0BA=y&k`bikBmz(zvjl#zZfM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sKztm7)X`M`R%vxPkz=8(j&nYXNAml(yw
zHZil28@!iT_Hu+@{Ny(WIL2LWbDUYsW(U>Wr-nP+<1r6-$Rj?6zxRwMJmmzw@XvPg
zlIOg@&u6}}i8%zA%RFkSV;}X*r-2}igjm2r7V(M2ETM^|EN2-P+0RN=u!_}u;TxBD
z#Ys+anb*AIjl@a3BuJtpNwTC!s-#J}WJsoDNj9fB!+9=nle3)T78^J!Ib7p9S0q>R
zB%iH(mjWr2A}N*<DK+|Pn;QI@DO4A*SS*zhoff6aUAoe$v@0u`)x(WSO{pubN}JNI
zEK@p^<;s8aoDnrOSJUFW0beLsQ(e{QkCb#zM7z>qGq^*+`sT!~_VKtP`-Ih%R;A6{
za<;Bp{{lIAr&0g_086+4$WmCb0RfI#xd;FV0AnDq0V71P10!&-7eyc-OSk|IQA@A}
zQ(9QCG#jueSzu-$id9&!0wrOv0YzgYVz2@uM6wG31}d@)1_mm!6b1$=S+WEu2}M#w
zvJ40ZDzOFuM6o0Rh*4OuK!{ke1_MN~CIN_1ShxfLh*+@(0Yq6@Sy{LN|Anvwjj;s)
ML;wL%uV=LY00kR;TmS$7

literal 0
HcmV?d00001

diff --git a/docs/global.html b/docs/global.html
new file mode 100644
index 0000000..3e7e00d
--- /dev/null
+++ b/docs/global.html
@@ -0,0 +1,6802 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Global</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Global</h1>
+
+    
+
+
+
+
+<section>
+
+<header>
+    
+        <h2></h2>
+        
+    
+</header>
+
+<article>
+    <div class="container-overview">
+    
+        
+
+        
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+        
+    
+    </div>
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+        <h3 class="subsection-title">Members</h3>
+
+        
+            
+<h4 class="name" id="addAnchorByPoint"><span class="type-signature">(constant) </span>addAnchorByPoint<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    addAnchorByPoint.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line254">line 254</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="addGeoLink"><span class="type-signature">(constant) </span>addGeoLink<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    addGeoLink.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line164">line 164</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="addRefLink"><span class="type-signature">(constant) </span>addRefLink<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    addRefLink. replace selected text into markdown link by reference style links
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line384">line 384</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="animateRectTransition"><span class="type-signature">(constant) </span>animateRectTransition<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Animate transition of DOMRect, with Web Animation API
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line34">line 34</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="cm"><span class="type-signature">(constant) </span>cm<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    CodeMirror Instance
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line258">line 258</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="contentFromHash"><span class="type-signature">(constant) </span>contentFromHash<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Hash and Query Parameters in URL
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line298">line 298</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="createDocLink"><span class="type-signature">(constant) </span>createDocLink<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    CreateDocLink.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line183">line 183</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="createGeoLink"><span class="type-signature">(constant) </span>createGeoLink<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Create geolinks, which points to map by geo schema and id
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line139">line 139</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="defaultContent"><span class="type-signature">(constant) </span>defaultContent<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Contents for tutorial
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line83">line 83</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="defaultLayouts"><span class="type-signature">(constant) </span>defaultLayouts<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Default Layouts
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbymap.mjs.html">dumbymap.mjs</a>, <a href="dumbymap.mjs.html#line19">line 19</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="editor"><span class="type-signature">(constant) </span>editor<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Editor from EasyMDE
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line145">line 145</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="generateMaps"><span class="type-signature">(constant) </span>generateMaps<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    generateMaps.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbymap.mjs.html">dumbymap.mjs</a>, <a href="dumbymap.mjs.html#line115">line 115</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="getCoordinatesByPixels"><span class="type-signature">(constant) </span>getCoordinatesByPixels<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    getCoordinatesByPixels.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line356">line 356</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="insideParent"><span class="type-signature">(constant) </span>insideParent<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    insideParent. check children element is inside DOMRect of parent element
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line124">line 124</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="insideWindow"><span class="type-signature">(constant) </span>insideWindow<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    insideWindow. check DOMRect is inside window
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line108">line 108</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="mapBlockSelector"><span class="type-signature">(constant) </span>mapBlockSelector<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Selector of special HTML Elements
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbymap.mjs.html">dumbymap.mjs</a>, <a href="dumbymap.mjs.html#line14">line 14</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="mapCache"><span class="type-signature">(constant) </span>mapCache<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Cache across every dumbymap generation
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbymap.mjs.html">dumbymap.mjs</a>, <a href="dumbymap.mjs.html#line26">line 26</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="markdown2HTML"><span class="type-signature">(constant) </span>markdown2HTML<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    markdown2HTML.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbymap.mjs.html">dumbymap.mjs</a>, <a href="dumbymap.mjs.html#line34">line 34</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="onRemove"><span class="type-signature">(constant) </span>onRemove<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Do callback when HTMLElement in removed
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line7">line 7</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="pickBlockItem"><span class="type-signature">(constant) </span>pickBlockItem<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    pickBlockItem.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line102">line 102</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="pickLayoutItem"><span class="type-signature">(constant) </span>pickLayoutItem<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    pickLayoutItem.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line140">line 140</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="pickMapItem"><span class="type-signature">(constant) </span>pickMapItem<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    pickMapItem.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line81">line 81</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="refLinkPattern"><span class="type-signature">(constant) </span>refLinkPattern<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Variables about Reference Style Links in Markdown
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line26">line 26</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="renderResults"><span class="type-signature">(constant) </span>renderResults<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    renderResults. return a menu item for reporting render results
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line231">line 231</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="restoreCamera"><span class="type-signature">(constant) </span>restoreCamera<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    restoreCamera.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line372">line 372</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="scrollToBlock"><span class="type-signature">(constant) </span>scrollToBlock<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    scrollToBlock. Smoothly scroll to target block.
+If block is bigger than viewport, then pick strategy wisely.
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line47">line 47</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="shiftByWindow"><span class="type-signature">(constant) </span>shiftByWindow<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    shiftByWindow. make sure HTMLElement inside viewport
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line96">line 96</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="toggleBlockFocus"><span class="type-signature">(constant) </span>toggleBlockFocus<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    toggleBlockFocus. Menu Item for toggling focus on a block
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line333">line 333</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="toggleMapFocus"><span class="type-signature">(constant) </span>toggleMapFocus<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    toggleMapFocus. Menu Item for toggling focus on a map
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line344">line 344</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+            
+<h4 class="name" id="url"><span class="type-signature">(constant) </span>url<span class="type-signature"></span></h4>
+
+
+
+
+<div class="description">
+    Variables about dumbymap and editor
+</div>
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line18">line 18</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+        
+    
+
+    
+        <h3 class="subsection-title">Methods</h3>
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="addClassToCodeLines"><span class="type-signature"></span>addClassToCodeLines<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    addClassToCodeLines. Quick hack to style lines inside code block
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line403">line 403</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="addLeaderLine"><span class="type-signature"></span>addLeaderLine<span class="signature">(link, target)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    addLeaderLine, from link element to target element
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>link</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLAnchorElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>target</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Element</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line120">line 120</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="addMapRandomlyByPreset"><span class="type-signature"></span>addMapRandomlyByPreset<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    addMapRandomlyByPreset. insert random text of valid mapclay yaml into editor
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line1003">line 1003</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="addSuggestions"><span class="type-signature"></span>addSuggestions<span class="signature">(anchor, suggestions)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    addSuggestions.  Show element about suggestions {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Codemirror Anchor Object</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>suggestions</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Array.&lt;<a href="Suggestion.html">Suggestion</a>></span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line864">line 864</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="appendRefLink"><span class="type-signature"></span>appendRefLink<span class="signature">(cm, refLink)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    appendRefLink.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>cm</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">CodeMirror</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>refLink</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type"><a href="global.html#RefLink">RefLink</a></span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Reference Style Link of Markdown</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line43">line 43</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="completeForCodeBlock"><span class="type-signature"></span>completeForCodeBlock<span class="signature">(change)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    completeForCodeBlock.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>change</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- codemirror change object</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line423">line 423</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="focusDelay"><span class="type-signature"></span>focusDelay<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    focusDelay. Delay of throttle, value changes by cases
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line59">line 59</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="focusNextBlock"><span class="type-signature"></span>focusNextBlock<span class="signature">(reverse)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    focusNextBlock.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>reverse</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- focus previous block</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line24">line 24</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="focusNextMap"><span class="type-signature"></span>focusNextMap<span class="signature">(reverse)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    focusNextMap.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>reverse</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- focus previous map</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line9">line 9</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getContentFromHash"><span class="type-signature"></span>getContentFromHash<span class="signature">(hash)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    get editor content from hash string
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>hash</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line293">line 293</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getLineWithRenderer"><span class="type-signature"></span>getLineWithRenderer<span class="signature">(anchor)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getLineWithRenderer. Get Renderer by cursor position in code block {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Codemirror Anchor Object</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line623">line 623</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getMarkersFromMaps"><span class="type-signature"></span>getMarkersFromMaps<span class="signature">(link)</span><span class="type-signature"> &rarr; {Array.&lt;HTMLElement>}</span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getMarkersFromMaps. Get marker elements by GeoLink
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>link</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLAnchorElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line94">line 94</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+        
+<div class="param-desc">
+    markers
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Array.&lt;HTMLElement></span>
+
+
+    </dd>
+</dl>
+
+    
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getRefLinks"><span class="type-signature"></span>getRefLinks<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#RefLink">RefLink</a>>}</span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getRefLinks from contents of editor
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line264">line 264</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+        
+<div class="param-desc">
+    refLinks
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Array.&lt;<a href="global.html#RefLink">RefLink</a>></span>
+
+
+    </dd>
+</dl>
+
+    
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getStateFromHash"><span class="type-signature"></span>getStateFromHash<span class="signature">(hash)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    get state of website from hash string
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>hash</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line279">line 279</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getSuggestionFromMapOption"><span class="type-signature"></span>getSuggestionFromMapOption<span class="signature">(option)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getSuggestionFromMapOption. Return suggestion for example of option value {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>option</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line691">line 691</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getSuggestions"><span class="type-signature"></span>getSuggestions<span class="signature">(anchor)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getSuggestions. Get suggestions by current input {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Codemirror Anchor Object</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line743">line 743</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getSuggestionsForOptions"><span class="type-signature"></span>getSuggestionsForOptions<span class="signature">(optionTyped, validOptions)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getSuggestionsForOptions. Return suggestions for valid options {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>optionTyped</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>validOptions</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Array.&lt;Object></span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line663">line 663</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="getSuggestionsFromAliases"><span class="type-signature"></span>getSuggestionsFromAliases<span class="signature">(option)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    getSuggestionsFromAliases. Return suggestions from aliases {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>option</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line710">line 710</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="handleTypingInCodeBlock"><span class="type-signature"></span>handleTypingInCodeBlock<span class="signature">(anchor)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    handleTypingInCodeBlock. Handler for map codeblock {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Codemirror Anchor Object</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line726">line 726</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="insideCodeblockForMap"><span class="type-signature"></span>insideCodeblockForMap<span class="signature">(anchor)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    insideCodeblockForMap. Check if current token is inside code block {{{
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Anchor</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line598">line 598</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="isAnchorVisible"><span class="type-signature"></span>isAnchorVisible<span class="signature">(anchor)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    isAnchorVisible. check anchor(marker) is visible for current map camera
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchor</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Element</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line242">line 242</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="menuForEditor"><span class="type-signature"></span>menuForEditor<span class="signature">(event, menu)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    menuForEditor.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>event</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Event</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Event for context menu</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>menu</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- menu of dumbymap</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line483">line 483</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="printObject"><span class="type-signature"></span>printObject<span class="signature">(obj, parentElement, name)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    printObject. Generate <details> in parent element based on Ojbect properties
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+        <th>Default</th>
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>obj</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Object</span>
+
+
+            
+            </td>
+
+            
+
+            
+                <td class="default">
+                
+                </td>
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>parentElement</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+                <td class="default">
+                
+                </td>
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>name</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+            
+            </td>
+
+            
+
+            
+                <td class="default">
+                
+                    null
+                
+                </td>
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line288">line 288</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="removeBlockFocus"><span class="type-signature"></span>removeBlockFocus<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    removeBlockFocus.
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line84">line 84</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="removeLeaderLines"><span class="type-signature"></span>removeLeaderLines<span class="signature">(link)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    removeLeaderLines. clean lines start from link
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>link</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLAnchorElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line220">line 220</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="switchToNextLayout"><span class="type-signature"></span>switchToNextLayout<span class="signature">(reverse)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    switchToNextLayout.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>reverse</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Boolean</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- Switch to previous one</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line68">line 68</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="throttle"><span class="type-signature"></span>throttle<span class="signature">(func, delay)</span><span class="type-signature"> &rarr; {Any}</span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    Throttle for function call
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>func</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">function</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>delay</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Number</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">milliseconds</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="utils.mjs.html">utils.mjs</a>, <a href="utils.mjs.html#line75">line 75</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+        
+<div class="param-desc">
+    return value of function call, or null if throttled
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">Any</span>
+
+
+    </dd>
+</dl>
+
+    
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="toggleEditing"><span class="type-signature"></span>toggleEditing<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    toggleEditing: toggle editing mode
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line72">line 72</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="updateCMScrollLine"><span class="type-signature"></span>updateCMScrollLine<span class="signature">(cm)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    updateScrollLineByCodeMirror.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>cm</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">CodeMirror</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line359">line 359</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="updateDumbyMap"><span class="type-signature"></span>updateDumbyMap<span class="signature">()</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    update content of HTML about Dumbymap
+</div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line515">line 515</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="updateMapCameraByMarker"><span class="type-signature"></span>updateMapCameraByMarker<span class="signature">(xy)</span><span class="type-signature"> &rarr; {function}</span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    updateMapByMarker. get function for updating map camera by marker
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>xy</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">Array.&lt;Number></span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="dumbyUtils.mjs.html">dumbyUtils.mjs</a>, <a href="dumbyUtils.mjs.html#line232">line 232</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<h5>Returns:</h5>
+
+        
+<div class="param-desc">
+    function
+</div>
+
+
+
+<dl>
+    <dt>
+        Type
+    </dt>
+    <dd>
+        
+<span class="param-type">function</span>
+
+
+    </dd>
+</dl>
+
+    
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="updateScrollLine"><span class="type-signature"></span>updateScrollLine<span class="signature">(ele)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    updateScrollLine. Update data attribute by scroll on given element
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>ele</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">HTMLElement</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line316">line 316</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+            
+
+    
+
+    
+    <h4 class="name" id="validateAnchorName"><span class="type-signature"></span>validateAnchorName<span class="signature">(anchorName)</span><span class="type-signature"></span></h4>
+    
+
+    
+
+
+
+<div class="description">
+    validateAnchorName.
+</div>
+
+
+
+
+
+
+
+
+
+    <h5>Parameters:</h5>
+    
+
+<table class="params">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>anchorName</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">String</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last"></td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line34">line 34</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        
+    
+
+    
+        <h3 class="subsection-title">Type Definitions</h3>
+
+        
+                
+<h4 class="name" id="RefLink">RefLink</h4>
+
+
+
+
+
+
+    <h5>Type:</h5>
+    <ul>
+        <li>
+            
+<span class="param-type">Object</span>
+
+
+        </li>
+    </ul>
+
+
+
+
+
+    <h5 class="subsection-title">Properties:</h5>
+
+    
+
+<table class="props">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>ref</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- name of link</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>link</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- content of link</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>title</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+|
+
+<span class="param-type">null</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- title of link</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="MenuItem.mjs.html">MenuItem.mjs</a>, <a href="MenuItem.mjs.html#line3">line 3</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+            
+                
+<h4 class="name" id="RefLink">RefLink</h4>
+
+
+
+
+
+
+    <h5>Type:</h5>
+    <ul>
+        <li>
+            
+<span class="param-type">Object</span>
+
+
+        </li>
+    </ul>
+
+
+
+
+
+    <h5 class="subsection-title">Properties:</h5>
+
+    
+
+<table class="props">
+    <thead>
+    <tr>
+        
+        <th>Name</th>
+        
+
+        <th>Type</th>
+
+        
+
+        
+
+        <th class="last">Description</th>
+    </tr>
+    </thead>
+
+    <tbody>
+    
+
+        <tr>
+            
+                <td class="name"><code>ref</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- name of link</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>link</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- content of link</td>
+        </tr>
+
+    
+
+        <tr>
+            
+                <td class="name"><code>title</code></td>
+            
+
+            <td class="type">
+            
+                
+<span class="param-type">string</span>
+|
+
+<span class="param-type">null</span>
+
+
+            
+            </td>
+
+            
+
+            
+
+            <td class="description last">- title of link</td>
+        </tr>
+
+    
+    </tbody>
+</table>
+
+
+
+
+<dl class="details">
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+
+    
+    <dt class="tag-source">Source:</dt>
+    <dd class="tag-source"><ul class="dummy"><li>
+        <a href="editor.mjs.html">editor.mjs</a>, <a href="editor.mjs.html#line9">line 9</a>
+    </li></ul></dd>
+    
+
+    
+
+    
+
+    
+</dl>
+
+
+
+
+
+
+            
+    
+
+    
+</article>
+
+</section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..34ba71b
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Home</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Home</h1>
+
+    
+
+
+
+    
+
+
+    <h3> </h3>
+
+
+
+
+
+
+
+
+
+
+    
+
+
+
+
+
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js
new file mode 100644
index 0000000..4354785
--- /dev/null
+++ b/docs/scripts/linenumber.js
@@ -0,0 +1,25 @@
+/*global document */
+(() => {
+    const source = document.getElementsByClassName('prettyprint source linenums');
+    let i = 0;
+    let lineNumber = 0;
+    let lineId;
+    let lines;
+    let totalLines;
+    let anchorHash;
+
+    if (source && source[0]) {
+        anchorHash = document.location.hash.substring(1);
+        lines = source[0].getElementsByTagName('li');
+        totalLines = lines.length;
+
+        for (; i < totalLines; i++) {
+            lineNumber++;
+            lineId = `line${lineNumber}`;
+            lines[i].id = lineId;
+            if (lineId === anchorHash) {
+                lines[i].className += ' selected';
+            }
+        }
+    }
+})();
diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/docs/scripts/prettify/Apache-License-2.0.txt
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js
new file mode 100644
index 0000000..041e1f5
--- /dev/null
+++ b/docs/scripts/prettify/lang-css.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
+/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js
new file mode 100644
index 0000000..eef5ad7
--- /dev/null
+++ b/docs/scripts/prettify/prettify.js
@@ -0,0 +1,28 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
+["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
+/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/docs/styles/jsdoc-default.css b/docs/styles/jsdoc-default.css
new file mode 100644
index 0000000..7d1729d
--- /dev/null
+++ b/docs/styles/jsdoc-default.css
@@ -0,0 +1,358 @@
+@font-face {
+    font-family: 'Open Sans';
+    font-weight: normal;
+    font-style: normal;
+    src: url('../fonts/OpenSans-Regular-webfont.eot');
+    src:
+        local('Open Sans'),
+        local('OpenSans'),
+        url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
+        url('../fonts/OpenSans-Regular-webfont.woff') format('woff'),
+        url('../fonts/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
+}
+
+@font-face {
+    font-family: 'Open Sans Light';
+    font-weight: normal;
+    font-style: normal;
+    src: url('../fonts/OpenSans-Light-webfont.eot');
+    src:
+        local('Open Sans Light'),
+        local('OpenSans Light'),
+        url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
+        url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
+        url('../fonts/OpenSans-Light-webfont.svg#open_sanslight') format('svg');
+}
+
+html
+{
+    overflow: auto;
+    background-color: #fff;
+    font-size: 14px;
+}
+
+body
+{
+    font-family: 'Open Sans', sans-serif;
+    line-height: 1.5;
+    color: #4d4e53;
+    background-color: white;
+}
+
+a, a:visited, a:active {
+    color: #0095dd;
+    text-decoration: none;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+header
+{
+    display: block;
+    padding: 0px 4px;
+}
+
+tt, code, kbd, samp {
+    font-family: Consolas, Monaco, 'Andale Mono', monospace;
+}
+
+.class-description {
+    font-size: 130%;
+    line-height: 140%;
+    margin-bottom: 1em;
+    margin-top: 1em;
+}
+
+.class-description:empty {
+    margin: 0;
+}
+
+#main {
+    float: left;
+    width: 70%;
+}
+
+article dl {
+    margin-bottom: 40px;
+}
+
+article img {
+  max-width: 100%;
+}
+
+section
+{
+    display: block;
+    background-color: #fff;
+    padding: 12px 24px;
+    border-bottom: 1px solid #ccc;
+    margin-right: 30px;
+}
+
+.variation {
+    display: none;
+}
+
+.signature-attributes {
+    font-size: 60%;
+    color: #aaa;
+    font-style: italic;
+    font-weight: lighter;
+}
+
+nav
+{
+    display: block;
+    float: right;
+    margin-top: 28px;
+    width: 30%;
+    box-sizing: border-box;
+    border-left: 1px solid #ccc;
+    padding-left: 16px;
+}
+
+nav ul {
+    font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
+    font-size: 100%;
+    line-height: 17px;
+    padding: 0;
+    margin: 0;
+    list-style-type: none;
+}
+
+nav ul a, nav ul a:visited, nav ul a:active {
+    font-family: Consolas, Monaco, 'Andale Mono', monospace;
+    line-height: 18px;
+    color: #4D4E53;
+}
+
+nav h3 {
+    margin-top: 12px;
+}
+
+nav li {
+    margin-top: 6px;
+}
+
+footer {
+    display: block;
+    padding: 6px;
+    margin-top: 12px;
+    font-style: italic;
+    font-size: 90%;
+}
+
+h1, h2, h3, h4 {
+    font-weight: 200;
+    margin: 0;
+}
+
+h1
+{
+    font-family: 'Open Sans Light', sans-serif;
+    font-size: 48px;
+    letter-spacing: -2px;
+    margin: 12px 24px 20px;
+}
+
+h2, h3.subsection-title
+{
+    font-size: 30px;
+    font-weight: 700;
+    letter-spacing: -1px;
+    margin-bottom: 12px;
+}
+
+h3
+{
+    font-size: 24px;
+    letter-spacing: -0.5px;
+    margin-bottom: 12px;
+}
+
+h4
+{
+    font-size: 18px;
+    letter-spacing: -0.33px;
+    margin-bottom: 12px;
+    color: #4d4e53;
+}
+
+h5, .container-overview .subsection-title
+{
+    font-size: 120%;
+    font-weight: bold;
+    letter-spacing: -0.01em;
+    margin: 8px 0 3px 0;
+}
+
+h6
+{
+    font-size: 100%;
+    letter-spacing: -0.01em;
+    margin: 6px 0 3px 0;
+    font-style: italic;
+}
+
+table
+{
+    border-spacing: 0;
+    border: 0;
+    border-collapse: collapse;
+}
+
+td, th
+{
+    border: 1px solid #ddd;
+    margin: 0px;
+    text-align: left;
+    vertical-align: top;
+    padding: 4px 6px;
+    display: table-cell;
+}
+
+thead tr
+{
+    background-color: #ddd;
+    font-weight: bold;
+}
+
+th { border-right: 1px solid #aaa; }
+tr > th:last-child { border-right: 1px solid #ddd; }
+
+.ancestors, .attribs { color: #999; }
+.ancestors a, .attribs a
+{
+    color: #999 !important;
+    text-decoration: none;
+}
+
+.clear
+{
+    clear: both;
+}
+
+.important
+{
+    font-weight: bold;
+    color: #950B02;
+}
+
+.yes-def {
+    text-indent: -1000px;
+}
+
+.type-signature {
+    color: #aaa;
+}
+
+.name, .signature {
+    font-family: Consolas, Monaco, 'Andale Mono', monospace;
+}
+
+.details { margin-top: 14px; border-left: 2px solid #DDD; }
+.details dt { width: 120px; float: left; padding-left: 10px;  padding-top: 6px; }
+.details dd { margin-left: 70px; }
+.details ul { margin: 0; }
+.details ul { list-style-type: none; }
+.details li { margin-left: 30px; padding-top: 6px; }
+.details pre.prettyprint { margin: 0 }
+.details .object-value { padding-top: 0; }
+
+.description {
+    margin-bottom: 1em;
+    margin-top: 1em;
+}
+
+.code-caption
+{
+    font-style: italic;
+    font-size: 107%;
+    margin: 0;
+}
+
+.source
+{
+    border: 1px solid #ddd;
+    width: 80%;
+    overflow: auto;
+}
+
+.prettyprint.source {
+    width: inherit;
+}
+
+.source code
+{
+    font-size: 100%;
+    line-height: 18px;
+    display: block;
+    padding: 4px 12px;
+    margin: 0;
+    background-color: #fff;
+    color: #4D4E53;
+}
+
+.prettyprint code span.line
+{
+  display: inline-block;
+}
+
+.prettyprint.linenums
+{
+  padding-left: 70px;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+}
+
+.prettyprint.linenums ol
+{
+  padding-left: 0;
+}
+
+.prettyprint.linenums li
+{
+  border-left: 3px #ddd solid;
+}
+
+.prettyprint.linenums li.selected,
+.prettyprint.linenums li.selected *
+{
+  background-color: lightyellow;
+}
+
+.prettyprint.linenums li *
+{
+  -webkit-user-select: text;
+  -moz-user-select: text;
+  -ms-user-select: text;
+  user-select: text;
+}
+
+.params .name, .props .name, .name code {
+    color: #4D4E53;
+    font-family: Consolas, Monaco, 'Andale Mono', monospace;
+    font-size: 100%;
+}
+
+.params td.description > p:first-child,
+.props td.description > p:first-child
+{
+    margin-top: 0;
+    padding-top: 0;
+}
+
+.params td.description > p:last-child,
+.props td.description > p:last-child
+{
+    margin-bottom: 0;
+    padding-bottom: 0;
+}
+
+.disabled {
+    color: #454545;
+}
diff --git a/docs/styles/prettify-jsdoc.css b/docs/styles/prettify-jsdoc.css
new file mode 100644
index 0000000..5a2526e
--- /dev/null
+++ b/docs/styles/prettify-jsdoc.css
@@ -0,0 +1,111 @@
+/* JSDoc prettify.js theme */
+
+/* plain text */
+.pln {
+  color: #000000;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* string content */
+.str {
+  color: #006400;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a keyword */
+.kwd {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* a comment */
+.com {
+  font-weight: normal;
+  font-style: italic;
+}
+
+/* a type name */
+.typ {
+  color: #000000;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a literal value */
+.lit {
+  color: #006400;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* punctuation */
+.pun {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* lisp open bracket */
+.opn {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* lisp close bracket */
+.clo {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* a markup tag name */
+.tag {
+  color: #006400;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a markup attribute name */
+.atn {
+  color: #006400;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a markup attribute value */
+.atv {
+  color: #006400;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a declaration */
+.dec {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* a variable name */
+.var {
+  color: #000000;
+  font-weight: normal;
+  font-style: normal;
+}
+
+/* a function name */
+.fun {
+  color: #000000;
+  font-weight: bold;
+  font-style: normal;
+}
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums {
+  margin-top: 0;
+  margin-bottom: 0;
+}
diff --git a/docs/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css
new file mode 100644
index 0000000..b6f92a7
--- /dev/null
+++ b/docs/styles/prettify-tomorrow.css
@@ -0,0 +1,132 @@
+/* Tomorrow Theme */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* Pretty printing styles. Used with prettify.js. */
+/* SPAN elements with the classes below are added by prettyprint. */
+/* plain text */
+.pln {
+  color: #4d4d4c; }
+
+@media screen {
+  /* string content */
+  .str {
+    color: #718c00; }
+
+  /* a keyword */
+  .kwd {
+    color: #8959a8; }
+
+  /* a comment */
+  .com {
+    color: #8e908c; }
+
+  /* a type name */
+  .typ {
+    color: #4271ae; }
+
+  /* a literal value */
+  .lit {
+    color: #f5871f; }
+
+  /* punctuation */
+  .pun {
+    color: #4d4d4c; }
+
+  /* lisp open bracket */
+  .opn {
+    color: #4d4d4c; }
+
+  /* lisp close bracket */
+  .clo {
+    color: #4d4d4c; }
+
+  /* a markup tag name */
+  .tag {
+    color: #c82829; }
+
+  /* a markup attribute name */
+  .atn {
+    color: #f5871f; }
+
+  /* a markup attribute value */
+  .atv {
+    color: #3e999f; }
+
+  /* a declaration */
+  .dec {
+    color: #f5871f; }
+
+  /* a variable name */
+  .var {
+    color: #c82829; }
+
+  /* a function name */
+  .fun {
+    color: #4271ae; } }
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+  .str {
+    color: #060; }
+
+  .kwd {
+    color: #006;
+    font-weight: bold; }
+
+  .com {
+    color: #600;
+    font-style: italic; }
+
+  .typ {
+    color: #404;
+    font-weight: bold; }
+
+  .lit {
+    color: #044; }
+
+  .pun, .opn, .clo {
+    color: #440; }
+
+  .tag {
+    color: #006;
+    font-weight: bold; }
+
+  .atn {
+    color: #404; }
+
+  .atv {
+    color: #060; } }
+/* Style */
+/*
+pre.prettyprint {
+  background: white;
+  font-family: Consolas, Monaco, 'Andale Mono', monospace;
+  font-size: 12px;
+  line-height: 1.5;
+  border: 1px solid #ccc;
+  padding: 10px; }
+*/
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums {
+  margin-top: 0;
+  margin-bottom: 0; }
+
+/* IE indents via margin-left */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L4,
+li.L5,
+li.L6,
+li.L7,
+li.L8,
+li.L9 {
+  /* */ }
+
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 {
+  /* */ }
diff --git a/docs/utils.mjs.html b/docs/utils.mjs.html
new file mode 100644
index 0000000..f7b626c
--- /dev/null
+++ b/docs/utils.mjs.html
@@ -0,0 +1,186 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="utf-8">
+    <title>JSDoc: Source: utils.mjs</title>
+
+    <script src="scripts/prettify/prettify.js"> </script>
+    <script src="scripts/prettify/lang-css.js"> </script>
+    <!--[if lt IE 9]>
+      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+    <![endif]-->
+    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
+    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
+</head>
+
+<body>
+
+<div id="main">
+
+    <h1 class="page-title">Source: utils.mjs</h1>
+
+    
+
+
+
+    
+    <section>
+        <article>
+            <pre class="prettyprint source linenums"><code>/**
+ * Do callback when HTMLElement in removed
+ *
+ * @param {HTMLElement} element observing
+ * @param {Function} callback
+ */
+export const onRemove = (element, callback) => {
+  const parent = element.parentNode
+  if (!parent) throw new Error('The node must already be attached')
+
+  const obs = new window.MutationObserver(mutations => {
+    for (const mutation of mutations) {
+      for (const el of mutation.removedNodes) {
+        if (el === element) {
+          obs.disconnect()
+          callback()
+        }
+      }
+    }
+  })
+  obs.observe(parent, { childList: true })
+}
+
+/**
+ * Animate transition of DOMRect, with Web Animation API
+ *
+ * @param {HTMLElement} element                 Element which animation applies
+ * @param {DOMRect}     rect                    DOMRect for transition
+ * @param {Object}      options
+ * @param {Boolean}     options.resume          If true, transition starts from rect to DOMRect of element
+ * @param {Number}      options.duration        Duration of animation in milliseconds
+ * @returns {Animation} https://developer.mozilla.org/en-US/docs/Web/API/Animation
+ */
+export const animateRectTransition = (element, rect, options = {}) => {
+  if (!element.parentElement) { throw new Error('The node must already be attached') }
+
+  const { width: w1, height: h1, left: x1, top: y1 } = rect
+  const {
+    width: w2,
+    height: h2,
+    left: x2,
+    top: y2,
+  } = element.getBoundingClientRect()
+
+  const rw = (w1 ?? w2) / w2
+  const rh = (h1 ?? h2) / h2
+  const dx = x1 - x2
+  const dy = y1 - y2
+
+  if ((dx === 0 &amp;&amp; dy === 0) || !isFinite(rw) || !isFinite(rh)) {
+    return element.animate([], { duration: 0 })
+  }
+
+  const transform1 = 'translate(0, 0) scale(1, 1)'
+  const transform2 = `translate(${dx}px, ${dy}px) scale(${rw}, ${rh})`
+  const keyframes = [
+    { transform: transform1, opacity: 1 },
+    { transform: transform2, opacity: 0.3 },
+  ]
+  if (options.resume === true) keyframes.reverse()
+
+  return element.animate(keyframes, {
+    duration: options.duration ?? 500,
+    easing: 'ease-in-out',
+  })
+}
+
+/**
+ * Throttle for function call
+ *
+ * @param {Function} func
+ * @param {Number} delay milliseconds
+ * @returns {Any} return value of function call, or null if throttled
+ */
+export function throttle (func, delay) {
+  let timerFlag = null
+
+  return function (...args) {
+    const context = this
+    if (timerFlag !== null) return null
+
+    timerFlag = setTimeout(
+      () => (timerFlag = null),
+      typeof delay === 'function' ? delay.call(context) : delay,
+    )
+
+    return func.call(context, ...args)
+  }
+}
+
+/**
+ * shiftByWindow. make sure HTMLElement inside viewport
+ *
+ * @param {HTMLElement} element
+ */
+export const shiftByWindow = element => {
+  const rect = element.getBoundingClientRect()
+  const offsetX = window.innerWidth - rect.left - rect.width
+  const offsetY = window.innerHeight - rect.top - rect.height
+  element.style.transform = `translate(${offsetX &lt; 0 ? offsetX : 0}px, ${offsetY &lt; 0 ? offsetY : 0}px)`
+}
+
+/**
+ * insideWindow. check DOMRect is inside window
+ *
+ * @param {HTMLElement} element
+ */
+export const insideWindow = element => {
+  const rect = element.getBoundingClientRect()
+  return (
+    rect.left > 0 &amp;&amp;
+    rect.right &lt; window.innerWidth + rect.width &amp;&amp;
+    rect.top > 0 &amp;&amp;
+    rect.bottom &lt; window.innerHeight + rect.height
+  )
+}
+
+/**
+ * insideParent. check children element is inside DOMRect of parent element
+ *
+ * @param {HTMLElement} childElement
+ * @param {HTMLElement} parentElement
+ */
+export const insideParent = (childElement, parentElement) => {
+  const childRect = childElement.getBoundingClientRect()
+  const parentRect = parentElement.getBoundingClientRect()
+  const offset = 10
+
+  return (
+    childRect.left &lt; parentRect.right - offset &amp;&amp;
+    childRect.right > parentRect.left + offset &amp;&amp;
+    childRect.top &lt; parentRect.bottom - offset &amp;&amp;
+    childRect.bottom > parentRect.top + offset
+  )
+}
+</code></pre>
+        </article>
+    </section>
+
+
+
+
+</div>
+
+<nav>
+    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Folder.html">Folder</a></li><li><a href="Item.html">Item</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Overlay.html">Overlay</a></li><li><a href="SideBySide.html">SideBySide</a></li><li><a href="Suggestion.html">Suggestion</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addAnchorByPoint">addAnchorByPoint</a></li><li><a href="global.html#addClassToCodeLines">addClassToCodeLines</a></li><li><a href="global.html#addGeoLink">addGeoLink</a></li><li><a href="global.html#addLeaderLine">addLeaderLine</a></li><li><a href="global.html#addMapRandomlyByPreset">addMapRandomlyByPreset</a></li><li><a href="global.html#addRefLink">addRefLink</a></li><li><a href="global.html#addSuggestions">addSuggestions</a></li><li><a href="global.html#animateRectTransition">animateRectTransition</a></li><li><a href="global.html#appendRefLink">appendRefLink</a></li><li><a href="global.html#cm">cm</a></li><li><a href="global.html#completeForCodeBlock">completeForCodeBlock</a></li><li><a href="global.html#contentFromHash">contentFromHash</a></li><li><a href="global.html#createDocLink">createDocLink</a></li><li><a href="global.html#createGeoLink">createGeoLink</a></li><li><a href="global.html#defaultContent">defaultContent</a></li><li><a href="global.html#defaultLayouts">defaultLayouts</a></li><li><a href="global.html#editor">editor</a></li><li><a href="global.html#focusDelay">focusDelay</a></li><li><a href="global.html#focusNextBlock">focusNextBlock</a></li><li><a href="global.html#focusNextMap">focusNextMap</a></li><li><a href="global.html#generateMaps">generateMaps</a></li><li><a href="global.html#getContentFromHash">getContentFromHash</a></li><li><a href="global.html#getCoordinatesByPixels">getCoordinatesByPixels</a></li><li><a href="global.html#getLineWithRenderer">getLineWithRenderer</a></li><li><a href="global.html#getMarkersFromMaps">getMarkersFromMaps</a></li><li><a href="global.html#getRefLinks">getRefLinks</a></li><li><a href="global.html#getStateFromHash">getStateFromHash</a></li><li><a href="global.html#getSuggestionFromMapOption">getSuggestionFromMapOption</a></li><li><a href="global.html#getSuggestions">getSuggestions</a></li><li><a href="global.html#getSuggestionsForOptions">getSuggestionsForOptions</a></li><li><a href="global.html#getSuggestionsFromAliases">getSuggestionsFromAliases</a></li><li><a href="global.html#handleTypingInCodeBlock">handleTypingInCodeBlock</a></li><li><a href="global.html#insideCodeblockForMap">insideCodeblockForMap</a></li><li><a href="global.html#insideParent">insideParent</a></li><li><a href="global.html#insideWindow">insideWindow</a></li><li><a href="global.html#isAnchorVisible">isAnchorVisible</a></li><li><a href="global.html#mapBlockSelector">mapBlockSelector</a></li><li><a href="global.html#mapCache">mapCache</a></li><li><a href="global.html#markdown2HTML">markdown2HTML</a></li><li><a href="global.html#menuForEditor">menuForEditor</a></li><li><a href="global.html#onRemove">onRemove</a></li><li><a href="global.html#pickBlockItem">pickBlockItem</a></li><li><a href="global.html#pickLayoutItem">pickLayoutItem</a></li><li><a href="global.html#pickMapItem">pickMapItem</a></li><li><a href="global.html#printObject">printObject</a></li><li><a href="global.html#refLinkPattern">refLinkPattern</a></li><li><a href="global.html#removeBlockFocus">removeBlockFocus</a></li><li><a href="global.html#removeLeaderLines">removeLeaderLines</a></li><li><a href="global.html#renderResults">renderResults</a></li><li><a href="global.html#restoreCamera">restoreCamera</a></li><li><a href="global.html#scrollToBlock">scrollToBlock</a></li><li><a href="global.html#shiftByWindow">shiftByWindow</a></li><li><a href="global.html#switchToNextLayout">switchToNextLayout</a></li><li><a href="global.html#throttle">throttle</a></li><li><a href="global.html#toggleBlockFocus">toggleBlockFocus</a></li><li><a href="global.html#toggleEditing">toggleEditing</a></li><li><a href="global.html#toggleMapFocus">toggleMapFocus</a></li><li><a href="global.html#updateCMScrollLine">updateCMScrollLine</a></li><li><a href="global.html#updateDumbyMap">updateDumbyMap</a></li><li><a href="global.html#updateMapCameraByMarker">updateMapCameraByMarker</a></li><li><a href="global.html#updateScrollLine">updateScrollLine</a></li><li><a href="global.html#url">url</a></li><li><a href="global.html#validateAnchorName">validateAnchorName</a></li></ul>
+</nav>
+
+<br class="clear">
+
+<footer>
+    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Oct 10 2024 12:30:15 GMT+0800 (Taipei Standard Time)
+</footer>
+
+<script> prettyPrint(); </script>
+<script src="scripts/linenumber.js"> </script>
+</body>
+</html>
diff --git a/index.html b/index.html
index 86b725e..05f9653 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
   <meta property="og:description" content="Read HTML with maps"/>
   <meta property="og:type" content="website">
   <meta property="og:url" content="https://outdoorsafetylab.github.io/dumbymap">
-  <meta property="og:image" content="./assets/og-example1.png">
+  <meta property="og:image" content="https://outdoorsafetylab.github.io/dumbymap/assets/og-example1.png">
 
   <!-- FIXME -->
   <link rel="stylesheet" type="text/css" href="./dist/css/style.css"/>